diff options
| author | Grant Likely <grant.likely@secretlab.ca> | 2010-05-25 02:38:26 -0400 |
|---|---|---|
| committer | Grant Likely <grant.likely@secretlab.ca> | 2010-05-25 02:38:26 -0400 |
| commit | b1e50ebcf24668e57f058deb48b0704b5391ed0f (patch) | |
| tree | 17e1b69b249d0738317b732186340c9dd053f1a1 /include/linux/kernel.h | |
| parent | 0c2a2ae32793e3500a15a449612485f5d17dd431 (diff) | |
| parent | 7e125f7b9cbfce4101191b8076d606c517a73066 (diff) | |
Merge remote branch 'origin' into secretlab/next-spi
Diffstat (limited to 'include/linux/kernel.h')
| -rw-r--r-- | include/linux/kernel.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 9365227dbaf6..cc5e3ffe9fce 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -4,6 +4,8 @@ | |||
| 4 | /* | 4 | /* |
| 5 | * 'kernel.h' contains some often-used function prototypes etc | 5 | * 'kernel.h' contains some often-used function prototypes etc |
| 6 | */ | 6 | */ |
| 7 | #define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1) | ||
| 8 | #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) | ||
| 7 | 9 | ||
| 8 | #ifdef __KERNEL__ | 10 | #ifdef __KERNEL__ |
| 9 | 11 | ||
| @@ -37,8 +39,8 @@ extern const char linux_proc_banner[]; | |||
| 37 | 39 | ||
| 38 | #define STACK_MAGIC 0xdeadbeef | 40 | #define STACK_MAGIC 0xdeadbeef |
| 39 | 41 | ||
| 40 | #define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1) | 42 | #define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) |
| 41 | #define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) | 43 | #define __ALIGN_MASK(x, mask) __ALIGN_KERNEL_MASK((x), (mask)) |
| 42 | #define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a))) | 44 | #define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a))) |
| 43 | #define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0) | 45 | #define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0) |
| 44 | 46 | ||
| @@ -344,6 +346,7 @@ extern enum system_states { | |||
| 344 | #define TAINT_OVERRIDDEN_ACPI_TABLE 8 | 346 | #define TAINT_OVERRIDDEN_ACPI_TABLE 8 |
| 345 | #define TAINT_WARN 9 | 347 | #define TAINT_WARN 9 |
| 346 | #define TAINT_CRAP 10 | 348 | #define TAINT_CRAP 10 |
| 349 | #define TAINT_FIRMWARE_WORKAROUND 11 | ||
| 347 | 350 | ||
| 348 | extern void dump_stack(void) __cold; | 351 | extern void dump_stack(void) __cold; |
| 349 | 352 | ||
| @@ -490,6 +493,13 @@ static inline void tracing_off(void) { } | |||
| 490 | static inline void tracing_off_permanent(void) { } | 493 | static inline void tracing_off_permanent(void) { } |
| 491 | static inline int tracing_is_on(void) { return 0; } | 494 | static inline int tracing_is_on(void) { return 0; } |
| 492 | #endif | 495 | #endif |
| 496 | |||
| 497 | enum ftrace_dump_mode { | ||
| 498 | DUMP_NONE, | ||
| 499 | DUMP_ALL, | ||
| 500 | DUMP_ORIG, | ||
| 501 | }; | ||
| 502 | |||
| 493 | #ifdef CONFIG_TRACING | 503 | #ifdef CONFIG_TRACING |
| 494 | extern void tracing_start(void); | 504 | extern void tracing_start(void); |
| 495 | extern void tracing_stop(void); | 505 | extern void tracing_stop(void); |
| @@ -571,7 +581,7 @@ __ftrace_vbprintk(unsigned long ip, const char *fmt, va_list ap); | |||
| 571 | extern int | 581 | extern int |
| 572 | __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap); | 582 | __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap); |
| 573 | 583 | ||
| 574 | extern void ftrace_dump(void); | 584 | extern void ftrace_dump(enum ftrace_dump_mode oops_dump_mode); |
| 575 | #else | 585 | #else |
| 576 | static inline void | 586 | static inline void |
| 577 | ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { } | 587 | ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { } |
| @@ -592,7 +602,7 @@ ftrace_vprintk(const char *fmt, va_list ap) | |||
| 592 | { | 602 | { |
| 593 | return 0; | 603 | return 0; |
| 594 | } | 604 | } |
| 595 | static inline void ftrace_dump(void) { } | 605 | static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } |
| 596 | #endif /* CONFIG_TRACING */ | 606 | #endif /* CONFIG_TRACING */ |
| 597 | 607 | ||
| 598 | /* | 608 | /* |
