[PATCH] powerpc: Move various ppc64 files with no ppc32 equivalent to powerpc
authorDavid Gibson <david@gibson.dropbear.id.au>
Wed, 9 Nov 2005 02:38:01 +0000 (13:38 +1100)
committerPaul Mackerras <paulus@samba.org>
Thu, 10 Nov 2005 00:24:04 +0000 (11:24 +1100)
This patch moves a bunch of files from arch/ppc64 and
include/asm-ppc64 which have no equivalents in ppc32 code into
arch/powerpc and include/asm-powerpc.  The file affected are:
abs_addr.h
compat.h
lppaca.h
paca.h
tce.h
cpu_setup_power4.S
ioctl32.c
firmware.c
pacaData.c

The only changes apart from the move and corresponding Makefile
changes are:
- #ifndef/#define in includes updated to _ASM_POWERPC_ form
- trailing whitespace removed
- comments giving full paths removed
- pacaData.c renamed paca.c to remove studlyCaps
- Misplaced { moved in lppaca.h

Built and booted on POWER5 LPAR (ARCH=powerpc and ARCH=ppc64), built
for 32-bit powermac (ARCH=powerpc).

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/Makefile
arch/powerpc/kernel/cpu_setup_power4.S [moved from arch/ppc64/kernel/cpu_setup_power4.S with 99% similarity]
arch/powerpc/kernel/firmware.c [moved from arch/ppc64/kernel/firmware.c with 97% similarity]
arch/powerpc/kernel/ioctl32.c [moved from arch/ppc64/kernel/ioctl32.c with 99% similarity]
arch/powerpc/kernel/paca.c [moved from arch/ppc64/kernel/pacaData.c with 99% similarity]
arch/ppc64/kernel/Makefile
include/asm-powerpc/abs_addr.h [moved from include/asm-ppc64/abs_addr.h with 94% similarity]
include/asm-powerpc/compat.h [moved from include/asm-ppc64/compat.h with 97% similarity]
include/asm-powerpc/lppaca.h [moved from include/asm-ppc64/lppaca.h with 98% similarity]
include/asm-powerpc/paca.h [moved from include/asm-ppc64/paca.h with 95% similarity]
include/asm-powerpc/tce.h [moved from include/asm-ppc64/tce.h with 96% similarity]

index b3ae299..103cb81 100644 (file)
@@ -4,6 +4,7 @@
 
 ifeq ($(CONFIG_PPC64),y)
 EXTRA_CFLAGS   += -mno-minimal-toc
+CFLAGS_ioctl32.o += -Ifs/
 endif
 ifeq ($(CONFIG_PPC32),y)
 CFLAGS_prom_init.o      += -fPIC
@@ -13,7 +14,9 @@ endif
 obj-y                          := semaphore.o cputable.o ptrace.o syscalls.o \
                                   signal_32.o pmc.o
 obj-$(CONFIG_PPC64)            += setup_64.o binfmt_elf32.o sys_ppc32.o \
-                                  signal_64.o ptrace32.o systbl.o
+                                  signal_64.o ptrace32.o systbl.o \
+                                  paca.o ioctl32.o cpu_setup_power4.o \
+                                  firmware.o
 obj-$(CONFIG_ALTIVEC)          += vecemu.o vector.o
 obj-$(CONFIG_POWER4)           += idle_power4.o
 obj-$(CONFIG_PPC_OF)           += of_device.o
similarity index 99%
rename from arch/ppc64/kernel/cpu_setup_power4.S
rename to arch/powerpc/kernel/cpu_setup_power4.S
index 1fb673c..cca942f 100644 (file)
@@ -114,11 +114,11 @@ _GLOBAL(__setup_cpu_ppc970)
 
        .data
        .balign L1_CACHE_BYTES,0
-cpu_state_storage:     
+cpu_state_storage:
        .space  CS_SIZE
        .balign L1_CACHE_BYTES,0
        .text
-       
+
 /* Called in normal context to backup CPU 0 state. This
  * does not include cache settings. This function is also
  * called for machine sleep. This does not include the MMU
@@ -151,7 +151,7 @@ _GLOBAL(__save_cpu_setup)
        std     r3,CS_HID4(r5)
        mfspr   r3,SPRN_HID5
        std     r3,CS_HID5(r5)
-       
+
 2:
        mtcr    r7
        blr
@@ -213,7 +213,7 @@ _GLOBAL(__restore_cpu_setup)
        mtspr   SPRN_HID1,r3
        sync
        isync
-       
+
        /* Restore HID4 */
        ld      r3,CS_HID4(r5)
        sync
similarity index 97%
rename from arch/ppc64/kernel/firmware.c
rename to arch/powerpc/kernel/firmware.c
index d8432c0..65eae75 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc64/kernel/firmware.c
- *
  *  Extracted from cputable.c
  *
  *  Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
similarity index 99%
rename from arch/ppc64/kernel/ioctl32.c
rename to arch/powerpc/kernel/ioctl32.c
index ba4a899..3fa6a93 100644 (file)
@@ -1,6 +1,6 @@
-/* 
+/*
  * ioctl32.c: Conversion between 32bit and 64bit native ioctls.
- * 
+ *
  * Based on sparc64 ioctl32.c by:
  *
  * Copyright (C) 1997-2000  Jakub Jelinek  (jakub@redhat.com)
similarity index 99%
rename from arch/ppc64/kernel/pacaData.c
rename to arch/powerpc/kernel/paca.c
index 3133c72..179948e 100644 (file)
@@ -32,7 +32,7 @@ EXPORT_SYMBOL(systemcfg);
  * field correctly */
 extern unsigned long __toc_start;
 
-/* The Paca is an array with one entry per processor.  Each contains an 
+/* The Paca is an array with one entry per processor.  Each contains an
  * lppaca, which contains the information shared between the
  * hypervisor and Linux.  Each also contains an ItLpRegSave area which
  * is used by the hypervisor to save registers.
index c441aeb..eb3187f 100644 (file)
@@ -12,11 +12,10 @@ obj-y               :=      misc.o prom.o
 endif
 
 obj-y               += irq.o idle.o dma.o \
-                       align.o pacaData.o \
-                       udbg.o ioctl32.o \
+                       align.o \
+                       udbg.o \
                        rtc.o \
-                       cpu_setup_power4.o \
-                       iommu.o sysfs.o vdso.o firmware.o
+                       iommu.o sysfs.o vdso.o
 obj-y += vdso32/ vdso64/
 
 pci-obj-$(CONFIG_PPC_MULTIPLATFORM)    += pci_dn.o pci_direct_iommu.o
@@ -52,8 +51,6 @@ obj-$(CONFIG_PPC_MAPLE)               += udbg_16550.o
 
 obj-$(CONFIG_KPROBES)          += kprobes.o
 
-CFLAGS_ioctl32.o += -Ifs/
-
 ifneq ($(CONFIG_PPC_MERGE),y)
 ifeq ($(CONFIG_PPC_ISERIES),y)
 arch/ppc64/kernel/head.o: arch/powerpc/kernel/lparmap.s
similarity index 94%
rename from include/asm-ppc64/abs_addr.h
rename to include/asm-powerpc/abs_addr.h
index dc3fc3f..1841510 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef _ABS_ADDR_H
-#define _ABS_ADDR_H
+#ifndef _ASM_POWERPC_ABS_ADDR_H
+#define _ASM_POWERPC_ABS_ADDR_H
 
 #include <linux/config.h>
 
@@ -70,4 +70,4 @@ static inline unsigned long phys_to_abs(unsigned long pa)
 #define iseries_hv_addr(virtaddr)      \
        (0x8000000000000000 | virt_to_abs(virtaddr))
 
-#endif /* _ABS_ADDR_H */
+#endif /* _ASM_POWERPC_ABS_ADDR_H */
similarity index 97%
rename from include/asm-ppc64/compat.h
rename to include/asm-powerpc/compat.h
index 6ec62cd..4db4360 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef _ASM_PPC64_COMPAT_H
-#define _ASM_PPC64_COMPAT_H
+#ifndef _ASM_POWERPC_COMPAT_H
+#define _ASM_POWERPC_COMPAT_H
 /*
  * Architecture specific compatibility types
  */
@@ -49,7 +49,7 @@ struct compat_stat {
        compat_dev_t    st_dev;
        compat_ino_t    st_ino;
        compat_mode_t   st_mode;
-       compat_nlink_t  st_nlink;       
+       compat_nlink_t  st_nlink;
        __compat_uid32_t        st_uid;
        __compat_gid32_t        st_gid;
        compat_dev_t    st_rdev;
@@ -202,4 +202,4 @@ struct compat_shmid64_ds {
        compat_ulong_t __unused6;
 };
 
-#endif /* _ASM_PPC64_COMPAT_H */
+#endif /* _ASM_POWERPC_COMPAT_H */
similarity index 98%
rename from include/asm-ppc64/lppaca.h
rename to include/asm-powerpc/lppaca.h
index 9e2a6c0..c1bedab 100644 (file)
@@ -16,8 +16,8 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
-#ifndef _ASM_LPPACA_H
-#define _ASM_LPPACA_H
+#ifndef _ASM_POWERPC_LPPACA_H
+#define _ASM_POWERPC_LPPACA_H
 
 //=============================================================================
 //
@@ -28,8 +28,7 @@
 //----------------------------------------------------------------------------
 #include <asm/types.h>
 
-struct lppaca
-{
+struct lppaca {
 //=============================================================================
 // CACHE_LINE_1 0x0000 - 0x007F Contains read-only data
 // NOTE: The xDynXyz fields are fields that will be dynamically changed by
@@ -129,4 +128,4 @@ struct lppaca
        u8      pmc_save_area[256];     // PMC interrupt Area           x00-xFF
 };
 
-#endif /* _ASM_LPPACA_H */
+#endif /* _ASM_POWERPC_LPPACA_H */
similarity index 95%
rename from include/asm-ppc64/paca.h
rename to include/asm-powerpc/paca.h
index bccacd6..92c765c 100644 (file)
@@ -1,11 +1,8 @@
-#ifndef _PPC64_PACA_H
-#define _PPC64_PACA_H
-
 /*
- * include/asm-ppc64/paca.h
+ * include/asm-powerpc/paca.h
  *
- * This control block defines the PACA which defines the processor 
- * specific data for each logical processor on the system.  
+ * This control block defines the PACA which defines the processor
+ * specific data for each logical processor on the system.
  * There are some pointers defined that are utilized by PLIC.
  *
  * C 2001 PPC 64 Team, IBM Corp
@@ -14,7 +11,9 @@
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version
  * 2 of the License, or (at your option) any later version.
- */    
+ */
+#ifndef _ASM_POWERPC_PACA_H
+#define _ASM_POWERPC_PACA_H
 
 #include       <linux/config.h>
 #include       <asm/types.h>
@@ -118,4 +117,4 @@ struct paca_struct {
 
 extern struct paca_struct paca[];
 
-#endif /* _PPC64_PACA_H */
+#endif /* _ASM_POWERPC_PACA_H */
similarity index 96%
rename from include/asm-ppc64/tce.h
rename to include/asm-powerpc/tce.h
index d40b6b4..d099d52 100644 (file)
@@ -18,8 +18,8 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
 
-#ifndef _ASM_TCE_H
-#define _ASM_TCE_H
+#ifndef _ASM_POWERPC_TCE_H
+#define _ASM_POWERPC_TCE_H
 
 /*
  * Tces come in two formats, one for the virtual bus and a different
@@ -61,4 +61,4 @@ union tce_entry {
 };
 
 
-#endif
+#endif /* _ASM_POWERPC_TCE_H */