--- zzzz-none-000/linux-2.6.39.4/include/linux/kernel.h 2011-08-03 19:43:28.000000000 +0000 +++ puma6-arm-6490-729/linux-2.6.39.4/include/linux/kernel.h 2021-11-10 13:23:10.000000000 +0000 @@ -35,6 +35,19 @@ #define LLONG_MIN (-LLONG_MAX - 1) #define ULLONG_MAX (~0ULL) +#define U8_MAX ((u8)~0U) +#define S8_MAX ((s8)(U8_MAX>>1)) +#define S8_MIN ((s8)(-S8_MAX - 1)) +#define U16_MAX ((u16)~0U) +#define S16_MAX ((s16)(U16_MAX>>1)) +#define S16_MIN ((s16)(-S16_MAX - 1)) +#define U32_MAX ((u32)~0U) +#define S32_MAX ((s32)(U32_MAX>>1)) +#define S32_MIN ((s32)(-S32_MAX - 1)) +#define U64_MAX ((u64)~0ULL) +#define S64_MAX ((s64)(U64_MAX>>1)) +#define S64_MIN ((s64)(-S64_MAX - 1)) + #define STACK_MAGIC 0xdeadbeef #define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) @@ -136,8 +149,8 @@ # define might_sleep() \ do { __might_sleep(__FILE__, __LINE__, 0); might_resched(); } while (0) #else - static inline void __might_sleep(const char *file, int line, - int preempt_offset) { } + static inline void __might_sleep(const char *file __attribute__((unused)), int line __attribute__((unused)), + int preempt_offset __attribute__((unused))) { } # define might_sleep() do { might_resched(); } while (0) #endif @@ -161,6 +174,12 @@ ret; \ }) +#define labs(x) ({ \ + long __x = (x); \ + (__x < 0) ? -__x : __x; \ + }) + + #define abs64(x) ({ \ s64 __x = (x); \ (__x < 0) ? -__x : __x; \ @@ -388,7 +407,7 @@ extern void ftrace_off_permanent(void); static inline void __attribute__ ((format (printf, 1, 2))) -____trace_printk_check_format(const char *fmt, ...) +____trace_printk_check_format(const char *fmt __attribute__((unused)), ...) { } #define __trace_printk_check_format(fmt, args...) \ @@ -470,16 +489,16 @@ static inline void ftrace_off_permanent(void) { } static inline void trace_dump_stack(void) { } static inline int -trace_printk(const char *fmt, ...) +trace_printk(const char *fmt __attribute__((unused)), ...) { return 0; } static inline int -ftrace_vprintk(const char *fmt, va_list ap) +ftrace_vprintk(const char *fmt __attribute__((unused)), va_list ap __attribute__((unused))) { return 0; } -static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } +static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode __attribute__((unused))) { } #endif /* CONFIG_TRACING */ /* @@ -696,4 +715,15 @@ # define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD #endif +/*------------------------------------------------------------------------------------------*\ + * Darf während der Compilergenerierung nicht sichtbar sein +\*------------------------------------------------------------------------------------------*/ +#ifdef __KERNEL__ +/*--- old avm-stuff (depreciated) ---*/ +extern asmlinkage int (*__printk)(const char * fmt, ...) __attribute__ ((format (printf, 1, 2))); +extern asmlinkage int (*_printk)(const char * fmt, ...) __attribute__ ((format (printf, 1, 2))); +extern asmlinkage int (*_vprintk)(const char * fmt, va_list args); +extern void restore_printk(void); +#endif /* __KERNEL__ */ + #endif