Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1292510

Re: [PATCH RESEND] ACPI/Kconfig: Make ACPI_NFIT depend on EFI_STUB on X86

From Toshi Kani <toshi.kani@hpe.com>
Newsgroups linux.kernel
Subject Re: [PATCH RESEND] ACPI/Kconfig: Make ACPI_NFIT depend on EFI_STUB on X86
Date 2015-12-15 21:10 +0100
Message-ID <qG453-tz-11@gated-at.bofh.it> (permalink)
References (1 earlier) <qG1Ad-7eq-1@gated-at.bofh.it> <qG23f-7pS-13@gated-at.bofh.it> <qG23g-7pS-17@gated-at.bofh.it> <qG23g-7pS-15@gated-at.bofh.it> <qG2cW-7Iu-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 2015-12-15 at 10:05 -0800, Dan Williams wrote:
> On Tue, Dec 15, 2015 at 9:56 AM, Toshi Kani <toshi.kani@hpe.com> wrote:
> > On Tue, 2015-12-15 at 09:53 -0800, Dan Williams wrote:
> [..]
> > > > > > diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
> > > > > > index 5eef4cb..5368baa 100644
> > > > > > --- a/drivers/acpi/Kconfig
> > > > > > +++ b/drivers/acpi/Kconfig
> > > > > > @@ -441,6 +441,7 @@ config ACPI_NFIT
> > > > > >         depends on PHYS_ADDR_T_64BIT
> > > > > >         depends on BLK_DEV
> > > > > >         depends on ARCH_HAS_MMIO_FLUSH
> > > > > > +       depends on !X86 || (X86 && EFI_STUB)
> > > > > >         select LIBNVDIMM
> > > > > >         help
> > > > > >           Infrastructure to probe ACPI 6 compliant platforms
> > > > > > for
> > > > > 
> > > > > This seems wrong to me.
> > > > > 
> > > > > In general Kconfig "depends on" are only about compile-time code
> > > > > dependency, not about working around random bugs in external
> > > > > projects.
> > > > 
> > > > I agree that they do not have a compile dependency, and it looks 
> > > > rather odd.  On the other hand, proper support of the ACPI NFIT 
> > > > extensions has a functional dependency to setup_e820() as this is 
> > > > the only code that can handle the EFI_PERSISTENT_MEMORY type today.
> > > 
> > > What about non-EFI/legeacy-boot systems that only emit e820-type-7?
> > > We lose support for them with this patch, right?
> > 
> > No, having EFI_STUB does not break the legacy BIOS boot.
> > 
> 
> Sorry let me clarify.  A kernel compiled without EFI_STUB loses NFIT
> support.  

I think it is the other way around.  When NFIT is needed, one will enable
all dependent options.  So, an NFIT kernel will have to have EFI code as a
result, even though it runs on the legacy BIOS.  I believe distributed
kernels enable EFI already so that they run on both legacy and EFI
platforms.  Of course, one may wish to build a smallest kernel specific to
NFIT & legacy BIOS platforms and want to disable EFI code, but that seems
to be a special case to me.

> Non-EFI and legacy-boot systems don't have this grub bug to
> worry about, so the dependency is overly restrictive, "breaks", those
> environments.

Yes, we do not have the grub bug on legacy BIOS (although PMEM ranges will
show up as Reserved in the iomem table).  I do not think NFIT being
dependent on EFI is overly restrictive, but I may be wrong and I agree to
drop this patch if that is indeed the case.

Thanks,
-Toshi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH RESEND] ACPI/Kconfig: Make ACPI_NFIT depend on EFI_STUB on X86 Toshi Kani <toshi.kani@hpe.com> - 2015-12-15 18:00 +0100
  Re: [PATCH RESEND] ACPI/Kconfig: Make ACPI_NFIT depend on EFI_STUB on X86 Dan Williams <dan.j.williams@intel.com> - 2015-12-15 18:30 +0100
    Re: [PATCH RESEND] ACPI/Kconfig: Make ACPI_NFIT depend on EFI_STUB  on X86 Toshi Kani <toshi.kani@hpe.com> - 2015-12-15 19:00 +0100
      Re: [PATCH RESEND] ACPI/Kconfig: Make ACPI_NFIT depend on EFI_STUB  on X86 Toshi Kani <toshi.kani@hpe.com> - 2015-12-15 19:00 +0100
        Re: [PATCH RESEND] ACPI/Kconfig: Make ACPI_NFIT depend on EFI_STUB on X86 Dan Williams <dan.j.williams@intel.com> - 2015-12-15 19:10 +0100
          Re: [PATCH RESEND] ACPI/Kconfig: Make ACPI_NFIT depend on EFI_STUB  on X86 Toshi Kani <toshi.kani@hpe.com> - 2015-12-15 21:10 +0100
      Re: [PATCH RESEND] ACPI/Kconfig: Make ACPI_NFIT depend on EFI_STUB on X86 Dan Williams <dan.j.williams@intel.com> - 2015-12-15 19:00 +0100

csiph-web