git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
arch
/
parisc
/
kernel
/
processor.c
diff --git
a/arch/parisc/kernel/processor.c
b/arch/parisc/kernel/processor.c
index
dd7f239
..
fb81e56
100644
(file)
--- a/
arch/parisc/kernel/processor.c
+++ b/
arch/parisc/kernel/processor.c
@@
-26,26
+26,27
@@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
-#include <linux/config.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/seq_file.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/seq_file.h>
#include <linux/slab.h>
+#include <linux/cpu.h>
#include <asm/cache.h>
#include <asm/hardware.h> /* for register_parisc_driver() stuff */
#include <asm/processor.h>
#include <asm/page.h>
#include <asm/pdc.h>
#include <asm/cache.h>
#include <asm/hardware.h> /* for register_parisc_driver() stuff */
#include <asm/processor.h>
#include <asm/page.h>
#include <asm/pdc.h>
+#include <asm/pdcpat.h>
#include <asm/irq.h> /* for struct irq_region */
#include <asm/parisc-device.h>
#include <asm/irq.h> /* for struct irq_region */
#include <asm/parisc-device.h>
-struct system_cpuinfo_parisc boot_cpu_data;
+struct system_cpuinfo_parisc boot_cpu_data
__read_mostly
;
EXPORT_SYMBOL(boot_cpu_data);
EXPORT_SYMBOL(boot_cpu_data);
-struct cpuinfo_parisc cpu_data[NR_CPUS];
+struct cpuinfo_parisc cpu_data[NR_CPUS]
__read_mostly
;
/*
** PARISC CPU driver - claim "device" and initialize CPU data structures.
/*
** PARISC CPU driver - claim "device" and initialize CPU data structures.
@@
-90,7
+91,7
@@
static int __init processor_probe(struct parisc_device *dev)
* May get overwritten by PAT code.
*/
cpuid = boot_cpu_data.cpu_count;
* May get overwritten by PAT code.
*/
cpuid = boot_cpu_data.cpu_count;
- txn_addr = dev->hpa
;
/* for legacy PDC */
+ txn_addr = dev->hpa
.start;
/* for legacy PDC */
#ifdef __LP64__
if (is_pdc_pat()) {
#ifdef __LP64__
if (is_pdc_pat()) {
@@
-120,7
+121,7
@@
static int __init processor_probe(struct parisc_device *dev)
* boot time (ie shutdown a CPU from an OS perspective).
*/
/* get the cpu number */
* boot time (ie shutdown a CPU from an OS perspective).
*/
/* get the cpu number */
- status = pdc_pat_cpu_get_number(&cpu_info, dev->hpa);
+ status = pdc_pat_cpu_get_number(&cpu_info, dev->hpa
.start
);
BUG_ON(PDC_OK != status);
BUG_ON(PDC_OK != status);
@@
-128,7
+129,7
@@
static int __init processor_probe(struct parisc_device *dev)
printk(KERN_WARNING "IGNORING CPU at 0x%x,"
" cpu_slot_id > NR_CPUS"
" (%ld > %d)\n",
printk(KERN_WARNING "IGNORING CPU at 0x%x,"
" cpu_slot_id > NR_CPUS"
" (%ld > %d)\n",
- dev->hpa, cpu_info.cpu_num, NR_CPUS);
+ dev->hpa
.start
, cpu_info.cpu_num, NR_CPUS);
/* Ignore CPU since it will only crash */
boot_cpu_data.cpu_count--;
return 1;
/* Ignore CPU since it will only crash */
boot_cpu_data.cpu_count--;
return 1;
@@
-142,16
+143,17
@@
static int __init processor_probe(struct parisc_device *dev)
p = &cpu_data[cpuid];
boot_cpu_data.cpu_count++;
p = &cpu_data[cpuid];
boot_cpu_data.cpu_count++;
- /* initialize counters */
- memset(p, 0, sizeof(struct cpuinfo_parisc));
+ /* initialize counters - CPU 0 gets it_value set in time_init() */
+ if (cpuid)
+ memset(p, 0, sizeof(struct cpuinfo_parisc));
p->loops_per_jiffy = loops_per_jiffy;
p->dev = dev; /* Save IODC data in case we need it */
p->loops_per_jiffy = loops_per_jiffy;
p->dev = dev; /* Save IODC data in case we need it */
- p->hpa = dev->hpa
;
/* save CPU hpa */
+ p->hpa = dev->hpa
.start;
/* save CPU hpa */
p->cpuid = cpuid; /* save CPU id */
p->txn_addr = txn_addr; /* save CPU IRQ address */
#ifdef CONFIG_SMP
p->cpuid = cpuid; /* save CPU id */
p->txn_addr = txn_addr; /* save CPU IRQ address */
#ifdef CONFIG_SMP
-
p->lock = SPIN_LOCK_UNLOCKED
;
+
spin_lock_init(&p->lock)
;
/*
** FIXME: review if any other initialization is clobbered
/*
** FIXME: review if any other initialization is clobbered
@@
-187,6
+189,17
@@
static int __init processor_probe(struct parisc_device *dev)
cpu_irq_actions[cpuid] = actions;
}
#endif
cpu_irq_actions[cpuid] = actions;
}
#endif
+
+ /*
+ * Bring this CPU up now! (ignore bootstrap cpuid == 0)
+ */
+#ifdef CONFIG_SMP
+ if (cpuid) {
+ cpu_set(cpuid, cpu_present_map);
+ cpu_up(cpuid);
+ }
+#endif
+
return 0;
}
return 0;
}
@@
-365,12
+378,12
@@
show_cpuinfo (struct seq_file *m, void *v)
return 0;
}
return 0;
}
-static struct parisc_device_id processor_tbl[] = {
+static struct parisc_device_id processor_tbl[]
__read_mostly
= {
{ HPHW_NPROC, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, SVERSION_ANY_ID },
{ 0, }
};
{ HPHW_NPROC, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, SVERSION_ANY_ID },
{ 0, }
};
-static struct parisc_driver cpu_driver = {
+static struct parisc_driver cpu_driver
__read_mostly
= {
.name = "CPU",
.id_table = processor_tbl,
.probe = processor_probe
.name = "CPU",
.id_table = processor_tbl,
.probe = processor_probe