]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[MIPS] Remove IP27 specific structures from struct cpuinfo_mips
authorRalf Baechle <ralf@linux-mips.org>
Thu, 11 Oct 2007 22:46:05 +0000 (23:46 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 11 Oct 2007 22:46:05 +0000 (23:46 +0100)
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/sgi-ip27/ip27-init.c
arch/mips/sgi-ip27/ip27-smp.c
include/asm-mips/cpu-info.h
include/asm-mips/mach-ip27/topology.h
include/asm-mips/sn/arch.h

index 74158d34963013eaad33eff4218beed7bcf8143a..af08c41d6aa860b15cfacbe2f171e6deccf5bdc3 100644 (file)
@@ -47,6 +47,9 @@ cnodeid_t     cpuid_to_compact_node[MAXCPUS];
 
 EXPORT_SYMBOL(nasid_to_compact_node);
 
+struct cpuinfo_ip27 sn_cpu_info[NR_CPUS];
+EXPORT_SYMBOL_GPL(sn_cpu_info);
+
 extern void pcibr_setup(cnodeid_t);
 
 extern void xtalk_probe_node(cnodeid_t nid);
index fbb27728a76abb164a5fa02da92aae9c5e979d1d..493777e39a01c64276d4d547e964cec1a15c8b6e 100644 (file)
@@ -33,7 +33,7 @@ static void alloc_cpupda(cpuid_t cpu, int cpunum)
        nasid_t nasid = COMPACT_TO_NASID_NODEID(node);
 
        cputonasid(cpunum) = nasid;
-       cpu_data[cpunum].p_nodeid = node;
+       sn_cpu_info[cpunum].p_nodeid = node;
        cputoslice(cpunum) = get_cpu_slice(cpu);
 }
 
index 22fe8453fcc764427dc1f7f5807d7ee30e817f28..04689590eeed6428d998839ba462f62d94b0c316 100644 (file)
 
 #include <asm/cache.h>
 
-#ifdef CONFIG_SGI_IP27
-#include <asm/sn/types.h>
-#endif
-
 /*
  * Descriptor for a cache
  */
@@ -43,20 +39,6 @@ struct cache_desc {
 struct cpuinfo_mips {
        unsigned long           udelay_val;
        unsigned long           asid_cache;
-#if defined(CONFIG_SGI_IP27)
-//     cpuid_t         p_cpuid;        /* PROM assigned cpuid */
-       cnodeid_t       p_nodeid;       /* my node ID in compact-id-space */
-       nasid_t         p_nasid;        /* my node ID in numa-as-id-space */
-       unsigned char   p_slice;        /* Physical position on node board */
-#endif
-#if 0
-       unsigned long           loops_per_sec;
-       unsigned long           ipi_count;
-       unsigned long           irq_attempt[NR_IRQS];
-       unsigned long           smp_local_irq_count;
-       unsigned long           prof_multiplier;
-       unsigned long           prof_counter;
-#endif
 
        /*
         * Capability and feature descriptor structure for MIPS CPU
index 61d9be3f31759f7aea84bbfbef5852c2183d02bd..372291f53fb9a2daf77af42141c27c91662cfb8d 100644 (file)
@@ -2,9 +2,27 @@
 #define _ASM_MACH_TOPOLOGY_H   1
 
 #include <asm/sn/hub.h>
+#include <asm/sn/types.h>
 #include <asm/mmzone.h>
 
-#define cpu_to_node(cpu)       (cpu_data[(cpu)].p_nodeid)
+struct cpuinfo_ip27 {
+//     cpuid_t         p_cpuid;        /* PROM assigned cpuid */
+       cnodeid_t       p_nodeid;       /* my node ID in compact-id-space */
+       nasid_t         p_nasid;        /* my node ID in numa-as-id-space */
+       unsigned char   p_slice;        /* Physical position on node board */
+#if 0
+       unsigned long           loops_per_sec;
+       unsigned long           ipi_count;
+       unsigned long           irq_attempt[NR_IRQS];
+       unsigned long           smp_local_irq_count;
+       unsigned long           prof_multiplier;
+       unsigned long           prof_counter;
+#endif
+};
+
+extern struct cpuinfo_ip27 sn_cpu_info[NR_CPUS];
+
+#define cpu_to_node(cpu)       (sn_cpu_info[(cpu)].p_nodeid)
 #define parent_node(node)      (node)
 #define node_to_cpumask(node)  (hub_data(node)->h_cpus)
 #define node_to_first_cpu(node)        (first_cpu(node_to_cpumask(node)))
index da523de628be98302df8d306f7ddf3666a6907dd..bd75945e10fffdec2715b444e71a694561dfb3f9 100644 (file)
@@ -19,8 +19,8 @@
 
 typedef u64    hubreg_t;
 
-#define cputonasid(cpu)                        (cpu_data[(cpu)].p_nasid)
-#define cputoslice(cpu)                        (cpu_data[(cpu)].p_slice)
+#define cputonasid(cpu)                (sn_cpu_info[(cpu)].p_nasid)
+#define cputoslice(cpu)                (sn_cpu_info[(cpu)].p_slice)
 #define makespnum(_nasid, _slice)                                      \
                (((_nasid) << CPUS_PER_NODE_SHFT) | (_slice))