Message ID | 1389142011-27356-2-git-send-email-al.stone@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wednesday 08 January 2014, al.stone@linaro.org wrote: > Even though support for X86 in hardware reduced mode is possible, it > is NOT enabled. Extensive effort has gone into the Linux kernel so that > there is a single kernel image than can run on all x86 hardware; the kernel > changes run-time behavior to adapt to the hardware being used. This is not > currently possible with the existing ACPICA infrastructure but only presents > a problem on achitectures supporting both hardware-reduced and legacy modes > of ACPI -- i.e., on x86 only. Not sure about the logic here: While it's certainly possible to build a kernel that runs on all x86 machines, it's also possible to build one that only runs on some of them when some basic options are turned off. I don't see any difference between that and what we have on ARM64 or the multiplatform subset of ARM32. I don't think you need any strict architecture dependency here. If you want to make it harder for users to accidentally turn it on, I'd suggest using config ACPI_REDUCED_HARDWARE_ONLY bool "Hardware-reduced ACPI support only" depends on !X86 || EXPERT Arnd
On 01/08/2014 05:46 AM, Arnd Bergmann wrote: > On Wednesday 08 January 2014, al.stone@linaro.org wrote: >> Even though support for X86 in hardware reduced mode is possible, it >> is NOT enabled. Extensive effort has gone into the Linux kernel so that >> there is a single kernel image than can run on all x86 hardware; the kernel >> changes run-time behavior to adapt to the hardware being used. This is not >> currently possible with the existing ACPICA infrastructure but only presents >> a problem on achitectures supporting both hardware-reduced and legacy modes >> of ACPI -- i.e., on x86 only. > > Not sure about the logic here: While it's certainly possible to build a kernel > that runs on all x86 machines, it's also possible to build one that only > runs on some of them when some basic options are turned off. I don't see > any difference between that and what we have on ARM64 or the multiplatform > subset of ARM32. > > I don't think you need any strict architecture dependency here. If you want > to make it harder for users to accidentally turn it on, I'd suggest using > > config ACPI_REDUCED_HARDWARE_ONLY > bool "Hardware-reduced ACPI support only" > depends on !X86 || EXPERT > > Arnd Hrm. Seems a fair point. I'll respin the patch set to incorporate this, though now that I think of it I will add !IA64 since it is unlikely they'll do a reduced hardware platform any time soon and would have the same problem as x86.
On 8 January 2014 12:46, Arnd Bergmann <arnd@arndb.de> wrote: > On Wednesday 08 January 2014, al.stone@linaro.org wrote: >> Even though support for X86 in hardware reduced mode is possible, it >> is NOT enabled. Extensive effort has gone into the Linux kernel so that >> there is a single kernel image than can run on all x86 hardware; the kernel >> changes run-time behavior to adapt to the hardware being used. This is not >> currently possible with the existing ACPICA infrastructure but only presents >> a problem on achitectures supporting both hardware-reduced and legacy modes >> of ACPI -- i.e., on x86 only. > > Not sure about the logic here: While it's certainly possible to build a kernel > that runs on all x86 machines, it's also possible to build one that only > runs on some of them when some basic options are turned off. I don't see > any difference between that and what we have on ARM64 or the multiplatform > subset of ARM32. Would we ever need !CONFIG_ACPI_REDUCED_HARDWARE_ONLY on ARM or ARM64? If not, we could even make this always on for these archs.
On 01/09/2014 10:38 AM, Catalin Marinas wrote: > On 8 January 2014 12:46, Arnd Bergmann <arnd@arndb.de> wrote: >> On Wednesday 08 January 2014, al.stone@linaro.org wrote: >>> Even though support for X86 in hardware reduced mode is possible, it >>> is NOT enabled. Extensive effort has gone into the Linux kernel so that >>> there is a single kernel image than can run on all x86 hardware; the kernel >>> changes run-time behavior to adapt to the hardware being used. This is not >>> currently possible with the existing ACPICA infrastructure but only presents >>> a problem on achitectures supporting both hardware-reduced and legacy modes >>> of ACPI -- i.e., on x86 only. >> >> Not sure about the logic here: While it's certainly possible to build a kernel >> that runs on all x86 machines, it's also possible to build one that only >> runs on some of them when some basic options are turned off. I don't see >> any difference between that and what we have on ARM64 or the multiplatform >> subset of ARM32. > > Would we ever need !CONFIG_ACPI_REDUCED_HARDWARE_ONLY on ARM or ARM64? > If not, we could even make this always on for these archs. > Not that I know of -- and I would hope not. This mode is so much more straightforward that it makes no sense to me to do anything but reduced HW if you have the choice. I assume you were thinking of something like this in the arch Kconfig file: config ARM64 .... select ACPI_REDUCED_HARDWARE_ONLY if ACPI ... But, do let me know if you had something else in mind. I think it does make sense to add so I'll put this in the next version.
On Thu, Jan 09, 2014 at 09:20:23PM +0000, Al Stone wrote: > On 01/09/2014 10:38 AM, Catalin Marinas wrote: > > On 8 January 2014 12:46, Arnd Bergmann <arnd@arndb.de> wrote: > >> On Wednesday 08 January 2014, al.stone@linaro.org wrote: > >>> Even though support for X86 in hardware reduced mode is possible, it > >>> is NOT enabled. Extensive effort has gone into the Linux kernel so that > >>> there is a single kernel image than can run on all x86 hardware; the kernel > >>> changes run-time behavior to adapt to the hardware being used. This is not > >>> currently possible with the existing ACPICA infrastructure but only presents > >>> a problem on achitectures supporting both hardware-reduced and legacy modes > >>> of ACPI -- i.e., on x86 only. > >> > >> Not sure about the logic here: While it's certainly possible to build a kernel > >> that runs on all x86 machines, it's also possible to build one that only > >> runs on some of them when some basic options are turned off. I don't see > >> any difference between that and what we have on ARM64 or the multiplatform > >> subset of ARM32. > > > > Would we ever need !CONFIG_ACPI_REDUCED_HARDWARE_ONLY on ARM or ARM64? > > If not, we could even make this always on for these archs. > > > > Not that I know of -- and I would hope not. This mode is so much > more straightforward that it makes no sense to me to do anything > but reduced HW if you have the choice. Thanks for clarifying. > I assume you were thinking of something like this in the arch Kconfig > file: > > config ARM64 > .... > select ACPI_REDUCED_HARDWARE_ONLY if ACPI > ... > > But, do let me know if you had something else in mind. I think it does > make sense to add so I'll put this in the next version. The change makes sense but I think it should come with the patches for ACPI support on arm64 rather than your hw-reduced patches.
On 01/10/2014 03:37 AM, Catalin Marinas wrote: > On Thu, Jan 09, 2014 at 09:20:23PM +0000, Al Stone wrote: >> On 01/09/2014 10:38 AM, Catalin Marinas wrote: >>> On 8 January 2014 12:46, Arnd Bergmann <arnd@arndb.de> wrote: >>>> On Wednesday 08 January 2014, al.stone@linaro.org wrote: >>>>> Even though support for X86 in hardware reduced mode is possible, it >>>>> is NOT enabled. Extensive effort has gone into the Linux kernel so that >>>>> there is a single kernel image than can run on all x86 hardware; the kernel >>>>> changes run-time behavior to adapt to the hardware being used. This is not >>>>> currently possible with the existing ACPICA infrastructure but only presents >>>>> a problem on achitectures supporting both hardware-reduced and legacy modes >>>>> of ACPI -- i.e., on x86 only. >>>> >>>> Not sure about the logic here: While it's certainly possible to build a kernel >>>> that runs on all x86 machines, it's also possible to build one that only >>>> runs on some of them when some basic options are turned off. I don't see >>>> any difference between that and what we have on ARM64 or the multiplatform >>>> subset of ARM32. >>> >>> Would we ever need !CONFIG_ACPI_REDUCED_HARDWARE_ONLY on ARM or ARM64? >>> If not, we could even make this always on for these archs. >>> >> >> Not that I know of -- and I would hope not. This mode is so much >> more straightforward that it makes no sense to me to do anything >> but reduced HW if you have the choice. > > Thanks for clarifying. > >> I assume you were thinking of something like this in the arch Kconfig >> file: >> >> config ARM64 >> .... >> select ACPI_REDUCED_HARDWARE_ONLY if ACPI >> ... >> >> But, do let me know if you had something else in mind. I think it does >> make sense to add so I'll put this in the next version. > > The change makes sense but I think it should come with the patches for > ACPI support on arm64 rather than your hw-reduced patches. > Ah. Indeed. That makes more sense; I'll pass it on to my colleagues.
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 4770de5..1199087 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -343,6 +343,18 @@ config ACPI_BGRT data from the firmware boot splash. It will appear under /sys/firmware/acpi/bgrt/ . +config ACPI_REDUCED_HARDWARE_ONLY + bool "Hardware-reduced ACPI support only" + depends on ARM || ARM64 + help + This config item changes the way the ACPI code is built. When this + option is selected, the kernel will use a specialized version of + ACPICA that ONLY supports the ACPI "reduced hardware" mode. The + resulting kernel will be smaller but it will also be restricted to + running in ACPI reduced hardware mode ONLY. + + If you are unsure what to do, do not enable this option. + source "drivers/acpi/apei/Kconfig" config ACPI_EXTLOG diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 28f4f4d..7d71f08 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h @@ -52,6 +52,12 @@ #ifdef __KERNEL__ +/* Compile for reduced hardware mode only with this kernel config */ + +#ifdef CONFIG_ACPI_REDUCED_HARDWARE_ONLY +#define ACPI_REDUCED_HARDWARE 1 +#endif + #include <linux/string.h> #include <linux/kernel.h> #include <linux/ctype.h>