aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/acpi.h6
-rw-r--r--include/linux/clk-provider.h6
-rw-r--r--include/linux/compiler-gcc4.h7
-rw-r--r--include/linux/compiler.h4
-rw-r--r--include/linux/dcache.h2
-rw-r--r--include/linux/efi-bgrt.h21
-rw-r--r--include/linux/efi.h8
-rw-r--r--include/linux/elf.h4
-rw-r--r--include/linux/ftrace.h158
-rw-r--r--include/linux/hardirq.h8
-rw-r--r--include/linux/hid.h5
-rw-r--r--include/linux/input.h35
-rw-r--r--include/linux/input/mt.h57
-rw-r--r--include/linux/interrupt.h2
-rw-r--r--include/linux/iommu.h42
-rw-r--r--include/linux/irqdesc.h2
-rw-r--r--include/linux/kernel.h2
-rw-r--r--include/linux/kernel_stat.h8
-rw-r--r--include/linux/kprobes.h27
-rw-r--r--include/linux/kthread.h11
-rw-r--r--include/linux/kvm_host.h4
-rw-r--r--include/linux/memory.h2
-rw-r--r--include/linux/mfd/dbx500-prcmu.h1
-rw-r--r--include/linux/mfd/max77686.h1
-rw-r--r--include/linux/mfd/max8998.h2
-rw-r--r--include/linux/mfd/tps6586x.h1
-rw-r--r--include/linux/micrel_phy.h19
-rw-r--r--include/linux/nvme.h2
-rw-r--r--include/linux/pci-acpi.h17
-rw-r--r--include/linux/pci.h55
-rw-r--r--include/linux/pci_regs.h7
-rw-r--r--include/linux/pcieport_if.h2
-rw-r--r--include/linux/perf_event.h62
-rw-r--r--include/linux/perf_regs.h25
-rw-r--r--include/linux/platform_data/clk-realview.h1
-rw-r--r--include/linux/platform_data/clk-ux500.h17
-rw-r--r--include/linux/rcupdate.h21
-rw-r--r--include/linux/regmap.h3
-rw-r--r--include/linux/regulator/consumer.h15
-rw-r--r--include/linux/regulator/driver.h18
-rw-r--r--include/linux/regulator/fan53555.h60
-rw-r--r--include/linux/regulator/machine.h2
-rw-r--r--include/linux/sched.h21
-rw-r--r--include/linux/screen_info.h2
-rw-r--r--include/linux/security.h1
-rw-r--r--include/linux/smpboot.h43
-rw-r--r--include/linux/task_work.h3
-rw-r--r--include/linux/ti_wilink_st.h3
-rw-r--r--include/linux/timer.h165
-rw-r--r--include/linux/topology.h2
-rw-r--r--include/linux/tracepoint.h28
-rw-r--r--include/linux/uprobes.h15
-rw-r--r--include/linux/w1-gpio.h1
-rw-r--r--include/linux/xfrm.h2
54 files changed, 823 insertions, 215 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 4f2a76224509..90be98981102 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -138,9 +138,9 @@ void acpi_penalize_isa_irq(int irq, int active);
138void acpi_pci_irq_disable (struct pci_dev *dev); 138void acpi_pci_irq_disable (struct pci_dev *dev);
139 139
140struct acpi_pci_driver { 140struct acpi_pci_driver {
141 struct acpi_pci_driver *next; 141 struct list_head node;
142 int (*add)(acpi_handle handle); 142 int (*add)(struct acpi_pci_root *root);
143 void (*remove)(acpi_handle handle); 143 void (*remove)(struct acpi_pci_root *root);
144}; 144};
145 145
146int acpi_pci_register_driver(struct acpi_pci_driver *driver); 146int acpi_pci_register_driver(struct acpi_pci_driver *driver);
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 77335fac943e..c12731582920 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -26,6 +26,7 @@
26#define CLK_IGNORE_UNUSED BIT(3) /* do not gate even if unused */ 26#define CLK_IGNORE_UNUSED BIT(3) /* do not gate even if unused */
27#define CLK_IS_ROOT BIT(4) /* root clk, has no parent */ 27#define CLK_IS_ROOT BIT(4) /* root clk, has no parent */
28#define CLK_IS_BASIC BIT(5) /* Basic clk, can't do a to_clk_foo() */ 28#define CLK_IS_BASIC BIT(5) /* Basic clk, can't do a to_clk_foo() */
29#define CLK_GET_RATE_NOCACHE BIT(6) /* do not use the cached clk rate */
29 30
30struct clk_hw; 31struct clk_hw;
31 32
@@ -360,6 +361,11 @@ int of_clk_add_provider(struct device_node *np,
360void of_clk_del_provider(struct device_node *np); 361void of_clk_del_provider(struct device_node *np);
361struct clk *of_clk_src_simple_get(struct of_phandle_args *clkspec, 362struct clk *of_clk_src_simple_get(struct of_phandle_args *clkspec,
362 void *data); 363 void *data);
364struct clk_onecell_data {
365 struct clk **clks;
366 unsigned int clk_num;
367};
368struct clk *of_clk_src_onecell_get(struct of_phandle_args *clkspec, void *data);
363const char *of_clk_get_parent_name(struct device_node *np, int index); 369const char *of_clk_get_parent_name(struct device_node *np, int index);
364void of_clk_init(const struct of_device_id *matches); 370void of_clk_init(const struct of_device_id *matches);
365 371
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h
index 2f4079175afb..934bc34d5f99 100644
--- a/include/linux/compiler-gcc4.h
+++ b/include/linux/compiler-gcc4.h
@@ -49,6 +49,13 @@
49#endif 49#endif
50#endif 50#endif
51 51
52#if __GNUC_MINOR__ >= 6
53/*
54 * Tell the optimizer that something else uses this function or variable.
55 */
56#define __visible __attribute__((externally_visible))
57#endif
58
52#if __GNUC_MINOR__ > 0 59#if __GNUC_MINOR__ > 0
53#define __compiletime_object_size(obj) __builtin_object_size(obj, 0) 60#define __compiletime_object_size(obj) __builtin_object_size(obj, 0)
54#endif 61#endif
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 923d093c9cea..f430e4162f41 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -278,6 +278,10 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
278# define __section(S) __attribute__ ((__section__(#S))) 278# define __section(S) __attribute__ ((__section__(#S)))
279#endif 279#endif
280 280
281#ifndef __visible
282#define __visible
283#endif
284
281/* Are two types/vars the same type (ignoring qualifiers)? */ 285/* Are two types/vars the same type (ignoring qualifiers)? */
282#ifndef __same_type 286#ifndef __same_type
283# define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) 287# define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index caa34e50537e..59200795482e 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -206,6 +206,8 @@ struct dentry_operations {
206#define DCACHE_MANAGED_DENTRY \ 206#define DCACHE_MANAGED_DENTRY \
207 (DCACHE_MOUNTED|DCACHE_NEED_AUTOMOUNT|DCACHE_MANAGE_TRANSIT) 207 (DCACHE_MOUNTED|DCACHE_NEED_AUTOMOUNT|DCACHE_MANAGE_TRANSIT)
208 208
209#define DCACHE_DENTRY_KILLED 0x100000
210
209extern seqlock_t rename_lock; 211extern seqlock_t rename_lock;
210 212
211static inline int dname_external(struct dentry *dentry) 213static inline int dname_external(struct dentry *dentry)
diff --git a/include/linux/efi-bgrt.h b/include/linux/efi-bgrt.h
new file mode 100644
index 000000000000..051b21fedf68
--- /dev/null
+++ b/include/linux/efi-bgrt.h
@@ -0,0 +1,21 @@
1#ifndef _LINUX_EFI_BGRT_H
2#define _LINUX_EFI_BGRT_H
3
4#ifdef CONFIG_ACPI_BGRT
5
6#include <linux/acpi.h>
7
8void efi_bgrt_init(void);
9
10/* The BGRT data itself; only valid if bgrt_image != NULL. */
11extern void *bgrt_image;
12extern size_t bgrt_image_size;
13extern struct acpi_table_bgrt *bgrt_tab;
14
15#else /* !CONFIG_ACPI_BGRT */
16
17static inline void efi_bgrt_init(void) {}
18
19#endif /* !CONFIG_ACPI_BGRT */
20
21#endif /* _LINUX_EFI_BGRT_H */
diff --git a/include/linux/efi.h b/include/linux/efi.h
index ec45ccd8708a..8670eb1eb8cd 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -496,6 +496,14 @@ extern void efi_map_pal_code (void);
496extern void efi_memmap_walk (efi_freemem_callback_t callback, void *arg); 496extern void efi_memmap_walk (efi_freemem_callback_t callback, void *arg);
497extern void efi_gettimeofday (struct timespec *ts); 497extern void efi_gettimeofday (struct timespec *ts);
498extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if possible */ 498extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if possible */
499#ifdef CONFIG_X86
500extern void efi_late_init(void);
501extern void efi_free_boot_services(void);
502#else
503static inline void efi_late_init(void) {}
504static inline void efi_free_boot_services(void) {}
505#endif
506extern void __iomem *efi_lookup_mapped_addr(u64 phys_addr);
499extern u64 efi_get_iobase (void); 507extern u64 efi_get_iobase (void);
500extern u32 efi_mem_type (unsigned long phys_addr); 508extern u32 efi_mem_type (unsigned long phys_addr);
501extern u64 efi_mem_attributes (unsigned long phys_addr); 509extern u64 efi_mem_attributes (unsigned long phys_addr);
diff --git a/include/linux/elf.h b/include/linux/elf.h
index 999b4f52e8e5..0a05051a8924 100644
--- a/include/linux/elf.h
+++ b/include/linux/elf.h
@@ -387,7 +387,11 @@ typedef struct elf64_shdr {
387#define NT_S390_PREFIX 0x305 /* s390 prefix register */ 387#define NT_S390_PREFIX 0x305 /* s390 prefix register */
388#define NT_S390_LAST_BREAK 0x306 /* s390 breaking event address */ 388#define NT_S390_LAST_BREAK 0x306 /* s390 breaking event address */
389#define NT_S390_SYSTEM_CALL 0x307 /* s390 system call restart data */ 389#define NT_S390_SYSTEM_CALL 0x307 /* s390 system call restart data */
390#define NT_S390_TDB 0x308 /* s390 transaction diagnostic block */
390#define NT_ARM_VFP 0x400 /* ARM VFP/NEON registers */ 391#define NT_ARM_VFP 0x400 /* ARM VFP/NEON registers */
392#define NT_ARM_TLS 0x401 /* ARM TLS register */
393#define NT_ARM_HW_BREAK 0x402 /* ARM hardware breakpoint registers */
394#define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */
391 395
392 396
393/* Note header in a PT_NOTE section */ 397/* Note header in a PT_NOTE section */
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 55e6d63d46d0..a52f2f4fe030 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -10,6 +10,7 @@
10#include <linux/kallsyms.h> 10#include <linux/kallsyms.h>
11#include <linux/linkage.h> 11#include <linux/linkage.h>
12#include <linux/bitops.h> 12#include <linux/bitops.h>
13#include <linux/ptrace.h>
13#include <linux/ktime.h> 14#include <linux/ktime.h>
14#include <linux/sched.h> 15#include <linux/sched.h>
15#include <linux/types.h> 16#include <linux/types.h>
@@ -18,6 +19,28 @@
18 19
19#include <asm/ftrace.h> 20#include <asm/ftrace.h>
20 21
22/*
23 * If the arch supports passing the variable contents of
24 * function_trace_op as the third parameter back from the
25 * mcount call, then the arch should define this as 1.
26 */
27#ifndef ARCH_SUPPORTS_FTRACE_OPS
28#define ARCH_SUPPORTS_FTRACE_OPS 0
29#endif
30
31/*
32 * If the arch's mcount caller does not support all of ftrace's
33 * features, then it must call an indirect function that
34 * does. Or at least does enough to prevent any unwelcomed side effects.
35 */
36#if !defined(CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST) || \
37 !ARCH_SUPPORTS_FTRACE_OPS
38# define FTRACE_FORCE_LIST_FUNC 1
39#else
40# define FTRACE_FORCE_LIST_FUNC 0
41#endif
42
43
21struct module; 44struct module;
22struct ftrace_hash; 45struct ftrace_hash;
23 46
@@ -29,7 +52,10 @@ ftrace_enable_sysctl(struct ctl_table *table, int write,
29 void __user *buffer, size_t *lenp, 52 void __user *buffer, size_t *lenp,
30 loff_t *ppos); 53 loff_t *ppos);
31 54
32typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip); 55struct ftrace_ops;
56
57typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip,
58 struct ftrace_ops *op, struct pt_regs *regs);
33 59
34/* 60/*
35 * FTRACE_OPS_FL_* bits denote the state of ftrace_ops struct and are 61 * FTRACE_OPS_FL_* bits denote the state of ftrace_ops struct and are
@@ -45,12 +71,33 @@ typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip);
45 * could be controled by following calls: 71 * could be controled by following calls:
46 * ftrace_function_local_enable 72 * ftrace_function_local_enable
47 * ftrace_function_local_disable 73 * ftrace_function_local_disable
74 * SAVE_REGS - The ftrace_ops wants regs saved at each function called
75 * and passed to the callback. If this flag is set, but the
76 * architecture does not support passing regs
77 * (ARCH_SUPPORTS_FTRACE_SAVE_REGS is not defined), then the
78 * ftrace_ops will fail to register, unless the next flag
79 * is set.
80 * SAVE_REGS_IF_SUPPORTED - This is the same as SAVE_REGS, but if the
81 * handler can handle an arch that does not save regs
82 * (the handler tests if regs == NULL), then it can set
83 * this flag instead. It will not fail registering the ftrace_ops
84 * but, the regs field will be NULL if the arch does not support
85 * passing regs to the handler.
86 * Note, if this flag is set, the SAVE_REGS flag will automatically
87 * get set upon registering the ftrace_ops, if the arch supports it.
88 * RECURSION_SAFE - The ftrace_ops can set this to tell the ftrace infrastructure
89 * that the call back has its own recursion protection. If it does
90 * not set this, then the ftrace infrastructure will add recursion
91 * protection for the caller.
48 */ 92 */
49enum { 93enum {
50 FTRACE_OPS_FL_ENABLED = 1 << 0, 94 FTRACE_OPS_FL_ENABLED = 1 << 0,
51 FTRACE_OPS_FL_GLOBAL = 1 << 1, 95 FTRACE_OPS_FL_GLOBAL = 1 << 1,
52 FTRACE_OPS_FL_DYNAMIC = 1 << 2, 96 FTRACE_OPS_FL_DYNAMIC = 1 << 2,
53 FTRACE_OPS_FL_CONTROL = 1 << 3, 97 FTRACE_OPS_FL_CONTROL = 1 << 3,
98 FTRACE_OPS_FL_SAVE_REGS = 1 << 4,
99 FTRACE_OPS_FL_SAVE_REGS_IF_SUPPORTED = 1 << 5,
100 FTRACE_OPS_FL_RECURSION_SAFE = 1 << 6,
54}; 101};
55 102
56struct ftrace_ops { 103struct ftrace_ops {
@@ -163,7 +210,8 @@ static inline int ftrace_function_local_disabled(struct ftrace_ops *ops)
163 return *this_cpu_ptr(ops->disabled); 210 return *this_cpu_ptr(ops->disabled);
164} 211}
165 212
166extern void ftrace_stub(unsigned long a0, unsigned long a1); 213extern void ftrace_stub(unsigned long a0, unsigned long a1,
214 struct ftrace_ops *op, struct pt_regs *regs);
167 215
168#else /* !CONFIG_FUNCTION_TRACER */ 216#else /* !CONFIG_FUNCTION_TRACER */
169/* 217/*
@@ -172,6 +220,10 @@ extern void ftrace_stub(unsigned long a0, unsigned long a1);
172 */ 220 */
173#define register_ftrace_function(ops) ({ 0; }) 221#define register_ftrace_function(ops) ({ 0; })
174#define unregister_ftrace_function(ops) ({ 0; }) 222#define unregister_ftrace_function(ops) ({ 0; })
223static inline int ftrace_nr_registered_ops(void)
224{
225 return 0;
226}
175static inline void clear_ftrace_function(void) { } 227static inline void clear_ftrace_function(void) { }
176static inline void ftrace_kill(void) { } 228static inline void ftrace_kill(void) { }
177static inline void ftrace_stop(void) { } 229static inline void ftrace_stop(void) { }
@@ -227,12 +279,33 @@ extern void unregister_ftrace_function_probe_all(char *glob);
227 279
228extern int ftrace_text_reserved(void *start, void *end); 280extern int ftrace_text_reserved(void *start, void *end);
229 281
282extern int ftrace_nr_registered_ops(void);
283
284/*
285 * The dyn_ftrace record's flags field is split into two parts.
286 * the first part which is '0-FTRACE_REF_MAX' is a counter of
287 * the number of callbacks that have registered the function that
288 * the dyn_ftrace descriptor represents.
289 *
290 * The second part is a mask:
291 * ENABLED - the function is being traced
292 * REGS - the record wants the function to save regs
293 * REGS_EN - the function is set up to save regs.
294 *
295 * When a new ftrace_ops is registered and wants a function to save
296 * pt_regs, the rec->flag REGS is set. When the function has been
297 * set up to save regs, the REG_EN flag is set. Once a function
298 * starts saving regs it will do so until all ftrace_ops are removed
299 * from tracing that function.
300 */
230enum { 301enum {
231 FTRACE_FL_ENABLED = (1 << 30), 302 FTRACE_FL_ENABLED = (1UL << 29),
303 FTRACE_FL_REGS = (1UL << 30),
304 FTRACE_FL_REGS_EN = (1UL << 31)
232}; 305};
233 306
234#define FTRACE_FL_MASK (0x3UL << 30) 307#define FTRACE_FL_MASK (0x7UL << 29)
235#define FTRACE_REF_MAX ((1 << 30) - 1) 308#define FTRACE_REF_MAX ((1UL << 29) - 1)
236 309
237struct dyn_ftrace { 310struct dyn_ftrace {
238 union { 311 union {
@@ -244,6 +317,8 @@ struct dyn_ftrace {
244}; 317};
245 318
246int ftrace_force_update(void); 319int ftrace_force_update(void);
320int ftrace_set_filter_ip(struct ftrace_ops *ops, unsigned long ip,
321 int remove, int reset);
247int ftrace_set_filter(struct ftrace_ops *ops, unsigned char *buf, 322int ftrace_set_filter(struct ftrace_ops *ops, unsigned char *buf,
248 int len, int reset); 323 int len, int reset);
249int ftrace_set_notrace(struct ftrace_ops *ops, unsigned char *buf, 324int ftrace_set_notrace(struct ftrace_ops *ops, unsigned char *buf,
@@ -263,9 +338,23 @@ enum {
263 FTRACE_STOP_FUNC_RET = (1 << 4), 338 FTRACE_STOP_FUNC_RET = (1 << 4),
264}; 339};
265 340
341/*
342 * The FTRACE_UPDATE_* enum is used to pass information back
343 * from the ftrace_update_record() and ftrace_test_record()
344 * functions. These are called by the code update routines
345 * to find out what is to be done for a given function.
346 *
347 * IGNORE - The function is already what we want it to be
348 * MAKE_CALL - Start tracing the function
349 * MODIFY_CALL - Stop saving regs for the function
350 * MODIFY_CALL_REGS - Start saving regs for the function
351 * MAKE_NOP - Stop tracing the function
352 */
266enum { 353enum {
267 FTRACE_UPDATE_IGNORE, 354 FTRACE_UPDATE_IGNORE,
268 FTRACE_UPDATE_MAKE_CALL, 355 FTRACE_UPDATE_MAKE_CALL,
356 FTRACE_UPDATE_MODIFY_CALL,
357 FTRACE_UPDATE_MODIFY_CALL_REGS,
269 FTRACE_UPDATE_MAKE_NOP, 358 FTRACE_UPDATE_MAKE_NOP,
270}; 359};
271 360
@@ -317,7 +406,9 @@ extern int ftrace_dyn_arch_init(void *data);
317extern void ftrace_replace_code(int enable); 406extern void ftrace_replace_code(int enable);
318extern int ftrace_update_ftrace_func(ftrace_func_t func); 407extern int ftrace_update_ftrace_func(ftrace_func_t func);
319extern void ftrace_caller(void); 408extern void ftrace_caller(void);
409extern void ftrace_regs_caller(void);
320extern void ftrace_call(void); 410extern void ftrace_call(void);
411extern void ftrace_regs_call(void);
321extern void mcount_call(void); 412extern void mcount_call(void);
322 413
323void ftrace_modify_all_code(int command); 414void ftrace_modify_all_code(int command);
@@ -325,6 +416,15 @@ void ftrace_modify_all_code(int command);
325#ifndef FTRACE_ADDR 416#ifndef FTRACE_ADDR
326#define FTRACE_ADDR ((unsigned long)ftrace_caller) 417#define FTRACE_ADDR ((unsigned long)ftrace_caller)
327#endif 418#endif
419
420#ifndef FTRACE_REGS_ADDR
421#ifdef ARCH_SUPPORTS_FTRACE_SAVE_REGS
422# define FTRACE_REGS_ADDR ((unsigned long)ftrace_regs_caller)
423#else
424# define FTRACE_REGS_ADDR FTRACE_ADDR
425#endif
426#endif
427
328#ifdef CONFIG_FUNCTION_GRAPH_TRACER 428#ifdef CONFIG_FUNCTION_GRAPH_TRACER
329extern void ftrace_graph_caller(void); 429extern void ftrace_graph_caller(void);
330extern int ftrace_enable_ftrace_graph_caller(void); 430extern int ftrace_enable_ftrace_graph_caller(void);
@@ -380,6 +480,39 @@ extern int ftrace_make_nop(struct module *mod,
380 */ 480 */
381extern int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr); 481extern int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr);
382 482
483#ifdef ARCH_SUPPORTS_FTRACE_SAVE_REGS
484/**
485 * ftrace_modify_call - convert from one addr to another (no nop)
486 * @rec: the mcount call site record
487 * @old_addr: the address expected to be currently called to
488 * @addr: the address to change to
489 *
490 * This is a very sensitive operation and great care needs
491 * to be taken by the arch. The operation should carefully
492 * read the location, check to see if what is read is indeed
493 * what we expect it to be, and then on success of the compare,
494 * it should write to the location.
495 *
496 * The code segment at @rec->ip should be a caller to @old_addr
497 *
498 * Return must be:
499 * 0 on success
500 * -EFAULT on error reading the location
501 * -EINVAL on a failed compare of the contents
502 * -EPERM on error writing to the location
503 * Any other value will be considered a failure.
504 */
505extern int ftrace_modify_call(struct dyn_ftrace *rec, unsigned long old_addr,
506 unsigned long addr);
507#else
508/* Should never be called */
509static inline int ftrace_modify_call(struct dyn_ftrace *rec, unsigned long old_addr,
510 unsigned long addr)
511{
512 return -EINVAL;
513}
514#endif
515
383/* May be defined in arch */ 516/* May be defined in arch */
384extern int ftrace_arch_read_dyn_info(char *buf, int size); 517extern int ftrace_arch_read_dyn_info(char *buf, int size);
385 518
@@ -387,7 +520,7 @@ extern int skip_trace(unsigned long ip);
387 520
388extern void ftrace_disable_daemon(void); 521extern void ftrace_disable_daemon(void);
389extern void ftrace_enable_daemon(void); 522extern void ftrace_enable_daemon(void);
390#else 523#else /* CONFIG_DYNAMIC_FTRACE */
391static inline int skip_trace(unsigned long ip) { return 0; } 524static inline int skip_trace(unsigned long ip) { return 0; }
392static inline int ftrace_force_update(void) { return 0; } 525static inline int ftrace_force_update(void) { return 0; }
393static inline void ftrace_disable_daemon(void) { } 526static inline void ftrace_disable_daemon(void) { }
@@ -405,6 +538,10 @@ static inline int ftrace_text_reserved(void *start, void *end)
405{ 538{
406 return 0; 539 return 0;
407} 540}
541static inline unsigned long ftrace_location(unsigned long ip)
542{
543 return 0;
544}
408 545
409/* 546/*
410 * Again users of functions that have ftrace_ops may not 547 * Again users of functions that have ftrace_ops may not
@@ -413,6 +550,7 @@ static inline int ftrace_text_reserved(void *start, void *end)
413 */ 550 */
414#define ftrace_regex_open(ops, flag, inod, file) ({ -ENODEV; }) 551#define ftrace_regex_open(ops, flag, inod, file) ({ -ENODEV; })
415#define ftrace_set_early_filter(ops, buf, enable) do { } while (0) 552#define ftrace_set_early_filter(ops, buf, enable) do { } while (0)
553#define ftrace_set_filter_ip(ops, ip, remove, reset) ({ -ENODEV; })
416#define ftrace_set_filter(ops, buf, len, reset) ({ -ENODEV; }) 554#define ftrace_set_filter(ops, buf, len, reset) ({ -ENODEV; })
417#define ftrace_set_notrace(ops, buf, len, reset) ({ -ENODEV; }) 555#define ftrace_set_notrace(ops, buf, len, reset) ({ -ENODEV; })
418#define ftrace_free_filter(ops) do { } while (0) 556#define ftrace_free_filter(ops) do { } while (0)
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h
index 305f23cd7cff..cab3da3d0949 100644
--- a/include/linux/hardirq.h
+++ b/include/linux/hardirq.h
@@ -132,11 +132,11 @@ extern void synchronize_irq(unsigned int irq);
132struct task_struct; 132struct task_struct;
133 133
134#if !defined(CONFIG_VIRT_CPU_ACCOUNTING) && !defined(CONFIG_IRQ_TIME_ACCOUNTING) 134#if !defined(CONFIG_VIRT_CPU_ACCOUNTING) && !defined(CONFIG_IRQ_TIME_ACCOUNTING)
135static inline void account_system_vtime(struct task_struct *tsk) 135static inline void vtime_account(struct task_struct *tsk)
136{ 136{
137} 137}
138#else 138#else
139extern void account_system_vtime(struct task_struct *tsk); 139extern void vtime_account(struct task_struct *tsk);
140#endif 140#endif
141 141
142#if defined(CONFIG_TINY_RCU) || defined(CONFIG_TINY_PREEMPT_RCU) 142#if defined(CONFIG_TINY_RCU) || defined(CONFIG_TINY_PREEMPT_RCU)
@@ -162,7 +162,7 @@ extern void rcu_nmi_exit(void);
162 */ 162 */
163#define __irq_enter() \ 163#define __irq_enter() \
164 do { \ 164 do { \
165 account_system_vtime(current); \ 165 vtime_account(current); \
166 add_preempt_count(HARDIRQ_OFFSET); \ 166 add_preempt_count(HARDIRQ_OFFSET); \
167 trace_hardirq_enter(); \ 167 trace_hardirq_enter(); \
168 } while (0) 168 } while (0)
@@ -178,7 +178,7 @@ extern void irq_enter(void);
178#define __irq_exit() \ 178#define __irq_exit() \
179 do { \ 179 do { \
180 trace_hardirq_exit(); \ 180 trace_hardirq_exit(); \
181 account_system_vtime(current); \ 181 vtime_account(current); \
182 sub_preempt_count(HARDIRQ_OFFSET); \ 182 sub_preempt_count(HARDIRQ_OFFSET); \
183 } while (0) 183 } while (0)
184 184
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 42970de1b40c..7e1f37db7582 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -414,7 +414,7 @@ struct hid_field {
414 __u16 dpad; /* dpad input code */ 414 __u16 dpad; /* dpad input code */
415}; 415};
416 416
417#define HID_MAX_FIELDS 128 417#define HID_MAX_FIELDS 256
418 418
419struct hid_report { 419struct hid_report {
420 struct list_head list; 420 struct list_head list;
@@ -626,6 +626,7 @@ struct hid_usage_id {
626 * @report_fixup: called before report descriptor parsing (NULL means nop) 626 * @report_fixup: called before report descriptor parsing (NULL means nop)
627 * @input_mapping: invoked on input registering before mapping an usage 627 * @input_mapping: invoked on input registering before mapping an usage
628 * @input_mapped: invoked on input registering after mapping an usage 628 * @input_mapped: invoked on input registering after mapping an usage
629 * @input_configured: invoked just before the device is registered
629 * @feature_mapping: invoked on feature registering 630 * @feature_mapping: invoked on feature registering
630 * @suspend: invoked on suspend (NULL means nop) 631 * @suspend: invoked on suspend (NULL means nop)
631 * @resume: invoked on resume if device was not reset (NULL means nop) 632 * @resume: invoked on resume if device was not reset (NULL means nop)
@@ -670,6 +671,8 @@ struct hid_driver {
670 int (*input_mapped)(struct hid_device *hdev, 671 int (*input_mapped)(struct hid_device *hdev,
671 struct hid_input *hidinput, struct hid_field *field, 672 struct hid_input *hidinput, struct hid_field *field,
672 struct hid_usage *usage, unsigned long **bit, int *max); 673 struct hid_usage *usage, unsigned long **bit, int *max);
674 void (*input_configured)(struct hid_device *hdev,
675 struct hid_input *hidinput);
673 void (*feature_mapping)(struct hid_device *hdev, 676 void (*feature_mapping)(struct hid_device *hdev,
674 struct hid_field *field, 677 struct hid_field *field,
675 struct hid_usage *usage); 678 struct hid_usage *usage);
diff --git a/include/linux/input.h b/include/linux/input.h
index 725dcd0f63a4..ba4874302939 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -1169,6 +1169,18 @@ struct ff_effect {
1169#include <linux/mod_devicetable.h> 1169#include <linux/mod_devicetable.h>
1170 1170
1171/** 1171/**
1172 * struct input_value - input value representation
1173 * @type: type of value (EV_KEY, EV_ABS, etc)
1174 * @code: the value code
1175 * @value: the value
1176 */
1177struct input_value {
1178 __u16 type;
1179 __u16 code;
1180 __s32 value;
1181};
1182
1183/**
1172 * struct input_dev - represents an input device 1184 * struct input_dev - represents an input device
1173 * @name: name of the device 1185 * @name: name of the device
1174 * @phys: physical path to the device in the system hierarchy 1186 * @phys: physical path to the device in the system hierarchy
@@ -1203,11 +1215,7 @@ struct ff_effect {
1203 * software autorepeat 1215 * software autorepeat
1204 * @timer: timer for software autorepeat 1216 * @timer: timer for software autorepeat
1205 * @rep: current values for autorepeat parameters (delay, rate) 1217 * @rep: current values for autorepeat parameters (delay, rate)
1206 * @mt: pointer to array of struct input_mt_slot holding current values 1218 * @mt: pointer to multitouch state
1207 * of tracked contacts
1208 * @mtsize: number of MT slots the device uses
1209 * @slot: MT slot currently being transmitted
1210 * @trkid: stores MT tracking ID for the current contact
1211 * @absinfo: array of &struct input_absinfo elements holding information 1219 * @absinfo: array of &struct input_absinfo elements holding information
1212 * about absolute axes (current value, min, max, flat, fuzz, 1220 * about absolute axes (current value, min, max, flat, fuzz,
1213 * resolution) 1221 * resolution)
@@ -1244,7 +1252,6 @@ struct ff_effect {
1244 * last user closes the device 1252 * last user closes the device
1245 * @going_away: marks devices that are in a middle of unregistering and 1253 * @going_away: marks devices that are in a middle of unregistering and
1246 * causes input_open_device*() fail with -ENODEV. 1254 * causes input_open_device*() fail with -ENODEV.
1247 * @sync: set to %true when there were no new events since last EV_SYN
1248 * @dev: driver model's view of this device 1255 * @dev: driver model's view of this device
1249 * @h_list: list of input handles associated with the device. When 1256 * @h_list: list of input handles associated with the device. When
1250 * accessing the list dev->mutex must be held 1257 * accessing the list dev->mutex must be held
@@ -1287,10 +1294,7 @@ struct input_dev {
1287 1294
1288 int rep[REP_CNT]; 1295 int rep[REP_CNT];
1289 1296
1290 struct input_mt_slot *mt; 1297 struct input_mt *mt;
1291 int mtsize;
1292 int slot;
1293 int trkid;
1294 1298
1295 struct input_absinfo *absinfo; 1299 struct input_absinfo *absinfo;
1296 1300
@@ -1312,12 +1316,14 @@ struct input_dev {
1312 unsigned int users; 1316 unsigned int users;
1313 bool going_away; 1317 bool going_away;
1314 1318
1315 bool sync;
1316
1317 struct device dev; 1319 struct device dev;
1318 1320
1319 struct list_head h_list; 1321 struct list_head h_list;
1320 struct list_head node; 1322 struct list_head node;
1323
1324 unsigned int num_vals;
1325 unsigned int max_vals;
1326 struct input_value *vals;
1321}; 1327};
1322#define to_input_dev(d) container_of(d, struct input_dev, dev) 1328#define to_input_dev(d) container_of(d, struct input_dev, dev)
1323 1329
@@ -1378,6 +1384,9 @@ struct input_handle;
1378 * @event: event handler. This method is being called by input core with 1384 * @event: event handler. This method is being called by input core with
1379 * interrupts disabled and dev->event_lock spinlock held and so 1385 * interrupts disabled and dev->event_lock spinlock held and so
1380 * it may not sleep 1386 * it may not sleep
1387 * @events: event sequence handler. This method is being called by
1388 * input core with interrupts disabled and dev->event_lock
1389 * spinlock held and so it may not sleep
1381 * @filter: similar to @event; separates normal event handlers from 1390 * @filter: similar to @event; separates normal event handlers from
1382 * "filters". 1391 * "filters".
1383 * @match: called after comparing device's id with handler's id_table 1392 * @match: called after comparing device's id with handler's id_table
@@ -1414,6 +1423,8 @@ struct input_handler {
1414 void *private; 1423 void *private;
1415 1424
1416 void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value); 1425 void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
1426 void (*events)(struct input_handle *handle,
1427 const struct input_value *vals, unsigned int count);
1417 bool (*filter)(struct input_handle *handle, unsigned int type, unsigned int code, int value); 1428 bool (*filter)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
1418 bool (*match)(struct input_handler *handler, struct input_dev *dev); 1429 bool (*match)(struct input_handler *handler, struct input_dev *dev);
1419 int (*connect)(struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id); 1430 int (*connect)(struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id);
diff --git a/include/linux/input/mt.h b/include/linux/input/mt.h
index f86737586e19..cc5cca774bab 100644
--- a/include/linux/input/mt.h
+++ b/include/linux/input/mt.h
@@ -15,12 +15,41 @@
15 15
16#define TRKID_MAX 0xffff 16#define TRKID_MAX 0xffff
17 17
18#define INPUT_MT_POINTER 0x0001 /* pointer device, e.g. trackpad */
19#define INPUT_MT_DIRECT 0x0002 /* direct device, e.g. touchscreen */
20#define INPUT_MT_DROP_UNUSED 0x0004 /* drop contacts not seen in frame */
21#define INPUT_MT_TRACK 0x0008 /* use in-kernel tracking */
22
18/** 23/**
19 * struct input_mt_slot - represents the state of an input MT slot 24 * struct input_mt_slot - represents the state of an input MT slot
20 * @abs: holds current values of ABS_MT axes for this slot 25 * @abs: holds current values of ABS_MT axes for this slot
26 * @frame: last frame at which input_mt_report_slot_state() was called
27 * @key: optional driver designation of this slot
21 */ 28 */
22struct input_mt_slot { 29struct input_mt_slot {
23 int abs[ABS_MT_LAST - ABS_MT_FIRST + 1]; 30 int abs[ABS_MT_LAST - ABS_MT_FIRST + 1];
31 unsigned int frame;
32 unsigned int key;
33};
34
35/**
36 * struct input_mt - state of tracked contacts
37 * @trkid: stores MT tracking ID for the next contact
38 * @num_slots: number of MT slots the device uses
39 * @slot: MT slot currently being transmitted
40 * @flags: input_mt operation flags
41 * @frame: increases every time input_mt_sync_frame() is called
42 * @red: reduced cost matrix for in-kernel tracking
43 * @slots: array of slots holding current values of tracked contacts
44 */
45struct input_mt {
46 int trkid;
47 int num_slots;
48 int slot;
49 unsigned int flags;
50 unsigned int frame;
51 int *red;
52 struct input_mt_slot slots[];
24}; 53};
25 54
26static inline void input_mt_set_value(struct input_mt_slot *slot, 55static inline void input_mt_set_value(struct input_mt_slot *slot,
@@ -35,12 +64,18 @@ static inline int input_mt_get_value(const struct input_mt_slot *slot,
35 return slot->abs[code - ABS_MT_FIRST]; 64 return slot->abs[code - ABS_MT_FIRST];
36} 65}
37 66
38int input_mt_init_slots(struct input_dev *dev, unsigned int num_slots); 67static inline bool input_mt_is_active(const struct input_mt_slot *slot)
68{
69 return input_mt_get_value(slot, ABS_MT_TRACKING_ID) >= 0;
70}
71
72int input_mt_init_slots(struct input_dev *dev, unsigned int num_slots,
73 unsigned int flags);
39void input_mt_destroy_slots(struct input_dev *dev); 74void input_mt_destroy_slots(struct input_dev *dev);
40 75
41static inline int input_mt_new_trkid(struct input_dev *dev) 76static inline int input_mt_new_trkid(struct input_mt *mt)
42{ 77{
43 return dev->trkid++ & TRKID_MAX; 78 return mt->trkid++ & TRKID_MAX;
44} 79}
45 80
46static inline void input_mt_slot(struct input_dev *dev, int slot) 81static inline void input_mt_slot(struct input_dev *dev, int slot)
@@ -64,4 +99,20 @@ void input_mt_report_slot_state(struct input_dev *dev,
64void input_mt_report_finger_count(struct input_dev *dev, int count); 99void input_mt_report_finger_count(struct input_dev *dev, int count);
65void input_mt_report_pointer_emulation(struct input_dev *dev, bool use_count); 100void input_mt_report_pointer_emulation(struct input_dev *dev, bool use_count);
66 101
102void input_mt_sync_frame(struct input_dev *dev);
103
104/**
105 * struct input_mt_pos - contact position
106 * @x: horizontal coordinate
107 * @y: vertical coordinate
108 */
109struct input_mt_pos {
110 s16 x, y;
111};
112
113int input_mt_assign_slots(struct input_dev *dev, int *slots,
114 const struct input_mt_pos *pos, int num_pos);
115
116int input_mt_get_slot_by_key(struct input_dev *dev, int key);
117
67#endif 118#endif
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index c5f856a040b9..5e4e6170f43a 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -430,6 +430,8 @@ enum
430 NR_SOFTIRQS 430 NR_SOFTIRQS
431}; 431};
432 432
433#define SOFTIRQ_STOP_IDLE_MASK (~(1 << RCU_SOFTIRQ))
434
433/* map softirq index to softirq name. update 'softirq_to_name' in 435/* map softirq index to softirq name. update 'softirq_to_name' in
434 * kernel/softirq.c when adding a new softirq. 436 * kernel/softirq.c when adding a new softirq.
435 */ 437 */
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 7e83370e6fd2..f3b99e1c1042 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -256,72 +256,78 @@ static inline void iommu_set_fault_handler(struct iommu_domain *domain,
256{ 256{
257} 257}
258 258
259int iommu_attach_group(struct iommu_domain *domain, struct iommu_group *group) 259static inline int iommu_attach_group(struct iommu_domain *domain,
260 struct iommu_group *group)
260{ 261{
261 return -ENODEV; 262 return -ENODEV;
262} 263}
263 264
264void iommu_detach_group(struct iommu_domain *domain, struct iommu_group *group) 265static inline void iommu_detach_group(struct iommu_domain *domain,
266 struct iommu_group *group)
265{ 267{
266} 268}
267 269
268struct iommu_group *iommu_group_alloc(void) 270static inline struct iommu_group *iommu_group_alloc(void)
269{ 271{
270 return ERR_PTR(-ENODEV); 272 return ERR_PTR(-ENODEV);
271} 273}
272 274
273void *iommu_group_get_iommudata(struct iommu_group *group) 275static inline void *iommu_group_get_iommudata(struct iommu_group *group)
274{ 276{
275 return NULL; 277 return NULL;
276} 278}
277 279
278void iommu_group_set_iommudata(struct iommu_group *group, void *iommu_data, 280static inline void iommu_group_set_iommudata(struct iommu_group *group,
279 void (*release)(void *iommu_data)) 281 void *iommu_data,
282 void (*release)(void *iommu_data))
280{ 283{
281} 284}
282 285
283int iommu_group_set_name(struct iommu_group *group, const char *name) 286static inline int iommu_group_set_name(struct iommu_group *group,
287 const char *name)
284{ 288{
285 return -ENODEV; 289 return -ENODEV;
286} 290}
287 291
288int iommu_group_add_device(struct iommu_group *group, struct device *dev) 292static inline int iommu_group_add_device(struct iommu_group *group,
293 struct device *dev)
289{ 294{
290 return -ENODEV; 295 return -ENODEV;
291} 296}
292 297
293void iommu_group_remove_device(struct device *dev) 298static inline void iommu_group_remove_device(struct device *dev)
294{ 299{
295} 300}
296 301
297int iommu_group_for_each_dev(struct iommu_group *group, void *data, 302static inline int iommu_group_for_each_dev(struct iommu_group *group,
298 int (*fn)(struct device *, void *)) 303 void *data,
304 int (*fn)(struct device *, void *))
299{ 305{
300 return -ENODEV; 306 return -ENODEV;
301} 307}
302 308
303struct iommu_group *iommu_group_get(struct device *dev) 309static inline struct iommu_group *iommu_group_get(struct device *dev)
304{ 310{
305 return NULL; 311 return NULL;
306} 312}
307 313
308void iommu_group_put(struct iommu_group *group) 314static inline void iommu_group_put(struct iommu_group *group)
309{ 315{
310} 316}
311 317
312int iommu_group_register_notifier(struct iommu_group *group, 318static inline int iommu_group_register_notifier(struct iommu_group *group,
313 struct notifier_block *nb) 319 struct notifier_block *nb)
314{ 320{
315 return -ENODEV; 321 return -ENODEV;
316} 322}
317 323
318int iommu_group_unregister_notifier(struct iommu_group *group, 324static inline int iommu_group_unregister_notifier(struct iommu_group *group,
319 struct notifier_block *nb) 325 struct notifier_block *nb)
320{ 326{
321 return 0; 327 return 0;
322} 328}
323 329
324int iommu_group_id(struct iommu_group *group) 330static inline int iommu_group_id(struct iommu_group *group)
325{ 331{
326 return -ENODEV; 332 return -ENODEV;
327} 333}
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h
index 9a323d12de1c..0ba014c55056 100644
--- a/include/linux/irqdesc.h
+++ b/include/linux/irqdesc.h
@@ -10,12 +10,10 @@
10 10
11struct irq_affinity_notify; 11struct irq_affinity_notify;
12struct proc_dir_entry; 12struct proc_dir_entry;
13struct timer_rand_state;
14struct module; 13struct module;
15/** 14/**
16 * struct irq_desc - interrupt descriptor 15 * struct irq_desc - interrupt descriptor
17 * @irq_data: per irq and chip data passed down to chip functions 16 * @irq_data: per irq and chip data passed down to chip functions
18 * @timer_rand_state: pointer to timer rand state struct
19 * @kstat_irqs: irq stats per cpu 17 * @kstat_irqs: irq stats per cpu
20 * @handle_irq: highlevel irq-events handler 18 * @handle_irq: highlevel irq-events handler
21 * @preflow_handler: handler called before the flow handler (currently used by sparc) 19 * @preflow_handler: handler called before the flow handler (currently used by sparc)
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 594b419b7d20..2451f1f7a1d9 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -91,7 +91,7 @@
91{ \ 91{ \
92 typeof(x) __x = x; \ 92 typeof(x) __x = x; \
93 typeof(divisor) __d = divisor; \ 93 typeof(divisor) __d = divisor; \
94 (((typeof(x))-1) >= 0 || (__x) >= 0) ? \ 94 (((typeof(x))-1) > 0 || (__x) > 0) ? \
95 (((__x) + ((__d) / 2)) / (__d)) : \ 95 (((__x) + ((__d) / 2)) / (__d)) : \
96 (((__x) - ((__d) / 2)) / (__d)); \ 96 (((__x) - ((__d) / 2)) / (__d)); \
97} \ 97} \
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h
index 2fbd9053c2df..36d12f0884c3 100644
--- a/include/linux/kernel_stat.h
+++ b/include/linux/kernel_stat.h
@@ -130,4 +130,12 @@ extern void account_process_tick(struct task_struct *, int user);
130extern void account_steal_ticks(unsigned long ticks); 130extern void account_steal_ticks(unsigned long ticks);
131extern void account_idle_ticks(unsigned long ticks); 131extern void account_idle_ticks(unsigned long ticks);
132 132
133#ifdef CONFIG_VIRT_CPU_ACCOUNTING
134extern void vtime_task_switch(struct task_struct *prev);
135extern void vtime_account_system(struct task_struct *tsk);
136extern void vtime_account_idle(struct task_struct *tsk);
137#else
138static inline void vtime_task_switch(struct task_struct *prev) { }
139#endif
140
133#endif /* _LINUX_KERNEL_STAT_H */ 141#endif /* _LINUX_KERNEL_STAT_H */
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index b6e1f8c00577..23755ba42abc 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -38,6 +38,7 @@
38#include <linux/spinlock.h> 38#include <linux/spinlock.h>
39#include <linux/rcupdate.h> 39#include <linux/rcupdate.h>
40#include <linux/mutex.h> 40#include <linux/mutex.h>
41#include <linux/ftrace.h>
41 42
42#ifdef CONFIG_KPROBES 43#ifdef CONFIG_KPROBES
43#include <asm/kprobes.h> 44#include <asm/kprobes.h>
@@ -48,14 +49,26 @@
48#define KPROBE_REENTER 0x00000004 49#define KPROBE_REENTER 0x00000004
49#define KPROBE_HIT_SSDONE 0x00000008 50#define KPROBE_HIT_SSDONE 0x00000008
50 51
52/*
53 * If function tracer is enabled and the arch supports full
54 * passing of pt_regs to function tracing, then kprobes can
55 * optimize on top of function tracing.
56 */
57#if defined(CONFIG_FUNCTION_TRACER) && defined(ARCH_SUPPORTS_FTRACE_SAVE_REGS) \
58 && defined(ARCH_SUPPORTS_KPROBES_ON_FTRACE)
59# define KPROBES_CAN_USE_FTRACE
60#endif
61
51/* Attach to insert probes on any functions which should be ignored*/ 62/* Attach to insert probes on any functions which should be ignored*/
52#define __kprobes __attribute__((__section__(".kprobes.text"))) 63#define __kprobes __attribute__((__section__(".kprobes.text")))
64
53#else /* CONFIG_KPROBES */ 65#else /* CONFIG_KPROBES */
54typedef int kprobe_opcode_t; 66typedef int kprobe_opcode_t;
55struct arch_specific_insn { 67struct arch_specific_insn {
56 int dummy; 68 int dummy;
57}; 69};
58#define __kprobes 70#define __kprobes
71
59#endif /* CONFIG_KPROBES */ 72#endif /* CONFIG_KPROBES */
60 73
61struct kprobe; 74struct kprobe;
@@ -128,6 +141,7 @@ struct kprobe {
128 * NOTE: 141 * NOTE:
129 * this flag is only for optimized_kprobe. 142 * this flag is only for optimized_kprobe.
130 */ 143 */
144#define KPROBE_FLAG_FTRACE 8 /* probe is using ftrace */
131 145
132/* Has this kprobe gone ? */ 146/* Has this kprobe gone ? */
133static inline int kprobe_gone(struct kprobe *p) 147static inline int kprobe_gone(struct kprobe *p)
@@ -146,6 +160,13 @@ static inline int kprobe_optimized(struct kprobe *p)
146{ 160{
147 return p->flags & KPROBE_FLAG_OPTIMIZED; 161 return p->flags & KPROBE_FLAG_OPTIMIZED;
148} 162}
163
164/* Is this kprobe uses ftrace ? */
165static inline int kprobe_ftrace(struct kprobe *p)
166{
167 return p->flags & KPROBE_FLAG_FTRACE;
168}
169
149/* 170/*
150 * Special probe type that uses setjmp-longjmp type tricks to resume 171 * Special probe type that uses setjmp-longjmp type tricks to resume
151 * execution at a specified entry with a matching prototype corresponding 172 * execution at a specified entry with a matching prototype corresponding
@@ -295,6 +316,12 @@ extern int proc_kprobes_optimization_handler(struct ctl_table *table,
295#endif 316#endif
296 317
297#endif /* CONFIG_OPTPROBES */ 318#endif /* CONFIG_OPTPROBES */
319#ifdef KPROBES_CAN_USE_FTRACE
320extern void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip,
321 struct ftrace_ops *ops, struct pt_regs *regs);
322extern int arch_prepare_kprobe_ftrace(struct kprobe *p);
323#endif
324
298 325
299/* Get the kprobe at this addr (if any) - called with preemption disabled */ 326/* Get the kprobe at this addr (if any) - called with preemption disabled */
300struct kprobe *get_kprobe(void *addr); 327struct kprobe *get_kprobe(void *addr);
diff --git a/include/linux/kthread.h b/include/linux/kthread.h
index 22ccf9dee177..8d816646f766 100644
--- a/include/linux/kthread.h
+++ b/include/linux/kthread.h
@@ -14,6 +14,11 @@ struct task_struct *kthread_create_on_node(int (*threadfn)(void *data),
14 kthread_create_on_node(threadfn, data, -1, namefmt, ##arg) 14 kthread_create_on_node(threadfn, data, -1, namefmt, ##arg)
15 15
16 16
17struct task_struct *kthread_create_on_cpu(int (*threadfn)(void *data),
18 void *data,
19 unsigned int cpu,
20 const char *namefmt);
21
17/** 22/**
18 * kthread_run - create and wake a thread. 23 * kthread_run - create and wake a thread.
19 * @threadfn: the function to run until signal_pending(current). 24 * @threadfn: the function to run until signal_pending(current).
@@ -34,9 +39,13 @@ struct task_struct *kthread_create_on_node(int (*threadfn)(void *data),
34 39
35void kthread_bind(struct task_struct *k, unsigned int cpu); 40void kthread_bind(struct task_struct *k, unsigned int cpu);
36int kthread_stop(struct task_struct *k); 41int kthread_stop(struct task_struct *k);
37int kthread_should_stop(void); 42bool kthread_should_stop(void);
43bool kthread_should_park(void);
38bool kthread_freezable_should_stop(bool *was_frozen); 44bool kthread_freezable_should_stop(bool *was_frozen);
39void *kthread_data(struct task_struct *k); 45void *kthread_data(struct task_struct *k);
46int kthread_park(struct task_struct *k);
47void kthread_unpark(struct task_struct *k);
48void kthread_parkme(void);
40 49
41int kthreadd(void *unused); 50int kthreadd(void *unused);
42extern struct task_struct *kthreadd_task; 51extern struct task_struct *kthreadd_task;
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index b70b48b01098..8a59e0abe5fa 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -685,7 +685,7 @@ static inline int kvm_deassign_device(struct kvm *kvm,
685static inline void kvm_guest_enter(void) 685static inline void kvm_guest_enter(void)
686{ 686{
687 BUG_ON(preemptible()); 687 BUG_ON(preemptible());
688 account_system_vtime(current); 688 vtime_account(current);
689 current->flags |= PF_VCPU; 689 current->flags |= PF_VCPU;
690 /* KVM does not hold any references to rcu protected data when it 690 /* KVM does not hold any references to rcu protected data when it
691 * switches CPU into a guest mode. In fact switching to a guest mode 691 * switches CPU into a guest mode. In fact switching to a guest mode
@@ -699,7 +699,7 @@ static inline void kvm_guest_enter(void)
699 699
700static inline void kvm_guest_exit(void) 700static inline void kvm_guest_exit(void)
701{ 701{
702 account_system_vtime(current); 702 vtime_account(current);
703 current->flags &= ~PF_VCPU; 703 current->flags &= ~PF_VCPU;
704} 704}
705 705
diff --git a/include/linux/memory.h b/include/linux/memory.h
index 1ac7f6e405f9..ff9a9f8e0ed9 100644
--- a/include/linux/memory.h
+++ b/include/linux/memory.h
@@ -19,7 +19,7 @@
19#include <linux/compiler.h> 19#include <linux/compiler.h>
20#include <linux/mutex.h> 20#include <linux/mutex.h>
21 21
22#define MIN_MEMORY_BLOCK_SIZE (1 << SECTION_SIZE_BITS) 22#define MIN_MEMORY_BLOCK_SIZE (1UL << SECTION_SIZE_BITS)
23 23
24struct memory_block { 24struct memory_block {
25 unsigned long start_section_nr; 25 unsigned long start_section_nr;
diff --git a/include/linux/mfd/dbx500-prcmu.h b/include/linux/mfd/dbx500-prcmu.h
index 5b90e94399e1..c410d99bd667 100644
--- a/include/linux/mfd/dbx500-prcmu.h
+++ b/include/linux/mfd/dbx500-prcmu.h
@@ -136,6 +136,7 @@ enum prcmu_clock {
136 PRCMU_TIMCLK, 136 PRCMU_TIMCLK,
137 PRCMU_PLLSOC0, 137 PRCMU_PLLSOC0,
138 PRCMU_PLLSOC1, 138 PRCMU_PLLSOC1,
139 PRCMU_ARMSS,
139 PRCMU_PLLDDR, 140 PRCMU_PLLDDR,
140 PRCMU_PLLDSI, 141 PRCMU_PLLDSI,
141 PRCMU_DSI0CLK, 142 PRCMU_DSI0CLK,
diff --git a/include/linux/mfd/max77686.h b/include/linux/mfd/max77686.h
index 3d7ae4d7fd36..46c0f320ed76 100644
--- a/include/linux/mfd/max77686.h
+++ b/include/linux/mfd/max77686.h
@@ -74,6 +74,7 @@ enum max77686_regulators {
74struct max77686_regulator_data { 74struct max77686_regulator_data {
75 int id; 75 int id;
76 struct regulator_init_data *initdata; 76 struct regulator_init_data *initdata;
77 struct device_node *of_node;
77}; 78};
78 79
79enum max77686_opmode { 80enum max77686_opmode {
diff --git a/include/linux/mfd/max8998.h b/include/linux/mfd/max8998.h
index f4f0dfa4698a..6823548d0c0a 100644
--- a/include/linux/mfd/max8998.h
+++ b/include/linux/mfd/max8998.h
@@ -67,7 +67,7 @@ struct max8998_regulator_data {
67/** 67/**
68 * struct max8998_board - packages regulator init data 68 * struct max8998_board - packages regulator init data
69 * @regulators: array of defined regulators 69 * @regulators: array of defined regulators
70 * @num_regulators: number of regultors used 70 * @num_regulators: number of regulators used
71 * @irq_base: base IRQ number for max8998, required for IRQs 71 * @irq_base: base IRQ number for max8998, required for IRQs
72 * @ono: power onoff IRQ number for max8998 72 * @ono: power onoff IRQ number for max8998
73 * @buck_voltage_lock: Do NOT change the values of the following six 73 * @buck_voltage_lock: Do NOT change the values of the following six
diff --git a/include/linux/mfd/tps6586x.h b/include/linux/mfd/tps6586x.h
index f350fd0ba1df..94514710a03f 100644
--- a/include/linux/mfd/tps6586x.h
+++ b/include/linux/mfd/tps6586x.h
@@ -14,6 +14,7 @@
14#define TPS6586X_SLEW_RATE_MASK 0x07 14#define TPS6586X_SLEW_RATE_MASK 0x07
15 15
16enum { 16enum {
17 TPS6586X_ID_SYS,
17 TPS6586X_ID_SM_0, 18 TPS6586X_ID_SM_0,
18 TPS6586X_ID_SM_1, 19 TPS6586X_ID_SM_1,
19 TPS6586X_ID_SM_2, 20 TPS6586X_ID_SM_2,
diff --git a/include/linux/micrel_phy.h b/include/linux/micrel_phy.h
index 61f0905bdc48..de201203bc7c 100644
--- a/include/linux/micrel_phy.h
+++ b/include/linux/micrel_phy.h
@@ -1,3 +1,15 @@
1/*
2 * include/linux/micrel_phy.h
3 *
4 * Micrel PHY IDs
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 *
11 */
12
1#ifndef _MICREL_PHY_H 13#ifndef _MICREL_PHY_H
2#define _MICREL_PHY_H 14#define _MICREL_PHY_H
3 15
@@ -5,10 +17,11 @@
5 17
6#define PHY_ID_KSZ9021 0x00221610 18#define PHY_ID_KSZ9021 0x00221610
7#define PHY_ID_KS8737 0x00221720 19#define PHY_ID_KS8737 0x00221720
8#define PHY_ID_KS8041 0x00221510 20#define PHY_ID_KSZ8021 0x00221555
9#define PHY_ID_KS8051 0x00221550 21#define PHY_ID_KSZ8041 0x00221510
22#define PHY_ID_KSZ8051 0x00221550
10/* both for ks8001 Rev. A/B, and for ks8721 Rev 3. */ 23/* both for ks8001 Rev. A/B, and for ks8721 Rev 3. */
11#define PHY_ID_KS8001 0x0022161A 24#define PHY_ID_KSZ8001 0x0022161A
12 25
13/* struct phy_device dev_flags definitions */ 26/* struct phy_device dev_flags definitions */
14#define MICREL_PHY_50MHZ_CLK 0x00000001 27#define MICREL_PHY_50MHZ_CLK 0x00000001
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 9490a00529f4..c25cccaa555a 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -35,8 +35,10 @@ struct nvme_bar {
35 __u64 acq; /* Admin CQ Base Address */ 35 __u64 acq; /* Admin CQ Base Address */
36}; 36};
37 37
38#define NVME_CAP_MQES(cap) ((cap) & 0xffff)
38#define NVME_CAP_TIMEOUT(cap) (((cap) >> 24) & 0xff) 39#define NVME_CAP_TIMEOUT(cap) (((cap) >> 24) & 0xff)
39#define NVME_CAP_STRIDE(cap) (((cap) >> 32) & 0xf) 40#define NVME_CAP_STRIDE(cap) (((cap) >> 32) & 0xf)
41#define NVME_CAP_MPSMIN(cap) (((cap) >> 48) & 0xf)
40 42
41enum { 43enum {
42 NVME_CC_ENABLE = 1 << 0, 44 NVME_CC_ENABLE = 1 << 0,
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h
index 248fba2af98a..9a22b5efb384 100644
--- a/include/linux/pci-acpi.h
+++ b/include/linux/pci-acpi.h
@@ -22,19 +22,24 @@ extern phys_addr_t acpi_pci_root_get_mcfg_addr(acpi_handle handle);
22static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) 22static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev)
23{ 23{
24 struct pci_bus *pbus = pdev->bus; 24 struct pci_bus *pbus = pdev->bus;
25
25 /* Find a PCI root bus */ 26 /* Find a PCI root bus */
26 while (!pci_is_root_bus(pbus)) 27 while (!pci_is_root_bus(pbus))
27 pbus = pbus->parent; 28 pbus = pbus->parent;
28 return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), 29
29 pbus->number); 30 return DEVICE_ACPI_HANDLE(pbus->bridge);
30} 31}
31 32
32static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) 33static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus)
33{ 34{
34 if (!pci_is_root_bus(pbus)) 35 struct device *dev;
35 return DEVICE_ACPI_HANDLE(&(pbus->self->dev)); 36
36 return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), 37 if (pci_is_root_bus(pbus))
37 pbus->number); 38 dev = pbus->bridge;
39 else
40 dev = &pbus->self->dev;
41
42 return DEVICE_ACPI_HANDLE(dev);
38} 43}
39#endif 44#endif
40 45
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 5faa8310eec9..be1de01de1c4 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -254,10 +254,10 @@ struct pci_dev {
254 u8 revision; /* PCI revision, low byte of class word */ 254 u8 revision; /* PCI revision, low byte of class word */
255 u8 hdr_type; /* PCI header type (`multi' flag masked out) */ 255 u8 hdr_type; /* PCI header type (`multi' flag masked out) */
256 u8 pcie_cap; /* PCI-E capability offset */ 256 u8 pcie_cap; /* PCI-E capability offset */
257 u8 pcie_type:4; /* PCI-E device/port type */
258 u8 pcie_mpss:3; /* PCI-E Max Payload Size Supported */ 257 u8 pcie_mpss:3; /* PCI-E Max Payload Size Supported */
259 u8 rom_base_reg; /* which config register controls the ROM */ 258 u8 rom_base_reg; /* which config register controls the ROM */
260 u8 pin; /* which interrupt pin this device uses */ 259 u8 pin; /* which interrupt pin this device uses */
260 u16 pcie_flags_reg; /* cached PCI-E Capabilities Register */
261 261
262 struct pci_driver *driver; /* which driver has allocated this device */ 262 struct pci_driver *driver; /* which driver has allocated this device */
263 u64 dma_mask; /* Mask of the bits of bus address this 263 u64 dma_mask; /* Mask of the bits of bus address this
@@ -369,7 +369,6 @@ static inline struct pci_dev *pci_physfn(struct pci_dev *dev)
369 369
370extern struct pci_dev *alloc_pci_dev(void); 370extern struct pci_dev *alloc_pci_dev(void);
371 371
372#define pci_dev_b(n) list_entry(n, struct pci_dev, bus_list)
373#define to_pci_dev(n) container_of(n, struct pci_dev, dev) 372#define to_pci_dev(n) container_of(n, struct pci_dev, dev)
374#define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) 373#define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL)
375 374
@@ -596,7 +595,7 @@ struct pci_driver {
596 int (*resume_early) (struct pci_dev *dev); 595 int (*resume_early) (struct pci_dev *dev);
597 int (*resume) (struct pci_dev *dev); /* Device woken up */ 596 int (*resume) (struct pci_dev *dev); /* Device woken up */
598 void (*shutdown) (struct pci_dev *dev); 597 void (*shutdown) (struct pci_dev *dev);
599 struct pci_error_handlers *err_handler; 598 const struct pci_error_handlers *err_handler;
600 struct device_driver driver; 599 struct device_driver driver;
601 struct pci_dynids dynids; 600 struct pci_dynids dynids;
602}; 601};
@@ -734,9 +733,7 @@ u8 pci_common_swizzle(struct pci_dev *dev, u8 *pinp);
734extern struct pci_dev *pci_dev_get(struct pci_dev *dev); 733extern struct pci_dev *pci_dev_get(struct pci_dev *dev);
735extern void pci_dev_put(struct pci_dev *dev); 734extern void pci_dev_put(struct pci_dev *dev);
736extern void pci_remove_bus(struct pci_bus *b); 735extern void pci_remove_bus(struct pci_bus *b);
737extern void __pci_remove_bus_device(struct pci_dev *dev);
738extern void pci_stop_and_remove_bus_device(struct pci_dev *dev); 736extern void pci_stop_and_remove_bus_device(struct pci_dev *dev);
739extern void pci_stop_bus_device(struct pci_dev *dev);
740void pci_setup_cardbus(struct pci_bus *bus); 737void pci_setup_cardbus(struct pci_bus *bus);
741extern void pci_sort_breadthfirst(void); 738extern void pci_sort_breadthfirst(void);
742#define dev_is_pci(d) ((d)->bus == &pci_bus_type) 739#define dev_is_pci(d) ((d)->bus == &pci_bus_type)
@@ -755,6 +752,7 @@ enum pci_lost_interrupt_reason pci_lost_interrupt(struct pci_dev *dev);
755int pci_find_capability(struct pci_dev *dev, int cap); 752int pci_find_capability(struct pci_dev *dev, int cap);
756int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap); 753int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap);
757int pci_find_ext_capability(struct pci_dev *dev, int cap); 754int pci_find_ext_capability(struct pci_dev *dev, int cap);
755int pci_find_next_ext_capability(struct pci_dev *dev, int pos, int cap);
758int pci_find_ht_capability(struct pci_dev *dev, int ht_cap); 756int pci_find_ht_capability(struct pci_dev *dev, int ht_cap);
759int pci_find_next_ht_capability(struct pci_dev *dev, int pos, int ht_cap); 757int pci_find_next_ht_capability(struct pci_dev *dev, int pos, int ht_cap);
760struct pci_bus *pci_find_next_bus(const struct pci_bus *from); 758struct pci_bus *pci_find_next_bus(const struct pci_bus *from);
@@ -816,6 +814,39 @@ static inline int pci_write_config_dword(const struct pci_dev *dev, int where,
816 return pci_bus_write_config_dword(dev->bus, dev->devfn, where, val); 814 return pci_bus_write_config_dword(dev->bus, dev->devfn, where, val);
817} 815}
818 816
817int pcie_capability_read_word(struct pci_dev *dev, int pos, u16 *val);
818int pcie_capability_read_dword(struct pci_dev *dev, int pos, u32 *val);
819int pcie_capability_write_word(struct pci_dev *dev, int pos, u16 val);
820int pcie_capability_write_dword(struct pci_dev *dev, int pos, u32 val);
821int pcie_capability_clear_and_set_word(struct pci_dev *dev, int pos,
822 u16 clear, u16 set);
823int pcie_capability_clear_and_set_dword(struct pci_dev *dev, int pos,
824 u32 clear, u32 set);
825
826static inline int pcie_capability_set_word(struct pci_dev *dev, int pos,
827 u16 set)
828{
829 return pcie_capability_clear_and_set_word(dev, pos, 0, set);
830}
831
832static inline int pcie_capability_set_dword(struct pci_dev *dev, int pos,
833 u32 set)
834{
835 return pcie_capability_clear_and_set_dword(dev, pos, 0, set);
836}
837
838static inline int pcie_capability_clear_word(struct pci_dev *dev, int pos,
839 u16 clear)
840{
841 return pcie_capability_clear_and_set_word(dev, pos, clear, 0);
842}
843
844static inline int pcie_capability_clear_dword(struct pci_dev *dev, int pos,
845 u32 clear)
846{
847 return pcie_capability_clear_and_set_dword(dev, pos, clear, 0);
848}
849
819/* user-space driven config access */ 850/* user-space driven config access */
820int pci_user_read_config_byte(struct pci_dev *dev, int where, u8 *val); 851int pci_user_read_config_byte(struct pci_dev *dev, int where, u8 *val);
821int pci_user_read_config_word(struct pci_dev *dev, int where, u16 *val); 852int pci_user_read_config_word(struct pci_dev *dev, int where, u16 *val);
@@ -1013,7 +1044,6 @@ void pci_unregister_driver(struct pci_driver *dev);
1013 module_driver(__pci_driver, pci_register_driver, \ 1044 module_driver(__pci_driver, pci_register_driver, \
1014 pci_unregister_driver) 1045 pci_unregister_driver)
1015 1046
1016void pci_stop_and_remove_behind_bridge(struct pci_dev *dev);
1017struct pci_driver *pci_dev_driver(const struct pci_dev *dev); 1047struct pci_driver *pci_dev_driver(const struct pci_dev *dev);
1018int pci_add_dynid(struct pci_driver *drv, 1048int pci_add_dynid(struct pci_driver *drv,
1019 unsigned int vendor, unsigned int device, 1049 unsigned int vendor, unsigned int device,
@@ -1031,6 +1061,8 @@ int pci_cfg_space_size_ext(struct pci_dev *dev);
1031int pci_cfg_space_size(struct pci_dev *dev); 1061int pci_cfg_space_size(struct pci_dev *dev);
1032unsigned char pci_bus_max_busnr(struct pci_bus *bus); 1062unsigned char pci_bus_max_busnr(struct pci_bus *bus);
1033void pci_setup_bridge(struct pci_bus *bus); 1063void pci_setup_bridge(struct pci_bus *bus);
1064resource_size_t pcibios_window_alignment(struct pci_bus *bus,
1065 unsigned long type);
1034 1066
1035#define PCI_VGA_STATE_CHANGE_BRIDGE (1 << 0) 1067#define PCI_VGA_STATE_CHANGE_BRIDGE (1 << 0)
1036#define PCI_VGA_STATE_CHANGE_DECODES (1 << 1) 1068#define PCI_VGA_STATE_CHANGE_DECODES (1 << 1)
@@ -1472,7 +1504,7 @@ enum pci_fixup_pass {
1472/* Anonymous variables would be nice... */ 1504/* Anonymous variables would be nice... */
1473#define DECLARE_PCI_FIXUP_SECTION(section, name, vendor, device, class, \ 1505#define DECLARE_PCI_FIXUP_SECTION(section, name, vendor, device, class, \
1474 class_shift, hook) \ 1506 class_shift, hook) \
1475 static const struct pci_fixup const __pci_fixup_##name __used \ 1507 static const struct pci_fixup __pci_fixup_##name __used \
1476 __attribute__((__section__(#section), aligned((sizeof(void *))))) \ 1508 __attribute__((__section__(#section), aligned((sizeof(void *))))) \
1477 = { vendor, device, class, class_shift, hook }; 1509 = { vendor, device, class, class_shift, hook };
1478 1510
@@ -1650,6 +1682,15 @@ static inline bool pci_is_pcie(struct pci_dev *dev)
1650 return !!pci_pcie_cap(dev); 1682 return !!pci_pcie_cap(dev);
1651} 1683}
1652 1684
1685/**
1686 * pci_pcie_type - get the PCIe device/port type
1687 * @dev: PCI device
1688 */
1689static inline int pci_pcie_type(const struct pci_dev *dev)
1690{
1691 return (dev->pcie_flags_reg & PCI_EXP_FLAGS_TYPE) >> 4;
1692}
1693
1653void pci_request_acs(void); 1694void pci_request_acs(void);
1654bool pci_acs_enabled(struct pci_dev *pdev, u16 acs_flags); 1695bool pci_acs_enabled(struct pci_dev *pdev, u16 acs_flags);
1655bool pci_acs_path_enabled(struct pci_dev *start, 1696bool pci_acs_path_enabled(struct pci_dev *start,
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h
index 7fb75b143755..20ae747ddf34 100644
--- a/include/linux/pci_regs.h
+++ b/include/linux/pci_regs.h
@@ -549,6 +549,7 @@
549#define PCI_EXP_LNKCAP2_SLS_8_0GB 0x04 /* Current Link Speed 8.0GT/s */ 549#define PCI_EXP_LNKCAP2_SLS_8_0GB 0x04 /* Current Link Speed 8.0GT/s */
550#define PCI_EXP_LNKCAP2_CROSSLINK 0x100 /* Crosslink supported */ 550#define PCI_EXP_LNKCAP2_CROSSLINK 0x100 /* Crosslink supported */
551#define PCI_EXP_LNKCTL2 48 /* Link Control 2 */ 551#define PCI_EXP_LNKCTL2 48 /* Link Control 2 */
552#define PCI_EXP_LNKSTA2 50 /* Link Status 2 */
552#define PCI_EXP_SLTCTL2 56 /* Slot Control 2 */ 553#define PCI_EXP_SLTCTL2 56 /* Slot Control 2 */
553 554
554/* Extended Capabilities (PCI-X 2.0 and Express) */ 555/* Extended Capabilities (PCI-X 2.0 and Express) */
@@ -677,6 +678,12 @@
677#define PCI_PWR_CAP_BUDGET(x) ((x) & 1) /* Included in system budget */ 678#define PCI_PWR_CAP_BUDGET(x) ((x) & 1) /* Included in system budget */
678#define PCI_EXT_CAP_PWR_SIZEOF 16 679#define PCI_EXT_CAP_PWR_SIZEOF 16
679 680
681/* Vendor-Specific (VSEC, PCI_EXT_CAP_ID_VNDR) */
682#define PCI_VNDR_HEADER 4 /* Vendor-Specific Header */
683#define PCI_VNDR_HEADER_ID(x) ((x) & 0xffff)
684#define PCI_VNDR_HEADER_REV(x) (((x) >> 16) & 0xf)
685#define PCI_VNDR_HEADER_LEN(x) (((x) >> 20) & 0xfff)
686
680/* 687/*
681 * Hypertransport sub capability types 688 * Hypertransport sub capability types
682 * 689 *
diff --git a/include/linux/pcieport_if.h b/include/linux/pcieport_if.h
index 6775532b92a9..e6f91b1406d8 100644
--- a/include/linux/pcieport_if.h
+++ b/include/linux/pcieport_if.h
@@ -49,7 +49,7 @@ struct pcie_port_service_driver {
49 int (*resume) (struct pcie_device *dev); 49 int (*resume) (struct pcie_device *dev);
50 50
51 /* Service Error Recovery Handler */ 51 /* Service Error Recovery Handler */
52 struct pci_error_handlers *err_handler; 52 const struct pci_error_handlers *err_handler;
53 53
54 /* Link Reset Capability - AER service driver specific */ 54 /* Link Reset Capability - AER service driver specific */
55 pci_ers_result_t (*reset_link) (struct pci_dev *dev); 55 pci_ers_result_t (*reset_link) (struct pci_dev *dev);
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 33ed9d605f91..599afc4bb67e 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -130,8 +130,10 @@ enum perf_event_sample_format {
130 PERF_SAMPLE_STREAM_ID = 1U << 9, 130 PERF_SAMPLE_STREAM_ID = 1U << 9,
131 PERF_SAMPLE_RAW = 1U << 10, 131 PERF_SAMPLE_RAW = 1U << 10,
132 PERF_SAMPLE_BRANCH_STACK = 1U << 11, 132 PERF_SAMPLE_BRANCH_STACK = 1U << 11,
133 PERF_SAMPLE_REGS_USER = 1U << 12,
134 PERF_SAMPLE_STACK_USER = 1U << 13,
133 135
134 PERF_SAMPLE_MAX = 1U << 12, /* non-ABI */ 136 PERF_SAMPLE_MAX = 1U << 14, /* non-ABI */
135}; 137};
136 138
137/* 139/*
@@ -163,6 +165,15 @@ enum perf_branch_sample_type {
163 PERF_SAMPLE_BRANCH_HV) 165 PERF_SAMPLE_BRANCH_HV)
164 166
165/* 167/*
168 * Values to determine ABI of the registers dump.
169 */
170enum perf_sample_regs_abi {
171 PERF_SAMPLE_REGS_ABI_NONE = 0,
172 PERF_SAMPLE_REGS_ABI_32 = 1,
173 PERF_SAMPLE_REGS_ABI_64 = 2,
174};
175
176/*
166 * The format of the data returned by read() on a perf event fd, 177 * The format of the data returned by read() on a perf event fd,
167 * as specified by attr.read_format: 178 * as specified by attr.read_format:
168 * 179 *
@@ -194,6 +205,8 @@ enum perf_event_read_format {
194#define PERF_ATTR_SIZE_VER0 64 /* sizeof first published struct */ 205#define PERF_ATTR_SIZE_VER0 64 /* sizeof first published struct */
195#define PERF_ATTR_SIZE_VER1 72 /* add: config2 */ 206#define PERF_ATTR_SIZE_VER1 72 /* add: config2 */
196#define PERF_ATTR_SIZE_VER2 80 /* add: branch_sample_type */ 207#define PERF_ATTR_SIZE_VER2 80 /* add: branch_sample_type */
208#define PERF_ATTR_SIZE_VER3 96 /* add: sample_regs_user */
209 /* add: sample_stack_user */
197 210
198/* 211/*
199 * Hardware event_id to monitor via a performance monitoring event: 212 * Hardware event_id to monitor via a performance monitoring event:
@@ -255,7 +268,10 @@ struct perf_event_attr {
255 exclude_host : 1, /* don't count in host */ 268 exclude_host : 1, /* don't count in host */
256 exclude_guest : 1, /* don't count in guest */ 269 exclude_guest : 1, /* don't count in guest */
257 270
258 __reserved_1 : 43; 271 exclude_callchain_kernel : 1, /* exclude kernel callchains */
272 exclude_callchain_user : 1, /* exclude user callchains */
273
274 __reserved_1 : 41;
259 275
260 union { 276 union {
261 __u32 wakeup_events; /* wakeup every n events */ 277 __u32 wakeup_events; /* wakeup every n events */
@@ -271,9 +287,25 @@ struct perf_event_attr {
271 __u64 bp_len; 287 __u64 bp_len;
272 __u64 config2; /* extension of config1 */ 288 __u64 config2; /* extension of config1 */
273 }; 289 };
274 __u64 branch_sample_type; /* enum branch_sample_type */ 290 __u64 branch_sample_type; /* enum perf_branch_sample_type */
291
292 /*
293 * Defines set of user regs to dump on samples.
294 * See asm/perf_regs.h for details.
295 */
296 __u64 sample_regs_user;
297
298 /*
299 * Defines size of the user stack to dump on samples.
300 */
301 __u32 sample_stack_user;
302
303 /* Align to u64. */
304 __u32 __reserved_2;
275}; 305};
276 306
307#define perf_flags(attr) (*(&(attr)->read_format + 1))
308
277/* 309/*
278 * Ioctls that can be done on a perf event fd: 310 * Ioctls that can be done on a perf event fd:
279 */ 311 */
@@ -548,6 +580,13 @@ enum perf_event_type {
548 * char data[size];}&& PERF_SAMPLE_RAW 580 * char data[size];}&& PERF_SAMPLE_RAW
549 * 581 *
550 * { u64 from, to, flags } lbr[nr];} && PERF_SAMPLE_BRANCH_STACK 582 * { u64 from, to, flags } lbr[nr];} && PERF_SAMPLE_BRANCH_STACK
583 *
584 * { u64 abi; # enum perf_sample_regs_abi
585 * u64 regs[weight(mask)]; } && PERF_SAMPLE_REGS_USER
586 *
587 * { u64 size;
588 * char data[size];
589 * u64 dyn_size; } && PERF_SAMPLE_STACK_USER
551 * }; 590 * };
552 */ 591 */
553 PERF_RECORD_SAMPLE = 9, 592 PERF_RECORD_SAMPLE = 9,
@@ -609,6 +648,7 @@ struct perf_guest_info_callbacks {
609#include <linux/static_key.h> 648#include <linux/static_key.h>
610#include <linux/atomic.h> 649#include <linux/atomic.h>
611#include <linux/sysfs.h> 650#include <linux/sysfs.h>
651#include <linux/perf_regs.h>
612#include <asm/local.h> 652#include <asm/local.h>
613 653
614struct perf_callchain_entry { 654struct perf_callchain_entry {
@@ -654,6 +694,11 @@ struct perf_branch_stack {
654 struct perf_branch_entry entries[0]; 694 struct perf_branch_entry entries[0];
655}; 695};
656 696
697struct perf_regs_user {
698 __u64 abi;
699 struct pt_regs *regs;
700};
701
657struct task_struct; 702struct task_struct;
658 703
659/* 704/*
@@ -1133,6 +1178,8 @@ struct perf_sample_data {
1133 struct perf_callchain_entry *callchain; 1178 struct perf_callchain_entry *callchain;
1134 struct perf_raw_record *raw; 1179 struct perf_raw_record *raw;
1135 struct perf_branch_stack *br_stack; 1180 struct perf_branch_stack *br_stack;
1181 struct perf_regs_user regs_user;
1182 u64 stack_user_size;
1136}; 1183};
1137 1184
1138static inline void perf_sample_data_init(struct perf_sample_data *data, 1185static inline void perf_sample_data_init(struct perf_sample_data *data,
@@ -1142,7 +1189,10 @@ static inline void perf_sample_data_init(struct perf_sample_data *data,
1142 data->addr = addr; 1189 data->addr = addr;
1143 data->raw = NULL; 1190 data->raw = NULL;
1144 data->br_stack = NULL; 1191 data->br_stack = NULL;
1145 data->period = period; 1192 data->period = period;
1193 data->regs_user.abi = PERF_SAMPLE_REGS_ABI_NONE;
1194 data->regs_user.regs = NULL;
1195 data->stack_user_size = 0;
1146} 1196}
1147 1197
1148extern void perf_output_sample(struct perf_output_handle *handle, 1198extern void perf_output_sample(struct perf_output_handle *handle,
@@ -1290,8 +1340,10 @@ static inline bool has_branch_stack(struct perf_event *event)
1290extern int perf_output_begin(struct perf_output_handle *handle, 1340extern int perf_output_begin(struct perf_output_handle *handle,
1291 struct perf_event *event, unsigned int size); 1341 struct perf_event *event, unsigned int size);
1292extern void perf_output_end(struct perf_output_handle *handle); 1342extern void perf_output_end(struct perf_output_handle *handle);
1293extern void perf_output_copy(struct perf_output_handle *handle, 1343extern unsigned int perf_output_copy(struct perf_output_handle *handle,
1294 const void *buf, unsigned int len); 1344 const void *buf, unsigned int len);
1345extern unsigned int perf_output_skip(struct perf_output_handle *handle,
1346 unsigned int len);
1295extern int perf_swevent_get_recursion_context(void); 1347extern int perf_swevent_get_recursion_context(void);
1296extern void perf_swevent_put_recursion_context(int rctx); 1348extern void perf_swevent_put_recursion_context(int rctx);
1297extern void perf_event_enable(struct perf_event *event); 1349extern void perf_event_enable(struct perf_event *event);
diff --git a/include/linux/perf_regs.h b/include/linux/perf_regs.h
new file mode 100644
index 000000000000..3c73d5fe18be
--- /dev/null
+++ b/include/linux/perf_regs.h
@@ -0,0 +1,25 @@
1#ifndef _LINUX_PERF_REGS_H
2#define _LINUX_PERF_REGS_H
3
4#ifdef CONFIG_HAVE_PERF_REGS
5#include <asm/perf_regs.h>
6u64 perf_reg_value(struct pt_regs *regs, int idx);
7int perf_reg_validate(u64 mask);
8u64 perf_reg_abi(struct task_struct *task);
9#else
10static inline u64 perf_reg_value(struct pt_regs *regs, int idx)
11{
12 return 0;
13}
14
15static inline int perf_reg_validate(u64 mask)
16{
17 return mask ? -ENOSYS : 0;
18}
19
20static inline u64 perf_reg_abi(struct task_struct *task)
21{
22 return PERF_SAMPLE_REGS_ABI_NONE;
23}
24#endif /* CONFIG_HAVE_PERF_REGS */
25#endif /* _LINUX_PERF_REGS_H */
diff --git a/include/linux/platform_data/clk-realview.h b/include/linux/platform_data/clk-realview.h
new file mode 100644
index 000000000000..2e426a7dbc51
--- /dev/null
+++ b/include/linux/platform_data/clk-realview.h
@@ -0,0 +1 @@
void realview_clk_init(void __iomem *sysbase, bool is_pb1176);
diff --git a/include/linux/platform_data/clk-ux500.h b/include/linux/platform_data/clk-ux500.h
new file mode 100644
index 000000000000..3af0da1f3be5
--- /dev/null
+++ b/include/linux/platform_data/clk-ux500.h
@@ -0,0 +1,17 @@
1/*
2 * Clock definitions for ux500 platforms
3 *
4 * Copyright (C) 2012 ST-Ericsson SA
5 * Author: Ulf Hansson <ulf.hansson@linaro.org>
6 *
7 * License terms: GNU General Public License (GPL) version 2
8 */
9
10#ifndef __CLK_UX500_H
11#define __CLK_UX500_H
12
13void u8500_clk_init(void);
14void u9540_clk_init(void);
15void u8540_clk_init(void);
16
17#endif /* __CLK_UX500_H */
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 115ead2b5155..7c968e4f929e 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -191,6 +191,21 @@ extern void rcu_idle_enter(void);
191extern void rcu_idle_exit(void); 191extern void rcu_idle_exit(void);
192extern void rcu_irq_enter(void); 192extern void rcu_irq_enter(void);
193extern void rcu_irq_exit(void); 193extern void rcu_irq_exit(void);
194
195#ifdef CONFIG_RCU_USER_QS
196extern void rcu_user_enter(void);
197extern void rcu_user_exit(void);
198extern void rcu_user_enter_after_irq(void);
199extern void rcu_user_exit_after_irq(void);
200extern void rcu_user_hooks_switch(struct task_struct *prev,
201 struct task_struct *next);
202#else
203static inline void rcu_user_enter(void) { }
204static inline void rcu_user_exit(void) { }
205static inline void rcu_user_enter_after_irq(void) { }
206static inline void rcu_user_exit_after_irq(void) { }
207#endif /* CONFIG_RCU_USER_QS */
208
194extern void exit_rcu(void); 209extern void exit_rcu(void);
195 210
196/** 211/**
@@ -210,14 +225,12 @@ extern void exit_rcu(void);
210 * to nest RCU_NONIDLE() wrappers, but the nesting level is currently 225 * to nest RCU_NONIDLE() wrappers, but the nesting level is currently
211 * quite limited. If deeper nesting is required, it will be necessary 226 * quite limited. If deeper nesting is required, it will be necessary
212 * to adjust DYNTICK_TASK_NESTING_VALUE accordingly. 227 * to adjust DYNTICK_TASK_NESTING_VALUE accordingly.
213 *
214 * This macro may be used from process-level code only.
215 */ 228 */
216#define RCU_NONIDLE(a) \ 229#define RCU_NONIDLE(a) \
217 do { \ 230 do { \
218 rcu_idle_exit(); \ 231 rcu_irq_enter(); \
219 do { a; } while (0); \ 232 do { a; } while (0); \
220 rcu_idle_enter(); \ 233 rcu_irq_exit(); \
221 } while (0) 234 } while (0)
222 235
223/* 236/*
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 7f7e00df3adf..e3bcc3f4dcb8 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -285,6 +285,7 @@ struct regmap_irq {
285 * @ack_base: Base ack address. If zero then the chip is clear on read. 285 * @ack_base: Base ack address. If zero then the chip is clear on read.
286 * @wake_base: Base address for wake enables. If zero unsupported. 286 * @wake_base: Base address for wake enables. If zero unsupported.
287 * @irq_reg_stride: Stride to use for chips where registers are not contiguous. 287 * @irq_reg_stride: Stride to use for chips where registers are not contiguous.
288 * @runtime_pm: Hold a runtime PM lock on the device when accessing it.
288 * 289 *
289 * @num_regs: Number of registers in each control bank. 290 * @num_regs: Number of registers in each control bank.
290 * @irqs: Descriptors for individual IRQs. Interrupt numbers are 291 * @irqs: Descriptors for individual IRQs. Interrupt numbers are
@@ -299,6 +300,8 @@ struct regmap_irq_chip {
299 unsigned int ack_base; 300 unsigned int ack_base;
300 unsigned int wake_base; 301 unsigned int wake_base;
301 unsigned int irq_reg_stride; 302 unsigned int irq_reg_stride;
303 unsigned int mask_invert;
304 bool runtime_pm;
302 305
303 int num_regs; 306 int num_regs;
304 307
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index da339fd8c755..c43cd3556b1f 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -177,6 +177,8 @@ int regulator_set_mode(struct regulator *regulator, unsigned int mode);
177unsigned int regulator_get_mode(struct regulator *regulator); 177unsigned int regulator_get_mode(struct regulator *regulator);
178int regulator_set_optimum_mode(struct regulator *regulator, int load_uA); 178int regulator_set_optimum_mode(struct regulator *regulator, int load_uA);
179 179
180int regulator_allow_bypass(struct regulator *regulator, bool allow);
181
180/* regulator notifier block */ 182/* regulator notifier block */
181int regulator_register_notifier(struct regulator *regulator, 183int regulator_register_notifier(struct regulator *regulator,
182 struct notifier_block *nb); 184 struct notifier_block *nb);
@@ -328,6 +330,12 @@ static inline int regulator_set_optimum_mode(struct regulator *regulator,
328 return REGULATOR_MODE_NORMAL; 330 return REGULATOR_MODE_NORMAL;
329} 331}
330 332
333static inline int regulator_allow_bypass(struct regulator *regulator,
334 bool allow)
335{
336 return 0;
337}
338
331static inline int regulator_register_notifier(struct regulator *regulator, 339static inline int regulator_register_notifier(struct regulator *regulator,
332 struct notifier_block *nb) 340 struct notifier_block *nb)
333{ 341{
@@ -352,4 +360,11 @@ static inline void regulator_set_drvdata(struct regulator *regulator,
352 360
353#endif 361#endif
354 362
363static inline int regulator_set_voltage_tol(struct regulator *regulator,
364 int new_uV, int tol_uV)
365{
366 return regulator_set_voltage(regulator,
367 new_uV - tol_uV, new_uV + tol_uV);
368}
369
355#endif 370#endif
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index bac4c871f3bd..7932a3bf21bd 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -32,6 +32,8 @@ enum regulator_status {
32 REGULATOR_STATUS_NORMAL, 32 REGULATOR_STATUS_NORMAL,
33 REGULATOR_STATUS_IDLE, 33 REGULATOR_STATUS_IDLE,
34 REGULATOR_STATUS_STANDBY, 34 REGULATOR_STATUS_STANDBY,
35 /* The regulator is enabled but not regulating */
36 REGULATOR_STATUS_BYPASS,
35 /* in case that any other status doesn't apply */ 37 /* in case that any other status doesn't apply */
36 REGULATOR_STATUS_UNDEFINED, 38 REGULATOR_STATUS_UNDEFINED,
37}; 39};
@@ -58,6 +60,7 @@ enum regulator_status {
58 * regulator_desc.n_voltages. Voltages may be reported in any order. 60 * regulator_desc.n_voltages. Voltages may be reported in any order.
59 * 61 *
60 * @set_current_limit: Configure a limit for a current-limited regulator. 62 * @set_current_limit: Configure a limit for a current-limited regulator.
63 * The driver should select the current closest to max_uA.
61 * @get_current_limit: Get the configured limit for a current-limited regulator. 64 * @get_current_limit: Get the configured limit for a current-limited regulator.
62 * 65 *
63 * @set_mode: Set the configured operating mode for the regulator. 66 * @set_mode: Set the configured operating mode for the regulator.
@@ -67,6 +70,9 @@ enum regulator_status {
67 * @get_optimum_mode: Get the most efficient operating mode for the regulator 70 * @get_optimum_mode: Get the most efficient operating mode for the regulator
68 * when running with the specified parameters. 71 * when running with the specified parameters.
69 * 72 *
73 * @set_bypass: Set the regulator in bypass mode.
74 * @get_bypass: Get the regulator bypass mode state.
75 *
70 * @enable_time: Time taken for the regulator voltage output voltage to 76 * @enable_time: Time taken for the regulator voltage output voltage to
71 * stabilise after being enabled, in microseconds. 77 * stabilise after being enabled, in microseconds.
72 * @set_ramp_delay: Set the ramp delay for the regulator. The driver should 78 * @set_ramp_delay: Set the ramp delay for the regulator. The driver should
@@ -133,6 +139,10 @@ struct regulator_ops {
133 unsigned int (*get_optimum_mode) (struct regulator_dev *, int input_uV, 139 unsigned int (*get_optimum_mode) (struct regulator_dev *, int input_uV,
134 int output_uV, int load_uA); 140 int output_uV, int load_uA);
135 141
142 /* control and report on bypass mode */
143 int (*set_bypass)(struct regulator_dev *dev, bool enable);
144 int (*get_bypass)(struct regulator_dev *dev, bool *enable);
145
136 /* the operations below are for configuration of regulator state when 146 /* the operations below are for configuration of regulator state when
137 * its parent PMIC enters a global STANDBY/HIBERNATE state */ 147 * its parent PMIC enters a global STANDBY/HIBERNATE state */
138 148
@@ -205,6 +215,8 @@ struct regulator_desc {
205 unsigned int vsel_mask; 215 unsigned int vsel_mask;
206 unsigned int enable_reg; 216 unsigned int enable_reg;
207 unsigned int enable_mask; 217 unsigned int enable_mask;
218 unsigned int bypass_reg;
219 unsigned int bypass_mask;
208 220
209 unsigned int enable_time; 221 unsigned int enable_time;
210}; 222};
@@ -221,7 +233,8 @@ struct regulator_desc {
221 * @driver_data: private regulator data 233 * @driver_data: private regulator data
222 * @of_node: OpenFirmware node to parse for device tree bindings (may be 234 * @of_node: OpenFirmware node to parse for device tree bindings (may be
223 * NULL). 235 * NULL).
224 * @regmap: regmap to use for core regmap helpers 236 * @regmap: regmap to use for core regmap helpers if dev_get_regulator() is
237 * insufficient.
225 * @ena_gpio: GPIO controlling regulator enable. 238 * @ena_gpio: GPIO controlling regulator enable.
226 * @ena_gpio_invert: Sense for GPIO enable control. 239 * @ena_gpio_invert: Sense for GPIO enable control.
227 * @ena_gpio_flags: Flags to use when calling gpio_request_one() 240 * @ena_gpio_flags: Flags to use when calling gpio_request_one()
@@ -253,6 +266,7 @@ struct regulator_dev {
253 int exclusive; 266 int exclusive;
254 u32 use_count; 267 u32 use_count;
255 u32 open_count; 268 u32 open_count;
269 u32 bypass_count;
256 270
257 /* lists we belong to */ 271 /* lists we belong to */
258 struct list_head list; /* list of all regulators */ 272 struct list_head list; /* list of all regulators */
@@ -310,6 +324,8 @@ int regulator_disable_regmap(struct regulator_dev *rdev);
310int regulator_set_voltage_time_sel(struct regulator_dev *rdev, 324int regulator_set_voltage_time_sel(struct regulator_dev *rdev,
311 unsigned int old_selector, 325 unsigned int old_selector,
312 unsigned int new_selector); 326 unsigned int new_selector);
327int regulator_set_bypass_regmap(struct regulator_dev *rdev, bool enable);
328int regulator_get_bypass_regmap(struct regulator_dev *rdev, bool *enable);
313 329
314void *regulator_get_init_drvdata(struct regulator_init_data *reg_init_data); 330void *regulator_get_init_drvdata(struct regulator_init_data *reg_init_data);
315 331
diff --git a/include/linux/regulator/fan53555.h b/include/linux/regulator/fan53555.h
new file mode 100644
index 000000000000..5c45c85d52ca
--- /dev/null
+++ b/include/linux/regulator/fan53555.h
@@ -0,0 +1,60 @@
1/*
2 * fan53555.h - Fairchild Regulator FAN53555 Driver
3 *
4 * Copyright (C) 2012 Marvell Technology Ltd.
5 * Yunfan Zhang <yfzhang@marvell.com>
6 *
7 * This package is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 */
12
13#ifndef __FAN53555_H__
14
15/* VSEL ID */
16enum {
17 FAN53555_VSEL_ID_0 = 0,
18 FAN53555_VSEL_ID_1,
19};
20
21/* Transition slew rate limiting from a low to high voltage.
22 * -----------------------
23 * Bin |Slew Rate(mV/uS)
24 * ------|----------------
25 * 000 | 64.00
26 * ------|----------------
27 * 001 | 32.00
28 * ------|----------------
29 * 010 | 16.00
30 * ------|----------------
31 * 011 | 8.00
32 * ------|----------------
33 * 100 | 4.00
34 * ------|----------------
35 * 101 | 2.00
36 * ------|----------------
37 * 110 | 1.00
38 * ------|----------------
39 * 111 | 0.50
40 * -----------------------
41 */
42enum {
43 FAN53555_SLEW_RATE_64MV = 0,
44 FAN53555_SLEW_RATE_32MV,
45 FAN53555_SLEW_RATE_16MV,
46 FAN53555_SLEW_RATE_8MV,
47 FAN53555_SLEW_RATE_4MV,
48 FAN53555_SLEW_RATE_2MV,
49 FAN53555_SLEW_RATE_1MV,
50 FAN53555_SLEW_RATE_0_5MV,
51};
52
53struct fan53555_platform_data {
54 struct regulator_init_data *regulator;
55 unsigned int slew_rate;
56 /* Sleep VSEL ID */
57 unsigned int sleep_vsel_id;
58};
59
60#endif /* __FAN53555_H__ */
diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h
index 40dd0a394cfa..36adbc82de6a 100644
--- a/include/linux/regulator/machine.h
+++ b/include/linux/regulator/machine.h
@@ -32,6 +32,7 @@ struct regulator;
32 * board/machine. 32 * board/machine.
33 * STATUS: Regulator can be enabled and disabled. 33 * STATUS: Regulator can be enabled and disabled.
34 * DRMS: Dynamic Regulator Mode Switching is enabled for this regulator. 34 * DRMS: Dynamic Regulator Mode Switching is enabled for this regulator.
35 * BYPASS: Regulator can be put into bypass mode
35 */ 36 */
36 37
37#define REGULATOR_CHANGE_VOLTAGE 0x1 38#define REGULATOR_CHANGE_VOLTAGE 0x1
@@ -39,6 +40,7 @@ struct regulator;
39#define REGULATOR_CHANGE_MODE 0x4 40#define REGULATOR_CHANGE_MODE 0x4
40#define REGULATOR_CHANGE_STATUS 0x8 41#define REGULATOR_CHANGE_STATUS 0x8
41#define REGULATOR_CHANGE_DRMS 0x10 42#define REGULATOR_CHANGE_DRMS 0x10
43#define REGULATOR_CHANGE_BYPASS 0x20
42 44
43/** 45/**
44 * struct regulator_state - regulator state during low power system states 46 * struct regulator_state - regulator state during low power system states
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 23bddac4bad8..765dffbb085e 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -273,11 +273,11 @@ extern void init_idle_bootup_task(struct task_struct *idle);
273extern int runqueue_is_locked(int cpu); 273extern int runqueue_is_locked(int cpu);
274 274
275#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) 275#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ)
276extern void select_nohz_load_balancer(int stop_tick); 276extern void nohz_balance_enter_idle(int cpu);
277extern void set_cpu_sd_state_idle(void); 277extern void set_cpu_sd_state_idle(void);
278extern int get_nohz_timer_target(void); 278extern int get_nohz_timer_target(void);
279#else 279#else
280static inline void select_nohz_load_balancer(int stop_tick) { } 280static inline void nohz_balance_enter_idle(int cpu) { }
281static inline void set_cpu_sd_state_idle(void) { } 281static inline void set_cpu_sd_state_idle(void) { }
282#endif 282#endif
283 283
@@ -446,6 +446,9 @@ extern int get_dumpable(struct mm_struct *mm);
446#define MMF_VM_HUGEPAGE 17 /* set when VM_HUGEPAGE is set on vma */ 446#define MMF_VM_HUGEPAGE 17 /* set when VM_HUGEPAGE is set on vma */
447#define MMF_EXE_FILE_CHANGED 18 /* see prctl_set_mm_exe_file() */ 447#define MMF_EXE_FILE_CHANGED 18 /* see prctl_set_mm_exe_file() */
448 448
449#define MMF_HAS_UPROBES 19 /* has uprobes */
450#define MMF_RECALC_UPROBES 20 /* MMF_HAS_UPROBES can be wrong */
451
449#define MMF_INIT_MASK (MMF_DUMPABLE_MASK | MMF_DUMP_FILTER_MASK) 452#define MMF_INIT_MASK (MMF_DUMPABLE_MASK | MMF_DUMP_FILTER_MASK)
450 453
451struct sighand_struct { 454struct sighand_struct {
@@ -678,11 +681,6 @@ struct signal_struct {
678 * (notably. ptrace) */ 681 * (notably. ptrace) */
679}; 682};
680 683
681/* Context switch must be unlocked if interrupts are to be enabled */
682#ifdef __ARCH_WANT_INTERRUPTS_ON_CTXSW
683# define __ARCH_WANT_UNLOCKED_CTXSW
684#endif
685
686/* 684/*
687 * Bits in flags field of signal_struct. 685 * Bits in flags field of signal_struct.
688 */ 686 */
@@ -860,7 +858,6 @@ enum cpu_idle_type {
860#define SD_BALANCE_FORK 0x0008 /* Balance on fork, clone */ 858#define SD_BALANCE_FORK 0x0008 /* Balance on fork, clone */
861#define SD_BALANCE_WAKE 0x0010 /* Balance on wakeup */ 859#define SD_BALANCE_WAKE 0x0010 /* Balance on wakeup */
862#define SD_WAKE_AFFINE 0x0020 /* Wake task to waking CPU */ 860#define SD_WAKE_AFFINE 0x0020 /* Wake task to waking CPU */
863#define SD_PREFER_LOCAL 0x0040 /* Prefer to keep tasks local to this domain */
864#define SD_SHARE_CPUPOWER 0x0080 /* Domain members share cpu power */ 861#define SD_SHARE_CPUPOWER 0x0080 /* Domain members share cpu power */
865#define SD_SHARE_PKG_RESOURCES 0x0200 /* Domain members share cpu pkg resources */ 862#define SD_SHARE_PKG_RESOURCES 0x0200 /* Domain members share cpu pkg resources */
866#define SD_SERIALIZE 0x0400 /* Only a single load balancing instance */ 863#define SD_SERIALIZE 0x0400 /* Only a single load balancing instance */
@@ -1885,6 +1882,14 @@ static inline void rcu_copy_process(struct task_struct *p)
1885 1882
1886#endif 1883#endif
1887 1884
1885static inline void rcu_switch(struct task_struct *prev,
1886 struct task_struct *next)
1887{
1888#ifdef CONFIG_RCU_USER_QS
1889 rcu_user_hooks_switch(prev, next);
1890#endif
1891}
1892
1888static inline void tsk_restore_flags(struct task_struct *task, 1893static inline void tsk_restore_flags(struct task_struct *task,
1889 unsigned long orig_flags, unsigned long flags) 1894 unsigned long orig_flags, unsigned long flags)
1890{ 1895{
diff --git a/include/linux/screen_info.h b/include/linux/screen_info.h
index 899fbb487c94..fb3c5a8fef3d 100644
--- a/include/linux/screen_info.h
+++ b/include/linux/screen_info.h
@@ -68,6 +68,8 @@ struct screen_info {
68 68
69#define VIDEO_FLAGS_NOCURSOR (1 << 0) /* The video mode has no cursor set */ 69#define VIDEO_FLAGS_NOCURSOR (1 << 0) /* The video mode has no cursor set */
70 70
71#define VIDEO_CAPABILITY_SKIP_QUIRKS (1 << 0)
72
71#ifdef __KERNEL__ 73#ifdef __KERNEL__
72extern struct screen_info screen_info; 74extern struct screen_info screen_info;
73 75
diff --git a/include/linux/security.h b/include/linux/security.h
index 3dea6a9d568f..d143b8e01954 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -118,6 +118,7 @@ void reset_security_ops(void);
118extern unsigned long mmap_min_addr; 118extern unsigned long mmap_min_addr;
119extern unsigned long dac_mmap_min_addr; 119extern unsigned long dac_mmap_min_addr;
120#else 120#else
121#define mmap_min_addr 0UL
121#define dac_mmap_min_addr 0UL 122#define dac_mmap_min_addr 0UL
122#endif 123#endif
123 124
diff --git a/include/linux/smpboot.h b/include/linux/smpboot.h
new file mode 100644
index 000000000000..e0106d8581d3
--- /dev/null
+++ b/include/linux/smpboot.h
@@ -0,0 +1,43 @@
1#ifndef _LINUX_SMPBOOT_H
2#define _LINUX_SMPBOOT_H
3
4#include <linux/types.h>
5
6struct task_struct;
7/* Cookie handed to the thread_fn*/
8struct smpboot_thread_data;
9
10/**
11 * struct smp_hotplug_thread - CPU hotplug related thread descriptor
12 * @store: Pointer to per cpu storage for the task pointers
13 * @list: List head for core management
14 * @thread_should_run: Check whether the thread should run or not. Called with
15 * preemption disabled.
16 * @thread_fn: The associated thread function
17 * @setup: Optional setup function, called when the thread gets
18 * operational the first time
19 * @cleanup: Optional cleanup function, called when the thread
20 * should stop (module exit)
21 * @park: Optional park function, called when the thread is
22 * parked (cpu offline)
23 * @unpark: Optional unpark function, called when the thread is
24 * unparked (cpu online)
25 * @thread_comm: The base name of the thread
26 */
27struct smp_hotplug_thread {
28 struct task_struct __percpu **store;
29 struct list_head list;
30 int (*thread_should_run)(unsigned int cpu);
31 void (*thread_fn)(unsigned int cpu);
32 void (*setup)(unsigned int cpu);
33 void (*cleanup)(unsigned int cpu, bool online);
34 void (*park)(unsigned int cpu);
35 void (*unpark)(unsigned int cpu);
36 const char *thread_comm;
37};
38
39int smpboot_register_percpu_thread(struct smp_hotplug_thread *plug_thread);
40void smpboot_unregister_percpu_thread(struct smp_hotplug_thread *plug_thread);
41int smpboot_thread_schedule(void);
42
43#endif
diff --git a/include/linux/task_work.h b/include/linux/task_work.h
index fb46b03b1852..ca5a1cf27dae 100644
--- a/include/linux/task_work.h
+++ b/include/linux/task_work.h
@@ -18,8 +18,7 @@ void task_work_run(void);
18 18
19static inline void exit_task_work(struct task_struct *task) 19static inline void exit_task_work(struct task_struct *task)
20{ 20{
21 if (unlikely(task->task_works)) 21 task_work_run();
22 task_work_run();
23} 22}
24 23
25#endif /* _LINUX_TASK_WORK_H */ 24#endif /* _LINUX_TASK_WORK_H */
diff --git a/include/linux/ti_wilink_st.h b/include/linux/ti_wilink_st.h
index 3ca0269dd0b5..932b76392248 100644
--- a/include/linux/ti_wilink_st.h
+++ b/include/linux/ti_wilink_st.h
@@ -281,9 +281,10 @@ struct kim_data_s {
281long st_kim_start(void *); 281long st_kim_start(void *);
282long st_kim_stop(void *); 282long st_kim_stop(void *);
283 283
284void st_kim_recv(void *, const unsigned char *, long count);
285void st_kim_complete(void *); 284void st_kim_complete(void *);
286void kim_st_list_protocols(struct st_data_s *, void *); 285void kim_st_list_protocols(struct st_data_s *, void *);
286void st_kim_recv(void *, const unsigned char *, long);
287
287 288
288/* 289/*
289 * BTS headers 290 * BTS headers
diff --git a/include/linux/timer.h b/include/linux/timer.h
index 6abd9138beda..8c5a197e1587 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -49,147 +49,112 @@ extern struct tvec_base boot_tvec_bases;
49#endif 49#endif
50 50
51/* 51/*
52 * Note that all tvec_bases are 2 byte aligned and lower bit of 52 * Note that all tvec_bases are at least 4 byte aligned and lower two bits
53 * base in timer_list is guaranteed to be zero. Use the LSB to 53 * of base in timer_list is guaranteed to be zero. Use them for flags.
54 * indicate whether the timer is deferrable.
55 * 54 *
56 * A deferrable timer will work normally when the system is busy, but 55 * A deferrable timer will work normally when the system is busy, but
57 * will not cause a CPU to come out of idle just to service it; instead, 56 * will not cause a CPU to come out of idle just to service it; instead,
58 * the timer will be serviced when the CPU eventually wakes up with a 57 * the timer will be serviced when the CPU eventually wakes up with a
59 * subsequent non-deferrable timer. 58 * subsequent non-deferrable timer.
59 *
60 * An irqsafe timer is executed with IRQ disabled and it's safe to wait for
61 * the completion of the running instance from IRQ handlers, for example,
62 * by calling del_timer_sync().
63 *
64 * Note: The irq disabled callback execution is a special case for
65 * workqueue locking issues. It's not meant for executing random crap
66 * with interrupts disabled. Abuse is monitored!
60 */ 67 */
61#define TBASE_DEFERRABLE_FLAG (0x1) 68#define TIMER_DEFERRABLE 0x1LU
69#define TIMER_IRQSAFE 0x2LU
62 70
63#define TIMER_INITIALIZER(_function, _expires, _data) { \ 71#define TIMER_FLAG_MASK 0x3LU
72
73#define __TIMER_INITIALIZER(_function, _expires, _data, _flags) { \
64 .entry = { .prev = TIMER_ENTRY_STATIC }, \ 74 .entry = { .prev = TIMER_ENTRY_STATIC }, \
65 .function = (_function), \ 75 .function = (_function), \
66 .expires = (_expires), \ 76 .expires = (_expires), \
67 .data = (_data), \ 77 .data = (_data), \
68 .base = &boot_tvec_bases, \ 78 .base = (void *)((unsigned long)&boot_tvec_bases + (_flags)), \
69 .slack = -1, \ 79 .slack = -1, \
70 __TIMER_LOCKDEP_MAP_INITIALIZER( \ 80 __TIMER_LOCKDEP_MAP_INITIALIZER( \
71 __FILE__ ":" __stringify(__LINE__)) \ 81 __FILE__ ":" __stringify(__LINE__)) \
72 } 82 }
73 83
74#define TBASE_MAKE_DEFERRED(ptr) ((struct tvec_base *) \ 84#define TIMER_INITIALIZER(_function, _expires, _data) \
75 ((unsigned char *)(ptr) + TBASE_DEFERRABLE_FLAG)) 85 __TIMER_INITIALIZER((_function), (_expires), (_data), 0)
76 86
77#define TIMER_DEFERRED_INITIALIZER(_function, _expires, _data) {\ 87#define TIMER_DEFERRED_INITIALIZER(_function, _expires, _data) \
78 .entry = { .prev = TIMER_ENTRY_STATIC }, \ 88 __TIMER_INITIALIZER((_function), (_expires), (_data), TIMER_DEFERRABLE)
79 .function = (_function), \
80 .expires = (_expires), \
81 .data = (_data), \
82 .base = TBASE_MAKE_DEFERRED(&boot_tvec_bases), \
83 __TIMER_LOCKDEP_MAP_INITIALIZER( \
84 __FILE__ ":" __stringify(__LINE__)) \
85 }
86 89
87#define DEFINE_TIMER(_name, _function, _expires, _data) \ 90#define DEFINE_TIMER(_name, _function, _expires, _data) \
88 struct timer_list _name = \ 91 struct timer_list _name = \
89 TIMER_INITIALIZER(_function, _expires, _data) 92 TIMER_INITIALIZER(_function, _expires, _data)
90 93
91void init_timer_key(struct timer_list *timer, 94void init_timer_key(struct timer_list *timer, unsigned int flags,
92 const char *name, 95 const char *name, struct lock_class_key *key);
93 struct lock_class_key *key); 96
94void init_timer_deferrable_key(struct timer_list *timer, 97#ifdef CONFIG_DEBUG_OBJECTS_TIMERS
95 const char *name, 98extern void init_timer_on_stack_key(struct timer_list *timer,
96 struct lock_class_key *key); 99 unsigned int flags, const char *name,
100 struct lock_class_key *key);
101extern void destroy_timer_on_stack(struct timer_list *timer);
102#else
103static inline void destroy_timer_on_stack(struct timer_list *timer) { }
104static inline void init_timer_on_stack_key(struct timer_list *timer,
105 unsigned int flags, const char *name,
106 struct lock_class_key *key)
107{
108 init_timer_key(timer, flags, name, key);
109}
110#endif
97 111
98#ifdef CONFIG_LOCKDEP 112#ifdef CONFIG_LOCKDEP
99#define init_timer(timer) \ 113#define __init_timer(_timer, _flags) \
100 do { \ 114 do { \
101 static struct lock_class_key __key; \ 115 static struct lock_class_key __key; \
102 init_timer_key((timer), #timer, &__key); \ 116 init_timer_key((_timer), (_flags), #_timer, &__key); \
103 } while (0) 117 } while (0)
104 118
105#define init_timer_deferrable(timer) \ 119#define __init_timer_on_stack(_timer, _flags) \
106 do { \ 120 do { \
107 static struct lock_class_key __key; \ 121 static struct lock_class_key __key; \
108 init_timer_deferrable_key((timer), #timer, &__key); \ 122 init_timer_on_stack_key((_timer), (_flags), #_timer, &__key); \
109 } while (0) 123 } while (0)
124#else
125#define __init_timer(_timer, _flags) \
126 init_timer_key((_timer), (_flags), NULL, NULL)
127#define __init_timer_on_stack(_timer, _flags) \
128 init_timer_on_stack_key((_timer), (_flags), NULL, NULL)
129#endif
110 130
131#define init_timer(timer) \
132 __init_timer((timer), 0)
133#define init_timer_deferrable(timer) \
134 __init_timer((timer), TIMER_DEFERRABLE)
111#define init_timer_on_stack(timer) \ 135#define init_timer_on_stack(timer) \
136 __init_timer_on_stack((timer), 0)
137
138#define __setup_timer(_timer, _fn, _data, _flags) \
112 do { \ 139 do { \
113 static struct lock_class_key __key; \ 140 __init_timer((_timer), (_flags)); \
114 init_timer_on_stack_key((timer), #timer, &__key); \ 141 (_timer)->function = (_fn); \
142 (_timer)->data = (_data); \
115 } while (0) 143 } while (0)
116 144
117#define setup_timer(timer, fn, data) \ 145#define __setup_timer_on_stack(_timer, _fn, _data, _flags) \
118 do { \ 146 do { \
119 static struct lock_class_key __key; \ 147 __init_timer_on_stack((_timer), (_flags)); \
120 setup_timer_key((timer), #timer, &__key, (fn), (data));\ 148 (_timer)->function = (_fn); \
149 (_timer)->data = (_data); \
121 } while (0) 150 } while (0)
122 151
152#define setup_timer(timer, fn, data) \
153 __setup_timer((timer), (fn), (data), 0)
123#define setup_timer_on_stack(timer, fn, data) \ 154#define setup_timer_on_stack(timer, fn, data) \
124 do { \ 155 __setup_timer_on_stack((timer), (fn), (data), 0)
125 static struct lock_class_key __key; \
126 setup_timer_on_stack_key((timer), #timer, &__key, \
127 (fn), (data)); \
128 } while (0)
129#define setup_deferrable_timer_on_stack(timer, fn, data) \ 156#define setup_deferrable_timer_on_stack(timer, fn, data) \
130 do { \ 157 __setup_timer_on_stack((timer), (fn), (data), TIMER_DEFERRABLE)
131 static struct lock_class_key __key; \
132 setup_deferrable_timer_on_stack_key((timer), #timer, \
133 &__key, (fn), \
134 (data)); \
135 } while (0)
136#else
137#define init_timer(timer)\
138 init_timer_key((timer), NULL, NULL)
139#define init_timer_deferrable(timer)\
140 init_timer_deferrable_key((timer), NULL, NULL)
141#define init_timer_on_stack(timer)\
142 init_timer_on_stack_key((timer), NULL, NULL)
143#define setup_timer(timer, fn, data)\
144 setup_timer_key((timer), NULL, NULL, (fn), (data))
145#define setup_timer_on_stack(timer, fn, data)\
146 setup_timer_on_stack_key((timer), NULL, NULL, (fn), (data))
147#define setup_deferrable_timer_on_stack(timer, fn, data)\
148 setup_deferrable_timer_on_stack_key((timer), NULL, NULL, (fn), (data))
149#endif
150
151#ifdef CONFIG_DEBUG_OBJECTS_TIMERS
152extern void init_timer_on_stack_key(struct timer_list *timer,
153 const char *name,
154 struct lock_class_key *key);
155extern void destroy_timer_on_stack(struct timer_list *timer);
156#else
157static inline void destroy_timer_on_stack(struct timer_list *timer) { }
158static inline void init_timer_on_stack_key(struct timer_list *timer,
159 const char *name,
160 struct lock_class_key *key)
161{
162 init_timer_key(timer, name, key);
163}
164#endif
165
166static inline void setup_timer_key(struct timer_list * timer,
167 const char *name,
168 struct lock_class_key *key,
169 void (*function)(unsigned long),
170 unsigned long data)
171{
172 timer->function = function;
173 timer->data = data;
174 init_timer_key(timer, name, key);
175}
176
177static inline void setup_timer_on_stack_key(struct timer_list *timer,
178 const char *name,
179 struct lock_class_key *key,
180 void (*function)(unsigned long),
181 unsigned long data)
182{
183 timer->function = function;
184 timer->data = data;
185 init_timer_on_stack_key(timer, name, key);
186}
187
188extern void setup_deferrable_timer_on_stack_key(struct timer_list *timer,
189 const char *name,
190 struct lock_class_key *key,
191 void (*function)(unsigned long),
192 unsigned long data);
193 158
194/** 159/**
195 * timer_pending - is a timer pending? 160 * timer_pending - is a timer pending?
diff --git a/include/linux/topology.h b/include/linux/topology.h
index fec12d667211..d3cf0d6e7712 100644
--- a/include/linux/topology.h
+++ b/include/linux/topology.h
@@ -129,7 +129,6 @@ int arch_update_cpu_topology(void);
129 | 1*SD_BALANCE_FORK \ 129 | 1*SD_BALANCE_FORK \
130 | 0*SD_BALANCE_WAKE \ 130 | 0*SD_BALANCE_WAKE \
131 | 1*SD_WAKE_AFFINE \ 131 | 1*SD_WAKE_AFFINE \
132 | 0*SD_PREFER_LOCAL \
133 | 0*SD_SHARE_CPUPOWER \ 132 | 0*SD_SHARE_CPUPOWER \
134 | 1*SD_SHARE_PKG_RESOURCES \ 133 | 1*SD_SHARE_PKG_RESOURCES \
135 | 0*SD_SERIALIZE \ 134 | 0*SD_SERIALIZE \
@@ -160,7 +159,6 @@ int arch_update_cpu_topology(void);
160 | 1*SD_BALANCE_FORK \ 159 | 1*SD_BALANCE_FORK \
161 | 0*SD_BALANCE_WAKE \ 160 | 0*SD_BALANCE_WAKE \
162 | 1*SD_WAKE_AFFINE \ 161 | 1*SD_WAKE_AFFINE \
163 | 0*SD_PREFER_LOCAL \
164 | 0*SD_SHARE_CPUPOWER \ 162 | 0*SD_SHARE_CPUPOWER \
165 | 0*SD_SHARE_PKG_RESOURCES \ 163 | 0*SD_SHARE_PKG_RESOURCES \
166 | 0*SD_SERIALIZE \ 164 | 0*SD_SERIALIZE \
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h
index 802de56c41e8..2f322c38bd4d 100644
--- a/include/linux/tracepoint.h
+++ b/include/linux/tracepoint.h
@@ -136,6 +136,22 @@ static inline void tracepoint_synchronize_unregister(void)
136 postrcu; \ 136 postrcu; \
137 } while (0) 137 } while (0)
138 138
139#ifndef MODULE
140#define __DECLARE_TRACE_RCU(name, proto, args, cond, data_proto, data_args) \
141 static inline void trace_##name##_rcuidle(proto) \
142 { \
143 if (static_key_false(&__tracepoint_##name.key)) \
144 __DO_TRACE(&__tracepoint_##name, \
145 TP_PROTO(data_proto), \
146 TP_ARGS(data_args), \
147 TP_CONDITION(cond), \
148 rcu_idle_exit(), \
149 rcu_idle_enter()); \
150 }
151#else
152#define __DECLARE_TRACE_RCU(name, proto, args, cond, data_proto, data_args)
153#endif
154
139/* 155/*
140 * Make sure the alignment of the structure in the __tracepoints section will 156 * Make sure the alignment of the structure in the __tracepoints section will
141 * not add unwanted padding between the beginning of the section and the 157 * not add unwanted padding between the beginning of the section and the
@@ -151,16 +167,8 @@ static inline void tracepoint_synchronize_unregister(void)
151 TP_ARGS(data_args), \ 167 TP_ARGS(data_args), \
152 TP_CONDITION(cond),,); \ 168 TP_CONDITION(cond),,); \
153 } \ 169 } \
154 static inline void trace_##name##_rcuidle(proto) \ 170 __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args), \
155 { \ 171 PARAMS(cond), PARAMS(data_proto), PARAMS(data_args)) \
156 if (static_key_false(&__tracepoint_##name.key)) \
157 __DO_TRACE(&__tracepoint_##name, \
158 TP_PROTO(data_proto), \
159 TP_ARGS(data_args), \
160 TP_CONDITION(cond), \
161 rcu_idle_exit(), \
162 rcu_idle_enter()); \
163 } \
164 static inline int \ 172 static inline int \
165 register_trace_##name(void (*probe)(data_proto), void *data) \ 173 register_trace_##name(void (*probe)(data_proto), void *data) \
166 { \ 174 { \
diff --git a/include/linux/uprobes.h b/include/linux/uprobes.h
index efe4b3308c74..e6f0331e3d45 100644
--- a/include/linux/uprobes.h
+++ b/include/linux/uprobes.h
@@ -99,25 +99,27 @@ struct xol_area {
99 99
100struct uprobes_state { 100struct uprobes_state {
101 struct xol_area *xol_area; 101 struct xol_area *xol_area;
102 atomic_t count;
103}; 102};
103
104extern int __weak set_swbp(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); 104extern int __weak set_swbp(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr);
105extern int __weak set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr, bool verify); 105extern int __weak set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr);
106extern bool __weak is_swbp_insn(uprobe_opcode_t *insn); 106extern bool __weak is_swbp_insn(uprobe_opcode_t *insn);
107extern int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *uc); 107extern int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *uc);
108extern void uprobe_unregister(struct inode *inode, loff_t offset, struct uprobe_consumer *uc); 108extern void uprobe_unregister(struct inode *inode, loff_t offset, struct uprobe_consumer *uc);
109extern int uprobe_mmap(struct vm_area_struct *vma); 109extern int uprobe_mmap(struct vm_area_struct *vma);
110extern void uprobe_munmap(struct vm_area_struct *vma, unsigned long start, unsigned long end); 110extern void uprobe_munmap(struct vm_area_struct *vma, unsigned long start, unsigned long end);
111extern void uprobe_dup_mmap(struct mm_struct *oldmm, struct mm_struct *newmm);
111extern void uprobe_free_utask(struct task_struct *t); 112extern void uprobe_free_utask(struct task_struct *t);
112extern void uprobe_copy_process(struct task_struct *t); 113extern void uprobe_copy_process(struct task_struct *t);
113extern unsigned long __weak uprobe_get_swbp_addr(struct pt_regs *regs); 114extern unsigned long __weak uprobe_get_swbp_addr(struct pt_regs *regs);
115extern void __weak arch_uprobe_enable_step(struct arch_uprobe *arch);
116extern void __weak arch_uprobe_disable_step(struct arch_uprobe *arch);
114extern int uprobe_post_sstep_notifier(struct pt_regs *regs); 117extern int uprobe_post_sstep_notifier(struct pt_regs *regs);
115extern int uprobe_pre_sstep_notifier(struct pt_regs *regs); 118extern int uprobe_pre_sstep_notifier(struct pt_regs *regs);
116extern void uprobe_notify_resume(struct pt_regs *regs); 119extern void uprobe_notify_resume(struct pt_regs *regs);
117extern bool uprobe_deny_signal(void); 120extern bool uprobe_deny_signal(void);
118extern bool __weak arch_uprobe_skip_sstep(struct arch_uprobe *aup, struct pt_regs *regs); 121extern bool __weak arch_uprobe_skip_sstep(struct arch_uprobe *aup, struct pt_regs *regs);
119extern void uprobe_clear_state(struct mm_struct *mm); 122extern void uprobe_clear_state(struct mm_struct *mm);
120extern void uprobe_reset_state(struct mm_struct *mm);
121#else /* !CONFIG_UPROBES */ 123#else /* !CONFIG_UPROBES */
122struct uprobes_state { 124struct uprobes_state {
123}; 125};
@@ -138,6 +140,10 @@ static inline void
138uprobe_munmap(struct vm_area_struct *vma, unsigned long start, unsigned long end) 140uprobe_munmap(struct vm_area_struct *vma, unsigned long start, unsigned long end)
139{ 141{
140} 142}
143static inline void
144uprobe_dup_mmap(struct mm_struct *oldmm, struct mm_struct *newmm)
145{
146}
141static inline void uprobe_notify_resume(struct pt_regs *regs) 147static inline void uprobe_notify_resume(struct pt_regs *regs)
142{ 148{
143} 149}
@@ -158,8 +164,5 @@ static inline void uprobe_copy_process(struct task_struct *t)
158static inline void uprobe_clear_state(struct mm_struct *mm) 164static inline void uprobe_clear_state(struct mm_struct *mm)
159{ 165{
160} 166}
161static inline void uprobe_reset_state(struct mm_struct *mm)
162{
163}
164#endif /* !CONFIG_UPROBES */ 167#endif /* !CONFIG_UPROBES */
165#endif /* _LINUX_UPROBES_H */ 168#endif /* _LINUX_UPROBES_H */
diff --git a/include/linux/w1-gpio.h b/include/linux/w1-gpio.h
index 3adeff82212f..065e3ae79ab0 100644
--- a/include/linux/w1-gpio.h
+++ b/include/linux/w1-gpio.h
@@ -19,6 +19,7 @@ struct w1_gpio_platform_data {
19 unsigned int pin; 19 unsigned int pin;
20 unsigned int is_open_drain:1; 20 unsigned int is_open_drain:1;
21 void (*enable_external_pullup)(int enable); 21 void (*enable_external_pullup)(int enable);
22 unsigned int ext_pullup_enable_pin;
22}; 23};
23 24
24#endif /* _LINUX_W1_GPIO_H */ 25#endif /* _LINUX_W1_GPIO_H */
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h
index 22e61fdf75a2..28e493b5b94c 100644
--- a/include/linux/xfrm.h
+++ b/include/linux/xfrm.h
@@ -84,6 +84,8 @@ struct xfrm_replay_state {
84 __u32 bitmap; 84 __u32 bitmap;
85}; 85};
86 86
87#define XFRMA_REPLAY_ESN_MAX 4096
88
87struct xfrm_replay_state_esn { 89struct xfrm_replay_state_esn {
88 unsigned int bmp_len; 90 unsigned int bmp_len;
89 __u32 oseq; 91 __u32 oseq;