aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/cpu
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2005-12-20 17:46:07 -0500
committerDave Jones <davej@redhat.com>2005-12-20 17:46:07 -0500
commitc32017a43d552b78717160bf6aab2af8a7ff84c4 (patch)
tree472d2fac918ca8c02e828ce4b6c72f68ad624344 /arch/i386/kernel/cpu
parentf8a363b83f18356ebf0df0904fa4807ae48b21f2 (diff)
[X86] Rename MTRR mutex to something more sensible.
I spotted 'main_lock' whilst grovelling through a vmlinux with objdump. Even if it is static, it's a horrible name. Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'arch/i386/kernel/cpu')
-rw-r--r--arch/i386/kernel/cpu/mtrr/main.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/i386/kernel/cpu/mtrr/main.c b/arch/i386/kernel/cpu/mtrr/main.c
index 1e9db198c440..1a577768d4da 100644
--- a/arch/i386/kernel/cpu/mtrr/main.c
+++ b/arch/i386/kernel/cpu/mtrr/main.c
@@ -49,7 +49,7 @@
49u32 num_var_ranges = 0; 49u32 num_var_ranges = 0;
50 50
51unsigned int *usage_table; 51unsigned int *usage_table;
52static DECLARE_MUTEX(main_lock); 52static DECLARE_MUTEX(mtrr_sem);
53 53
54u32 size_or_mask, size_and_mask; 54u32 size_or_mask, size_and_mask;
55 55
@@ -335,7 +335,7 @@ int mtrr_add_page(unsigned long base, unsigned long size,
335 /* No CPU hotplug when we change MTRR entries */ 335 /* No CPU hotplug when we change MTRR entries */
336 lock_cpu_hotplug(); 336 lock_cpu_hotplug();
337 /* Search for existing MTRR */ 337 /* Search for existing MTRR */
338 down(&main_lock); 338 down(&mtrr_sem);
339 for (i = 0; i < num_var_ranges; ++i) { 339 for (i = 0; i < num_var_ranges; ++i) {
340 mtrr_if->get(i, &lbase, &lsize, &ltype); 340 mtrr_if->get(i, &lbase, &lsize, &ltype);
341 if (base >= lbase + lsize) 341 if (base >= lbase + lsize)
@@ -373,7 +373,7 @@ int mtrr_add_page(unsigned long base, unsigned long size,
373 printk(KERN_INFO "mtrr: no more MTRRs available\n"); 373 printk(KERN_INFO "mtrr: no more MTRRs available\n");
374 error = i; 374 error = i;
375 out: 375 out:
376 up(&main_lock); 376 up(&mtrr_sem);
377 unlock_cpu_hotplug(); 377 unlock_cpu_hotplug();
378 return error; 378 return error;
379} 379}
@@ -466,7 +466,7 @@ int mtrr_del_page(int reg, unsigned long base, unsigned long size)
466 max = num_var_ranges; 466 max = num_var_ranges;
467 /* No CPU hotplug when we change MTRR entries */ 467 /* No CPU hotplug when we change MTRR entries */
468 lock_cpu_hotplug(); 468 lock_cpu_hotplug();
469 down(&main_lock); 469 down(&mtrr_sem);
470 if (reg < 0) { 470 if (reg < 0) {
471 /* Search for existing MTRR */ 471 /* Search for existing MTRR */
472 for (i = 0; i < max; ++i) { 472 for (i = 0; i < max; ++i) {
@@ -505,7 +505,7 @@ int mtrr_del_page(int reg, unsigned long base, unsigned long size)
505 set_mtrr(reg, 0, 0, 0); 505 set_mtrr(reg, 0, 0, 0);
506 error = reg; 506 error = reg;
507 out: 507 out:
508 up(&main_lock); 508 up(&mtrr_sem);
509 unlock_cpu_hotplug(); 509 unlock_cpu_hotplug();
510 return error; 510 return error;
511} 511}
@@ -688,7 +688,7 @@ void mtrr_ap_init(void)
688 if (!mtrr_if || !use_intel()) 688 if (!mtrr_if || !use_intel())
689 return; 689 return;
690 /* 690 /*
691 * Ideally we should hold main_lock here to avoid mtrr entries changed, 691 * Ideally we should hold mtrr_sem here to avoid mtrr entries changed,
692 * but this routine will be called in cpu boot time, holding the lock 692 * but this routine will be called in cpu boot time, holding the lock
693 * breaks it. This routine is called in two cases: 1.very earily time 693 * breaks it. This routine is called in two cases: 1.very earily time
694 * of software resume, when there absolutely isn't mtrr entry changes; 694 * of software resume, when there absolutely isn't mtrr entry changes;