diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-17 12:56:40 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-17 12:56:55 -0500 |
| commit | 66b0835e2bb3d345f060a47bb8c8f883bd25ec2b (patch) | |
| tree | d1fc390dfa58f131df908267d87ef99d4522a596 /include/linux | |
| parent | 479b46b5599b1e610630d7332e168c1f9c4ee0b4 (diff) | |
| parent | 85e2efbb1db9a18d218006706d6e4fbeb0216213 (diff) | |
Merge 2.6.38-rc5 into usb-next
This is needed to resolve some merge conflicts that were found
in the USB host controller patches, and reported by Stephen Rothwell.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux')
34 files changed, 185 insertions, 91 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 2296d8b1931f..b0ada6f37dd6 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | header-y += byteorder/ | 1 | header-y += byteorder/ |
| 2 | header-y += can/ | 2 | header-y += can/ |
| 3 | header-y += caif/ | ||
| 3 | header-y += dvb/ | 4 | header-y += dvb/ |
| 4 | header-y += hdlc/ | 5 | header-y += hdlc/ |
| 5 | header-y += isdn/ | 6 | header-y += isdn/ |
diff --git a/include/linux/caif/Kbuild b/include/linux/caif/Kbuild new file mode 100644 index 000000000000..a9cf250689dc --- /dev/null +++ b/include/linux/caif/Kbuild | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | header-y += caif_socket.h | ||
| 2 | header-y += if_caif.h | ||
diff --git a/include/linux/console.h b/include/linux/console.h index 9774fe6a1a97..7453cfd593c8 100644 --- a/include/linux/console.h +++ b/include/linux/console.h | |||
| @@ -139,9 +139,9 @@ extern int update_console_cmdline(char *name, int idx, char *name_new, int idx_n | |||
| 139 | extern void register_console(struct console *); | 139 | extern void register_console(struct console *); |
| 140 | extern int unregister_console(struct console *); | 140 | extern int unregister_console(struct console *); |
| 141 | extern struct console *console_drivers; | 141 | extern struct console *console_drivers; |
| 142 | extern void acquire_console_sem(void); | 142 | extern void console_lock(void); |
| 143 | extern int try_acquire_console_sem(void); | 143 | extern int console_trylock(void); |
| 144 | extern void release_console_sem(void); | 144 | extern void console_unlock(void); |
| 145 | extern void console_conditional_schedule(void); | 145 | extern void console_conditional_schedule(void); |
| 146 | extern void console_unblank(void); | 146 | extern void console_unblank(void); |
| 147 | extern struct tty_driver *console_device(int *); | 147 | extern struct tty_driver *console_device(int *); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 32b38cd829d3..bd3215940c37 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -2555,9 +2555,12 @@ int proc_nr_inodes(struct ctl_table *table, int write, | |||
| 2555 | void __user *buffer, size_t *lenp, loff_t *ppos); | 2555 | void __user *buffer, size_t *lenp, loff_t *ppos); |
| 2556 | int __init get_filesystem_list(char *buf); | 2556 | int __init get_filesystem_list(char *buf); |
| 2557 | 2557 | ||
| 2558 | #define __FMODE_EXEC ((__force int) FMODE_EXEC) | ||
| 2559 | #define __FMODE_NONOTIFY ((__force int) FMODE_NONOTIFY) | ||
| 2560 | |||
| 2558 | #define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE]) | 2561 | #define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE]) |
| 2559 | #define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \ | 2562 | #define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \ |
| 2560 | (flag & FMODE_NONOTIFY))) | 2563 | (flag & __FMODE_NONOTIFY))) |
| 2561 | 2564 | ||
| 2562 | #endif /* __KERNEL__ */ | 2565 | #endif /* __KERNEL__ */ |
| 2563 | #endif /* _LINUX_FS_H */ | 2566 | #endif /* _LINUX_FS_H */ |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index a3b148a91874..0b84c61607e8 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
| @@ -249,7 +249,7 @@ static inline enum zone_type gfp_zone(gfp_t flags) | |||
| 249 | ((1 << ZONES_SHIFT) - 1); | 249 | ((1 << ZONES_SHIFT) - 1); |
| 250 | 250 | ||
| 251 | if (__builtin_constant_p(bit)) | 251 | if (__builtin_constant_p(bit)) |
| 252 | MAYBE_BUILD_BUG_ON((GFP_ZONE_BAD >> bit) & 1); | 252 | BUILD_BUG_ON((GFP_ZONE_BAD >> bit) & 1); |
| 253 | else { | 253 | else { |
| 254 | #ifdef CONFIG_DEBUG_VM | 254 | #ifdef CONFIG_DEBUG_VM |
| 255 | BUG_ON((GFP_ZONE_BAD >> bit) & 1); | 255 | BUG_ON((GFP_ZONE_BAD >> bit) & 1); |
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h index 8e6c8c42bc3c..df29c8fde36b 100644 --- a/include/linux/huge_mm.h +++ b/include/linux/huge_mm.h | |||
| @@ -57,7 +57,8 @@ extern pmd_t *page_check_address_pmd(struct page *page, | |||
| 57 | (transparent_hugepage_flags & \ | 57 | (transparent_hugepage_flags & \ |
| 58 | (1<<TRANSPARENT_HUGEPAGE_REQ_MADV_FLAG) && \ | 58 | (1<<TRANSPARENT_HUGEPAGE_REQ_MADV_FLAG) && \ |
| 59 | ((__vma)->vm_flags & VM_HUGEPAGE))) && \ | 59 | ((__vma)->vm_flags & VM_HUGEPAGE))) && \ |
| 60 | !((__vma)->vm_flags & VM_NOHUGEPAGE)) | 60 | !((__vma)->vm_flags & VM_NOHUGEPAGE) && \ |
| 61 | !is_vma_temporary_stack(__vma)) | ||
| 61 | #define transparent_hugepage_defrag(__vma) \ | 62 | #define transparent_hugepage_defrag(__vma) \ |
| 62 | ((transparent_hugepage_flags & \ | 63 | ((transparent_hugepage_flags & \ |
| 63 | (1<<TRANSPARENT_HUGEPAGE_DEFRAG_FLAG)) || \ | 64 | (1<<TRANSPARENT_HUGEPAGE_DEFRAG_FLAG)) || \ |
diff --git a/include/linux/input/bu21013.h b/include/linux/input/bu21013.h index e470d387dd49..05e03284b92a 100644 --- a/include/linux/input/bu21013.h +++ b/include/linux/input/bu21013.h | |||
| @@ -12,8 +12,6 @@ | |||
| 12 | * @cs_en: pointer to the cs enable function | 12 | * @cs_en: pointer to the cs enable function |
| 13 | * @cs_dis: pointer to the cs disable function | 13 | * @cs_dis: pointer to the cs disable function |
| 14 | * @irq_read_val: pointer to read the pen irq value function | 14 | * @irq_read_val: pointer to read the pen irq value function |
| 15 | * @x_max_res: xmax resolution | ||
| 16 | * @y_max_res: ymax resolution | ||
| 17 | * @touch_x_max: touch x max | 15 | * @touch_x_max: touch x max |
| 18 | * @touch_y_max: touch y max | 16 | * @touch_y_max: touch y max |
| 19 | * @cs_pin: chip select pin | 17 | * @cs_pin: chip select pin |
| @@ -29,8 +27,6 @@ struct bu21013_platform_device { | |||
| 29 | int (*cs_en)(int reset_pin); | 27 | int (*cs_en)(int reset_pin); |
| 30 | int (*cs_dis)(int reset_pin); | 28 | int (*cs_dis)(int reset_pin); |
| 31 | int (*irq_read_val)(void); | 29 | int (*irq_read_val)(void); |
| 32 | int x_max_res; | ||
| 33 | int y_max_res; | ||
| 34 | int touch_x_max; | 30 | int touch_x_max; |
| 35 | int touch_y_max; | 31 | int touch_y_max; |
| 36 | unsigned int cs_pin; | 32 | unsigned int cs_pin; |
diff --git a/include/linux/input/matrix_keypad.h b/include/linux/input/matrix_keypad.h index 697474691749..fe7c4b9ae270 100644 --- a/include/linux/input/matrix_keypad.h +++ b/include/linux/input/matrix_keypad.h | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
| 5 | #include <linux/input.h> | 5 | #include <linux/input.h> |
| 6 | 6 | ||
| 7 | #define MATRIX_MAX_ROWS 16 | 7 | #define MATRIX_MAX_ROWS 32 |
| 8 | #define MATRIX_MAX_COLS 16 | 8 | #define MATRIX_MAX_COLS 32 |
| 9 | 9 | ||
| 10 | #define KEY(row, col, val) ((((row) & (MATRIX_MAX_ROWS - 1)) << 24) |\ | 10 | #define KEY(row, col, val) ((((row) & (MATRIX_MAX_ROWS - 1)) << 24) |\ |
| 11 | (((col) & (MATRIX_MAX_COLS - 1)) << 16) |\ | 11 | (((col) & (MATRIX_MAX_COLS - 1)) << 16) |\ |
diff --git a/include/linux/irq.h b/include/linux/irq.h index abde2527c699..80fcb53057bc 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
| @@ -74,7 +74,8 @@ typedef void (*irq_flow_handler_t)(unsigned int irq, | |||
| 74 | 74 | ||
| 75 | #define IRQF_MODIFY_MASK \ | 75 | #define IRQF_MODIFY_MASK \ |
| 76 | (IRQ_TYPE_SENSE_MASK | IRQ_NOPROBE | IRQ_NOREQUEST | \ | 76 | (IRQ_TYPE_SENSE_MASK | IRQ_NOPROBE | IRQ_NOREQUEST | \ |
| 77 | IRQ_NOAUTOEN | IRQ_MOVE_PCNTXT | IRQ_LEVEL) | 77 | IRQ_NOAUTOEN | IRQ_MOVE_PCNTXT | IRQ_LEVEL | IRQ_NO_BALANCING | \ |
| 78 | IRQ_PER_CPU) | ||
| 78 | 79 | ||
| 79 | #ifdef CONFIG_IRQ_PER_CPU | 80 | #ifdef CONFIG_IRQ_PER_CPU |
| 80 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) | 81 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index d07d8057e440..2fe6e84894a4 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -575,12 +575,6 @@ struct sysinfo { | |||
| 575 | char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */ | 575 | char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */ |
| 576 | }; | 576 | }; |
| 577 | 577 | ||
| 578 | /* Force a compilation error if condition is true */ | ||
| 579 | #define BUILD_BUG_ON(condition) ((void)BUILD_BUG_ON_ZERO(condition)) | ||
| 580 | |||
| 581 | /* Force a compilation error if condition is constant and true */ | ||
| 582 | #define MAYBE_BUILD_BUG_ON(cond) ((void)sizeof(char[1 - 2 * !!(cond)])) | ||
| 583 | |||
| 584 | /* Force a compilation error if a constant expression is not a power of 2 */ | 578 | /* Force a compilation error if a constant expression is not a power of 2 */ |
| 585 | #define BUILD_BUG_ON_NOT_POWER_OF_2(n) \ | 579 | #define BUILD_BUG_ON_NOT_POWER_OF_2(n) \ |
| 586 | BUILD_BUG_ON((n) == 0 || (((n) & ((n) - 1)) != 0)) | 580 | BUILD_BUG_ON((n) == 0 || (((n) & ((n) - 1)) != 0)) |
| @@ -592,6 +586,32 @@ struct sysinfo { | |||
| 592 | #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); })) | 586 | #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); })) |
| 593 | #define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); })) | 587 | #define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); })) |
| 594 | 588 | ||
| 589 | /** | ||
| 590 | * BUILD_BUG_ON - break compile if a condition is true. | ||
| 591 | * @condition: the condition which the compiler should know is false. | ||
| 592 | * | ||
| 593 | * If you have some code which relies on certain constants being equal, or | ||
| 594 | * other compile-time-evaluated condition, you should use BUILD_BUG_ON to | ||
| 595 | * detect if someone changes it. | ||
| 596 | * | ||
| 597 | * The implementation uses gcc's reluctance to create a negative array, but | ||
| 598 | * gcc (as of 4.4) only emits that error for obvious cases (eg. not arguments | ||
| 599 | * to inline functions). So as a fallback we use the optimizer; if it can't | ||
| 600 | * prove the condition is false, it will cause a link error on the undefined | ||
| 601 | * "__build_bug_on_failed". This error message can be harder to track down | ||
| 602 | * though, hence the two different methods. | ||
| 603 | */ | ||
| 604 | #ifndef __OPTIMIZE__ | ||
| 605 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) | ||
| 606 | #else | ||
| 607 | extern int __build_bug_on_failed; | ||
| 608 | #define BUILD_BUG_ON(condition) \ | ||
| 609 | do { \ | ||
| 610 | ((void)sizeof(char[1 - 2*!!(condition)])); \ | ||
| 611 | if (condition) __build_bug_on_failed = 1; \ | ||
| 612 | } while(0) | ||
| 613 | #endif | ||
| 614 | |||
| 595 | /* Trap pasters of __FUNCTION__ at compile-time */ | 615 | /* Trap pasters of __FUNCTION__ at compile-time */ |
| 596 | #define __FUNCTION__ (__func__) | 616 | #define __FUNCTION__ (__func__) |
| 597 | 617 | ||
diff --git a/include/linux/klist.h b/include/linux/klist.h index e91a4e59b771..a370ce57cf1d 100644 --- a/include/linux/klist.h +++ b/include/linux/klist.h | |||
| @@ -22,7 +22,7 @@ struct klist { | |||
| 22 | struct list_head k_list; | 22 | struct list_head k_list; |
| 23 | void (*get)(struct klist_node *); | 23 | void (*get)(struct klist_node *); |
| 24 | void (*put)(struct klist_node *); | 24 | void (*put)(struct klist_node *); |
| 25 | } __attribute__ ((aligned (4))); | 25 | } __attribute__ ((aligned (sizeof(void *)))); |
| 26 | 26 | ||
| 27 | #define KLIST_INIT(_name, _get, _put) \ | 27 | #define KLIST_INIT(_name, _get, _put) \ |
| 28 | { .k_lock = __SPIN_LOCK_UNLOCKED(_name.k_lock), \ | 28 | { .k_lock = __SPIN_LOCK_UNLOCKED(_name.k_lock), \ |
diff --git a/include/linux/kmemcheck.h b/include/linux/kmemcheck.h index 08d7dc4ddf40..39f8453239f7 100644 --- a/include/linux/kmemcheck.h +++ b/include/linux/kmemcheck.h | |||
| @@ -76,7 +76,7 @@ bool kmemcheck_is_obj_initialized(unsigned long addr, size_t size); | |||
| 76 | \ | 76 | \ |
| 77 | _n = (long) &((ptr)->name##_end) \ | 77 | _n = (long) &((ptr)->name##_end) \ |
| 78 | - (long) &((ptr)->name##_begin); \ | 78 | - (long) &((ptr)->name##_begin); \ |
| 79 | MAYBE_BUILD_BUG_ON(_n < 0); \ | 79 | BUILD_BUG_ON(_n < 0); \ |
| 80 | \ | 80 | \ |
| 81 | kmemcheck_mark_initialized(&((ptr)->name##_begin), _n); \ | 81 | kmemcheck_mark_initialized(&((ptr)->name##_begin), _n); \ |
| 82 | } while (0) | 82 | } while (0) |
diff --git a/include/linux/mmc/sh_mmcif.h b/include/linux/mmc/sh_mmcif.h index bf173502d744..38d393092812 100644 --- a/include/linux/mmc/sh_mmcif.h +++ b/include/linux/mmc/sh_mmcif.h | |||
| @@ -94,12 +94,12 @@ struct sh_mmcif_plat_data { | |||
| 94 | 94 | ||
| 95 | static inline u32 sh_mmcif_readl(void __iomem *addr, int reg) | 95 | static inline u32 sh_mmcif_readl(void __iomem *addr, int reg) |
| 96 | { | 96 | { |
| 97 | return readl(addr + reg); | 97 | return __raw_readl(addr + reg); |
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | static inline void sh_mmcif_writel(void __iomem *addr, int reg, u32 val) | 100 | static inline void sh_mmcif_writel(void __iomem *addr, int reg, u32 val) |
| 101 | { | 101 | { |
| 102 | writel(val, addr + reg); | 102 | __raw_writel(val, addr + reg); |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | #define SH_MMCIF_BBS 512 /* boot block size */ | 105 | #define SH_MMCIF_BBS 512 /* boot block size */ |
diff --git a/include/linux/module.h b/include/linux/module.h index 8b17fd8c790d..9bdf27c7615b 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -58,6 +58,12 @@ struct module_attribute { | |||
| 58 | void (*free)(struct module *); | 58 | void (*free)(struct module *); |
| 59 | }; | 59 | }; |
| 60 | 60 | ||
| 61 | struct module_version_attribute { | ||
| 62 | struct module_attribute mattr; | ||
| 63 | const char *module_name; | ||
| 64 | const char *version; | ||
| 65 | }; | ||
| 66 | |||
| 61 | struct module_kobject | 67 | struct module_kobject |
| 62 | { | 68 | { |
| 63 | struct kobject kobj; | 69 | struct kobject kobj; |
| @@ -161,7 +167,28 @@ extern struct module __this_module; | |||
| 161 | Using this automatically adds a checksum of the .c files and the | 167 | Using this automatically adds a checksum of the .c files and the |
| 162 | local headers in "srcversion". | 168 | local headers in "srcversion". |
| 163 | */ | 169 | */ |
| 170 | |||
| 171 | #if defined(MODULE) || !defined(CONFIG_SYSFS) | ||
| 164 | #define MODULE_VERSION(_version) MODULE_INFO(version, _version) | 172 | #define MODULE_VERSION(_version) MODULE_INFO(version, _version) |
| 173 | #else | ||
| 174 | #define MODULE_VERSION(_version) \ | ||
| 175 | extern ssize_t __modver_version_show(struct module_attribute *, \ | ||
| 176 | struct module *, char *); \ | ||
| 177 | static struct module_version_attribute __modver_version_attr \ | ||
| 178 | __used \ | ||
| 179 | __attribute__ ((__section__ ("__modver"),aligned(sizeof(void *)))) \ | ||
| 180 | = { \ | ||
| 181 | .mattr = { \ | ||
| 182 | .attr = { \ | ||
| 183 | .name = "version", \ | ||
| 184 | .mode = S_IRUGO, \ | ||
| 185 | }, \ | ||
| 186 | .show = __modver_version_show, \ | ||
| 187 | }, \ | ||
| 188 | .module_name = KBUILD_MODNAME, \ | ||
| 189 | .version = _version, \ | ||
| 190 | } | ||
| 191 | #endif | ||
| 165 | 192 | ||
| 166 | /* Optional firmware file (or files) needed by the module | 193 | /* Optional firmware file (or files) needed by the module |
| 167 | * format is simply firmware file name. Multiple firmware | 194 | * format is simply firmware file name. Multiple firmware |
| @@ -350,7 +377,7 @@ struct module | |||
| 350 | keeping pointers to this stuff */ | 377 | keeping pointers to this stuff */ |
| 351 | char *args; | 378 | char *args; |
| 352 | #ifdef CONFIG_TRACEPOINTS | 379 | #ifdef CONFIG_TRACEPOINTS |
| 353 | struct tracepoint *tracepoints; | 380 | struct tracepoint * const *tracepoints_ptrs; |
| 354 | unsigned int num_tracepoints; | 381 | unsigned int num_tracepoints; |
| 355 | #endif | 382 | #endif |
| 356 | #ifdef HAVE_JUMP_LABEL | 383 | #ifdef HAVE_JUMP_LABEL |
| @@ -362,7 +389,7 @@ struct module | |||
| 362 | unsigned int num_trace_bprintk_fmt; | 389 | unsigned int num_trace_bprintk_fmt; |
| 363 | #endif | 390 | #endif |
| 364 | #ifdef CONFIG_EVENT_TRACING | 391 | #ifdef CONFIG_EVENT_TRACING |
| 365 | struct ftrace_event_call *trace_events; | 392 | struct ftrace_event_call **trace_events; |
| 366 | unsigned int num_trace_events; | 393 | unsigned int num_trace_events; |
| 367 | #endif | 394 | #endif |
| 368 | #ifdef CONFIG_FTRACE_MCOUNT_RECORD | 395 | #ifdef CONFIG_FTRACE_MCOUNT_RECORD |
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 112adf8bd47d..07b41951e3fa 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h | |||
| @@ -16,15 +16,17 @@ | |||
| 16 | /* Chosen so that structs with an unsigned long line up. */ | 16 | /* Chosen so that structs with an unsigned long line up. */ |
| 17 | #define MAX_PARAM_PREFIX_LEN (64 - sizeof(unsigned long)) | 17 | #define MAX_PARAM_PREFIX_LEN (64 - sizeof(unsigned long)) |
| 18 | 18 | ||
| 19 | #ifdef MODULE | ||
| 20 | #define ___module_cat(a,b) __mod_ ## a ## b | 19 | #define ___module_cat(a,b) __mod_ ## a ## b |
| 21 | #define __module_cat(a,b) ___module_cat(a,b) | 20 | #define __module_cat(a,b) ___module_cat(a,b) |
| 21 | #ifdef MODULE | ||
| 22 | #define __MODULE_INFO(tag, name, info) \ | 22 | #define __MODULE_INFO(tag, name, info) \ |
| 23 | static const char __module_cat(name,__LINE__)[] \ | 23 | static const char __module_cat(name,__LINE__)[] \ |
| 24 | __used __attribute__((section(".modinfo"), unused, aligned(1))) \ | 24 | __used __attribute__((section(".modinfo"), unused, aligned(1))) \ |
| 25 | = __stringify(tag) "=" info | 25 | = __stringify(tag) "=" info |
| 26 | #else /* !MODULE */ | 26 | #else /* !MODULE */ |
| 27 | #define __MODULE_INFO(tag, name, info) | 27 | /* This struct is here for syntactic coherency, it is not used */ |
| 28 | #define __MODULE_INFO(tag, name, info) \ | ||
| 29 | struct __module_cat(name,__LINE__) {} | ||
| 28 | #endif | 30 | #endif |
| 29 | #define __MODULE_PARM_TYPE(name, _type) \ | 31 | #define __MODULE_PARM_TYPE(name, _type) \ |
| 30 | __MODULE_INFO(parmtype, name##type, #name ":" _type) | 32 | __MODULE_INFO(parmtype, name##type, #name ":" _type) |
diff --git a/include/linux/mroute.h b/include/linux/mroute.h index 0fa7a3a874c8..b21d567692b2 100644 --- a/include/linux/mroute.h +++ b/include/linux/mroute.h | |||
| @@ -150,6 +150,7 @@ static inline int ip_mroute_opt(int opt) | |||
| 150 | extern int ip_mroute_setsockopt(struct sock *, int, char __user *, unsigned int); | 150 | extern int ip_mroute_setsockopt(struct sock *, int, char __user *, unsigned int); |
| 151 | extern int ip_mroute_getsockopt(struct sock *, int, char __user *, int __user *); | 151 | extern int ip_mroute_getsockopt(struct sock *, int, char __user *, int __user *); |
| 152 | extern int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg); | 152 | extern int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg); |
| 153 | extern int ipmr_compat_ioctl(struct sock *sk, unsigned int cmd, void __user *arg); | ||
| 153 | extern int ip_mr_init(void); | 154 | extern int ip_mr_init(void); |
| 154 | #else | 155 | #else |
| 155 | static inline | 156 | static inline |
diff --git a/include/linux/mroute6.h b/include/linux/mroute6.h index 6091ab77f388..9d2deb200f54 100644 --- a/include/linux/mroute6.h +++ b/include/linux/mroute6.h | |||
| @@ -136,6 +136,7 @@ extern int ip6_mroute_setsockopt(struct sock *, int, char __user *, unsigned int | |||
| 136 | extern int ip6_mroute_getsockopt(struct sock *, int, char __user *, int __user *); | 136 | extern int ip6_mroute_getsockopt(struct sock *, int, char __user *, int __user *); |
| 137 | extern int ip6_mr_input(struct sk_buff *skb); | 137 | extern int ip6_mr_input(struct sk_buff *skb); |
| 138 | extern int ip6mr_ioctl(struct sock *sk, int cmd, void __user *arg); | 138 | extern int ip6mr_ioctl(struct sock *sk, int cmd, void __user *arg); |
| 139 | extern int ip6mr_compat_ioctl(struct sock *sk, unsigned int cmd, void __user *arg); | ||
| 139 | extern int ip6_mr_init(void); | 140 | extern int ip6_mr_init(void); |
| 140 | extern void ip6_mr_cleanup(void); | 141 | extern void ip6_mr_cleanup(void); |
| 141 | #else | 142 | #else |
diff --git a/include/linux/nfsacl.h b/include/linux/nfsacl.h index f321b578edeb..fabcb1e5c460 100644 --- a/include/linux/nfsacl.h +++ b/include/linux/nfsacl.h | |||
| @@ -51,10 +51,10 @@ nfsacl_size(struct posix_acl *acl_access, struct posix_acl *acl_default) | |||
| 51 | return w; | 51 | return w; |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | extern unsigned int | 54 | extern int |
| 55 | nfsacl_encode(struct xdr_buf *buf, unsigned int base, struct inode *inode, | 55 | nfsacl_encode(struct xdr_buf *buf, unsigned int base, struct inode *inode, |
| 56 | struct posix_acl *acl, int encode_entries, int typeflag); | 56 | struct posix_acl *acl, int encode_entries, int typeflag); |
| 57 | extern unsigned int | 57 | extern int |
| 58 | nfsacl_decode(struct xdr_buf *buf, unsigned int base, unsigned int *aclcnt, | 58 | nfsacl_decode(struct xdr_buf *buf, unsigned int base, unsigned int *aclcnt, |
| 59 | struct posix_acl **pacl); | 59 | struct posix_acl **pacl); |
| 60 | 60 | ||
diff --git a/include/linux/oprofile.h b/include/linux/oprofile.h index 32fb81212fd1..1ca64113efe8 100644 --- a/include/linux/oprofile.h +++ b/include/linux/oprofile.h | |||
| @@ -16,6 +16,8 @@ | |||
| 16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
| 17 | #include <linux/spinlock.h> | 17 | #include <linux/spinlock.h> |
| 18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
| 19 | #include <linux/errno.h> | ||
| 20 | #include <linux/printk.h> | ||
| 19 | #include <asm/atomic.h> | 21 | #include <asm/atomic.h> |
| 20 | 22 | ||
| 21 | /* Each escaped entry is prefixed by ESCAPE_CODE | 23 | /* Each escaped entry is prefixed by ESCAPE_CODE |
| @@ -186,10 +188,17 @@ int oprofile_add_data(struct op_entry *entry, unsigned long val); | |||
| 186 | int oprofile_add_data64(struct op_entry *entry, u64 val); | 188 | int oprofile_add_data64(struct op_entry *entry, u64 val); |
| 187 | int oprofile_write_commit(struct op_entry *entry); | 189 | int oprofile_write_commit(struct op_entry *entry); |
| 188 | 190 | ||
| 189 | #ifdef CONFIG_PERF_EVENTS | 191 | #ifdef CONFIG_HW_PERF_EVENTS |
| 190 | int __init oprofile_perf_init(struct oprofile_operations *ops); | 192 | int __init oprofile_perf_init(struct oprofile_operations *ops); |
| 191 | void oprofile_perf_exit(void); | 193 | void oprofile_perf_exit(void); |
| 192 | char *op_name_from_perf_id(void); | 194 | char *op_name_from_perf_id(void); |
| 193 | #endif /* CONFIG_PERF_EVENTS */ | 195 | #else |
| 196 | static inline int __init oprofile_perf_init(struct oprofile_operations *ops) | ||
| 197 | { | ||
| 198 | pr_info("oprofile: hardware counters not available\n"); | ||
| 199 | return -ENODEV; | ||
| 200 | } | ||
| 201 | static inline void oprofile_perf_exit(void) { } | ||
| 202 | #endif /* CONFIG_HW_PERF_EVENTS */ | ||
| 194 | 203 | ||
| 195 | #endif /* OPROFILE_H */ | 204 | #endif /* OPROFILE_H */ |
diff --git a/include/linux/posix_acl.h b/include/linux/posix_acl.h index d68283a898bb..54211c1cd926 100644 --- a/include/linux/posix_acl.h +++ b/include/linux/posix_acl.h | |||
| @@ -71,6 +71,7 @@ posix_acl_release(struct posix_acl *acl) | |||
| 71 | 71 | ||
| 72 | /* posix_acl.c */ | 72 | /* posix_acl.c */ |
| 73 | 73 | ||
| 74 | extern void posix_acl_init(struct posix_acl *, int); | ||
| 74 | extern struct posix_acl *posix_acl_alloc(int, gfp_t); | 75 | extern struct posix_acl *posix_acl_alloc(int, gfp_t); |
| 75 | extern struct posix_acl *posix_acl_clone(const struct posix_acl *, gfp_t); | 76 | extern struct posix_acl *posix_acl_clone(const struct posix_acl *, gfp_t); |
| 76 | extern int posix_acl_valid(const struct posix_acl *); | 77 | extern int posix_acl_valid(const struct posix_acl *); |
diff --git a/include/linux/res_counter.h b/include/linux/res_counter.h index fcb9884df618..a5930cb66145 100644 --- a/include/linux/res_counter.h +++ b/include/linux/res_counter.h | |||
| @@ -182,6 +182,26 @@ static inline bool res_counter_check_under_limit(struct res_counter *cnt) | |||
| 182 | return ret; | 182 | return ret; |
| 183 | } | 183 | } |
| 184 | 184 | ||
| 185 | /** | ||
| 186 | * res_counter_check_margin - check if the counter allows charging | ||
| 187 | * @cnt: the resource counter to check | ||
| 188 | * @bytes: the number of bytes to check the remaining space against | ||
| 189 | * | ||
| 190 | * Returns a boolean value on whether the counter can be charged | ||
| 191 | * @bytes or whether this would exceed the limit. | ||
| 192 | */ | ||
| 193 | static inline bool res_counter_check_margin(struct res_counter *cnt, | ||
| 194 | unsigned long bytes) | ||
| 195 | { | ||
| 196 | bool ret; | ||
| 197 | unsigned long flags; | ||
| 198 | |||
| 199 | spin_lock_irqsave(&cnt->lock, flags); | ||
| 200 | ret = cnt->limit - cnt->usage >= bytes; | ||
| 201 | spin_unlock_irqrestore(&cnt->lock, flags); | ||
| 202 | return ret; | ||
| 203 | } | ||
| 204 | |||
| 185 | static inline bool res_counter_check_under_soft_limit(struct res_counter *cnt) | 205 | static inline bool res_counter_check_under_soft_limit(struct res_counter *cnt) |
| 186 | { | 206 | { |
| 187 | bool ret; | 207 | bool ret; |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 3c995b4d742c..a0b639f8e805 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
| @@ -235,8 +235,6 @@ extern int rtc_irq_set_freq(struct rtc_device *rtc, | |||
| 235 | struct rtc_task *task, int freq); | 235 | struct rtc_task *task, int freq); |
| 236 | extern int rtc_update_irq_enable(struct rtc_device *rtc, unsigned int enabled); | 236 | extern int rtc_update_irq_enable(struct rtc_device *rtc, unsigned int enabled); |
| 237 | extern int rtc_alarm_irq_enable(struct rtc_device *rtc, unsigned int enabled); | 237 | extern int rtc_alarm_irq_enable(struct rtc_device *rtc, unsigned int enabled); |
| 238 | extern int rtc_dev_update_irq_enable_emul(struct rtc_device *rtc, | ||
| 239 | unsigned int enabled); | ||
| 240 | 238 | ||
| 241 | void rtc_aie_update_irq(void *private); | 239 | void rtc_aie_update_irq(void *private); |
| 242 | void rtc_uie_update_irq(void *private); | 240 | void rtc_uie_update_irq(void *private); |
| @@ -246,8 +244,6 @@ int rtc_register(rtc_task_t *task); | |||
| 246 | int rtc_unregister(rtc_task_t *task); | 244 | int rtc_unregister(rtc_task_t *task); |
| 247 | int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg); | 245 | int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg); |
| 248 | 246 | ||
| 249 | void rtc_timer_enqueue(struct rtc_device *rtc, struct rtc_timer *timer); | ||
| 250 | void rtc_timer_remove(struct rtc_device *rtc, struct rtc_timer *timer); | ||
| 251 | void rtc_timer_init(struct rtc_timer *timer, void (*f)(void* p), void* data); | 247 | void rtc_timer_init(struct rtc_timer *timer, void (*f)(void* p), void* data); |
| 252 | int rtc_timer_start(struct rtc_device *rtc, struct rtc_timer* timer, | 248 | int rtc_timer_start(struct rtc_device *rtc, struct rtc_timer* timer, |
| 253 | ktime_t expires, ktime_t period); | 249 | ktime_t expires, ktime_t period); |
diff --git a/include/linux/security.h b/include/linux/security.h index c642bb8b8f5a..b2b7f9749f5e 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -1662,7 +1662,7 @@ int security_capset(struct cred *new, const struct cred *old, | |||
| 1662 | const kernel_cap_t *effective, | 1662 | const kernel_cap_t *effective, |
| 1663 | const kernel_cap_t *inheritable, | 1663 | const kernel_cap_t *inheritable, |
| 1664 | const kernel_cap_t *permitted); | 1664 | const kernel_cap_t *permitted); |
| 1665 | int security_capable(int cap); | 1665 | int security_capable(const struct cred *cred, int cap); |
| 1666 | int security_real_capable(struct task_struct *tsk, int cap); | 1666 | int security_real_capable(struct task_struct *tsk, int cap); |
| 1667 | int security_real_capable_noaudit(struct task_struct *tsk, int cap); | 1667 | int security_real_capable_noaudit(struct task_struct *tsk, int cap); |
| 1668 | int security_sysctl(struct ctl_table *table, int op); | 1668 | int security_sysctl(struct ctl_table *table, int op); |
| @@ -1856,9 +1856,9 @@ static inline int security_capset(struct cred *new, | |||
| 1856 | return cap_capset(new, old, effective, inheritable, permitted); | 1856 | return cap_capset(new, old, effective, inheritable, permitted); |
| 1857 | } | 1857 | } |
| 1858 | 1858 | ||
| 1859 | static inline int security_capable(int cap) | 1859 | static inline int security_capable(const struct cred *cred, int cap) |
| 1860 | { | 1860 | { |
| 1861 | return cap_capable(current, current_cred(), cap, SECURITY_CAP_AUDIT); | 1861 | return cap_capable(current, cred, cap, SECURITY_CAP_AUDIT); |
| 1862 | } | 1862 | } |
| 1863 | 1863 | ||
| 1864 | static inline int security_real_capable(struct task_struct *tsk, int cap) | 1864 | static inline int security_real_capable(struct task_struct *tsk, int cap) |
diff --git a/include/linux/sunrpc/bc_xprt.h b/include/linux/sunrpc/bc_xprt.h index c50b458b8a3f..082884295f80 100644 --- a/include/linux/sunrpc/bc_xprt.h +++ b/include/linux/sunrpc/bc_xprt.h | |||
| @@ -47,14 +47,6 @@ static inline int svc_is_backchannel(const struct svc_rqst *rqstp) | |||
| 47 | return 1; | 47 | return 1; |
| 48 | return 0; | 48 | return 0; |
| 49 | } | 49 | } |
| 50 | static inline struct nfs4_sessionid *bc_xprt_sid(struct svc_rqst *rqstp) | ||
| 51 | { | ||
| 52 | if (svc_is_backchannel(rqstp)) | ||
| 53 | return (struct nfs4_sessionid *) | ||
| 54 | rqstp->rq_server->sv_bc_xprt->xpt_bc_sid; | ||
| 55 | return NULL; | ||
| 56 | } | ||
| 57 | |||
| 58 | #else /* CONFIG_NFS_V4_1 */ | 50 | #else /* CONFIG_NFS_V4_1 */ |
| 59 | static inline int xprt_setup_backchannel(struct rpc_xprt *xprt, | 51 | static inline int xprt_setup_backchannel(struct rpc_xprt *xprt, |
| 60 | unsigned int min_reqs) | 52 | unsigned int min_reqs) |
| @@ -67,11 +59,6 @@ static inline int svc_is_backchannel(const struct svc_rqst *rqstp) | |||
| 67 | return 0; | 59 | return 0; |
| 68 | } | 60 | } |
| 69 | 61 | ||
| 70 | static inline struct nfs4_sessionid *bc_xprt_sid(struct svc_rqst *rqstp) | ||
| 71 | { | ||
| 72 | return NULL; | ||
| 73 | } | ||
| 74 | |||
| 75 | static inline void xprt_free_bc_request(struct rpc_rqst *req) | 62 | static inline void xprt_free_bc_request(struct rpc_rqst *req) |
| 76 | { | 63 | { |
| 77 | } | 64 | } |
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h index 059877b4d85b..7ad9751a0d87 100644 --- a/include/linux/sunrpc/svc_xprt.h +++ b/include/linux/sunrpc/svc_xprt.h | |||
| @@ -77,7 +77,6 @@ struct svc_xprt { | |||
| 77 | size_t xpt_remotelen; /* length of address */ | 77 | size_t xpt_remotelen; /* length of address */ |
| 78 | struct rpc_wait_queue xpt_bc_pending; /* backchannel wait queue */ | 78 | struct rpc_wait_queue xpt_bc_pending; /* backchannel wait queue */ |
| 79 | struct list_head xpt_users; /* callbacks on free */ | 79 | struct list_head xpt_users; /* callbacks on free */ |
| 80 | void *xpt_bc_sid; /* back channel session ID */ | ||
| 81 | 80 | ||
| 82 | struct net *xpt_net; | 81 | struct net *xpt_net; |
| 83 | struct rpc_xprt *xpt_bc_xprt; /* NFSv4.1 backchannel */ | 82 | struct rpc_xprt *xpt_bc_xprt; /* NFSv4.1 backchannel */ |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 18cd0684fc4e..98664db1be47 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -125,39 +125,37 @@ extern struct trace_event_functions enter_syscall_print_funcs; | |||
| 125 | extern struct trace_event_functions exit_syscall_print_funcs; | 125 | extern struct trace_event_functions exit_syscall_print_funcs; |
| 126 | 126 | ||
| 127 | #define SYSCALL_TRACE_ENTER_EVENT(sname) \ | 127 | #define SYSCALL_TRACE_ENTER_EVENT(sname) \ |
| 128 | static struct syscall_metadata \ | 128 | static struct syscall_metadata __syscall_meta_##sname; \ |
| 129 | __attribute__((__aligned__(4))) __syscall_meta_##sname; \ | ||
| 130 | static struct ftrace_event_call __used \ | 129 | static struct ftrace_event_call __used \ |
| 131 | __attribute__((__aligned__(4))) \ | ||
| 132 | __attribute__((section("_ftrace_events"))) \ | ||
| 133 | event_enter_##sname = { \ | 130 | event_enter_##sname = { \ |
| 134 | .name = "sys_enter"#sname, \ | 131 | .name = "sys_enter"#sname, \ |
| 135 | .class = &event_class_syscall_enter, \ | 132 | .class = &event_class_syscall_enter, \ |
| 136 | .event.funcs = &enter_syscall_print_funcs, \ | 133 | .event.funcs = &enter_syscall_print_funcs, \ |
| 137 | .data = (void *)&__syscall_meta_##sname,\ | 134 | .data = (void *)&__syscall_meta_##sname,\ |
| 138 | }; \ | 135 | }; \ |
| 136 | static struct ftrace_event_call __used \ | ||
| 137 | __attribute__((section("_ftrace_events"))) \ | ||
| 138 | *__event_enter_##sname = &event_enter_##sname; \ | ||
| 139 | __TRACE_EVENT_FLAGS(enter_##sname, TRACE_EVENT_FL_CAP_ANY) | 139 | __TRACE_EVENT_FLAGS(enter_##sname, TRACE_EVENT_FL_CAP_ANY) |
| 140 | 140 | ||
| 141 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ | 141 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ |
| 142 | static struct syscall_metadata \ | 142 | static struct syscall_metadata __syscall_meta_##sname; \ |
| 143 | __attribute__((__aligned__(4))) __syscall_meta_##sname; \ | ||
| 144 | static struct ftrace_event_call __used \ | 143 | static struct ftrace_event_call __used \ |
| 145 | __attribute__((__aligned__(4))) \ | ||
| 146 | __attribute__((section("_ftrace_events"))) \ | ||
| 147 | event_exit_##sname = { \ | 144 | event_exit_##sname = { \ |
| 148 | .name = "sys_exit"#sname, \ | 145 | .name = "sys_exit"#sname, \ |
| 149 | .class = &event_class_syscall_exit, \ | 146 | .class = &event_class_syscall_exit, \ |
| 150 | .event.funcs = &exit_syscall_print_funcs, \ | 147 | .event.funcs = &exit_syscall_print_funcs, \ |
| 151 | .data = (void *)&__syscall_meta_##sname,\ | 148 | .data = (void *)&__syscall_meta_##sname,\ |
| 152 | }; \ | 149 | }; \ |
| 150 | static struct ftrace_event_call __used \ | ||
| 151 | __attribute__((section("_ftrace_events"))) \ | ||
| 152 | *__event_exit_##sname = &event_exit_##sname; \ | ||
| 153 | __TRACE_EVENT_FLAGS(exit_##sname, TRACE_EVENT_FL_CAP_ANY) | 153 | __TRACE_EVENT_FLAGS(exit_##sname, TRACE_EVENT_FL_CAP_ANY) |
| 154 | 154 | ||
| 155 | #define SYSCALL_METADATA(sname, nb) \ | 155 | #define SYSCALL_METADATA(sname, nb) \ |
| 156 | SYSCALL_TRACE_ENTER_EVENT(sname); \ | 156 | SYSCALL_TRACE_ENTER_EVENT(sname); \ |
| 157 | SYSCALL_TRACE_EXIT_EVENT(sname); \ | 157 | SYSCALL_TRACE_EXIT_EVENT(sname); \ |
| 158 | static struct syscall_metadata __used \ | 158 | static struct syscall_metadata __used \ |
| 159 | __attribute__((__aligned__(4))) \ | ||
| 160 | __attribute__((section("__syscalls_metadata"))) \ | ||
| 161 | __syscall_meta_##sname = { \ | 159 | __syscall_meta_##sname = { \ |
| 162 | .name = "sys"#sname, \ | 160 | .name = "sys"#sname, \ |
| 163 | .nb_args = nb, \ | 161 | .nb_args = nb, \ |
| @@ -166,14 +164,15 @@ extern struct trace_event_functions exit_syscall_print_funcs; | |||
| 166 | .enter_event = &event_enter_##sname, \ | 164 | .enter_event = &event_enter_##sname, \ |
| 167 | .exit_event = &event_exit_##sname, \ | 165 | .exit_event = &event_exit_##sname, \ |
| 168 | .enter_fields = LIST_HEAD_INIT(__syscall_meta_##sname.enter_fields), \ | 166 | .enter_fields = LIST_HEAD_INIT(__syscall_meta_##sname.enter_fields), \ |
| 169 | }; | 167 | }; \ |
| 168 | static struct syscall_metadata __used \ | ||
| 169 | __attribute__((section("__syscalls_metadata"))) \ | ||
| 170 | *__p_syscall_meta_##sname = &__syscall_meta_##sname; | ||
| 170 | 171 | ||
| 171 | #define SYSCALL_DEFINE0(sname) \ | 172 | #define SYSCALL_DEFINE0(sname) \ |
| 172 | SYSCALL_TRACE_ENTER_EVENT(_##sname); \ | 173 | SYSCALL_TRACE_ENTER_EVENT(_##sname); \ |
| 173 | SYSCALL_TRACE_EXIT_EVENT(_##sname); \ | 174 | SYSCALL_TRACE_EXIT_EVENT(_##sname); \ |
| 174 | static struct syscall_metadata __used \ | 175 | static struct syscall_metadata __used \ |
| 175 | __attribute__((__aligned__(4))) \ | ||
| 176 | __attribute__((section("__syscalls_metadata"))) \ | ||
| 177 | __syscall_meta__##sname = { \ | 176 | __syscall_meta__##sname = { \ |
| 178 | .name = "sys_"#sname, \ | 177 | .name = "sys_"#sname, \ |
| 179 | .nb_args = 0, \ | 178 | .nb_args = 0, \ |
| @@ -181,6 +180,9 @@ extern struct trace_event_functions exit_syscall_print_funcs; | |||
| 181 | .exit_event = &event_exit__##sname, \ | 180 | .exit_event = &event_exit__##sname, \ |
| 182 | .enter_fields = LIST_HEAD_INIT(__syscall_meta__##sname.enter_fields), \ | 181 | .enter_fields = LIST_HEAD_INIT(__syscall_meta__##sname.enter_fields), \ |
| 183 | }; \ | 182 | }; \ |
| 183 | static struct syscall_metadata __used \ | ||
| 184 | __attribute__((section("__syscalls_metadata"))) \ | ||
| 185 | *__p_syscall_meta_##sname = &__syscall_meta__##sname; \ | ||
| 184 | asmlinkage long sys_##sname(void) | 186 | asmlinkage long sys_##sname(void) |
| 185 | #else | 187 | #else |
| 186 | #define SYSCALL_DEFINE0(name) asmlinkage long sys_##name(void) | 188 | #define SYSCALL_DEFINE0(name) asmlinkage long sys_##name(void) |
diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h index 387fa7d05c98..7faf933cced7 100644 --- a/include/linux/sysrq.h +++ b/include/linux/sysrq.h | |||
| @@ -17,6 +17,9 @@ | |||
| 17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
| 18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
| 19 | 19 | ||
| 20 | /* Enable/disable SYSRQ support by default (0==no, 1==yes). */ | ||
| 21 | #define SYSRQ_DEFAULT_ENABLE 1 | ||
| 22 | |||
| 20 | /* Possible values of bitmask for enabling sysrq functions */ | 23 | /* Possible values of bitmask for enabling sysrq functions */ |
| 21 | /* 0x0001 is reserved for enable everything */ | 24 | /* 0x0001 is reserved for enable everything */ |
| 22 | #define SYSRQ_ENABLE_LOG 0x0002 | 25 | #define SYSRQ_ENABLE_LOG 0x0002 |
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index c6814616653b..97c84a58efb8 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
| @@ -33,12 +33,7 @@ struct tracepoint { | |||
| 33 | void (*regfunc)(void); | 33 | void (*regfunc)(void); |
| 34 | void (*unregfunc)(void); | 34 | void (*unregfunc)(void); |
| 35 | struct tracepoint_func __rcu *funcs; | 35 | struct tracepoint_func __rcu *funcs; |
| 36 | } __attribute__((aligned(32))); /* | 36 | }; |
| 37 | * Aligned on 32 bytes because it is | ||
| 38 | * globally visible and gcc happily | ||
| 39 | * align these on the structure size. | ||
| 40 | * Keep in sync with vmlinux.lds.h. | ||
| 41 | */ | ||
| 42 | 37 | ||
| 43 | /* | 38 | /* |
| 44 | * Connect a probe to a tracepoint. | 39 | * Connect a probe to a tracepoint. |
| @@ -61,15 +56,15 @@ extern void tracepoint_probe_update_all(void); | |||
| 61 | 56 | ||
| 62 | struct tracepoint_iter { | 57 | struct tracepoint_iter { |
| 63 | struct module *module; | 58 | struct module *module; |
| 64 | struct tracepoint *tracepoint; | 59 | struct tracepoint * const *tracepoint; |
| 65 | }; | 60 | }; |
| 66 | 61 | ||
| 67 | extern void tracepoint_iter_start(struct tracepoint_iter *iter); | 62 | extern void tracepoint_iter_start(struct tracepoint_iter *iter); |
| 68 | extern void tracepoint_iter_next(struct tracepoint_iter *iter); | 63 | extern void tracepoint_iter_next(struct tracepoint_iter *iter); |
| 69 | extern void tracepoint_iter_stop(struct tracepoint_iter *iter); | 64 | extern void tracepoint_iter_stop(struct tracepoint_iter *iter); |
| 70 | extern void tracepoint_iter_reset(struct tracepoint_iter *iter); | 65 | extern void tracepoint_iter_reset(struct tracepoint_iter *iter); |
| 71 | extern int tracepoint_get_iter_range(struct tracepoint **tracepoint, | 66 | extern int tracepoint_get_iter_range(struct tracepoint * const **tracepoint, |
| 72 | struct tracepoint *begin, struct tracepoint *end); | 67 | struct tracepoint * const *begin, struct tracepoint * const *end); |
| 73 | 68 | ||
| 74 | /* | 69 | /* |
| 75 | * tracepoint_synchronize_unregister must be called between the last tracepoint | 70 | * tracepoint_synchronize_unregister must be called between the last tracepoint |
| @@ -84,11 +79,13 @@ static inline void tracepoint_synchronize_unregister(void) | |||
| 84 | #define PARAMS(args...) args | 79 | #define PARAMS(args...) args |
| 85 | 80 | ||
| 86 | #ifdef CONFIG_TRACEPOINTS | 81 | #ifdef CONFIG_TRACEPOINTS |
| 87 | extern void tracepoint_update_probe_range(struct tracepoint *begin, | 82 | extern |
| 88 | struct tracepoint *end); | 83 | void tracepoint_update_probe_range(struct tracepoint * const *begin, |
| 84 | struct tracepoint * const *end); | ||
| 89 | #else | 85 | #else |
| 90 | static inline void tracepoint_update_probe_range(struct tracepoint *begin, | 86 | static inline |
| 91 | struct tracepoint *end) | 87 | void tracepoint_update_probe_range(struct tracepoint * const *begin, |
| 88 | struct tracepoint * const *end) | ||
| 92 | { } | 89 | { } |
| 93 | #endif /* CONFIG_TRACEPOINTS */ | 90 | #endif /* CONFIG_TRACEPOINTS */ |
| 94 | 91 | ||
| @@ -174,12 +171,20 @@ do_trace: \ | |||
| 174 | { \ | 171 | { \ |
| 175 | } | 172 | } |
| 176 | 173 | ||
| 174 | /* | ||
| 175 | * We have no guarantee that gcc and the linker won't up-align the tracepoint | ||
| 176 | * structures, so we create an array of pointers that will be used for iteration | ||
| 177 | * on the tracepoints. | ||
| 178 | */ | ||
| 177 | #define DEFINE_TRACE_FN(name, reg, unreg) \ | 179 | #define DEFINE_TRACE_FN(name, reg, unreg) \ |
| 178 | static const char __tpstrtab_##name[] \ | 180 | static const char __tpstrtab_##name[] \ |
| 179 | __attribute__((section("__tracepoints_strings"))) = #name; \ | 181 | __attribute__((section("__tracepoints_strings"))) = #name; \ |
| 180 | struct tracepoint __tracepoint_##name \ | 182 | struct tracepoint __tracepoint_##name \ |
| 181 | __attribute__((section("__tracepoints"), aligned(32))) = \ | 183 | __attribute__((section("__tracepoints"))) = \ |
| 182 | { __tpstrtab_##name, 0, reg, unreg, NULL } | 184 | { __tpstrtab_##name, 0, reg, unreg, NULL }; \ |
| 185 | static struct tracepoint * const __tracepoint_ptr_##name __used \ | ||
| 186 | __attribute__((section("__tracepoints_ptrs"))) = \ | ||
| 187 | &__tracepoint_##name; | ||
| 183 | 188 | ||
| 184 | #define DEFINE_TRACE(name) \ | 189 | #define DEFINE_TRACE(name) \ |
| 185 | DEFINE_TRACE_FN(name, NULL, NULL); | 190 | DEFINE_TRACE_FN(name, NULL, NULL); |
diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h index 5e86dc771da4..81a927930bfd 100644 --- a/include/linux/usb/cdc.h +++ b/include/linux/usb/cdc.h | |||
| @@ -89,7 +89,7 @@ struct usb_cdc_acm_descriptor { | |||
| 89 | 89 | ||
| 90 | #define USB_CDC_COMM_FEATURE 0x01 | 90 | #define USB_CDC_COMM_FEATURE 0x01 |
| 91 | #define USB_CDC_CAP_LINE 0x02 | 91 | #define USB_CDC_CAP_LINE 0x02 |
| 92 | #define USB_CDC_CAP_BRK 0x04 | 92 | #define USB_CDC_CAP_BRK 0x04 |
| 93 | #define USB_CDC_CAP_NOTIFY 0x08 | 93 | #define USB_CDC_CAP_NOTIFY 0x08 |
| 94 | 94 | ||
| 95 | /* "Union Functional Descriptor" from CDC spec 5.2.3.8 */ | 95 | /* "Union Functional Descriptor" from CDC spec 5.2.3.8 */ |
| @@ -271,6 +271,11 @@ struct usb_cdc_notification { | |||
| 271 | __le16 wLength; | 271 | __le16 wLength; |
| 272 | } __attribute__ ((packed)); | 272 | } __attribute__ ((packed)); |
| 273 | 273 | ||
| 274 | struct usb_cdc_speed_change { | ||
| 275 | __le32 DLBitRRate; /* contains the downlink bit rate (IN pipe) */ | ||
| 276 | __le32 ULBitRate; /* contains the uplink bit rate (OUT pipe) */ | ||
| 277 | } __attribute__ ((packed)); | ||
| 278 | |||
| 274 | /*-------------------------------------------------------------------------*/ | 279 | /*-------------------------------------------------------------------------*/ |
| 275 | 280 | ||
| 276 | /* | 281 | /* |
| @@ -292,7 +297,7 @@ struct usb_cdc_ncm_ntb_parameters { | |||
| 292 | __le16 wNdpOutDivisor; | 297 | __le16 wNdpOutDivisor; |
| 293 | __le16 wNdpOutPayloadRemainder; | 298 | __le16 wNdpOutPayloadRemainder; |
| 294 | __le16 wNdpOutAlignment; | 299 | __le16 wNdpOutAlignment; |
| 295 | __le16 wPadding2; | 300 | __le16 wNtbOutMaxDatagrams; |
| 296 | } __attribute__ ((packed)); | 301 | } __attribute__ ((packed)); |
| 297 | 302 | ||
| 298 | /* | 303 | /* |
| @@ -307,7 +312,7 @@ struct usb_cdc_ncm_nth16 { | |||
| 307 | __le16 wHeaderLength; | 312 | __le16 wHeaderLength; |
| 308 | __le16 wSequence; | 313 | __le16 wSequence; |
| 309 | __le16 wBlockLength; | 314 | __le16 wBlockLength; |
| 310 | __le16 wFpIndex; | 315 | __le16 wNdpIndex; |
| 311 | } __attribute__ ((packed)); | 316 | } __attribute__ ((packed)); |
| 312 | 317 | ||
| 313 | struct usb_cdc_ncm_nth32 { | 318 | struct usb_cdc_ncm_nth32 { |
| @@ -315,7 +320,7 @@ struct usb_cdc_ncm_nth32 { | |||
| 315 | __le16 wHeaderLength; | 320 | __le16 wHeaderLength; |
| 316 | __le16 wSequence; | 321 | __le16 wSequence; |
| 317 | __le32 dwBlockLength; | 322 | __le32 dwBlockLength; |
| 318 | __le32 dwFpIndex; | 323 | __le32 dwNdpIndex; |
| 319 | } __attribute__ ((packed)); | 324 | } __attribute__ ((packed)); |
| 320 | 325 | ||
| 321 | /* | 326 | /* |
| @@ -337,7 +342,7 @@ struct usb_cdc_ncm_dpe16 { | |||
| 337 | struct usb_cdc_ncm_ndp16 { | 342 | struct usb_cdc_ncm_ndp16 { |
| 338 | __le32 dwSignature; | 343 | __le32 dwSignature; |
| 339 | __le16 wLength; | 344 | __le16 wLength; |
| 340 | __le16 wNextFpIndex; | 345 | __le16 wNextNdpIndex; |
| 341 | struct usb_cdc_ncm_dpe16 dpe16[0]; | 346 | struct usb_cdc_ncm_dpe16 dpe16[0]; |
| 342 | } __attribute__ ((packed)); | 347 | } __attribute__ ((packed)); |
| 343 | 348 | ||
| @@ -375,6 +380,7 @@ struct usb_cdc_ncm_ndp32 { | |||
| 375 | #define USB_CDC_NCM_NCAP_ENCAP_COMMAND (1 << 2) | 380 | #define USB_CDC_NCM_NCAP_ENCAP_COMMAND (1 << 2) |
| 376 | #define USB_CDC_NCM_NCAP_MAX_DATAGRAM_SIZE (1 << 3) | 381 | #define USB_CDC_NCM_NCAP_MAX_DATAGRAM_SIZE (1 << 3) |
| 377 | #define USB_CDC_NCM_NCAP_CRC_MODE (1 << 4) | 382 | #define USB_CDC_NCM_NCAP_CRC_MODE (1 << 4) |
| 383 | #define USB_CDC_NCM_NCAP_NTB_INPUT_SIZE (1 << 5) | ||
| 378 | 384 | ||
| 379 | /* CDC NCM subclass Table 6-3: NTB Parameter Structure */ | 385 | /* CDC NCM subclass Table 6-3: NTB Parameter Structure */ |
| 380 | #define USB_CDC_NCM_NTB16_SUPPORTED (1 << 0) | 386 | #define USB_CDC_NCM_NTB16_SUPPORTED (1 << 0) |
| @@ -392,6 +398,13 @@ struct usb_cdc_ncm_ndp32 { | |||
| 392 | #define USB_CDC_NCM_NTB_MIN_IN_SIZE 2048 | 398 | #define USB_CDC_NCM_NTB_MIN_IN_SIZE 2048 |
| 393 | #define USB_CDC_NCM_NTB_MIN_OUT_SIZE 2048 | 399 | #define USB_CDC_NCM_NTB_MIN_OUT_SIZE 2048 |
| 394 | 400 | ||
| 401 | /* NTB Input Size Structure */ | ||
| 402 | struct usb_cdc_ncm_ndp_input_size { | ||
| 403 | __le32 dwNtbInMaxSize; | ||
| 404 | __le16 wNtbInMaxDatagrams; | ||
| 405 | __le16 wReserved; | ||
| 406 | } __attribute__ ((packed)); | ||
| 407 | |||
| 395 | /* CDC NCM subclass 6.2.11 SetCrcMode */ | 408 | /* CDC NCM subclass 6.2.11 SetCrcMode */ |
| 396 | #define USB_CDC_NCM_CRC_NOT_APPENDED 0x00 | 409 | #define USB_CDC_NCM_CRC_NOT_APPENDED 0x00 |
| 397 | #define USB_CDC_NCM_CRC_APPENDED 0x01 | 410 | #define USB_CDC_NCM_CRC_APPENDED 0x01 |
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index 92b96fe39307..9cfba4f2457b 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h | |||
| @@ -112,6 +112,7 @@ struct usb_hcd { | |||
| 112 | /* Flags that get set only during HCD registration or removal. */ | 112 | /* Flags that get set only during HCD registration or removal. */ |
| 113 | unsigned rh_registered:1;/* is root hub registered? */ | 113 | unsigned rh_registered:1;/* is root hub registered? */ |
| 114 | unsigned rh_pollable:1; /* may we poll the root hub? */ | 114 | unsigned rh_pollable:1; /* may we poll the root hub? */ |
| 115 | unsigned msix_enabled:1; /* driver has MSI-X enabled? */ | ||
| 115 | 116 | ||
| 116 | /* The next flag is a stopgap, to be removed when all the HCDs | 117 | /* The next flag is a stopgap, to be removed when all the HCDs |
| 117 | * support the new root-hub polling mechanism. */ | 118 | * support the new root-hub polling mechanism. */ |
diff --git a/include/linux/usb/msm_hsusb_hw.h b/include/linux/usb/msm_hsusb_hw.h index b92e17349c7b..7d1babbff071 100644 --- a/include/linux/usb/msm_hsusb_hw.h +++ b/include/linux/usb/msm_hsusb_hw.h | |||
| @@ -16,12 +16,8 @@ | |||
| 16 | #ifndef __LINUX_USB_GADGET_MSM72K_UDC_H__ | 16 | #ifndef __LINUX_USB_GADGET_MSM72K_UDC_H__ |
| 17 | #define __LINUX_USB_GADGET_MSM72K_UDC_H__ | 17 | #define __LINUX_USB_GADGET_MSM72K_UDC_H__ |
| 18 | 18 | ||
| 19 | #ifdef CONFIG_ARCH_MSM7X00A | ||
| 20 | #define USB_SBUSCFG (MSM_USB_BASE + 0x0090) | ||
| 21 | #else | ||
| 22 | #define USB_AHBBURST (MSM_USB_BASE + 0x0090) | 19 | #define USB_AHBBURST (MSM_USB_BASE + 0x0090) |
| 23 | #define USB_AHBMODE (MSM_USB_BASE + 0x0098) | 20 | #define USB_AHBMODE (MSM_USB_BASE + 0x0098) |
| 24 | #endif | ||
| 25 | #define USB_CAPLENGTH (MSM_USB_BASE + 0x0100) /* 8 bit */ | 21 | #define USB_CAPLENGTH (MSM_USB_BASE + 0x0100) /* 8 bit */ |
| 26 | 22 | ||
| 27 | #define USB_USBCMD (MSM_USB_BASE + 0x0140) | 23 | #define USB_USBCMD (MSM_USB_BASE + 0x0140) |
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 16d682f4f7c3..c9049139a7a5 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
| @@ -347,6 +347,9 @@ extern int usb_serial_generic_prepare_write_buffer(struct usb_serial_port *port, | |||
| 347 | extern int usb_serial_handle_sysrq_char(struct usb_serial_port *port, | 347 | extern int usb_serial_handle_sysrq_char(struct usb_serial_port *port, |
| 348 | unsigned int ch); | 348 | unsigned int ch); |
| 349 | extern int usb_serial_handle_break(struct usb_serial_port *port); | 349 | extern int usb_serial_handle_break(struct usb_serial_port *port); |
| 350 | extern void usb_serial_handle_dcd_change(struct usb_serial_port *usb_port, | ||
| 351 | struct tty_struct *tty, | ||
| 352 | unsigned int status); | ||
| 350 | 353 | ||
| 351 | 354 | ||
| 352 | extern int usb_serial_bus_register(struct usb_serial_driver *device); | 355 | extern int usb_serial_bus_register(struct usb_serial_driver *device); |
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index 0093dd7c1d6f..800617b4ddd5 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h | |||
| @@ -109,7 +109,10 @@ static inline bool virtio_has_feature(const struct virtio_device *vdev, | |||
| 109 | unsigned int fbit) | 109 | unsigned int fbit) |
| 110 | { | 110 | { |
| 111 | /* Did you forget to fix assumptions on max features? */ | 111 | /* Did you forget to fix assumptions on max features? */ |
| 112 | MAYBE_BUILD_BUG_ON(fbit >= 32); | 112 | if (__builtin_constant_p(fbit)) |
| 113 | BUILD_BUG_ON(fbit >= 32); | ||
| 114 | else | ||
| 115 | BUG_ON(fbit >= 32); | ||
| 113 | 116 | ||
| 114 | if (fbit < VIRTIO_TRANSPORT_F_START) | 117 | if (fbit < VIRTIO_TRANSPORT_F_START) |
| 115 | virtio_check_driver_offered_feature(vdev, fbit); | 118 | virtio_check_driver_offered_feature(vdev, fbit); |
diff --git a/include/linux/virtio_console.h b/include/linux/virtio_console.h index a85064db8f94..e4d333543a33 100644 --- a/include/linux/virtio_console.h +++ b/include/linux/virtio_console.h | |||
| @@ -7,7 +7,8 @@ | |||
| 7 | * This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so | 7 | * This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so |
| 8 | * anyone can use the definitions to implement compatible drivers/servers. | 8 | * anyone can use the definitions to implement compatible drivers/servers. |
| 9 | * | 9 | * |
| 10 | * Copyright (C) Red Hat, Inc., 2009, 2010 | 10 | * Copyright (C) Red Hat, Inc., 2009, 2010, 2011 |
| 11 | * Copyright (C) Amit Shah <amit.shah@redhat.com>, 2009, 2010, 2011 | ||
| 11 | */ | 12 | */ |
| 12 | 13 | ||
| 13 | /* Feature bits */ | 14 | /* Feature bits */ |
