aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/numaq_32.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-02-01 05:25:57 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-05 16:30:14 -0500
commit4f179d121885142fb907b64956228b369d495958 (patch)
treea0203880c1237621efcc2a02f6168d1d969c5a3f /arch/x86/kernel/numaq_32.c
parent9d45cf9e36bf9bcf16df6e1cbf049807c8402823 (diff)
x86, numaq: cleanups
Also move xquad_portio over to where it's allocated. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/numaq_32.c')
-rw-r--r--arch/x86/kernel/numaq_32.c33
1 files changed, 18 insertions, 15 deletions
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
93int found_numaq; 94int 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 */
99struct mpc_config_translation { 101struct 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
447extern void *xquad_portio; 449/* Where the IO area was mapped on multiquad, always 0 otherwise */
450void *xquad_portio;
448 451
449static inline int numaq_check_phys_apicid_present(int boot_cpu_physical_apicid) 452static 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);