Commit 65ea5783 authored by Anton Blanchard's avatar Anton Blanchard

ppc64: UP compile fixes

parent af0a716c
...@@ -1565,7 +1565,6 @@ _GLOBAL(__secondary_start) ...@@ -1565,7 +1565,6 @@ _GLOBAL(__secondary_start)
mtspr SRR0,r3 mtspr SRR0,r3
mtspr SRR1,r4 mtspr SRR1,r4
rfid rfid
#endif /* CONFIG_SMP */
/* /*
* Running with relocation on at this point. All we want to do is * Running with relocation on at this point. All we want to do is
...@@ -1575,6 +1574,7 @@ _GLOBAL(start_secondary_prolog) ...@@ -1575,6 +1574,7 @@ _GLOBAL(start_secondary_prolog)
li r3,0 li r3,0
std r3,0(r1) /* Zero the stack frame pointer */ std r3,0(r1) /* Zero the stack frame pointer */
bl .start_secondary bl .start_secondary
#endif
/* /*
* This subroutine clobbers r11, r12 and the LR * This subroutine clobbers r11, r12 and the LR
......
...@@ -180,6 +180,8 @@ struct _of_tce_table of_tce_table[MAX_PHB + 1] = {{0, 0, 0}}; ...@@ -180,6 +180,8 @@ struct _of_tce_table of_tce_table[MAX_PHB + 1] = {{0, 0, 0}};
char *bootpath = 0; char *bootpath = 0;
char *bootdevice = 0; char *bootdevice = 0;
int boot_cpuid = 0;
struct device_node *allnodes = 0; struct device_node *allnodes = 0;
#define UNDEFINED_IRQ 0xffff #define UNDEFINED_IRQ 0xffff
...@@ -1350,7 +1352,9 @@ prom_init(unsigned long r3, unsigned long r4, unsigned long pp, ...@@ -1350,7 +1352,9 @@ prom_init(unsigned long r3, unsigned long r4, unsigned long pp,
&getprop_rval, sizeof(getprop_rval)); &getprop_rval, sizeof(getprop_rval));
_prom->cpu = (int)(unsigned long)getprop_rval; _prom->cpu = (int)(unsigned long)getprop_rval;
_xPaca[_prom->cpu].active = 1; _xPaca[_prom->cpu].active = 1;
#ifdef CONFIG_SMP
RELOC(cpu_online_map) = 1 << _prom->cpu; RELOC(cpu_online_map) = 1 << _prom->cpu;
#endif
RELOC(boot_cpuid) = _prom->cpu; RELOC(boot_cpuid) = _prom->cpu;
#ifdef DEBUG_PROM #ifdef DEBUG_PROM
......
...@@ -262,7 +262,6 @@ static int show_cpuinfo(struct seq_file *m, void *v) ...@@ -262,7 +262,6 @@ static int show_cpuinfo(struct seq_file *m, void *v)
unsigned short maj; unsigned short maj;
unsigned short min; unsigned short min;
#ifdef CONFIG_SMP
if (cpu_id == NR_CPUS) { if (cpu_id == NR_CPUS) {
if (ppc_md.get_cpuinfo != NULL) if (ppc_md.get_cpuinfo != NULL)
...@@ -273,17 +272,18 @@ static int show_cpuinfo(struct seq_file *m, void *v) ...@@ -273,17 +272,18 @@ static int show_cpuinfo(struct seq_file *m, void *v)
if (!(cpu_online_map & (1<<cpu_id))) if (!(cpu_online_map & (1<<cpu_id)))
return 0; return 0;
#endif
#ifdef CONFIG_SMP
pvr = paca[cpu_id].pvr; pvr = paca[cpu_id].pvr;
#else
pvr = _get_PVR();
#endif
maj = (pvr >> 8) & 0xFF; maj = (pvr >> 8) & 0xFF;
min = pvr & 0xFF; min = pvr & 0xFF;
seq_printf(m, "processor\t: %lu\n", cpu_id); seq_printf(m, "processor\t: %lu\n", cpu_id);
seq_printf(m, "cpu\t\t: "); seq_printf(m, "cpu\t\t: ");
pvr = paca[cpu_id].pvr;
switch (PVR_VER(pvr)) { switch (PVR_VER(pvr)) {
case PV_NORTHSTAR: case PV_NORTHSTAR:
seq_printf(m, "RS64-II (northstar)\n"); seq_printf(m, "RS64-II (northstar)\n");
......
...@@ -55,7 +55,6 @@ unsigned long cache_decay_ticks; ...@@ -55,7 +55,6 @@ unsigned long cache_decay_ticks;
/* initialised so it doesnt end up in bss */ /* initialised so it doesnt end up in bss */
unsigned long cpu_online_map = 0; unsigned long cpu_online_map = 0;
int boot_cpuid = 0;
static struct smp_ops_t *smp_ops; static struct smp_ops_t *smp_ops;
......
...@@ -172,6 +172,8 @@ struct prom_t { ...@@ -172,6 +172,8 @@ struct prom_t {
extern struct prom_t prom; extern struct prom_t prom;
extern int boot_cpuid;
/* Prototypes */ /* Prototypes */
extern void abort(void); extern void abort(void);
extern unsigned long prom_init(unsigned long, unsigned long, unsigned long, extern unsigned long prom_init(unsigned long, unsigned long, unsigned long,
......
...@@ -56,8 +56,6 @@ extern volatile unsigned long cpu_callin_map[NR_CPUS]; ...@@ -56,8 +56,6 @@ extern volatile unsigned long cpu_callin_map[NR_CPUS];
#define smp_processor_id() (get_paca()->xPacaIndex) #define smp_processor_id() (get_paca()->xPacaIndex)
extern int boot_cpuid;
/* Since OpenPIC has only 4 IPIs, we use slightly different message numbers. /* Since OpenPIC has only 4 IPIs, we use slightly different message numbers.
* *
* Make sure this matches openpic_request_IPIs in open_pic.c, or what shows up * Make sure this matches openpic_request_IPIs in open_pic.c, or what shows up
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment