diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-01 05:25:57 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-05 16:30:14 -0500 |
commit | 4f179d121885142fb907b64956228b369d495958 (patch) | |
tree | a0203880c1237621efcc2a02f6168d1d969c5a3f | |
parent | 9d45cf9e36bf9bcf16df6e1cbf049807c8402823 (diff) |
x86, numaq: cleanups
Also move xquad_portio over to where it's allocated.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/include/asm/numaq.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/numaq_32.c | 33 | ||||
-rw-r--r-- | arch/x86/pci/numaq_32.c | 4 |
3 files changed, 20 insertions, 19 deletions
diff --git a/arch/x86/include/asm/numaq.h b/arch/x86/include/asm/numaq.h index 1e8bd30b4c16..9f0a5f5d29ec 100644 --- a/arch/x86/include/asm/numaq.h +++ b/arch/x86/include/asm/numaq.h | |||
@@ -31,6 +31,8 @@ | |||
31 | extern int found_numaq; | 31 | extern int found_numaq; |
32 | extern int get_memcfg_numaq(void); | 32 | extern int get_memcfg_numaq(void); |
33 | 33 | ||
34 | extern void *xquad_portio; | ||
35 | |||
34 | /* | 36 | /* |
35 | * SYS_CFG_DATA_PRIV_ADDR, struct eachquadmem, and struct sys_cfg_data are the | 37 | * SYS_CFG_DATA_PRIV_ADDR, struct eachquadmem, and struct sys_cfg_data are the |
36 | */ | 38 | */ |
diff --git a/arch/x86/kernel/numaq_32.c b/arch/x86/kernel/numaq_32.c index 947748e17211..0cc41a1d2550 100644 --- a/arch/x86/kernel/numaq_32.c +++ b/arch/x86/kernel/numaq_32.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2002, IBM Corp. | 4 | * Copyright (C) 2002, IBM Corp. |
5 | * | 5 | * |
6 | * All rights reserved. | 6 | * All rights reserved. |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
@@ -23,17 +23,18 @@ | |||
23 | * Send feedback to <gone@us.ibm.com> | 23 | * Send feedback to <gone@us.ibm.com> |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/mm.h> | 26 | #include <linux/nodemask.h> |
27 | #include <linux/bootmem.h> | 27 | #include <linux/bootmem.h> |
28 | #include <linux/mmzone.h> | 28 | #include <linux/mmzone.h> |
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/nodemask.h> | 30 | #include <linux/mm.h> |
31 | #include <asm/numaq.h> | 31 | |
32 | #include <asm/topology.h> | ||
33 | #include <asm/processor.h> | 32 | #include <asm/processor.h> |
33 | #include <asm/topology.h> | ||
34 | #include <asm/genapic.h> | 34 | #include <asm/genapic.h> |
35 | #include <asm/e820.h> | 35 | #include <asm/numaq.h> |
36 | #include <asm/setup.h> | 36 | #include <asm/setup.h> |
37 | #include <asm/e820.h> | ||
37 | 38 | ||
38 | #define MB_TO_PAGES(addr) ((addr) << (20 - PAGE_SHIFT)) | 39 | #define MB_TO_PAGES(addr) ((addr) << (20 - PAGE_SHIFT)) |
39 | 40 | ||
@@ -91,19 +92,20 @@ static int __init numaq_pre_time_init(void) | |||
91 | } | 92 | } |
92 | 93 | ||
93 | int found_numaq; | 94 | int found_numaq; |
95 | |||
94 | /* | 96 | /* |
95 | * Have to match translation table entries to main table entries by counter | 97 | * Have to match translation table entries to main table entries by counter |
96 | * hence the mpc_record variable .... can't see a less disgusting way of | 98 | * hence the mpc_record variable .... can't see a less disgusting way of |
97 | * doing this .... | 99 | * doing this .... |
98 | */ | 100 | */ |
99 | struct mpc_config_translation { | 101 | struct mpc_config_translation { |
100 | unsigned char mpc_type; | 102 | unsigned char mpc_type; |
101 | unsigned char trans_len; | 103 | unsigned char trans_len; |
102 | unsigned char trans_type; | 104 | unsigned char trans_type; |
103 | unsigned char trans_quad; | 105 | unsigned char trans_quad; |
104 | unsigned char trans_global; | 106 | unsigned char trans_global; |
105 | unsigned char trans_local; | 107 | unsigned char trans_local; |
106 | unsigned short trans_reserved; | 108 | unsigned short trans_reserved; |
107 | }; | 109 | }; |
108 | 110 | ||
109 | /* x86_quirks member */ | 111 | /* x86_quirks member */ |
@@ -444,7 +446,8 @@ static inline physid_mask_t numaq_apicid_to_cpu_present(int logical_apicid) | |||
444 | return physid_mask_of_physid(cpu + 4*node); | 446 | return physid_mask_of_physid(cpu + 4*node); |
445 | } | 447 | } |
446 | 448 | ||
447 | extern void *xquad_portio; | 449 | /* Where the IO area was mapped on multiquad, always 0 otherwise */ |
450 | void *xquad_portio; | ||
448 | 451 | ||
449 | static inline int numaq_check_phys_apicid_present(int boot_cpu_physical_apicid) | 452 | static inline int numaq_check_phys_apicid_present(int boot_cpu_physical_apicid) |
450 | { | 453 | { |
@@ -502,7 +505,7 @@ static void numaq_setup_portio_remap(void) | |||
502 | int num_quads = num_online_nodes(); | 505 | int num_quads = num_online_nodes(); |
503 | 506 | ||
504 | if (num_quads <= 1) | 507 | if (num_quads <= 1) |
505 | return; | 508 | return; |
506 | 509 | ||
507 | printk("Remapping cross-quad port I/O for %d quads\n", num_quads); | 510 | printk("Remapping cross-quad port I/O for %d quads\n", num_quads); |
508 | xquad_portio = ioremap(XQUAD_PORTIO_BASE, num_quads*XQUAD_PORTIO_QUAD); | 511 | xquad_portio = ioremap(XQUAD_PORTIO_BASE, num_quads*XQUAD_PORTIO_QUAD); |
diff --git a/arch/x86/pci/numaq_32.c b/arch/x86/pci/numaq_32.c index 1b2d773612e7..5601e829c387 100644 --- a/arch/x86/pci/numaq_32.c +++ b/arch/x86/pci/numaq_32.c | |||
@@ -18,10 +18,6 @@ | |||
18 | 18 | ||
19 | #define QUADLOCAL2BUS(quad,local) (quad_local_to_mp_bus_id[quad][local]) | 19 | #define QUADLOCAL2BUS(quad,local) (quad_local_to_mp_bus_id[quad][local]) |
20 | 20 | ||
21 | /* Where the IO area was mapped on multiquad, always 0 otherwise */ | ||
22 | void *xquad_portio; | ||
23 | EXPORT_SYMBOL(xquad_portio); | ||
24 | |||
25 | #define XQUAD_PORT_ADDR(port, quad) (xquad_portio + (XQUAD_PORTIO_QUAD*quad) + port) | 21 | #define XQUAD_PORT_ADDR(port, quad) (xquad_portio + (XQUAD_PORTIO_QUAD*quad) + port) |
26 | 22 | ||
27 | #define PCI_CONF1_MQ_ADDRESS(bus, devfn, reg) \ | 23 | #define PCI_CONF1_MQ_ADDRESS(bus, devfn, reg) \ |