aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/processor.c
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2009-03-26 10:24:42 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2009-03-26 10:24:26 -0400
commit7b4684880dfc6c45bc56039ca5eada771d7643ab (patch)
treef572dc77a13e56a417616a9b49f74a68ed1dc99a /arch/s390/kernel/processor.c
parent2938af534d47891ddbced552e5d29f7b90bec609 (diff)
[S390] eliminate cpuinfo_S390 structure
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/processor.c')
-rw-r--r--arch/s390/kernel/processor.c69
1 files changed, 34 insertions, 35 deletions
diff --git a/arch/s390/kernel/processor.c b/arch/s390/kernel/processor.c
index 82c1872cfe80..423da1bd42a4 100644
--- a/arch/s390/kernel/processor.c
+++ b/arch/s390/kernel/processor.c
@@ -18,10 +18,11 @@
18#include <asm/lowcore.h> 18#include <asm/lowcore.h>
19#include <asm/param.h> 19#include <asm/param.h>
20 20
21void __cpuinit print_cpu_info(struct cpuinfo_S390 *cpuinfo) 21void __cpuinit print_cpu_info(void)
22{ 22{
23 pr_info("Processor %d started, address %d, identification %06X\n", 23 pr_info("Processor %d started, address %d, identification %06X\n",
24 cpuinfo->cpu_nr, cpuinfo->cpu_addr, cpuinfo->cpu_id.ident); 24 S390_lowcore.cpu_nr, S390_lowcore.cpu_addr,
25 S390_lowcore.cpu_id.ident);
25} 26}
26 27
27/* 28/*
@@ -34,44 +35,42 @@ static int show_cpuinfo(struct seq_file *m, void *v)
34 "esan3", "zarch", "stfle", "msa", "ldisp", "eimm", "dfp", 35 "esan3", "zarch", "stfle", "msa", "ldisp", "eimm", "dfp",
35 "edat" 36 "edat"
36 }; 37 };
37 struct cpuinfo_S390 *cpuinfo; 38 struct _lowcore *lc;
38 unsigned long n = (unsigned long) v - 1; 39 unsigned long n = (unsigned long) v - 1;
39 int i; 40 int i;
40 41
41 s390_adjust_jiffies(); 42 s390_adjust_jiffies();
42 preempt_disable(); 43 preempt_disable();
43 if (!n) { 44 if (!n) {
44 seq_printf(m, "vendor_id : IBM/S390\n" 45 seq_printf(m, "vendor_id : IBM/S390\n"
45 "# processors : %i\n" 46 "# processors : %i\n"
46 "bogomips per cpu: %lu.%02lu\n", 47 "bogomips per cpu: %lu.%02lu\n",
47 num_online_cpus(), loops_per_jiffy/(500000/HZ), 48 num_online_cpus(), loops_per_jiffy/(500000/HZ),
48 (loops_per_jiffy/(5000/HZ))%100); 49 (loops_per_jiffy/(5000/HZ))%100);
49 seq_puts(m, "features\t: "); 50 seq_puts(m, "features\t: ");
50 for (i = 0; i < 8; i++) 51 for (i = 0; i < 8; i++)
51 if (hwcap_str[i] && (elf_hwcap & (1UL << i))) 52 if (hwcap_str[i] && (elf_hwcap & (1UL << i)))
52 seq_printf(m, "%s ", hwcap_str[i]); 53 seq_printf(m, "%s ", hwcap_str[i]);
53 seq_puts(m, "\n"); 54 seq_puts(m, "\n");
54 } 55 }
55 56
56 if (cpu_online(n)) { 57 if (cpu_online(n)) {
57#ifdef CONFIG_SMP 58#ifdef CONFIG_SMP
58 if (smp_processor_id() == n) 59 lc = (smp_processor_id() == n) ?
59 cpuinfo = &S390_lowcore.cpu_data; 60 &S390_lowcore : lowcore_ptr[n];
60 else
61 cpuinfo = &lowcore_ptr[n]->cpu_data;
62#else 61#else
63 cpuinfo = &S390_lowcore.cpu_data; 62 lc = &S390_lowcore;
64#endif 63#endif
65 seq_printf(m, "processor %li: " 64 seq_printf(m, "processor %li: "
66 "version = %02X, " 65 "version = %02X, "
67 "identification = %06X, " 66 "identification = %06X, "
68 "machine = %04X\n", 67 "machine = %04X\n",
69 n, cpuinfo->cpu_id.version, 68 n, lc->cpu_id.version,
70 cpuinfo->cpu_id.ident, 69 lc->cpu_id.ident,
71 cpuinfo->cpu_id.machine); 70 lc->cpu_id.machine);
72 } 71 }
73 preempt_enable(); 72 preempt_enable();
74 return 0; 73 return 0;
75} 74}
76 75
77static void *c_start(struct seq_file *m, loff_t *pos) 76static void *c_start(struct seq_file *m, loff_t *pos)