Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[patch x86/mce] ACPI, x86: Export boot_cpu_physical_apicid to modules

4 views
Skip to first unread message

David Rientjes

unread,
Nov 14, 2013, 6:20:01 PM11/14/13
to
"ACPI, x86: Fix extended error log driver to depend on CONFIG_X86_LOCAL_APIC"
fixed a build error when CONFIG_X86_LOCAL_APIC was not selected and !CONFIG_SMP.
However, since CONFIG_ACPI_EXTLOG is tristate, there is a second build error:

ERROR: "boot_cpu_physical_apicid" [drivers/acpi/acpi_extlog.ko] undefined!

The symbol needs to be exported for it to be available.

Signed-off-by: David Rientjes <rien...@google.com>
---
arch/x86/kernel/apic/apic.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -62,6 +62,7 @@ unsigned disabled_cpus;

/* Processor that is doing the boot up */
unsigned int boot_cpu_physical_apicid = -1U;
+EXPORT_SYMBOL(boot_cpu_physical_apicid);

/*
* The highest APIC ID seen during enumeration.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Luck, Tony

unread,
Nov 14, 2013, 6:30:02 PM11/14/13
to
> ERROR: "boot_cpu_physical_apicid" [drivers/acpi/acpi_extlog.ko] undefined!
>
> The symbol needs to be exported for it to be available.

Good - but I wonder how many more useless layers there are to this onion :-(

First I had to add a "#include <asm/cpu.h>"
Then add the dependency on CONFIG_X86_LOCAL_APIC
Now we need to export boot_cpu_physical_apicid

all for the CONFIG_SMP=n case ... which I think is useless because there
is no conceivable way anyone would run a uniprocessor kernel on a system
that supports the extended error log. (Hint: multi-socket server multiplied by
high-core-count processors multiplied by 2xHyperThread) is a number bigger
than one).

Perhaps we should just have:

depends on SMP && X86_MCE

and stop the madness?

-Tony

David Rientjes

unread,
Nov 14, 2013, 6:40:02 PM11/14/13
to
On Thu, 14 Nov 2013, Luck, Tony wrote:

> > ERROR: "boot_cpu_physical_apicid" [drivers/acpi/acpi_extlog.ko] undefined!
> >
> > The symbol needs to be exported for it to be available.
>
> Good - but I wonder how many more useless layers there are to this onion :-(
>
> First I had to add a "#include <asm/cpu.h>"
> Then add the dependency on CONFIG_X86_LOCAL_APIC
> Now we need to export boot_cpu_physical_apicid
>

asm/cpu.h itself is also indirectly relying on asm/topology.h to include
asm/mpspec.h to get that declaration of boot_cpu_physical_apicid in the
first place.

> all for the CONFIG_SMP=n case ... which I think is useless because there
> is no conceivable way anyone would run a uniprocessor kernel on a system
> that supports the extended error log. (Hint: multi-socket server multiplied by
> high-core-count processors multiplied by 2xHyperThread) is a number bigger
> than one).
>
> Perhaps we should just have:
>
> depends on SMP && X86_MCE
>
> and stop the madness?
>

Or do some randconfig testing before patches are proposed :) I don't have
any particular dependency on this, so I'm happy with whatever is decided.
This is the last error I've found related to CONFIG_ACPI_EXTLOG, however.

Luck, Tony

unread,
Nov 14, 2013, 6:40:02 PM11/14/13
to
> Or do some randconfig testing before patches are proposed :) I don't have
> any particular dependency on this, so I'm happy with whatever is decided.
> This is the last error I've found related to CONFIG_ACPI_EXTLOG, however.

If you *promise* this is the last one ,.. then

Acked-by: Tony Luck <tony...@intel.com>

-Tony

tip-bot for David Rientjes

unread,
Nov 15, 2013, 2:50:02 AM11/15/13
to
Commit-ID: cc08e04c3fdcaab767b8db27527002b2b4d758cb
Gitweb: http://git.kernel.org/tip/cc08e04c3fdcaab767b8db27527002b2b4d758cb
Author: David Rientjes <rien...@google.com>
AuthorDate: Thu, 14 Nov 2013 15:05:32 -0800
Committer: Ingo Molnar <mi...@kernel.org>
CommitDate: Fri, 15 Nov 2013 08:38:30 +0100

x86: Export 'boot_cpu_physical_apicid' to modules

Commit 9ebddac7ea2a "ACPI, x86: Fix extended error log driver to depend on
CONFIG_X86_LOCAL_APIC" fixed a build error when CONFIG_X86_LOCAL_APIC was not
selected and !CONFIG_SMP.

However, since CONFIG_ACPI_EXTLOG is tristate, there is a second build error:

ERROR: "boot_cpu_physical_apicid" [drivers/acpi/acpi_extlog.ko] undefined!

The symbol needs to be exported for it to be available.

Signed-off-by: David Rientjes <rien...@google.com>
Acked-by: Tony Luck <tony...@intel.com>
Cc: Chen Gong <gong...@linux.intel.com>
Cc: Rafael J. Wysocki <r...@rjwysocki.net>
Link: http://lkml.kernel.org/r/alpine.DEB.2.02.1...@chino.kir.corp.google.com
[ Changed it to a _GPL() export. ]
Signed-off-by: Ingo Molnar <mi...@kernel.org>
---
arch/x86/kernel/apic/apic.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index a7eb82d..befe498 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -62,6 +62,7 @@ unsigned disabled_cpus;

/* Processor that is doing the boot up */
unsigned int boot_cpu_physical_apicid = -1U;
+EXPORT_SYMBOL_GPL(boot_cpu_physical_apicid);
0 new messages