diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2006-10-19 21:47:16 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-10-24 21:54:02 -0400 |
commit | 7aeb732428fc8e2ecae6d432873770c12f04a979 (patch) | |
tree | 00a0fed4a824bc2a5857e9f0b4016cef0bb22e9e /include/asm-powerpc | |
parent | 42c4aaadb737e0e672b3fb86b2c41ff59f0fb8bc (diff) |
[POWERPC] Support nested cpu feature sections
This patch adds some macros that can be used with an explicit label in
order to nest cpu features. This should be used very careful but is
necessary for the upcoming cell TB fixup.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r-- | include/asm-powerpc/cputable.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h index 4d22218739e0..65faf322ace0 100644 --- a/include/asm-powerpc/cputable.h +++ b/include/asm-powerpc/cputable.h | |||
@@ -434,30 +434,34 @@ static inline int cpu_has_feature(unsigned long feature) | |||
434 | 434 | ||
435 | #ifdef __ASSEMBLY__ | 435 | #ifdef __ASSEMBLY__ |
436 | 436 | ||
437 | #define BEGIN_FTR_SECTION 98: | 437 | #define BEGIN_FTR_SECTION_NESTED(label) label: |
438 | #define BEGIN_FTR_SECTION BEGIN_FTR_SECTION_NESTED(98) | ||
438 | 439 | ||
439 | #ifndef __powerpc64__ | 440 | #ifndef __powerpc64__ |
440 | #define END_FTR_SECTION(msk, val) \ | 441 | #define END_FTR_SECTION_NESTED(msk, val, label) \ |
441 | 99: \ | 442 | 99: \ |
442 | .section __ftr_fixup,"a"; \ | 443 | .section __ftr_fixup,"a"; \ |
443 | .align 2; \ | 444 | .align 2; \ |
444 | .long msk; \ | 445 | .long msk; \ |
445 | .long val; \ | 446 | .long val; \ |
446 | .long 98b; \ | 447 | .long label##b; \ |
447 | .long 99b; \ | 448 | .long 99b; \ |
448 | .previous | 449 | .previous |
449 | #else /* __powerpc64__ */ | 450 | #else /* __powerpc64__ */ |
450 | #define END_FTR_SECTION(msk, val) \ | 451 | #define END_FTR_SECTION_NESTED(msk, val, label) \ |
451 | 99: \ | 452 | 99: \ |
452 | .section __ftr_fixup,"a"; \ | 453 | .section __ftr_fixup,"a"; \ |
453 | .align 3; \ | 454 | .align 3; \ |
454 | .llong msk; \ | 455 | .llong msk; \ |
455 | .llong val; \ | 456 | .llong val; \ |
456 | .llong 98b; \ | 457 | .llong label##b; \ |
457 | .llong 99b; \ | 458 | .llong 99b; \ |
458 | .previous | 459 | .previous |
459 | #endif /* __powerpc64__ */ | 460 | #endif /* __powerpc64__ */ |
460 | 461 | ||
462 | #define END_FTR_SECTION(msk, val) \ | ||
463 | END_FTR_SECTION_NESTED(msk, val, 98) | ||
464 | |||
461 | #define END_FTR_SECTION_IFSET(msk) END_FTR_SECTION((msk), (msk)) | 465 | #define END_FTR_SECTION_IFSET(msk) END_FTR_SECTION((msk), (msk)) |
462 | #define END_FTR_SECTION_IFCLR(msk) END_FTR_SECTION((msk), 0) | 466 | #define END_FTR_SECTION_IFCLR(msk) END_FTR_SECTION((msk), 0) |
463 | #endif /* __ASSEMBLY__ */ | 467 | #endif /* __ASSEMBLY__ */ |