aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/mmu_context_hash64.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-02-28 22:23:06 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-28 22:23:06 -0500
commit47871889c601d8199c51a4086f77eebd77c29b0b (patch)
tree40cdcac3bff0ee40cc33dcca61d0577cdf965f77 /arch/powerpc/mm/mmu_context_hash64.c
parentc16cc0b464b8876cfd57ce1c1dbcb6f9a6a0bce3 (diff)
parent30ff056c42c665b9ea535d8515890857ae382540 (diff)
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts: drivers/firmware/iscsi_ibft.c
Diffstat (limited to 'arch/powerpc/mm/mmu_context_hash64.c')
-rw-r--r--arch/powerpc/mm/mmu_context_hash64.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/powerpc/mm/mmu_context_hash64.c b/arch/powerpc/mm/mmu_context_hash64.c
index b910d37aea1a..51622daae09d 100644
--- a/arch/powerpc/mm/mmu_context_hash64.c
+++ b/arch/powerpc/mm/mmu_context_hash64.c
@@ -23,7 +23,7 @@
23#include <asm/mmu_context.h> 23#include <asm/mmu_context.h>
24 24
25static DEFINE_SPINLOCK(mmu_context_lock); 25static DEFINE_SPINLOCK(mmu_context_lock);
26static DEFINE_IDR(mmu_context_idr); 26static DEFINE_IDA(mmu_context_ida);
27 27
28/* 28/*
29 * The proto-VSID space has 2^35 - 1 segments available for user mappings. 29 * The proto-VSID space has 2^35 - 1 segments available for user mappings.
@@ -39,11 +39,11 @@ int __init_new_context(void)
39 int err; 39 int err;
40 40
41again: 41again:
42 if (!idr_pre_get(&mmu_context_idr, GFP_KERNEL)) 42 if (!ida_pre_get(&mmu_context_ida, GFP_KERNEL))
43 return -ENOMEM; 43 return -ENOMEM;
44 44
45 spin_lock(&mmu_context_lock); 45 spin_lock(&mmu_context_lock);
46 err = idr_get_new_above(&mmu_context_idr, NULL, 1, &index); 46 err = ida_get_new_above(&mmu_context_ida, 1, &index);
47 spin_unlock(&mmu_context_lock); 47 spin_unlock(&mmu_context_lock);
48 48
49 if (err == -EAGAIN) 49 if (err == -EAGAIN)
@@ -53,7 +53,7 @@ again:
53 53
54 if (index > MAX_CONTEXT) { 54 if (index > MAX_CONTEXT) {
55 spin_lock(&mmu_context_lock); 55 spin_lock(&mmu_context_lock);
56 idr_remove(&mmu_context_idr, index); 56 ida_remove(&mmu_context_ida, index);
57 spin_unlock(&mmu_context_lock); 57 spin_unlock(&mmu_context_lock);
58 return -ENOMEM; 58 return -ENOMEM;
59 } 59 }
@@ -85,7 +85,7 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
85void __destroy_context(int context_id) 85void __destroy_context(int context_id)
86{ 86{
87 spin_lock(&mmu_context_lock); 87 spin_lock(&mmu_context_lock);
88 idr_remove(&mmu_context_idr, context_id); 88 ida_remove(&mmu_context_ida, context_id);
89 spin_unlock(&mmu_context_lock); 89 spin_unlock(&mmu_context_lock);
90} 90}
91EXPORT_SYMBOL_GPL(__destroy_context); 91EXPORT_SYMBOL_GPL(__destroy_context);