aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sparc64')
-rw-r--r--include/asm-sparc64/mmu_context.h1
-rw-r--r--include/asm-sparc64/percpu.h10
-rw-r--r--include/asm-sparc64/pgalloc.h26
-rw-r--r--include/asm-sparc64/scatterlist.h1
4 files changed, 16 insertions, 22 deletions
diff --git a/include/asm-sparc64/mmu_context.h b/include/asm-sparc64/mmu_context.h
index 2337eb487719..8d129032013e 100644
--- a/include/asm-sparc64/mmu_context.h
+++ b/include/asm-sparc64/mmu_context.h
@@ -9,6 +9,7 @@
9#include <linux/spinlock.h> 9#include <linux/spinlock.h>
10#include <asm/system.h> 10#include <asm/system.h>
11#include <asm/spitfire.h> 11#include <asm/spitfire.h>
12#include <asm-generic/mm_hooks.h>
12 13
13static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) 14static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
14{ 15{
diff --git a/include/asm-sparc64/percpu.h b/include/asm-sparc64/percpu.h
index 0d3df76aa47f..ced8cbde046d 100644
--- a/include/asm-sparc64/percpu.h
+++ b/include/asm-sparc64/percpu.h
@@ -5,16 +5,6 @@
5 5
6#ifdef CONFIG_SMP 6#ifdef CONFIG_SMP
7 7
8#ifdef CONFIG_MODULES
9# define PERCPU_MODULE_RESERVE 8192
10#else
11# define PERCPU_MODULE_RESERVE 0
12#endif
13
14#define PERCPU_ENOUGH_ROOM \
15 (ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES) + \
16 PERCPU_MODULE_RESERVE)
17
18extern void setup_per_cpu_areas(void); 8extern void setup_per_cpu_areas(void);
19 9
20extern unsigned long __per_cpu_base; 10extern unsigned long __per_cpu_base;
diff --git a/include/asm-sparc64/pgalloc.h b/include/asm-sparc64/pgalloc.h
index 5891ff7ba760..5d66b858a965 100644
--- a/include/asm-sparc64/pgalloc.h
+++ b/include/asm-sparc64/pgalloc.h
@@ -6,6 +6,7 @@
6#include <linux/sched.h> 6#include <linux/sched.h>
7#include <linux/mm.h> 7#include <linux/mm.h>
8#include <linux/slab.h> 8#include <linux/slab.h>
9#include <linux/quicklist.h>
9 10
10#include <asm/spitfire.h> 11#include <asm/spitfire.h>
11#include <asm/cpudata.h> 12#include <asm/cpudata.h>
@@ -13,52 +14,50 @@
13#include <asm/page.h> 14#include <asm/page.h>
14 15
15/* Page table allocation/freeing. */ 16/* Page table allocation/freeing. */
16extern struct kmem_cache *pgtable_cache;
17 17
18static inline pgd_t *pgd_alloc(struct mm_struct *mm) 18static inline pgd_t *pgd_alloc(struct mm_struct *mm)
19{ 19{
20 return kmem_cache_alloc(pgtable_cache, GFP_KERNEL); 20 return quicklist_alloc(0, GFP_KERNEL, NULL);
21} 21}
22 22
23static inline void pgd_free(pgd_t *pgd) 23static inline void pgd_free(pgd_t *pgd)
24{ 24{
25 kmem_cache_free(pgtable_cache, pgd); 25 quicklist_free(0, NULL, pgd);
26} 26}
27 27
28#define pud_populate(MM, PUD, PMD) pud_set(PUD, PMD) 28#define pud_populate(MM, PUD, PMD) pud_set(PUD, PMD)
29 29
30static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr) 30static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr)
31{ 31{
32 return kmem_cache_alloc(pgtable_cache, 32 return quicklist_alloc(0, GFP_KERNEL, NULL);
33 GFP_KERNEL|__GFP_REPEAT);
34} 33}
35 34
36static inline void pmd_free(pmd_t *pmd) 35static inline void pmd_free(pmd_t *pmd)
37{ 36{
38 kmem_cache_free(pgtable_cache, pmd); 37 quicklist_free(0, NULL, pmd);
39} 38}
40 39
41static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, 40static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
42 unsigned long address) 41 unsigned long address)
43{ 42{
44 return kmem_cache_alloc(pgtable_cache, 43 return quicklist_alloc(0, GFP_KERNEL, NULL);
45 GFP_KERNEL|__GFP_REPEAT);
46} 44}
47 45
48static inline struct page *pte_alloc_one(struct mm_struct *mm, 46static inline struct page *pte_alloc_one(struct mm_struct *mm,
49 unsigned long address) 47 unsigned long address)
50{ 48{
51 return virt_to_page(pte_alloc_one_kernel(mm, address)); 49 void *pg = quicklist_alloc(0, GFP_KERNEL, NULL);
50 return pg ? virt_to_page(pg) : NULL;
52} 51}
53 52
54static inline void pte_free_kernel(pte_t *pte) 53static inline void pte_free_kernel(pte_t *pte)
55{ 54{
56 kmem_cache_free(pgtable_cache, pte); 55 quicklist_free(0, NULL, pte);
57} 56}
58 57
59static inline void pte_free(struct page *ptepage) 58static inline void pte_free(struct page *ptepage)
60{ 59{
61 pte_free_kernel(page_address(ptepage)); 60 quicklist_free_page(0, NULL, ptepage);
62} 61}
63 62
64 63
@@ -66,6 +65,9 @@ static inline void pte_free(struct page *ptepage)
66#define pmd_populate(MM,PMD,PTE_PAGE) \ 65#define pmd_populate(MM,PMD,PTE_PAGE) \
67 pmd_populate_kernel(MM,PMD,page_address(PTE_PAGE)) 66 pmd_populate_kernel(MM,PMD,page_address(PTE_PAGE))
68 67
69#define check_pgt_cache() do { } while (0) 68static inline void check_pgt_cache(void)
69{
70 quicklist_trim(0, NULL, 25, 16);
71}
70 72
71#endif /* _SPARC64_PGALLOC_H */ 73#endif /* _SPARC64_PGALLOC_H */
diff --git a/include/asm-sparc64/scatterlist.h b/include/asm-sparc64/scatterlist.h
index ec4f3c63fe98..048fdb40e81d 100644
--- a/include/asm-sparc64/scatterlist.h
+++ b/include/asm-sparc64/scatterlist.h
@@ -3,6 +3,7 @@
3#define _SPARC64_SCATTERLIST_H 3#define _SPARC64_SCATTERLIST_H
4 4
5#include <asm/page.h> 5#include <asm/page.h>
6#include <asm/types.h>
6 7
7struct scatterlist { 8struct scatterlist {
8 struct page *page; 9 struct page *page;