aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2005-09-27 12:28:45 -0400
committerStephen Rothwell <sfr@canb.auug.org.au>2005-09-27 12:28:45 -0400
commite508f438e0c152dcd1fbec5104e9c0ee28f352d4 (patch)
treebf67e0848e8ec5c5c255a8223550e9970cbdc29d /arch
parentcb5c7980ab16c461a883ec7899675be57798d285 (diff)
powerpc: Move iSeries_htab.c to powerpc/platforms/iseries
And rename it to htab.c Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/iseries/Makefile2
-rw-r--r--arch/powerpc/platforms/iseries/htab.c (renamed from arch/ppc64/kernel/iSeries_htab.c)25
-rw-r--r--arch/ppc64/kernel/Makefile3
3 files changed, 15 insertions, 15 deletions
diff --git a/arch/powerpc/platforms/iseries/Makefile b/arch/powerpc/platforms/iseries/Makefile
index 0bd671573c87..4ef588c1b606 100644
--- a/arch/powerpc/platforms/iseries/Makefile
+++ b/arch/powerpc/platforms/iseries/Makefile
@@ -1,2 +1,2 @@
1obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o mf.o lpevents.o \ 1obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o mf.o lpevents.o \
2 hvcall.o proc.o 2 hvcall.o proc.o htab.o
diff --git a/arch/ppc64/kernel/iSeries_htab.c b/arch/powerpc/platforms/iseries/htab.c
index 9a2be3abf349..431b22767d06 100644
--- a/arch/ppc64/kernel/iSeries_htab.c
+++ b/arch/powerpc/platforms/iseries/htab.c
@@ -1,10 +1,10 @@
1/* 1/*
2 * iSeries hashtable management. 2 * iSeries hashtable management.
3 * Derived from pSeries_htab.c 3 * Derived from pSeries_htab.c
4 * 4 *
5 * SMP scalability work: 5 * SMP scalability work:
6 * Copyright (C) 2001 Anton Blanchard <anton@au.ibm.com>, IBM 6 * Copyright (C) 2001 Anton Blanchard <anton@au.ibm.com>, IBM
7 * 7 *
8 * This program is free software; you can redistribute it and/or 8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License 9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 10 * as published by the Free Software Foundation; either version
@@ -18,7 +18,8 @@
18#include <asm/abs_addr.h> 18#include <asm/abs_addr.h>
19#include <linux/spinlock.h> 19#include <linux/spinlock.h>
20 20
21static spinlock_t iSeries_hlocks[64] __cacheline_aligned_in_smp = { [0 ... 63] = SPIN_LOCK_UNLOCKED}; 21static spinlock_t iSeries_hlocks[64] __cacheline_aligned_in_smp =
22 { [0 ... 63] = SPIN_LOCK_UNLOCKED};
22 23
23/* 24/*
24 * Very primitive algorithm for picking up a lock 25 * Very primitive algorithm for picking up a lock
@@ -126,7 +127,7 @@ static long iSeries_hpte_remove(unsigned long hpte_group)
126 hpte_v = iSeries_hpte_getword0(hpte_group + slot_offset); 127 hpte_v = iSeries_hpte_getword0(hpte_group + slot_offset);
127 128
128 if (! (hpte_v & HPTE_V_BOLTED)) { 129 if (! (hpte_v & HPTE_V_BOLTED)) {
129 HvCallHpt_invalidateSetSwBitsGet(hpte_group + 130 HvCallHpt_invalidateSetSwBitsGet(hpte_group +
130 slot_offset, 0, 0); 131 slot_offset, 0, 0);
131 iSeries_hunlock(hpte_group); 132 iSeries_hunlock(hpte_group);
132 return i; 133 return i;
@@ -143,9 +144,9 @@ static long iSeries_hpte_remove(unsigned long hpte_group)
143 144
144/* 145/*
145 * The HyperVisor expects the "flags" argument in this form: 146 * The HyperVisor expects the "flags" argument in this form:
146 * bits 0..59 : reserved 147 * bits 0..59 : reserved
147 * bit 60 : N 148 * bit 60 : N
148 * bits 61..63 : PP2,PP1,PP0 149 * bits 61..63 : PP2,PP1,PP0
149 */ 150 */
150static long iSeries_hpte_updatepp(unsigned long slot, unsigned long newpp, 151static long iSeries_hpte_updatepp(unsigned long slot, unsigned long newpp,
151 unsigned long va, int large, int local) 152 unsigned long va, int large, int local)
@@ -171,7 +172,7 @@ static long iSeries_hpte_updatepp(unsigned long slot, unsigned long newpp,
171} 172}
172 173
173/* 174/*
174 * Functions used to find the PTE for a particular virtual address. 175 * Functions used to find the PTE for a particular virtual address.
175 * Only used during boot when bolting pages. 176 * Only used during boot when bolting pages.
176 * 177 *
177 * Input : vpn : virtual page number 178 * Input : vpn : virtual page number
@@ -189,7 +190,7 @@ static long iSeries_hpte_find(unsigned long vpn)
189 * 0x00000000xxxxxxxx : Entry found in primary group, slot x 190 * 0x00000000xxxxxxxx : Entry found in primary group, slot x
190 * 0x80000000xxxxxxxx : Entry found in secondary group, slot x 191 * 0x80000000xxxxxxxx : Entry found in secondary group, slot x
191 */ 192 */
192 slot = HvCallHpt_findValid(&hpte, vpn); 193 slot = HvCallHpt_findValid(&hpte, vpn);
193 if (hpte.v & HPTE_V_VALID) { 194 if (hpte.v & HPTE_V_VALID) {
194 if (slot < 0) { 195 if (slot < 0) {
195 slot &= 0x7fffffffffffffff; 196 slot &= 0x7fffffffffffffff;
@@ -216,7 +217,7 @@ static void iSeries_hpte_updateboltedpp(unsigned long newpp, unsigned long ea)
216 vsid = get_kernel_vsid(ea); 217 vsid = get_kernel_vsid(ea);
217 va = (vsid << 28) | (ea & 0x0fffffff); 218 va = (vsid << 28) | (ea & 0x0fffffff);
218 vpn = va >> PAGE_SHIFT; 219 vpn = va >> PAGE_SHIFT;
219 slot = iSeries_hpte_find(vpn); 220 slot = iSeries_hpte_find(vpn);
220 if (slot == -1) 221 if (slot == -1)
221 panic("updateboltedpp: Could not find page to bolt\n"); 222 panic("updateboltedpp: Could not find page to bolt\n");
222 HvCallHpt_setPp(slot, newpp); 223 HvCallHpt_setPp(slot, newpp);
@@ -234,7 +235,7 @@ static void iSeries_hpte_invalidate(unsigned long slot, unsigned long va,
234 iSeries_hlock(slot); 235 iSeries_hlock(slot);
235 236
236 hpte_v = iSeries_hpte_getword0(slot); 237 hpte_v = iSeries_hpte_getword0(slot);
237 238
238 if ((HPTE_V_AVPN_VAL(hpte_v) == avpn) && (hpte_v & HPTE_V_VALID)) 239 if ((HPTE_V_AVPN_VAL(hpte_v) == avpn) && (hpte_v & HPTE_V_VALID))
239 HvCallHpt_invalidateSetSwBitsGet(slot, 0, 0); 240 HvCallHpt_invalidateSetSwBitsGet(slot, 0, 0);
240 241
@@ -249,7 +250,7 @@ void hpte_init_iSeries(void)
249 ppc_md.hpte_updatepp = iSeries_hpte_updatepp; 250 ppc_md.hpte_updatepp = iSeries_hpte_updatepp;
250 ppc_md.hpte_updateboltedpp = iSeries_hpte_updateboltedpp; 251 ppc_md.hpte_updateboltedpp = iSeries_hpte_updateboltedpp;
251 ppc_md.hpte_insert = iSeries_hpte_insert; 252 ppc_md.hpte_insert = iSeries_hpte_insert;
252 ppc_md.hpte_remove = iSeries_hpte_remove; 253 ppc_md.hpte_remove = iSeries_hpte_remove;
253 254
254 htab_finish_init(); 255 htab_finish_init();
255} 256}
diff --git a/arch/ppc64/kernel/Makefile b/arch/ppc64/kernel/Makefile
index 271b71d20d15..9225a6704e8a 100644
--- a/arch/ppc64/kernel/Makefile
+++ b/arch/ppc64/kernel/Makefile
@@ -22,8 +22,7 @@ pci-obj-$(CONFIG_PPC_MULTIPLATFORM) += pci_dn.o pci_direct_iommu.o
22 22
23obj-$(CONFIG_PCI) += pci.o pci_iommu.o iomap.o $(pci-obj-y) 23obj-$(CONFIG_PCI) += pci.o pci_iommu.o iomap.o $(pci-obj-y)
24 24
25obj-$(CONFIG_PPC_ISERIES) += iSeries_htab.o \ 25obj-$(CONFIG_PPC_ISERIES) += iSeries_iommu.o
26 iSeries_iommu.o
27 26
28obj-$(CONFIG_PPC_MULTIPLATFORM) += nvram.o i8259.o prom_init.o 27obj-$(CONFIG_PPC_MULTIPLATFORM) += nvram.o i8259.o prom_init.o
29 28