diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-03-15 20:51:26 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 04:55:31 -0400 |
commit | 85f1e1f66011e67e68065f2db4cde499decb9c84 (patch) | |
tree | 0293a92b819df2e5c14e94c67e1d92251572ab97 /arch/sparc64 | |
parent | 5be4a963675d3270fab7f55e8c4a2e56afd408f6 (diff) |
[SPARC64]: Use DECLARE_BITMAP and BITS_TO_LONGS in mm/init.c
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64')
-rw-r--r-- | arch/sparc64/mm/init.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index 97b5ebc91165..83a76a2eb71e 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c | |||
@@ -149,12 +149,6 @@ unsigned long *sparc64_valid_addr_bitmap __read_mostly; | |||
149 | unsigned long kern_base __read_mostly; | 149 | unsigned long kern_base __read_mostly; |
150 | unsigned long kern_size __read_mostly; | 150 | unsigned long kern_size __read_mostly; |
151 | 151 | ||
152 | /* get_new_mmu_context() uses "cache + 1". */ | ||
153 | DEFINE_SPINLOCK(ctx_alloc_lock); | ||
154 | unsigned long tlb_context_cache = CTX_FIRST_VERSION - 1; | ||
155 | #define CTX_BMAP_SLOTS (1UL << (CTX_NR_BITS - 6)) | ||
156 | unsigned long mmu_context_bmap[CTX_BMAP_SLOTS]; | ||
157 | |||
158 | /* Initial ramdisk setup */ | 152 | /* Initial ramdisk setup */ |
159 | extern unsigned long sparc_ramdisk_image64; | 153 | extern unsigned long sparc_ramdisk_image64; |
160 | extern unsigned int sparc_ramdisk_image; | 154 | extern unsigned int sparc_ramdisk_image; |
@@ -701,6 +695,13 @@ void __flush_dcache_range(unsigned long start, unsigned long end) | |||
701 | } | 695 | } |
702 | #endif /* DCACHE_ALIASING_POSSIBLE */ | 696 | #endif /* DCACHE_ALIASING_POSSIBLE */ |
703 | 697 | ||
698 | /* get_new_mmu_context() uses "cache + 1". */ | ||
699 | DEFINE_SPINLOCK(ctx_alloc_lock); | ||
700 | unsigned long tlb_context_cache = CTX_FIRST_VERSION - 1; | ||
701 | #define MAX_CTX_NR (1UL << CTX_NR_BITS) | ||
702 | #define CTX_BMAP_SLOTS BITS_TO_LONGS(MAX_CTX_NR) | ||
703 | DECLARE_BITMAP(mmu_context_bmap, MAX_CTX_NR); | ||
704 | |||
704 | /* Caller does TLB context flushing on local CPU if necessary. | 705 | /* Caller does TLB context flushing on local CPU if necessary. |
705 | * The caller also ensures that CTX_VALID(mm->context) is false. | 706 | * The caller also ensures that CTX_VALID(mm->context) is false. |
706 | * | 707 | * |