Skip to content

Commit

Permalink
powerpc: Various UP build fixes
Browse files Browse the repository at this point in the history
Mostly this involves adding #include <asm/smp.h>, since that defines
things like boot_cpuid[_phys] and [gs]et_hard_smp_processor_id, which
are SMP-related but still needed on UP.  This incorporates fixes
posted by Olof Johansson and Heikki Lindholm.

Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Paul Mackerras committed Nov 7, 2005
1 parent dcad47f commit 2249ca9
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 7 deletions.
2 changes: 0 additions & 2 deletions arch/powerpc/kernel/rtas.c
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,6 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs)
return 0;
}

#ifdef CONFIG_SMP
/* This version can't take the spinlock, because it never returns */

struct rtas_args rtas_stop_self_args = {
Expand All @@ -633,7 +632,6 @@ void rtas_stop_self(void)

panic("Alas, I survived.\n");
}
#endif

/*
* Call early during boot, before mem init or bootmem, to retreive the RTAS
Expand Down
5 changes: 1 addition & 4 deletions arch/powerpc/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
#include <asm/prom.h>
#include <asm/irq.h>
#include <asm/div64.h>
#include <asm/smp.h>
#ifdef CONFIG_PPC64
#include <asm/systemcfg.h>
#include <asm/firmware.h>
Expand Down Expand Up @@ -118,10 +119,6 @@ static unsigned adjusting_time = 0;
unsigned long ppc_proc_freq;
unsigned long ppc_tb_freq;

#ifdef CONFIG_PPC32 /* XXX for now */
#define boot_cpuid 0
#endif

u64 tb_last_jiffy __cacheline_aligned_in_smp;
unsigned long tb_last_stamp;

Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/lib/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#if defined(CONFIG_PPC_SPLPAR) || defined(CONFIG_PPC_ISERIES)
#include <asm/hvcall.h>
#include <asm/iseries/hv_call.h>
#include <asm/smp.h>

void __spin_yield(raw_spinlock_t *lock)
{
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/mm/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <asm/machdep.h>
#include <asm/abs_addr.h>
#include <asm/system.h>
#include <asm/smp.h>

static int numa_enabled = 1;

Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/platforms/pseries/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include <asm/firmware.h>
#include <asm/tce.h>
#include <asm/ppc-pci.h>
#include <asm/udbg.h>

#include "plpar_wrappers.h"

Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/platforms/pseries/lpar.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <asm/abs_addr.h>
#include <asm/cputable.h>
#include <asm/udbg.h>
#include <asm/smp.h>

#include "plpar_wrappers.h"

Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/platforms/pseries/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
#include <asm/ppc-pci.h>
#include <asm/i8259.h>
#include <asm/udbg.h>
#include <asm/smp.h>

#include "plpar_wrappers.h"

Expand Down
1 change: 1 addition & 0 deletions arch/ppc64/kernel/idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <asm/time.h>
#include <asm/systemcfg.h>
#include <asm/machdep.h>
#include <asm/smp.h>

extern void power4_idle(void);

Expand Down
1 change: 1 addition & 0 deletions arch/ppc64/kernel/machine_kexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <asm/mmu.h>
#include <asm/sections.h> /* _end */
#include <asm/prom.h>
#include <asm/smp.h>

#define HASH_GROUP_SIZE 0x80 /* size of each hash group, asm/mmu.h */

Expand Down
1 change: 1 addition & 0 deletions arch/ppc64/kernel/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <asm/paca.h>
#include <asm/lppaca.h>
#include <asm/machdep.h>
#include <asm/smp.h>

static DEFINE_PER_CPU(struct cpu, cpu_devices);

Expand Down
4 changes: 3 additions & 1 deletion include/asm-powerpc/smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,16 @@ extern void __cpu_die(unsigned int cpu);
#else
/* for UP */
#define smp_setup_cpu_maps()
#define smp_release_cpus()

#endif /* CONFIG_SMP */

#ifdef CONFIG_PPC64
#define get_hard_smp_processor_id(CPU) (paca[(CPU)].hw_cpu_id)
#define set_hard_smp_processor_id(CPU, VAL) \
do { (paca[(CPU)].hw_cpu_id = (VAL)); } while (0)

extern void smp_release_cpus(void);

#else
/* 32-bit */
#ifndef CONFIG_SMP
Expand Down

0 comments on commit 2249ca9

Please sign in to comment.