Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 7043
b: refs/heads/master
c: 7ef9390
h: refs/heads/master
i:
  7041: 2b19f4f
  7039: ab37f6a
v: v3
  • Loading branch information
Jeff Dike authored and Linus Torvalds committed Sep 5, 2005
1 parent 41a429e commit ded52a5
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f9dfefe423a7633d81310c7b06c5566c74f9167b
refs/heads/master: 7ef939054139ef857cebbec07cbd12d7cf7beedd
4 changes: 4 additions & 0 deletions trunk/arch/um/kernel/skas/include/mmu-skas.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@
#ifndef __SKAS_MMU_H
#define __SKAS_MMU_H

#include "linux/config.h"
#include "mm_id.h"

struct mmu_context_skas {
struct mm_id id;
unsigned long last_page_table;
#ifdef CONFIG_3_LEVEL_PGTABLES
unsigned long last_pmd;
#endif
};

extern void switch_mm_skas(struct mm_id * mm_idp);
Expand Down
9 changes: 8 additions & 1 deletion trunk/arch/um/kernel/skas/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ static int init_stub_pte(struct mm_struct *mm, unsigned long proc,
*/

mm->context.skas.last_page_table = pmd_page_kernel(*pmd);
#ifdef CONFIG_3_LEVEL_PGTABLES
mm->context.skas.last_pmd = (unsigned long) __va(pud_val(*pud));
#endif

*pte = mk_pte(virt_to_page(kernel), __pgprot(_PAGE_PRESENT));
*pte = pte_mkexec(*pte);
Expand Down Expand Up @@ -144,6 +147,10 @@ void destroy_context_skas(struct mm_struct *mm)

if(!proc_mm || !ptrace_faultinfo){
free_page(mmu->id.stack);
free_page(mmu->last_page_table);
pte_free_kernel((pte_t *) mmu->last_page_table);
dec_page_state(nr_page_table_pages);
#ifdef CONFIG_3_LEVEL_PGTABLES
pmd_free((pmd_t *) mmu->last_pmd);
#endif
}
}
12 changes: 7 additions & 5 deletions trunk/include/asm-um/pgalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@ static inline void pte_free(struct page *pte)
#define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte))

#ifdef CONFIG_3_LEVEL_PGTABLES
/*
* In the 3-level case we free the pmds as part of the pgd.
*/
#define pmd_free(x) do { } while (0)
#define __pmd_free_tlb(tlb,x) do { } while (0)

extern __inline__ void pmd_free(pmd_t *pmd)
{
free_page((unsigned long)pmd);
}

#define __pmd_free_tlb(tlb,x) tlb_remove_page((tlb),virt_to_page(x))
#endif

#define check_pgt_cache() do { } while (0)
Expand Down
9 changes: 3 additions & 6 deletions trunk/include/asm-um/pgtable-3level.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,11 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
return pmd;
}

static inline void pmd_free(pmd_t *pmd){
free_page((unsigned long) pmd);
extern inline void pud_clear (pud_t *pud)
{
set_pud(pud, __pud(0));
}

#define __pmd_free_tlb(tlb,x) do { } while (0)

static inline void pud_clear (pud_t * pud) { }

#define pud_page(pud) \
((struct page *) __va(pud_val(pud) & PAGE_MASK))

Expand Down

0 comments on commit ded52a5

Please sign in to comment.