diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-28 06:43:18 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-28 17:20:25 -0500 |
commit | d83093b50416f4ca59d3a84b2ddc217748214d64 (patch) | |
tree | 7dd0bb6c29ceff7f37941eace690ac157b58338f /arch/x86/mach-generic | |
parent | 8058714a41afc4c983acb274b1adf7bd3cfe7f6e (diff) |
x86: refactor ->setup_portio_remap() subarch methods
Only NUMAQ has a real ->setup_portio_remap() method, the other
subarchitectures define it but keep it empty.
So mark the vector as NULL, extend the generic code to handle
NULL -setup_portio_remap() entries and remove all the empty
handlers.
Also move the NUMAQ method from the header file into the
apic driver .c file.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mach-generic')
-rw-r--r-- | arch/x86/mach-generic/bigsmp.c | 2 | ||||
-rw-r--r-- | arch/x86/mach-generic/default.c | 2 | ||||
-rw-r--r-- | arch/x86/mach-generic/es7000.c | 2 | ||||
-rw-r--r-- | arch/x86/mach-generic/numaq.c | 15 | ||||
-rw-r--r-- | arch/x86/mach-generic/summit.c | 2 |
5 files changed, 18 insertions, 5 deletions
diff --git a/arch/x86/mach-generic/bigsmp.c b/arch/x86/mach-generic/bigsmp.c index 613965230744..424740554a32 100644 --- a/arch/x86/mach-generic/bigsmp.c +++ b/arch/x86/mach-generic/bigsmp.c | |||
@@ -84,7 +84,7 @@ struct genapic apic_bigsmp = { | |||
84 | .cpu_to_logical_apicid = bigsmp_cpu_to_logical_apicid, | 84 | .cpu_to_logical_apicid = bigsmp_cpu_to_logical_apicid, |
85 | .cpu_present_to_apicid = bigsmp_cpu_present_to_apicid, | 85 | .cpu_present_to_apicid = bigsmp_cpu_present_to_apicid, |
86 | .apicid_to_cpu_present = bigsmp_apicid_to_cpu_present, | 86 | .apicid_to_cpu_present = bigsmp_apicid_to_cpu_present, |
87 | .setup_portio_remap = setup_portio_remap, | 87 | .setup_portio_remap = NULL, |
88 | .check_phys_apicid_present = check_phys_apicid_present, | 88 | .check_phys_apicid_present = check_phys_apicid_present, |
89 | .enable_apic_mode = enable_apic_mode, | 89 | .enable_apic_mode = enable_apic_mode, |
90 | .phys_pkg_id = phys_pkg_id, | 90 | .phys_pkg_id = phys_pkg_id, |
diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c index 8fc704a3db7c..b48a58daf719 100644 --- a/arch/x86/mach-generic/default.c +++ b/arch/x86/mach-generic/default.c | |||
@@ -65,7 +65,7 @@ struct genapic apic_default = { | |||
65 | .cpu_to_logical_apicid = default_cpu_to_logical_apicid, | 65 | .cpu_to_logical_apicid = default_cpu_to_logical_apicid, |
66 | .cpu_present_to_apicid = default_cpu_present_to_apicid, | 66 | .cpu_present_to_apicid = default_cpu_present_to_apicid, |
67 | .apicid_to_cpu_present = default_apicid_to_cpu_present, | 67 | .apicid_to_cpu_present = default_apicid_to_cpu_present, |
68 | .setup_portio_remap = setup_portio_remap, | 68 | .setup_portio_remap = NULL, |
69 | .check_phys_apicid_present = check_phys_apicid_present, | 69 | .check_phys_apicid_present = check_phys_apicid_present, |
70 | .enable_apic_mode = enable_apic_mode, | 70 | .enable_apic_mode = enable_apic_mode, |
71 | .phys_pkg_id = phys_pkg_id, | 71 | .phys_pkg_id = phys_pkg_id, |
diff --git a/arch/x86/mach-generic/es7000.c b/arch/x86/mach-generic/es7000.c index 1e0e16274557..449eca5b6048 100644 --- a/arch/x86/mach-generic/es7000.c +++ b/arch/x86/mach-generic/es7000.c | |||
@@ -126,7 +126,7 @@ struct genapic apic_es7000 = { | |||
126 | .cpu_to_logical_apicid = es7000_cpu_to_logical_apicid, | 126 | .cpu_to_logical_apicid = es7000_cpu_to_logical_apicid, |
127 | .cpu_present_to_apicid = es7000_cpu_present_to_apicid, | 127 | .cpu_present_to_apicid = es7000_cpu_present_to_apicid, |
128 | .apicid_to_cpu_present = es7000_apicid_to_cpu_present, | 128 | .apicid_to_cpu_present = es7000_apicid_to_cpu_present, |
129 | .setup_portio_remap = setup_portio_remap, | 129 | .setup_portio_remap = NULL, |
130 | .check_phys_apicid_present = check_phys_apicid_present, | 130 | .check_phys_apicid_present = check_phys_apicid_present, |
131 | .enable_apic_mode = enable_apic_mode, | 131 | .enable_apic_mode = enable_apic_mode, |
132 | .phys_pkg_id = phys_pkg_id, | 132 | .phys_pkg_id = phys_pkg_id, |
diff --git a/arch/x86/mach-generic/numaq.c b/arch/x86/mach-generic/numaq.c index 839b86b765a1..e60361b0bf1e 100644 --- a/arch/x86/mach-generic/numaq.c +++ b/arch/x86/mach-generic/numaq.c | |||
@@ -44,6 +44,19 @@ static void numaq_vector_allocation_domain(int cpu, cpumask_t *retmask) | |||
44 | *retmask = (cpumask_t){ { [0] = APIC_ALL_CPUS, } }; | 44 | *retmask = (cpumask_t){ { [0] = APIC_ALL_CPUS, } }; |
45 | } | 45 | } |
46 | 46 | ||
47 | static void numaq_setup_portio_remap(void) | ||
48 | { | ||
49 | int num_quads = num_online_nodes(); | ||
50 | |||
51 | if (num_quads <= 1) | ||
52 | return; | ||
53 | |||
54 | printk("Remapping cross-quad port I/O for %d quads\n", num_quads); | ||
55 | xquad_portio = ioremap(XQUAD_PORTIO_BASE, num_quads*XQUAD_PORTIO_QUAD); | ||
56 | printk("xquad_portio vaddr 0x%08lx, len %08lx\n", | ||
57 | (u_long) xquad_portio, (u_long) num_quads*XQUAD_PORTIO_QUAD); | ||
58 | } | ||
59 | |||
47 | struct genapic apic_numaq = { | 60 | struct genapic apic_numaq = { |
48 | 61 | ||
49 | .name = "NUMAQ", | 62 | .name = "NUMAQ", |
@@ -71,7 +84,7 @@ struct genapic apic_numaq = { | |||
71 | .cpu_to_logical_apicid = numaq_cpu_to_logical_apicid, | 84 | .cpu_to_logical_apicid = numaq_cpu_to_logical_apicid, |
72 | .cpu_present_to_apicid = numaq_cpu_present_to_apicid, | 85 | .cpu_present_to_apicid = numaq_cpu_present_to_apicid, |
73 | .apicid_to_cpu_present = numaq_apicid_to_cpu_present, | 86 | .apicid_to_cpu_present = numaq_apicid_to_cpu_present, |
74 | .setup_portio_remap = setup_portio_remap, | 87 | .setup_portio_remap = numaq_setup_portio_remap, |
75 | .check_phys_apicid_present = check_phys_apicid_present, | 88 | .check_phys_apicid_present = check_phys_apicid_present, |
76 | .enable_apic_mode = enable_apic_mode, | 89 | .enable_apic_mode = enable_apic_mode, |
77 | .phys_pkg_id = phys_pkg_id, | 90 | .phys_pkg_id = phys_pkg_id, |
diff --git a/arch/x86/mach-generic/summit.c b/arch/x86/mach-generic/summit.c index b6e37607a523..ffcf7ca2e8ce 100644 --- a/arch/x86/mach-generic/summit.c +++ b/arch/x86/mach-generic/summit.c | |||
@@ -64,7 +64,7 @@ struct genapic apic_summit = { | |||
64 | .cpu_to_logical_apicid = summit_cpu_to_logical_apicid, | 64 | .cpu_to_logical_apicid = summit_cpu_to_logical_apicid, |
65 | .cpu_present_to_apicid = summit_cpu_present_to_apicid, | 65 | .cpu_present_to_apicid = summit_cpu_present_to_apicid, |
66 | .apicid_to_cpu_present = summit_apicid_to_cpu_present, | 66 | .apicid_to_cpu_present = summit_apicid_to_cpu_present, |
67 | .setup_portio_remap = setup_portio_remap, | 67 | .setup_portio_remap = NULL, |
68 | .check_phys_apicid_present = check_phys_apicid_present, | 68 | .check_phys_apicid_present = check_phys_apicid_present, |
69 | .enable_apic_mode = enable_apic_mode, | 69 | .enable_apic_mode = enable_apic_mode, |
70 | .phys_pkg_id = phys_pkg_id, | 70 | .phys_pkg_id = phys_pkg_id, |