aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/Kbuild1
-rw-r--r--include/linux/aer.h3
-rw-r--r--include/linux/aio.h2
-rw-r--r--include/linux/atmdev.h2
-rw-r--r--include/linux/atomic.h28
-rw-r--r--include/linux/backing-dev.h10
-rw-r--r--include/linux/bcma/bcma.h21
-rw-r--r--include/linux/bcma/bcma_driver_chipcommon.h13
-rw-r--r--include/linux/bcma/bcma_regs.h27
-rw-r--r--include/linux/bit_spinlock.h2
-rw-r--r--include/linux/bitmap.h1
-rw-r--r--include/linux/blkdev.h27
-rw-r--r--include/linux/buffer_head.h2
-rw-r--r--include/linux/ceph/libceph.h2
-rw-r--r--include/linux/ceph/messenger.h1
-rw-r--r--include/linux/cgroup.h1
-rw-r--r--include/linux/compat.h9
-rw-r--r--include/linux/configfs.h2
-rw-r--r--include/linux/connector.h2
-rw-r--r--include/linux/cpu.h33
-rw-r--r--include/linux/cpufreq.h5
-rw-r--r--include/linux/cpumask.h14
-rw-r--r--include/linux/cred.h3
-rw-r--r--include/linux/crypto.h2
-rw-r--r--include/linux/cs5535.h60
-rw-r--r--include/linux/ctype.h9
-rw-r--r--include/linux/dcache.h2
-rw-r--r--include/linux/debug_locks.h2
-rw-r--r--include/linux/device.h2
-rw-r--r--include/linux/dio.h2
-rw-r--r--include/linux/dma-mapping.h21
-rw-r--r--include/linux/dvb/audio.h2
-rw-r--r--include/linux/ecryptfs.h113
-rw-r--r--include/linux/edac.h2
-rw-r--r--include/linux/eeprom_93xx46.h18
-rw-r--r--include/linux/elevator.h2
-rw-r--r--include/linux/ext2_fs.h1
-rw-r--r--include/linux/ext3_fs.h7
-rw-r--r--include/linux/fault-inject.h21
-rw-r--r--include/linux/fd.h22
-rw-r--r--include/linux/fdtable.h3
-rw-r--r--include/linux/filter.h2
-rw-r--r--include/linux/firewire.h2
-rw-r--r--include/linux/fs.h23
-rw-r--r--include/linux/fsl_hypervisor.h241
-rw-r--r--include/linux/fsnotify_backend.h2
-rw-r--r--include/linux/generic_acl.h1
-rw-r--r--include/linux/genhd.h2
-rw-r--r--include/linux/gsmmux.h11
-rw-r--r--include/linux/hugetlb.h3
-rw-r--r--include/linux/hw_random.h2
-rw-r--r--include/linux/i2c-omap.h27
-rw-r--r--include/linux/i2c/twl.h25
-rw-r--r--include/linux/ieee80211.h37
-rw-r--r--include/linux/if.h2
-rw-r--r--include/linux/init_task.h1
-rw-r--r--include/linux/input.h6
-rw-r--r--include/linux/input/kxtj9.h70
-rw-r--r--include/linux/interrupt.h2
-rw-r--r--include/linux/iocontext.h14
-rw-r--r--include/linux/ioport.h30
-rw-r--r--include/linux/ipc_namespace.h7
-rw-r--r--include/linux/irq.h6
-rw-r--r--include/linux/irqdomain.h91
-rw-r--r--include/linux/jbd.h1
-rw-r--r--include/linux/journal-head.h2
-rw-r--r--include/linux/jump_label.h2
-rw-r--r--include/linux/kconfig.h32
-rw-r--r--include/linux/kdb.h2
-rw-r--r--include/linux/kernel.h54
-rw-r--r--include/linux/key.h2
-rw-r--r--include/linux/kgdb.h2
-rw-r--r--include/linux/kobject.h2
-rw-r--r--include/linux/led-lm3530.h5
-rw-r--r--include/linux/libata.h68
-rw-r--r--include/linux/memcontrol.h26
-rw-r--r--include/linux/memory_hotplug.h11
-rw-r--r--include/linux/mfd/max8997.h7
-rw-r--r--include/linux/mfd/max8998.h12
-rw-r--r--include/linux/mfd/pm8xxx/rtc.h25
-rw-r--r--include/linux/mfd/tps65910.h2
-rw-r--r--include/linux/mfd/twl4030-audio.h (renamed from include/linux/mfd/twl4030-codec.h)16
-rw-r--r--include/linux/mfd/twl6040.h228
-rw-r--r--include/linux/mlx4/device.h2
-rw-r--r--include/linux/mm.h19
-rw-r--r--include/linux/mm_types.h89
-rw-r--r--include/linux/mman.h2
-rw-r--r--include/linux/mmzone.h8
-rw-r--r--include/linux/mount.h2
-rw-r--r--include/linux/mutex.h2
-rw-r--r--include/linux/netdevice.h45
-rw-r--r--include/linux/nfs_fs_sb.h2
-rw-r--r--include/linux/nfsd/export.h2
-rw-r--r--include/linux/nl80211.h35
-rw-r--r--include/linux/nodemask.h13
-rw-r--r--include/linux/notifier.h82
-rw-r--r--include/linux/of_irq.h4
-rw-r--r--include/linux/of_net.h1
-rw-r--r--include/linux/oom.h4
-rw-r--r--include/linux/oprofile.h2
-rw-r--r--include/linux/page-flags.h9
-rw-r--r--include/linux/pagemap.h12
-rw-r--r--include/linux/pci.h8
-rw-r--r--include/linux/pci_ids.h4
-rw-r--r--include/linux/perf_event.h2
-rw-r--r--include/linux/phy.h6
-rw-r--r--include/linux/platform_data/fsa9480.h27
-rw-r--r--include/linux/platform_data/ntc_thermistor.h53
-rw-r--r--include/linux/platform_device.h1
-rw-r--r--include/linux/pnp.h2
-rw-r--r--include/linux/poison.h6
-rw-r--r--include/linux/posix_acl.h5
-rw-r--r--include/linux/power/bq20z75.h3
-rw-r--r--include/linux/power/max17042_battery.h91
-rw-r--r--include/linux/proc_fs.h8
-rw-r--r--include/linux/pti.h3
-rw-r--r--include/linux/quota.h10
-rw-r--r--include/linux/raid/md_p.h14
-rw-r--r--include/linux/ramoops.h2
-rw-r--r--include/linux/reboot.h5
-rw-r--r--include/linux/reiserfs_acl.h6
-rw-r--r--include/linux/reiserfs_fs.h2
-rw-r--r--include/linux/reiserfs_xattr.h2
-rw-r--r--include/linux/rtnetlink.h3
-rw-r--r--include/linux/rwsem.h2
-rw-r--r--include/linux/sched.h1
-rw-r--r--include/linux/sem.h2
-rw-r--r--include/linux/shm.h7
-rw-r--r--include/linux/skbuff.h2
-rw-r--r--include/linux/slub_def.h3
-rw-r--r--include/linux/sonet.h2
-rw-r--r--include/linux/spinlock.h2
-rw-r--r--include/linux/splice.h2
-rw-r--r--include/linux/ssb/ssb.h2
-rw-r--r--include/linux/ssb/ssb_driver_chipcommon.h2
-rw-r--r--include/linux/stop_machine.h2
-rw-r--r--include/linux/sunrpc/auth.h2
-rw-r--r--include/linux/sunrpc/cache.h11
-rw-r--r--include/linux/sunrpc/svc.h1
-rw-r--r--include/linux/sunrpc/timer.h2
-rw-r--r--include/linux/suspend.h8
-rw-r--r--include/linux/swap.h19
-rw-r--r--include/linux/sysfs.h2
-rw-r--r--include/linux/tty.h37
-rw-r--r--include/linux/usb/composite.h32
-rw-r--r--include/linux/usb/gadget.h88
-rw-r--r--include/linux/usb/m66592.h2
-rw-r--r--include/linux/usb/r8a66597.h8
-rw-r--r--include/linux/usb/renesas_usbhs.h17
-rw-r--r--include/linux/videodev2.h254
-rw-r--r--include/linux/vmstat.h2
-rw-r--r--include/linux/vt.h7
-rw-r--r--include/linux/vt_kern.h2
-rw-r--r--include/linux/watchdog.h78
-rw-r--r--include/linux/wm97xx.h13
-rw-r--r--include/linux/workqueue.h2
-rw-r--r--include/linux/writeback.h55
-rw-r--r--include/linux/zorro.h2
158 files changed, 2394 insertions, 485 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 01f636275057..619b5657af77 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -135,6 +135,7 @@ header-y += firewire-cdev.h
135header-y += firewire-constants.h 135header-y += firewire-constants.h
136header-y += flat.h 136header-y += flat.h
137header-y += fs.h 137header-y += fs.h
138header-y += fsl_hypervisor.h
138header-y += fuse.h 139header-y += fuse.h
139header-y += futex.h 140header-y += futex.h
140header-y += gameport.h 141header-y += gameport.h
diff --git a/include/linux/aer.h b/include/linux/aer.h
index 8414de22a779..544abdb2238c 100644
--- a/include/linux/aer.h
+++ b/include/linux/aer.h
@@ -51,5 +51,8 @@ static inline int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev)
51 51
52extern void cper_print_aer(const char *prefix, int cper_severity, 52extern void cper_print_aer(const char *prefix, int cper_severity,
53 struct aer_capability_regs *aer); 53 struct aer_capability_regs *aer);
54extern int cper_severity_to_aer(int cper_severity);
55extern void aer_recover_queue(int domain, unsigned int bus, unsigned int devfn,
56 int severity);
54#endif //_AER_H_ 57#endif //_AER_H_
55 58
diff --git a/include/linux/aio.h b/include/linux/aio.h
index 7a8db4155281..2dcb72bff4b6 100644
--- a/include/linux/aio.h
+++ b/include/linux/aio.h
@@ -7,7 +7,7 @@
7#include <linux/uio.h> 7#include <linux/uio.h>
8#include <linux/rcupdate.h> 8#include <linux/rcupdate.h>
9 9
10#include <asm/atomic.h> 10#include <linux/atomic.h>
11 11
12#define AIO_MAXSEGS 4 12#define AIO_MAXSEGS 4
13#define AIO_KIOGRP_NR_ATOMIC 8 13#define AIO_KIOGRP_NR_ATOMIC 8
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h
index 381f4cec8260..49a83ca900ba 100644
--- a/include/linux/atmdev.h
+++ b/include/linux/atmdev.h
@@ -220,7 +220,7 @@ struct atm_cirange {
220#include <linux/skbuff.h> /* struct sk_buff */ 220#include <linux/skbuff.h> /* struct sk_buff */
221#include <linux/uio.h> 221#include <linux/uio.h>
222#include <net/sock.h> 222#include <net/sock.h>
223#include <asm/atomic.h> 223#include <linux/atomic.h>
224 224
225#ifdef CONFIG_PROC_FS 225#ifdef CONFIG_PROC_FS
226#include <linux/proc_fs.h> 226#include <linux/proc_fs.h>
diff --git a/include/linux/atomic.h b/include/linux/atomic.h
index bc6615d4132b..42b77b5446d2 100644
--- a/include/linux/atomic.h
+++ b/include/linux/atomic.h
@@ -1,8 +1,32 @@
1/* Atomic operations usable in machine independent code */
1#ifndef _LINUX_ATOMIC_H 2#ifndef _LINUX_ATOMIC_H
2#define _LINUX_ATOMIC_H 3#define _LINUX_ATOMIC_H
3#include <asm/atomic.h> 4#include <asm/atomic.h>
4 5
5/** 6/**
7 * atomic_add_unless - add unless the number is already a given value
8 * @v: pointer of type atomic_t
9 * @a: the amount to add to v...
10 * @u: ...unless v is equal to u.
11 *
12 * Atomically adds @a to @v, so long as @v was not already @u.
13 * Returns non-zero if @v was not @u, and zero otherwise.
14 */
15static inline int atomic_add_unless(atomic_t *v, int a, int u)
16{
17 return __atomic_add_unless(v, a, u) != u;
18}
19
20/**
21 * atomic_inc_not_zero - increment unless the number is zero
22 * @v: pointer of type atomic_t
23 *
24 * Atomically increments @v by 1, so long as @v is non-zero.
25 * Returns non-zero if @v was non-zero, and zero otherwise.
26 */
27#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
28
29/**
6 * atomic_inc_not_zero_hint - increment if not null 30 * atomic_inc_not_zero_hint - increment if not null
7 * @v: pointer of type atomic_t 31 * @v: pointer of type atomic_t
8 * @hint: probable value of the atomic before the increment 32 * @hint: probable value of the atomic before the increment
@@ -73,4 +97,8 @@ static inline void atomic_or(int i, atomic_t *v)
73} 97}
74#endif /* #ifndef CONFIG_ARCH_HAS_ATOMIC_OR */ 98#endif /* #ifndef CONFIG_ARCH_HAS_ATOMIC_OR */
75 99
100#include <asm-generic/atomic-long.h>
101#ifdef CONFIG_GENERIC_ATOMIC64
102#include <asm-generic/atomic64.h>
103#endif
76#endif /* _LINUX_ATOMIC_H */ 104#endif /* _LINUX_ATOMIC_H */
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h
index 96f4094b706d..3b2f9cb82986 100644
--- a/include/linux/backing-dev.h
+++ b/include/linux/backing-dev.h
@@ -16,7 +16,7 @@
16#include <linux/sched.h> 16#include <linux/sched.h>
17#include <linux/timer.h> 17#include <linux/timer.h>
18#include <linux/writeback.h> 18#include <linux/writeback.h>
19#include <asm/atomic.h> 19#include <linux/atomic.h>
20 20
21struct page; 21struct page;
22struct device; 22struct device;
@@ -40,6 +40,7 @@ typedef int (congested_fn)(void *, int);
40enum bdi_stat_item { 40enum bdi_stat_item {
41 BDI_RECLAIMABLE, 41 BDI_RECLAIMABLE,
42 BDI_WRITEBACK, 42 BDI_WRITEBACK,
43 BDI_WRITTEN,
43 NR_BDI_STAT_ITEMS 44 NR_BDI_STAT_ITEMS
44}; 45};
45 46
@@ -57,6 +58,7 @@ struct bdi_writeback {
57 struct list_head b_dirty; /* dirty inodes */ 58 struct list_head b_dirty; /* dirty inodes */
58 struct list_head b_io; /* parked for writeback */ 59 struct list_head b_io; /* parked for writeback */
59 struct list_head b_more_io; /* parked for more writeback */ 60 struct list_head b_more_io; /* parked for more writeback */
61 spinlock_t list_lock; /* protects the b_* lists */
60}; 62};
61 63
62struct backing_dev_info { 64struct backing_dev_info {
@@ -71,6 +73,11 @@ struct backing_dev_info {
71 73
72 struct percpu_counter bdi_stat[NR_BDI_STAT_ITEMS]; 74 struct percpu_counter bdi_stat[NR_BDI_STAT_ITEMS];
73 75
76 unsigned long bw_time_stamp; /* last time write bw is updated */
77 unsigned long written_stamp; /* pages written at bw_time_stamp */
78 unsigned long write_bandwidth; /* the estimated write bandwidth */
79 unsigned long avg_write_bandwidth; /* further smoothed write bw */
80
74 struct prop_local_percpu completions; 81 struct prop_local_percpu completions;
75 int dirty_exceeded; 82 int dirty_exceeded;
76 83
@@ -106,6 +113,7 @@ int bdi_writeback_thread(void *data);
106int bdi_has_dirty_io(struct backing_dev_info *bdi); 113int bdi_has_dirty_io(struct backing_dev_info *bdi);
107void bdi_arm_supers_timer(void); 114void bdi_arm_supers_timer(void);
108void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi); 115void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi);
116void bdi_lock_two(struct bdi_writeback *wb1, struct bdi_writeback *wb2);
109 117
110extern spinlock_t bdi_lock; 118extern spinlock_t bdi_lock;
111extern struct list_head bdi_list; 119extern struct list_head bdi_list;
diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h
index 3895aeb494a3..8c96654bef16 100644
--- a/include/linux/bcma/bcma.h
+++ b/include/linux/bcma/bcma.h
@@ -25,6 +25,11 @@ struct bcma_chipinfo {
25 u8 pkg; 25 u8 pkg;
26}; 26};
27 27
28enum bcma_clkmode {
29 BCMA_CLKMODE_FAST,
30 BCMA_CLKMODE_DYNAMIC,
31};
32
28struct bcma_host_ops { 33struct bcma_host_ops {
29 u8 (*read8)(struct bcma_device *core, u16 offset); 34 u8 (*read8)(struct bcma_device *core, u16 offset);
30 u16 (*read16)(struct bcma_device *core, u16 offset); 35 u16 (*read16)(struct bcma_device *core, u16 offset);
@@ -243,8 +248,24 @@ void bcma_awrite32(struct bcma_device *core, u16 offset, u32 value)
243 core->bus->ops->awrite32(core, offset, value); 248 core->bus->ops->awrite32(core, offset, value);
244} 249}
245 250
251#define bcma_mask32(cc, offset, mask) \
252 bcma_write32(cc, offset, bcma_read32(cc, offset) & (mask))
253#define bcma_set32(cc, offset, set) \
254 bcma_write32(cc, offset, bcma_read32(cc, offset) | (set))
255#define bcma_maskset32(cc, offset, mask, set) \
256 bcma_write32(cc, offset, (bcma_read32(cc, offset) & (mask)) | (set))
257
246extern bool bcma_core_is_enabled(struct bcma_device *core); 258extern bool bcma_core_is_enabled(struct bcma_device *core);
247extern void bcma_core_disable(struct bcma_device *core, u32 flags); 259extern void bcma_core_disable(struct bcma_device *core, u32 flags);
248extern int bcma_core_enable(struct bcma_device *core, u32 flags); 260extern int bcma_core_enable(struct bcma_device *core, u32 flags);
261extern void bcma_core_set_clockmode(struct bcma_device *core,
262 enum bcma_clkmode clkmode);
263extern void bcma_core_pll_ctl(struct bcma_device *core, u32 req, u32 status,
264 bool on);
265#define BCMA_DMA_TRANSLATION_MASK 0xC0000000
266#define BCMA_DMA_TRANSLATION_NONE 0x00000000
267#define BCMA_DMA_TRANSLATION_DMA32_CMT 0x40000000 /* Client Mode Translation for 32-bit DMA */
268#define BCMA_DMA_TRANSLATION_DMA64_CMT 0x80000000 /* Client Mode Translation for 64-bit DMA */
269extern u32 bcma_core_dma_translation(struct bcma_device *core);
249 270
250#endif /* LINUX_BCMA_H_ */ 271#endif /* LINUX_BCMA_H_ */
diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h
index 9c5b69fc985a..a0f684615ae5 100644
--- a/include/linux/bcma/bcma_driver_chipcommon.h
+++ b/include/linux/bcma/bcma_driver_chipcommon.h
@@ -179,15 +179,7 @@
179#define BCMA_CC_PROG_WAITCNT 0x0124 179#define BCMA_CC_PROG_WAITCNT 0x0124
180#define BCMA_CC_FLASH_CFG 0x0128 180#define BCMA_CC_FLASH_CFG 0x0128
181#define BCMA_CC_FLASH_WAITCNT 0x012C 181#define BCMA_CC_FLASH_WAITCNT 0x012C
182#define BCMA_CC_CLKCTLST 0x01E0 /* Clock control and status (rev >= 20) */ 182/* 0x1E0 is defined as shared BCMA_CLKCTLST */
183#define BCMA_CC_CLKCTLST_FORCEALP 0x00000001 /* Force ALP request */
184#define BCMA_CC_CLKCTLST_FORCEHT 0x00000002 /* Force HT request */
185#define BCMA_CC_CLKCTLST_FORCEILP 0x00000004 /* Force ILP request */
186#define BCMA_CC_CLKCTLST_HAVEALPREQ 0x00000008 /* ALP available request */
187#define BCMA_CC_CLKCTLST_HAVEHTREQ 0x00000010 /* HT available request */
188#define BCMA_CC_CLKCTLST_HWCROFF 0x00000020 /* Force HW clock request off */
189#define BCMA_CC_CLKCTLST_HAVEHT 0x00010000 /* HT available */
190#define BCMA_CC_CLKCTLST_HAVEALP 0x00020000 /* APL available */
191#define BCMA_CC_HW_WORKAROUND 0x01E4 /* Hardware workaround (rev >= 20) */ 183#define BCMA_CC_HW_WORKAROUND 0x01E4 /* Hardware workaround (rev >= 20) */
192#define BCMA_CC_UART0_DATA 0x0300 184#define BCMA_CC_UART0_DATA 0x0300
193#define BCMA_CC_UART0_IMR 0x0304 185#define BCMA_CC_UART0_IMR 0x0304
@@ -244,7 +236,8 @@
244#define BCMA_CC_REGCTL_DATA 0x065C 236#define BCMA_CC_REGCTL_DATA 0x065C
245#define BCMA_CC_PLLCTL_ADDR 0x0660 237#define BCMA_CC_PLLCTL_ADDR 0x0660
246#define BCMA_CC_PLLCTL_DATA 0x0664 238#define BCMA_CC_PLLCTL_DATA 0x0664
247#define BCMA_CC_SPROM 0x0830 /* SPROM beginning */ 239#define BCMA_CC_SPROM 0x0800 /* SPROM beginning */
240#define BCMA_CC_SPROM_PCIE6 0x0830 /* SPROM beginning on PCIe rev >= 6 */
248 241
249/* Data for the PMU, if available. 242/* Data for the PMU, if available.
250 * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU) 243 * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU)
diff --git a/include/linux/bcma/bcma_regs.h b/include/linux/bcma/bcma_regs.h
index f82d88a960ce..9faae2ae02e8 100644
--- a/include/linux/bcma/bcma_regs.h
+++ b/include/linux/bcma/bcma_regs.h
@@ -1,13 +1,38 @@
1#ifndef LINUX_BCMA_REGS_H_ 1#ifndef LINUX_BCMA_REGS_H_
2#define LINUX_BCMA_REGS_H_ 2#define LINUX_BCMA_REGS_H_
3 3
4/* Some single registers are shared between many cores */
5/* BCMA_CLKCTLST: ChipCommon (rev >= 20), PCIe, 80211 */
6#define BCMA_CLKCTLST 0x01E0 /* Clock control and status */
7#define BCMA_CLKCTLST_FORCEALP 0x00000001 /* Force ALP request */
8#define BCMA_CLKCTLST_FORCEHT 0x00000002 /* Force HT request */
9#define BCMA_CLKCTLST_FORCEILP 0x00000004 /* Force ILP request */
10#define BCMA_CLKCTLST_HAVEALPREQ 0x00000008 /* ALP available request */
11#define BCMA_CLKCTLST_HAVEHTREQ 0x00000010 /* HT available request */
12#define BCMA_CLKCTLST_HWCROFF 0x00000020 /* Force HW clock request off */
13#define BCMA_CLKCTLST_EXTRESREQ 0x00000700 /* Mask of external resource requests */
14#define BCMA_CLKCTLST_HAVEALP 0x00010000 /* ALP available */
15#define BCMA_CLKCTLST_HAVEHT 0x00020000 /* HT available */
16#define BCMA_CLKCTLST_BP_ON_ALP 0x00040000 /* RO: running on ALP clock */
17#define BCMA_CLKCTLST_BP_ON_HT 0x00080000 /* RO: running on HT clock */
18#define BCMA_CLKCTLST_EXTRESST 0x07000000 /* Mask of external resource status */
19/* Is there any BCM4328 on BCMA bus? */
20#define BCMA_CLKCTLST_4328A0_HAVEHT 0x00010000 /* 4328a0 has reversed bits */
21#define BCMA_CLKCTLST_4328A0_HAVEALP 0x00020000 /* 4328a0 has reversed bits */
22
4/* Agent registers (common for every core) */ 23/* Agent registers (common for every core) */
5#define BCMA_IOCTL 0x0408 24#define BCMA_IOCTL 0x0408 /* IO control */
6#define BCMA_IOCTL_CLK 0x0001 25#define BCMA_IOCTL_CLK 0x0001
7#define BCMA_IOCTL_FGC 0x0002 26#define BCMA_IOCTL_FGC 0x0002
8#define BCMA_IOCTL_CORE_BITS 0x3FFC 27#define BCMA_IOCTL_CORE_BITS 0x3FFC
9#define BCMA_IOCTL_PME_EN 0x4000 28#define BCMA_IOCTL_PME_EN 0x4000
10#define BCMA_IOCTL_BIST_EN 0x8000 29#define BCMA_IOCTL_BIST_EN 0x8000
30#define BCMA_IOST 0x0500 /* IO status */
31#define BCMA_IOST_CORE_BITS 0x0FFF
32#define BCMA_IOST_DMA64 0x1000
33#define BCMA_IOST_GATED_CLK 0x2000
34#define BCMA_IOST_BIST_ERROR 0x4000
35#define BCMA_IOST_BIST_DONE 0x8000
11#define BCMA_RESET_CTL 0x0800 36#define BCMA_RESET_CTL 0x0800
12#define BCMA_RESET_CTL_RESET 0x0001 37#define BCMA_RESET_CTL_RESET 0x0001
13 38
diff --git a/include/linux/bit_spinlock.h b/include/linux/bit_spinlock.h
index 564d997e2168..ac4d9f8b52e9 100644
--- a/include/linux/bit_spinlock.h
+++ b/include/linux/bit_spinlock.h
@@ -3,7 +3,7 @@
3 3
4#include <linux/kernel.h> 4#include <linux/kernel.h>
5#include <linux/preempt.h> 5#include <linux/preempt.h>
6#include <asm/atomic.h> 6#include <linux/atomic.h>
7 7
8/* 8/*
9 * bit-based spin_lock() 9 * bit-based spin_lock()
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h
index dcafe0bf0005..3bac44cce142 100644
--- a/include/linux/bitmap.h
+++ b/include/linux/bitmap.h
@@ -144,6 +144,7 @@ extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order);
144extern void bitmap_release_region(unsigned long *bitmap, int pos, int order); 144extern void bitmap_release_region(unsigned long *bitmap, int pos, int order);
145extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order); 145extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order);
146extern void bitmap_copy_le(void *dst, const unsigned long *src, int nbits); 146extern void bitmap_copy_le(void *dst, const unsigned long *src, int nbits);
147extern int bitmap_ord_to_pos(const unsigned long *bitmap, int n, int bits);
147 148
148#define BITMAP_LAST_WORD_MASK(nbits) \ 149#define BITMAP_LAST_WORD_MASK(nbits) \
149( \ 150( \
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 1a23722e8878..0e67c45b3bc9 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -73,7 +73,7 @@ enum rq_cmd_type_bits {
73 73
74/* 74/*
75 * try to put the fields that are referenced together in the same cacheline. 75 * try to put the fields that are referenced together in the same cacheline.
76 * if you modify this structure, be sure to check block/blk-core.c:rq_init() 76 * if you modify this structure, be sure to check block/blk-core.c:blk_rq_init()
77 * as well! 77 * as well!
78 */ 78 */
79struct request { 79struct request {
@@ -260,8 +260,7 @@ struct queue_limits {
260 unsigned char discard_zeroes_data; 260 unsigned char discard_zeroes_data;
261}; 261};
262 262
263struct request_queue 263struct request_queue {
264{
265 /* 264 /*
266 * Together with queue_head for cacheline sharing 265 * Together with queue_head for cacheline sharing
267 */ 266 */
@@ -304,14 +303,14 @@ struct request_queue
304 void *queuedata; 303 void *queuedata;
305 304
306 /* 305 /*
307 * queue needs bounce pages for pages above this limit 306 * various queue flags, see QUEUE_* below
308 */ 307 */
309 gfp_t bounce_gfp; 308 unsigned long queue_flags;
310 309
311 /* 310 /*
312 * various queue flags, see QUEUE_* below 311 * queue needs bounce pages for pages above this limit
313 */ 312 */
314 unsigned long queue_flags; 313 gfp_t bounce_gfp;
315 314
316 /* 315 /*
317 * protects queue structures from reentrancy. ->__queue_lock should 316 * protects queue structures from reentrancy. ->__queue_lock should
@@ -334,8 +333,8 @@ struct request_queue
334 unsigned int nr_congestion_off; 333 unsigned int nr_congestion_off;
335 unsigned int nr_batching; 334 unsigned int nr_batching;
336 335
337 void *dma_drain_buffer;
338 unsigned int dma_drain_size; 336 unsigned int dma_drain_size;
337 void *dma_drain_buffer;
339 unsigned int dma_pad_mask; 338 unsigned int dma_pad_mask;
340 unsigned int dma_alignment; 339 unsigned int dma_alignment;
341 340
@@ -393,7 +392,7 @@ struct request_queue
393#define QUEUE_FLAG_ELVSWITCH 6 /* don't use elevator, just do FIFO */ 392#define QUEUE_FLAG_ELVSWITCH 6 /* don't use elevator, just do FIFO */
394#define QUEUE_FLAG_BIDI 7 /* queue supports bidi requests */ 393#define QUEUE_FLAG_BIDI 7 /* queue supports bidi requests */
395#define QUEUE_FLAG_NOMERGES 8 /* disable merge attempts */ 394#define QUEUE_FLAG_NOMERGES 8 /* disable merge attempts */
396#define QUEUE_FLAG_SAME_COMP 9 /* force complete on same CPU */ 395#define QUEUE_FLAG_SAME_COMP 9 /* complete on same CPU-group */
397#define QUEUE_FLAG_FAIL_IO 10 /* fake timeout */ 396#define QUEUE_FLAG_FAIL_IO 10 /* fake timeout */
398#define QUEUE_FLAG_STACKABLE 11 /* supports request stacking */ 397#define QUEUE_FLAG_STACKABLE 11 /* supports request stacking */
399#define QUEUE_FLAG_NONROT 12 /* non-rotational device (SSD) */ 398#define QUEUE_FLAG_NONROT 12 /* non-rotational device (SSD) */
@@ -403,6 +402,7 @@ struct request_queue
403#define QUEUE_FLAG_NOXMERGES 15 /* No extended merges */ 402#define QUEUE_FLAG_NOXMERGES 15 /* No extended merges */
404#define QUEUE_FLAG_ADD_RANDOM 16 /* Contributes to random pool */ 403#define QUEUE_FLAG_ADD_RANDOM 16 /* Contributes to random pool */
405#define QUEUE_FLAG_SECDISCARD 17 /* supports SECDISCARD */ 404#define QUEUE_FLAG_SECDISCARD 17 /* supports SECDISCARD */
405#define QUEUE_FLAG_SAME_FORCE 18 /* force complete on same CPU */
406 406
407#define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ 407#define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \
408 (1 << QUEUE_FLAG_STACKABLE) | \ 408 (1 << QUEUE_FLAG_STACKABLE) | \
@@ -857,12 +857,21 @@ struct request_queue *blk_alloc_queue(gfp_t);
857struct request_queue *blk_alloc_queue_node(gfp_t, int); 857struct request_queue *blk_alloc_queue_node(gfp_t, int);
858extern void blk_put_queue(struct request_queue *); 858extern void blk_put_queue(struct request_queue *);
859 859
860/*
861 * Note: Code in between changing the blk_plug list/cb_list or element of such
862 * lists is preemptable, but such code can't do sleep (or be very careful),
863 * otherwise data is corrupted. For details, please check schedule() where
864 * blk_schedule_flush_plug() is called.
865 */
860struct blk_plug { 866struct blk_plug {
861 unsigned long magic; 867 unsigned long magic;
862 struct list_head list; 868 struct list_head list;
863 struct list_head cb_list; 869 struct list_head cb_list;
864 unsigned int should_sort; 870 unsigned int should_sort;
871 unsigned int count;
865}; 872};
873#define BLK_MAX_REQUEST_COUNT 16
874
866struct blk_plug_cb { 875struct blk_plug_cb {
867 struct list_head list; 876 struct list_head list;
868 void (*callback)(struct blk_plug_cb *); 877 void (*callback)(struct blk_plug_cb *);
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
index 503c8a6b3079..458f497738a4 100644
--- a/include/linux/buffer_head.h
+++ b/include/linux/buffer_head.h
@@ -12,7 +12,7 @@
12#include <linux/linkage.h> 12#include <linux/linkage.h>
13#include <linux/pagemap.h> 13#include <linux/pagemap.h>
14#include <linux/wait.h> 14#include <linux/wait.h>
15#include <asm/atomic.h> 15#include <linux/atomic.h>
16 16
17#ifdef CONFIG_BLOCK 17#ifdef CONFIG_BLOCK
18 18
diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h
index 6365f041745b..563755181c1e 100644
--- a/include/linux/ceph/libceph.h
+++ b/include/linux/ceph/libceph.h
@@ -35,7 +35,7 @@
35#define CEPH_OPT_MYIP (1<<2) /* specified my ip */ 35#define CEPH_OPT_MYIP (1<<2) /* specified my ip */
36#define CEPH_OPT_NOCRC (1<<3) /* no data crc on writes */ 36#define CEPH_OPT_NOCRC (1<<3) /* no data crc on writes */
37 37
38#define CEPH_OPT_DEFAULT (0); 38#define CEPH_OPT_DEFAULT (0)
39 39
40#define ceph_set_opt(client, opt) \ 40#define ceph_set_opt(client, opt) \
41 (client)->options->flags |= CEPH_OPT_##opt; 41 (client)->options->flags |= CEPH_OPT_##opt;
diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h
index 31d91a64838b..d7adf151d335 100644
--- a/include/linux/ceph/messenger.h
+++ b/include/linux/ceph/messenger.h
@@ -94,6 +94,7 @@ struct ceph_msg {
94 bool more_to_follow; 94 bool more_to_follow;
95 bool needs_out_seq; 95 bool needs_out_seq;
96 int front_max; 96 int front_max;
97 unsigned long ack_stamp; /* tx: when we were acked */
97 98
98 struct ceph_msgpool *pool; 99 struct ceph_msgpool *pool;
99}; 100};
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index ab4ac0ccb857..da7e4bc34e8c 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -539,7 +539,6 @@ static inline struct cgroup_subsys_state *cgroup_subsys_state(
539 */ 539 */
540#define task_subsys_state_check(task, subsys_id, __c) \ 540#define task_subsys_state_check(task, subsys_id, __c) \
541 rcu_dereference_check(task->cgroups->subsys[subsys_id], \ 541 rcu_dereference_check(task->cgroups->subsys[subsys_id], \
542 rcu_read_lock_held() || \
543 lockdep_is_held(&task->alloc_lock) || \ 542 lockdep_is_held(&task->alloc_lock) || \
544 cgroup_lock_is_held() || (__c)) 543 cgroup_lock_is_held() || (__c))
545 544
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 846bb1792572..8779405e15a8 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -438,16 +438,7 @@ asmlinkage long compat_sys_ppoll(struct pollfd __user *ufds,
438 struct compat_timespec __user *tsp, 438 struct compat_timespec __user *tsp,
439 const compat_sigset_t __user *sigmask, 439 const compat_sigset_t __user *sigmask,
440 compat_size_t sigsetsize); 440 compat_size_t sigsetsize);
441#if (defined(CONFIG_NFSD) || defined(CONFIG_NFSD_MODULE)) && \
442 !defined(CONFIG_NFSD_DEPRECATED)
443union compat_nfsctl_res;
444struct compat_nfsctl_arg;
445asmlinkage long compat_sys_nfsservctl(int cmd,
446 struct compat_nfsctl_arg __user *arg,
447 union compat_nfsctl_res __user *res);
448#else
449asmlinkage long compat_sys_nfsservctl(int cmd, void *notused, void *notused2); 441asmlinkage long compat_sys_nfsservctl(int cmd, void *notused, void *notused2);
450#endif
451asmlinkage long compat_sys_signalfd4(int ufd, 442asmlinkage long compat_sys_signalfd4(int ufd,
452 const compat_sigset_t __user *sigmask, 443 const compat_sigset_t __user *sigmask,
453 compat_size_t sigsetsize, int flags); 444 compat_size_t sigsetsize, int flags);
diff --git a/include/linux/configfs.h b/include/linux/configfs.h
index 645778ad899b..3081c58d696e 100644
--- a/include/linux/configfs.h
+++ b/include/linux/configfs.h
@@ -42,7 +42,7 @@
42#include <linux/mutex.h> 42#include <linux/mutex.h>
43#include <linux/err.h> 43#include <linux/err.h>
44 44
45#include <asm/atomic.h> 45#include <linux/atomic.h>
46 46
47#define CONFIGFS_ITEM_NAME_LEN 20 47#define CONFIGFS_ITEM_NAME_LEN 20
48 48
diff --git a/include/linux/connector.h b/include/linux/connector.h
index f696bccd48cb..0c69ad825b39 100644
--- a/include/linux/connector.h
+++ b/include/linux/connector.h
@@ -75,7 +75,7 @@ struct cn_msg {
75 75
76#ifdef __KERNEL__ 76#ifdef __KERNEL__
77 77
78#include <asm/atomic.h> 78#include <linux/atomic.h>
79 79
80#include <linux/list.h> 80#include <linux/list.h>
81#include <linux/workqueue.h> 81#include <linux/workqueue.h>
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index 5f09323ee880..b1a635acf72a 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -70,6 +70,39 @@ enum {
70 CPU_PRI_WORKQUEUE = 5, 70 CPU_PRI_WORKQUEUE = 5,
71}; 71};
72 72
73#define CPU_ONLINE 0x0002 /* CPU (unsigned)v is up */
74#define CPU_UP_PREPARE 0x0003 /* CPU (unsigned)v coming up */
75#define CPU_UP_CANCELED 0x0004 /* CPU (unsigned)v NOT coming up */
76#define CPU_DOWN_PREPARE 0x0005 /* CPU (unsigned)v going down */
77#define CPU_DOWN_FAILED 0x0006 /* CPU (unsigned)v NOT going down */
78#define CPU_DEAD 0x0007 /* CPU (unsigned)v dead */
79#define CPU_DYING 0x0008 /* CPU (unsigned)v not running any task,
80 * not handling interrupts, soon dead.
81 * Called on the dying cpu, interrupts
82 * are already disabled. Must not
83 * sleep, must not fail */
84#define CPU_POST_DEAD 0x0009 /* CPU (unsigned)v dead, cpu_hotplug
85 * lock is dropped */
86#define CPU_STARTING 0x000A /* CPU (unsigned)v soon running.
87 * Called on the new cpu, just before
88 * enabling interrupts. Must not sleep,
89 * must not fail */
90
91/* Used for CPU hotplug events occurring while tasks are frozen due to a suspend
92 * operation in progress
93 */
94#define CPU_TASKS_FROZEN 0x0010
95
96#define CPU_ONLINE_FROZEN (CPU_ONLINE | CPU_TASKS_FROZEN)
97#define CPU_UP_PREPARE_FROZEN (CPU_UP_PREPARE | CPU_TASKS_FROZEN)
98#define CPU_UP_CANCELED_FROZEN (CPU_UP_CANCELED | CPU_TASKS_FROZEN)
99#define CPU_DOWN_PREPARE_FROZEN (CPU_DOWN_PREPARE | CPU_TASKS_FROZEN)
100#define CPU_DOWN_FAILED_FROZEN (CPU_DOWN_FAILED | CPU_TASKS_FROZEN)
101#define CPU_DEAD_FROZEN (CPU_DEAD | CPU_TASKS_FROZEN)
102#define CPU_DYING_FROZEN (CPU_DYING | CPU_TASKS_FROZEN)
103#define CPU_STARTING_FROZEN (CPU_STARTING | CPU_TASKS_FROZEN)
104
105
73#ifdef CONFIG_SMP 106#ifdef CONFIG_SMP
74/* Need to know about CPUs going up/down? */ 107/* Need to know about CPUs going up/down? */
75#if defined(CONFIG_HOTPLUG_CPU) || !defined(MODULE) 108#if defined(CONFIG_HOTPLUG_CPU) || !defined(MODULE)
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 11be48e0d168..6216115c7789 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -324,11 +324,16 @@ static inline unsigned int cpufreq_get(unsigned int cpu)
324/* query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it */ 324/* query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it */
325#ifdef CONFIG_CPU_FREQ 325#ifdef CONFIG_CPU_FREQ
326unsigned int cpufreq_quick_get(unsigned int cpu); 326unsigned int cpufreq_quick_get(unsigned int cpu);
327unsigned int cpufreq_quick_get_max(unsigned int cpu);
327#else 328#else
328static inline unsigned int cpufreq_quick_get(unsigned int cpu) 329static inline unsigned int cpufreq_quick_get(unsigned int cpu)
329{ 330{
330 return 0; 331 return 0;
331} 332}
333static inline unsigned int cpufreq_quick_get_max(unsigned int cpu)
334{
335 return 0;
336}
332#endif 337#endif
333 338
334 339
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index b24ac56477b4..4f7a63237471 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -617,6 +617,20 @@ static inline size_t cpumask_size(void)
617 * ... use 'tmpmask' like a normal struct cpumask * ... 617 * ... use 'tmpmask' like a normal struct cpumask * ...
618 * 618 *
619 * free_cpumask_var(tmpmask); 619 * free_cpumask_var(tmpmask);
620 *
621 *
622 * However, one notable exception is there. alloc_cpumask_var() allocates
623 * only nr_cpumask_bits bits (in the other hand, real cpumask_t always has
624 * NR_CPUS bits). Therefore you don't have to dereference cpumask_var_t.
625 *
626 * cpumask_var_t tmpmask;
627 * if (!alloc_cpumask_var(&tmpmask, GFP_KERNEL))
628 * return -ENOMEM;
629 *
630 * var = *tmpmask;
631 *
632 * This code makes NR_CPUS length memcopy and brings to a memory corruption.
633 * cpumask_copy() provide safe copy functionality.
620 */ 634 */
621#ifdef CONFIG_CPUMASK_OFFSTACK 635#ifdef CONFIG_CPUMASK_OFFSTACK
622typedef struct cpumask *cpumask_var_t; 636typedef struct cpumask *cpumask_var_t;
diff --git a/include/linux/cred.h b/include/linux/cred.h
index 82607992f308..48e82af1159b 100644
--- a/include/linux/cred.h
+++ b/include/linux/cred.h
@@ -16,7 +16,7 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/key.h> 17#include <linux/key.h>
18#include <linux/selinux.h> 18#include <linux/selinux.h>
19#include <asm/atomic.h> 19#include <linux/atomic.h>
20 20
21struct user_struct; 21struct user_struct;
22struct cred; 22struct cred;
@@ -284,7 +284,6 @@ static inline void put_cred(const struct cred *_cred)
284 ({ \ 284 ({ \
285 const struct task_struct *__t = (task); \ 285 const struct task_struct *__t = (task); \
286 rcu_dereference_check(__t->real_cred, \ 286 rcu_dereference_check(__t->real_cred, \
287 rcu_read_lock_held() || \
288 task_is_dead(__t)); \ 287 task_is_dead(__t)); \
289 }) 288 })
290 289
diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index a6a7a1c83f54..e5e468e9133d 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -17,7 +17,7 @@
17#ifndef _LINUX_CRYPTO_H 17#ifndef _LINUX_CRYPTO_H
18#define _LINUX_CRYPTO_H 18#define _LINUX_CRYPTO_H
19 19
20#include <asm/atomic.h> 20#include <linux/atomic.h>
21#include <linux/module.h> 21#include <linux/module.h>
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/list.h> 23#include <linux/list.h>
diff --git a/include/linux/cs5535.h b/include/linux/cs5535.h
index 6fe2114f8ad2..c077aec3a6ff 100644
--- a/include/linux/cs5535.h
+++ b/include/linux/cs5535.h
@@ -11,6 +11,8 @@
11#ifndef _CS5535_H 11#ifndef _CS5535_H
12#define _CS5535_H 12#define _CS5535_H
13 13
14#include <asm/msr.h>
15
14/* MSRs */ 16/* MSRs */
15#define MSR_GLIU_P2D_RO0 0x10000029 17#define MSR_GLIU_P2D_RO0 0x10000029
16 18
@@ -38,17 +40,75 @@
38#define MSR_MFGPT_NR 0x51400029 40#define MSR_MFGPT_NR 0x51400029
39#define MSR_MFGPT_SETUP 0x5140002B 41#define MSR_MFGPT_SETUP 0x5140002B
40 42
43#define MSR_RTC_DOMA_OFFSET 0x51400055
44#define MSR_RTC_MONA_OFFSET 0x51400056
45#define MSR_RTC_CEN_OFFSET 0x51400057
46
41#define MSR_LX_SPARE_MSR 0x80000011 /* DC-specific */ 47#define MSR_LX_SPARE_MSR 0x80000011 /* DC-specific */
42 48
43#define MSR_GX_GLD_MSR_CONFIG 0xC0002001 49#define MSR_GX_GLD_MSR_CONFIG 0xC0002001
44#define MSR_GX_MSR_PADSEL 0xC0002011 50#define MSR_GX_MSR_PADSEL 0xC0002011
45 51
52static inline int cs5535_pic_unreqz_select_high(unsigned int group,
53 unsigned int irq)
54{
55 uint32_t lo, hi;
56
57 rdmsr(MSR_PIC_ZSEL_HIGH, lo, hi);
58 lo &= ~(0xF << (group * 4));
59 lo |= (irq & 0xF) << (group * 4);
60 wrmsr(MSR_PIC_ZSEL_HIGH, lo, hi);
61 return 0;
62}
63
64/* PIC registers */
65#define CS5536_PIC_INT_SEL1 0x4d0
66#define CS5536_PIC_INT_SEL2 0x4d1
67
46/* resource sizes */ 68/* resource sizes */
47#define LBAR_GPIO_SIZE 0xFF 69#define LBAR_GPIO_SIZE 0xFF
48#define LBAR_MFGPT_SIZE 0x40 70#define LBAR_MFGPT_SIZE 0x40
49#define LBAR_ACPI_SIZE 0x40 71#define LBAR_ACPI_SIZE 0x40
50#define LBAR_PMS_SIZE 0x80 72#define LBAR_PMS_SIZE 0x80
51 73
74/*
75 * PMC registers (PMS block)
76 * It is only safe to access these registers as dword accesses.
77 * See CS5536 Specification Update erratas 17 & 18
78 */
79#define CS5536_PM_SCLK 0x10
80#define CS5536_PM_IN_SLPCTL 0x20
81#define CS5536_PM_WKXD 0x34
82#define CS5536_PM_WKD 0x30
83#define CS5536_PM_SSC 0x54
84
85/*
86 * PM registers (ACPI block)
87 * It is only safe to access these registers as dword accesses.
88 * See CS5536 Specification Update erratas 17 & 18
89 */
90#define CS5536_PM1_STS 0x00
91#define CS5536_PM1_EN 0x02
92#define CS5536_PM1_CNT 0x08
93#define CS5536_PM_GPE0_STS 0x18
94#define CS5536_PM_GPE0_EN 0x1c
95
96/* CS5536_PM1_STS bits */
97#define CS5536_WAK_FLAG (1 << 15)
98#define CS5536_PWRBTN_FLAG (1 << 8)
99
100/* CS5536_PM1_EN bits */
101#define CS5536_PM_PWRBTN (1 << 8)
102#define CS5536_PM_RTC (1 << 10)
103
104/* CS5536_PM_GPE0_STS bits */
105#define CS5536_GPIOM7_PME_FLAG (1 << 31)
106#define CS5536_GPIOM6_PME_FLAG (1 << 30)
107
108/* CS5536_PM_GPE0_EN bits */
109#define CS5536_GPIOM7_PME_EN (1 << 31)
110#define CS5536_GPIOM6_PME_EN (1 << 30)
111
52/* VSA2 magic values */ 112/* VSA2 magic values */
53#define VSA_VRC_INDEX 0xAC1C 113#define VSA_VRC_INDEX 0xAC1C
54#define VSA_VRC_DATA 0xAC1E 114#define VSA_VRC_DATA 0xAC1E
diff --git a/include/linux/ctype.h b/include/linux/ctype.h
index a3d6ee0044f9..8acfe312f947 100644
--- a/include/linux/ctype.h
+++ b/include/linux/ctype.h
@@ -52,4 +52,13 @@ static inline unsigned char __toupper(unsigned char c)
52#define tolower(c) __tolower(c) 52#define tolower(c) __tolower(c)
53#define toupper(c) __toupper(c) 53#define toupper(c) __toupper(c)
54 54
55/*
56 * Fast implementation of tolower() for internal usage. Do not use in your
57 * code.
58 */
59static inline char _tolower(const char c)
60{
61 return c | 0x20;
62}
63
55#endif 64#endif
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 3f22d8d6d8a3..d37d2a793099 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -1,7 +1,7 @@
1#ifndef __LINUX_DCACHE_H 1#ifndef __LINUX_DCACHE_H
2#define __LINUX_DCACHE_H 2#define __LINUX_DCACHE_H
3 3
4#include <asm/atomic.h> 4#include <linux/atomic.h>
5#include <linux/list.h> 5#include <linux/list.h>
6#include <linux/rculist.h> 6#include <linux/rculist.h>
7#include <linux/rculist_bl.h> 7#include <linux/rculist_bl.h>
diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h
index 2833452ea01c..5033fb88c107 100644
--- a/include/linux/debug_locks.h
+++ b/include/linux/debug_locks.h
@@ -2,7 +2,7 @@
2#define __LINUX_DEBUG_LOCKING_H 2#define __LINUX_DEBUG_LOCKING_H
3 3
4#include <linux/kernel.h> 4#include <linux/kernel.h>
5#include <asm/atomic.h> 5#include <linux/atomic.h>
6#include <asm/system.h> 6#include <asm/system.h>
7 7
8struct task_struct; 8struct task_struct;
diff --git a/include/linux/device.h b/include/linux/device.h
index 160d4ddb2499..c20dfbfc49b4 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -22,7 +22,7 @@
22#include <linux/types.h> 22#include <linux/types.h>
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/pm.h> 24#include <linux/pm.h>
25#include <asm/atomic.h> 25#include <linux/atomic.h>
26#include <asm/device.h> 26#include <asm/device.h>
27 27
28struct device; 28struct device;
diff --git a/include/linux/dio.h b/include/linux/dio.h
index b2dd31ca1710..2cc0fd00463f 100644
--- a/include/linux/dio.h
+++ b/include/linux/dio.h
@@ -254,7 +254,7 @@ static inline struct dio_driver *dio_dev_driver(const struct dio_dev *d)
254 254
255#define dio_resource_start(d) ((d)->resource.start) 255#define dio_resource_start(d) ((d)->resource.start)
256#define dio_resource_end(d) ((d)->resource.end) 256#define dio_resource_end(d) ((d)->resource.end)
257#define dio_resource_len(d) ((d)->resource.end-(d)->resource.start+1) 257#define dio_resource_len(d) (resource_size(&(d)->resource))
258#define dio_resource_flags(d) ((d)->resource.flags) 258#define dio_resource_flags(d) ((d)->resource.flags)
259 259
260#define dio_request_device(d, name) \ 260#define dio_request_device(d, name) \
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index 1a167c48d84d..347fdc32177a 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -46,27 +46,6 @@ struct dma_map_ops {
46 46
47#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) 47#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
48 48
49typedef u64 DMA_nnBIT_MASK __deprecated;
50
51/*
52 * NOTE: do not use the below macros in new code and do not add new definitions
53 * here.
54 *
55 * Instead, just open-code DMA_BIT_MASK(n) within your driver
56 */
57#define DMA_64BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(64)
58#define DMA_48BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(48)
59#define DMA_47BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(47)
60#define DMA_40BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(40)
61#define DMA_39BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(39)
62#define DMA_35BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(35)
63#define DMA_32BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(32)
64#define DMA_31BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(31)
65#define DMA_30BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(30)
66#define DMA_29BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(29)
67#define DMA_28BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(28)
68#define DMA_24BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(24)
69
70#define DMA_MASK_NONE 0x0ULL 49#define DMA_MASK_NONE 0x0ULL
71 50
72static inline int valid_dma_direction(int dma_direction) 51static inline int valid_dma_direction(int dma_direction)
diff --git a/include/linux/dvb/audio.h b/include/linux/dvb/audio.h
index fec66bd24f22..d47bccd604e4 100644
--- a/include/linux/dvb/audio.h
+++ b/include/linux/dvb/audio.h
@@ -67,7 +67,7 @@ typedef struct audio_status {
67 67
68 68
69typedef 69typedef
70struct audio_karaoke{ /* if Vocal1 or Vocal2 are non-zero, they get mixed */ 70struct audio_karaoke { /* if Vocal1 or Vocal2 are non-zero, they get mixed */
71 int vocal1; /* into left and right t at 70% each */ 71 int vocal1; /* into left and right t at 70% each */
72 int vocal2; /* if both, Vocal1 and Vocal2 are non-zero, Vocal1 gets*/ 72 int vocal2; /* if both, Vocal1 and Vocal2 are non-zero, Vocal1 gets*/
73 int melody; /* mixed into the left channel and */ 73 int melody; /* mixed into the left channel and */
diff --git a/include/linux/ecryptfs.h b/include/linux/ecryptfs.h
new file mode 100644
index 000000000000..2224a8c0cb64
--- /dev/null
+++ b/include/linux/ecryptfs.h
@@ -0,0 +1,113 @@
1#ifndef _LINUX_ECRYPTFS_H
2#define _LINUX_ECRYPTFS_H
3
4/* Version verification for shared data structures w/ userspace */
5#define ECRYPTFS_VERSION_MAJOR 0x00
6#define ECRYPTFS_VERSION_MINOR 0x04
7#define ECRYPTFS_SUPPORTED_FILE_VERSION 0x03
8/* These flags indicate which features are supported by the kernel
9 * module; userspace tools such as the mount helper read
10 * ECRYPTFS_VERSIONING_MASK from a sysfs handle in order to determine
11 * how to behave. */
12#define ECRYPTFS_VERSIONING_PASSPHRASE 0x00000001
13#define ECRYPTFS_VERSIONING_PUBKEY 0x00000002
14#define ECRYPTFS_VERSIONING_PLAINTEXT_PASSTHROUGH 0x00000004
15#define ECRYPTFS_VERSIONING_POLICY 0x00000008
16#define ECRYPTFS_VERSIONING_XATTR 0x00000010
17#define ECRYPTFS_VERSIONING_MULTKEY 0x00000020
18#define ECRYPTFS_VERSIONING_DEVMISC 0x00000040
19#define ECRYPTFS_VERSIONING_HMAC 0x00000080
20#define ECRYPTFS_VERSIONING_FILENAME_ENCRYPTION 0x00000100
21#define ECRYPTFS_VERSIONING_GCM 0x00000200
22#define ECRYPTFS_VERSIONING_MASK (ECRYPTFS_VERSIONING_PASSPHRASE \
23 | ECRYPTFS_VERSIONING_PLAINTEXT_PASSTHROUGH \
24 | ECRYPTFS_VERSIONING_PUBKEY \
25 | ECRYPTFS_VERSIONING_XATTR \
26 | ECRYPTFS_VERSIONING_MULTKEY \
27 | ECRYPTFS_VERSIONING_DEVMISC \
28 | ECRYPTFS_VERSIONING_FILENAME_ENCRYPTION)
29#define ECRYPTFS_MAX_PASSWORD_LENGTH 64
30#define ECRYPTFS_MAX_PASSPHRASE_BYTES ECRYPTFS_MAX_PASSWORD_LENGTH
31#define ECRYPTFS_SALT_SIZE 8
32#define ECRYPTFS_SALT_SIZE_HEX (ECRYPTFS_SALT_SIZE*2)
33/* The original signature size is only for what is stored on disk; all
34 * in-memory representations are expanded hex, so it better adapted to
35 * be passed around or referenced on the command line */
36#define ECRYPTFS_SIG_SIZE 8
37#define ECRYPTFS_SIG_SIZE_HEX (ECRYPTFS_SIG_SIZE*2)
38#define ECRYPTFS_PASSWORD_SIG_SIZE ECRYPTFS_SIG_SIZE_HEX
39#define ECRYPTFS_MAX_KEY_BYTES 64
40#define ECRYPTFS_MAX_ENCRYPTED_KEY_BYTES 512
41#define ECRYPTFS_FILE_VERSION 0x03
42#define ECRYPTFS_MAX_PKI_NAME_BYTES 16
43
44#define RFC2440_CIPHER_DES3_EDE 0x02
45#define RFC2440_CIPHER_CAST_5 0x03
46#define RFC2440_CIPHER_BLOWFISH 0x04
47#define RFC2440_CIPHER_AES_128 0x07
48#define RFC2440_CIPHER_AES_192 0x08
49#define RFC2440_CIPHER_AES_256 0x09
50#define RFC2440_CIPHER_TWOFISH 0x0a
51#define RFC2440_CIPHER_CAST_6 0x0b
52
53#define RFC2440_CIPHER_RSA 0x01
54
55/**
56 * For convenience, we may need to pass around the encrypted session
57 * key between kernel and userspace because the authentication token
58 * may not be extractable. For example, the TPM may not release the
59 * private key, instead requiring the encrypted data and returning the
60 * decrypted data.
61 */
62struct ecryptfs_session_key {
63#define ECRYPTFS_USERSPACE_SHOULD_TRY_TO_DECRYPT 0x00000001
64#define ECRYPTFS_USERSPACE_SHOULD_TRY_TO_ENCRYPT 0x00000002
65#define ECRYPTFS_CONTAINS_DECRYPTED_KEY 0x00000004
66#define ECRYPTFS_CONTAINS_ENCRYPTED_KEY 0x00000008
67 u32 flags;
68 u32 encrypted_key_size;
69 u32 decrypted_key_size;
70 u8 encrypted_key[ECRYPTFS_MAX_ENCRYPTED_KEY_BYTES];
71 u8 decrypted_key[ECRYPTFS_MAX_KEY_BYTES];
72};
73
74struct ecryptfs_password {
75 u32 password_bytes;
76 s32 hash_algo;
77 u32 hash_iterations;
78 u32 session_key_encryption_key_bytes;
79#define ECRYPTFS_PERSISTENT_PASSWORD 0x01
80#define ECRYPTFS_SESSION_KEY_ENCRYPTION_KEY_SET 0x02
81 u32 flags;
82 /* Iterated-hash concatenation of salt and passphrase */
83 u8 session_key_encryption_key[ECRYPTFS_MAX_KEY_BYTES];
84 u8 signature[ECRYPTFS_PASSWORD_SIG_SIZE + 1];
85 /* Always in expanded hex */
86 u8 salt[ECRYPTFS_SALT_SIZE];
87};
88
89enum ecryptfs_token_types {ECRYPTFS_PASSWORD, ECRYPTFS_PRIVATE_KEY};
90
91struct ecryptfs_private_key {
92 u32 key_size;
93 u32 data_len;
94 u8 signature[ECRYPTFS_PASSWORD_SIG_SIZE + 1];
95 char pki_type[ECRYPTFS_MAX_PKI_NAME_BYTES + 1];
96 u8 data[];
97};
98
99/* May be a password or a private key */
100struct ecryptfs_auth_tok {
101 u16 version; /* 8-bit major and 8-bit minor */
102 u16 token_type;
103#define ECRYPTFS_ENCRYPT_ONLY 0x00000001
104 u32 flags;
105 struct ecryptfs_session_key session_key;
106 u8 reserved[32];
107 union {
108 struct ecryptfs_password password;
109 struct ecryptfs_private_key private_key;
110 } token;
111} __attribute__ ((packed));
112
113#endif /* _LINUX_ECRYPTFS_H */
diff --git a/include/linux/edac.h b/include/linux/edac.h
index 36c66443bdfd..4a73257b47d0 100644
--- a/include/linux/edac.h
+++ b/include/linux/edac.h
@@ -12,7 +12,7 @@
12#ifndef _LINUX_EDAC_H_ 12#ifndef _LINUX_EDAC_H_
13#define _LINUX_EDAC_H_ 13#define _LINUX_EDAC_H_
14 14
15#include <asm/atomic.h> 15#include <linux/atomic.h>
16#include <linux/sysdev.h> 16#include <linux/sysdev.h>
17 17
18#define EDAC_OPSTATE_INVAL -1 18#define EDAC_OPSTATE_INVAL -1
diff --git a/include/linux/eeprom_93xx46.h b/include/linux/eeprom_93xx46.h
new file mode 100644
index 000000000000..06791811e49d
--- /dev/null
+++ b/include/linux/eeprom_93xx46.h
@@ -0,0 +1,18 @@
1/*
2 * Module: eeprom_93xx46
3 * platform description for 93xx46 EEPROMs.
4 */
5
6struct eeprom_93xx46_platform_data {
7 unsigned char flags;
8#define EE_ADDR8 0x01 /* 8 bit addr. cfg */
9#define EE_ADDR16 0x02 /* 16 bit addr. cfg */
10#define EE_READONLY 0x08 /* forbid writing */
11
12 /*
13 * optional hooks to control additional logic
14 * before and after spi transfer.
15 */
16 void (*prepare)(void *);
17 void (*finish)(void *);
18};
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
index 21a8ebf2dc3a..d800d5142184 100644
--- a/include/linux/elevator.h
+++ b/include/linux/elevator.h
@@ -146,7 +146,7 @@ extern struct request *elv_rb_latter_request(struct request_queue *, struct requ
146/* 146/*
147 * rb support functions. 147 * rb support functions.
148 */ 148 */
149extern struct request *elv_rb_add(struct rb_root *, struct request *); 149extern void elv_rb_add(struct rb_root *, struct request *);
150extern void elv_rb_del(struct rb_root *, struct request *); 150extern void elv_rb_del(struct rb_root *, struct request *);
151extern struct request *elv_rb_find(struct rb_root *, sector_t); 151extern struct request *elv_rb_find(struct rb_root *, sector_t);
152 152
diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h
index 2dfa7076e8b6..53792bf36c71 100644
--- a/include/linux/ext2_fs.h
+++ b/include/linux/ext2_fs.h
@@ -18,6 +18,7 @@
18 18
19#include <linux/types.h> 19#include <linux/types.h>
20#include <linux/magic.h> 20#include <linux/magic.h>
21#include <linux/fs.h>
21 22
22/* 23/*
23 * The second extended filesystem constants/structures 24 * The second extended filesystem constants/structures
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h
index 0c473fd79acb..67a803aee619 100644
--- a/include/linux/ext3_fs.h
+++ b/include/linux/ext3_fs.h
@@ -418,12 +418,11 @@ struct ext3_inode {
418#define EXT2_MOUNT_DATA_FLAGS EXT3_MOUNT_DATA_FLAGS 418#define EXT2_MOUNT_DATA_FLAGS EXT3_MOUNT_DATA_FLAGS
419#endif 419#endif
420 420
421#define ext3_set_bit __test_and_set_bit_le 421#define ext3_set_bit __set_bit_le
422#define ext3_set_bit_atomic ext2_set_bit_atomic 422#define ext3_set_bit_atomic ext2_set_bit_atomic
423#define ext3_clear_bit __test_and_clear_bit_le 423#define ext3_clear_bit __clear_bit_le
424#define ext3_clear_bit_atomic ext2_clear_bit_atomic 424#define ext3_clear_bit_atomic ext2_clear_bit_atomic
425#define ext3_test_bit test_bit_le 425#define ext3_test_bit test_bit_le
426#define ext3_find_first_zero_bit find_first_zero_bit_le
427#define ext3_find_next_zero_bit find_next_zero_bit_le 426#define ext3_find_next_zero_bit find_next_zero_bit_le
428 427
429/* 428/*
@@ -913,7 +912,7 @@ extern void ext3_dirty_inode(struct inode *, int);
913extern int ext3_change_inode_journal_flag(struct inode *, int); 912extern int ext3_change_inode_journal_flag(struct inode *, int);
914extern int ext3_get_inode_loc(struct inode *, struct ext3_iloc *); 913extern int ext3_get_inode_loc(struct inode *, struct ext3_iloc *);
915extern int ext3_can_truncate(struct inode *inode); 914extern int ext3_can_truncate(struct inode *inode);
916extern void ext3_truncate (struct inode *); 915extern void ext3_truncate(struct inode *inode);
917extern void ext3_set_inode_flags(struct inode *); 916extern void ext3_set_inode_flags(struct inode *);
918extern void ext3_get_inode_flags(struct ext3_inode_info *); 917extern void ext3_get_inode_flags(struct ext3_inode_info *);
919extern void ext3_set_aops(struct inode *inode); 918extern void ext3_set_aops(struct inode *inode);
diff --git a/include/linux/fault-inject.h b/include/linux/fault-inject.h
index 7b64ad40e4ce..3ff060ac7810 100644
--- a/include/linux/fault-inject.h
+++ b/include/linux/fault-inject.h
@@ -5,7 +5,7 @@
5 5
6#include <linux/types.h> 6#include <linux/types.h>
7#include <linux/debugfs.h> 7#include <linux/debugfs.h>
8#include <asm/atomic.h> 8#include <linux/atomic.h>
9 9
10/* 10/*
11 * For explanation of the elements of this struct, see 11 * For explanation of the elements of this struct, see
@@ -27,23 +27,7 @@ struct fault_attr {
27 unsigned long count; 27 unsigned long count;
28 28
29#ifdef CONFIG_FAULT_INJECTION_DEBUG_FS 29#ifdef CONFIG_FAULT_INJECTION_DEBUG_FS
30 30 struct dentry *dir;
31 struct {
32 struct dentry *dir;
33
34 struct dentry *probability_file;
35 struct dentry *interval_file;
36 struct dentry *times_file;
37 struct dentry *space_file;
38 struct dentry *verbose_file;
39 struct dentry *task_filter_file;
40 struct dentry *stacktrace_depth_file;
41 struct dentry *require_start_file;
42 struct dentry *require_end_file;
43 struct dentry *reject_start_file;
44 struct dentry *reject_end_file;
45 } dentries;
46
47#endif 31#endif
48}; 32};
49 33
@@ -57,7 +41,6 @@ struct fault_attr {
57 41
58#define DECLARE_FAULT_ATTR(name) struct fault_attr name = FAULT_ATTR_INITIALIZER 42#define DECLARE_FAULT_ATTR(name) struct fault_attr name = FAULT_ATTR_INITIALIZER
59int setup_fault_attr(struct fault_attr *attr, char *str); 43int setup_fault_attr(struct fault_attr *attr, char *str);
60void should_fail_srandom(unsigned long entropy);
61bool should_fail(struct fault_attr *attr, ssize_t size); 44bool should_fail(struct fault_attr *attr, ssize_t size);
62 45
63#ifdef CONFIG_FAULT_INJECTION_DEBUG_FS 46#ifdef CONFIG_FAULT_INJECTION_DEBUG_FS
diff --git a/include/linux/fd.h b/include/linux/fd.h
index f5d194af07a8..72202b1b9a6a 100644
--- a/include/linux/fd.h
+++ b/include/linux/fd.h
@@ -377,4 +377,26 @@ struct floppy_raw_cmd {
377#define FDEJECT _IO(2, 0x5a) 377#define FDEJECT _IO(2, 0x5a)
378/* eject the disk */ 378/* eject the disk */
379 379
380
381#ifdef __KERNEL__
382#ifdef CONFIG_COMPAT
383#include <linux/compat.h>
384
385struct compat_floppy_struct {
386 compat_uint_t size;
387 compat_uint_t sect;
388 compat_uint_t head;
389 compat_uint_t track;
390 compat_uint_t stretch;
391 unsigned char gap;
392 unsigned char rate;
393 unsigned char spec1;
394 unsigned char fmt_gap;
395 const compat_caddr_t name;
396};
397
398#define FDGETPRM32 _IOR(2, 0x04, struct compat_floppy_struct)
399#endif
400#endif
401
380#endif 402#endif
diff --git a/include/linux/fdtable.h b/include/linux/fdtable.h
index 133c0ba25e30..82163c4b32c9 100644
--- a/include/linux/fdtable.h
+++ b/include/linux/fdtable.h
@@ -13,7 +13,7 @@
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/fs.h> 14#include <linux/fs.h>
15 15
16#include <asm/atomic.h> 16#include <linux/atomic.h>
17 17
18/* 18/*
19 * The default fd array needs to be at least BITS_PER_LONG, 19 * The default fd array needs to be at least BITS_PER_LONG,
@@ -60,7 +60,6 @@ struct files_struct {
60 60
61#define rcu_dereference_check_fdtable(files, fdtfd) \ 61#define rcu_dereference_check_fdtable(files, fdtfd) \
62 (rcu_dereference_check((fdtfd), \ 62 (rcu_dereference_check((fdtfd), \
63 rcu_read_lock_held() || \
64 lockdep_is_held(&(files)->file_lock) || \ 63 lockdep_is_held(&(files)->file_lock) || \
65 atomic_read(&(files)->count) == 1 || \ 64 atomic_read(&(files)->count) == 1 || \
66 rcu_my_thread_group_empty())) 65 rcu_my_thread_group_empty()))
diff --git a/include/linux/filter.h b/include/linux/filter.h
index 9ee3f9fb0b4a..741956fa5bfd 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -9,7 +9,7 @@
9#include <linux/types.h> 9#include <linux/types.h>
10 10
11#ifdef __KERNEL__ 11#ifdef __KERNEL__
12#include <asm/atomic.h> 12#include <linux/atomic.h>
13#endif 13#endif
14 14
15/* 15/*
diff --git a/include/linux/firewire.h b/include/linux/firewire.h
index 5e6f42789afe..84ccf8e04fa6 100644
--- a/include/linux/firewire.h
+++ b/include/linux/firewire.h
@@ -14,7 +14,7 @@
14#include <linux/types.h> 14#include <linux/types.h>
15#include <linux/workqueue.h> 15#include <linux/workqueue.h>
16 16
17#include <asm/atomic.h> 17#include <linux/atomic.h>
18#include <asm/byteorder.h> 18#include <asm/byteorder.h>
19 19
20#define fw_notify(s, args...) printk(KERN_NOTICE KBUILD_MODNAME ": " s, ## args) 20#define fw_notify(s, args...) printk(KERN_NOTICE KBUILD_MODNAME ": " s, ## args)
diff --git a/include/linux/fs.h b/include/linux/fs.h
index b224dc468a23..f23bcb77260c 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -379,7 +379,6 @@ struct inodes_stat_t {
379 379
380#include <linux/linkage.h> 380#include <linux/linkage.h>
381#include <linux/wait.h> 381#include <linux/wait.h>
382#include <linux/types.h>
383#include <linux/kdev_t.h> 382#include <linux/kdev_t.h>
384#include <linux/dcache.h> 383#include <linux/dcache.h>
385#include <linux/path.h> 384#include <linux/path.h>
@@ -1073,12 +1072,12 @@ struct file_lock_operations {
1073}; 1072};
1074 1073
1075struct lock_manager_operations { 1074struct lock_manager_operations {
1076 int (*fl_compare_owner)(struct file_lock *, struct file_lock *); 1075 int (*lm_compare_owner)(struct file_lock *, struct file_lock *);
1077 void (*fl_notify)(struct file_lock *); /* unblock callback */ 1076 void (*lm_notify)(struct file_lock *); /* unblock callback */
1078 int (*fl_grant)(struct file_lock *, struct file_lock *, int); 1077 int (*lm_grant)(struct file_lock *, struct file_lock *, int);
1079 void (*fl_release_private)(struct file_lock *); 1078 void (*lm_release_private)(struct file_lock *);
1080 void (*fl_break)(struct file_lock *); 1079 void (*lm_break)(struct file_lock *);
1081 int (*fl_change)(struct file_lock **, int); 1080 int (*lm_change)(struct file_lock **, int);
1082}; 1081};
1083 1082
1084struct lock_manager { 1083struct lock_manager {
@@ -1469,10 +1468,6 @@ enum {
1469#define vfs_check_frozen(sb, level) \ 1468#define vfs_check_frozen(sb, level) \
1470 wait_event((sb)->s_wait_unfrozen, ((sb)->s_frozen < (level))) 1469 wait_event((sb)->s_wait_unfrozen, ((sb)->s_frozen < (level)))
1471 1470
1472#define get_fs_excl() atomic_inc(&current->fs_excl)
1473#define put_fs_excl() atomic_dec(&current->fs_excl)
1474#define has_fs_excl() atomic_read(&current->fs_excl)
1475
1476/* 1471/*
1477 * until VFS tracks user namespaces for inodes, just make all files 1472 * until VFS tracks user namespaces for inodes, just make all files
1478 * belong to init_user_ns 1473 * belong to init_user_ns
@@ -1586,7 +1581,7 @@ struct inode_operations {
1586 struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *); 1581 struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *);
1587 void * (*follow_link) (struct dentry *, struct nameidata *); 1582 void * (*follow_link) (struct dentry *, struct nameidata *);
1588 int (*permission) (struct inode *, int); 1583 int (*permission) (struct inode *, int);
1589 int (*check_acl)(struct inode *, int); 1584 struct posix_acl * (*get_acl)(struct inode *, int);
1590 1585
1591 int (*readlink) (struct dentry *, char __user *,int); 1586 int (*readlink) (struct dentry *, char __user *,int);
1592 void (*put_link) (struct dentry *, struct nameidata *, void *); 1587 void (*put_link) (struct dentry *, struct nameidata *, void *);
@@ -1885,6 +1880,7 @@ extern int register_filesystem(struct file_system_type *);
1885extern int unregister_filesystem(struct file_system_type *); 1880extern int unregister_filesystem(struct file_system_type *);
1886extern struct vfsmount *kern_mount_data(struct file_system_type *, void *data); 1881extern struct vfsmount *kern_mount_data(struct file_system_type *, void *data);
1887#define kern_mount(type) kern_mount_data(type, NULL) 1882#define kern_mount(type) kern_mount_data(type, NULL)
1883extern void kern_unmount(struct vfsmount *mnt);
1888extern int may_umount_tree(struct vfsmount *); 1884extern int may_umount_tree(struct vfsmount *);
1889extern int may_umount(struct vfsmount *); 1885extern int may_umount(struct vfsmount *);
1890extern long do_mount(char *, char *, char *, unsigned long, void *); 1886extern long do_mount(char *, char *, char *, unsigned long, void *);
@@ -2314,7 +2310,8 @@ extern void __iget(struct inode * inode);
2314extern void iget_failed(struct inode *); 2310extern void iget_failed(struct inode *);
2315extern void end_writeback(struct inode *); 2311extern void end_writeback(struct inode *);
2316extern void __destroy_inode(struct inode *); 2312extern void __destroy_inode(struct inode *);
2317extern struct inode *new_inode(struct super_block *); 2313extern struct inode *new_inode_pseudo(struct super_block *sb);
2314extern struct inode *new_inode(struct super_block *sb);
2318extern void free_inode_nonrcu(struct inode *inode); 2315extern void free_inode_nonrcu(struct inode *inode);
2319extern int should_remove_suid(struct dentry *); 2316extern int should_remove_suid(struct dentry *);
2320extern int file_remove_suid(struct file *); 2317extern int file_remove_suid(struct file *);
diff --git a/include/linux/fsl_hypervisor.h b/include/linux/fsl_hypervisor.h
new file mode 100644
index 000000000000..1cebaeeeef57
--- /dev/null
+++ b/include/linux/fsl_hypervisor.h
@@ -0,0 +1,241 @@
1/*
2 * Freescale hypervisor ioctl and kernel interface
3 *
4 * Copyright (C) 2008-2011 Freescale Semiconductor, Inc.
5 * Author: Timur Tabi <timur@freescale.com>
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are met:
9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * * Neither the name of Freescale Semiconductor nor the
15 * names of its contributors may be used to endorse or promote products
16 * derived from this software without specific prior written permission.
17 *
18 *
19 * ALTERNATIVELY, this software may be distributed under the terms of the
20 * GNU General Public License ("GPL") as published by the Free Software
21 * Foundation, either version 2 of that License or (at your option) any
22 * later version.
23 *
24 * This software is provided by Freescale Semiconductor "as is" and any
25 * express or implied warranties, including, but not limited to, the implied
26 * warranties of merchantability and fitness for a particular purpose are
27 * disclaimed. In no event shall Freescale Semiconductor be liable for any
28 * direct, indirect, incidental, special, exemplary, or consequential damages
29 * (including, but not limited to, procurement of substitute goods or services;
30 * loss of use, data, or profits; or business interruption) however caused and
31 * on any theory of liability, whether in contract, strict liability, or tort
32 * (including negligence or otherwise) arising in any way out of the use of this
33 * software, even if advised of the possibility of such damage.
34 *
35 * This file is used by the Freescale hypervisor management driver. It can
36 * also be included by applications that need to communicate with the driver
37 * via the ioctl interface.
38 */
39
40#ifndef FSL_HYPERVISOR_H
41#define FSL_HYPERVISOR_H
42
43#include <linux/types.h>
44
45/**
46 * struct fsl_hv_ioctl_restart - restart a partition
47 * @ret: return error code from the hypervisor
48 * @partition: the ID of the partition to restart, or -1 for the
49 * calling partition
50 *
51 * Used by FSL_HV_IOCTL_PARTITION_RESTART
52 */
53struct fsl_hv_ioctl_restart {
54 __u32 ret;
55 __u32 partition;
56};
57
58/**
59 * struct fsl_hv_ioctl_status - get a partition's status
60 * @ret: return error code from the hypervisor
61 * @partition: the ID of the partition to query, or -1 for the
62 * calling partition
63 * @status: The returned status of the partition
64 *
65 * Used by FSL_HV_IOCTL_PARTITION_GET_STATUS
66 *
67 * Values of 'status':
68 * 0 = Stopped
69 * 1 = Running
70 * 2 = Starting
71 * 3 = Stopping
72 */
73struct fsl_hv_ioctl_status {
74 __u32 ret;
75 __u32 partition;
76 __u32 status;
77};
78
79/**
80 * struct fsl_hv_ioctl_start - start a partition
81 * @ret: return error code from the hypervisor
82 * @partition: the ID of the partition to control
83 * @entry_point: The offset within the guest IMA to start execution
84 * @load: If non-zero, reload the partition's images before starting
85 *
86 * Used by FSL_HV_IOCTL_PARTITION_START
87 */
88struct fsl_hv_ioctl_start {
89 __u32 ret;
90 __u32 partition;
91 __u32 entry_point;
92 __u32 load;
93};
94
95/**
96 * struct fsl_hv_ioctl_stop - stop a partition
97 * @ret: return error code from the hypervisor
98 * @partition: the ID of the partition to stop, or -1 for the calling
99 * partition
100 *
101 * Used by FSL_HV_IOCTL_PARTITION_STOP
102 */
103struct fsl_hv_ioctl_stop {
104 __u32 ret;
105 __u32 partition;
106};
107
108/**
109 * struct fsl_hv_ioctl_memcpy - copy memory between partitions
110 * @ret: return error code from the hypervisor
111 * @source: the partition ID of the source partition, or -1 for this
112 * partition
113 * @target: the partition ID of the target partition, or -1 for this
114 * partition
115 * @reserved: reserved, must be set to 0
116 * @local_addr: user-space virtual address of a buffer in the local
117 * partition
118 * @remote_addr: guest physical address of a buffer in the
119 * remote partition
120 * @count: the number of bytes to copy. Both the local and remote
121 * buffers must be at least 'count' bytes long
122 *
123 * Used by FSL_HV_IOCTL_MEMCPY
124 *
125 * The 'local' partition is the partition that calls this ioctl. The
126 * 'remote' partition is a different partition. The data is copied from
127 * the 'source' paritition' to the 'target' partition.
128 *
129 * The buffer in the remote partition must be guest physically
130 * contiguous.
131 *
132 * This ioctl does not support copying memory between two remote
133 * partitions or within the same partition, so either 'source' or
134 * 'target' (but not both) must be -1. In other words, either
135 *
136 * source == local and target == remote
137 * or
138 * source == remote and target == local
139 */
140struct fsl_hv_ioctl_memcpy {
141 __u32 ret;
142 __u32 source;
143 __u32 target;
144 __u32 reserved; /* padding to ensure local_vaddr is aligned */
145 __u64 local_vaddr;
146 __u64 remote_paddr;
147 __u64 count;
148};
149
150/**
151 * struct fsl_hv_ioctl_doorbell - ring a doorbell
152 * @ret: return error code from the hypervisor
153 * @doorbell: the handle of the doorbell to ring doorbell
154 *
155 * Used by FSL_HV_IOCTL_DOORBELL
156 */
157struct fsl_hv_ioctl_doorbell {
158 __u32 ret;
159 __u32 doorbell;
160};
161
162/**
163 * struct fsl_hv_ioctl_prop - get/set a device tree property
164 * @ret: return error code from the hypervisor
165 * @handle: handle of partition whose tree to access
166 * @path: virtual address of path name of node to access
167 * @propname: virtual address of name of property to access
168 * @propval: virtual address of property data buffer
169 * @proplen: Size of property data buffer
170 * @reserved: reserved, must be set to 0
171 *
172 * Used by FSL_HV_IOCTL_DOORBELL
173 */
174struct fsl_hv_ioctl_prop {
175 __u32 ret;
176 __u32 handle;
177 __u64 path;
178 __u64 propname;
179 __u64 propval;
180 __u32 proplen;
181 __u32 reserved; /* padding to ensure structure is aligned */
182};
183
184/* The ioctl type, documented in ioctl-number.txt */
185#define FSL_HV_IOCTL_TYPE 0xAF
186
187/* Restart another partition */
188#define FSL_HV_IOCTL_PARTITION_RESTART \
189 _IOWR(FSL_HV_IOCTL_TYPE, 1, struct fsl_hv_ioctl_restart)
190
191/* Get a partition's status */
192#define FSL_HV_IOCTL_PARTITION_GET_STATUS \
193 _IOWR(FSL_HV_IOCTL_TYPE, 2, struct fsl_hv_ioctl_status)
194
195/* Boot another partition */
196#define FSL_HV_IOCTL_PARTITION_START \
197 _IOWR(FSL_HV_IOCTL_TYPE, 3, struct fsl_hv_ioctl_start)
198
199/* Stop this or another partition */
200#define FSL_HV_IOCTL_PARTITION_STOP \
201 _IOWR(FSL_HV_IOCTL_TYPE, 4, struct fsl_hv_ioctl_stop)
202
203/* Copy data from one partition to another */
204#define FSL_HV_IOCTL_MEMCPY \
205 _IOWR(FSL_HV_IOCTL_TYPE, 5, struct fsl_hv_ioctl_memcpy)
206
207/* Ring a doorbell */
208#define FSL_HV_IOCTL_DOORBELL \
209 _IOWR(FSL_HV_IOCTL_TYPE, 6, struct fsl_hv_ioctl_doorbell)
210
211/* Get a property from another guest's device tree */
212#define FSL_HV_IOCTL_GETPROP \
213 _IOWR(FSL_HV_IOCTL_TYPE, 7, struct fsl_hv_ioctl_prop)
214
215/* Set a property in another guest's device tree */
216#define FSL_HV_IOCTL_SETPROP \
217 _IOWR(FSL_HV_IOCTL_TYPE, 8, struct fsl_hv_ioctl_prop)
218
219#ifdef __KERNEL__
220
221/**
222 * fsl_hv_event_register() - register a callback for failover events
223 * @nb: pointer to caller-supplied notifier_block structure
224 *
225 * This function is called by device drivers to register their callback
226 * functions for fail-over events.
227 *
228 * The caller should allocate a notifier_block object and initialize the
229 * 'priority' and 'notifier_call' fields.
230 */
231int fsl_hv_failover_register(struct notifier_block *nb);
232
233/**
234 * fsl_hv_event_unregister() - unregister a callback for failover events
235 * @nb: the same 'nb' used in previous fsl_hv_failover_register call
236 */
237int fsl_hv_failover_unregister(struct notifier_block *nb);
238
239#endif
240
241#endif
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h
index 69ad89b50489..91d0e0a34ef3 100644
--- a/include/linux/fsnotify_backend.h
+++ b/include/linux/fsnotify_backend.h
@@ -16,7 +16,7 @@
16#include <linux/spinlock.h> 16#include <linux/spinlock.h>
17#include <linux/types.h> 17#include <linux/types.h>
18 18
19#include <asm/atomic.h> 19#include <linux/atomic.h>
20 20
21/* 21/*
22 * IN_* from inotfy.h lines up EXACTLY with FS_*, this is so we can easily 22 * IN_* from inotfy.h lines up EXACTLY with FS_*, this is so we can easily
diff --git a/include/linux/generic_acl.h b/include/linux/generic_acl.h
index 574bea4013b6..b6d657544ef1 100644
--- a/include/linux/generic_acl.h
+++ b/include/linux/generic_acl.h
@@ -10,6 +10,5 @@ extern const struct xattr_handler generic_acl_default_handler;
10 10
11int generic_acl_init(struct inode *, struct inode *); 11int generic_acl_init(struct inode *, struct inode *);
12int generic_acl_chmod(struct inode *); 12int generic_acl_chmod(struct inode *);
13int generic_check_acl(struct inode *inode, int mask);
14 13
15#endif /* LINUX_GENERIC_ACL_H */ 14#endif /* LINUX_GENERIC_ACL_H */
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 300d7582006e..02fa4697a0e5 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -420,7 +420,7 @@ static inline int get_disk_ro(struct gendisk *disk)
420 420
421extern void disk_block_events(struct gendisk *disk); 421extern void disk_block_events(struct gendisk *disk);
422extern void disk_unblock_events(struct gendisk *disk); 422extern void disk_unblock_events(struct gendisk *disk);
423extern void disk_check_events(struct gendisk *disk); 423extern void disk_flush_events(struct gendisk *disk, unsigned int mask);
424extern unsigned int disk_clear_events(struct gendisk *disk, unsigned int mask); 424extern unsigned int disk_clear_events(struct gendisk *disk, unsigned int mask);
425 425
426/* drivers/char/random.c */ 426/* drivers/char/random.c */
diff --git a/include/linux/gsmmux.h b/include/linux/gsmmux.h
index 378de4195caf..c25e9477f7c3 100644
--- a/include/linux/gsmmux.h
+++ b/include/linux/gsmmux.h
@@ -21,5 +21,16 @@ struct gsm_config
21#define GSMIOC_GETCONF _IOR('G', 0, struct gsm_config) 21#define GSMIOC_GETCONF _IOR('G', 0, struct gsm_config)
22#define GSMIOC_SETCONF _IOW('G', 1, struct gsm_config) 22#define GSMIOC_SETCONF _IOW('G', 1, struct gsm_config)
23 23
24struct gsm_netconfig {
25 unsigned int adaption; /* Adaption to use in network mode */
26 unsigned short protocol;/* Protocol to use - only ETH_P_IP supported */
27 unsigned short unused2;
28 char if_name[IFNAMSIZ]; /* interface name format string */
29 __u8 unused[28]; /* For future use */
30};
31
32#define GSMIOC_ENABLE_NET _IOW('G', 2, struct gsm_netconfig)
33#define GSMIOC_DISABLE_NET _IO('G', 3)
34
24 35
25#endif 36#endif
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 59225ef27d15..19644e0016bd 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -231,6 +231,9 @@ struct hstate {
231struct huge_bootmem_page { 231struct huge_bootmem_page {
232 struct list_head list; 232 struct list_head list;
233 struct hstate *hstate; 233 struct hstate *hstate;
234#ifdef CONFIG_HIGHMEM
235 phys_addr_t phys;
236#endif
234}; 237};
235 238
236struct page *alloc_huge_page_node(struct hstate *h, int nid); 239struct page *alloc_huge_page_node(struct hstate *h, int nid);
diff --git a/include/linux/hw_random.h b/include/linux/hw_random.h
index 9bede7633f74..b4b0eef5fddf 100644
--- a/include/linux/hw_random.h
+++ b/include/linux/hw_random.h
@@ -25,7 +25,7 @@
25 * there is always data available. *OBSOLETE* 25 * there is always data available. *OBSOLETE*
26 * @data_read: Read data from the RNG device. 26 * @data_read: Read data from the RNG device.
27 * Returns the number of lower random bytes in "data". 27 * Returns the number of lower random bytes in "data".
28 * Must not be NULL. *OSOLETE* 28 * Must not be NULL. *OBSOLETE*
29 * @read: New API. drivers can fill up to max bytes of data 29 * @read: New API. drivers can fill up to max bytes of data
30 * into the buffer. The buffer is aligned for any type. 30 * into the buffer. The buffer is aligned for any type.
31 * @priv: Private data, for use by the RNG driver. 31 * @priv: Private data, for use by the RNG driver.
diff --git a/include/linux/i2c-omap.h b/include/linux/i2c-omap.h
index 7472449cbb74..0aa0cbd676f7 100644
--- a/include/linux/i2c-omap.h
+++ b/include/linux/i2c-omap.h
@@ -3,6 +3,33 @@
3 3
4#include <linux/platform_device.h> 4#include <linux/platform_device.h>
5 5
6/*
7 * Version 2 of the I2C peripheral unit has a different register
8 * layout and extra registers. The ID register in the V2 peripheral
9 * unit on the OMAP4430 reports the same ID as the V1 peripheral
10 * unit on the OMAP3530, so we must inform the driver which IP
11 * version we know it is running on from platform / cpu-specific
12 * code using these constants in the hwmod class definition.
13 */
14
15#define OMAP_I2C_IP_VERSION_1 1
16#define OMAP_I2C_IP_VERSION_2 2
17
18/* struct omap_i2c_bus_platform_data .flags meanings */
19
20#define OMAP_I2C_FLAG_NO_FIFO BIT(0)
21#define OMAP_I2C_FLAG_SIMPLE_CLOCK BIT(1)
22#define OMAP_I2C_FLAG_16BIT_DATA_REG BIT(2)
23#define OMAP_I2C_FLAG_RESET_REGS_POSTIDLE BIT(3)
24#define OMAP_I2C_FLAG_APPLY_ERRATA_I207 BIT(4)
25#define OMAP_I2C_FLAG_ALWAYS_ARMXOR_CLK BIT(5)
26#define OMAP_I2C_FLAG_FORCE_19200_INT_CLK BIT(6)
27/* how the CPU address bus must be translated for I2C unit access */
28#define OMAP_I2C_FLAG_BUS_SHIFT_NONE 0
29#define OMAP_I2C_FLAG_BUS_SHIFT_1 BIT(7)
30#define OMAP_I2C_FLAG_BUS_SHIFT_2 BIT(8)
31#define OMAP_I2C_FLAG_BUS_SHIFT__SHIFT 7
32
6struct omap_i2c_bus_platform_data { 33struct omap_i2c_bus_platform_data {
7 u32 clkrate; 34 u32 clkrate;
8 void (*set_mpu_wkup_lat)(struct device *dev, long set); 35 void (*set_mpu_wkup_lat)(struct device *dev, long set);
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
index ba4f88624fcd..114c0f6fc63d 100644
--- a/include/linux/i2c/twl.h
+++ b/include/linux/i2c/twl.h
@@ -657,28 +657,41 @@ struct twl4030_power_data {
657extern void twl4030_power_init(struct twl4030_power_data *triton2_scripts); 657extern void twl4030_power_init(struct twl4030_power_data *triton2_scripts);
658extern int twl4030_remove_script(u8 flags); 658extern int twl4030_remove_script(u8 flags);
659 659
660struct twl4030_codec_audio_data { 660struct twl4030_codec_data {
661 unsigned int digimic_delay; /* in ms */ 661 unsigned int digimic_delay; /* in ms */
662 unsigned int ramp_delay_value; 662 unsigned int ramp_delay_value;
663 unsigned int offset_cncl_path; 663 unsigned int offset_cncl_path;
664 unsigned int check_defaults:1; 664 unsigned int check_defaults:1;
665 unsigned int reset_registers:1; 665 unsigned int reset_registers:1;
666 unsigned int hs_extmute:1; 666 unsigned int hs_extmute:1;
667 u16 hs_left_step;
668 u16 hs_right_step;
669 u16 hf_left_step;
670 u16 hf_right_step;
667 void (*set_hs_extmute)(int mute); 671 void (*set_hs_extmute)(int mute);
668}; 672};
669 673
670struct twl4030_codec_vibra_data { 674struct twl4030_vibra_data {
671 unsigned int coexist; 675 unsigned int coexist;
676
677 /* twl6040 */
678 unsigned int vibldrv_res; /* left driver resistance */
679 unsigned int vibrdrv_res; /* right driver resistance */
680 unsigned int viblmotor_res; /* left motor resistance */
681 unsigned int vibrmotor_res; /* right motor resistance */
682 int vddvibl_uV; /* VDDVIBL volt, set 0 for fixed reg */
683 int vddvibr_uV; /* VDDVIBR volt, set 0 for fixed reg */
672}; 684};
673 685
674struct twl4030_codec_data { 686struct twl4030_audio_data {
675 unsigned int audio_mclk; 687 unsigned int audio_mclk;
676 struct twl4030_codec_audio_data *audio; 688 struct twl4030_codec_data *codec;
677 struct twl4030_codec_vibra_data *vibra; 689 struct twl4030_vibra_data *vibra;
678 690
679 /* twl6040 */ 691 /* twl6040 */
680 int audpwron_gpio; /* audio power-on gpio */ 692 int audpwron_gpio; /* audio power-on gpio */
681 int naudint_irq; /* audio interrupt */ 693 int naudint_irq; /* audio interrupt */
694 unsigned int irq_base;
682}; 695};
683 696
684struct twl4030_platform_data { 697struct twl4030_platform_data {
@@ -690,7 +703,7 @@ struct twl4030_platform_data {
690 struct twl4030_keypad_data *keypad; 703 struct twl4030_keypad_data *keypad;
691 struct twl4030_usb_data *usb; 704 struct twl4030_usb_data *usb;
692 struct twl4030_power_data *power; 705 struct twl4030_power_data *power;
693 struct twl4030_codec_data *codec; 706 struct twl4030_audio_data *audio;
694 707
695 /* Common LDO regulators for TWL4030/TWL6030 */ 708 /* Common LDO regulators for TWL4030/TWL6030 */
696 struct regulator_init_data *vdac; 709 struct regulator_init_data *vdac;
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index a26108e4d924..54c878960872 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -1453,6 +1453,43 @@ enum ieee80211_sa_query_action {
1453 1453
1454#define WLAN_PMKID_LEN 16 1454#define WLAN_PMKID_LEN 16
1455 1455
1456/*
1457 * WMM/802.11e Tspec Element
1458 */
1459#define IEEE80211_WMM_IE_TSPEC_TID_MASK 0x0F
1460#define IEEE80211_WMM_IE_TSPEC_TID_SHIFT 1
1461
1462enum ieee80211_tspec_status_code {
1463 IEEE80211_TSPEC_STATUS_ADMISS_ACCEPTED = 0,
1464 IEEE80211_TSPEC_STATUS_ADDTS_INVAL_PARAMS = 0x1,
1465};
1466
1467struct ieee80211_tspec_ie {
1468 u8 element_id;
1469 u8 len;
1470 u8 oui[3];
1471 u8 oui_type;
1472 u8 oui_subtype;
1473 u8 version;
1474 __le16 tsinfo;
1475 u8 tsinfo_resvd;
1476 __le16 nominal_msdu;
1477 __le16 max_msdu;
1478 __le32 min_service_int;
1479 __le32 max_service_int;
1480 __le32 inactivity_int;
1481 __le32 suspension_int;
1482 __le32 service_start_time;
1483 __le32 min_data_rate;
1484 __le32 mean_data_rate;
1485 __le32 peak_data_rate;
1486 __le32 max_burst_size;
1487 __le32 delay_bound;
1488 __le32 min_phy_rate;
1489 __le16 sba;
1490 __le16 medium_time;
1491} __packed;
1492
1456/** 1493/**
1457 * ieee80211_get_qos_ctl - get pointer to qos control bytes 1494 * ieee80211_get_qos_ctl - get pointer to qos control bytes
1458 * @hdr: the frame 1495 * @hdr: the frame
diff --git a/include/linux/if.h b/include/linux/if.h
index 3bc63e6a02f7..03489ca92ded 100644
--- a/include/linux/if.h
+++ b/include/linux/if.h
@@ -76,6 +76,8 @@
76#define IFF_BRIDGE_PORT 0x4000 /* device used as bridge port */ 76#define IFF_BRIDGE_PORT 0x4000 /* device used as bridge port */
77#define IFF_OVS_DATAPATH 0x8000 /* device used as Open vSwitch 77#define IFF_OVS_DATAPATH 0x8000 /* device used as Open vSwitch
78 * datapath port */ 78 * datapath port */
79#define IFF_TX_SKB_SHARING 0x10000 /* The interface supports sharing
80 * skbs on transmit */
79 81
80#define IF_GET_IFACE 0x0001 /* for querying only */ 82#define IF_GET_IFACE 0x0001 /* for querying only */
81#define IF_GET_PROTO 0x0002 83#define IF_GET_PROTO 0x0002
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index 580f70c02391..d14e058aaeed 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -176,7 +176,6 @@ extern struct cred init_cred;
176 .alloc_lock = __SPIN_LOCK_UNLOCKED(tsk.alloc_lock), \ 176 .alloc_lock = __SPIN_LOCK_UNLOCKED(tsk.alloc_lock), \
177 .journal_info = NULL, \ 177 .journal_info = NULL, \
178 .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \ 178 .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \
179 .fs_excl = ATOMIC_INIT(0), \
180 .pi_lock = __RAW_SPIN_LOCK_UNLOCKED(tsk.pi_lock), \ 179 .pi_lock = __RAW_SPIN_LOCK_UNLOCKED(tsk.pi_lock), \
181 .timer_slack_ns = 50000, /* 50 usec default slack */ \ 180 .timer_slack_ns = 50000, /* 50 usec default slack */ \
182 .pids = { \ 181 .pids = { \
diff --git a/include/linux/input.h b/include/linux/input.h
index 771d6d85667d..068784e17972 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -119,9 +119,9 @@ struct input_keymap_entry {
119#define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len) /* get all sounds status */ 119#define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len) /* get all sounds status */
120#define EVIOCGSW(len) _IOC(_IOC_READ, 'E', 0x1b, len) /* get all switch states */ 120#define EVIOCGSW(len) _IOC(_IOC_READ, 'E', 0x1b, len) /* get all switch states */
121 121
122#define EVIOCGBIT(ev,len) _IOC(_IOC_READ, 'E', 0x20 + ev, len) /* get event bits */ 122#define EVIOCGBIT(ev,len) _IOC(_IOC_READ, 'E', 0x20 + (ev), len) /* get event bits */
123#define EVIOCGABS(abs) _IOR('E', 0x40 + abs, struct input_absinfo) /* get abs value/limits */ 123#define EVIOCGABS(abs) _IOR('E', 0x40 + (abs), struct input_absinfo) /* get abs value/limits */
124#define EVIOCSABS(abs) _IOW('E', 0xc0 + abs, struct input_absinfo) /* set abs value/limits */ 124#define EVIOCSABS(abs) _IOW('E', 0xc0 + (abs), struct input_absinfo) /* set abs value/limits */
125 125
126#define EVIOCSFF _IOC(_IOC_WRITE, 'E', 0x80, sizeof(struct ff_effect)) /* send a force effect to a force feedback device */ 126#define EVIOCSFF _IOC(_IOC_WRITE, 'E', 0x80, sizeof(struct ff_effect)) /* send a force effect to a force feedback device */
127#define EVIOCRMFF _IOW('E', 0x81, int) /* Erase a force effect */ 127#define EVIOCRMFF _IOW('E', 0x81, int) /* Erase a force effect */
diff --git a/include/linux/input/kxtj9.h b/include/linux/input/kxtj9.h
new file mode 100644
index 000000000000..f6bac89537b8
--- /dev/null
+++ b/include/linux/input/kxtj9.h
@@ -0,0 +1,70 @@
1/*
2 * Copyright (C) 2011 Kionix, Inc.
3 * Written by Chris Hudson <chudson@kionix.com>
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., 59 Temple Place, Suite 330, Boston, MA
17 * 02111-1307, USA
18 */
19
20#ifndef __KXTJ9_H__
21#define __KXTJ9_H__
22
23#define KXTJ9_I2C_ADDR 0x0F
24
25struct kxtj9_platform_data {
26 unsigned int min_interval; /* minimum poll interval (in milli-seconds) */
27
28 /*
29 * By default, x is axis 0, y is axis 1, z is axis 2; these can be
30 * changed to account for sensor orientation within the host device.
31 */
32 u8 axis_map_x;
33 u8 axis_map_y;
34 u8 axis_map_z;
35
36 /*
37 * Each axis can be negated to account for sensor orientation within
38 * the host device.
39 */
40 bool negate_x;
41 bool negate_y;
42 bool negate_z;
43
44 /* CTRL_REG1: set resolution, g-range, data ready enable */
45 /* Output resolution: 8-bit valid or 12-bit valid */
46 #define RES_8BIT 0
47 #define RES_12BIT (1 << 6)
48 u8 res_12bit;
49 /* Output g-range: +/-2g, 4g, or 8g */
50 #define KXTJ9_G_2G 0
51 #define KXTJ9_G_4G (1 << 3)
52 #define KXTJ9_G_8G (1 << 4)
53 u8 g_range;
54
55 /* DATA_CTRL_REG: controls the output data rate of the part */
56 #define ODR12_5F 0
57 #define ODR25F 1
58 #define ODR50F 2
59 #define ODR100F 3
60 #define ODR200F 4
61 #define ODR400F 5
62 #define ODR800F 6
63 u8 data_odr_init;
64
65 int (*init)(void);
66 void (*exit)(void);
67 int (*power_on)(void);
68 int (*power_off)(void);
69};
70#endif /* __KXTJ9_H__ */
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index f6efed0039ed..a103732b7588 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -17,7 +17,7 @@
17#include <linux/kref.h> 17#include <linux/kref.h>
18#include <linux/workqueue.h> 18#include <linux/workqueue.h>
19 19
20#include <asm/atomic.h> 20#include <linux/atomic.h>
21#include <asm/ptrace.h> 21#include <asm/ptrace.h>
22#include <asm/system.h> 22#include <asm/system.h>
23#include <trace/events/irq.h> 23#include <trace/events/irq.h>
diff --git a/include/linux/iocontext.h b/include/linux/iocontext.h
index b2eee896dcbc..5037a0ad2312 100644
--- a/include/linux/iocontext.h
+++ b/include/linux/iocontext.h
@@ -5,6 +5,14 @@
5#include <linux/rcupdate.h> 5#include <linux/rcupdate.h>
6 6
7struct cfq_queue; 7struct cfq_queue;
8struct cfq_ttime {
9 unsigned long last_end_request;
10
11 unsigned long ttime_total;
12 unsigned long ttime_samples;
13 unsigned long ttime_mean;
14};
15
8struct cfq_io_context { 16struct cfq_io_context {
9 void *key; 17 void *key;
10 18
@@ -12,11 +20,7 @@ struct cfq_io_context {
12 20
13 struct io_context *ioc; 21 struct io_context *ioc;
14 22
15 unsigned long last_end_request; 23 struct cfq_ttime ttime;
16
17 unsigned long ttime_total;
18 unsigned long ttime_samples;
19 unsigned long ttime_mean;
20 24
21 struct list_head queue_list; 25 struct list_head queue_list;
22 struct hlist_node cic_list; 26 struct hlist_node cic_list;
diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index e9bb22cba764..c2ebfe66177c 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -109,6 +109,36 @@ struct resource_list {
109/* PCI control bits. Shares IORESOURCE_BITS with above PCI ROM. */ 109/* PCI control bits. Shares IORESOURCE_BITS with above PCI ROM. */
110#define IORESOURCE_PCI_FIXED (1<<4) /* Do not move resource */ 110#define IORESOURCE_PCI_FIXED (1<<4) /* Do not move resource */
111 111
112
113/* helpers to define resources */
114#define DEFINE_RES_NAMED(_start, _size, _name, _flags) \
115 { \
116 .start = (_start), \
117 .end = (_start) + (_size) - 1, \
118 .name = (_name), \
119 .flags = (_flags), \
120 }
121
122#define DEFINE_RES_IO_NAMED(_start, _size, _name) \
123 DEFINE_RES_NAMED((_start), (_size), (_name), IORESOURCE_IO)
124#define DEFINE_RES_IO(_start, _size) \
125 DEFINE_RES_IO_NAMED((_start), (_size), NULL)
126
127#define DEFINE_RES_MEM_NAMED(_start, _size, _name) \
128 DEFINE_RES_NAMED((_start), (_size), (_name), IORESOURCE_MEM)
129#define DEFINE_RES_MEM(_start, _size) \
130 DEFINE_RES_MEM_NAMED((_start), (_size), NULL)
131
132#define DEFINE_RES_IRQ_NAMED(_irq, _name) \
133 DEFINE_RES_NAMED((_irq), 1, (_name), IORESOURCE_IRQ)
134#define DEFINE_RES_IRQ(_irq) \
135 DEFINE_RES_IRQ_NAMED((_irq), NULL)
136
137#define DEFINE_RES_DMA_NAMED(_dma, _name) \
138 DEFINE_RES_NAMED((_dma), 1, (_name), IORESOURCE_DMA)
139#define DEFINE_RES_DMA(_dma) \
140 DEFINE_RES_DMA_NAMED((_dma), NULL)
141
112/* PC/ISA/whatever - the normal PC address spaces: IO and memory */ 142/* PC/ISA/whatever - the normal PC address spaces: IO and memory */
113extern struct resource ioport_resource; 143extern struct resource ioport_resource;
114extern struct resource iomem_resource; 144extern struct resource iomem_resource;
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h
index a6d1655f9607..8a297a5e794c 100644
--- a/include/linux/ipc_namespace.h
+++ b/include/linux/ipc_namespace.h
@@ -44,6 +44,11 @@ struct ipc_namespace {
44 size_t shm_ctlall; 44 size_t shm_ctlall;
45 int shm_ctlmni; 45 int shm_ctlmni;
46 int shm_tot; 46 int shm_tot;
47 /*
48 * Defines whether IPC_RMID is forced for _all_ shm segments regardless
49 * of shmctl()
50 */
51 int shm_rmid_forced;
47 52
48 struct notifier_block ipcns_nb; 53 struct notifier_block ipcns_nb;
49 54
@@ -72,6 +77,7 @@ extern int register_ipcns_notifier(struct ipc_namespace *);
72extern int cond_register_ipcns_notifier(struct ipc_namespace *); 77extern int cond_register_ipcns_notifier(struct ipc_namespace *);
73extern void unregister_ipcns_notifier(struct ipc_namespace *); 78extern void unregister_ipcns_notifier(struct ipc_namespace *);
74extern int ipcns_notify(unsigned long); 79extern int ipcns_notify(unsigned long);
80extern void shm_destroy_orphaned(struct ipc_namespace *ns);
75#else /* CONFIG_SYSVIPC */ 81#else /* CONFIG_SYSVIPC */
76static inline int register_ipcns_notifier(struct ipc_namespace *ns) 82static inline int register_ipcns_notifier(struct ipc_namespace *ns)
77{ return 0; } 83{ return 0; }
@@ -79,6 +85,7 @@ static inline int cond_register_ipcns_notifier(struct ipc_namespace *ns)
79{ return 0; } 85{ return 0; }
80static inline void unregister_ipcns_notifier(struct ipc_namespace *ns) { } 86static inline void unregister_ipcns_notifier(struct ipc_namespace *ns) { }
81static inline int ipcns_notify(unsigned long l) { return 0; } 87static inline int ipcns_notify(unsigned long l) { return 0; }
88static inline void shm_destroy_orphaned(struct ipc_namespace *ns) {}
82#endif /* CONFIG_SYSVIPC */ 89#endif /* CONFIG_SYSVIPC */
83 90
84#ifdef CONFIG_POSIX_MQUEUE 91#ifdef CONFIG_POSIX_MQUEUE
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 5f695041090c..87a06f345bd2 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -108,14 +108,18 @@ enum {
108}; 108};
109 109
110struct msi_desc; 110struct msi_desc;
111struct irq_domain;
111 112
112/** 113/**
113 * struct irq_data - per irq and irq chip data passed down to chip functions 114 * struct irq_data - per irq and irq chip data passed down to chip functions
114 * @irq: interrupt number 115 * @irq: interrupt number
116 * @hwirq: hardware interrupt number, local to the interrupt domain
115 * @node: node index useful for balancing 117 * @node: node index useful for balancing
116 * @state_use_accessors: status information for irq chip functions. 118 * @state_use_accessors: status information for irq chip functions.
117 * Use accessor functions to deal with it 119 * Use accessor functions to deal with it
118 * @chip: low level interrupt hardware access 120 * @chip: low level interrupt hardware access
121 * @domain: Interrupt translation domain; responsible for mapping
122 * between hwirq number and linux irq number.
119 * @handler_data: per-IRQ data for the irq_chip methods 123 * @handler_data: per-IRQ data for the irq_chip methods
120 * @chip_data: platform-specific per-chip private data for the chip 124 * @chip_data: platform-specific per-chip private data for the chip
121 * methods, to allow shared chip implementations 125 * methods, to allow shared chip implementations
@@ -128,9 +132,11 @@ struct msi_desc;
128 */ 132 */
129struct irq_data { 133struct irq_data {
130 unsigned int irq; 134 unsigned int irq;
135 unsigned long hwirq;
131 unsigned int node; 136 unsigned int node;
132 unsigned int state_use_accessors; 137 unsigned int state_use_accessors;
133 struct irq_chip *chip; 138 struct irq_chip *chip;
139 struct irq_domain *domain;
134 void *handler_data; 140 void *handler_data;
135 void *chip_data; 141 void *chip_data;
136 struct msi_desc *msi_desc; 142 struct msi_desc *msi_desc;
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
new file mode 100644
index 000000000000..e807ad687a07
--- /dev/null
+++ b/include/linux/irqdomain.h
@@ -0,0 +1,91 @@
1/*
2 * irq_domain - IRQ translation domains
3 *
4 * Translation infrastructure between hw and linux irq numbers. This is
5 * helpful for interrupt controllers to implement mapping between hardware
6 * irq numbers and the Linux irq number space.
7 *
8 * irq_domains also have a hook for translating device tree interrupt
9 * representation into a hardware irq number that can be mapped back to a
10 * Linux irq number without any extra platform support code.
11 *
12 * irq_domain is expected to be embedded in an interrupt controller's private
13 * data structure.
14 */
15#ifndef _LINUX_IRQDOMAIN_H
16#define _LINUX_IRQDOMAIN_H
17
18#include <linux/irq.h>
19#include <linux/mod_devicetable.h>
20
21#ifdef CONFIG_IRQ_DOMAIN
22struct device_node;
23struct irq_domain;
24
25/**
26 * struct irq_domain_ops - Methods for irq_domain objects
27 * @to_irq: (optional) given a local hardware irq number, return the linux
28 * irq number. If to_irq is not implemented, then the irq_domain
29 * will use this translation: irq = (domain->irq_base + hwirq)
30 * @dt_translate: Given a device tree node and interrupt specifier, decode
31 * the hardware irq number and linux irq type value.
32 */
33struct irq_domain_ops {
34 unsigned int (*to_irq)(struct irq_domain *d, unsigned long hwirq);
35
36#ifdef CONFIG_OF
37 int (*dt_translate)(struct irq_domain *d, struct device_node *node,
38 const u32 *intspec, unsigned int intsize,
39 unsigned long *out_hwirq, unsigned int *out_type);
40#endif /* CONFIG_OF */
41};
42
43/**
44 * struct irq_domain - Hardware interrupt number translation object
45 * @list: Element in global irq_domain list.
46 * @irq_base: Start of irq_desc range assigned to the irq_domain. The creator
47 * of the irq_domain is responsible for allocating the array of
48 * irq_desc structures.
49 * @nr_irq: Number of irqs managed by the irq domain
50 * @ops: pointer to irq_domain methods
51 * @priv: private data pointer for use by owner. Not touched by irq_domain
52 * core code.
53 * @of_node: (optional) Pointer to device tree nodes associated with the
54 * irq_domain. Used when decoding device tree interrupt specifiers.
55 */
56struct irq_domain {
57 struct list_head list;
58 unsigned int irq_base;
59 unsigned int nr_irq;
60 const struct irq_domain_ops *ops;
61 void *priv;
62 struct device_node *of_node;
63};
64
65/**
66 * irq_domain_to_irq() - Translate from a hardware irq to a linux irq number
67 *
68 * Returns the linux irq number associated with a hardware irq. By default,
69 * the mapping is irq == domain->irq_base + hwirq, but this mapping can
70 * be overridden if the irq_domain implements a .to_irq() hook.
71 */
72static inline unsigned int irq_domain_to_irq(struct irq_domain *d,
73 unsigned long hwirq)
74{
75 return d->ops->to_irq ? d->ops->to_irq(d, hwirq) : d->irq_base + hwirq;
76}
77
78extern void irq_domain_add(struct irq_domain *domain);
79extern void irq_domain_del(struct irq_domain *domain);
80#endif /* CONFIG_IRQ_DOMAIN */
81
82#if defined(CONFIG_IRQ_DOMAIN) && defined(CONFIG_OF_IRQ)
83extern void irq_domain_add_simple(struct device_node *controller, int irq_base);
84extern void irq_domain_generate_simple(const struct of_device_id *match,
85 u64 phys_base, unsigned int irq_start);
86#else /* CONFIG_IRQ_DOMAIN && CONFIG_OF_IRQ */
87static inline void irq_domain_generate_simple(const struct of_device_id *match,
88 u64 phys_base, unsigned int irq_start) { }
89#endif /* CONFIG_IRQ_DOMAIN && CONFIG_OF_IRQ */
90
91#endif /* _LINUX_IRQDOMAIN_H */
diff --git a/include/linux/jbd.h b/include/linux/jbd.h
index e06965081ba5..e6a5e34bed4f 100644
--- a/include/linux/jbd.h
+++ b/include/linux/jbd.h
@@ -940,7 +940,6 @@ extern int journal_force_commit(journal_t *);
940 */ 940 */
941struct journal_head *journal_add_journal_head(struct buffer_head *bh); 941struct journal_head *journal_add_journal_head(struct buffer_head *bh);
942struct journal_head *journal_grab_journal_head(struct buffer_head *bh); 942struct journal_head *journal_grab_journal_head(struct buffer_head *bh);
943void journal_remove_journal_head(struct buffer_head *bh);
944void journal_put_journal_head(struct journal_head *jh); 943void journal_put_journal_head(struct journal_head *jh);
945 944
946/* 945/*
diff --git a/include/linux/journal-head.h b/include/linux/journal-head.h
index 44e95d0a721f..423cb6d78ee0 100644
--- a/include/linux/journal-head.h
+++ b/include/linux/journal-head.h
@@ -45,7 +45,7 @@ struct journal_head {
45 * has been cowed 45 * has been cowed
46 * [jbd_lock_bh_state()] 46 * [jbd_lock_bh_state()]
47 */ 47 */
48 unsigned b_cow_tid; 48 tid_t b_cow_tid;
49 49
50 /* 50 /*
51 * Copy of the buffer data frozen for writing to the log. 51 * Copy of the buffer data frozen for writing to the log.
diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h
index 83e745f3ead7..66f23dc5e76a 100644
--- a/include/linux/jump_label.h
+++ b/include/linux/jump_label.h
@@ -54,7 +54,7 @@ extern void jump_label_apply_nops(struct module *mod);
54 54
55#else 55#else
56 56
57#include <asm/atomic.h> 57#include <linux/atomic.h>
58 58
59#define JUMP_LABEL_INIT {ATOMIC_INIT(0)} 59#define JUMP_LABEL_INIT {ATOMIC_INIT(0)}
60 60
diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h
new file mode 100644
index 000000000000..067eda0e4b32
--- /dev/null
+++ b/include/linux/kconfig.h
@@ -0,0 +1,32 @@
1#ifndef __LINUX_KCONFIG_H
2#define __LINUX_KCONFIG_H
3
4#include <generated/autoconf.h>
5
6/*
7 * Helper macros to use CONFIG_ options in C expressions. Note that
8 * these only work with boolean and tristate options.
9 */
10
11/*
12 * IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',
13 * 0 otherwise.
14 *
15 */
16#define IS_ENABLED(option) \
17 (__enabled_ ## option || __enabled_ ## option ## _MODULE)
18
19/*
20 * IS_BUILTIN(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y', 0
21 * otherwise. For boolean options, this is equivalent to
22 * IS_ENABLED(CONFIG_FOO).
23 */
24#define IS_BUILTIN(option) __enabled_ ## option
25
26/*
27 * IS_MODULE(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'm', 0
28 * otherwise.
29 */
30#define IS_MODULE(option) __enabled_ ## option ## _MODULE
31
32#endif /* __LINUX_KCONFIG_H */
diff --git a/include/linux/kdb.h b/include/linux/kdb.h
index aadff7cc2b84..529d9a0c75a5 100644
--- a/include/linux/kdb.h
+++ b/include/linux/kdb.h
@@ -16,7 +16,7 @@
16#ifdef CONFIG_KGDB_KDB 16#ifdef CONFIG_KGDB_KDB
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/sched.h> 18#include <linux/sched.h>
19#include <asm/atomic.h> 19#include <linux/atomic.h>
20 20
21#define KDB_POLL_FUNC_MAX 5 21#define KDB_POLL_FUNC_MAX 5
22extern int kdb_poll_idx; 22extern int kdb_poll_idx;
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 567a6f7bbeed..46ac9a50528d 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -56,6 +56,14 @@
56 56
57#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) 57#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
58#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) 58#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
59#define DIV_ROUND_UP_ULL(ll,d) \
60 ({ unsigned long long _tmp = (ll)+(d)-1; do_div(_tmp, d); _tmp; })
61
62#if BITS_PER_LONG == 32
63# define DIV_ROUND_UP_SECTOR_T(ll,d) DIV_ROUND_UP_ULL(ll, d)
64#else
65# define DIV_ROUND_UP_SECTOR_T(ll,d) DIV_ROUND_UP(ll,d)
66#endif
59 67
60/* The `const' in roundup() prevents gcc-3.3 from calling __divdi3 */ 68/* The `const' in roundup() prevents gcc-3.3 from calling __divdi3 */
61#define roundup(x, y) ( \ 69#define roundup(x, y) ( \
@@ -646,29 +654,6 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { }
646 const typeof( ((type *)0)->member ) *__mptr = (ptr); \ 654 const typeof( ((type *)0)->member ) *__mptr = (ptr); \
647 (type *)( (char *)__mptr - offsetof(type,member) );}) 655 (type *)( (char *)__mptr - offsetof(type,member) );})
648 656
649struct sysinfo;
650extern int do_sysinfo(struct sysinfo *info);
651
652#endif /* __KERNEL__ */
653
654#define SI_LOAD_SHIFT 16
655struct sysinfo {
656 long uptime; /* Seconds since boot */
657 unsigned long loads[3]; /* 1, 5, and 15 minute load averages */
658 unsigned long totalram; /* Total usable main memory size */
659 unsigned long freeram; /* Available memory size */
660 unsigned long sharedram; /* Amount of shared memory */
661 unsigned long bufferram; /* Memory used by buffers */
662 unsigned long totalswap; /* Total swap space size */
663 unsigned long freeswap; /* swap space still available */
664 unsigned short procs; /* Number of current processes */
665 unsigned short pad; /* explicit padding for m68k */
666 unsigned long totalhigh; /* Total high memory size */
667 unsigned long freehigh; /* Available high memory size */
668 unsigned int mem_unit; /* Memory unit size in bytes */
669 char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */
670};
671
672#ifdef __CHECKER__ 657#ifdef __CHECKER__
673#define BUILD_BUG_ON_NOT_POWER_OF_2(n) 658#define BUILD_BUG_ON_NOT_POWER_OF_2(n)
674#define BUILD_BUG_ON_ZERO(e) (0) 659#define BUILD_BUG_ON_ZERO(e) (0)
@@ -736,4 +721,27 @@ extern int __build_bug_on_failed;
736# define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD 721# define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD
737#endif 722#endif
738 723
724struct sysinfo;
725extern int do_sysinfo(struct sysinfo *info);
726
727#endif /* __KERNEL__ */
728
729#define SI_LOAD_SHIFT 16
730struct sysinfo {
731 long uptime; /* Seconds since boot */
732 unsigned long loads[3]; /* 1, 5, and 15 minute load averages */
733 unsigned long totalram; /* Total usable main memory size */
734 unsigned long freeram; /* Available memory size */
735 unsigned long sharedram; /* Amount of shared memory */
736 unsigned long bufferram; /* Memory used by buffers */
737 unsigned long totalswap; /* Total swap space size */
738 unsigned long freeswap; /* swap space still available */
739 unsigned short procs; /* Number of current processes */
740 unsigned short pad; /* explicit padding for m68k */
741 unsigned long totalhigh; /* Total high memory size */
742 unsigned long freehigh; /* Available high memory size */
743 unsigned int mem_unit; /* Memory unit size in bytes */
744 char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */
745};
746
739#endif 747#endif
diff --git a/include/linux/key.h b/include/linux/key.h
index 6ea4eebd3467..183a6af7715d 100644
--- a/include/linux/key.h
+++ b/include/linux/key.h
@@ -21,7 +21,7 @@
21#include <linux/rcupdate.h> 21#include <linux/rcupdate.h>
22#include <linux/sysctl.h> 22#include <linux/sysctl.h>
23#include <linux/rwsem.h> 23#include <linux/rwsem.h>
24#include <asm/atomic.h> 24#include <linux/atomic.h>
25 25
26#ifdef __KERNEL__ 26#ifdef __KERNEL__
27 27
diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h
index 10ca03d0a250..fa391835508d 100644
--- a/include/linux/kgdb.h
+++ b/include/linux/kgdb.h
@@ -16,7 +16,7 @@
16#include <linux/serial_8250.h> 16#include <linux/serial_8250.h>
17#include <linux/linkage.h> 17#include <linux/linkage.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <asm/atomic.h> 19#include <linux/atomic.h>
20#ifdef CONFIG_HAVE_ARCH_KGDB 20#ifdef CONFIG_HAVE_ARCH_KGDB
21#include <asm/kgdb.h> 21#include <asm/kgdb.h>
22#endif 22#endif
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 9229b64ee3aa..668729cc0fe9 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -25,7 +25,7 @@
25#include <linux/kobject_ns.h> 25#include <linux/kobject_ns.h>
26#include <linux/kernel.h> 26#include <linux/kernel.h>
27#include <linux/wait.h> 27#include <linux/wait.h>
28#include <asm/atomic.h> 28#include <linux/atomic.h>
29 29
30#define UEVENT_HELPER_PATH_LEN 256 30#define UEVENT_HELPER_PATH_LEN 256
31#define UEVENT_NUM_ENVP 32 /* number of env pointers */ 31#define UEVENT_NUM_ENVP 32 /* number of env pointers */
diff --git a/include/linux/led-lm3530.h b/include/linux/led-lm3530.h
index 58592fa67d24..8eb12357a110 100644
--- a/include/linux/led-lm3530.h
+++ b/include/linux/led-lm3530.h
@@ -84,6 +84,8 @@ enum lm3530_als_mode {
84 * @brt_ramp_rise: rate of rise of led current 84 * @brt_ramp_rise: rate of rise of led current
85 * @als1_resistor_sel: internal resistance from ALS1 input to ground 85 * @als1_resistor_sel: internal resistance from ALS1 input to ground
86 * @als2_resistor_sel: internal resistance from ALS2 input to ground 86 * @als2_resistor_sel: internal resistance from ALS2 input to ground
87 * @als_vmin: als input voltage calibrated for max brightness in mV
88 * @als_vmax: als input voltage calibrated for min brightness in mV
87 * @brt_val: brightness value (0-255) 89 * @brt_val: brightness value (0-255)
88 */ 90 */
89struct lm3530_platform_data { 91struct lm3530_platform_data {
@@ -101,6 +103,9 @@ struct lm3530_platform_data {
101 u8 als1_resistor_sel; 103 u8 als1_resistor_sel;
102 u8 als2_resistor_sel; 104 u8 als2_resistor_sel;
103 105
106 u32 als_vmin;
107 u32 als_vmax;
108
104 u8 brt_val; 109 u8 brt_val;
105}; 110};
106 111
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 5a9926b34072..efd6f9800762 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -74,6 +74,16 @@
74 74
75#define BPRINTK(fmt, args...) if (ap->flags & ATA_FLAG_DEBUGMSG) printk(KERN_ERR "%s: " fmt, __func__, ## args) 75#define BPRINTK(fmt, args...) if (ap->flags & ATA_FLAG_DEBUGMSG) printk(KERN_ERR "%s: " fmt, __func__, ## args)
76 76
77#define ata_print_version_once(dev, version) \
78({ \
79 static bool __print_once; \
80 \
81 if (!__print_once) { \
82 __print_once = true; \
83 ata_print_version(dev, version); \
84 } \
85})
86
77/* NEW: debug levels */ 87/* NEW: debug levels */
78#define HAVE_LIBATA_MSG 1 88#define HAVE_LIBATA_MSG 1
79 89
@@ -1244,20 +1254,50 @@ static inline int sata_srst_pmp(struct ata_link *link)
1244/* 1254/*
1245 * printk helpers 1255 * printk helpers
1246 */ 1256 */
1247#define ata_port_printk(ap, lv, fmt, args...) \ 1257__attribute__((format (printf, 3, 4)))
1248 printk("%sata%u: "fmt, lv, (ap)->print_id , ##args) 1258int ata_port_printk(const struct ata_port *ap, const char *level,
1249 1259 const char *fmt, ...);
1250#define ata_link_printk(link, lv, fmt, args...) do { \ 1260__attribute__((format (printf, 3, 4)))
1251 if (sata_pmp_attached((link)->ap) || (link)->ap->slave_link) \ 1261int ata_link_printk(const struct ata_link *link, const char *level,
1252 printk("%sata%u.%02u: "fmt, lv, (link)->ap->print_id, \ 1262 const char *fmt, ...);
1253 (link)->pmp , ##args); \ 1263__attribute__((format (printf, 3, 4)))
1254 else \ 1264int ata_dev_printk(const struct ata_device *dev, const char *level,
1255 printk("%sata%u: "fmt, lv, (link)->ap->print_id , ##args); \ 1265 const char *fmt, ...);
1256 } while(0) 1266
1257 1267#define ata_port_err(ap, fmt, ...) \
1258#define ata_dev_printk(dev, lv, fmt, args...) \ 1268 ata_port_printk(ap, KERN_ERR, fmt, ##__VA_ARGS__)
1259 printk("%sata%u.%02u: "fmt, lv, (dev)->link->ap->print_id, \ 1269#define ata_port_warn(ap, fmt, ...) \
1260 (dev)->link->pmp + (dev)->devno , ##args) 1270 ata_port_printk(ap, KERN_WARNING, fmt, ##__VA_ARGS__)
1271#define ata_port_notice(ap, fmt, ...) \
1272 ata_port_printk(ap, KERN_NOTICE, fmt, ##__VA_ARGS__)
1273#define ata_port_info(ap, fmt, ...) \
1274 ata_port_printk(ap, KERN_INFO, fmt, ##__VA_ARGS__)
1275#define ata_port_dbg(ap, fmt, ...) \
1276 ata_port_printk(ap, KERN_DEBUG, fmt, ##__VA_ARGS__)
1277
1278#define ata_link_err(link, fmt, ...) \
1279 ata_link_printk(link, KERN_ERR, fmt, ##__VA_ARGS__)
1280#define ata_link_warn(link, fmt, ...) \
1281 ata_link_printk(link, KERN_WARNING, fmt, ##__VA_ARGS__)
1282#define ata_link_notice(link, fmt, ...) \
1283 ata_link_printk(link, KERN_NOTICE, fmt, ##__VA_ARGS__)
1284#define ata_link_info(link, fmt, ...) \
1285 ata_link_printk(link, KERN_INFO, fmt, ##__VA_ARGS__)
1286#define ata_link_dbg(link, fmt, ...) \
1287 ata_link_printk(link, KERN_DEBUG, fmt, ##__VA_ARGS__)
1288
1289#define ata_dev_err(dev, fmt, ...) \
1290 ata_dev_printk(dev, KERN_ERR, fmt, ##__VA_ARGS__)
1291#define ata_dev_warn(dev, fmt, ...) \
1292 ata_dev_printk(dev, KERN_WARNING, fmt, ##__VA_ARGS__)
1293#define ata_dev_notice(dev, fmt, ...) \
1294 ata_dev_printk(dev, KERN_NOTICE, fmt, ##__VA_ARGS__)
1295#define ata_dev_info(dev, fmt, ...) \
1296 ata_dev_printk(dev, KERN_INFO, fmt, ##__VA_ARGS__)
1297#define ata_dev_dbg(dev, fmt, ...) \
1298 ata_dev_printk(dev, KERN_DEBUG, fmt, ##__VA_ARGS__)
1299
1300void ata_print_version(const struct device *dev, const char *version);
1261 1301
1262/* 1302/*
1263 * ata_eh_info helpers 1303 * ata_eh_info helpers
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 50940da6adf3..b96600786913 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -39,6 +39,16 @@ extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan,
39 struct mem_cgroup *mem_cont, 39 struct mem_cgroup *mem_cont,
40 int active, int file); 40 int active, int file);
41 41
42struct memcg_scanrecord {
43 struct mem_cgroup *mem; /* scanend memory cgroup */
44 struct mem_cgroup *root; /* scan target hierarchy root */
45 int context; /* scanning context (see memcontrol.c) */
46 unsigned long nr_scanned[2]; /* the number of scanned pages */
47 unsigned long nr_rotated[2]; /* the number of rotated pages */
48 unsigned long nr_freed[2]; /* the number of freed pages */
49 unsigned long elapsed; /* nsec of time elapsed while scanning */
50};
51
42#ifdef CONFIG_CGROUP_MEM_RES_CTLR 52#ifdef CONFIG_CGROUP_MEM_RES_CTLR
43/* 53/*
44 * All "charge" functions with gfp_mask should use GFP_KERNEL or 54 * All "charge" functions with gfp_mask should use GFP_KERNEL or
@@ -111,8 +121,7 @@ int mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg);
111int mem_cgroup_inactive_file_is_low(struct mem_cgroup *memcg); 121int mem_cgroup_inactive_file_is_low(struct mem_cgroup *memcg);
112int mem_cgroup_select_victim_node(struct mem_cgroup *memcg); 122int mem_cgroup_select_victim_node(struct mem_cgroup *memcg);
113unsigned long mem_cgroup_zone_nr_lru_pages(struct mem_cgroup *memcg, 123unsigned long mem_cgroup_zone_nr_lru_pages(struct mem_cgroup *memcg,
114 struct zone *zone, 124 int nid, int zid, unsigned int lrumask);
115 enum lru_list lru);
116struct zone_reclaim_stat *mem_cgroup_get_reclaim_stat(struct mem_cgroup *memcg, 125struct zone_reclaim_stat *mem_cgroup_get_reclaim_stat(struct mem_cgroup *memcg,
117 struct zone *zone); 126 struct zone *zone);
118struct zone_reclaim_stat* 127struct zone_reclaim_stat*
@@ -120,6 +129,15 @@ mem_cgroup_get_reclaim_stat_from_page(struct page *page);
120extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, 129extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg,
121 struct task_struct *p); 130 struct task_struct *p);
122 131
132extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem,
133 gfp_t gfp_mask, bool noswap,
134 struct memcg_scanrecord *rec);
135extern unsigned long mem_cgroup_shrink_node_zone(struct mem_cgroup *mem,
136 gfp_t gfp_mask, bool noswap,
137 struct zone *zone,
138 struct memcg_scanrecord *rec,
139 unsigned long *nr_scanned);
140
123#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP 141#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
124extern int do_swap_account; 142extern int do_swap_account;
125#endif 143#endif
@@ -313,8 +331,8 @@ mem_cgroup_inactive_file_is_low(struct mem_cgroup *memcg)
313} 331}
314 332
315static inline unsigned long 333static inline unsigned long
316mem_cgroup_zone_nr_lru_pages(struct mem_cgroup *memcg, struct zone *zone, 334mem_cgroup_zone_nr_lru_pages(struct mem_cgroup *memcg, int nid, int zid,
317 enum lru_list lru) 335 unsigned int lru_mask)
318{ 336{
319 return 0; 337 return 0;
320} 338}
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index 8122018d3000..0b8e2a742600 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -68,12 +68,19 @@ static inline void zone_seqlock_init(struct zone *zone)
68extern int zone_grow_free_lists(struct zone *zone, unsigned long new_nr_pages); 68extern int zone_grow_free_lists(struct zone *zone, unsigned long new_nr_pages);
69extern int zone_grow_waitqueues(struct zone *zone, unsigned long nr_pages); 69extern int zone_grow_waitqueues(struct zone *zone, unsigned long nr_pages);
70extern int add_one_highpage(struct page *page, int pfn, int bad_ppro); 70extern int add_one_highpage(struct page *page, int pfn, int bad_ppro);
71/* need some defines for these for archs that don't support it */
72extern void online_page(struct page *page);
73/* VM interface that may be used by firmware interface */ 71/* VM interface that may be used by firmware interface */
74extern int online_pages(unsigned long, unsigned long); 72extern int online_pages(unsigned long, unsigned long);
75extern void __offline_isolated_pages(unsigned long, unsigned long); 73extern void __offline_isolated_pages(unsigned long, unsigned long);
76 74
75typedef void (*online_page_callback_t)(struct page *page);
76
77extern int set_online_page_callback(online_page_callback_t callback);
78extern int restore_online_page_callback(online_page_callback_t callback);
79
80extern void __online_page_set_limits(struct page *page);
81extern void __online_page_increment_counters(struct page *page);
82extern void __online_page_free(struct page *page);
83
77#ifdef CONFIG_MEMORY_HOTREMOVE 84#ifdef CONFIG_MEMORY_HOTREMOVE
78extern bool is_pageblock_removable_nolock(struct page *page); 85extern bool is_pageblock_removable_nolock(struct page *page);
79#endif /* CONFIG_MEMORY_HOTREMOVE */ 86#endif /* CONFIG_MEMORY_HOTREMOVE */
diff --git a/include/linux/mfd/max8997.h b/include/linux/mfd/max8997.h
index 60931d089422..0bbd13dbe336 100644
--- a/include/linux/mfd/max8997.h
+++ b/include/linux/mfd/max8997.h
@@ -107,11 +107,16 @@ struct max8997_platform_data {
107 unsigned int buck5_voltage[8]; 107 unsigned int buck5_voltage[8];
108 bool buck5_gpiodvs; 108 bool buck5_gpiodvs;
109 109
110 /* ---- Charger control ---- */
111 /* eoc stands for 'end of charge' */
112 int eoc_mA; /* 50 ~ 200mA by 10mA step */
113 /* charge Full Timeout */
114 int timeout; /* 0 (no timeout), 5, 6, 7 hours */
115
110 /* MUIC: Not implemented */ 116 /* MUIC: Not implemented */
111 /* HAPTIC: Not implemented */ 117 /* HAPTIC: Not implemented */
112 /* RTC: Not implemented */ 118 /* RTC: Not implemented */
113 /* Flash: Not implemented */ 119 /* Flash: Not implemented */
114 /* Charger control: Not implemented */
115}; 120};
116 121
117#endif /* __LINUX_MFD_MAX8998_H */ 122#endif /* __LINUX_MFD_MAX8998_H */
diff --git a/include/linux/mfd/max8998.h b/include/linux/mfd/max8998.h
index 61daa167b576..f4f0dfa4698a 100644
--- a/include/linux/mfd/max8998.h
+++ b/include/linux/mfd/max8998.h
@@ -87,6 +87,15 @@ struct max8998_regulator_data {
87 * @wakeup: Allow to wake up from suspend 87 * @wakeup: Allow to wake up from suspend
88 * @rtc_delay: LP3974 RTC chip bug that requires delay after a register 88 * @rtc_delay: LP3974 RTC chip bug that requires delay after a register
89 * write before reading it. 89 * write before reading it.
90 * @eoc: End of Charge Level in percent: 10% ~ 45% by 5% step
91 * If it equals 0, leave it unchanged.
92 * Otherwise, it is a invalid value.
93 * @restart: Restart Level in mV: 100, 150, 200, and -1 for disable.
94 * If it equals 0, leave it unchanged.
95 * Otherwise, it is a invalid value.
96 * @timeout: Full Timeout in hours: 5, 6, 7, and -1 for disable.
97 * If it equals 0, leave it unchanged.
98 * Otherwise, leave it unchanged.
90 */ 99 */
91struct max8998_platform_data { 100struct max8998_platform_data {
92 struct max8998_regulator_data *regulators; 101 struct max8998_regulator_data *regulators;
@@ -107,6 +116,9 @@ struct max8998_platform_data {
107 int buck2_default_idx; 116 int buck2_default_idx;
108 bool wakeup; 117 bool wakeup;
109 bool rtc_delay; 118 bool rtc_delay;
119 int eoc;
120 int restart;
121 int timeout;
110}; 122};
111 123
112#endif /* __LINUX_MFD_MAX8998_H */ 124#endif /* __LINUX_MFD_MAX8998_H */
diff --git a/include/linux/mfd/pm8xxx/rtc.h b/include/linux/mfd/pm8xxx/rtc.h
new file mode 100644
index 000000000000..14f1983eaecc
--- /dev/null
+++ b/include/linux/mfd/pm8xxx/rtc.h
@@ -0,0 +1,25 @@
1/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#ifndef __RTC_PM8XXX_H__
14#define __RTC_PM8XXX_H__
15
16#define PM8XXX_RTC_DEV_NAME "rtc-pm8xxx"
17/**
18 * struct pm8xxx_rtc_pdata - RTC driver platform data
19 * @rtc_write_enable: variable stating RTC write capability
20 */
21struct pm8xxx_rtc_platform_data {
22 bool rtc_write_enable;
23};
24
25#endif /* __RTC_PM8XXX_H__ */
diff --git a/include/linux/mfd/tps65910.h b/include/linux/mfd/tps65910.h
index 8bb85b930c07..73572c65d04f 100644
--- a/include/linux/mfd/tps65910.h
+++ b/include/linux/mfd/tps65910.h
@@ -269,7 +269,7 @@
269#define LDO1_SEL_MASK 0xFC 269#define LDO1_SEL_MASK 0xFC
270#define LDO3_SEL_MASK 0x7C 270#define LDO3_SEL_MASK 0x7C
271#define LDO_MIN_VOLT 1000 271#define LDO_MIN_VOLT 1000
272#define LDO_MAX_VOLT 3300; 272#define LDO_MAX_VOLT 3300
273 273
274 274
275/*Register VDIG1 (0x80) register.RegisterDescription */ 275/*Register VDIG1 (0x80) register.RegisterDescription */
diff --git a/include/linux/mfd/twl4030-codec.h b/include/linux/mfd/twl4030-audio.h
index 5cc16bbd1da1..3d22b72df076 100644
--- a/include/linux/mfd/twl4030-codec.h
+++ b/include/linux/mfd/twl4030-audio.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * MFD driver for twl4030 codec submodule 2 * MFD driver for twl4030 audio submodule
3 * 3 *
4 * Author: Peter Ujfalusi <peter.ujfalusi@ti.com> 4 * Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
5 * 5 *
@@ -259,14 +259,14 @@
259#define TWL4030_VIBRA_DIR_SEL 0x20 259#define TWL4030_VIBRA_DIR_SEL 0x20
260 260
261/* TWL4030 codec resource IDs */ 261/* TWL4030 codec resource IDs */
262enum twl4030_codec_res { 262enum twl4030_audio_res {
263 TWL4030_CODEC_RES_POWER = 0, 263 TWL4030_AUDIO_RES_POWER = 0,
264 TWL4030_CODEC_RES_APLL, 264 TWL4030_AUDIO_RES_APLL,
265 TWL4030_CODEC_RES_MAX, 265 TWL4030_AUDIO_RES_MAX,
266}; 266};
267 267
268int twl4030_codec_disable_resource(enum twl4030_codec_res id); 268int twl4030_audio_disable_resource(enum twl4030_audio_res id);
269int twl4030_codec_enable_resource(enum twl4030_codec_res id); 269int twl4030_audio_enable_resource(enum twl4030_audio_res id);
270unsigned int twl4030_codec_get_mclk(void); 270unsigned int twl4030_audio_get_mclk(void);
271 271
272#endif /* End of __TWL4030_CODEC_H__ */ 272#endif /* End of __TWL4030_CODEC_H__ */
diff --git a/include/linux/mfd/twl6040.h b/include/linux/mfd/twl6040.h
new file mode 100644
index 000000000000..4c806f6d663e
--- /dev/null
+++ b/include/linux/mfd/twl6040.h
@@ -0,0 +1,228 @@
1/*
2 * MFD driver for twl6040
3 *
4 * Authors: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
5 * Misael Lopez Cruz <misael.lopez@ti.com>
6 *
7 * Copyright: (C) 2011 Texas Instruments, Inc.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21 * 02110-1301 USA
22 *
23 */
24
25#ifndef __TWL6040_CODEC_H__
26#define __TWL6040_CODEC_H__
27
28#include <linux/interrupt.h>
29#include <linux/mfd/core.h>
30
31#define TWL6040_REG_ASICID 0x01
32#define TWL6040_REG_ASICREV 0x02
33#define TWL6040_REG_INTID 0x03
34#define TWL6040_REG_INTMR 0x04
35#define TWL6040_REG_NCPCTL 0x05
36#define TWL6040_REG_LDOCTL 0x06
37#define TWL6040_REG_HPPLLCTL 0x07
38#define TWL6040_REG_LPPLLCTL 0x08
39#define TWL6040_REG_LPPLLDIV 0x09
40#define TWL6040_REG_AMICBCTL 0x0A
41#define TWL6040_REG_DMICBCTL 0x0B
42#define TWL6040_REG_MICLCTL 0x0C
43#define TWL6040_REG_MICRCTL 0x0D
44#define TWL6040_REG_MICGAIN 0x0E
45#define TWL6040_REG_LINEGAIN 0x0F
46#define TWL6040_REG_HSLCTL 0x10
47#define TWL6040_REG_HSRCTL 0x11
48#define TWL6040_REG_HSGAIN 0x12
49#define TWL6040_REG_EARCTL 0x13
50#define TWL6040_REG_HFLCTL 0x14
51#define TWL6040_REG_HFLGAIN 0x15
52#define TWL6040_REG_HFRCTL 0x16
53#define TWL6040_REG_HFRGAIN 0x17
54#define TWL6040_REG_VIBCTLL 0x18
55#define TWL6040_REG_VIBDATL 0x19
56#define TWL6040_REG_VIBCTLR 0x1A
57#define TWL6040_REG_VIBDATR 0x1B
58#define TWL6040_REG_HKCTL1 0x1C
59#define TWL6040_REG_HKCTL2 0x1D
60#define TWL6040_REG_GPOCTL 0x1E
61#define TWL6040_REG_ALB 0x1F
62#define TWL6040_REG_DLB 0x20
63#define TWL6040_REG_TRIM1 0x28
64#define TWL6040_REG_TRIM2 0x29
65#define TWL6040_REG_TRIM3 0x2A
66#define TWL6040_REG_HSOTRIM 0x2B
67#define TWL6040_REG_HFOTRIM 0x2C
68#define TWL6040_REG_ACCCTL 0x2D
69#define TWL6040_REG_STATUS 0x2E
70
71#define TWL6040_CACHEREGNUM (TWL6040_REG_STATUS + 1)
72
73#define TWL6040_VIOREGNUM 18
74#define TWL6040_VDDREGNUM 21
75
76/* INTID (0x03) fields */
77
78#define TWL6040_THINT 0x01
79#define TWL6040_PLUGINT 0x02
80#define TWL6040_UNPLUGINT 0x04
81#define TWL6040_HOOKINT 0x08
82#define TWL6040_HFINT 0x10
83#define TWL6040_VIBINT 0x20
84#define TWL6040_READYINT 0x40
85
86/* INTMR (0x04) fields */
87
88#define TWL6040_THMSK 0x01
89#define TWL6040_PLUGMSK 0x02
90#define TWL6040_HOOKMSK 0x08
91#define TWL6040_HFMSK 0x10
92#define TWL6040_VIBMSK 0x20
93#define TWL6040_READYMSK 0x40
94#define TWL6040_ALLINT_MSK 0x7B
95
96/* NCPCTL (0x05) fields */
97
98#define TWL6040_NCPENA 0x01
99#define TWL6040_NCPOPEN 0x40
100
101/* LDOCTL (0x06) fields */
102
103#define TWL6040_LSLDOENA 0x01
104#define TWL6040_HSLDOENA 0x04
105#define TWL6040_REFENA 0x40
106#define TWL6040_OSCENA 0x80
107
108/* HPPLLCTL (0x07) fields */
109
110#define TWL6040_HPLLENA 0x01
111#define TWL6040_HPLLRST 0x02
112#define TWL6040_HPLLBP 0x04
113#define TWL6040_HPLLSQRENA 0x08
114#define TWL6040_MCLK_12000KHZ (0 << 5)
115#define TWL6040_MCLK_19200KHZ (1 << 5)
116#define TWL6040_MCLK_26000KHZ (2 << 5)
117#define TWL6040_MCLK_38400KHZ (3 << 5)
118#define TWL6040_MCLK_MSK 0x60
119
120/* LPPLLCTL (0x08) fields */
121
122#define TWL6040_LPLLENA 0x01
123#define TWL6040_LPLLRST 0x02
124#define TWL6040_LPLLSEL 0x04
125#define TWL6040_LPLLFIN 0x08
126#define TWL6040_HPLLSEL 0x10
127
128/* HSLCTL (0x10) fields */
129
130#define TWL6040_HSDACMODEL 0x02
131#define TWL6040_HSDRVMODEL 0x08
132
133/* HSRCTL (0x11) fields */
134
135#define TWL6040_HSDACMODER 0x02
136#define TWL6040_HSDRVMODER 0x08
137
138/* VIBCTLL (0x18) fields */
139
140#define TWL6040_VIBENAL 0x01
141#define TWL6040_VIBCTRLL 0x04
142#define TWL6040_VIBCTRLLP 0x08
143#define TWL6040_VIBCTRLLN 0x10
144
145/* VIBDATL (0x19) fields */
146
147#define TWL6040_VIBDAT_MAX 0x64
148
149/* VIBCTLR (0x1A) fields */
150
151#define TWL6040_VIBENAR 0x01
152#define TWL6040_VIBCTRLR 0x04
153#define TWL6040_VIBCTRLRP 0x08
154#define TWL6040_VIBCTRLRN 0x10
155
156/* GPOCTL (0x1E) fields */
157
158#define TWL6040_GPO1 0x01
159#define TWL6040_GPO2 0x02
160#define TWL6040_GPO3 0x03
161
162/* ACCCTL (0x2D) fields */
163
164#define TWL6040_I2CSEL 0x01
165#define TWL6040_RESETSPLIT 0x04
166#define TWL6040_INTCLRMODE 0x08
167
168/* STATUS (0x2E) fields */
169
170#define TWL6040_PLUGCOMP 0x02
171#define TWL6040_VIBLOCDET 0x10
172#define TWL6040_VIBROCDET 0x20
173#define TWL6040_TSHUTDET 0x40
174
175#define TWL6040_CELLS 2
176
177#define TWL6040_REV_ES1_0 0x00
178#define TWL6040_REV_ES1_1 0x01
179#define TWL6040_REV_ES1_2 0x02
180
181#define TWL6040_IRQ_TH 0
182#define TWL6040_IRQ_PLUG 1
183#define TWL6040_IRQ_HOOK 2
184#define TWL6040_IRQ_HF 3
185#define TWL6040_IRQ_VIB 4
186#define TWL6040_IRQ_READY 5
187
188/* PLL selection */
189#define TWL6040_SYSCLK_SEL_LPPLL 0
190#define TWL6040_SYSCLK_SEL_HPPLL 1
191
192struct twl6040 {
193 struct device *dev;
194 struct mutex mutex;
195 struct mutex io_mutex;
196 struct mutex irq_mutex;
197 struct mfd_cell cells[TWL6040_CELLS];
198 struct completion ready;
199
200 int audpwron;
201 int power_count;
202 int rev;
203
204 int pll;
205 unsigned int sysclk;
206
207 unsigned int irq;
208 unsigned int irq_base;
209 u8 irq_masks_cur;
210 u8 irq_masks_cache;
211};
212
213int twl6040_reg_read(struct twl6040 *twl6040, unsigned int reg);
214int twl6040_reg_write(struct twl6040 *twl6040, unsigned int reg,
215 u8 val);
216int twl6040_set_bits(struct twl6040 *twl6040, unsigned int reg,
217 u8 mask);
218int twl6040_clear_bits(struct twl6040 *twl6040, unsigned int reg,
219 u8 mask);
220int twl6040_power(struct twl6040 *twl6040, int on);
221int twl6040_set_pll(struct twl6040 *twl6040, int pll_id,
222 unsigned int freq_in, unsigned int freq_out);
223int twl6040_get_pll(struct twl6040 *twl6040);
224unsigned int twl6040_get_sysclk(struct twl6040 *twl6040);
225int twl6040_irq_init(struct twl6040 *twl6040);
226void twl6040_irq_exit(struct twl6040 *twl6040);
227
228#endif /* End of __TWL6040_CODEC_H__ */
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index 387329e02303..53ef894bfa05 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -37,7 +37,7 @@
37#include <linux/completion.h> 37#include <linux/completion.h>
38#include <linux/radix-tree.h> 38#include <linux/radix-tree.h>
39 39
40#include <asm/atomic.h> 40#include <linux/atomic.h>
41 41
42#define MAX_MSIX_P_PORT 17 42#define MAX_MSIX_P_PORT 17
43#define MAX_MSIX 64 43#define MAX_MSIX 64
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 8a45ad22a170..3172a1c0f08e 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -637,7 +637,7 @@ static inline pte_t maybe_mkwrite(pte_t pte, struct vm_area_struct *vma)
637#define SECTIONS_MASK ((1UL << SECTIONS_WIDTH) - 1) 637#define SECTIONS_MASK ((1UL << SECTIONS_WIDTH) - 1)
638#define ZONEID_MASK ((1UL << ZONEID_SHIFT) - 1) 638#define ZONEID_MASK ((1UL << ZONEID_SHIFT) - 1)
639 639
640static inline enum zone_type page_zonenum(struct page *page) 640static inline enum zone_type page_zonenum(const struct page *page)
641{ 641{
642 return (page->flags >> ZONES_PGSHIFT) & ZONES_MASK; 642 return (page->flags >> ZONES_PGSHIFT) & ZONES_MASK;
643} 643}
@@ -665,15 +665,15 @@ static inline int zone_to_nid(struct zone *zone)
665} 665}
666 666
667#ifdef NODE_NOT_IN_PAGE_FLAGS 667#ifdef NODE_NOT_IN_PAGE_FLAGS
668extern int page_to_nid(struct page *page); 668extern int page_to_nid(const struct page *page);
669#else 669#else
670static inline int page_to_nid(struct page *page) 670static inline int page_to_nid(const struct page *page)
671{ 671{
672 return (page->flags >> NODES_PGSHIFT) & NODES_MASK; 672 return (page->flags >> NODES_PGSHIFT) & NODES_MASK;
673} 673}
674#endif 674#endif
675 675
676static inline struct zone *page_zone(struct page *page) 676static inline struct zone *page_zone(const struct page *page)
677{ 677{
678 return &NODE_DATA(page_to_nid(page))->node_zones[page_zonenum(page)]; 678 return &NODE_DATA(page_to_nid(page))->node_zones[page_zonenum(page)];
679} 679}
@@ -718,9 +718,9 @@ static inline void set_page_links(struct page *page, enum zone_type zone,
718 */ 718 */
719#include <linux/vmstat.h> 719#include <linux/vmstat.h>
720 720
721static __always_inline void *lowmem_page_address(struct page *page) 721static __always_inline void *lowmem_page_address(const struct page *page)
722{ 722{
723 return __va(PFN_PHYS(page_to_pfn(page))); 723 return __va(PFN_PHYS(page_to_pfn((struct page *)page)));
724} 724}
725 725
726#if defined(CONFIG_HIGHMEM) && !defined(WANT_PAGE_VIRTUAL) 726#if defined(CONFIG_HIGHMEM) && !defined(WANT_PAGE_VIRTUAL)
@@ -911,6 +911,8 @@ unsigned long unmap_vmas(struct mmu_gather *tlb,
911 * @pte_entry: if set, called for each non-empty PTE (4th-level) entry 911 * @pte_entry: if set, called for each non-empty PTE (4th-level) entry
912 * @pte_hole: if set, called for each hole at all levels 912 * @pte_hole: if set, called for each hole at all levels
913 * @hugetlb_entry: if set, called for each hugetlb entry 913 * @hugetlb_entry: if set, called for each hugetlb entry
914 * *Caution*: The caller must hold mmap_sem() if @hugetlb_entry
915 * is used.
914 * 916 *
915 * (see walk_page_range for more details) 917 * (see walk_page_range for more details)
916 */ 918 */
@@ -986,6 +988,8 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
986int get_user_pages_fast(unsigned long start, int nr_pages, int write, 988int get_user_pages_fast(unsigned long start, int nr_pages, int write,
987 struct page **pages); 989 struct page **pages);
988struct page *get_dump_page(unsigned long addr); 990struct page *get_dump_page(unsigned long addr);
991extern int fixup_user_fault(struct task_struct *tsk, struct mm_struct *mm,
992 unsigned long address, unsigned int fault_flags);
989 993
990extern int try_to_release_page(struct page * page, gfp_t gfp_mask); 994extern int try_to_release_page(struct page * page, gfp_t gfp_mask);
991extern void do_invalidatepage(struct page *page, unsigned long offset); 995extern void do_invalidatepage(struct page *page, unsigned long offset);
@@ -1409,8 +1413,7 @@ extern int do_munmap(struct mm_struct *, unsigned long, size_t);
1409 1413
1410extern unsigned long do_brk(unsigned long, unsigned long); 1414extern unsigned long do_brk(unsigned long, unsigned long);
1411 1415
1412/* filemap.c */ 1416/* truncate.c */
1413extern unsigned long page_unuse(struct page *);
1414extern void truncate_inode_pages(struct address_space *, loff_t); 1417extern void truncate_inode_pages(struct address_space *, loff_t);
1415extern void truncate_inode_pages_range(struct address_space *, 1418extern void truncate_inode_pages_range(struct address_space *,
1416 loff_t lstart, loff_t lend); 1419 loff_t lstart, loff_t lend);
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 027935c86c68..774b8952deb4 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -30,23 +30,61 @@ struct address_space;
30 * moment. Note that we have no way to track which tasks are using 30 * moment. Note that we have no way to track which tasks are using
31 * a page, though if it is a pagecache page, rmap structures can tell us 31 * a page, though if it is a pagecache page, rmap structures can tell us
32 * who is mapping it. 32 * who is mapping it.
33 *
34 * The objects in struct page are organized in double word blocks in
35 * order to allows us to use atomic double word operations on portions
36 * of struct page. That is currently only used by slub but the arrangement
37 * allows the use of atomic double word operations on the flags/mapping
38 * and lru list pointers also.
33 */ 39 */
34struct page { 40struct page {
41 /* First double word block */
35 unsigned long flags; /* Atomic flags, some possibly 42 unsigned long flags; /* Atomic flags, some possibly
36 * updated asynchronously */ 43 * updated asynchronously */
37 atomic_t _count; /* Usage count, see below. */ 44 struct address_space *mapping; /* If low bit clear, points to
38 union { 45 * inode address_space, or NULL.
39 atomic_t _mapcount; /* Count of ptes mapped in mms, 46 * If page mapped as anonymous
40 * to show when page is mapped 47 * memory, low bit is set, and
41 * & limit reverse map searches. 48 * it points to anon_vma object:
49 * see PAGE_MAPPING_ANON below.
42 */ 50 */
43 struct { /* SLUB */ 51 /* Second double word */
44 u16 inuse; 52 struct {
45 u16 objects; 53 union {
54 pgoff_t index; /* Our offset within mapping. */
55 void *freelist; /* slub first free object */
56 };
57
58 union {
59 /* Used for cmpxchg_double in slub */
60 unsigned long counters;
61
62 struct {
63
64 union {
65 atomic_t _mapcount; /* Count of ptes mapped in mms,
66 * to show when page is mapped
67 * & limit reverse map searches.
68 */
69
70 struct {
71 unsigned inuse:16;
72 unsigned objects:15;
73 unsigned frozen:1;
74 };
75 };
76 atomic_t _count; /* Usage count, see below. */
77 };
46 }; 78 };
47 }; 79 };
80
81 /* Third double word block */
82 struct list_head lru; /* Pageout list, eg. active_list
83 * protected by zone->lru_lock !
84 */
85
86 /* Remainder is not double word aligned */
48 union { 87 union {
49 struct {
50 unsigned long private; /* Mapping-private opaque data: 88 unsigned long private; /* Mapping-private opaque data:
51 * usually used for buffer_heads 89 * usually used for buffer_heads
52 * if PagePrivate set; used for 90 * if PagePrivate set; used for
@@ -54,27 +92,13 @@ struct page {
54 * indicates order in the buddy 92 * indicates order in the buddy
55 * system if PG_buddy is set. 93 * system if PG_buddy is set.
56 */ 94 */
57 struct address_space *mapping; /* If low bit clear, points to
58 * inode address_space, or NULL.
59 * If page mapped as anonymous
60 * memory, low bit is set, and
61 * it points to anon_vma object:
62 * see PAGE_MAPPING_ANON below.
63 */
64 };
65#if USE_SPLIT_PTLOCKS 95#if USE_SPLIT_PTLOCKS
66 spinlock_t ptl; 96 spinlock_t ptl;
67#endif 97#endif
68 struct kmem_cache *slab; /* SLUB: Pointer to slab */ 98 struct kmem_cache *slab; /* SLUB: Pointer to slab */
69 struct page *first_page; /* Compound tail pages */ 99 struct page *first_page; /* Compound tail pages */
70 };
71 union {
72 pgoff_t index; /* Our offset within mapping. */
73 void *freelist; /* SLUB: freelist req. slab lock */
74 }; 100 };
75 struct list_head lru; /* Pageout list, eg. active_list 101
76 * protected by zone->lru_lock !
77 */
78 /* 102 /*
79 * On machines where all RAM is mapped into kernel address space, 103 * On machines where all RAM is mapped into kernel address space,
80 * we can simply calculate the virtual address. On machines with 104 * we can simply calculate the virtual address. On machines with
@@ -100,7 +124,16 @@ struct page {
100 */ 124 */
101 void *shadow; 125 void *shadow;
102#endif 126#endif
103}; 127}
128/*
129 * If another subsystem starts using the double word pairing for atomic
130 * operations on struct page then it must change the #if to ensure
131 * proper alignment of the page struct.
132 */
133#if defined(CONFIG_SLUB) && defined(CONFIG_CMPXCHG_LOCAL)
134 __attribute__((__aligned__(2*sizeof(unsigned long))))
135#endif
136;
104 137
105typedef unsigned long __nocast vm_flags_t; 138typedef unsigned long __nocast vm_flags_t;
106 139
diff --git a/include/linux/mman.h b/include/linux/mman.h
index 9872d6ca58ae..8b74e9b1d0ad 100644
--- a/include/linux/mman.h
+++ b/include/linux/mman.h
@@ -14,7 +14,7 @@
14#include <linux/mm.h> 14#include <linux/mm.h>
15#include <linux/percpu_counter.h> 15#include <linux/percpu_counter.h>
16 16
17#include <asm/atomic.h> 17#include <linux/atomic.h>
18 18
19extern int sysctl_overcommit_memory; 19extern int sysctl_overcommit_memory;
20extern int sysctl_overcommit_ratio; 20extern int sysctl_overcommit_ratio;
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 9f7c3ebcbbad..be1ac8d7789b 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -16,7 +16,7 @@
16#include <linux/nodemask.h> 16#include <linux/nodemask.h>
17#include <linux/pageblock-flags.h> 17#include <linux/pageblock-flags.h>
18#include <generated/bounds.h> 18#include <generated/bounds.h>
19#include <asm/atomic.h> 19#include <linux/atomic.h>
20#include <asm/page.h> 20#include <asm/page.h>
21 21
22/* Free memory management - zoned buddy allocator. */ 22/* Free memory management - zoned buddy allocator. */
@@ -158,6 +158,12 @@ static inline int is_unevictable_lru(enum lru_list l)
158 return (l == LRU_UNEVICTABLE); 158 return (l == LRU_UNEVICTABLE);
159} 159}
160 160
161/* Mask used at gathering information at once (see memcontrol.c) */
162#define LRU_ALL_FILE (BIT(LRU_INACTIVE_FILE) | BIT(LRU_ACTIVE_FILE))
163#define LRU_ALL_ANON (BIT(LRU_INACTIVE_ANON) | BIT(LRU_ACTIVE_ANON))
164#define LRU_ALL_EVICTABLE (LRU_ALL_FILE | LRU_ALL_ANON)
165#define LRU_ALL ((1 << NR_LRU_LISTS) - 1)
166
161enum zone_watermarks { 167enum zone_watermarks {
162 WMARK_MIN, 168 WMARK_MIN,
163 WMARK_LOW, 169 WMARK_LOW,
diff --git a/include/linux/mount.h b/include/linux/mount.h
index 604f122a2326..33fe53d78110 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -14,7 +14,7 @@
14#include <linux/nodemask.h> 14#include <linux/nodemask.h>
15#include <linux/spinlock.h> 15#include <linux/spinlock.h>
16#include <linux/seqlock.h> 16#include <linux/seqlock.h>
17#include <asm/atomic.h> 17#include <linux/atomic.h>
18 18
19struct super_block; 19struct super_block;
20struct vfsmount; 20struct vfsmount;
diff --git a/include/linux/mutex.h b/include/linux/mutex.h
index 7f87217e9d1f..9121595a8ebf 100644
--- a/include/linux/mutex.h
+++ b/include/linux/mutex.h
@@ -15,7 +15,7 @@
15#include <linux/linkage.h> 15#include <linux/linkage.h>
16#include <linux/lockdep.h> 16#include <linux/lockdep.h>
17 17
18#include <asm/atomic.h> 18#include <linux/atomic.h>
19 19
20/* 20/*
21 * Simple, straightforward mutexes with strict semantics: 21 * Simple, straightforward mutexes with strict semantics:
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 34f3abc6457a..ddee79bb8f15 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -34,7 +34,7 @@
34#include <linux/pm_qos_params.h> 34#include <linux/pm_qos_params.h>
35#include <linux/timer.h> 35#include <linux/timer.h>
36#include <linux/delay.h> 36#include <linux/delay.h>
37#include <asm/atomic.h> 37#include <linux/atomic.h>
38#include <asm/cache.h> 38#include <asm/cache.h>
39#include <asm/byteorder.h> 39#include <asm/byteorder.h>
40 40
@@ -1132,7 +1132,7 @@ struct net_device {
1132 spinlock_t addr_list_lock; 1132 spinlock_t addr_list_lock;
1133 struct netdev_hw_addr_list uc; /* Unicast mac addresses */ 1133 struct netdev_hw_addr_list uc; /* Unicast mac addresses */
1134 struct netdev_hw_addr_list mc; /* Multicast mac addresses */ 1134 struct netdev_hw_addr_list mc; /* Multicast mac addresses */
1135 int uc_promisc; 1135 bool uc_promisc;
1136 unsigned int promiscuity; 1136 unsigned int promiscuity;
1137 unsigned int allmulti; 1137 unsigned int allmulti;
1138 1138
@@ -1521,6 +1521,39 @@ struct packet_type {
1521 1521
1522#include <linux/notifier.h> 1522#include <linux/notifier.h>
1523 1523
1524/* netdevice notifier chain. Please remember to update the rtnetlink
1525 * notification exclusion list in rtnetlink_event() when adding new
1526 * types.
1527 */
1528#define NETDEV_UP 0x0001 /* For now you can't veto a device up/down */
1529#define NETDEV_DOWN 0x0002
1530#define NETDEV_REBOOT 0x0003 /* Tell a protocol stack a network interface
1531 detected a hardware crash and restarted
1532 - we can use this eg to kick tcp sessions
1533 once done */
1534#define NETDEV_CHANGE 0x0004 /* Notify device state change */
1535#define NETDEV_REGISTER 0x0005
1536#define NETDEV_UNREGISTER 0x0006
1537#define NETDEV_CHANGEMTU 0x0007
1538#define NETDEV_CHANGEADDR 0x0008
1539#define NETDEV_GOING_DOWN 0x0009
1540#define NETDEV_CHANGENAME 0x000A
1541#define NETDEV_FEAT_CHANGE 0x000B
1542#define NETDEV_BONDING_FAILOVER 0x000C
1543#define NETDEV_PRE_UP 0x000D
1544#define NETDEV_PRE_TYPE_CHANGE 0x000E
1545#define NETDEV_POST_TYPE_CHANGE 0x000F
1546#define NETDEV_POST_INIT 0x0010
1547#define NETDEV_UNREGISTER_BATCH 0x0011
1548#define NETDEV_RELEASE 0x0012
1549#define NETDEV_NOTIFY_PEERS 0x0013
1550#define NETDEV_JOIN 0x0014
1551
1552extern int register_netdevice_notifier(struct notifier_block *nb);
1553extern int unregister_netdevice_notifier(struct notifier_block *nb);
1554extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev);
1555
1556
1524extern rwlock_t dev_base_lock; /* Device list lock */ 1557extern rwlock_t dev_base_lock; /* Device list lock */
1525 1558
1526 1559
@@ -1603,12 +1636,9 @@ static inline void unregister_netdevice(struct net_device *dev)
1603extern int netdev_refcnt_read(const struct net_device *dev); 1636extern int netdev_refcnt_read(const struct net_device *dev);
1604extern void free_netdev(struct net_device *dev); 1637extern void free_netdev(struct net_device *dev);
1605extern void synchronize_net(void); 1638extern void synchronize_net(void);
1606extern int register_netdevice_notifier(struct notifier_block *nb);
1607extern int unregister_netdevice_notifier(struct notifier_block *nb);
1608extern int init_dummy_netdev(struct net_device *dev); 1639extern int init_dummy_netdev(struct net_device *dev);
1609extern void netdev_resync_ops(struct net_device *dev); 1640extern void netdev_resync_ops(struct net_device *dev);
1610 1641
1611extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev);
1612extern struct net_device *dev_get_by_index(struct net *net, int ifindex); 1642extern struct net_device *dev_get_by_index(struct net *net, int ifindex);
1613extern struct net_device *__dev_get_by_index(struct net *net, int ifindex); 1643extern struct net_device *__dev_get_by_index(struct net *net, int ifindex);
1614extern struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex); 1644extern struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex);
@@ -1649,9 +1679,12 @@ static inline int skb_gro_header_hard(struct sk_buff *skb, unsigned int hlen)
1649static inline void *skb_gro_header_slow(struct sk_buff *skb, unsigned int hlen, 1679static inline void *skb_gro_header_slow(struct sk_buff *skb, unsigned int hlen,
1650 unsigned int offset) 1680 unsigned int offset)
1651{ 1681{
1682 if (!pskb_may_pull(skb, hlen))
1683 return NULL;
1684
1652 NAPI_GRO_CB(skb)->frag0 = NULL; 1685 NAPI_GRO_CB(skb)->frag0 = NULL;
1653 NAPI_GRO_CB(skb)->frag0_len = 0; 1686 NAPI_GRO_CB(skb)->frag0_len = 0;
1654 return pskb_may_pull(skb, hlen) ? skb->data + offset : NULL; 1687 return skb->data + offset;
1655} 1688}
1656 1689
1657static inline void *skb_gro_mac_header(struct sk_buff *skb) 1690static inline void *skb_gro_mac_header(struct sk_buff *skb)
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index cc03fc1dfb72..82fdfc7987d6 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -7,7 +7,7 @@
7#include <linux/nfs_xdr.h> 7#include <linux/nfs_xdr.h>
8#include <linux/sunrpc/xprt.h> 8#include <linux/sunrpc/xprt.h>
9 9
10#include <asm/atomic.h> 10#include <linux/atomic.h>
11 11
12struct nfs4_session; 12struct nfs4_session;
13struct nfs_iostats; 13struct nfs_iostats;
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h
index 84058ec69390..8a31a20efe7e 100644
--- a/include/linux/nfsd/export.h
+++ b/include/linux/nfsd/export.h
@@ -133,8 +133,6 @@ __be32 check_nfsd_access(struct svc_export *exp, struct svc_rqst *rqstp);
133int nfsd_export_init(void); 133int nfsd_export_init(void);
134void nfsd_export_shutdown(void); 134void nfsd_export_shutdown(void);
135void nfsd_export_flush(void); 135void nfsd_export_flush(void);
136void exp_readlock(void);
137void exp_readunlock(void);
138struct svc_export * rqst_exp_get_by_name(struct svc_rqst *, 136struct svc_export * rqst_exp_get_by_name(struct svc_rqst *,
139 struct path *); 137 struct path *);
140struct svc_export * rqst_exp_parent(struct svc_rqst *, 138struct svc_export * rqst_exp_parent(struct svc_rqst *,
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 8cb025a00094..8ad70dcac3f9 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -6,7 +6,7 @@
6 * Copyright 2006-2010 Johannes Berg <johannes@sipsolutions.net> 6 * Copyright 2006-2010 Johannes Berg <johannes@sipsolutions.net>
7 * Copyright 2008 Michael Wu <flamingice@sourmilk.net> 7 * Copyright 2008 Michael Wu <flamingice@sourmilk.net>
8 * Copyright 2008 Luis Carlos Cobo <luisca@cozybit.com> 8 * Copyright 2008 Luis Carlos Cobo <luisca@cozybit.com>
9 * Copyright 2008 Michael Buesch <mb@bu3sch.de> 9 * Copyright 2008 Michael Buesch <m@bues.ch>
10 * Copyright 2008, 2009 Luis R. Rodriguez <lrodriguez@atheros.com> 10 * Copyright 2008, 2009 Luis R. Rodriguez <lrodriguez@atheros.com>
11 * Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com> 11 * Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com>
12 * Copyright 2008 Colin McCabe <colin@cozybit.com> 12 * Copyright 2008 Colin McCabe <colin@cozybit.com>
@@ -756,8 +756,12 @@ enum nl80211_commands {
756 * 756 *
757 * @NL80211_ATTR_MAX_NUM_SCAN_SSIDS: number of SSIDs you can scan with 757 * @NL80211_ATTR_MAX_NUM_SCAN_SSIDS: number of SSIDs you can scan with
758 * a single scan request, a wiphy attribute. 758 * a single scan request, a wiphy attribute.
759 * @NL80211_ATTR_MAX_NUM_SCHED_SCAN_SSIDS: number of SSIDs you can
760 * scan with a single scheduled scan request, a wiphy attribute.
759 * @NL80211_ATTR_MAX_SCAN_IE_LEN: maximum length of information elements 761 * @NL80211_ATTR_MAX_SCAN_IE_LEN: maximum length of information elements
760 * that can be added to a scan request 762 * that can be added to a scan request
763 * @NL80211_ATTR_MAX_SCHED_SCAN_IE_LEN: maximum length of information
764 * elements that can be added to a scheduled scan request
761 * 765 *
762 * @NL80211_ATTR_SCAN_FREQUENCIES: nested attribute with frequencies (in MHz) 766 * @NL80211_ATTR_SCAN_FREQUENCIES: nested attribute with frequencies (in MHz)
763 * @NL80211_ATTR_SCAN_SSIDS: nested attribute with SSIDs, leave out for passive 767 * @NL80211_ATTR_SCAN_SSIDS: nested attribute with SSIDs, leave out for passive
@@ -989,8 +993,8 @@ enum nl80211_commands {
989 * driving the peer link management state machine. 993 * driving the peer link management state machine.
990 * @NL80211_MESH_SETUP_USERSPACE_AMPE must be enabled. 994 * @NL80211_MESH_SETUP_USERSPACE_AMPE must be enabled.
991 * 995 *
992 * @NL80211_ATTR_WOWLAN_SUPPORTED: indicates, as part of the wiphy capabilities, 996 * @NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED: indicates, as part of the wiphy
993 * the supported WoWLAN triggers 997 * capabilities, the supported WoWLAN triggers
994 * @NL80211_ATTR_WOWLAN_TRIGGERS: used by %NL80211_CMD_SET_WOWLAN to 998 * @NL80211_ATTR_WOWLAN_TRIGGERS: used by %NL80211_CMD_SET_WOWLAN to
995 * indicate which WoW triggers should be enabled. This is also 999 * indicate which WoW triggers should be enabled. This is also
996 * used by %NL80211_CMD_GET_WOWLAN to get the currently enabled WoWLAN 1000 * used by %NL80211_CMD_GET_WOWLAN to get the currently enabled WoWLAN
@@ -1010,6 +1014,11 @@ enum nl80211_commands {
1010 * @%NL80211_ATTR_REKEY_DATA: nested attribute containing the information 1014 * @%NL80211_ATTR_REKEY_DATA: nested attribute containing the information
1011 * necessary for GTK rekeying in the device, see &enum nl80211_rekey_data. 1015 * necessary for GTK rekeying in the device, see &enum nl80211_rekey_data.
1012 * 1016 *
1017 * @NL80211_ATTR_SCAN_SUPP_RATES: rates per to be advertised as supported in scan,
1018 * nested array attribute containing an entry for each band, with the entry
1019 * being a list of supported rates as defined by IEEE 802.11 7.3.2.2 but
1020 * without the length restriction (at most %NL80211_MAX_SUPP_RATES).
1021 *
1013 * @NL80211_ATTR_MAX: highest attribute number currently defined 1022 * @NL80211_ATTR_MAX: highest attribute number currently defined
1014 * @__NL80211_ATTR_AFTER_LAST: internal use 1023 * @__NL80211_ATTR_AFTER_LAST: internal use
1015 */ 1024 */
@@ -1210,6 +1219,11 @@ enum nl80211_attrs {
1210 1219
1211 NL80211_ATTR_REKEY_DATA, 1220 NL80211_ATTR_REKEY_DATA,
1212 1221
1222 NL80211_ATTR_MAX_NUM_SCHED_SCAN_SSIDS,
1223 NL80211_ATTR_MAX_SCHED_SCAN_IE_LEN,
1224
1225 NL80211_ATTR_SCAN_SUPP_RATES,
1226
1213 /* add attributes here, update the policy in nl80211.c */ 1227 /* add attributes here, update the policy in nl80211.c */
1214 1228
1215 __NL80211_ATTR_AFTER_LAST, 1229 __NL80211_ATTR_AFTER_LAST,
@@ -2255,6 +2269,16 @@ struct nl80211_wowlan_pattern_support {
2255 * 2269 *
2256 * In %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, it is a binary attribute 2270 * In %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, it is a binary attribute
2257 * carrying a &struct nl80211_wowlan_pattern_support. 2271 * carrying a &struct nl80211_wowlan_pattern_support.
2272 * @NL80211_WOWLAN_TRIG_GTK_REKEY_SUPPORTED: Not a real trigger, and cannot be
2273 * used when setting, used only to indicate that GTK rekeying is supported
2274 * by the device (flag)
2275 * @NL80211_WOWLAN_TRIG_GTK_REKEY_FAILURE: wake up on GTK rekey failure (if
2276 * done by the device) (flag)
2277 * @NL80211_WOWLAN_TRIG_EAP_IDENT_REQUEST: wake up on EAP Identity Request
2278 * packet (flag)
2279 * @NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE: wake up on 4-way handshake (flag)
2280 * @NL80211_WOWLAN_TRIG_RFKILL_RELEASE: wake up when rfkill is released
2281 * (on devices that have rfkill in the device) (flag)
2258 * @NUM_NL80211_WOWLAN_TRIG: number of wake on wireless triggers 2282 * @NUM_NL80211_WOWLAN_TRIG: number of wake on wireless triggers
2259 * @MAX_NL80211_WOWLAN_TRIG: highest wowlan trigger attribute number 2283 * @MAX_NL80211_WOWLAN_TRIG: highest wowlan trigger attribute number
2260 */ 2284 */
@@ -2264,6 +2288,11 @@ enum nl80211_wowlan_triggers {
2264 NL80211_WOWLAN_TRIG_DISCONNECT, 2288 NL80211_WOWLAN_TRIG_DISCONNECT,
2265 NL80211_WOWLAN_TRIG_MAGIC_PKT, 2289 NL80211_WOWLAN_TRIG_MAGIC_PKT,
2266 NL80211_WOWLAN_TRIG_PKT_PATTERN, 2290 NL80211_WOWLAN_TRIG_PKT_PATTERN,
2291 NL80211_WOWLAN_TRIG_GTK_REKEY_SUPPORTED,
2292 NL80211_WOWLAN_TRIG_GTK_REKEY_FAILURE,
2293 NL80211_WOWLAN_TRIG_EAP_IDENT_REQUEST,
2294 NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE,
2295 NL80211_WOWLAN_TRIG_RFKILL_RELEASE,
2267 2296
2268 /* keep last */ 2297 /* keep last */
2269 NUM_NL80211_WOWLAN_TRIG, 2298 NUM_NL80211_WOWLAN_TRIG,
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h
index dba35e413371..7afc36334d52 100644
--- a/include/linux/nodemask.h
+++ b/include/linux/nodemask.h
@@ -66,6 +66,8 @@
66 * int num_online_nodes() Number of online Nodes 66 * int num_online_nodes() Number of online Nodes
67 * int num_possible_nodes() Number of all possible Nodes 67 * int num_possible_nodes() Number of all possible Nodes
68 * 68 *
69 * int node_random(mask) Random node with set bit in mask
70 *
69 * int node_online(node) Is some node online? 71 * int node_online(node) Is some node online?
70 * int node_possible(node) Is some node possible? 72 * int node_possible(node) Is some node possible?
71 * 73 *
@@ -430,6 +432,7 @@ static inline void node_set_offline(int nid)
430 node_clear_state(nid, N_ONLINE); 432 node_clear_state(nid, N_ONLINE);
431 nr_online_nodes = num_node_state(N_ONLINE); 433 nr_online_nodes = num_node_state(N_ONLINE);
432} 434}
435
433#else 436#else
434 437
435static inline int node_state(int node, enum node_states state) 438static inline int node_state(int node, enum node_states state)
@@ -460,6 +463,16 @@ static inline int num_node_state(enum node_states state)
460 463
461#define node_set_online(node) node_set_state((node), N_ONLINE) 464#define node_set_online(node) node_set_state((node), N_ONLINE)
462#define node_set_offline(node) node_clear_state((node), N_ONLINE) 465#define node_set_offline(node) node_clear_state((node), N_ONLINE)
466
467#endif
468
469#if defined(CONFIG_NUMA) && (MAX_NUMNODES > 1)
470extern int node_random(const nodemask_t *maskp);
471#else
472static inline int node_random(const nodemask_t *mask)
473{
474 return 0;
475}
463#endif 476#endif
464 477
465#define node_online_map node_states[N_ONLINE] 478#define node_online_map node_states[N_ONLINE]
diff --git a/include/linux/notifier.h b/include/linux/notifier.h
index c0688b0168b3..d65746efc954 100644
--- a/include/linux/notifier.h
+++ b/include/linux/notifier.h
@@ -185,80 +185,17 @@ static inline int notifier_to_errno(int ret)
185 * VC switch chains (for loadable kernel svgalib VC switch helpers) etc... 185 * VC switch chains (for loadable kernel svgalib VC switch helpers) etc...
186 */ 186 */
187 187
188/* netdevice notifier chain. Please remember to update the rtnetlink 188/* CPU notfiers are defined in include/linux/cpu.h. */
189 * notification exclusion list in rtnetlink_event() when adding new
190 * types.
191 */
192#define NETDEV_UP 0x0001 /* For now you can't veto a device up/down */
193#define NETDEV_DOWN 0x0002
194#define NETDEV_REBOOT 0x0003 /* Tell a protocol stack a network interface
195 detected a hardware crash and restarted
196 - we can use this eg to kick tcp sessions
197 once done */
198#define NETDEV_CHANGE 0x0004 /* Notify device state change */
199#define NETDEV_REGISTER 0x0005
200#define NETDEV_UNREGISTER 0x0006
201#define NETDEV_CHANGEMTU 0x0007
202#define NETDEV_CHANGEADDR 0x0008
203#define NETDEV_GOING_DOWN 0x0009
204#define NETDEV_CHANGENAME 0x000A
205#define NETDEV_FEAT_CHANGE 0x000B
206#define NETDEV_BONDING_FAILOVER 0x000C
207#define NETDEV_PRE_UP 0x000D
208#define NETDEV_PRE_TYPE_CHANGE 0x000E
209#define NETDEV_POST_TYPE_CHANGE 0x000F
210#define NETDEV_POST_INIT 0x0010
211#define NETDEV_UNREGISTER_BATCH 0x0011
212#define NETDEV_RELEASE 0x0012
213#define NETDEV_NOTIFY_PEERS 0x0013
214#define NETDEV_JOIN 0x0014
215
216#define SYS_DOWN 0x0001 /* Notify of system down */
217#define SYS_RESTART SYS_DOWN
218#define SYS_HALT 0x0002 /* Notify of system halt */
219#define SYS_POWER_OFF 0x0003 /* Notify of system power off */
220 189
221#define NETLINK_URELEASE 0x0001 /* Unicast netlink socket released */ 190/* netdevice notifiers are defined in include/linux/netdevice.h */
222 191
223#define CPU_ONLINE 0x0002 /* CPU (unsigned)v is up */ 192/* reboot notifiers are defined in include/linux/reboot.h. */
224#define CPU_UP_PREPARE 0x0003 /* CPU (unsigned)v coming up */
225#define CPU_UP_CANCELED 0x0004 /* CPU (unsigned)v NOT coming up */
226#define CPU_DOWN_PREPARE 0x0005 /* CPU (unsigned)v going down */
227#define CPU_DOWN_FAILED 0x0006 /* CPU (unsigned)v NOT going down */
228#define CPU_DEAD 0x0007 /* CPU (unsigned)v dead */
229#define CPU_DYING 0x0008 /* CPU (unsigned)v not running any task,
230 * not handling interrupts, soon dead.
231 * Called on the dying cpu, interrupts
232 * are already disabled. Must not
233 * sleep, must not fail */
234#define CPU_POST_DEAD 0x0009 /* CPU (unsigned)v dead, cpu_hotplug
235 * lock is dropped */
236#define CPU_STARTING 0x000A /* CPU (unsigned)v soon running.
237 * Called on the new cpu, just before
238 * enabling interrupts. Must not sleep,
239 * must not fail */
240 193
241/* Used for CPU hotplug events occurring while tasks are frozen due to a suspend 194/* Hibernation and suspend events are defined in include/linux/suspend.h. */
242 * operation in progress
243 */
244#define CPU_TASKS_FROZEN 0x0010
245 195
246#define CPU_ONLINE_FROZEN (CPU_ONLINE | CPU_TASKS_FROZEN) 196/* Virtual Terminal events are defined in include/linux/vt.h. */
247#define CPU_UP_PREPARE_FROZEN (CPU_UP_PREPARE | CPU_TASKS_FROZEN)
248#define CPU_UP_CANCELED_FROZEN (CPU_UP_CANCELED | CPU_TASKS_FROZEN)
249#define CPU_DOWN_PREPARE_FROZEN (CPU_DOWN_PREPARE | CPU_TASKS_FROZEN)
250#define CPU_DOWN_FAILED_FROZEN (CPU_DOWN_FAILED | CPU_TASKS_FROZEN)
251#define CPU_DEAD_FROZEN (CPU_DEAD | CPU_TASKS_FROZEN)
252#define CPU_DYING_FROZEN (CPU_DYING | CPU_TASKS_FROZEN)
253#define CPU_STARTING_FROZEN (CPU_STARTING | CPU_TASKS_FROZEN)
254 197
255/* Hibernation and suspend events */ 198#define NETLINK_URELEASE 0x0001 /* Unicast netlink socket released */
256#define PM_HIBERNATION_PREPARE 0x0001 /* Going to hibernate */
257#define PM_POST_HIBERNATION 0x0002 /* Hibernation finished */
258#define PM_SUSPEND_PREPARE 0x0003 /* Going to suspend the system */
259#define PM_POST_SUSPEND 0x0004 /* Suspend finished */
260#define PM_RESTORE_PREPARE 0x0005 /* Going to restore a saved image */
261#define PM_POST_RESTORE 0x0006 /* Restore failed */
262 199
263/* Console keyboard events. 200/* Console keyboard events.
264 * Note: KBD_KEYCODE is always sent before KBD_UNBOUND_KEYCODE, KBD_UNICODE and 201 * Note: KBD_KEYCODE is always sent before KBD_UNBOUND_KEYCODE, KBD_UNICODE and
@@ -271,12 +208,5 @@ static inline int notifier_to_errno(int ret)
271 208
272extern struct blocking_notifier_head reboot_notifier_list; 209extern struct blocking_notifier_head reboot_notifier_list;
273 210
274/* Virtual Terminal events. */
275#define VT_ALLOCATE 0x0001 /* Console got allocated */
276#define VT_DEALLOCATE 0x0002 /* Console will be deallocated */
277#define VT_WRITE 0x0003 /* A char got output */
278#define VT_UPDATE 0x0004 /* A bigger update occurred */
279#define VT_PREWRITE 0x0005 /* A char is about to be written to the console */
280
281#endif /* __KERNEL__ */ 211#endif /* __KERNEL__ */
282#endif /* _LINUX_NOTIFIER_H */ 212#endif /* _LINUX_NOTIFIER_H */
diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h
index e6955f5d1f08..cd2e61ce4e83 100644
--- a/include/linux/of_irq.h
+++ b/include/linux/of_irq.h
@@ -63,6 +63,9 @@ extern int of_irq_map_one(struct device_node *device, int index,
63extern unsigned int irq_create_of_mapping(struct device_node *controller, 63extern unsigned int irq_create_of_mapping(struct device_node *controller,
64 const u32 *intspec, 64 const u32 *intspec,
65 unsigned int intsize); 65 unsigned int intsize);
66#ifdef CONFIG_IRQ_DOMAIN
67extern void irq_dispose_mapping(unsigned int irq);
68#endif
66extern int of_irq_to_resource(struct device_node *dev, int index, 69extern int of_irq_to_resource(struct device_node *dev, int index,
67 struct resource *r); 70 struct resource *r);
68extern int of_irq_count(struct device_node *dev); 71extern int of_irq_count(struct device_node *dev);
@@ -70,6 +73,7 @@ extern int of_irq_to_resource_table(struct device_node *dev,
70 struct resource *res, int nr_irqs); 73 struct resource *res, int nr_irqs);
71extern struct device_node *of_irq_find_parent(struct device_node *child); 74extern struct device_node *of_irq_find_parent(struct device_node *child);
72 75
76
73#endif /* CONFIG_OF_IRQ */ 77#endif /* CONFIG_OF_IRQ */
74#endif /* CONFIG_OF */ 78#endif /* CONFIG_OF */
75#endif /* __OF_IRQ_H */ 79#endif /* __OF_IRQ_H */
diff --git a/include/linux/of_net.h b/include/linux/of_net.h
index e913081fb52a..f47464188710 100644
--- a/include/linux/of_net.h
+++ b/include/linux/of_net.h
@@ -9,6 +9,7 @@
9 9
10#ifdef CONFIG_OF_NET 10#ifdef CONFIG_OF_NET
11#include <linux/of.h> 11#include <linux/of.h>
12extern const int of_get_phy_mode(struct device_node *np);
12extern const void *of_get_mac_address(struct device_node *np); 13extern const void *of_get_mac_address(struct device_node *np);
13#endif 14#endif
14 15
diff --git a/include/linux/oom.h b/include/linux/oom.h
index 4952fb874ad3..13b7b02e599a 100644
--- a/include/linux/oom.h
+++ b/include/linux/oom.h
@@ -64,10 +64,6 @@ static inline void oom_killer_enable(void)
64 oom_killer_disabled = false; 64 oom_killer_disabled = false;
65} 65}
66 66
67/* The badness from the OOM killer */
68extern unsigned long badness(struct task_struct *p, struct mem_cgroup *mem,
69 const nodemask_t *nodemask, unsigned long uptime);
70
71extern struct task_struct *find_lock_task_mm(struct task_struct *p); 67extern struct task_struct *find_lock_task_mm(struct task_struct *p);
72 68
73/* sysctls */ 69/* sysctls */
diff --git a/include/linux/oprofile.h b/include/linux/oprofile.h
index 7f5cfd3b37dd..49c8727eeb57 100644
--- a/include/linux/oprofile.h
+++ b/include/linux/oprofile.h
@@ -18,7 +18,7 @@
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/errno.h> 19#include <linux/errno.h>
20#include <linux/printk.h> 20#include <linux/printk.h>
21#include <asm/atomic.h> 21#include <linux/atomic.h>
22 22
23/* Each escaped entry is prefixed by ESCAPE_CODE 23/* Each escaped entry is prefixed by ESCAPE_CODE
24 * then one of the following codes, then the 24 * then one of the following codes, then the
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 6081493db68f..e90a673be67e 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -124,9 +124,6 @@ enum pageflags {
124 124
125 /* SLOB */ 125 /* SLOB */
126 PG_slob_free = PG_private, 126 PG_slob_free = PG_private,
127
128 /* SLUB */
129 PG_slub_frozen = PG_active,
130}; 127};
131 128
132#ifndef __GENERATING_BOUNDS_H 129#ifndef __GENERATING_BOUNDS_H
@@ -135,7 +132,7 @@ enum pageflags {
135 * Macros to create function definitions for page flags 132 * Macros to create function definitions for page flags
136 */ 133 */
137#define TESTPAGEFLAG(uname, lname) \ 134#define TESTPAGEFLAG(uname, lname) \
138static inline int Page##uname(struct page *page) \ 135static inline int Page##uname(const struct page *page) \
139 { return test_bit(PG_##lname, &page->flags); } 136 { return test_bit(PG_##lname, &page->flags); }
140 137
141#define SETPAGEFLAG(uname, lname) \ 138#define SETPAGEFLAG(uname, lname) \
@@ -173,7 +170,7 @@ static inline int __TestClearPage##uname(struct page *page) \
173 __SETPAGEFLAG(uname, lname) __CLEARPAGEFLAG(uname, lname) 170 __SETPAGEFLAG(uname, lname) __CLEARPAGEFLAG(uname, lname)
174 171
175#define PAGEFLAG_FALSE(uname) \ 172#define PAGEFLAG_FALSE(uname) \
176static inline int Page##uname(struct page *page) \ 173static inline int Page##uname(const struct page *page) \
177 { return 0; } 174 { return 0; }
178 175
179#define TESTSCFLAG(uname, lname) \ 176#define TESTSCFLAG(uname, lname) \
@@ -212,8 +209,6 @@ PAGEFLAG(SwapBacked, swapbacked) __CLEARPAGEFLAG(SwapBacked, swapbacked)
212 209
213__PAGEFLAG(SlobFree, slob_free) 210__PAGEFLAG(SlobFree, slob_free)
214 211
215__PAGEFLAG(SlubFrozen, slub_frozen)
216
217/* 212/*
218 * Private page markings that may be used by the filesystem that owns the page 213 * Private page markings that may be used by the filesystem that owns the page
219 * for its own purposes. 214 * for its own purposes.
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 8e38d4c140ff..cfaaa6949b8b 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -255,26 +255,24 @@ static inline struct page *grab_cache_page(struct address_space *mapping,
255extern struct page * grab_cache_page_nowait(struct address_space *mapping, 255extern struct page * grab_cache_page_nowait(struct address_space *mapping,
256 pgoff_t index); 256 pgoff_t index);
257extern struct page * read_cache_page_async(struct address_space *mapping, 257extern struct page * read_cache_page_async(struct address_space *mapping,
258 pgoff_t index, filler_t *filler, 258 pgoff_t index, filler_t *filler, void *data);
259 void *data);
260extern struct page * read_cache_page(struct address_space *mapping, 259extern struct page * read_cache_page(struct address_space *mapping,
261 pgoff_t index, filler_t *filler, 260 pgoff_t index, filler_t *filler, void *data);
262 void *data);
263extern struct page * read_cache_page_gfp(struct address_space *mapping, 261extern struct page * read_cache_page_gfp(struct address_space *mapping,
264 pgoff_t index, gfp_t gfp_mask); 262 pgoff_t index, gfp_t gfp_mask);
265extern int read_cache_pages(struct address_space *mapping, 263extern int read_cache_pages(struct address_space *mapping,
266 struct list_head *pages, filler_t *filler, void *data); 264 struct list_head *pages, filler_t *filler, void *data);
267 265
268static inline struct page *read_mapping_page_async( 266static inline struct page *read_mapping_page_async(
269 struct address_space *mapping, 267 struct address_space *mapping,
270 pgoff_t index, void *data) 268 pgoff_t index, void *data)
271{ 269{
272 filler_t *filler = (filler_t *)mapping->a_ops->readpage; 270 filler_t *filler = (filler_t *)mapping->a_ops->readpage;
273 return read_cache_page_async(mapping, index, filler, data); 271 return read_cache_page_async(mapping, index, filler, data);
274} 272}
275 273
276static inline struct page *read_mapping_page(struct address_space *mapping, 274static inline struct page *read_mapping_page(struct address_space *mapping,
277 pgoff_t index, void *data) 275 pgoff_t index, void *data)
278{ 276{
279 filler_t *filler = (filler_t *)mapping->a_ops->readpage; 277 filler_t *filler = (filler_t *)mapping->a_ops->readpage;
280 return read_cache_page(mapping, index, filler, data); 278 return read_cache_page(mapping, index, filler, data);
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 4e4203a96312..f27893b3b724 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -49,7 +49,7 @@
49#include <linux/compiler.h> 49#include <linux/compiler.h>
50#include <linux/errno.h> 50#include <linux/errno.h>
51#include <linux/kobject.h> 51#include <linux/kobject.h>
52#include <asm/atomic.h> 52#include <linux/atomic.h>
53#include <linux/device.h> 53#include <linux/device.h>
54#include <linux/io.h> 54#include <linux/io.h>
55#include <linux/irqreturn.h> 55#include <linux/irqreturn.h>
@@ -843,8 +843,8 @@ void pci_enable_ido(struct pci_dev *dev, unsigned long type);
843void pci_disable_ido(struct pci_dev *dev, unsigned long type); 843void pci_disable_ido(struct pci_dev *dev, unsigned long type);
844 844
845enum pci_obff_signal_type { 845enum pci_obff_signal_type {
846 PCI_EXP_OBFF_SIGNAL_L0, 846 PCI_EXP_OBFF_SIGNAL_L0 = 0,
847 PCI_EXP_OBFF_SIGNAL_ALWAYS, 847 PCI_EXP_OBFF_SIGNAL_ALWAYS = 1,
848}; 848};
849int pci_enable_obff(struct pci_dev *dev, enum pci_obff_signal_type); 849int pci_enable_obff(struct pci_dev *dev, enum pci_obff_signal_type);
850void pci_disable_obff(struct pci_dev *dev); 850void pci_disable_obff(struct pci_dev *dev);
@@ -879,7 +879,7 @@ void pdev_enable_device(struct pci_dev *);
879void pdev_sort_resources(struct pci_dev *, struct resource_list *); 879void pdev_sort_resources(struct pci_dev *, struct resource_list *);
880int pci_enable_resources(struct pci_dev *, int mask); 880int pci_enable_resources(struct pci_dev *, int mask);
881void pci_fixup_irqs(u8 (*)(struct pci_dev *, u8 *), 881void pci_fixup_irqs(u8 (*)(struct pci_dev *, u8 *),
882 int (*)(struct pci_dev *, u8, u8)); 882 int (*)(const struct pci_dev *, u8, u8));
883#define HAVE_PCI_REQ_REGIONS 2 883#define HAVE_PCI_REQ_REGIONS 2
884int __must_check pci_request_regions(struct pci_dev *, const char *); 884int __must_check pci_request_regions(struct pci_dev *, const char *);
885int __must_check pci_request_regions_exclusive(struct pci_dev *, const char *); 885int __must_check pci_request_regions_exclusive(struct pci_dev *, const char *);
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 74173c585afa..b00c4ec5056e 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2832,7 +2832,11 @@
2832#define PCI_DEVICE_ID_NETMOS_9845 0x9845 2832#define PCI_DEVICE_ID_NETMOS_9845 0x9845
2833#define PCI_DEVICE_ID_NETMOS_9855 0x9855 2833#define PCI_DEVICE_ID_NETMOS_9855 0x9855
2834#define PCI_DEVICE_ID_NETMOS_9865 0x9865 2834#define PCI_DEVICE_ID_NETMOS_9865 0x9865
2835#define PCI_DEVICE_ID_NETMOS_9900 0x9900
2835#define PCI_DEVICE_ID_NETMOS_9901 0x9901 2836#define PCI_DEVICE_ID_NETMOS_9901 0x9901
2837#define PCI_DEVICE_ID_NETMOS_9904 0x9904
2838#define PCI_DEVICE_ID_NETMOS_9912 0x9912
2839#define PCI_DEVICE_ID_NETMOS_9922 0x9922
2836 2840
2837#define PCI_VENDOR_ID_3COM_2 0xa727 2841#define PCI_VENDOR_ID_3COM_2 0xa727
2838 2842
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 3f2711ccf910..245bafdafd5e 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -509,7 +509,7 @@ struct perf_guest_info_callbacks {
509#include <linux/cpu.h> 509#include <linux/cpu.h>
510#include <linux/irq_work.h> 510#include <linux/irq_work.h>
511#include <linux/jump_label.h> 511#include <linux/jump_label.h>
512#include <asm/atomic.h> 512#include <linux/atomic.h>
513#include <asm/local.h> 513#include <asm/local.h>
514 514
515#define PERF_MAX_STACK_DEPTH 255 515#define PERF_MAX_STACK_DEPTH 255
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 7da5fa845959..54fc4138955f 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -26,7 +26,7 @@
26#include <linux/workqueue.h> 26#include <linux/workqueue.h>
27#include <linux/mod_devicetable.h> 27#include <linux/mod_devicetable.h>
28 28
29#include <asm/atomic.h> 29#include <linux/atomic.h>
30 30
31#define PHY_BASIC_FEATURES (SUPPORTED_10baseT_Half | \ 31#define PHY_BASIC_FEATURES (SUPPORTED_10baseT_Half | \
32 SUPPORTED_10baseT_Full | \ 32 SUPPORTED_10baseT_Full | \
@@ -53,6 +53,7 @@
53 53
54/* Interface Mode definitions */ 54/* Interface Mode definitions */
55typedef enum { 55typedef enum {
56 PHY_INTERFACE_MODE_NA,
56 PHY_INTERFACE_MODE_MII, 57 PHY_INTERFACE_MODE_MII,
57 PHY_INTERFACE_MODE_GMII, 58 PHY_INTERFACE_MODE_GMII,
58 PHY_INTERFACE_MODE_SGMII, 59 PHY_INTERFACE_MODE_SGMII,
@@ -62,7 +63,8 @@ typedef enum {
62 PHY_INTERFACE_MODE_RGMII_ID, 63 PHY_INTERFACE_MODE_RGMII_ID,
63 PHY_INTERFACE_MODE_RGMII_RXID, 64 PHY_INTERFACE_MODE_RGMII_RXID,
64 PHY_INTERFACE_MODE_RGMII_TXID, 65 PHY_INTERFACE_MODE_RGMII_TXID,
65 PHY_INTERFACE_MODE_RTBI 66 PHY_INTERFACE_MODE_RTBI,
67 PHY_INTERFACE_MODE_SMII,
66} phy_interface_t; 68} phy_interface_t;
67 69
68 70
diff --git a/include/linux/platform_data/fsa9480.h b/include/linux/platform_data/fsa9480.h
new file mode 100644
index 000000000000..72dddcb4bed1
--- /dev/null
+++ b/include/linux/platform_data/fsa9480.h
@@ -0,0 +1,27 @@
1/*
2 * Copyright (C) 2010 Samsung Electronics
3 * Minkyu Kang <mk7.kang@samsung.com>
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
10#ifndef _FSA9480_H_
11#define _FSA9480_H_
12
13#define FSA9480_ATTACHED 1
14#define FSA9480_DETACHED 0
15
16struct fsa9480_platform_data {
17 void (*cfg_gpio) (void);
18 void (*usb_cb) (u8 attached);
19 void (*uart_cb) (u8 attached);
20 void (*charger_cb) (u8 attached);
21 void (*jig_cb) (u8 attached);
22 void (*reset_cb) (void);
23 void (*usb_power) (u8 on);
24 int wakeup;
25};
26
27#endif /* _FSA9480_H_ */
diff --git a/include/linux/platform_data/ntc_thermistor.h b/include/linux/platform_data/ntc_thermistor.h
new file mode 100644
index 000000000000..abd286215279
--- /dev/null
+++ b/include/linux/platform_data/ntc_thermistor.h
@@ -0,0 +1,53 @@
1/*
2 * ntc_thermistor.h - NTC Thermistors
3 *
4 * Copyright (C) 2010 Samsung Electronics
5 * MyungJoo Ham <myungjoo.ham@samsung.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#ifndef _LINUX_NTC_H
22#define _LINUX_NTC_H
23
24enum ntc_thermistor_type {
25 TYPE_NCPXXWB473,
26 TYPE_NCPXXWL333,
27};
28
29struct ntc_thermistor_platform_data {
30 /*
31 * One (not both) of read_uV and read_ohm should be provided and only
32 * one of the two should be provided.
33 * Both functions should return negative value for an error case.
34 *
35 * pullup_uV, pullup_ohm, pulldown_ohm, and connect are required to use
36 * read_uV()
37 *
38 * How to setup pullup_ohm, pulldown_ohm, and connect is
39 * described at Documentation/hwmon/ntc
40 *
41 * pullup/down_ohm: 0 for infinite / not-connected
42 */
43 int (*read_uV)(void);
44 unsigned int pullup_uV;
45
46 unsigned int pullup_ohm;
47 unsigned int pulldown_ohm;
48 enum { NTC_CONNECTED_POSITIVE, NTC_CONNECTED_GROUND } connect;
49
50 int (*read_ohm)(void);
51};
52
53#endif /* _LINUX_NTC_H */
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h
index ede1a80e3358..27bb05aae70d 100644
--- a/include/linux/platform_device.h
+++ b/include/linux/platform_device.h
@@ -42,6 +42,7 @@ extern void platform_device_unregister(struct platform_device *);
42extern struct bus_type platform_bus_type; 42extern struct bus_type platform_bus_type;
43extern struct device platform_bus; 43extern struct device platform_bus;
44 44
45extern void arch_setup_pdev_archdata(struct platform_device *);
45extern struct resource *platform_get_resource(struct platform_device *, unsigned int, unsigned int); 46extern struct resource *platform_get_resource(struct platform_device *, unsigned int, unsigned int);
46extern int platform_get_irq(struct platform_device *, unsigned int); 47extern int platform_get_irq(struct platform_device *, unsigned int);
47extern struct resource *platform_get_resource_byname(struct platform_device *, unsigned int, const char *); 48extern struct resource *platform_get_resource_byname(struct platform_device *, unsigned int, const char *);
diff --git a/include/linux/pnp.h b/include/linux/pnp.h
index 1bc1338b817b..195aafc6cd07 100644
--- a/include/linux/pnp.h
+++ b/include/linux/pnp.h
@@ -50,7 +50,7 @@ static inline resource_size_t pnp_resource_len(struct resource *res)
50{ 50{
51 if (res->start == 0 && res->end == 0) 51 if (res->start == 0 && res->end == 0)
52 return 0; 52 return 0;
53 return res->end - res->start + 1; 53 return resource_size(res);
54} 54}
55 55
56 56
diff --git a/include/linux/poison.h b/include/linux/poison.h
index 2110a81c5e2a..79159de0e341 100644
--- a/include/linux/poison.h
+++ b/include/linux/poison.h
@@ -40,6 +40,12 @@
40#define RED_INACTIVE 0x09F911029D74E35BULL /* when obj is inactive */ 40#define RED_INACTIVE 0x09F911029D74E35BULL /* when obj is inactive */
41#define RED_ACTIVE 0xD84156C5635688C0ULL /* when obj is active */ 41#define RED_ACTIVE 0xD84156C5635688C0ULL /* when obj is active */
42 42
43#ifdef CONFIG_PHYS_ADDR_T_64BIT
44#define MEMBLOCK_INACTIVE 0x3a84fb0144c9e71bULL
45#else
46#define MEMBLOCK_INACTIVE 0x44c9e71bUL
47#endif
48
43#define SLUB_RED_INACTIVE 0xbb 49#define SLUB_RED_INACTIVE 0xbb
44#define SLUB_RED_ACTIVE 0xcc 50#define SLUB_RED_ACTIVE 0xcc
45 51
diff --git a/include/linux/posix_acl.h b/include/linux/posix_acl.h
index 54211c1cd926..9a53b99818e2 100644
--- a/include/linux/posix_acl.h
+++ b/include/linux/posix_acl.h
@@ -73,13 +73,12 @@ posix_acl_release(struct posix_acl *acl)
73 73
74extern void posix_acl_init(struct posix_acl *, int); 74extern void posix_acl_init(struct posix_acl *, int);
75extern struct posix_acl *posix_acl_alloc(int, gfp_t); 75extern struct posix_acl *posix_acl_alloc(int, gfp_t);
76extern struct posix_acl *posix_acl_clone(const struct posix_acl *, gfp_t);
77extern int posix_acl_valid(const struct posix_acl *); 76extern int posix_acl_valid(const struct posix_acl *);
78extern int posix_acl_permission(struct inode *, const struct posix_acl *, int); 77extern int posix_acl_permission(struct inode *, const struct posix_acl *, int);
79extern struct posix_acl *posix_acl_from_mode(mode_t, gfp_t); 78extern struct posix_acl *posix_acl_from_mode(mode_t, gfp_t);
80extern int posix_acl_equiv_mode(const struct posix_acl *, mode_t *); 79extern int posix_acl_equiv_mode(const struct posix_acl *, mode_t *);
81extern int posix_acl_create_masq(struct posix_acl *, mode_t *); 80extern int posix_acl_create(struct posix_acl **, gfp_t, mode_t *);
82extern int posix_acl_chmod_masq(struct posix_acl *, mode_t); 81extern int posix_acl_chmod(struct posix_acl **, gfp_t, mode_t);
83 82
84extern struct posix_acl *get_posix_acl(struct inode *, int); 83extern struct posix_acl *get_posix_acl(struct inode *, int);
85extern int set_posix_acl(struct inode *, int, struct posix_acl *); 84extern int set_posix_acl(struct inode *, int, struct posix_acl *);
diff --git a/include/linux/power/bq20z75.h b/include/linux/power/bq20z75.h
index b0843b68af92..1398eb004e83 100644
--- a/include/linux/power/bq20z75.h
+++ b/include/linux/power/bq20z75.h
@@ -29,11 +29,14 @@
29 * @battery_detect: GPIO which is used to detect battery presence 29 * @battery_detect: GPIO which is used to detect battery presence
30 * @battery_detect_present: gpio state when battery is present (0 / 1) 30 * @battery_detect_present: gpio state when battery is present (0 / 1)
31 * @i2c_retry_count: # of times to retry on i2c IO failure 31 * @i2c_retry_count: # of times to retry on i2c IO failure
32 * @poll_retry_count: # of times to retry looking for new status after
33 * external change notification
32 */ 34 */
33struct bq20z75_platform_data { 35struct bq20z75_platform_data {
34 int battery_detect; 36 int battery_detect;
35 int battery_detect_present; 37 int battery_detect_present;
36 int i2c_retry_count; 38 int i2c_retry_count;
39 int poll_retry_count;
37}; 40};
38 41
39#endif 42#endif
diff --git a/include/linux/power/max17042_battery.h b/include/linux/power/max17042_battery.h
index 7995deb8bfc1..fe99211fb2b8 100644
--- a/include/linux/power/max17042_battery.h
+++ b/include/linux/power/max17042_battery.h
@@ -23,8 +23,99 @@
23#ifndef __MAX17042_BATTERY_H_ 23#ifndef __MAX17042_BATTERY_H_
24#define __MAX17042_BATTERY_H_ 24#define __MAX17042_BATTERY_H_
25 25
26#define MAX17042_STATUS_BattAbsent (1 << 3)
27#define MAX17042_BATTERY_FULL (100)
28#define MAX17042_DEFAULT_SNS_RESISTOR (10000)
29
30enum max17042_register {
31 MAX17042_STATUS = 0x00,
32 MAX17042_VALRT_Th = 0x01,
33 MAX17042_TALRT_Th = 0x02,
34 MAX17042_SALRT_Th = 0x03,
35 MAX17042_AtRate = 0x04,
36 MAX17042_RepCap = 0x05,
37 MAX17042_RepSOC = 0x06,
38 MAX17042_Age = 0x07,
39 MAX17042_TEMP = 0x08,
40 MAX17042_VCELL = 0x09,
41 MAX17042_Current = 0x0A,
42 MAX17042_AvgCurrent = 0x0B,
43 MAX17042_Qresidual = 0x0C,
44 MAX17042_SOC = 0x0D,
45 MAX17042_AvSOC = 0x0E,
46 MAX17042_RemCap = 0x0F,
47 MAX17402_FullCAP = 0x10,
48 MAX17042_TTE = 0x11,
49 MAX17042_V_empty = 0x12,
50
51 MAX17042_RSLOW = 0x14,
52
53 MAX17042_AvgTA = 0x16,
54 MAX17042_Cycles = 0x17,
55 MAX17042_DesignCap = 0x18,
56 MAX17042_AvgVCELL = 0x19,
57 MAX17042_MinMaxTemp = 0x1A,
58 MAX17042_MinMaxVolt = 0x1B,
59 MAX17042_MinMaxCurr = 0x1C,
60 MAX17042_CONFIG = 0x1D,
61 MAX17042_ICHGTerm = 0x1E,
62 MAX17042_AvCap = 0x1F,
63 MAX17042_ManName = 0x20,
64 MAX17042_DevName = 0x21,
65 MAX17042_DevChem = 0x22,
66
67 MAX17042_TempNom = 0x24,
68 MAX17042_TempCold = 0x25,
69 MAX17042_TempHot = 0x26,
70 MAX17042_AIN = 0x27,
71 MAX17042_LearnCFG = 0x28,
72 MAX17042_SHFTCFG = 0x29,
73 MAX17042_RelaxCFG = 0x2A,
74 MAX17042_MiscCFG = 0x2B,
75 MAX17042_TGAIN = 0x2C,
76 MAx17042_TOFF = 0x2D,
77 MAX17042_CGAIN = 0x2E,
78 MAX17042_COFF = 0x2F,
79
80 MAX17042_Q_empty = 0x33,
81 MAX17042_T_empty = 0x34,
82
83 MAX17042_RCOMP0 = 0x38,
84 MAX17042_TempCo = 0x39,
85 MAX17042_Rx = 0x3A,
86 MAX17042_T_empty0 = 0x3B,
87 MAX17042_TaskPeriod = 0x3C,
88 MAX17042_FSTAT = 0x3D,
89
90 MAX17042_SHDNTIMER = 0x3F,
91
92 MAX17042_VFRemCap = 0x4A,
93
94 MAX17042_QH = 0x4D,
95 MAX17042_QL = 0x4E,
96};
97
98/*
99 * used for setting a register to a desired value
100 * addr : address for a register
101 * data : setting value for the register
102 */
103struct max17042_reg_data {
104 u8 addr;
105 u16 data;
106};
107
26struct max17042_platform_data { 108struct max17042_platform_data {
109 struct max17042_reg_data *init_data;
110 int num_init_data; /* Number of enties in init_data array */
27 bool enable_current_sense; 111 bool enable_current_sense;
112
113 /*
114 * R_sns in micro-ohms.
115 * default 10000 (if r_sns = 0) as it is the recommended value by
116 * the datasheet although it can be changed by board designers.
117 */
118 unsigned int r_sns;
28}; 119};
29 120
30#endif /* __MAX17042_BATTERY_H_ */ 121#endif /* __MAX17042_BATTERY_H_ */
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index e7576cf9e32d..643b96c7a94f 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -5,7 +5,7 @@
5#include <linux/fs.h> 5#include <linux/fs.h>
6#include <linux/spinlock.h> 6#include <linux/spinlock.h>
7#include <linux/magic.h> 7#include <linux/magic.h>
8#include <asm/atomic.h> 8#include <linux/atomic.h>
9 9
10struct net; 10struct net;
11struct completion; 11struct completion;
@@ -50,8 +50,6 @@ typedef int (write_proc_t)(struct file *file, const char __user *buffer,
50 50
51struct proc_dir_entry { 51struct proc_dir_entry {
52 unsigned int low_ino; 52 unsigned int low_ino;
53 unsigned int namelen;
54 const char *name;
55 mode_t mode; 53 mode_t mode;
56 nlink_t nlink; 54 nlink_t nlink;
57 uid_t uid; 55 uid_t uid;
@@ -73,9 +71,11 @@ struct proc_dir_entry {
73 write_proc_t *write_proc; 71 write_proc_t *write_proc;
74 atomic_t count; /* use count */ 72 atomic_t count; /* use count */
75 int pde_users; /* number of callers into module in progress */ 73 int pde_users; /* number of callers into module in progress */
76 spinlock_t pde_unload_lock; /* proc_fops checks and pde_users bumps */
77 struct completion *pde_unload_completion; 74 struct completion *pde_unload_completion;
78 struct list_head pde_openers; /* who did ->open, but not ->release */ 75 struct list_head pde_openers; /* who did ->open, but not ->release */
76 spinlock_t pde_unload_lock; /* proc_fops checks and pde_users bumps */
77 u8 namelen;
78 char name[];
79}; 79};
80 80
81enum kcore_type { 81enum kcore_type {
diff --git a/include/linux/pti.h b/include/linux/pti.h
index 81af667bb2d5..b3ea01a3197e 100644
--- a/include/linux/pti.h
+++ b/include/linux/pti.h
@@ -36,7 +36,8 @@ struct pti_masterchannel {
36 36
37/* the following functions are defined in misc/pti.c */ 37/* the following functions are defined in misc/pti.c */
38void pti_writedata(struct pti_masterchannel *mc, u8 *buf, int count); 38void pti_writedata(struct pti_masterchannel *mc, u8 *buf, int count);
39struct pti_masterchannel *pti_request_masterchannel(u8 type); 39struct pti_masterchannel *pti_request_masterchannel(u8 type,
40 const char *thread_name);
40void pti_release_masterchannel(struct pti_masterchannel *mc); 41void pti_release_masterchannel(struct pti_masterchannel *mc);
41 42
42#endif /*PTI_H_*/ 43#endif /*PTI_H_*/
diff --git a/include/linux/quota.h b/include/linux/quota.h
index 9a85412e0db6..cb7855699037 100644
--- a/include/linux/quota.h
+++ b/include/linux/quota.h
@@ -180,7 +180,7 @@ enum {
180#include <linux/dqblk_v1.h> 180#include <linux/dqblk_v1.h>
181#include <linux/dqblk_v2.h> 181#include <linux/dqblk_v2.h>
182 182
183#include <asm/atomic.h> 183#include <linux/atomic.h>
184 184
185typedef __kernel_uid32_t qid_t; /* Type in which we store ids in memory */ 185typedef __kernel_uid32_t qid_t; /* Type in which we store ids in memory */
186typedef long long qsize_t; /* Type in which we store sizes */ 186typedef long long qsize_t; /* Type in which we store sizes */
@@ -415,13 +415,5 @@ struct quota_module_name {
415 {QFMT_VFS_V0, "quota_v2"},\ 415 {QFMT_VFS_V0, "quota_v2"},\
416 {0, NULL}} 416 {0, NULL}}
417 417
418#else
419
420# /* nodep */ include <sys/cdefs.h>
421
422__BEGIN_DECLS
423long quotactl __P ((unsigned int, const char *, int, caddr_t));
424__END_DECLS
425
426#endif /* __KERNEL__ */ 418#endif /* __KERNEL__ */
427#endif /* _QUOTA_ */ 419#endif /* _QUOTA_ */
diff --git a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h
index 75cbf4f62fe8..9e65d9e20662 100644
--- a/include/linux/raid/md_p.h
+++ b/include/linux/raid/md_p.h
@@ -245,10 +245,16 @@ struct mdp_superblock_1 {
245 __u8 device_uuid[16]; /* user-space setable, ignored by kernel */ 245 __u8 device_uuid[16]; /* user-space setable, ignored by kernel */
246 __u8 devflags; /* per-device flags. Only one defined...*/ 246 __u8 devflags; /* per-device flags. Only one defined...*/
247#define WriteMostly1 1 /* mask for writemostly flag in above */ 247#define WriteMostly1 1 /* mask for writemostly flag in above */
248 __u8 pad2[64-57]; /* set to 0 when writing */ 248 /* Bad block log. If there are any bad blocks the feature flag is set.
249 * If offset and size are non-zero, that space is reserved and available
250 */
251 __u8 bblog_shift; /* shift from sectors to block size */
252 __le16 bblog_size; /* number of sectors reserved for list */
253 __le32 bblog_offset; /* sector offset from superblock to bblog,
254 * signed - not unsigned */
249 255
250 /* array state information - 64 bytes */ 256 /* array state information - 64 bytes */
251 __le64 utime; /* 40 bits second, 24 btes microseconds */ 257 __le64 utime; /* 40 bits second, 24 bits microseconds */
252 __le64 events; /* incremented when superblock updated */ 258 __le64 events; /* incremented when superblock updated */
253 __le64 resync_offset; /* data before this offset (from data_offset) known to be in sync */ 259 __le64 resync_offset; /* data before this offset (from data_offset) known to be in sync */
254 __le32 sb_csum; /* checksum up to devs[max_dev] */ 260 __le32 sb_csum; /* checksum up to devs[max_dev] */
@@ -270,8 +276,8 @@ struct mdp_superblock_1 {
270 * must be honoured 276 * must be honoured
271 */ 277 */
272#define MD_FEATURE_RESHAPE_ACTIVE 4 278#define MD_FEATURE_RESHAPE_ACTIVE 4
279#define MD_FEATURE_BAD_BLOCKS 8 /* badblock list is not empty */
273 280
274#define MD_FEATURE_ALL (1|2|4) 281#define MD_FEATURE_ALL (1|2|4|8)
275 282
276#endif 283#endif
277
diff --git a/include/linux/ramoops.h b/include/linux/ramoops.h
index 0ae68a2c1212..484fef81cd3a 100644
--- a/include/linux/ramoops.h
+++ b/include/linux/ramoops.h
@@ -10,6 +10,8 @@
10struct ramoops_platform_data { 10struct ramoops_platform_data {
11 unsigned long mem_size; 11 unsigned long mem_size;
12 unsigned long mem_address; 12 unsigned long mem_address;
13 unsigned long record_size;
14 int dump_oops;
13}; 15};
14 16
15#endif 17#endif
diff --git a/include/linux/reboot.h b/include/linux/reboot.h
index 3005d5a7fce5..e0879a70e830 100644
--- a/include/linux/reboot.h
+++ b/include/linux/reboot.h
@@ -39,6 +39,11 @@
39 39
40#include <linux/notifier.h> 40#include <linux/notifier.h>
41 41
42#define SYS_DOWN 0x0001 /* Notify of system down */
43#define SYS_RESTART SYS_DOWN
44#define SYS_HALT 0x0002 /* Notify of system halt */
45#define SYS_POWER_OFF 0x0003 /* Notify of system power off */
46
42extern int register_reboot_notifier(struct notifier_block *); 47extern int register_reboot_notifier(struct notifier_block *);
43extern int unregister_reboot_notifier(struct notifier_block *); 48extern int unregister_reboot_notifier(struct notifier_block *);
44 49
diff --git a/include/linux/reiserfs_acl.h b/include/linux/reiserfs_acl.h
index 3fd8c4506bbb..f096b80e73d8 100644
--- a/include/linux/reiserfs_acl.h
+++ b/include/linux/reiserfs_acl.h
@@ -59,11 +59,7 @@ extern const struct xattr_handler reiserfs_posix_acl_access_handler;
59#else 59#else
60 60
61#define reiserfs_cache_default_acl(inode) 0 61#define reiserfs_cache_default_acl(inode) 0
62 62#define reiserfs_get_acl NULL
63static inline struct posix_acl *reiserfs_get_acl(struct inode *inode, int type)
64{
65 return NULL;
66}
67 63
68static inline int reiserfs_acl_chmod(struct inode *inode) 64static inline int reiserfs_acl_chmod(struct inode *inode)
69{ 65{
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index eca75df00fed..96d465f8d3e6 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -2332,7 +2332,9 @@ __u32 keyed_hash(const signed char *msg, int len);
2332__u32 yura_hash(const signed char *msg, int len); 2332__u32 yura_hash(const signed char *msg, int len);
2333__u32 r5_hash(const signed char *msg, int len); 2333__u32 r5_hash(const signed char *msg, int len);
2334 2334
2335#define reiserfs_set_le_bit __set_bit_le
2335#define reiserfs_test_and_set_le_bit __test_and_set_bit_le 2336#define reiserfs_test_and_set_le_bit __test_and_set_bit_le
2337#define reiserfs_clear_le_bit __clear_bit_le
2336#define reiserfs_test_and_clear_le_bit __test_and_clear_bit_le 2338#define reiserfs_test_and_clear_le_bit __test_and_clear_bit_le
2337#define reiserfs_test_le_bit test_bit_le 2339#define reiserfs_test_le_bit test_bit_le
2338#define reiserfs_find_next_zero_le_bit find_next_zero_bit_le 2340#define reiserfs_find_next_zero_le_bit find_next_zero_bit_le
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h
index 57958c0e1d38..c2b71473266e 100644
--- a/include/linux/reiserfs_xattr.h
+++ b/include/linux/reiserfs_xattr.h
@@ -45,7 +45,6 @@ int reiserfs_permission(struct inode *inode, int mask);
45 45
46#ifdef CONFIG_REISERFS_FS_XATTR 46#ifdef CONFIG_REISERFS_FS_XATTR
47#define has_xattr_dir(inode) (REISERFS_I(inode)->i_flags & i_has_xattr_dir) 47#define has_xattr_dir(inode) (REISERFS_I(inode)->i_flags & i_has_xattr_dir)
48int reiserfs_check_acl(struct inode *inode, int mask);
49ssize_t reiserfs_getxattr(struct dentry *dentry, const char *name, 48ssize_t reiserfs_getxattr(struct dentry *dentry, const char *name,
50 void *buffer, size_t size); 49 void *buffer, size_t size);
51int reiserfs_setxattr(struct dentry *dentry, const char *name, 50int reiserfs_setxattr(struct dentry *dentry, const char *name,
@@ -123,7 +122,6 @@ static inline void reiserfs_init_xattr_rwsem(struct inode *inode)
123#define reiserfs_setxattr NULL 122#define reiserfs_setxattr NULL
124#define reiserfs_listxattr NULL 123#define reiserfs_listxattr NULL
125#define reiserfs_removexattr NULL 124#define reiserfs_removexattr NULL
126#define reiserfs_check_acl NULL
127 125
128static inline void reiserfs_init_xattr_rwsem(struct inode *inode) 126static inline void reiserfs_init_xattr_rwsem(struct inode *inode)
129{ 127{
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index c81226a9a35c..8e872ead88b5 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -760,8 +760,7 @@ extern int lockdep_rtnl_is_held(void);
760 * or RTNL. Note : Please prefer rtnl_dereference() or rcu_dereference() 760 * or RTNL. Note : Please prefer rtnl_dereference() or rcu_dereference()
761 */ 761 */
762#define rcu_dereference_rtnl(p) \ 762#define rcu_dereference_rtnl(p) \
763 rcu_dereference_check(p, rcu_read_lock_held() || \ 763 rcu_dereference_check(p, lockdep_rtnl_is_held())
764 lockdep_rtnl_is_held())
765 764
766/** 765/**
767 * rtnl_dereference - fetch RCU pointer when updates are prevented by RTNL 766 * rtnl_dereference - fetch RCU pointer when updates are prevented by RTNL
diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h
index 77950dfa0a9e..6a6741440cb7 100644
--- a/include/linux/rwsem.h
+++ b/include/linux/rwsem.h
@@ -15,7 +15,7 @@
15#include <linux/spinlock.h> 15#include <linux/spinlock.h>
16 16
17#include <asm/system.h> 17#include <asm/system.h>
18#include <asm/atomic.h> 18#include <linux/atomic.h>
19 19
20struct rw_semaphore; 20struct rw_semaphore;
21 21
diff --git a/include/linux/sched.h b/include/linux/sched.h
index ed766add9b23..20b03bf94748 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1512,7 +1512,6 @@ struct task_struct {
1512 short il_next; 1512 short il_next;
1513 short pref_node_fork; 1513 short pref_node_fork;
1514#endif 1514#endif
1515 atomic_t fs_excl; /* holding fs exclusive resources */
1516 struct rcu_head rcu; 1515 struct rcu_head rcu;
1517 1516
1518 /* 1517 /*
diff --git a/include/linux/sem.h b/include/linux/sem.h
index f2961afa2f66..1feb2de2ee57 100644
--- a/include/linux/sem.h
+++ b/include/linux/sem.h
@@ -77,7 +77,7 @@ struct seminfo {
77#define SEMUSZ 20 /* sizeof struct sem_undo */ 77#define SEMUSZ 20 /* sizeof struct sem_undo */
78 78
79#ifdef __KERNEL__ 79#ifdef __KERNEL__
80#include <asm/atomic.h> 80#include <linux/atomic.h>
81#include <linux/rcupdate.h> 81#include <linux/rcupdate.h>
82#include <linux/cache.h> 82#include <linux/cache.h>
83 83
diff --git a/include/linux/shm.h b/include/linux/shm.h
index eca6235a46c0..92808b86703b 100644
--- a/include/linux/shm.h
+++ b/include/linux/shm.h
@@ -95,6 +95,9 @@ struct shmid_kernel /* private to the kernel */
95 pid_t shm_cprid; 95 pid_t shm_cprid;
96 pid_t shm_lprid; 96 pid_t shm_lprid;
97 struct user_struct *mlock_user; 97 struct user_struct *mlock_user;
98
99 /* The task created the shm object. NULL if the task is dead. */
100 struct task_struct *shm_creator;
98}; 101};
99 102
100/* shm_mode upper byte flags */ 103/* shm_mode upper byte flags */
@@ -106,6 +109,7 @@ struct shmid_kernel /* private to the kernel */
106#ifdef CONFIG_SYSVIPC 109#ifdef CONFIG_SYSVIPC
107long do_shmat(int shmid, char __user *shmaddr, int shmflg, unsigned long *addr); 110long do_shmat(int shmid, char __user *shmaddr, int shmflg, unsigned long *addr);
108extern int is_file_shm_hugepages(struct file *file); 111extern int is_file_shm_hugepages(struct file *file);
112extern void exit_shm(struct task_struct *task);
109#else 113#else
110static inline long do_shmat(int shmid, char __user *shmaddr, 114static inline long do_shmat(int shmid, char __user *shmaddr,
111 int shmflg, unsigned long *addr) 115 int shmflg, unsigned long *addr)
@@ -116,6 +120,9 @@ static inline int is_file_shm_hugepages(struct file *file)
116{ 120{
117 return 0; 121 return 0;
118} 122}
123static inline void exit_shm(struct task_struct *task)
124{
125}
119#endif 126#endif
120 127
121#endif /* __KERNEL__ */ 128#endif /* __KERNEL__ */
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index a24218c9c84b..7b996ed86d5b 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -20,7 +20,7 @@
20#include <linux/time.h> 20#include <linux/time.h>
21#include <linux/cache.h> 21#include <linux/cache.h>
22 22
23#include <asm/atomic.h> 23#include <linux/atomic.h>
24#include <asm/types.h> 24#include <asm/types.h>
25#include <linux/spinlock.h> 25#include <linux/spinlock.h>
26#include <linux/net.h> 26#include <linux/net.h>
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
index 4b35c06dfbc5..f58d6413d230 100644
--- a/include/linux/slub_def.h
+++ b/include/linux/slub_def.h
@@ -24,6 +24,7 @@ enum stat_item {
24 ALLOC_FROM_PARTIAL, /* Cpu slab acquired from partial list */ 24 ALLOC_FROM_PARTIAL, /* Cpu slab acquired from partial list */
25 ALLOC_SLAB, /* Cpu slab acquired from page allocator */ 25 ALLOC_SLAB, /* Cpu slab acquired from page allocator */
26 ALLOC_REFILL, /* Refill cpu slab from slab freelist */ 26 ALLOC_REFILL, /* Refill cpu slab from slab freelist */
27 ALLOC_NODE_MISMATCH, /* Switching cpu slab */
27 FREE_SLAB, /* Slab freed to the page allocator */ 28 FREE_SLAB, /* Slab freed to the page allocator */
28 CPUSLAB_FLUSH, /* Abandoning of the cpu slab */ 29 CPUSLAB_FLUSH, /* Abandoning of the cpu slab */
29 DEACTIVATE_FULL, /* Cpu slab was full when deactivated */ 30 DEACTIVATE_FULL, /* Cpu slab was full when deactivated */
@@ -31,8 +32,10 @@ enum stat_item {
31 DEACTIVATE_TO_HEAD, /* Cpu slab was moved to the head of partials */ 32 DEACTIVATE_TO_HEAD, /* Cpu slab was moved to the head of partials */
32 DEACTIVATE_TO_TAIL, /* Cpu slab was moved to the tail of partials */ 33 DEACTIVATE_TO_TAIL, /* Cpu slab was moved to the tail of partials */
33 DEACTIVATE_REMOTE_FREES,/* Slab contained remotely freed objects */ 34 DEACTIVATE_REMOTE_FREES,/* Slab contained remotely freed objects */
35 DEACTIVATE_BYPASS, /* Implicit deactivation */
34 ORDER_FALLBACK, /* Number of times fallback was necessary */ 36 ORDER_FALLBACK, /* Number of times fallback was necessary */
35 CMPXCHG_DOUBLE_CPU_FAIL,/* Failure of this_cpu_cmpxchg_double */ 37 CMPXCHG_DOUBLE_CPU_FAIL,/* Failure of this_cpu_cmpxchg_double */
38 CMPXCHG_DOUBLE_FAIL, /* Number of times that cmpxchg double did not match */
36 NR_SLUB_STAT_ITEMS }; 39 NR_SLUB_STAT_ITEMS };
37 40
38struct kmem_cache_cpu { 41struct kmem_cache_cpu {
diff --git a/include/linux/sonet.h b/include/linux/sonet.h
index 67ad11fcf88b..de8832dd272b 100644
--- a/include/linux/sonet.h
+++ b/include/linux/sonet.h
@@ -58,7 +58,7 @@ struct sonet_stats {
58 58
59#ifdef __KERNEL__ 59#ifdef __KERNEL__
60 60
61#include <asm/atomic.h> 61#include <linux/atomic.h>
62 62
63struct k_sonet_stats { 63struct k_sonet_stats {
64#define __HANDLE_ITEM(i) atomic_t i 64#define __HANDLE_ITEM(i) atomic_t i
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
index 0b22d51258e6..7df6c17b0281 100644
--- a/include/linux/spinlock.h
+++ b/include/linux/spinlock.h
@@ -384,7 +384,7 @@ static inline void assert_spin_locked(spinlock_t *lock)
384 * Pull the atomic_t declaration: 384 * Pull the atomic_t declaration:
385 * (asm-mips/atomic.h needs above definitions) 385 * (asm-mips/atomic.h needs above definitions)
386 */ 386 */
387#include <asm/atomic.h> 387#include <linux/atomic.h>
388/** 388/**
389 * atomic_dec_and_lock - lock on reaching reference count zero 389 * atomic_dec_and_lock - lock on reaching reference count zero
390 * @atomic: the atomic counter 390 * @atomic: the atomic counter
diff --git a/include/linux/splice.h b/include/linux/splice.h
index 997c3b4c212b..26e5b613deda 100644
--- a/include/linux/splice.h
+++ b/include/linux/splice.h
@@ -88,5 +88,7 @@ extern ssize_t splice_direct_to_actor(struct file *, struct splice_desc *,
88extern int splice_grow_spd(struct pipe_inode_info *, struct splice_pipe_desc *); 88extern int splice_grow_spd(struct pipe_inode_info *, struct splice_pipe_desc *);
89extern void splice_shrink_spd(struct pipe_inode_info *, 89extern void splice_shrink_spd(struct pipe_inode_info *,
90 struct splice_pipe_desc *); 90 struct splice_pipe_desc *);
91extern void spd_release_page(struct splice_pipe_desc *, unsigned int);
91 92
93extern const struct pipe_buf_operations page_cache_pipe_buf_ops;
92#endif 94#endif
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h
index b0928c10111b..8623217f84d0 100644
--- a/include/linux/ssb/ssb.h
+++ b/include/linux/ssb/ssb.h
@@ -27,6 +27,8 @@ struct ssb_sprom {
27 u8 et1mdcport; /* MDIO for enet1 */ 27 u8 et1mdcport; /* MDIO for enet1 */
28 u8 board_rev; /* Board revision number from SPROM. */ 28 u8 board_rev; /* Board revision number from SPROM. */
29 u8 country_code; /* Country Code */ 29 u8 country_code; /* Country Code */
30 u16 leddc_on_time; /* LED Powersave Duty Cycle On Count */
31 u16 leddc_off_time; /* LED Powersave Duty Cycle Off Count */
30 u8 ant_available_a; /* 2GHz antenna available bits (up to 4) */ 32 u8 ant_available_a; /* 2GHz antenna available bits (up to 4) */
31 u8 ant_available_bg; /* 5GHz antenna available bits (up to 4) */ 33 u8 ant_available_bg; /* 5GHz antenna available bits (up to 4) */
32 u16 pa0b0; 34 u16 pa0b0;
diff --git a/include/linux/ssb/ssb_driver_chipcommon.h b/include/linux/ssb/ssb_driver_chipcommon.h
index a08d693d8324..1a6b0045b06b 100644
--- a/include/linux/ssb/ssb_driver_chipcommon.h
+++ b/include/linux/ssb/ssb_driver_chipcommon.h
@@ -8,7 +8,7 @@
8 * gpio interface, extbus, and support for serial and parallel flashes. 8 * gpio interface, extbus, and support for serial and parallel flashes.
9 * 9 *
10 * Copyright 2005, Broadcom Corporation 10 * Copyright 2005, Broadcom Corporation
11 * Copyright 2006, Michael Buesch <mb@bu3sch.de> 11 * Copyright 2006, Michael Buesch <m@bues.ch>
12 * 12 *
13 * Licensed under the GPL version 2. See COPYING for details. 13 * Licensed under the GPL version 2. See COPYING for details.
14 */ 14 */
diff --git a/include/linux/stop_machine.h b/include/linux/stop_machine.h
index 4a9d0c7edc65..2d04ea916760 100644
--- a/include/linux/stop_machine.h
+++ b/include/linux/stop_machine.h
@@ -94,7 +94,7 @@ static inline int try_stop_cpus(const struct cpumask *cpumask,
94 * stop_machine "Bogolock": stop the entire machine, disable 94 * stop_machine "Bogolock": stop the entire machine, disable
95 * interrupts. This is a very heavy lock, which is equivalent to 95 * interrupts. This is a very heavy lock, which is equivalent to
96 * grabbing every spinlock (and more). So the "read" side to such a 96 * grabbing every spinlock (and more). So the "read" side to such a
97 * lock is anything which disables preeempt. 97 * lock is anything which disables preemption.
98 */ 98 */
99#if defined(CONFIG_STOP_MACHINE) && defined(CONFIG_SMP) 99#if defined(CONFIG_STOP_MACHINE) && defined(CONFIG_SMP)
100 100
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h
index 8521067ed4f7..febc4dbec2ca 100644
--- a/include/linux/sunrpc/auth.h
+++ b/include/linux/sunrpc/auth.h
@@ -15,7 +15,7 @@
15#include <linux/sunrpc/msg_prot.h> 15#include <linux/sunrpc/msg_prot.h>
16#include <linux/sunrpc/xdr.h> 16#include <linux/sunrpc/xdr.h>
17 17
18#include <asm/atomic.h> 18#include <linux/atomic.h>
19#include <linux/rcupdate.h> 19#include <linux/rcupdate.h>
20 20
21/* size of the nodename buffer */ 21/* size of the nodename buffer */
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h
index 8d2eef1a8582..5efd8cef389e 100644
--- a/include/linux/sunrpc/cache.h
+++ b/include/linux/sunrpc/cache.h
@@ -15,7 +15,7 @@
15 15
16#include <linux/kref.h> 16#include <linux/kref.h>
17#include <linux/slab.h> 17#include <linux/slab.h>
18#include <asm/atomic.h> 18#include <linux/atomic.h>
19#include <linux/proc_fs.h> 19#include <linux/proc_fs.h>
20 20
21/* 21/*
@@ -256,13 +256,4 @@ static inline time_t get_expiry(char **bpp)
256 return rv - boot.tv_sec; 256 return rv - boot.tv_sec;
257} 257}
258 258
259#ifdef CONFIG_NFSD_DEPRECATED
260static inline void sunrpc_invalidate(struct cache_head *h,
261 struct cache_detail *detail)
262{
263 h->expiry_time = seconds_since_boot() - 1;
264 detail->nextcheck = seconds_since_boot();
265}
266#endif /* CONFIG_NFSD_DEPRECATED */
267
268#endif /* _LINUX_SUNRPC_CACHE_H_ */ 259#endif /* _LINUX_SUNRPC_CACHE_H_ */
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 9a3fa7baf4b8..223588a976a0 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -273,6 +273,7 @@ struct svc_rqst {
273 /* Catering to nfsd */ 273 /* Catering to nfsd */
274 struct auth_domain * rq_client; /* RPC peer info */ 274 struct auth_domain * rq_client; /* RPC peer info */
275 struct auth_domain * rq_gssclient; /* "gss/"-style peer info */ 275 struct auth_domain * rq_gssclient; /* "gss/"-style peer info */
276 int rq_cachetype;
276 struct svc_cacherep * rq_cacherep; /* cache info */ 277 struct svc_cacherep * rq_cacherep; /* cache info */
277 int rq_splice_ok; /* turned off in gss privacy 278 int rq_splice_ok; /* turned off in gss privacy
278 * to prevent encrypting page 279 * to prevent encrypting page
diff --git a/include/linux/sunrpc/timer.h b/include/linux/sunrpc/timer.h
index a67fd734c73b..697d6e69d61f 100644
--- a/include/linux/sunrpc/timer.h
+++ b/include/linux/sunrpc/timer.h
@@ -9,7 +9,7 @@
9#ifndef _LINUX_SUNRPC_TIMER_H 9#ifndef _LINUX_SUNRPC_TIMER_H
10#define _LINUX_SUNRPC_TIMER_H 10#define _LINUX_SUNRPC_TIMER_H
11 11
12#include <asm/atomic.h> 12#include <linux/atomic.h>
13 13
14struct rpc_rtt { 14struct rpc_rtt {
15 unsigned long timeo; /* default timeout value */ 15 unsigned long timeo; /* default timeout value */
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index e1e3742733be..6bbcef22e105 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -268,6 +268,14 @@ static inline int hibernate(void) { return -ENOSYS; }
268static inline bool system_entering_hibernation(void) { return false; } 268static inline bool system_entering_hibernation(void) { return false; }
269#endif /* CONFIG_HIBERNATION */ 269#endif /* CONFIG_HIBERNATION */
270 270
271/* Hibernation and suspend events */
272#define PM_HIBERNATION_PREPARE 0x0001 /* Going to hibernate */
273#define PM_POST_HIBERNATION 0x0002 /* Hibernation finished */
274#define PM_SUSPEND_PREPARE 0x0003 /* Going to suspend the system */
275#define PM_POST_SUSPEND 0x0004 /* Suspend finished */
276#define PM_RESTORE_PREPARE 0x0005 /* Going to restore a saved image */
277#define PM_POST_RESTORE 0x0006 /* Restore failed */
278
271#ifdef CONFIG_PM_SLEEP 279#ifdef CONFIG_PM_SLEEP
272void save_processor_state(void); 280void save_processor_state(void);
273void restore_processor_state(void); 281void restore_processor_state(void);
diff --git a/include/linux/swap.h b/include/linux/swap.h
index a273468f8285..14d62490922e 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -9,7 +9,7 @@
9#include <linux/sched.h> 9#include <linux/sched.h>
10#include <linux/node.h> 10#include <linux/node.h>
11 11
12#include <asm/atomic.h> 12#include <linux/atomic.h>
13#include <asm/page.h> 13#include <asm/page.h>
14 14
15struct notifier_block; 15struct notifier_block;
@@ -251,14 +251,6 @@ static inline void lru_cache_add_file(struct page *page)
251/* linux/mm/vmscan.c */ 251/* linux/mm/vmscan.c */
252extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order, 252extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order,
253 gfp_t gfp_mask, nodemask_t *mask); 253 gfp_t gfp_mask, nodemask_t *mask);
254extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem,
255 gfp_t gfp_mask, bool noswap,
256 unsigned int swappiness);
257extern unsigned long mem_cgroup_shrink_node_zone(struct mem_cgroup *mem,
258 gfp_t gfp_mask, bool noswap,
259 unsigned int swappiness,
260 struct zone *zone,
261 unsigned long *nr_scanned);
262extern int __isolate_lru_page(struct page *page, int mode, int file); 254extern int __isolate_lru_page(struct page *page, int mode, int file);
263extern unsigned long shrink_all_memory(unsigned long nr_pages); 255extern unsigned long shrink_all_memory(unsigned long nr_pages);
264extern int vm_swappiness; 256extern int vm_swappiness;
@@ -299,7 +291,14 @@ static inline void scan_unevictable_unregister_node(struct node *node)
299 291
300extern int kswapd_run(int nid); 292extern int kswapd_run(int nid);
301extern void kswapd_stop(int nid); 293extern void kswapd_stop(int nid);
302 294#ifdef CONFIG_CGROUP_MEM_RES_CTLR
295extern int mem_cgroup_swappiness(struct mem_cgroup *mem);
296#else
297static inline int mem_cgroup_swappiness(struct mem_cgroup *mem)
298{
299 return vm_swappiness;
300}
301#endif
303#ifdef CONFIG_SWAP 302#ifdef CONFIG_SWAP
304/* linux/mm/page_io.c */ 303/* linux/mm/page_io.c */
305extern int swap_readpage(struct page *); 304extern int swap_readpage(struct page *);
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index e2696d76a599..d7d2f2158142 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -17,7 +17,7 @@
17#include <linux/list.h> 17#include <linux/list.h>
18#include <linux/lockdep.h> 18#include <linux/lockdep.h>
19#include <linux/kobject_ns.h> 19#include <linux/kobject_ns.h>
20#include <asm/atomic.h> 20#include <linux/atomic.h>
21 21
22struct kobject; 22struct kobject;
23struct module; 23struct module;
diff --git a/include/linux/tty.h b/include/linux/tty.h
index d6f05292e456..44bc0c5617e1 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -5,24 +5,6 @@
5 * 'tty.h' defines some structures used by tty_io.c and some defines. 5 * 'tty.h' defines some structures used by tty_io.c and some defines.
6 */ 6 */
7 7
8#ifdef __KERNEL__
9#include <linux/fs.h>
10#include <linux/major.h>
11#include <linux/termios.h>
12#include <linux/workqueue.h>
13#include <linux/tty_driver.h>
14#include <linux/tty_ldisc.h>
15#include <linux/mutex.h>
16
17#include <asm/system.h>
18
19
20/*
21 * (Note: the *_driver.minor_start values 1, 64, 128, 192 are
22 * hardcoded at present.)
23 */
24#define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */
25#define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */
26#define NR_LDISCS 30 8#define NR_LDISCS 30
27 9
28/* line disciplines */ 10/* line disciplines */
@@ -53,6 +35,25 @@
53#define N_TRACESINK 23 /* Trace data routing for MIPI P1149.7 */ 35#define N_TRACESINK 23 /* Trace data routing for MIPI P1149.7 */
54#define N_TRACEROUTER 24 /* Trace data routing for MIPI P1149.7 */ 36#define N_TRACEROUTER 24 /* Trace data routing for MIPI P1149.7 */
55 37
38#ifdef __KERNEL__
39#include <linux/fs.h>
40#include <linux/major.h>
41#include <linux/termios.h>
42#include <linux/workqueue.h>
43#include <linux/tty_driver.h>
44#include <linux/tty_ldisc.h>
45#include <linux/mutex.h>
46
47#include <asm/system.h>
48
49
50/*
51 * (Note: the *_driver.minor_start values 1, 64, 128, 192 are
52 * hardcoded at present.)
53 */
54#define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */
55#define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */
56
56/* 57/*
57 * This character is the same as _POSIX_VDISABLE: it cannot be used as 58 * This character is the same as _POSIX_VDISABLE: it cannot be used as
58 * a c_cc[] character, but indicates that a particular special character 59 * a c_cc[] character, but indicates that a particular special character
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
index b78cba466d3d..a316fba73518 100644
--- a/include/linux/usb/composite.h
+++ b/include/linux/usb/composite.h
@@ -59,6 +59,10 @@ struct usb_configuration;
59 * @hs_descriptors: Table of high speed descriptors, using interface and 59 * @hs_descriptors: Table of high speed descriptors, using interface and
60 * string identifiers assigned during @bind(). If this pointer is null, 60 * string identifiers assigned during @bind(). If this pointer is null,
61 * the function will not be available at high speed. 61 * the function will not be available at high speed.
62 * @ss_descriptors: Table of super speed descriptors, using interface and
63 * string identifiers assigned during @bind(). If this
64 * pointer is null after initiation, the function will not
65 * be available at super speed.
62 * @config: assigned when @usb_add_function() is called; this is the 66 * @config: assigned when @usb_add_function() is called; this is the
63 * configuration with which this function is associated. 67 * configuration with which this function is associated.
64 * @bind: Before the gadget can register, all of its functions bind() to the 68 * @bind: Before the gadget can register, all of its functions bind() to the
@@ -77,6 +81,10 @@ struct usb_configuration;
77 * @setup: Used for interface-specific control requests. 81 * @setup: Used for interface-specific control requests.
78 * @suspend: Notifies functions when the host stops sending USB traffic. 82 * @suspend: Notifies functions when the host stops sending USB traffic.
79 * @resume: Notifies functions when the host restarts USB traffic. 83 * @resume: Notifies functions when the host restarts USB traffic.
84 * @get_status: Returns function status as a reply to
85 * GetStatus() request when the recepient is Interface.
86 * @func_suspend: callback to be called when
87 * SetFeature(FUNCTION_SUSPEND) is reseived
80 * 88 *
81 * A single USB function uses one or more interfaces, and should in most 89 * A single USB function uses one or more interfaces, and should in most
82 * cases support operation at both full and high speeds. Each function is 90 * cases support operation at both full and high speeds. Each function is
@@ -106,6 +114,7 @@ struct usb_function {
106 struct usb_gadget_strings **strings; 114 struct usb_gadget_strings **strings;
107 struct usb_descriptor_header **descriptors; 115 struct usb_descriptor_header **descriptors;
108 struct usb_descriptor_header **hs_descriptors; 116 struct usb_descriptor_header **hs_descriptors;
117 struct usb_descriptor_header **ss_descriptors;
109 118
110 struct usb_configuration *config; 119 struct usb_configuration *config;
111 120
@@ -132,6 +141,10 @@ struct usb_function {
132 void (*suspend)(struct usb_function *); 141 void (*suspend)(struct usb_function *);
133 void (*resume)(struct usb_function *); 142 void (*resume)(struct usb_function *);
134 143
144 /* USB 3.0 additions */
145 int (*get_status)(struct usb_function *);
146 int (*func_suspend)(struct usb_function *,
147 u8 suspend_opt);
135 /* private: */ 148 /* private: */
136 /* internals */ 149 /* internals */
137 struct list_head list; 150 struct list_head list;
@@ -145,20 +158,8 @@ int usb_function_activate(struct usb_function *);
145 158
146int usb_interface_id(struct usb_configuration *, struct usb_function *); 159int usb_interface_id(struct usb_configuration *, struct usb_function *);
147 160
148/** 161int config_ep_by_speed(struct usb_gadget *g, struct usb_function *f,
149 * ep_choose - select descriptor endpoint at current device speed 162 struct usb_ep *_ep);
150 * @g: gadget, connected and running at some speed
151 * @hs: descriptor to use for high speed operation
152 * @fs: descriptor to use for full or low speed operation
153 */
154static inline struct usb_endpoint_descriptor *
155ep_choose(struct usb_gadget *g, struct usb_endpoint_descriptor *hs,
156 struct usb_endpoint_descriptor *fs)
157{
158 if (gadget_is_dualspeed(g) && g->speed == USB_SPEED_HIGH)
159 return hs;
160 return fs;
161}
162 163
163#define MAX_CONFIG_INTERFACES 16 /* arbitrary; max 255 */ 164#define MAX_CONFIG_INTERFACES 16 /* arbitrary; max 255 */
164 165
@@ -231,6 +232,7 @@ struct usb_configuration {
231 struct list_head list; 232 struct list_head list;
232 struct list_head functions; 233 struct list_head functions;
233 u8 next_interface_id; 234 u8 next_interface_id;
235 unsigned superspeed:1;
234 unsigned highspeed:1; 236 unsigned highspeed:1;
235 unsigned fullspeed:1; 237 unsigned fullspeed:1;
236 struct usb_function *interface[MAX_CONFIG_INTERFACES]; 238 struct usb_function *interface[MAX_CONFIG_INTERFACES];
@@ -252,6 +254,7 @@ int usb_add_config(struct usb_composite_dev *,
252 * identifiers. 254 * identifiers.
253 * @strings: tables of strings, keyed by identifiers assigned during bind() 255 * @strings: tables of strings, keyed by identifiers assigned during bind()
254 * and language IDs provided in control requests 256 * and language IDs provided in control requests
257 * @max_speed: Highest speed the driver supports.
255 * @needs_serial: set to 1 if the gadget needs userspace to provide 258 * @needs_serial: set to 1 if the gadget needs userspace to provide
256 * a serial number. If one is not provided, warning will be printed. 259 * a serial number. If one is not provided, warning will be printed.
257 * @unbind: Reverses bind; called as a side effect of unregistering 260 * @unbind: Reverses bind; called as a side effect of unregistering
@@ -279,6 +282,7 @@ struct usb_composite_driver {
279 const char *iManufacturer; 282 const char *iManufacturer;
280 const struct usb_device_descriptor *dev; 283 const struct usb_device_descriptor *dev;
281 struct usb_gadget_strings **strings; 284 struct usb_gadget_strings **strings;
285 enum usb_device_speed max_speed;
282 unsigned needs_serial:1; 286 unsigned needs_serial:1;
283 287
284 int (*unbind)(struct usb_composite_dev *); 288 int (*unbind)(struct usb_composite_dev *);
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index dd1571db55e7..087f4b931833 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -15,7 +15,13 @@
15#ifndef __LINUX_USB_GADGET_H 15#ifndef __LINUX_USB_GADGET_H
16#define __LINUX_USB_GADGET_H 16#define __LINUX_USB_GADGET_H
17 17
18#include <linux/device.h>
19#include <linux/errno.h>
20#include <linux/init.h>
21#include <linux/list.h>
18#include <linux/slab.h> 22#include <linux/slab.h>
23#include <linux/types.h>
24#include <linux/usb/ch9.h>
19 25
20struct usb_ep; 26struct usb_ep;
21 27
@@ -27,6 +33,7 @@ struct usb_ep;
27 * field, and the usb controller needs one, it is responsible 33 * field, and the usb controller needs one, it is responsible
28 * for mapping and unmapping the buffer. 34 * for mapping and unmapping the buffer.
29 * @length: Length of that data 35 * @length: Length of that data
36 * @stream_id: The stream id, when USB3.0 bulk streams are being used
30 * @no_interrupt: If true, hints that no completion irq is needed. 37 * @no_interrupt: If true, hints that no completion irq is needed.
31 * Helpful sometimes with deep request queues that are handled 38 * Helpful sometimes with deep request queues that are handled
32 * directly by DMA controllers. 39 * directly by DMA controllers.
@@ -81,6 +88,7 @@ struct usb_request {
81 unsigned length; 88 unsigned length;
82 dma_addr_t dma; 89 dma_addr_t dma;
83 90
91 unsigned stream_id:16;
84 unsigned no_interrupt:1; 92 unsigned no_interrupt:1;
85 unsigned zero:1; 93 unsigned zero:1;
86 unsigned short_not_ok:1; 94 unsigned short_not_ok:1;
@@ -131,8 +139,17 @@ struct usb_ep_ops {
131 * @maxpacket:The maximum packet size used on this endpoint. The initial 139 * @maxpacket:The maximum packet size used on this endpoint. The initial
132 * value can sometimes be reduced (hardware allowing), according to 140 * value can sometimes be reduced (hardware allowing), according to
133 * the endpoint descriptor used to configure the endpoint. 141 * the endpoint descriptor used to configure the endpoint.
134 * @driver_data:for use by the gadget driver. all other fields are 142 * @max_streams: The maximum number of streams supported
135 * read-only to gadget drivers. 143 * by this EP (0 - 16, actual number is 2^n)
144 * @mult: multiplier, 'mult' value for SS Isoc EPs
145 * @maxburst: the maximum number of bursts supported by this EP (for usb3)
146 * @driver_data:for use by the gadget driver.
147 * @address: used to identify the endpoint when finding descriptor that
148 * matches connection speed
149 * @desc: endpoint descriptor. This pointer is set before the endpoint is
150 * enabled and remains valid until the endpoint is disabled.
151 * @comp_desc: In case of SuperSpeed support, this is the endpoint companion
152 * descriptor that is used to configure the endpoint
136 * 153 *
137 * the bus controller driver lists all the general purpose endpoints in 154 * the bus controller driver lists all the general purpose endpoints in
138 * gadget->ep_list. the control endpoint (gadget->ep0) is not in that list, 155 * gadget->ep_list. the control endpoint (gadget->ep0) is not in that list,
@@ -145,6 +162,12 @@ struct usb_ep {
145 const struct usb_ep_ops *ops; 162 const struct usb_ep_ops *ops;
146 struct list_head ep_list; 163 struct list_head ep_list;
147 unsigned maxpacket:16; 164 unsigned maxpacket:16;
165 unsigned max_streams:16;
166 unsigned mult:2;
167 unsigned maxburst:4;
168 u8 address;
169 const struct usb_endpoint_descriptor *desc;
170 const struct usb_ss_ep_comp_descriptor *comp_desc;
148}; 171};
149 172
150/*-------------------------------------------------------------------------*/ 173/*-------------------------------------------------------------------------*/
@@ -153,11 +176,8 @@ struct usb_ep {
153 * usb_ep_enable - configure endpoint, making it usable 176 * usb_ep_enable - configure endpoint, making it usable
154 * @ep:the endpoint being configured. may not be the endpoint named "ep0". 177 * @ep:the endpoint being configured. may not be the endpoint named "ep0".
155 * drivers discover endpoints through the ep_list of a usb_gadget. 178 * drivers discover endpoints through the ep_list of a usb_gadget.
156 * @desc:descriptor for desired behavior. caller guarantees this pointer
157 * remains valid until the endpoint is disabled; the data byte order
158 * is little-endian (usb-standard).
159 * 179 *
160 * when configurations are set, or when interface settings change, the driver 180 * When configurations are set, or when interface settings change, the driver
161 * will enable or disable the relevant endpoints. while it is enabled, an 181 * will enable or disable the relevant endpoints. while it is enabled, an
162 * endpoint may be used for i/o until the driver receives a disconnect() from 182 * endpoint may be used for i/o until the driver receives a disconnect() from
163 * the host or until the endpoint is disabled. 183 * the host or until the endpoint is disabled.
@@ -172,10 +192,9 @@ struct usb_ep {
172 * 192 *
173 * returns zero, or a negative error code. 193 * returns zero, or a negative error code.
174 */ 194 */
175static inline int usb_ep_enable(struct usb_ep *ep, 195static inline int usb_ep_enable(struct usb_ep *ep)
176 const struct usb_endpoint_descriptor *desc)
177{ 196{
178 return ep->ops->enable(ep, desc); 197 return ep->ops->enable(ep, ep->desc);
179} 198}
180 199
181/** 200/**
@@ -416,7 +435,16 @@ static inline void usb_ep_fifo_flush(struct usb_ep *ep)
416 435
417/*-------------------------------------------------------------------------*/ 436/*-------------------------------------------------------------------------*/
418 437
438struct usb_dcd_config_params {
439 __u8 bU1devExitLat; /* U1 Device exit Latency */
440#define USB_DEFULT_U1_DEV_EXIT_LAT 0x01 /* Less then 1 microsec */
441 __le16 bU2DevExitLat; /* U2 Device exit Latency */
442#define USB_DEFULT_U2_DEV_EXIT_LAT 0x1F4 /* Less then 500 microsec */
443};
444
445
419struct usb_gadget; 446struct usb_gadget;
447struct usb_gadget_driver;
420 448
421/* the rest of the api to the controller hardware: device operations, 449/* the rest of the api to the controller hardware: device operations,
422 * which don't involve endpoints (or i/o). 450 * which don't involve endpoints (or i/o).
@@ -430,6 +458,16 @@ struct usb_gadget_ops {
430 int (*pullup) (struct usb_gadget *, int is_on); 458 int (*pullup) (struct usb_gadget *, int is_on);
431 int (*ioctl)(struct usb_gadget *, 459 int (*ioctl)(struct usb_gadget *,
432 unsigned code, unsigned long param); 460 unsigned code, unsigned long param);
461 void (*get_config_params)(struct usb_dcd_config_params *);
462 int (*udc_start)(struct usb_gadget *,
463 struct usb_gadget_driver *);
464 int (*udc_stop)(struct usb_gadget *,
465 struct usb_gadget_driver *);
466
467 /* Those two are deprecated */
468 int (*start)(struct usb_gadget_driver *,
469 int (*bind)(struct usb_gadget *));
470 int (*stop)(struct usb_gadget_driver *);
433}; 471};
434 472
435/** 473/**
@@ -521,6 +559,24 @@ static inline int gadget_is_dualspeed(struct usb_gadget *g)
521} 559}
522 560
523/** 561/**
562 * gadget_is_superspeed() - return true if the hardware handles
563 * supperspeed
564 * @g: controller that might support supper speed
565 */
566static inline int gadget_is_superspeed(struct usb_gadget *g)
567{
568#ifdef CONFIG_USB_GADGET_SUPERSPEED
569 /*
570 * runtime test would check "g->is_superspeed" ... that might be
571 * useful to work around hardware bugs, but is mostly pointless
572 */
573 return 1;
574#else
575 return 0;
576#endif
577}
578
579/**
524 * gadget_is_otg - return true iff the hardware is OTG-ready 580 * gadget_is_otg - return true iff the hardware is OTG-ready
525 * @g: controller that might have a Mini-AB connector 581 * @g: controller that might have a Mini-AB connector
526 * 582 *
@@ -821,6 +877,9 @@ int usb_gadget_probe_driver(struct usb_gadget_driver *driver,
821 */ 877 */
822int usb_gadget_unregister_driver(struct usb_gadget_driver *driver); 878int usb_gadget_unregister_driver(struct usb_gadget_driver *driver);
823 879
880extern int usb_add_gadget_udc(struct device *parent, struct usb_gadget *gadget);
881extern void usb_del_gadget_udc(struct usb_gadget *gadget);
882
824/*-------------------------------------------------------------------------*/ 883/*-------------------------------------------------------------------------*/
825 884
826/* utility to simplify dealing with string descriptors */ 885/* utility to simplify dealing with string descriptors */
@@ -870,12 +929,6 @@ int usb_gadget_config_buf(const struct usb_config_descriptor *config,
870struct usb_descriptor_header **usb_copy_descriptors( 929struct usb_descriptor_header **usb_copy_descriptors(
871 struct usb_descriptor_header **); 930 struct usb_descriptor_header **);
872 931
873/* return copy of endpoint descriptor given original descriptor set */
874struct usb_endpoint_descriptor *usb_find_endpoint(
875 struct usb_descriptor_header **src,
876 struct usb_descriptor_header **copy,
877 struct usb_endpoint_descriptor *match);
878
879/** 932/**
880 * usb_free_descriptors - free descriptors returned by usb_copy_descriptors() 933 * usb_free_descriptors - free descriptors returned by usb_copy_descriptors()
881 * @v: vector of descriptors 934 * @v: vector of descriptors
@@ -892,6 +945,11 @@ static inline void usb_free_descriptors(struct usb_descriptor_header **v)
892extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *, 945extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *,
893 struct usb_endpoint_descriptor *); 946 struct usb_endpoint_descriptor *);
894 947
948
949extern struct usb_ep *usb_ep_autoconfig_ss(struct usb_gadget *,
950 struct usb_endpoint_descriptor *,
951 struct usb_ss_ep_comp_descriptor *);
952
895extern void usb_ep_autoconfig_reset(struct usb_gadget *); 953extern void usb_ep_autoconfig_reset(struct usb_gadget *);
896 954
897#endif /* __LINUX_USB_GADGET_H */ 955#endif /* __LINUX_USB_GADGET_H */
diff --git a/include/linux/usb/m66592.h b/include/linux/usb/m66592.h
index cda9625e7df0..a4ba31ab2fed 100644
--- a/include/linux/usb/m66592.h
+++ b/include/linux/usb/m66592.h
@@ -38,6 +38,8 @@ struct m66592_platdata {
38 /* (external controller only) one = 3.3V, zero = 1.5V */ 38 /* (external controller only) one = 3.3V, zero = 1.5V */
39 unsigned vif:1; 39 unsigned vif:1;
40 40
41 /* (external controller only) set one = WR0_N shorted to WR1_N */
42 unsigned wr0_shorted_to_wr1:1;
41}; 43};
42 44
43#endif /* __LINUX_USB_M66592_H */ 45#endif /* __LINUX_USB_M66592_H */
diff --git a/include/linux/usb/r8a66597.h b/include/linux/usb/r8a66597.h
index 26d216734057..b6b8660d0c68 100644
--- a/include/linux/usb/r8a66597.h
+++ b/include/linux/usb/r8a66597.h
@@ -3,7 +3,7 @@
3 * 3 *
4 * Copyright (C) 2009 Renesas Solutions Corp. 4 * Copyright (C) 2009 Renesas Solutions Corp.
5 * 5 *
6 * Author : Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> 6 * Author : Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
@@ -31,6 +31,9 @@ struct r8a66597_platdata {
31 /* This callback can control port power instead of DVSTCTR register. */ 31 /* This callback can control port power instead of DVSTCTR register. */
32 void (*port_power)(int port, int power); 32 void (*port_power)(int port, int power);
33 33
34 /* This parameter is for BUSWAIT */
35 u16 buswait;
36
34 /* set one = on chip controller, set zero = external controller */ 37 /* set one = on chip controller, set zero = external controller */
35 unsigned on_chip:1; 38 unsigned on_chip:1;
36 39
@@ -42,6 +45,9 @@ struct r8a66597_platdata {
42 45
43 /* set one = big endian, set zero = little endian */ 46 /* set one = big endian, set zero = little endian */
44 unsigned endian:1; 47 unsigned endian:1;
48
49 /* (external controller only) set one = WR0_N shorted to WR1_N */
50 unsigned wr0_shorted_to_wr1:1;
45}; 51};
46 52
47/* Register definitions */ 53/* Register definitions */
diff --git a/include/linux/usb/renesas_usbhs.h b/include/linux/usb/renesas_usbhs.h
index 3a7f1d982dd6..8977431259c6 100644
--- a/include/linux/usb/renesas_usbhs.h
+++ b/include/linux/usb/renesas_usbhs.h
@@ -110,6 +110,23 @@ struct renesas_usbhs_driver_param {
110 * delay time from notify_hotplug callback 110 * delay time from notify_hotplug callback
111 */ 111 */
112 int detection_delay; 112 int detection_delay;
113
114 /*
115 * option:
116 *
117 * dma id for dmaengine
118 */
119 int d0_tx_id;
120 int d0_rx_id;
121 int d1_tx_id;
122 int d1_rx_id;
123
124 /*
125 * option:
126 *
127 * pio <--> dma border.
128 */
129 int pio_dma_border; /* default is 64byte */
113}; 130};
114 131
115/* 132/*
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 8a4c309d2344..fca24cc50436 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -376,7 +376,16 @@ struct v4l2_pix_format {
376#define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M', 'J', 'P', 'G') /* Motion-JPEG */ 376#define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M', 'J', 'P', 'G') /* Motion-JPEG */
377#define V4L2_PIX_FMT_JPEG v4l2_fourcc('J', 'P', 'E', 'G') /* JFIF JPEG */ 377#define V4L2_PIX_FMT_JPEG v4l2_fourcc('J', 'P', 'E', 'G') /* JFIF JPEG */
378#define V4L2_PIX_FMT_DV v4l2_fourcc('d', 'v', 's', 'd') /* 1394 */ 378#define V4L2_PIX_FMT_DV v4l2_fourcc('d', 'v', 's', 'd') /* 1394 */
379#define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 */ 379#define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 Multiplexed */
380#define V4L2_PIX_FMT_H264 v4l2_fourcc('H', '2', '6', '4') /* H264 with start codes */
381#define V4L2_PIX_FMT_H264_NO_SC v4l2_fourcc('A', 'V', 'C', '1') /* H264 without start codes */
382#define V4L2_PIX_FMT_H263 v4l2_fourcc('H', '2', '6', '3') /* H263 */
383#define V4L2_PIX_FMT_MPEG1 v4l2_fourcc('M', 'P', 'G', '1') /* MPEG-1 ES */
384#define V4L2_PIX_FMT_MPEG2 v4l2_fourcc('M', 'P', 'G', '2') /* MPEG-2 ES */
385#define V4L2_PIX_FMT_MPEG4 v4l2_fourcc('M', 'P', 'G', '4') /* MPEG-4 ES */
386#define V4L2_PIX_FMT_XVID v4l2_fourcc('X', 'V', 'I', 'D') /* Xvid */
387#define V4L2_PIX_FMT_VC1_ANNEX_G v4l2_fourcc('V', 'C', '1', 'G') /* SMPTE 421M Annex G compliant stream */
388#define V4L2_PIX_FMT_VC1_ANNEX_L v4l2_fourcc('V', 'C', '1', 'L') /* SMPTE 421M Annex L compliant stream */
380 389
381/* Vendor-specific formats */ 390/* Vendor-specific formats */
382#define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */ 391#define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */
@@ -402,6 +411,7 @@ struct v4l2_pix_format {
402#define V4L2_PIX_FMT_CIT_YYVYUY v4l2_fourcc('C', 'I', 'T', 'V') /* one line of Y then 1 line of VYUY */ 411#define V4L2_PIX_FMT_CIT_YYVYUY v4l2_fourcc('C', 'I', 'T', 'V') /* one line of Y then 1 line of VYUY */
403#define V4L2_PIX_FMT_KONICA420 v4l2_fourcc('K', 'O', 'N', 'I') /* YUV420 planar in blocks of 256 pixels */ 412#define V4L2_PIX_FMT_KONICA420 v4l2_fourcc('K', 'O', 'N', 'I') /* YUV420 planar in blocks of 256 pixels */
404#define V4L2_PIX_FMT_JPGL v4l2_fourcc('J', 'P', 'G', 'L') /* JPEG-Lite */ 413#define V4L2_PIX_FMT_JPGL v4l2_fourcc('J', 'P', 'G', 'L') /* JPEG-Lite */
414#define V4L2_PIX_FMT_SE401 v4l2_fourcc('S', '4', '0', '1') /* se401 janggu compressed rgb */
405 415
406/* 416/*
407 * F O R M A T E N U M E R A T I O N 417 * F O R M A T E N U M E R A T I O N
@@ -1026,6 +1036,7 @@ struct v4l2_ext_controls {
1026#define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */ 1036#define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */
1027#define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls */ 1037#define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls */
1028#define V4L2_CTRL_CLASS_FM_TX 0x009b0000 /* FM Modulator control class */ 1038#define V4L2_CTRL_CLASS_FM_TX 0x009b0000 /* FM Modulator control class */
1039#define V4L2_CTRL_CLASS_FLASH 0x009c0000 /* Camera flash controls */
1029 1040
1030#define V4L2_CTRL_ID_MASK (0x0fffffff) 1041#define V4L2_CTRL_ID_MASK (0x0fffffff)
1031#define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) 1042#define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL)
@@ -1039,6 +1050,7 @@ enum v4l2_ctrl_type {
1039 V4L2_CTRL_TYPE_INTEGER64 = 5, 1050 V4L2_CTRL_TYPE_INTEGER64 = 5,
1040 V4L2_CTRL_TYPE_CTRL_CLASS = 6, 1051 V4L2_CTRL_TYPE_CTRL_CLASS = 6,
1041 V4L2_CTRL_TYPE_STRING = 7, 1052 V4L2_CTRL_TYPE_STRING = 7,
1053 V4L2_CTRL_TYPE_BITMASK = 8,
1042}; 1054};
1043 1055
1044/* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ 1056/* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */
@@ -1144,14 +1156,19 @@ enum v4l2_colorfx {
1144#define V4L2_CID_ILLUMINATORS_1 (V4L2_CID_BASE+37) 1156#define V4L2_CID_ILLUMINATORS_1 (V4L2_CID_BASE+37)
1145#define V4L2_CID_ILLUMINATORS_2 (V4L2_CID_BASE+38) 1157#define V4L2_CID_ILLUMINATORS_2 (V4L2_CID_BASE+38)
1146 1158
1159#define V4L2_CID_MIN_BUFFERS_FOR_CAPTURE (V4L2_CID_BASE+39)
1160#define V4L2_CID_MIN_BUFFERS_FOR_OUTPUT (V4L2_CID_BASE+40)
1161
1147/* last CID + 1 */ 1162/* last CID + 1 */
1148#define V4L2_CID_LASTP1 (V4L2_CID_BASE+39) 1163#define V4L2_CID_LASTP1 (V4L2_CID_BASE+41)
1164
1165/* Minimum number of buffer neede by the device */
1149 1166
1150/* MPEG-class control IDs defined by V4L2 */ 1167/* MPEG-class control IDs defined by V4L2 */
1151#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) 1168#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
1152#define V4L2_CID_MPEG_CLASS (V4L2_CTRL_CLASS_MPEG | 1) 1169#define V4L2_CID_MPEG_CLASS (V4L2_CTRL_CLASS_MPEG | 1)
1153 1170
1154/* MPEG streams */ 1171/* MPEG streams, specific to multiplexed streams */
1155#define V4L2_CID_MPEG_STREAM_TYPE (V4L2_CID_MPEG_BASE+0) 1172#define V4L2_CID_MPEG_STREAM_TYPE (V4L2_CID_MPEG_BASE+0)
1156enum v4l2_mpeg_stream_type { 1173enum v4l2_mpeg_stream_type {
1157 V4L2_MPEG_STREAM_TYPE_MPEG2_PS = 0, /* MPEG-2 program stream */ 1174 V4L2_MPEG_STREAM_TYPE_MPEG2_PS = 0, /* MPEG-2 program stream */
@@ -1173,7 +1190,7 @@ enum v4l2_mpeg_stream_vbi_fmt {
1173 V4L2_MPEG_STREAM_VBI_FMT_IVTV = 1, /* VBI in private packets, IVTV format */ 1190 V4L2_MPEG_STREAM_VBI_FMT_IVTV = 1, /* VBI in private packets, IVTV format */
1174}; 1191};
1175 1192
1176/* MPEG audio */ 1193/* MPEG audio controls specific to multiplexed streams */
1177#define V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ (V4L2_CID_MPEG_BASE+100) 1194#define V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ (V4L2_CID_MPEG_BASE+100)
1178enum v4l2_mpeg_audio_sampling_freq { 1195enum v4l2_mpeg_audio_sampling_freq {
1179 V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100 = 0, 1196 V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100 = 0,
@@ -1289,7 +1306,7 @@ enum v4l2_mpeg_audio_ac3_bitrate {
1289 V4L2_MPEG_AUDIO_AC3_BITRATE_640K = 18, 1306 V4L2_MPEG_AUDIO_AC3_BITRATE_640K = 18,
1290}; 1307};
1291 1308
1292/* MPEG video */ 1309/* MPEG video controls specific to multiplexed streams */
1293#define V4L2_CID_MPEG_VIDEO_ENCODING (V4L2_CID_MPEG_BASE+200) 1310#define V4L2_CID_MPEG_VIDEO_ENCODING (V4L2_CID_MPEG_BASE+200)
1294enum v4l2_mpeg_video_encoding { 1311enum v4l2_mpeg_video_encoding {
1295 V4L2_MPEG_VIDEO_ENCODING_MPEG_1 = 0, 1312 V4L2_MPEG_VIDEO_ENCODING_MPEG_1 = 0,
@@ -1317,6 +1334,141 @@ enum v4l2_mpeg_video_bitrate_mode {
1317#define V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (V4L2_CID_MPEG_BASE+209) 1334#define V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (V4L2_CID_MPEG_BASE+209)
1318#define V4L2_CID_MPEG_VIDEO_MUTE (V4L2_CID_MPEG_BASE+210) 1335#define V4L2_CID_MPEG_VIDEO_MUTE (V4L2_CID_MPEG_BASE+210)
1319#define V4L2_CID_MPEG_VIDEO_MUTE_YUV (V4L2_CID_MPEG_BASE+211) 1336#define V4L2_CID_MPEG_VIDEO_MUTE_YUV (V4L2_CID_MPEG_BASE+211)
1337#define V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE (V4L2_CID_MPEG_BASE+212)
1338#define V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER (V4L2_CID_MPEG_BASE+213)
1339#define V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB (V4L2_CID_MPEG_BASE+214)
1340#define V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE (V4L2_CID_MPEG_BASE+215)
1341#define V4L2_CID_MPEG_VIDEO_HEADER_MODE (V4L2_CID_MPEG_BASE+216)
1342enum v4l2_mpeg_video_header_mode {
1343 V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE = 0,
1344 V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME = 1,
1345
1346};
1347#define V4L2_CID_MPEG_VIDEO_MAX_REF_PIC (V4L2_CID_MPEG_BASE+217)
1348#define V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE (V4L2_CID_MPEG_BASE+218)
1349#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES (V4L2_CID_MPEG_BASE+219)
1350#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB (V4L2_CID_MPEG_BASE+220)
1351#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE (V4L2_CID_MPEG_BASE+221)
1352enum v4l2_mpeg_video_multi_slice_mode {
1353 V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE = 0,
1354 V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_MB = 1,
1355 V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_BYTES = 2,
1356};
1357#define V4L2_CID_MPEG_VIDEO_VBV_SIZE (V4L2_CID_MPEG_BASE+222)
1358#define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300)
1359#define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301)
1360#define V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (V4L2_CID_MPEG_BASE+302)
1361#define V4L2_CID_MPEG_VIDEO_H263_MIN_QP (V4L2_CID_MPEG_BASE+303)
1362#define V4L2_CID_MPEG_VIDEO_H263_MAX_QP (V4L2_CID_MPEG_BASE+304)
1363#define V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP (V4L2_CID_MPEG_BASE+350)
1364#define V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP (V4L2_CID_MPEG_BASE+351)
1365#define V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP (V4L2_CID_MPEG_BASE+352)
1366#define V4L2_CID_MPEG_VIDEO_H264_MIN_QP (V4L2_CID_MPEG_BASE+353)
1367#define V4L2_CID_MPEG_VIDEO_H264_MAX_QP (V4L2_CID_MPEG_BASE+354)
1368#define V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM (V4L2_CID_MPEG_BASE+355)
1369#define V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE (V4L2_CID_MPEG_BASE+356)
1370#define V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE (V4L2_CID_MPEG_BASE+357)
1371enum v4l2_mpeg_video_h264_entropy_mode {
1372 V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC = 0,
1373 V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC = 1,
1374};
1375#define V4L2_CID_MPEG_VIDEO_H264_I_PERIOD (V4L2_CID_MPEG_BASE+358)
1376#define V4L2_CID_MPEG_VIDEO_H264_LEVEL (V4L2_CID_MPEG_BASE+359)
1377enum v4l2_mpeg_video_h264_level {
1378 V4L2_MPEG_VIDEO_H264_LEVEL_1_0 = 0,
1379 V4L2_MPEG_VIDEO_H264_LEVEL_1B = 1,
1380 V4L2_MPEG_VIDEO_H264_LEVEL_1_1 = 2,
1381 V4L2_MPEG_VIDEO_H264_LEVEL_1_2 = 3,
1382 V4L2_MPEG_VIDEO_H264_LEVEL_1_3 = 4,
1383 V4L2_MPEG_VIDEO_H264_LEVEL_2_0 = 5,
1384 V4L2_MPEG_VIDEO_H264_LEVEL_2_1 = 6,
1385 V4L2_MPEG_VIDEO_H264_LEVEL_2_2 = 7,
1386 V4L2_MPEG_VIDEO_H264_LEVEL_3_0 = 8,
1387 V4L2_MPEG_VIDEO_H264_LEVEL_3_1 = 9,
1388 V4L2_MPEG_VIDEO_H264_LEVEL_3_2 = 10,
1389 V4L2_MPEG_VIDEO_H264_LEVEL_4_0 = 11,
1390 V4L2_MPEG_VIDEO_H264_LEVEL_4_1 = 12,
1391 V4L2_MPEG_VIDEO_H264_LEVEL_4_2 = 13,
1392 V4L2_MPEG_VIDEO_H264_LEVEL_5_0 = 14,
1393 V4L2_MPEG_VIDEO_H264_LEVEL_5_1 = 15,
1394};
1395#define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA (V4L2_CID_MPEG_BASE+360)
1396#define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA (V4L2_CID_MPEG_BASE+361)
1397#define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE (V4L2_CID_MPEG_BASE+362)
1398enum v4l2_mpeg_video_h264_loop_filter_mode {
1399 V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED = 0,
1400 V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED = 1,
1401 V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY = 2,
1402};
1403#define V4L2_CID_MPEG_VIDEO_H264_PROFILE (V4L2_CID_MPEG_BASE+363)
1404enum v4l2_mpeg_video_h264_profile {
1405 V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE = 0,
1406 V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE = 1,
1407 V4L2_MPEG_VIDEO_H264_PROFILE_MAIN = 2,
1408 V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED = 3,
1409 V4L2_MPEG_VIDEO_H264_PROFILE_HIGH = 4,
1410 V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10 = 5,
1411 V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422 = 6,
1412 V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE = 7,
1413 V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA = 8,
1414 V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA = 9,
1415 V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA = 10,
1416 V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA = 11,
1417 V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE = 12,
1418 V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH = 13,
1419 V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA = 14,
1420 V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH = 15,
1421 V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH = 16,
1422};
1423#define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT (V4L2_CID_MPEG_BASE+364)
1424#define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH (V4L2_CID_MPEG_BASE+365)
1425#define V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE (V4L2_CID_MPEG_BASE+366)
1426#define V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC (V4L2_CID_MPEG_BASE+367)
1427enum v4l2_mpeg_video_h264_vui_sar_idc {
1428 V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED = 0,
1429 V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1 = 1,
1430 V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11 = 2,
1431 V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11 = 3,
1432 V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11 = 4,
1433 V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33 = 5,
1434 V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11 = 6,
1435 V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11 = 7,
1436 V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11 = 8,
1437 V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33 = 9,
1438 V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11 = 10,
1439 V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11 = 11,
1440 V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33 = 12,
1441 V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99 = 13,
1442 V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3 = 14,
1443 V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2 = 15,
1444 V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1 = 16,
1445 V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED = 17,
1446};
1447#define V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (V4L2_CID_MPEG_BASE+400)
1448#define V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (V4L2_CID_MPEG_BASE+401)
1449#define V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (V4L2_CID_MPEG_BASE+402)
1450#define V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP (V4L2_CID_MPEG_BASE+403)
1451#define V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP (V4L2_CID_MPEG_BASE+404)
1452#define V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL (V4L2_CID_MPEG_BASE+405)
1453enum v4l2_mpeg_video_mpeg4_level {
1454 V4L2_MPEG_VIDEO_MPEG4_LEVEL_0 = 0,
1455 V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B = 1,
1456 V4L2_MPEG_VIDEO_MPEG4_LEVEL_1 = 2,
1457 V4L2_MPEG_VIDEO_MPEG4_LEVEL_2 = 3,
1458 V4L2_MPEG_VIDEO_MPEG4_LEVEL_3 = 4,
1459 V4L2_MPEG_VIDEO_MPEG4_LEVEL_3B = 5,
1460 V4L2_MPEG_VIDEO_MPEG4_LEVEL_4 = 6,
1461 V4L2_MPEG_VIDEO_MPEG4_LEVEL_5 = 7,
1462};
1463#define V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE (V4L2_CID_MPEG_BASE+406)
1464enum v4l2_mpeg_video_mpeg4_profile {
1465 V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE = 0,
1466 V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE = 1,
1467 V4L2_MPEG_VIDEO_MPEG4_PROFILE_CORE = 2,
1468 V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE_SCALABLE = 3,
1469 V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY = 4,
1470};
1471#define V4L2_CID_MPEG_VIDEO_MPEG4_QPEL (V4L2_CID_MPEG_BASE+407)
1320 1472
1321/* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */ 1473/* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */
1322#define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000) 1474#define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000)
@@ -1359,6 +1511,33 @@ enum v4l2_mpeg_cx2341x_video_median_filter_type {
1359#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+10) 1511#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+10)
1360#define V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (V4L2_CID_MPEG_CX2341X_BASE+11) 1512#define V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (V4L2_CID_MPEG_CX2341X_BASE+11)
1361 1513
1514/* MPEG-class control IDs specific to the Samsung MFC 5.1 driver as defined by V4L2 */
1515#define V4L2_CID_MPEG_MFC51_BASE (V4L2_CTRL_CLASS_MPEG | 0x1100)
1516
1517#define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY (V4L2_CID_MPEG_MFC51_BASE+0)
1518#define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE (V4L2_CID_MPEG_MFC51_BASE+1)
1519#define V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE (V4L2_CID_MPEG_MFC51_BASE+2)
1520enum v4l2_mpeg_mfc51_video_frame_skip_mode {
1521 V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_DISABLED = 0,
1522 V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT = 1,
1523 V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT = 2,
1524};
1525#define V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE (V4L2_CID_MPEG_MFC51_BASE+3)
1526enum v4l2_mpeg_mfc51_video_force_frame_type {
1527 V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_DISABLED = 0,
1528 V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_I_FRAME = 1,
1529 V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_NOT_CODED = 2,
1530};
1531#define V4L2_CID_MPEG_MFC51_VIDEO_PADDING (V4L2_CID_MPEG_MFC51_BASE+4)
1532#define V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV (V4L2_CID_MPEG_MFC51_BASE+5)
1533#define V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT (V4L2_CID_MPEG_MFC51_BASE+6)
1534#define V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF (V4L2_CID_MPEG_MFC51_BASE+7)
1535#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY (V4L2_CID_MPEG_MFC51_BASE+50)
1536#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK (V4L2_CID_MPEG_MFC51_BASE+51)
1537#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH (V4L2_CID_MPEG_MFC51_BASE+52)
1538#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (V4L2_CID_MPEG_MFC51_BASE+53)
1539#define V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (V4L2_CID_MPEG_MFC51_BASE+54)
1540
1362/* Camera class control IDs */ 1541/* Camera class control IDs */
1363#define V4L2_CID_CAMERA_CLASS_BASE (V4L2_CTRL_CLASS_CAMERA | 0x900) 1542#define V4L2_CID_CAMERA_CLASS_BASE (V4L2_CTRL_CLASS_CAMERA | 0x900)
1364#define V4L2_CID_CAMERA_CLASS (V4L2_CTRL_CLASS_CAMERA | 1) 1543#define V4L2_CID_CAMERA_CLASS (V4L2_CTRL_CLASS_CAMERA | 1)
@@ -1427,6 +1606,41 @@ enum v4l2_preemphasis {
1427#define V4L2_CID_TUNE_POWER_LEVEL (V4L2_CID_FM_TX_CLASS_BASE + 113) 1606#define V4L2_CID_TUNE_POWER_LEVEL (V4L2_CID_FM_TX_CLASS_BASE + 113)
1428#define V4L2_CID_TUNE_ANTENNA_CAPACITOR (V4L2_CID_FM_TX_CLASS_BASE + 114) 1607#define V4L2_CID_TUNE_ANTENNA_CAPACITOR (V4L2_CID_FM_TX_CLASS_BASE + 114)
1429 1608
1609/* Flash and privacy (indicator) light controls */
1610#define V4L2_CID_FLASH_CLASS_BASE (V4L2_CTRL_CLASS_FLASH | 0x900)
1611#define V4L2_CID_FLASH_CLASS (V4L2_CTRL_CLASS_FLASH | 1)
1612
1613#define V4L2_CID_FLASH_LED_MODE (V4L2_CID_FLASH_CLASS_BASE + 1)
1614enum v4l2_flash_led_mode {
1615 V4L2_FLASH_LED_MODE_NONE,
1616 V4L2_FLASH_LED_MODE_FLASH,
1617 V4L2_FLASH_LED_MODE_TORCH,
1618};
1619
1620#define V4L2_CID_FLASH_STROBE_SOURCE (V4L2_CID_FLASH_CLASS_BASE + 2)
1621enum v4l2_flash_strobe_source {
1622 V4L2_FLASH_STROBE_SOURCE_SOFTWARE,
1623 V4L2_FLASH_STROBE_SOURCE_EXTERNAL,
1624};
1625
1626#define V4L2_CID_FLASH_STROBE (V4L2_CID_FLASH_CLASS_BASE + 3)
1627#define V4L2_CID_FLASH_STROBE_STOP (V4L2_CID_FLASH_CLASS_BASE + 4)
1628#define V4L2_CID_FLASH_STROBE_STATUS (V4L2_CID_FLASH_CLASS_BASE + 5)
1629
1630#define V4L2_CID_FLASH_TIMEOUT (V4L2_CID_FLASH_CLASS_BASE + 6)
1631#define V4L2_CID_FLASH_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 7)
1632#define V4L2_CID_FLASH_TORCH_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 8)
1633#define V4L2_CID_FLASH_INDICATOR_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 9)
1634
1635#define V4L2_CID_FLASH_FAULT (V4L2_CID_FLASH_CLASS_BASE + 10)
1636#define V4L2_FLASH_FAULT_OVER_VOLTAGE (1 << 0)
1637#define V4L2_FLASH_FAULT_TIMEOUT (1 << 1)
1638#define V4L2_FLASH_FAULT_OVER_TEMPERATURE (1 << 2)
1639#define V4L2_FLASH_FAULT_SHORT_CIRCUIT (1 << 3)
1640
1641#define V4L2_CID_FLASH_CHARGE (V4L2_CID_FLASH_CLASS_BASE + 11)
1642#define V4L2_CID_FLASH_READY (V4L2_CID_FLASH_CLASS_BASE + 12)
1643
1430/* 1644/*
1431 * T U N I N G 1645 * T U N I N G
1432 */ 1646 */
@@ -1791,6 +2005,7 @@ struct v4l2_streamparm {
1791#define V4L2_EVENT_ALL 0 2005#define V4L2_EVENT_ALL 0
1792#define V4L2_EVENT_VSYNC 1 2006#define V4L2_EVENT_VSYNC 1
1793#define V4L2_EVENT_EOS 2 2007#define V4L2_EVENT_EOS 2
2008#define V4L2_EVENT_CTRL 3
1794#define V4L2_EVENT_PRIVATE_START 0x08000000 2009#define V4L2_EVENT_PRIVATE_START 0x08000000
1795 2010
1796/* Payload for V4L2_EVENT_VSYNC */ 2011/* Payload for V4L2_EVENT_VSYNC */
@@ -1799,21 +2014,46 @@ struct v4l2_event_vsync {
1799 __u8 field; 2014 __u8 field;
1800} __attribute__ ((packed)); 2015} __attribute__ ((packed));
1801 2016
2017/* Payload for V4L2_EVENT_CTRL */
2018#define V4L2_EVENT_CTRL_CH_VALUE (1 << 0)
2019#define V4L2_EVENT_CTRL_CH_FLAGS (1 << 1)
2020
2021struct v4l2_event_ctrl {
2022 __u32 changes;
2023 __u32 type;
2024 union {
2025 __s32 value;
2026 __s64 value64;
2027 };
2028 __u32 flags;
2029 __s32 minimum;
2030 __s32 maximum;
2031 __s32 step;
2032 __s32 default_value;
2033};
2034
1802struct v4l2_event { 2035struct v4l2_event {
1803 __u32 type; 2036 __u32 type;
1804 union { 2037 union {
1805 struct v4l2_event_vsync vsync; 2038 struct v4l2_event_vsync vsync;
2039 struct v4l2_event_ctrl ctrl;
1806 __u8 data[64]; 2040 __u8 data[64];
1807 } u; 2041 } u;
1808 __u32 pending; 2042 __u32 pending;
1809 __u32 sequence; 2043 __u32 sequence;
1810 struct timespec timestamp; 2044 struct timespec timestamp;
1811 __u32 reserved[9]; 2045 __u32 id;
2046 __u32 reserved[8];
1812}; 2047};
1813 2048
2049#define V4L2_EVENT_SUB_FL_SEND_INITIAL (1 << 0)
2050#define V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK (1 << 1)
2051
1814struct v4l2_event_subscription { 2052struct v4l2_event_subscription {
1815 __u32 type; 2053 __u32 type;
1816 __u32 reserved[7]; 2054 __u32 id;
2055 __u32 flags;
2056 __u32 reserved[5];
1817}; 2057};
1818 2058
1819/* 2059/*
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
index bcd942fa611c..65efb92da996 100644
--- a/include/linux/vmstat.h
+++ b/include/linux/vmstat.h
@@ -6,7 +6,7 @@
6#include <linux/mm.h> 6#include <linux/mm.h>
7#include <linux/mmzone.h> 7#include <linux/mmzone.h>
8#include <linux/vm_event_item.h> 8#include <linux/vm_event_item.h>
9#include <asm/atomic.h> 9#include <linux/atomic.h>
10 10
11extern int sysctl_stat_interval; 11extern int sysctl_stat_interval;
12 12
diff --git a/include/linux/vt.h b/include/linux/vt.h
index d5dd0bc408fd..30a8dd9c83ff 100644
--- a/include/linux/vt.h
+++ b/include/linux/vt.h
@@ -86,6 +86,13 @@ struct vt_setactivate {
86 86
87#ifdef __KERNEL__ 87#ifdef __KERNEL__
88 88
89/* Virtual Terminal events. */
90#define VT_ALLOCATE 0x0001 /* Console got allocated */
91#define VT_DEALLOCATE 0x0002 /* Console will be deallocated */
92#define VT_WRITE 0x0003 /* A char got output */
93#define VT_UPDATE 0x0004 /* A bigger update occurred */
94#define VT_PREWRITE 0x0005 /* A char is about to be written to the console */
95
89#ifdef CONFIG_VT_CONSOLE 96#ifdef CONFIG_VT_CONSOLE
90 97
91extern int vt_kmsg_redirect(int new); 98extern int vt_kmsg_redirect(int new);
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h
index 4d05e14ea60c..c2164fad0083 100644
--- a/include/linux/vt_kern.h
+++ b/include/linux/vt_kern.h
@@ -137,7 +137,7 @@ int vty_init(const struct file_operations *console_fops);
137 137
138static inline bool vt_force_oops_output(struct vc_data *vc) 138static inline bool vt_force_oops_output(struct vc_data *vc)
139{ 139{
140 if (oops_in_progress && vc->vc_panic_force_write) 140 if (oops_in_progress && vc->vc_panic_force_write && panic_timeout >= 0)
141 return true; 141 return true;
142 return false; 142 return false;
143} 143}
diff --git a/include/linux/watchdog.h b/include/linux/watchdog.h
index 011bcfeb9f09..111843f88b2a 100644
--- a/include/linux/watchdog.h
+++ b/include/linux/watchdog.h
@@ -59,6 +59,84 @@ struct watchdog_info {
59#define WATCHDOG_NOWAYOUT 0 59#define WATCHDOG_NOWAYOUT 0
60#endif 60#endif
61 61
62struct watchdog_ops;
63struct watchdog_device;
64
65/** struct watchdog_ops - The watchdog-devices operations
66 *
67 * @owner: The module owner.
68 * @start: The routine for starting the watchdog device.
69 * @stop: The routine for stopping the watchdog device.
70 * @ping: The routine that sends a keepalive ping to the watchdog device.
71 * @status: The routine that shows the status of the watchdog device.
72 * @set_timeout:The routine for setting the watchdog devices timeout value.
73 * @ioctl: The routines that handles extra ioctl calls.
74 *
75 * The watchdog_ops structure contains a list of low-level operations
76 * that control a watchdog device. It also contains the module that owns
77 * these operations. The start and stop function are mandatory, all other
78 * functions are optonal.
79 */
80struct watchdog_ops {
81 struct module *owner;
82 /* mandatory operations */
83 int (*start)(struct watchdog_device *);
84 int (*stop)(struct watchdog_device *);
85 /* optional operations */
86 int (*ping)(struct watchdog_device *);
87 unsigned int (*status)(struct watchdog_device *);
88 int (*set_timeout)(struct watchdog_device *, unsigned int);
89 long (*ioctl)(struct watchdog_device *, unsigned int, unsigned long);
90};
91
92/** struct watchdog_device - The structure that defines a watchdog device
93 *
94 * @info: Pointer to a watchdog_info structure.
95 * @ops: Pointer to the list of watchdog operations.
96 * @bootstatus: Status of the watchdog device at boot.
97 * @timeout: The watchdog devices timeout value.
98 * @min_timeout:The watchdog devices minimum timeout value.
99 * @max_timeout:The watchdog devices maximum timeout value.
100 * @driver-data:Pointer to the drivers private data.
101 * @status: Field that contains the devices internal status bits.
102 *
103 * The watchdog_device structure contains all information about a
104 * watchdog timer device.
105 *
106 * The driver-data field may not be accessed directly. It must be accessed
107 * via the watchdog_set_drvdata and watchdog_get_drvdata helpers.
108 */
109struct watchdog_device {
110 const struct watchdog_info *info;
111 const struct watchdog_ops *ops;
112 unsigned int bootstatus;
113 unsigned int timeout;
114 unsigned int min_timeout;
115 unsigned int max_timeout;
116 void *driver_data;
117 unsigned long status;
118/* Bit numbers for status flags */
119#define WDOG_ACTIVE 0 /* Is the watchdog running/active */
120#define WDOG_DEV_OPEN 1 /* Opened via /dev/watchdog ? */
121#define WDOG_ALLOW_RELEASE 2 /* Did we receive the magic char ? */
122#define WDOG_NO_WAY_OUT 3 /* Is 'nowayout' feature set ? */
123};
124
125/* Use the following functions to manipulate watchdog driver specific data */
126static inline void watchdog_set_drvdata(struct watchdog_device *wdd, void *data)
127{
128 wdd->driver_data = data;
129}
130
131static inline void *watchdog_get_drvdata(struct watchdog_device *wdd)
132{
133 return wdd->driver_data;
134}
135
136/* drivers/watchdog/core/watchdog_core.c */
137extern int watchdog_register_device(struct watchdog_device *);
138extern void watchdog_unregister_device(struct watchdog_device *);
139
62#endif /* __KERNEL__ */ 140#endif /* __KERNEL__ */
63 141
64#endif /* ifndef _LINUX_WATCHDOG_H */ 142#endif /* ifndef _LINUX_WATCHDOG_H */
diff --git a/include/linux/wm97xx.h b/include/linux/wm97xx.h
index 38e8c4d9289e..fd98bb968219 100644
--- a/include/linux/wm97xx.h
+++ b/include/linux/wm97xx.h
@@ -38,7 +38,11 @@
38#define WM97XX_ADCSEL_X 0x1000 /* x coord measurement */ 38#define WM97XX_ADCSEL_X 0x1000 /* x coord measurement */
39#define WM97XX_ADCSEL_Y 0x2000 /* y coord measurement */ 39#define WM97XX_ADCSEL_Y 0x2000 /* y coord measurement */
40#define WM97XX_ADCSEL_PRES 0x3000 /* pressure measurement */ 40#define WM97XX_ADCSEL_PRES 0x3000 /* pressure measurement */
41#define WM97XX_ADCSEL_MASK 0x7000 41#define WM97XX_AUX_ID1 0x4000
42#define WM97XX_AUX_ID2 0x5000
43#define WM97XX_AUX_ID3 0x6000
44#define WM97XX_AUX_ID4 0x7000
45#define WM97XX_ADCSEL_MASK 0x7000 /* ADC selection mask */
42#define WM97XX_COO 0x0800 /* enable coordinate mode */ 46#define WM97XX_COO 0x0800 /* enable coordinate mode */
43#define WM97XX_CTC 0x0400 /* enable continuous mode */ 47#define WM97XX_CTC 0x0400 /* enable continuous mode */
44#define WM97XX_CM_RATE_93 0x0000 /* 93.75Hz continuous rate */ 48#define WM97XX_CM_RATE_93 0x0000 /* 93.75Hz continuous rate */
@@ -61,13 +65,6 @@
61#define WM97XX_PRP_DET_DIG 0xc000 /* setect on, digitise on */ 65#define WM97XX_PRP_DET_DIG 0xc000 /* setect on, digitise on */
62#define WM97XX_RPR 0x2000 /* wake up on pen down */ 66#define WM97XX_RPR 0x2000 /* wake up on pen down */
63#define WM97XX_PEN_DOWN 0x8000 /* pen is down */ 67#define WM97XX_PEN_DOWN 0x8000 /* pen is down */
64#define WM97XX_ADCSRC_MASK 0x7000 /* ADC source mask */
65
66#define WM97XX_AUX_ID1 0x8001
67#define WM97XX_AUX_ID2 0x8002
68#define WM97XX_AUX_ID3 0x8003
69#define WM97XX_AUX_ID4 0x8004
70
71 68
72/* WM9712 Bits */ 69/* WM9712 Bits */
73#define WM9712_45W 0x1000 /* set for 5-wire touchscreen */ 70#define WM9712_45W 0x1000 /* set for 5-wire touchscreen */
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index 2be2887c6958..0d556deb497b 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -10,7 +10,7 @@
10#include <linux/bitops.h> 10#include <linux/bitops.h>
11#include <linux/lockdep.h> 11#include <linux/lockdep.h>
12#include <linux/threads.h> 12#include <linux/threads.h>
13#include <asm/atomic.h> 13#include <linux/atomic.h>
14 14
15struct workqueue_struct; 15struct workqueue_struct;
16 16
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index 17e7ccc322a5..f1bfa12ea246 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -7,9 +7,39 @@
7#include <linux/sched.h> 7#include <linux/sched.h>
8#include <linux/fs.h> 8#include <linux/fs.h>
9 9
10struct backing_dev_info; 10/*
11 * The 1/4 region under the global dirty thresh is for smooth dirty throttling:
12 *
13 * (thresh - thresh/DIRTY_FULL_SCOPE, thresh)
14 *
15 * The 1/16 region above the global dirty limit will be put to maximum pauses:
16 *
17 * (limit, limit + limit/DIRTY_MAXPAUSE_AREA)
18 *
19 * The 1/16 region above the max-pause region, dirty exceeded bdi's will be put
20 * to loops:
21 *
22 * (limit + limit/DIRTY_MAXPAUSE_AREA, limit + limit/DIRTY_PASSGOOD_AREA)
23 *
24 * Further beyond, all dirtier tasks will enter a loop waiting (possibly long
25 * time) for the dirty pages to drop, unless written enough pages.
26 *
27 * The global dirty threshold is normally equal to the global dirty limit,
28 * except when the system suddenly allocates a lot of anonymous memory and
29 * knocks down the global dirty threshold quickly, in which case the global
30 * dirty limit will follow down slowly to prevent livelocking all dirtier tasks.
31 */
32#define DIRTY_SCOPE 8
33#define DIRTY_FULL_SCOPE (DIRTY_SCOPE / 2)
34#define DIRTY_MAXPAUSE_AREA 16
35#define DIRTY_PASSGOOD_AREA 8
11 36
12extern spinlock_t inode_wb_list_lock; 37/*
38 * 4MB minimal write chunk size
39 */
40#define MIN_WRITEBACK_PAGES (4096UL >> (PAGE_CACHE_SHIFT - 10))
41
42struct backing_dev_info;
13 43
14/* 44/*
15 * fs/fs-writeback.c 45 * fs/fs-writeback.c
@@ -26,11 +56,6 @@ enum writeback_sync_modes {
26 */ 56 */
27struct writeback_control { 57struct writeback_control {
28 enum writeback_sync_modes sync_mode; 58 enum writeback_sync_modes sync_mode;
29 unsigned long *older_than_this; /* If !NULL, only write back inodes
30 older than this */
31 unsigned long wb_start; /* Time writeback_inodes_wb was
32 called. This is needed to avoid
33 extra jobs and livelock */
34 long nr_to_write; /* Write this many pages, and decrement 59 long nr_to_write; /* Write this many pages, and decrement
35 this for each page written */ 60 this for each page written */
36 long pages_skipped; /* Pages which were not written */ 61 long pages_skipped; /* Pages which were not written */
@@ -43,13 +68,11 @@ struct writeback_control {
43 loff_t range_start; 68 loff_t range_start;
44 loff_t range_end; 69 loff_t range_end;
45 70
46 unsigned nonblocking:1; /* Don't get stuck on request queues */
47 unsigned encountered_congestion:1; /* An output: a queue is full */
48 unsigned for_kupdate:1; /* A kupdate writeback */ 71 unsigned for_kupdate:1; /* A kupdate writeback */
49 unsigned for_background:1; /* A background writeback */ 72 unsigned for_background:1; /* A background writeback */
73 unsigned tagged_writepages:1; /* tag-and-write to avoid livelock */
50 unsigned for_reclaim:1; /* Invoked from the page allocator */ 74 unsigned for_reclaim:1; /* Invoked from the page allocator */
51 unsigned range_cyclic:1; /* range_start is cyclic */ 75 unsigned range_cyclic:1; /* range_start is cyclic */
52 unsigned more_io:1; /* more io to be dispatched */
53}; 76};
54 77
55/* 78/*
@@ -62,8 +85,7 @@ void writeback_inodes_sb_nr(struct super_block *, unsigned long nr);
62int writeback_inodes_sb_if_idle(struct super_block *); 85int writeback_inodes_sb_if_idle(struct super_block *);
63int writeback_inodes_sb_nr_if_idle(struct super_block *, unsigned long nr); 86int writeback_inodes_sb_nr_if_idle(struct super_block *, unsigned long nr);
64void sync_inodes_sb(struct super_block *); 87void sync_inodes_sb(struct super_block *);
65void writeback_inodes_wb(struct bdi_writeback *wb, 88long writeback_inodes_wb(struct bdi_writeback *wb, long nr_pages);
66 struct writeback_control *wbc);
67long wb_do_writeback(struct bdi_writeback *wb, int force_wait); 89long wb_do_writeback(struct bdi_writeback *wb, int force_wait);
68void wakeup_flusher_threads(long nr_pages); 90void wakeup_flusher_threads(long nr_pages);
69 91
@@ -94,6 +116,8 @@ static inline void laptop_sync_completion(void) { }
94#endif 116#endif
95void throttle_vm_writeout(gfp_t gfp_mask); 117void throttle_vm_writeout(gfp_t gfp_mask);
96 118
119extern unsigned long global_dirty_limit;
120
97/* These are exported to sysctl. */ 121/* These are exported to sysctl. */
98extern int dirty_background_ratio; 122extern int dirty_background_ratio;
99extern unsigned long dirty_background_bytes; 123extern unsigned long dirty_background_bytes;
@@ -128,6 +152,13 @@ void global_dirty_limits(unsigned long *pbackground, unsigned long *pdirty);
128unsigned long bdi_dirty_limit(struct backing_dev_info *bdi, 152unsigned long bdi_dirty_limit(struct backing_dev_info *bdi,
129 unsigned long dirty); 153 unsigned long dirty);
130 154
155void __bdi_update_bandwidth(struct backing_dev_info *bdi,
156 unsigned long thresh,
157 unsigned long dirty,
158 unsigned long bdi_thresh,
159 unsigned long bdi_dirty,
160 unsigned long start_time);
161
131void page_writeback_init(void); 162void page_writeback_init(void);
132void balance_dirty_pages_ratelimited_nr(struct address_space *mapping, 163void balance_dirty_pages_ratelimited_nr(struct address_space *mapping,
133 unsigned long nr_pages_dirtied); 164 unsigned long nr_pages_dirtied);
diff --git a/include/linux/zorro.h b/include/linux/zorro.h
index 7bf9db525e9e..dff42025649b 100644
--- a/include/linux/zorro.h
+++ b/include/linux/zorro.h
@@ -187,7 +187,7 @@ extern struct zorro_dev *zorro_find_device(zorro_id id,
187 187
188#define zorro_resource_start(z) ((z)->resource.start) 188#define zorro_resource_start(z) ((z)->resource.start)
189#define zorro_resource_end(z) ((z)->resource.end) 189#define zorro_resource_end(z) ((z)->resource.end)
190#define zorro_resource_len(z) ((z)->resource.end-(z)->resource.start+1) 190#define zorro_resource_len(z) (resource_size(&(z)->resource))
191#define zorro_resource_flags(z) ((z)->resource.flags) 191#define zorro_resource_flags(z) ((z)->resource.flags)
192 192
193#define zorro_request_device(z, name) \ 193#define zorro_request_device(z, name) \