aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2012-12-08 09:25:06 -0500
committerIngo Molnar <mingo@kernel.org>2012-12-08 09:25:06 -0500
commitf0b9abfb044649bc452fb2fb975ff2fd599cc6a3 (patch)
tree7800081c5cb16a4dfee1e57a70f3be90f7b50d9a /include/uapi
parentadc1ef1e37358d3c17d1a74a58b2e104fc0bda15 (diff)
parent1b3c393cd43f22ead8a6a2f839efc6df8ebd7465 (diff)
Merge branch 'linus' into perf/core
Conflicts: tools/perf/Makefile tools/perf/builtin-test.c tools/perf/perf.h tools/perf/tests/parse-events.c tools/perf/util/evsel.h Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/Kbuild1
-rw-r--r--include/uapi/linux/eventpoll.h1
-rw-r--r--include/uapi/linux/hw_breakpoint.h30
-rw-r--r--include/uapi/linux/oom.h9
-rw-r--r--include/uapi/linux/raid/Kbuild2
-rw-r--r--include/uapi/linux/raid/md_p.h301
-rw-r--r--include/uapi/linux/raid/md_u.h155
-rw-r--r--include/uapi/linux/tcp.h1
8 files changed, 499 insertions, 1 deletions
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
index e194387ef784..19e765fbfef7 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -415,3 +415,4 @@ header-y += wireless.h
415header-y += x25.h 415header-y += x25.h
416header-y += xattr.h 416header-y += xattr.h
417header-y += xfrm.h 417header-y += xfrm.h
418header-y += hw_breakpoint.h
diff --git a/include/uapi/linux/eventpoll.h b/include/uapi/linux/eventpoll.h
index 8c99ce7202c5..2c267bcbb85c 100644
--- a/include/uapi/linux/eventpoll.h
+++ b/include/uapi/linux/eventpoll.h
@@ -25,7 +25,6 @@
25#define EPOLL_CTL_ADD 1 25#define EPOLL_CTL_ADD 1
26#define EPOLL_CTL_DEL 2 26#define EPOLL_CTL_DEL 2
27#define EPOLL_CTL_MOD 3 27#define EPOLL_CTL_MOD 3
28#define EPOLL_CTL_DISABLE 4
29 28
30/* 29/*
31 * Request the handling of system wakeup events so as to prevent system suspends 30 * Request the handling of system wakeup events so as to prevent system suspends
diff --git a/include/uapi/linux/hw_breakpoint.h b/include/uapi/linux/hw_breakpoint.h
new file mode 100644
index 000000000000..b04000a2296a
--- /dev/null
+++ b/include/uapi/linux/hw_breakpoint.h
@@ -0,0 +1,30 @@
1#ifndef _UAPI_LINUX_HW_BREAKPOINT_H
2#define _UAPI_LINUX_HW_BREAKPOINT_H
3
4enum {
5 HW_BREAKPOINT_LEN_1 = 1,
6 HW_BREAKPOINT_LEN_2 = 2,
7 HW_BREAKPOINT_LEN_4 = 4,
8 HW_BREAKPOINT_LEN_8 = 8,
9};
10
11enum {
12 HW_BREAKPOINT_EMPTY = 0,
13 HW_BREAKPOINT_R = 1,
14 HW_BREAKPOINT_W = 2,
15 HW_BREAKPOINT_RW = HW_BREAKPOINT_R | HW_BREAKPOINT_W,
16 HW_BREAKPOINT_X = 4,
17 HW_BREAKPOINT_INVALID = HW_BREAKPOINT_RW | HW_BREAKPOINT_X,
18};
19
20enum bp_type_idx {
21 TYPE_INST = 0,
22#ifdef CONFIG_HAVE_MIXED_BREAKPOINTS_REGS
23 TYPE_DATA = 0,
24#else
25 TYPE_DATA = 1,
26#endif
27 TYPE_MAX
28};
29
30#endif /* _UAPI_LINUX_HW_BREAKPOINT_H */
diff --git a/include/uapi/linux/oom.h b/include/uapi/linux/oom.h
index a49c4afc7060..b29272d621ce 100644
--- a/include/uapi/linux/oom.h
+++ b/include/uapi/linux/oom.h
@@ -8,4 +8,13 @@
8#define OOM_SCORE_ADJ_MIN (-1000) 8#define OOM_SCORE_ADJ_MIN (-1000)
9#define OOM_SCORE_ADJ_MAX 1000 9#define OOM_SCORE_ADJ_MAX 1000
10 10
11/*
12 * /proc/<pid>/oom_adj set to -17 protects from the oom killer for legacy
13 * purposes.
14 */
15#define OOM_DISABLE (-17)
16/* inclusive */
17#define OOM_ADJUST_MIN (-16)
18#define OOM_ADJUST_MAX 15
19
11#endif /* _UAPI__INCLUDE_LINUX_OOM_H */ 20#endif /* _UAPI__INCLUDE_LINUX_OOM_H */
diff --git a/include/uapi/linux/raid/Kbuild b/include/uapi/linux/raid/Kbuild
index aafaa5aa54d4..e2c3d25405d7 100644
--- a/include/uapi/linux/raid/Kbuild
+++ b/include/uapi/linux/raid/Kbuild
@@ -1 +1,3 @@
1# UAPI Header export list 1# UAPI Header export list
2header-y += md_p.h
3header-y += md_u.h
diff --git a/include/uapi/linux/raid/md_p.h b/include/uapi/linux/raid/md_p.h
new file mode 100644
index 000000000000..ee753536ab70
--- /dev/null
+++ b/include/uapi/linux/raid/md_p.h
@@ -0,0 +1,301 @@
1/*
2 md_p.h : physical layout of Linux RAID devices
3 Copyright (C) 1996-98 Ingo Molnar, Gadi Oxman
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2, or (at your option)
8 any later version.
9
10 You should have received a copy of the GNU General Public License
11 (for example /usr/src/linux/COPYING); if not, write to the Free
12 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
13*/
14
15#ifndef _MD_P_H
16#define _MD_P_H
17
18#include <linux/types.h>
19
20/*
21 * RAID superblock.
22 *
23 * The RAID superblock maintains some statistics on each RAID configuration.
24 * Each real device in the RAID set contains it near the end of the device.
25 * Some of the ideas are copied from the ext2fs implementation.
26 *
27 * We currently use 4096 bytes as follows:
28 *
29 * word offset function
30 *
31 * 0 - 31 Constant generic RAID device information.
32 * 32 - 63 Generic state information.
33 * 64 - 127 Personality specific information.
34 * 128 - 511 12 32-words descriptors of the disks in the raid set.
35 * 512 - 911 Reserved.
36 * 912 - 1023 Disk specific descriptor.
37 */
38
39/*
40 * If x is the real device size in bytes, we return an apparent size of:
41 *
42 * y = (x & ~(MD_RESERVED_BYTES - 1)) - MD_RESERVED_BYTES
43 *
44 * and place the 4kB superblock at offset y.
45 */
46#define MD_RESERVED_BYTES (64 * 1024)
47#define MD_RESERVED_SECTORS (MD_RESERVED_BYTES / 512)
48
49#define MD_NEW_SIZE_SECTORS(x) ((x & ~(MD_RESERVED_SECTORS - 1)) - MD_RESERVED_SECTORS)
50
51#define MD_SB_BYTES 4096
52#define MD_SB_WORDS (MD_SB_BYTES / 4)
53#define MD_SB_SECTORS (MD_SB_BYTES / 512)
54
55/*
56 * The following are counted in 32-bit words
57 */
58#define MD_SB_GENERIC_OFFSET 0
59#define MD_SB_PERSONALITY_OFFSET 64
60#define MD_SB_DISKS_OFFSET 128
61#define MD_SB_DESCRIPTOR_OFFSET 992
62
63#define MD_SB_GENERIC_CONSTANT_WORDS 32
64#define MD_SB_GENERIC_STATE_WORDS 32
65#define MD_SB_GENERIC_WORDS (MD_SB_GENERIC_CONSTANT_WORDS + MD_SB_GENERIC_STATE_WORDS)
66#define MD_SB_PERSONALITY_WORDS 64
67#define MD_SB_DESCRIPTOR_WORDS 32
68#define MD_SB_DISKS 27
69#define MD_SB_DISKS_WORDS (MD_SB_DISKS*MD_SB_DESCRIPTOR_WORDS)
70#define MD_SB_RESERVED_WORDS (1024 - MD_SB_GENERIC_WORDS - MD_SB_PERSONALITY_WORDS - MD_SB_DISKS_WORDS - MD_SB_DESCRIPTOR_WORDS)
71#define MD_SB_EQUAL_WORDS (MD_SB_GENERIC_WORDS + MD_SB_PERSONALITY_WORDS + MD_SB_DISKS_WORDS)
72
73/*
74 * Device "operational" state bits
75 */
76#define MD_DISK_FAULTY 0 /* disk is faulty / operational */
77#define MD_DISK_ACTIVE 1 /* disk is running or spare disk */
78#define MD_DISK_SYNC 2 /* disk is in sync with the raid set */
79#define MD_DISK_REMOVED 3 /* disk is in sync with the raid set */
80
81#define MD_DISK_WRITEMOSTLY 9 /* disk is "write-mostly" is RAID1 config.
82 * read requests will only be sent here in
83 * dire need
84 */
85
86typedef struct mdp_device_descriptor_s {
87 __u32 number; /* 0 Device number in the entire set */
88 __u32 major; /* 1 Device major number */
89 __u32 minor; /* 2 Device minor number */
90 __u32 raid_disk; /* 3 The role of the device in the raid set */
91 __u32 state; /* 4 Operational state */
92 __u32 reserved[MD_SB_DESCRIPTOR_WORDS - 5];
93} mdp_disk_t;
94
95#define MD_SB_MAGIC 0xa92b4efc
96
97/*
98 * Superblock state bits
99 */
100#define MD_SB_CLEAN 0
101#define MD_SB_ERRORS 1
102
103#define MD_SB_BITMAP_PRESENT 8 /* bitmap may be present nearby */
104
105/*