diff options
author | Philippe Gerum <rpm@xenomai.org> | 2009-10-27 17:05:31 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-12-15 00:15:12 -0500 |
commit | d2685fb7b4df2850359d6ee297269a285886032d (patch) | |
tree | fada248782a4bd8e774836ee40ee0bc672bad4a8 /arch/blackfin/include/asm/ipipe_base.h | |
parent | ab843c7940394584d5ec548f443cb431c0752ca5 (diff) |
Blackfin/ipipe: prepare status bitops for SMP support
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Li Yi <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/include/asm/ipipe_base.h')
-rw-r--r-- | arch/blackfin/include/asm/ipipe_base.h | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/arch/blackfin/include/asm/ipipe_base.h b/arch/blackfin/include/asm/ipipe_base.h index 490098f532a7..00409201d9ed 100644 --- a/arch/blackfin/include/asm/ipipe_base.h +++ b/arch/blackfin/include/asm/ipipe_base.h | |||
@@ -51,23 +51,15 @@ | |||
51 | 51 | ||
52 | extern unsigned long __ipipe_root_status; /* Alias to ipipe_root_cpudom_var(status) */ | 52 | extern unsigned long __ipipe_root_status; /* Alias to ipipe_root_cpudom_var(status) */ |
53 | 53 | ||
54 | #define __ipipe_stall_root() \ | 54 | void __ipipe_stall_root(void); |
55 | do { \ | 55 | |
56 | volatile unsigned long *p = &__ipipe_root_status; \ | 56 | unsigned long __ipipe_test_and_stall_root(void); |
57 | set_bit(0, p); \ | 57 | |
58 | } while (0) | 58 | unsigned long __ipipe_test_root(void); |
59 | 59 | ||
60 | #define __ipipe_test_and_stall_root() \ | 60 | void __ipipe_lock_root(void); |
61 | ({ \ | 61 | |
62 | volatile unsigned long *p = &__ipipe_root_status; \ | 62 | void __ipipe_unlock_root(void); |
63 | test_and_set_bit(0, p); \ | ||
64 | }) | ||
65 | |||
66 | #define __ipipe_test_root() \ | ||
67 | ({ \ | ||
68 | const unsigned long *p = &__ipipe_root_status; \ | ||
69 | test_bit(0, p); \ | ||
70 | }) | ||
71 | 63 | ||
72 | #endif /* !__ASSEMBLY__ */ | 64 | #endif /* !__ASSEMBLY__ */ |
73 | 65 | ||