All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch x86/mce] ACPI, x86: Export boot_cpu_physical_apicid to modules
@ 2013-11-14 23:05 David Rientjes
  2013-11-14 23:26 ` Luck, Tony
  2013-11-15  7:45 ` [tip:x86/urgent] x86: Export 'boot_cpu_physical_apicid' " tip-bot for David Rientjes
  0 siblings, 2 replies; 5+ messages in thread
From: David Rientjes @ 2013-11-14 23:05 UTC (permalink / raw)
  To: Ingo Molnar, H. Peter Anvin, Thomas Gleixner
  Cc: Tony Luck, Chen Gong, Rafael J. Wysocki, x86, linux-kernel

"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 <rientjes@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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [patch x86/mce] ACPI, x86: Export boot_cpu_physical_apicid to modules
  2013-11-14 23:05 [patch x86/mce] ACPI, x86: Export boot_cpu_physical_apicid to modules David Rientjes
@ 2013-11-14 23:26 ` Luck, Tony
  2013-11-14 23:33   ` David Rientjes
  2013-11-15  7:45 ` [tip:x86/urgent] x86: Export 'boot_cpu_physical_apicid' " tip-bot for David Rientjes
  1 sibling, 1 reply; 5+ messages in thread
From: Luck, Tony @ 2013-11-14 23:26 UTC (permalink / raw)
  To: David Rientjes, Ingo Molnar, H. Peter Anvin, Thomas Gleixner
  Cc: Chen Gong, Rafael J. Wysocki, x86@kernel.org,
	linux-kernel@vger.kernel.org

> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [patch x86/mce] ACPI, x86: Export boot_cpu_physical_apicid to modules
  2013-11-14 23:26 ` Luck, Tony
@ 2013-11-14 23:33   ` David Rientjes
  2013-11-14 23:39     ` Luck, Tony
  0 siblings, 1 reply; 5+ messages in thread
From: David Rientjes @ 2013-11-14 23:33 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Ingo Molnar, H. Peter Anvin, Thomas Gleixner, Chen Gong,
	Rafael J. Wysocki, x86@kernel.org, linux-kernel@vger.kernel.org

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [patch x86/mce] ACPI, x86: Export boot_cpu_physical_apicid to modules
  2013-11-14 23:33   ` David Rientjes
@ 2013-11-14 23:39     ` Luck, Tony
  0 siblings, 0 replies; 5+ messages in thread
From: Luck, Tony @ 2013-11-14 23:39 UTC (permalink / raw)
  To: David Rientjes
  Cc: Ingo Molnar, H. Peter Anvin, Thomas Gleixner, Chen Gong,
	Rafael J. Wysocki, x86@kernel.org, linux-kernel@vger.kernel.org

> 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.luck@intel.com>

-Tony

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [tip:x86/urgent] x86: Export 'boot_cpu_physical_apicid' to modules
  2013-11-14 23:05 [patch x86/mce] ACPI, x86: Export boot_cpu_physical_apicid to modules David Rientjes
  2013-11-14 23:26 ` Luck, Tony
@ 2013-11-15  7:45 ` tip-bot for David Rientjes
  1 sibling, 0 replies; 5+ messages in thread
From: tip-bot for David Rientjes @ 2013-11-15  7:45 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, tony.luck, gong.chen, tglx, rjw,
	rientjes

Commit-ID:  cc08e04c3fdcaab767b8db27527002b2b4d758cb
Gitweb:     http://git.kernel.org/tip/cc08e04c3fdcaab767b8db27527002b2b4d758cb
Author:     David Rientjes <rientjes@google.com>
AuthorDate: Thu, 14 Nov 2013 15:05:32 -0800
Committer:  Ingo Molnar <mingo@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 <rientjes@google.com>
Acked-by: Tony Luck <tony.luck@intel.com>
Cc: Chen Gong <gong.chen@linux.intel.com>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Link: http://lkml.kernel.org/r/alpine.DEB.2.02.1311141504080.30112@chino.kir.corp.google.com
[ Changed it to a _GPL() export. ]
Signed-off-by: Ingo Molnar <mingo@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);
 
 /*
  * The highest APIC ID seen during enumeration.

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-11-15  7:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-14 23:05 [patch x86/mce] ACPI, x86: Export boot_cpu_physical_apicid to modules David Rientjes
2013-11-14 23:26 ` Luck, Tony
2013-11-14 23:33   ` David Rientjes
2013-11-14 23:39     ` Luck, Tony
2013-11-15  7:45 ` [tip:x86/urgent] x86: Export 'boot_cpu_physical_apicid' " tip-bot for David Rientjes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.