git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.5.x5
[linux-2.6.git]
/
arch
/
ppc64
/
mm
/
hash_utils.c
diff --git
a/arch/ppc64/mm/hash_utils.c
b/arch/ppc64/mm/hash_utils.c
index
3a8a613
..
9b01f6f
100644
(file)
--- a/
arch/ppc64/mm/hash_utils.c
+++ b/
arch/ppc64/mm/hash_utils.c
@@
-41,7
+41,6
@@
#include <asm/types.h>
#include <asm/system.h>
#include <asm/uaccess.h>
#include <asm/types.h>
#include <asm/system.h>
#include <asm/uaccess.h>
-#include <asm/naca.h>
#include <asm/machdep.h>
#include <asm/lmb.h>
#include <asm/abs_addr.h>
#include <asm/machdep.h>
#include <asm/lmb.h>
#include <asm/abs_addr.h>
@@
-75,7
+74,8
@@
extern unsigned long dart_tablebase;
#endif /* CONFIG_U3_DART */
extern unsigned long dart_tablebase;
#endif /* CONFIG_U3_DART */
-HTAB htab_data = {NULL, 0, 0, 0, 0};
+HPTE *htab_address;
+unsigned long htab_hash_mask;
extern unsigned long _SDR1;
extern unsigned long _SDR1;
@@
-114,7
+114,7
@@
static inline void create_pte_mapping(unsigned long start, unsigned long end,
hash = hpt_hash(vpn, large);
hash = hpt_hash(vpn, large);
- hpteg = ((hash & htab_
data.htab_hash_mask)*
HPTES_PER_GROUP);
+ hpteg = ((hash & htab_
hash_mask) *
HPTES_PER_GROUP);
#ifdef CONFIG_PPC_PSERIES
if (systemcfg->platform & PLATFORM_LPAR)
#ifdef CONFIG_PPC_PSERIES
if (systemcfg->platform & PLATFORM_LPAR)
@@
-147,7
+147,7
@@
void __init htab_initialize(void)
* Calculate the required size of the htab. We want the number of
* PTEGs to equal one half the number of real pages.
*/
* Calculate the required size of the htab. We want the number of
* PTEGs to equal one half the number of real pages.
*/
- htab_size_bytes = 1UL <<
naca->pftS
ize;
+ htab_size_bytes = 1UL <<
ppc64_pft_s
ize;
pteg_count = htab_size_bytes >> 7;
/* For debug, make the HTAB 1/8 as big as it normally would be. */
pteg_count = htab_size_bytes >> 7;
/* For debug, make the HTAB 1/8 as big as it normally would be. */
@@
-156,12
+156,11
@@
void __init htab_initialize(void)
htab_size_bytes = pteg_count << 7;
}
htab_size_bytes = pteg_count << 7;
}
- htab_data.htab_num_ptegs = pteg_count;
- htab_data.htab_hash_mask = pteg_count - 1;
+ htab_hash_mask = pteg_count - 1;
if (systemcfg->platform & PLATFORM_LPAR) {
/* Using a hypervisor which owns the htab */
if (systemcfg->platform & PLATFORM_LPAR) {
/* Using a hypervisor which owns the htab */
- htab_
data.htab
= NULL;
+ htab_
address
= NULL;
_SDR1 = 0;
} else {
/* Find storage for the HPT. Must be contiguous in
_SDR1 = 0;
} else {
/* Find storage for the HPT. Must be contiguous in
@@
-176,7
+175,7
@@
void __init htab_initialize(void)
ppc64_terminate_msg(0x20, "hpt space");
loop_forever();
}
ppc64_terminate_msg(0x20, "hpt space");
loop_forever();
}
- htab_
data.htab
= abs_to_virt(table);
+ htab_
address
= abs_to_virt(table);
/* htab absolute addr + encoded htabsize */
_SDR1 = table + __ilog2(pteg_count) - 11;
/* htab absolute addr + encoded htabsize */
_SDR1 = table + __ilog2(pteg_count) - 11;
@@
-295,12
+294,6
@@
int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
vsid = get_kernel_vsid(ea);
break;
#if 0
vsid = get_kernel_vsid(ea);
break;
#if 0
- case EEH_REGION_ID:
- /*
- * Should only be hit if there is an access to MMIO space
- * which is protected by EEH.
- * Send the problem up to do_page_fault
- */
case KERNEL_REGION_ID:
/*
* Should never get here - entire 0xC0... region is bolted.
case KERNEL_REGION_ID:
/*
* Should never get here - entire 0xC0... region is bolted.
@@
-341,9
+334,7
@@
void flush_hash_page(unsigned long context, unsigned long ea, pte_t pte,
int local)
{
unsigned long vsid, vpn, va, hash, secondary, slot;
int local)
{
unsigned long vsid, vpn, va, hash, secondary, slot;
-
- /* XXX fix for large ptes */
- unsigned long large = 0;
+ unsigned long huge = pte_huge(pte);
if ((ea >= USER_START) && (ea <= USER_END))
vsid = get_vsid(context, ea);
if ((ea >= USER_START) && (ea <= USER_END))
vsid = get_vsid(context, ea);
@@
-351,18
+342,18
@@
void flush_hash_page(unsigned long context, unsigned long ea, pte_t pte,
vsid = get_kernel_vsid(ea);
va = (vsid << 28) | (ea & 0x0fffffff);
vsid = get_kernel_vsid(ea);
va = (vsid << 28) | (ea & 0x0fffffff);
- if (
lar
ge)
+ if (
hu
ge)
vpn = va >> HPAGE_SHIFT;
else
vpn = va >> PAGE_SHIFT;
vpn = va >> HPAGE_SHIFT;
else
vpn = va >> PAGE_SHIFT;
- hash = hpt_hash(vpn,
lar
ge);
+ hash = hpt_hash(vpn,
hu
ge);
secondary = (pte_val(pte) & _PAGE_SECONDARY) >> 15;
if (secondary)
hash = ~hash;
secondary = (pte_val(pte) & _PAGE_SECONDARY) >> 15;
if (secondary)
hash = ~hash;
- slot = (hash & htab_
data.htab_
hash_mask) * HPTES_PER_GROUP;
+ slot = (hash & htab_hash_mask) * HPTES_PER_GROUP;
slot += (pte_val(pte) & _PAGE_GROUP_IX) >> 12;
slot += (pte_val(pte) & _PAGE_GROUP_IX) >> 12;
- ppc_md.hpte_invalidate(slot, va,
lar
ge, local);
+ ppc_md.hpte_invalidate(slot, va,
hu
ge, local);
}
void flush_hash_range(unsigned long context, unsigned long number, int local)
}
void flush_hash_range(unsigned long context, unsigned long number, int local)
@@
-401,7
+392,7
@@
void low_hash_fault(struct pt_regs *regs, unsigned long address)
info.si_signo = SIGBUS;
info.si_errno = 0;
info.si_code = BUS_ADRERR;
info.si_signo = SIGBUS;
info.si_errno = 0;
info.si_code = BUS_ADRERR;
- info.si_addr = (void *)address;
+ info.si_addr = (void
__user
*)address;
force_sig_info(SIGBUS, &info, current);
return;
}
force_sig_info(SIGBUS, &info, current);
return;
}