Commit 3682d115 authored by Anton Blanchard's avatar Anton Blanchard

ppc64: updates for 2.5.21

parent fbc17786
......@@ -45,6 +45,11 @@ include $(TOPDIR)/Rules.make
#
head.o: head.S ppc_defs.h
misc.o: misc.S ppc_defs.h
entry.o: entry.S ppc_defs.h
hvCall.o: hvCall.S ppc_defs.h
pSeries_hvCall.o: pSeries_hvCall.S ppc_defs.h
sys32.o: sys32.S ppc_defs.h
ppc_defs.h: mk_defs.c ppc_defs.head \
$(TOPDIR)/include/asm/mmu.h \
......
......@@ -853,11 +853,13 @@ _GLOBAL(do_stab_bolted)
ld r22,8(r21) /* get SRR1 */
andi. r22,r22,MSR_PR /* check if from user */
bne+ stab_bolted_user_return /* from user, send the error on up */
#if 0
li r3,0
#ifdef CONFIG_XMON
bl .xmon
#endif
1: b 1b
#endif
2:
/* (((ea >> 28) & 0x1fff) << 15) | (ea >> 60) */
mfspr r21,DAR
......
......@@ -210,7 +210,7 @@ int __hash_page(unsigned long ea, unsigned long access, unsigned long vsid,
* If no pte found or not present, send the problem up to
* do_page_fault
*/
if (!ptep || !pte_present(*ptep))
if (unlikely(!ptep || !pte_present(*ptep)))
return 1;
/*
......@@ -218,7 +218,7 @@ int __hash_page(unsigned long ea, unsigned long access, unsigned long vsid,
* prevented then send the problem up to do_page_fault.
*/
access |= _PAGE_PRESENT;
if (access & ~(pte_val(*ptep)))
if (unlikely(access & ~(pte_val(*ptep))))
return 1;
/*
......@@ -246,7 +246,8 @@ int __hash_page(unsigned long ea, unsigned long access, unsigned long vsid,
#define PPC64_HWNOEXEC (1 << 2)
/* We do lazy icache flushing on POWER4 */
if (__is_processor(PV_POWER4) && pfn_valid(pte_pfn(new_pte))) {
if (unlikely(__is_processor(PV_POWER4) &&
pfn_valid(pte_pfn(new_pte)))) {
struct page *page = pte_page(new_pte);
/* page is dirty */
......@@ -262,7 +263,7 @@ int __hash_page(unsigned long ea, unsigned long access, unsigned long vsid,
}
/* Check if pte already has an hpte (case 2) */
if (pte_val(old_pte) & _PAGE_HASHPTE) {
if (unlikely(pte_val(old_pte) & _PAGE_HASHPTE)) {
/* There MIGHT be an HPTE for this pte */
unsigned long hash, slot, secondary;
......@@ -282,7 +283,7 @@ int __hash_page(unsigned long ea, unsigned long access, unsigned long vsid,
*ptep = new_pte;
}
if (!(pte_val(old_pte) & _PAGE_HASHPTE)) {
if (likely(!(pte_val(old_pte) & _PAGE_HASHPTE))) {
/* XXX fix large pte flag */
unsigned long hash = hpt_hash(vpn, 0);
unsigned long hpte_group;
......
......@@ -8,6 +8,7 @@
#define __ARCH_PPC64_CACHE_H
/* bytes per L1 cache line */
#define L1_CACHE_BYTES 128
#define L1_CACHE_SHIFT 7
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment