diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2006-03-23 07:33:03 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-03-26 22:48:12 -0500 |
commit | dd4d7bfad635dddc56b74dab1894ef01c8c836e1 (patch) | |
tree | 4ce50568ffa94cd01803c57881d59c8bacda6dbe | |
parent | e3f94b85f98a346c5eb0ac0d9539b71cb7057143 (diff) |
[PATCH] powerpc: Change firmware_has_feature() to a macro
So that we can use firmware_has_feature() in a BUG_ON() and have the compiler
elide the code entirely if the feature can never be set, change
firmware_has_feature to a macro. Unfortunate, but necessary at least until
GCC bug #26724 is fixed.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r-- | include/asm-powerpc/firmware.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/include/asm-powerpc/firmware.h b/include/asm-powerpc/firmware.h index ce3788224ed0..03c2fdff021b 100644 --- a/include/asm-powerpc/firmware.h +++ b/include/asm-powerpc/firmware.h | |||
@@ -84,11 +84,9 @@ enum { | |||
84 | */ | 84 | */ |
85 | extern unsigned long ppc64_firmware_features; | 85 | extern unsigned long ppc64_firmware_features; |
86 | 86 | ||
87 | static inline unsigned long firmware_has_feature(unsigned long feature) | 87 | #define firmware_has_feature(feature) \ |
88 | { | 88 | ((FW_FEATURE_ALWAYS & (feature)) || \ |
89 | return (FW_FEATURE_ALWAYS & feature) || | 89 | (FW_FEATURE_POSSIBLE & ppc64_firmware_features & (feature))) |
90 | (FW_FEATURE_POSSIBLE & ppc64_firmware_features & feature); | ||
91 | } | ||
92 | 90 | ||
93 | extern void system_reset_fwnmi(void); | 91 | extern void system_reset_fwnmi(void); |
94 | extern void machine_check_fwnmi(void); | 92 | extern void machine_check_fwnmi(void); |