* [PATCH] acpi: fix early DSDT dmi check warnings on ia64 @ 2010-04-29 1:42 Lin Ming 2010-04-29 14:42 ` Len Brown 2010-04-29 15:56 ` Bjorn Helgaas 0 siblings, 2 replies; 10+ messages in thread From: Lin Ming @ 2010-04-29 1:42 UTC (permalink / raw) To: Len Brown, tony.luck; +Cc: linux-acpi From: Lin Ming <ming.m.lin@intel.com> Subject: [PATCH] acpi: fix early DSDT dmi check warnings on ia64 Tony Luck saw a lot of warning messages on ia64: WARNING: at drivers/firmware/dmi_scan.c:423 dmi_matches+0x70/0x160() dmi check: not initialized yet. This is caused by commit aa2110c(ACPI: add boot option acpi=copy_dsdt to fix corrupt DSDT). DMI is not initialized yet in acpi_early_init. This patch checks the availability of DMI to avoid the warnings. Tested-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> --- drivers/acpi/bus.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 49af19b..047de07 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -847,8 +847,10 @@ void __init acpi_early_init(void) /* * If the machine falls into the DMI check table, * DSDT will be copied to memory + * Only check x86, it's too early to check dmi for ia64 */ - dmi_check_system(dsdt_dmi_table); + if (dmi_available) + dmi_check_system(dsdt_dmi_table); status = acpi_reallocate_root_table(); if (ACPI_FAILURE(status)) { ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] acpi: fix early DSDT dmi check warnings on ia64 2010-04-29 1:42 [PATCH] acpi: fix early DSDT dmi check warnings on ia64 Lin Ming @ 2010-04-29 14:42 ` Len Brown 2010-04-29 15:56 ` Bjorn Helgaas 1 sibling, 0 replies; 10+ messages in thread From: Len Brown @ 2010-04-29 14:42 UTC (permalink / raw) To: Lin Ming; +Cc: tony.luck, linux-acpi x86 calls dmi_scan_machine() to initialize DMI from setup_arch(). ia64 calls dmi_scan_machine() from core_initcall() Maybe they should both call it from the same place? Also, ia64 should not parse entries which are known at compile-time to be x86 specific thanks, Len Brown, Intel Open Source Technology Center ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] acpi: fix early DSDT dmi check warnings on ia64 2010-04-29 1:42 [PATCH] acpi: fix early DSDT dmi check warnings on ia64 Lin Ming 2010-04-29 14:42 ` Len Brown @ 2010-04-29 15:56 ` Bjorn Helgaas 2010-04-29 18:12 ` Luck, Tony 2010-04-29 22:12 ` Luck, Tony 1 sibling, 2 replies; 10+ messages in thread From: Bjorn Helgaas @ 2010-04-29 15:56 UTC (permalink / raw) To: Lin Ming; +Cc: Len Brown, tony.luck, linux-acpi On Wednesday 28 April 2010 07:42:34 pm Lin Ming wrote: > From: Lin Ming <ming.m.lin@intel.com> > Subject: [PATCH] acpi: fix early DSDT dmi check warnings on ia64 > > Tony Luck saw a lot of warning messages on ia64: > WARNING: at drivers/firmware/dmi_scan.c:423 dmi_matches+0x70/0x160() > dmi check: not initialized yet. > > This is caused by commit aa2110c(ACPI: add boot option acpi=copy_dsdt to fix corrupt DSDT). > DMI is not initialized yet in acpi_early_init. > This patch checks the availability of DMI to avoid the warnings. > > Tested-by: Tony Luck <tony.luck@intel.com> > Signed-off-by: Lin Ming <ming.m.lin@intel.com> > --- > drivers/acpi/bus.c | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c > index 49af19b..047de07 100644 > --- a/drivers/acpi/bus.c > +++ b/drivers/acpi/bus.c > @@ -847,8 +847,10 @@ void __init acpi_early_init(void) > /* > * If the machine falls into the DMI check table, > * DSDT will be copied to memory > + * Only check x86, it's too early to check dmi for ia64 I can't remember why this is different between x86 and ia64. If it's reasonable to do, I think it'd be nicer to make DMI available earlier on ia64 so we don't have to add checks like this. Did you investigate that? Bjorn > */ > - dmi_check_system(dsdt_dmi_table); > + if (dmi_available) > + dmi_check_system(dsdt_dmi_table); > > status = acpi_reallocate_root_table(); > if (ACPI_FAILURE(status)) { > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] acpi: fix early DSDT dmi check warnings on ia64 2010-04-29 15:56 ` Bjorn Helgaas @ 2010-04-29 18:12 ` Luck, Tony 2010-04-29 22:12 ` Luck, Tony 1 sibling, 0 replies; 10+ messages in thread From: Luck, Tony @ 2010-04-29 18:12 UTC (permalink / raw) To: Bjorn Helgaas, Lin, Ming M; +Cc: Len Brown, linux-acpi > I can't remember why this is different between x86 and ia64. If > it's reasonable to do, I think it'd be nicer to make DMI available > earlier on ia64 so we don't have to add checks like this. Did you > investigate that? There is not clue in the commit that added this to ia64 as to why dmi_scan_machine() was added as an initcall. I just tried to move it into setup_arch() - immediately after the efi_init() call as in x86 - and my system hung without printing anything in boot. Agreed this would be a better fix. I'll see if I can figure out what this call depends on, and so whether I can move is a bit later, but still early enough to be available for Ming's code to work. -Tony ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] acpi: fix early DSDT dmi check warnings on ia64 2010-04-29 15:56 ` Bjorn Helgaas 2010-04-29 18:12 ` Luck, Tony @ 2010-04-29 22:12 ` Luck, Tony 2010-05-06 1:58 ` Lin Ming 1 sibling, 1 reply; 10+ messages in thread From: Luck, Tony @ 2010-04-29 22:12 UTC (permalink / raw) To: Luck, Tony, Bjorn Helgaas, Lin, Ming M; +Cc: Len Brown, linux-acpi >There is not clue in the commit that added this to ia64 as to why >dmi_scan_machine() was added as an initcall. I just tried to move >it into setup_arch() - immediately after the efi_init() call as in >x86 - and my system hung without printing anything in boot. > >Agreed this would be a better fix. I'll see if I can figure out >what this call depends on, and so whether I can move is a bit later, >but still early enough to be available for Ming's code to work. At a random mid-point in setup_arch() I got a lot of errors from slub about not being able to allocate memory. At the very end of setup_arch() (after paging_init()) it still failed - with a deref NULL inside kmem_alloc(). So it seems to be non-trivial to just move dmi_scan_machine() earlier on ia64 :-( -Tony ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] acpi: fix early DSDT dmi check warnings on ia64 2010-04-29 22:12 ` Luck, Tony @ 2010-05-06 1:58 ` Lin Ming 2010-05-11 2:09 ` Lin Ming 0 siblings, 1 reply; 10+ messages in thread From: Lin Ming @ 2010-05-06 1:58 UTC (permalink / raw) To: Luck, Tony; +Cc: Bjorn Helgaas, Len Brown, linux-acpi On Fri, 2010-04-30 at 06:12 +0800, Luck, Tony wrote: > >There is not clue in the commit that added this to ia64 as to why > >dmi_scan_machine() was added as an initcall. I just tried to move > >it into setup_arch() - immediately after the efi_init() call as in > >x86 - and my system hung without printing anything in boot. > > > >Agreed this would be a better fix. I'll see if I can figure out > >what this call depends on, and so whether I can move is a bit later, > >but still early enough to be available for Ming's code to work. > > At a random mid-point in setup_arch() I got a lot of errors from > slub about not being able to allocate memory. At the very end of > setup_arch() (after paging_init()) it still failed - with a deref > NULL inside kmem_alloc(). > > So it seems to be non-trivial to just move dmi_scan_machine() > earlier on ia64 :-( Sorry for late response, I'm just back from holiday. Len, Can you apply the patch since dmi_available check is needed for ia64? Thanks, Lin Ming ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] acpi: fix early DSDT dmi check warnings on ia64 2010-05-06 1:58 ` Lin Ming @ 2010-05-11 2:09 ` Lin Ming 2010-05-11 23:01 ` Luck, Tony 0 siblings, 1 reply; 10+ messages in thread From: Lin Ming @ 2010-05-11 2:09 UTC (permalink / raw) To: Luck, Tony; +Cc: Bjorn Helgaas, Len Brown, linux-acpi On Thu, 2010-05-06 at 09:58 +0800, Lin Ming wrote: > On Fri, 2010-04-30 at 06:12 +0800, Luck, Tony wrote: > > >There is not clue in the commit that added this to ia64 as to why > > >dmi_scan_machine() was added as an initcall. I just tried to move > > >it into setup_arch() - immediately after the efi_init() call as in > > >x86 - and my system hung without printing anything in boot. > > > > > >Agreed this would be a better fix. I'll see if I can figure out > > >what this call depends on, and so whether I can move is a bit later, > > >but still early enough to be available for Ming's code to work. > > > > At a random mid-point in setup_arch() I got a lot of errors from > > slub about not being able to allocate memory. At the very end of > > setup_arch() (after paging_init()) it still failed - with a deref > > NULL inside kmem_alloc(). > > > > So it seems to be non-trivial to just move dmi_scan_machine() > > earlier on ia64 :-( > > Sorry for late response, I'm just back from holiday. > > Len, > Can you apply the patch since dmi_available check is needed for ia64? Hi, all What do you think of below new fix? Subject: [PATCH] acpi: fix early DSDT dmi check warnings on ia64 Tony Luck saw a lot of warning messages on ia64: WARNING: at drivers/firmware/dmi_scan.c:423 dmi_matches+0x70/0x160() dmi check: not initialized yet. This is caused by commit aa2110c(ACPI: add boot option acpi=copy_dsdt to fix corrupt DSDT). DMI is not initialized yet in acpi_early_init on ia64. The DSDT dmi check table is x86 specific, so make it empty on other archs. And this fixes the warnings on ia64. Reported-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> --- drivers/acpi/bus.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index c0113e6..6ff33a8 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -77,6 +77,7 @@ static int set_copy_dsdt(const struct dmi_system_id *id) return 0; } +#ifdef CONFIG_X86 static struct dmi_system_id dsdt_dmi_table[] __initdata = { /* * Insyde BIOS on some TOSHIBA machines corrupt the DSDT. @@ -97,8 +98,14 @@ static struct dmi_system_id dsdt_dmi_table[] __initdata = { DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), DMI_MATCH(DMI_PRODUCT_NAME, "Satellite L505D"), }, - } + }, + {} }; +#else +static struct dmi_system_id dsdt_dmi_table[] __initdata = { + {} +}; +#endif /* -------------------------------------------------------------------------- Device Management ^ permalink raw reply related [flat|nested] 10+ messages in thread
* RE: [PATCH] acpi: fix early DSDT dmi check warnings on ia64 2010-05-11 2:09 ` Lin Ming @ 2010-05-11 23:01 ` Luck, Tony 2010-05-12 1:26 ` Lin Ming 0 siblings, 1 reply; 10+ messages in thread From: Luck, Tony @ 2010-05-11 23:01 UTC (permalink / raw) To: Lin, Ming M; +Cc: Bjorn Helgaas, Len Brown, linux-acpi +#ifdef CONFIG_X86 static struct dmi_system_id dsdt_dmi_table[] __initdata = { This #ifdef needs to be a few lines earlier to avoid getting a warning: drivers/acpi/bus.c:73: 'set_copy_dsdt' defined but not used But otherwise this patch does work and fixes the problem. Tested-by: Tony Luck <tony.luck@intel.com> Insyde are now writing BIOS for ia64 systems (I have two in my lab). I hope they don't copy this bug from their laptop BIOS to my systems. If they do, we'd have to revisit this :-) -Tony ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] acpi: fix early DSDT dmi check warnings on ia64 2010-05-11 23:01 ` Luck, Tony @ 2010-05-12 1:26 ` Lin Ming 2010-05-20 3:56 ` Len Brown 0 siblings, 1 reply; 10+ messages in thread From: Lin Ming @ 2010-05-12 1:26 UTC (permalink / raw) To: Luck, Tony; +Cc: Bjorn Helgaas, Len Brown, linux-acpi On Wed, 2010-05-12 at 07:01 +0800, Luck, Tony wrote: > +#ifdef CONFIG_X86 > static struct dmi_system_id dsdt_dmi_table[] __initdata = { > > This #ifdef needs to be a few lines earlier to avoid getting a > warning: > > drivers/acpi/bus.c:73: 'set_copy_dsdt' defined but not used Fixed it now. Thanks. Here is new one, Subject: [PATCH] acpi: fix early DSDT dmi check warnings on ia64 Tony Luck saw a lot of warning messages on ia64: WARNING: at drivers/firmware/dmi_scan.c:423 dmi_matches+0x70/0x160() dmi check: not initialized yet. This is caused by commit aa2110c(ACPI: add boot option acpi=copy_dsdt to fix corrupt DSDT). DMI is not initialized yet in acpi_early_init on ia64. The DSDT dmi check table is x86 specific, so make it empty on other archs. And this fixes the warnings on ia64. Reported-and-tested-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> --- drivers/acpi/bus.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index c0113e6..9042a85 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -69,6 +69,7 @@ static struct dmi_system_id __cpuinitdata power_nocheck_dmi_table[] = { }; +#ifdef CONFIG_X86 static int set_copy_dsdt(const struct dmi_system_id *id) { printk(KERN_NOTICE "%s detected - " @@ -97,8 +98,14 @@ static struct dmi_system_id dsdt_dmi_table[] __initdata = { DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), DMI_MATCH(DMI_PRODUCT_NAME, "Satellite L505D"), }, - } + }, + {} }; +#else +static struct dmi_system_id dsdt_dmi_table[] __initdata = { + {} +}; +#endif /* -------------------------------------------------------------------------- Device Management > > But otherwise this patch does work and fixes the problem. > > Tested-by: Tony Luck <tony.luck@intel.com> > > Insyde are now writing BIOS for ia64 systems (I have two in > my lab). I hope they don't copy this bug from their laptop > BIOS to my systems. If they do, we'd have to revisit this :-) > > -Tony > -- > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 10+ messages in thread
* RE: [PATCH] acpi: fix early DSDT dmi check warnings on ia64 2010-05-12 1:26 ` Lin Ming @ 2010-05-20 3:56 ` Len Brown 0 siblings, 0 replies; 10+ messages in thread From: Len Brown @ 2010-05-20 3:56 UTC (permalink / raw) To: Lin Ming; +Cc: Luck, Tony, Bjorn Helgaas, linux-acpi applied thanks, Len Brown, Intel Open Source Technology Center ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-05-20 3:56 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-04-29 1:42 [PATCH] acpi: fix early DSDT dmi check warnings on ia64 Lin Ming 2010-04-29 14:42 ` Len Brown 2010-04-29 15:56 ` Bjorn Helgaas 2010-04-29 18:12 ` Luck, Tony 2010-04-29 22:12 ` Luck, Tony 2010-05-06 1:58 ` Lin Ming 2010-05-11 2:09 ` Lin Ming 2010-05-11 23:01 ` Luck, Tony 2010-05-12 1:26 ` Lin Ming 2010-05-20 3:56 ` Len Brown
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox