Latest working kernel version: 2.6.27 Earliest failing kernel version: 2.6.27 Distribution: SuSE 10.3 Hardware Environment: Opteron 265, 4Gb ECC RAM, 1Tb HDD, Nforce4 chipset Software Environment: gcc-4.3.1, glibc-2.6.1 Problem Description: warning: 'acpi_mcfg_64bit_base_addr' defined but not used Steps to reproduce: 1. Configure kernel without MMCONFIG support and compile. 2. make .... arch/x86/kernel/acpi/boot.c:100: warning: 'acpi_mcfg_64bit_base_addr' defined but not used .... Comment: acpi_mcfg_64bit_base_addr defined on line 100 in arch/x86/kernel/acpi/boot.c as "static int acpi_mcfg_64bit_base_addr __initdata = FALSE;" But used only in functions in same file boot.c: acpi_mcfg_oem_check() on line 166 and in acpi_parse_mcfg() on line 208 And this functions work only if CONFIG_PCI_MMCONFIG true, inside #ifdef CONFIG_PCI_MMCONFIG ... ... #endif Solution: --- patch version 1 ################################################################ --- a/arch/x86/kernel/acpi/boot.c 2008-10-10 02:13:53.000000000 +0400 +++ b/arch/x86/kernel/acpi/boot.c 2008-10-12 03:13:16.888033920 +0400 @@ -97,7 +97,9 @@ #warning ACPI uses CMPXCHG, i486 and later hardware #endif +#ifdef CONFIG_PCI_MMCONFIG static int acpi_mcfg_64bit_base_addr __initdata = FALSE; +#endif /* -------------------------------------------------------------------------- Boot-time Configuration ############################################################### or patch version 2 ################################################################################ --- a/arch/x86/kernel/acpi/boot.c 2008-10-10 02:13:53.000000000 +0400 +++ b/arch/x86/kernel/acpi/boot.c 2008-10-12 03:35:18.992034200 +0400 @@ -97,7 +97,6 @@ #warning ACPI uses CMPXCHG, i486 and later hardware #endif -static int acpi_mcfg_64bit_base_addr __initdata = FALSE; /* -------------------------------------------------------------------------- Boot-time Configuration @@ -156,6 +155,9 @@ } #ifdef CONFIG_PCI_MMCONFIG + +static int acpi_mcfg_64bit_base_addr __initdata = FALSE; + /* The physical address of the MMCONFIG aperture. Set from ACPI tables. */ struct acpi_mcfg_allocation *pci_mmcfg_config; int pci_mmcfg_config_num; #############################################################################
Created attachment 18268 [details] FIX PATCH
Created attachment 18269 [details] FIX PATCH VERSION 2
Mark this as solved so Len will merge it. If not, better you can send the patch to acpi maillist
patch in comment #2 applied.
(In reply to comment #4) > patch in comment #2 applied. > Great! :)
shipped in linux-2.6.28-rc1 closed commit 1339c367a842a9fc34b8fcfa1abadb07b11848ad Author: Pavel Vasilyev <linuxoid@tochka.ru> Date: Wed Oct 15 17:33:48 2008 -0400 fix CONFIG_MMCONFIG=n build warning