Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] powerpc: Move udbg code to arch/powerpc

Since the udbg code in ppc64 has no ppc32 equivalent, move it straight
over into arch/powerpc (and include/asm-powerpc for udbg.h). In time,
we probably want to meld the various bits and pieces of 32-bit early
debugging code into udbg, but for now only include it on
CONFIG_PPC64=y builds. The only change during the move is to
standardise the protecting #ifdef/#define in udbg.h, and move its
banner comment above the initial #ifdef (which seems to be normal
practice).

Built and booted on POWER5 LPAR (ARCH=powerpc and ARCH=ppc64). Built
for 32bit multiplatform (ARCH=powerpc).

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>

authored by

David Gibson and committed by
Paul Mackerras
35cd8785 a7df61a0

+12 -15
+5 -1
arch/powerpc/kernel/Makefile
··· 16 16 obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \ 17 17 signal_64.o ptrace32.o systbl.o \ 18 18 paca.o ioctl32.o cpu_setup_power4.o \ 19 - firmware.o sysfs.o 19 + firmware.o sysfs.o udbg.o 20 20 obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o 21 21 obj-$(CONFIG_POWER4) += idle_power4.o 22 22 obj-$(CONFIG_PPC_OF) += of_device.o ··· 29 29 obj-$(CONFIG_LPARCFG) += lparcfg.o 30 30 obj-$(CONFIG_IBMVIO) += vio.o 31 31 obj-$(CONFIG_GENERIC_TBSYNC) += smp-tbsync.o 32 + obj-$(CONFIG_PPC_PSERIES) += udbg_16550.o 33 + obj-$(CONFIG_PPC_MAPLE) += udbg_16550.o 34 + udbgscc-$(CONFIG_PPC64) := udbg_scc.o 35 + obj-$(CONFIG_PPC_PMAC) += $(udbgscc-y) 32 36 33 37 ifeq ($(CONFIG_PPC_MERGE),y) 34 38
-7
arch/ppc64/kernel/Makefile
··· 13 13 14 14 obj-y += idle.o dma.o \ 15 15 align.o \ 16 - udbg.o \ 17 16 rtc.o \ 18 17 iommu.o vdso.o 19 18 obj-y += vdso32/ vdso64/ ··· 26 27 obj-$(CONFIG_PPC_MULTIPLATFORM) += prom_init.o 27 28 endif 28 29 29 - obj-$(CONFIG_PPC_PSERIES) += udbg_16550.o 30 - 31 30 obj-$(CONFIG_KEXEC) += machine_kexec.o 32 31 obj-$(CONFIG_MODULES) += module.o 33 32 ifneq ($(CONFIG_PPC_MERGE),y) ··· 36 39 obj-$(CONFIG_BOOTX_TEXT) += btext.o 37 40 endif 38 41 obj-$(CONFIG_HVCS) += hvcserver.o 39 - 40 - obj-$(CONFIG_PPC_PMAC) += udbg_scc.o 41 - 42 - obj-$(CONFIG_PPC_MAPLE) += udbg_16550.o 43 42 44 43 obj-$(CONFIG_KPROBES) += kprobes.o 45 44
arch/ppc64/kernel/udbg.c arch/powerpc/kernel/udbg.c
arch/ppc64/kernel/udbg_16550.c arch/powerpc/kernel/udbg_16550.c
arch/ppc64/kernel/udbg_scc.c arch/powerpc/kernel/udbg_scc.c
+7 -7
include/asm-ppc64/udbg.h include/asm-powerpc/udbg.h
··· 1 - #ifndef __UDBG_HDR 2 - #define __UDBG_HDR 3 - 4 - #include <linux/compiler.h> 5 - #include <linux/init.h> 6 - 7 1 /* 8 2 * c 2001 PPC 64 Team, IBM Corp 9 3 * ··· 6 12 * as published by the Free Software Foundation; either version 7 13 * 2 of the License, or (at your option) any later version. 8 14 */ 15 + 16 + #ifndef _ASM_POWERPC_UDBG_H 17 + #define _ASM_POWERPC_UDBG_H 18 + 19 + #include <linux/compiler.h> 20 + #include <linux/init.h> 9 21 10 22 extern void (*udbg_putc)(unsigned char c); 11 23 extern unsigned char (*udbg_getc)(void); ··· 28 28 29 29 struct device_node; 30 30 extern void udbg_init_scc(struct device_node *np); 31 - #endif 31 + #endif /* _ASM_POWERPC_UDBG_H */