[S390] eliminate cpuinfo_S390 structure
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
@@ -18,10 +18,11 @@
|
||||
#include <asm/lowcore.h>
|
||||
#include <asm/param.h>
|
||||
|
||||
void __cpuinit print_cpu_info(struct cpuinfo_S390 *cpuinfo)
|
||||
void __cpuinit print_cpu_info(void)
|
||||
{
|
||||
pr_info("Processor %d started, address %d, identification %06X\n",
|
||||
cpuinfo->cpu_nr, cpuinfo->cpu_addr, cpuinfo->cpu_id.ident);
|
||||
S390_lowcore.cpu_nr, S390_lowcore.cpu_addr,
|
||||
S390_lowcore.cpu_id.ident);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -34,44 +35,42 @@ static int show_cpuinfo(struct seq_file *m, void *v)
|
||||
"esan3", "zarch", "stfle", "msa", "ldisp", "eimm", "dfp",
|
||||
"edat"
|
||||
};
|
||||
struct cpuinfo_S390 *cpuinfo;
|
||||
unsigned long n = (unsigned long) v - 1;
|
||||
int i;
|
||||
struct _lowcore *lc;
|
||||
unsigned long n = (unsigned long) v - 1;
|
||||
int i;
|
||||
|
||||
s390_adjust_jiffies();
|
||||
preempt_disable();
|
||||
if (!n) {
|
||||
seq_printf(m, "vendor_id : IBM/S390\n"
|
||||
"# processors : %i\n"
|
||||
"bogomips per cpu: %lu.%02lu\n",
|
||||
num_online_cpus(), loops_per_jiffy/(500000/HZ),
|
||||
(loops_per_jiffy/(5000/HZ))%100);
|
||||
seq_puts(m, "features\t: ");
|
||||
for (i = 0; i < 8; i++)
|
||||
if (hwcap_str[i] && (elf_hwcap & (1UL << i)))
|
||||
seq_printf(m, "%s ", hwcap_str[i]);
|
||||
seq_puts(m, "\n");
|
||||
}
|
||||
s390_adjust_jiffies();
|
||||
preempt_disable();
|
||||
if (!n) {
|
||||
seq_printf(m, "vendor_id : IBM/S390\n"
|
||||
"# processors : %i\n"
|
||||
"bogomips per cpu: %lu.%02lu\n",
|
||||
num_online_cpus(), loops_per_jiffy/(500000/HZ),
|
||||
(loops_per_jiffy/(5000/HZ))%100);
|
||||
seq_puts(m, "features\t: ");
|
||||
for (i = 0; i < 8; i++)
|
||||
if (hwcap_str[i] && (elf_hwcap & (1UL << i)))
|
||||
seq_printf(m, "%s ", hwcap_str[i]);
|
||||
seq_puts(m, "\n");
|
||||
}
|
||||
|
||||
if (cpu_online(n)) {
|
||||
if (cpu_online(n)) {
|
||||
#ifdef CONFIG_SMP
|
||||
if (smp_processor_id() == n)
|
||||
cpuinfo = &S390_lowcore.cpu_data;
|
||||
else
|
||||
cpuinfo = &lowcore_ptr[n]->cpu_data;
|
||||
lc = (smp_processor_id() == n) ?
|
||||
&S390_lowcore : lowcore_ptr[n];
|
||||
#else
|
||||
cpuinfo = &S390_lowcore.cpu_data;
|
||||
lc = &S390_lowcore;
|
||||
#endif
|
||||
seq_printf(m, "processor %li: "
|
||||
"version = %02X, "
|
||||
"identification = %06X, "
|
||||
"machine = %04X\n",
|
||||
n, cpuinfo->cpu_id.version,
|
||||
cpuinfo->cpu_id.ident,
|
||||
cpuinfo->cpu_id.machine);
|
||||
}
|
||||
preempt_enable();
|
||||
return 0;
|
||||
seq_printf(m, "processor %li: "
|
||||
"version = %02X, "
|
||||
"identification = %06X, "
|
||||
"machine = %04X\n",
|
||||
n, lc->cpu_id.version,
|
||||
lc->cpu_id.ident,
|
||||
lc->cpu_id.machine);
|
||||
}
|
||||
preempt_enable();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void *c_start(struct seq_file *m, loff_t *pos)
|
||||
|
@@ -121,13 +121,10 @@ static struct resource data_resource = {
|
||||
*/
|
||||
void __cpuinit cpu_init(void)
|
||||
{
|
||||
int addr = hard_smp_processor_id();
|
||||
|
||||
/*
|
||||
* Store processor id in lowcore (used e.g. in timer_interrupt)
|
||||
*/
|
||||
get_cpu_id(&S390_lowcore.cpu_data.cpu_id);
|
||||
S390_lowcore.cpu_data.cpu_addr = addr;
|
||||
get_cpu_id(&S390_lowcore.cpu_id);
|
||||
|
||||
/*
|
||||
* Force FPU initialization:
|
||||
@@ -686,7 +683,6 @@ setup_memory(void)
|
||||
static void __init setup_hwcaps(void)
|
||||
{
|
||||
static const int stfl_bits[6] = { 0, 2, 7, 17, 19, 21 };
|
||||
struct cpuinfo_S390 *cpuinfo = &S390_lowcore.cpu_data;
|
||||
unsigned long long facility_list_extended;
|
||||
unsigned int facility_list;
|
||||
int i;
|
||||
@@ -732,7 +728,7 @@ static void __init setup_hwcaps(void)
|
||||
if (MACHINE_HAS_HPAGE)
|
||||
elf_hwcap |= 1UL << 7;
|
||||
|
||||
switch (cpuinfo->cpu_id.machine) {
|
||||
switch (S390_lowcore.cpu_id.machine) {
|
||||
case 0x9672:
|
||||
#if !defined(CONFIG_64BIT)
|
||||
default: /* Use "g5" as default for 31 bit kernels. */
|
||||
@@ -825,7 +821,7 @@ setup_arch(char **cmdline_p)
|
||||
setup_lowcore();
|
||||
|
||||
cpu_init();
|
||||
__cpu_logical_map[0] = S390_lowcore.cpu_data.cpu_addr;
|
||||
__cpu_logical_map[0] = stap();
|
||||
s390_init_cpu_topology();
|
||||
|
||||
/*
|
||||
|
@@ -372,7 +372,7 @@ static void __init smp_detect_cpus(void)
|
||||
|
||||
c_cpus = 1;
|
||||
s_cpus = 0;
|
||||
boot_cpu_addr = S390_lowcore.cpu_data.cpu_addr;
|
||||
boot_cpu_addr = __cpu_logical_map[0];
|
||||
info = kmalloc(sizeof(*info), GFP_KERNEL);
|
||||
if (!info)
|
||||
panic("smp_detect_cpus failed to allocate memory\n");
|
||||
@@ -446,7 +446,7 @@ int __cpuinit start_secondary(void *cpuvoid)
|
||||
/* Switch on interrupts */
|
||||
local_irq_enable();
|
||||
/* Print info about this processor */
|
||||
print_cpu_info(&S390_lowcore.cpu_data);
|
||||
print_cpu_info();
|
||||
/* cpu_idle will call schedule for us */
|
||||
cpu_idle();
|
||||
return 0;
|
||||
@@ -564,7 +564,7 @@ int __cpuinit __cpu_up(unsigned int cpu)
|
||||
: : "a" (&cpu_lowcore->access_regs_save_area) : "memory");
|
||||
cpu_lowcore->percpu_offset = __per_cpu_offset[cpu];
|
||||
cpu_lowcore->current_task = (unsigned long) idle;
|
||||
cpu_lowcore->cpu_data.cpu_nr = cpu;
|
||||
cpu_lowcore->cpu_nr = cpu;
|
||||
cpu_lowcore->kernel_asce = S390_lowcore.kernel_asce;
|
||||
cpu_lowcore->ipl_device = S390_lowcore.ipl_device;
|
||||
eieio();
|
||||
@@ -656,7 +656,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
|
||||
/* request the 0x1201 emergency signal external interrupt */
|
||||
if (register_external_interrupt(0x1201, do_ext_call_interrupt) != 0)
|
||||
panic("Couldn't request external interrupt 0x1201");
|
||||
print_cpu_info(&S390_lowcore.cpu_data);
|
||||
print_cpu_info();
|
||||
|
||||
/* Reallocate current lowcore, but keep its contents. */
|
||||
lc_order = sizeof(long) == 8 ? 1 : 0;
|
||||
|
Reference in New Issue
Block a user