Commit 54fec6c4 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ppc64: UP compile fixes, from Paul Mackerras

From: Anton Blanchard <anton@samba.org>

Minor fixes to make the UP case compile, export cpu_possible_map, fix up
whitespace etc.
parent 09a0a191
......@@ -1029,18 +1029,22 @@ prom_hold_cpus(unsigned long mem)
if (*acknowledge == cpuid) {
prom_print(RELOC("ok\n"));
#ifdef CONFIG_SMP
/* Set the number of active processors. */
_systemcfg->processorCount++;
cpu_set(cpuid, RELOC(cpu_available_map));
cpu_set(cpuid, RELOC(cpu_possible_map));
cpu_set(cpuid, RELOC(cpu_present_at_boot));
#endif
} else {
prom_print(RELOC("failed: "));
prom_print_hex(*acknowledge);
prom_print_nl();
/* prom_panic(RELOC("cpu failed to start")); */
}
} else {
}
#ifdef CONFIG_SMP
else {
prom_print_hex(cpuid);
prom_print(RELOC(" : booting cpu "));
prom_print(path);
......@@ -1066,6 +1070,7 @@ prom_hold_cpus(unsigned long mem)
}
prom_print_nl();
}
#endif
cpuid++;
}
#ifdef CONFIG_HMT
......
......@@ -194,6 +194,7 @@ void setup_system(unsigned long r3, unsigned long r4, unsigned long r5,
finish_device_tree();
chrp_init(r3, r4, r5, r6, r7);
#ifdef CONFIG_SMP
/* Start secondary threads on SMT systems */
for (i = 0; i < NR_CPUS; i++) {
if(cpu_available(i) && !cpu_possible(i)) {
......@@ -206,6 +207,7 @@ void setup_system(unsigned long r3, unsigned long r4, unsigned long r5,
systemcfg->processorCount++;
}
}
#endif
}
printk("Starting Linux PPC64 %s\n", UTS_RELEASE);
......@@ -226,9 +228,11 @@ void setup_system(unsigned long r3, unsigned long r4, unsigned long r5,
mm_init_ppc64();
#ifdef CONFIG_SMP
if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) {
vpa_init(boot_cpuid);
}
#endif
/* Select the correct idle loop for the platform. */
idle_setup();
......@@ -447,8 +451,7 @@ int parse_bootinfo(void)
memcpy(cmd_line, (void *)rec->data, rec->size);
break;
case BI_SYSMAP:
sysmap = (char *)((rec->data[0] >= (KERNELBASE))
? rec->data[0] : (unsigned long)__va(rec->data[0]));
sysmap = __va(rec->data[0]);
sysmap_size = rec->data[1];
break;
#ifdef CONFIG_BLK_DEV_INITRD
......
......@@ -60,6 +60,7 @@ cpumask_t cpu_available_map = CPU_MASK_NONE;
cpumask_t cpu_present_at_boot = CPU_MASK_NONE;
EXPORT_SYMBOL(cpu_online_map);
EXPORT_SYMBOL(cpu_possible_map);
static struct smp_ops_t *smp_ops;
......@@ -271,7 +272,8 @@ static void __init smp_space_timers(unsigned int max_cpus)
}
#ifdef CONFIG_PPC_PSERIES
void vpa_init(int cpu) {
void vpa_init(int cpu)
{
unsigned long flags;
/* Register the Virtual Processor Area (VPA) */
......
......@@ -22,12 +22,12 @@
#include <linux/cpumask.h>
#include <linux/kernel.h>
#ifdef CONFIG_SMP
#ifndef __ASSEMBLY__
#include <asm/paca.h>
#ifdef CONFIG_SMP
extern void smp_message_pass(int target, int msg, unsigned long data, int wait);
extern void smp_send_tlb_invalidate(int);
extern void smp_send_xmon_break(int cpu);
......@@ -69,9 +69,11 @@ extern cpumask_t cpu_available_map;
void smp_init_iSeries(void);
void smp_init_pSeries(void);
#endif /* __ASSEMBLY__ */
#endif /* !(CONFIG_SMP) */
#endif /* __ASSEMBLY__ */
#define get_hard_smp_processor_id(CPU) (paca[(CPU)].xHwProcNum)
#define set_hard_smp_processor_id(CPU, VAL) do { (paca[(CPU)].xHwProcNum = VAL); } while (0)
#endif /* !(_PPC64_SMP_H) */
#endif /* __KERNEL__ */
......@@ -131,6 +131,7 @@ extern void proc_tty_unregister_driver(struct tty_driver *driver);
/*
* proc_devtree.c
*/
struct device_node;
extern void proc_device_tree_init(void);
extern void proc_device_tree_add_node(struct device_node *, struct proc_dir_entry *);
......
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