diff options
| -rw-r--r-- | arch/powerpc/mm/mmu_context_hash64.c | 10 |
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 | ||
| 25 | static DEFINE_SPINLOCK(mmu_context_lock); | 25 | static DEFINE_SPINLOCK(mmu_context_lock); |
| 26 | static DEFINE_IDR(mmu_context_idr); | 26 | static 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 | ||
| 41 | again: | 41 | again: |
| 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) | |||
| 85 | void __destroy_context(int context_id) | 85 | void __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 | } |
| 91 | EXPORT_SYMBOL_GPL(__destroy_context); | 91 | EXPORT_SYMBOL_GPL(__destroy_context); |
