Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99245
b: refs/heads/master
c: 3851075
h: refs/heads/master
i:
  99243: 58e0d04
v: v3
  • Loading branch information
Haavard Skinnemoen committed Jul 2, 2008
1 parent f4f6d4a commit 8dbbc52
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 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: 5a4d5292779b6163aa41e594a56307e442fbe73c
refs/heads/master: 38510754a50192a072210e24fdc4ae65592182f0
28 changes: 15 additions & 13 deletions trunk/include/asm-avr32/pgalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <asm/pgtable.h>

#define QUICK_PGD 0 /* Preserve kernel mappings over free */
#define QUICK_PT 1 /* Zero on free */

static inline void pmd_populate_kernel(struct mm_struct *mm,
pmd_t *pmd, pte_t *pte)
Expand Down Expand Up @@ -52,34 +53,34 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
unsigned long address)
{
pte_t *pte;

pte = (pte_t *)get_zeroed_page(GFP_KERNEL | __GFP_REPEAT);

return pte;
return quicklist_alloc(QUICK_PT, GFP_KERNEL | __GFP_REPEAT, NULL);
}

static inline struct page *pte_alloc_one(struct mm_struct *mm,
static inline pgtable_t pte_alloc_one(struct mm_struct *mm,
unsigned long address)
{
struct page *pte;
struct page *page;
void *pg;

pte = alloc_page(GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO);
if (!pte)
pg = quicklist_alloc(QUICK_PT, GFP_KERNEL | __GFP_REPEAT, NULL);
if (!pg)
return NULL;
pgtable_page_ctor(pte);
return pte;

page = virt_to_page(pg);
pgtable_page_ctor(page);

return page;
}

static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
{
free_page((unsigned long)pte);
quicklist_free(QUICK_PT, NULL, pte);
}

static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
{
pgtable_page_dtor(pte);
__free_page(pte);
quicklist_free_page(QUICK_PT, NULL, pte);
}

#define __pte_free_tlb(tlb,pte) \
Expand All @@ -91,6 +92,7 @@ do { \
static inline void check_pgt_cache(void)
{
quicklist_trim(QUICK_PGD, NULL, 25, 16);
quicklist_trim(QUICK_PT, NULL, 25, 16);
}

#endif /* __ASM_AVR32_PGALLOC_H */
2 changes: 1 addition & 1 deletion trunk/mm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ config BOUNCE
config NR_QUICK
int
depends on QUICKLIST
default "2" if SUPERH
default "2" if SUPERH || AVR32
default "1"

config VIRT_TO_BUS
Expand Down

0 comments on commit 8dbbc52

Please sign in to comment.