aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-23 19:59:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-23 19:59:10 -0400
commit8e3ade251bc7c0a4f0777df4dd34343a03efadba (patch)
tree6c0b78731e3d6609057951d07660efbd90992ad0 /include/linux
parente317234975cb7463b8ca21a93bb6862d9dcf113f (diff)
parente075f59152890ffd7e3d704afc997dd686c8a781 (diff)
Merge branch 'akpm' (Andrew's patch-bomb)
Merge second batch of patches from Andrew Morton: - various misc things - core kernel changes to prctl, exit, exec, init, etc. - kernel/watchdog.c updates - get_maintainer - MAINTAINERS - the backlight driver queue - core bitops code cleanups - the led driver queue - some core prio_tree work - checkpatch udpates - largeish crc32 update - a new poll() feature for the v4l guys - the rtc driver queue - fatfs - ptrace - signals - kmod/usermodehelper updates - coredump - procfs updates * emailed from Andrew Morton <akpm@linux-foundation.org>: (141 commits) seq_file: add seq_set_overflow(), seq_overflow() proc-ns: use d_set_d_op() API to set dentry ops in proc_ns_instantiate(). procfs: speed up /proc/pid/stat, statm procfs: add num_to_str() to speed up /proc/stat proc: speed up /proc/stat handling fs/proc/kcore.c: make get_sparsemem_vmemmap_info() static coredump: add VM_NODUMP, MADV_NODUMP, MADV_CLEAR_NODUMP coredump: remove VM_ALWAYSDUMP flag kmod: make __request_module() killable kmod: introduce call_modprobe() helper usermodehelper: ____call_usermodehelper() doesn't need do_exit() usermodehelper: kill umh_wait, renumber UMH_* constants usermodehelper: implement UMH_KILLABLE usermodehelper: introduce umh_complete(sub_info) usermodehelper: use UMH_WAIT_PROC consistently signal: zap_pid_ns_processes: s/SEND_SIG_NOINFO/SEND_SIG_FORCED/ signal: oom_kill_task: use SEND_SIG_FORCED instead of force_sig() signal: cosmetic, s/from_ancestor_ns/force/ in prepare_signal() paths signal: give SEND_SIG_FORCED more power to beat SIGNAL_UNKILLABLE Hexagon: use set_current_blocked() and block_sigmask() ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/bitops.h13
-rw-r--r--include/linux/compiler-gcc.h3
-rw-r--r--include/linux/crc32.h2
-rw-r--r--include/linux/kernel.h10
-rw-r--r--include/linux/kmod.h18
-rw-r--r--include/linux/led-lm3530.h9
-rw-r--r--include/linux/leds-lp5521.h25
-rw-r--r--include/linux/lp855x.h131
-rw-r--r--include/linux/magic.h18
-rw-r--r--include/linux/mm.h2
-rw-r--r--include/linux/mmc/ioctl.h3
-rw-r--r--include/linux/nmi.h2
-rw-r--r--include/linux/pipe_fs_i.h2
-rw-r--r--include/linux/poll.h37
-rw-r--r--include/linux/prctl.h3
-rw-r--r--include/linux/ptrace.h44
-rw-r--r--include/linux/rcupdate.h2
-rw-r--r--include/linux/sched.h12
-rw-r--r--include/linux/seq_file.h5
-rw-r--r--include/linux/tracehook.h9
20 files changed, 288 insertions, 62 deletions
diff --git a/include/linux/bitops.h b/include/linux/bitops.h
index 94300fe46cce..a3b6b82108b9 100644
--- a/include/linux/bitops.h
+++ b/include/linux/bitops.h
@@ -27,11 +27,22 @@ extern unsigned long __sw_hweight64(__u64 w);
27 (bit) = find_next_bit((addr), (size), (bit) + 1)) 27 (bit) = find_next_bit((addr), (size), (bit) + 1))
28 28
29/* same as for_each_set_bit() but use bit as value to start with */ 29/* same as for_each_set_bit() but use bit as value to start with */
30#define for_each_set_bit_cont(bit, addr, size) \ 30#define for_each_set_bit_from(bit, addr, size) \
31 for ((bit) = find_next_bit((addr), (size), (bit)); \ 31 for ((bit) = find_next_bit((addr), (size), (bit)); \
32 (bit) < (size); \ 32 (bit) < (size); \
33 (bit) = find_next_bit((addr), (size), (bit) + 1)) 33 (bit) = find_next_bit((addr), (size), (bit) + 1))
34 34
35#define for_each_clear_bit(bit, addr, size) \
36 for ((bit) = find_first_zero_bit((addr), (size)); \
37 (bit) < (size); \
38 (bit) = find_next_zero_bit((addr), (size), (bit) + 1))
39
40/* same as for_each_clear_bit() but use bit as value to start with */
41#define for_each_clear_bit_from(bit, addr, size) \
42 for ((bit) = find_next_zero_bit((addr), (size), (bit)); \
43 (bit) < (size); \
44 (bit) = find_next_zero_bit((addr), (size), (bit) + 1))
45
35static __inline__ int get_bitmask_order(unsigned int count) 46static __inline__ int get_bitmask_order(unsigned int count)
36{ 47{
37 int order; 48 int order;
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index 3fd17c249221..e5834aa24b9e 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -87,7 +87,8 @@
87 */ 87 */
88#define __pure __attribute__((pure)) 88#define __pure __attribute__((pure))
89#define __aligned(x) __attribute__((aligned(x))) 89#define __aligned(x) __attribute__((aligned(x)))
90#define __printf(a,b) __attribute__((format(printf,a,b))) 90#define __printf(a, b) __attribute__((format(printf, a, b)))
91#define __scanf(a, b) __attribute__((format(scanf, a, b)))
91#define noinline __attribute__((noinline)) 92#define noinline __attribute__((noinline))
92#define __attribute_const__ __attribute__((__const__)) 93#define __attribute_const__ __attribute__((__const__))
93#define __maybe_unused __attribute__((unused)) 94#define __maybe_unused __attribute__((unused))
diff --git a/include/linux/crc32.h b/include/linux/crc32.h
index 391a259b2cc9..68267b64bb98 100644
--- a/include/linux/crc32.h
+++ b/include/linux/crc32.h
@@ -11,6 +11,8 @@
11extern u32 crc32_le(u32 crc, unsigned char const *p, size_t len); 11extern u32 crc32_le(u32 crc, unsigned char const *p, size_t len);
12extern u32 crc32_be(u32 crc, unsigned char const *p, size_t len); 12extern u32 crc32_be(u32 crc, unsigned char const *p, size_t len);
13 13
14extern u32 __crc32c_le(u32 crc, unsigned char const *p, size_t len);
15
14#define crc32(seed, data, length) crc32_le(seed, (unsigned char const *)(data), length) 16#define crc32(seed, data, length) crc32_le(seed, (unsigned char const *)(data), length)
15 17
16/* 18/*
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index d801acb5e680..3e140add5360 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -312,6 +312,8 @@ extern long long simple_strtoll(const char *,char **,unsigned int);
312#define strict_strtoull kstrtoull 312#define strict_strtoull kstrtoull
313#define strict_strtoll kstrtoll 313#define strict_strtoll kstrtoll
314 314
315extern int num_to_str(char *buf, int size, unsigned long long num);
316
315/* lib/printf utilities */ 317/* lib/printf utilities */
316 318
317extern __printf(2, 3) int sprintf(char *buf, const char * fmt, ...); 319extern __printf(2, 3) int sprintf(char *buf, const char * fmt, ...);
@@ -328,10 +330,10 @@ extern __printf(2, 3)
328char *kasprintf(gfp_t gfp, const char *fmt, ...); 330char *kasprintf(gfp_t gfp, const char *fmt, ...);
329extern char *kvasprintf(gfp_t gfp, const char *fmt, va_list args); 331extern char *kvasprintf(gfp_t gfp, const char *fmt, va_list args);
330 332
331extern int sscanf(const char *, const char *, ...) 333extern __scanf(2, 3)
332 __attribute__ ((format (scanf, 2, 3))); 334int sscanf(const char *, const char *, ...);
333extern int vsscanf(const char *, const char *, va_list) 335extern __scanf(2, 0)
334 __attribute__ ((format (scanf, 2, 0))); 336int vsscanf(const char *, const char *, va_list);
335 337
336extern int get_option(char **str, int *pint); 338extern int get_option(char **str, int *pint);
337extern char *get_options(const char *str, int nints, int *ints); 339extern char *get_options(const char *str, int nints, int *ints);
diff --git a/include/linux/kmod.h b/include/linux/kmod.h
index 722f477c4ef7..9efeae679106 100644
--- a/include/linux/kmod.h
+++ b/include/linux/kmod.h
@@ -48,11 +48,10 @@ static inline int request_module_nowait(const char *name, ...) { return -ENOSYS;
48struct cred; 48struct cred;
49struct file; 49struct file;
50 50
51enum umh_wait { 51#define UMH_NO_WAIT 0 /* don't wait at all */
52 UMH_NO_WAIT = -1, /* don't wait at all */ 52#define UMH_WAIT_EXEC 1 /* wait for the exec, but not the process */
53 UMH_WAIT_EXEC = 0, /* wait for the exec, but not the process */ 53#define UMH_WAIT_PROC 2 /* wait for the process to complete */
54 UMH_WAIT_PROC = 1, /* wait for the process to complete */ 54#define UMH_KILLABLE 4 /* wait for EXEC/PROC killable */
55};
56 55
57struct subprocess_info { 56struct subprocess_info {
58 struct work_struct work; 57 struct work_struct work;
@@ -60,7 +59,7 @@ struct subprocess_info {
60 char *path; 59 char *path;
61 char **argv; 60 char **argv;
62 char **envp; 61 char **envp;
63 enum umh_wait wait; 62 int wait;
64 int retval; 63 int retval;
65 int (*init)(struct subprocess_info *info, struct cred *new); 64 int (*init)(struct subprocess_info *info, struct cred *new);
66 void (*cleanup)(struct subprocess_info *info); 65 void (*cleanup)(struct subprocess_info *info);
@@ -78,15 +77,14 @@ void call_usermodehelper_setfns(struct subprocess_info *info,
78 void *data); 77 void *data);
79 78
80/* Actually execute the sub-process */ 79/* Actually execute the sub-process */
81int call_usermodehelper_exec(struct subprocess_info *info, enum umh_wait wait); 80int call_usermodehelper_exec(struct subprocess_info *info, int wait);
82 81
83/* Free the subprocess_info. This is only needed if you're not going 82/* Free the subprocess_info. This is only needed if you're not going
84 to call call_usermodehelper_exec */ 83 to call call_usermodehelper_exec */
85void call_usermodehelper_freeinfo(struct subprocess_info *info); 84void call_usermodehelper_freeinfo(struct subprocess_info *info);
86 85
87static inline int 86static inline int
88call_usermodehelper_fns(char *path, char **argv, char **envp, 87call_usermodehelper_fns(char *path, char **argv, char **envp, int wait,
89 enum umh_wait wait,
90 int (*init)(struct subprocess_info *info, struct cred *new), 88 int (*init)(struct subprocess_info *info, struct cred *new),
91 void (*cleanup)(struct subprocess_info *), void *data) 89 void (*cleanup)(struct subprocess_info *), void *data)
92{ 90{
@@ -104,7 +102,7 @@ call_usermodehelper_fns(char *path, char **argv, char **envp,
104} 102}
105 103
106static inline int 104static inline int
107call_usermodehelper(char *path, char **argv, char **envp, enum umh_wait wait) 105call_usermodehelper(char *path, char **argv, char **envp, int wait)
108{ 106{
109 return call_usermodehelper_fns(path, argv, envp, wait, 107 return call_usermodehelper_fns(path, argv, envp, wait,
110 NULL, NULL, NULL); 108 NULL, NULL, NULL);
diff --git a/include/linux/led-lm3530.h b/include/linux/led-lm3530.h
index 8eb12357a110..eeae6e742471 100644
--- a/include/linux/led-lm3530.h
+++ b/include/linux/led-lm3530.h
@@ -72,6 +72,12 @@ enum lm3530_als_mode {
72 LM3530_INPUT_CEIL, /* Max of ALS1 and ALS2 */ 72 LM3530_INPUT_CEIL, /* Max of ALS1 and ALS2 */
73}; 73};
74 74
75/* PWM Platform Specific Data */
76struct lm3530_pwm_data {
77 void (*pwm_set_intensity) (int brightness, int max_brightness);
78 int (*pwm_get_intensity) (int max_brightness);
79};
80
75/** 81/**
76 * struct lm3530_platform_data 82 * struct lm3530_platform_data
77 * @mode: mode of operation i.e. Manual, ALS or PWM 83 * @mode: mode of operation i.e. Manual, ALS or PWM
@@ -87,6 +93,7 @@ enum lm3530_als_mode {
87 * @als_vmin: als input voltage calibrated for max brightness in mV 93 * @als_vmin: als input voltage calibrated for max brightness in mV
88 * @als_vmax: als input voltage calibrated for min brightness in mV 94 * @als_vmax: als input voltage calibrated for min brightness in mV
89 * @brt_val: brightness value (0-255) 95 * @brt_val: brightness value (0-255)
96 * @pwm_data: PWM control functions (only valid when the mode is PWM)
90 */ 97 */
91struct lm3530_platform_data { 98struct lm3530_platform_data {
92 enum lm3530_mode mode; 99 enum lm3530_mode mode;
@@ -107,6 +114,8 @@ struct lm3530_platform_data {
107 u32 als_vmax; 114 u32 als_vmax;
108 115
109 u8 brt_val; 116 u8 brt_val;
117
118 struct lm3530_pwm_data pwm_data;
110}; 119};
111 120
112#endif /* _LINUX_LED_LM3530_H__ */ 121#endif /* _LINUX_LED_LM3530_H__ */
diff --git a/include/linux/leds-lp5521.h b/include/linux/leds-lp5521.h
index fd548d2a8775..3f071ec019b2 100644
--- a/include/linux/leds-lp5521.h
+++ b/include/linux/leds-lp5521.h
@@ -26,15 +26,37 @@
26/* See Documentation/leds/leds-lp5521.txt */ 26/* See Documentation/leds/leds-lp5521.txt */
27 27
28struct lp5521_led_config { 28struct lp5521_led_config {
29 char *name;
29 u8 chan_nr; 30 u8 chan_nr;
30 u8 led_current; /* mA x10, 0 if led is not connected */ 31 u8 led_current; /* mA x10, 0 if led is not connected */
31 u8 max_current; 32 u8 max_current;
32}; 33};
33 34
35struct lp5521_led_pattern {
36 u8 *r;
37 u8 *g;
38 u8 *b;
39 u8 size_r;
40 u8 size_g;
41 u8 size_b;
42};
43
34#define LP5521_CLOCK_AUTO 0 44#define LP5521_CLOCK_AUTO 0
35#define LP5521_CLOCK_INT 1 45#define LP5521_CLOCK_INT 1
36#define LP5521_CLOCK_EXT 2 46#define LP5521_CLOCK_EXT 2
37 47
48/* Bits in CONFIG register */
49#define LP5521_PWM_HF 0x40 /* PWM: 0 = 256Hz, 1 = 558Hz */
50#define LP5521_PWRSAVE_EN 0x20 /* 1 = Power save mode */
51#define LP5521_CP_MODE_OFF 0 /* Charge pump (CP) off */
52#define LP5521_CP_MODE_BYPASS 8 /* CP forced to bypass mode */
53#define LP5521_CP_MODE_1X5 0x10 /* CP forced to 1.5x mode */
54#define LP5521_CP_MODE_AUTO 0x18 /* Automatic mode selection */
55#define LP5521_R_TO_BATT 4 /* R out: 0 = CP, 1 = Vbat */
56#define LP5521_CLK_SRC_EXT 0 /* Ext-clk source (CLK_32K) */
57#define LP5521_CLK_INT 1 /* Internal clock */
58#define LP5521_CLK_AUTO 2 /* Automatic clock selection */
59
38struct lp5521_platform_data { 60struct lp5521_platform_data {
39 struct lp5521_led_config *led_config; 61 struct lp5521_led_config *led_config;
40 u8 num_channels; 62 u8 num_channels;
@@ -43,6 +65,9 @@ struct lp5521_platform_data {
43 void (*release_resources)(void); 65 void (*release_resources)(void);
44 void (*enable)(bool state); 66 void (*enable)(bool state);
45 const char *label; 67 const char *label;
68 u8 update_config;
69 struct lp5521_led_pattern *patterns;
70 int num_patterns;
46}; 71};
47 72
48#endif /* __LINUX_LP5521_H */ 73#endif /* __LINUX_LP5521_H */
diff --git a/include/linux/lp855x.h b/include/linux/lp855x.h
new file mode 100644
index 000000000000..781a490a451b
--- /dev/null
+++ b/include/linux/lp855x.h
@@ -0,0 +1,131 @@
1/*
2 * LP855x Backlight Driver
3 *
4 * Copyright (C) 2011 Texas Instruments
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 */
11
12#ifndef _LP855X_H
13#define _LP855X_H
14
15#define BL_CTL_SHFT (0)
16#define BRT_MODE_SHFT (1)
17#define BRT_MODE_MASK (0x06)
18
19/* Enable backlight. Only valid when BRT_MODE=10(I2C only) */
20#define ENABLE_BL (1)
21#define DISABLE_BL (0)
22
23#define I2C_CONFIG(id) id ## _I2C_CONFIG
24#define PWM_CONFIG(id) id ## _PWM_CONFIG
25
26/* DEVICE CONTROL register - LP8550 */
27#define LP8550_PWM_CONFIG (LP8550_PWM_ONLY << BRT_MODE_SHFT)
28#define LP8550_I2C_CONFIG ((ENABLE_BL << BL_CTL_SHFT) | \
29 (LP8550_I2C_ONLY << BRT_MODE_SHFT))
30
31/* DEVICE CONTROL register - LP8551 */
32#define LP8551_PWM_CONFIG LP8550_PWM_CONFIG
33#define LP8551_I2C_CONFIG LP8550_I2C_CONFIG
34
35/* DEVICE CONTROL register - LP8552 */
36#define LP8552_PWM_CONFIG LP8550_PWM_CONFIG
37#define LP8552_I2C_CONFIG LP8550_I2C_CONFIG
38
39/* DEVICE CONTROL register - LP8553 */
40#define LP8553_PWM_CONFIG LP8550_PWM_CONFIG
41#define LP8553_I2C_CONFIG LP8550_I2C_CONFIG
42
43/* DEVICE CONTROL register - LP8556 */
44#define LP8556_PWM_CONFIG (LP8556_PWM_ONLY << BRT_MODE_SHFT)
45#define LP8556_COMB1_CONFIG (LP8556_COMBINED1 << BRT_MODE_SHFT)
46#define LP8556_I2C_CONFIG ((ENABLE_BL << BL_CTL_SHFT) | \
47 (LP8556_I2C_ONLY << BRT_MODE_SHFT))
48#define LP8556_COMB2_CONFIG (LP8556_COMBINED2 << BRT_MODE_SHFT)
49
50/* ROM area boundary */
51#define EEPROM_START (0xA0)
52#define EEPROM_END (0xA7)
53#define EPROM_START (0xA0)
54#define EPROM_END (0xAF)
55
56enum lp855x_chip_id {
57 LP8550,
58 LP8551,
59 LP8552,
60 LP8553,
61 LP8556,
62};
63
64enum lp855x_brightness_ctrl_mode {
65 PWM_BASED = 1,
66 REGISTER_BASED,
67};
68
69enum lp8550_brighntess_source {
70 LP8550_PWM_ONLY,
71 LP8550_I2C_ONLY = 2,
72};
73
74enum lp8551_brighntess_source {
75 LP8551_PWM_ONLY = LP8550_PWM_ONLY,
76 LP8551_I2C_ONLY = LP8550_I2C_ONLY,
77};
78
79enum lp8552_brighntess_source {
80 LP8552_PWM_ONLY = LP8550_PWM_ONLY,
81 LP8552_I2C_ONLY = LP8550_I2C_ONLY,
82};
83
84enum lp8553_brighntess_source {
85 LP8553_PWM_ONLY = LP8550_PWM_ONLY,
86 LP8553_I2C_ONLY = LP8550_I2C_ONLY,
87};
88
89enum lp8556_brightness_source {
90 LP8556_PWM_ONLY,
91 LP8556_COMBINED1, /* pwm + i2c before the shaper block */
92 LP8556_I2C_ONLY,
93 LP8556_COMBINED2, /* pwm + i2c after the shaper block */
94};
95
96struct lp855x_pwm_data {
97 void (*pwm_set_intensity) (int brightness, int max_brightness);
98 int (*pwm_get_intensity) (int max_brightness);
99};
100
101struct lp855x_rom_data {
102 u8 addr;
103 u8 val;
104};
105
106/**
107 * struct lp855x_platform_data
108 * @name : Backlight driver name. If it is not defined, default name is set.
109 * @mode : brightness control by pwm or lp855x register
110 * @device_control : value of DEVICE CONTROL register
111 * @initial_brightness : initial value of backlight brightness
112 * @pwm_data : platform specific pwm generation functions.
113 Only valid when mode is PWM_BASED.
114 * @load_new_rom_data :
115 0 : use default configuration data
116 1 : update values of eeprom or eprom registers on loading driver
117 * @size_program : total size of lp855x_rom_data
118 * @rom_data : list of new eeprom/eprom registers
119 */
120struct lp855x_platform_data {
121 char *name;
122 enum lp855x_brightness_ctrl_mode mode;
123 u8 device_control;
124 int initial_brightness;
125 struct lp855x_pwm_data pwm_data;
126 u8 load_new_rom_data;
127 int size_program;
128 struct lp855x_rom_data *rom_data;
129};
130
131#endif
diff --git a/include/linux/magic.h b/include/linux/magic.h
index b7ed4759dbb2..e15192cb9cf4 100644
--- a/include/linux/magic.h
+++ b/include/linux/magic.h
@@ -9,7 +9,6 @@
9#define CRAMFS_MAGIC 0x28cd3d45 /* some random number */ 9#define CRAMFS_MAGIC 0x28cd3d45 /* some random number */
10#define CRAMFS_MAGIC_WEND 0x453dcd28 /* magic number with the wrong endianess */ 10#define CRAMFS_MAGIC_WEND 0x453dcd28 /* magic number with the wrong endianess */
11#define DEBUGFS_MAGIC 0x64626720 11#define DEBUGFS_MAGIC 0x64626720
12#define SYSFS_MAGIC 0x62656572
13#define SECURITYFS_MAGIC 0x73636673 12#define SECURITYFS_MAGIC 0x73636673
14#define SELINUX_MAGIC 0xf97cff8c 13#define SELINUX_MAGIC 0xf97cff8c
15#define RAMFS_MAGIC 0x858458f6 /* some random number */ 14#define RAMFS_MAGIC 0x858458f6 /* some random number */
@@ -27,7 +26,6 @@
27#define HPFS_SUPER_MAGIC 0xf995e849 26#define HPFS_SUPER_MAGIC 0xf995e849
28#define ISOFS_SUPER_MAGIC 0x9660 27#define ISOFS_SUPER_MAGIC 0x9660
29#define JFFS2_SUPER_MAGIC 0x72b6 28#define JFFS2_SUPER_MAGIC 0x72b6
30#define ANON_INODE_FS_MAGIC 0x09041934
31#define PSTOREFS_MAGIC 0x6165676C 29#define PSTOREFS_MAGIC 0x6165676C
32 30
33#define MINIX_SUPER_MAGIC 0x137F /* minix v1 fs, 14 char names */ 31#define MINIX_SUPER_MAGIC 0x137F /* minix v1 fs, 14 char names */
@@ -40,7 +38,6 @@
40#define NCP_SUPER_MAGIC 0x564c /* Guess, what 0x564c is :-) */ 38#define NCP_SUPER_MAGIC 0x564c /* Guess, what 0x564c is :-) */
41#define NFS_SUPER_MAGIC 0x6969 39#define NFS_SUPER_MAGIC 0x6969
42#define OPENPROM_SUPER_MAGIC 0x9fa1 40#define OPENPROM_SUPER_MAGIC 0x9fa1
43#define PROC_SUPER_MAGIC 0x9fa0
44#define QNX4_SUPER_MAGIC 0x002f /* qnx4 fs detection */ 41#define QNX4_SUPER_MAGIC 0x002f /* qnx4 fs detection */
45#define QNX6_SUPER_MAGIC 0x68191122 /* qnx6 fs detection */ 42#define QNX6_SUPER_MAGIC 0x68191122 /* qnx6 fs detection */
46 43
@@ -52,15 +49,24 @@
52#define REISER2FS_JR_SUPER_MAGIC_STRING "ReIsEr3Fs" 49#define REISER2FS_JR_SUPER_MAGIC_STRING "ReIsEr3Fs"
53 50
54#define SMB_SUPER_MAGIC 0x517B 51#define SMB_SUPER_MAGIC 0x517B
55#define USBDEVICE_SUPER_MAGIC 0x9fa2
56#define CGROUP_SUPER_MAGIC 0x27e0eb 52#define CGROUP_SUPER_MAGIC 0x27e0eb
57 53
58#define FUTEXFS_SUPER_MAGIC 0xBAD1DEA
59 54
60#define STACK_END_MAGIC 0x57AC6E9D 55#define STACK_END_MAGIC 0x57AC6E9D
61 56
57#define V9FS_MAGIC 0x01021997
58
59#define BDEVFS_MAGIC 0x62646576
60#define BINFMTFS_MAGIC 0x42494e4d
62#define DEVPTS_SUPER_MAGIC 0x1cd1 61#define DEVPTS_SUPER_MAGIC 0x1cd1
62#define FUTEXFS_SUPER_MAGIC 0xBAD1DEA
63#define PIPEFS_MAGIC 0x50495045
64#define PROC_SUPER_MAGIC 0x9fa0
63#define SOCKFS_MAGIC 0x534F434B 65#define SOCKFS_MAGIC 0x534F434B
64#define V9FS_MAGIC 0x01021997 66#define SYSFS_MAGIC 0x62656572
67#define USBDEVICE_SUPER_MAGIC 0x9fa2
68#define MTD_INODE_FS_MAGIC 0x11307854
69#define ANON_INODE_FS_MAGIC 0x09041934
70
65 71
66#endif /* __LINUX_MAGIC_H__ */ 72#endif /* __LINUX_MAGIC_H__ */
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 7330742e7973..a6fabdfd34c5 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -111,7 +111,7 @@ extern unsigned int kobjsize(const void *objp);
111#define VM_HUGEPAGE 0x01000000 /* MADV_HUGEPAGE marked this vma */ 111#define VM_HUGEPAGE 0x01000000 /* MADV_HUGEPAGE marked this vma */
112#endif 112#endif
113#define VM_INSERTPAGE 0x02000000 /* The vma has had "vm_insert_page()" done on it */ 113#define VM_INSERTPAGE 0x02000000 /* The vma has had "vm_insert_page()" done on it */
114#define VM_ALWAYSDUMP 0x04000000 /* Always include in core dumps */ 114#define VM_NODUMP 0x04000000 /* Do not include in the core dump */
115 115
116#define VM_CAN_NONLINEAR 0x08000000 /* Has ->fault & does nonlinear pages */ 116#define VM_CAN_NONLINEAR 0x08000000 /* Has ->fault & does nonlinear pages */
117#define VM_MIXEDMAP 0x10000000 /* Can contain "struct page" and pure PFN pages */ 117#define VM_MIXEDMAP 0x10000000 /* Can contain "struct page" and pure PFN pages */
diff --git a/include/linux/mmc/ioctl.h b/include/linux/mmc/ioctl.h
index 8fa5bc5f8059..1f5e68923929 100644
--- a/include/linux/mmc/ioctl.h
+++ b/include/linux/mmc/ioctl.h
@@ -1,5 +1,8 @@
1#ifndef LINUX_MMC_IOCTL_H 1#ifndef LINUX_MMC_IOCTL_H
2#define LINUX_MMC_IOCTL_H 2#define LINUX_MMC_IOCTL_H
3
4#include <linux/types.h>
5
3struct mmc_ioc_cmd { 6struct mmc_ioc_cmd {
4 /* Implies direction of data. true = write, false = read */ 7 /* Implies direction of data. true = write, false = read */
5 int write_flag; 8 int write_flag;
diff --git a/include/linux/nmi.h b/include/linux/nmi.h
index 2d304efc89df..db50840e6355 100644
--- a/include/linux/nmi.h
+++ b/include/linux/nmi.h
@@ -14,7 +14,7 @@
14 * may be used to reset the timeout - for code which intentionally 14 * may be used to reset the timeout - for code which intentionally
15 * disables interrupts for a long time. This call is stateless. 15 * disables interrupts for a long time. This call is stateless.
16 */ 16 */
17#if defined(ARCH_HAS_NMI_WATCHDOG) || defined(CONFIG_HARDLOCKUP_DETECTOR) 17#if defined(CONFIG_HAVE_NMI_WATCHDOG) || defined(CONFIG_HARDLOCKUP_DETECTOR)
18#include <asm/nmi.h> 18#include <asm/nmi.h>
19extern void touch_nmi_watchdog(void); 19extern void touch_nmi_watchdog(void);
20#else 20#else
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h
index 77257c92155a..6d626ff0cfd0 100644
--- a/include/linux/pipe_fs_i.h
+++ b/include/linux/pipe_fs_i.h
@@ -1,8 +1,6 @@
1#ifndef _LINUX_PIPE_FS_I_H 1#ifndef _LINUX_PIPE_FS_I_H
2#define _LINUX_PIPE_FS_I_H 2#define _LINUX_PIPE_FS_I_H
3 3
4#define PIPEFS_MAGIC 0x50495045
5
6#define PIPE_DEF_BUFFERS 16 4#define PIPE_DEF_BUFFERS 16
7 5
8#define PIPE_BUF_FLAG_LRU 0x01 /* page is on the LRU */ 6#define PIPE_BUF_FLAG_LRU 0x01 /* page is on the LRU */
diff --git a/include/linux/poll.h b/include/linux/poll.h
index cf40010ce0cd..48fe8bc398d1 100644
--- a/include/linux/poll.h
+++ b/include/linux/poll.h
@@ -32,21 +32,46 @@ struct poll_table_struct;
32 */ 32 */
33typedef void (*poll_queue_proc)(struct file *, wait_queue_head_t *, struct poll_table_struct *); 33typedef void (*poll_queue_proc)(struct file *, wait_queue_head_t *, struct poll_table_struct *);
34 34
35/*
36 * Do not touch the structure directly, use the access functions
37 * poll_does_not_wait() and poll_requested_events() instead.
38 */
35typedef struct poll_table_struct { 39typedef struct poll_table_struct {
36 poll_queue_proc qproc; 40 poll_queue_proc _qproc;
37 unsigned long key; 41 unsigned long _key;
38} poll_table; 42} poll_table;
39 43
40static inline void poll_wait(struct file * filp, wait_queue_head_t * wait_address, poll_table *p) 44static inline void poll_wait(struct file * filp, wait_queue_head_t * wait_address, poll_table *p)
41{ 45{
42 if (p && wait_address) 46 if (p && p->_qproc && wait_address)
43 p->qproc(filp, wait_address, p); 47 p->_qproc(filp, wait_address, p);
48}
49
50/*
51 * Return true if it is guaranteed that poll will not wait. This is the case
52 * if the poll() of another file descriptor in the set got an event, so there
53 * is no need for waiting.
54 */
55static inline bool poll_does_not_wait(const poll_table *p)
56{
57 return p == NULL || p->_qproc == NULL;
58}
59
60/*
61 * Return the set of events that the application wants to poll for.
62 * This is useful for drivers that need to know whether a DMA transfer has
63 * to be started implicitly on poll(). You typically only want to do that
64 * if the application is actually polling for POLLIN and/or POLLOUT.
65 */
66static inline unsigned long poll_requested_events(const poll_table *p)
67{
68 return p ? p->_key : ~0UL;
44} 69}
45 70
46static inline void init_poll_funcptr(poll_table *pt, poll_queue_proc qproc) 71static inline void init_poll_funcptr(poll_table *pt, poll_queue_proc qproc)
47{ 72{
48 pt->qproc = qproc; 73 pt->_qproc = qproc;
49 pt->key = ~0UL; /* all events enabled */ 74 pt->_key = ~0UL; /* all events enabled */
50} 75}
51 76
52struct poll_table_entry { 77struct poll_table_entry {
diff --git a/include/linux/prctl.h b/include/linux/prctl.h
index a0413ac3abe8..e0cfec2490aa 100644
--- a/include/linux/prctl.h
+++ b/include/linux/prctl.h
@@ -121,4 +121,7 @@
121#define PR_SET_PTRACER 0x59616d61 121#define PR_SET_PTRACER 0x59616d61
122# define PR_SET_PTRACER_ANY ((unsigned long)-1) 122# define PR_SET_PTRACER_ANY ((unsigned long)-1)
123 123
124#define PR_SET_CHILD_SUBREAPER 36
125#define PR_GET_CHILD_SUBREAPER 37
126
124#endif /* _LINUX_PRCTL_H */ 127#endif /* _LINUX_PRCTL_H */
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
index c2f1f6a5fcb8..407c678d2e30 100644
--- a/include/linux/ptrace.h
+++ b/include/linux/ptrace.h
@@ -51,20 +51,6 @@
51#define PTRACE_INTERRUPT 0x4207 51#define PTRACE_INTERRUPT 0x4207
52#define PTRACE_LISTEN 0x4208 52#define PTRACE_LISTEN 0x4208
53 53
54/* flags in @data for PTRACE_SEIZE */
55#define PTRACE_SEIZE_DEVEL 0x80000000 /* temp flag for development */
56
57/* options set using PTRACE_SETOPTIONS */
58#define PTRACE_O_TRACESYSGOOD 0x00000001
59#define PTRACE_O_TRACEFORK 0x00000002
60#define PTRACE_O_TRACEVFORK 0x00000004
61#define PTRACE_O_TRACECLONE 0x00000008
62#define PTRACE_O_TRACEEXEC 0x00000010
63#define PTRACE_O_TRACEVFORKDONE 0x00000020
64#define PTRACE_O_TRACEEXIT 0x00000040
65
66#define PTRACE_O_MASK 0x0000007f
67
68/* Wait extended result codes for the above trace options. */ 54/* Wait extended result codes for the above trace options. */
69#define PTRACE_EVENT_FORK 1 55#define PTRACE_EVENT_FORK 1
70#define PTRACE_EVENT_VFORK 2 56#define PTRACE_EVENT_VFORK 2
@@ -72,7 +58,19 @@
72#define PTRACE_EVENT_EXEC 4 58#define PTRACE_EVENT_EXEC 4
73#define PTRACE_EVENT_VFORK_DONE 5 59#define PTRACE_EVENT_VFORK_DONE 5
74#define PTRACE_EVENT_EXIT 6 60#define PTRACE_EVENT_EXIT 6
75#define PTRACE_EVENT_STOP 7 61/* Extended result codes which enabled by means other than options. */
62#define PTRACE_EVENT_STOP 128
63
64/* Options set using PTRACE_SETOPTIONS or using PTRACE_SEIZE @data param */
65#define PTRACE_O_TRACESYSGOOD 1
66#define PTRACE_O_TRACEFORK (1 << PTRACE_EVENT_FORK)
67#define PTRACE_O_TRACEVFORK (1 << PTRACE_EVENT_VFORK)
68#define PTRACE_O_TRACECLONE (1 << PTRACE_EVENT_CLONE)
69#define PTRACE_O_TRACEEXEC (1 << PTRACE_EVENT_EXEC)
70#define PTRACE_O_TRACEVFORKDONE (1 << PTRACE_EVENT_VFORK_DONE)
71#define PTRACE_O_TRACEEXIT (1 << PTRACE_EVENT_EXIT)
72
73#define PTRACE_O_MASK 0x0000007f
76 74
77#include <asm/ptrace.h> 75#include <asm/ptrace.h>
78 76
@@ -88,13 +86,12 @@
88#define PT_SEIZED 0x00010000 /* SEIZE used, enable new behavior */ 86#define PT_SEIZED 0x00010000 /* SEIZE used, enable new behavior */
89#define PT_PTRACED 0x00000001 87#define PT_PTRACED 0x00000001
90#define PT_DTRACE 0x00000002 /* delayed trace (used on m68k, i386) */ 88#define PT_DTRACE 0x00000002 /* delayed trace (used on m68k, i386) */
91#define PT_TRACESYSGOOD 0x00000004 89#define PT_PTRACE_CAP 0x00000004 /* ptracer can follow suid-exec */
92#define PT_PTRACE_CAP 0x00000008 /* ptracer can follow suid-exec */
93 90
91#define PT_OPT_FLAG_SHIFT 3
94/* PT_TRACE_* event enable flags */ 92/* PT_TRACE_* event enable flags */
95#define PT_EVENT_FLAG_SHIFT 4 93#define PT_EVENT_FLAG(event) (1 << (PT_OPT_FLAG_SHIFT + (event)))
96#define PT_EVENT_FLAG(event) (1 << (PT_EVENT_FLAG_SHIFT + (event) - 1)) 94#define PT_TRACESYSGOOD PT_EVENT_FLAG(0)
97
98#define PT_TRACE_FORK PT_EVENT_FLAG(PTRACE_EVENT_FORK) 95#define PT_TRACE_FORK PT_EVENT_FLAG(PTRACE_EVENT_FORK)
99#define PT_TRACE_VFORK PT_EVENT_FLAG(PTRACE_EVENT_VFORK) 96#define PT_TRACE_VFORK PT_EVENT_FLAG(PTRACE_EVENT_VFORK)
100#define PT_TRACE_CLONE PT_EVENT_FLAG(PTRACE_EVENT_CLONE) 97#define PT_TRACE_CLONE PT_EVENT_FLAG(PTRACE_EVENT_CLONE)
@@ -102,8 +99,6 @@
102#define PT_TRACE_VFORK_DONE PT_EVENT_FLAG(PTRACE_EVENT_VFORK_DONE) 99#define PT_TRACE_VFORK_DONE PT_EVENT_FLAG(PTRACE_EVENT_VFORK_DONE)
103#define PT_TRACE_EXIT PT_EVENT_FLAG(PTRACE_EVENT_EXIT) 100#define PT_TRACE_EXIT PT_EVENT_FLAG(PTRACE_EVENT_EXIT)
104 101
105#define PT_TRACE_MASK 0x000003f4
106
107/* single stepping state bits (used on ARM and PA-RISC) */ 102/* single stepping state bits (used on ARM and PA-RISC) */
108#define PT_SINGLESTEP_BIT 31 103#define PT_SINGLESTEP_BIT 31
109#define PT_SINGLESTEP (1<<PT_SINGLESTEP_BIT) 104#define PT_SINGLESTEP (1<<PT_SINGLESTEP_BIT)
@@ -199,9 +194,10 @@ static inline void ptrace_event(int event, unsigned long message)
199 if (unlikely(ptrace_event_enabled(current, event))) { 194 if (unlikely(ptrace_event_enabled(current, event))) {
200 current->ptrace_message = message; 195 current->ptrace_message = message;
201 ptrace_notify((event << 8) | SIGTRAP); 196 ptrace_notify((event << 8) | SIGTRAP);
202 } else if (event == PTRACE_EVENT_EXEC && unlikely(current->ptrace)) { 197 } else if (event == PTRACE_EVENT_EXEC) {
203 /* legacy EXEC report via SIGTRAP */ 198 /* legacy EXEC report via SIGTRAP */
204 send_sig(SIGTRAP, current, 0); 199 if ((current->ptrace & (PT_PTRACED|PT_SEIZED)) == PT_PTRACED)
200 send_sig(SIGTRAP, current, 0);
205 } 201 }
206} 202}
207 203
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 937217425c47..2c62594b67dd 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -418,7 +418,7 @@ extern int rcu_my_thread_group_empty(void);
418 */ 418 */
419#define rcu_lockdep_assert(c, s) \ 419#define rcu_lockdep_assert(c, s) \
420 do { \ 420 do { \
421 static bool __warned; \ 421 static bool __section(.data.unlikely) __warned; \
422 if (debug_lockdep_rcu_enabled() && !__warned && !(c)) { \ 422 if (debug_lockdep_rcu_enabled() && !__warned && !(c)) { \
423 __warned = true; \ 423 __warned = true; \
424 lockdep_rcu_suspicious(__FILE__, __LINE__, s); \ 424 lockdep_rcu_suspicious(__FILE__, __LINE__, s); \
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 0c147a4260a5..0c3854b0d4b1 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -553,6 +553,18 @@ struct signal_struct {
553 int group_stop_count; 553 int group_stop_count;
554 unsigned int flags; /* see SIGNAL_* flags below */ 554 unsigned int flags; /* see SIGNAL_* flags below */
555 555
556 /*
557 * PR_SET_CHILD_SUBREAPER marks a process, like a service
558 * manager, to re-parent orphan (double-forking) child processes
559 * to this process instead of 'init'. The service manager is
560 * able to receive SIGCHLD signals and is able to investigate
561 * the process until it calls wait(). All children of this
562 * process will inherit a flag if they should look for a
563 * child_subreaper process at exit.
564 */
565 unsigned int is_child_subreaper:1;
566 unsigned int has_child_subreaper:1;
567
556 /* POSIX.1b Interval Timers */ 568 /* POSIX.1b Interval Timers */
557 struct list_head posix_timers; 569 struct list_head posix_timers;
558 570
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
index 44f1514b00ba..54e5ae7f8adc 100644
--- a/include/linux/seq_file.h
+++ b/include/linux/seq_file.h
@@ -121,9 +121,12 @@ int single_release(struct inode *, struct file *);
121void *__seq_open_private(struct file *, const struct seq_operations *, int); 121void *__seq_open_private(struct file *, const struct seq_operations *, int);
122int seq_open_private(struct file *, const struct seq_operations *, int); 122int seq_open_private(struct file *, const struct seq_operations *, int);
123int seq_release_private(struct inode *, struct file *); 123int seq_release_private(struct inode *, struct file *);
124int seq_put_decimal_ull(struct seq_file *m, char delimiter,
125 unsigned long long num);
126int seq_put_decimal_ll(struct seq_file *m, char delimiter,
127 long long num);
124 128
125#define SEQ_START_TOKEN ((void *)1) 129#define SEQ_START_TOKEN ((void *)1)
126
127/* 130/*
128 * Helpers for iteration over list_head-s in seq_files 131 * Helpers for iteration over list_head-s in seq_files
129 */ 132 */
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
index a71a2927a6a0..51bd91d911c3 100644
--- a/include/linux/tracehook.h
+++ b/include/linux/tracehook.h
@@ -54,12 +54,12 @@ struct linux_binprm;
54/* 54/*
55 * ptrace report for syscall entry and exit looks identical. 55 * ptrace report for syscall entry and exit looks identical.
56 */ 56 */
57static inline void ptrace_report_syscall(struct pt_regs *regs) 57static inline int ptrace_report_syscall(struct pt_regs *regs)
58{ 58{
59 int ptrace = current->ptrace; 59 int ptrace = current->ptrace;
60 60
61 if (!(ptrace & PT_PTRACED)) 61 if (!(ptrace & PT_PTRACED))
62 return; 62 return 0;
63 63
64 ptrace_notify(SIGTRAP | ((ptrace & PT_TRACESYSGOOD) ? 0x80 : 0)); 64 ptrace_notify(SIGTRAP | ((ptrace & PT_TRACESYSGOOD) ? 0x80 : 0));
65 65
@@ -72,6 +72,8 @@ static inline void ptrace_report_syscall(struct pt_regs *regs)
72 send_sig(current->exit_code, current, 1); 72 send_sig(current->exit_code, current, 1);
73 current->exit_code = 0; 73 current->exit_code = 0;
74 } 74 }
75
76 return fatal_signal_pending(current);
75} 77}
76 78
77/** 79/**
@@ -96,8 +98,7 @@ static inline void ptrace_report_syscall(struct pt_regs *regs)
96static inline __must_check int tracehook_report_syscall_entry( 98static inline __must_check int tracehook_report_syscall_entry(
97 struct pt_regs *regs) 99 struct pt_regs *regs)
98{ 100{
99 ptrace_report_syscall(regs); 101 return ptrace_report_syscall(regs);
100 return 0;
101} 102}
102 103
103/** 104/**