]> err.no Git - linux-2.6/commitdiff
powerpc: Move iSeries_htab.c to powerpc/platforms/iseries
authorStephen Rothwell <sfr@canb.auug.org.au>
Tue, 27 Sep 2005 16:28:45 +0000 (02:28 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 27 Sep 2005 16:28:45 +0000 (02:28 +1000)
And rename it to htab.c

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
arch/powerpc/platforms/iseries/Makefile
arch/powerpc/platforms/iseries/htab.c [moved from arch/ppc64/kernel/iSeries_htab.c with 94% similarity]
arch/ppc64/kernel/Makefile

index 0bd671573c8722604cf81945e7fdfcaecfe3aeb6..4ef588c1b6067a5a4926dec7bfe86c63d807ec15 100644 (file)
@@ -1,2 +1,2 @@
 obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o mf.o lpevents.o \
-       hvcall.o proc.o
+       hvcall.o proc.o htab.o
similarity index 94%
rename from arch/ppc64/kernel/iSeries_htab.c
rename to arch/powerpc/platforms/iseries/htab.c
index 9a2be3abf3494191853ab848fe70f6095e617338..431b22767d0684dc3cfe12530237264456caba95 100644 (file)
@@ -1,10 +1,10 @@
 /*
  * iSeries hashtable management.
- *     Derived from pSeries_htab.c
+ *     Derived from pSeries_htab.c
  *
  * SMP scalability work:
  *    Copyright (C) 2001 Anton Blanchard <anton@au.ibm.com>, IBM
- * 
+ *
  * 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
@@ -18,7 +18,8 @@
 #include <asm/abs_addr.h>
 #include <linux/spinlock.h>
 
-static spinlock_t iSeries_hlocks[64] __cacheline_aligned_in_smp = { [0 ... 63] = SPIN_LOCK_UNLOCKED};
+static spinlock_t iSeries_hlocks[64] __cacheline_aligned_in_smp =
+       { [0 ... 63] = SPIN_LOCK_UNLOCKED};
 
 /*
  * Very primitive algorithm for picking up a lock
@@ -126,7 +127,7 @@ static long iSeries_hpte_remove(unsigned long hpte_group)
                hpte_v = iSeries_hpte_getword0(hpte_group + slot_offset);
 
                if (! (hpte_v & HPTE_V_BOLTED)) {
-                       HvCallHpt_invalidateSetSwBitsGet(hpte_group + 
+                       HvCallHpt_invalidateSetSwBitsGet(hpte_group +
                                                         slot_offset, 0, 0);
                        iSeries_hunlock(hpte_group);
                        return i;
@@ -143,9 +144,9 @@ static long iSeries_hpte_remove(unsigned long hpte_group)
 
 /*
  * The HyperVisor expects the "flags" argument in this form:
- *     bits  0..59 : reserved
- *     bit      60 : N
- *     bits 61..63 : PP2,PP1,PP0
+ *     bits  0..59 : reserved
+ *     bit      60 : N
+ *     bits 61..63 : PP2,PP1,PP0
  */
 static long iSeries_hpte_updatepp(unsigned long slot, unsigned long newpp,
                                  unsigned long va, int large, int local)
@@ -171,7 +172,7 @@ static long iSeries_hpte_updatepp(unsigned long slot, unsigned long newpp,
 }
 
 /*
- * Functions used to find the PTE for a particular virtual address. 
+ * Functions used to find the PTE for a particular virtual address.
  * Only used during boot when bolting pages.
  *
  * Input : vpn      : virtual page number
@@ -189,7 +190,7 @@ static long iSeries_hpte_find(unsigned long vpn)
         * 0x00000000xxxxxxxx : Entry found in primary group, slot x
         * 0x80000000xxxxxxxx : Entry found in secondary group, slot x
         */
-       slot = HvCallHpt_findValid(&hpte, vpn); 
+       slot = HvCallHpt_findValid(&hpte, vpn);
        if (hpte.v & HPTE_V_VALID) {
                if (slot < 0) {
                        slot &= 0x7fffffffffffffff;
@@ -216,7 +217,7 @@ static void iSeries_hpte_updateboltedpp(unsigned long newpp, unsigned long ea)
        vsid = get_kernel_vsid(ea);
        va = (vsid << 28) | (ea & 0x0fffffff);
        vpn = va >> PAGE_SHIFT;
-       slot = iSeries_hpte_find(vpn); 
+       slot = iSeries_hpte_find(vpn);
        if (slot == -1)
                panic("updateboltedpp: Could not find page to bolt\n");
        HvCallHpt_setPp(slot, newpp);
@@ -234,7 +235,7 @@ static void iSeries_hpte_invalidate(unsigned long slot, unsigned long va,
        iSeries_hlock(slot);
 
        hpte_v = iSeries_hpte_getword0(slot);
-       
+
        if ((HPTE_V_AVPN_VAL(hpte_v) == avpn) && (hpte_v & HPTE_V_VALID))
                HvCallHpt_invalidateSetSwBitsGet(slot, 0, 0);
 
@@ -249,7 +250,7 @@ void hpte_init_iSeries(void)
        ppc_md.hpte_updatepp    = iSeries_hpte_updatepp;
        ppc_md.hpte_updateboltedpp = iSeries_hpte_updateboltedpp;
        ppc_md.hpte_insert      = iSeries_hpte_insert;
-       ppc_md.hpte_remove      = iSeries_hpte_remove;
+       ppc_md.hpte_remove      = iSeries_hpte_remove;
 
        htab_finish_init();
 }
index 271b71d20d15e20f39d2c2c8844de9a17e4616a6..9225a6704e8a3d45e67621ce2c539e5490138a74 100644 (file)
@@ -22,8 +22,7 @@ pci-obj-$(CONFIG_PPC_MULTIPLATFORM)   += pci_dn.o pci_direct_iommu.o
 
 obj-$(CONFIG_PCI)      += pci.o pci_iommu.o iomap.o $(pci-obj-y)
 
-obj-$(CONFIG_PPC_ISERIES) += iSeries_htab.o \
-                            iSeries_iommu.o
+obj-$(CONFIG_PPC_ISERIES) += iSeries_iommu.o
 
 obj-$(CONFIG_PPC_MULTIPLATFORM) += nvram.o i8259.o prom_init.o