mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] unexport register_cpu and unregister_cpu
@ 2005-01-26  6:55 Nathan Lynch
  2005-01-26 18:22 ` Keshavamurthy Anil S
  0 siblings, 1 reply; 4+ messages in thread
From: Nathan Lynch @ 2005-01-26  6:55 UTC (permalink / raw)
  To: lkml; +Cc: Andrew Morton, anil.s.keshavamurthy

http://linus.bkbits.net:8080/linux-2.5/cset@4180a2b7mi2fzuNQDBOQY7eMAkns8g?nav=index.html|src/|src/drivers|src/drivers/base|related/drivers/base/cpu.c

This changeset introduced exports for register_cpu and unregister_cpu
right after 2.6.10.  As far as I can tell these are not called from any
code which can be built as a module, and I can't think of a good reason
why any out of tree code would use them.  Unless I've missed something,
can we remove them before 2.6.11?

Build-tested for ia64 and i386.

Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com>

Index: linux-2.6.11-rc2-mm1/drivers/base/cpu.c
===================================================================
--- linux-2.6.11-rc2-mm1.orig/drivers/base/cpu.c	2005-01-25 23:50:02.677255800 -0600
+++ linux-2.6.11-rc2-mm1/drivers/base/cpu.c	2005-01-25 23:56:28.436611464 -0600
@@ -64,7 +64,6 @@
 
 	return;
 }
-EXPORT_SYMBOL(unregister_cpu);
 #else /* ... !CONFIG_HOTPLUG_CPU */
 static inline void register_cpu_control(struct cpu *cpu)
 {
@@ -96,9 +95,6 @@
 		register_cpu_control(cpu);
 	return error;
 }
-#ifdef CONFIG_HOTPLUG_CPU
-EXPORT_SYMBOL(register_cpu);
-#endif
 
 
 



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

* Re: [PATCH] unexport register_cpu and unregister_cpu
  2005-01-26  6:55 [PATCH] unexport register_cpu and unregister_cpu Nathan Lynch
@ 2005-01-26 18:22 ` Keshavamurthy Anil S
  2005-01-26 19:10   ` Nathan Lynch
  0 siblings, 1 reply; 4+ messages in thread
From: Keshavamurthy Anil S @ 2005-01-26 18:22 UTC (permalink / raw)
  To: Nathan Lynch; +Cc: lkml, Andrew Morton, anil.s.keshavamurthy

On Wed, Jan 26, 2005 at 12:55:47AM -0600, Nathan Lynch wrote:
> http://linus.bkbits.net:8080/linux-2.5/cset@4180a2b7mi2fzuNQDBOQY7eMAkns8g?nav=index.html|src/|src/drivers|src/drivers/base|related/drivers/base/cpu.c
> 
> This changeset introduced exports for register_cpu and unregister_cpu
> right after 2.6.10.  As far as I can tell these are not called from any
> code which can be built as a module, and I can't think of a good reason
> why any out of tree code would use them.  Unless I've missed something,
> can we remove them before 2.6.11?

	No this is not correct. ACPI processor.ko driver which supports
physical CPU hotplug needs register_cpu() and unregister_cpu() functions
for dynamically hotadd/hotremove support of the processors.

Please see drivers/acpi/processor_core.c  
	acpi_processor_hotadd_init() -> arch_register_cpu() ->
		->register_cpu().

-Anil



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

* Re: [PATCH] unexport register_cpu and unregister_cpu
  2005-01-26 18:22 ` Keshavamurthy Anil S
@ 2005-01-26 19:10   ` Nathan Lynch
  2005-01-26 19:26     ` Keshavamurthy Anil S
  0 siblings, 1 reply; 4+ messages in thread
From: Nathan Lynch @ 2005-01-26 19:10 UTC (permalink / raw)
  To: Keshavamurthy Anil S; +Cc: lkml, Andrew Morton

On Wed, 2005-01-26 at 10:22 -0800, Keshavamurthy Anil S wrote:
> On Wed, Jan 26, 2005 at 12:55:47AM -0600, Nathan Lynch wrote:
> > http://linus.bkbits.net:8080/linux-2.5/cset@4180a2b7mi2fzuNQDBOQY7eMAkns8g?nav=index.html|src/|src/drivers|src/drivers/base|related/drivers/base/cpu.c
> > 
> > This changeset introduced exports for register_cpu and unregister_cpu
> > right after 2.6.10.  As far as I can tell these are not called from any
> > code which can be built as a module, and I can't think of a good reason
> > why any out of tree code would use them.  Unless I've missed something,
> > can we remove them before 2.6.11?
> 
> 	No this is not correct. ACPI processor.ko driver which supports
> physical CPU hotplug needs register_cpu() and unregister_cpu() functions
> for dynamically hotadd/hotremove support of the processors.

I do not understand your objection.  The processor module does not call
the interfaces in question directly.  They are called only from arch
setup code (e.g. arch/ia64/kernel/topology.c) which is never built as a
module.

> Please see drivers/acpi/processor_core.c  
> 	acpi_processor_hotadd_init() -> arch_register_cpu() ->
> 		->register_cpu().

Sure -- the arch_register_cpu and arch_unregister_cpu symbols need to be
exported for this use (and they are).  Exporting register_cpu and
unregister_cpu is unnecessary.

I double-checked an ia64 build with CONFIG_ACPI_HOTPLUG_CPU=y and
CONFIG_ACPI_PROCESSOR=m and saw no errors or warnings caused by the
change...

Nathan


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

* Re: [PATCH] unexport register_cpu and unregister_cpu
  2005-01-26 19:10   ` Nathan Lynch
@ 2005-01-26 19:26     ` Keshavamurthy Anil S
  0 siblings, 0 replies; 4+ messages in thread
From: Keshavamurthy Anil S @ 2005-01-26 19:26 UTC (permalink / raw)
  To: Nathan Lynch; +Cc: Keshavamurthy Anil S, lkml, Andrew Morton

On Wed, Jan 26, 2005 at 01:10:30PM -0600, Nathan Lynch wrote:
> On Wed, 2005-01-26 at 10:22 -0800, Keshavamurthy Anil S wrote:
> > On Wed, Jan 26, 2005 at 12:55:47AM -0600, Nathan Lynch wrote:
> > > http://linus.bkbits.net:8080/linux-2.5/cset@4180a2b7mi2fzuNQDBOQY7eMAkns8g?nav=index.html|src/|src/drivers|src/drivers/base|related/drivers/base/cpu.c
> > > 
> > > This changeset introduced exports for register_cpu and unregister_cpu
> > > right after 2.6.10.  As far as I can tell these are not called from any
> > > code which can be built as a module, and I can't think of a good reason
> > > why any out of tree code would use them.  Unless I've missed something,
> > > can we remove them before 2.6.11?
> > 
> > 	No this is not correct. ACPI processor.ko driver which supports
> > physical CPU hotplug needs register_cpu() and unregister_cpu() functions
> > for dynamically hotadd/hotremove support of the processors.
> 
> I do not understand your objection.  The processor module does not call
> the interfaces in question directly.  They are called only from arch
> setup code (e.g. arch/ia64/kernel/topology.c) which is never built as a
> module.

Oops.. Sorry, its my fault.

> 
> > Please see drivers/acpi/processor_core.c  
> > 	acpi_processor_hotadd_init() -> arch_register_cpu() ->
> > 		->register_cpu().
> 
> Sure -- the arch_register_cpu and arch_unregister_cpu symbols need to be
> exported for this use (and they are).  Exporting register_cpu and
> unregister_cpu is unnecessary.

I agree with you 100%. 

> 
> I double-checked an ia64 build with CONFIG_ACPI_HOTPLUG_CPU=y and
> CONFIG_ACPI_PROCESSOR=m and saw no errors or warnings caused by the
> change...

Andrew, I have no objection with Nathan's patch.

thanks,
Anil


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

end of thread, other threads:[~2005-01-27  2:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-26  6:55 [PATCH] unexport register_cpu and unregister_cpu Nathan Lynch
2005-01-26 18:22 ` Keshavamurthy Anil S
2005-01-26 19:10   ` Nathan Lynch
2005-01-26 19:26     ` Keshavamurthy Anil S

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome