diff options
author | Jiang Liu <jiang.liu@linux.intel.com> | 2014-06-09 04:19:32 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2014-06-21 17:05:40 -0400 |
commit | a491cc902ca495365e9cd45154b60d8c702d86da (patch) | |
tree | 44d11422fd50ba2fea564c0e53e3b3ec781055d7 /arch | |
parent | b1bfd5ea451b60a4725907c282dec232c63f68bb (diff) |
x86, mpparse: Simplify arch/x86/include/asm/mpspec.h
Simplify arch/x86/include/asm/mpspec.h by
1) Change max_physical_apicid to static as it's only used in apic.c.
2) Kill declaration of mpc_default_type, it's never defined.
3) Delete default_acpi_madt_oem_check(), it has already been declared
in apic.h.
4) Make default_acpi_madt_oem_check() depends on CONFIG_X86_LOCAL_APIC
instead of CONFIG_X86_64 to support i386.
5) Change mp_override_legacy_irq(), mp_config_acpi_legacy_irqs() and
mp_register_gsi() as static because they are only used in acpi/boot.c.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: H. Peter Anvin <hpa@linux.intel.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Len Brown <len.brown@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/r/1402302011-23642-4-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/include/asm/apic.h | 4 | ||||
-rw-r--r-- | arch/x86/include/asm/io_apic.h | 3 | ||||
-rw-r--r-- | arch/x86/include/asm/mpspec.h | 13 | ||||
-rw-r--r-- | arch/x86/kernel/acpi/boot.c | 12 | ||||
-rw-r--r-- | arch/x86/kernel/apic/apic.c | 2 |
5 files changed, 12 insertions, 22 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index 19b0ebafcd3e..69ed79aa9085 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h | |||
@@ -502,8 +502,6 @@ static inline unsigned default_get_apic_id(unsigned long x) | |||
502 | #define DEFAULT_TRAMPOLINE_PHYS_HIGH 0x469 | 502 | #define DEFAULT_TRAMPOLINE_PHYS_HIGH 0x469 |
503 | 503 | ||
504 | #ifdef CONFIG_X86_64 | 504 | #ifdef CONFIG_X86_64 |
505 | extern int default_acpi_madt_oem_check(char *, char *); | ||
506 | |||
507 | extern void apic_send_IPI_self(int vector); | 505 | extern void apic_send_IPI_self(int vector); |
508 | 506 | ||
509 | DECLARE_PER_CPU(int, x2apic_extra_bits); | 507 | DECLARE_PER_CPU(int, x2apic_extra_bits); |
@@ -552,6 +550,8 @@ static inline int default_apic_id_valid(int apicid) | |||
552 | return (apicid < 255); | 550 | return (apicid < 255); |
553 | } | 551 | } |
554 | 552 | ||
553 | extern int default_acpi_madt_oem_check(char *, char *); | ||
554 | |||
555 | extern void default_setup_apic_routing(void); | 555 | extern void default_setup_apic_routing(void); |
556 | 556 | ||
557 | extern struct apic apic_noop; | 557 | extern struct apic apic_noop; |
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h index 90f97b4b9347..9121abbc8c8f 100644 --- a/arch/x86/include/asm/io_apic.h +++ b/arch/x86/include/asm/io_apic.h | |||
@@ -118,9 +118,6 @@ extern int mp_irq_entries; | |||
118 | /* MP IRQ source entries */ | 118 | /* MP IRQ source entries */ |
119 | extern struct mpc_intsrc mp_irqs[MAX_IRQ_SOURCES]; | 119 | extern struct mpc_intsrc mp_irqs[MAX_IRQ_SOURCES]; |
120 | 120 | ||
121 | /* non-0 if default (table-less) MP configuration */ | ||
122 | extern int mpc_default_type; | ||
123 | |||
124 | /* Older SiS APIC requires we rewrite the index register */ | 121 | /* Older SiS APIC requires we rewrite the index register */ |
125 | extern int sis_apic_bug; | 122 | extern int sis_apic_bug; |
126 | 123 | ||
diff --git a/arch/x86/include/asm/mpspec.h b/arch/x86/include/asm/mpspec.h index f5a617956735..7bef40a01a1d 100644 --- a/arch/x86/include/asm/mpspec.h +++ b/arch/x86/include/asm/mpspec.h | |||
@@ -40,8 +40,6 @@ extern int mp_bus_id_to_type[MAX_MP_BUSSES]; | |||
40 | extern DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES); | 40 | extern DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES); |
41 | 41 | ||
42 | extern unsigned int boot_cpu_physical_apicid; | 42 | extern unsigned int boot_cpu_physical_apicid; |
43 | extern unsigned int max_physical_apicid; | ||
44 | extern int mpc_default_type; | ||
45 | extern unsigned long mp_lapic_addr; | 43 | extern unsigned long mp_lapic_addr; |
46 | 44 | ||
47 | #ifdef CONFIG_X86_LOCAL_APIC | 45 | #ifdef CONFIG_X86_LOCAL_APIC |
@@ -88,15 +86,6 @@ static inline void early_reserve_e820_mpc_new(void) { } | |||
88 | #endif | 86 | #endif |
89 | 87 | ||
90 | int generic_processor_info(int apicid, int version); | 88 | int generic_processor_info(int apicid, int version); |
91 | #ifdef CONFIG_ACPI | ||
92 | extern void mp_register_ioapic(int id, u32 address, u32 gsi_base); | ||
93 | extern void mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, | ||
94 | u32 gsi); | ||
95 | extern void mp_config_acpi_legacy_irqs(void); | ||
96 | struct device; | ||
97 | extern int mp_register_gsi(struct device *dev, u32 gsi, int edge_level, | ||
98 | int active_high_low); | ||
99 | #endif /* CONFIG_ACPI */ | ||
100 | 89 | ||
101 | #define PHYSID_ARRAY_SIZE BITS_TO_LONGS(MAX_LOCAL_APIC) | 90 | #define PHYSID_ARRAY_SIZE BITS_TO_LONGS(MAX_LOCAL_APIC) |
102 | 91 | ||
@@ -163,6 +152,4 @@ extern physid_mask_t phys_cpu_present_map; | |||
163 | 152 | ||
164 | extern int generic_mps_oem_check(struct mpc_table *, char *, char *); | 153 | extern int generic_mps_oem_check(struct mpc_table *, char *, char *); |
165 | 154 | ||
166 | extern int default_acpi_madt_oem_check(char *, char *); | ||
167 | |||
168 | #endif /* _ASM_X86_MPSPEC_H */ | 155 | #endif /* _ASM_X86_MPSPEC_H */ |
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 86281ffb96d6..b41b47021f53 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -345,6 +345,10 @@ acpi_parse_lapic_nmi(struct acpi_subtable_header * header, const unsigned long e | |||
345 | #endif /*CONFIG_X86_LOCAL_APIC */ | 345 | #endif /*CONFIG_X86_LOCAL_APIC */ |
346 | 346 | ||
347 | #ifdef CONFIG_X86_IO_APIC | 347 | #ifdef CONFIG_X86_IO_APIC |
348 | static void mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, | ||
349 | u32 gsi); | ||
350 | static int mp_register_gsi(struct device *dev, u32 gsi, int trigger, | ||
351 | int polarity); | ||
348 | 352 | ||
349 | static int __init | 353 | static int __init |
350 | acpi_parse_ioapic(struct acpi_subtable_header * header, const unsigned long end) | 354 | acpi_parse_ioapic(struct acpi_subtable_header * header, const unsigned long end) |
@@ -903,7 +907,8 @@ static int __init acpi_parse_madt_lapic_entries(void) | |||
903 | #ifdef CONFIG_X86_IO_APIC | 907 | #ifdef CONFIG_X86_IO_APIC |
904 | #define MP_ISA_BUS 0 | 908 | #define MP_ISA_BUS 0 |
905 | 909 | ||
906 | void __init mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi) | 910 | static void __init mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, |
911 | u32 gsi) | ||
907 | { | 912 | { |
908 | int ioapic; | 913 | int ioapic; |
909 | int pin; | 914 | int pin; |
@@ -938,7 +943,7 @@ void __init mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi) | |||
938 | isa_irq_to_gsi[bus_irq] = gsi; | 943 | isa_irq_to_gsi[bus_irq] = gsi; |
939 | } | 944 | } |
940 | 945 | ||
941 | void __init mp_config_acpi_legacy_irqs(void) | 946 | static void __init mp_config_acpi_legacy_irqs(void) |
942 | { | 947 | { |
943 | int i; | 948 | int i; |
944 | struct mpc_intsrc mp_irq; | 949 | struct mpc_intsrc mp_irq; |
@@ -1040,7 +1045,8 @@ static int mp_config_acpi_gsi(struct device *dev, u32 gsi, int trigger, | |||
1040 | return 0; | 1045 | return 0; |
1041 | } | 1046 | } |
1042 | 1047 | ||
1043 | int mp_register_gsi(struct device *dev, u32 gsi, int trigger, int polarity) | 1048 | static int mp_register_gsi(struct device *dev, u32 gsi, int trigger, |
1049 | int polarity) | ||
1044 | { | 1050 | { |
1045 | int ioapic; | 1051 | int ioapic; |
1046 | int ioapic_pin; | 1052 | int ioapic_pin; |
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index ad28db7e6bde..ca1bd75e3de2 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c | |||
@@ -67,7 +67,7 @@ EXPORT_SYMBOL_GPL(boot_cpu_physical_apicid); | |||
67 | /* | 67 | /* |
68 | * The highest APIC ID seen during enumeration. | 68 | * The highest APIC ID seen during enumeration. |
69 | */ | 69 | */ |
70 | unsigned int max_physical_apicid; | 70 | static unsigned int max_physical_apicid; |
71 | 71 | ||
72 | /* | 72 | /* |
73 | * Bitmask of physically existing CPUs: | 73 | * Bitmask of physically existing CPUs: |