aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-03-01 03:28:53 -0500
committerIngo Molnar <mingo@elte.hu>2010-03-01 03:28:58 -0500
commite2f4699ac15fe36de1288505bc6e6e5a8603ab1b (patch)
tree8078d3ff21eaa0a0ed6e446ac94f3681e831cad1 /include
parent1883c79a57a5fe25309007590cccb1b2782c41b2 (diff)
parent30ff056c42c665b9ea535d8515890857ae382540 (diff)
Merge branch 'linus' into core/rcu
Merge reason: Backmerge latest upstream to queue up dependent fix in the scheduler. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acpi_bus.h6
-rw-r--r--include/acpi/acpi_drivers.h1
-rw-r--r--include/acpi/acpixf.h6
-rw-r--r--include/acpi/actypes.h28
-rw-r--r--include/crypto/md5.h17
-rw-r--r--include/crypto/pcrypt.h51
-rw-r--r--include/linux/bitops.h29
-rw-r--r--include/linux/device.h17
-rw-r--r--include/linux/elf.h12
-rw-r--r--include/linux/ftrace.h13
-rw-r--r--include/linux/ftrace_event.h23
-rw-r--r--include/linux/hid.h5
-rw-r--r--include/linux/highmem.h6
-rw-r--r--include/linux/input.h42
-rw-r--r--include/linux/ioport.h7
-rw-r--r--include/linux/kernel.h5
-rw-r--r--include/linux/list.h14
-rw-r--r--include/linux/lmb.h1
-rw-r--r--include/linux/mm.h2
-rw-r--r--include/linux/mtd/sh_flctl.h3
-rw-r--r--include/linux/of.h62
-rw-r--r--include/linux/of_fdt.h75
-rw-r--r--include/linux/padata.h88
-rw-r--r--include/linux/pci-acpi.h7
-rw-r--r--include/linux/pci.h114
-rw-r--r--include/linux/pci_hotplug.h41
-rw-r--r--include/linux/pci_ids.h3
-rw-r--r--include/linux/percpu_counter.h9
-rw-r--r--include/linux/perf_event.h55
-rw-r--r--include/linux/pfkeyv2.h1
-rw-r--r--include/linux/plist.h4
-rw-r--r--include/linux/pm.h6
-rw-r--r--include/linux/pm_runtime.h4
-rw-r--r--include/linux/ptrace.h20
-rw-r--r--include/linux/raid_class.h1
-rw-r--r--include/linux/resume-trace.h7
-rw-r--r--include/linux/sched.h30
-rw-r--r--include/linux/sh_intc.h33
-rw-r--r--include/linux/spi/dw_spi.h5
-rw-r--r--include/linux/syscalls.h16
-rw-r--r--include/linux/usb.h1
-rw-r--r--include/linux/videodev2.h2
-rw-r--r--include/linux/virtio.h4
-rw-r--r--include/linux/virtio_balloon.h15
-rw-r--r--include/linux/virtio_blk.h13
-rw-r--r--include/linux/virtio_console.h30
-rw-r--r--include/media/davinci/isif.h531
-rw-r--r--include/media/davinci/vpss.h41
-rw-r--r--include/media/ir-common.h6
-rw-r--r--include/media/ir-core.h42
-rw-r--r--include/media/ir-kbd-i2c.h2
-rw-r--r--include/media/ov772x.h10
-rw-r--r--include/media/saa7146_vv.h1
-rw-r--r--include/media/soc_camera.h2
-rw-r--r--include/media/timb_radio.h36
-rw-r--r--include/media/tuner.h1
-rw-r--r--include/media/tvp7002.h56
-rw-r--r--include/media/tw9910.h4
-rw-r--r--include/media/v4l2-chip-ident.h7
-rw-r--r--include/media/v4l2-subdev.h1
-rw-r--r--include/pcmcia/ds.h2
-rw-r--r--include/pcmcia/ss.h40
-rw-r--r--include/scsi/scsi_device.h3
-rw-r--r--include/scsi/scsi_transport_sas.h7
-rw-r--r--include/trace/events/lock.h29
-rw-r--r--include/trace/ftrace.h255
-rw-r--r--include/trace/syscall.h8
-rw-r--r--include/video/sh_mobile_lcdc.h2
68 files changed, 1550 insertions, 470 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 3cd9ccdcbd8f..54508ccea023 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -242,6 +242,8 @@ struct acpi_device_perf {
242struct acpi_device_wakeup_flags { 242struct acpi_device_wakeup_flags {
243 u8 valid:1; /* Can successfully enable wakeup? */ 243 u8 valid:1; /* Can successfully enable wakeup? */
244 u8 run_wake:1; /* Run-Wake GPE devices */ 244 u8 run_wake:1; /* Run-Wake GPE devices */
245 u8 always_enabled:1; /* Run-wake devices that are always enabled */
246 u8 notifier_present:1; /* Wake-up notify handler has been installed */
245}; 247};
246 248
247struct acpi_device_wakeup_state { 249struct acpi_device_wakeup_state {
@@ -256,6 +258,7 @@ struct acpi_device_wakeup {
256 struct acpi_device_wakeup_state state; 258 struct acpi_device_wakeup_state state;
257 struct acpi_device_wakeup_flags flags; 259 struct acpi_device_wakeup_flags flags;
258 int prepare_count; 260 int prepare_count;
261 int run_wake_count;
259}; 262};
260 263
261/* Device */ 264/* Device */
@@ -386,6 +389,9 @@ acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int);
386struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle); 389struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle);
387#define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)((dev)->archdata.acpi_handle)) 390#define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)((dev)->archdata.acpi_handle))
388 391
392int acpi_enable_wakeup_device_power(struct acpi_device *dev, int state);
393int acpi_disable_wakeup_device_power(struct acpi_device *dev);
394
389#ifdef CONFIG_PM_SLEEP 395#ifdef CONFIG_PM_SLEEP
390int acpi_pm_device_sleep_state(struct device *, int *); 396int acpi_pm_device_sleep_state(struct device *, int *);
391int acpi_pm_device_sleep_wake(struct device *, bool); 397int acpi_pm_device_sleep_wake(struct device *, bool);
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h
index f4906f6568d4..3a4767c01c5f 100644
--- a/include/acpi/acpi_drivers.h
+++ b/include/acpi/acpi_drivers.h
@@ -104,6 +104,7 @@ int acpi_pci_bind_root(struct acpi_device *device);
104 104
105struct pci_bus *pci_acpi_scan_root(struct acpi_device *device, int domain, 105struct pci_bus *pci_acpi_scan_root(struct acpi_device *device, int domain,
106 int bus); 106 int bus);
107void pci_acpi_crs_quirks(void);
107 108
108/* -------------------------------------------------------------------------- 109/* --------------------------------------------------------------------------
109 Processor 110 Processor
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 86e9735a96bd..3988f93b9c66 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -281,11 +281,11 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status);
281/* 281/*
282 * GPE Interfaces 282 * GPE Interfaces
283 */ 283 */
284acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type); 284acpi_status acpi_set_gpe(acpi_handle gpe_device, u32 gpe_number, u8 action);
285 285
286acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number); 286acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u8 type);
287 287
288acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number); 288acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u8 type);
289 289
290acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags); 290acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags);
291 291
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 153f12dc3373..73af40863371 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -668,15 +668,16 @@ typedef u32 acpi_event_status;
668 668
669/* 669/*
670 * GPE info flags - Per GPE 670 * GPE info flags - Per GPE
671 * +-+-+-+---+---+-+ 671 * +-+-+-+---+-+-+-+
672 * |7|6|5|4:3|2:1|0| 672 * |7|6|5|4:3|2|1|0|
673 * +-+-+-+---+---+-+ 673 * +-+-+-+---+-+-+-+
674 * | | | | | | 674 * | | | | | | |
675 * | | | | | +--- Interrupt type: Edge or Level Triggered 675 * | | | | | | +--- Interrupt type: Edge or Level Triggered
676 * | | | | +--- Type: Wake-only, Runtime-only, or wake/runtime 676 * | | | | | +--- GPE can wake the system
677 * | | | | +--- Unused
677 * | | | +--- Type of dispatch -- to method, handler, or none 678 * | | | +--- Type of dispatch -- to method, handler, or none
678 * | | +--- Enabled for runtime? 679 * | | +--- Unused
679 * | +--- Enabled for wake? 680 * | +--- Unused
680 * +--- Unused 681 * +--- Unused
681 */ 682 */
682#define ACPI_GPE_XRUPT_TYPE_MASK (u8) 0x01 683#define ACPI_GPE_XRUPT_TYPE_MASK (u8) 0x01
@@ -687,22 +688,13 @@ typedef u32 acpi_event_status;
687#define ACPI_GPE_TYPE_WAKE_RUN (u8) 0x06 688#define ACPI_GPE_TYPE_WAKE_RUN (u8) 0x06
688#define ACPI_GPE_TYPE_WAKE (u8) 0x02 689#define ACPI_GPE_TYPE_WAKE (u8) 0x02
689#define ACPI_GPE_TYPE_RUNTIME (u8) 0x04 /* Default */ 690#define ACPI_GPE_TYPE_RUNTIME (u8) 0x04 /* Default */
691#define ACPI_GPE_CAN_WAKE (u8) 0x02
690 692
691#define ACPI_GPE_DISPATCH_MASK (u8) 0x18 693#define ACPI_GPE_DISPATCH_MASK (u8) 0x18
692#define ACPI_GPE_DISPATCH_HANDLER (u8) 0x08 694#define ACPI_GPE_DISPATCH_HANDLER (u8) 0x08
693#define ACPI_GPE_DISPATCH_METHOD (u8) 0x10 695#define ACPI_GPE_DISPATCH_METHOD (u8) 0x10
694#define ACPI_GPE_DISPATCH_NOT_USED (u8) 0x00 /* Default */ 696#define ACPI_GPE_DISPATCH_NOT_USED (u8) 0x00 /* Default */
695 697
696#define ACPI_GPE_RUN_ENABLE_MASK (u8) 0x20
697#define ACPI_GPE_RUN_ENABLED (u8) 0x20
698#define ACPI_GPE_RUN_DISABLED (u8) 0x00 /* Default */
699
700#define ACPI_GPE_WAKE_ENABLE_MASK (u8) 0x40
701#define ACPI_GPE_WAKE_ENABLED (u8) 0x40
702#define ACPI_GPE_WAKE_DISABLED (u8) 0x00 /* Default */
703
704#define ACPI_GPE_ENABLE_MASK (u8) 0x60 /* Both run/wake */
705
706/* 698/*
707 * Flags for GPE and Lock interfaces 699 * Flags for GPE and Lock interfaces
708 */ 700 */
diff --git a/include/crypto/md5.h b/include/crypto/md5.h
new file mode 100644
index 000000000000..65f299b08b0d
--- /dev/null
+++ b/include/crypto/md5.h
@@ -0,0 +1,17 @@
1#ifndef _CRYPTO_MD5_H
2#define _CRYPTO_MD5_H
3
4#include <linux/types.h>
5
6#define MD5_DIGEST_SIZE 16
7#define MD5_HMAC_BLOCK_SIZE 64
8#define MD5_BLOCK_WORDS 16
9#define MD5_HASH_WORDS 4
10
11struct md5_state {
12 u32 hash[MD5_HASH_WORDS];
13 u32 block[MD5_BLOCK_WORDS];
14 u64 byte_count;
15};
16
17#endif
diff --git a/include/crypto/pcrypt.h b/include/crypto/pcrypt.h
new file mode 100644
index 000000000000..d7d8bd8c6edc
--- /dev/null
+++ b/include/crypto/pcrypt.h
@@ -0,0 +1,51 @@
1/*
2 * pcrypt - Parallel crypto engine.
3 *
4 * Copyright (C) 2009 secunet Security Networks AG
5 * Copyright (C) 2009 Steffen Klassert <steffen.klassert@secunet.com>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms and conditions of the GNU General Public License,
9 * version 2, as published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
15 *
16 * You should have received a copy of the GNU General Public License along with
17 * this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#ifndef _CRYPTO_PCRYPT_H
22#define _CRYPTO_PCRYPT_H
23
24#include <linux/crypto.h>
25#include <linux/kernel.h>
26#include <linux/padata.h>
27
28struct pcrypt_request {
29 struct padata_priv padata;
30 void *data;
31 void *__ctx[] CRYPTO_MINALIGN_ATTR;
32};
33
34static inline void *pcrypt_request_ctx(struct pcrypt_request *req)
35{
36 return req->__ctx;
37}
38
39static inline
40struct padata_priv *pcrypt_request_padata(struct pcrypt_request *req)
41{
42 return &req->padata;
43}
44
45static inline
46struct pcrypt_request *pcrypt_padata_request(struct padata_priv *padata)
47{
48 return container_of(padata, struct pcrypt_request, padata);
49}
50
51#endif
diff --git a/include/linux/bitops.h b/include/linux/bitops.h
index c05a29cb9bb2..25b8b2f33ae9 100644
--- a/include/linux/bitops.h
+++ b/include/linux/bitops.h
@@ -25,7 +25,7 @@
25static __inline__ int get_bitmask_order(unsigned int count) 25static __inline__ int get_bitmask_order(unsigned int count)
26{ 26{
27 int order; 27 int order;
28 28
29 order = fls(count); 29 order = fls(count);
30 return order; /* We could be slightly more clever with -1 here... */ 30 return order; /* We could be slightly more clever with -1 here... */
31} 31}
@@ -33,7 +33,7 @@ static __inline__ int get_bitmask_order(unsigned int count)
33static __inline__ int get_count_order(unsigned int count) 33static __inline__ int get_count_order(unsigned int count)
34{ 34{
35 int order; 35 int order;
36 36
37 order = fls(count) - 1; 37 order = fls(count) - 1;
38 if (count & (count - 1)) 38 if (count & (count - 1))
39 order++; 39 order++;
@@ -45,6 +45,31 @@ static inline unsigned long hweight_long(unsigned long w)
45 return sizeof(w) == 4 ? hweight32(w) : hweight64(w); 45 return sizeof(w) == 4 ? hweight32(w) : hweight64(w);
46} 46}
47 47
48/*
49 * Clearly slow versions of the hweightN() functions, their benefit is
50 * of course compile time evaluation of constant arguments.
51 */
52#define HWEIGHT8(w) \
53 ( BUILD_BUG_ON_ZERO(!__builtin_constant_p(w)) + \
54 (!!((w) & (1ULL << 0))) + \
55 (!!((w) & (1ULL << 1))) + \
56 (!!((w) & (1ULL << 2))) + \
57 (!!((w) & (1ULL << 3))) + \
58 (!!((w) & (1ULL << 4))) + \
59 (!!((w) & (1ULL << 5))) + \
60 (!!((w) & (1ULL << 6))) + \
61 (!!((w) & (1ULL << 7))) )
62
63#define HWEIGHT16(w) (HWEIGHT8(w) + HWEIGHT8((w) >> 8))
64#define HWEIGHT32(w) (HWEIGHT16(w) + HWEIGHT16((w) >> 16))
65#define HWEIGHT64(w) (HWEIGHT32(w) + HWEIGHT32((w) >> 32))
66
67/*
68 * Type invariant version that simply casts things to the
69 * largest type.
70 */
71#define HWEIGHT(w) HWEIGHT64((u64)(w))
72
48/** 73/**
49 * rol32 - rotate a 32-bit value left 74 * rol32 - rotate a 32-bit value left
50 * @word: value to rotate 75 * @word: value to rotate
diff --git a/include/linux/device.h b/include/linux/device.h
index a62799f2ab00..b30527db3ac0 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -472,6 +472,23 @@ static inline int device_is_registered(struct device *dev)
472 return dev->kobj.state_in_sysfs; 472 return dev->kobj.state_in_sysfs;
473} 473}
474 474
475static inline void device_enable_async_suspend(struct device *dev)
476{
477 if (dev->power.status == DPM_ON)
478 dev->power.async_suspend = true;
479}
480
481static inline void device_disable_async_suspend(struct device *dev)
482{
483 if (dev->power.status == DPM_ON)
484 dev->power.async_suspend = false;
485}
486
487static inline bool device_async_suspend_enabled(struct device *dev)
488{
489 return !!dev->power.async_suspend;
490}
491
475void driver_init(void); 492void driver_init(void);
476 493
477/* 494/*
diff --git a/include/linux/elf.h b/include/linux/elf.h
index 0cc4d55151b7..ad990c5f63f6 100644
--- a/include/linux/elf.h
+++ b/include/linux/elf.h
@@ -349,7 +349,11 @@ typedef struct elf64_shdr {
349#define ELF_OSABI ELFOSABI_NONE 349#define ELF_OSABI ELFOSABI_NONE
350#endif 350#endif
351 351
352/* Notes used in ET_CORE */ 352/*
353 * Notes used in ET_CORE. Architectures export some of the arch register sets
354 * using the corresponding note types via the PTRACE_GETREGSET and
355 * PTRACE_SETREGSET requests.
356 */
353#define NT_PRSTATUS 1 357#define NT_PRSTATUS 1
354#define NT_PRFPREG 2 358#define NT_PRFPREG 2
355#define NT_PRPSINFO 3 359#define NT_PRPSINFO 3
@@ -361,7 +365,13 @@ typedef struct elf64_shdr {
361#define NT_PPC_VSX 0x102 /* PowerPC VSX registers */ 365#define NT_PPC_VSX 0x102 /* PowerPC VSX registers */
362#define NT_386_TLS 0x200 /* i386 TLS slots (struct user_desc) */ 366#define NT_386_TLS 0x200 /* i386 TLS slots (struct user_desc) */
363#define NT_386_IOPERM 0x201 /* x86 io permission bitmap (1=deny) */ 367#define NT_386_IOPERM 0x201 /* x86 io permission bitmap (1=deny) */
368#define NT_X86_XSTATE 0x202 /* x86 extended state using xsave */
364#define NT_S390_HIGH_GPRS 0x300 /* s390 upper register halves */ 369#define NT_S390_HIGH_GPRS 0x300 /* s390 upper register halves */
370#define NT_S390_TIMER 0x301 /* s390 timer register */
371#define NT_S390_TODCMP 0x302 /* s390 TOD clock comparator register */
372#define NT_S390_TODPREG 0x303 /* s390 TOD programmable register */
373#define NT_S390_CTRS 0x304 /* s390 control registers */
374#define NT_S390_PREFIX 0x305 /* s390 prefix register */
365 375
366 376
367/* Note header in a PT_NOTE section */ 377/* Note header in a PT_NOTE section */
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 0b4f97d24d7f..01e6adea07ec 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -134,6 +134,8 @@ extern void
134unregister_ftrace_function_probe_func(char *glob, struct ftrace_probe_ops *ops); 134unregister_ftrace_function_probe_func(char *glob, struct ftrace_probe_ops *ops);
135extern void unregister_ftrace_function_probe_all(char *glob); 135extern void unregister_ftrace_function_probe_all(char *glob);
136 136
137extern int ftrace_text_reserved(void *start, void *end);
138
137enum { 139enum {
138 FTRACE_FL_FREE = (1 << 0), 140 FTRACE_FL_FREE = (1 << 0),
139 FTRACE_FL_FAILED = (1 << 1), 141 FTRACE_FL_FAILED = (1 << 1),
@@ -141,7 +143,6 @@ enum {
141 FTRACE_FL_ENABLED = (1 << 3), 143 FTRACE_FL_ENABLED = (1 << 3),
142 FTRACE_FL_NOTRACE = (1 << 4), 144 FTRACE_FL_NOTRACE = (1 << 4),
143 FTRACE_FL_CONVERTED = (1 << 5), 145 FTRACE_FL_CONVERTED = (1 << 5),
144 FTRACE_FL_FROZEN = (1 << 6),
145}; 146};
146 147
147struct dyn_ftrace { 148struct dyn_ftrace {
@@ -250,6 +251,10 @@ static inline int unregister_ftrace_command(char *cmd_name)
250{ 251{
251 return -EINVAL; 252 return -EINVAL;
252} 253}
254static inline int ftrace_text_reserved(void *start, void *end)
255{
256 return 0;
257}
253#endif /* CONFIG_DYNAMIC_FTRACE */ 258#endif /* CONFIG_DYNAMIC_FTRACE */
254 259
255/* totally disable ftrace - can not re-enable after this */ 260/* totally disable ftrace - can not re-enable after this */
@@ -511,4 +516,10 @@ static inline void trace_hw_branch_oops(void) {}
511 516
512#endif /* CONFIG_HW_BRANCH_TRACER */ 517#endif /* CONFIG_HW_BRANCH_TRACER */
513 518
519#ifdef CONFIG_FTRACE_SYSCALLS
520
521unsigned long arch_syscall_addr(int nr);
522
523#endif /* CONFIG_FTRACE_SYSCALLS */
524
514#endif /* _LINUX_FTRACE_H */ 525#endif /* _LINUX_FTRACE_H */
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
index 2233c98d80df..6b7c444ab8f6 100644
--- a/include/linux/ftrace_event.h
+++ b/include/linux/ftrace_event.h
@@ -5,6 +5,7 @@
5#include <linux/trace_seq.h> 5#include <linux/trace_seq.h>
6#include <linux/percpu.h> 6#include <linux/percpu.h>
7#include <linux/hardirq.h> 7#include <linux/hardirq.h>
8#include <linux/perf_event.h>
8 9
9struct trace_array; 10struct trace_array;
10struct tracer; 11struct tracer;
@@ -121,9 +122,8 @@ struct ftrace_event_call {
121 int (*regfunc)(struct ftrace_event_call *); 122 int (*regfunc)(struct ftrace_event_call *);
122 void (*unregfunc)(struct ftrace_event_call *); 123 void (*unregfunc)(struct ftrace_event_call *);
123 int id; 124 int id;
125 const char *print_fmt;
124 int (*raw_init)(struct ftrace_event_call *); 126 int (*raw_init)(struct ftrace_event_call *);
125 int (*show_format)(struct ftrace_event_call *,
126 struct trace_seq *);
127 int (*define_fields)(struct ftrace_event_call *); 127 int (*define_fields)(struct ftrace_event_call *);
128 struct list_head fields; 128 struct list_head fields;
129 int filter_active; 129 int filter_active;
@@ -138,9 +138,6 @@ struct ftrace_event_call {
138 138
139#define FTRACE_MAX_PROFILE_SIZE 2048 139#define FTRACE_MAX_PROFILE_SIZE 2048
140 140
141extern char *perf_trace_buf;
142extern char *perf_trace_buf_nmi;
143
144#define MAX_FILTER_PRED 32 141#define MAX_FILTER_PRED 32
145#define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */ 142#define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */
146 143
@@ -188,13 +185,27 @@ do { \
188 __trace_printk(ip, fmt, ##args); \ 185 __trace_printk(ip, fmt, ##args); \
189} while (0) 186} while (0)
190 187
191#ifdef CONFIG_EVENT_PROFILE 188#ifdef CONFIG_PERF_EVENTS
192struct perf_event; 189struct perf_event;
193extern int ftrace_profile_enable(int event_id); 190extern int ftrace_profile_enable(int event_id);
194extern void ftrace_profile_disable(int event_id); 191extern void ftrace_profile_disable(int event_id);
195extern int ftrace_profile_set_filter(struct perf_event *event, int event_id, 192extern int ftrace_profile_set_filter(struct perf_event *event, int event_id,
196 char *filter_str); 193 char *filter_str);
197extern void ftrace_profile_free_filter(struct perf_event *event); 194extern void ftrace_profile_free_filter(struct perf_event *event);
195extern void *
196ftrace_perf_buf_prepare(int size, unsigned short type, int *rctxp,
197 unsigned long *irq_flags);
198
199static inline void
200ftrace_perf_buf_submit(void *raw_data, int size, int rctx, u64 addr,
201 u64 count, unsigned long irq_flags)
202{
203 struct trace_entry *entry = raw_data;
204
205 perf_tp_event(entry->type, addr, count, raw_data, size);
206 perf_swevent_put_recursion_context(rctx);
207 local_irq_restore(irq_flags);
208}
198#endif 209#endif
199 210
200#endif /* _LINUX_FTRACE_EVENT_H */ 211#endif /* _LINUX_FTRACE_EVENT_H */
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 87093652dda8..b1344ec4b7fc 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -501,7 +501,7 @@ struct hid_device { /* device report descriptor */
501 void (*hiddev_report_event) (struct hid_device *, struct hid_report *); 501 void (*hiddev_report_event) (struct hid_device *, struct hid_report *);
502 502
503 /* handler for raw output data, used by hidraw */ 503 /* handler for raw output data, used by hidraw */
504 int (*hid_output_raw_report) (struct hid_device *, __u8 *, size_t); 504 int (*hid_output_raw_report) (struct hid_device *, __u8 *, size_t, unsigned char);
505 505
506 /* debugging support via debugfs */ 506 /* debugging support via debugfs */
507 unsigned short debug; 507 unsigned short debug;
@@ -663,7 +663,7 @@ struct hid_ll_driver {
663 663
664/* Applications from HID Usage Tables 4/8/99 Version 1.1 */ 664/* Applications from HID Usage Tables 4/8/99 Version 1.1 */
665/* We ignore a few input applications that are not widely used */ 665/* We ignore a few input applications that are not widely used */
666#define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001) || (a == 0x000d0002)) 666#define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001) || ((a >= 0x000d0002) && (a <= 0x000d0006)))
667 667
668/* HID core API */ 668/* HID core API */
669 669
@@ -690,6 +690,7 @@ int hid_input_report(struct hid_device *, int type, u8 *, int, int);
690int hidinput_find_field(struct hid_device *hid, unsigned int type, unsigned int code, struct hid_field **field); 690int hidinput_find_field(struct hid_device *hid, unsigned int type, unsigned int code, struct hid_field **field);
691void hid_output_report(struct hid_report *report, __u8 *data); 691void hid_output_report(struct hid_report *report, __u8 *data);
692struct hid_device *hid_allocate_device(void); 692struct hid_device *hid_allocate_device(void);
693struct hid_report *hid_register_report(struct hid_device *device, unsigned type, unsigned id);
693int hid_parse_report(struct hid_device *hid, __u8 *start, unsigned size); 694int hid_parse_report(struct hid_device *hid, __u8 *start, unsigned size);
694int hid_check_keys_pressed(struct hid_device *hid); 695int hid_check_keys_pressed(struct hid_device *hid);
695int hid_connect(struct hid_device *hid, unsigned int connect_mask); 696int hid_connect(struct hid_device *hid, unsigned int connect_mask);
diff --git a/include/linux/highmem.h b/include/linux/highmem.h
index ab2cc20e21a5..74152c08ad07 100644
--- a/include/linux/highmem.h
+++ b/include/linux/highmem.h
@@ -17,6 +17,12 @@ static inline void flush_anon_page(struct vm_area_struct *vma, struct page *page
17static inline void flush_kernel_dcache_page(struct page *page) 17static inline void flush_kernel_dcache_page(struct page *page)
18{ 18{
19} 19}
20static inline void flush_kernel_vmap_range(void *vaddr, int size)
21{
22}
23static inline void invalidate_kernel_vmap_range(void *vaddr, int size)
24{
25}
20#endif 26#endif
21 27
22#include <asm/kmap_types.h> 28#include <asm/kmap_types.h>
diff --git a/include/linux/input.h b/include/linux/input.h
index 663208afb64c..f44ee9114401 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -598,6 +598,48 @@ struct input_absinfo {
598 598
599#define KEY_CAMERA_FOCUS 0x210 599#define KEY_CAMERA_FOCUS 0x210
600 600
601#define BTN_TRIGGER_HAPPY 0x2c0
602#define BTN_TRIGGER_HAPPY1 0x2c0
603#define BTN_TRIGGER_HAPPY2 0x2c1
604#define BTN_TRIGGER_HAPPY3 0x2c2
605#define BTN_TRIGGER_HAPPY4 0x2c3
606#define BTN_TRIGGER_HAPPY5 0x2c4
607#define BTN_TRIGGER_HAPPY6 0x2c5
608#define BTN_TRIGGER_HAPPY7 0x2c6
609#define BTN_TRIGGER_HAPPY8 0x2c7
610#define BTN_TRIGGER_HAPPY9 0x2c8
611#define BTN_TRIGGER_HAPPY10 0x2c9
612#define BTN_TRIGGER_HAPPY11 0x2ca
613#define BTN_TRIGGER_HAPPY12 0x2cb
614#define BTN_TRIGGER_HAPPY13 0x2cc
615#define BTN_TRIGGER_HAPPY14 0x2cd
616#define BTN_TRIGGER_HAPPY15 0x2ce
617#define BTN_TRIGGER_HAPPY16 0x2cf
618#define BTN_TRIGGER_HAPPY17 0x2d0
619#define BTN_TRIGGER_HAPPY18 0x2d1
620#define BTN_TRIGGER_HAPPY19 0x2d2
621#define BTN_TRIGGER_HAPPY20 0x2d3
622#define BTN_TRIGGER_HAPPY21 0x2d4
623#define BTN_TRIGGER_HAPPY22 0x2d5
624#define BTN_TRIGGER_HAPPY23 0x2d6
625#define BTN_TRIGGER_HAPPY24 0x2d7
626#define BTN_TRIGGER_HAPPY25 0x2d8
627#define BTN_TRIGGER_HAPPY26 0x2d9
628#define BTN_TRIGGER_HAPPY27 0x2da
629#define BTN_TRIGGER_HAPPY28 0x2db
630#define BTN_TRIGGER_HAPPY29 0x2dc
631#define BTN_TRIGGER_HAPPY30 0x2dd
632#define BTN_TRIGGER_HAPPY31 0x2de
633#define BTN_TRIGGER_HAPPY32 0x2df
634#define BTN_TRIGGER_HAPPY33 0x2e0
635#define BTN_TRIGGER_HAPPY34 0x2e1
636#define BTN_TRIGGER_HAPPY35 0x2e2
637#define BTN_TRIGGER_HAPPY36 0x2e3
638#define BTN_TRIGGER_HAPPY37 0x2e4
639#define BTN_TRIGGER_HAPPY38 0x2e5
640#define BTN_TRIGGER_HAPPY39 0x2e6
641#define BTN_TRIGGER_HAPPY40 0x2e7
642
601/* We avoid low common keys in module aliases so they don't get huge. */ 643/* We avoid low common keys in module aliases so they don't get huge. */
602#define KEY_MIN_INTERESTING KEY_MUTE 644#define KEY_MIN_INTERESTING KEY_MUTE
603#define KEY_MAX 0x2ff 645#define KEY_MAX 0x2ff
diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index 7129504e053d..dda98410d588 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -112,6 +112,7 @@ extern struct resource iomem_resource;
112 112
113extern int request_resource(struct resource *root, struct resource *new); 113extern int request_resource(struct resource *root, struct resource *new);
114extern int release_resource(struct resource *new); 114extern int release_resource(struct resource *new);
115void release_child_resources(struct resource *new);
115extern void reserve_region_with_split(struct resource *root, 116extern void reserve_region_with_split(struct resource *root,
116 resource_size_t start, resource_size_t end, 117 resource_size_t start, resource_size_t end,
117 const char *name); 118 const char *name);
@@ -120,8 +121,10 @@ extern void insert_resource_expand_to_fit(struct resource *root, struct resource
120extern int allocate_resource(struct resource *root, struct resource *new, 121extern int allocate_resource(struct resource *root, struct resource *new,
121 resource_size_t size, resource_size_t min, 122 resource_size_t size, resource_size_t min,
122 resource_size_t max, resource_size_t align, 123 resource_size_t max, resource_size_t align,
123 void (*alignf)(void *, struct resource *, 124 resource_size_t (*alignf)(void *,
124 resource_size_t, resource_size_t), 125 const struct resource *,
126 resource_size_t,
127 resource_size_t),
125 void *alignf_data); 128 void *alignf_data);
126int adjust_resource(struct resource *res, resource_size_t start, 129int adjust_resource(struct resource *res, resource_size_t start,
127 resource_size_t size); 130 resource_size_t size);
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 328bca609b9b..1221d2331a6d 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -124,7 +124,7 @@ extern int _cond_resched(void);
124#endif 124#endif
125 125
126#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP 126#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
127 void __might_sleep(char *file, int line, int preempt_offset); 127 void __might_sleep(const char *file, int line, int preempt_offset);
128/** 128/**
129 * might_sleep - annotation for functions that can sleep 129 * might_sleep - annotation for functions that can sleep
130 * 130 *
@@ -138,7 +138,8 @@ extern int _cond_resched(void);
138# define might_sleep() \ 138# define might_sleep() \
139 do { __might_sleep(__FILE__, __LINE__, 0); might_resched(); } while (0) 139 do { __might_sleep(__FILE__, __LINE__, 0); might_resched(); } while (0)
140#else 140#else
141 static inline void __might_sleep(char *file, int line, int preempt_offset) { } 141 static inline void __might_sleep(const char *file, int line,
142 int preempt_offset) { }
142# define might_sleep() do { might_resched(); } while (0) 143# define might_sleep() do { might_resched(); } while (0)
143#endif 144#endif
144 145
diff --git a/include/linux/list.h b/include/linux/list.h
index 969f6e92d089..5d9c6558e8ab 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -206,6 +206,20 @@ static inline int list_empty_careful(const struct list_head *head)
206} 206}
207 207
208/** 208/**
209 * list_rotate_left - rotate the list to the left
210 * @head: the head of the list
211 */
212static inline void list_rotate_left(struct list_head *head)
213{
214 struct list_head *first;
215
216 if (!list_empty(head)) {
217 first = head->next;
218 list_move_tail(first, head);
219 }
220}
221
222/**
209 * list_is_singular - tests whether a list has just one entry. 223 * list_is_singular - tests whether a list has just one entry.
210 * @head: the list to test. 224 * @head: the list to test.
211 */ 225 */
diff --git a/include/linux/lmb.h b/include/linux/lmb.h
index ef82b8fcbddb..f3d14333ebed 100644
--- a/include/linux/lmb.h
+++ b/include/linux/lmb.h
@@ -42,6 +42,7 @@ extern void __init lmb_init(void);
42extern void __init lmb_analyze(void); 42extern void __init lmb_analyze(void);
43extern long lmb_add(u64 base, u64 size); 43extern long lmb_add(u64 base, u64 size);
44extern long lmb_remove(u64 base, u64 size); 44extern long lmb_remove(u64 base, u64 size);
45extern long __init lmb_free(u64 base, u64 size);
45extern long __init lmb_reserve(u64 base, u64 size); 46extern long __init lmb_reserve(u64 base, u64 size);
46extern u64 __init lmb_alloc_nid(u64 size, u64 align, int nid, 47extern u64 __init lmb_alloc_nid(u64 size, u64 align, int nid,
47 u64 (*nid_range)(u64, u64, int *)); 48 u64 (*nid_range)(u64, u64, int *));
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 60c467bfbabd..8b2fa8593c61 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -265,6 +265,8 @@ static inline int get_page_unless_zero(struct page *page)
265 return atomic_inc_not_zero(&page->_count); 265 return atomic_inc_not_zero(&page->_count);
266} 266}
267 267
268extern int page_is_ram(unsigned long pfn);
269
268/* Support for virtually mapped pages */ 270/* Support for virtually mapped pages */
269struct page *vmalloc_to_page(const void *addr); 271struct page *vmalloc_to_page(const void *addr);
270unsigned long vmalloc_to_pfn(const void *addr); 272unsigned long vmalloc_to_pfn(const void *addr);
diff --git a/include/linux/mtd/sh_flctl.h b/include/linux/mtd/sh_flctl.h
index e77c1cea404d..ab77609ec337 100644
--- a/include/linux/mtd/sh_flctl.h
+++ b/include/linux/mtd/sh_flctl.h
@@ -51,6 +51,8 @@
51#define _4ECCCNTEN (0x1 << 24) 51#define _4ECCCNTEN (0x1 << 24)
52#define _4ECCEN (0x1 << 23) 52#define _4ECCEN (0x1 << 23)
53#define _4ECCCORRECT (0x1 << 22) 53#define _4ECCCORRECT (0x1 << 22)
54#define SHBUSSEL (0x1 << 20)
55#define SEL_16BIT (0x1 << 19)
54#define SNAND_E (0x1 << 18) /* SNAND (0=512 1=2048)*/ 56#define SNAND_E (0x1 << 18) /* SNAND (0=512 1=2048)*/
55#define QTSEL_E (0x1 << 17) 57#define QTSEL_E (0x1 << 17)
56#define ENDIAN (0x1 << 16) /* 1 = little endian */ 58#define ENDIAN (0x1 << 16) /* 1 = little endian */
@@ -96,6 +98,7 @@
96struct sh_flctl { 98struct sh_flctl {
97 struct mtd_info mtd; 99 struct mtd_info mtd;
98 struct nand_chip chip; 100 struct nand_chip chip;
101 struct platform_device *pdev;
99 void __iomem *reg; 102 void __iomem *reg;
100 103
101 uint8_t done_buff[2048 + 64]; /* max size 2048 + 64 */ 104 uint8_t done_buff[2048 + 64]; /* max size 2048 + 64 */
diff --git a/include/linux/of.h b/include/linux/of.h
index e7facd8fbce8..f6d9cbc39c9c 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -19,6 +19,11 @@
19#include <linux/bitops.h> 19#include <linux/bitops.h>
20#include <linux/kref.h> 20#include <linux/kref.h>
21#include <linux/mod_devicetable.h> 21#include <linux/mod_devicetable.h>
22#include <linux/spinlock.h>
23
24#include <asm/byteorder.h>
25
26#ifdef CONFIG_OF
22 27
23typedef u32 phandle; 28typedef u32 phandle;
24typedef u32 ihandle; 29typedef u32 ihandle;
@@ -39,10 +44,7 @@ struct of_irq_controller;
39struct device_node { 44struct device_node {
40 const char *name; 45 const char *name;
41 const char *type; 46 const char *type;
42 phandle node; 47 phandle phandle;
43#if !defined(CONFIG_SPARC)
44 phandle linux_phandle;
45#endif
46 char *full_name; 48 char *full_name;
47 49
48 struct property *properties; 50 struct property *properties;
@@ -63,6 +65,11 @@ struct device_node {
63#endif 65#endif
64}; 66};
65 67
68/* Pointer for first entry in chain of all nodes. */
69extern struct device_node *allnodes;
70extern struct device_node *of_chosen;
71extern rwlock_t devtree_lock;
72
66static inline int of_node_check_flag(struct device_node *n, unsigned long flag) 73static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
67{ 74{
68 return test_bit(flag, &n->_flags); 75 return test_bit(flag, &n->_flags);
@@ -73,12 +80,6 @@ static inline void of_node_set_flag(struct device_node *n, unsigned long flag)
73 set_bit(flag, &n->_flags); 80 set_bit(flag, &n->_flags);
74} 81}
75 82
76static inline void
77set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de)
78{
79 dn->pde = de;
80}
81
82extern struct device_node *of_find_all_nodes(struct device_node *prev); 83extern struct device_node *of_find_all_nodes(struct device_node *prev);
83 84
84#if defined(CONFIG_SPARC) 85#if defined(CONFIG_SPARC)
@@ -101,26 +102,36 @@ extern void of_node_put(struct device_node *node);
101 */ 102 */
102 103
103/* Helper to read a big number; size is in cells (not bytes) */ 104/* Helper to read a big number; size is in cells (not bytes) */
104static inline u64 of_read_number(const u32 *cell, int size) 105static inline u64 of_read_number(const __be32 *cell, int size)
105{ 106{
106 u64 r = 0; 107 u64 r = 0;
107 while (size--) 108 while (size--)
108 r = (r << 32) | *(cell++); 109 r = (r << 32) | be32_to_cpu(*(cell++));
109 return r; 110 return r;
110} 111}
111 112
112/* Like of_read_number, but we want an unsigned long result */ 113/* Like of_read_number, but we want an unsigned long result */
113#ifdef CONFIG_PPC32 114static inline unsigned long of_read_ulong(const __be32 *cell, int size)
114static inline unsigned long of_read_ulong(const u32 *cell, int size)
115{ 115{
116 return cell[size-1]; 116 /* toss away upper bits if unsigned long is smaller than u64 */
117 return of_read_number(cell, size);
117} 118}
118#else
119#define of_read_ulong(cell, size) of_read_number(cell, size)
120#endif
121 119
122#include <asm/prom.h> 120#include <asm/prom.h>
123 121
122/* Default #address and #size cells. Allow arch asm/prom.h to override */
123#if !defined(OF_ROOT_NODE_ADDR_CELLS_DEFAULT)
124#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1
125#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
126#endif
127
128/* Default string compare functions, Allow arch asm/prom.h to override */
129#if !defined(of_compat_cmp)
130#define of_compat_cmp(s1, s2, l) strncasecmp((s1), (s2), (l))
131#define of_prop_cmp(s1, s2) strcmp((s1), (s2))
132#define of_node_cmp(s1, s2) strcasecmp((s1), (s2))
133#endif
134
124/* flag descriptions */ 135/* flag descriptions */
125#define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */ 136#define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */
126#define OF_DETACHED 2 /* node has been detached from the device tree */ 137#define OF_DETACHED 2 /* node has been detached from the device tree */
@@ -187,4 +198,19 @@ extern int of_parse_phandles_with_args(struct device_node *np,
187 const char *list_name, const char *cells_name, int index, 198 const char *list_name, const char *cells_name, int index,
188 struct device_node **out_node, const void **out_args); 199 struct device_node **out_node, const void **out_args);
189 200
201extern int of_machine_is_compatible(const char *compat);
202
203extern int prom_add_property(struct device_node* np, struct property* prop);
204extern int prom_remove_property(struct device_node *np, struct property *prop);
205extern int prom_update_property(struct device_node *np,
206 struct property *newprop,
207 struct property *oldprop);
208
209#if defined(CONFIG_OF_DYNAMIC)
210/* For updating the device tree at runtime */
211extern void of_attach_node(struct device_node *);
212extern void of_detach_node(struct device_node *);
213#endif
214
215#endif /* CONFIG_OF */
190#endif /* _LINUX_OF_H */ 216#endif /* _LINUX_OF_H */
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index 41d432b13553..a1ca92ccb0ff 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -42,45 +42,62 @@
42 * ends when size is 0 42 * ends when size is 0
43 */ 43 */
44struct boot_param_header { 44struct boot_param_header {
45 u32 magic; /* magic word OF_DT_HEADER */ 45 __be32 magic; /* magic word OF_DT_HEADER */
46 u32 totalsize; /* total size of DT block */ 46 __be32 totalsize; /* total size of DT block */
47 u32 off_dt_struct; /* offset to structure */ 47 __be32 off_dt_struct; /* offset to structure */
48 u32 off_dt_strings; /* offset to strings */ 48 __be32 off_dt_strings; /* offset to strings */
49 u32 off_mem_rsvmap; /* offset to memory reserve map */ 49 __be32 off_mem_rsvmap; /* offset to memory reserve map */
50 u32 version; /* format version */ 50 __be32 version; /* format version */
51 u32 last_comp_version; /* last compatible version */ 51 __be32 last_comp_version; /* last compatible version */
52 /* version 2 fields below */ 52 /* version 2 fields below */
53 u32 boot_cpuid_phys; /* Physical CPU id we're booting on */ 53 __be32 boot_cpuid_phys; /* Physical CPU id we're booting on */
54 /* version 3 fields below */ 54 /* version 3 fields below */
55 u32 dt_strings_size; /* size of the DT strings block */ 55 __be32 dt_strings_size; /* size of the DT strings block */
56 /* version 17 fields below */ 56 /* version 17 fields below */
57 u32 dt_struct_size; /* size of the DT structure block */ 57 __be32 dt_struct_size; /* size of the DT structure block */
58}; 58};
59 59
60/* TBD: Temporary export of fdt globals - remove when code fully merged */
61extern int __initdata dt_root_addr_cells;
62extern int __initdata dt_root_size_cells;
63extern struct boot_param_header *initial_boot_params;
64
60/* For scanning the flat device-tree at boot time */ 65/* For scanning the flat device-tree at boot time */
61extern int __init of_scan_flat_dt(int (*it)(unsigned long node, 66extern char *find_flat_dt_string(u32 offset);
62 const char *uname, int depth, 67extern int of_scan_flat_dt(int (*it)(unsigned long node, const char *uname,
63 void *data), 68 int depth, void *data),
64 void *data); 69 void *data);
65extern void __init *of_get_flat_dt_prop(unsigned long node, const char *name, 70extern void *of_get_flat_dt_prop(unsigned long node, const char *name,
66 unsigned long *size); 71 unsigned long *size);
67extern int __init of_flat_dt_is_compatible(unsigned long node, 72extern int of_flat_dt_is_compatible(unsigned long node, const char *name);
68 const char *name); 73extern unsigned long of_get_flat_dt_root(void);
69extern unsigned long __init of_get_flat_dt_root(void); 74extern void early_init_dt_scan_chosen_arch(unsigned long node);
75extern int early_init_dt_scan_chosen(unsigned long node, const char *uname,
76 int depth, void *data);
77extern void early_init_dt_check_for_initrd(unsigned long node);
78extern int early_init_dt_scan_memory(unsigned long node, const char *uname,
79 int depth, void *data);
80extern void early_init_dt_add_memory_arch(u64 base, u64 size);
81extern u64 early_init_dt_alloc_memory_arch(u64 size, u64 align);
82extern u64 dt_mem_next_cell(int s, __be32 **cellp);
83
84/*
85 * If BLK_DEV_INITRD, the fdt early init code will call this function,
86 * to be provided by the arch code. start and end are specified as
87 * physical addresses.
88 */
89#ifdef CONFIG_BLK_DEV_INITRD
90extern void early_init_dt_setup_initrd_arch(unsigned long start,
91 unsigned long end);
92#endif
93
94/* Early flat tree scan hooks */
95extern int early_init_dt_scan_root(unsigned long node, const char *uname,
96 int depth, void *data);
70 97
71/* Other Prototypes */ 98/* Other Prototypes */
72extern void finish_device_tree(void);
73extern void unflatten_device_tree(void); 99extern void unflatten_device_tree(void);
74extern void early_init_devtree(void *); 100extern void early_init_devtree(void *);
75extern int machine_is_compatible(const char *compat);
76extern void print_properties(struct device_node *node);
77extern int prom_n_intr_cells(struct device_node* np);
78extern void prom_get_irq_senses(unsigned char *senses, int off, int max);
79extern int prom_add_property(struct device_node* np, struct property* prop);
80extern int prom_remove_property(struct device_node *np, struct property *prop);
81extern int prom_update_property(struct device_node *np,
82 struct property *newprop,
83 struct property *oldprop);
84 101
85#endif /* __ASSEMBLY__ */ 102#endif /* __ASSEMBLY__ */
86#endif /* _LINUX_OF_FDT_H */ 103#endif /* _LINUX_OF_FDT_H */
diff --git a/include/linux/padata.h b/include/linux/padata.h
new file mode 100644
index 000000000000..51611da9c498
--- /dev/null
+++ b/include/linux/padata.h
@@ -0,0 +1,88 @@
1/*
2 * padata.h - header for the padata parallelization interface
3 *
4 * Copyright (C) 2008, 2009 secunet Security Networks AG
5 * Copyright (C) 2008, 2009 Steffen Klassert <steffen.klassert@secunet.com>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms and conditions of the GNU General Public License,
9 * version 2, as published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
15 *
16 * You should have received a copy of the GNU General Public License along with
17 * this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#ifndef PADATA_H
22#define PADATA_H
23
24#include <linux/workqueue.h>
25#include <linux/spinlock.h>
26#include <linux/list.h>
27
28struct padata_priv {
29 struct list_head list;
30 struct parallel_data *pd;
31 int cb_cpu;
32 int seq_nr;
33 int info;
34 void (*parallel)(struct padata_priv *padata);
35 void (*serial)(struct padata_priv *padata);
36};
37
38struct padata_list {
39 struct list_head list;
40 spinlock_t lock;
41};
42
43struct padata_queue {
44 struct padata_list parallel;
45 struct padata_list reorder;
46 struct padata_list serial;
47 struct work_struct pwork;
48 struct work_struct swork;
49 struct parallel_data *pd;
50 atomic_t num_obj;
51 int cpu_index;
52};
53
54struct parallel_data {
55 struct padata_instance *pinst;
56 struct padata_queue *queue;
57 atomic_t seq_nr;
58 atomic_t reorder_objects;
59 atomic_t refcnt;
60 unsigned int max_seq_nr;
61 cpumask_var_t cpumask;
62 spinlock_t lock;
63};
64
65struct padata_instance {
66 struct notifier_block cpu_notifier;
67 struct workqueue_struct *wq;
68 struct parallel_data *pd;
69 cpumask_var_t cpumask;
70 struct mutex lock;
71 u8 flags;
72#define PADATA_INIT 1
73#define PADATA_RESET 2
74};
75
76extern struct padata_instance *padata_alloc(const struct cpumask *cpumask,
77 struct workqueue_struct *wq);
78extern void padata_free(struct padata_instance *pinst);
79extern int padata_do_parallel(struct padata_instance *pinst,
80 struct padata_priv *padata, int cb_cpu);
81extern void padata_do_serial(struct padata_priv *padata);
82extern int padata_set_cpumask(struct padata_instance *pinst,
83 cpumask_var_t cpumask);
84extern int padata_add_cpu(struct padata_instance *pinst, int cpu);
85extern int padata_remove_cpu(struct padata_instance *pinst, int cpu);
86extern void padata_start(struct padata_instance *pinst);
87extern void padata_stop(struct padata_instance *pinst);
88#endif
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h
index 93a7c08f869d..c8b6473c5f42 100644
--- a/include/linux/pci-acpi.h
+++ b/include/linux/pci-acpi.h
@@ -11,6 +11,13 @@
11#include <linux/acpi.h> 11#include <linux/acpi.h>
12 12
13#ifdef CONFIG_ACPI 13#ifdef CONFIG_ACPI
14extern acpi_status pci_acpi_add_bus_pm_notifier(struct acpi_device *dev,
15 struct pci_bus *pci_bus);
16extern acpi_status pci_acpi_remove_bus_pm_notifier(struct acpi_device *dev);
17extern acpi_status pci_acpi_add_pm_notifier(struct acpi_device *dev,
18 struct pci_dev *pci_dev);
19extern acpi_status pci_acpi_remove_pm_notifier(struct acpi_device *dev);
20
14static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) 21static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev)
15{ 22{
16 struct pci_bus *pbus = pdev->bus; 23 struct pci_bus *pbus = pdev->bus;
diff --git a/include/linux/pci.h b/include/linux/pci.h
index c1968f464c38..25813738c71a 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -187,6 +187,33 @@ enum pci_bus_flags {
187 PCI_BUS_FLAGS_NO_MMRBC = (__force pci_bus_flags_t) 2, 187 PCI_BUS_FLAGS_NO_MMRBC = (__force pci_bus_flags_t) 2,
188}; 188};
189 189
190/* Based on the PCI Hotplug Spec, but some values are made up by us */
191enum pci_bus_speed {
192 PCI_SPEED_33MHz = 0x00,
193 PCI_SPEED_66MHz = 0x01,
194 PCI_SPEED_66MHz_PCIX = 0x02,
195 PCI_SPEED_100MHz_PCIX = 0x03,
196 PCI_SPEED_133MHz_PCIX = 0x04,
197 PCI_SPEED_66MHz_PCIX_ECC = 0x05,
198 PCI_SPEED_100MHz_PCIX_ECC = 0x06,
199 PCI_SPEED_133MHz_PCIX_ECC = 0x07,
200 PCI_SPEED_66MHz_PCIX_266 = 0x09,
201 PCI_SPEED_100MHz_PCIX_266 = 0x0a,
202 PCI_SPEED_133MHz_PCIX_266 = 0x0b,
203 AGP_UNKNOWN = 0x0c,
204 AGP_1X = 0x0d,
205 AGP_2X = 0x0e,
206 AGP_4X = 0x0f,
207 AGP_8X = 0x10,
208 PCI_SPEED_66MHz_PCIX_533 = 0x11,
209 PCI_SPEED_100MHz_PCIX_533 = 0x12,
210 PCI_SPEED_133MHz_PCIX_533 = 0x13,
211 PCIE_SPEED_2_5GT = 0x14,
212 PCIE_SPEED_5_0GT = 0x15,
213 PCIE_SPEED_8_0GT = 0x16,
214 PCI_SPEED_UNKNOWN = 0xff,
215};
216
190struct pci_cap_saved_state { 217struct pci_cap_saved_state {
191 struct hlist_node next; 218 struct hlist_node next;
192 char cap_nr; 219 char cap_nr;
@@ -239,6 +266,7 @@ struct pci_dev {
239 configuration space */ 266 configuration space */
240 unsigned int pme_support:5; /* Bitmask of states from which PME# 267 unsigned int pme_support:5; /* Bitmask of states from which PME#
241 can be generated */ 268 can be generated */
269 unsigned int pme_interrupt:1;
242 unsigned int d1_support:1; /* Low power state D1 is supported */ 270 unsigned int d1_support:1; /* Low power state D1 is supported */
243 unsigned int d2_support:1; /* Low power state D2 is supported */ 271 unsigned int d2_support:1; /* Low power state D2 is supported */
244 unsigned int no_d1d2:1; /* Only allow D0 and D3 */ 272 unsigned int no_d1d2:1; /* Only allow D0 and D3 */
@@ -275,7 +303,8 @@ struct pci_dev {
275 unsigned int msix_enabled:1; 303 unsigned int msix_enabled:1;
276 unsigned int ari_enabled:1; /* ARI forwarding */ 304 unsigned int ari_enabled:1; /* ARI forwarding */
277 unsigned int is_managed:1; 305 unsigned int is_managed:1;
278 unsigned int is_pcie:1; 306 unsigned int is_pcie:1; /* Obsolete. Will be removed.
307 Use pci_is_pcie() instead */
279 unsigned int needs_freset:1; /* Dev requires fundamental reset */ 308 unsigned int needs_freset:1; /* Dev requires fundamental reset */
280 unsigned int state_saved:1; 309 unsigned int state_saved:1;
281 unsigned int is_physfn:1; 310 unsigned int is_physfn:1;
@@ -335,9 +364,26 @@ static inline void pci_add_saved_cap(struct pci_dev *pci_dev,
335 hlist_add_head(&new_cap->next, &pci_dev->saved_cap_space); 364 hlist_add_head(&new_cap->next, &pci_dev->saved_cap_space);
336} 365}
337 366
338#ifndef PCI_BUS_NUM_RESOURCES 367/*
339#define PCI_BUS_NUM_RESOURCES 16 368 * The first PCI_BRIDGE_RESOURCE_NUM PCI bus resources (those that correspond
340#endif 369 * to P2P or CardBus bridge windows) go in a table. Additional ones (for
370 * buses below host bridges or subtractive decode bridges) go in the list.
371 * Use pci_bus_for_each_resource() to iterate through all the resources.
372 */
373
374/*
375 * PCI_SUBTRACTIVE_DECODE means the bridge forwards the window implicitly
376 * and there's no way to program the bridge with the details of the window.
377 * This does not apply to ACPI _CRS windows, even with the _DEC subtractive-
378 * decode bit set, because they are explicit and can be programmed with _SRS.
379 */
380#define PCI_SUBTRACTIVE_DECODE 0x1
381
382struct pci_bus_resource {
383 struct list_head list;
384 struct resource *res;
385 unsigned int flags;
386};
341 387
342#define PCI_REGION_FLAG_MASK 0x0fU /* These bits of resource flags tell us the PCI region flags */ 388#define PCI_REGION_FLAG_MASK 0x0fU /* These bits of resource flags tell us the PCI region flags */
343 389
@@ -348,8 +394,8 @@ struct pci_bus {
348 struct list_head devices; /* list of devices on this bus */ 394 struct list_head devices; /* list of devices on this bus */
349 struct pci_dev *self; /* bridge device as seen by parent */ 395 struct pci_dev *self; /* bridge device as seen by parent */
350 struct list_head slots; /* list of slots on this bus */ 396 struct list_head slots; /* list of slots on this bus */
351 struct resource *resource[PCI_BUS_NUM_RESOURCES]; 397 struct resource *resource[PCI_BRIDGE_RESOURCE_NUM];
352 /* address space routed to this bus */ 398 struct list_head resources; /* address space routed to this bus */
353 399
354 struct pci_ops *ops; /* configuration access functions */ 400 struct pci_ops *ops; /* configuration access functions */
355 void *sysdata; /* hook for sys-specific extension */ 401 void *sysdata; /* hook for sys-specific extension */
@@ -359,6 +405,8 @@ struct pci_bus {
359 unsigned char primary; /* number of primary bridge */ 405 unsigned char primary; /* number of primary bridge */
360 unsigned char secondary; /* number of secondary bridge */ 406 unsigned char secondary; /* number of secondary bridge */
361 unsigned char subordinate; /* max number of subordinate buses */ 407 unsigned char subordinate; /* max number of subordinate buses */
408 unsigned char max_bus_speed; /* enum pci_bus_speed */
409 unsigned char cur_bus_speed; /* enum pci_bus_speed */
362 410
363 char name[48]; 411 char name[48];
364 412
@@ -563,7 +611,8 @@ int __must_check pcibios_enable_device(struct pci_dev *, int mask);
563char *pcibios_setup(char *str); 611char *pcibios_setup(char *str);
564 612
565/* Used only when drivers/pci/setup.c is used */ 613/* Used only when drivers/pci/setup.c is used */
566void pcibios_align_resource(void *, struct resource *, resource_size_t, 614resource_size_t pcibios_align_resource(void *, const struct resource *,
615 resource_size_t,
567 resource_size_t); 616 resource_size_t);
568void pcibios_update_irq(struct pci_dev *, int irq); 617void pcibios_update_irq(struct pci_dev *, int irq);
569 618
@@ -589,6 +638,7 @@ struct pci_bus *pci_create_bus(struct device *parent, int bus,
589 struct pci_ops *ops, void *sysdata); 638 struct pci_ops *ops, void *sysdata);
590struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, 639struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev,
591 int busnr); 640 int busnr);
641void pcie_update_link_speed(struct pci_bus *bus, u16 link_status);
592struct pci_slot *pci_create_slot(struct pci_bus *parent, int slot_nr, 642struct pci_slot *pci_create_slot(struct pci_bus *parent, int slot_nr,
593 const char *name, 643 const char *name,
594 struct hotplug_slot *hotplug); 644 struct hotplug_slot *hotplug);
@@ -615,12 +665,6 @@ extern void pci_sort_breadthfirst(void);
615 665
616/* Generic PCI functions exported to card drivers */ 666/* Generic PCI functions exported to card drivers */
617 667
618#ifdef CONFIG_PCI_LEGACY
619struct pci_dev __deprecated *pci_find_device(unsigned int vendor,
620 unsigned int device,
621 struct pci_dev *from);
622#endif /* CONFIG_PCI_LEGACY */
623
624enum pci_lost_interrupt_reason { 668enum pci_lost_interrupt_reason {
625 PCI_LOST_IRQ_NO_INFORMATION = 0, 669 PCI_LOST_IRQ_NO_INFORMATION = 0,
626 PCI_LOST_IRQ_DISABLE_MSI, 670 PCI_LOST_IRQ_DISABLE_MSI,
@@ -750,11 +794,19 @@ int pci_set_power_state(struct pci_dev *dev, pci_power_t state);
750pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); 794pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state);
751bool pci_pme_capable(struct pci_dev *dev, pci_power_t state); 795bool pci_pme_capable(struct pci_dev *dev, pci_power_t state);
752void pci_pme_active(struct pci_dev *dev, bool enable); 796void pci_pme_active(struct pci_dev *dev, bool enable);
753int pci_enable_wake(struct pci_dev *dev, pci_power_t state, bool enable); 797int __pci_enable_wake(struct pci_dev *dev, pci_power_t state,
798 bool runtime, bool enable);
754int pci_wake_from_d3(struct pci_dev *dev, bool enable); 799int pci_wake_from_d3(struct pci_dev *dev, bool enable);
755pci_power_t pci_target_state(struct pci_dev *dev); 800pci_power_t pci_target_state(struct pci_dev *dev);
756int pci_prepare_to_sleep(struct pci_dev *dev); 801int pci_prepare_to_sleep(struct pci_dev *dev);
757int pci_back_from_sleep(struct pci_dev *dev); 802int pci_back_from_sleep(struct pci_dev *dev);
803bool pci_dev_run_wake(struct pci_dev *dev);
804
805static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state,
806 bool enable)
807{
808 return __pci_enable_wake(dev, state, false, enable);
809}
758 810
759/* For use by arch with custom probe code */ 811/* For use by arch with custom probe code */
760void set_pcie_port_type(struct pci_dev *pdev); 812void set_pcie_port_type(struct pci_dev *pdev);
@@ -776,6 +828,7 @@ void pci_bus_assign_resources(const struct pci_bus *bus);
776void pci_bus_size_bridges(struct pci_bus *bus); 828void pci_bus_size_bridges(struct pci_bus *bus);
777int pci_claim_resource(struct pci_dev *, int); 829int pci_claim_resource(struct pci_dev *, int);
778void pci_assign_unassigned_resources(void); 830void pci_assign_unassigned_resources(void);
831void pci_assign_unassigned_bridge_resources(struct pci_dev *bridge);
779void pdev_enable_device(struct pci_dev *); 832void pdev_enable_device(struct pci_dev *);
780void pdev_sort_resources(struct pci_dev *, struct resource_list *); 833void pdev_sort_resources(struct pci_dev *, struct resource_list *);
781int pci_enable_resources(struct pci_dev *, int mask); 834int pci_enable_resources(struct pci_dev *, int mask);
@@ -793,12 +846,23 @@ int pci_request_selected_regions_exclusive(struct pci_dev *, int, const char *);
793void pci_release_selected_regions(struct pci_dev *, int); 846void pci_release_selected_regions(struct pci_dev *, int);
794 847
795/* drivers/pci/bus.c */ 848/* drivers/pci/bus.c */
849void pci_bus_add_resource(struct pci_bus *bus, struct resource *res, unsigned int flags);
850struct resource *pci_bus_resource_n(const struct pci_bus *bus, int n);
851void pci_bus_remove_resources(struct pci_bus *bus);
852
853#define pci_bus_for_each_resource(bus, res, i) \
854 for (i = 0; \
855 (res = pci_bus_resource_n(bus, i)) || i < PCI_BRIDGE_RESOURCE_NUM; \
856 i++)
857
796int __must_check pci_bus_alloc_resource(struct pci_bus *bus, 858int __must_check pci_bus_alloc_resource(struct pci_bus *bus,
797 struct resource *res, resource_size_t size, 859 struct resource *res, resource_size_t size,
798 resource_size_t align, resource_size_t min, 860 resource_size_t align, resource_size_t min,
799 unsigned int type_mask, 861 unsigned int type_mask,
800 void (*alignf)(void *, struct resource *, 862 resource_size_t (*alignf)(void *,
801 resource_size_t, resource_size_t), 863 const struct resource *,
864 resource_size_t,
865 resource_size_t),
802 void *alignf_data); 866 void *alignf_data);
803void pci_enable_bridges(struct pci_bus *bus); 867void pci_enable_bridges(struct pci_bus *bus);
804 868
@@ -959,6 +1023,11 @@ static inline int pci_proc_domain(struct pci_bus *bus)
959} 1023}
960#endif /* CONFIG_PCI_DOMAINS */ 1024#endif /* CONFIG_PCI_DOMAINS */
961 1025
1026/* some architectures require additional setup to direct VGA traffic */
1027typedef int (*arch_set_vga_state_t)(struct pci_dev *pdev, bool decode,
1028 unsigned int command_bits, bool change_bridge);
1029extern void pci_register_set_vga_state(arch_set_vga_state_t func);
1030
962#else /* CONFIG_PCI is not enabled */ 1031#else /* CONFIG_PCI is not enabled */
963 1032
964/* 1033/*
@@ -977,13 +1046,6 @@ static inline int pci_proc_domain(struct pci_bus *bus)
977_PCI_NOP_ALL(read, *) 1046_PCI_NOP_ALL(read, *)
978_PCI_NOP_ALL(write,) 1047_PCI_NOP_ALL(write,)
979 1048
980static inline struct pci_dev *pci_find_device(unsigned int vendor,
981 unsigned int device,
982 struct pci_dev *from)
983{
984 return NULL;
985}
986
987static inline struct pci_dev *pci_get_device(unsigned int vendor, 1049static inline struct pci_dev *pci_get_device(unsigned int vendor,
988 unsigned int device, 1050 unsigned int device,
989 struct pci_dev *from) 1051 struct pci_dev *from)
@@ -1241,8 +1303,12 @@ enum pci_fixup_pass {
1241 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend, \ 1303 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend, \
1242 suspend##vendor##device##hook, vendor, device, hook) 1304 suspend##vendor##device##hook, vendor, device, hook)
1243 1305
1244 1306#ifdef CONFIG_PCI_QUIRKS
1245void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); 1307void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev);
1308#else
1309static inline void pci_fixup_device(enum pci_fixup_pass pass,
1310 struct pci_dev *dev) {}
1311#endif
1246 1312
1247void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen); 1313void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen);
1248void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr); 1314void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr);
diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h
index 652ba797696d..5d09cbafa7db 100644
--- a/include/linux/pci_hotplug.h
+++ b/include/linux/pci_hotplug.h
@@ -28,26 +28,6 @@
28#ifndef _PCI_HOTPLUG_H 28#ifndef _PCI_HOTPLUG_H
29#define _PCI_HOTPLUG_H 29#define _PCI_HOTPLUG_H
30 30
31
32/* These values come from the PCI Hotplug Spec */
33enum pci_bus_speed {
34 PCI_SPEED_33MHz = 0x00,
35 PCI_SPEED_66MHz = 0x01,
36 PCI_SPEED_66MHz_PCIX = 0x02,
37 PCI_SPEED_100MHz_PCIX = 0x03,
38 PCI_SPEED_133MHz_PCIX = 0x04,
39 PCI_SPEED_66MHz_PCIX_ECC = 0x05,
40 PCI_SPEED_100MHz_PCIX_ECC = 0x06,
41 PCI_SPEED_133MHz_PCIX_ECC = 0x07,
42 PCI_SPEED_66MHz_PCIX_266 = 0x09,
43 PCI_SPEED_100MHz_PCIX_266 = 0x0a,
44 PCI_SPEED_133MHz_PCIX_266 = 0x0b,
45 PCI_SPEED_66MHz_PCIX_533 = 0x11,
46 PCI_SPEED_100MHz_PCIX_533 = 0x12,
47 PCI_SPEED_133MHz_PCIX_533 = 0x13,
48 PCI_SPEED_UNKNOWN = 0xff,
49};
50
51/* These values come from the PCI Express Spec */ 31/* These values come from the PCI Express Spec */
52enum pcie_link_width { 32enum pcie_link_width {
53 PCIE_LNK_WIDTH_RESRV = 0x00, 33 PCIE_LNK_WIDTH_RESRV = 0x00,
@@ -61,12 +41,6 @@ enum pcie_link_width {
61 PCIE_LNK_WIDTH_UNKNOWN = 0xFF, 41 PCIE_LNK_WIDTH_UNKNOWN = 0xFF,
62}; 42};
63 43
64enum pcie_link_speed {
65 PCIE_2_5GB = 0x14,
66 PCIE_5_0GB = 0x15,
67 PCIE_LNK_SPEED_UNKNOWN = 0xFF,
68};
69
70/** 44/**
71 * struct hotplug_slot_ops -the callbacks that the hotplug pci core can use 45 * struct hotplug_slot_ops -the callbacks that the hotplug pci core can use
72 * @owner: The module owner of this structure 46 * @owner: The module owner of this structure
@@ -89,12 +63,6 @@ enum pcie_link_speed {
89 * @get_adapter_status: Called to get see if an adapter is present in the slot or not. 63 * @get_adapter_status: Called to get see if an adapter is present in the slot or not.
90 * If this field is NULL, the value passed in the struct hotplug_slot_info 64 * If this field is NULL, the value passed in the struct hotplug_slot_info
91 * will be used when this value is requested by a user. 65 * will be used when this value is requested by a user.
92 * @get_max_bus_speed: Called to get the max bus speed for a slot.
93 * If this field is NULL, the value passed in the struct hotplug_slot_info
94 * will be used when this value is requested by a user.
95 * @get_cur_bus_speed: Called to get the current bus speed for a slot.
96 * If this field is NULL, the value passed in the struct hotplug_slot_info
97 * will be used when this value is requested by a user.
98 * 66 *
99 * The table of function pointers that is passed to the hotplug pci core by a 67 * The table of function pointers that is passed to the hotplug pci core by a
100 * hotplug pci driver. These functions are called by the hotplug pci core when 68 * hotplug pci driver. These functions are called by the hotplug pci core when
@@ -112,17 +80,14 @@ struct hotplug_slot_ops {
112 int (*get_attention_status) (struct hotplug_slot *slot, u8 *value); 80 int (*get_attention_status) (struct hotplug_slot *slot, u8 *value);
113 int (*get_latch_status) (struct hotplug_slot *slot, u8 *value); 81 int (*get_latch_status) (struct hotplug_slot *slot, u8 *value);
114 int (*get_adapter_status) (struct hotplug_slot *slot, u8 *value); 82 int (*get_adapter_status) (struct hotplug_slot *slot, u8 *value);
115 int (*get_max_bus_speed) (struct hotplug_slot *slot, enum pci_bus_speed *value);
116 int (*get_cur_bus_speed) (struct hotplug_slot *slot, enum pci_bus_speed *value);
117}; 83};
118 84
119/** 85/**
120 * struct hotplug_slot_info - used to notify the hotplug pci core of the state of the slot 86 * struct hotplug_slot_info - used to notify the hotplug pci core of the state of the slot
121 * @power: if power is enabled or not (1/0) 87 * @power_status: if power is enabled or not (1/0)
122 * @attention_status: if the attention light is enabled or not (1/0) 88 * @attention_status: if the attention light is enabled or not (1/0)
123 * @latch_status: if the latch (if any) is open or closed (1/0) 89 * @latch_status: if the latch (if any) is open or closed (1/0)
124 * @adapter_present: if there is a pci board present in the slot or not (1/0) 90 * @adapter_status: if there is a pci board present in the slot or not (1/0)
125 * @address: (domain << 16 | bus << 8 | dev)
126 * 91 *
127 * Used to notify the hotplug pci core of the status of a specific slot. 92 * Used to notify the hotplug pci core of the status of a specific slot.
128 */ 93 */
@@ -131,8 +96,6 @@ struct hotplug_slot_info {
131 u8 attention_status; 96 u8 attention_status;
132 u8 latch_status; 97 u8 latch_status;
133 u8 adapter_status; 98 u8 adapter_status;
134 enum pci_bus_speed max_bus_speed;
135 enum pci_bus_speed cur_bus_speed;
136}; 99};
137 100
138/** 101/**
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index cca8a044e2b6..0be824320580 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2417,6 +2417,9 @@
2417#define PCI_DEVICE_ID_INTEL_82840_HB 0x1a21 2417#define PCI_DEVICE_ID_INTEL_82840_HB 0x1a21
2418#define PCI_DEVICE_ID_INTEL_82845_HB 0x1a30 2418#define PCI_DEVICE_ID_INTEL_82845_HB 0x1a30
2419#define PCI_DEVICE_ID_INTEL_IOAT 0x1a38 2419#define PCI_DEVICE_ID_INTEL_IOAT 0x1a38
2420#define PCI_DEVICE_ID_INTEL_CPT_SMBUS 0x1c22
2421#define PCI_DEVICE_ID_INTEL_CPT_LPC1 0x1c42
2422#define PCI_DEVICE_ID_INTEL_CPT_LPC2 0x1c43
2420#define PCI_DEVICE_ID_INTEL_82801AA_0 0x2410 2423#define PCI_DEVICE_ID_INTEL_82801AA_0 0x2410
2421#define PCI_DEVICE_ID_INTEL_82801AA_1 0x2411 2424#define PCI_DEVICE_ID_INTEL_82801AA_1 0x2411
2422#define PCI_DEVICE_ID_INTEL_82801AA_3 0x2413 2425#define PCI_DEVICE_ID_INTEL_82801AA_3 0x2413
diff --git a/include/linux/percpu_counter.h b/include/linux/percpu_counter.h
index a7684a513994..794662b2be5d 100644
--- a/include/linux/percpu_counter.h
+++ b/include/linux/percpu_counter.h
@@ -98,9 +98,6 @@ static inline void percpu_counter_set(struct percpu_counter *fbc, s64 amount)
98 fbc->count = amount; 98 fbc->count = amount;
99} 99}
100 100
101#define __percpu_counter_add(fbc, amount, batch) \
102 percpu_counter_add(fbc, amount)
103
104static inline void 101static inline void
105percpu_counter_add(struct percpu_counter *fbc, s64 amount) 102percpu_counter_add(struct percpu_counter *fbc, s64 amount)
106{ 103{
@@ -109,6 +106,12 @@ percpu_counter_add(struct percpu_counter *fbc, s64 amount)
109 preempt_enable(); 106 preempt_enable();
110} 107}
111 108
109static inline void
110__percpu_counter_add(struct percpu_counter *fbc, s64 amount, s32 batch)
111{
112 percpu_counter_add(fbc, amount);
113}
114
112static inline s64 percpu_counter_read(struct percpu_counter *fbc) 115static inline s64 percpu_counter_read(struct percpu_counter *fbc)
113{ 116{
114 return fbc->count; 117 return fbc->count;
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index a177698d95e2..7b18b4fd5df7 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -288,7 +288,7 @@ struct perf_event_mmap_page {
288}; 288};
289 289
290#define PERF_RECORD_MISC_CPUMODE_MASK (3 << 0) 290#define PERF_RECORD_MISC_CPUMODE_MASK (3 << 0)
291#define PERF_RECORD_MISC_CPUMODE_UNKNOWN (0 << 0) 291#define PERF_RECORD_MISC_CPUMODE_UNKNOWN (0 << 0)
292#define PERF_RECORD_MISC_KERNEL (1 << 0) 292#define PERF_RECORD_MISC_KERNEL (1 << 0)
293#define PERF_RECORD_MISC_USER (2 << 0) 293#define PERF_RECORD_MISC_USER (2 << 0)
294#define PERF_RECORD_MISC_HYPERVISOR (3 << 0) 294#define PERF_RECORD_MISC_HYPERVISOR (3 << 0)
@@ -354,8 +354,8 @@ enum perf_event_type {
354 * u64 stream_id; 354 * u64 stream_id;
355 * }; 355 * };
356 */ 356 */
357 PERF_RECORD_THROTTLE = 5, 357 PERF_RECORD_THROTTLE = 5,
358 PERF_RECORD_UNTHROTTLE = 6, 358 PERF_RECORD_UNTHROTTLE = 6,
359 359
360 /* 360 /*
361 * struct { 361 * struct {
@@ -369,10 +369,10 @@ enum perf_event_type {
369 369
370 /* 370 /*
371 * struct { 371 * struct {
372 * struct perf_event_header header; 372 * struct perf_event_header header;
373 * u32 pid, tid; 373 * u32 pid, tid;
374 * 374 *
375 * struct read_format values; 375 * struct read_format values;
376 * }; 376 * };
377 */ 377 */
378 PERF_RECORD_READ = 8, 378 PERF_RECORD_READ = 8,
@@ -410,7 +410,7 @@ enum perf_event_type {
410 * char data[size];}&& PERF_SAMPLE_RAW 410 * char data[size];}&& PERF_SAMPLE_RAW
411 * }; 411 * };
412 */ 412 */
413 PERF_RECORD_SAMPLE = 9, 413 PERF_RECORD_SAMPLE = 9,
414 414
415 PERF_RECORD_MAX, /* non-ABI */ 415 PERF_RECORD_MAX, /* non-ABI */
416}; 416};
@@ -476,9 +476,11 @@ struct hw_perf_event {
476 union { 476 union {
477 struct { /* hardware */ 477 struct { /* hardware */
478 u64 config; 478 u64 config;
479 u64 last_tag;
479 unsigned long config_base; 480 unsigned long config_base;
480 unsigned long event_base; 481 unsigned long event_base;
481 int idx; 482 int idx;
483 int last_cpu;
482 }; 484 };
483 struct { /* software */ 485 struct { /* software */
484 s64 remaining; 486 s64 remaining;
@@ -496,9 +498,8 @@ struct hw_perf_event {
496 atomic64_t period_left; 498 atomic64_t period_left;
497 u64 interrupts; 499 u64 interrupts;
498 500
499 u64 freq_count; 501 u64 freq_time_stamp;
500 u64 freq_interrupts; 502 u64 freq_count_stamp;
501 u64 freq_stamp;
502#endif 503#endif
503}; 504};
504 505
@@ -510,6 +511,8 @@ struct perf_event;
510struct pmu { 511struct pmu {
511 int (*enable) (struct perf_event *event); 512 int (*enable) (struct perf_event *event);
512 void (*disable) (struct perf_event *event); 513 void (*disable) (struct perf_event *event);
514 int (*start) (struct perf_event *event);
515 void (*stop) (struct perf_event *event);
513 void (*read) (struct perf_event *event); 516 void (*read) (struct perf_event *event);
514 void (*unthrottle) (struct perf_event *event); 517 void (*unthrottle) (struct perf_event *event);
515}; 518};
@@ -563,6 +566,10 @@ typedef void (*perf_overflow_handler_t)(struct perf_event *, int,
563 struct perf_sample_data *, 566 struct perf_sample_data *,
564 struct pt_regs *regs); 567 struct pt_regs *regs);
565 568
569enum perf_group_flag {
570 PERF_GROUP_SOFTWARE = 0x1,
571};
572
566/** 573/**
567 * struct perf_event - performance event kernel representation: 574 * struct perf_event - performance event kernel representation:
568 */ 575 */
@@ -572,6 +579,7 @@ struct perf_event {
572 struct list_head event_entry; 579 struct list_head event_entry;
573 struct list_head sibling_list; 580 struct list_head sibling_list;
574 int nr_siblings; 581 int nr_siblings;
582 int group_flags;
575 struct perf_event *group_leader; 583 struct perf_event *group_leader;
576 struct perf_event *output; 584 struct perf_event *output;
577 const struct pmu *pmu; 585 const struct pmu *pmu;
@@ -656,7 +664,7 @@ struct perf_event {
656 664
657 perf_overflow_handler_t overflow_handler; 665 perf_overflow_handler_t overflow_handler;
658 666
659#ifdef CONFIG_EVENT_PROFILE 667#ifdef CONFIG_EVENT_TRACING
660 struct event_filter *filter; 668 struct event_filter *filter;
661#endif 669#endif
662 670
@@ -681,7 +689,8 @@ struct perf_event_context {
681 */ 689 */
682 struct mutex mutex; 690 struct mutex mutex;
683 691
684 struct list_head group_list; 692 struct list_head pinned_groups;
693 struct list_head flexible_groups;
685 struct list_head event_list; 694 struct list_head event_list;
686 int nr_events; 695 int nr_events;
687 int nr_active; 696 int nr_active;
@@ -744,10 +753,9 @@ extern int perf_max_events;
744 753
745extern const struct pmu *hw_perf_event_init(struct perf_event *event); 754extern const struct pmu *hw_perf_event_init(struct perf_event *event);
746 755
747extern void perf_event_task_sched_in(struct task_struct *task, int cpu); 756extern void perf_event_task_sched_in(struct task_struct *task);
748extern void perf_event_task_sched_out(struct task_struct *task, 757extern void perf_event_task_sched_out(struct task_struct *task, struct task_struct *next);
749 struct task_struct *next, int cpu); 758extern void perf_event_task_tick(struct task_struct *task);
750extern void perf_event_task_tick(struct task_struct *task, int cpu);
751extern int perf_event_init_task(struct task_struct *child); 759extern int perf_event_init_task(struct task_struct *child);
752extern void perf_event_exit_task(struct task_struct *child); 760extern void perf_event_exit_task(struct task_struct *child);
753extern void perf_event_free_task(struct task_struct *task); 761extern void perf_event_free_task(struct task_struct *task);
@@ -762,7 +770,7 @@ extern int perf_event_task_disable(void);
762extern int perf_event_task_enable(void); 770extern int perf_event_task_enable(void);
763extern int hw_perf_group_sched_in(struct perf_event *group_leader, 771extern int hw_perf_group_sched_in(struct perf_event *group_leader,
764 struct perf_cpu_context *cpuctx, 772 struct perf_cpu_context *cpuctx,
765 struct perf_event_context *ctx, int cpu); 773 struct perf_event_context *ctx);
766extern void perf_event_update_userpage(struct perf_event *event); 774extern void perf_event_update_userpage(struct perf_event *event);
767extern int perf_event_release_kernel(struct perf_event *event); 775extern int perf_event_release_kernel(struct perf_event *event);
768extern struct perf_event * 776extern struct perf_event *
@@ -851,8 +859,7 @@ extern int sysctl_perf_event_mlock;
851extern int sysctl_perf_event_sample_rate; 859extern int sysctl_perf_event_sample_rate;
852 860
853extern void perf_event_init(void); 861extern void perf_event_init(void);
854extern void perf_tp_event(int event_id, u64 addr, u64 count, 862extern void perf_tp_event(int event_id, u64 addr, u64 count, void *record, int entry_size);
855 void *record, int entry_size);
856extern void perf_bp_event(struct perf_event *event, void *data); 863extern void perf_bp_event(struct perf_event *event, void *data);
857 864
858#ifndef perf_misc_flags 865#ifndef perf_misc_flags
@@ -873,12 +880,12 @@ extern void perf_event_enable(struct perf_event *event);
873extern void perf_event_disable(struct perf_event *event); 880extern void perf_event_disable(struct perf_event *event);
874#else 881#else
875static inline void 882static inline void
876perf_event_task_sched_in(struct task_struct *task, int cpu) { } 883perf_event_task_sched_in(struct task_struct *task) { }
877static inline void 884static inline void
878perf_event_task_sched_out(struct task_struct *task, 885perf_event_task_sched_out(struct task_struct *task,
879 struct task_struct *next, int cpu) { } 886 struct task_struct *next) { }
880static inline void 887static inline void
881perf_event_task_tick(struct task_struct *task, int cpu) { } 888perf_event_task_tick(struct task_struct *task) { }
882static inline int perf_event_init_task(struct task_struct *child) { return 0; } 889static inline int perf_event_init_task(struct task_struct *child) { return 0; }
883static inline void perf_event_exit_task(struct task_struct *child) { } 890static inline void perf_event_exit_task(struct task_struct *child) { }
884static inline void perf_event_free_task(struct task_struct *task) { } 891static inline void perf_event_free_task(struct task_struct *task) { }
@@ -893,13 +900,13 @@ static inline void
893perf_sw_event(u32 event_id, u64 nr, int nmi, 900perf_sw_event(u32 event_id, u64 nr, int nmi,
894 struct pt_regs *regs, u64 addr) { } 901 struct pt_regs *regs, u64 addr) { }
895static inline void 902static inline void
896perf_bp_event(struct perf_event *event, void *data) { } 903perf_bp_event(struct perf_event *event, void *data) { }
897 904
898static inline void perf_event_mmap(struct vm_area_struct *vma) { } 905static inline void perf_event_mmap(struct vm_area_struct *vma) { }
899static inline void perf_event_comm(struct task_struct *tsk) { } 906static inline void perf_event_comm(struct task_struct *tsk) { }
900static inline void perf_event_fork(struct task_struct *tsk) { } 907static inline void perf_event_fork(struct task_struct *tsk) { }
901static inline void perf_event_init(void) { } 908static inline void perf_event_init(void) { }
902static inline int perf_swevent_get_recursion_context(void) { return -1; } 909static inline int perf_swevent_get_recursion_context(void) { return -1; }
903static inline void perf_swevent_put_recursion_context(int rctx) { } 910static inline void perf_swevent_put_recursion_context(int rctx) { }
904static inline void perf_event_enable(struct perf_event *event) { } 911static inline void perf_event_enable(struct perf_event *event) { }
905static inline void perf_event_disable(struct perf_event *event) { } 912static inline void perf_event_disable(struct perf_event *event) { }
diff --git a/include/linux/pfkeyv2.h b/include/linux/pfkeyv2.h
index 228b0b6306b0..0b80c806631f 100644
--- a/include/linux/pfkeyv2.h
+++ b/include/linux/pfkeyv2.h
@@ -315,6 +315,7 @@ struct sadb_x_kmaddress {
315#define SADB_X_EALG_AES_GCM_ICV12 19 315#define SADB_X_EALG_AES_GCM_ICV12 19
316#define SADB_X_EALG_AES_GCM_ICV16 20 316#define SADB_X_EALG_AES_GCM_ICV16 20
317#define SADB_X_EALG_CAMELLIACBC 22 317#define SADB_X_EALG_CAMELLIACBC 22
318#define SADB_X_EALG_NULL_AES_GMAC 23
318#define SADB_EALG_MAX 253 /* last EALG */ 319#define SADB_EALG_MAX 253 /* last EALG */
319/* private allocations should use 249-255 (RFC2407) */ 320/* private allocations should use 249-255 (RFC2407) */
320#define SADB_X_EALG_SERPENTCBC 252 /* draft-ietf-ipsec-ciph-aes-cbc-00 */ 321#define SADB_X_EALG_SERPENTCBC 252 /* draft-ietf-ipsec-ciph-aes-cbc-00 */
diff --git a/include/linux/plist.h b/include/linux/plist.h
index 8227f717c70f..6898985e7b38 100644
--- a/include/linux/plist.h
+++ b/include/linux/plist.h
@@ -45,7 +45,7 @@
45 * the insertion of new nodes. There are no nodes with duplicate 45 * the insertion of new nodes. There are no nodes with duplicate
46 * priorites on the list. 46 * priorites on the list.
47 * 47 *
48 * The nodes on the node_list is ordered by priority and can contain 48 * The nodes on the node_list are ordered by priority and can contain
49 * entries which have the same priority. Those entries are ordered 49 * entries which have the same priority. Those entries are ordered
50 * FIFO 50 * FIFO
51 * 51 *
@@ -265,7 +265,7 @@ static inline int plist_node_empty(const struct plist_node *node)
265 * 265 *
266 * Assumes the plist is _not_ empty. 266 * Assumes the plist is _not_ empty.
267 */ 267 */
268static inline struct plist_node* plist_first(const struct plist_head *head) 268static inline struct plist_node *plist_first(const struct plist_head *head)
269{ 269{
270 return list_entry(head->node_list.next, 270 return list_entry(head->node_list.next,
271 struct plist_node, plist.node_list); 271 struct plist_node, plist.node_list);
diff --git a/include/linux/pm.h b/include/linux/pm.h
index 198b8f9fe05e..e80df06ad22a 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -26,6 +26,7 @@
26#include <linux/spinlock.h> 26#include <linux/spinlock.h>
27#include <linux/wait.h> 27#include <linux/wait.h>
28#include <linux/timer.h> 28#include <linux/timer.h>
29#include <linux/completion.h>
29 30
30/* 31/*
31 * Callbacks for platform drivers to implement. 32 * Callbacks for platform drivers to implement.
@@ -412,9 +413,11 @@ struct dev_pm_info {
412 pm_message_t power_state; 413 pm_message_t power_state;
413 unsigned int can_wakeup:1; 414 unsigned int can_wakeup:1;
414 unsigned int should_wakeup:1; 415 unsigned int should_wakeup:1;
416 unsigned async_suspend:1;
415 enum dpm_state status; /* Owned by the PM core */ 417 enum dpm_state status; /* Owned by the PM core */
416#ifdef CONFIG_PM_SLEEP 418#ifdef CONFIG_PM_SLEEP
417 struct list_head entry; 419 struct list_head entry;
420 struct completion completion;
418#endif 421#endif
419#ifdef CONFIG_PM_RUNTIME 422#ifdef CONFIG_PM_RUNTIME
420 struct timer_list suspend_timer; 423 struct timer_list suspend_timer;
@@ -430,6 +433,7 @@ struct dev_pm_info {
430 unsigned int request_pending:1; 433 unsigned int request_pending:1;
431 unsigned int deferred_resume:1; 434 unsigned int deferred_resume:1;
432 unsigned int run_wake:1; 435 unsigned int run_wake:1;
436 unsigned int runtime_auto:1;
433 enum rpm_request request; 437 enum rpm_request request;
434 enum rpm_status runtime_status; 438 enum rpm_status runtime_status;
435 int runtime_error; 439 int runtime_error;
@@ -508,6 +512,7 @@ extern void __suspend_report_result(const char *function, void *fn, int ret);
508 __suspend_report_result(__func__, fn, ret); \ 512 __suspend_report_result(__func__, fn, ret); \
509 } while (0) 513 } while (0)
510 514
515extern void device_pm_wait_for_dev(struct device *sub, struct device *dev);
511#else /* !CONFIG_PM_SLEEP */ 516#else /* !CONFIG_PM_SLEEP */
512 517
513#define device_pm_lock() do {} while (0) 518#define device_pm_lock() do {} while (0)
@@ -520,6 +525,7 @@ static inline int dpm_suspend_start(pm_message_t state)
520 525
521#define suspend_report_result(fn, ret) do {} while (0) 526#define suspend_report_result(fn, ret) do {} while (0)
522 527
528static inline void device_pm_wait_for_dev(struct device *a, struct device *b) {}
523#endif /* !CONFIG_PM_SLEEP */ 529#endif /* !CONFIG_PM_SLEEP */
524 530
525/* How to reorder dpm_list after device_move() */ 531/* How to reorder dpm_list after device_move() */
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h
index 370ce0a6fe4a..7d773aac5314 100644
--- a/include/linux/pm_runtime.h
+++ b/include/linux/pm_runtime.h
@@ -28,6 +28,8 @@ extern int __pm_runtime_set_status(struct device *dev, unsigned int status);
28extern int pm_runtime_barrier(struct device *dev); 28extern int pm_runtime_barrier(struct device *dev);
29extern void pm_runtime_enable(struct device *dev); 29extern void pm_runtime_enable(struct device *dev);
30extern void __pm_runtime_disable(struct device *dev, bool check_resume); 30extern void __pm_runtime_disable(struct device *dev, bool check_resume);
31extern void pm_runtime_allow(struct device *dev);
32extern void pm_runtime_forbid(struct device *dev);
31 33
32static inline bool pm_children_suspended(struct device *dev) 34static inline bool pm_children_suspended(struct device *dev)
33{ 35{
@@ -78,6 +80,8 @@ static inline int __pm_runtime_set_status(struct device *dev,
78static inline int pm_runtime_barrier(struct device *dev) { return 0; } 80static inline int pm_runtime_barrier(struct device *dev) { return 0; }
79static inline void pm_runtime_enable(struct device *dev) {} 81static inline void pm_runtime_enable(struct device *dev) {}
80static inline void __pm_runtime_disable(struct device *dev, bool c) {} 82static inline void __pm_runtime_disable(struct device *dev, bool c) {}
83static inline void pm_runtime_allow(struct device *dev) {}
84static inline void pm_runtime_forbid(struct device *dev) {}
81 85
82static inline bool pm_children_suspended(struct device *dev) { return false; } 86static inline bool pm_children_suspended(struct device *dev) { return false; }
83static inline void pm_suspend_ignore_children(struct device *dev, bool en) {} 87static inline void pm_suspend_ignore_children(struct device *dev, bool en) {}
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
index 56f2d63a5cbb..c5eab89da51e 100644
--- a/include/linux/ptrace.h
+++ b/include/linux/ptrace.h
@@ -27,6 +27,26 @@
27#define PTRACE_GETSIGINFO 0x4202 27#define PTRACE_GETSIGINFO 0x4202
28#define PTRACE_SETSIGINFO 0x4203 28#define PTRACE_SETSIGINFO 0x4203
29 29
30/*
31 * Generic ptrace interface that exports the architecture specific regsets
32 * using the corresponding NT_* types (which are also used in the core dump).
33 * Please note that the NT_PRSTATUS note type in a core dump contains a full
34 * 'struct elf_prstatus'. But the user_regset for NT_PRSTATUS contains just the
35 * elf_gregset_t that is the pr_reg field of 'struct elf_prstatus'. For all the
36 * other user_regset flavors, the user_regset layout and the ELF core dump note
37 * payload are exactly the same layout.
38 *
39 * This interface usage is as follows:
40 * struct iovec iov = { buf, len};
41 *
42 * ret = ptrace(PTRACE_GETREGSET/PTRACE_SETREGSET, pid, NT_XXX_TYPE, &iov);
43 *
44 * On the successful completion, iov.len will be updated by the kernel,
45 * specifying how much the kernel has written/read to/from the user's iov.buf.
46 */
47#define PTRACE_GETREGSET 0x4204
48#define PTRACE_SETREGSET 0x4205
49
30/* options set using PTRACE_SETOPTIONS */ 50/* options set using PTRACE_SETOPTIONS */
31#define PTRACE_O_TRACESYSGOOD 0x00000001 51#define PTRACE_O_TRACESYSGOOD 0x00000001
32#define PTRACE_O_TRACEFORK 0x00000002 52#define PTRACE_O_TRACEFORK 0x00000002
diff --git a/include/linux/raid_class.h b/include/linux/raid_class.h
index 6b537f1ac96c..31e1ff69efc8 100644
--- a/include/linux/raid_class.h
+++ b/include/linux/raid_class.h
@@ -32,6 +32,7 @@ enum raid_level {
32 RAID_LEVEL_0, 32 RAID_LEVEL_0,
33 RAID_LEVEL_1, 33 RAID_LEVEL_1,
34 RAID_LEVEL_10, 34 RAID_LEVEL_10,
35 RAID_LEVEL_1E,
35 RAID_LEVEL_3, 36 RAID_LEVEL_3,
36 RAID_LEVEL_4, 37 RAID_LEVEL_4,
37 RAID_LEVEL_5, 38 RAID_LEVEL_5,
diff --git a/include/linux/resume-trace.h b/include/linux/resume-trace.h
index c9ba2fdf807d..bc8c3881c729 100644
--- a/include/linux/resume-trace.h
+++ b/include/linux/resume-trace.h
@@ -6,6 +6,11 @@
6 6
7extern int pm_trace_enabled; 7extern int pm_trace_enabled;
8 8
9static inline int pm_trace_is_enabled(void)
10{
11 return pm_trace_enabled;
12}
13
9struct device; 14struct device;
10extern void set_trace_device(struct device *); 15extern void set_trace_device(struct device *);
11extern void generate_resume_trace(const void *tracedata, unsigned int user); 16extern void generate_resume_trace(const void *tracedata, unsigned int user);
@@ -17,6 +22,8 @@ extern void generate_resume_trace(const void *tracedata, unsigned int user);
17 22
18#else 23#else
19 24
25static inline int pm_trace_is_enabled(void) { return 0; }
26
20#define TRACE_DEVICE(dev) do { } while (0) 27#define TRACE_DEVICE(dev) do { } while (0)
21#define TRACE_RESUME(dev) do { } while (0) 28#define TRACE_RESUME(dev) do { } while (0)
22 29
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 78efe7c485ac..0eef87b58ea5 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -740,14 +740,6 @@ struct user_struct {
740 uid_t uid; 740 uid_t uid;
741 struct user_namespace *user_ns; 741 struct user_namespace *user_ns;
742 742
743#ifdef CONFIG_USER_SCHED
744 struct task_group *tg;
745#ifdef CONFIG_SYSFS
746 struct kobject kobj;
747 struct delayed_work work;
748#endif
749#endif
750
751#ifdef CONFIG_PERF_EVENTS 743#ifdef CONFIG_PERF_EVENTS
752 atomic_long_t locked_vm; 744 atomic_long_t locked_vm;
753#endif 745#endif
@@ -878,7 +870,10 @@ static inline int sd_balance_for_mc_power(void)
878 if (sched_smt_power_savings) 870 if (sched_smt_power_savings)
879 return SD_POWERSAVINGS_BALANCE; 871 return SD_POWERSAVINGS_BALANCE;
880 872
881 return SD_PREFER_SIBLING; 873 if (!sched_mc_power_savings)
874 return SD_PREFER_SIBLING;
875
876 return 0;
882} 877}
883 878
884static inline int sd_balance_for_package_power(void) 879static inline int sd_balance_for_package_power(void)
@@ -1084,7 +1079,8 @@ struct sched_domain;
1084struct sched_class { 1079struct sched_class {
1085 const struct sched_class *next; 1080 const struct sched_class *next;
1086 1081
1087 void (*enqueue_task) (struct rq *rq, struct task_struct *p, int wakeup); 1082 void (*enqueue_task) (struct rq *rq, struct task_struct *p, int wakeup,
1083 bool head);
1088 void (*dequeue_task) (struct rq *rq, struct task_struct *p, int sleep); 1084 void (*dequeue_task) (struct rq *rq, struct task_struct *p, int sleep);
1089 void (*yield_task) (struct rq *rq); 1085 void (*yield_task) (struct rq *rq);
1090 1086
@@ -1096,14 +1092,6 @@ struct sched_class {
1096#ifdef CONFIG_SMP 1092#ifdef CONFIG_SMP
1097 int (*select_task_rq)(struct task_struct *p, int sd_flag, int flags); 1093 int (*select_task_rq)(struct task_struct *p, int sd_flag, int flags);
1098 1094
1099 unsigned long (*load_balance) (struct rq *this_rq, int this_cpu,
1100 struct rq *busiest, unsigned long max_load_move,
1101 struct sched_domain *sd, enum cpu_idle_type idle,
1102 int *all_pinned, int *this_best_prio);
1103
1104 int (*move_one_task) (struct rq *this_rq, int this_cpu,
1105 struct rq *busiest, struct sched_domain *sd,
1106 enum cpu_idle_type idle);
1107 void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); 1095 void (*pre_schedule) (struct rq *this_rq, struct task_struct *task);
1108 void (*post_schedule) (struct rq *this_rq); 1096 void (*post_schedule) (struct rq *this_rq);
1109 void (*task_waking) (struct rq *this_rq, struct task_struct *task); 1097 void (*task_waking) (struct rq *this_rq, struct task_struct *task);
@@ -2517,13 +2505,9 @@ extern long sched_getaffinity(pid_t pid, struct cpumask *mask);
2517 2505
2518extern void normalize_rt_tasks(void); 2506extern void normalize_rt_tasks(void);
2519 2507
2520#ifdef CONFIG_GROUP_SCHED 2508#ifdef CONFIG_CGROUP_SCHED
2521 2509
2522extern struct task_group init_task_group; 2510extern struct task_group init_task_group;
2523#ifdef CONFIG_USER_SCHED
2524extern struct task_group root_task_group;
2525extern void set_tg_uid(struct user_struct *user);
2526#endif
2527 2511
2528extern struct task_group *sched_create_group(struct task_group *parent); 2512extern struct task_group *sched_create_group(struct task_group *parent);
2529extern void sched_destroy_group(struct task_group *tg); 2513extern void sched_destroy_group(struct task_group *tg);
diff --git a/include/linux/sh_intc.h b/include/linux/sh_intc.h
index 4ef246f14654..51d288d8ac88 100644
--- a/include/linux/sh_intc.h
+++ b/include/linux/sh_intc.h
@@ -45,7 +45,7 @@ struct intc_sense_reg {
45#define INTC_SMP(stride, nr) 45#define INTC_SMP(stride, nr)
46#endif 46#endif
47 47
48struct intc_desc { 48struct intc_hw_desc {
49 struct intc_vect *vectors; 49 struct intc_vect *vectors;
50 unsigned int nr_vectors; 50 unsigned int nr_vectors;
51 struct intc_group *groups; 51 struct intc_group *groups;
@@ -56,29 +56,40 @@ struct intc_desc {
56 unsigned int nr_prio_regs; 56 unsigned int nr_prio_regs;
57 struct intc_sense_reg *sense_regs; 57 struct intc_sense_reg *sense_regs;
58 unsigned int nr_sense_regs; 58 unsigned int nr_sense_regs;
59 char *name;
60 struct intc_mask_reg *ack_regs; 59 struct intc_mask_reg *ack_regs;
61 unsigned int nr_ack_regs; 60 unsigned int nr_ack_regs;
62}; 61};
63 62
64#define _INTC_ARRAY(a) a, sizeof(a)/sizeof(*a) 63#define _INTC_ARRAY(a) a, sizeof(a)/sizeof(*a)
64#define INTC_HW_DESC(vectors, groups, mask_regs, \
65 prio_regs, sense_regs, ack_regs) \
66{ \
67 _INTC_ARRAY(vectors), _INTC_ARRAY(groups), \
68 _INTC_ARRAY(mask_regs), _INTC_ARRAY(prio_regs), \
69 _INTC_ARRAY(sense_regs), _INTC_ARRAY(ack_regs), \
70}
71
72struct intc_desc {
73 char *name;
74 intc_enum force_enable;
75 intc_enum force_disable;
76 struct intc_hw_desc hw;
77};
78
65#define DECLARE_INTC_DESC(symbol, chipname, vectors, groups, \ 79#define DECLARE_INTC_DESC(symbol, chipname, vectors, groups, \
66 mask_regs, prio_regs, sense_regs) \ 80 mask_regs, prio_regs, sense_regs) \
67struct intc_desc symbol __initdata = { \ 81struct intc_desc symbol __initdata = { \
68 _INTC_ARRAY(vectors), _INTC_ARRAY(groups), \ 82 .name = chipname, \
69 _INTC_ARRAY(mask_regs), _INTC_ARRAY(prio_regs), \ 83 .hw = INTC_HW_DESC(vectors, groups, mask_regs, \
70 _INTC_ARRAY(sense_regs), \ 84 prio_regs, sense_regs, NULL), \
71 chipname, \
72} 85}
73 86
74#define DECLARE_INTC_DESC_ACK(symbol, chipname, vectors, groups, \ 87#define DECLARE_INTC_DESC_ACK(symbol, chipname, vectors, groups, \
75 mask_regs, prio_regs, sense_regs, ack_regs) \ 88 mask_regs, prio_regs, sense_regs, ack_regs) \
76struct intc_desc symbol __initdata = { \ 89struct intc_desc symbol __initdata = { \
77 _INTC_ARRAY(vectors), _INTC_ARRAY(groups), \ 90 .name = chipname, \
78 _INTC_ARRAY(mask_regs), _INTC_ARRAY(prio_regs), \ 91 .hw = INTC_HW_DESC(vectors, groups, mask_regs, \
79 _INTC_ARRAY(sense_regs), \ 92 prio_regs, sense_regs, ack_regs), \
80 chipname, \
81 _INTC_ARRAY(ack_regs), \
82} 93}
83 94
84void __init register_intc_controller(struct intc_desc *desc); 95void __init register_intc_controller(struct intc_desc *desc);
diff --git a/include/linux/spi/dw_spi.h b/include/linux/spi/dw_spi.h
index 51b3e771a9a3..cc813f95a2f2 100644
--- a/include/linux/spi/dw_spi.h
+++ b/include/linux/spi/dw_spi.h
@@ -90,6 +90,7 @@ struct dw_spi {
90 unsigned long paddr; 90 unsigned long paddr;
91 u32 iolen; 91 u32 iolen;
92 int irq; 92 int irq;
93 u32 fifo_len; /* depth of the FIFO buffer */
93 u32 max_freq; /* max bus freq supported */ 94 u32 max_freq; /* max bus freq supported */
94 95
95 u16 bus_num; 96 u16 bus_num;
@@ -171,6 +172,10 @@ static inline void spi_chip_sel(struct dw_spi *dws, u16 cs)
171{ 172{
172 if (cs > dws->num_cs) 173 if (cs > dws->num_cs)
173 return; 174 return;
175
176 if (dws->cs_control)
177 dws->cs_control(1);
178
174 dw_writel(dws, ser, 1 << cs); 179 dw_writel(dws, ser, 1 << cs);
175} 180}
176 181
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 207466a49f3d..8126f239edf0 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -99,7 +99,7 @@ struct perf_event_attr;
99#define __SC_TEST5(t5, a5, ...) __SC_TEST(t5); __SC_TEST4(__VA_ARGS__) 99#define __SC_TEST5(t5, a5, ...) __SC_TEST(t5); __SC_TEST4(__VA_ARGS__)
100#define __SC_TEST6(t6, a6, ...) __SC_TEST(t6); __SC_TEST5(__VA_ARGS__) 100#define __SC_TEST6(t6, a6, ...) __SC_TEST(t6); __SC_TEST5(__VA_ARGS__)
101 101
102#ifdef CONFIG_EVENT_PROFILE 102#ifdef CONFIG_PERF_EVENTS
103 103
104#define TRACE_SYS_ENTER_PROFILE_INIT(sname) \ 104#define TRACE_SYS_ENTER_PROFILE_INIT(sname) \
105 .profile_enable = prof_sysenter_enable, \ 105 .profile_enable = prof_sysenter_enable, \
@@ -113,7 +113,7 @@ struct perf_event_attr;
113#define TRACE_SYS_ENTER_PROFILE_INIT(sname) 113#define TRACE_SYS_ENTER_PROFILE_INIT(sname)
114#define TRACE_SYS_EXIT_PROFILE(sname) 114#define TRACE_SYS_EXIT_PROFILE(sname)
115#define TRACE_SYS_EXIT_PROFILE_INIT(sname) 115#define TRACE_SYS_EXIT_PROFILE_INIT(sname)
116#endif 116#endif /* CONFIG_PERF_EVENTS */
117 117
118#ifdef CONFIG_FTRACE_SYSCALLS 118#ifdef CONFIG_FTRACE_SYSCALLS
119#define __SC_STR_ADECL1(t, a) #a 119#define __SC_STR_ADECL1(t, a) #a
@@ -132,7 +132,8 @@ struct perf_event_attr;
132 132
133#define SYSCALL_TRACE_ENTER_EVENT(sname) \ 133#define SYSCALL_TRACE_ENTER_EVENT(sname) \
134 static const struct syscall_metadata __syscall_meta_##sname; \ 134 static const struct syscall_metadata __syscall_meta_##sname; \
135 static struct ftrace_event_call event_enter_##sname; \ 135 static struct ftrace_event_call \
136 __attribute__((__aligned__(4))) event_enter_##sname; \
136 static struct trace_event enter_syscall_print_##sname = { \ 137 static struct trace_event enter_syscall_print_##sname = { \
137 .trace = print_syscall_enter, \ 138 .trace = print_syscall_enter, \
138 }; \ 139 }; \
@@ -143,8 +144,7 @@ struct perf_event_attr;
143 .name = "sys_enter"#sname, \ 144 .name = "sys_enter"#sname, \
144 .system = "syscalls", \ 145 .system = "syscalls", \
145 .event = &enter_syscall_print_##sname, \ 146 .event = &enter_syscall_print_##sname, \
146 .raw_init = trace_event_raw_init, \ 147 .raw_init = init_syscall_trace, \
147 .show_format = syscall_enter_format, \
148 .define_fields = syscall_enter_define_fields, \ 148 .define_fields = syscall_enter_define_fields, \
149 .regfunc = reg_event_syscall_enter, \ 149 .regfunc = reg_event_syscall_enter, \
150 .unregfunc = unreg_event_syscall_enter, \ 150 .unregfunc = unreg_event_syscall_enter, \
@@ -154,7 +154,8 @@ struct perf_event_attr;
154 154
155#define SYSCALL_TRACE_EXIT_EVENT(sname) \ 155#define SYSCALL_TRACE_EXIT_EVENT(sname) \
156 static const struct syscall_metadata __syscall_meta_##sname; \ 156 static const struct syscall_metadata __syscall_meta_##sname; \
157 static struct ftrace_event_call event_exit_##sname; \ 157 static struct ftrace_event_call \
158 __attribute__((__aligned__(4))) event_exit_##sname; \
158 static struct trace_event exit_syscall_print_##sname = { \ 159 static struct trace_event exit_syscall_print_##sname = { \
159 .trace = print_syscall_exit, \ 160 .trace = print_syscall_exit, \
160 }; \ 161 }; \
@@ -165,8 +166,7 @@ struct perf_event_attr;
165 .name = "sys_exit"#sname, \ 166 .name = "sys_exit"#sname, \
166 .system = "syscalls", \ 167 .system = "syscalls", \
167 .event = &exit_syscall_print_##sname, \ 168 .event = &exit_syscall_print_##sname, \
168 .raw_init = trace_event_raw_init, \ 169 .raw_init = init_syscall_trace, \
169 .show_format = syscall_exit_format, \
170 .define_fields = syscall_exit_define_fields, \ 170 .define_fields = syscall_exit_define_fields, \
171 .regfunc = reg_event_syscall_exit, \ 171 .regfunc = reg_event_syscall_exit, \
172 .unregfunc = unreg_event_syscall_exit, \ 172 .unregfunc = unreg_event_syscall_exit, \
diff --git a/include/linux/usb.h b/include/linux/usb.h
index d7ace1b80f09..332eaea61021 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -339,6 +339,7 @@ struct usb_bus {
339 339
340 struct usb_devmap devmap; /* device address allocation map */ 340 struct usb_devmap devmap; /* device address allocation map */
341 struct usb_device *root_hub; /* Root hub */ 341 struct usb_device *root_hub; /* Root hub */
342 struct usb_bus *hs_companion; /* Companion EHCI bus, if any */
342 struct list_head bus_list; /* list of busses */ 343 struct list_head bus_list; /* list of busses */
343 344
344 int bandwidth_allocated; /* on this bus: how much of the time 345 int bandwidth_allocated; /* on this bus: how much of the time
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index d4962a782b8a..3793d168b44d 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -350,6 +350,7 @@ struct v4l2_pix_format {
350#define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 */ 350#define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 */
351 351
352/* Vendor-specific formats */ 352/* Vendor-specific formats */
353#define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */
353#define V4L2_PIX_FMT_WNVA v4l2_fourcc('W', 'N', 'V', 'A') /* Winnov hw compress */ 354#define V4L2_PIX_FMT_WNVA v4l2_fourcc('W', 'N', 'V', 'A') /* Winnov hw compress */
354#define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S', '9', '1', '0') /* SN9C10x compression */ 355#define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S', '9', '1', '0') /* SN9C10x compression */
355#define V4L2_PIX_FMT_SN9C20X_I420 v4l2_fourcc('S', '9', '2', '0') /* SN9C20x YUV 4:2:0 */ 356#define V4L2_PIX_FMT_SN9C20X_I420 v4l2_fourcc('S', '9', '2', '0') /* SN9C20x YUV 4:2:0 */
@@ -362,6 +363,7 @@ struct v4l2_pix_format {
362#define V4L2_PIX_FMT_SPCA561 v4l2_fourcc('S', '5', '6', '1') /* compressed GBRG bayer */ 363#define V4L2_PIX_FMT_SPCA561 v4l2_fourcc('S', '5', '6', '1') /* compressed GBRG bayer */
363#define V4L2_PIX_FMT_PAC207 v4l2_fourcc('P', '2', '0', '7') /* compressed BGGR bayer */ 364#define V4L2_PIX_FMT_PAC207 v4l2_fourcc('P', '2', '0', '7') /* compressed BGGR bayer */
364#define V4L2_PIX_FMT_MR97310A v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */ 365#define V4L2_PIX_FMT_MR97310A v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */
366#define V4L2_PIX_FMT_SN9C2028 v4l2_fourcc('S', 'O', 'N', 'X') /* compressed GBRG bayer */
365#define V4L2_PIX_FMT_SQ905C v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */ 367#define V4L2_PIX_FMT_SQ905C v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */
366#define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */ 368#define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */
367#define V4L2_PIX_FMT_OV511 v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */ 369#define V4L2_PIX_FMT_OV511 v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */
diff --git a/include/linux/virtio.h b/include/linux/virtio.h
index 057a2e010758..f508c651e53d 100644
--- a/include/linux/virtio.h
+++ b/include/linux/virtio.h
@@ -51,6 +51,9 @@ struct virtqueue {
51 * This re-enables callbacks; it returns "false" if there are pending 51 * This re-enables callbacks; it returns "false" if there are pending
52 * buffers in the queue, to detect a possible race between the driver 52 * buffers in the queue, to detect a possible race between the driver
53 * checking for more work, and enabling callbacks. 53 * checking for more work, and enabling callbacks.
54 * @detach_unused_buf: detach first unused buffer
55 * vq: the struct virtqueue we're talking about.
56 * Returns NULL or the "data" token handed to add_buf
54 * 57 *
55 * Locking rules are straightforward: the driver is responsible for 58 * Locking rules are straightforward: the driver is responsible for
56 * locking. No two operations may be invoked simultaneously, with the exception 59 * locking. No two operations may be invoked simultaneously, with the exception
@@ -71,6 +74,7 @@ struct virtqueue_ops {
71 74
72 void (*disable_cb)(struct virtqueue *vq); 75 void (*disable_cb)(struct virtqueue *vq);
73 bool (*enable_cb)(struct virtqueue *vq); 76 bool (*enable_cb)(struct virtqueue *vq);
77 void *(*detach_unused_buf)(struct virtqueue *vq);
74}; 78};
75 79
76/** 80/**
diff --git a/include/linux/virtio_balloon.h b/include/linux/virtio_balloon.h
index 1418f048cb34..a50ecd1b81a2 100644
--- a/include/linux/virtio_balloon.h
+++ b/include/linux/virtio_balloon.h
@@ -7,6 +7,7 @@
7 7
8/* The feature bitmap for virtio balloon */ 8/* The feature bitmap for virtio balloon */
9#define VIRTIO_BALLOON_F_MUST_TELL_HOST 0 /* Tell before reclaiming pages */ 9#define VIRTIO_BALLOON_F_MUST_TELL_HOST 0 /* Tell before reclaiming pages */
10#define VIRTIO_BALLOON_F_STATS_VQ 1 /* Memory Stats virtqueue */
10 11
11/* Size of a PFN in the balloon interface. */ 12/* Size of a PFN in the balloon interface. */
12#define VIRTIO_BALLOON_PFN_SHIFT 12 13#define VIRTIO_BALLOON_PFN_SHIFT 12
@@ -18,4 +19,18 @@ struct virtio_balloon_config
18 /* Number of pages we've actually got in balloon. */ 19 /* Number of pages we've actually got in balloon. */
19 __le32 actual; 20 __le32 actual;
20}; 21};
22
23#define VIRTIO_BALLOON_S_SWAP_IN 0 /* Amount of memory swapped in */
24#define VIRTIO_BALLOON_S_SWAP_OUT 1 /* Amount of memory swapped out */
25#define VIRTIO_BALLOON_S_MAJFLT 2 /* Number of major faults */
26#define VIRTIO_BALLOON_S_MINFLT 3 /* Number of minor faults */
27#define VIRTIO_BALLOON_S_MEMFREE 4 /* Total amount of free memory */
28#define VIRTIO_BALLOON_S_MEMTOT 5 /* Total amount of memory */
29#define VIRTIO_BALLOON_S_NR 6
30
31struct virtio_balloon_stat {
32 u16 tag;
33 u64 val;
34} __attribute__((packed));
35
21#endif /* _LINUX_VIRTIO_BALLOON_H */ 36#endif /* _LINUX_VIRTIO_BALLOON_H */
diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h
index fd294c56d571..e52029e98919 100644
--- a/include/linux/virtio_blk.h
+++ b/include/linux/virtio_blk.h
@@ -15,6 +15,7 @@
15#define VIRTIO_BLK_F_BLK_SIZE 6 /* Block size of disk is available*/ 15#define VIRTIO_BLK_F_BLK_SIZE 6 /* Block size of disk is available*/
16#define VIRTIO_BLK_F_SCSI 7 /* Supports scsi command passthru */ 16#define VIRTIO_BLK_F_SCSI 7 /* Supports scsi command passthru */
17#define VIRTIO_BLK_F_FLUSH 9 /* Cache flush command support */ 17#define VIRTIO_BLK_F_FLUSH 9 /* Cache flush command support */
18#define VIRTIO_BLK_F_TOPOLOGY 10 /* Topology information is available */
18 19
19struct virtio_blk_config { 20struct virtio_blk_config {
20 /* The capacity (in 512-byte sectors). */ 21 /* The capacity (in 512-byte sectors). */
@@ -29,8 +30,20 @@ struct virtio_blk_config {
29 __u8 heads; 30 __u8 heads;
30 __u8 sectors; 31 __u8 sectors;
31 } geometry; 32 } geometry;
33
32 /* block size of device (if VIRTIO_BLK_F_BLK_SIZE) */ 34 /* block size of device (if VIRTIO_BLK_F_BLK_SIZE) */
33 __u32 blk_size; 35 __u32 blk_size;
36
37 /* the next 4 entries are guarded by VIRTIO_BLK_F_TOPOLOGY */
38 /* exponent for physical block per logical block. */
39 __u8 physical_block_exp;
40 /* alignment offset in logical blocks. */
41 __u8 alignment_offset;
42 /* minimum I/O size without performance penalty in logical blocks. */
43 __u16 min_io_size;
44 /* optimal sustained I/O size in logical blocks. */
45 __u32 opt_io_size;
46
34} __attribute__((packed)); 47} __attribute__((packed));
35 48
36/* 49/*
diff --git a/include/linux/virtio_console.h b/include/linux/virtio_console.h
index fe885174cc1f..ae4f039515b4 100644
--- a/include/linux/virtio_console.h
+++ b/include/linux/virtio_console.h
@@ -3,19 +3,45 @@
3#include <linux/types.h> 3#include <linux/types.h>
4#include <linux/virtio_ids.h> 4#include <linux/virtio_ids.h>
5#include <linux/virtio_config.h> 5#include <linux/virtio_config.h>
6/* This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so 6/*
7 * anyone can use the definitions to implement compatible drivers/servers. */ 7 * This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so
8 * anyone can use the definitions to implement compatible drivers/servers.
9 *
10 * Copyright (C) Red Hat, Inc., 2009, 2010
11 */
8 12
9/* Feature bits */ 13/* Feature bits */
10#define VIRTIO_CONSOLE_F_SIZE 0 /* Does host provide console size? */ 14#define VIRTIO_CONSOLE_F_SIZE 0 /* Does host provide console size? */
15#define VIRTIO_CONSOLE_F_MULTIPORT 1 /* Does host provide multiple ports? */
11 16
12struct virtio_console_config { 17struct virtio_console_config {
13 /* colums of the screens */ 18 /* colums of the screens */
14 __u16 cols; 19 __u16 cols;
15 /* rows of the screens */ 20 /* rows of the screens */
16 __u16 rows; 21 __u16 rows;
22 /* max. number of ports this device can hold */
23 __u32 max_nr_ports;
24 /* number of ports added so far */
25 __u32 nr_ports;
17} __attribute__((packed)); 26} __attribute__((packed));
18 27
28/*
29 * A message that's passed between the Host and the Guest for a
30 * particular port.
31 */
32struct virtio_console_control {
33 __u32 id; /* Port number */
34 __u16 event; /* The kind of control event (see below) */
35 __u16 value; /* Extra information for the key */
36};
37
38/* Some events for control messages */
39#define VIRTIO_CONSOLE_PORT_READY 0
40#define VIRTIO_CONSOLE_CONSOLE_PORT 1
41#define VIRTIO_CONSOLE_RESIZE 2
42#define VIRTIO_CONSOLE_PORT_OPEN 3
43#define VIRTIO_CONSOLE_PORT_NAME 4
44#define VIRTIO_CONSOLE_PORT_REMOVE 5
19 45
20#ifdef __KERNEL__ 46#ifdef __KERNEL__
21int __init virtio_cons_early_init(int (*put_chars)(u32, const char *, int)); 47int __init virtio_cons_early_init(int (*put_chars)(u32, const char *, int));
diff --git a/include/media/davinci/isif.h b/include/media/davinci/isif.h
new file mode 100644
index 000000000000..b0b74ad618cc
--- /dev/null
+++ b/include/media/davinci/isif.h
@@ -0,0 +1,531 @@
1/*
2 * Copyright (C) 2008-2009 Texas Instruments Inc
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * isif header file
19 */
20#ifndef _ISIF_H
21#define _ISIF_H
22
23#include <media/davinci/ccdc_types.h>
24#include <media/davinci/vpfe_types.h>
25
26/* isif float type S8Q8/U8Q8 */
27struct isif_float_8 {
28 /* 8 bit integer part */
29 __u8 integer;
30 /* 8 bit decimal part */
31 __u8 decimal;
32};
33
34/* isif float type U16Q16/S16Q16 */
35struct isif_float_16 {
36 /* 16 bit integer part */
37 __u16 integer;
38 /* 16 bit decimal part */
39 __u16 decimal;
40};
41
42/************************************************************************
43 * Vertical Defect Correction parameters
44 ***********************************************************************/
45/* Defect Correction (DFC) table entry */
46struct isif_vdfc_entry {
47 /* vertical position of defect */
48 __u16 pos_vert;
49 /* horizontal position of defect */
50 __u16 pos_horz;
51 /*
52 * Defect level of Vertical line defect position. This is subtracted
53 * from the data at the defect position
54 */
55 __u8 level_at_pos;
56 /*
57 * Defect level of the pixels upper than the vertical line defect.
58 * This is subtracted from the data
59 */
60 __u8 level_up_pixels;
61 /*
62 * Defect level of the pixels lower than the vertical line defect.
63 * This is subtracted from the data
64 */
65 __u8 level_low_pixels;
66};
67
68#define ISIF_VDFC_TABLE_SIZE 8
69struct isif_dfc {
70 /* enable vertical defect correction */
71 __u8 en;
72 /* Defect level subtraction. Just fed through if saturating */
73#define ISIF_VDFC_NORMAL 0
74 /*
75 * Defect level subtraction. Horizontal interpolation ((i-2)+(i+2))/2
76 * if data saturating
77 */
78#define ISIF_VDFC_HORZ_INTERPOL_IF_SAT 1
79 /* Horizontal interpolation (((i-2)+(i+2))/2) */
80#define ISIF_VDFC_HORZ_INTERPOL 2
81 /* one of the vertical defect correction modes above */
82 __u8 corr_mode;
83 /* 0 - whole line corrected, 1 - not pixels upper than the defect */
84 __u8 corr_whole_line;
85#define ISIF_VDFC_NO_SHIFT 0
86#define ISIF_VDFC_SHIFT_1 1
87#define ISIF_VDFC_SHIFT_2 2
88#define ISIF_VDFC_SHIFT_3 3
89#define ISIF_VDFC_SHIFT_4 4
90 /*
91 * defect level shift value. level_at_pos, level_upper_pos,
92 * and level_lower_pos can be shifted up by this value. Choose
93 * one of the values above
94 */
95 __u8 def_level_shift;
96 /* defect saturation level */
97 __u16 def_sat_level;
98 /* number of vertical defects. Max is ISIF_VDFC_TABLE_SIZE */
99 __u16 num_vdefects;
100 /* VDFC table ptr */
101 struct isif_vdfc_entry table[ISIF_VDFC_TABLE_SIZE];
102};
103
104struct isif_horz_bclamp {
105
106 /* Horizontal clamp disabled. Only vertical clamp value is subtracted */
107#define ISIF_HORZ_BC_DISABLE 0
108 /*
109 * Horizontal clamp value is calculated and subtracted from image data
110 * along with vertical clamp value
111 */
112#define ISIF_HORZ_BC_CLAMP_CALC_ENABLED 1
113 /*
114 * Horizontal clamp value calculated from previous image is subtracted
115 * from image data along with vertical clamp value.
116 */
117#define ISIF_HORZ_BC_CLAMP_NOT_UPDATED 2
118 /* horizontal clamp mode. One of the values above */
119 __u8 mode;
120 /*
121 * pixel value limit enable.
122 * 0 - limit disabled
123 * 1 - pixel value limited to 1023
124 */
125 __u8 clamp_pix_limit;
126 /* Select Most left window for bc calculation */
127#define ISIF_SEL_MOST_LEFT_WIN 0
128 /* Select Most right window for bc calculation */
129#define ISIF_SEL_MOST_RIGHT_WIN 1
130 /* Select most left or right window for clamp val calculation */
131 __u8 base_win_sel_calc;
132 /* Window count per color for calculation. range 1-32 */
133 __u8 win_count_calc;
134 /* Window start position - horizontal for calculation. 0 - 8191 */
135 __u16 win_start_h_calc;
136 /* Window start position - vertical for calculation 0 - 8191 */
137 __u16 win_start_v_calc;
138#define ISIF_HORZ_BC_SZ_H_2PIXELS 0
139#define ISIF_HORZ_BC_SZ_H_4PIXELS 1
140#define ISIF_HORZ_BC_SZ_H_8PIXELS 2
141#define ISIF_HORZ_BC_SZ_H_16PIXELS 3
142 /* Width of the sample window in pixels for calculation */
143 __u8 win_h_sz_calc;
144#define ISIF_HORZ_BC_SZ_V_32PIXELS 0
145#define ISIF_HORZ_BC_SZ_V_64PIXELS 1
146#define ISIF_HORZ_BC_SZ_V_128PIXELS 2
147#define ISIF_HORZ_BC_SZ_V_256PIXELS 3
148 /* Height of the sample window in pixels for calculation */
149 __u8 win_v_sz_calc;
150};
151
152/************************************************************************
153 * Black Clamp parameters
154 ***********************************************************************/
155struct isif_vert_bclamp {
156 /* Reset value used is the clamp value calculated */
157#define ISIF_VERT_BC_USE_HORZ_CLAMP_VAL 0
158 /* Reset value used is reset_clamp_val configured */
159#define ISIF_VERT_BC_USE_CONFIG_CLAMP_VAL 1
160 /* No update, previous image value is used */
161#define ISIF_VERT_BC_NO_UPDATE 2
162 /*
163 * Reset value selector for vertical clamp calculation. Use one of
164 * the above values
165 */
166 __u8 reset_val_sel;
167 /* U8Q8. Line average coefficient used in vertical clamp calculation */
168 __u8 line_ave_coef;
169 /* Height of the optical black region for calculation */
170 __u16 ob_v_sz_calc;
171 /* Optical black region start position - horizontal. 0 - 8191 */
172 __u16 ob_start_h;
173 /* Optical black region start position - vertical 0 - 8191 */
174 __u16 ob_start_v;
175};
176
177struct isif_black_clamp {
178 /*
179 * This offset value is added irrespective of the clamp enable status.
180 * S13
181 */
182 __u16 dc_offset;
183 /*
184 * Enable black/digital clamp value to be subtracted from the image data
185 */
186 __u8 en;
187 /*
188 * black clamp mode. same/separate clamp for 4 colors
189 * 0 - disable - same clamp value for all colors
190 * 1 - clamp value calculated separately for all colors
191 */
192 __u8 bc_mode_color;
193 /* Vrtical start position for bc subtraction */
194 __u16 vert_start_sub;
195 /* Black clamp for horizontal direction */
196 struct isif_horz_bclamp horz;
197 /* Black clamp for vertical direction */
198 struct isif_vert_bclamp vert;
199};
200
201/*************************************************************************
202** Color Space Convertion (CSC)
203*************************************************************************/
204#define ISIF_CSC_NUM_COEFF 16
205struct isif_color_space_conv {
206 /* Enable color space conversion */
207 __u8 en;
208 /*
209 * csc coeffient table. S8Q5, M00 at index 0, M01 at index 1, and
210 * so forth
211 */
212 struct isif_float_8 coeff[ISIF_CSC_NUM_COEFF];
213};
214
215
216/*************************************************************************
217** Black Compensation parameters
218*************************************************************************/
219struct isif_black_comp {
220 /* Comp for Red */
221 __s8 r_comp;
222 /* Comp for Gr */
223 __s8 gr_comp;
224 /* Comp for Blue */
225 __s8 b_comp;
226 /* Comp for Gb */
227 __s8 gb_comp;
228};
229
230/*************************************************************************
231** Gain parameters
232*************************************************************************/
233struct isif_gain {
234 /* Gain for Red or ye */
235 struct isif_float_16 r_ye;
236 /* Gain for Gr or cy */
237 struct isif_float_16 gr_cy;
238 /* Gain for Gb or g */
239 struct isif_float_16 gb_g;
240 /* Gain for Blue or mg */
241 struct isif_float_16 b_mg;
242};
243
244#define ISIF_LINEAR_TAB_SIZE 192
245/*************************************************************************
246** Linearization parameters
247*************************************************************************/
248struct isif_linearize {
249 /* Enable or Disable linearization of data */
250 __u8 en;
251 /* Shift value applied */
252 __u8 corr_shft;
253 /* scale factor applied U11Q10 */
254 struct isif_float_16 scale_fact;
255 /* Size of the linear table */
256 __u16 table[ISIF_LINEAR_TAB_SIZE];
257};
258
259/* Color patterns */
260#define ISIF_RED 0
261#define ISIF_GREEN_RED 1
262#define ISIF_GREEN_BLUE 2
263#define ISIF_BLUE 3
264struct isif_col_pat {
265 __u8 olop;
266 __u8 olep;
267 __u8 elop;
268 __u8 elep;
269};
270
271/*************************************************************************
272** Data formatter parameters
273*************************************************************************/
274struct isif_fmtplen {
275 /*
276 * number of program entries for SET0, range 1 - 16
277 * when fmtmode is ISIF_SPLIT, 1 - 8 when fmtmode is
278 * ISIF_COMBINE
279 */
280 __u16 plen0;
281 /*
282 * number of program entries for SET1, range 1 - 16
283 * when fmtmode is ISIF_SPLIT, 1 - 8 when fmtmode is
284 * ISIF_COMBINE
285 */
286 __u16 plen1;
287 /**
288 * number of program entries for SET2, range 1 - 16
289 * when fmtmode is ISIF_SPLIT, 1 - 8 when fmtmode is
290 * ISIF_COMBINE
291 */
292 __u16 plen2;
293 /**
294 * number of program entries for SET3, range 1 - 16
295 * when fmtmode is ISIF_SPLIT, 1 - 8 when fmtmode is
296 * ISIF_COMBINE
297 */
298 __u16 plen3;
299};
300
301struct isif_fmt_cfg {
302#define ISIF_SPLIT 0
303#define ISIF_COMBINE 1
304 /* Split or combine or line alternate */
305 __u8 fmtmode;
306 /* enable or disable line alternating mode */
307 __u8 ln_alter_en;
308#define ISIF_1LINE 0
309#define ISIF_2LINES 1
310#define ISIF_3LINES 2
311#define ISIF_4LINES 3
312 /* Split/combine line number */
313 __u8 lnum;
314 /* Address increment Range 1 - 16 */
315 __u8 addrinc;
316};
317
318struct isif_fmt_addr_ptr {
319 /* Initial address */
320 __u32 init_addr;
321 /* output line number */
322#define ISIF_1STLINE 0
323#define ISIF_2NDLINE 1
324#define ISIF_3RDLINE 2
325#define ISIF_4THLINE 3
326 __u8 out_line;
327};
328
329struct isif_fmtpgm_ap {
330 /* program address pointer */
331 __u8 pgm_aptr;
332 /* program address increment or decrement */
333 __u8 pgmupdt;
334};
335
336struct isif_data_formatter {
337 /* Enable/Disable data formatter */
338 __u8 en;
339 /* data formatter configuration */
340 struct isif_fmt_cfg cfg;
341 /* Formatter program entries length */
342 struct isif_fmtplen plen;
343 /* first pixel in a line fed to formatter */
344 __u16 fmtrlen;
345 /* HD interval for output line. Only valid when split line */
346 __u16 fmthcnt;
347 /* formatter address pointers */
348 struct isif_fmt_addr_ptr fmtaddr_ptr[16];
349 /* program enable/disable */
350 __u8 pgm_en[32];
351 /* program address pointers */
352 struct isif_fmtpgm_ap fmtpgm_ap[32];
353};
354
355struct isif_df_csc {
356 /* Color Space Conversion confguration, 0 - csc, 1 - df */
357 __u8 df_or_csc;
358 /* csc configuration valid if df_or_csc is 0 */
359 struct isif_color_space_conv csc;
360 /* data formatter configuration valid if df_or_csc is 1 */
361 struct isif_data_formatter df;
362 /* start pixel in a line at the input */
363 __u32 start_pix;
364 /* number of pixels in input line */
365 __u32 num_pixels;
366 /* start line at the input */
367 __u32 start_line;
368 /* number of lines at the input */
369 __u32 num_lines;
370};
371
372struct isif_gain_offsets_adj {
373 /* Gain adjustment per color */
374 struct isif_gain gain;
375 /* Offset adjustment */
376 __u16 offset;
377 /* Enable or Disable Gain adjustment for SDRAM data */
378 __u8 gain_sdram_en;
379 /* Enable or Disable Gain adjustment for IPIPE data */
380 __u8 gain_ipipe_en;
381 /* Enable or Disable Gain adjustment for H3A data */
382 __u8 gain_h3a_en;
383 /* Enable or Disable Gain adjustment for SDRAM data */
384 __u8 offset_sdram_en;
385 /* Enable or Disable Gain adjustment for IPIPE data */
386 __u8 offset_ipipe_en;
387 /* Enable or Disable Gain adjustment for H3A data */
388 __u8 offset_h3a_en;
389};
390
391struct isif_cul {
392 /* Horizontal Cull pattern for odd lines */
393 __u8 hcpat_odd;
394 /* Horizontal Cull pattern for even lines */
395 __u8 hcpat_even;
396 /* Vertical Cull pattern */
397 __u8 vcpat;
398 /* Enable or disable lpf. Apply when cull is enabled */
399 __u8 en_lpf;
400};
401
402struct isif_compress {
403#define ISIF_ALAW 0
404#define ISIF_DPCM 1
405#define ISIF_NO_COMPRESSION 2
406 /* Compression Algorithm used */
407 __u8 alg;
408 /* Choose Predictor1 for DPCM compression */
409#define ISIF_DPCM_PRED1 0
410 /* Choose Predictor2 for DPCM compression */
411#define ISIF_DPCM_PRED2 1
412 /* Predictor for DPCM compression */
413 __u8 pred;
414};
415
416/* all the stuff in this struct will be provided by userland */
417struct isif_config_params_raw {
418 /* Linearization parameters for image sensor data input */
419 struct isif_linearize linearize;
420 /* Data formatter or CSC */
421 struct isif_df_csc df_csc;
422 /* Defect Pixel Correction (DFC) confguration */
423 struct isif_dfc dfc;
424 /* Black/Digital Clamp configuration */
425 struct isif_black_clamp bclamp;
426 /* Gain, offset adjustments */
427 struct isif_gain_offsets_adj gain_offset;
428 /* Culling */
429 struct isif_cul culling;
430 /* A-Law and DPCM compression options */
431 struct isif_compress compress;
432 /* horizontal offset for Gain/LSC/DFC */
433 __u16 horz_offset;
434 /* vertical offset for Gain/LSC/DFC */
435 __u16 vert_offset;
436 /* color pattern for field 0 */
437 struct isif_col_pat col_pat_field0;
438 /* color pattern for field 1 */
439 struct isif_col_pat col_pat_field1;
440#define ISIF_NO_SHIFT 0
441#define ISIF_1BIT_SHIFT 1
442#define ISIF_2BIT_SHIFT 2
443#define ISIF_3BIT_SHIFT 3
444#define ISIF_4BIT_SHIFT 4
445#define ISIF_5BIT_SHIFT 5
446#define ISIF_6BIT_SHIFT 6
447 /* Data shift applied before storing to SDRAM */
448 __u8 data_shift;
449 /* enable input test pattern generation */
450 __u8 test_pat_gen;
451};
452
453#ifdef __KERNEL__
454struct isif_ycbcr_config {
455 /* isif pixel format */
456 enum ccdc_pixfmt pix_fmt;
457 /* isif frame format */
458 enum ccdc_frmfmt frm_fmt;
459 /* ISIF crop window */
460 struct v4l2_rect win;
461 /* field polarity */
462 enum vpfe_pin_pol fid_pol;
463 /* interface VD polarity */
464 enum vpfe_pin_pol vd_pol;
465 /* interface HD polarity */
466 enum vpfe_pin_pol hd_pol;
467 /* isif pix order. Only used for ycbcr capture */
468 enum ccdc_pixorder pix_order;
469 /* isif buffer type. Only used for ycbcr capture */
470 enum ccdc_buftype buf_type;
471};
472
473/* MSB of image data connected to sensor port */
474enum isif_data_msb {
475 ISIF_BIT_MSB_15,
476 ISIF_BIT_MSB_14,
477 ISIF_BIT_MSB_13,
478 ISIF_BIT_MSB_12,
479 ISIF_BIT_MSB_11,
480 ISIF_BIT_MSB_10,
481 ISIF_BIT_MSB_9,
482 ISIF_BIT_MSB_8,
483 ISIF_BIT_MSB_7
484};
485
486enum isif_cfa_pattern {
487 ISIF_CFA_PAT_MOSAIC,
488 ISIF_CFA_PAT_STRIPE
489};
490
491struct isif_params_raw {
492 /* isif pixel format */
493 enum ccdc_pixfmt pix_fmt;
494 /* isif frame format */
495 enum ccdc_frmfmt frm_fmt;
496 /* video window */
497 struct v4l2_rect win;
498 /* field polarity */
499 enum vpfe_pin_pol fid_pol;
500 /* interface VD polarity */
501 enum vpfe_pin_pol vd_pol;
502 /* interface HD polarity */
503 enum vpfe_pin_pol hd_pol;
504 /* buffer type. Applicable for interlaced mode */
505 enum ccdc_buftype buf_type;
506 /* Gain values */
507 struct isif_gain gain;
508 /* cfa pattern */
509 enum isif_cfa_pattern cfa_pat;
510 /* Data MSB position */
511 enum isif_data_msb data_msb;
512 /* Enable horizontal flip */
513 unsigned char horz_flip_en;
514 /* Enable image invert vertically */
515 unsigned char image_invert_en;
516
517 /* all the userland defined stuff*/
518 struct isif_config_params_raw config_params;
519};
520
521enum isif_data_pack {
522 ISIF_PACK_16BIT,
523 ISIF_PACK_12BIT,
524 ISIF_PACK_8BIT
525};
526
527#define ISIF_WIN_NTSC {0, 0, 720, 480}
528#define ISIF_WIN_VGA {0, 0, 640, 480}
529
530#endif
531#endif
diff --git a/include/media/davinci/vpss.h b/include/media/davinci/vpss.h
index fcdff745fae2..c59cc029c74a 100644
--- a/include/media/davinci/vpss.h
+++ b/include/media/davinci/vpss.h
@@ -29,7 +29,19 @@
29/* selector for ccdc input selection on DM355 */ 29/* selector for ccdc input selection on DM355 */
30enum vpss_ccdc_source_sel { 30enum vpss_ccdc_source_sel {
31 VPSS_CCDCIN, 31 VPSS_CCDCIN,
32 VPSS_HSSIIN 32 VPSS_HSSIIN,
33 VPSS_PGLPBK, /* for DM365 only */
34 VPSS_CCDCPG /* for DM365 only */
35};
36
37struct vpss_sync_pol {
38 unsigned int ccdpg_hdpol:1;
39 unsigned int ccdpg_vdpol:1;
40};
41
42struct vpss_pg_frame_size {
43 short hlpfr;
44 short pplen;
33}; 45};
34 46
35/* Used for enable/diable VPSS Clock */ 47/* Used for enable/diable VPSS Clock */
@@ -47,12 +59,38 @@ enum vpss_clock_sel {
47 */ 59 */
48 VPSS_VENC_CLOCK_SEL, 60 VPSS_VENC_CLOCK_SEL,
49 VPSS_VPBE_CLOCK, 61 VPSS_VPBE_CLOCK,
62 /* DM365 only clocks */
63 VPSS_IPIPEIF_CLOCK,
64 VPSS_RSZ_CLOCK,
65 VPSS_BL_CLOCK,
66 /*
67 * When using VPSS_PCLK_INTERNAL in vpss_enable_clock() api
68 * following applies:-
69 * en = 0 disable internal PCLK
70 * en = 1 enables internal PCLK
71 */
72 VPSS_PCLK_INTERNAL,
73 /*
74 * When using VPSS_PSYNC_CLOCK_SEL in vpss_enable_clock() api
75 * following applies:-
76 * en = 0 enables MMR clock
77 * en = 1 enables VPSS clock
78 */
79 VPSS_PSYNC_CLOCK_SEL,
80 VPSS_LDC_CLOCK_SEL,
81 VPSS_OSD_CLOCK_SEL,
82 VPSS_FDIF_CLOCK,
83 VPSS_LDC_CLOCK
50}; 84};
51 85
52/* select input to ccdc on dm355 */ 86/* select input to ccdc on dm355 */
53int vpss_select_ccdc_source(enum vpss_ccdc_source_sel src_sel); 87int vpss_select_ccdc_source(enum vpss_ccdc_source_sel src_sel);
54/* enable/disable a vpss clock, 0 - success, -1 - failure */ 88/* enable/disable a vpss clock, 0 - success, -1 - failure */
55int vpss_enable_clock(enum vpss_clock_sel clock_sel, int en); 89int vpss_enable_clock(enum vpss_clock_sel clock_sel, int en);
90/* set sync polarity, only for DM365*/
91void dm365_vpss_set_sync_pol(struct vpss_sync_pol);
92/* set the PG_FRAME_SIZE register, only for DM365 */
93void dm365_vpss_set_pg_frame_size(struct vpss_pg_frame_size);
56 94
57/* wbl reset for dm644x */ 95/* wbl reset for dm644x */
58enum vpss_wbl_sel { 96enum vpss_wbl_sel {
@@ -65,5 +103,6 @@ enum vpss_wbl_sel {
65 VPSS_PCR_PREV_WBL_0, 103 VPSS_PCR_PREV_WBL_0,
66 VPSS_PCR_CCDC_WBL_O, 104 VPSS_PCR_CCDC_WBL_O,
67}; 105};
106/* clear wbl overflow flag for DM6446 */
68int vpss_clear_wbl_overflow(enum vpss_wbl_sel wbl_sel); 107int vpss_clear_wbl_overflow(enum vpss_wbl_sel wbl_sel);
69#endif 108#endif
diff --git a/include/media/ir-common.h b/include/media/ir-common.h
index 2c6af24b905e..c66298062d39 100644
--- a/include/media/ir-common.h
+++ b/include/media/ir-common.h
@@ -35,7 +35,7 @@
35 35
36struct ir_input_state { 36struct ir_input_state {
37 /* configuration */ 37 /* configuration */
38 int ir_type; 38 u64 ir_type;
39 39
40 /* key info */ 40 /* key info */
41 u32 ir_key; /* ir scancode */ 41 u32 ir_key; /* ir scancode */
@@ -84,7 +84,7 @@ struct card_ir {
84/* Routines from ir-functions.c */ 84/* Routines from ir-functions.c */
85 85
86int ir_input_init(struct input_dev *dev, struct ir_input_state *ir, 86int ir_input_init(struct input_dev *dev, struct ir_input_state *ir,
87 int ir_type); 87 const u64 ir_type);
88void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir); 88void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir);
89void ir_input_keydown(struct input_dev *dev, struct ir_input_state *ir, 89void ir_input_keydown(struct input_dev *dev, struct ir_input_state *ir,
90 u32 ir_key); 90 u32 ir_key);
@@ -162,4 +162,6 @@ extern struct ir_scancode_table ir_codes_terratec_cinergy_xs_table;
162extern struct ir_scancode_table ir_codes_videomate_s350_table; 162extern struct ir_scancode_table ir_codes_videomate_s350_table;
163extern struct ir_scancode_table ir_codes_gadmei_rm008z_table; 163extern struct ir_scancode_table ir_codes_gadmei_rm008z_table;
164extern struct ir_scancode_table ir_codes_nec_terratec_cinergy_xs_table; 164extern struct ir_scancode_table ir_codes_nec_terratec_cinergy_xs_table;
165extern struct ir_scancode_table ir_codes_winfast_usbii_deluxe_table;
166extern struct ir_scancode_table ir_codes_kworld_315u_table;
165#endif 167#endif
diff --git a/include/media/ir-core.h b/include/media/ir-core.h
index 299d201e1339..61c223bc3953 100644
--- a/include/media/ir-core.h
+++ b/include/media/ir-core.h
@@ -21,13 +21,11 @@ extern int ir_core_debug;
21#define IR_dprintk(level, fmt, arg...) if (ir_core_debug >= level) \ 21#define IR_dprintk(level, fmt, arg...) if (ir_core_debug >= level) \
22 printk(KERN_DEBUG "%s: " fmt , __func__, ## arg) 22 printk(KERN_DEBUG "%s: " fmt , __func__, ## arg)
23 23
24enum ir_type { 24#define IR_TYPE_UNKNOWN 0
25 IR_TYPE_UNKNOWN = 0, 25#define IR_TYPE_RC5 (1 << 0) /* Philips RC5 protocol */
26 IR_TYPE_RC5 = 1, 26#define IR_TYPE_PD (1 << 1) /* Pulse distance encoded IR */
27 IR_TYPE_PD = 2, /* Pulse distance encoded IR */ 27#define IR_TYPE_NEC (1 << 2)
28 IR_TYPE_NEC = 3, 28#define IR_TYPE_OTHER (((u64)1) << 63l)
29 IR_TYPE_OTHER = 99,
30};
31 29
32struct ir_scancode { 30struct ir_scancode {
33 u16 scancode; 31 u16 scancode;
@@ -37,26 +35,40 @@ struct ir_scancode {
37struct ir_scancode_table { 35struct ir_scancode_table {
38 struct ir_scancode *scan; 36 struct ir_scancode *scan;
39 int size; 37 int size;
40 enum ir_type ir_type; 38 u64 ir_type;
41 spinlock_t lock; 39 spinlock_t lock;
42}; 40};
43 41
42struct ir_dev_props {
43 unsigned long allowed_protos;
44 void *priv;
45 int (*change_protocol)(void *priv, u64 ir_type);
46};
47
48
44struct ir_input_dev { 49struct ir_input_dev {
45 struct input_dev *dev; 50 struct input_dev *dev; /* Input device*/
46 struct ir_scancode_table rc_tab; 51 struct ir_scancode_table rc_tab; /* scan/key table */
52 unsigned long devno; /* device number */
53 struct attribute_group attr; /* IR attributes */
54 struct device *class_dev; /* virtual class dev */
55 const struct ir_dev_props *props; /* Device properties */
47}; 56};
57#define to_ir_input_dev(_attr) container_of(_attr, struct ir_input_dev, attr)
48 58
49/* Routines from ir-keytable.c */ 59/* Routines from ir-keytable.c */
50 60
51u32 ir_g_keycode_from_table(struct input_dev *input_dev, 61u32 ir_g_keycode_from_table(struct input_dev *input_dev,
52 u32 scancode); 62 u32 scancode);
53 63
54int ir_set_keycode_table(struct input_dev *input_dev,
55 struct ir_scancode_table *rc_tab);
56
57int ir_roundup_tablesize(int n_elems);
58int ir_input_register(struct input_dev *dev, 64int ir_input_register(struct input_dev *dev,
59 struct ir_scancode_table *ir_codes); 65 const struct ir_scancode_table *ir_codes,
66 const struct ir_dev_props *props);
60void ir_input_unregister(struct input_dev *input_dev); 67void ir_input_unregister(struct input_dev *input_dev);
61 68
69/* Routines from ir-sysfs.c */
70
71int ir_register_class(struct input_dev *input_dev);
72void ir_unregister_class(struct input_dev *input_dev);
73
62#endif 74#endif
diff --git a/include/media/ir-kbd-i2c.h b/include/media/ir-kbd-i2c.h
index aaf65e8b1a40..9142936603cc 100644
--- a/include/media/ir-kbd-i2c.h
+++ b/include/media/ir-kbd-i2c.h
@@ -36,7 +36,7 @@ enum ir_kbd_get_key_fn {
36struct IR_i2c_init_data { 36struct IR_i2c_init_data {
37 struct ir_scancode_table *ir_codes; 37 struct ir_scancode_table *ir_codes;
38 const char *name; 38 const char *name;
39 int type; /* IR_TYPE_RC5, IR_TYPE_PD, etc */ 39 u64 type; /* IR_TYPE_RC5, IR_TYPE_PD, etc */
40 /* 40 /*
41 * Specify either a function pointer or a value indicating one of 41 * Specify either a function pointer or a value indicating one of
42 * ir_kbd_i2c's internal get_key functions 42 * ir_kbd_i2c's internal get_key functions
diff --git a/include/media/ov772x.h b/include/media/ov772x.h
index 14c77efd6a85..548bf1155c83 100644
--- a/include/media/ov772x.h
+++ b/include/media/ov772x.h
@@ -15,8 +15,9 @@
15#include <media/soc_camera.h> 15#include <media/soc_camera.h>
16 16
17/* for flags */ 17/* for flags */
18#define OV772X_FLAG_VFLIP 0x00000001 /* Vertical flip image */ 18#define OV772X_FLAG_VFLIP (1 << 0) /* Vertical flip image */
19#define OV772X_FLAG_HFLIP 0x00000002 /* Horizontal flip image */ 19#define OV772X_FLAG_HFLIP (1 << 1) /* Horizontal flip image */
20#define OV772X_FLAG_8BIT (1 << 2) /* default 10 bit */
20 21
21/* 22/*
22 * for Edge ctrl 23 * for Edge ctrl
@@ -53,9 +54,8 @@ struct ov772x_edge_ctrl {
53 * ov772x camera info 54 * ov772x camera info
54 */ 55 */
55struct ov772x_camera_info { 56struct ov772x_camera_info {
56 unsigned long buswidth; 57 unsigned long flags;
57 unsigned long flags; 58 struct ov772x_edge_ctrl edgectrl;
58 struct ov772x_edge_ctrl edgectrl;
59}; 59};
60 60
61#endif /* __OV772X_H__ */ 61#endif /* __OV772X_H__ */
diff --git a/include/media/saa7146_vv.h b/include/media/saa7146_vv.h
index 4aeff96ff7d8..b9da1f5591e7 100644
--- a/include/media/saa7146_vv.h
+++ b/include/media/saa7146_vv.h
@@ -188,6 +188,7 @@ void saa7146_buffer_timeout(unsigned long data);
188void saa7146_dma_free(struct saa7146_dev* dev,struct videobuf_queue *q, 188void saa7146_dma_free(struct saa7146_dev* dev,struct videobuf_queue *q,
189 struct saa7146_buf *buf); 189 struct saa7146_buf *buf);
190 190
191int saa7146_vv_devinit(struct saa7146_dev *dev);
191int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv); 192int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv);
192int saa7146_vv_release(struct saa7146_dev* dev); 193int saa7146_vv_release(struct saa7146_dev* dev);
193 194
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h
index dcc5b86bcb6c..9d69f01b6fa2 100644
--- a/include/media/soc_camera.h
+++ b/include/media/soc_camera.h
@@ -81,6 +81,8 @@ struct soc_camera_host_ops {
81 int (*set_bus_param)(struct soc_camera_device *, __u32); 81 int (*set_bus_param)(struct soc_camera_device *, __u32);
82 int (*get_ctrl)(struct soc_camera_device *, struct v4l2_control *); 82 int (*get_ctrl)(struct soc_camera_device *, struct v4l2_control *);
83 int (*set_ctrl)(struct soc_camera_device *, struct v4l2_control *); 83 int (*set_ctrl)(struct soc_camera_device *, struct v4l2_control *);
84 int (*get_parm)(struct soc_camera_device *, struct v4l2_streamparm *);
85 int (*set_parm)(struct soc_camera_device *, struct v4l2_streamparm *);
84 unsigned int (*poll)(struct file *, poll_table *); 86 unsigned int (*poll)(struct file *, poll_table *);
85 const struct v4l2_queryctrl *controls; 87 const struct v4l2_queryctrl *controls;
86 int num_controls; 88 int num_controls;
diff --git a/include/media/timb_radio.h b/include/media/timb_radio.h
new file mode 100644
index 000000000000..fcd32a3696ba
--- /dev/null
+++ b/include/media/timb_radio.h
@@ -0,0 +1,36 @@
1/*
2 * timb_radio.h Platform struct for the Timberdale radio driver
3 * Copyright (c) 2009 Intel Corporation
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 */
18
19#ifndef _TIMB_RADIO_
20#define _TIMB_RADIO_ 1
21
22#include <linux/i2c.h>
23
24struct timb_radio_platform_data {
25 int i2c_adapter; /* I2C adapter where the tuner and dsp are attached */
26 struct {
27 const char *module_name;
28 struct i2c_board_info *info;
29 } tuner;
30 struct {
31 const char *module_name;
32 struct i2c_board_info *info;
33 } dsp;
34};
35
36#endif
diff --git a/include/media/tuner.h b/include/media/tuner.h
index 4d5b53ff17db..5505c5360ca3 100644
--- a/include/media/tuner.h
+++ b/include/media/tuner.h
@@ -129,6 +129,7 @@
129#define TUNER_PARTSNIC_PTI_5NF05 81 129#define TUNER_PARTSNIC_PTI_5NF05 81
130#define TUNER_PHILIPS_CU1216L 82 130#define TUNER_PHILIPS_CU1216L 82
131#define TUNER_NXP_TDA18271 83 131#define TUNER_NXP_TDA18271 83
132#define TUNER_SONY_BTF_PXN01Z 84
132 133
133/* tv card specific */ 134/* tv card specific */
134#define TDA9887_PRESENT (1<<0) 135#define TDA9887_PRESENT (1<<0)
diff --git a/include/media/tvp7002.h b/include/media/tvp7002.h
new file mode 100644
index 000000000000..ee4353459ef5
--- /dev/null
+++ b/include/media/tvp7002.h
@@ -0,0 +1,56 @@
1/* Texas Instruments Triple 8-/10-BIT 165-/110-MSPS Video and Graphics
2 * Digitizer with Horizontal PLL registers
3 *
4 * Copyright (C) 2009 Texas Instruments Inc
5 * Author: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com>
6 *
7 * This code is partially based upon the TVP5150 driver
8 * written by Mauro Carvalho Chehab (mchehab@infradead.org),
9 * the TVP514x driver written by Vaibhav Hiremath <hvaibhav@ti.com>
10 * and the TVP7002 driver in the TI LSP 2.10.00.14
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 */
26#ifndef _TVP7002_H_
27#define _TVP7002_H_
28
29/* Platform-dependent data
30 *
31 * clk_polarity:
32 * 0 -> data clocked out on rising edge of DATACLK signal
33 * 1 -> data clocked out on falling edge of DATACLK signal
34 * hs_polarity:
35 * 0 -> active low HSYNC output
36 * 1 -> active high HSYNC output
37 * sog_polarity:
38 * 0 -> normal operation
39 * 1 -> operation with polarity inverted
40 * vs_polarity:
41 * 0 -> active low VSYNC output
42 * 1 -> active high VSYNC output
43 * fid_polarity:
44 * 0 -> the field ID output is set to logic 1 for an odd
45 * field (field 1) and set to logic 0 for an even
46 * field (field 0).
47 * 1 -> operation with polarity inverted.
48 */
49struct tvp7002_config {
50 u8 clk_polarity;
51 u8 hs_polarity;
52 u8 vs_polarity;
53 u8 fid_polarity;
54 u8 sog_polarity;
55};
56#endif
diff --git a/include/media/tw9910.h b/include/media/tw9910.h
index 5e2895a05e6b..90bcf1fa5421 100644
--- a/include/media/tw9910.h
+++ b/include/media/tw9910.h
@@ -30,8 +30,8 @@ enum tw9910_mpout_pin {
30}; 30};
31 31
32struct tw9910_video_info { 32struct tw9910_video_info {
33 unsigned long buswidth; 33 unsigned long buswidth;
34 enum tw9910_mpout_pin mpout; 34 enum tw9910_mpout_pin mpout;
35}; 35};
36 36
37 37
diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h
index 6cc107d198a0..56abf21dd786 100644
--- a/include/media/v4l2-chip-ident.h
+++ b/include/media/v4l2-chip-ident.h
@@ -39,6 +39,7 @@ enum {
39 39
40 /* module saa7115: reserved range 101-149 */ 40 /* module saa7115: reserved range 101-149 */
41 V4L2_IDENT_SAA7111 = 101, 41 V4L2_IDENT_SAA7111 = 101,
42 V4L2_IDENT_SAA7111A = 102,
42 V4L2_IDENT_SAA7113 = 103, 43 V4L2_IDENT_SAA7113 = 103,
43 V4L2_IDENT_SAA7114 = 104, 44 V4L2_IDENT_SAA7114 = 104,
44 V4L2_IDENT_SAA7115 = 105, 45 V4L2_IDENT_SAA7115 = 105,
@@ -134,6 +135,9 @@ enum {
134 /* modules tef6862: just ident 6862 */ 135 /* modules tef6862: just ident 6862 */
135 V4L2_IDENT_TEF6862 = 6862, 136 V4L2_IDENT_TEF6862 = 6862,
136 137
138 /* module tvp7002: just ident 7002 */
139 V4L2_IDENT_TVP7002 = 7002,
140
137 /* module adv7170: just ident 7170 */ 141 /* module adv7170: just ident 7170 */
138 V4L2_IDENT_ADV7170 = 7170, 142 V4L2_IDENT_ADV7170 = 7170,
139 143
@@ -155,6 +159,9 @@ enum {
155 /* module adv7343: just ident 7343 */ 159 /* module adv7343: just ident 7343 */
156 V4L2_IDENT_ADV7343 = 7343, 160 V4L2_IDENT_ADV7343 = 7343,
157 161
162 /* module saa7706h: just ident 7706 */
163 V4L2_IDENT_SAA7706H = 7706,
164
158 /* module wm8739: just ident 8739 */ 165 /* module wm8739: just ident 8739 */
159 V4L2_IDENT_WM8739 = 8739, 166 V4L2_IDENT_WM8739 = 8739,
160 167
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 9ba99cd39ee7..2bcdca0a57fc 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -180,6 +180,7 @@ struct v4l2_subdev_audio_ops {
180 int (*s_clock_freq)(struct v4l2_subdev *sd, u32 freq); 180 int (*s_clock_freq)(struct v4l2_subdev *sd, u32 freq);
181 int (*s_i2s_clock_freq)(struct v4l2_subdev *sd, u32 freq); 181 int (*s_i2s_clock_freq)(struct v4l2_subdev *sd, u32 freq);
182 int (*s_routing)(struct v4l2_subdev *sd, u32 input, u32 output, u32 config); 182 int (*s_routing)(struct v4l2_subdev *sd, u32 input, u32 output, u32 config);
183 int (*s_stream)(struct v4l2_subdev *sd, int enable);
183}; 184};
184 185
185/* 186/*
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h
index ee148573c114..d57847f2f6c1 100644
--- a/include/pcmcia/ds.h
+++ b/include/pcmcia/ds.h
@@ -40,7 +40,7 @@ struct net_device;
40 * Documentation/pcmcia/driver.txt for details. 40 * Documentation/pcmcia/driver.txt for details.
41*/ 41*/
42struct pcmcia_dynids { 42struct pcmcia_dynids {
43 spinlock_t lock; 43 struct mutex lock;
44 struct list_head list; 44 struct list_head list;
45}; 45};
46 46
diff --git a/include/pcmcia/ss.h b/include/pcmcia/ss.h
index cbfba885eb85..32896a773910 100644
--- a/include/pcmcia/ss.h
+++ b/include/pcmcia/ss.h
@@ -134,9 +134,9 @@ struct pccard_operations {
134 134
135struct pcmcia_socket { 135struct pcmcia_socket {
136 struct module *owner; 136 struct module *owner;
137 spinlock_t lock;
138 socket_state_t socket; 137 socket_state_t socket;
139 u_int state; 138 u_int state;
139 u_int suspended_state; /* state before suspend */
140 u_short functions; 140 u_short functions;
141 u_short lock_count; 141 u_short lock_count;
142 pccard_mem_map cis_mem; 142 pccard_mem_map cis_mem;
@@ -200,9 +200,14 @@ struct pcmcia_socket {
200 struct task_struct *thread; 200 struct task_struct *thread;
201 struct completion thread_done; 201 struct completion thread_done;
202 unsigned int thread_events; 202 unsigned int thread_events;
203 /* protects socket h/w state */ 203 unsigned int sysfs_events;
204
205 /* For the non-trivial interaction between these locks,
206 * see Documentation/pcmcia/locking.txt */
204 struct mutex skt_mutex; 207 struct mutex skt_mutex;
205 /* protects thread_events */ 208 struct mutex ops_mutex;
209
210 /* protects thread_events and sysfs_events */
206 spinlock_t thread_lock; 211 spinlock_t thread_lock;
207 212
208 /* pcmcia (16-bit) */ 213 /* pcmcia (16-bit) */
@@ -225,30 +230,19 @@ struct pcmcia_socket {
225 u8 busy:1; 230 u8 busy:1;
226 /* pcmcia module is being unloaded */ 231 /* pcmcia module is being unloaded */
227 u8 dead:1; 232 u8 dead:1;
228 /* a multifunction-device add event is pending */ 233 /* the PCMCIA card consists of two pseudo devices */
229 u8 device_add_pending:1; 234 u8 has_pfc:1;
230 /* the pending event adds a mfc (1) or pfc (0) */
231 u8 mfc_pfc:1;
232 235
233 u8 reserved:3; 236 u8 reserved:4;
234 } pcmcia_state; 237 } pcmcia_state;
235 238
236 239
237 /* for adding further pseudo-multifunction devices */
238 struct work_struct device_add;
239
240#ifdef CONFIG_PCMCIA_IOCTL 240#ifdef CONFIG_PCMCIA_IOCTL
241 struct user_info_t *user; 241 struct user_info_t *user;
242 wait_queue_head_t queue; 242 wait_queue_head_t queue;
243#endif /* CONFIG_PCMCIA_IOCTL */ 243#endif /* CONFIG_PCMCIA_IOCTL */
244#endif /* CONFIG_PCMCIA */ 244#endif /* CONFIG_PCMCIA */
245 245
246 /* cardbus (32-bit) */
247#ifdef CONFIG_CARDBUS
248 struct resource *cb_cis_res;
249 void __iomem *cb_cis_virt;
250#endif /* CONFIG_CARDBUS */
251
252 /* socket device */ 246 /* socket device */
253 struct device dev; 247 struct device dev;
254 /* data internal to the socket driver */ 248 /* data internal to the socket driver */
@@ -263,13 +257,25 @@ struct pcmcia_socket {
263 * - pccard_static_ops iomem and ioport areas are assigned statically 257 * - pccard_static_ops iomem and ioport areas are assigned statically
264 * - pccard_iodyn_ops iomem areas is assigned statically, ioport 258 * - pccard_iodyn_ops iomem areas is assigned statically, ioport
265 * areas dynamically 259 * areas dynamically
260 * If this option is selected, use
261 * "select PCCARD_IODYN" in Kconfig.
266 * - pccard_nonstatic_ops iomem and ioport areas are assigned dynamically. 262 * - pccard_nonstatic_ops iomem and ioport areas are assigned dynamically.
267 * If this option is selected, use 263 * If this option is selected, use
268 * "select PCCARD_NONSTATIC" in Kconfig. 264 * "select PCCARD_NONSTATIC" in Kconfig.
265 *
269 */ 266 */
270extern struct pccard_resource_ops pccard_static_ops; 267extern struct pccard_resource_ops pccard_static_ops;
268#if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE)
271extern struct pccard_resource_ops pccard_iodyn_ops; 269extern struct pccard_resource_ops pccard_iodyn_ops;
272extern struct pccard_resource_ops pccard_nonstatic_ops; 270extern struct pccard_resource_ops pccard_nonstatic_ops;
271#else
272/* If PCMCIA is not used, but only CARDBUS, these functions are not used
273 * at all. Therefore, do not use the large (240K!) rsrc_nonstatic module
274 */
275#define pccard_iodyn_ops pccard_static_ops
276#define pccard_nonstatic_ops pccard_static_ops
277#endif
278
273 279
274/* socket drivers are expected to use these callbacks in their .drv struct */ 280/* socket drivers are expected to use these callbacks in their .drv struct */
275extern int pcmcia_socket_dev_suspend(struct device *dev); 281extern int pcmcia_socket_dev_suspend(struct device *dev);
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index 7c4449900c24..d80b6dbed1ca 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -348,7 +348,8 @@ extern int scsi_mode_select(struct scsi_device *sdev, int pf, int sp,
348 struct scsi_sense_hdr *); 348 struct scsi_sense_hdr *);
349extern int scsi_test_unit_ready(struct scsi_device *sdev, int timeout, 349extern int scsi_test_unit_ready(struct scsi_device *sdev, int timeout,
350 int retries, struct scsi_sense_hdr *sshdr); 350 int retries, struct scsi_sense_hdr *sshdr);
351extern unsigned char *scsi_get_vpd_page(struct scsi_device *, u8 page); 351extern int scsi_get_vpd_page(struct scsi_device *, u8 page, unsigned char *buf,
352 int buf_len);
352extern int scsi_device_set_state(struct scsi_device *sdev, 353extern int scsi_device_set_state(struct scsi_device *sdev,
353 enum scsi_device_state state); 354 enum scsi_device_state state);
354extern struct scsi_event *sdev_evt_alloc(enum scsi_device_event evt_type, 355extern struct scsi_event *sdev_evt_alloc(enum scsi_device_event evt_type,
diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h
index 61ad3594aad6..ffeebc34a4f7 100644
--- a/include/scsi/scsi_transport_sas.h
+++ b/include/scsi/scsi_transport_sas.h
@@ -107,6 +107,8 @@ struct sas_end_device {
107 struct sas_rphy rphy; 107 struct sas_rphy rphy;
108 /* flags */ 108 /* flags */
109 unsigned ready_led_meaning:1; 109 unsigned ready_led_meaning:1;
110 unsigned tlr_supported:1;
111 unsigned tlr_enabled:1;
110 /* parameters */ 112 /* parameters */
111 u16 I_T_nexus_loss_timeout; 113 u16 I_T_nexus_loss_timeout;
112 u16 initiator_response_timeout; 114 u16 initiator_response_timeout;
@@ -181,6 +183,11 @@ extern int sas_phy_add(struct sas_phy *);
181extern void sas_phy_delete(struct sas_phy *); 183extern void sas_phy_delete(struct sas_phy *);
182extern int scsi_is_sas_phy(const struct device *); 184extern int scsi_is_sas_phy(const struct device *);
183 185
186unsigned int sas_tlr_supported(struct scsi_device *);
187unsigned int sas_is_tlr_enabled(struct scsi_device *);
188void sas_disable_tlr(struct scsi_device *);
189void sas_enable_tlr(struct scsi_device *);
190
184extern struct sas_rphy *sas_end_device_alloc(struct sas_port *); 191extern struct sas_rphy *sas_end_device_alloc(struct sas_port *);
185extern struct sas_rphy *sas_expander_alloc(struct sas_port *, enum sas_device_type); 192extern struct sas_rphy *sas_expander_alloc(struct sas_port *, enum sas_device_type);
186void sas_rphy_free(struct sas_rphy *); 193void sas_rphy_free(struct sas_rphy *);
diff --git a/include/trace/events/lock.h b/include/trace/events/lock.h
index a870ba125aa8..5c1dcfc16c60 100644
--- a/include/trace/events/lock.h
+++ b/include/trace/events/lock.h
@@ -20,14 +20,17 @@ TRACE_EVENT(lock_acquire,
20 TP_STRUCT__entry( 20 TP_STRUCT__entry(
21 __field(unsigned int, flags) 21 __field(unsigned int, flags)
22 __string(name, lock->name) 22 __string(name, lock->name)
23 __field(void *, lockdep_addr)
23 ), 24 ),
24 25
25 TP_fast_assign( 26 TP_fast_assign(
26 __entry->flags = (trylock ? 1 : 0) | (read ? 2 : 0); 27 __entry->flags = (trylock ? 1 : 0) | (read ? 2 : 0);
27 __assign_str(name, lock->name); 28 __assign_str(name, lock->name);
29 __entry->lockdep_addr = lock;
28 ), 30 ),
29 31
30 TP_printk("%s%s%s", (__entry->flags & 1) ? "try " : "", 32 TP_printk("%p %s%s%s", __entry->lockdep_addr,
33 (__entry->flags & 1) ? "try " : "",
31 (__entry->flags & 2) ? "read " : "", 34 (__entry->flags & 2) ? "read " : "",
32 __get_str(name)) 35 __get_str(name))
33); 36);
@@ -40,13 +43,16 @@ TRACE_EVENT(lock_release,
40 43
41 TP_STRUCT__entry( 44 TP_STRUCT__entry(
42 __string(name, lock->name) 45 __string(name, lock->name)
46 __field(void *, lockdep_addr)
43 ), 47 ),
44 48
45 TP_fast_assign( 49 TP_fast_assign(
46 __assign_str(name, lock->name); 50 __assign_str(name, lock->name);
51 __entry->lockdep_addr = lock;
47 ), 52 ),
48 53
49 TP_printk("%s", __get_str(name)) 54 TP_printk("%p %s",
55 __entry->lockdep_addr, __get_str(name))
50); 56);
51 57
52#ifdef CONFIG_LOCK_STAT 58#ifdef CONFIG_LOCK_STAT
@@ -59,13 +65,16 @@ TRACE_EVENT(lock_contended,
59 65
60 TP_STRUCT__entry( 66 TP_STRUCT__entry(
61 __string(name, lock->name) 67 __string(name, lock->name)
68 __field(void *, lockdep_addr)
62 ), 69 ),
63 70
64 TP_fast_assign( 71 TP_fast_assign(
65 __assign_str(name, lock->name); 72 __assign_str(name, lock->name);
73 __entry->lockdep_addr = lock;
66 ), 74 ),
67 75
68 TP_printk("%s", __get_str(name)) 76 TP_printk("%p %s",
77 __entry->lockdep_addr, __get_str(name))
69); 78);
70 79
71TRACE_EVENT(lock_acquired, 80TRACE_EVENT(lock_acquired,
@@ -75,16 +84,18 @@ TRACE_EVENT(lock_acquired,
75 84
76 TP_STRUCT__entry( 85 TP_STRUCT__entry(
77 __string(name, lock->name) 86 __string(name, lock->name)
78 __field(unsigned long, wait_usec) 87 __field(s64, wait_nsec)
79 __field(unsigned long, wait_nsec_rem) 88 __field(void *, lockdep_addr)
80 ), 89 ),
90
81 TP_fast_assign( 91 TP_fast_assign(
82 __assign_str(name, lock->name); 92 __assign_str(name, lock->name);
83 __entry->wait_nsec_rem = do_div(waittime, NSEC_PER_USEC); 93 __entry->wait_nsec = waittime;
84 __entry->wait_usec = (unsigned long) waittime; 94 __entry->lockdep_addr = lock;
85 ), 95 ),
86 TP_printk("%s (%lu.%03lu us)", __get_str(name), __entry->wait_usec, 96 TP_printk("%p %s (%llu ns)", __entry->lockdep_addr,
87 __entry->wait_nsec_rem) 97 __get_str(name),
98 __entry->wait_nsec)
88); 99);
89 100
90#endif 101#endif
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index c6fe03e902ca..0804cd594803 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -65,7 +65,8 @@
65 }; 65 };
66#undef DEFINE_EVENT 66#undef DEFINE_EVENT
67#define DEFINE_EVENT(template, name, proto, args) \ 67#define DEFINE_EVENT(template, name, proto, args) \
68 static struct ftrace_event_call event_##name 68 static struct ftrace_event_call \
69 __attribute__((__aligned__(4))) event_##name
69 70
70#undef DEFINE_EVENT_PRINT 71#undef DEFINE_EVENT_PRINT
71#define DEFINE_EVENT_PRINT(template, name, proto, args, print) \ 72#define DEFINE_EVENT_PRINT(template, name, proto, args, print) \
@@ -131,130 +132,6 @@
131#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) 132#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
132 133
133/* 134/*
134 * Setup the showing format of trace point.
135 *
136 * int
137 * ftrace_format_##call(struct trace_seq *s)
138 * {
139 * struct ftrace_raw_##call field;
140 * int ret;
141 *
142 * ret = trace_seq_printf(s, #type " " #item ";"
143 * " offset:%u; size:%u;\n",
144 * offsetof(struct ftrace_raw_##call, item),
145 * sizeof(field.type));
146 *
147 * }
148 */
149
150#undef TP_STRUCT__entry
151#define TP_STRUCT__entry(args...) args
152
153#undef __field
154#define __field(type, item) \
155 ret = trace_seq_printf(s, "\tfield:" #type " " #item ";\t" \
156 "offset:%u;\tsize:%u;\tsigned:%u;\n", \
157 (unsigned int)offsetof(typeof(field), item), \
158 (unsigned int)sizeof(field.item), \
159 (unsigned int)is_signed_type(type)); \
160 if (!ret) \
161 return 0;
162
163#undef __field_ext
164#define __field_ext(type, item, filter_type) __field(type, item)
165
166#undef __array
167#define __array(type, item, len) \
168 ret = trace_seq_printf(s, "\tfield:" #type " " #item "[" #len "];\t" \
169 "offset:%u;\tsize:%u;\tsigned:%u;\n", \
170 (unsigned int)offsetof(typeof(field), item), \
171 (unsigned int)sizeof(field.item), \
172 (unsigned int)is_signed_type(type)); \
173 if (!ret) \
174 return 0;
175
176#undef __dynamic_array
177#define __dynamic_array(type, item, len) \
178 ret = trace_seq_printf(s, "\tfield:__data_loc " #type "[] " #item ";\t"\
179 "offset:%u;\tsize:%u;\tsigned:%u;\n", \
180 (unsigned int)offsetof(typeof(field), \
181 __data_loc_##item), \
182 (unsigned int)sizeof(field.__data_loc_##item), \
183 (unsigned int)is_signed_type(type)); \
184 if (!ret) \
185 return 0;
186
187#undef __string
188#define __string(item, src) __dynamic_array(char, item, -1)
189
190#undef __entry
191#define __entry REC
192
193#undef __print_symbolic
194#undef __get_dynamic_array
195#undef __get_str
196
197#undef TP_printk
198#define TP_printk(fmt, args...) "\"%s\", %s\n", fmt, __stringify(args)
199
200#undef TP_fast_assign
201#define TP_fast_assign(args...) args
202
203#undef TP_perf_assign
204#define TP_perf_assign(args...)
205
206#undef DECLARE_EVENT_CLASS
207#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, func, print) \
208static int \
209ftrace_format_setup_##call(struct ftrace_event_call *unused, \
210 struct trace_seq *s) \
211{ \
212 struct ftrace_raw_##call field __attribute__((unused)); \
213 int ret = 0; \
214 \
215 tstruct; \
216 \
217 return ret; \
218} \
219 \
220static int \
221ftrace_format_##call(struct ftrace_event_call *unused, \
222 struct trace_seq *s) \
223{ \
224 int ret = 0; \
225 \
226 ret = ftrace_format_setup_##call(unused, s); \
227 if (!ret) \
228 return ret; \
229 \
230 ret = trace_seq_printf(s, "\nprint fmt: " print); \
231 \
232 return ret; \
233}
234
235#undef DEFINE_EVENT
236#define DEFINE_EVENT(template, name, proto, args)
237
238#undef DEFINE_EVENT_PRINT
239#define DEFINE_EVENT_PRINT(template, name, proto, args, print) \
240static int \
241ftrace_format_##name(struct ftrace_event_call *unused, \
242 struct trace_seq *s) \
243{ \
244 int ret = 0; \
245 \
246 ret = ftrace_format_setup_##template(unused, s); \
247 if (!ret) \
248 return ret; \
249 \
250 trace_seq_printf(s, "\nprint fmt: " print); \
251 \
252 return ret; \
253}
254
255#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
256
257/*
258 * Stage 3 of the trace events. 135 * Stage 3 of the trace events.
259 * 136 *
260 * Override the macros in <trace/trace_events.h> to include the following: 137 * Override the macros in <trace/trace_events.h> to include the following:
@@ -323,7 +200,7 @@ ftrace_format_##name(struct ftrace_event_call *unused, \
323 200
324#undef DECLARE_EVENT_CLASS 201#undef DECLARE_EVENT_CLASS
325#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ 202#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
326static enum print_line_t \ 203static notrace enum print_line_t \
327ftrace_raw_output_id_##call(int event_id, const char *name, \ 204ftrace_raw_output_id_##call(int event_id, const char *name, \
328 struct trace_iterator *iter, int flags) \ 205 struct trace_iterator *iter, int flags) \
329{ \ 206{ \
@@ -356,7 +233,7 @@ ftrace_raw_output_id_##call(int event_id, const char *name, \
356 233
357#undef DEFINE_EVENT 234#undef DEFINE_EVENT
358#define DEFINE_EVENT(template, name, proto, args) \ 235#define DEFINE_EVENT(template, name, proto, args) \
359static enum print_line_t \ 236static notrace enum print_line_t \
360ftrace_raw_output_##name(struct trace_iterator *iter, int flags) \ 237ftrace_raw_output_##name(struct trace_iterator *iter, int flags) \
361{ \ 238{ \
362 return ftrace_raw_output_id_##template(event_##name.id, \ 239 return ftrace_raw_output_id_##template(event_##name.id, \
@@ -365,7 +242,7 @@ ftrace_raw_output_##name(struct trace_iterator *iter, int flags) \
365 242
366#undef DEFINE_EVENT_PRINT 243#undef DEFINE_EVENT_PRINT
367#define DEFINE_EVENT_PRINT(template, call, proto, args, print) \ 244#define DEFINE_EVENT_PRINT(template, call, proto, args, print) \
368static enum print_line_t \ 245static notrace enum print_line_t \
369ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \ 246ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \
370{ \ 247{ \
371 struct trace_seq *s = &iter->seq; \ 248 struct trace_seq *s = &iter->seq; \
@@ -431,7 +308,7 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \
431 308
432#undef DECLARE_EVENT_CLASS 309#undef DECLARE_EVENT_CLASS
433#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, func, print) \ 310#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, func, print) \
434static int \ 311static int notrace \
435ftrace_define_fields_##call(struct ftrace_event_call *event_call) \ 312ftrace_define_fields_##call(struct ftrace_event_call *event_call) \
436{ \ 313{ \
437 struct ftrace_raw_##call field; \ 314 struct ftrace_raw_##call field; \
@@ -479,7 +356,7 @@ ftrace_define_fields_##call(struct ftrace_event_call *event_call) \
479 356
480#undef DECLARE_EVENT_CLASS 357#undef DECLARE_EVENT_CLASS
481#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ 358#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
482static inline int ftrace_get_offsets_##call( \ 359static inline notrace int ftrace_get_offsets_##call( \
483 struct ftrace_data_offsets_##call *__data_offsets, proto) \ 360 struct ftrace_data_offsets_##call *__data_offsets, proto) \
484{ \ 361{ \
485 int __data_size = 0; \ 362 int __data_size = 0; \
@@ -499,7 +376,7 @@ static inline int ftrace_get_offsets_##call( \
499 376
500#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) 377#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
501 378
502#ifdef CONFIG_EVENT_PROFILE 379#ifdef CONFIG_PERF_EVENTS
503 380
504/* 381/*
505 * Generate the functions needed for tracepoint perf_event support. 382 * Generate the functions needed for tracepoint perf_event support.
@@ -526,12 +403,14 @@ static inline int ftrace_get_offsets_##call( \
526 \ 403 \
527static void ftrace_profile_##name(proto); \ 404static void ftrace_profile_##name(proto); \
528 \ 405 \
529static int ftrace_profile_enable_##name(struct ftrace_event_call *unused)\ 406static notrace int \
407ftrace_profile_enable_##name(struct ftrace_event_call *unused) \
530{ \ 408{ \
531 return register_trace_##name(ftrace_profile_##name); \ 409 return register_trace_##name(ftrace_profile_##name); \
532} \ 410} \
533 \ 411 \
534static void ftrace_profile_disable_##name(struct ftrace_event_call *unused)\ 412static notrace void \
413ftrace_profile_disable_##name(struct ftrace_event_call *unused) \
535{ \ 414{ \
536 unregister_trace_##name(ftrace_profile_##name); \ 415 unregister_trace_##name(ftrace_profile_##name); \
537} 416}
@@ -542,7 +421,7 @@ static void ftrace_profile_disable_##name(struct ftrace_event_call *unused)\
542 421
543#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) 422#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
544 423
545#endif 424#endif /* CONFIG_PERF_EVENTS */
546 425
547/* 426/*
548 * Stage 4 of the trace events. 427 * Stage 4 of the trace events.
@@ -622,12 +501,11 @@ static void ftrace_profile_disable_##name(struct ftrace_event_call *unused)\
622 * .raw_init = trace_event_raw_init, 501 * .raw_init = trace_event_raw_init,
623 * .regfunc = ftrace_reg_event_<call>, 502 * .regfunc = ftrace_reg_event_<call>,
624 * .unregfunc = ftrace_unreg_event_<call>, 503 * .unregfunc = ftrace_unreg_event_<call>,
625 * .show_format = ftrace_format_<call>,
626 * } 504 * }
627 * 505 *
628 */ 506 */
629 507
630#ifdef CONFIG_EVENT_PROFILE 508#ifdef CONFIG_PERF_EVENTS
631 509
632#define _TRACE_PROFILE_INIT(call) \ 510#define _TRACE_PROFILE_INIT(call) \
633 .profile_enable = ftrace_profile_enable_##call, \ 511 .profile_enable = ftrace_profile_enable_##call, \
@@ -635,7 +513,7 @@ static void ftrace_profile_disable_##name(struct ftrace_event_call *unused)\
635 513
636#else 514#else
637#define _TRACE_PROFILE_INIT(call) 515#define _TRACE_PROFILE_INIT(call)
638#endif 516#endif /* CONFIG_PERF_EVENTS */
639 517
640#undef __entry 518#undef __entry
641#define __entry entry 519#define __entry entry
@@ -657,10 +535,17 @@ static void ftrace_profile_disable_##name(struct ftrace_event_call *unused)\
657#define __assign_str(dst, src) \ 535#define __assign_str(dst, src) \
658 strcpy(__get_str(dst), src); 536 strcpy(__get_str(dst), src);
659 537
538#undef TP_fast_assign
539#define TP_fast_assign(args...) args
540
541#undef TP_perf_assign
542#define TP_perf_assign(args...)
543
660#undef DECLARE_EVENT_CLASS 544#undef DECLARE_EVENT_CLASS
661#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ 545#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
662 \ 546 \
663static void ftrace_raw_event_id_##call(struct ftrace_event_call *event_call, \ 547static notrace void \
548ftrace_raw_event_id_##call(struct ftrace_event_call *event_call, \
664 proto) \ 549 proto) \
665{ \ 550{ \
666 struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ 551 struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\
@@ -697,17 +582,19 @@ static void ftrace_raw_event_id_##call(struct ftrace_event_call *event_call, \
697#undef DEFINE_EVENT 582#undef DEFINE_EVENT
698#define DEFINE_EVENT(template, call, proto, args) \ 583#define DEFINE_EVENT(template, call, proto, args) \
699 \ 584 \
700static void ftrace_raw_event_##call(proto) \ 585static notrace void ftrace_raw_event_##call(proto) \
701{ \ 586{ \
702 ftrace_raw_event_id_##template(&event_##call, args); \ 587 ftrace_raw_event_id_##template(&event_##call, args); \
703} \ 588} \
704 \ 589 \
705static int ftrace_raw_reg_event_##call(struct ftrace_event_call *unused)\ 590static notrace int \
591ftrace_raw_reg_event_##call(struct ftrace_event_call *unused) \
706{ \ 592{ \
707 return register_trace_##call(ftrace_raw_event_##call); \ 593 return register_trace_##call(ftrace_raw_event_##call); \
708} \ 594} \
709 \ 595 \
710static void ftrace_raw_unreg_event_##call(struct ftrace_event_call *unused)\ 596static notrace void \
597ftrace_raw_unreg_event_##call(struct ftrace_event_call *unused) \
711{ \ 598{ \
712 unregister_trace_##call(ftrace_raw_event_##call); \ 599 unregister_trace_##call(ftrace_raw_event_##call); \
713} \ 600} \
@@ -722,8 +609,20 @@ static struct trace_event ftrace_event_type_##call = { \
722 609
723#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) 610#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
724 611
612#undef __entry
613#define __entry REC
614
615#undef __print_flags
616#undef __print_symbolic
617#undef __get_dynamic_array
618#undef __get_str
619
620#undef TP_printk
621#define TP_printk(fmt, args...) "\"" fmt "\", " __stringify(args)
622
725#undef DECLARE_EVENT_CLASS 623#undef DECLARE_EVENT_CLASS
726#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) 624#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
625static const char print_fmt_##call[] = print;
727 626
728#undef DEFINE_EVENT 627#undef DEFINE_EVENT
729#define DEFINE_EVENT(template, call, proto, args) \ 628#define DEFINE_EVENT(template, call, proto, args) \
@@ -737,7 +636,7 @@ __attribute__((section("_ftrace_events"))) event_##call = { \
737 .raw_init = trace_event_raw_init, \ 636 .raw_init = trace_event_raw_init, \
738 .regfunc = ftrace_raw_reg_event_##call, \ 637 .regfunc = ftrace_raw_reg_event_##call, \
739 .unregfunc = ftrace_raw_unreg_event_##call, \ 638 .unregfunc = ftrace_raw_unreg_event_##call, \
740 .show_format = ftrace_format_##template, \ 639 .print_fmt = print_fmt_##template, \
741 .define_fields = ftrace_define_fields_##template, \ 640 .define_fields = ftrace_define_fields_##template, \
742 _TRACE_PROFILE_INIT(call) \ 641 _TRACE_PROFILE_INIT(call) \
743} 642}
@@ -745,6 +644,8 @@ __attribute__((section("_ftrace_events"))) event_##call = { \
745#undef DEFINE_EVENT_PRINT 644#undef DEFINE_EVENT_PRINT
746#define DEFINE_EVENT_PRINT(template, call, proto, args, print) \ 645#define DEFINE_EVENT_PRINT(template, call, proto, args, print) \
747 \ 646 \
647static const char print_fmt_##call[] = print; \
648 \
748static struct ftrace_event_call __used \ 649static struct ftrace_event_call __used \
749__attribute__((__aligned__(4))) \ 650__attribute__((__aligned__(4))) \
750__attribute__((section("_ftrace_events"))) event_##call = { \ 651__attribute__((section("_ftrace_events"))) event_##call = { \
@@ -754,7 +655,7 @@ __attribute__((section("_ftrace_events"))) event_##call = { \
754 .raw_init = trace_event_raw_init, \ 655 .raw_init = trace_event_raw_init, \
755 .regfunc = ftrace_raw_reg_event_##call, \ 656 .regfunc = ftrace_raw_reg_event_##call, \
756 .unregfunc = ftrace_raw_unreg_event_##call, \ 657 .unregfunc = ftrace_raw_unreg_event_##call, \
757 .show_format = ftrace_format_##call, \ 658 .print_fmt = print_fmt_##call, \
758 .define_fields = ftrace_define_fields_##template, \ 659 .define_fields = ftrace_define_fields_##template, \
759 _TRACE_PROFILE_INIT(call) \ 660 _TRACE_PROFILE_INIT(call) \
760} 661}
@@ -835,7 +736,17 @@ __attribute__((section("_ftrace_events"))) event_##call = { \
835 * } 736 * }
836 */ 737 */
837 738
838#ifdef CONFIG_EVENT_PROFILE 739#ifdef CONFIG_PERF_EVENTS
740
741#undef __entry
742#define __entry entry
743
744#undef __get_dynamic_array
745#define __get_dynamic_array(field) \
746 ((void *)__entry + (__entry->__data_loc_##field & 0xffff))
747
748#undef __get_str
749#define __get_str(field) (char *)__get_dynamic_array(field)
839 750
840#undef __perf_addr 751#undef __perf_addr
841#define __perf_addr(a) __addr = (a) 752#define __perf_addr(a) __addr = (a)
@@ -845,27 +756,17 @@ __attribute__((section("_ftrace_events"))) event_##call = { \
845 756
846#undef DECLARE_EVENT_CLASS 757#undef DECLARE_EVENT_CLASS
847#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ 758#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
848static void \ 759static notrace void \
849ftrace_profile_templ_##call(struct ftrace_event_call *event_call, \ 760ftrace_profile_templ_##call(struct ftrace_event_call *event_call, \
850 proto) \ 761 proto) \
851{ \ 762{ \
852 struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ 763 struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\
853 extern int perf_swevent_get_recursion_context(void); \
854 extern void perf_swevent_put_recursion_context(int rctx); \
855 extern void perf_tp_event(int, u64, u64, void *, int); \
856 struct ftrace_raw_##call *entry; \ 764 struct ftrace_raw_##call *entry; \
857 u64 __addr = 0, __count = 1; \ 765 u64 __addr = 0, __count = 1; \
858 unsigned long irq_flags; \ 766 unsigned long irq_flags; \
859 struct trace_entry *ent; \
860 int __entry_size; \ 767 int __entry_size; \
861 int __data_size; \ 768 int __data_size; \
862 char *trace_buf; \
863 char *raw_data; \
864 int __cpu; \
865 int rctx; \ 769 int rctx; \
866 int pc; \
867 \
868 pc = preempt_count(); \
869 \ 770 \
870 __data_size = ftrace_get_offsets_##call(&__data_offsets, args); \ 771 __data_size = ftrace_get_offsets_##call(&__data_offsets, args); \
871 __entry_size = ALIGN(__data_size + sizeof(*entry) + sizeof(u32),\ 772 __entry_size = ALIGN(__data_size + sizeof(*entry) + sizeof(u32),\
@@ -875,47 +776,21 @@ ftrace_profile_templ_##call(struct ftrace_event_call *event_call, \
875 if (WARN_ONCE(__entry_size > FTRACE_MAX_PROFILE_SIZE, \ 776 if (WARN_ONCE(__entry_size > FTRACE_MAX_PROFILE_SIZE, \
876 "profile buffer not large enough")) \ 777 "profile buffer not large enough")) \
877 return; \ 778 return; \
878 \ 779 entry = (struct ftrace_raw_##call *)ftrace_perf_buf_prepare( \
879 local_irq_save(irq_flags); \ 780 __entry_size, event_call->id, &rctx, &irq_flags); \
880 \ 781 if (!entry) \
881 rctx = perf_swevent_get_recursion_context(); \ 782 return; \
882 if (rctx < 0) \
883 goto end_recursion; \
884 \
885 __cpu = smp_processor_id(); \
886 \
887 if (in_nmi()) \
888 trace_buf = rcu_dereference(perf_trace_buf_nmi); \
889 else \
890 trace_buf = rcu_dereference(perf_trace_buf); \
891 \
892 if (!trace_buf) \
893 goto end; \
894 \
895 raw_data = per_cpu_ptr(trace_buf, __cpu); \
896 \
897 *(u64 *)(&raw_data[__entry_size - sizeof(u64)]) = 0ULL; \
898 entry = (struct ftrace_raw_##call *)raw_data; \
899 ent = &entry->ent; \
900 tracing_generic_entry_update(ent, irq_flags, pc); \
901 ent->type = event_call->id; \
902 \
903 tstruct \ 783 tstruct \
904 \ 784 \
905 { assign; } \ 785 { assign; } \
906 \ 786 \
907 perf_tp_event(event_call->id, __addr, __count, entry, \ 787 ftrace_perf_buf_submit(entry, __entry_size, rctx, __addr, \
908 __entry_size); \ 788 __count, irq_flags); \
909 \
910end: \
911 perf_swevent_put_recursion_context(rctx); \
912end_recursion: \
913 local_irq_restore(irq_flags); \
914} 789}
915 790
916#undef DEFINE_EVENT 791#undef DEFINE_EVENT
917#define DEFINE_EVENT(template, call, proto, args) \ 792#define DEFINE_EVENT(template, call, proto, args) \
918static void ftrace_profile_##call(proto) \ 793static notrace void ftrace_profile_##call(proto) \
919{ \ 794{ \
920 struct ftrace_event_call *event_call = &event_##call; \ 795 struct ftrace_event_call *event_call = &event_##call; \
921 \ 796 \
@@ -927,7 +802,7 @@ static void ftrace_profile_##call(proto) \
927 DEFINE_EVENT(template, name, PARAMS(proto), PARAMS(args)) 802 DEFINE_EVENT(template, name, PARAMS(proto), PARAMS(args))
928 803
929#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) 804#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
930#endif /* CONFIG_EVENT_PROFILE */ 805#endif /* CONFIG_PERF_EVENTS */
931 806
932#undef _TRACE_PROFILE_INIT 807#undef _TRACE_PROFILE_INIT
933 808
diff --git a/include/trace/syscall.h b/include/trace/syscall.h
index 961fda3556bb..0387100752f0 100644
--- a/include/trace/syscall.h
+++ b/include/trace/syscall.h
@@ -34,10 +34,6 @@ struct syscall_metadata {
34extern unsigned long arch_syscall_addr(int nr); 34extern unsigned long arch_syscall_addr(int nr);
35extern int init_syscall_trace(struct ftrace_event_call *call); 35extern int init_syscall_trace(struct ftrace_event_call *call);
36 36
37extern int syscall_enter_format(struct ftrace_event_call *call,
38 struct trace_seq *s);
39extern int syscall_exit_format(struct ftrace_event_call *call,
40 struct trace_seq *s);
41extern int syscall_enter_define_fields(struct ftrace_event_call *call); 37extern int syscall_enter_define_fields(struct ftrace_event_call *call);
42extern int syscall_exit_define_fields(struct ftrace_event_call *call); 38extern int syscall_exit_define_fields(struct ftrace_event_call *call);
43extern int reg_event_syscall_enter(struct ftrace_event_call *call); 39extern int reg_event_syscall_enter(struct ftrace_event_call *call);
@@ -49,12 +45,12 @@ ftrace_format_syscall(struct ftrace_event_call *call, struct trace_seq *s);
49enum print_line_t print_syscall_enter(struct trace_iterator *iter, int flags); 45enum print_line_t print_syscall_enter(struct trace_iterator *iter, int flags);
50enum print_line_t print_syscall_exit(struct trace_iterator *iter, int flags); 46enum print_line_t print_syscall_exit(struct trace_iterator *iter, int flags);
51#endif 47#endif
52#ifdef CONFIG_EVENT_PROFILE 48
49#ifdef CONFIG_PERF_EVENTS
53int prof_sysenter_enable(struct ftrace_event_call *call); 50int prof_sysenter_enable(struct ftrace_event_call *call);
54void prof_sysenter_disable(struct ftrace_event_call *call); 51void prof_sysenter_disable(struct ftrace_event_call *call);
55int prof_sysexit_enable(struct ftrace_event_call *call); 52int prof_sysexit_enable(struct ftrace_event_call *call);
56void prof_sysexit_disable(struct ftrace_event_call *call); 53void prof_sysexit_disable(struct ftrace_event_call *call);
57
58#endif 54#endif
59 55
60#endif /* _TRACE_SYSCALL_H */ 56#endif /* _TRACE_SYSCALL_H */
diff --git a/include/video/sh_mobile_lcdc.h b/include/video/sh_mobile_lcdc.h
index 288205457713..2cc893fc1f85 100644
--- a/include/video/sh_mobile_lcdc.h
+++ b/include/video/sh_mobile_lcdc.h
@@ -34,6 +34,8 @@ enum { LCDC_CLK_BUS, LCDC_CLK_PERIPHERAL, LCDC_CLK_EXTERNAL };
34#define LCDC_FLAGS_HSCNT (1 << 3) /* Disable HSYNC during VBLANK */ 34#define LCDC_FLAGS_HSCNT (1 << 3) /* Disable HSYNC during VBLANK */
35#define LCDC_FLAGS_DWCNT (1 << 4) /* Disable dotclock during blanking */ 35#define LCDC_FLAGS_DWCNT (1 << 4) /* Disable dotclock during blanking */
36 36
37#define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32)
38
37struct sh_mobile_lcdc_sys_bus_cfg { 39struct sh_mobile_lcdc_sys_bus_cfg {
38 unsigned long ldmt2r; 40 unsigned long ldmt2r;
39 unsigned long ldmt3r; 41 unsigned long ldmt3r;