Hi, While configuring dom0 kernels I''ve found certaing things in the handling of CONFIG_ACPI_PROCESSOR_XEN which are confusing to me. - In case CONFIG_ACPI_PROCESSOR is set as a module (which was the default in my system) the compilation will break, because CONFIG_ACPI_PROCESSOR_XEN will not be set. - CONFIG_ACPI_PROCESSOR_XEN is only set when CPU_FREQ=y, but these functions are used (in their empty versions) even when CONFIG_ACPI_PROCESSOR=y and CPU_FREQ=n. Is this the intended use? Thanks, Gianluca _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hi Gianluca Thanks for trying and reporting this issue. The root cause of the compilation issue is found as: "when CONFIG_ACPI_PROCESSOR_XEN is not set, the <include/acpi/processor.h> is not included, thus the "struct acpi_processor" is not defined, which will cause compiling error for inline function processor_cntl_xen_prepare(struct acpi_processor *pr);" I''ve worked out the attached patch, could you please try it? Thanks For the second question, CONFIG_ACPI_PROCESSOR_XEN control whether enabling Xen Cx/Px power management or not. CONFIG_ACPI_PROCESSOR_XEN depends on both CONFIG_ACPI_PROCESSOR and CPU_FREQ, if CPU_FREQ=n, the CONFIG_ACPI_PROCESSOR_XEN will not be set, so the empty version is used and Xen Cx/Px power management will not be enabled. This is intended usage. Anything wrong observed in your side? Best Regards Ke -----Original Message----- From: Gianluca Guida [mailto:gianluca.guida@citrix.com] Sent: Monday, August 24, 2009 9:25 PM To: Yu, Ke; Tian, Kevin; Jeremy Fitzhardinge Cc: xen-devel@lists.xensource.com Subject: About CONFIG_ACPI_PROCESSOR_XEN Hi, While configuring dom0 kernels I''ve found certaing things in the handling of CONFIG_ACPI_PROCESSOR_XEN which are confusing to me. - In case CONFIG_ACPI_PROCESSOR is set as a module (which was the default in my system) the compilation will break, because CONFIG_ACPI_PROCESSOR_XEN will not be set. - CONFIG_ACPI_PROCESSOR_XEN is only set when CPU_FREQ=y, but these functions are used (in their empty versions) even when CONFIG_ACPI_PROCESSOR=y and CPU_FREQ=n. Is this the intended use? Thanks, Gianluca _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hi Ke, Yu, Ke writes: > Thanks for trying and reporting this issue. The root cause of the compilation issue is found as: "when CONFIG_ACPI_PROCESSOR_XEN is not set, the <include/acpi/processor.h> is not included, thus the "struct acpi_processor" is not defined, which will cause compiling error for inline function processor_cntl_xen_prepare(struct acpi_processor *pr);" Hm no, I was not referring to the compilation warning. I''ve also made a mistake on explaining the problem. :-) So, the problem is that when CONFIG_ACPI_PROCESSOR is set to ''m'', CONFIG_ACPI_PROCESSOR_XEN will be set (being bolean, to ''y''). This will cause the final linking to fail because of undefined symbols (those now in the module called in the xen acpi code). Here''s what happens in my .config: CONFIG_ACPI_PROCESSOR=m [...] CONFIG_ACPI_PROCESSOR_XEN=y And this is the result: LD .tmp_vmlinux1 drivers/built-in.o: In function `processor_cntl_xen_prepare'': (.text+0x543e8): undefined reference to `acpi_processor_get_performance_info'' drivers/built-in.o: In function `processor_cntl_xen_prepare'': (.text+0x5440c): undefined reference to `acpi_processor_get_psd'' make[1]: *** [.tmp_vmlinux1] Error 1 make: *** [sub-make] Error 2 As of your patch, yes that''s useful to remove the warning. Cheers, Gianluca _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Yu, Ke writes: > Ha, I see, then the following simple patch should fix this issue, but this will limit CONFIG_ACPI_PROCESSOR to be y. I am still thinking if there is better fix to allow CONFIG_ACPI_PROCESSOR=m. Hm. Perhaps it''s better the compilation error than this patch. This will make the ACPI processor module not notify the hypervisor about the ACPI events. I don''t know how serious this is, though. Thanks, Gianluca _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ha, I see, then the following simple patch should fix this issue, but this will limit CONFIG_ACPI_PROCESSOR to be y. I am still thinking if there is better fix to allow CONFIG_ACPI_PROCESSOR=m. diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig index 33976f7..2e7d673 100644 --- a/drivers/xen/Kconfig +++ b/drivers/xen/Kconfig @@ -98,5 +98,5 @@ config XEN_MCE config ACPI_PROCESSOR_XEN bool - depends on XEN_DOM0 && ACPI_PROCESSOR && CPU_FREQ + depends on XEN_DOM0 && ACPI_PROCESSOR = y && CPU_FREQ default y -----Original Message----- From: Gianluca Guida [mailto:gianluca.guida@citrix.com] Sent: Monday, August 24, 2009 11:07 PM To: Yu, Ke Cc: Gianluca Guida; Tian, Kevin; Jeremy Fitzhardinge; xen-devel@lists.xensource.com Subject: RE: About CONFIG_ACPI_PROCESSOR_XEN Hi Ke, Yu, Ke writes: > Thanks for trying and reporting this issue. The root cause of the compilation issue is found as: "when CONFIG_ACPI_PROCESSOR_XEN is not set, the <include/acpi/processor.h> is not included, thus the "struct acpi_processor" is not defined, which will cause compiling error for inline function processor_cntl_xen_prepare(struct acpi_processor *pr);" Hm no, I was not referring to the compilation warning. I''ve also made a mistake on explaining the problem. :-) So, the problem is that when CONFIG_ACPI_PROCESSOR is set to ''m'', CONFIG_ACPI_PROCESSOR_XEN will be set (being bolean, to ''y''). This will cause the final linking to fail because of undefined symbols (those now in the module called in the xen acpi code). Here''s what happens in my .config: CONFIG_ACPI_PROCESSOR=m [...] CONFIG_ACPI_PROCESSOR_XEN=y And this is the result: LD .tmp_vmlinux1 drivers/built-in.o: In function `processor_cntl_xen_prepare'': (.text+0x543e8): undefined reference to `acpi_processor_get_performance_info'' drivers/built-in.o: In function `processor_cntl_xen_prepare'': (.text+0x5440c): undefined reference to `acpi_processor_get_psd'' make[1]: *** [.tmp_vmlinux1] Error 1 make: *** [sub-make] Error 2 As of your patch, yes that''s useful to remove the warning. Cheers, Gianluca _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hi Gianluca, Could you please elaborate more on the better way to fix this issue in your mind? Sorry that I did not quite catch your point. Best Regards Ke -----Original Message----- From: Gianluca Guida [mailto:gianluca.guida@citrix.com] Sent: Tuesday, August 25, 2009 12:25 AM To: Yu, Ke Cc: Gianluca Guida; Tian, Kevin; Jeremy Fitzhardinge; xen-devel@lists.xensource.com Subject: RE: About CONFIG_ACPI_PROCESSOR_XEN Yu, Ke writes: > Ha, I see, then the following simple patch should fix this issue, but this will limit CONFIG_ACPI_PROCESSOR to be y. I am still thinking if there is better fix to allow CONFIG_ACPI_PROCESSOR=m. Hm. Perhaps it''s better the compilation error than this patch. This will make the ACPI processor module not notify the hypervisor about the ACPI events. I don''t know how serious this is, though. Thanks, Gianluca _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hi Ke, Yu, Ke writes: > Could you please elaborate more on the better way to fix this issue in your mind? Sorry that I did not quite catch your point. Well, the purpose of my mail was to get aware the authors of the patch (as in the Signed-off-by lines) and whoever was interested in compiling dom0 kernels (i.e., xen-devel) that there are issues in compiling the ACPI processor support for Xen. I think it''s useful to know that things go wrong when CONFIG_ACPI_PROCESSOR=m in the .config file. Your patch just hide the issue, it doesn''t fix it. Hope this clarifies things. Gianluca _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Oh, I see. Thanks for the explanation. So let''s just keep it as it is currently. Best Regards Ke>-----Original Message----- >From: Gianluca Guida [mailto:gianluca.guida@citrix.com] >Sent: Tuesday, August 25, 2009 5:23 PM >To: Yu, Ke >Cc: Tian, Kevin; Jeremy Fitzhardinge; xen-devel@lists.xensource.com >Subject: RE: About CONFIG_ACPI_PROCESSOR_XEN > >Hi Ke, > >Yu, Ke writes: > > Could you please elaborate more on the better way to fix this issue in your >mind? Sorry that I did not quite catch your point. > >Well, the purpose of my mail was to get aware the authors of the patch >(as in the Signed-off-by lines) and whoever was interested in >compiling dom0 kernels (i.e., xen-devel) that there are issues in >compiling the ACPI processor support for Xen. > >I think it''s useful to know that things go wrong when >CONFIG_ACPI_PROCESSOR=m in the .config file. Your patch just hide the >issue, it doesn''t fix it. > >Hope this clarifies things. >Gianluca_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel