summaryrefslogtreecommitdiffstats
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-03-07 22:25:37 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2019-03-07 22:25:37 -0500
commitb5dd0c658c31b469ccff1b637e5124851e7a4a1c (patch)
treedc0b31a5aa62bb4e1fa653a4f176c2faae51f9e0 /include/linux/kernel.h
parent610cd4eadec4f97acd25d3108b0e50d1362b3319 (diff)
parentfe0436e10c8845aed24cad3a1c719efcd6e583eb (diff)
Merge branch 'akpm' (patches from Andrew)
Merge more updates from Andrew Morton: - some of the rest of MM - various misc things - dynamic-debug updates - checkpatch - some epoll speedups - autofs - rapidio - lib/, lib/lzo/ updates * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (83 commits) samples/mic/mpssd/mpssd.h: remove duplicate header kernel/fork.c: remove duplicated include include/linux/relay.h: fix percpu annotation in struct rchan arch/nios2/mm/fault.c: remove duplicate include unicore32: stop printing the virtual memory layout MAINTAINERS: fix GTA02 entry and mark as orphan mm: create the new vm_fault_t type arm, s390, unicore32: remove oneliner wrappers for memblock_alloc() arch: simplify several early memory allocations openrisc: simplify pte_alloc_one_kernel() sh: prefer memblock APIs returning virtual address microblaze: prefer memblock API returning virtual address powerpc: prefer memblock APIs returning virtual address lib/lzo: separate lzo-rle from lzo lib/lzo: implement run-length encoding lib/lzo: fast 8-byte copy on arm64 lib/lzo: 64-bit CTZ on arm64 lib/lzo: tidy-up ifdefs ipc/sem.c: replace kvmalloc/memset with kvzalloc and use struct_size ipc: annotate implicit fall through ...
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r--include/linux/kernel.h35
1 files changed, 3 insertions, 32 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index a8868a32098c..34a5036debd3 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -4,6 +4,7 @@
4 4
5 5
6#include <stdarg.h> 6#include <stdarg.h>
7#include <linux/limits.h>
7#include <linux/linkage.h> 8#include <linux/linkage.h>
8#include <linux/stddef.h> 9#include <linux/stddef.h>
9#include <linux/types.h> 10#include <linux/types.h>
@@ -14,36 +15,9 @@
14#include <linux/printk.h> 15#include <linux/printk.h>
15#include <linux/build_bug.h> 16#include <linux/build_bug.h>
16#include <asm/byteorder.h> 17#include <asm/byteorder.h>
18#include <asm/div64.h>
17#include <uapi/linux/kernel.h> 19#include <uapi/linux/kernel.h>
18 20
19#define USHRT_MAX ((u16)(~0U))
20#define SHRT_MAX ((s16)(USHRT_MAX>>1))
21#define SHRT_MIN ((s16)(-SHRT_MAX - 1))
22#define INT_MAX ((int)(~0U>>1))
23#define INT_MIN (-INT_MAX - 1)
24#define UINT_MAX (~0U)
25#define LONG_MAX ((long)(~0UL>>1))
26#define LONG_MIN (-LONG_MAX - 1)
27#define ULONG_MAX (~0UL)
28#define LLONG_MAX ((long long)(~0ULL>>1))
29#define LLONG_MIN (-LLONG_MAX - 1)
30#define ULLONG_MAX (~0ULL)
31#define SIZE_MAX (~(size_t)0)
32#define PHYS_ADDR_MAX (~(phys_addr_t)0)
33
34#define U8_MAX ((u8)~0U)
35#define S8_MAX ((s8)(U8_MAX>>1))
36#define S8_MIN ((s8)(-S8_MAX - 1))
37#define U16_MAX ((u16)~0U)
38#define S16_MAX ((s16)(U16_MAX>>1))
39#define S16_MIN ((s16)(-S16_MAX - 1))
40#define U32_MAX ((u32)~0U)
41#define S32_MAX ((s32)(U32_MAX>>1))
42#define S32_MIN ((s32)(-S32_MAX - 1))
43#define U64_MAX ((u64)~0ULL)
44#define S64_MAX ((s64)(U64_MAX>>1))
45#define S64_MIN ((s64)(-S64_MAX - 1))
46
47#define STACK_MAGIC 0xdeadbeef 21#define STACK_MAGIC 0xdeadbeef
48 22
49/** 23/**
@@ -133,12 +107,10 @@
133 * 107 *
134 * Rounds @x up to next multiple of @y. If @y will always be a power 108 * Rounds @x up to next multiple of @y. If @y will always be a power
135 * of 2, consider using the faster round_up(). 109 * of 2, consider using the faster round_up().
136 *
137 * The `const' here prevents gcc-3.3 from calling __divdi3
138 */ 110 */
139#define roundup(x, y) ( \ 111#define roundup(x, y) ( \
140{ \ 112{ \
141 const typeof(y) __y = y; \ 113 typeof(y) __y = y; \
142 (((x) + (__y - 1)) / __y) * __y; \ 114 (((x) + (__y - 1)) / __y) * __y; \
143} \ 115} \
144) 116)
@@ -204,7 +176,6 @@
204#define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) 176#define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; })
205 177
206#ifdef CONFIG_LBDAF 178#ifdef CONFIG_LBDAF
207# include <asm/div64.h>
208# define sector_div(a, b) do_div(a, b) 179# define sector_div(a, b) do_div(a, b)
209#else 180#else
210# define sector_div(n, b)( \ 181# define sector_div(n, b)( \