diff options
author | Josh Triplett <josht@us.ibm.com> | 2006-09-29 04:59:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-29 12:18:07 -0400 |
commit | b0de7fca10a3d7ddb99188b4752cc473c4e2c96e (patch) | |
tree | 65cfecd5fbd0fad2278b56271c05467e3b615db4 | |
parent | 538d9d532b0e0320c9dd326a560b5a72d73f910d (diff) |
[PATCH] efi: add lock annotations for efi_call_phys_prelog and efi_call_phys_epilog
The functions efi_call_phys_prelog and efi_call_phys_epilog in
arch/i386/kernel/efi.c wrap the spinlock efi_rt_lock: efi_call_phys_prelog
returns with the lock held, and efi_call_phys_epilog releases the lock
without acquiring it. Add lock annotations to these two functions so that
sparse can check callers for lock pairing, and so that sparse will not
complain about these functions since they intentionally use locks in this
manner.
Signed-off-by: Josh Triplett <josh@freedesktop.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/i386/kernel/efi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/i386/kernel/efi.c b/arch/i386/kernel/efi.c index fe158042110b..f9436989473c 100644 --- a/arch/i386/kernel/efi.c +++ b/arch/i386/kernel/efi.c | |||
@@ -65,7 +65,7 @@ static unsigned long efi_rt_eflags; | |||
65 | static DEFINE_SPINLOCK(efi_rt_lock); | 65 | static DEFINE_SPINLOCK(efi_rt_lock); |
66 | static pgd_t efi_bak_pg_dir_pointer[2]; | 66 | static pgd_t efi_bak_pg_dir_pointer[2]; |
67 | 67 | ||
68 | static void efi_call_phys_prelog(void) | 68 | static void efi_call_phys_prelog(void) __acquires(efi_rt_lock) |
69 | { | 69 | { |
70 | unsigned long cr4; | 70 | unsigned long cr4; |
71 | unsigned long temp; | 71 | unsigned long temp; |
@@ -109,7 +109,7 @@ static void efi_call_phys_prelog(void) | |||
109 | load_gdt(cpu_gdt_descr); | 109 | load_gdt(cpu_gdt_descr); |
110 | } | 110 | } |
111 | 111 | ||
112 | static void efi_call_phys_epilog(void) | 112 | static void efi_call_phys_epilog(void) __releases(efi_rt_lock) |
113 | { | 113 | { |
114 | unsigned long cr4; | 114 | unsigned long cr4; |
115 | struct Xgt_desc_struct *cpu_gdt_descr = &per_cpu(cpu_gdt_descr, 0); | 115 | struct Xgt_desc_struct *cpu_gdt_descr = &per_cpu(cpu_gdt_descr, 0); |