aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r--include/linux/kernel.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index dc7e0d0a6474..ca9ff6411dfa 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -141,6 +141,15 @@ extern int _cond_resched(void);
141 (__x < 0) ? -__x : __x; \ 141 (__x < 0) ? -__x : __x; \
142 }) 142 })
143 143
144#ifdef CONFIG_PROVE_LOCKING
145void might_fault(void);
146#else
147static inline void might_fault(void)
148{
149 might_sleep();
150}
151#endif
152
144extern struct atomic_notifier_head panic_notifier_list; 153extern struct atomic_notifier_head panic_notifier_list;
145extern long (*panic_blink)(long time); 154extern long (*panic_blink)(long time);
146NORET_TYPE void panic(const char * fmt, ...) 155NORET_TYPE void panic(const char * fmt, ...)
@@ -188,6 +197,8 @@ extern unsigned long long memparse(const char *ptr, char **retptr);
188extern int core_kernel_text(unsigned long addr); 197extern int core_kernel_text(unsigned long addr);
189extern int __kernel_text_address(unsigned long addr); 198extern int __kernel_text_address(unsigned long addr);
190extern int kernel_text_address(unsigned long addr); 199extern int kernel_text_address(unsigned long addr);
200extern int func_ptr_is_kernel_text(void *ptr);
201
191struct pid; 202struct pid;
192extern struct pid *session_of_pgrp(struct pid *pgrp); 203extern struct pid *session_of_pgrp(struct pid *pgrp);
193 204
@@ -361,18 +372,6 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
361 ((unsigned char *)&addr)[3] 372 ((unsigned char *)&addr)[3]
362#define NIPQUAD_FMT "%u.%u.%u.%u" 373#define NIPQUAD_FMT "%u.%u.%u.%u"
363 374
364#define NIP6(addr) \
365 ntohs((addr).s6_addr16[0]), \
366 ntohs((addr).s6_addr16[1]), \
367 ntohs((addr).s6_addr16[2]), \
368 ntohs((addr).s6_addr16[3]), \
369 ntohs((addr).s6_addr16[4]), \
370 ntohs((addr).s6_addr16[5]), \
371 ntohs((addr).s6_addr16[6]), \
372 ntohs((addr).s6_addr16[7])
373#define NIP6_FMT "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x"
374#define NIP6_SEQFMT "%04x%04x%04x%04x%04x%04x%04x%04x"
375
376#if defined(__LITTLE_ENDIAN) 375#if defined(__LITTLE_ENDIAN)
377#define HIPQUAD(addr) \ 376#define HIPQUAD(addr) \
378 ((unsigned char *)&addr)[3], \ 377 ((unsigned char *)&addr)[3], \