diff options
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r-- | include/linux/kernel.h | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 9e01f376840a..2df44e773270 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -133,7 +133,7 @@ NORET_TYPE void panic(const char * fmt, ...) | |||
133 | extern void oops_enter(void); | 133 | extern void oops_enter(void); |
134 | extern void oops_exit(void); | 134 | extern void oops_exit(void); |
135 | extern int oops_may_print(void); | 135 | extern int oops_may_print(void); |
136 | fastcall NORET_TYPE void do_exit(long error_code) | 136 | NORET_TYPE void do_exit(long error_code) |
137 | ATTRIB_NORET; | 137 | ATTRIB_NORET; |
138 | NORET_TYPE void complete_and_exit(struct completion *, long) | 138 | NORET_TYPE void complete_and_exit(struct completion *, long) |
139 | ATTRIB_NORET; | 139 | ATTRIB_NORET; |
@@ -141,6 +141,10 @@ extern unsigned long simple_strtoul(const char *,char **,unsigned int); | |||
141 | extern long simple_strtol(const char *,char **,unsigned int); | 141 | extern long simple_strtol(const char *,char **,unsigned int); |
142 | extern unsigned long long simple_strtoull(const char *,char **,unsigned int); | 142 | extern unsigned long long simple_strtoull(const char *,char **,unsigned int); |
143 | extern long long simple_strtoll(const char *,char **,unsigned int); | 143 | extern long long simple_strtoll(const char *,char **,unsigned int); |
144 | extern int strict_strtoul(const char *, unsigned int, unsigned long *); | ||
145 | extern int strict_strtol(const char *, unsigned int, long *); | ||
146 | extern int strict_strtoull(const char *, unsigned int, unsigned long long *); | ||
147 | extern int strict_strtoll(const char *, unsigned int, long long *); | ||
144 | extern int sprintf(char * buf, const char * fmt, ...) | 148 | extern int sprintf(char * buf, const char * fmt, ...) |
145 | __attribute__ ((format (printf, 2, 3))); | 149 | __attribute__ ((format (printf, 2, 3))); |
146 | extern int vsprintf(char *buf, const char *, va_list) | 150 | extern int vsprintf(char *buf, const char *, va_list) |
@@ -172,8 +176,6 @@ extern int kernel_text_address(unsigned long addr); | |||
172 | struct pid; | 176 | struct pid; |
173 | extern struct pid *session_of_pgrp(struct pid *pgrp); | 177 | extern struct pid *session_of_pgrp(struct pid *pgrp); |
174 | 178 | ||
175 | extern void dump_thread(struct pt_regs *regs, struct user *dump); | ||
176 | |||
177 | #ifdef CONFIG_PRINTK | 179 | #ifdef CONFIG_PRINTK |
178 | asmlinkage int vprintk(const char *fmt, va_list args) | 180 | asmlinkage int vprintk(const char *fmt, va_list args) |
179 | __attribute__ ((format (printf, 1, 0))); | 181 | __attribute__ ((format (printf, 1, 0))); |
@@ -182,6 +184,13 @@ asmlinkage int printk(const char * fmt, ...) | |||
182 | extern int log_buf_get_len(void); | 184 | extern int log_buf_get_len(void); |
183 | extern int log_buf_read(int idx); | 185 | extern int log_buf_read(int idx); |
184 | extern int log_buf_copy(char *dest, int idx, int len); | 186 | extern int log_buf_copy(char *dest, int idx, int len); |
187 | |||
188 | extern int printk_ratelimit_jiffies; | ||
189 | extern int printk_ratelimit_burst; | ||
190 | extern int printk_ratelimit(void); | ||
191 | extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst); | ||
192 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, | ||
193 | unsigned int interval_msec); | ||
185 | #else | 194 | #else |
186 | static inline int vprintk(const char *s, va_list args) | 195 | static inline int vprintk(const char *s, va_list args) |
187 | __attribute__ ((format (printf, 1, 0))); | 196 | __attribute__ ((format (printf, 1, 0))); |
@@ -192,6 +201,12 @@ static inline int __cold printk(const char *s, ...) { return 0; } | |||
192 | static inline int log_buf_get_len(void) { return 0; } | 201 | static inline int log_buf_get_len(void) { return 0; } |
193 | static inline int log_buf_read(int idx) { return 0; } | 202 | static inline int log_buf_read(int idx) { return 0; } |
194 | static inline int log_buf_copy(char *dest, int idx, int len) { return 0; } | 203 | static inline int log_buf_copy(char *dest, int idx, int len) { return 0; } |
204 | static inline int printk_ratelimit(void) { return 0; } | ||
205 | static inline int __printk_ratelimit(int ratelimit_jiffies, \ | ||
206 | int ratelimit_burst) { return 0; } | ||
207 | static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \ | ||
208 | unsigned int interval_msec) \ | ||
209 | { return false; } | ||
195 | #endif | 210 | #endif |
196 | 211 | ||
197 | extern void __attribute__((format(printf, 1, 2))) | 212 | extern void __attribute__((format(printf, 1, 2))) |
@@ -199,11 +214,6 @@ extern void __attribute__((format(printf, 1, 2))) | |||
199 | 214 | ||
200 | unsigned long int_sqrt(unsigned long); | 215 | unsigned long int_sqrt(unsigned long); |
201 | 216 | ||
202 | extern int printk_ratelimit(void); | ||
203 | extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst); | ||
204 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, | ||
205 | unsigned int interval_msec); | ||
206 | |||
207 | static inline void console_silent(void) | 217 | static inline void console_silent(void) |
208 | { | 218 | { |
209 | console_loglevel = 0; | 219 | console_loglevel = 0; |
@@ -224,6 +234,7 @@ extern int panic_on_unrecovered_nmi; | |||
224 | extern int tainted; | 234 | extern int tainted; |
225 | extern const char *print_tainted(void); | 235 | extern const char *print_tainted(void); |
226 | extern void add_taint(unsigned); | 236 | extern void add_taint(unsigned); |
237 | extern int root_mountflags; | ||
227 | 238 | ||
228 | /* Values used for system_state */ | 239 | /* Values used for system_state */ |
229 | extern enum system_states { | 240 | extern enum system_states { |