Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions | Variables
kernel.h File Reference
#include <stdarg.h>
#include <linux/linkage.h>
#include <linux/stddef.h>
#include <linux/types.h>
#include <linux/compiler.h>
#include <linux/bitops.h>
#include <linux/log2.h>
#include <linux/typecheck.h>
#include <linux/printk.h>
#include <linux/dynamic_debug.h>
#include <asm/byteorder.h>
#include <uapi/linux/kernel.h>

Go to the source code of this file.

Macros

#define USHRT_MAX   ((u16)(~0U))
 
#define SHRT_MAX   ((s16)(USHRT_MAX>>1))
 
#define SHRT_MIN   ((s16)(-SHRT_MAX - 1))
 
#define INT_MAX   ((int)(~0U>>1))
 
#define INT_MIN   (-INT_MAX - 1)
 
#define UINT_MAX   (~0U)
 
#define LONG_MAX   ((long)(~0UL>>1))
 
#define LONG_MIN   (-LONG_MAX - 1)
 
#define ULONG_MAX   (~0UL)
 
#define LLONG_MAX   ((long long)(~0ULL>>1))
 
#define LLONG_MIN   (-LLONG_MAX - 1)
 
#define ULLONG_MAX   (~0ULL)
 
#define SIZE_MAX   (~(size_t)0)
 
#define STACK_MAGIC   0xdeadbeef
 
#define REPEAT_BYTE(x)   ((~0ul / 0xff) * (x))
 
#define ALIGN(x, a)   __ALIGN_KERNEL((x), (a))
 
#define __ALIGN_MASK(x, mask)   __ALIGN_KERNEL_MASK((x), (mask))
 
#define PTR_ALIGN(p, a)   ((typeof(p))ALIGN((unsigned long)(p), (a)))
 
#define IS_ALIGNED(x, a)   (((x) & ((typeof(x))(a) - 1)) == 0)
 
#define ARRAY_SIZE(arr)   (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
 
#define __round_mask(x, y)   ((__typeof__(x))((y)-1))
 
#define round_up(x, y)   ((((x)-1) | __round_mask(x, y))+1)
 
#define round_down(x, y)   ((x) & ~__round_mask(x, y))
 
#define FIELD_SIZEOF(t, f)   (sizeof(((t*)0)->f))
 
#define DIV_ROUND_UP(n, d)   (((n) + (d) - 1) / (d))
 
#define DIV_ROUND_UP_ULL(ll, d)   ({ unsigned long long _tmp = (ll)+(d)-1; do_div(_tmp, d); _tmp; })
 
#define DIV_ROUND_UP_SECTOR_T(ll, d)   DIV_ROUND_UP(ll,d)
 
#define roundup(x, y)
 
#define rounddown(x, y)
 
#define DIV_ROUND_CLOSEST(x, divisor)
 
#define mult_frac(x, numer, denom)
 
#define _RET_IP_   (unsigned long)__builtin_return_address(0)
 
#define _THIS_IP_   ({ __label__ __here; __here: (unsigned long)&&__here; })
 
#define sector_div(n, b)
 
#define upper_32_bits(n)   ((u32)(((n) >> 16) >> 16))
 
#define lower_32_bits(n)   ((u32)(n))
 
#define might_resched()   do { } while (0)
 
#define might_sleep()   do { might_resched(); } while (0)
 
#define might_sleep_if(cond)   do { if (cond) might_sleep(); } while (0)
 
#define abs(x)
 
#define abs64(x)
 
#define strict_strtoul   kstrtoul
 
#define strict_strtol   kstrtol
 
#define strict_strtoull   kstrtoull
 
#define strict_strtoll   kstrtoll
 
#define TAINT_PROPRIETARY_MODULE   0
 
#define TAINT_FORCED_MODULE   1
 
#define TAINT_UNSAFE_SMP   2
 
#define TAINT_FORCED_RMMOD   3
 
#define TAINT_MACHINE_CHECK   4
 
#define TAINT_BAD_PAGE   5
 
#define TAINT_USER   6
 
#define TAINT_DIE   7
 
#define TAINT_OVERRIDDEN_ACPI_TABLE   8
 
#define TAINT_WARN   9
 
#define TAINT_CRAP   10
 
#define TAINT_FIRMWARE_WORKAROUND   11
 
#define TAINT_OOT_MODULE   12
 
#define hex_asc_lo(x)   hex_asc[((x) & 0x0f)]
 
#define hex_asc_hi(x)   hex_asc[((x) & 0xf0) >> 4]
 
#define min(x, y)
 
#define max(x, y)
 
#define min3(x, y, z)
 
#define max3(x, y, z)
 
#define min_not_zero(x, y)
 
#define clamp(val, min, max)
 
#define min_t(type, x, y)
 
#define max_t(type, x, y)
 
#define clamp_t(type, val, min, max)
 
#define clamp_val(val, min, max)
 
#define swap(a, b)   do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0)
 
#define container_of(ptr, type, member)
 
#define __FUNCTION__   (__func__)
 
#define NUMA_BUILD   0
 
#define COMPACTION_BUILD   0
 
#define SYMBOL_PREFIX   ""
 

Enumerations

enum  system_states {
  SYSTEM_BOOTING, SYSTEM_RUNNING, SYSTEM_HALT, SYSTEM_POWER_OFF,
  SYSTEM_RESTART
}
 
enum  ftrace_dump_mode { DUMP_NONE, DUMP_ALL, DUMP_ORIG }
 

Functions

 __printf (1, 2) void panic(const char *fmt
 
void oops_enter (void)
 
void oops_exit (void)
 
void print_oops_end_marker (void)
 
int oops_may_print (void)
 
void do_exit (long error_code) __noreturn
 
void complete_and_exit (struct completion *, long) __noreturn
 
int __must_check _kstrtoul (const char *s, unsigned int base, unsigned long *res)
 
int __must_check _kstrtol (const char *s, unsigned int base, long *res)
 
int __must_check kstrtoull (const char *s, unsigned int base, unsigned long long *res)
 
int __must_check kstrtoll (const char *s, unsigned int base, long long *res)
 
int __must_check kstrtouint (const char *s, unsigned int base, unsigned int *res)
 
int __must_check kstrtoint (const char *s, unsigned int base, int *res)
 
int __must_check kstrtou16 (const char *s, unsigned int base, u16 *res)
 
int __must_check kstrtos16 (const char *s, unsigned int base, s16 *res)
 
int __must_check kstrtou8 (const char *s, unsigned int base, u8 *res)
 
int __must_check kstrtos8 (const char *s, unsigned int base, s8 *res)
 
int __must_check kstrtoull_from_user (const char __user *s, size_t count, unsigned int base, unsigned long long *res)
 
int __must_check kstrtoll_from_user (const char __user *s, size_t count, unsigned int base, long long *res)
 
int __must_check kstrtoul_from_user (const char __user *s, size_t count, unsigned int base, unsigned long *res)
 
int __must_check kstrtol_from_user (const char __user *s, size_t count, unsigned int base, long *res)
 
int __must_check kstrtouint_from_user (const char __user *s, size_t count, unsigned int base, unsigned int *res)
 
int __must_check kstrtoint_from_user (const char __user *s, size_t count, unsigned int base, int *res)
 
int __must_check kstrtou16_from_user (const char __user *s, size_t count, unsigned int base, u16 *res)
 
int __must_check kstrtos16_from_user (const char __user *s, size_t count, unsigned int base, s16 *res)
 
int __must_check kstrtou8_from_user (const char __user *s, size_t count, unsigned int base, u8 *res)
 
int __must_check kstrtos8_from_user (const char __user *s, size_t count, unsigned int base, s8 *res)
 
unsigned long simple_strtoul (const char *, char **, unsigned int)
 
long simple_strtol (const char *, char **, unsigned int)
 
unsigned long long simple_strtoull (const char *, char **, unsigned int)
 
long long simple_strtoll (const char *, char **, unsigned int)
 
int num_to_str (char *buf, int size, unsigned long long num)
 
 __printf (2, 3) int sprintf(char *buf
 
const char __printf (2, 0) int vsprintf(char *buf
 
 __printf (3, 4) int snprintf(char *buf
 
size_t const char __printf (3, 0) int vsnprintf(char *buf
 
const char charkvasprintf (gfp_t gfp, const char *fmt, va_list args)
 
 __scanf (2, 3) int sscanf(const char *
 
const char __scanf (2, 0) int vsscanf(const char *
 
int get_option (char **str, int *pint)
 
charget_options (const char *str, int nints, int *ints)
 
unsigned long long memparse (const char *ptr, char **retptr)
 
int core_kernel_text (unsigned long addr)
 
int core_kernel_data (unsigned long addr)
 
int __kernel_text_address (unsigned long addr)
 
int kernel_text_address (unsigned long addr)
 
int func_ptr_is_kernel_text (void *ptr)
 
struct pidsession_of_pgrp (struct pid *pgrp)
 
unsigned long int_sqrt (unsigned long)
 
void bust_spinlocks (int yes)
 
void wake_up_klogd (void)
 
const charprint_tainted (void)
 
void add_taint (unsigned flag)
 
int test_taint (unsigned flag)
 
unsigned long get_taint (void)
 
int hex_to_bin (char ch)
 
int __must_check hex2bin (u8 *dst, const char *src, size_t count)
 
int do_sysinfo (struct sysinfo *info)
 

Variables

struct atomic_notifier_head panic_notifier_list
 
long(* panic_blink )(int state)
 
__noreturn __cold
 
const charfmt
 
const char const char va_list
 
size_t size
 
size_t const char size_t const
char va_list 
args
 
int oops_in_progress
 
int panic_timeout
 
int panic_on_oops
 
int panic_on_unrecovered_nmi
 
int panic_on_io_nmi
 
int sysctl_panic_on_stackoverflow
 
int root_mountflags
 
bool early_boot_irqs_disabled
 
enum system_states system_state
 
const char hex_asc []
 

Macro Definition Documentation

#define __ALIGN_MASK (   x,
  mask 
)    __ALIGN_KERNEL_MASK((x), (mask))

Definition at line 37 of file kernel.h.

#define __FUNCTION__   (__func__)

Definition at line 688 of file kernel.h.

#define __round_mask (   x,
  y 
)    ((__typeof__(x))((y)-1))

Definition at line 49 of file kernel.h.

#define _RET_IP_   (unsigned long)__builtin_return_address(0)

Definition at line 105 of file kernel.h.

#define _THIS_IP_   ({ __label__ __here; __here: (unsigned long)&&__here; })

Definition at line 106 of file kernel.h.

#define abs (   x)
Value:
({ \
long ret; \
if (sizeof(x) == sizeof(long)) { \
long __x = (x); \
ret = (__x < 0) ? -__x : __x; \
} else { \
int __x = (x); \
ret = (__x < 0) ? -__x : __x; \
} \
ret; \
})

Definition at line 177 of file kernel.h.

#define abs64 (   x)
Value:
({ \
s64 __x = (x); \
(__x < 0) ? -__x : __x; \
})

Definition at line 189 of file kernel.h.

#define ALIGN (   x,
  a 
)    __ALIGN_KERNEL((x), (a))

Definition at line 36 of file kernel.h.

#define ARRAY_SIZE (   arr)    (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))

Definition at line 41 of file kernel.h.

#define clamp (   val,
  min,
  max 
)
Value:
({ \
typeof(val) __val = (val); \
typeof(min) __min = (min); \
typeof(max) __max = (max); \
(void) (&__val == &__min); \
(void) (&__val == &__max); \
__val = __val < __min ? __min: __val; \
__val > __max ? __max: __val; })

clamp - return a value clamped to a given range with strict typechecking : current value : minimum allowable value : maximum allowable value

This macro does strict typechecking of min/max to make sure they are of the same type as val. See the unnecessary pointer comparisons.

Definition at line 609 of file kernel.h.

#define clamp_t (   type,
  val,
  min,
  max 
)
Value:
({ \
type __min = (min); \
type __max = (max); \
__val = __val < __min ? __min: __val; \
__val > __max ? __max: __val; })

clamp_t - return a value clamped to a given range using a given type : the type of variable to use : current value : minimum allowable value : maximum allowable value

This macro does no typechecking and uses temporary variables of type 'type' to make all the comparisons.

Definition at line 644 of file kernel.h.

#define clamp_val (   val,
  min,
  max 
)
Value:
({ \
typeof(val) __val = (val); \
typeof(val) __min = (min); \
typeof(val) __max = (max); \
__val = __val < __min ? __min: __val; \
__val > __max ? __max: __val; })

clamp_val - return a value clamped to a given range using val's type : current value : minimum allowable value : maximum allowable value

This macro does no typechecking and uses temporary variables of whatever type the input argument 'val' is. This is useful when val is an unsigned type and min and max are literals that will otherwise be assigned a signed integer type.

Definition at line 662 of file kernel.h.

#define COMPACTION_BUILD   0

Definition at line 701 of file kernel.h.

#define container_of (   ptr,
  type,
  member 
)
Value:
({ \
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})

container_of - cast a member of a structure out to the containing structure : the pointer to the member. : the type of the container struct this is embedded in. : the name of the member within the struct.

Definition at line 683 of file kernel.h.

#define DIV_ROUND_CLOSEST (   x,
  divisor 
)
Value:
( \
{ \
typeof(x) __x = x; \
(((typeof(x))-1) > 0 || (__x) > 0) ? \
(((__x) + ((__d) / 2)) / (__d)) : \
(((__x) - ((__d) / 2)) / (__d)); \
} \
)

Definition at line 82 of file kernel.h.

#define DIV_ROUND_UP (   n,
  d 
)    (((n) + (d) - 1) / (d))

Definition at line 54 of file kernel.h.

#define DIV_ROUND_UP_SECTOR_T (   ll,
  d 
)    DIV_ROUND_UP(ll,d)

Definition at line 61 of file kernel.h.

#define DIV_ROUND_UP_ULL (   ll,
  d 
)    ({ unsigned long long _tmp = (ll)+(d)-1; do_div(_tmp, d); _tmp; })

Definition at line 55 of file kernel.h.

#define FIELD_SIZEOF (   t,
  f 
)    (sizeof(((t*)0)->f))

Definition at line 53 of file kernel.h.

#define hex_asc_hi (   x)    hex_asc[((x) & 0xf0) >> 4]

Definition at line 398 of file kernel.h.

#define hex_asc_lo (   x)    hex_asc[((x) & 0x0f)]

Definition at line 397 of file kernel.h.

#define INT_MAX   ((int)(~0U>>1))

Definition at line 21 of file kernel.h.

#define INT_MIN   (-INT_MAX - 1)

Definition at line 22 of file kernel.h.

#define IS_ALIGNED (   x,
  a 
)    (((x) & ((typeof(x))(a) - 1)) == 0)

Definition at line 39 of file kernel.h.

#define LLONG_MAX   ((long long)(~0ULL>>1))

Definition at line 27 of file kernel.h.

#define LLONG_MIN   (-LLONG_MAX - 1)

Definition at line 28 of file kernel.h.

#define LONG_MAX   ((long)(~0UL>>1))

Definition at line 24 of file kernel.h.

#define LONG_MIN   (-LONG_MAX - 1)

Definition at line 25 of file kernel.h.

#define lower_32_bits (   n)    ((u32)(n))

lower_32_bits - return bits 0-31 of a number
: the number we're accessing

Definition at line 136 of file kernel.h.

#define max (   x,
  y 
)
Value:
({ \
typeof(x) _max1 = (x); \
typeof(y) _max2 = (y); \
(void) (&_max1 == &_max2); \
_max1 > _max2 ? _max1 : _max2; })

Definition at line 566 of file kernel.h.

#define max3 (   x,
  y,
 
)
Value:
({ \
typeof(x) _max1 = (x); \
typeof(y) _max2 = (y); \
typeof(z) _max3 = (z); \
(void) (&_max1 == &_max2); \
(void) (&_max1 == &_max3); \
_max1 > _max2 ? (_max1 > _max3 ? _max1 : _max3) : \
(_max2 > _max3 ? _max2 : _max3); })

Definition at line 581 of file kernel.h.

#define max_t (   type,
  x,
  y 
)
Value:
({ \
type __max1 = (x); \
type __max2 = (y); \
__max1 > __max2 ? __max1: __max2; })

Definition at line 629 of file kernel.h.

#define might_resched ( )    do { } while (0)

Definition at line 146 of file kernel.h.

#define might_sleep ( )    do { might_resched(); } while (0)

Definition at line 166 of file kernel.h.

#define might_sleep_if (   cond)    do { if (cond) might_sleep(); } while (0)

Definition at line 169 of file kernel.h.

#define min (   x,
  y 
)
Value:
({ \
typeof(x) _min1 = (x); \
typeof(y) _min2 = (y); \
(void) (&_min1 == &_min2); \
_min1 < _min2 ? _min1 : _min2; })

Definition at line 560 of file kernel.h.

#define min3 (   x,
  y,
 
)
Value:
({ \
typeof(x) _min1 = (x); \
typeof(y) _min2 = (y); \
typeof(z) _min3 = (z); \
(void) (&_min1 == &_min2); \
(void) (&_min1 == &_min3); \
_min1 < _min2 ? (_min1 < _min3 ? _min1 : _min3) : \
(_min2 < _min3 ? _min2 : _min3); })

Definition at line 572 of file kernel.h.

#define min_not_zero (   x,
  y 
)
Value:
({ \
typeof(x) __x = (x); \
typeof(y) __y = (y); \
__x == 0 ? __y : ((__y == 0) ? __x : min(__x, __y)); })

min_not_zero - return the minimum that is not zero, unless both are zero : value1 : value2

Definition at line 595 of file kernel.h.

#define min_t (   type,
  x,
  y 
)
Value:
({ \
type __min1 = (x); \
type __min2 = (y); \
__min1 < __min2 ? __min1: __min2; })

Definition at line 624 of file kernel.h.

#define mult_frac (   x,
  numer,
  denom 
)
Value:
( \
{ \
typeof(x) quot = (x) / (denom); \
typeof(x) rem = (x) % (denom); \
(quot * (numer)) + ((rem * (numer)) / (denom)); \
} \
)

Definition at line 96 of file kernel.h.

#define NUMA_BUILD   0

Definition at line 694 of file kernel.h.

#define PTR_ALIGN (   p,
  a 
)    ((typeof(p))ALIGN((unsigned long)(p), (a)))

Definition at line 38 of file kernel.h.

#define REPEAT_BYTE (   x)    ((~0ul / 0xff) * (x))

Definition at line 34 of file kernel.h.

#define round_down (   x,
  y 
)    ((x) & ~__round_mask(x, y))

Definition at line 51 of file kernel.h.

#define round_up (   x,
  y 
)    ((((x)-1) | __round_mask(x, y))+1)

Definition at line 50 of file kernel.h.

#define rounddown (   x,
  y 
)
Value:
( \
{ \
typeof(x) __x = (x); \
__x - (__x % (y)); \
} \
)

Definition at line 71 of file kernel.h.

#define roundup (   x,
  y 
)
Value:
( \
{ \
const typeof(y) __y = y; \
(((x) + (__y - 1)) / __y) * __y; \
} \
)

Definition at line 65 of file kernel.h.

#define sector_div (   n,
  b 
)
Value:
( \
{ \
int _res; \
_res = (n) % (b); \
(n) /= (b); \
_res; \
} \
)

Definition at line 112 of file kernel.h.

#define SHRT_MAX   ((s16)(USHRT_MAX>>1))

Definition at line 19 of file kernel.h.

#define SHRT_MIN   ((s16)(-SHRT_MAX - 1))

Definition at line 20 of file kernel.h.

#define SIZE_MAX   (~(size_t)0)

Definition at line 30 of file kernel.h.

#define STACK_MAGIC   0xdeadbeef

Definition at line 32 of file kernel.h.

#define strict_strtol   kstrtol

Definition at line 315 of file kernel.h.

#define strict_strtoll   kstrtoll

Definition at line 317 of file kernel.h.

#define strict_strtoul   kstrtoul

Definition at line 314 of file kernel.h.

#define strict_strtoull   kstrtoull

Definition at line 316 of file kernel.h.

#define swap (   a,
  b 
)    do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0)

Definition at line 673 of file kernel.h.

#define SYMBOL_PREFIX   ""

Definition at line 708 of file kernel.h.

#define TAINT_BAD_PAGE   5

Definition at line 387 of file kernel.h.

#define TAINT_CRAP   10

Definition at line 392 of file kernel.h.

#define TAINT_DIE   7

Definition at line 389 of file kernel.h.

#define TAINT_FIRMWARE_WORKAROUND   11

Definition at line 393 of file kernel.h.

#define TAINT_FORCED_MODULE   1

Definition at line 383 of file kernel.h.

#define TAINT_FORCED_RMMOD   3

Definition at line 385 of file kernel.h.

#define TAINT_MACHINE_CHECK   4

Definition at line 386 of file kernel.h.

#define TAINT_OOT_MODULE   12

Definition at line 394 of file kernel.h.

#define TAINT_OVERRIDDEN_ACPI_TABLE   8

Definition at line 390 of file kernel.h.

#define TAINT_PROPRIETARY_MODULE   0

Definition at line 382 of file kernel.h.

#define TAINT_UNSAFE_SMP   2

Definition at line 384 of file kernel.h.

#define TAINT_USER   6

Definition at line 388 of file kernel.h.

#define TAINT_WARN   9

Definition at line 391 of file kernel.h.

#define UINT_MAX   (~0U)

Definition at line 23 of file kernel.h.

#define ULLONG_MAX   (~0ULL)

Definition at line 29 of file kernel.h.

#define ULONG_MAX   (~0UL)

Definition at line 26 of file kernel.h.

#define upper_32_bits (   n)    ((u32)(((n) >> 16) >> 16))

upper_32_bits - return bits 32-63 of a number
: the number we're accessing

A basic shift-right of a 64- or 32-bit quantity. Use this to suppress the "right shift count >= width of type" warning when that quantity is 32-bits.

Definition at line 130 of file kernel.h.

#define USHRT_MAX   ((u16)(~0U))

Definition at line 18 of file kernel.h.

Enumeration Type Documentation

Enumerator:
DUMP_NONE 
DUMP_ALL 
DUMP_ORIG 

Definition at line 441 of file kernel.h.

Enumerator:
SYSTEM_BOOTING 
SYSTEM_RUNNING 
SYSTEM_HALT 
SYSTEM_POWER_OFF 
SYSTEM_RESTART 

Definition at line 374 of file kernel.h.

Function Documentation

int __kernel_text_address ( unsigned long  addr)

Definition at line 99 of file extable.c.

__printf ( ,
 
) const
__printf ( ,
 
)
const char __printf ( ,
 
)
__printf ( ,
 
)
size_t const char __printf ( ,
 
)
__scanf ( ,
 
) const
const char __scanf ( ,
 
) const
int __must_check _kstrtol ( const char s,
unsigned int  base,
long res 
)

Definition at line 156 of file kstrtox.c.

int __must_check _kstrtoul ( const char s,
unsigned int  base,
unsigned long res 
)

Definition at line 140 of file kstrtox.c.

void add_taint ( unsigned  flag)

Definition at line 262 of file panic.c.

void bust_spinlocks ( int  yes)

Definition at line 38 of file fault.c.

void complete_and_exit ( struct completion ,
long   
)

Definition at line 991 of file exit.c.

int core_kernel_data ( unsigned long  addr)

core_kernel_data - tell if addr points to kernel data : address to test

Returns true if passed in is from the core kernel data section.

Note: On some archs it may return true for core RODATA, and false for others. But will always be true for core RW data.

Definition at line 91 of file extable.c.

int core_kernel_text ( unsigned long  addr)

Definition at line 69 of file extable.c.

void do_exit ( long  error_code)

Definition at line 810 of file exit.c.

int do_sysinfo ( struct sysinfo info)

do_sysinfo - fill in sysinfo struct : pointer to buffer to fill

Definition at line 1570 of file timer.c.

int func_ptr_is_kernel_text ( void ptr)

Definition at line 132 of file extable.c.

int get_option ( char **  str,
int pint 
)

get_option - Parse integer from an option string : option string : (output) integer value parsed from

Read an int from an option string; if available accept a subsequent comma as well.

Return values: 0 - no int in string 1 - int found, no subsequent comma 2 - int found including a subsequent comma 3 - hyphen found to denote a range

Definition at line 52 of file cmdline.c.

char* get_options ( const char str,
int  nints,
int ints 
)

get_options - Parse a string into a list of integers : String to be parsed : size of integer array : integer array

This function parses a string containing a comma-separated list of integers, a hyphen-separated range of positive integers, or a combination of both. The parse halts when the array is full, or when no more numbers can be retrieved from the string.

Return value is the character in the string which caused the parse to end (typically a null terminator, if is completely parseable).

Definition at line 88 of file cmdline.c.

unsigned long get_taint ( void  )

Definition at line 257 of file panic.c.

int __must_check hex2bin ( u8 dst,
const char src,
size_t  count 
)

hex2bin - convert an ascii hexadecimal string to its binary representation : binary result : ascii hexadecimal string : result length

Return 0 on success, -1 in case of bad input.

Definition at line 44 of file hexdump.c.

int hex_to_bin ( char  ch)

hex_to_bin - convert a hex digit to its real value : ascii character represents hex digit

hex_to_bin() converts one hex digit to its actual value or -1 in case of bad input.

Definition at line 25 of file hexdump.c.

unsigned long int_sqrt ( unsigned long  x)

int_sqrt - rough approximation to sqrt : integer of which to calculate the sqrt

A very rough approximation to the sqrt() function.

Definition at line 11 of file int_sqrt.c.

int kernel_text_address ( unsigned long  addr)

Definition at line 118 of file extable.c.

int __must_check kstrtoint ( const char s,
unsigned int  base,
int res 
)

Definition at line 186 of file kstrtox.c.

int __must_check kstrtoint_from_user ( const char __user s,
size_t  count,
unsigned int  base,
int res 
)
int __must_check kstrtol_from_user ( const char __user s,
size_t  count,
unsigned int  base,
long res 
)
int __must_check kstrtoll ( const char s,
unsigned int  base,
long long res 
)

Definition at line 115 of file kstrtox.c.

int __must_check kstrtoll_from_user ( const char __user s,
size_t  count,
unsigned int  base,
long long res 
)
int __must_check kstrtos16 ( const char s,
unsigned int  base,
s16 res 
)

Definition at line 216 of file kstrtox.c.

int __must_check kstrtos16_from_user ( const char __user s,
size_t  count,
unsigned int  base,
s16 res 
)
int __must_check kstrtos8 ( const char s,
unsigned int  base,
s8 res 
)

Definition at line 246 of file kstrtox.c.

int __must_check kstrtos8_from_user ( const char __user s,
size_t  count,
unsigned int  base,
s8 res 
)
int __must_check kstrtou16 ( const char s,
unsigned int  base,
u16 res 
)

Definition at line 201 of file kstrtox.c.

int __must_check kstrtou16_from_user ( const char __user s,
size_t  count,
unsigned int  base,
u16 res 
)
int __must_check kstrtou8 ( const char s,
unsigned int  base,
u8 res 
)

Definition at line 231 of file kstrtox.c.

int __must_check kstrtou8_from_user ( const char __user s,
size_t  count,
unsigned int  base,
u8 res 
)
int __must_check kstrtouint ( const char s,
unsigned int  base,
unsigned int res 
)

Definition at line 171 of file kstrtox.c.

int __must_check kstrtouint_from_user ( const char __user s,
size_t  count,
unsigned int  base,
unsigned int res 
)
int __must_check kstrtoul_from_user ( const char __user s,
size_t  count,
unsigned int  base,
unsigned long res 
)
int __must_check kstrtoull ( const char s,
unsigned int  base,
unsigned long long res 
)

Definition at line 107 of file kstrtox.c.

int __must_check kstrtoull_from_user ( const char __user s,
size_t  count,
unsigned int  base,
unsigned long long res 
)
const char char* kvasprintf ( gfp_t  gfp,
const char fmt,
va_list  args 
)

Definition at line 14 of file kasprintf.c.

unsigned long long memparse ( const char ptr,
char **  retptr 
)

memparse - parse a string with mem suffixes into a number : Where parse begins : (output) Optional pointer to next char after parse completes

Parses a string into a number. The number stored at is potentially suffixed with K (for kilobytes, or 1024 bytes), M (for megabytes, or 1048576 bytes), or G (for gigabytes, or 1073741824). If the number is suffixed with K, M, or G, then the return value is the number multiplied by one kilobyte, one megabyte, or one gigabyte, respectively.

Definition at line 129 of file cmdline.c.

int num_to_str ( char buf,
int  size,
unsigned long long  num 
)

Definition at line 311 of file vsprintf.c.

void oops_enter ( void  )

Definition at line 359 of file panic.c.

void oops_exit ( void  )

Definition at line 394 of file panic.c.

int oops_may_print ( void  )

Definition at line 340 of file panic.c.

void print_oops_end_marker ( void  )

Definition at line 383 of file panic.c.

const char* print_tainted ( void  )

print_tainted - return a string to represent the kernel taint state.

'P' - Proprietary module has been loaded. 'F' - Module has been forcibly loaded. 'S' - SMP with CPUs not designed for SMP. 'R' - User forced a module unload. 'M' - System experienced a machine check exception. 'B' - System has hit bad_page. 'U' - Userspace-defined naughtiness. 'D' - Kernel has oopsed before 'A' - ACPI table overridden. 'W' - Taint on warning. 'C' - modules from drivers/staging are loaded. 'I' - Working around severe firmware bug. 'O' - Out-of-tree module has been loaded.

The string is overwritten by the next call to print_tainted().

Definition at line 230 of file panic.c.

struct pid* session_of_pgrp ( struct pid pgrp)
read

Definition at line 231 of file exit.c.

long simple_strtol ( const char cp,
char **  endp,
unsigned int  base 
)

simple_strtol - convert a string to a signed long : The start of the string : A pointer to the end of the parsed string will be placed here : The number base to use

Definition at line 77 of file vsprintf.c.

long long simple_strtoll ( const char cp,
char **  endp,
unsigned int  base 
)

simple_strtoll - convert a string to a signed long long : The start of the string : A pointer to the end of the parsed string will be placed here : The number base to use

Definition at line 92 of file vsprintf.c.

unsigned long simple_strtoul ( const char cp,
char **  endp,
unsigned int  base 
)

simple_strtoul - convert a string to an unsigned long : The start of the string : A pointer to the end of the parsed string will be placed here : The number base to use

Definition at line 65 of file vsprintf.c.

unsigned long long simple_strtoull ( const char cp,
char **  endp,
unsigned int  base 
)

simple_strtoull - convert a string to an unsigned long long : The start of the string : A pointer to the end of the parsed string will be placed here : The number base to use

Definition at line 90 of file string.c.

int test_taint ( unsigned  flag)

Definition at line 251 of file panic.c.

void wake_up_klogd ( void  )

Definition at line 1978 of file printk.c.

Variable Documentation

__noreturn __cold

Definition at line 207 of file kernel.h.

Definition at line 328 of file kernel.h.

bool early_boot_irqs_disabled
const char* fmt

Definition at line 323 of file kernel.h.

const char hex_asc[]

Definition at line 15 of file hexdump.c.

int oops_in_progress

Definition at line 78 of file printk.c.

long(* panic_blink)(int state)

Definition at line 49 of file panic.c.

struct atomic_notifier_head panic_notifier_list
int panic_on_io_nmi

Definition at line 23 of file dumpstack.c.

int panic_on_oops

Definition at line 30 of file panic.c.

int panic_on_unrecovered_nmi

Definition at line 22 of file dumpstack.c.

int panic_timeout

Definition at line 36 of file panic.c.

int root_mountflags

Definition at line 38 of file do_mounts.c.

Definition at line 326 of file kernel.h.

int sysctl_panic_on_stackoverflow

Definition at line 29 of file irq_64.c.

enum system_states system_state

Definition at line 324 of file kernel.h.