Jiang, Yunhong
2009-Dec-10 04:14 UTC
[Xen-devel] [PATCH] Add config check for cpu hotplug code
For acpi_parser branch. Add CONFIG check to xen_get_apic_id() and xen_hotplug_notifier(). Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com> diff --git a/drivers/xen/acpi_processor.c b/drivers/xen/acpi_processor.c index 6e6d465..d6b3bc8 100644 --- a/drivers/xen/acpi_processor.c +++ b/drivers/xen/acpi_processor.c @@ -94,6 +94,7 @@ int processor_cntl_xen_pmthr(void) } EXPORT_SYMBOL(processor_cntl_xen_pmthr); +#ifdef CONFIG_ACPI_HOTPLUG_CPU static int xen_get_apic_id(acpi_handle handle) { struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; @@ -129,6 +130,12 @@ static int xen_get_apic_id(acpi_handle handle) return physid; } +#else +static int xen_get_apic_id(acpi_handle handle) +{ + return -1; +} +#endif int processor_cntl_xen_notify(struct acpi_processor *pr, int event, int type) { @@ -354,6 +361,7 @@ static int xen_tx_notifier(struct acpi_processor *pr, int action) return -EINVAL; } +#ifdef CONFIG_ACPI_HOTPLUG_CPU static int xen_hotplug_notifier(struct acpi_processor *pr, int event) { int ret = -EINVAL; @@ -396,6 +404,12 @@ static int xen_hotplug_notifier(struct acpi_processor *pr, int event) return ret; } +#else +static int xen_hotplug_notifier(struct acpi_processor *pr, int event) +{ + return -ENOSYS; +} +#endif static int __init xen_acpi_processor_extcntl_init(void) { _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jeremy Fitzhardinge
2009-Dec-10 21:43 UTC
[Xen-devel] Re: [PATCH] Add config check for cpu hotplug code
On 12/09/09 20:14, Jiang, Yunhong wrote:> For acpi_parser branch. > > Add CONFIG check to xen_get_apic_id() and xen_hotplug_notifier(). >xen/acpi_processor doesn''t work as a module. The module load fails with: acpi_processor: Unknown symbol xen_domain_type acpi_processor: Unknown symbol xen_start_info acpi_processor: Unknown symbol hypercall_page I think its missing a module license. J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jiang, Yunhong
2009-Dec-11 07:46 UTC
[Xen-devel] RE: [PATCH] Add config check for cpu hotplug code
I just tested disable acpi processor for my patch, so didn''t notice this issue. Today I try to build the drivers/xen/acpi_processor.c as module and get compile issue, seems it mainly because the xen code in acpi directory is not cleanup still. I will talk with Ke for the method. Ke has suggested me to make the processor_cntl_xen_notify as a callback registered. --jyh The patch I used to switch to module: --- a/drivers/xen/Kconfig +++ b/drivers/xen/Kconfig @@ -182,5 +182,5 @@ config XEN_MCE config ACPI_PROCESSOR_XEN tristate depends on XEN_DOM0 && ACPI_PROCESSOR && CPU_FREQ - default y + default m .. The build error result: drivers/built-in.o: In function `acpi_processor_get_power_info'': processor_idle.c:(.text+0x42698): undefined reference to `processor_cntl_xen_power_cache'' drivers/built-in.o: In function `xen_acpi_processor_cst_has_changed'': (.text+0x42a32): undefined reference to `processor_cntl_xen_notify'' drivers/built-in.o: In function `xen_acpi_processor_get_performance'': (.text+0x43d40): undefined reference to `processor_cntl_xen_notify'' drivers/built-in.o: In function `xen_acpi_processor_ppc_has_changed'': (.text+0x44462): undefined reference to `processor_cntl_xen_notify'' drivers/built-in.o: In function `acpi_processor_hotplug_notify'': processor_core.c:(.ref.text+0xb85): undefined reference to `processor_cntl_xen_notify'' processor_core.c:(.ref.text+0xbc5): undefined reference to `processor_cntl_xen_notify'' drivers/built-in.o:processor_core.c:(.ref.text+0xbee): more undefined references to `processor_cntl_xen_notify'' follow --jyh>-----Original Message----- >From: Jeremy Fitzhardinge [mailto:jeremy@goop.org] >Sent: Friday, December 11, 2009 5:43 AM >To: Jiang, Yunhong >Cc: xen-devel@lists.xensource.com >Subject: Re: [PATCH] Add config check for cpu hotplug code > >On 12/09/09 20:14, Jiang, Yunhong wrote: >> For acpi_parser branch. >> >> Add CONFIG check to xen_get_apic_id() and xen_hotplug_notifier(). >> > >xen/acpi_processor doesn''t work as a module. The module load fails with: > >acpi_processor: Unknown symbol xen_domain_type >acpi_processor: Unknown symbol xen_start_info >acpi_processor: Unknown symbol hypercall_page > >I think its missing a module license. > > J_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jiang, Yunhong
2009-Dec-11 09:54 UTC
[Xen-devel] RE: [PATCH] Add config check for cpu hotplug code
Seems I made a mistake on the experimental, please ignore it. Yes, you are right, it is because missing module license. With following patch, it can be load successfully. Thanks Yunhong Jiang>From 08e246131feef5c7b6e5ac63916066244be3067a Mon Sep 17 00:00:00 2001From: yjiang5 <yjiang5@vt-wb-jimmy.sh.intel.com> Date: Fri, 11 Dec 2009 17:22:16 -0500 Subject: [PATCH] Add module license definition to xen''s acpi_processor. Add MODULE_GPL license definition to xen''s acpi processor file, to make it can load sucessfully. Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com> --- drivers/xen/acpi_processor.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/xen/acpi_processor.c b/drivers/xen/acpi_processor.c index edc3ca0..f2f59cd 100644 --- a/drivers/xen/acpi_processor.c +++ b/drivers/xen/acpi_processor.c @@ -408,3 +408,4 @@ static int __init xen_acpi_processor_extcntl_init(void) } subsys_initcall(xen_acpi_processor_extcntl_init); +MODULE_LICENSE("GPL"); -- 1.6.3>-----Original Message----- >From: xen-devel-bounces@lists.xensource.com >[mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Jiang, Yunhong >Sent: Friday, December 11, 2009 3:46 PM >To: Jeremy Fitzhardinge >Cc: xen-devel@lists.xensource.com; Yu, Ke >Subject: [Xen-devel] RE: [PATCH] Add config check for cpu hotplug code > >I just tested disable acpi processor for my patch, so didn''t notice this issue. > >Today I try to build the drivers/xen/acpi_processor.c as module and get compile issue, >seems it mainly because the xen code in acpi directory is not cleanup still. >I will talk with Ke for the method. Ke has suggested me to make the >processor_cntl_xen_notify as a callback registered. > >--jyh > >The patch I used to switch to module: >--- a/drivers/xen/Kconfig >+++ b/drivers/xen/Kconfig >@@ -182,5 +182,5 @@ config XEN_MCE > config ACPI_PROCESSOR_XEN > tristate > depends on XEN_DOM0 && ACPI_PROCESSOR && CPU_FREQ >- default y >+ default m >.. >The build error result: >drivers/built-in.o: In function `acpi_processor_get_power_info'': >processor_idle.c:(.text+0x42698): undefined reference to >`processor_cntl_xen_power_cache'' >drivers/built-in.o: In function `xen_acpi_processor_cst_has_changed'': >(.text+0x42a32): undefined reference to `processor_cntl_xen_notify'' >drivers/built-in.o: In function `xen_acpi_processor_get_performance'': >(.text+0x43d40): undefined reference to `processor_cntl_xen_notify'' >drivers/built-in.o: In function `xen_acpi_processor_ppc_has_changed'': >(.text+0x44462): undefined reference to `processor_cntl_xen_notify'' >drivers/built-in.o: In function `acpi_processor_hotplug_notify'': >processor_core.c:(.ref.text+0xb85): undefined reference to >`processor_cntl_xen_notify'' >processor_core.c:(.ref.text+0xbc5): undefined reference to >`processor_cntl_xen_notify'' >drivers/built-in.o:processor_core.c:(.ref.text+0xbee): more undefined references to >`processor_cntl_xen_notify'' follow > >--jyh > >>-----Original Message----- >>From: Jeremy Fitzhardinge [mailto:jeremy@goop.org] >>Sent: Friday, December 11, 2009 5:43 AM >>To: Jiang, Yunhong >>Cc: xen-devel@lists.xensource.com >>Subject: Re: [PATCH] Add config check for cpu hotplug code >> >>On 12/09/09 20:14, Jiang, Yunhong wrote: >>> For acpi_parser branch. >>> >>> Add CONFIG check to xen_get_apic_id() and xen_hotplug_notifier(). >>> >> >>xen/acpi_processor doesn''t work as a module. The module load fails with: >> >>acpi_processor: Unknown symbol xen_domain_type >>acpi_processor: Unknown symbol xen_start_info >>acpi_processor: Unknown symbol hypercall_page >> >>I think its missing a module license. >> >> J > >_______________________________________________ >Xen-devel mailing list >Xen-devel@lists.xensource.com >http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel