]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge git://oak/home/sfr/kernels/iseries/work
authorPaul Mackerras <paulus@samba.org>
Thu, 10 Nov 2005 04:54:00 +0000 (15:54 +1100)
committerPaul Mackerras <paulus@samba.org>
Thu, 10 Nov 2005 04:54:00 +0000 (15:54 +1100)
22 files changed:
arch/powerpc/kernel/Makefile
arch/powerpc/kernel/lparcfg.c [moved from arch/ppc64/kernel/lparcfg.c with 99% similarity]
arch/powerpc/kernel/proc_ppc64.c [moved from arch/ppc64/kernel/proc_ppc64.c with 98% similarity]
arch/powerpc/kernel/prom.c
arch/powerpc/kernel/rtas_pci.c [moved from arch/ppc64/kernel/rtas_pci.c with 100% similarity]
arch/powerpc/kernel/setup-common.c
arch/powerpc/kernel/setup_32.c
arch/powerpc/kernel/setup_64.c
arch/powerpc/kernel/sysfs.c [moved from arch/ppc64/kernel/sysfs.c with 99% similarity]
arch/powerpc/mm/init_32.c
arch/powerpc/mm/init_64.c
arch/powerpc/platforms/iseries/setup.c
arch/powerpc/platforms/maple/pci.c
arch/powerpc/platforms/powermac/pci.c
arch/powerpc/platforms/pseries/pci.c
arch/powerpc/sysdev/u3_iommu.c
arch/ppc64/kernel/Makefile
arch/ppc64/kernel/pci.c
include/asm-powerpc/hvcall.h [moved from include/asm-ppc64/hvcall.h with 97% similarity]
include/asm-powerpc/system.h
include/asm-ppc64/mmu.h
include/asm-ppc64/pgalloc.h

index 92cfabf929bc73ac2a01192363b6631a2f8458d0..c04bbd320594e6c032ecf75a814a5325908e05f5 100644 (file)
@@ -16,13 +16,17 @@ obj-y                               := semaphore.o cputable.o ptrace.o syscalls.o \
 obj-$(CONFIG_PPC64)            += setup_64.o binfmt_elf32.o sys_ppc32.o \
                                   signal_64.o ptrace32.o systbl.o \
                                   paca.o ioctl32.o cpu_setup_power4.o \
-                                  firmware.o
+                                  firmware.o sysfs.o
 obj-$(CONFIG_ALTIVEC)          += vecemu.o vector.o
 obj-$(CONFIG_POWER4)           += idle_power4.o
 obj-$(CONFIG_PPC_OF)           += of_device.o
-obj-$(CONFIG_PPC_RTAS)         += rtas.o
+procfs-$(CONFIG_PPC64)         := proc_ppc64.o
+obj-$(CONFIG_PROC_FS)          += $(procfs-y)
+rtaspci-$(CONFIG_PPC64)                := rtas_pci.o
+obj-$(CONFIG_PPC_RTAS)         += rtas.o $(rtaspci-y)
 obj-$(CONFIG_RTAS_FLASH)       += rtas_flash.o
 obj-$(CONFIG_RTAS_PROC)                += rtas-proc.o
+obj-$(CONFIG_LPARCFG)          += lparcfg.o
 obj-$(CONFIG_IBMVIO)           += vio.o
 obj-$(CONFIG_GENERIC_TBSYNC)   += smp-tbsync.o
 
similarity index 99%
rename from arch/ppc64/kernel/lparcfg.c
rename to arch/powerpc/kernel/lparcfg.c
index a80ed307515c12dc045377c0670f0f1528f1fae0..5e954fae031f9d9a0e62a83cf399408ff43e4da1 100644 (file)
@@ -97,7 +97,7 @@ static unsigned long get_purr(void)
 
 #define lparcfg_write NULL
 
-/* 
+/*
  * Methods used to fetch LPAR data when running on an iSeries platform.
  */
 static int lparcfg_data(struct seq_file *m, void *v)
@@ -169,7 +169,7 @@ static int lparcfg_data(struct seq_file *m, void *v)
 #endif                         /* CONFIG_PPC_ISERIES */
 
 #ifdef CONFIG_PPC_PSERIES
-/* 
+/*
  * Methods used to fetch LPAR data when running on a pSeries platform.
  */
 
@@ -178,7 +178,7 @@ static int lparcfg_data(struct seq_file *m, void *v)
  *  entitled_capacity,unallocated_capacity,
  *  aggregation, resource_capability).
  *
- *  R4 = Entitled Processor Capacity Percentage. 
+ *  R4 = Entitled Processor Capacity Percentage.
  *  R5 = Unallocated Processor Capacity Percentage.
  *  R6 (AABBCCDDEEFFGGHH).
  *      XXXX - reserved (0)
@@ -191,7 +191,7 @@ static int lparcfg_data(struct seq_file *m, void *v)
  *          XX - variable processor Capacity Weight
  *            XX - Unallocated Variable Processor Capacity Weight.
  *              XXXX - Active processors in Physical Processor Pool.
- *                  XXXX  - Processors active on platform. 
+ *                  XXXX  - Processors active on platform.
  */
 static unsigned int h_get_ppp(unsigned long *entitled,
                              unsigned long *unallocated,
@@ -274,7 +274,7 @@ static void parse_system_parameter_string(struct seq_file *m)
                if (!workbuffer) {
                        printk(KERN_ERR "%s %s kmalloc failure at line %d \n",
                               __FILE__, __FUNCTION__, __LINE__);
-                       kfree(local_buffer);                    
+                       kfree(local_buffer);
                        return;
                }
 #ifdef LPARCFG_DEBUG
similarity index 98%
rename from arch/ppc64/kernel/proc_ppc64.c
rename to arch/powerpc/kernel/proc_ppc64.c
index c893a11ee198c108689a99a8bc63a90f13db4de7..a1c19502fe8bb9f96e35261a97d87e95add7c919 100644 (file)
@@ -1,18 +1,16 @@
 /*
- * arch/ppc64/kernel/proc_ppc64.c
- *
  * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen IBM Corporation
- * 
+ *
  * This program is free software; you can redistribute it and/or 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.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
index fd3bcb4a9e9f9ee0378c654888e7afe83861e451..6a5b468edb4d2e8021d6fc07807e3a4a6cb8fbb6 100644 (file)
@@ -71,10 +71,6 @@ struct isa_reg_property {
 typedef int interpret_func(struct device_node *, unsigned long *,
                           int, int, int);
 
-extern struct rtas_t rtas;
-extern struct lmb lmb;
-extern unsigned long klimit;
-
 static int __initdata dt_root_addr_cells;
 static int __initdata dt_root_size_cells;
 
index 06e4ef2156270c47fa76d0d1eb8932420480cc34..bae4bff138f1ebe3e1fdb02924026713b0399b80 100644 (file)
@@ -69,6 +69,8 @@ int _machine = 0;
 EXPORT_SYMBOL(_machine);
 #endif
 
+unsigned long klimit = (unsigned long) _end;
+
 /*
  * This still seems to be needed... -- paulus
  */ 
index f73d7681b2e958470f63ade98782e2b4baca80c0..c98cfcc9cd9a9183f5dbe9f3b7fe4c527642ace1 100644 (file)
@@ -279,7 +279,6 @@ arch_initcall(ppc_init);
 /* Warning, IO base is not yet inited */
 void __init setup_arch(char **cmdline_p)
 {
-       extern char *klimit;
        extern void do_init_bootmem(void);
 
        /* so udelay does something sensible, assume <= 1000 bogomips */
@@ -338,7 +337,7 @@ void __init setup_arch(char **cmdline_p)
        init_mm.start_code = PAGE_OFFSET;
        init_mm.end_code = (unsigned long) _etext;
        init_mm.end_data = (unsigned long) _edata;
-       init_mm.brk = (unsigned long) klimit;
+       init_mm.brk = klimit;
 
        /* Save unparsed command line copy for /proc/cmdline */
        strlcpy(saved_command_line, cmd_line, COMMAND_LINE_SIZE);
index be607b877a55e889614eb598eb8d1f00c1e2a748..6791668213e75997ba229544d7b421a5cfe1bc6f 100644 (file)
@@ -96,14 +96,6 @@ extern void udbg_init_maple_realmode(void);
        do { udbg_putc = call_rtas_display_status_delay; } while(0)
 #endif
 
-/* extern void *stab; */
-extern unsigned long klimit;
-
-extern void mm_init_ppc64(void);
-extern void early_init_devtree(void *flat_dt);
-extern void unflatten_device_tree(void);
-extern void check_for_initrd(void);
-
 int have_of = 1;
 int boot_cpuid = 0;
 int boot_cpuid_phys = 0;
similarity index 99%
rename from arch/ppc64/kernel/sysfs.c
rename to arch/powerpc/kernel/sysfs.c
index e99ec62c2c52abba20b1e4f36da62e70f4d925bc..850af198fb5f6eb2f5636da7e3f1344cc0d592c3 100644 (file)
@@ -232,7 +232,7 @@ static void register_cpu_online(unsigned int cpu)
                sysdev_create_file(s, &attr_pmc7);
        if (cur_cpu_spec->num_pmcs >= 8)
                sysdev_create_file(s, &attr_pmc8);
-  
+
        if (cpu_has_feature(CPU_FTR_SMT))
                sysdev_create_file(s, &attr_purr);
 }
index 4612a79dfb6e675058461d55a3bf048973961446..7d4b8b5f06063cdf41e1fe56c06fe207974d22a8 100644 (file)
@@ -84,9 +84,6 @@ void MMU_init(void);
 /* XXX should be in current.h  -- paulus */
 extern struct task_struct *current_set[NR_CPUS];
 
-char *klimit = _end;
-struct device_node *memory_node;
-
 extern int init_bootmem_done;
 
 /*
index ce974c83d88a6f1decd8341ccf92fbf253133c37..1134f70f231d43bc57d61cd208d791a34f0e4fbd 100644 (file)
@@ -20,6 +20,8 @@
  *
  */
 
+#undef DEBUG
+
 #include <linux/config.h>
 #include <linux/signal.h>
 #include <linux/sched.h>
 #include <asm/vdso.h>
 #include <asm/imalloc.h>
 
+#ifdef DEBUG
+#define DBG(fmt...) printk(fmt)
+#else
+#define DBG(fmt...)
+#endif
+
 #if PGTABLE_RANGE > USER_VSID_RANGE
 #warning Limited user VSID range means pagetable space is wasted
 #endif
@@ -72,8 +80,6 @@
 #warning TASK_SIZE is smaller than it needs to be.
 #endif
 
-unsigned long klimit = (unsigned long)_end;
-
 /* max amount of RAM to use */
 unsigned long __max_memory;
 
@@ -188,14 +194,14 @@ static void zero_ctor(void *addr, kmem_cache_t *cache, unsigned long flags)
 }
 
 #ifdef CONFIG_PPC_64K_PAGES
-static const int pgtable_cache_size[2] = {
-       PTE_TABLE_SIZE, PGD_TABLE_SIZE
+static const unsigned int pgtable_cache_size[3] = {
+       PTE_TABLE_SIZE, PMD_TABLE_SIZE, PGD_TABLE_SIZE
 };
 static const char *pgtable_cache_name[ARRAY_SIZE(pgtable_cache_size)] = {
-       "pte_pmd_cache", "pgd_cache",
+       "pte_pmd_cache", "pmd_cache", "pgd_cache",
 };
 #else
-static const int pgtable_cache_size[2] = {
+static const unsigned int pgtable_cache_size[2] = {
        PTE_TABLE_SIZE, PMD_TABLE_SIZE
 };
 static const char *pgtable_cache_name[ARRAY_SIZE(pgtable_cache_size)] = {
@@ -213,6 +219,8 @@ void pgtable_cache_init(void)
                int size = pgtable_cache_size[i];
                const char *name = pgtable_cache_name[i];
 
+               DBG("Allocating page table cache %s (#%d) "
+                   "for size: %08x...\n", name, i, size);
                pgtable_cache[i] = kmem_cache_create(name,
                                                     size, size,
                                                     SLAB_HWCACHE_ALIGN |
index 19b415f6e5d51f2bca89b5ae0d8cf60aa2e263ad..6a29f301436b305b8d11d850babc0eefc31952ec 100644 (file)
@@ -40,7 +40,7 @@
 #include <asm/iommu.h>
 #include <asm/firmware.h>
 #include <asm/systemcfg.h>
-
+#include <asm/system.h>
 #include <asm/time.h>
 #include <asm/paca.h>
 #include <asm/cache.h>
@@ -85,7 +85,6 @@ static void iSeries_pci_final_fixup(void) { }
 int piranha_simulator;
 
 extern int rd_size;            /* Defined in drivers/block/rd.c */
-extern unsigned long klimit;
 extern unsigned long embedded_sysmap_start;
 extern unsigned long embedded_sysmap_end;
 
index 340c21caeae24cc03b1a12df50bda25a3fe9bc4a..895aeb3f75d0d73b6ddf94b370eaec93be0be604 100644 (file)
@@ -380,9 +380,6 @@ void __init maple_pcibios_fixup(void)
        for_each_pci_dev(dev)
                pci_read_irq_line(dev);
 
-       /* Do the mapping of the IO space */
-       phbs_remap_io();
-
        DBG(" <- maple_pcibios_fixup\n");
 }
 
index 8f818d092e2bbe20566cf0b049c98f086979651f..dfd41b9781a9a9df37dbeac71d3c8d18e5510404 100644 (file)
@@ -918,9 +918,6 @@ void __init pmac_pci_init(void)
                        PCI_DN(np)->busno = 0xf0;
        }
 
-       /* map in PCI I/O space */
-       phbs_remap_io();
-
        /* pmac_check_ht_link(); */
 
        /* Tell pci.c to not use the common resource allocation mechanism */
index 6b0772f3569266b0e0f43bfc5ce4520270ea637b..999a9620b5ce0f13f89cc08a8d75895ca46cad97 100644 (file)
@@ -107,7 +107,6 @@ static void __init pSeries_request_regions(void)
 
 void __init pSeries_final_fixup(void)
 {
-       phbs_remap_io();
        pSeries_request_regions();
 
        pci_addr_cache_build();
index 543d6590981248ff1ebdff05822c36aaeefe9ca0..f32baf7f4693eb0980c3a42ba366492fb9c0517e 100644 (file)
@@ -226,7 +226,7 @@ static void iommu_table_u3_setup(void)
        iommu_table_u3.it_busno = 0;
        iommu_table_u3.it_offset = 0;
        /* it_size is in number of entries */
-       iommu_table_u3.it_size = dart_tablesize / sizeof(u32);
+       iommu_table_u3.it_size = (dart_tablesize / sizeof(u32)) >> DART_PAGE_FACTOR;
 
        /* Initialize the common IOMMU code */
        iommu_table_u3.it_base = (unsigned long)dart_vbase;
index 048ba910f028b98940f8b8b1316e665ad4be26d5..58b19f1076568c85ae7cc17d903b7db4050b72a5 100644 (file)
@@ -15,7 +15,7 @@ obj-y               +=        idle.o dma.o \
                        align.o \
                        udbg.o \
                        rtc.o \
-                       iommu.o sysfs.o vdso.o
+                       iommu.o vdso.o
 obj-y += vdso32/ vdso64/
 
 pci-obj-$(CONFIG_PPC_MULTIPLATFORM)    += pci_dn.o pci_direct_iommu.o
@@ -30,13 +30,10 @@ endif
 obj-$(CONFIG_PPC_PSERIES) += udbg_16550.o
 
 obj-$(CONFIG_KEXEC)            += machine_kexec.o
-obj-$(CONFIG_PROC_FS)          += proc_ppc64.o
 obj-$(CONFIG_MODULES)          += module.o
 ifneq ($(CONFIG_PPC_MERGE),y)
 obj-$(CONFIG_MODULES)          += ppc_ksyms.o
 endif
-obj-$(CONFIG_PPC_RTAS)         += rtas_pci.o
-obj-$(CONFIG_LPARCFG)          += lparcfg.o
 obj-$(CONFIG_HVC_CONSOLE)      += hvconsole.o
 ifneq ($(CONFIG_PPC_MERGE),y)
 obj-$(CONFIG_BOOTX_TEXT)       += btext.o
index 66698fdf059ec6f39953dfdec83f330fdb238da6..46929fb24f3c1fe64e01ac5c7dc541558d9c7ddb 100644 (file)
@@ -548,6 +548,9 @@ static int __init pcibios_init(void)
        if (ppc64_isabridge_dev != NULL)
                printk("ISA bridge at %s\n", pci_name(ppc64_isabridge_dev));
 
+       /* map in PCI I/O space */
+       phbs_remap_io();
+
        printk("PCI: Probing PCI hardware done\n");
 
        return 0;
similarity index 97%
rename from include/asm-ppc64/hvcall.h
rename to include/asm-powerpc/hvcall.h
index ab7c3cf24888cd6c6fb2f3663cd835f95d088f7b..d36da61dbc5318fb900f7c487b12551e990bd6f6 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef _PPC64_HVCALL_H
-#define _PPC64_HVCALL_H
+#ifndef _ASM_POWERPC_HVCALL_H
+#define _ASM_POWERPC_HVCALL_H
 
 #define HVSC                   .long 0x44000022
 
@@ -138,7 +138,7 @@ long plpar_hcall(unsigned long opcode,
  */
 long plpar_hcall_norets(unsigned long opcode, ...);
 
-/* 
+/*
  * Special hcall interface for ibmveth support.
  * Takes 8 input parms. Returns a rc and stores the
  * R4 return value in *out1.
@@ -153,11 +153,11 @@ long plpar_hcall_8arg_2ret(unsigned long opcode,
                           unsigned long arg7,
                           unsigned long arg8,
                           unsigned long *out1);
+
 /* plpar_hcall_4out()
  *
- * same as plpar_hcall except with 4 output arguments.  
- * 
+ * same as plpar_hcall except with 4 output arguments.
+ *
  */
 long plpar_hcall_4out(unsigned long opcode,
                      unsigned long arg1,
@@ -170,4 +170,4 @@ long plpar_hcall_4out(unsigned long opcode,
                      unsigned long *out4);
 
 #endif /* __ASSEMBLY__ */
-#endif /* _PPC64_HVCALL_H */
+#endif /* _ASM_POWERPC_HVCALL_H */
index f0cce5a3023523c96a961fe814f2fe1637224b1a..5341b75c75cb6937ac3372e059346fa2dc606727 100644 (file)
@@ -179,6 +179,7 @@ extern struct task_struct *_switch(struct thread_struct *prev,
 extern unsigned int rtas_data;
 extern int mem_init_done;      /* set on boot once kmalloc can be called */
 extern unsigned long memory_limit;
+extern unsigned long klimit;
 
 extern int powersave_nap;      /* set if nap mode can be used in idle loop */
 
index c43d512d5902c231a713ceea663344bf2967ec67..1a7e0afa2dc6175a79d62f0db40101eb99ba8f0c 100644 (file)
@@ -229,6 +229,7 @@ extern void htab_initialize_secondary(void);
 extern void hpte_init_native(void);
 extern void hpte_init_lpar(void);
 extern void hpte_init_iSeries(void);
+extern void mm_init_ppc64(void);
 
 extern long pSeries_lpar_hpte_insert(unsigned long hpte_group,
                                     unsigned long va, unsigned long prpn,
index 98da0e4262bd2f02a6d07c3df5d2c68eb3f495f3..dcf3622d19462110dda6332b30f9234feb8f16cc 100644 (file)
@@ -10,8 +10,8 @@ extern kmem_cache_t *pgtable_cache[];
 
 #ifdef CONFIG_PPC_64K_PAGES
 #define PTE_CACHE_NUM  0
-#define PMD_CACHE_NUM  0
-#define PGD_CACHE_NUM  1
+#define PMD_CACHE_NUM  1
+#define PGD_CACHE_NUM  2
 #else
 #define PTE_CACHE_NUM  0
 #define PMD_CACHE_NUM  1