aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2007-10-11 18:46:05 -0400
committerRalf Baechle <ralf@linux-mips.org>2007-10-11 18:46:05 -0400
commitcc6e8e0812cf95aea397c457ff48de2ac069614f (patch)
treeda0527908dceed57cd10204034a6b2c888a34863
parent641e97f318870921d048154af6807e46e43c307a (diff)
[MIPS] Remove IP27 specific structures from struct cpuinfo_mips
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/sgi-ip27/ip27-init.c3
-rw-r--r--arch/mips/sgi-ip27/ip27-smp.c2
-rw-r--r--include/asm-mips/cpu-info.h18
-rw-r--r--include/asm-mips/mach-ip27/topology.h20
-rw-r--r--include/asm-mips/sn/arch.h4
5 files changed, 25 insertions, 22 deletions
diff --git a/arch/mips/sgi-ip27/ip27-init.c b/arch/mips/sgi-ip27/ip27-init.c
index 74158d349630..af08c41d6aa8 100644
--- a/arch/mips/sgi-ip27/ip27-init.c
+++ b/arch/mips/sgi-ip27/ip27-init.c
@@ -47,6 +47,9 @@ cnodeid_t cpuid_to_compact_node[MAXCPUS];
47 47
48EXPORT_SYMBOL(nasid_to_compact_node); 48EXPORT_SYMBOL(nasid_to_compact_node);
49 49
50struct cpuinfo_ip27 sn_cpu_info[NR_CPUS];
51EXPORT_SYMBOL_GPL(sn_cpu_info);
52
50extern void pcibr_setup(cnodeid_t); 53extern void pcibr_setup(cnodeid_t);
51 54
52extern void xtalk_probe_node(cnodeid_t nid); 55extern void xtalk_probe_node(cnodeid_t nid);
diff --git a/arch/mips/sgi-ip27/ip27-smp.c b/arch/mips/sgi-ip27/ip27-smp.c
index fbb27728a76a..493777e39a01 100644
--- a/arch/mips/sgi-ip27/ip27-smp.c
+++ b/arch/mips/sgi-ip27/ip27-smp.c
@@ -33,7 +33,7 @@ static void alloc_cpupda(cpuid_t cpu, int cpunum)
33 nasid_t nasid = COMPACT_TO_NASID_NODEID(node); 33 nasid_t nasid = COMPACT_TO_NASID_NODEID(node);
34 34
35 cputonasid(cpunum) = nasid; 35 cputonasid(cpunum) = nasid;
36 cpu_data[cpunum].p_nodeid = node; 36 sn_cpu_info[cpunum].p_nodeid = node;
37 cputoslice(cpunum) = get_cpu_slice(cpu); 37 cputoslice(cpunum) = get_cpu_slice(cpu);
38} 38}
39 39
diff --git a/include/asm-mips/cpu-info.h b/include/asm-mips/cpu-info.h
index 22fe8453fcc7..04689590eeed 100644
--- a/include/asm-mips/cpu-info.h
+++ b/include/asm-mips/cpu-info.h
@@ -14,10 +14,6 @@
14 14
15#include <asm/cache.h> 15#include <asm/cache.h>
16 16
17#ifdef CONFIG_SGI_IP27
18#include <asm/sn/types.h>
19#endif
20
21/* 17/*
22 * Descriptor for a cache 18 * Descriptor for a cache
23 */ 19 */
@@ -43,20 +39,6 @@ struct cache_desc {
43struct cpuinfo_mips { 39struct cpuinfo_mips {
44 unsigned long udelay_val; 40 unsigned long udelay_val;
45 unsigned long asid_cache; 41 unsigned long asid_cache;
46#if defined(CONFIG_SGI_IP27)
47// cpuid_t p_cpuid; /* PROM assigned cpuid */
48 cnodeid_t p_nodeid; /* my node ID in compact-id-space */
49 nasid_t p_nasid; /* my node ID in numa-as-id-space */
50 unsigned char p_slice; /* Physical position on node board */
51#endif
52#if 0
53 unsigned long loops_per_sec;
54 unsigned long ipi_count;
55 unsigned long irq_attempt[NR_IRQS];
56 unsigned long smp_local_irq_count;
57 unsigned long prof_multiplier;
58 unsigned long prof_counter;
59#endif
60 42
61 /* 43 /*
62 * Capability and feature descriptor structure for MIPS CPU 44 * Capability and feature descriptor structure for MIPS CPU
diff --git a/include/asm-mips/mach-ip27/topology.h b/include/asm-mips/mach-ip27/topology.h
index 61d9be3f3175..372291f53fb9 100644
--- a/include/asm-mips/mach-ip27/topology.h
+++ b/include/asm-mips/mach-ip27/topology.h
@@ -2,9 +2,27 @@
2#define _ASM_MACH_TOPOLOGY_H 1 2#define _ASM_MACH_TOPOLOGY_H 1
3 3
4#include <asm/sn/hub.h> 4#include <asm/sn/hub.h>
5#include <asm/sn/types.h>
5#include <asm/mmzone.h> 6#include <asm/mmzone.h>
6 7
7#define cpu_to_node(cpu) (cpu_data[(cpu)].p_nodeid) 8struct cpuinfo_ip27 {
9// cpuid_t p_cpuid; /* PROM assigned cpuid */
10 cnodeid_t p_nodeid; /* my node ID in compact-id-space */
11 nasid_t p_nasid; /* my node ID in numa-as-id-space */
12 unsigned char p_slice; /* Physical position on node board */
13#if 0
14 unsigned long loops_per_sec;
15 unsigned long ipi_count;
16 unsigned long irq_attempt[NR_IRQS];
17 unsigned long smp_local_irq_count;
18 unsigned long prof_multiplier;
19 unsigned long prof_counter;
20#endif
21};
22
23extern struct cpuinfo_ip27 sn_cpu_info[NR_CPUS];
24
25#define cpu_to_node(cpu) (sn_cpu_info[(cpu)].p_nodeid)
8#define parent_node(node) (node) 26#define parent_node(node) (node)
9#define node_to_cpumask(node) (hub_data(node)->h_cpus) 27#define node_to_cpumask(node) (hub_data(node)->h_cpus)
10#define node_to_first_cpu(node) (first_cpu(node_to_cpumask(node))) 28#define node_to_first_cpu(node) (first_cpu(node_to_cpumask(node)))
diff --git a/include/asm-mips/sn/arch.h b/include/asm-mips/sn/arch.h
index da523de628be..bd75945e10ff 100644
--- a/include/asm-mips/sn/arch.h
+++ b/include/asm-mips/sn/arch.h
@@ -19,8 +19,8 @@
19 19
20typedef u64 hubreg_t; 20typedef u64 hubreg_t;
21 21
22#define cputonasid(cpu) (cpu_data[(cpu)].p_nasid) 22#define cputonasid(cpu) (sn_cpu_info[(cpu)].p_nasid)
23#define cputoslice(cpu) (cpu_data[(cpu)].p_slice) 23#define cputoslice(cpu) (sn_cpu_info[(cpu)].p_slice)
24#define makespnum(_nasid, _slice) \ 24#define makespnum(_nasid, _slice) \
25 (((_nasid) << CPUS_PER_NODE_SHFT) | (_slice)) 25 (((_nasid) << CPUS_PER_NODE_SHFT) | (_slice))
26 26