You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
ppc: Various minor compile fixes
This fixes up a variety of minor problems in compiling with ARCH=ppc arising from using the merged versions of various header files. A lot of the changes are just adding #include <asm/machdep.h> to files that use ppc_md or smp_ops_t. This also arranges for us to use semaphore.c, vecemu.c, vector.S and fpu.S from arch/powerpc/kernel when compiling with ARCH=ppc. Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
@@ -10,7 +10,7 @@ CFLAGS_prom_init.o += -fPIC
|
||||
CFLAGS_btext.o += -fPIC
|
||||
endif
|
||||
|
||||
obj-y := semaphore.o traps.o
|
||||
obj-y := semaphore.o
|
||||
obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o
|
||||
obj-$(CONFIG_POWER4) += idle_power4.o
|
||||
|
||||
@@ -28,7 +28,7 @@ extra-$(CONFIG_PPC_FPU) += fpu.o
|
||||
extra-y += vmlinux.lds
|
||||
|
||||
obj-y += process.o init_task.o \
|
||||
prom.o systbl.o
|
||||
prom.o systbl.o traps.o
|
||||
obj-$(CONFIG_PPC32) += entry_32.o setup_32.o misc_32.o
|
||||
obj-$(CONFIG_PPC64) += setup_64.o misc_64.o
|
||||
obj-$(CONFIG_PPC_OF) += prom_init.o of_device.o
|
||||
@@ -39,4 +39,12 @@ ifeq ($(CONFIG_PPC_ISERIES),y)
|
||||
$(obj)/head_64.o: $(obj)/lparmap.s
|
||||
AFLAGS_head_64.o += -I$(obj)
|
||||
endif
|
||||
|
||||
else
|
||||
# stuff used from here for ARCH=ppc or ARCH=ppc64
|
||||
obj-$(CONFIG_PPC64) += traps.o
|
||||
|
||||
fpux-$(CONFIG_PPC32) += fpu.o
|
||||
extra-$(CONFIG_PPC_FPU) += $(fpux-y)
|
||||
|
||||
endif
|
||||
|
||||
@@ -252,6 +252,7 @@ int main(void)
|
||||
DEFINE(pbe_orig_address, offsetof(struct pbe, orig_address));
|
||||
DEFINE(pbe_next, offsetof(struct pbe, next));
|
||||
|
||||
DEFINE(TASK_SIZE, TASK_SIZE);
|
||||
DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28);
|
||||
#else /* CONFIG_PPC64 */
|
||||
/* systemcfg offsets for use by vdso */
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
# empty makefile so make clean works
|
||||
@@ -0,0 +1 @@
|
||||
# empty makefile so make clean works
|
||||
+3
-2
@@ -57,9 +57,10 @@ head-$(CONFIG_FSL_BOOKE) := arch/ppc/kernel/head_fsl_booke.o
|
||||
|
||||
head-$(CONFIG_6xx) += arch/ppc/kernel/idle_6xx.o
|
||||
head-$(CONFIG_POWER4) += arch/ppc/kernel/idle_power4.o
|
||||
head-$(CONFIG_PPC_FPU) += arch/ppc/kernel/fpu.o
|
||||
head-$(CONFIG_PPC_FPU) += arch/powerpc/kernel/fpu.o
|
||||
|
||||
core-y += arch/ppc/kernel/ arch/ppc/platforms/ \
|
||||
core-y += arch/ppc/kernel/ arch/powerpc/kernel/ \
|
||||
arch/ppc/platforms/ \
|
||||
arch/ppc/mm/ arch/ppc/lib/ arch/ppc/syslib/
|
||||
core-$(CONFIG_4xx) += arch/ppc/platforms/4xx/
|
||||
core-$(CONFIG_83xx) += arch/ppc/platforms/83xx/
|
||||
|
||||
@@ -10,12 +10,11 @@ extra-$(CONFIG_FSL_BOOKE) := head_fsl_booke.o
|
||||
extra-$(CONFIG_8xx) := head_8xx.o
|
||||
extra-$(CONFIG_6xx) += idle_6xx.o
|
||||
extra-$(CONFIG_POWER4) += idle_power4.o
|
||||
extra-$(CONFIG_PPC_FPU) += fpu.o
|
||||
extra-y += vmlinux.lds
|
||||
|
||||
obj-y := entry.o traps.o irq.o idle.o time.o misc.o \
|
||||
process.o signal.o ptrace.o align.o \
|
||||
semaphore.o syscalls.o setup.o \
|
||||
syscalls.o setup.o \
|
||||
cputable.o ppc_htab.o perfmon.o
|
||||
obj-$(CONFIG_6xx) += l2cr.o cpu_setup_6xx.o
|
||||
obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o
|
||||
@@ -26,7 +25,6 @@ obj-$(CONFIG_PCI) += pci.o
|
||||
obj-$(CONFIG_KGDB) += ppc-stub.o
|
||||
obj-$(CONFIG_SMP) += smp.o smp-tbsync.o
|
||||
obj-$(CONFIG_TAU) += temp.o
|
||||
obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o
|
||||
ifndef CONFIG_E200
|
||||
obj-$(CONFIG_FSL_BOOKE) += perfmon_fsl_booke.o
|
||||
endif
|
||||
@@ -37,9 +35,6 @@ obj-$(CONFIG_8xx) += softemu8xx.o
|
||||
endif
|
||||
|
||||
# These are here while we do the architecture merge
|
||||
vecemu-y += ../../powerpc/kernel/vecemu.o
|
||||
vector-y += ../../powerpc/kernel/vector.o
|
||||
fpu-y += ../../powerpc/kernel/fpu.o
|
||||
|
||||
else
|
||||
obj-y := irq.o idle.o time.o \
|
||||
|
||||
@@ -141,6 +141,7 @@ main(void)
|
||||
DEFINE(pbe_orig_address, offsetof(struct pbe, orig_address));
|
||||
DEFINE(pbe_next, offsetof(struct pbe, next));
|
||||
|
||||
DEFINE(TASK_SIZE, TASK_SIZE);
|
||||
DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -467,7 +467,7 @@ FPUnavailable:
|
||||
EXCEPTION_PROLOG
|
||||
bne load_up_fpu /* if from user, just load it up */
|
||||
addi r3,r1,STACK_FRAME_OVERHEAD
|
||||
EXC_XFER_EE_LITE(0x800, KernelFP)
|
||||
EXC_XFER_EE_LITE(0x800, kernel_fp_unavailable_exception)
|
||||
|
||||
/* Decrementer */
|
||||
EXCEPTION(0x900, Decrementer, timer_interrupt, EXC_XFER_LITE)
|
||||
|
||||
@@ -1034,6 +1034,10 @@ static ssize_t pci_show_devspec(struct device *dev, struct device_attribute *att
|
||||
}
|
||||
static DEVICE_ATTR(devspec, S_IRUGO, pci_show_devspec, NULL);
|
||||
|
||||
#else /* CONFIG_PPC_OF */
|
||||
void pcibios_make_OF_bus_map(void)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_PPC_OF */
|
||||
|
||||
/* Add sysfs properties */
|
||||
|
||||
@@ -557,14 +557,16 @@ int sys_clone(unsigned long clone_flags, unsigned long usp,
|
||||
return do_fork(clone_flags, usp, regs, 0, parent_tidp, child_tidp);
|
||||
}
|
||||
|
||||
int sys_fork(int p1, int p2, int p3, int p4, int p5, int p6,
|
||||
int sys_fork(unsigned long p1, unsigned long p2, unsigned long p3,
|
||||
unsigned long p4, unsigned long p5, unsigned long p6,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
CHECK_FULL_REGS(regs);
|
||||
return do_fork(SIGCHLD, regs->gpr[1], regs, 0, NULL, NULL);
|
||||
}
|
||||
|
||||
int sys_vfork(int p1, int p2, int p3, int p4, int p5, int p6,
|
||||
int sys_vfork(unsigned long p1, unsigned long p2, unsigned long p3,
|
||||
unsigned long p4, unsigned long p5, unsigned long p6,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
CHECK_FULL_REGS(regs);
|
||||
|
||||
@@ -87,6 +87,9 @@ extern void chrp_init(unsigned long r3, unsigned long r4,
|
||||
dev_t boot_dev;
|
||||
#endif /* CONFIG_PPC_MULTIPLATFORM */
|
||||
|
||||
int have_of;
|
||||
EXPORT_SYMBOL(have_of);
|
||||
|
||||
#ifdef __DO_IRQ_CANON
|
||||
int ppc_do_canonicalize_irqs;
|
||||
EXPORT_SYMBOL(ppc_do_canonicalize_irqs);
|
||||
@@ -420,6 +423,8 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
|
||||
}
|
||||
#endif
|
||||
|
||||
have_of = 1;
|
||||
|
||||
/* prom_init has already been called from __start */
|
||||
if (boot_infos)
|
||||
relocate_nodes();
|
||||
@@ -735,7 +740,7 @@ void __init setup_arch(char **cmdline_p)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_XMON
|
||||
xmon_map_scc();
|
||||
xmon_init(1);
|
||||
if (strstr(cmd_line, "xmon"))
|
||||
xmon(NULL);
|
||||
#endif /* CONFIG_XMON */
|
||||
|
||||
@@ -44,6 +44,11 @@
|
||||
#include <asm/perfmon.h>
|
||||
|
||||
#ifdef CONFIG_XMON
|
||||
extern int xmon_bpt(struct pt_regs *regs);
|
||||
extern int xmon_sstep(struct pt_regs *regs);
|
||||
extern int xmon_iabr_match(struct pt_regs *regs);
|
||||
extern int xmon_dabr_match(struct pt_regs *regs);
|
||||
|
||||
void (*debugger)(struct pt_regs *regs) = xmon;
|
||||
int (*debugger_bpt)(struct pt_regs *regs) = xmon_bpt;
|
||||
int (*debugger_sstep)(struct pt_regs *regs) = xmon_sstep;
|
||||
@@ -814,6 +819,17 @@ void TAUException(struct pt_regs *regs)
|
||||
}
|
||||
#endif /* CONFIG_INT_TAU */
|
||||
|
||||
/*
|
||||
* FP unavailable trap from kernel - print a message, but let
|
||||
* the task use FP in the kernel until it returns to user mode.
|
||||
*/
|
||||
void kernel_fp_unavailable_exception(struct pt_regs *regs)
|
||||
{
|
||||
regs->msr |= MSR_FP;
|
||||
printk(KERN_ERR "floating point used in kernel (task=%p, pc=%lx)\n",
|
||||
current, regs->nip);
|
||||
}
|
||||
|
||||
void altivec_unavailable_exception(struct pt_regs *regs)
|
||||
{
|
||||
static int kernel_altivec_count;
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <asm/residual.h>
|
||||
#include <asm/time.h>
|
||||
#include <asm/open_pic.h>
|
||||
#include <asm/machdep.h>
|
||||
|
||||
extern unsigned long smp_chrp_cpu_nr;
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/ppcboot.h>
|
||||
#include <asm/mv64x60.h>
|
||||
#include <asm/machdep.h>
|
||||
#include <platforms/ev64360.h>
|
||||
|
||||
#define BOARD_VENDOR "Marvell"
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <asm/time.h>
|
||||
#include <asm/open_pic.h>
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/machdep.h>
|
||||
|
||||
void gemini_find_bridges(void);
|
||||
static int gemini_get_clock_speed(void);
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <asm/ppcboot.h>
|
||||
#include <asm/mv64x60.h>
|
||||
#include <platforms/katana.h>
|
||||
#include <asm/machdep.h>
|
||||
|
||||
static struct mv64x60_handle bh;
|
||||
static katana_id_t katana_id;
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <asm/io.h>
|
||||
#include <asm/mpc52xx.h>
|
||||
#include <asm/ppc_sys.h>
|
||||
#include <asm/machdep.h>
|
||||
|
||||
#include <syslib/mpc52xx_pci.h>
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <asm/io.h>
|
||||
#include <asm/todc.h>
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/machdep.h>
|
||||
|
||||
#include <syslib/cpc700.h>
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <asm/open_pic.h>
|
||||
#include <asm/xmon.h>
|
||||
#include <asm/pmac_feature.h>
|
||||
#include <asm/machdep.h>
|
||||
|
||||
#include "pmac_pic.h"
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include <asm/system.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/mv64x60.h>
|
||||
#include <asm/machdep.h>
|
||||
|
||||
#define CPU_INTR_STR "gt64260 cpu interface error"
|
||||
#define PCI0_INTR_STR "gt64260 pci 0 error"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user