diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-06-21 01:44:39 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-06-21 01:44:39 +0000 |
commit | 5205a16d8870cdd4cc524589de3e09ad176d129a (patch) | |
tree | 6deddf1269b9e6f13f2fa00529cd4674c3b2a3fa /arch/sparc | |
parent | e8b2e78e4f14d329f2cdfb8ef7ed3582c71454e5 (diff) |
Merge with Linux 2.4.0-ac22-riel.
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/defconfig | 23 | ||||
-rw-r--r-- | arch/sparc/kernel/entry.S | 34 | ||||
-rw-r--r-- | arch/sparc/kernel/ptrace.c | 20 | ||||
-rw-r--r-- | arch/sparc/kernel/signal.c | 6 | ||||
-rw-r--r-- | arch/sparc/kernel/sys_sparc.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/sys_sunos.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/time.c | 5 | ||||
-rw-r--r-- | arch/sparc/lib/memset.S | 6 | ||||
-rw-r--r-- | arch/sparc/mm/srmmu.c | 104 |
9 files changed, 108 insertions, 94 deletions
diff --git a/arch/sparc/defconfig b/arch/sparc/defconfig index b9c76ef4a..8d2f5b78e 100644 --- a/arch/sparc/defconfig +++ b/arch/sparc/defconfig @@ -9,6 +9,13 @@ CONFIG_UID16=y CONFIG_EXPERIMENTAL=y # +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODVERSIONS=y +CONFIG_KMOD=y + +# # General setup # CONFIG_VT=y @@ -47,13 +54,6 @@ CONFIG_SUNOS_EMUL=y # CONFIG_PRINTER is not set # -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODVERSIONS=y -CONFIG_KMOD=y - -# # Console drivers # CONFIG_PROM_CONSOLE=y @@ -149,9 +149,9 @@ CONFIG_ATALK=m CONFIG_DECNET=m CONFIG_DECNET_SIOCGIFCONF=y # CONFIG_DECNET_ROUTER is not set +# CONFIG_BRIDGE is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set -# CONFIG_BRIDGE is not set # CONFIG_LLC is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set @@ -252,6 +252,7 @@ CONFIG_UNIX98_PTY_COUNT=256 CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m # CONFIG_ADFS_FS is not set +# CONFIG_ADFS_FS_RW is not set CONFIG_AFFS_FS=m # CONFIG_HFS_FS is not set # CONFIG_BFS_FS is not set @@ -261,10 +262,12 @@ CONFIG_MSDOS_FS=m CONFIG_VFAT_FS=m CONFIG_EFS_FS=m # CONFIG_CRAMFS is not set +# CONFIG_RAMFS is not set CONFIG_ISO9660_FS=m # CONFIG_JOLIET is not set CONFIG_MINIX_FS=m # CONFIG_NTFS_FS is not set +# CONFIG_NTFS_RW is not set CONFIG_HPFS_FS=m CONFIG_PROC_FS=y # CONFIG_DEVFS_FS is not set @@ -272,11 +275,13 @@ CONFIG_PROC_FS=y # CONFIG_DEVFS_DEBUG is not set CONFIG_DEVPTS_FS=y # CONFIG_QNX4FS_FS is not set +# CONFIG_QNX4FS_RW is not set CONFIG_ROMFS_FS=m CONFIG_EXT2_FS=y CONFIG_SYSV_FS=m # CONFIG_SYSV_FS_WRITE is not set # CONFIG_UDF_FS is not set +# CONFIG_UDF_RW is not set CONFIG_UFS_FS=m # CONFIG_UFS_FS_WRITE is not set @@ -285,9 +290,11 @@ CONFIG_UFS_FS=m # CONFIG_CODA_FS=m CONFIG_NFS_FS=y +# CONFIG_NFS_V3 is not set # CONFIG_ROOT_NFS is not set CONFIG_NFSD=m # CONFIG_NFSD_V3 is not set +# CONFIG_NFSD_TCP is not set CONFIG_SUNRPC=y CONFIG_LOCKD=y CONFIG_SMB_FS=m diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S index 7b3855dda..f701027e0 100644 --- a/arch/sparc/kernel/entry.S +++ b/arch/sparc/kernel/entry.S @@ -1,4 +1,4 @@ -/* $Id: entry.S,v 1.165 2000/06/05 06:08:45 anton Exp $ +/* $Id: entry.S,v 1.166 2000/06/19 06:24:36 davem Exp $ * arch/sparc/kernel/entry.S: Sparc trap low-level entry points. * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) @@ -1233,8 +1233,8 @@ C_LABEL(sys_ptrace): call C_LABEL(do_ptrace) add %sp, REGWIN_SZ, %o0 - ld [%curptr + AOFF_task_flags], %l5 - andcc %l5, 0x20, %g0 + ld [%curptr + AOFF_task_ptrace], %l5 + andcc %l5, 0x02, %g0 be 1f nop @@ -1283,8 +1283,8 @@ C_LABEL(sys_sigpause): call C_LABEL(do_sigpause) add %sp, REGWIN_SZ, %o1 - ld [%curptr + AOFF_task_flags], %l5 - andcc %l5, 0x20, %g0 + ld [%curptr + AOFF_task_ptrace], %l5 + andcc %l5, 0x02, %g0 be 1f nop @@ -1301,8 +1301,8 @@ C_LABEL(sys_sigsuspend): call C_LABEL(do_sigsuspend) add %sp, REGWIN_SZ, %o0 - ld [%curptr + AOFF_task_flags], %l5 - andcc %l5, 0x20, %g0 + ld [%curptr + AOFF_task_ptrace], %l5 + andcc %l5, 0x02, %g0 be 1f nop @@ -1320,8 +1320,8 @@ C_LABEL(sys_rt_sigsuspend): call C_LABEL(do_rt_sigsuspend) add %sp, REGWIN_SZ, %o2 - ld [%curptr + AOFF_task_flags], %l5 - andcc %l5, 0x20, %g0 + ld [%curptr + AOFF_task_ptrace], %l5 + andcc %l5, 0x02, %g0 be 1f nop @@ -1338,8 +1338,8 @@ C_LABEL(sys_sigreturn): call C_LABEL(do_sigreturn) add %sp, REGWIN_SZ, %o0 - ld [%curptr + AOFF_task_flags], %l5 - andcc %l5, 0x20, %g0 + ld [%curptr + AOFF_task_ptrace], %l5 + andcc %l5, 0x02, %g0 be 1f nop @@ -1358,8 +1358,8 @@ C_LABEL(sys_rt_sigreturn): call C_LABEL(do_rt_sigreturn) add %sp, REGWIN_SZ, %o0 - ld [%curptr + AOFF_task_flags], %l5 - andcc %l5, 0x20, %g0 + ld [%curptr + AOFF_task_ptrace], %l5 + andcc %l5, 0x02, %g0 be 1f nop @@ -1496,9 +1496,9 @@ syscall_is_too_hard: mov %i1, %o1 mov %i2, %o2 - ld [%curptr + AOFF_task_flags], %l5 + ld [%curptr + AOFF_task_ptrace], %l5 mov %i3, %o3 - andcc %l5, 0x20, %g0 + andcc %l5, 0x02, %g0 mov %i4, %o4 bne linux_syscall_trace mov %i0, %l5 @@ -1510,12 +1510,12 @@ syscall_is_too_hard: .globl C_LABEL(ret_sys_call) C_LABEL(ret_sys_call): - ld [%curptr + AOFF_task_flags], %l6 + ld [%curptr + AOFF_task_ptrace], %l6 cmp %o0, -ENOIOCTLCMD ld [%sp + REGWIN_SZ + PT_PSR], %g3 set PSR_C, %g2 bgeu 1f - andcc %l6, 0x20, %l6 + andcc %l6, 0x02, %l6 /* System call success, clear Carry condition code. */ andn %g3, %g2, %g3 diff --git a/arch/sparc/kernel/ptrace.c b/arch/sparc/kernel/ptrace.c index 742d7db97..baed3a125 100644 --- a/arch/sparc/kernel/ptrace.c +++ b/arch/sparc/kernel/ptrace.c @@ -289,12 +289,12 @@ asmlinkage void do_ptrace(struct pt_regs *regs) #endif if(request == PTRACE_TRACEME) { /* are we already being traced? */ - if (current->flags & PF_PTRACED) { + if (current->ptrace & PT_PTRACED) { pt_error_return(regs, EPERM); goto out; } /* set the ptrace bit in the process flags. */ - current->flags |= PF_PTRACED; + current->ptrace |= PT_PTRACED; pt_succ_return(regs, 0); goto out; } @@ -333,11 +333,11 @@ asmlinkage void do_ptrace(struct pt_regs *regs) goto out; } /* the same process cannot be attached many times */ - if (child->flags & PF_PTRACED) { + if (child->ptrace & PT_PTRACED) { pt_error_return(regs, EPERM); goto out; } - child->flags |= PF_PTRACED; + child->ptrace |= PT_PTRACED; write_lock_irqsave(&tasklist_lock, flags); if(child->p_pptr != current) { REMOVE_LINKS(child); @@ -349,7 +349,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs) pt_succ_return(regs, 0); goto out; } - if (!(child->flags & PF_PTRACED)) { + if (!(child->ptrace & PT_PTRACED)) { pt_error_return(regs, ESRCH); goto out; } @@ -566,9 +566,9 @@ asmlinkage void do_ptrace(struct pt_regs *regs) } if (request == PTRACE_SYSCALL) - child->flags |= PF_TRACESYS; + child->ptrace |= PT_TRACESYS; else - child->flags &= ~PF_TRACESYS; + child->ptrace &= ~PT_TRACESYS; child->exit_code = data; #ifdef DEBUG_PTRACE @@ -605,7 +605,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs) pt_error_return(regs, EIO); goto out; } - child->flags &= ~(PF_PTRACED|PF_TRACESYS); + child->ptrace &= ~(PT_PTRACED|PT_TRACESYS); wake_up_process(child); child->exit_code = data; write_lock_irqsave(&tasklist_lock, flags); @@ -632,8 +632,8 @@ asmlinkage void syscall_trace(void) #ifdef DEBUG_PTRACE printk("%s [%d]: syscall_trace\n", current->comm, current->pid); #endif - if ((current->flags & (PF_PTRACED|PF_TRACESYS)) - != (PF_PTRACED|PF_TRACESYS)) + if ((current->ptrace & (PT_PTRACED|PT_TRACESYS)) + != (PT_PTRACED|PT_TRACESYS)) return; current->exit_code = SIGTRAP; current->state = TASK_STOPPED; diff --git a/arch/sparc/kernel/signal.c b/arch/sparc/kernel/signal.c index e7afd3d19..8ff82dd7e 100644 --- a/arch/sparc/kernel/signal.c +++ b/arch/sparc/kernel/signal.c @@ -1,4 +1,4 @@ -/* $Id: signal.c,v 1.104 2000/05/27 00:49:35 davem Exp $ +/* $Id: signal.c,v 1.105 2000/06/19 06:24:37 davem Exp $ * linux/arch/sparc/kernel/signal.c * * Copyright (C) 1991, 1992 Linus Torvalds @@ -1177,7 +1177,7 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs * regs, if (!signr) break; - if ((current->flags & PF_PTRACED) && signr != SIGKILL) { + if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) { current->exit_code = signr; current->state = TASK_STOPPED; @@ -1241,7 +1241,7 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs * regs, continue; case SIGSTOP: - if (current->flags & PF_PTRACED) + if (current->ptrace & PT_PTRACED) continue; current->state = TASK_STOPPED; current->exit_code = signr; diff --git a/arch/sparc/kernel/sys_sparc.c b/arch/sparc/kernel/sys_sparc.c index 427208d5f..18fe3790a 100644 --- a/arch/sparc/kernel/sys_sparc.c +++ b/arch/sparc/kernel/sys_sparc.c @@ -1,4 +1,4 @@ -/* $Id: sys_sparc.c,v 1.61 2000/02/16 07:31:29 davem Exp $ +/* $Id: sys_sparc.c,v 1.62 2000/06/19 06:24:37 davem Exp $ * linux/arch/sparc/kernel/sys_sparc.c * * This file contains various random system calls that diff --git a/arch/sparc/kernel/sys_sunos.c b/arch/sparc/kernel/sys_sunos.c index 8591f6085..e770f1dd1 100644 --- a/arch/sparc/kernel/sys_sunos.c +++ b/arch/sparc/kernel/sys_sunos.c @@ -1,4 +1,4 @@ -/* $Id: sys_sunos.c,v 1.123 2000/05/22 07:29:39 davem Exp $ +/* $Id: sys_sunos.c,v 1.124 2000/06/19 06:24:37 davem Exp $ * sys_sunos.c: SunOS specific syscall compatibility support. * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) diff --git a/arch/sparc/kernel/time.c b/arch/sparc/kernel/time.c index 05bb225d7..43ffb3d33 100644 --- a/arch/sparc/kernel/time.c +++ b/arch/sparc/kernel/time.c @@ -1,4 +1,4 @@ -/* $Id: time.c,v 1.55 2000/05/09 17:40:13 davem Exp $ +/* $Id: time.c,v 1.56 2000/06/13 22:51:28 anton Exp $ * linux/arch/sparc/kernel/time.c * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) @@ -79,12 +79,15 @@ void sparc_do_profile(unsigned long pc, unsigned long o7) extern int _stext; extern int __copy_user_begin, __copy_user_end; extern int __atomic_begin, __atomic_end; + extern int __bzero_begin, __bzero_end; extern int __bitops_begin, __bitops_end; if ((pc >= (unsigned long) &__copy_user_begin && pc < (unsigned long) &__copy_user_end) || (pc >= (unsigned long) &__atomic_begin && pc < (unsigned long) &__atomic_end) || + (pc >= (unsigned long) &__bzero_begin && + pc < (unsigned long) &__bzero_end) || (pc >= (unsigned long) &__bitops_begin && pc < (unsigned long) &__bitops_end)) pc = o7; diff --git a/arch/sparc/lib/memset.S b/arch/sparc/lib/memset.S index b8ca55e50..204e55173 100644 --- a/arch/sparc/lib/memset.S +++ b/arch/sparc/lib/memset.S @@ -55,6 +55,9 @@ .text .align 4 + .globl __bzero_begin +__bzero_begin: + .globl C_LABEL(__bzero), C_LABEL(__memset), .globl C_LABEL(memset) .globl C_LABEL(__memset_start), C_LABEL(__memset_end) @@ -193,3 +196,6 @@ C_LABEL(__memset_end): mov %i4, %o2 ret restore + + .globl __bzero_end +__bzero_end: diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index a69bf6b12..fe497c290 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c @@ -1,4 +1,4 @@ -/* $Id: srmmu.c,v 1.211 2000/06/04 06:23:52 anton Exp $ +/* $Id: srmmu.c,v 1.212 2000/06/13 22:59:14 anton Exp $ * srmmu.c: SRMMU specific routines for memory management. * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) @@ -99,8 +99,10 @@ static inline unsigned long srmmu_swap(unsigned long *addr, unsigned long value) return value; } -/* Functions really use this, not srmmu_swap directly. */ -#define srmmu_set_entry(ptr, newentry) srmmu_swap((unsigned long *) (ptr), (newentry)) +static inline void srmmu_set_pte(pte_t *ptep, pte_t pteval) +{ + srmmu_swap((unsigned long *)ptep, pte_val(pteval)); +} /* The very generic SRMMU page table operations. */ static inline int srmmu_device_memory(unsigned long x) @@ -128,13 +130,13 @@ int srmmu_nocache_used; #define __nocache_va(PADDR) (__va((unsigned long)PADDR) - (unsigned long)srmmu_nocache_pool + SRMMU_NOCACHE_VADDR) #define __nocache_fix(VADDR) __va(__nocache_pa(VADDR)) -static unsigned long srmmu_pgd_page(pgd_t pgd) +static inline unsigned long srmmu_pgd_page(pgd_t pgd) { return srmmu_device_memory(pgd_val(pgd))?~0:(unsigned long)__nocache_va((pgd_val(pgd) & SRMMU_PTD_PMASK) << 4); } -static unsigned long srmmu_pmd_page(pmd_t pmd) +static inline unsigned long srmmu_pmd_page(pmd_t pmd) { return srmmu_device_memory(pmd_val(pmd))?~0:(unsigned long)__nocache_va((pmd_val(pmd) & SRMMU_PTD_PMASK) << 4); } -static unsigned long srmmu_pte_pagenr(pte_t pte) +static inline unsigned long srmmu_pte_pagenr(pte_t pte) { return srmmu_device_memory(pte_val(pte))?~0:(((pte_val(pte) & SRMMU_PTE_PMASK) << 4) >> PAGE_SHIFT); } static inline int srmmu_pte_none(pte_t pte) @@ -144,7 +146,7 @@ static inline int srmmu_pte_present(pte_t pte) { return ((pte_val(pte) & SRMMU_ET_MASK) == SRMMU_ET_PTE); } static inline void srmmu_pte_clear(pte_t *ptep) -{ set_pte(ptep, __pte(0)); } +{ srmmu_set_pte(ptep, __pte(0)); } static inline int srmmu_pmd_none(pmd_t pmd) { return !(pmd_val(pmd) & 0xFFFFFFF); } @@ -156,7 +158,7 @@ static inline int srmmu_pmd_present(pmd_t pmd) { return ((pmd_val(pmd) & SRMMU_ET_MASK) == SRMMU_ET_PTD); } static inline void srmmu_pmd_clear(pmd_t *pmdp) -{ set_pte((pte_t *)pmdp, __pte(0)); } +{ srmmu_set_pte((pte_t *)pmdp, __pte(0)); } static inline int srmmu_pgd_none(pgd_t pgd) { return !(pgd_val(pgd) & 0xFFFFFFF); } @@ -168,7 +170,7 @@ static inline int srmmu_pgd_present(pgd_t pgd) { return ((pgd_val(pgd) & SRMMU_ET_MASK) == SRMMU_ET_PTD); } static inline void srmmu_pgd_clear(pgd_t * pgdp) -{ set_pte((pte_t *)pgdp, __pte(0)); } +{ srmmu_set_pte((pte_t *)pgdp, __pte(0)); } static inline int srmmu_pte_write(pte_t pte) { return pte_val(pte) & SRMMU_WRITE; } @@ -211,14 +213,14 @@ static pte_t srmmu_mk_pte_io(unsigned long page, pgprot_t pgprot, int space) { return __pte(((page) >> 4) | (space << 28) | pgprot_val(pgprot)); } /* XXX should we hyper_flush_whole_icache here - Anton */ -static void srmmu_ctxd_set(ctxd_t *ctxp, pgd_t *pgdp) -{ set_pte((pte_t *)ctxp, (SRMMU_ET_PTD | (__nocache_pa((unsigned long) pgdp) >> 4))); } +static inline void srmmu_ctxd_set(ctxd_t *ctxp, pgd_t *pgdp) +{ srmmu_set_pte((pte_t *)ctxp, (SRMMU_ET_PTD | (__nocache_pa((unsigned long) pgdp) >> 4))); } -static void srmmu_pgd_set(pgd_t * pgdp, pmd_t * pmdp) -{ set_pte((pte_t *)pgdp, (SRMMU_ET_PTD | (__nocache_pa((unsigned long) pmdp) >> 4))); } +static inline void srmmu_pgd_set(pgd_t * pgdp, pmd_t * pmdp) +{ srmmu_set_pte((pte_t *)pgdp, (SRMMU_ET_PTD | (__nocache_pa((unsigned long) pmdp) >> 4))); } -static void srmmu_pmd_set(pmd_t * pmdp, pte_t * ptep) -{ set_pte((pte_t *)pmdp, (SRMMU_ET_PTD | (__nocache_pa((unsigned long) ptep) >> 4))); } +static inline void srmmu_pmd_set(pmd_t * pmdp, pte_t * ptep) +{ srmmu_set_pte((pte_t *)pmdp, (SRMMU_ET_PTD | (__nocache_pa((unsigned long) ptep) >> 4))); } static inline pte_t srmmu_pte_modify(pte_t pte, pgprot_t newprot) { return __pte((pte_val(pte) & SRMMU_CHG_MASK) | pgprot_val(newprot)); } @@ -229,11 +231,11 @@ extern inline pgd_t *srmmu_pgd_offset(struct mm_struct * mm, unsigned long addre /* Find an entry in the second-level page table.. */ static inline pmd_t *srmmu_pmd_offset(pgd_t * dir, unsigned long address) -{ return (pmd_t *) pgd_page(*dir) + ((address >> SRMMU_PMD_SHIFT) & (SRMMU_PTRS_PER_PMD - 1)); } +{ return (pmd_t *) srmmu_pgd_page(*dir) + ((address >> SRMMU_PMD_SHIFT) & (SRMMU_PTRS_PER_PMD - 1)); } /* Find an entry in the third-level page table.. */ static inline pte_t *srmmu_pte_offset(pmd_t * dir, unsigned long address) -{ return (pte_t *) pmd_page(*dir) + ((address >> PAGE_SHIFT) & (SRMMU_PTRS_PER_PTE - 1)); } +{ return (pte_t *) srmmu_pmd_page(*dir) + ((address >> PAGE_SHIFT) & (SRMMU_PTRS_PER_PTE - 1)); } /* XXX Make this SMP safe - Anton */ unsigned long __srmmu_get_nocache(int size, int align) @@ -278,19 +280,20 @@ repeat: srmmu_nocache_used++; } - if (!lowest_failed && offset > srmmu_nocache_low) + if (!lowest_failed && ((align >> SRMMU_NOCACHE_BITMAP_SHIFT) <= 1) && (offset > srmmu_nocache_low)) srmmu_nocache_low = offset; return (SRMMU_NOCACHE_VADDR + (offset << SRMMU_NOCACHE_BITMAP_SHIFT)); } -unsigned long srmmu_get_nocache(int size, int align) +unsigned inline long srmmu_get_nocache(int size, int align) { unsigned long tmp; tmp = __srmmu_get_nocache(size, align); - memset((void *)tmp, 0, size); + if (tmp) + memset((void *)tmp, 0, size); return tmp; } @@ -338,15 +341,15 @@ void srmmu_nocache_init(void) while (vaddr < SRMMU_NOCACHE_END) { pgd = pgd_offset_k(vaddr); - pmd = pmd_offset(__nocache_fix(pgd), vaddr); - pte = pte_offset(__nocache_fix(pmd), vaddr); + pmd = srmmu_pmd_offset(__nocache_fix(pgd), vaddr); + pte = srmmu_pte_offset(__nocache_fix(pmd), vaddr); pteval = ((paddr >> 4) | SRMMU_ET_PTE | SRMMU_PRIV); if (srmmu_cache_pagetables) pteval |= SRMMU_CACHE; - set_pte(__nocache_fix(pte), pteval); + srmmu_set_pte(__nocache_fix(pte), pteval); vaddr += PAGE_SIZE; paddr += PAGE_SIZE; @@ -383,7 +386,7 @@ static pte_t *srmmu_pte_alloc(pmd_t * pmd, unsigned long address) pte_t *page = (pte_t *)srmmu_get_nocache(SRMMU_PTE_TABLE_SIZE, SRMMU_PTE_TABLE_SIZE); if(page) { spin_unlock(&pte_spinlock); - pmd_set(pmd, page); + srmmu_pmd_set(pmd, page); return page + address; } /* XXX fix this - Anton */ @@ -411,7 +414,7 @@ static pmd_t *srmmu_pmd_alloc(pgd_t * pgd, unsigned long address) pmd_t *page = (pmd_t *)srmmu_get_nocache(SRMMU_PMD_TABLE_SIZE, SRMMU_PMD_TABLE_SIZE); if(page) { spin_unlock(&pte_spinlock); - pgd_set(pgd, page); + srmmu_pgd_set(pgd, page); return page + address; } /* XXX fix this - Anton */ @@ -424,7 +427,7 @@ static pmd_t *srmmu_pmd_alloc(pgd_t * pgd, unsigned long address) pgd_set(pgd, (pmd_t *) BAD_PAGETABLE); return NULL; } - return (pmd_t *) pgd_page(*pgd) + address; + return (pmd_t *) srmmu_pgd_page(*pgd) + address; } static void srmmu_pmd_free(pmd_t * pmd) @@ -440,16 +443,11 @@ static void srmmu_set_pgdir(unsigned long address, pgd_t entry) for_each_task(p) { if (!p->mm) continue; - *pgd_offset(p->mm,address) = entry; + *srmmu_pgd_offset(p->mm,address) = entry; } read_unlock(&tasklist_lock); } -static void srmmu_set_pte_cacheable(pte_t *ptep, pte_t pteval) -{ - srmmu_set_entry(ptep, pte_val(pteval)); -} - static inline void alloc_context(struct mm_struct *old_mm, struct mm_struct *mm) { struct ctx_list *ctxp; @@ -509,8 +507,8 @@ void srmmu_mapioaddr(unsigned long physaddr, unsigned long virt_addr, int bus_ty physaddr &= PAGE_MASK; pgdp = pgd_offset_k(virt_addr); - pmdp = pmd_offset(pgdp, virt_addr); - ptep = pte_offset(pmdp, virt_addr); + pmdp = srmmu_pmd_offset(pgdp, virt_addr); + ptep = srmmu_pte_offset(pmdp, virt_addr); tmp = (physaddr >> 4) | SRMMU_ET_PTE; /* @@ -524,7 +522,7 @@ void srmmu_mapioaddr(unsigned long physaddr, unsigned long virt_addr, int bus_ty else tmp |= SRMMU_PRIV; __flush_page_to_ram(virt_addr); - set_pte(ptep, __pte(tmp)); + srmmu_set_pte(ptep, __pte(tmp)); flush_tlb_all(); } @@ -535,11 +533,11 @@ void srmmu_unmapioaddr(unsigned long virt_addr) pte_t *ptep; pgdp = pgd_offset_k(virt_addr); - pmdp = pmd_offset(pgdp, virt_addr); - ptep = pte_offset(pmdp, virt_addr); + pmdp = srmmu_pmd_offset(pgdp, virt_addr); + ptep = srmmu_pte_offset(pmdp, virt_addr); /* No need to flush uncacheable page. */ - pte_clear(ptep); + srmmu_pte_clear(ptep); flush_tlb_all(); } @@ -960,20 +958,20 @@ void __init srmmu_early_allocate_ptable_skeleton(unsigned long start, unsigned l while(start < end) { pgdp = pgd_offset_k(start); - if(pgd_none(*(pgd_t *)__nocache_fix(pgdp))) { + if(srmmu_pgd_none(*(pgd_t *)__nocache_fix(pgdp))) { pmdp = (pmd_t *)__srmmu_get_nocache(SRMMU_PMD_TABLE_SIZE, SRMMU_PMD_TABLE_SIZE); if (pmdp == NULL) early_pgtable_allocfail("pmd"); memset(__nocache_fix(pmdp), 0, SRMMU_PMD_TABLE_SIZE); - pgd_set(__nocache_fix(pgdp), pmdp); + srmmu_pgd_set(__nocache_fix(pgdp), pmdp); } - pmdp = pmd_offset(__nocache_fix(pgdp), start); - if(pmd_none(*(pmd_t *)__nocache_fix(pmdp))) { + pmdp = srmmu_pmd_offset(__nocache_fix(pgdp), start); + if(srmmu_pmd_none(*(pmd_t *)__nocache_fix(pmdp))) { ptep = (pte_t *)__srmmu_get_nocache(SRMMU_PTE_TABLE_SIZE, SRMMU_PTE_TABLE_SIZE); if (ptep == NULL) early_pgtable_allocfail("pte"); memset(__nocache_fix(ptep), 0, SRMMU_PTE_TABLE_SIZE); - pmd_set(__nocache_fix(pmdp), ptep); + srmmu_pmd_set(__nocache_fix(pmdp), ptep); } start = (start + SRMMU_PMD_SIZE) & SRMMU_PMD_MASK; } @@ -987,20 +985,20 @@ void __init srmmu_allocate_ptable_skeleton(unsigned long start, unsigned long en while(start < end) { pgdp = pgd_offset_k(start); - if(pgd_none(*pgdp)) { + if(srmmu_pgd_none(*pgdp)) { pmdp = (pmd_t *)__srmmu_get_nocache(SRMMU_PMD_TABLE_SIZE, SRMMU_PMD_TABLE_SIZE); if (pmdp == NULL) early_pgtable_allocfail("pmd"); memset(pmdp, 0, SRMMU_PMD_TABLE_SIZE); - pgd_set(pgdp, pmdp); + srmmu_pgd_set(pgdp, pmdp); } - pmdp = pmd_offset(pgdp, start); - if(pmd_none(*pmdp)) { + pmdp = srmmu_pmd_offset(pgdp, start); + if(srmmu_pmd_none(*pmdp)) { ptep = (pte_t *)__srmmu_get_nocache(SRMMU_PTE_TABLE_SIZE, SRMMU_PTE_TABLE_SIZE); if (ptep == NULL) early_pgtable_allocfail("pte"); memset(ptep, 0, SRMMU_PTE_TABLE_SIZE); - pmd_set(pmdp, ptep); + srmmu_pmd_set(pmdp, ptep); } start = (start + SRMMU_PMD_SIZE) & SRMMU_PMD_MASK; } @@ -1054,7 +1052,7 @@ void __init srmmu_inherit_prom_mappings(unsigned long start,unsigned long end) if (pmdp == NULL) early_pgtable_allocfail("pmd"); memset(__nocache_fix(pmdp), 0, SRMMU_PMD_TABLE_SIZE); - pgd_set(__nocache_fix(pgdp), pmdp); + srmmu_pgd_set(__nocache_fix(pgdp), pmdp); } pmdp = srmmu_pmd_offset(__nocache_fix(pgdp), start); if(what == 1) { @@ -1067,7 +1065,7 @@ void __init srmmu_inherit_prom_mappings(unsigned long start,unsigned long end) if (ptep == NULL) early_pgtable_allocfail("pte"); memset(__nocache_fix(ptep), 0, SRMMU_PTE_TABLE_SIZE); - pmd_set(__nocache_fix(pmdp), ptep); + srmmu_pmd_set(__nocache_fix(pmdp), ptep); } ptep = srmmu_pte_offset(__nocache_fix(pmdp), start); *(pte_t *)__nocache_fix(ptep) = __pte(prompte); @@ -1285,7 +1283,7 @@ static void srmmu_vac_update_mmu_cache(struct vm_area_struct * vma, vmaring->vm_mm->context, start); #endif flush_cache_page(vmaring, start); - set_pte(ptep, __pte((pte_val(*ptep) & + srmmu_set_pte(ptep, __pte((pte_val(*ptep) & ~SRMMU_CACHE))); flush_tlb_page(vmaring, start); } @@ -1301,7 +1299,7 @@ static void srmmu_vac_update_mmu_cache(struct vm_area_struct * vma, pmdp = srmmu_pmd_offset(pgdp, address); ptep = srmmu_pte_offset(pmdp, address); flush_cache_page(vma, address); - set_pte(ptep, __pte((pte_val(*ptep) & ~SRMMU_CACHE))); + srmmu_set_pte(ptep, __pte((pte_val(*ptep) & ~SRMMU_CACHE))); flush_tlb_page(vma, address); } done: @@ -2084,7 +2082,7 @@ void __init ld_mmu_srmmu(void) BTFIXUPSET_CALL(set_pgdir, srmmu_set_pgdir, BTFIXUPCALL_NORM); - BTFIXUPSET_CALL(set_pte, srmmu_set_pte_cacheable, BTFIXUPCALL_SWAPO0O1); + BTFIXUPSET_CALL(set_pte, srmmu_set_pte, BTFIXUPCALL_SWAPO0O1); BTFIXUPSET_CALL(switch_mm, srmmu_switch_mm, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(pte_pagenr, srmmu_pte_pagenr, BTFIXUPCALL_NORM); |