diff options
| author | Herbert Xu <herbert@gondor.apana.org.au> | 2012-05-15 03:21:26 -0400 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2012-05-15 03:21:26 -0400 |
| commit | b29e2679d0da91c60d3ac190d9c3bd65ac2f68c5 (patch) | |
| tree | 518ec8f4bfd316e91bcc30f434edb78529557eba /include/linux | |
| parent | 8a63b1994c500d4825ee73dc71502deffe5b135b (diff) | |
| parent | 4bb2d1009f671815870e8f78e826e4f9071392a7 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
Merge mainline to add prerequisite for ARM ux500 crypto support.
Diffstat (limited to 'include/linux')
174 files changed, 2821 insertions, 738 deletions
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h index 724c69c40bb8..7847e197730a 100644 --- a/include/linux/amba/bus.h +++ b/include/linux/amba/bus.h | |||
| @@ -60,6 +60,9 @@ extern struct bus_type amba_bustype; | |||
| 60 | 60 | ||
| 61 | int amba_driver_register(struct amba_driver *); | 61 | int amba_driver_register(struct amba_driver *); |
| 62 | void amba_driver_unregister(struct amba_driver *); | 62 | void amba_driver_unregister(struct amba_driver *); |
| 63 | struct amba_device *amba_device_alloc(const char *, resource_size_t, size_t); | ||
| 64 | void amba_device_put(struct amba_device *); | ||
| 65 | int amba_device_add(struct amba_device *, struct resource *); | ||
| 63 | int amba_device_register(struct amba_device *, struct resource *); | 66 | int amba_device_register(struct amba_device *, struct resource *); |
| 64 | void amba_device_unregister(struct amba_device *); | 67 | void amba_device_unregister(struct amba_device *); |
| 65 | struct amba_device *amba_find_device(const char *, struct device *, unsigned int, unsigned int); | 68 | struct amba_device *amba_find_device(const char *, struct device *, unsigned int, unsigned int); |
| @@ -89,4 +92,46 @@ void amba_release_regions(struct amba_device *); | |||
| 89 | #define amba_manf(d) AMBA_MANF_BITS((d)->periphid) | 92 | #define amba_manf(d) AMBA_MANF_BITS((d)->periphid) |
| 90 | #define amba_part(d) AMBA_PART_BITS((d)->periphid) | 93 | #define amba_part(d) AMBA_PART_BITS((d)->periphid) |
| 91 | 94 | ||
| 95 | #define __AMBA_DEV(busid, data, mask) \ | ||
| 96 | { \ | ||
| 97 | .coherent_dma_mask = mask, \ | ||
| 98 | .init_name = busid, \ | ||
| 99 | .platform_data = data, \ | ||
| 100 | } | ||
| 101 | |||
| 102 | /* | ||
| 103 | * APB devices do not themselves have the ability to address memory, | ||
| 104 | * so DMA masks should be zero (much like USB peripheral devices.) | ||
| 105 | * The DMA controller DMA masks should be used instead (much like | ||
| 106 | * USB host controllers in conventional PCs.) | ||
| 107 | */ | ||
| 108 | #define AMBA_APB_DEVICE(name, busid, id, base, irqs, data) \ | ||
| 109 | struct amba_device name##_device = { \ | ||
| 110 | .dev = __AMBA_DEV(busid, data, 0), \ | ||
| 111 | .res = DEFINE_RES_MEM(base, SZ_4K), \ | ||
| 112 | .irq = irqs, \ | ||
| 113 | .periphid = id, \ | ||
| 114 | } | ||
| 115 | |||
| 116 | /* | ||
| 117 | * AHB devices are DMA capable, so set their DMA masks | ||
| 118 | */ | ||
| 119 | #define AMBA_AHB_DEVICE(name, busid, id, base, irqs, data) \ | ||
| 120 | struct amba_device name##_device = { \ | ||
| 121 | .dev = __AMBA_DEV(busid, data, ~0ULL), \ | ||
| 122 | .res = DEFINE_RES_MEM(base, SZ_4K), \ | ||
| 123 | .dma_mask = ~0ULL, \ | ||
| 124 | .irq = irqs, \ | ||
| 125 | .periphid = id, \ | ||
| 126 | } | ||
| 127 | |||
| 128 | /* | ||
| 129 | * module_amba_driver() - Helper macro for drivers that don't do anything | ||
| 130 | * special in module init/exit. This eliminates a lot of boilerplate. Each | ||
| 131 | * module may only use this macro once, and calling it replaces module_init() | ||
| 132 | * and module_exit() | ||
| 133 | */ | ||
| 134 | #define module_amba_driver(__amba_drv) \ | ||
| 135 | module_driver(__amba_drv, amba_driver_register, amba_driver_unregister) | ||
| 136 | |||
| 92 | #endif | 137 | #endif |
diff --git a/include/linux/amba/mmci.h b/include/linux/amba/mmci.h index 0101e9c17fa1..32a89cf5ec45 100644 --- a/include/linux/amba/mmci.h +++ b/include/linux/amba/mmci.h | |||
| @@ -6,6 +6,19 @@ | |||
| 6 | 6 | ||
| 7 | #include <linux/mmc/host.h> | 7 | #include <linux/mmc/host.h> |
| 8 | 8 | ||
| 9 | |||
| 10 | /* | ||
| 11 | * These defines is places here due to access is needed from machine | ||
| 12 | * configuration files. The ST Micro version does not have ROD and | ||
| 13 | * reuse the voltage registers for direction settings. | ||
| 14 | */ | ||
| 15 | #define MCI_ST_DATA2DIREN (1 << 2) | ||
| 16 | #define MCI_ST_CMDDIREN (1 << 3) | ||
| 17 | #define MCI_ST_DATA0DIREN (1 << 4) | ||
| 18 | #define MCI_ST_DATA31DIREN (1 << 5) | ||
| 19 | #define MCI_ST_FBCLKEN (1 << 7) | ||
| 20 | #define MCI_ST_DATA74DIREN (1 << 8) | ||
| 21 | |||
| 9 | /* Just some dummy forwarding */ | 22 | /* Just some dummy forwarding */ |
| 10 | struct dma_chan; | 23 | struct dma_chan; |
| 11 | 24 | ||
| @@ -18,7 +31,8 @@ struct dma_chan; | |||
| 18 | * @ocr_mask: available voltages on the 4 pins from the block, this | 31 | * @ocr_mask: available voltages on the 4 pins from the block, this |
| 19 | * is ignored if a regulator is used, see the MMC_VDD_* masks in | 32 | * is ignored if a regulator is used, see the MMC_VDD_* masks in |
| 20 | * mmc/host.h | 33 | * mmc/host.h |
| 21 | * @vdd_handler: a callback function to translate a MMC_VDD_* | 34 | * @ios_handler: a callback function to act on specfic ios changes, |
| 35 | * used for example to control a levelshifter | ||
| 22 | * mask into a value to be binary (or set some other custom bits | 36 | * mask into a value to be binary (or set some other custom bits |
| 23 | * in MMCIPWR) or:ed and written into the MMCIPWR register of the | 37 | * in MMCIPWR) or:ed and written into the MMCIPWR register of the |
| 24 | * block. May also control external power based on the power_mode. | 38 | * block. May also control external power based on the power_mode. |
| @@ -31,6 +45,8 @@ struct dma_chan; | |||
| 31 | * @capabilities: the capabilities of the block as implemented in | 45 | * @capabilities: the capabilities of the block as implemented in |
| 32 | * this platform, signify anything MMC_CAP_* from mmc/host.h | 46 | * this platform, signify anything MMC_CAP_* from mmc/host.h |
| 33 | * @capabilities2: more capabilities, MMC_CAP2_* from mmc/host.h | 47 | * @capabilities2: more capabilities, MMC_CAP2_* from mmc/host.h |
| 48 | * @sigdir: a bit field indicating for what bits in the MMC bus the host | ||
| 49 | * should enable signal direction indication. | ||
| 34 | * @dma_filter: function used to select an appropriate RX and TX | 50 | * @dma_filter: function used to select an appropriate RX and TX |
| 35 | * DMA channel to be used for DMA, if and only if you're deploying the | 51 | * DMA channel to be used for DMA, if and only if you're deploying the |
| 36 | * generic DMA engine | 52 | * generic DMA engine |
| @@ -46,14 +62,14 @@ struct dma_chan; | |||
| 46 | struct mmci_platform_data { | 62 | struct mmci_platform_data { |
| 47 | unsigned int f_max; | 63 | unsigned int f_max; |
| 48 | unsigned int ocr_mask; | 64 | unsigned int ocr_mask; |
| 49 | u32 (*vdd_handler)(struct device *, unsigned int vdd, | 65 | int (*ios_handler)(struct device *, struct mmc_ios *); |
| 50 | unsigned char power_mode); | ||
| 51 | unsigned int (*status)(struct device *); | 66 | unsigned int (*status)(struct device *); |
| 52 | int gpio_wp; | 67 | int gpio_wp; |
| 53 | int gpio_cd; | 68 | int gpio_cd; |
| 54 | bool cd_invert; | 69 | bool cd_invert; |
| 55 | unsigned long capabilities; | 70 | unsigned long capabilities; |
| 56 | unsigned long capabilities2; | 71 | unsigned long capabilities2; |
| 72 | u32 sigdir; | ||
| 57 | bool (*dma_filter)(struct dma_chan *chan, void *filter_param); | 73 | bool (*dma_filter)(struct dma_chan *chan, void *filter_param); |
| 58 | void *dma_rx_param; | 74 | void *dma_rx_param; |
| 59 | void *dma_tx_param; | 75 | void *dma_tx_param; |
diff --git a/include/linux/amba/pl022.h b/include/linux/amba/pl022.h index 3672f40f3455..b8c51124ed19 100644 --- a/include/linux/amba/pl022.h +++ b/include/linux/amba/pl022.h | |||
| @@ -25,8 +25,6 @@ | |||
| 25 | #ifndef _SSP_PL022_H | 25 | #ifndef _SSP_PL022_H |
| 26 | #define _SSP_PL022_H | 26 | #define _SSP_PL022_H |
| 27 | 27 | ||
| 28 | #include <linux/device.h> | ||
| 29 | |||
| 30 | /** | 28 | /** |
| 31 | * whether SSP is in loopback mode or not | 29 | * whether SSP is in loopback mode or not |
| 32 | */ | 30 | */ |
diff --git a/include/linux/amd-iommu.h b/include/linux/amd-iommu.h index ef00610837d4..15f6b9edd0b1 100644 --- a/include/linux/amd-iommu.h +++ b/include/linux/amd-iommu.h | |||
| @@ -28,7 +28,7 @@ struct task_struct; | |||
| 28 | struct pci_dev; | 28 | struct pci_dev; |
| 29 | 29 | ||
| 30 | extern int amd_iommu_detect(void); | 30 | extern int amd_iommu_detect(void); |
| 31 | 31 | extern int amd_iommu_init_hardware(void); | |
| 32 | 32 | ||
| 33 | /** | 33 | /** |
| 34 | * amd_iommu_enable_device_erratum() - Enable erratum workaround for device | 34 | * amd_iommu_enable_device_erratum() - Enable erratum workaround for device |
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h index f4ff882cb2da..06fd4bbc58f6 100644 --- a/include/linux/atmdev.h +++ b/include/linux/atmdev.h | |||
| @@ -213,10 +213,10 @@ struct atm_cirange { | |||
| 213 | 213 | ||
| 214 | #ifdef __KERNEL__ | 214 | #ifdef __KERNEL__ |
| 215 | 215 | ||
| 216 | #include <linux/device.h> | ||
| 217 | #include <linux/wait.h> /* wait_queue_head_t */ | 216 | #include <linux/wait.h> /* wait_queue_head_t */ |
| 218 | #include <linux/time.h> /* struct timeval */ | 217 | #include <linux/time.h> /* struct timeval */ |
| 219 | #include <linux/net.h> | 218 | #include <linux/net.h> |
| 219 | #include <linux/bug.h> | ||
| 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> |
| @@ -249,6 +249,7 @@ struct k_atm_dev_stats { | |||
| 249 | struct k_atm_aal_stats aal5; | 249 | struct k_atm_aal_stats aal5; |
| 250 | }; | 250 | }; |
| 251 | 251 | ||
| 252 | struct device; | ||
| 252 | 253 | ||
| 253 | enum { | 254 | enum { |
| 254 | ATM_VF_ADDR, /* Address is in use. Set by anybody, cleared | 255 | ATM_VF_ADDR, /* Address is in use. Set by anybody, cleared |
diff --git a/include/linux/atmel_tc.h b/include/linux/atmel_tc.h index 53ba65e30caa..1d14b1dc1aee 100644 --- a/include/linux/atmel_tc.h +++ b/include/linux/atmel_tc.h | |||
| @@ -34,10 +34,19 @@ | |||
| 34 | struct clk; | 34 | struct clk; |
| 35 | 35 | ||
| 36 | /** | 36 | /** |
| 37 | * struct atmel_tcb_config - SoC data for a Timer/Counter Block | ||
| 38 | * @counter_width: size in bits of a timer counter register | ||
| 39 | */ | ||
| 40 | struct atmel_tcb_config { | ||
| 41 | size_t counter_width; | ||
| 42 | }; | ||
| 43 | |||
| 44 | /** | ||
| 37 | * struct atmel_tc - information about a Timer/Counter Block | 45 | * struct atmel_tc - information about a Timer/Counter Block |
| 38 | * @pdev: physical device | 46 | * @pdev: physical device |
| 39 | * @iomem: resource associated with the I/O register | 47 | * @iomem: resource associated with the I/O register |
| 40 | * @regs: mapping through which the I/O registers can be accessed | 48 | * @regs: mapping through which the I/O registers can be accessed |
| 49 | * @tcb_config: configuration data from SoC | ||
| 41 | * @irq: irq for each of the three channels | 50 | * @irq: irq for each of the three channels |
| 42 | * @clk: internal clock source for each of the three channels | 51 | * @clk: internal clock source for each of the three channels |
| 43 | * @node: list node, for tclib internal use | 52 | * @node: list node, for tclib internal use |
| @@ -54,6 +63,7 @@ struct atmel_tc { | |||
| 54 | struct platform_device *pdev; | 63 | struct platform_device *pdev; |
| 55 | struct resource *iomem; | 64 | struct resource *iomem; |
| 56 | void __iomem *regs; | 65 | void __iomem *regs; |
| 66 | struct atmel_tcb_config *tcb_config; | ||
| 57 | int irq[3]; | 67 | int irq[3]; |
| 58 | struct clk *clk[3]; | 68 | struct clk *clk[3]; |
| 59 | struct list_head node; | 69 | struct list_head node; |
diff --git a/include/linux/attribute_container.h b/include/linux/attribute_container.h index c3ab81428c66..896c6892f327 100644 --- a/include/linux/attribute_container.h +++ b/include/linux/attribute_container.h | |||
| @@ -9,10 +9,11 @@ | |||
| 9 | #ifndef _ATTRIBUTE_CONTAINER_H_ | 9 | #ifndef _ATTRIBUTE_CONTAINER_H_ |
| 10 | #define _ATTRIBUTE_CONTAINER_H_ | 10 | #define _ATTRIBUTE_CONTAINER_H_ |
| 11 | 11 | ||
| 12 | #include <linux/device.h> | ||
| 13 | #include <linux/list.h> | 12 | #include <linux/list.h> |
| 14 | #include <linux/klist.h> | 13 | #include <linux/klist.h> |
| 15 | 14 | ||
| 15 | struct device; | ||
| 16 | |||
| 16 | struct attribute_container { | 17 | struct attribute_container { |
| 17 | struct list_head node; | 18 | struct list_head node; |
| 18 | struct klist containers; | 19 | struct klist containers; |
diff --git a/include/linux/bio.h b/include/linux/bio.h index de5422a57511..4d94eb8bcbcc 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include <linux/highmem.h> | 23 | #include <linux/highmem.h> |
| 24 | #include <linux/mempool.h> | 24 | #include <linux/mempool.h> |
| 25 | #include <linux/ioprio.h> | 25 | #include <linux/ioprio.h> |
| 26 | #include <linux/bug.h> | ||
| 26 | 27 | ||
| 27 | #ifdef CONFIG_BLOCK | 28 | #ifdef CONFIG_BLOCK |
| 28 | 29 | ||
diff --git a/include/linux/bit_spinlock.h b/include/linux/bit_spinlock.h index ac4d9f8b52e9..3b5bafce4337 100644 --- a/include/linux/bit_spinlock.h +++ b/include/linux/bit_spinlock.h | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
| 5 | #include <linux/preempt.h> | 5 | #include <linux/preempt.h> |
| 6 | #include <linux/atomic.h> | 6 | #include <linux/atomic.h> |
| 7 | #include <linux/bug.h> | ||
| 7 | 8 | ||
| 8 | /* | 9 | /* |
| 9 | * bit-based spin_lock() | 10 | * bit-based spin_lock() |
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 94300fe46cce..a3b6b82108b9 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
| @@ -27,11 +27,22 @@ extern unsigned long __sw_hweight64(__u64 w); | |||
| 27 | (bit) = find_next_bit((addr), (size), (bit) + 1)) | 27 | (bit) = find_next_bit((addr), (size), (bit) + 1)) |
| 28 | 28 | ||
| 29 | /* same as for_each_set_bit() but use bit as value to start with */ | 29 | /* same as for_each_set_bit() but use bit as value to start with */ |
| 30 | #define for_each_set_bit_cont(bit, addr, size) \ | 30 | #define for_each_set_bit_from(bit, addr, size) \ |
| 31 | for ((bit) = find_next_bit((addr), (size), (bit)); \ | 31 | for ((bit) = find_next_bit((addr), (size), (bit)); \ |
| 32 | (bit) < (size); \ | 32 | (bit) < (size); \ |
| 33 | (bit) = find_next_bit((addr), (size), (bit) + 1)) | 33 | (bit) = find_next_bit((addr), (size), (bit) + 1)) |
| 34 | 34 | ||
| 35 | #define for_each_clear_bit(bit, addr, size) \ | ||
| 36 | for ((bit) = find_first_zero_bit((addr), (size)); \ | ||
| 37 | (bit) < (size); \ | ||
| 38 | (bit) = find_next_zero_bit((addr), (size), (bit) + 1)) | ||
| 39 | |||
| 40 | /* same as for_each_clear_bit() but use bit as value to start with */ | ||
| 41 | #define for_each_clear_bit_from(bit, addr, size) \ | ||
| 42 | for ((bit) = find_next_zero_bit((addr), (size), (bit)); \ | ||
| 43 | (bit) < (size); \ | ||
| 44 | (bit) = find_next_zero_bit((addr), (size), (bit) + 1)) | ||
| 45 | |||
| 35 | static __inline__ int get_bitmask_order(unsigned int count) | 46 | static __inline__ int get_bitmask_order(unsigned int count) |
| 36 | { | 47 | { |
| 37 | int order; | 48 | int order; |
diff --git a/include/linux/bug.h b/include/linux/bug.h index d276b5510c83..72961c39576a 100644 --- a/include/linux/bug.h +++ b/include/linux/bug.h | |||
| @@ -11,6 +11,67 @@ enum bug_trap_type { | |||
| 11 | 11 | ||
| 12 | struct pt_regs; | 12 | struct pt_regs; |
| 13 | 13 | ||
| 14 | #ifdef __CHECKER__ | ||
| 15 | #define BUILD_BUG_ON_NOT_POWER_OF_2(n) | ||
| 16 | #define BUILD_BUG_ON_ZERO(e) (0) | ||
| 17 | #define BUILD_BUG_ON_NULL(e) ((void*)0) | ||
| 18 | #define BUILD_BUG_ON(condition) | ||
| 19 | #define BUILD_BUG() (0) | ||
| 20 | #else /* __CHECKER__ */ | ||
| 21 | |||
| 22 | /* Force a compilation error if a constant expression is not a power of 2 */ | ||
| 23 | #define BUILD_BUG_ON_NOT_POWER_OF_2(n) \ | ||
| 24 | BUILD_BUG_ON((n) == 0 || (((n) & ((n) - 1)) != 0)) | ||
| 25 | |||
| 26 | /* Force a compilation error if condition is true, but also produce a | ||
| 27 | result (of value 0 and type size_t), so the expression can be used | ||
| 28 | e.g. in a structure initializer (or where-ever else comma expressions | ||
| 29 | aren't permitted). */ | ||
| 30 | #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); })) | ||
| 31 | #define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); })) | ||
| 32 | |||
| 33 | /** | ||
| 34 | * BUILD_BUG_ON - break compile if a condition is true. | ||
| 35 | * @condition: the condition which the compiler should know is false. | ||
| 36 | * | ||
| 37 | * If you have some code which relies on certain constants being equal, or | ||
| 38 | * other compile-time-evaluated condition, you should use BUILD_BUG_ON to | ||
| 39 | * detect if someone changes it. | ||
| 40 | * | ||
| 41 | * The implementation uses gcc's reluctance to create a negative array, but | ||
| 42 | * gcc (as of 4.4) only emits that error for obvious cases (eg. not arguments | ||
| 43 | * to inline functions). So as a fallback we use the optimizer; if it can't | ||
| 44 | * prove the condition is false, it will cause a link error on the undefined | ||
| 45 | * "__build_bug_on_failed". This error message can be harder to track down | ||
| 46 | * though, hence the two different methods. | ||
| 47 | */ | ||
| 48 | #ifndef __OPTIMIZE__ | ||
| 49 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) | ||
| 50 | #else | ||
| 51 | extern int __build_bug_on_failed; | ||
| 52 | #define BUILD_BUG_ON(condition) \ | ||
| 53 | do { \ | ||
| 54 | ((void)sizeof(char[1 - 2*!!(condition)])); \ | ||
| 55 | if (condition) __build_bug_on_failed = 1; \ | ||
| 56 | } while(0) | ||
| 57 | #endif | ||
| 58 | |||
| 59 | /** | ||
| 60 | * BUILD_BUG - break compile if used. | ||
| 61 | * | ||
| 62 | * If you have some code that you expect the compiler to eliminate at | ||
| 63 | * build time, you should use BUILD_BUG to detect if it is | ||
| 64 | * unexpectedly used. | ||
| 65 | */ | ||
| 66 | #define BUILD_BUG() \ | ||
| 67 | do { \ | ||
| 68 | extern void __build_bug_failed(void) \ | ||
| 69 | __linktime_error("BUILD_BUG failed"); \ | ||
| 70 | __build_bug_failed(); \ | ||
| 71 | } while (0) | ||
| 72 | |||
| 73 | #endif /* __CHECKER__ */ | ||
| 74 | |||
| 14 | #ifdef CONFIG_GENERIC_BUG | 75 | #ifdef CONFIG_GENERIC_BUG |
| 15 | #include <asm-generic/bug.h> | 76 | #include <asm-generic/bug.h> |
| 16 | 77 | ||
diff --git a/include/linux/c2port.h b/include/linux/c2port.h index a2f7d7413f30..4efabcb51347 100644 --- a/include/linux/c2port.h +++ b/include/linux/c2port.h | |||
| @@ -9,11 +9,12 @@ | |||
| 9 | * the Free Software Foundation | 9 | * the Free Software Foundation |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
| 12 | #include <linux/device.h> | ||
| 13 | #include <linux/kmemcheck.h> | 12 | #include <linux/kmemcheck.h> |
| 14 | 13 | ||
| 15 | #define C2PORT_NAME_LEN 32 | 14 | #define C2PORT_NAME_LEN 32 |
| 16 | 15 | ||
| 16 | struct device; | ||
| 17 | |||
| 17 | /* | 18 | /* |
| 18 | * C2 port basic structs | 19 | * C2 port basic structs |
| 19 | */ | 20 | */ |
diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h index 7c48029dffe6..dfd7f187c351 100644 --- a/include/linux/cdrom.h +++ b/include/linux/cdrom.h | |||
| @@ -910,7 +910,6 @@ struct mode_page_header { | |||
| 910 | 910 | ||
| 911 | #ifdef __KERNEL__ | 911 | #ifdef __KERNEL__ |
| 912 | #include <linux/fs.h> /* not really needed, later.. */ | 912 | #include <linux/fs.h> /* not really needed, later.. */ |
| 913 | #include <linux/device.h> | ||
| 914 | #include <linux/list.h> | 913 | #include <linux/list.h> |
| 915 | 914 | ||
| 916 | struct packet_command | 915 | struct packet_command |
diff --git a/include/linux/ceph/decode.h b/include/linux/ceph/decode.h index c5b6939fb32a..220ae21e819b 100644 --- a/include/linux/ceph/decode.h +++ b/include/linux/ceph/decode.h | |||
| @@ -1,8 +1,9 @@ | |||
| 1 | #ifndef __CEPH_DECODE_H | 1 | #ifndef __CEPH_DECODE_H |
| 2 | #define __CEPH_DECODE_H | 2 | #define __CEPH_DECODE_H |
| 3 | 3 | ||
| 4 | #include <asm/unaligned.h> | 4 | #include <linux/bug.h> |
| 5 | #include <linux/time.h> | 5 | #include <linux/time.h> |
| 6 | #include <asm/unaligned.h> | ||
| 6 | 7 | ||
| 7 | #include "types.h" | 8 | #include "types.h" |
| 8 | 9 | ||
diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h index 95bd8502e715..e71d683982a6 100644 --- a/include/linux/ceph/libceph.h +++ b/include/linux/ceph/libceph.h | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | #include <linux/backing-dev.h> | 7 | #include <linux/backing-dev.h> |
| 8 | #include <linux/completion.h> | 8 | #include <linux/completion.h> |
| 9 | #include <linux/exportfs.h> | 9 | #include <linux/exportfs.h> |
| 10 | #include <linux/bug.h> | ||
| 10 | #include <linux/fs.h> | 11 | #include <linux/fs.h> |
| 11 | #include <linux/mempool.h> | 12 | #include <linux/mempool.h> |
| 12 | #include <linux/pagemap.h> | 13 | #include <linux/pagemap.h> |
| @@ -207,7 +208,7 @@ extern struct kmem_cache *ceph_cap_cachep; | |||
| 207 | extern struct kmem_cache *ceph_dentry_cachep; | 208 | extern struct kmem_cache *ceph_dentry_cachep; |
| 208 | extern struct kmem_cache *ceph_file_cachep; | 209 | extern struct kmem_cache *ceph_file_cachep; |
| 209 | 210 | ||
| 210 | extern int ceph_parse_options(struct ceph_options **popt, char *options, | 211 | extern struct ceph_options *ceph_parse_options(char *options, |
| 211 | const char *dev_name, const char *dev_name_end, | 212 | const char *dev_name, const char *dev_name_end, |
| 212 | int (*parse_extra_token)(char *c, void *private), | 213 | int (*parse_extra_token)(char *c, void *private), |
| 213 | void *private); | 214 | void *private); |
diff --git a/include/linux/ceph/mdsmap.h b/include/linux/ceph/mdsmap.h index 4c5cb0880bba..9935fac8c107 100644 --- a/include/linux/ceph/mdsmap.h +++ b/include/linux/ceph/mdsmap.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef _FS_CEPH_MDSMAP_H | 1 | #ifndef _FS_CEPH_MDSMAP_H |
| 2 | #define _FS_CEPH_MDSMAP_H | 2 | #define _FS_CEPH_MDSMAP_H |
| 3 | 3 | ||
| 4 | #include <linux/bug.h> | ||
| 4 | #include "types.h" | 5 | #include "types.h" |
| 5 | 6 | ||
| 6 | /* | 7 | /* |
diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h index ffbeb2c217b4..3bff047f6b0f 100644 --- a/include/linux/ceph/messenger.h +++ b/include/linux/ceph/messenger.h | |||
| @@ -14,8 +14,6 @@ | |||
| 14 | struct ceph_msg; | 14 | struct ceph_msg; |
| 15 | struct ceph_connection; | 15 | struct ceph_connection; |
| 16 | 16 | ||
| 17 | extern struct workqueue_struct *ceph_msgr_wq; /* receive work queue */ | ||
| 18 | |||
| 19 | /* | 17 | /* |
| 20 | * Ceph defines these callbacks for handling connection events. | 18 | * Ceph defines these callbacks for handling connection events. |
| 21 | */ | 19 | */ |
| @@ -54,7 +52,6 @@ struct ceph_connection_operations { | |||
| 54 | struct ceph_messenger { | 52 | struct ceph_messenger { |
| 55 | struct ceph_entity_inst inst; /* my name+address */ | 53 | struct ceph_entity_inst inst; /* my name+address */ |
| 56 | struct ceph_entity_addr my_enc_addr; | 54 | struct ceph_entity_addr my_enc_addr; |
| 57 | struct page *zero_page; /* used in certain error cases */ | ||
| 58 | 55 | ||
| 59 | bool nocrc; | 56 | bool nocrc; |
| 60 | 57 | ||
| @@ -101,7 +98,7 @@ struct ceph_msg { | |||
| 101 | struct ceph_msg_pos { | 98 | struct ceph_msg_pos { |
| 102 | int page, page_pos; /* which page; offset in page */ | 99 | int page, page_pos; /* which page; offset in page */ |
| 103 | int data_pos; /* offset in data payload */ | 100 | int data_pos; /* offset in data payload */ |
| 104 | int did_page_crc; /* true if we've calculated crc for current page */ | 101 | bool did_page_crc; /* true if we've calculated crc for current page */ |
| 105 | }; | 102 | }; |
| 106 | 103 | ||
| 107 | /* ceph connection fault delay defaults, for exponential backoff */ | 104 | /* ceph connection fault delay defaults, for exponential backoff */ |
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 3fd17c249221..e5834aa24b9e 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
| @@ -87,7 +87,8 @@ | |||
| 87 | */ | 87 | */ |
| 88 | #define __pure __attribute__((pure)) | 88 | #define __pure __attribute__((pure)) |
| 89 | #define __aligned(x) __attribute__((aligned(x))) | 89 | #define __aligned(x) __attribute__((aligned(x))) |
| 90 | #define __printf(a,b) __attribute__((format(printf,a,b))) | 90 | #define __printf(a, b) __attribute__((format(printf, a, b))) |
| 91 | #define __scanf(a, b) __attribute__((format(scanf, a, b))) | ||
| 91 | #define noinline __attribute__((noinline)) | 92 | #define noinline __attribute__((noinline)) |
| 92 | #define __attribute_const__ __attribute__((__const__)) | 93 | #define __attribute_const__ __attribute__((__const__)) |
| 93 | #define __maybe_unused __attribute__((unused)) | 94 | #define __maybe_unused __attribute__((unused)) |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 6e53b4823d7f..ee28844ae68e 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
| @@ -14,11 +14,12 @@ | |||
| 14 | #ifndef _LINUX_CPU_H_ | 14 | #ifndef _LINUX_CPU_H_ |
| 15 | #define _LINUX_CPU_H_ | 15 | #define _LINUX_CPU_H_ |
| 16 | 16 | ||
| 17 | #include <linux/device.h> | ||
| 18 | #include <linux/node.h> | 17 | #include <linux/node.h> |
| 19 | #include <linux/compiler.h> | 18 | #include <linux/compiler.h> |
| 20 | #include <linux/cpumask.h> | 19 | #include <linux/cpumask.h> |
| 21 | 20 | ||
| 21 | struct device; | ||
| 22 | |||
| 22 | struct cpu { | 23 | struct cpu { |
| 23 | int node_id; /* The node which contains the CPU */ | 24 | int node_id; /* The node which contains the CPU */ |
| 24 | int hotpluggable; /* creates sysfs control file if hotpluggable */ | 25 | int hotpluggable; /* creates sysfs control file if hotpluggable */ |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 6216115c7789..b60f6ba01d0c 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
| @@ -14,7 +14,6 @@ | |||
| 14 | #include <linux/mutex.h> | 14 | #include <linux/mutex.h> |
| 15 | #include <linux/notifier.h> | 15 | #include <linux/notifier.h> |
| 16 | #include <linux/threads.h> | 16 | #include <linux/threads.h> |
| 17 | #include <linux/device.h> | ||
| 18 | #include <linux/kobject.h> | 17 | #include <linux/kobject.h> |
| 19 | #include <linux/sysfs.h> | 18 | #include <linux/sysfs.h> |
| 20 | #include <linux/completion.h> | 19 | #include <linux/completion.h> |
| @@ -35,6 +34,7 @@ | |||
| 35 | #ifdef CONFIG_CPU_FREQ | 34 | #ifdef CONFIG_CPU_FREQ |
| 36 | int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list); | 35 | int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list); |
| 37 | int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list); | 36 | int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list); |
| 37 | extern void disable_cpufreq(void); | ||
| 38 | #else /* CONFIG_CPU_FREQ */ | 38 | #else /* CONFIG_CPU_FREQ */ |
| 39 | static inline int cpufreq_register_notifier(struct notifier_block *nb, | 39 | static inline int cpufreq_register_notifier(struct notifier_block *nb, |
| 40 | unsigned int list) | 40 | unsigned int list) |
| @@ -46,6 +46,7 @@ static inline int cpufreq_unregister_notifier(struct notifier_block *nb, | |||
| 46 | { | 46 | { |
| 47 | return 0; | 47 | return 0; |
| 48 | } | 48 | } |
| 49 | static inline void disable_cpufreq(void) { } | ||
| 49 | #endif /* CONFIG_CPU_FREQ */ | 50 | #endif /* CONFIG_CPU_FREQ */ |
| 50 | 51 | ||
| 51 | /* if (cpufreq_driver->target) exists, the ->governor decides what frequency | 52 | /* if (cpufreq_driver->target) exists, the ->governor decides what frequency |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 4f7a63237471..7b9b75a529be 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
| 10 | #include <linux/threads.h> | 10 | #include <linux/threads.h> |
| 11 | #include <linux/bitmap.h> | 11 | #include <linux/bitmap.h> |
| 12 | #include <linux/bug.h> | ||
| 12 | 13 | ||
| 13 | typedef struct cpumask { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t; | 14 | typedef struct cpumask { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t; |
| 14 | 15 | ||
diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h index b936763f2236..37e4f8da7cdf 100644 --- a/include/linux/crash_dump.h +++ b/include/linux/crash_dump.h | |||
| @@ -3,7 +3,6 @@ | |||
| 3 | 3 | ||
| 4 | #ifdef CONFIG_CRASH_DUMP | 4 | #ifdef CONFIG_CRASH_DUMP |
| 5 | #include <linux/kexec.h> | 5 | #include <linux/kexec.h> |
| 6 | #include <linux/device.h> | ||
| 7 | #include <linux/proc_fs.h> | 6 | #include <linux/proc_fs.h> |
| 8 | #include <linux/elf.h> | 7 | #include <linux/elf.h> |
| 9 | 8 | ||
diff --git a/include/linux/crc32.h b/include/linux/crc32.h index 391a259b2cc9..68267b64bb98 100644 --- a/include/linux/crc32.h +++ b/include/linux/crc32.h | |||
| @@ -11,6 +11,8 @@ | |||
| 11 | extern u32 crc32_le(u32 crc, unsigned char const *p, size_t len); | 11 | extern u32 crc32_le(u32 crc, unsigned char const *p, size_t len); |
| 12 | extern u32 crc32_be(u32 crc, unsigned char const *p, size_t len); | 12 | extern u32 crc32_be(u32 crc, unsigned char const *p, size_t len); |
| 13 | 13 | ||
| 14 | extern u32 __crc32c_le(u32 crc, unsigned char const *p, size_t len); | ||
| 15 | |||
| 14 | #define crc32(seed, data, length) crc32_le(seed, (unsigned char const *)(data), length) | 16 | #define crc32(seed, data, length) crc32_le(seed, (unsigned char const *)(data), length) |
| 15 | 17 | ||
| 16 | /* | 18 | /* |
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 48ce5479386c..b92eadf92d72 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include <linux/atomic.h> | 20 | #include <linux/atomic.h> |
| 21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
| 22 | #include <linux/list.h> | 22 | #include <linux/list.h> |
| 23 | #include <linux/bug.h> | ||
| 23 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
| 24 | #include <linux/string.h> | 25 | #include <linux/string.h> |
| 25 | #include <linux/uaccess.h> | 26 | #include <linux/uaccess.h> |
diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h index 5033fb88c107..94f20c1488a1 100644 --- a/include/linux/debug_locks.h +++ b/include/linux/debug_locks.h | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
| 5 | #include <linux/atomic.h> | 5 | #include <linux/atomic.h> |
| 6 | #include <linux/bug.h> | ||
| 6 | #include <asm/system.h> | 7 | #include <asm/system.h> |
| 7 | 8 | ||
| 8 | struct task_struct; | 9 | struct task_struct; |
diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h index f8ac076afa52..887dcd487062 100644 --- a/include/linux/dma-buf.h +++ b/include/linux/dma-buf.h | |||
| @@ -26,11 +26,11 @@ | |||
| 26 | 26 | ||
| 27 | #include <linux/file.h> | 27 | #include <linux/file.h> |
| 28 | #include <linux/err.h> | 28 | #include <linux/err.h> |
| 29 | #include <linux/device.h> | ||
| 30 | #include <linux/scatterlist.h> | 29 | #include <linux/scatterlist.h> |
| 31 | #include <linux/list.h> | 30 | #include <linux/list.h> |
| 32 | #include <linux/dma-mapping.h> | 31 | #include <linux/dma-mapping.h> |
| 33 | 32 | ||
| 33 | struct device; | ||
| 34 | struct dma_buf; | 34 | struct dma_buf; |
| 35 | struct dma_buf_attachment; | 35 | struct dma_buf_attachment; |
| 36 | 36 | ||
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 679b349d9b66..a5966f691ef8 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | 23 | ||
| 24 | #include <linux/device.h> | 24 | #include <linux/device.h> |
| 25 | #include <linux/uio.h> | 25 | #include <linux/uio.h> |
| 26 | #include <linux/bug.h> | ||
| 26 | #include <linux/scatterlist.h> | 27 | #include <linux/scatterlist.h> |
| 27 | #include <linux/bitmap.h> | 28 | #include <linux/bitmap.h> |
| 28 | #include <asm/page.h> | 29 | #include <asm/page.h> |
diff --git a/include/linux/edac.h b/include/linux/edac.h index 1cd3947987e5..ba317e2930a1 100644 --- a/include/linux/edac.h +++ b/include/linux/edac.h | |||
| @@ -13,7 +13,11 @@ | |||
| 13 | #define _LINUX_EDAC_H_ | 13 | #define _LINUX_EDAC_H_ |
| 14 | 14 | ||
| 15 | #include <linux/atomic.h> | 15 | #include <linux/atomic.h> |
| 16 | #include <linux/device.h> | 16 | #include <linux/kobject.h> |
| 17 | #include <linux/completion.h> | ||
| 18 | #include <linux/workqueue.h> | ||
| 19 | |||
| 20 | struct device; | ||
| 17 | 21 | ||
| 18 | #define EDAC_OPSTATE_INVAL -1 | 22 | #define EDAC_OPSTATE_INVAL -1 |
| 19 | #define EDAC_OPSTATE_POLL 0 | 23 | #define EDAC_OPSTATE_POLL 0 |
diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h index 394a3e0e4a6b..0698c79fbcb2 100644 --- a/include/linux/elfcore.h +++ b/include/linux/elfcore.h | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | #include <linux/time.h> | 6 | #include <linux/time.h> |
| 7 | #ifdef __KERNEL__ | 7 | #ifdef __KERNEL__ |
| 8 | #include <linux/user.h> | 8 | #include <linux/user.h> |
| 9 | #include <linux/bug.h> | ||
| 9 | #endif | 10 | #endif |
| 10 | #include <linux/ptrace.h> | 11 | #include <linux/ptrace.h> |
| 11 | #include <linux/elf.h> | 12 | #include <linux/elf.h> |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index f957085d40ed..f5a84eef6ed2 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_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/bug.h> | ||
| 21 | 22 | ||
| 22 | /* | 23 | /* |
| 23 | * The second extended filesystem constants/structures | 24 | * The second extended filesystem constants/structures |
diff --git a/include/linux/fb.h b/include/linux/fb.h index a395b8c76992..d31cb682e173 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
| @@ -407,7 +407,6 @@ struct fb_cursor { | |||
| 407 | 407 | ||
| 408 | #include <linux/fs.h> | 408 | #include <linux/fs.h> |
| 409 | #include <linux/init.h> | 409 | #include <linux/init.h> |
| 410 | #include <linux/device.h> | ||
| 411 | #include <linux/workqueue.h> | 410 | #include <linux/workqueue.h> |
| 412 | #include <linux/notifier.h> | 411 | #include <linux/notifier.h> |
| 413 | #include <linux/list.h> | 412 | #include <linux/list.h> |
diff --git a/include/linux/firewire-cdev.h b/include/linux/firewire-cdev.h index 357dbfc2829e..d50036953497 100644 --- a/include/linux/firewire-cdev.h +++ b/include/linux/firewire-cdev.h | |||
| @@ -207,12 +207,16 @@ struct fw_cdev_event_request2 { | |||
| 207 | * @closure: See &fw_cdev_event_common; | 207 | * @closure: See &fw_cdev_event_common; |
| 208 | * set by %FW_CDEV_CREATE_ISO_CONTEXT ioctl | 208 | * set by %FW_CDEV_CREATE_ISO_CONTEXT ioctl |
| 209 | * @type: See &fw_cdev_event_common; always %FW_CDEV_EVENT_ISO_INTERRUPT | 209 | * @type: See &fw_cdev_event_common; always %FW_CDEV_EVENT_ISO_INTERRUPT |
| 210 | * @cycle: Cycle counter of the interrupt packet | 210 | * @cycle: Cycle counter of the last completed packet |
| 211 | * @header_length: Total length of following headers, in bytes | 211 | * @header_length: Total length of following headers, in bytes |
| 212 | * @header: Stripped headers, if any | 212 | * @header: Stripped headers, if any |
| 213 | * | 213 | * |
| 214 | * This event is sent when the controller has completed an &fw_cdev_iso_packet | 214 | * This event is sent when the controller has completed an &fw_cdev_iso_packet |
| 215 | * with the %FW_CDEV_ISO_INTERRUPT bit set. | 215 | * with the %FW_CDEV_ISO_INTERRUPT bit set, when explicitly requested with |
| 216 | * %FW_CDEV_IOC_FLUSH_ISO, or when there have been so many completed packets | ||
| 217 | * without the interrupt bit set that the kernel's internal buffer for @header | ||
| 218 | * is about to overflow. (In the last case, kernels with ABI version < 5 drop | ||
| 219 | * header data up to the next interrupt packet.) | ||
| 216 | * | 220 | * |
| 217 | * Isochronous transmit events (context type %FW_CDEV_ISO_CONTEXT_TRANSMIT): | 221 | * Isochronous transmit events (context type %FW_CDEV_ISO_CONTEXT_TRANSMIT): |
| 218 | * | 222 | * |
| @@ -267,9 +271,9 @@ struct fw_cdev_event_iso_interrupt { | |||
| 267 | * | 271 | * |
| 268 | * This event is sent in multichannel contexts (context type | 272 | * This event is sent in multichannel contexts (context type |
| 269 | * %FW_CDEV_ISO_CONTEXT_RECEIVE_MULTICHANNEL) for &fw_cdev_iso_packet buffer | 273 | * %FW_CDEV_ISO_CONTEXT_RECEIVE_MULTICHANNEL) for &fw_cdev_iso_packet buffer |
| 270 | * chunks that have the %FW_CDEV_ISO_INTERRUPT bit set. Whether this happens | 274 | * chunks that have been completely filled and that have the |
| 271 | * when a packet is completed and/or when a buffer chunk is completed depends | 275 | * %FW_CDEV_ISO_INTERRUPT bit set, or when explicitly requested with |
| 272 | * on the hardware implementation. | 276 | * %FW_CDEV_IOC_FLUSH_ISO. |
| 273 | * | 277 | * |
| 274 | * The buffer is continuously filled with the following data, per packet: | 278 | * The buffer is continuously filled with the following data, per packet: |
| 275 | * - the 1394 iso packet header as described at &fw_cdev_event_iso_interrupt, | 279 | * - the 1394 iso packet header as described at &fw_cdev_event_iso_interrupt, |
| @@ -419,6 +423,9 @@ union fw_cdev_event { | |||
| 419 | #define FW_CDEV_IOC_RECEIVE_PHY_PACKETS _IOW('#', 0x16, struct fw_cdev_receive_phy_packets) | 423 | #define FW_CDEV_IOC_RECEIVE_PHY_PACKETS _IOW('#', 0x16, struct fw_cdev_receive_phy_packets) |
| 420 | #define FW_CDEV_IOC_SET_ISO_CHANNELS _IOW('#', 0x17, struct fw_cdev_set_iso_channels) | 424 | #define FW_CDEV_IOC_SET_ISO_CHANNELS _IOW('#', 0x17, struct fw_cdev_set_iso_channels) |
| 421 | 425 | ||
| 426 | /* available since kernel version 3.4 */ | ||
| 427 | #define FW_CDEV_IOC_FLUSH_ISO _IOW('#', 0x18, struct fw_cdev_flush_iso) | ||
| 428 | |||
| 422 | /* | 429 | /* |
| 423 | * ABI version history | 430 | * ABI version history |
| 424 | * 1 (2.6.22) - initial version | 431 | * 1 (2.6.22) - initial version |
| @@ -441,6 +448,9 @@ union fw_cdev_event { | |||
| 441 | * - added %FW_CDEV_EVENT_ISO_INTERRUPT_MULTICHANNEL, | 448 | * - added %FW_CDEV_EVENT_ISO_INTERRUPT_MULTICHANNEL, |
| 442 | * %FW_CDEV_ISO_CONTEXT_RECEIVE_MULTICHANNEL, and | 449 | * %FW_CDEV_ISO_CONTEXT_RECEIVE_MULTICHANNEL, and |
| 443 | * %FW_CDEV_IOC_SET_ISO_CHANNELS | 450 | * %FW_CDEV_IOC_SET_ISO_CHANNELS |
| 451 | * 5 (3.4) - send %FW_CDEV_EVENT_ISO_INTERRUPT events when needed to | ||
| 452 | * avoid dropping data | ||
| 453 | * - added %FW_CDEV_IOC_FLUSH_ISO | ||
| 444 | */ | 454 | */ |
| 445 | 455 | ||
| 446 | /** | 456 | /** |
| @@ -851,6 +861,25 @@ struct fw_cdev_stop_iso { | |||
| 851 | }; | 861 | }; |
| 852 | 862 | ||
| 853 | /** | 863 | /** |
| 864 | * struct fw_cdev_flush_iso - flush completed iso packets | ||
| 865 | * @handle: handle of isochronous context to flush | ||
| 866 | * | ||
| 867 | * For %FW_CDEV_ISO_CONTEXT_TRANSMIT or %FW_CDEV_ISO_CONTEXT_RECEIVE contexts, | ||
| 868 | * report any completed packets. | ||
| 869 | * | ||
| 870 | * For %FW_CDEV_ISO_CONTEXT_RECEIVE_MULTICHANNEL contexts, report the current | ||
| 871 | * offset in the receive buffer, if it has changed; this is typically in the | ||
| 872 | * middle of some buffer chunk. | ||
| 873 | * | ||
| 874 | * Any %FW_CDEV_EVENT_ISO_INTERRUPT or %FW_CDEV_EVENT_ISO_INTERRUPT_MULTICHANNEL | ||
| 875 | * events generated by this ioctl are sent synchronously, i.e., are available | ||
| 876 | * for reading from the file descriptor when this ioctl returns. | ||
| 877 | */ | ||
| 878 | struct fw_cdev_flush_iso { | ||
| 879 | __u32 handle; | ||
| 880 | }; | ||
| 881 | |||
| 882 | /** | ||
| 854 | * struct fw_cdev_get_cycle_timer - read cycle timer register | 883 | * struct fw_cdev_get_cycle_timer - read cycle timer register |
| 855 | * @local_time: system time, in microseconds since the Epoch | 884 | * @local_time: system time, in microseconds since the Epoch |
| 856 | * @cycle_timer: Cycle Time register contents | 885 | * @cycle_timer: Cycle Time register contents |
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index 84ccf8e04fa6..4db7b68f0582 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h | |||
| @@ -2,7 +2,6 @@ | |||
| 2 | #define _LINUX_FIREWIRE_H | 2 | #define _LINUX_FIREWIRE_H |
| 3 | 3 | ||
| 4 | #include <linux/completion.h> | 4 | #include <linux/completion.h> |
| 5 | #include <linux/device.h> | ||
| 6 | #include <linux/dma-mapping.h> | 5 | #include <linux/dma-mapping.h> |
| 7 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
| 8 | #include <linux/kref.h> | 7 | #include <linux/kref.h> |
| @@ -17,9 +16,6 @@ | |||
| 17 | #include <linux/atomic.h> | 16 | #include <linux/atomic.h> |
| 18 | #include <asm/byteorder.h> | 17 | #include <asm/byteorder.h> |
| 19 | 18 | ||
| 20 | #define fw_notify(s, args...) printk(KERN_NOTICE KBUILD_MODNAME ": " s, ## args) | ||
| 21 | #define fw_error(s, args...) printk(KERN_ERR KBUILD_MODNAME ": " s, ## args) | ||
| 22 | |||
| 23 | #define CSR_REGISTER_BASE 0xfffff0000000ULL | 19 | #define CSR_REGISTER_BASE 0xfffff0000000ULL |
| 24 | 20 | ||
| 25 | /* register offsets are relative to CSR_REGISTER_BASE */ | 21 | /* register offsets are relative to CSR_REGISTER_BASE */ |
| @@ -68,6 +64,8 @@ | |||
| 68 | #define CSR_MODEL 0x17 | 64 | #define CSR_MODEL 0x17 |
| 69 | #define CSR_DIRECTORY_ID 0x20 | 65 | #define CSR_DIRECTORY_ID 0x20 |
| 70 | 66 | ||
| 67 | struct device; | ||
| 68 | |||
| 71 | struct fw_csr_iterator { | 69 | struct fw_csr_iterator { |
| 72 | const u32 *p; | 70 | const u32 *p; |
| 73 | const u32 *end; | 71 | const u32 *end; |
| @@ -203,18 +201,6 @@ static inline int fw_device_is_shutdown(struct fw_device *device) | |||
| 203 | return atomic_read(&device->state) == FW_DEVICE_SHUTDOWN; | 201 | return atomic_read(&device->state) == FW_DEVICE_SHUTDOWN; |
| 204 | } | 202 | } |
| 205 | 203 | ||
| 206 | static inline struct fw_device *fw_device_get(struct fw_device *device) | ||
| 207 | { | ||
| 208 | get_device(&device->device); | ||
| 209 | |||
| 210 | return device; | ||
| 211 | } | ||
| 212 | |||
| 213 | static inline void fw_device_put(struct fw_device *device) | ||
| 214 | { | ||
| 215 | put_device(&device->device); | ||
| 216 | } | ||
| 217 | |||
| 218 | int fw_device_enable_phys_dma(struct fw_device *device); | 204 | int fw_device_enable_phys_dma(struct fw_device *device); |
| 219 | 205 | ||
| 220 | /* | 206 | /* |
| @@ -441,6 +427,7 @@ int fw_iso_context_queue(struct fw_iso_context *ctx, | |||
| 441 | struct fw_iso_buffer *buffer, | 427 | struct fw_iso_buffer *buffer, |
| 442 | unsigned long payload); | 428 | unsigned long payload); |
| 443 | void fw_iso_context_queue_flush(struct fw_iso_context *ctx); | 429 | void fw_iso_context_queue_flush(struct fw_iso_context *ctx); |
| 430 | int fw_iso_context_flush_completions(struct fw_iso_context *ctx); | ||
| 444 | int fw_iso_context_start(struct fw_iso_context *ctx, | 431 | int fw_iso_context_start(struct fw_iso_context *ctx, |
| 445 | int cycle, int sync, int tags); | 432 | int cycle, int sync, int tags); |
| 446 | int fw_iso_context_stop(struct fw_iso_context *ctx); | 433 | int fw_iso_context_stop(struct fw_iso_context *ctx); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 9bbe1a9ac432..c437f914d537 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -389,6 +389,7 @@ struct inodes_stat_t { | |||
| 389 | #include <linux/prio_tree.h> | 389 | #include <linux/prio_tree.h> |
| 390 | #include <linux/init.h> | 390 | #include <linux/init.h> |
| 391 | #include <linux/pid.h> | 391 | #include <linux/pid.h> |
| 392 | #include <linux/bug.h> | ||
| 392 | #include <linux/mutex.h> | 393 | #include <linux/mutex.h> |
| 393 | #include <linux/capability.h> | 394 | #include <linux/capability.h> |
| 394 | #include <linux/semaphore.h> | 395 | #include <linux/semaphore.h> |
| @@ -1871,19 +1872,6 @@ extern struct dentry *mount_pseudo(struct file_system_type *, char *, | |||
| 1871 | const struct dentry_operations *dops, | 1872 | const struct dentry_operations *dops, |
| 1872 | unsigned long); | 1873 | unsigned long); |
| 1873 | 1874 | ||
| 1874 | static inline void sb_mark_dirty(struct super_block *sb) | ||
| 1875 | { | ||
| 1876 | sb->s_dirt = 1; | ||
| 1877 | } | ||
| 1878 | static inline void sb_mark_clean(struct super_block *sb) | ||
| 1879 | { | ||
| 1880 | sb->s_dirt = 0; | ||
| 1881 | } | ||
| 1882 | static inline int sb_is_dirty(struct super_block *sb) | ||
| 1883 | { | ||
| 1884 | return sb->s_dirt; | ||
| 1885 | } | ||
| 1886 | |||
| 1887 | /* Alas, no aliases. Too much hassle with bringing module.h everywhere */ | 1875 | /* Alas, no aliases. Too much hassle with bringing module.h everywhere */ |
| 1888 | #define fops_get(fops) \ | 1876 | #define fops_get(fops) \ |
| 1889 | (((fops) && try_module_get((fops)->owner) ? (fops) : NULL)) | 1877 | (((fops) && try_module_get((fops)->owner) ? (fops) : NULL)) |
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index 2a53f10712b3..a6dfe6944564 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <linux/fsnotify_backend.h> | 14 | #include <linux/fsnotify_backend.h> |
| 15 | #include <linux/audit.h> | 15 | #include <linux/audit.h> |
| 16 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
| 17 | #include <linux/bug.h> | ||
| 17 | 18 | ||
| 18 | /* | 19 | /* |
| 19 | * fsnotify_d_instantiate - instantiate a dentry for inode | 20 | * fsnotify_d_instantiate - instantiate a dentry for inode |
diff --git a/include/linux/gpio.h b/include/linux/gpio.h index 38ac48b7d3a8..ed5a46707ad0 100644 --- a/include/linux/gpio.h +++ b/include/linux/gpio.h | |||
| @@ -34,6 +34,7 @@ struct gpio { | |||
| 34 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
| 35 | #include <linux/types.h> | 35 | #include <linux/types.h> |
| 36 | #include <linux/errno.h> | 36 | #include <linux/errno.h> |
| 37 | #include <linux/bug.h> | ||
| 37 | 38 | ||
| 38 | struct device; | 39 | struct device; |
| 39 | struct gpio_chip; | 40 | struct gpio_chip; |
diff --git a/include/linux/highmem.h b/include/linux/highmem.h index 6549ed75e0a7..d3999b4e26cc 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/fs.h> | 4 | #include <linux/fs.h> |
| 5 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
| 6 | #include <linux/bug.h> | ||
| 6 | #include <linux/mm.h> | 7 | #include <linux/mm.h> |
| 7 | #include <linux/uaccess.h> | 8 | #include <linux/uaccess.h> |
| 8 | #include <linux/hardirq.h> | 9 | #include <linux/hardirq.h> |
diff --git a/include/linux/hwmon-sysfs.h b/include/linux/hwmon-sysfs.h index a90c09d331c1..1c7b89ae6bdc 100644 --- a/include/linux/hwmon-sysfs.h +++ b/include/linux/hwmon-sysfs.h | |||
| @@ -20,6 +20,8 @@ | |||
| 20 | #ifndef _LINUX_HWMON_SYSFS_H | 20 | #ifndef _LINUX_HWMON_SYSFS_H |
| 21 | #define _LINUX_HWMON_SYSFS_H | 21 | #define _LINUX_HWMON_SYSFS_H |
| 22 | 22 | ||
| 23 | #include <linux/device.h> | ||
| 24 | |||
| 23 | struct sensor_device_attribute{ | 25 | struct sensor_device_attribute{ |
| 24 | struct device_attribute dev_attr; | 26 | struct device_attribute dev_attr; |
| 25 | int index; | 27 | int index; |
diff --git a/include/linux/hwmon.h b/include/linux/hwmon.h index 6b6ee702b007..82b29ae6ebb0 100644 --- a/include/linux/hwmon.h +++ b/include/linux/hwmon.h | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | #ifndef _HWMON_H_ | 14 | #ifndef _HWMON_H_ |
| 15 | #define _HWMON_H_ | 15 | #define _HWMON_H_ |
| 16 | 16 | ||
| 17 | #include <linux/device.h> | 17 | struct device; |
| 18 | 18 | ||
| 19 | struct device *hwmon_device_register(struct device *dev); | 19 | struct device *hwmon_device_register(struct device *dev); |
| 20 | 20 | ||
diff --git a/include/linux/hwspinlock.h b/include/linux/hwspinlock.h index aad6bd4b3efd..3343298e40e8 100644 --- a/include/linux/hwspinlock.h +++ b/include/linux/hwspinlock.h | |||
| @@ -20,12 +20,12 @@ | |||
| 20 | 20 | ||
| 21 | #include <linux/err.h> | 21 | #include <linux/err.h> |
| 22 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
| 23 | #include <linux/device.h> | ||
| 24 | 23 | ||
| 25 | /* hwspinlock mode argument */ | 24 | /* hwspinlock mode argument */ |
| 26 | #define HWLOCK_IRQSTATE 0x01 /* Disable interrupts, save state */ | 25 | #define HWLOCK_IRQSTATE 0x01 /* Disable interrupts, save state */ |
| 27 | #define HWLOCK_IRQ 0x02 /* Disable interrupts, don't save state */ | 26 | #define HWLOCK_IRQ 0x02 /* Disable interrupts, don't save state */ |
| 28 | 27 | ||
| 28 | struct device; | ||
| 29 | struct hwspinlock; | 29 | struct hwspinlock; |
| 30 | struct hwspinlock_device; | 30 | struct hwspinlock_device; |
| 31 | struct hwspinlock_ops; | 31 | struct hwspinlock_ops; |
diff --git a/include/linux/i2c/at24.h b/include/linux/i2c/at24.h index 8ace93024d60..285025a9cdc9 100644 --- a/include/linux/i2c/at24.h +++ b/include/linux/i2c/at24.h | |||
| @@ -1,19 +1,42 @@ | |||
| 1 | /* | ||
| 2 | * at24.h - platform_data for the at24 (generic eeprom) driver | ||
| 3 | * (C) Copyright 2008 by Pengutronix | ||
| 4 | * (C) Copyright 2012 by Wolfram Sang | ||
| 5 | * same license as the driver | ||
| 6 | */ | ||
| 7 | |||
| 1 | #ifndef _LINUX_AT24_H | 8 | #ifndef _LINUX_AT24_H |
| 2 | #define _LINUX_AT24_H | 9 | #define _LINUX_AT24_H |
| 3 | 10 | ||
| 4 | #include <linux/types.h> | 11 | #include <linux/types.h> |
| 5 | #include <linux/memory.h> | 12 | #include <linux/memory.h> |
| 6 | 13 | ||
| 7 | /* | 14 | /** |
| 8 | * As seen through Linux I2C, differences between the most common types of I2C | 15 | * struct at24_platform_data - data to set up at24 (generic eeprom) driver |
| 9 | * memory include: | 16 | * @byte_len: size of eeprom in byte |
| 10 | * - How much memory is available (usually specified in bit)? | 17 | * @page_size: number of byte which can be written in one go |
| 11 | * - What write page size does it support? | 18 | * @flags: tunable options, check AT24_FLAG_* defines |
| 12 | * - Special flags (16 bit addresses, read_only, world readable...)? | 19 | * @setup: an optional callback invoked after eeprom is probed; enables kernel |
| 20 | code to access eeprom via memory_accessor, see example | ||
| 21 | * @context: optional parameter passed to setup() | ||
| 13 | * | 22 | * |
| 14 | * If you set up a custom eeprom type, please double-check the parameters. | 23 | * If you set up a custom eeprom type, please double-check the parameters. |
| 15 | * Especially page_size needs extra care, as you risk data loss if your value | 24 | * Especially page_size needs extra care, as you risk data loss if your value |
| 16 | * is bigger than what the chip actually supports! | 25 | * is bigger than what the chip actually supports! |
| 26 | * | ||
| 27 | * An example in pseudo code for a setup() callback: | ||
| 28 | * | ||
| 29 | * void get_mac_addr(struct memory_accessor *mem_acc, void *context) | ||
| 30 | * { | ||
| 31 | * u8 *mac_addr = ethernet_pdata->mac_addr; | ||
| 32 | * off_t offset = context; | ||
| 33 | * | ||
| 34 | * // Read MAC addr from EEPROM | ||
| 35 | * if (mem_acc->read(mem_acc, mac_addr, offset, ETH_ALEN) == ETH_ALEN) | ||
| 36 | * pr_info("Read MAC addr from EEPROM: %pM\n", mac_addr); | ||
| 37 | * } | ||
| 38 | * | ||
| 39 | * This function pointer and context can now be set up in at24_platform_data. | ||
| 17 | */ | 40 | */ |
| 18 | 41 | ||
| 19 | struct at24_platform_data { | 42 | struct at24_platform_data { |
diff --git a/include/linux/i2o.h b/include/linux/i2o.h index a6deef4f4f67..d23c3c20b201 100644 --- a/include/linux/i2o.h +++ b/include/linux/i2o.h | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #define I2O_MAX_DRIVERS 8 | 24 | #define I2O_MAX_DRIVERS 8 |
| 25 | 25 | ||
| 26 | #include <linux/pci.h> | 26 | #include <linux/pci.h> |
| 27 | #include <linux/bug.h> | ||
| 27 | #include <linux/dma-mapping.h> | 28 | #include <linux/dma-mapping.h> |
| 28 | #include <linux/string.h> | 29 | #include <linux/string.h> |
| 29 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 501370b61ee5..7afe15f916da 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
| @@ -14,7 +14,6 @@ | |||
| 14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
| 15 | #include <linux/bitops.h> | 15 | #include <linux/bitops.h> |
| 16 | #include <linux/bio.h> | 16 | #include <linux/bio.h> |
| 17 | #include <linux/device.h> | ||
| 18 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
| 19 | #include <linux/completion.h> | 18 | #include <linux/completion.h> |
| 20 | #include <linux/pm.h> | 19 | #include <linux/pm.h> |
| @@ -43,6 +42,8 @@ | |||
| 43 | #define ERROR_RESET 3 /* Reset controller every 4th retry */ | 42 | #define ERROR_RESET 3 /* Reset controller every 4th retry */ |
| 44 | #define ERROR_RECAL 1 /* Recalibrate every 2nd retry */ | 43 | #define ERROR_RECAL 1 /* Recalibrate every 2nd retry */ |
| 45 | 44 | ||
| 45 | struct device; | ||
| 46 | |||
| 46 | /* Error codes returned in rq->errors to the higher part of the driver. */ | 47 | /* Error codes returned in rq->errors to the higher part of the driver. */ |
| 47 | enum { | 48 | enum { |
| 48 | IDE_DRV_ERROR_GENERAL = 101, | 49 | IDE_DRV_ERROR_GENERAL = 101, |
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 33a6e1951d4d..a810987cb80e 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #include <linux/netdevice.h> | 17 | #include <linux/netdevice.h> |
| 18 | #include <linux/etherdevice.h> | 18 | #include <linux/etherdevice.h> |
| 19 | #include <linux/rtnetlink.h> | 19 | #include <linux/rtnetlink.h> |
| 20 | #include <linux/bug.h> | ||
| 20 | 21 | ||
| 21 | #define VLAN_HLEN 4 /* The additional bytes required by VLAN | 22 | #define VLAN_HLEN 4 /* The additional bytes required by VLAN |
| 22 | * (in addition to the Ethernet header) | 23 | * (in addition to the Ethernet header) |
diff --git a/include/linux/input.h b/include/linux/input.h index 3862e32c4eeb..a81671453575 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
| @@ -114,6 +114,31 @@ struct input_keymap_entry { | |||
| 114 | #define EVIOCGUNIQ(len) _IOC(_IOC_READ, 'E', 0x08, len) /* get unique identifier */ | 114 | #define EVIOCGUNIQ(len) _IOC(_IOC_READ, 'E', 0x08, len) /* get unique identifier */ |
| 115 | #define EVIOCGPROP(len) _IOC(_IOC_READ, 'E', 0x09, len) /* get device properties */ | 115 | #define EVIOCGPROP(len) _IOC(_IOC_READ, 'E', 0x09, len) /* get device properties */ |
| 116 | 116 | ||
| 117 | /** | ||
| 118 | * EVIOCGMTSLOTS(len) - get MT slot values | ||
| 119 | * | ||
| 120 | * The ioctl buffer argument should be binary equivalent to | ||
| 121 | * | ||
| 122 | * struct input_mt_request_layout { | ||
| 123 | * __u32 code; | ||
| 124 | * __s32 values[num_slots]; | ||
| 125 | * }; | ||
| 126 | * | ||
| 127 | * where num_slots is the (arbitrary) number of MT slots to extract. | ||
| 128 | * | ||
| 129 | * The ioctl size argument (len) is the size of the buffer, which | ||
| 130 | * should satisfy len = (num_slots + 1) * sizeof(__s32). If len is | ||
| 131 | * too small to fit all available slots, the first num_slots are | ||
| 132 | * returned. | ||
| 133 | * | ||
| 134 | * Before the call, code is set to the wanted ABS_MT event type. On | ||
| 135 | * return, values[] is filled with the slot values for the specified | ||
| 136 | * ABS_MT code. | ||
| 137 | * | ||
| 138 | * If the request code is not an ABS_MT value, -EINVAL is returned. | ||
| 139 | */ | ||
| 140 | #define EVIOCGMTSLOTS(len) _IOC(_IOC_READ, 'E', 0x0a, len) | ||
| 141 | |||
| 117 | #define EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len) /* get global key state */ | 142 | #define EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len) /* get global key state */ |
| 118 | #define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len) /* get all LEDs */ | 143 | #define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len) /* get all LEDs */ |
| 119 | #define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len) /* get all sounds status */ | 144 | #define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len) /* get all sounds status */ |
| @@ -129,6 +154,8 @@ struct input_keymap_entry { | |||
| 129 | 154 | ||
| 130 | #define EVIOCGRAB _IOW('E', 0x90, int) /* Grab/Release device */ | 155 | #define EVIOCGRAB _IOW('E', 0x90, int) /* Grab/Release device */ |
| 131 | 156 | ||
| 157 | #define EVIOCSCLOCKID _IOW('E', 0xa0, int) /* Set clockid to be used for timestamps */ | ||
| 158 | |||
| 132 | /* | 159 | /* |
| 133 | * Device properties and quirks | 160 | * Device properties and quirks |
| 134 | */ | 161 | */ |
diff --git a/include/linux/input/cyttsp.h b/include/linux/input/cyttsp.h new file mode 100644 index 000000000000..5af7c66f1fca --- /dev/null +++ b/include/linux/input/cyttsp.h | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | /* | ||
| 2 | * Header file for: | ||
| 3 | * Cypress TrueTouch(TM) Standard Product (TTSP) touchscreen drivers. | ||
| 4 | * For use with Cypress Txx3xx parts. | ||
| 5 | * Supported parts include: | ||
| 6 | * CY8CTST341 | ||
| 7 | * CY8CTMA340 | ||
| 8 | * | ||
| 9 | * Copyright (C) 2009, 2010, 2011 Cypress Semiconductor, Inc. | ||
| 10 | * Copyright (C) 2012 Javier Martinez Canillas <javier@dowhile0.org> | ||
| 11 | * | ||
| 12 | * This program is free software; you can redistribute it and/or | ||
| 13 | * modify it under the terms of the GNU General Public License | ||
| 14 | * version 2, and only version 2, as published by the | ||
| 15 | * Free Software Foundation. | ||
| 16 | * | ||
| 17 | * This program is distributed in the hope that it will be useful, | ||
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 20 | * GNU General Public License for more details. | ||
| 21 | * | ||
| 22 | * You should have received a copy of the GNU General Public License along | ||
| 23 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 24 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
| 25 | * | ||
| 26 | * Contact Cypress Semiconductor at www.cypress.com (kev@cypress.com) | ||
| 27 | * | ||
| 28 | */ | ||
| 29 | #ifndef _CYTTSP_H_ | ||
| 30 | #define _CYTTSP_H_ | ||
| 31 | |||
| 32 | #define CY_SPI_NAME "cyttsp-spi" | ||
| 33 | #define CY_I2C_NAME "cyttsp-i2c" | ||
| 34 | /* Active Power state scanning/processing refresh interval */ | ||
| 35 | #define CY_ACT_INTRVL_DFLT 0x00 /* ms */ | ||
| 36 | /* touch timeout for the Active power */ | ||
| 37 | #define CY_TCH_TMOUT_DFLT 0xFF /* ms */ | ||
| 38 | /* Low Power state scanning/processing refresh interval */ | ||
| 39 | #define CY_LP_INTRVL_DFLT 0x0A /* ms */ | ||
| 40 | /* Active distance in pixels for a gesture to be reported */ | ||
| 41 | #define CY_ACT_DIST_DFLT 0xF8 /* pixels */ | ||
| 42 | |||
| 43 | struct cyttsp_platform_data { | ||
| 44 | u32 maxx; | ||
| 45 | u32 maxy; | ||
| 46 | bool use_hndshk; | ||
| 47 | u8 act_dist; /* Active distance */ | ||
| 48 | u8 act_intrvl; /* Active refresh interval; ms */ | ||
| 49 | u8 tch_tmout; /* Active touch timeout; ms */ | ||
| 50 | u8 lp_intrvl; /* Low power refresh interval; ms */ | ||
| 51 | int (*init)(void); | ||
| 52 | void (*exit)(void); | ||
| 53 | char *name; | ||
| 54 | s16 irq_gpio; | ||
| 55 | u8 *bl_keys; | ||
| 56 | }; | ||
| 57 | |||
| 58 | #endif /* _CYTTSP_H_ */ | ||
diff --git a/include/linux/input/ili210x.h b/include/linux/input/ili210x.h new file mode 100644 index 000000000000..a5471245a13c --- /dev/null +++ b/include/linux/input/ili210x.h | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | #ifndef _ILI210X_H | ||
| 2 | #define _ILI210X_H | ||
| 3 | |||
| 4 | struct ili210x_platform_data { | ||
| 5 | unsigned long irq_flags; | ||
| 6 | unsigned int poll_period; | ||
| 7 | bool (*get_pendown_state)(void); | ||
| 8 | }; | ||
| 9 | |||
| 10 | #endif | ||
diff --git a/include/linux/input/kxtj9.h b/include/linux/input/kxtj9.h index f6bac89537b8..d415579b56fe 100644 --- a/include/linux/input/kxtj9.h +++ b/include/linux/input/kxtj9.h | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | 24 | ||
| 25 | struct kxtj9_platform_data { | 25 | struct kxtj9_platform_data { |
| 26 | unsigned int min_interval; /* minimum poll interval (in milli-seconds) */ | 26 | unsigned int min_interval; /* minimum poll interval (in milli-seconds) */ |
| 27 | unsigned int init_interval; /* initial poll interval (in milli-seconds) */ | ||
| 27 | 28 | ||
| 28 | /* | 29 | /* |
| 29 | * By default, x is axis 0, y is axis 1, z is axis 2; these can be | 30 | * By default, x is axis 0, y is axis 1, z is axis 2; these can be |
| @@ -52,16 +53,6 @@ struct kxtj9_platform_data { | |||
| 52 | #define KXTJ9_G_8G (1 << 4) | 53 | #define KXTJ9_G_8G (1 << 4) |
| 53 | u8 g_range; | 54 | u8 g_range; |
| 54 | 55 | ||
| 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); | 56 | int (*init)(void); |
| 66 | void (*exit)(void); | 57 | void (*exit)(void); |
| 67 | int (*power_on)(void); | 58 | int (*power_on)(void); |
diff --git a/include/linux/input/matrix_keypad.h b/include/linux/input/matrix_keypad.h index fe7c4b9ae270..6c07ced0af81 100644 --- a/include/linux/input/matrix_keypad.h +++ b/include/linux/input/matrix_keypad.h | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
| 5 | #include <linux/input.h> | 5 | #include <linux/input.h> |
| 6 | #include <linux/of.h> | ||
| 6 | 7 | ||
| 7 | #define MATRIX_MAX_ROWS 32 | 8 | #define MATRIX_MAX_ROWS 32 |
| 8 | #define MATRIX_MAX_COLS 32 | 9 | #define MATRIX_MAX_COLS 32 |
| @@ -106,4 +107,22 @@ matrix_keypad_build_keymap(const struct matrix_keymap_data *keymap_data, | |||
| 106 | __clear_bit(KEY_RESERVED, keybit); | 107 | __clear_bit(KEY_RESERVED, keybit); |
| 107 | } | 108 | } |
| 108 | 109 | ||
| 110 | #ifdef CONFIG_INPUT_OF_MATRIX_KEYMAP | ||
| 111 | struct matrix_keymap_data * | ||
| 112 | matrix_keyboard_of_fill_keymap(struct device_node *np, const char *propname); | ||
| 113 | |||
| 114 | void matrix_keyboard_of_free_keymap(const struct matrix_keymap_data *kd); | ||
| 115 | #else | ||
| 116 | static inline struct matrix_keymap_data * | ||
| 117 | matrix_keyboard_of_fill_keymap(struct device_node *np, const char *propname) | ||
| 118 | { | ||
| 119 | return NULL; | ||
| 120 | } | ||
| 121 | |||
| 122 | static inline void | ||
| 123 | matrix_keyboard_of_free_keymap(const struct matrix_keymap_data *kd) | ||
| 124 | { | ||
| 125 | } | ||
| 126 | #endif | ||
| 127 | |||
| 109 | #endif /* _MATRIX_KEYPAD_H */ | 128 | #endif /* _MATRIX_KEYPAD_H */ |
diff --git a/include/linux/input/mt.h b/include/linux/input/mt.h index 318bb82325a6..f86737586e19 100644 --- a/include/linux/input/mt.h +++ b/include/linux/input/mt.h | |||
| @@ -48,10 +48,14 @@ static inline void input_mt_slot(struct input_dev *dev, int slot) | |||
| 48 | input_event(dev, EV_ABS, ABS_MT_SLOT, slot); | 48 | input_event(dev, EV_ABS, ABS_MT_SLOT, slot); |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | static inline bool input_is_mt_value(int axis) | ||
| 52 | { | ||
| 53 | return axis >= ABS_MT_FIRST && axis <= ABS_MT_LAST; | ||
| 54 | } | ||
| 55 | |||
| 51 | static inline bool input_is_mt_axis(int axis) | 56 | static inline bool input_is_mt_axis(int axis) |
| 52 | { | 57 | { |
| 53 | return axis == ABS_MT_SLOT || | 58 | return axis == ABS_MT_SLOT || input_is_mt_value(axis); |
| 54 | (axis >= ABS_MT_FIRST && axis <= ABS_MT_LAST); | ||
| 55 | } | 59 | } |
| 56 | 60 | ||
| 57 | void input_mt_report_slot_state(struct input_dev *dev, | 61 | void input_mt_report_slot_state(struct input_dev *dev, |
diff --git a/include/linux/input/ti_tscadc.h b/include/linux/input/ti_tscadc.h new file mode 100644 index 000000000000..b10a527a92a4 --- /dev/null +++ b/include/linux/input/ti_tscadc.h | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | #ifndef __LINUX_TI_TSCADC_H | ||
| 2 | #define __LINUX_TI_TSCADC_H | ||
| 3 | |||
| 4 | /** | ||
| 5 | * struct tsc_data Touchscreen wire configuration | ||
| 6 | * @wires: Wires refer to application modes | ||
| 7 | * i.e. 4/5/8 wire touchscreen support | ||
| 8 | * on the platform. | ||
| 9 | * @x_plate_resistance: X plate resistance. | ||
| 10 | */ | ||
| 11 | |||
| 12 | struct tsc_data { | ||
| 13 | int wires; | ||
| 14 | int x_plate_resistance; | ||
| 15 | }; | ||
| 16 | |||
| 17 | #endif | ||
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h index e44e84f0156c..657fab4efab3 100644 --- a/include/linux/io-mapping.h +++ b/include/linux/io-mapping.h | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | 20 | ||
| 21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
| 22 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
| 23 | #include <linux/bug.h> | ||
| 23 | #include <asm/io.h> | 24 | #include <asm/io.h> |
| 24 | #include <asm/page.h> | 25 | #include <asm/page.h> |
| 25 | 26 | ||
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 9d57a71775b5..e885ba23de70 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
| @@ -23,12 +23,6 @@ struct resource { | |||
| 23 | struct resource *parent, *sibling, *child; | 23 | struct resource *parent, *sibling, *child; |
| 24 | }; | 24 | }; |
| 25 | 25 | ||
| 26 | struct resource_list { | ||
| 27 | struct resource_list *next; | ||
| 28 | struct resource *res; | ||
| 29 | struct pci_dev *dev; | ||
| 30 | }; | ||
| 31 | |||
| 32 | /* | 26 | /* |
| 33 | * IO resources have these defined flags. | 27 | * IO resources have these defined flags. |
| 34 | */ | 28 | */ |
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h index bbd156bb953b..48dcba9b2065 100644 --- a/include/linux/ipmi.h +++ b/include/linux/ipmi.h | |||
| @@ -220,10 +220,10 @@ struct kernel_ipmi_msg { | |||
| 220 | * The in-kernel interface. | 220 | * The in-kernel interface. |
| 221 | */ | 221 | */ |
| 222 | #include <linux/list.h> | 222 | #include <linux/list.h> |
| 223 | #include <linux/device.h> | ||
| 224 | #include <linux/proc_fs.h> | 223 | #include <linux/proc_fs.h> |
| 225 | 224 | ||
| 226 | struct module; | 225 | struct module; |
| 226 | struct device; | ||
| 227 | 227 | ||
| 228 | /* Opaque type for a IPMI message user. One of these is needed to | 228 | /* Opaque type for a IPMI message user. One of these is needed to |
| 229 | send and receive messages. */ | 229 | send and receive messages. */ |
diff --git a/include/linux/ipmi_smi.h b/include/linux/ipmi_smi.h index 3ef0d8b6aa6f..fcb5d44ea635 100644 --- a/include/linux/ipmi_smi.h +++ b/include/linux/ipmi_smi.h | |||
| @@ -36,10 +36,11 @@ | |||
| 36 | 36 | ||
| 37 | #include <linux/ipmi_msgdefs.h> | 37 | #include <linux/ipmi_msgdefs.h> |
| 38 | #include <linux/proc_fs.h> | 38 | #include <linux/proc_fs.h> |
| 39 | #include <linux/device.h> | ||
| 40 | #include <linux/platform_device.h> | 39 | #include <linux/platform_device.h> |
| 41 | #include <linux/ipmi.h> | 40 | #include <linux/ipmi.h> |
| 42 | 41 | ||
| 42 | struct device; | ||
| 43 | |||
| 43 | /* This files describes the interface for IPMI system management interface | 44 | /* This files describes the interface for IPMI system management interface |
| 44 | drivers to bind into the IPMI message handler. */ | 45 | drivers to bind into the IPMI message handler. */ |
| 45 | 46 | ||
diff --git a/include/linux/ivtv.h b/include/linux/ivtv.h index 062d20f74322..42bf725751af 100644 --- a/include/linux/ivtv.h +++ b/include/linux/ivtv.h | |||
| @@ -58,7 +58,11 @@ struct ivtv_dma_frame { | |||
| 58 | __u32 src_height; | 58 | __u32 src_height; |
| 59 | }; | 59 | }; |
| 60 | 60 | ||
| 61 | #define IVTV_IOC_DMA_FRAME _IOW ('V', BASE_VIDIOC_PRIVATE+0, struct ivtv_dma_frame) | 61 | #define IVTV_IOC_DMA_FRAME _IOW ('V', BASE_VIDIOC_PRIVATE+0, struct ivtv_dma_frame) |
| 62 | |||
| 63 | /* Select the passthrough mode (if the argument is non-zero). In the passthrough | ||
| 64 | mode the output of the encoder is passed immediately into the decoder. */ | ||
| 65 | #define IVTV_IOC_PASSTHROUGH_MODE _IOW ('V', BASE_VIDIOC_PRIVATE+1, int) | ||
| 62 | 66 | ||
| 63 | /* Deprecated defines: applications should use the defines from videodev2.h */ | 67 | /* Deprecated defines: applications should use the defines from videodev2.h */ |
| 64 | #define IVTV_SLICED_TYPE_TELETEXT_B V4L2_MPEG_VBI_IVTV_TELETEXT_B | 68 | #define IVTV_SLICED_TYPE_TELETEXT_B V4L2_MPEG_VBI_IVTV_TELETEXT_B |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 5557baefed60..912c30a8ddb1 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
| @@ -971,6 +971,10 @@ extern void __journal_clean_data_list(transaction_t *transaction); | |||
| 971 | /* Log buffer allocation */ | 971 | /* Log buffer allocation */ |
| 972 | extern struct journal_head * jbd2_journal_get_descriptor_buffer(journal_t *); | 972 | extern struct journal_head * jbd2_journal_get_descriptor_buffer(journal_t *); |
| 973 | int jbd2_journal_next_log_block(journal_t *, unsigned long long *); | 973 | int jbd2_journal_next_log_block(journal_t *, unsigned long long *); |
| 974 | int jbd2_journal_get_log_tail(journal_t *journal, tid_t *tid, | ||
| 975 | unsigned long *block); | ||
| 976 | void __jbd2_update_log_tail(journal_t *journal, tid_t tid, unsigned long block); | ||
| 977 | void jbd2_update_log_tail(journal_t *journal, tid_t tid, unsigned long block); | ||
| 974 | 978 | ||
| 975 | /* Commit management */ | 979 | /* Commit management */ |
| 976 | extern void jbd2_journal_commit_transaction(journal_t *); | 980 | extern void jbd2_journal_commit_transaction(journal_t *); |
| @@ -1020,6 +1024,11 @@ jbd2_journal_write_metadata_buffer(transaction_t *transaction, | |||
| 1020 | /* Transaction locking */ | 1024 | /* Transaction locking */ |
| 1021 | extern void __wait_on_journal (journal_t *); | 1025 | extern void __wait_on_journal (journal_t *); |
| 1022 | 1026 | ||
| 1027 | /* Transaction cache support */ | ||
| 1028 | extern void jbd2_journal_destroy_transaction_cache(void); | ||
| 1029 | extern int jbd2_journal_init_transaction_cache(void); | ||
| 1030 | extern void jbd2_journal_free_transaction(transaction_t *); | ||
| 1031 | |||
| 1023 | /* | 1032 | /* |
| 1024 | * Journal locking. | 1033 | * Journal locking. |
| 1025 | * | 1034 | * |
| @@ -1082,7 +1091,8 @@ extern int jbd2_journal_destroy (journal_t *); | |||
| 1082 | extern int jbd2_journal_recover (journal_t *journal); | 1091 | extern int jbd2_journal_recover (journal_t *journal); |
| 1083 | extern int jbd2_journal_wipe (journal_t *, int); | 1092 | extern int jbd2_journal_wipe (journal_t *, int); |
| 1084 | extern int jbd2_journal_skip_recovery (journal_t *); | 1093 | extern int jbd2_journal_skip_recovery (journal_t *); |
| 1085 | extern void jbd2_journal_update_superblock (journal_t *, int); | 1094 | extern void jbd2_journal_update_sb_log_tail (journal_t *, tid_t, |
| 1095 | unsigned long, int); | ||
| 1086 | extern void __jbd2_journal_abort_hard (journal_t *); | 1096 | extern void __jbd2_journal_abort_hard (journal_t *); |
| 1087 | extern void jbd2_journal_abort (journal_t *, int); | 1097 | extern void jbd2_journal_abort (journal_t *, int); |
| 1088 | extern int jbd2_journal_errno (journal_t *); | 1098 | extern int jbd2_journal_errno (journal_t *); |
diff --git a/include/linux/journal-head.h b/include/linux/journal-head.h index 423cb6d78ee0..c18b46f8aeeb 100644 --- a/include/linux/journal-head.h +++ b/include/linux/journal-head.h | |||
| @@ -66,6 +66,8 @@ struct journal_head { | |||
| 66 | * transaction (if there is one). Only applies to buffers on a | 66 | * transaction (if there is one). Only applies to buffers on a |
| 67 | * transaction's data or metadata journaling list. | 67 | * transaction's data or metadata journaling list. |
| 68 | * [j_list_lock] [jbd_lock_bh_state()] | 68 | * [j_list_lock] [jbd_lock_bh_state()] |
| 69 | * Either of these locks is enough for reading, both are needed for | ||
| 70 | * changes. | ||
| 69 | */ | 71 | */ |
| 70 | transaction_t *b_transaction; | 72 | transaction_t *b_transaction; |
| 71 | 73 | ||
diff --git a/include/linux/jz4740-adc.h b/include/linux/jz4740-adc.h index 9053f95e9687..8184578fbfa4 100644 --- a/include/linux/jz4740-adc.h +++ b/include/linux/jz4740-adc.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | #ifndef __LINUX_JZ4740_ADC | 2 | #ifndef __LINUX_JZ4740_ADC |
| 3 | #define __LINUX_JZ4740_ADC | 3 | #define __LINUX_JZ4740_ADC |
| 4 | 4 | ||
| 5 | #include <linux/device.h> | 5 | struct device; |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * jz4740_adc_set_config - Configure a JZ4740 adc device | 8 | * jz4740_adc_set_config - Configure a JZ4740 adc device |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index d801acb5e680..5db52d0ff1d4 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -20,7 +20,6 @@ | |||
| 20 | #include <linux/printk.h> | 20 | #include <linux/printk.h> |
| 21 | #include <linux/dynamic_debug.h> | 21 | #include <linux/dynamic_debug.h> |
| 22 | #include <asm/byteorder.h> | 22 | #include <asm/byteorder.h> |
| 23 | #include <asm/bug.h> | ||
| 24 | 23 | ||
| 25 | #define USHRT_MAX ((u16)(~0U)) | 24 | #define USHRT_MAX ((u16)(~0U)) |
| 26 | #define SHRT_MAX ((s16)(USHRT_MAX>>1)) | 25 | #define SHRT_MAX ((s16)(USHRT_MAX>>1)) |
| @@ -312,6 +311,8 @@ extern long long simple_strtoll(const char *,char **,unsigned int); | |||
| 312 | #define strict_strtoull kstrtoull | 311 | #define strict_strtoull kstrtoull |
| 313 | #define strict_strtoll kstrtoll | 312 | #define strict_strtoll kstrtoll |
| 314 | 313 | ||
| 314 | extern int num_to_str(char *buf, int size, unsigned long long num); | ||
| 315 | |||
| 315 | /* lib/printf utilities */ | 316 | /* lib/printf utilities */ |
| 316 | 317 | ||
| 317 | extern __printf(2, 3) int sprintf(char *buf, const char * fmt, ...); | 318 | extern __printf(2, 3) int sprintf(char *buf, const char * fmt, ...); |
| @@ -328,10 +329,10 @@ extern __printf(2, 3) | |||
| 328 | char *kasprintf(gfp_t gfp, const char *fmt, ...); | 329 | char *kasprintf(gfp_t gfp, const char *fmt, ...); |
| 329 | extern char *kvasprintf(gfp_t gfp, const char *fmt, va_list args); | 330 | extern char *kvasprintf(gfp_t gfp, const char *fmt, va_list args); |
| 330 | 331 | ||
| 331 | extern int sscanf(const char *, const char *, ...) | 332 | extern __scanf(2, 3) |
| 332 | __attribute__ ((format (scanf, 2, 3))); | 333 | int sscanf(const char *, const char *, ...); |
| 333 | extern int vsscanf(const char *, const char *, va_list) | 334 | extern __scanf(2, 0) |
| 334 | __attribute__ ((format (scanf, 2, 0))); | 335 | int vsscanf(const char *, const char *, va_list); |
| 335 | 336 | ||
| 336 | extern int get_option(char **str, int *pint); | 337 | extern int get_option(char **str, int *pint); |
| 337 | extern char *get_options(const char *str, int nints, int *ints); | 338 | extern char *get_options(const char *str, int nints, int *ints); |
| @@ -675,67 +676,6 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } | |||
| 675 | const typeof( ((type *)0)->member ) *__mptr = (ptr); \ | 676 | const typeof( ((type *)0)->member ) *__mptr = (ptr); \ |
| 676 | (type *)( (char *)__mptr - offsetof(type,member) );}) | 677 | (type *)( (char *)__mptr - offsetof(type,member) );}) |
| 677 | 678 | ||
| 678 | #ifdef __CHECKER__ | ||
| 679 | #define BUILD_BUG_ON_NOT_POWER_OF_2(n) | ||
| 680 | #define BUILD_BUG_ON_ZERO(e) (0) | ||
| 681 | #define BUILD_BUG_ON_NULL(e) ((void*)0) | ||
| 682 | #define BUILD_BUG_ON(condition) | ||
| 683 | #define BUILD_BUG() (0) | ||
| 684 | #else /* __CHECKER__ */ | ||
| 685 | |||
| 686 | /* Force a compilation error if a constant expression is not a power of 2 */ | ||
| 687 | #define BUILD_BUG_ON_NOT_POWER_OF_2(n) \ | ||
| 688 | BUILD_BUG_ON((n) == 0 || (((n) & ((n) - 1)) != 0)) | ||
| 689 | |||
| 690 | /* Force a compilation error if condition is true, but also produce a | ||
| 691 | result (of value 0 and type size_t), so the expression can be used | ||
| 692 | e.g. in a structure initializer (or where-ever else comma expressions | ||
| 693 | aren't permitted). */ | ||
| 694 | #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); })) | ||
| 695 | #define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); })) | ||
| 696 | |||
| 697 | /** | ||
| 698 | * BUILD_BUG_ON - break compile if a condition is true. | ||
| 699 | * @condition: the condition which the compiler should know is false. | ||
| 700 | * | ||
| 701 | * If you have some code which relies on certain constants being equal, or | ||
| 702 | * other compile-time-evaluated condition, you should use BUILD_BUG_ON to | ||
| 703 | * detect if someone changes it. | ||
| 704 | * | ||
| 705 | * The implementation uses gcc's reluctance to create a negative array, but | ||
| 706 | * gcc (as of 4.4) only emits that error for obvious cases (eg. not arguments | ||
| 707 | * to inline functions). So as a fallback we use the optimizer; if it can't | ||
| 708 | * prove the condition is false, it will cause a link error on the undefined | ||
| 709 | * "__build_bug_on_failed". This error message can be harder to track down | ||
| 710 | * though, hence the two different methods. | ||
| 711 | */ | ||
| 712 | #ifndef __OPTIMIZE__ | ||
| 713 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) | ||
| 714 | #else | ||
| 715 | extern int __build_bug_on_failed; | ||
| 716 | #define BUILD_BUG_ON(condition) \ | ||
| 717 | do { \ | ||
| 718 | ((void)sizeof(char[1 - 2*!!(condition)])); \ | ||
| 719 | if (condition) __build_bug_on_failed = 1; \ | ||
| 720 | } while(0) | ||
| 721 | #endif | ||
| 722 | |||
| 723 | /** | ||
| 724 | * BUILD_BUG - break compile if used. | ||
| 725 | * | ||
| 726 | * If you have some code that you expect the compiler to eliminate at | ||
| 727 | * build time, you should use BUILD_BUG to detect if it is | ||
| 728 | * unexpectedly used. | ||
| 729 | */ | ||
| 730 | #define BUILD_BUG() \ | ||
| 731 | do { \ | ||
| 732 | extern void __build_bug_failed(void) \ | ||
| 733 | __linktime_error("BUILD_BUG failed"); \ | ||
| 734 | __build_bug_failed(); \ | ||
| 735 | } while (0) | ||
| 736 | |||
| 737 | #endif /* __CHECKER__ */ | ||
| 738 | |||
| 739 | /* Trap pasters of __FUNCTION__ at compile-time */ | 679 | /* Trap pasters of __FUNCTION__ at compile-time */ |
| 740 | #define __FUNCTION__ (__func__) | 680 | #define __FUNCTION__ (__func__) |
| 741 | 681 | ||
diff --git a/include/linux/key.h b/include/linux/key.h index 1600ebf717a7..96933b1e5d24 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
| @@ -277,6 +277,8 @@ static inline key_serial_t key_serial(const struct key *key) | |||
| 277 | return key ? key->serial : 0; | 277 | return key ? key->serial : 0; |
| 278 | } | 278 | } |
| 279 | 279 | ||
| 280 | extern void key_set_timeout(struct key *, unsigned); | ||
| 281 | |||
| 280 | /** | 282 | /** |
| 281 | * key_is_instantiated - Determine if a key has been positively instantiated | 283 | * key_is_instantiated - Determine if a key has been positively instantiated |
| 282 | * @key: The key to check. | 284 | * @key: The key to check. |
diff --git a/include/linux/kmod.h b/include/linux/kmod.h index 722f477c4ef7..9efeae679106 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h | |||
| @@ -48,11 +48,10 @@ static inline int request_module_nowait(const char *name, ...) { return -ENOSYS; | |||
| 48 | struct cred; | 48 | struct cred; |
| 49 | struct file; | 49 | struct file; |
| 50 | 50 | ||
| 51 | enum umh_wait { | 51 | #define UMH_NO_WAIT 0 /* don't wait at all */ |
| 52 | UMH_NO_WAIT = -1, /* don't wait at all */ | 52 | #define UMH_WAIT_EXEC 1 /* wait for the exec, but not the process */ |
| 53 | UMH_WAIT_EXEC = 0, /* wait for the exec, but not the process */ | 53 | #define UMH_WAIT_PROC 2 /* wait for the process to complete */ |
| 54 | UMH_WAIT_PROC = 1, /* wait for the process to complete */ | 54 | #define UMH_KILLABLE 4 /* wait for EXEC/PROC killable */ |
| 55 | }; | ||
| 56 | 55 | ||
| 57 | struct subprocess_info { | 56 | struct subprocess_info { |
| 58 | struct work_struct work; | 57 | struct work_struct work; |
| @@ -60,7 +59,7 @@ struct subprocess_info { | |||
| 60 | char *path; | 59 | char *path; |
| 61 | char **argv; | 60 | char **argv; |
| 62 | char **envp; | 61 | char **envp; |
| 63 | enum umh_wait wait; | 62 | int wait; |
| 64 | int retval; | 63 | int retval; |
| 65 | int (*init)(struct subprocess_info *info, struct cred *new); | 64 | int (*init)(struct subprocess_info *info, struct cred *new); |
| 66 | void (*cleanup)(struct subprocess_info *info); | 65 | void (*cleanup)(struct subprocess_info *info); |
| @@ -78,15 +77,14 @@ void call_usermodehelper_setfns(struct subprocess_info *info, | |||
| 78 | void *data); | 77 | void *data); |
| 79 | 78 | ||
| 80 | /* Actually execute the sub-process */ | 79 | /* Actually execute the sub-process */ |
| 81 | int call_usermodehelper_exec(struct subprocess_info *info, enum umh_wait wait); | 80 | int call_usermodehelper_exec(struct subprocess_info *info, int wait); |
| 82 | 81 | ||
| 83 | /* Free the subprocess_info. This is only needed if you're not going | 82 | /* Free the subprocess_info. This is only needed if you're not going |
| 84 | to call call_usermodehelper_exec */ | 83 | to call call_usermodehelper_exec */ |
| 85 | void call_usermodehelper_freeinfo(struct subprocess_info *info); | 84 | void call_usermodehelper_freeinfo(struct subprocess_info *info); |
| 86 | 85 | ||
| 87 | static inline int | 86 | static inline int |
| 88 | call_usermodehelper_fns(char *path, char **argv, char **envp, | 87 | call_usermodehelper_fns(char *path, char **argv, char **envp, int wait, |
| 89 | enum umh_wait wait, | ||
| 90 | int (*init)(struct subprocess_info *info, struct cred *new), | 88 | int (*init)(struct subprocess_info *info, struct cred *new), |
| 91 | void (*cleanup)(struct subprocess_info *), void *data) | 89 | void (*cleanup)(struct subprocess_info *), void *data) |
| 92 | { | 90 | { |
| @@ -104,7 +102,7 @@ call_usermodehelper_fns(char *path, char **argv, char **envp, | |||
| 104 | } | 102 | } |
| 105 | 103 | ||
| 106 | static inline int | 104 | static inline int |
| 107 | call_usermodehelper(char *path, char **argv, char **envp, enum umh_wait wait) | 105 | call_usermodehelper(char *path, char **argv, char **envp, int wait) |
| 108 | { | 106 | { |
| 109 | return call_usermodehelper_fns(path, argv, envp, wait, | 107 | return call_usermodehelper_fns(path, argv, envp, wait, |
| 110 | NULL, NULL, NULL); | 108 | NULL, NULL, NULL); |
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index dce6e4dbeda7..b6e1f8c00577 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
| @@ -33,6 +33,7 @@ | |||
| 33 | #include <linux/list.h> | 33 | #include <linux/list.h> |
| 34 | #include <linux/notifier.h> | 34 | #include <linux/notifier.h> |
| 35 | #include <linux/smp.h> | 35 | #include <linux/smp.h> |
| 36 | #include <linux/bug.h> | ||
| 36 | #include <linux/percpu.h> | 37 | #include <linux/percpu.h> |
| 37 | #include <linux/spinlock.h> | 38 | #include <linux/spinlock.h> |
| 38 | #include <linux/rcupdate.h> | 39 | #include <linux/rcupdate.h> |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 900c76337e8f..ca1b153585d3 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
| 14 | #include <linux/signal.h> | 14 | #include <linux/signal.h> |
| 15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
| 16 | #include <linux/bug.h> | ||
| 16 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
| 17 | #include <linux/mmu_notifier.h> | 18 | #include <linux/mmu_notifier.h> |
| 18 | #include <linux/preempt.h> | 19 | #include <linux/preempt.h> |
diff --git a/include/linux/led-lm3530.h b/include/linux/led-lm3530.h index 8eb12357a110..eeae6e742471 100644 --- a/include/linux/led-lm3530.h +++ b/include/linux/led-lm3530.h | |||
| @@ -72,6 +72,12 @@ enum lm3530_als_mode { | |||
| 72 | LM3530_INPUT_CEIL, /* Max of ALS1 and ALS2 */ | 72 | LM3530_INPUT_CEIL, /* Max of ALS1 and ALS2 */ |
| 73 | }; | 73 | }; |
| 74 | 74 | ||
| 75 | /* PWM Platform Specific Data */ | ||
| 76 | struct lm3530_pwm_data { | ||
| 77 | void (*pwm_set_intensity) (int brightness, int max_brightness); | ||
| 78 | int (*pwm_get_intensity) (int max_brightness); | ||
| 79 | }; | ||
| 80 | |||
| 75 | /** | 81 | /** |
| 76 | * struct lm3530_platform_data | 82 | * struct lm3530_platform_data |
| 77 | * @mode: mode of operation i.e. Manual, ALS or PWM | 83 | * @mode: mode of operation i.e. Manual, ALS or PWM |
| @@ -87,6 +93,7 @@ enum lm3530_als_mode { | |||
| 87 | * @als_vmin: als input voltage calibrated for max brightness in mV | 93 | * @als_vmin: als input voltage calibrated for max brightness in mV |
| 88 | * @als_vmax: als input voltage calibrated for min brightness in mV | 94 | * @als_vmax: als input voltage calibrated for min brightness in mV |
| 89 | * @brt_val: brightness value (0-255) | 95 | * @brt_val: brightness value (0-255) |
| 96 | * @pwm_data: PWM control functions (only valid when the mode is PWM) | ||
| 90 | */ | 97 | */ |
| 91 | struct lm3530_platform_data { | 98 | struct lm3530_platform_data { |
| 92 | enum lm3530_mode mode; | 99 | enum lm3530_mode mode; |
| @@ -107,6 +114,8 @@ struct lm3530_platform_data { | |||
| 107 | u32 als_vmax; | 114 | u32 als_vmax; |
| 108 | 115 | ||
| 109 | u8 brt_val; | 116 | u8 brt_val; |
| 117 | |||
| 118 | struct lm3530_pwm_data pwm_data; | ||
| 110 | }; | 119 | }; |
| 111 | 120 | ||
| 112 | #endif /* _LINUX_LED_LM3530_H__ */ | 121 | #endif /* _LINUX_LED_LM3530_H__ */ |
diff --git a/include/linux/leds-lp5521.h b/include/linux/leds-lp5521.h index fd548d2a8775..3f071ec019b2 100644 --- a/include/linux/leds-lp5521.h +++ b/include/linux/leds-lp5521.h | |||
| @@ -26,15 +26,37 @@ | |||
| 26 | /* See Documentation/leds/leds-lp5521.txt */ | 26 | /* See Documentation/leds/leds-lp5521.txt */ |
| 27 | 27 | ||
| 28 | struct lp5521_led_config { | 28 | struct lp5521_led_config { |
| 29 | char *name; | ||
| 29 | u8 chan_nr; | 30 | u8 chan_nr; |
| 30 | u8 led_current; /* mA x10, 0 if led is not connected */ | 31 | u8 led_current; /* mA x10, 0 if led is not connected */ |
| 31 | u8 max_current; | 32 | u8 max_current; |
| 32 | }; | 33 | }; |
| 33 | 34 | ||
| 35 | struct lp5521_led_pattern { | ||
| 36 | u8 *r; | ||
| 37 | u8 *g; | ||
| 38 | u8 *b; | ||
| 39 | u8 size_r; | ||
| 40 | u8 size_g; | ||
| 41 | u8 size_b; | ||
| 42 | }; | ||
| 43 | |||
| 34 | #define LP5521_CLOCK_AUTO 0 | 44 | #define LP5521_CLOCK_AUTO 0 |
| 35 | #define LP5521_CLOCK_INT 1 | 45 | #define LP5521_CLOCK_INT 1 |
| 36 | #define LP5521_CLOCK_EXT 2 | 46 | #define LP5521_CLOCK_EXT 2 |
| 37 | 47 | ||
| 48 | /* Bits in CONFIG register */ | ||
| 49 | #define LP5521_PWM_HF 0x40 /* PWM: 0 = 256Hz, 1 = 558Hz */ | ||
| 50 | #define LP5521_PWRSAVE_EN 0x20 /* 1 = Power save mode */ | ||
| 51 | #define LP5521_CP_MODE_OFF 0 /* Charge pump (CP) off */ | ||
| 52 | #define LP5521_CP_MODE_BYPASS 8 /* CP forced to bypass mode */ | ||
| 53 | #define LP5521_CP_MODE_1X5 0x10 /* CP forced to 1.5x mode */ | ||
| 54 | #define LP5521_CP_MODE_AUTO 0x18 /* Automatic mode selection */ | ||
| 55 | #define LP5521_R_TO_BATT 4 /* R out: 0 = CP, 1 = Vbat */ | ||
| 56 | #define LP5521_CLK_SRC_EXT 0 /* Ext-clk source (CLK_32K) */ | ||
| 57 | #define LP5521_CLK_INT 1 /* Internal clock */ | ||
| 58 | #define LP5521_CLK_AUTO 2 /* Automatic clock selection */ | ||
| 59 | |||
| 38 | struct lp5521_platform_data { | 60 | struct lp5521_platform_data { |
| 39 | struct lp5521_led_config *led_config; | 61 | struct lp5521_led_config *led_config; |
| 40 | u8 num_channels; | 62 | u8 num_channels; |
| @@ -43,6 +65,9 @@ struct lp5521_platform_data { | |||
| 43 | void (*release_resources)(void); | 65 | void (*release_resources)(void); |
| 44 | void (*enable)(bool state); | 66 | void (*enable)(bool state); |
| 45 | const char *label; | 67 | const char *label; |
| 68 | u8 update_config; | ||
| 69 | struct lp5521_led_pattern *patterns; | ||
| 70 | int num_patterns; | ||
| 46 | }; | 71 | }; |
| 47 | 72 | ||
| 48 | #endif /* __LINUX_LP5521_H */ | 73 | #endif /* __LINUX_LP5521_H */ |
diff --git a/include/linux/lockd/bind.h b/include/linux/lockd/bind.h index fbc48f898521..11a966e5f829 100644 --- a/include/linux/lockd/bind.h +++ b/include/linux/lockd/bind.h | |||
| @@ -42,6 +42,7 @@ struct nlmclnt_initdata { | |||
| 42 | unsigned short protocol; | 42 | unsigned short protocol; |
| 43 | u32 nfs_version; | 43 | u32 nfs_version; |
| 44 | int noresvport; | 44 | int noresvport; |
| 45 | struct net *net; | ||
| 45 | }; | 46 | }; |
| 46 | 47 | ||
| 47 | /* | 48 | /* |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index 88a114fce477..f04ce6ac6d04 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
| @@ -67,6 +67,7 @@ struct nlm_host { | |||
| 67 | struct list_head h_reclaim; /* Locks in RECLAIM state */ | 67 | struct list_head h_reclaim; /* Locks in RECLAIM state */ |
| 68 | struct nsm_handle *h_nsmhandle; /* NSM status handle */ | 68 | struct nsm_handle *h_nsmhandle; /* NSM status handle */ |
| 69 | char *h_addrbuf; /* address eyecatcher */ | 69 | char *h_addrbuf; /* address eyecatcher */ |
| 70 | struct net *net; /* host net */ | ||
| 70 | }; | 71 | }; |
| 71 | 72 | ||
| 72 | /* | 73 | /* |
| @@ -188,7 +189,7 @@ struct nlm_block { | |||
| 188 | /* | 189 | /* |
| 189 | * Global variables | 190 | * Global variables |
| 190 | */ | 191 | */ |
| 191 | extern struct rpc_program nlm_program; | 192 | extern const struct rpc_program nlm_program; |
| 192 | extern struct svc_procedure nlmsvc_procedures[]; | 193 | extern struct svc_procedure nlmsvc_procedures[]; |
| 193 | #ifdef CONFIG_LOCKD_V4 | 194 | #ifdef CONFIG_LOCKD_V4 |
| 194 | extern struct svc_procedure nlmsvc_procedures4[]; | 195 | extern struct svc_procedure nlmsvc_procedures4[]; |
| @@ -222,7 +223,8 @@ struct nlm_host *nlmclnt_lookup_host(const struct sockaddr *sap, | |||
| 222 | const unsigned short protocol, | 223 | const unsigned short protocol, |
| 223 | const u32 version, | 224 | const u32 version, |
| 224 | const char *hostname, | 225 | const char *hostname, |
| 225 | int noresvport); | 226 | int noresvport, |
| 227 | struct net *net); | ||
| 226 | void nlmclnt_release_host(struct nlm_host *); | 228 | void nlmclnt_release_host(struct nlm_host *); |
| 227 | struct nlm_host *nlmsvc_lookup_host(const struct svc_rqst *rqstp, | 229 | struct nlm_host *nlmsvc_lookup_host(const struct svc_rqst *rqstp, |
| 228 | const char *hostname, | 230 | const char *hostname, |
| @@ -232,6 +234,7 @@ struct rpc_clnt * nlm_bind_host(struct nlm_host *); | |||
| 232 | void nlm_rebind_host(struct nlm_host *); | 234 | void nlm_rebind_host(struct nlm_host *); |
| 233 | struct nlm_host * nlm_get_host(struct nlm_host *); | 235 | struct nlm_host * nlm_get_host(struct nlm_host *); |
| 234 | void nlm_shutdown_hosts(void); | 236 | void nlm_shutdown_hosts(void); |
| 237 | void nlm_shutdown_hosts_net(struct net *net); | ||
| 235 | void nlm_host_rebooted(const struct nlm_reboot *); | 238 | void nlm_host_rebooted(const struct nlm_reboot *); |
| 236 | 239 | ||
| 237 | /* | 240 | /* |
diff --git a/include/linux/lockd/xdr4.h b/include/linux/lockd/xdr4.h index 7353821341ed..e58c88b52ce1 100644 --- a/include/linux/lockd/xdr4.h +++ b/include/linux/lockd/xdr4.h | |||
| @@ -42,6 +42,6 @@ int nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *); | |||
| 42 | int nlmclt_encode_cancargs(struct rpc_rqst *, u32 *, struct nlm_args *); | 42 | int nlmclt_encode_cancargs(struct rpc_rqst *, u32 *, struct nlm_args *); |
| 43 | int nlmclt_encode_unlockargs(struct rpc_rqst *, u32 *, struct nlm_args *); | 43 | int nlmclt_encode_unlockargs(struct rpc_rqst *, u32 *, struct nlm_args *); |
| 44 | */ | 44 | */ |
| 45 | extern struct rpc_version nlm_version4; | 45 | extern const struct rpc_version nlm_version4; |
| 46 | 46 | ||
| 47 | #endif /* LOCKD_XDR4_H */ | 47 | #endif /* LOCKD_XDR4_H */ |
diff --git a/include/linux/lp855x.h b/include/linux/lp855x.h new file mode 100644 index 000000000000..781a490a451b --- /dev/null +++ b/include/linux/lp855x.h | |||
| @@ -0,0 +1,131 @@ | |||
| 1 | /* | ||
| 2 | * LP855x Backlight Driver | ||
| 3 | * | ||
| 4 | * Copyright (C) 2011 Texas Instruments | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef _LP855X_H | ||
| 13 | #define _LP855X_H | ||
| 14 | |||
| 15 | #define BL_CTL_SHFT (0) | ||
| 16 | #define BRT_MODE_SHFT (1) | ||
| 17 | #define BRT_MODE_MASK (0x06) | ||
| 18 | |||
| 19 | /* Enable backlight. Only valid when BRT_MODE=10(I2C only) */ | ||
| 20 | #define ENABLE_BL (1) | ||
| 21 | #define DISABLE_BL (0) | ||
| 22 | |||
| 23 | #define I2C_CONFIG(id) id ## _I2C_CONFIG | ||
| 24 | #define PWM_CONFIG(id) id ## _PWM_CONFIG | ||
| 25 | |||
| 26 | /* DEVICE CONTROL register - LP8550 */ | ||
| 27 | #define LP8550_PWM_CONFIG (LP8550_PWM_ONLY << BRT_MODE_SHFT) | ||
| 28 | #define LP8550_I2C_CONFIG ((ENABLE_BL << BL_CTL_SHFT) | \ | ||
| 29 | (LP8550_I2C_ONLY << BRT_MODE_SHFT)) | ||
| 30 | |||
| 31 | /* DEVICE CONTROL register - LP8551 */ | ||
| 32 | #define LP8551_PWM_CONFIG LP8550_PWM_CONFIG | ||
| 33 | #define LP8551_I2C_CONFIG LP8550_I2C_CONFIG | ||
| 34 | |||
| 35 | /* DEVICE CONTROL register - LP8552 */ | ||
| 36 | #define LP8552_PWM_CONFIG LP8550_PWM_CONFIG | ||
| 37 | #define LP8552_I2C_CONFIG LP8550_I2C_CONFIG | ||
| 38 | |||
| 39 | /* DEVICE CONTROL register - LP8553 */ | ||
| 40 | #define LP8553_PWM_CONFIG LP8550_PWM_CONFIG | ||
| 41 | #define LP8553_I2C_CONFIG LP8550_I2C_CONFIG | ||
| 42 | |||
| 43 | /* DEVICE CONTROL register - LP8556 */ | ||
| 44 | #define LP8556_PWM_CONFIG (LP8556_PWM_ONLY << BRT_MODE_SHFT) | ||
| 45 | #define LP8556_COMB1_CONFIG (LP8556_COMBINED1 << BRT_MODE_SHFT) | ||
| 46 | #define LP8556_I2C_CONFIG ((ENABLE_BL << BL_CTL_SHFT) | \ | ||
| 47 | (LP8556_I2C_ONLY << BRT_MODE_SHFT)) | ||
| 48 | #define LP8556_COMB2_CONFIG (LP8556_COMBINED2 << BRT_MODE_SHFT) | ||
| 49 | |||
| 50 | /* ROM area boundary */ | ||
| 51 | #define EEPROM_START (0xA0) | ||
| 52 | #define EEPROM_END (0xA7) | ||
| 53 | #define EPROM_START (0xA0) | ||
| 54 | #define EPROM_END (0xAF) | ||
| 55 | |||
| 56 | enum lp855x_chip_id { | ||
| 57 | LP8550, | ||
| 58 | LP8551, | ||
| 59 | LP8552, | ||
| 60 | LP8553, | ||
| 61 | LP8556, | ||
| 62 | }; | ||
| 63 | |||
| 64 | enum lp855x_brightness_ctrl_mode { | ||
| 65 | PWM_BASED = 1, | ||
| 66 | REGISTER_BASED, | ||
| 67 | }; | ||
| 68 | |||
| 69 | enum lp8550_brighntess_source { | ||
| 70 | LP8550_PWM_ONLY, | ||
| 71 | LP8550_I2C_ONLY = 2, | ||
| 72 | }; | ||
| 73 | |||
| 74 | enum lp8551_brighntess_source { | ||
| 75 | LP8551_PWM_ONLY = LP8550_PWM_ONLY, | ||
| 76 | LP8551_I2C_ONLY = LP8550_I2C_ONLY, | ||
| 77 | }; | ||
| 78 | |||
| 79 | enum lp8552_brighntess_source { | ||
| 80 | LP8552_PWM_ONLY = LP8550_PWM_ONLY, | ||
| 81 | LP8552_I2C_ONLY = LP8550_I2C_ONLY, | ||
| 82 | }; | ||
| 83 | |||
| 84 | enum lp8553_brighntess_source { | ||
| 85 | LP8553_PWM_ONLY = LP8550_PWM_ONLY, | ||
| 86 | LP8553_I2C_ONLY = LP8550_I2C_ONLY, | ||
| 87 | }; | ||
| 88 | |||
| 89 | enum lp8556_brightness_source { | ||
| 90 | LP8556_PWM_ONLY, | ||
| 91 | LP8556_COMBINED1, /* pwm + i2c before the shaper block */ | ||
| 92 | LP8556_I2C_ONLY, | ||
| 93 | LP8556_COMBINED2, /* pwm + i2c after the shaper block */ | ||
| 94 | }; | ||
| 95 | |||
| 96 | struct lp855x_pwm_data { | ||
| 97 | void (*pwm_set_intensity) (int brightness, int max_brightness); | ||
| 98 | int (*pwm_get_intensity) (int max_brightness); | ||
| 99 | }; | ||
| 100 | |||
| 101 | struct lp855x_rom_data { | ||
| 102 | u8 addr; | ||
| 103 | u8 val; | ||
| 104 | }; | ||
| 105 | |||
| 106 | /** | ||
| 107 | * struct lp855x_platform_data | ||
| 108 | * @name : Backlight driver name. If it is not defined, default name is set. | ||
| 109 | * @mode : brightness control by pwm or lp855x register | ||
| 110 | * @device_control : value of DEVICE CONTROL register | ||
| 111 | * @initial_brightness : initial value of backlight brightness | ||
| 112 | * @pwm_data : platform specific pwm generation functions. | ||
| 113 | Only valid when mode is PWM_BASED. | ||
| 114 | * @load_new_rom_data : | ||
| 115 | 0 : use default configuration data | ||
| 116 | 1 : update values of eeprom or eprom registers on loading driver | ||
| 117 | * @size_program : total size of lp855x_rom_data | ||
| 118 | * @rom_data : list of new eeprom/eprom registers | ||
| 119 | */ | ||
| 120 | struct lp855x_platform_data { | ||
| 121 | char *name; | ||
| 122 | enum lp855x_brightness_ctrl_mode mode; | ||
| 123 | u8 device_control; | ||
| 124 | int initial_brightness; | ||
| 125 | struct lp855x_pwm_data pwm_data; | ||
| 126 | u8 load_new_rom_data; | ||
| 127 | int size_program; | ||
| 128 | struct lp855x_rom_data *rom_data; | ||
| 129 | }; | ||
| 130 | |||
| 131 | #endif | ||
diff --git a/include/linux/magic.h b/include/linux/magic.h index b7ed4759dbb2..e15192cb9cf4 100644 --- a/include/linux/magic.h +++ b/include/linux/magic.h | |||
| @@ -9,7 +9,6 @@ | |||
| 9 | #define CRAMFS_MAGIC 0x28cd3d45 /* some random number */ | 9 | #define CRAMFS_MAGIC 0x28cd3d45 /* some random number */ |
| 10 | #define CRAMFS_MAGIC_WEND 0x453dcd28 /* magic number with the wrong endianess */ | 10 | #define CRAMFS_MAGIC_WEND 0x453dcd28 /* magic number with the wrong endianess */ |
| 11 | #define DEBUGFS_MAGIC 0x64626720 | 11 | #define DEBUGFS_MAGIC 0x64626720 |
| 12 | #define SYSFS_MAGIC 0x62656572 | ||
| 13 | #define SECURITYFS_MAGIC 0x73636673 | 12 | #define SECURITYFS_MAGIC 0x73636673 |
| 14 | #define SELINUX_MAGIC 0xf97cff8c | 13 | #define SELINUX_MAGIC 0xf97cff8c |
| 15 | #define RAMFS_MAGIC 0x858458f6 /* some random number */ | 14 | #define RAMFS_MAGIC 0x858458f6 /* some random number */ |
| @@ -27,7 +26,6 @@ | |||
| 27 | #define HPFS_SUPER_MAGIC 0xf995e849 | 26 | #define HPFS_SUPER_MAGIC 0xf995e849 |
| 28 | #define ISOFS_SUPER_MAGIC 0x9660 | 27 | #define ISOFS_SUPER_MAGIC 0x9660 |
| 29 | #define JFFS2_SUPER_MAGIC 0x72b6 | 28 | #define JFFS2_SUPER_MAGIC 0x72b6 |
| 30 | #define ANON_INODE_FS_MAGIC 0x09041934 | ||
| 31 | #define PSTOREFS_MAGIC 0x6165676C | 29 | #define PSTOREFS_MAGIC 0x6165676C |
| 32 | 30 | ||
| 33 | #define MINIX_SUPER_MAGIC 0x137F /* minix v1 fs, 14 char names */ | 31 | #define MINIX_SUPER_MAGIC 0x137F /* minix v1 fs, 14 char names */ |
| @@ -40,7 +38,6 @@ | |||
| 40 | #define NCP_SUPER_MAGIC 0x564c /* Guess, what 0x564c is :-) */ | 38 | #define NCP_SUPER_MAGIC 0x564c /* Guess, what 0x564c is :-) */ |
| 41 | #define NFS_SUPER_MAGIC 0x6969 | 39 | #define NFS_SUPER_MAGIC 0x6969 |
| 42 | #define OPENPROM_SUPER_MAGIC 0x9fa1 | 40 | #define OPENPROM_SUPER_MAGIC 0x9fa1 |
| 43 | #define PROC_SUPER_MAGIC 0x9fa0 | ||
| 44 | #define QNX4_SUPER_MAGIC 0x002f /* qnx4 fs detection */ | 41 | #define QNX4_SUPER_MAGIC 0x002f /* qnx4 fs detection */ |
| 45 | #define QNX6_SUPER_MAGIC 0x68191122 /* qnx6 fs detection */ | 42 | #define QNX6_SUPER_MAGIC 0x68191122 /* qnx6 fs detection */ |
| 46 | 43 | ||
| @@ -52,15 +49,24 @@ | |||
| 52 | #define REISER2FS_JR_SUPER_MAGIC_STRING "ReIsEr3Fs" | 49 | #define REISER2FS_JR_SUPER_MAGIC_STRING "ReIsEr3Fs" |
| 53 | 50 | ||
| 54 | #define SMB_SUPER_MAGIC 0x517B | 51 | #define SMB_SUPER_MAGIC 0x517B |
| 55 | #define USBDEVICE_SUPER_MAGIC 0x9fa2 | ||
| 56 | #define CGROUP_SUPER_MAGIC 0x27e0eb | 52 | #define CGROUP_SUPER_MAGIC 0x27e0eb |
| 57 | 53 | ||
| 58 | #define FUTEXFS_SUPER_MAGIC 0xBAD1DEA | ||
| 59 | 54 | ||
| 60 | #define STACK_END_MAGIC 0x57AC6E9D | 55 | #define STACK_END_MAGIC 0x57AC6E9D |
| 61 | 56 | ||
| 57 | #define V9FS_MAGIC 0x01021997 | ||
| 58 | |||
| 59 | #define BDEVFS_MAGIC 0x62646576 | ||
| 60 | #define BINFMTFS_MAGIC 0x42494e4d | ||
| 62 | #define DEVPTS_SUPER_MAGIC 0x1cd1 | 61 | #define DEVPTS_SUPER_MAGIC 0x1cd1 |
| 62 | #define FUTEXFS_SUPER_MAGIC 0xBAD1DEA | ||
| 63 | #define PIPEFS_MAGIC 0x50495045 | ||
| 64 | #define PROC_SUPER_MAGIC 0x9fa0 | ||
| 63 | #define SOCKFS_MAGIC 0x534F434B | 65 | #define SOCKFS_MAGIC 0x534F434B |
| 64 | #define V9FS_MAGIC 0x01021997 | 66 | #define SYSFS_MAGIC 0x62656572 |
| 67 | #define USBDEVICE_SUPER_MAGIC 0x9fa2 | ||
| 68 | #define MTD_INODE_FS_MAGIC 0x11307854 | ||
| 69 | #define ANON_INODE_FS_MAGIC 0x09041934 | ||
| 70 | |||
| 65 | 71 | ||
| 66 | #endif /* __LINUX_MAGIC_H__ */ | 72 | #endif /* __LINUX_MAGIC_H__ */ |
diff --git a/include/linux/maple.h b/include/linux/maple.h index d9a51b9b3300..c37288b23e0c 100644 --- a/include/linux/maple.h +++ b/include/linux/maple.h | |||
| @@ -1,9 +1,9 @@ | |||
| 1 | #ifndef __LINUX_MAPLE_H | 1 | #ifndef __LINUX_MAPLE_H |
| 2 | #define __LINUX_MAPLE_H | 2 | #define __LINUX_MAPLE_H |
| 3 | 3 | ||
| 4 | #include <linux/device.h> | ||
| 5 | #include <mach/maple.h> | 4 | #include <mach/maple.h> |
| 6 | 5 | ||
| 6 | struct device; | ||
| 7 | extern struct bus_type maple_bus_type; | 7 | extern struct bus_type maple_bus_type; |
| 8 | 8 | ||
| 9 | /* Maple Bus command and response codes */ | 9 | /* Maple Bus command and response codes */ |
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 0b8e2a742600..910550f3b70e 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | #include <linux/mmzone.h> | 4 | #include <linux/mmzone.h> |
| 5 | #include <linux/spinlock.h> | 5 | #include <linux/spinlock.h> |
| 6 | #include <linux/notifier.h> | 6 | #include <linux/notifier.h> |
| 7 | #include <linux/bug.h> | ||
| 7 | 8 | ||
| 8 | struct page; | 9 | struct page; |
| 9 | struct zone; | 10 | struct zone; |
diff --git a/include/linux/mfd/abx500.h b/include/linux/mfd/abx500.h index 9970337ff041..e20dd6ead1d0 100644 --- a/include/linux/mfd/abx500.h +++ b/include/linux/mfd/abx500.h | |||
| @@ -14,9 +14,10 @@ | |||
| 14 | * Author: Rickard Andersson <rickard.andersson@stericsson.com> | 14 | * Author: Rickard Andersson <rickard.andersson@stericsson.com> |
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | #include <linux/device.h> | ||
| 18 | #include <linux/regulator/machine.h> | 17 | #include <linux/regulator/machine.h> |
| 19 | 18 | ||
| 19 | struct device; | ||
| 20 | |||
| 20 | #ifndef MFD_ABX500_H | 21 | #ifndef MFD_ABX500_H |
| 21 | #define MFD_ABX500_H | 22 | #define MFD_ABX500_H |
| 22 | 23 | ||
diff --git a/include/linux/mfd/abx500/ab5500.h b/include/linux/mfd/abx500/ab5500.h index a720051ae933..54f820ed73bb 100644 --- a/include/linux/mfd/abx500/ab5500.h +++ b/include/linux/mfd/abx500/ab5500.h | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | #ifndef MFD_AB5500_H | 6 | #ifndef MFD_AB5500_H |
| 7 | #define MFD_AB5500_H | 7 | #define MFD_AB5500_H |
| 8 | 8 | ||
| 9 | #include <linux/device.h> | 9 | struct device; |
| 10 | 10 | ||
| 11 | enum ab5500_devid { | 11 | enum ab5500_devid { |
| 12 | AB5500_DEVID_ADC, | 12 | AB5500_DEVID_ADC, |
diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h index 838c6b487cc5..dca94396190d 100644 --- a/include/linux/mfd/abx500/ab8500.h +++ b/include/linux/mfd/abx500/ab8500.h | |||
| @@ -7,7 +7,9 @@ | |||
| 7 | #ifndef MFD_AB8500_H | 7 | #ifndef MFD_AB8500_H |
| 8 | #define MFD_AB8500_H | 8 | #define MFD_AB8500_H |
| 9 | 9 | ||
| 10 | #include <linux/device.h> | 10 | #include <linux/mutex.h> |
| 11 | |||
| 12 | struct device; | ||
| 11 | 13 | ||
| 12 | /* | 14 | /* |
| 13 | * AB8500 bank addresses | 15 | * AB8500 bank addresses |
diff --git a/include/linux/mfd/max8997.h b/include/linux/mfd/max8997.h index fff590521e50..28726dd540f2 100644 --- a/include/linux/mfd/max8997.h +++ b/include/linux/mfd/max8997.h | |||
| @@ -131,6 +131,55 @@ struct max8997_muic_platform_data { | |||
| 131 | int num_init_data; | 131 | int num_init_data; |
| 132 | }; | 132 | }; |
| 133 | 133 | ||
| 134 | enum max8997_haptic_motor_type { | ||
| 135 | MAX8997_HAPTIC_ERM, | ||
| 136 | MAX8997_HAPTIC_LRA, | ||
| 137 | }; | ||
| 138 | |||
| 139 | enum max8997_haptic_pulse_mode { | ||
| 140 | MAX8997_EXTERNAL_MODE, | ||
| 141 | MAX8997_INTERNAL_MODE, | ||
| 142 | }; | ||
| 143 | |||
| 144 | enum max8997_haptic_pwm_divisor { | ||
| 145 | MAX8997_PWM_DIVISOR_32, | ||
| 146 | MAX8997_PWM_DIVISOR_64, | ||
| 147 | MAX8997_PWM_DIVISOR_128, | ||
| 148 | MAX8997_PWM_DIVISOR_256, | ||
| 149 | }; | ||
| 150 | |||
| 151 | /** | ||
| 152 | * max8997_haptic_platform_data | ||
| 153 | * @pwm_channel_id: channel number of PWM device | ||
| 154 | * valid for MAX8997_EXTERNAL_MODE | ||
| 155 | * @pwm_period: period in nano second for PWM device | ||
| 156 | * valid for MAX8997_EXTERNAL_MODE | ||
| 157 | * @type: motor type | ||
| 158 | * @mode: pulse mode | ||
| 159 | * MAX8997_EXTERNAL_MODE: external PWM device is used to control motor | ||
| 160 | * MAX8997_INTERNAL_MODE: internal pulse generator is used to control motor | ||
| 161 | * @pwm_divisor: divisor for external PWM device | ||
| 162 | * @internal_mode_pattern: internal mode pattern for internal mode | ||
| 163 | * [0 - 3]: valid pattern number | ||
| 164 | * @pattern_cycle: the number of cycles of the waveform | ||
| 165 | * for the internal mode pattern | ||
| 166 | * [0 - 15]: available cycles | ||
| 167 | * @pattern_signal_period: period of the waveform for the internal mode pattern | ||
| 168 | * [0 - 255]: available period | ||
| 169 | */ | ||
| 170 | struct max8997_haptic_platform_data { | ||
| 171 | unsigned int pwm_channel_id; | ||
| 172 | unsigned int pwm_period; | ||
| 173 | |||
| 174 | enum max8997_haptic_motor_type type; | ||
| 175 | enum max8997_haptic_pulse_mode mode; | ||
| 176 | enum max8997_haptic_pwm_divisor pwm_divisor; | ||
| 177 | |||
| 178 | unsigned int internal_mode_pattern; | ||
| 179 | unsigned int pattern_cycle; | ||
| 180 | unsigned int pattern_signal_period; | ||
| 181 | }; | ||
| 182 | |||
| 134 | enum max8997_led_mode { | 183 | enum max8997_led_mode { |
| 135 | MAX8997_NONE, | 184 | MAX8997_NONE, |
| 136 | MAX8997_FLASH_MODE, | 185 | MAX8997_FLASH_MODE, |
| @@ -192,7 +241,9 @@ struct max8997_platform_data { | |||
| 192 | /* ---- MUIC ---- */ | 241 | /* ---- MUIC ---- */ |
| 193 | struct max8997_muic_platform_data *muic_pdata; | 242 | struct max8997_muic_platform_data *muic_pdata; |
| 194 | 243 | ||
| 195 | /* HAPTIC: Not implemented */ | 244 | /* ---- HAPTIC ---- */ |
| 245 | struct max8997_haptic_platform_data *haptic_pdata; | ||
| 246 | |||
| 196 | /* RTC: Not implemented */ | 247 | /* RTC: Not implemented */ |
| 197 | /* ---- LED ---- */ | 248 | /* ---- LED ---- */ |
| 198 | struct max8997_led_platform_data *led_pdata; | 249 | struct max8997_led_platform_data *led_pdata; |
diff --git a/include/linux/mfd/mcp.h b/include/linux/mfd/mcp.h index f88c1cc0cb0f..a9e8bd157673 100644 --- a/include/linux/mfd/mcp.h +++ b/include/linux/mfd/mcp.h | |||
| @@ -10,8 +10,6 @@ | |||
| 10 | #ifndef MCP_H | 10 | #ifndef MCP_H |
| 11 | #define MCP_H | 11 | #define MCP_H |
| 12 | 12 | ||
| 13 | #include <mach/dma.h> | ||
| 14 | |||
| 15 | struct mcp_ops; | 13 | struct mcp_ops; |
| 16 | 14 | ||
| 17 | struct mcp { | 15 | struct mcp { |
| @@ -21,12 +19,7 @@ struct mcp { | |||
| 21 | int use_count; | 19 | int use_count; |
| 22 | unsigned int sclk_rate; | 20 | unsigned int sclk_rate; |
| 23 | unsigned int rw_timeout; | 21 | unsigned int rw_timeout; |
| 24 | dma_device_t dma_audio_rd; | ||
| 25 | dma_device_t dma_audio_wr; | ||
| 26 | dma_device_t dma_telco_rd; | ||
| 27 | dma_device_t dma_telco_wr; | ||
| 28 | struct device attached_device; | 22 | struct device attached_device; |
| 29 | int gpio_base; | ||
| 30 | }; | 23 | }; |
| 31 | 24 | ||
| 32 | struct mcp_ops { | 25 | struct mcp_ops { |
| @@ -47,15 +40,14 @@ void mcp_disable(struct mcp *); | |||
| 47 | #define mcp_get_sclk_rate(mcp) ((mcp)->sclk_rate) | 40 | #define mcp_get_sclk_rate(mcp) ((mcp)->sclk_rate) |
| 48 | 41 | ||
| 49 | struct mcp *mcp_host_alloc(struct device *, size_t); | 42 | struct mcp *mcp_host_alloc(struct device *, size_t); |
| 50 | int mcp_host_register(struct mcp *); | 43 | int mcp_host_add(struct mcp *, void *); |
| 51 | void mcp_host_unregister(struct mcp *); | 44 | void mcp_host_del(struct mcp *); |
| 45 | void mcp_host_free(struct mcp *); | ||
| 52 | 46 | ||
| 53 | struct mcp_driver { | 47 | struct mcp_driver { |
| 54 | struct device_driver drv; | 48 | struct device_driver drv; |
| 55 | int (*probe)(struct mcp *); | 49 | int (*probe)(struct mcp *); |
| 56 | void (*remove)(struct mcp *); | 50 | void (*remove)(struct mcp *); |
| 57 | int (*suspend)(struct mcp *, pm_message_t); | ||
| 58 | int (*resume)(struct mcp *); | ||
| 59 | }; | 51 | }; |
| 60 | 52 | ||
| 61 | int mcp_driver_register(struct mcp_driver *); | 53 | int mcp_driver_register(struct mcp_driver *); |
diff --git a/include/linux/mfd/pm8xxx/pm8921.h b/include/linux/mfd/pm8xxx/pm8921.h index d5517fd32d1b..00fa3de7659d 100644 --- a/include/linux/mfd/pm8xxx/pm8921.h +++ b/include/linux/mfd/pm8xxx/pm8921.h | |||
| @@ -18,7 +18,6 @@ | |||
| 18 | #ifndef __MFD_PM8921_H | 18 | #ifndef __MFD_PM8921_H |
| 19 | #define __MFD_PM8921_H | 19 | #define __MFD_PM8921_H |
| 20 | 20 | ||
| 21 | #include <linux/device.h> | ||
| 22 | #include <linux/mfd/pm8xxx/irq.h> | 21 | #include <linux/mfd/pm8xxx/irq.h> |
| 23 | 22 | ||
| 24 | #define PM8921_NR_IRQS 256 | 23 | #define PM8921_NR_IRQS 256 |
diff --git a/include/linux/mfd/stmpe.h b/include/linux/mfd/stmpe.h index ca1d7a347600..8c54de674b4b 100644 --- a/include/linux/mfd/stmpe.h +++ b/include/linux/mfd/stmpe.h | |||
| @@ -8,7 +8,9 @@ | |||
| 8 | #ifndef __LINUX_MFD_STMPE_H | 8 | #ifndef __LINUX_MFD_STMPE_H |
| 9 | #define __LINUX_MFD_STMPE_H | 9 | #define __LINUX_MFD_STMPE_H |
| 10 | 10 | ||
| 11 | #include <linux/device.h> | 11 | #include <linux/mutex.h> |
| 12 | |||
| 13 | struct device; | ||
| 12 | 14 | ||
| 13 | enum stmpe_block { | 15 | enum stmpe_block { |
| 14 | STMPE_BLOCK_GPIO = 1 << 0, | 16 | STMPE_BLOCK_GPIO = 1 << 0, |
diff --git a/include/linux/mfd/tc3589x.h b/include/linux/mfd/tc3589x.h index 16c76e124f9c..3acb3a8e3af5 100644 --- a/include/linux/mfd/tc3589x.h +++ b/include/linux/mfd/tc3589x.h | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | #ifndef __LINUX_MFD_TC3589x_H | 7 | #ifndef __LINUX_MFD_TC3589x_H |
| 8 | #define __LINUX_MFD_TC3589x_H | 8 | #define __LINUX_MFD_TC3589x_H |
| 9 | 9 | ||
| 10 | #include <linux/device.h> | 10 | struct device; |
| 11 | 11 | ||
| 12 | enum tx3589x_block { | 12 | enum tx3589x_block { |
| 13 | TC3589x_BLOCK_GPIO = 1 << 0, | 13 | TC3589x_BLOCK_GPIO = 1 << 0, |
diff --git a/include/linux/mfd/ucb1x00.h b/include/linux/mfd/ucb1x00.h index 4321f044d1e4..28af41756360 100644 --- a/include/linux/mfd/ucb1x00.h +++ b/include/linux/mfd/ucb1x00.h | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | #include <linux/mfd/mcp.h> | 13 | #include <linux/mfd/mcp.h> |
| 14 | #include <linux/gpio.h> | 14 | #include <linux/gpio.h> |
| 15 | #include <linux/semaphore.h> | 15 | #include <linux/mutex.h> |
| 16 | 16 | ||
| 17 | #define UCB_IO_DATA 0x00 | 17 | #define UCB_IO_DATA 0x00 |
| 18 | #define UCB_IO_DIR 0x01 | 18 | #define UCB_IO_DIR 0x01 |
| @@ -104,17 +104,27 @@ | |||
| 104 | #define UCB_MODE_DYN_VFLAG_ENA (1 << 12) | 104 | #define UCB_MODE_DYN_VFLAG_ENA (1 << 12) |
| 105 | #define UCB_MODE_AUD_OFF_CAN (1 << 13) | 105 | #define UCB_MODE_AUD_OFF_CAN (1 << 13) |
| 106 | 106 | ||
| 107 | enum ucb1x00_reset { | ||
| 108 | UCB_RST_PROBE, | ||
| 109 | UCB_RST_RESUME, | ||
| 110 | UCB_RST_SUSPEND, | ||
| 111 | UCB_RST_REMOVE, | ||
| 112 | UCB_RST_PROBE_FAIL, | ||
| 113 | }; | ||
| 107 | 114 | ||
| 108 | struct ucb1x00_irq { | 115 | struct ucb1x00_plat_data { |
| 109 | void *devid; | 116 | void (*reset)(enum ucb1x00_reset); |
| 110 | void (*fn)(int, void *); | 117 | unsigned irq_base; |
| 118 | int gpio_base; | ||
| 119 | unsigned can_wakeup; | ||
| 111 | }; | 120 | }; |
| 112 | 121 | ||
| 113 | struct ucb1x00 { | 122 | struct ucb1x00 { |
| 114 | spinlock_t lock; | 123 | raw_spinlock_t irq_lock; |
| 115 | struct mcp *mcp; | 124 | struct mcp *mcp; |
| 116 | unsigned int irq; | 125 | unsigned int irq; |
| 117 | struct semaphore adc_sem; | 126 | int irq_base; |
| 127 | struct mutex adc_mutex; | ||
| 118 | spinlock_t io_lock; | 128 | spinlock_t io_lock; |
| 119 | u16 id; | 129 | u16 id; |
| 120 | u16 io_dir; | 130 | u16 io_dir; |
| @@ -122,7 +132,8 @@ struct ucb1x00 { | |||
| 122 | u16 adc_cr; | 132 | u16 adc_cr; |
| 123 | u16 irq_fal_enbl; | 133 | u16 irq_fal_enbl; |
| 124 | u16 irq_ris_enbl; | 134 | u16 irq_ris_enbl; |
| 125 | struct ucb1x00_irq irq_handler[16]; | 135 | u16 irq_mask; |
| 136 | u16 irq_wake; | ||
| 126 | struct device dev; | 137 | struct device dev; |
| 127 | struct list_head node; | 138 | struct list_head node; |
| 128 | struct list_head devs; | 139 | struct list_head devs; |
| @@ -144,7 +155,7 @@ struct ucb1x00_driver { | |||
| 144 | struct list_head devs; | 155 | struct list_head devs; |
| 145 | int (*add)(struct ucb1x00_dev *dev); | 156 | int (*add)(struct ucb1x00_dev *dev); |
| 146 | void (*remove)(struct ucb1x00_dev *dev); | 157 | void (*remove)(struct ucb1x00_dev *dev); |
| 147 | int (*suspend)(struct ucb1x00_dev *dev, pm_message_t state); | 158 | int (*suspend)(struct ucb1x00_dev *dev); |
| 148 | int (*resume)(struct ucb1x00_dev *dev); | 159 | int (*resume)(struct ucb1x00_dev *dev); |
| 149 | }; | 160 | }; |
| 150 | 161 | ||
| @@ -245,15 +256,4 @@ unsigned int ucb1x00_adc_read(struct ucb1x00 *ucb, int adc_channel, int sync); | |||
| 245 | void ucb1x00_adc_enable(struct ucb1x00 *ucb); | 256 | void ucb1x00_adc_enable(struct ucb1x00 *ucb); |
| 246 | void ucb1x00_adc_disable(struct ucb1x00 *ucb); | 257 | void ucb1x00_adc_disable(struct ucb1x00 *ucb); |
| 247 | 258 | ||
| 248 | /* | ||
| 249 | * Which edges of the IRQ do you want to control today? | ||
| 250 | */ | ||
| 251 | #define UCB_RISING (1 << 0) | ||
| 252 | #define UCB_FALLING (1 << 1) | ||
| 253 | |||
| 254 | int ucb1x00_hook_irq(struct ucb1x00 *ucb, unsigned int idx, void (*fn)(int, void *), void *devid); | ||
| 255 | void ucb1x00_enable_irq(struct ucb1x00 *ucb, unsigned int idx, int edges); | ||
| 256 | void ucb1x00_disable_irq(struct ucb1x00 *ucb, unsigned int idx, int edges); | ||
| 257 | int ucb1x00_free_irq(struct ucb1x00 *ucb, unsigned int idx, void *devid); | ||
| 258 | |||
| 259 | #endif | 259 | #endif |
diff --git a/include/linux/mlx4/driver.h b/include/linux/mlx4/driver.h index e1eebf78caba..5f1298b1b5ef 100644 --- a/include/linux/mlx4/driver.h +++ b/include/linux/mlx4/driver.h | |||
| @@ -33,7 +33,6 @@ | |||
| 33 | #ifndef MLX4_DRIVER_H | 33 | #ifndef MLX4_DRIVER_H |
| 34 | #define MLX4_DRIVER_H | 34 | #define MLX4_DRIVER_H |
| 35 | 35 | ||
| 36 | #include <linux/device.h> | ||
| 37 | #include <linux/mlx4/device.h> | 36 | #include <linux/mlx4/device.h> |
| 38 | 37 | ||
| 39 | struct mlx4_dev; | 38 | struct mlx4_dev; |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 7330742e7973..cf7982336103 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
| 7 | 7 | ||
| 8 | #include <linux/gfp.h> | 8 | #include <linux/gfp.h> |
| 9 | #include <linux/bug.h> | ||
| 9 | #include <linux/list.h> | 10 | #include <linux/list.h> |
| 10 | #include <linux/mmzone.h> | 11 | #include <linux/mmzone.h> |
| 11 | #include <linux/rbtree.h> | 12 | #include <linux/rbtree.h> |
| @@ -111,7 +112,7 @@ extern unsigned int kobjsize(const void *objp); | |||
| 111 | #define VM_HUGEPAGE 0x01000000 /* MADV_HUGEPAGE marked this vma */ | 112 | #define VM_HUGEPAGE 0x01000000 /* MADV_HUGEPAGE marked this vma */ |
| 112 | #endif | 113 | #endif |
| 113 | #define VM_INSERTPAGE 0x02000000 /* The vma has had "vm_insert_page()" done on it */ | 114 | #define VM_INSERTPAGE 0x02000000 /* The vma has had "vm_insert_page()" done on it */ |
| 114 | #define VM_ALWAYSDUMP 0x04000000 /* Always include in core dumps */ | 115 | #define VM_NODUMP 0x04000000 /* Do not include in the core dump */ |
| 115 | 116 | ||
| 116 | #define VM_CAN_NONLINEAR 0x08000000 /* Has ->fault & does nonlinear pages */ | 117 | #define VM_CAN_NONLINEAR 0x08000000 /* Has ->fault & does nonlinear pages */ |
| 117 | #define VM_MIXEDMAP 0x10000000 /* Can contain "struct page" and pure PFN pages */ | 118 | #define VM_MIXEDMAP 0x10000000 /* Can contain "struct page" and pure PFN pages */ |
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 19a41d1737af..6faa145c81e3 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #ifndef LINUX_MMC_CARD_H | 10 | #ifndef LINUX_MMC_CARD_H |
| 11 | #define LINUX_MMC_CARD_H | 11 | #define LINUX_MMC_CARD_H |
| 12 | 12 | ||
| 13 | #include <linux/device.h> | ||
| 13 | #include <linux/mmc/core.h> | 14 | #include <linux/mmc/core.h> |
| 14 | #include <linux/mod_devicetable.h> | 15 | #include <linux/mod_devicetable.h> |
| 15 | 16 | ||
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index 87a976cc5654..2e6a681fceb2 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | #define LINUX_MMC_CORE_H | 9 | #define LINUX_MMC_CORE_H |
| 10 | 10 | ||
| 11 | #include <linux/interrupt.h> | 11 | #include <linux/interrupt.h> |
| 12 | #include <linux/device.h> | 12 | #include <linux/completion.h> |
| 13 | 13 | ||
| 14 | struct request; | 14 | struct request; |
| 15 | struct mmc_data; | 15 | struct mmc_data; |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index ee2b0363c040..91924e8c642b 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | #include <linux/leds.h> | 13 | #include <linux/leds.h> |
| 14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
| 15 | #include <linux/device.h> | ||
| 15 | #include <linux/fault-inject.h> | 16 | #include <linux/fault-inject.h> |
| 16 | 17 | ||
| 17 | #include <linux/mmc/core.h> | 18 | #include <linux/mmc/core.h> |
diff --git a/include/linux/mmc/ioctl.h b/include/linux/mmc/ioctl.h index 8fa5bc5f8059..1f5e68923929 100644 --- a/include/linux/mmc/ioctl.h +++ b/include/linux/mmc/ioctl.h | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | #ifndef LINUX_MMC_IOCTL_H | 1 | #ifndef LINUX_MMC_IOCTL_H |
| 2 | #define LINUX_MMC_IOCTL_H | 2 | #define LINUX_MMC_IOCTL_H |
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 3 | struct mmc_ioc_cmd { | 6 | struct mmc_ioc_cmd { |
| 4 | /* Implies direction of data. true = write, false = read */ | 7 | /* Implies direction of data. true = write, false = read */ |
| 5 | int write_flag; | 8 | int write_flag; |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index fb69ad191ad7..501da4cb8a6d 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
| @@ -414,6 +414,15 @@ struct hv_vmbus_device_id { | |||
| 414 | __attribute__((aligned(sizeof(kernel_ulong_t)))); | 414 | __attribute__((aligned(sizeof(kernel_ulong_t)))); |
| 415 | }; | 415 | }; |
| 416 | 416 | ||
| 417 | /* rpmsg */ | ||
| 418 | |||
| 419 | #define RPMSG_NAME_SIZE 32 | ||
| 420 | #define RPMSG_DEVICE_MODALIAS_FMT "rpmsg:%s" | ||
| 421 | |||
| 422 | struct rpmsg_device_id { | ||
| 423 | char name[RPMSG_NAME_SIZE]; | ||
| 424 | }; | ||
| 425 | |||
| 417 | /* i2c */ | 426 | /* i2c */ |
| 418 | 427 | ||
| 419 | #define I2C_NAME_SIZE 20 | 428 | #define I2C_NAME_SIZE 20 |
diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h index d5d2ec6494bb..37ef6b194089 100644 --- a/include/linux/mtd/cfi.h +++ b/include/linux/mtd/cfi.h | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | 22 | ||
| 23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
| 24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
| 25 | #include <linux/bug.h> | ||
| 25 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
| 26 | #include <linux/mtd/flashchip.h> | 27 | #include <linux/mtd/flashchip.h> |
| 27 | #include <linux/mtd/map.h> | 28 | #include <linux/mtd/map.h> |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 8debe299676d..1f77540bdc95 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -33,12 +33,12 @@ | |||
| 33 | #ifdef __KERNEL__ | 33 | #ifdef __KERNEL__ |
| 34 | #include <linux/pm_qos.h> | 34 | #include <linux/pm_qos.h> |
| 35 | #include <linux/timer.h> | 35 | #include <linux/timer.h> |
| 36 | #include <linux/bug.h> | ||
| 36 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
| 37 | #include <linux/atomic.h> | 38 | #include <linux/atomic.h> |
| 38 | #include <asm/cache.h> | 39 | #include <asm/cache.h> |
| 39 | #include <asm/byteorder.h> | 40 | #include <asm/byteorder.h> |
| 40 | 41 | ||
| 41 | #include <linux/device.h> | ||
| 42 | #include <linux/percpu.h> | 42 | #include <linux/percpu.h> |
| 43 | #include <linux/rculist.h> | 43 | #include <linux/rculist.h> |
| 44 | #include <linux/dmaengine.h> | 44 | #include <linux/dmaengine.h> |
| @@ -56,6 +56,7 @@ | |||
| 56 | #include <linux/netdev_features.h> | 56 | #include <linux/netdev_features.h> |
| 57 | 57 | ||
| 58 | struct netpoll_info; | 58 | struct netpoll_info; |
| 59 | struct device; | ||
| 59 | struct phy_device; | 60 | struct phy_device; |
| 60 | /* 802.11 specific */ | 61 | /* 802.11 specific */ |
| 61 | struct wireless_dev; | 62 | struct wireless_dev; |
diff --git a/include/linux/nfs.h b/include/linux/nfs.h index 8c6ee44914cb..6d1fb63f5922 100644 --- a/include/linux/nfs.h +++ b/include/linux/nfs.h | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | #define NFS_MNT_VERSION 1 | 29 | #define NFS_MNT_VERSION 1 |
| 30 | #define NFS_MNT3_VERSION 3 | 30 | #define NFS_MNT3_VERSION 3 |
| 31 | 31 | ||
| 32 | #define NFS_PIPE_DIRNAME "/nfs" | 32 | #define NFS_PIPE_DIRNAME "nfs" |
| 33 | 33 | ||
| 34 | /* | 34 | /* |
| 35 | * NFS stats. The good thing with these values is that NFSv3 errors are | 35 | * NFS stats. The good thing with these values is that NFSv3 errors are |
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 32345c2805c0..834df8bf08b6 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
| @@ -183,15 +183,12 @@ struct nfs4_acl { | |||
| 183 | 183 | ||
| 184 | typedef struct { char data[NFS4_VERIFIER_SIZE]; } nfs4_verifier; | 184 | typedef struct { char data[NFS4_VERIFIER_SIZE]; } nfs4_verifier; |
| 185 | 185 | ||
| 186 | struct nfs41_stateid { | 186 | struct nfs_stateid4 { |
| 187 | __be32 seqid; | 187 | __be32 seqid; |
| 188 | char other[NFS4_STATEID_OTHER_SIZE]; | 188 | char other[NFS4_STATEID_OTHER_SIZE]; |
| 189 | } __attribute__ ((packed)); | 189 | } __attribute__ ((packed)); |
| 190 | 190 | ||
| 191 | typedef union { | 191 | typedef struct nfs_stateid4 nfs4_stateid; |
| 192 | char data[NFS4_STATEID_SIZE]; | ||
| 193 | struct nfs41_stateid stateid; | ||
| 194 | } nfs4_stateid; | ||
| 195 | 192 | ||
| 196 | enum nfs_opnum4 { | 193 | enum nfs_opnum4 { |
| 197 | OP_ACCESS = 3, | 194 | OP_ACCESS = 3, |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 8c29950d2fa5..52a1bdb4ee2b 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
| @@ -38,6 +38,13 @@ | |||
| 38 | 38 | ||
| 39 | #ifdef __KERNEL__ | 39 | #ifdef __KERNEL__ |
| 40 | 40 | ||
| 41 | /* | ||
| 42 | * Enable dprintk() debugging support for nfs client. | ||
| 43 | */ | ||
| 44 | #ifdef CONFIG_NFS_DEBUG | ||
| 45 | # define NFS_DEBUG | ||
| 46 | #endif | ||
| 47 | |||
| 41 | #include <linux/in.h> | 48 | #include <linux/in.h> |
| 42 | #include <linux/mm.h> | 49 | #include <linux/mm.h> |
| 43 | #include <linux/pagemap.h> | 50 | #include <linux/pagemap.h> |
| @@ -171,13 +178,9 @@ struct nfs_inode { | |||
| 171 | */ | 178 | */ |
| 172 | __be32 cookieverf[2]; | 179 | __be32 cookieverf[2]; |
| 173 | 180 | ||
| 174 | /* | ||
| 175 | * This is the list of dirty unwritten pages. | ||
| 176 | */ | ||
| 177 | struct radix_tree_root nfs_page_tree; | ||
| 178 | |||
| 179 | unsigned long npages; | 181 | unsigned long npages; |
| 180 | unsigned long ncommit; | 182 | unsigned long ncommit; |
| 183 | struct list_head commit_list; | ||
| 181 | 184 | ||
| 182 | /* Open contexts for shared mmap writes */ | 185 | /* Open contexts for shared mmap writes */ |
| 183 | struct list_head open_files; | 186 | struct list_head open_files; |
| @@ -395,6 +398,29 @@ static inline void nfs_free_fhandle(const struct nfs_fh *fh) | |||
| 395 | kfree(fh); | 398 | kfree(fh); |
| 396 | } | 399 | } |
| 397 | 400 | ||
| 401 | #ifdef NFS_DEBUG | ||
| 402 | extern u32 _nfs_display_fhandle_hash(const struct nfs_fh *fh); | ||
| 403 | static inline u32 nfs_display_fhandle_hash(const struct nfs_fh *fh) | ||
| 404 | { | ||
| 405 | return _nfs_display_fhandle_hash(fh); | ||
| 406 | } | ||
| 407 | extern void _nfs_display_fhandle(const struct nfs_fh *fh, const char *caption); | ||
| 408 | #define nfs_display_fhandle(fh, caption) \ | ||
| 409 | do { \ | ||
| 410 | if (unlikely(nfs_debug & NFSDBG_FACILITY)) \ | ||
| 411 | _nfs_display_fhandle(fh, caption); \ | ||
| 412 | } while (0) | ||
| 413 | #else | ||
| 414 | static inline u32 nfs_display_fhandle_hash(const struct nfs_fh *fh) | ||
| 415 | { | ||
| 416 | return 0; | ||
| 417 | } | ||
| 418 | static inline void nfs_display_fhandle(const struct nfs_fh *fh, | ||
| 419 | const char *caption) | ||
| 420 | { | ||
| 421 | } | ||
| 422 | #endif | ||
| 423 | |||
| 398 | /* | 424 | /* |
| 399 | * linux/fs/nfs/nfsroot.c | 425 | * linux/fs/nfs/nfsroot.c |
| 400 | */ | 426 | */ |
| @@ -632,19 +658,13 @@ nfs_fileid_to_ino_t(u64 fileid) | |||
| 632 | 658 | ||
| 633 | #ifdef __KERNEL__ | 659 | #ifdef __KERNEL__ |
| 634 | 660 | ||
| 635 | /* | ||
| 636 | * Enable debugging support for nfs client. | ||
| 637 | * Requires RPC_DEBUG. | ||
| 638 | */ | ||
| 639 | #ifdef RPC_DEBUG | ||
| 640 | # define NFS_DEBUG | ||
| 641 | #endif | ||
| 642 | |||
| 643 | # undef ifdebug | 661 | # undef ifdebug |
| 644 | # ifdef NFS_DEBUG | 662 | # ifdef NFS_DEBUG |
| 645 | # define ifdebug(fac) if (unlikely(nfs_debug & NFSDBG_##fac)) | 663 | # define ifdebug(fac) if (unlikely(nfs_debug & NFSDBG_##fac)) |
| 664 | # define NFS_IFDEBUG(x) x | ||
| 646 | # else | 665 | # else |
| 647 | # define ifdebug(fac) if (0) | 666 | # define ifdebug(fac) if (0) |
| 667 | # define NFS_IFDEBUG(x) | ||
| 648 | # endif | 668 | # endif |
| 649 | #endif /* __KERNEL */ | 669 | #endif /* __KERNEL */ |
| 650 | 670 | ||
diff --git a/include/linux/nfs_fs_i.h b/include/linux/nfs_fs_i.h index 861730275ba0..a5c50d97341e 100644 --- a/include/linux/nfs_fs_i.h +++ b/include/linux/nfs_fs_i.h | |||
| @@ -1,10 +1,6 @@ | |||
| 1 | #ifndef _NFS_FS_I | 1 | #ifndef _NFS_FS_I |
| 2 | #define _NFS_FS_I | 2 | #define _NFS_FS_I |
| 3 | 3 | ||
| 4 | #include <asm/types.h> | ||
| 5 | #include <linux/list.h> | ||
| 6 | #include <linux/nfs.h> | ||
| 7 | |||
| 8 | struct nlm_lockowner; | 4 | struct nlm_lockowner; |
| 9 | 5 | ||
| 10 | /* | 6 | /* |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index ba4d7656ecfd..7073fc74481c 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/list.h> | 4 | #include <linux/list.h> |
| 5 | #include <linux/backing-dev.h> | 5 | #include <linux/backing-dev.h> |
| 6 | #include <linux/idr.h> | ||
| 6 | #include <linux/wait.h> | 7 | #include <linux/wait.h> |
| 7 | #include <linux/nfs_xdr.h> | 8 | #include <linux/nfs_xdr.h> |
| 8 | #include <linux/sunrpc/xprt.h> | 9 | #include <linux/sunrpc/xprt.h> |
| @@ -17,6 +18,7 @@ struct nfs4_sequence_res; | |||
| 17 | struct nfs_server; | 18 | struct nfs_server; |
| 18 | struct nfs4_minor_version_ops; | 19 | struct nfs4_minor_version_ops; |
| 19 | struct server_scope; | 20 | struct server_scope; |
| 21 | struct nfs41_impl_id; | ||
| 20 | 22 | ||
| 21 | /* | 23 | /* |
| 22 | * The nfs_client identifies our client state to the server. | 24 | * The nfs_client identifies our client state to the server. |
| @@ -85,6 +87,8 @@ struct nfs_client { | |||
| 85 | #endif | 87 | #endif |
| 86 | 88 | ||
| 87 | struct server_scope *server_scope; /* from exchange_id */ | 89 | struct server_scope *server_scope; /* from exchange_id */ |
| 90 | struct nfs41_impl_id *impl_id; /* from exchange_id */ | ||
| 91 | struct net *net; | ||
| 88 | }; | 92 | }; |
| 89 | 93 | ||
| 90 | /* | 94 | /* |
| @@ -144,15 +148,18 @@ struct nfs_server { | |||
| 144 | u32 acl_bitmask; /* V4 bitmask representing the ACEs | 148 | u32 acl_bitmask; /* V4 bitmask representing the ACEs |
| 145 | that are supported on this | 149 | that are supported on this |
| 146 | filesystem */ | 150 | filesystem */ |
| 151 | u32 fh_expire_type; /* V4 bitmask representing file | ||
| 152 | handle volatility type for | ||
| 153 | this filesystem */ | ||
| 147 | struct pnfs_layoutdriver_type *pnfs_curr_ld; /* Active layout driver */ | 154 | struct pnfs_layoutdriver_type *pnfs_curr_ld; /* Active layout driver */ |
| 148 | struct rpc_wait_queue roc_rpcwaitq; | 155 | struct rpc_wait_queue roc_rpcwaitq; |
| 149 | void *pnfs_ld_data; /* per mount point data */ | 156 | void *pnfs_ld_data; /* per mount point data */ |
| 150 | 157 | ||
| 151 | /* the following fields are protected by nfs_client->cl_lock */ | 158 | /* the following fields are protected by nfs_client->cl_lock */ |
| 152 | struct rb_root state_owners; | 159 | struct rb_root state_owners; |
| 153 | struct rb_root openowner_id; | ||
| 154 | struct rb_root lockowner_id; | ||
| 155 | #endif | 160 | #endif |
| 161 | struct ida openowner_id; | ||
| 162 | struct ida lockowner_id; | ||
| 156 | struct list_head state_owners_lru; | 163 | struct list_head state_owners_lru; |
| 157 | struct list_head layouts; | 164 | struct list_head layouts; |
| 158 | struct list_head delegations; | 165 | struct list_head delegations; |
| @@ -188,21 +195,23 @@ struct nfs_server { | |||
| 188 | 195 | ||
| 189 | 196 | ||
| 190 | /* maximum number of slots to use */ | 197 | /* maximum number of slots to use */ |
| 191 | #define NFS4_MAX_SLOT_TABLE RPC_MAX_SLOT_TABLE | 198 | #define NFS4_DEF_SLOT_TABLE_SIZE (16U) |
| 199 | #define NFS4_MAX_SLOT_TABLE (256U) | ||
| 200 | #define NFS4_NO_SLOT ((u32)-1) | ||
| 192 | 201 | ||
| 193 | #if defined(CONFIG_NFS_V4) | 202 | #if defined(CONFIG_NFS_V4) |
| 194 | 203 | ||
| 195 | /* Sessions */ | 204 | /* Sessions */ |
| 196 | #define SLOT_TABLE_SZ (NFS4_MAX_SLOT_TABLE/(8*sizeof(long))) | 205 | #define SLOT_TABLE_SZ DIV_ROUND_UP(NFS4_MAX_SLOT_TABLE, 8*sizeof(long)) |
| 197 | struct nfs4_slot_table { | 206 | struct nfs4_slot_table { |
| 198 | struct nfs4_slot *slots; /* seqid per slot */ | 207 | struct nfs4_slot *slots; /* seqid per slot */ |
| 199 | unsigned long used_slots[SLOT_TABLE_SZ]; /* used/unused bitmap */ | 208 | unsigned long used_slots[SLOT_TABLE_SZ]; /* used/unused bitmap */ |
| 200 | spinlock_t slot_tbl_lock; | 209 | spinlock_t slot_tbl_lock; |
| 201 | struct rpc_wait_queue slot_tbl_waitq; /* allocators may wait here */ | 210 | struct rpc_wait_queue slot_tbl_waitq; /* allocators may wait here */ |
| 202 | int max_slots; /* # slots in table */ | 211 | u32 max_slots; /* # slots in table */ |
| 203 | int highest_used_slotid; /* sent to server on each SEQ. | 212 | u32 highest_used_slotid; /* sent to server on each SEQ. |
| 204 | * op for dynamic resizing */ | 213 | * op for dynamic resizing */ |
| 205 | int target_max_slots; /* Set by CB_RECALL_SLOT as | 214 | u32 target_max_slots; /* Set by CB_RECALL_SLOT as |
| 206 | * the new max_slots */ | 215 | * the new max_slots */ |
| 207 | struct completion complete; | 216 | struct completion complete; |
| 208 | }; | 217 | }; |
diff --git a/include/linux/nfs_idmap.h b/include/linux/nfs_idmap.h index 308c18877018..7eed2012d288 100644 --- a/include/linux/nfs_idmap.h +++ b/include/linux/nfs_idmap.h | |||
| @@ -69,36 +69,22 @@ struct nfs_server; | |||
| 69 | struct nfs_fattr; | 69 | struct nfs_fattr; |
| 70 | struct nfs4_string; | 70 | struct nfs4_string; |
| 71 | 71 | ||
| 72 | #ifdef CONFIG_NFS_USE_NEW_IDMAPPER | 72 | #ifdef CONFIG_NFS_V4 |
| 73 | |||
| 74 | int nfs_idmap_init(void); | 73 | int nfs_idmap_init(void); |
| 75 | void nfs_idmap_quit(void); | 74 | void nfs_idmap_quit(void); |
| 76 | 75 | #else | |
| 77 | static inline int nfs_idmap_new(struct nfs_client *clp) | ||
| 78 | { | ||
| 79 | return 0; | ||
| 80 | } | ||
| 81 | |||
| 82 | static inline void nfs_idmap_delete(struct nfs_client *clp) | ||
| 83 | { | ||
| 84 | } | ||
| 85 | |||
| 86 | #else /* CONFIG_NFS_USE_NEW_IDMAPPER not set */ | ||
| 87 | |||
| 88 | static inline int nfs_idmap_init(void) | 76 | static inline int nfs_idmap_init(void) |
| 89 | { | 77 | { |
| 90 | return 0; | 78 | return 0; |
| 91 | } | 79 | } |
| 92 | 80 | ||
| 93 | static inline void nfs_idmap_quit(void) | 81 | static inline void nfs_idmap_quit(void) |
| 94 | { | 82 | {} |
| 95 | } | 83 | #endif |
| 96 | 84 | ||
| 97 | int nfs_idmap_new(struct nfs_client *); | 85 | int nfs_idmap_new(struct nfs_client *); |
| 98 | void nfs_idmap_delete(struct nfs_client *); | 86 | void nfs_idmap_delete(struct nfs_client *); |
| 99 | 87 | ||
| 100 | #endif /* CONFIG_NFS_USE_NEW_IDMAPPER */ | ||
| 101 | |||
| 102 | void nfs_fattr_init_names(struct nfs_fattr *fattr, | 88 | void nfs_fattr_init_names(struct nfs_fattr *fattr, |
| 103 | struct nfs4_string *owner_name, | 89 | struct nfs4_string *owner_name, |
| 104 | struct nfs4_string *group_name); | 90 | struct nfs4_string *group_name); |
diff --git a/include/linux/nfs_iostat.h b/include/linux/nfs_iostat.h index 8866bb3502ee..9dcbbe9a51fb 100644 --- a/include/linux/nfs_iostat.h +++ b/include/linux/nfs_iostat.h | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | #ifndef _LINUX_NFS_IOSTAT | 21 | #ifndef _LINUX_NFS_IOSTAT |
| 22 | #define _LINUX_NFS_IOSTAT | 22 | #define _LINUX_NFS_IOSTAT |
| 23 | 23 | ||
| 24 | #define NFS_IOSTAT_VERS "1.0" | 24 | #define NFS_IOSTAT_VERS "1.1" |
| 25 | 25 | ||
| 26 | /* | 26 | /* |
| 27 | * NFS byte counters | 27 | * NFS byte counters |
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index ab465fe8c3d6..eac30d6bec17 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h | |||
| @@ -19,12 +19,6 @@ | |||
| 19 | #include <linux/kref.h> | 19 | #include <linux/kref.h> |
| 20 | 20 | ||
| 21 | /* | 21 | /* |
| 22 | * Valid flags for the radix tree | ||
| 23 | */ | ||
| 24 | #define NFS_PAGE_TAG_LOCKED 0 | ||
| 25 | #define NFS_PAGE_TAG_COMMIT 1 | ||
| 26 | |||
| 27 | /* | ||
| 28 | * Valid flags for a dirty buffer | 22 | * Valid flags for a dirty buffer |
| 29 | */ | 23 | */ |
| 30 | enum { | 24 | enum { |
| @@ -33,16 +27,13 @@ enum { | |||
| 33 | PG_CLEAN, | 27 | PG_CLEAN, |
| 34 | PG_NEED_COMMIT, | 28 | PG_NEED_COMMIT, |
| 35 | PG_NEED_RESCHED, | 29 | PG_NEED_RESCHED, |
| 36 | PG_PNFS_COMMIT, | ||
| 37 | PG_PARTIAL_READ_FAILED, | 30 | PG_PARTIAL_READ_FAILED, |
| 31 | PG_COMMIT_TO_DS, | ||
| 38 | }; | 32 | }; |
| 39 | 33 | ||
| 40 | struct nfs_inode; | 34 | struct nfs_inode; |
| 41 | struct nfs_page { | 35 | struct nfs_page { |
| 42 | union { | 36 | struct list_head wb_list; /* Defines state of page: */ |
| 43 | struct list_head wb_list; /* Defines state of page: */ | ||
| 44 | struct pnfs_layout_segment *wb_commit_lseg; /* Used when PG_PNFS_COMMIT set */ | ||
| 45 | }; | ||
| 46 | struct page *wb_page; /* page to read in/write out */ | 37 | struct page *wb_page; /* page to read in/write out */ |
| 47 | struct nfs_open_context *wb_context; /* File state context info */ | 38 | struct nfs_open_context *wb_context; /* File state context info */ |
| 48 | struct nfs_lock_context *wb_lock_context; /* lock context info */ | 39 | struct nfs_lock_context *wb_lock_context; /* lock context info */ |
| @@ -90,8 +81,6 @@ extern struct nfs_page *nfs_create_request(struct nfs_open_context *ctx, | |||
| 90 | extern void nfs_release_request(struct nfs_page *req); | 81 | extern void nfs_release_request(struct nfs_page *req); |
| 91 | 82 | ||
| 92 | 83 | ||
| 93 | extern int nfs_scan_list(struct nfs_inode *nfsi, struct list_head *dst, | ||
| 94 | pgoff_t idx_start, unsigned int npages, int tag); | ||
| 95 | extern void nfs_pageio_init(struct nfs_pageio_descriptor *desc, | 84 | extern void nfs_pageio_init(struct nfs_pageio_descriptor *desc, |
| 96 | struct inode *inode, | 85 | struct inode *inode, |
| 97 | const struct nfs_pageio_ops *pg_ops, | 86 | const struct nfs_pageio_ops *pg_ops, |
| @@ -106,8 +95,6 @@ extern bool nfs_generic_pg_test(struct nfs_pageio_descriptor *desc, | |||
| 106 | struct nfs_page *req); | 95 | struct nfs_page *req); |
| 107 | extern int nfs_wait_on_request(struct nfs_page *); | 96 | extern int nfs_wait_on_request(struct nfs_page *); |
| 108 | extern void nfs_unlock_request(struct nfs_page *req); | 97 | extern void nfs_unlock_request(struct nfs_page *req); |
| 109 | extern int nfs_set_page_tag_locked(struct nfs_page *req); | ||
| 110 | extern void nfs_clear_page_tag_locked(struct nfs_page *req); | ||
| 111 | 98 | ||
| 112 | /* | 99 | /* |
| 113 | * Lock the page of an asynchronous request without getting a new reference | 100 | * Lock the page of an asynchronous request without getting a new reference |
| @@ -118,6 +105,16 @@ nfs_lock_request_dontget(struct nfs_page *req) | |||
| 118 | return !test_and_set_bit(PG_BUSY, &req->wb_flags); | 105 | return !test_and_set_bit(PG_BUSY, &req->wb_flags); |
| 119 | } | 106 | } |
| 120 | 107 | ||
| 108 | static inline int | ||
| 109 | nfs_lock_request(struct nfs_page *req) | ||
| 110 | { | ||
| 111 | if (test_and_set_bit(PG_BUSY, &req->wb_flags)) | ||
| 112 | return 0; | ||
| 113 | kref_get(&req->wb_kref); | ||
| 114 | return 1; | ||
| 115 | } | ||
| 116 | |||
| 117 | |||
| 121 | /** | 118 | /** |
| 122 | * nfs_list_add_request - Insert a request into a list | 119 | * nfs_list_add_request - Insert a request into a list |
| 123 | * @req: request | 120 | * @req: request |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index d6ba9a12591e..bfd0d1bf6707 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -2,7 +2,6 @@ | |||
| 2 | #define _LINUX_NFS_XDR_H | 2 | #define _LINUX_NFS_XDR_H |
| 3 | 3 | ||
| 4 | #include <linux/nfsacl.h> | 4 | #include <linux/nfsacl.h> |
| 5 | #include <linux/nfs3.h> | ||
| 6 | #include <linux/sunrpc/gss_api.h> | 5 | #include <linux/sunrpc/gss_api.h> |
| 7 | 6 | ||
| 8 | /* | 7 | /* |
| @@ -89,11 +88,12 @@ struct nfs_fattr { | |||
| 89 | #define NFS_ATTR_FATTR_PRECTIME (1U << 16) | 88 | #define NFS_ATTR_FATTR_PRECTIME (1U << 16) |
| 90 | #define NFS_ATTR_FATTR_CHANGE (1U << 17) | 89 | #define NFS_ATTR_FATTR_CHANGE (1U << 17) |
| 91 | #define NFS_ATTR_FATTR_PRECHANGE (1U << 18) | 90 | #define NFS_ATTR_FATTR_PRECHANGE (1U << 18) |
| 92 | #define NFS_ATTR_FATTR_V4_REFERRAL (1U << 19) /* NFSv4 referral */ | 91 | #define NFS_ATTR_FATTR_V4_LOCATIONS (1U << 19) |
| 93 | #define NFS_ATTR_FATTR_MOUNTPOINT (1U << 20) /* Treat as mountpoint */ | 92 | #define NFS_ATTR_FATTR_V4_REFERRAL (1U << 20) |
| 94 | #define NFS_ATTR_FATTR_MOUNTED_ON_FILEID (1U << 21) | 93 | #define NFS_ATTR_FATTR_MOUNTPOINT (1U << 21) |
| 95 | #define NFS_ATTR_FATTR_OWNER_NAME (1U << 22) | 94 | #define NFS_ATTR_FATTR_MOUNTED_ON_FILEID (1U << 22) |
| 96 | #define NFS_ATTR_FATTR_GROUP_NAME (1U << 23) | 95 | #define NFS_ATTR_FATTR_OWNER_NAME (1U << 23) |
| 96 | #define NFS_ATTR_FATTR_GROUP_NAME (1U << 24) | ||
| 97 | 97 | ||
| 98 | #define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \ | 98 | #define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \ |
| 99 | | NFS_ATTR_FATTR_MODE \ | 99 | | NFS_ATTR_FATTR_MODE \ |
| @@ -182,7 +182,7 @@ struct nfs4_slot { | |||
| 182 | 182 | ||
| 183 | struct nfs4_sequence_args { | 183 | struct nfs4_sequence_args { |
| 184 | struct nfs4_session *sa_session; | 184 | struct nfs4_session *sa_session; |
| 185 | u8 sa_slotid; | 185 | u32 sa_slotid; |
| 186 | u8 sa_cache_this; | 186 | u8 sa_cache_this; |
| 187 | }; | 187 | }; |
| 188 | 188 | ||
| @@ -977,6 +977,7 @@ struct nfs4_server_caps_res { | |||
| 977 | u32 acl_bitmask; | 977 | u32 acl_bitmask; |
| 978 | u32 has_links; | 978 | u32 has_links; |
| 979 | u32 has_symlinks; | 979 | u32 has_symlinks; |
| 980 | u32 fh_expire_type; | ||
| 980 | struct nfs4_sequence_res seq_res; | 981 | struct nfs4_sequence_res seq_res; |
| 981 | }; | 982 | }; |
| 982 | 983 | ||
| @@ -1055,14 +1056,6 @@ struct nfstime4 { | |||
| 1055 | }; | 1056 | }; |
| 1056 | 1057 | ||
| 1057 | #ifdef CONFIG_NFS_V4_1 | 1058 | #ifdef CONFIG_NFS_V4_1 |
| 1058 | struct nfs_impl_id4 { | ||
| 1059 | u32 domain_len; | ||
| 1060 | char *domain; | ||
| 1061 | u32 name_len; | ||
| 1062 | char *name; | ||
| 1063 | struct nfstime4 date; | ||
| 1064 | }; | ||
| 1065 | |||
| 1066 | #define NFS4_EXCHANGE_ID_LEN (48) | 1059 | #define NFS4_EXCHANGE_ID_LEN (48) |
| 1067 | struct nfs41_exchange_id_args { | 1060 | struct nfs41_exchange_id_args { |
| 1068 | struct nfs_client *client; | 1061 | struct nfs_client *client; |
| @@ -1083,10 +1076,17 @@ struct server_scope { | |||
| 1083 | char server_scope[NFS4_OPAQUE_LIMIT]; | 1076 | char server_scope[NFS4_OPAQUE_LIMIT]; |
| 1084 | }; | 1077 | }; |
| 1085 | 1078 | ||
| 1079 | struct nfs41_impl_id { | ||
| 1080 | char domain[NFS4_OPAQUE_LIMIT + 1]; | ||
| 1081 | char name[NFS4_OPAQUE_LIMIT + 1]; | ||
| 1082 | struct nfstime4 date; | ||
| 1083 | }; | ||
| 1084 | |||
| 1086 | struct nfs41_exchange_id_res { | 1085 | struct nfs41_exchange_id_res { |
| 1087 | struct nfs_client *client; | 1086 | struct nfs_client *client; |
| 1088 | u32 flags; | 1087 | u32 flags; |
| 1089 | struct server_scope *server_scope; | 1088 | struct server_scope *server_scope; |
| 1089 | struct nfs41_impl_id *impl_id; | ||
| 1090 | }; | 1090 | }; |
| 1091 | 1091 | ||
| 1092 | struct nfs41_create_session_args { | 1092 | struct nfs41_create_session_args { |
| @@ -1192,6 +1192,27 @@ struct nfs_write_data { | |||
| 1192 | struct page *page_array[NFS_PAGEVEC_SIZE]; | 1192 | struct page *page_array[NFS_PAGEVEC_SIZE]; |
| 1193 | }; | 1193 | }; |
| 1194 | 1194 | ||
| 1195 | struct nfs_unlinkdata { | ||
| 1196 | struct hlist_node list; | ||
| 1197 | struct nfs_removeargs args; | ||
| 1198 | struct nfs_removeres res; | ||
| 1199 | struct inode *dir; | ||
| 1200 | struct rpc_cred *cred; | ||
| 1201 | struct nfs_fattr dir_attr; | ||
| 1202 | }; | ||
| 1203 | |||
| 1204 | struct nfs_renamedata { | ||
| 1205 | struct nfs_renameargs args; | ||
| 1206 | struct nfs_renameres res; | ||
| 1207 | struct rpc_cred *cred; | ||
| 1208 | struct inode *old_dir; | ||
| 1209 | struct dentry *old_dentry; | ||
| 1210 | struct nfs_fattr old_fattr; | ||
| 1211 | struct inode *new_dir; | ||
| 1212 | struct dentry *new_dentry; | ||
| 1213 | struct nfs_fattr new_fattr; | ||
| 1214 | }; | ||
| 1215 | |||
| 1195 | struct nfs_access_entry; | 1216 | struct nfs_access_entry; |
| 1196 | struct nfs_client; | 1217 | struct nfs_client; |
| 1197 | struct rpc_timeout; | 1218 | struct rpc_timeout; |
| @@ -1221,10 +1242,12 @@ struct nfs_rpc_ops { | |||
| 1221 | struct iattr *, int, struct nfs_open_context *); | 1242 | struct iattr *, int, struct nfs_open_context *); |
| 1222 | int (*remove) (struct inode *, struct qstr *); | 1243 | int (*remove) (struct inode *, struct qstr *); |
| 1223 | void (*unlink_setup) (struct rpc_message *, struct inode *dir); | 1244 | void (*unlink_setup) (struct rpc_message *, struct inode *dir); |
| 1245 | void (*unlink_rpc_prepare) (struct rpc_task *, struct nfs_unlinkdata *); | ||
| 1224 | int (*unlink_done) (struct rpc_task *, struct inode *); | 1246 | int (*unlink_done) (struct rpc_task *, struct inode *); |
| 1225 | int (*rename) (struct inode *, struct qstr *, | 1247 | int (*rename) (struct inode *, struct qstr *, |
| 1226 | struct inode *, struct qstr *); | 1248 | struct inode *, struct qstr *); |
| 1227 | void (*rename_setup) (struct rpc_message *msg, struct inode *dir); | 1249 | void (*rename_setup) (struct rpc_message *msg, struct inode *dir); |
| 1250 | void (*rename_rpc_prepare)(struct rpc_task *task, struct nfs_renamedata *); | ||
| 1228 | int (*rename_done) (struct rpc_task *task, struct inode *old_dir, struct inode *new_dir); | 1251 | int (*rename_done) (struct rpc_task *task, struct inode *old_dir, struct inode *new_dir); |
| 1229 | int (*link) (struct inode *, struct inode *, struct qstr *); | 1252 | int (*link) (struct inode *, struct inode *, struct qstr *); |
| 1230 | int (*symlink) (struct inode *, struct dentry *, struct page *, | 1253 | int (*symlink) (struct inode *, struct dentry *, struct page *, |
| @@ -1244,8 +1267,10 @@ struct nfs_rpc_ops { | |||
| 1244 | int (*set_capabilities)(struct nfs_server *, struct nfs_fh *); | 1267 | int (*set_capabilities)(struct nfs_server *, struct nfs_fh *); |
| 1245 | int (*decode_dirent)(struct xdr_stream *, struct nfs_entry *, int); | 1268 | int (*decode_dirent)(struct xdr_stream *, struct nfs_entry *, int); |
| 1246 | void (*read_setup) (struct nfs_read_data *, struct rpc_message *); | 1269 | void (*read_setup) (struct nfs_read_data *, struct rpc_message *); |
| 1270 | void (*read_rpc_prepare)(struct rpc_task *, struct nfs_read_data *); | ||
| 1247 | int (*read_done) (struct rpc_task *, struct nfs_read_data *); | 1271 | int (*read_done) (struct rpc_task *, struct nfs_read_data *); |
| 1248 | void (*write_setup) (struct nfs_write_data *, struct rpc_message *); | 1272 | void (*write_setup) (struct nfs_write_data *, struct rpc_message *); |
| 1273 | void (*write_rpc_prepare)(struct rpc_task *, struct nfs_write_data *); | ||
| 1249 | int (*write_done) (struct rpc_task *, struct nfs_write_data *); | 1274 | int (*write_done) (struct rpc_task *, struct nfs_write_data *); |
| 1250 | void (*commit_setup) (struct nfs_write_data *, struct rpc_message *); | 1275 | void (*commit_setup) (struct nfs_write_data *, struct rpc_message *); |
| 1251 | int (*commit_done) (struct rpc_task *, struct nfs_write_data *); | 1276 | int (*commit_done) (struct rpc_task *, struct nfs_write_data *); |
| @@ -1275,11 +1300,11 @@ struct nfs_rpc_ops { | |||
| 1275 | extern const struct nfs_rpc_ops nfs_v2_clientops; | 1300 | extern const struct nfs_rpc_ops nfs_v2_clientops; |
| 1276 | extern const struct nfs_rpc_ops nfs_v3_clientops; | 1301 | extern const struct nfs_rpc_ops nfs_v3_clientops; |
| 1277 | extern const struct nfs_rpc_ops nfs_v4_clientops; | 1302 | extern const struct nfs_rpc_ops nfs_v4_clientops; |
| 1278 | extern struct rpc_version nfs_version2; | 1303 | extern const struct rpc_version nfs_version2; |
| 1279 | extern struct rpc_version nfs_version3; | 1304 | extern const struct rpc_version nfs_version3; |
| 1280 | extern struct rpc_version nfs_version4; | 1305 | extern const struct rpc_version nfs_version4; |
| 1281 | 1306 | ||
| 1282 | extern struct rpc_version nfsacl_version3; | 1307 | extern const struct rpc_version nfsacl_version3; |
| 1283 | extern struct rpc_program nfsacl_program; | 1308 | extern const struct rpc_program nfsacl_program; |
| 1284 | 1309 | ||
| 1285 | #endif | 1310 | #endif |
diff --git a/include/linux/nilfs2_fs.h b/include/linux/nilfs2_fs.h index 7454ad7451b4..89bd4a4dcfb4 100644 --- a/include/linux/nilfs2_fs.h +++ b/include/linux/nilfs2_fs.h | |||
| @@ -41,6 +41,7 @@ | |||
| 41 | #include <linux/types.h> | 41 | #include <linux/types.h> |
| 42 | #include <linux/ioctl.h> | 42 | #include <linux/ioctl.h> |
| 43 | #include <linux/magic.h> | 43 | #include <linux/magic.h> |
| 44 | #include <linux/bug.h> | ||
| 44 | 45 | ||
| 45 | 46 | ||
| 46 | #define NILFS_INODE_BMAP_SIZE 7 | 47 | #define NILFS_INODE_BMAP_SIZE 7 |
diff --git a/include/linux/nmi.h b/include/linux/nmi.h index 2d304efc89df..db50840e6355 100644 --- a/include/linux/nmi.h +++ b/include/linux/nmi.h | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | * may be used to reset the timeout - for code which intentionally | 14 | * may be used to reset the timeout - for code which intentionally |
| 15 | * disables interrupts for a long time. This call is stateless. | 15 | * disables interrupts for a long time. This call is stateless. |
| 16 | */ | 16 | */ |
| 17 | #if defined(ARCH_HAS_NMI_WATCHDOG) || defined(CONFIG_HARDLOCKUP_DETECTOR) | 17 | #if defined(CONFIG_HAVE_NMI_WATCHDOG) || defined(CONFIG_HARDLOCKUP_DETECTOR) |
| 18 | #include <asm/nmi.h> | 18 | #include <asm/nmi.h> |
| 19 | extern void touch_nmi_watchdog(void); | 19 | extern void touch_nmi_watchdog(void); |
| 20 | #else | 20 | #else |
diff --git a/include/linux/of_device.h b/include/linux/of_device.h index cbc42143fa5b..901b7435e890 100644 --- a/include/linux/of_device.h +++ b/include/linux/of_device.h | |||
| @@ -5,10 +5,11 @@ | |||
| 5 | #include <linux/of_platform.h> /* temporary until merge */ | 5 | #include <linux/of_platform.h> /* temporary until merge */ |
| 6 | 6 | ||
| 7 | #ifdef CONFIG_OF_DEVICE | 7 | #ifdef CONFIG_OF_DEVICE |
| 8 | #include <linux/device.h> | ||
| 9 | #include <linux/of.h> | 8 | #include <linux/of.h> |
| 10 | #include <linux/mod_devicetable.h> | 9 | #include <linux/mod_devicetable.h> |
| 11 | 10 | ||
| 11 | struct device; | ||
| 12 | |||
| 12 | extern const struct of_device_id *of_match_device( | 13 | extern const struct of_device_id *of_match_device( |
| 13 | const struct of_device_id *matches, const struct device *dev); | 14 | const struct of_device_id *matches, const struct device *dev); |
| 14 | extern void of_device_make_bus_id(struct device *dev); | 15 | extern void of_device_make_bus_id(struct device *dev); |
diff --git a/include/linux/omapfb.h b/include/linux/omapfb.h index c0b018790f07..4ff57e81051d 100644 --- a/include/linux/omapfb.h +++ b/include/linux/omapfb.h | |||
| @@ -222,41 +222,11 @@ struct omapfb_display_info { | |||
| 222 | 222 | ||
| 223 | #include <plat/board.h> | 223 | #include <plat/board.h> |
| 224 | 224 | ||
| 225 | #ifdef CONFIG_ARCH_OMAP1 | ||
| 226 | #define OMAPFB_PLANE_NUM 1 | ||
| 227 | #else | ||
| 228 | #define OMAPFB_PLANE_NUM 3 | ||
| 229 | #endif | ||
| 230 | |||
| 231 | struct omapfb_mem_region { | ||
| 232 | u32 paddr; | ||
| 233 | void __iomem *vaddr; | ||
| 234 | unsigned long size; | ||
| 235 | u8 type; /* OMAPFB_PLANE_MEM_* */ | ||
| 236 | enum omapfb_color_format format;/* OMAPFB_COLOR_* */ | ||
| 237 | unsigned format_used:1; /* Must be set when format is set. | ||
| 238 | * Needed b/c of the badly chosen 0 | ||
| 239 | * base for OMAPFB_COLOR_* values | ||
| 240 | */ | ||
| 241 | unsigned alloc:1; /* allocated by the driver */ | ||
| 242 | unsigned map:1; /* kernel mapped by the driver */ | ||
| 243 | }; | ||
| 244 | |||
| 245 | struct omapfb_mem_desc { | ||
| 246 | int region_cnt; | ||
| 247 | struct omapfb_mem_region region[OMAPFB_PLANE_NUM]; | ||
| 248 | }; | ||
| 249 | |||
| 250 | struct omapfb_platform_data { | 225 | struct omapfb_platform_data { |
| 251 | struct omap_lcd_config lcd; | 226 | struct omap_lcd_config lcd; |
| 252 | struct omapfb_mem_desc mem_desc; | ||
| 253 | void *ctrl_platform_data; | ||
| 254 | }; | 227 | }; |
| 255 | 228 | ||
| 256 | /* in arch/arm/plat-omap/fb.c */ | 229 | void __init omapfb_set_lcd_config(const struct omap_lcd_config *config); |
| 257 | extern void omapfb_set_platform_data(struct omapfb_platform_data *data); | ||
| 258 | extern void omapfb_set_ctrl_platform_data(void *pdata); | ||
| 259 | extern void omapfb_reserve_sdram_memblock(void); | ||
| 260 | 230 | ||
| 261 | #endif | 231 | #endif |
| 262 | 232 | ||
diff --git a/include/linux/opp.h b/include/linux/opp.h index ee94b33080c2..2a4e5faee904 100644 --- a/include/linux/opp.h +++ b/include/linux/opp.h | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/notifier.h> | 19 | #include <linux/notifier.h> |
| 20 | 20 | ||
| 21 | struct opp; | 21 | struct opp; |
| 22 | struct device; | ||
| 22 | 23 | ||
| 23 | enum opp_event { | 24 | enum opp_event { |
| 24 | OPP_EVENT_ADD, OPP_EVENT_ENABLE, OPP_EVENT_DISABLE, | 25 | OPP_EVENT_ADD, OPP_EVENT_ENABLE, OPP_EVENT_DISABLE, |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 6b25758e028e..c88d2a9451af 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | #define PAGE_FLAGS_H | 6 | #define PAGE_FLAGS_H |
| 7 | 7 | ||
| 8 | #include <linux/types.h> | 8 | #include <linux/types.h> |
| 9 | #include <linux/bug.h> | ||
| 9 | #ifndef __GENERATING_BOUNDS_H | 10 | #ifndef __GENERATING_BOUNDS_H |
| 10 | #include <linux/mm_types.h> | 11 | #include <linux/mm_types.h> |
| 11 | #include <generated/bounds.h> | 12 | #include <generated/bounds.h> |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 900da5db60ee..e444f5b49118 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -299,7 +299,6 @@ struct pci_dev { | |||
| 299 | */ | 299 | */ |
| 300 | unsigned int irq; | 300 | unsigned int irq; |
| 301 | struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */ | 301 | struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */ |
| 302 | resource_size_t fw_addr[DEVICE_COUNT_RESOURCE]; /* FW-assigned addr */ | ||
| 303 | 302 | ||
| 304 | /* These fields are used by common fixups */ | 303 | /* These fields are used by common fixups */ |
| 305 | unsigned int transparent:1; /* Transparent PCI bridge */ | 304 | unsigned int transparent:1; /* Transparent PCI bridge */ |
| @@ -369,24 +368,17 @@ static inline int pci_channel_offline(struct pci_dev *pdev) | |||
| 369 | return (pdev->error_state != pci_channel_io_normal); | 368 | return (pdev->error_state != pci_channel_io_normal); |
| 370 | } | 369 | } |
| 371 | 370 | ||
| 372 | static inline struct pci_cap_saved_state *pci_find_saved_cap( | 371 | struct pci_host_bridge_window { |
| 373 | struct pci_dev *pci_dev, char cap) | 372 | struct list_head list; |
| 374 | { | 373 | struct resource *res; /* host bridge aperture (CPU address) */ |
| 375 | struct pci_cap_saved_state *tmp; | 374 | resource_size_t offset; /* bus address + offset = CPU address */ |
| 376 | struct hlist_node *pos; | 375 | }; |
| 377 | |||
| 378 | hlist_for_each_entry(tmp, pos, &pci_dev->saved_cap_space, next) { | ||
| 379 | if (tmp->cap.cap_nr == cap) | ||
| 380 | return tmp; | ||
| 381 | } | ||
| 382 | return NULL; | ||
| 383 | } | ||
| 384 | 376 | ||
| 385 | static inline void pci_add_saved_cap(struct pci_dev *pci_dev, | 377 | struct pci_host_bridge { |
| 386 | struct pci_cap_saved_state *new_cap) | 378 | struct list_head list; |
| 387 | { | 379 | struct pci_bus *bus; /* root bus */ |
| 388 | hlist_add_head(&new_cap->next, &pci_dev->saved_cap_space); | 380 | struct list_head windows; /* pci_host_bridge_windows */ |
| 389 | } | 381 | }; |
| 390 | 382 | ||
| 391 | /* | 383 | /* |
| 392 | * The first PCI_BRIDGE_RESOURCE_NUM PCI bus resources (those that correspond | 384 | * The first PCI_BRIDGE_RESOURCE_NUM PCI bus resources (those that correspond |
| @@ -656,6 +648,10 @@ void pci_fixup_cardbus(struct pci_bus *); | |||
| 656 | 648 | ||
| 657 | /* Generic PCI functions used internally */ | 649 | /* Generic PCI functions used internally */ |
| 658 | 650 | ||
| 651 | void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, | ||
| 652 | struct resource *res); | ||
| 653 | void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, | ||
| 654 | struct pci_bus_region *region); | ||
| 659 | void pcibios_scan_specific_bus(int busn); | 655 | void pcibios_scan_specific_bus(int busn); |
| 660 | extern struct pci_bus *pci_find_bus(int domain, int busnr); | 656 | extern struct pci_bus *pci_find_bus(int domain, int busnr); |
| 661 | void pci_bus_add_devices(const struct pci_bus *bus); | 657 | void pci_bus_add_devices(const struct pci_bus *bus); |
| @@ -690,7 +686,8 @@ u8 pci_common_swizzle(struct pci_dev *dev, u8 *pinp); | |||
| 690 | extern struct pci_dev *pci_dev_get(struct pci_dev *dev); | 686 | extern struct pci_dev *pci_dev_get(struct pci_dev *dev); |
| 691 | extern void pci_dev_put(struct pci_dev *dev); | 687 | extern void pci_dev_put(struct pci_dev *dev); |
| 692 | extern void pci_remove_bus(struct pci_bus *b); | 688 | extern void pci_remove_bus(struct pci_bus *b); |
| 693 | extern void pci_remove_bus_device(struct pci_dev *dev); | 689 | extern void __pci_remove_bus_device(struct pci_dev *dev); |
| 690 | extern void pci_stop_and_remove_bus_device(struct pci_dev *dev); | ||
| 694 | extern void pci_stop_bus_device(struct pci_dev *dev); | 691 | extern void pci_stop_bus_device(struct pci_dev *dev); |
| 695 | void pci_setup_cardbus(struct pci_bus *bus); | 692 | void pci_setup_cardbus(struct pci_bus *bus); |
| 696 | extern void pci_sort_breadthfirst(void); | 693 | extern void pci_sort_breadthfirst(void); |
| @@ -883,6 +880,7 @@ void set_pcie_hotplug_bridge(struct pci_dev *pdev); | |||
| 883 | /* Functions for PCI Hotplug drivers to use */ | 880 | /* Functions for PCI Hotplug drivers to use */ |
| 884 | int pci_bus_find_capability(struct pci_bus *bus, unsigned int devfn, int cap); | 881 | int pci_bus_find_capability(struct pci_bus *bus, unsigned int devfn, int cap); |
| 885 | #ifdef CONFIG_HOTPLUG | 882 | #ifdef CONFIG_HOTPLUG |
| 883 | unsigned int pci_rescan_bus_bridge_resize(struct pci_dev *bridge); | ||
| 886 | unsigned int pci_rescan_bus(struct pci_bus *bus); | 884 | unsigned int pci_rescan_bus(struct pci_bus *bus); |
| 887 | #endif | 885 | #endif |
| 888 | 886 | ||
| @@ -892,13 +890,13 @@ ssize_t pci_write_vpd(struct pci_dev *dev, loff_t pos, size_t count, const void | |||
| 892 | int pci_vpd_truncate(struct pci_dev *dev, size_t size); | 890 | int pci_vpd_truncate(struct pci_dev *dev, size_t size); |
| 893 | 891 | ||
| 894 | /* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */ | 892 | /* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */ |
| 893 | resource_size_t pcibios_retrieve_fw_addr(struct pci_dev *dev, int idx); | ||
| 895 | void pci_bus_assign_resources(const struct pci_bus *bus); | 894 | void pci_bus_assign_resources(const struct pci_bus *bus); |
| 896 | void pci_bus_size_bridges(struct pci_bus *bus); | 895 | void pci_bus_size_bridges(struct pci_bus *bus); |
| 897 | int pci_claim_resource(struct pci_dev *, int); | 896 | int pci_claim_resource(struct pci_dev *, int); |
| 898 | void pci_assign_unassigned_resources(void); | 897 | void pci_assign_unassigned_resources(void); |
| 899 | void pci_assign_unassigned_bridge_resources(struct pci_dev *bridge); | 898 | void pci_assign_unassigned_bridge_resources(struct pci_dev *bridge); |
| 900 | void pdev_enable_device(struct pci_dev *); | 899 | void pdev_enable_device(struct pci_dev *); |
| 901 | void pdev_sort_resources(struct pci_dev *, struct resource_list *); | ||
| 902 | int pci_enable_resources(struct pci_dev *, int mask); | 900 | int pci_enable_resources(struct pci_dev *, int mask); |
| 903 | void pci_fixup_irqs(u8 (*)(struct pci_dev *, u8 *), | 901 | void pci_fixup_irqs(u8 (*)(struct pci_dev *, u8 *), |
| 904 | int (*)(const struct pci_dev *, u8, u8)); | 902 | int (*)(const struct pci_dev *, u8, u8)); |
| @@ -915,6 +913,8 @@ void pci_release_selected_regions(struct pci_dev *, int); | |||
| 915 | 913 | ||
| 916 | /* drivers/pci/bus.c */ | 914 | /* drivers/pci/bus.c */ |
| 917 | void pci_add_resource(struct list_head *resources, struct resource *res); | 915 | void pci_add_resource(struct list_head *resources, struct resource *res); |
| 916 | void pci_add_resource_offset(struct list_head *resources, struct resource *res, | ||
| 917 | resource_size_t offset); | ||
| 918 | void pci_free_resource_list(struct list_head *resources); | 918 | void pci_free_resource_list(struct list_head *resources); |
| 919 | void pci_bus_add_resource(struct pci_bus *bus, struct resource *res, unsigned int flags); | 919 | void pci_bus_add_resource(struct pci_bus *bus, struct resource *res, unsigned int flags); |
| 920 | struct resource *pci_bus_resource_n(const struct pci_bus *bus, int n); | 920 | struct resource *pci_bus_resource_n(const struct pci_bus *bus, int n); |
| @@ -960,7 +960,7 @@ void pci_unregister_driver(struct pci_driver *dev); | |||
| 960 | module_driver(__pci_driver, pci_register_driver, \ | 960 | module_driver(__pci_driver, pci_register_driver, \ |
| 961 | pci_unregister_driver) | 961 | pci_unregister_driver) |
| 962 | 962 | ||
| 963 | void pci_remove_behind_bridge(struct pci_dev *dev); | 963 | void pci_stop_and_remove_behind_bridge(struct pci_dev *dev); |
| 964 | struct pci_driver *pci_dev_driver(const struct pci_dev *dev); | 964 | struct pci_driver *pci_dev_driver(const struct pci_dev *dev); |
| 965 | int pci_add_dynid(struct pci_driver *drv, | 965 | int pci_add_dynid(struct pci_driver *drv, |
| 966 | unsigned int vendor, unsigned int device, | 966 | unsigned int vendor, unsigned int device, |
| @@ -1396,7 +1396,10 @@ static inline void pci_resource_to_user(const struct pci_dev *dev, int bar, | |||
| 1396 | */ | 1396 | */ |
| 1397 | 1397 | ||
| 1398 | struct pci_fixup { | 1398 | struct pci_fixup { |
| 1399 | u16 vendor, device; /* You can use PCI_ANY_ID here of course */ | 1399 | u16 vendor; /* You can use PCI_ANY_ID here of course */ |
| 1400 | u16 device; /* You can use PCI_ANY_ID here of course */ | ||
| 1401 | u32 class; /* You can use PCI_ANY_ID here too */ | ||
| 1402 | unsigned int class_shift; /* should be 0, 8, 16 */ | ||
| 1400 | void (*hook)(struct pci_dev *dev); | 1403 | void (*hook)(struct pci_dev *dev); |
| 1401 | }; | 1404 | }; |
| 1402 | 1405 | ||
| @@ -1411,30 +1414,68 @@ enum pci_fixup_pass { | |||
| 1411 | }; | 1414 | }; |
| 1412 | 1415 | ||
| 1413 | /* Anonymous variables would be nice... */ | 1416 | /* Anonymous variables would be nice... */ |
| 1414 | #define DECLARE_PCI_FIXUP_SECTION(section, name, vendor, device, hook) \ | 1417 | #define DECLARE_PCI_FIXUP_SECTION(section, name, vendor, device, class, \ |
| 1415 | static const struct pci_fixup __pci_fixup_##name __used \ | 1418 | class_shift, hook) \ |
| 1416 | __attribute__((__section__(#section))) = { vendor, device, hook }; | 1419 | static const struct pci_fixup const __pci_fixup_##name __used \ |
| 1420 | __attribute__((__section__(#section), aligned((sizeof(void *))))) \ | ||
| 1421 | = { vendor, device, class, class_shift, hook }; | ||
| 1422 | |||
| 1423 | #define DECLARE_PCI_FIXUP_CLASS_EARLY(vendor, device, class, \ | ||
| 1424 | class_shift, hook) \ | ||
| 1425 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_early, \ | ||
| 1426 | vendor##device##hook, vendor, device, class, class_shift, hook) | ||
| 1427 | #define DECLARE_PCI_FIXUP_CLASS_HEADER(vendor, device, class, \ | ||
| 1428 | class_shift, hook) \ | ||
| 1429 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_header, \ | ||
| 1430 | vendor##device##hook, vendor, device, class, class_shift, hook) | ||
| 1431 | #define DECLARE_PCI_FIXUP_CLASS_FINAL(vendor, device, class, \ | ||
| 1432 | class_shift, hook) \ | ||
| 1433 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final, \ | ||
| 1434 | vendor##device##hook, vendor, device, class, class_shift, hook) | ||
| 1435 | #define DECLARE_PCI_FIXUP_CLASS_ENABLE(vendor, device, class, \ | ||
| 1436 | class_shift, hook) \ | ||
| 1437 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_enable, \ | ||
| 1438 | vendor##device##hook, vendor, device, class, class_shift, hook) | ||
| 1439 | #define DECLARE_PCI_FIXUP_CLASS_RESUME(vendor, device, class, \ | ||
| 1440 | class_shift, hook) \ | ||
| 1441 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume, \ | ||
| 1442 | resume##vendor##device##hook, vendor, device, class, \ | ||
| 1443 | class_shift, hook) | ||
| 1444 | #define DECLARE_PCI_FIXUP_CLASS_RESUME_EARLY(vendor, device, class, \ | ||
| 1445 | class_shift, hook) \ | ||
| 1446 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume_early, \ | ||
| 1447 | resume_early##vendor##device##hook, vendor, device, \ | ||
| 1448 | class, class_shift, hook) | ||
| 1449 | #define DECLARE_PCI_FIXUP_CLASS_SUSPEND(vendor, device, class, \ | ||
| 1450 | class_shift, hook) \ | ||
| 1451 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend, \ | ||
| 1452 | suspend##vendor##device##hook, vendor, device, class, \ | ||
| 1453 | class_shift, hook) | ||
| 1454 | |||
| 1417 | #define DECLARE_PCI_FIXUP_EARLY(vendor, device, hook) \ | 1455 | #define DECLARE_PCI_FIXUP_EARLY(vendor, device, hook) \ |
| 1418 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_early, \ | 1456 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_early, \ |
| 1419 | vendor##device##hook, vendor, device, hook) | 1457 | vendor##device##hook, vendor, device, PCI_ANY_ID, 0, hook) |
| 1420 | #define DECLARE_PCI_FIXUP_HEADER(vendor, device, hook) \ | 1458 | #define DECLARE_PCI_FIXUP_HEADER(vendor, device, hook) \ |
| 1421 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_header, \ | 1459 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_header, \ |
| 1422 | vendor##device##hook, vendor, device, hook) | 1460 | vendor##device##hook, vendor, device, PCI_ANY_ID, 0, hook) |
| 1423 | #define DECLARE_PCI_FIXUP_FINAL(vendor, device, hook) \ | 1461 | #define DECLARE_PCI_FIXUP_FINAL(vendor, device, hook) \ |
| 1424 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final, \ | 1462 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final, \ |
| 1425 | vendor##device##hook, vendor, device, hook) | 1463 | vendor##device##hook, vendor, device, PCI_ANY_ID, 0, hook) |
| 1426 | #define DECLARE_PCI_FIXUP_ENABLE(vendor, device, hook) \ | 1464 | #define DECLARE_PCI_FIXUP_ENABLE(vendor, device, hook) \ |
| 1427 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_enable, \ | 1465 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_enable, \ |
| 1428 | vendor##device##hook, vendor, device, hook) | 1466 | vendor##device##hook, vendor, device, PCI_ANY_ID, 0, hook) |
| 1429 | #define DECLARE_PCI_FIXUP_RESUME(vendor, device, hook) \ | 1467 | #define DECLARE_PCI_FIXUP_RESUME(vendor, device, hook) \ |
| 1430 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume, \ | 1468 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume, \ |
| 1431 | resume##vendor##device##hook, vendor, device, hook) | 1469 | resume##vendor##device##hook, vendor, device, \ |
| 1470 | PCI_ANY_ID, 0, hook) | ||
| 1432 | #define DECLARE_PCI_FIXUP_RESUME_EARLY(vendor, device, hook) \ | 1471 | #define DECLARE_PCI_FIXUP_RESUME_EARLY(vendor, device, hook) \ |
| 1433 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume_early, \ | 1472 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume_early, \ |
| 1434 | resume_early##vendor##device##hook, vendor, device, hook) | 1473 | resume_early##vendor##device##hook, vendor, device, \ |
| 1474 | PCI_ANY_ID, 0, hook) | ||
| 1435 | #define DECLARE_PCI_FIXUP_SUSPEND(vendor, device, hook) \ | 1475 | #define DECLARE_PCI_FIXUP_SUSPEND(vendor, device, hook) \ |
| 1436 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend, \ | 1476 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend, \ |
| 1437 | suspend##vendor##device##hook, vendor, device, hook) | 1477 | suspend##vendor##device##hook, vendor, device, \ |
| 1478 | PCI_ANY_ID, 0, hook) | ||
| 1438 | 1479 | ||
| 1439 | #ifdef CONFIG_PCI_QUIRKS | 1480 | #ifdef CONFIG_PCI_QUIRKS |
| 1440 | void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); | 1481 | void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index e41a10f5ae83..4b608f543412 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
| @@ -391,6 +391,7 @@ | |||
| 391 | #define PCI_EXP_TYPE_UPSTREAM 0x5 /* Upstream Port */ | 391 | #define PCI_EXP_TYPE_UPSTREAM 0x5 /* Upstream Port */ |
| 392 | #define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */ | 392 | #define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */ |
| 393 | #define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCI/PCI-X Bridge */ | 393 | #define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCI/PCI-X Bridge */ |
| 394 | #define PCI_EXP_TYPE_PCIE_BRIDGE 0x8 /* PCI/PCI-X to PCIE Bridge */ | ||
| 394 | #define PCI_EXP_TYPE_RC_END 0x9 /* Root Complex Integrated Endpoint */ | 395 | #define PCI_EXP_TYPE_RC_END 0x9 /* Root Complex Integrated Endpoint */ |
| 395 | #define PCI_EXP_TYPE_RC_EC 0xa /* Root Complex Event Collector */ | 396 | #define PCI_EXP_TYPE_RC_EC 0xa /* Root Complex Event Collector */ |
| 396 | #define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ | 397 | #define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ |
diff --git a/include/linux/phy.h b/include/linux/phy.h index c599f7eca1e7..6fe0a37d4abf 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
| @@ -19,7 +19,6 @@ | |||
| 19 | #define __PHY_H | 19 | #define __PHY_H |
| 20 | 20 | ||
| 21 | #include <linux/spinlock.h> | 21 | #include <linux/spinlock.h> |
| 22 | #include <linux/device.h> | ||
| 23 | #include <linux/ethtool.h> | 22 | #include <linux/ethtool.h> |
| 24 | #include <linux/mii.h> | 23 | #include <linux/mii.h> |
| 25 | #include <linux/timer.h> | 24 | #include <linux/timer.h> |
| @@ -88,6 +87,9 @@ typedef enum { | |||
| 88 | IEEE 802.3ae clause 45 addressing mode used by 10GIGE phy chips. */ | 87 | IEEE 802.3ae clause 45 addressing mode used by 10GIGE phy chips. */ |
| 89 | #define MII_ADDR_C45 (1<<30) | 88 | #define MII_ADDR_C45 (1<<30) |
| 90 | 89 | ||
| 90 | struct device; | ||
| 91 | struct sk_buff; | ||
| 92 | |||
| 91 | /* | 93 | /* |
| 92 | * The Bus class for PHYs. Devices which provide access to | 94 | * The Bus class for PHYs. Devices which provide access to |
| 93 | * PHYs should register using this structure | 95 | * PHYs should register using this structure |
| @@ -241,7 +243,6 @@ enum phy_state { | |||
| 241 | PHY_RESUMING | 243 | PHY_RESUMING |
| 242 | }; | 244 | }; |
| 243 | 245 | ||
| 244 | struct sk_buff; | ||
| 245 | 246 | ||
| 246 | /* phy_device: An instance of a PHY | 247 | /* phy_device: An instance of a PHY |
| 247 | * | 248 | * |
diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h index e7cf6669ac34..f5bd679be46b 100644 --- a/include/linux/pid_namespace.h +++ b/include/linux/pid_namespace.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define _LINUX_PID_NS_H | 2 | #define _LINUX_PID_NS_H |
| 3 | 3 | ||
| 4 | #include <linux/sched.h> | 4 | #include <linux/sched.h> |
| 5 | #include <linux/bug.h> | ||
| 5 | #include <linux/mm.h> | 6 | #include <linux/mm.h> |
| 6 | #include <linux/threads.h> | 7 | #include <linux/threads.h> |
| 7 | #include <linux/nsproxy.h> | 8 | #include <linux/nsproxy.h> |
diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.h new file mode 100644 index 000000000000..191e72688481 --- /dev/null +++ b/include/linux/pinctrl/consumer.h | |||
| @@ -0,0 +1,159 @@ | |||
| 1 | /* | ||
| 2 | * Consumer interface the pin control subsystem | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 ST-Ericsson SA | ||
| 5 | * Written on behalf of Linaro for ST-Ericsson | ||
| 6 | * Based on bits of regulator core, gpio core and clk core | ||
| 7 | * | ||
| 8 | * Author: Linus Walleij <linus.walleij@linaro.org> | ||
| 9 | * | ||
| 10 | * License terms: GNU General Public License (GPL) version 2 | ||
| 11 | */ | ||
| 12 | #ifndef __LINUX_PINCTRL_CONSUMER_H | ||
| 13 | #define __LINUX_PINCTRL_CONSUMER_H | ||
| 14 | |||
| 15 | #include <linux/err.h> | ||
| 16 | #include <linux/list.h> | ||
| 17 | #include <linux/seq_file.h> | ||
| 18 | #include "pinctrl-state.h" | ||
| 19 | |||
| 20 | /* This struct is private to the core and should be regarded as a cookie */ | ||
| 21 | struct pinctrl; | ||
| 22 | struct pinctrl_state; | ||
| 23 | |||
| 24 | #ifdef CONFIG_PINCTRL | ||
| 25 | |||
| 26 | /* External interface to pin control */ | ||
| 27 | extern int pinctrl_request_gpio(unsigned gpio); | ||
| 28 | extern void pinctrl_free_gpio(unsigned gpio); | ||
| 29 | extern int pinctrl_gpio_direction_input(unsigned gpio); | ||
| 30 | extern int pinctrl_gpio_direction_output(unsigned gpio); | ||
| 31 | |||
| 32 | extern struct pinctrl * __must_check pinctrl_get(struct device *dev); | ||
| 33 | extern void pinctrl_put(struct pinctrl *p); | ||
| 34 | extern struct pinctrl_state * __must_check pinctrl_lookup_state( | ||
| 35 | struct pinctrl *p, | ||
| 36 | const char *name); | ||
| 37 | extern int pinctrl_select_state(struct pinctrl *p, struct pinctrl_state *s); | ||
| 38 | |||
| 39 | #else /* !CONFIG_PINCTRL */ | ||
| 40 | |||
| 41 | static inline int pinctrl_request_gpio(unsigned gpio) | ||
| 42 | { | ||
| 43 | return 0; | ||
| 44 | } | ||
| 45 | |||
| 46 | static inline void pinctrl_free_gpio(unsigned gpio) | ||
| 47 | { | ||
| 48 | } | ||
| 49 | |||
| 50 | static inline int pinctrl_gpio_direction_input(unsigned gpio) | ||
| 51 | { | ||
| 52 | return 0; | ||
| 53 | } | ||
| 54 | |||
| 55 | static inline int pinctrl_gpio_direction_output(unsigned gpio) | ||
| 56 | { | ||
| 57 | return 0; | ||
| 58 | } | ||
| 59 | |||
| 60 | static inline struct pinctrl * __must_check pinctrl_get(struct device *dev) | ||
| 61 | { | ||
| 62 | return NULL; | ||
| 63 | } | ||
| 64 | |||
| 65 | static inline void pinctrl_put(struct pinctrl *p) | ||
| 66 | { | ||
| 67 | } | ||
| 68 | |||
| 69 | static inline struct pinctrl_state * __must_check pinctrl_lookup_state( | ||
| 70 | struct pinctrl *p, | ||
| 71 | const char *name) | ||
| 72 | { | ||
| 73 | return NULL; | ||
| 74 | } | ||
| 75 | |||
| 76 | static inline int pinctrl_select_state(struct pinctrl *p, | ||
| 77 | struct pinctrl_state *s) | ||
| 78 | { | ||
| 79 | return 0; | ||
| 80 | } | ||
| 81 | |||
| 82 | #endif /* CONFIG_PINCTRL */ | ||
| 83 | |||
| 84 | static inline struct pinctrl * __must_check pinctrl_get_select( | ||
| 85 | struct device *dev, const char *name) | ||
| 86 | { | ||
| 87 | struct pinctrl *p; | ||
| 88 | struct pinctrl_state *s; | ||
| 89 | int ret; | ||
| 90 | |||
| 91 | p = pinctrl_get(dev); | ||
| 92 | if (IS_ERR(p)) | ||
| 93 | return p; | ||
| 94 | |||
| 95 | s = pinctrl_lookup_state(p, name); | ||
| 96 | if (IS_ERR(s)) { | ||
| 97 | pinctrl_put(p); | ||
| 98 | return ERR_PTR(PTR_ERR(s)); | ||
| 99 | } | ||
| 100 | |||
| 101 | ret = pinctrl_select_state(p, s); | ||
| 102 | if (ret < 0) { | ||
| 103 | pinctrl_put(p); | ||
| 104 | return ERR_PTR(ret); | ||
| 105 | } | ||
| 106 | |||
| 107 | return p; | ||
| 108 | } | ||
| 109 | |||
| 110 | static inline struct pinctrl * __must_check pinctrl_get_select_default( | ||
| 111 | struct device *dev) | ||
| 112 | { | ||
| 113 | return pinctrl_get_select(dev, PINCTRL_STATE_DEFAULT); | ||
| 114 | } | ||
| 115 | |||
| 116 | #ifdef CONFIG_PINCONF | ||
| 117 | |||
| 118 | extern int pin_config_get(const char *dev_name, const char *name, | ||
| 119 | unsigned long *config); | ||
| 120 | extern int pin_config_set(const char *dev_name, const char *name, | ||
| 121 | unsigned long config); | ||
| 122 | extern int pin_config_group_get(const char *dev_name, | ||
| 123 | const char *pin_group, | ||
| 124 | unsigned long *config); | ||
| 125 | extern int pin_config_group_set(const char *dev_name, | ||
| 126 | const char *pin_group, | ||
| 127 | unsigned long config); | ||
| 128 | |||
| 129 | #else | ||
| 130 | |||
| 131 | static inline int pin_config_get(const char *dev_name, const char *name, | ||
| 132 | unsigned long *config) | ||
| 133 | { | ||
| 134 | return 0; | ||
| 135 | } | ||
| 136 | |||
| 137 | static inline int pin_config_set(const char *dev_name, const char *name, | ||
| 138 | unsigned long config) | ||
| 139 | { | ||
| 140 | return 0; | ||
| 141 | } | ||
| 142 | |||
| 143 | static inline int pin_config_group_get(const char *dev_name, | ||
| 144 | const char *pin_group, | ||
| 145 | unsigned long *config) | ||
| 146 | { | ||
| 147 | return 0; | ||
| 148 | } | ||
| 149 | |||
| 150 | static inline int pin_config_group_set(const char *dev_name, | ||
| 151 | const char *pin_group, | ||
| 152 | unsigned long config) | ||
| 153 | { | ||
| 154 | return 0; | ||
| 155 | } | ||
| 156 | |||
| 157 | #endif | ||
| 158 | |||
| 159 | #endif /* __LINUX_PINCTRL_CONSUMER_H */ | ||
diff --git a/include/linux/pinctrl/machine.h b/include/linux/pinctrl/machine.h index d0aecb7f6fb9..fee4349364f7 100644 --- a/include/linux/pinctrl/machine.h +++ b/include/linux/pinctrl/machine.h | |||
| @@ -9,87 +9,153 @@ | |||
| 9 | * | 9 | * |
| 10 | * License terms: GNU General Public License (GPL) version 2 | 10 | * License terms: GNU General Public License (GPL) version 2 |
| 11 | */ | 11 | */ |
| 12 | #ifndef __LINUX_PINMUX_MACHINE_H | 12 | #ifndef __LINUX_PINCTRL_MACHINE_H |
| 13 | #define __LINUX_PINMUX_MACHINE_H | 13 | #define __LINUX_PINCTRL_MACHINE_H |
| 14 | |||
| 15 | #include "pinctrl-state.h" | ||
| 16 | |||
| 17 | enum pinctrl_map_type { | ||
| 18 | PIN_MAP_TYPE_INVALID, | ||
| 19 | PIN_MAP_TYPE_DUMMY_STATE, | ||
| 20 | PIN_MAP_TYPE_MUX_GROUP, | ||
| 21 | PIN_MAP_TYPE_CONFIGS_PIN, | ||
| 22 | PIN_MAP_TYPE_CONFIGS_GROUP, | ||
| 23 | }; | ||
| 24 | |||
| 25 | /** | ||
| 26 | * struct pinctrl_map_mux - mapping table content for MAP_TYPE_MUX_GROUP | ||
| 27 | * @group: the name of the group whose mux function is to be configured. This | ||
| 28 | * field may be left NULL, and the first applicable group for the function | ||
| 29 | * will be used. | ||
| 30 | * @function: the mux function to select for the group | ||
| 31 | */ | ||
| 32 | struct pinctrl_map_mux { | ||
| 33 | const char *group; | ||
| 34 | const char *function; | ||
| 35 | }; | ||
| 14 | 36 | ||
| 15 | /** | 37 | /** |
| 16 | * struct pinmux_map - boards/machines shall provide this map for devices | 38 | * struct pinctrl_map_configs - mapping table content for MAP_TYPE_CONFIGS_* |
| 39 | * @group_or_pin: the name of the pin or group whose configuration parameters | ||
| 40 | * are to be configured. | ||
| 41 | * @configs: a pointer to an array of config parameters/values to program into | ||
| 42 | * hardware. Each individual pin controller defines the format and meaning | ||
| 43 | * of config parameters. | ||
| 44 | * @num_configs: the number of entries in array @configs | ||
| 45 | */ | ||
| 46 | struct pinctrl_map_configs { | ||
| 47 | const char *group_or_pin; | ||
| 48 | unsigned long *configs; | ||
| 49 | unsigned num_configs; | ||
| 50 | }; | ||
| 51 | |||
| 52 | /** | ||
| 53 | * struct pinctrl_map - boards/machines shall provide this map for devices | ||
| 54 | * @dev_name: the name of the device using this specific mapping, the name | ||
| 55 | * must be the same as in your struct device*. If this name is set to the | ||
| 56 | * same name as the pin controllers own dev_name(), the map entry will be | ||
| 57 | * hogged by the driver itself upon registration | ||
| 17 | * @name: the name of this specific map entry for the particular machine. | 58 | * @name: the name of this specific map entry for the particular machine. |
| 18 | * This is the second parameter passed to pinmux_get() when you want | 59 | * This is the parameter passed to pinmux_lookup_state() |
| 19 | * to have several mappings to the same device | 60 | * @type: the type of mapping table entry |
| 20 | * @ctrl_dev: the pin control device to be used by this mapping, may be NULL | ||
| 21 | * if you provide .ctrl_dev_name instead (this is more common) | ||
| 22 | * @ctrl_dev_name: the name of the device controlling this specific mapping, | 61 | * @ctrl_dev_name: the name of the device controlling this specific mapping, |
| 23 | * the name must be the same as in your struct device*, may be NULL if | 62 | * the name must be the same as in your struct device*. This field is not |
| 24 | * you provide .ctrl_dev instead | 63 | * used for PIN_MAP_TYPE_DUMMY_STATE |
| 25 | * @function: a function in the driver to use for this mapping, the driver | 64 | * @data: Data specific to the mapping type |
| 26 | * will lookup the function referenced by this ID on the specified | ||
| 27 | * pin control device | ||
| 28 | * @group: sometimes a function can map to different pin groups, so this | ||
| 29 | * selects a certain specific pin group to activate for the function, if | ||
| 30 | * left as NULL, the first applicable group will be used | ||
| 31 | * @dev: the device using this specific mapping, may be NULL if you provide | ||
| 32 | * .dev_name instead (this is more common) | ||
| 33 | * @dev_name: the name of the device using this specific mapping, the name | ||
| 34 | * must be the same as in your struct device*, may be NULL if you | ||
| 35 | * provide .dev instead | ||
| 36 | * @hog_on_boot: if this is set to true, the pin control subsystem will itself | ||
| 37 | * hog the mappings as the pinmux device drivers are attached, so this is | ||
| 38 | * typically used with system maps (mux mappings without an assigned | ||
| 39 | * device) that you want to get hogged and enabled by default as soon as | ||
| 40 | * a pinmux device supporting it is registered. These maps will not be | ||
| 41 | * disabled and put until the system shuts down. | ||
| 42 | */ | 65 | */ |
| 43 | struct pinmux_map { | 66 | struct pinctrl_map { |
| 67 | const char *dev_name; | ||
| 44 | const char *name; | 68 | const char *name; |
| 45 | struct device *ctrl_dev; | 69 | enum pinctrl_map_type type; |
| 46 | const char *ctrl_dev_name; | 70 | const char *ctrl_dev_name; |
| 47 | const char *function; | 71 | union { |
| 48 | const char *group; | 72 | struct pinctrl_map_mux mux; |
| 49 | struct device *dev; | 73 | struct pinctrl_map_configs configs; |
| 50 | const char *dev_name; | 74 | } data; |
| 51 | bool hog_on_boot; | ||
| 52 | }; | 75 | }; |
| 53 | 76 | ||
| 54 | /* | 77 | /* Convenience macros to create mapping table entries */ |
| 55 | * Convenience macro to set a simple map from a certain pin controller and a | ||
| 56 | * certain function to a named device | ||
| 57 | */ | ||
| 58 | #define PINMUX_MAP(a, b, c, d) \ | ||
| 59 | { .name = a, .ctrl_dev_name = b, .function = c, .dev_name = d } | ||
| 60 | 78 | ||
| 61 | /* | 79 | #define PIN_MAP_DUMMY_STATE(dev, state) \ |
| 62 | * Convenience macro to map a system function onto a certain pinctrl device. | 80 | { \ |
| 63 | * System functions are not assigned to a particular device. | 81 | .dev_name = dev, \ |
| 64 | */ | 82 | .name = state, \ |
| 65 | #define PINMUX_MAP_SYS(a, b, c) \ | 83 | .type = PIN_MAP_TYPE_DUMMY_STATE, \ |
| 66 | { .name = a, .ctrl_dev_name = b, .function = c } | 84 | } |
| 67 | 85 | ||
| 68 | /* | 86 | #define PIN_MAP_MUX_GROUP(dev, state, pinctrl, grp, func) \ |
| 69 | * Convenience macro to map a system function onto a certain pinctrl device, | 87 | { \ |
| 70 | * to be hogged by the pinmux core until the system shuts down. | 88 | .dev_name = dev, \ |
| 71 | */ | 89 | .name = state, \ |
| 72 | #define PINMUX_MAP_SYS_HOG(a, b, c) \ | 90 | .type = PIN_MAP_TYPE_MUX_GROUP, \ |
| 73 | { .name = a, .ctrl_dev_name = b, .function = c, \ | 91 | .ctrl_dev_name = pinctrl, \ |
| 74 | .hog_on_boot = true } | 92 | .data.mux = { \ |
| 93 | .group = grp, \ | ||
| 94 | .function = func, \ | ||
| 95 | }, \ | ||
| 96 | } | ||
| 75 | 97 | ||
| 76 | /* | 98 | #define PIN_MAP_MUX_GROUP_DEFAULT(dev, pinctrl, grp, func) \ |
| 77 | * Convenience macro to map a system function onto a certain pinctrl device | 99 | PIN_MAP_MUX_GROUP(dev, PINCTRL_STATE_DEFAULT, pinctrl, grp, func) |
| 78 | * using a specified group, to be hogged by the pinmux core until the system | 100 | |
| 79 | * shuts down. | 101 | #define PIN_MAP_MUX_GROUP_HOG(dev, state, grp, func) \ |
| 80 | */ | 102 | PIN_MAP_MUX_GROUP(dev, state, dev, grp, func) |
| 81 | #define PINMUX_MAP_SYS_HOG_GROUP(a, b, c, d) \ | 103 | |
| 82 | { .name = a, .ctrl_dev_name = b, .function = c, .group = d, \ | 104 | #define PIN_MAP_MUX_GROUP_HOG_DEFAULT(dev, grp, func) \ |
| 83 | .hog_on_boot = true } | 105 | PIN_MAP_MUX_GROUP(dev, PINCTRL_STATE_DEFAULT, dev, grp, func) |
| 106 | |||
| 107 | #define PIN_MAP_CONFIGS_PIN(dev, state, pinctrl, pin, cfgs) \ | ||
| 108 | { \ | ||
| 109 | .dev_name = dev, \ | ||
| 110 | .name = state, \ | ||
| 111 | .type = PIN_MAP_TYPE_CONFIGS_PIN, \ | ||
| 112 | .ctrl_dev_name = pinctrl, \ | ||
| 113 | .data.configs = { \ | ||
| 114 | .group_or_pin = pin, \ | ||
| 115 | .configs = cfgs, \ | ||
| 116 | .num_configs = ARRAY_SIZE(cfgs), \ | ||
| 117 | }, \ | ||
| 118 | } | ||
| 119 | |||
| 120 | #define PIN_MAP_CONFIGS_PIN_DEFAULT(dev, pinctrl, pin, cfgs) \ | ||
| 121 | PIN_MAP_CONFIGS_PIN(dev, PINCTRL_STATE_DEFAULT, pinctrl, pin, cfgs) | ||
| 122 | |||
| 123 | #define PIN_MAP_CONFIGS_PIN_HOG(dev, state, pin, cfgs) \ | ||
| 124 | PIN_MAP_CONFIGS_PIN(dev, state, dev, pin, cfgs) | ||
| 125 | |||
| 126 | #define PIN_MAP_CONFIGS_PIN_HOG_DEFAULT(dev, pin, cfgs) \ | ||
| 127 | PIN_MAP_CONFIGS_PIN(dev, PINCTRL_STATE_DEFAULT, dev, pin, cfgs) | ||
| 128 | |||
| 129 | #define PIN_MAP_CONFIGS_GROUP(dev, state, pinctrl, grp, cfgs) \ | ||
| 130 | { \ | ||
| 131 | .dev_name = dev, \ | ||
| 132 | .name = state, \ | ||
| 133 | .type = PIN_MAP_TYPE_CONFIGS_GROUP, \ | ||
| 134 | .ctrl_dev_name = pinctrl, \ | ||
| 135 | .data.configs = { \ | ||
| 136 | .group_or_pin = grp, \ | ||
| 137 | .configs = cfgs, \ | ||
| 138 | .num_configs = ARRAY_SIZE(cfgs), \ | ||
| 139 | }, \ | ||
| 140 | } | ||
| 141 | |||
| 142 | #define PIN_MAP_CONFIGS_GROUP_DEFAULT(dev, pinctrl, grp, cfgs) \ | ||
| 143 | PIN_MAP_CONFIGS_GROUP(dev, PINCTRL_STATE_DEFAULT, pinctrl, grp, cfgs) | ||
| 144 | |||
| 145 | #define PIN_MAP_CONFIGS_GROUP_HOG(dev, state, grp, cfgs) \ | ||
| 146 | PIN_MAP_CONFIGS_GROUP(dev, state, dev, grp, cfgs) | ||
| 147 | |||
| 148 | #define PIN_MAP_CONFIGS_GROUP_HOG_DEFAULT(dev, grp, cfgs) \ | ||
| 149 | PIN_MAP_CONFIGS_GROUP(dev, PINCTRL_STATE_DEFAULT, dev, grp, cfgs) | ||
| 84 | 150 | ||
| 85 | #ifdef CONFIG_PINMUX | 151 | #ifdef CONFIG_PINMUX |
| 86 | 152 | ||
| 87 | extern int pinmux_register_mappings(struct pinmux_map const *map, | 153 | extern int pinctrl_register_mappings(struct pinctrl_map const *map, |
| 88 | unsigned num_maps); | 154 | unsigned num_maps); |
| 89 | 155 | ||
| 90 | #else | 156 | #else |
| 91 | 157 | ||
| 92 | static inline int pinmux_register_mappings(struct pinmux_map const *map, | 158 | static inline int pinctrl_register_mappings(struct pinctrl_map const *map, |
| 93 | unsigned num_maps) | 159 | unsigned num_maps) |
| 94 | { | 160 | { |
| 95 | return 0; | 161 | return 0; |
diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h new file mode 100644 index 000000000000..4f0abb9f1c09 --- /dev/null +++ b/include/linux/pinctrl/pinconf-generic.h | |||
| @@ -0,0 +1,114 @@ | |||
| 1 | /* | ||
| 2 | * Interface the generic pinconfig portions of the pinctrl subsystem | ||
| 3 | * | ||
| 4 | * Copyright (C) 2011 ST-Ericsson SA | ||
| 5 | * Written on behalf of Linaro for ST-Ericsson | ||
| 6 | * This interface is used in the core to keep track of pins. | ||
| 7 | * | ||
| 8 | * Author: Linus Walleij <linus.walleij@linaro.org> | ||
| 9 | * | ||
| 10 | * License terms: GNU General Public License (GPL) version 2 | ||
| 11 | */ | ||
| 12 | #ifndef __LINUX_PINCTRL_PINCONF_GENERIC_H | ||
| 13 | #define __LINUX_PINCTRL_PINCONF_GENERIC_H | ||
| 14 | |||
| 15 | /* | ||
| 16 | * You shouldn't even be able to compile with these enums etc unless you're | ||
| 17 | * using generic pin config. That is why this is defined out. | ||
| 18 | */ | ||
| 19 | #ifdef CONFIG_GENERIC_PINCONF | ||
| 20 | |||
| 21 | /** | ||
| 22 | * enum pin_config_param - possible pin configuration parameters | ||
| 23 | * @PIN_CONFIG_BIAS_DISABLE: disable any pin bias on the pin, a | ||
| 24 | * transition from say pull-up to pull-down implies that you disable | ||
| 25 | * pull-up in the process, this setting disables all biasing. | ||
| 26 | * @PIN_CONFIG_BIAS_HIGH_IMPEDANCE: the pin will be set to a high impedance | ||
| 27 | * mode, also know as "third-state" (tristate) or "high-Z" or "floating". | ||
| 28 | * On output pins this effectively disconnects the pin, which is useful | ||
| 29 | * if for example some other pin is going to drive the signal connected | ||
| 30 | * to it for a while. Pins used for input are usually always high | ||
| 31 | * impedance. | ||
| 32 | * @PIN_CONFIG_BIAS_PULL_UP: the pin will be pulled up (usually with high | ||
| 33 | * impedance to VDD). If the argument is != 0 pull-up is enabled, | ||
| 34 | * if it is 0, pull-up is disabled. | ||
| 35 | * @PIN_CONFIG_BIAS_PULL_DOWN: the pin will be pulled down (usually with high | ||
| 36 | * impedance to GROUND). If the argument is != 0 pull-down is enabled, | ||
| 37 | * if it is 0, pull-down is disabled. | ||
| 38 | * @PIN_CONFIG_DRIVE_PUSH_PULL: the pin will be driven actively high and | ||
| 39 | * low, this is the most typical case and is typically achieved with two | ||
| 40 | * active transistors on the output. Sending this config will enabale | ||
| 41 | * push-pull mode, the argument is ignored. | ||
| 42 | * @PIN_CONFIG_DRIVE_OPEN_DRAIN: the pin will be driven with open drain (open | ||
| 43 | * collector) which means it is usually wired with other output ports | ||
| 44 | * which are then pulled up with an external resistor. Sending this | ||
| 45 | * config will enabale open drain mode, the argument is ignored. | ||
| 46 | * @PIN_CONFIG_DRIVE_OPEN_SOURCE: the pin will be driven with open source | ||
| 47 | * (open emitter). Sending this config will enabale open drain mode, the | ||
| 48 | * argument is ignored. | ||
| 49 | * @PIN_CONFIG_INPUT_SCHMITT: this will configure an input pin to run in | ||
| 50 | * schmitt-trigger mode. If the schmitt-trigger has adjustable hysteresis, | ||
| 51 | * the threshold value is given on a custom format as argument when | ||
| 52 | * setting pins to this mode. The argument zero turns the schmitt trigger | ||
| 53 | * off. | ||
| 54 | * @PIN_CONFIG_INPUT_DEBOUNCE: this will configure the pin to debounce mode, | ||
| 55 | * which means it will wait for signals to settle when reading inputs. The | ||
| 56 | * argument gives the debounce time on a custom format. Setting the | ||
| 57 | * argument to zero turns debouncing off. | ||
| 58 | * @PIN_CONFIG_POWER_SOURCE: if the pin can select between different power | ||
| 59 | * supplies, the argument to this parameter (on a custom format) tells | ||
| 60 | * the driver which alternative power source to use. | ||
| 61 | * @PIN_CONFIG_LOW_POWER_MODE: this will configure the pin for low power | ||
| 62 | * operation, if several modes of operation are supported these can be | ||
| 63 | * passed in the argument on a custom form, else just use argument 1 | ||
| 64 | * to indicate low power mode, argument 0 turns low power mode off. | ||
| 65 | * @PIN_CONFIG_END: this is the last enumerator for pin configurations, if | ||
| 66 | * you need to pass in custom configurations to the pin controller, use | ||
| 67 | * PIN_CONFIG_END+1 as the base offset. | ||
| 68 | */ | ||
| 69 | enum pin_config_param { | ||
| 70 | PIN_CONFIG_BIAS_DISABLE, | ||
| 71 | PIN_CONFIG_BIAS_HIGH_IMPEDANCE, | ||
| 72 | PIN_CONFIG_BIAS_PULL_UP, | ||
| 73 | PIN_CONFIG_BIAS_PULL_DOWN, | ||
| 74 | PIN_CONFIG_DRIVE_PUSH_PULL, | ||
| 75 | PIN_CONFIG_DRIVE_OPEN_DRAIN, | ||
| 76 | PIN_CONFIG_DRIVE_OPEN_SOURCE, | ||
| 77 | PIN_CONFIG_INPUT_SCHMITT, | ||
| 78 | PIN_CONFIG_INPUT_DEBOUNCE, | ||
| 79 | PIN_CONFIG_POWER_SOURCE, | ||
| 80 | PIN_CONFIG_LOW_POWER_MODE, | ||
| 81 | PIN_CONFIG_END = 0x7FFF, | ||
| 82 | }; | ||
| 83 | |||
| 84 | /* | ||
| 85 | * Helpful configuration macro to be used in tables etc. | ||
| 86 | */ | ||
| 87 | #define PIN_CONF_PACKED(p, a) ((a << 16) | ((unsigned long) p & 0xffffUL)) | ||
| 88 | |||
| 89 | /* | ||
| 90 | * The following inlines stuffs a configuration parameter and data value | ||
| 91 | * into and out of an unsigned long argument, as used by the generic pin config | ||
| 92 | * system. We put the parameter in the lower 16 bits and the argument in the | ||
| 93 | * upper 16 bits. | ||
| 94 | */ | ||
| 95 | |||
| 96 | static inline enum pin_config_param pinconf_to_config_param(unsigned long config) | ||
| 97 | { | ||
| 98 | return (enum pin_config_param) (config & 0xffffUL); | ||
| 99 | } | ||
| 100 | |||
| 101 | static inline u16 pinconf_to_config_argument(unsigned long config) | ||
| 102 | { | ||
| 103 | return (enum pin_config_param) ((config >> 16) & 0xffffUL); | ||
| 104 | } | ||
| 105 | |||
| 106 | static inline unsigned long pinconf_to_config_packed(enum pin_config_param param, | ||
| 107 | u16 argument) | ||
| 108 | { | ||
| 109 | return PIN_CONF_PACKED(param, argument); | ||
| 110 | } | ||
| 111 | |||
| 112 | #endif /* CONFIG_GENERIC_PINCONF */ | ||
| 113 | |||
| 114 | #endif /* __LINUX_PINCTRL_PINCONF_GENERIC_H */ | ||
diff --git a/include/linux/pinctrl/pinconf.h b/include/linux/pinctrl/pinconf.h index 477922cf043a..ec431f03362d 100644 --- a/include/linux/pinctrl/pinconf.h +++ b/include/linux/pinctrl/pinconf.h | |||
| @@ -20,6 +20,8 @@ struct seq_file; | |||
| 20 | /** | 20 | /** |
| 21 | * struct pinconf_ops - pin config operations, to be implemented by | 21 | * struct pinconf_ops - pin config operations, to be implemented by |
| 22 | * pin configuration capable drivers. | 22 | * pin configuration capable drivers. |
| 23 | * @is_generic: for pin controllers that want to use the generic interface, | ||
| 24 | * this flag tells the framework that it's generic. | ||
| 23 | * @pin_config_get: get the config of a certain pin, if the requested config | 25 | * @pin_config_get: get the config of a certain pin, if the requested config |
| 24 | * is not available on this controller this should return -ENOTSUPP | 26 | * is not available on this controller this should return -ENOTSUPP |
| 25 | * and if it is available but disabled it should return -EINVAL | 27 | * and if it is available but disabled it should return -EINVAL |
| @@ -33,6 +35,9 @@ struct seq_file; | |||
| 33 | * per-device info for a certain group in debugfs | 35 | * per-device info for a certain group in debugfs |
| 34 | */ | 36 | */ |
| 35 | struct pinconf_ops { | 37 | struct pinconf_ops { |
| 38 | #ifdef CONFIG_GENERIC_PINCONF | ||
| 39 | bool is_generic; | ||
| 40 | #endif | ||
| 36 | int (*pin_config_get) (struct pinctrl_dev *pctldev, | 41 | int (*pin_config_get) (struct pinctrl_dev *pctldev, |
| 37 | unsigned pin, | 42 | unsigned pin, |
| 38 | unsigned long *config); | 43 | unsigned long *config); |
| @@ -53,45 +58,6 @@ struct pinconf_ops { | |||
| 53 | unsigned selector); | 58 | unsigned selector); |
| 54 | }; | 59 | }; |
| 55 | 60 | ||
| 56 | extern int pin_config_get(const char *dev_name, const char *name, | ||
| 57 | unsigned long *config); | ||
| 58 | extern int pin_config_set(const char *dev_name, const char *name, | ||
| 59 | unsigned long config); | ||
| 60 | extern int pin_config_group_get(const char *dev_name, | ||
| 61 | const char *pin_group, | ||
| 62 | unsigned long *config); | ||
| 63 | extern int pin_config_group_set(const char *dev_name, | ||
| 64 | const char *pin_group, | ||
| 65 | unsigned long config); | ||
| 66 | |||
| 67 | #else | ||
| 68 | |||
| 69 | static inline int pin_config_get(const char *dev_name, const char *name, | ||
| 70 | unsigned long *config) | ||
| 71 | { | ||
| 72 | return 0; | ||
| 73 | } | ||
| 74 | |||
| 75 | static inline int pin_config_set(const char *dev_name, const char *name, | ||
| 76 | unsigned long config) | ||
| 77 | { | ||
| 78 | return 0; | ||
| 79 | } | ||
| 80 | |||
| 81 | static inline int pin_config_group_get(const char *dev_name, | ||
| 82 | const char *pin_group, | ||
| 83 | unsigned long *config) | ||
| 84 | { | ||
| 85 | return 0; | ||
| 86 | } | ||
| 87 | |||
| 88 | static inline int pin_config_group_set(const char *dev_name, | ||
| 89 | const char *pin_group, | ||
| 90 | unsigned long config) | ||
| 91 | { | ||
| 92 | return 0; | ||
| 93 | } | ||
| 94 | |||
| 95 | #endif | 61 | #endif |
| 96 | 62 | ||
| 97 | #endif /* __LINUX_PINCTRL_PINCONF_H */ | 63 | #endif /* __LINUX_PINCTRL_PINCONF_H */ |
diff --git a/include/linux/pinctrl/pinctrl-state.h b/include/linux/pinctrl/pinctrl-state.h new file mode 100644 index 000000000000..3920e28b4da7 --- /dev/null +++ b/include/linux/pinctrl/pinctrl-state.h | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | /* | ||
| 2 | * Standard pin control state definitions | ||
| 3 | */ | ||
| 4 | |||
| 5 | #define PINCTRL_STATE_DEFAULT "default" | ||
| 6 | #define PINCTRL_STATE_IDLE "idle" | ||
diff --git a/include/linux/pinctrl/pinctrl.h b/include/linux/pinctrl/pinctrl.h index 8bd22ee7aa09..4e9f0788c221 100644 --- a/include/linux/pinctrl/pinctrl.h +++ b/include/linux/pinctrl/pinctrl.h | |||
| @@ -15,10 +15,11 @@ | |||
| 15 | #ifdef CONFIG_PINCTRL | 15 | #ifdef CONFIG_PINCTRL |
| 16 | 16 | ||
| 17 | #include <linux/radix-tree.h> | 17 | #include <linux/radix-tree.h> |
| 18 | #include <linux/spinlock.h> | ||
| 19 | #include <linux/list.h> | 18 | #include <linux/list.h> |
| 20 | #include <linux/seq_file.h> | 19 | #include <linux/seq_file.h> |
| 20 | #include "pinctrl-state.h" | ||
| 21 | 21 | ||
| 22 | struct device; | ||
| 22 | struct pinctrl_dev; | 23 | struct pinctrl_dev; |
| 23 | struct pinmux_ops; | 24 | struct pinmux_ops; |
| 24 | struct pinconf_ops; | 25 | struct pinconf_ops; |
diff --git a/include/linux/pinctrl/pinmux.h b/include/linux/pinctrl/pinmux.h index 937b3e2fa36f..47e9237edd47 100644 --- a/include/linux/pinctrl/pinmux.h +++ b/include/linux/pinctrl/pinmux.h | |||
| @@ -16,9 +16,6 @@ | |||
| 16 | #include <linux/seq_file.h> | 16 | #include <linux/seq_file.h> |
| 17 | #include "pinctrl.h" | 17 | #include "pinctrl.h" |
| 18 | 18 | ||
| 19 | /* This struct is private to the core and should be regarded as a cookie */ | ||
| 20 | struct pinmux; | ||
| 21 | |||
| 22 | #ifdef CONFIG_PINMUX | 19 | #ifdef CONFIG_PINMUX |
| 23 | 20 | ||
| 24 | struct pinctrl_dev; | 21 | struct pinctrl_dev; |
| @@ -88,55 +85,6 @@ struct pinmux_ops { | |||
| 88 | bool input); | 85 | bool input); |
| 89 | }; | 86 | }; |
| 90 | 87 | ||
| 91 | /* External interface to pinmux */ | ||
| 92 | extern int pinmux_request_gpio(unsigned gpio); | ||
| 93 | extern void pinmux_free_gpio(unsigned gpio); | ||
| 94 | extern int pinmux_gpio_direction_input(unsigned gpio); | ||
| 95 | extern int pinmux_gpio_direction_output(unsigned gpio); | ||
| 96 | extern struct pinmux * __must_check pinmux_get(struct device *dev, const char *name); | ||
| 97 | extern void pinmux_put(struct pinmux *pmx); | ||
| 98 | extern int pinmux_enable(struct pinmux *pmx); | ||
| 99 | extern void pinmux_disable(struct pinmux *pmx); | ||
| 100 | |||
| 101 | #else /* !CONFIG_PINMUX */ | ||
| 102 | |||
| 103 | static inline int pinmux_request_gpio(unsigned gpio) | ||
| 104 | { | ||
| 105 | return 0; | ||
| 106 | } | ||
| 107 | |||
| 108 | static inline void pinmux_free_gpio(unsigned gpio) | ||
| 109 | { | ||
| 110 | } | ||
| 111 | |||
| 112 | static inline int pinmux_gpio_direction_input(unsigned gpio) | ||
| 113 | { | ||
| 114 | return 0; | ||
| 115 | } | ||
| 116 | |||
| 117 | static inline int pinmux_gpio_direction_output(unsigned gpio) | ||
| 118 | { | ||
| 119 | return 0; | ||
| 120 | } | ||
| 121 | |||
| 122 | static inline struct pinmux * __must_check pinmux_get(struct device *dev, const char *name) | ||
| 123 | { | ||
| 124 | return NULL; | ||
| 125 | } | ||
| 126 | |||
| 127 | static inline void pinmux_put(struct pinmux *pmx) | ||
| 128 | { | ||
| 129 | } | ||
| 130 | |||
| 131 | static inline int pinmux_enable(struct pinmux *pmx) | ||
| 132 | { | ||
| 133 | return 0; | ||
| 134 | } | ||
| 135 | |||
| 136 | static inline void pinmux_disable(struct pinmux *pmx) | ||
| 137 | { | ||
| 138 | } | ||
| 139 | |||
| 140 | #endif /* CONFIG_PINMUX */ | 88 | #endif /* CONFIG_PINMUX */ |
| 141 | 89 | ||
| 142 | #endif /* __LINUX_PINCTRL_PINMUX_H */ | 90 | #endif /* __LINUX_PINCTRL_PINMUX_H */ |
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index 77257c92155a..6d626ff0cfd0 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
| @@ -1,8 +1,6 @@ | |||
| 1 | #ifndef _LINUX_PIPE_FS_I_H | 1 | #ifndef _LINUX_PIPE_FS_I_H |
| 2 | #define _LINUX_PIPE_FS_I_H | 2 | #define _LINUX_PIPE_FS_I_H |
| 3 | 3 | ||
| 4 | #define PIPEFS_MAGIC 0x50495045 | ||
| 5 | |||
| 6 | #define PIPE_DEF_BUFFERS 16 | 4 | #define PIPE_DEF_BUFFERS 16 |
| 7 | 5 | ||
| 8 | #define PIPE_BUF_FLAG_LRU 0x01 /* page is on the LRU */ | 6 | #define PIPE_BUF_FLAG_LRU 0x01 /* page is on the LRU */ |
diff --git a/include/linux/platform_data/omap4-keypad.h b/include/linux/platform_data/omap4-keypad.h new file mode 100644 index 000000000000..4eef5fb05a17 --- /dev/null +++ b/include/linux/platform_data/omap4-keypad.h | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | #ifndef __LINUX_INPUT_OMAP4_KEYPAD_H | ||
| 2 | #define __LINUX_INPUT_OMAP4_KEYPAD_H | ||
| 3 | |||
| 4 | #include <linux/input/matrix_keypad.h> | ||
| 5 | |||
| 6 | struct omap4_keypad_platform_data { | ||
| 7 | const struct matrix_keymap_data *keymap_data; | ||
| 8 | |||
| 9 | u8 rows; | ||
| 10 | u8 cols; | ||
| 11 | }; | ||
| 12 | |||
| 13 | #endif /* __LINUX_INPUT_OMAP4_KEYPAD_H */ | ||
diff --git a/include/linux/platform_data/tegra_emc.h b/include/linux/platform_data/tegra_emc.h new file mode 100644 index 000000000000..df67505e98f8 --- /dev/null +++ b/include/linux/platform_data/tegra_emc.h | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2011 Google, Inc. | ||
| 3 | * | ||
| 4 | * Author: | ||
| 5 | * Colin Cross <ccross@android.com> | ||
| 6 | * Olof Johansson <olof@lixom.net> | ||
| 7 | * | ||
| 8 | * This software is licensed under the terms of the GNU General Public | ||
| 9 | * License version 2, as published by the Free Software Foundation, and | ||
| 10 | * may be copied, distributed, and modified under those terms. | ||
| 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 | */ | ||
| 18 | |||
| 19 | #ifndef __TEGRA_EMC_H_ | ||
| 20 | #define __TEGRA_EMC_H_ | ||
| 21 | |||
| 22 | #define TEGRA_EMC_NUM_REGS 46 | ||
| 23 | |||
| 24 | struct tegra_emc_table { | ||
| 25 | unsigned long rate; | ||
| 26 | u32 regs[TEGRA_EMC_NUM_REGS]; | ||
| 27 | }; | ||
| 28 | |||
| 29 | struct tegra_emc_pdata { | ||
| 30 | int num_tables; | ||
| 31 | struct tegra_emc_table *tables; | ||
| 32 | }; | ||
| 33 | |||
| 34 | #endif | ||
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index 1236d262b3e8..91f8286106ea 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h | |||
| @@ -10,6 +10,8 @@ | |||
| 10 | #define _LINUX_PM_DOMAIN_H | 10 | #define _LINUX_PM_DOMAIN_H |
| 11 | 11 | ||
| 12 | #include <linux/device.h> | 12 | #include <linux/device.h> |
| 13 | #include <linux/mutex.h> | ||
| 14 | #include <linux/pm.h> | ||
| 13 | #include <linux/err.h> | 15 | #include <linux/err.h> |
| 14 | #include <linux/of.h> | 16 | #include <linux/of.h> |
| 15 | 17 | ||
diff --git a/include/linux/poll.h b/include/linux/poll.h index cf40010ce0cd..48fe8bc398d1 100644 --- a/include/linux/poll.h +++ b/include/linux/poll.h | |||
| @@ -32,21 +32,46 @@ struct poll_table_struct; | |||
| 32 | */ | 32 | */ |
| 33 | typedef void (*poll_queue_proc)(struct file *, wait_queue_head_t *, struct poll_table_struct *); | 33 | typedef void (*poll_queue_proc)(struct file *, wait_queue_head_t *, struct poll_table_struct *); |
| 34 | 34 | ||
| 35 | /* | ||
| 36 | * Do not touch the structure directly, use the access functions | ||
| 37 | * poll_does_not_wait() and poll_requested_events() instead. | ||
| 38 | */ | ||
| 35 | typedef struct poll_table_struct { | 39 | typedef struct poll_table_struct { |
| 36 | poll_queue_proc qproc; | 40 | poll_queue_proc _qproc; |
| 37 | unsigned long key; | 41 | unsigned long _key; |
| 38 | } poll_table; | 42 | } poll_table; |
| 39 | 43 | ||
| 40 | static inline void poll_wait(struct file * filp, wait_queue_head_t * wait_address, poll_table *p) | 44 | static inline void poll_wait(struct file * filp, wait_queue_head_t * wait_address, poll_table *p) |
| 41 | { | 45 | { |
| 42 | if (p && wait_address) | 46 | if (p && p->_qproc && wait_address) |
| 43 | p->qproc(filp, wait_address, p); | 47 | p->_qproc(filp, wait_address, p); |
| 48 | } | ||
| 49 | |||
| 50 | /* | ||
| 51 | * Return true if it is guaranteed that poll will not wait. This is the case | ||
| 52 | * if the poll() of another file descriptor in the set got an event, so there | ||
| 53 | * is no need for waiting. | ||
| 54 | */ | ||
| 55 | static inline bool poll_does_not_wait(const poll_table *p) | ||
| 56 | { | ||
| 57 | return p == NULL || p->_qproc == NULL; | ||
| 58 | } | ||
| 59 | |||
| 60 | /* | ||
| 61 | * Return the set of events that the application wants to poll for. | ||
| 62 | * This is useful for drivers that need to know whether a DMA transfer has | ||
| 63 | * to be started implicitly on poll(). You typically only want to do that | ||
| 64 | * if the application is actually polling for POLLIN and/or POLLOUT. | ||
| 65 | */ | ||
| 66 | static inline unsigned long poll_requested_events(const poll_table *p) | ||
| 67 | { | ||
| 68 | return p ? p->_key : ~0UL; | ||
| 44 | } | 69 | } |
| 45 | 70 | ||
| 46 | static inline void init_poll_funcptr(poll_table *pt, poll_queue_proc qproc) | 71 | static inline void init_poll_funcptr(poll_table *pt, poll_queue_proc qproc) |
| 47 | { | 72 | { |
| 48 | pt->qproc = qproc; | 73 | pt->_qproc = qproc; |
| 49 | pt->key = ~0UL; /* all events enabled */ | 74 | pt->_key = ~0UL; /* all events enabled */ |
| 50 | } | 75 | } |
| 51 | 76 | ||
| 52 | struct poll_table_entry { | 77 | struct poll_table_entry { |
diff --git a/include/linux/posix_acl.h b/include/linux/posix_acl.h index b7681102a4b9..11bad91c4433 100644 --- a/include/linux/posix_acl.h +++ b/include/linux/posix_acl.h | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | #ifndef __LINUX_POSIX_ACL_H | 8 | #ifndef __LINUX_POSIX_ACL_H |
| 9 | #define __LINUX_POSIX_ACL_H | 9 | #define __LINUX_POSIX_ACL_H |
| 10 | 10 | ||
| 11 | #include <linux/bug.h> | ||
| 11 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
| 12 | #include <linux/rcupdate.h> | 13 | #include <linux/rcupdate.h> |
| 13 | 14 | ||
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index fa9b962aec12..c38c13db8832 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h | |||
| @@ -13,10 +13,11 @@ | |||
| 13 | #ifndef __LINUX_POWER_SUPPLY_H__ | 13 | #ifndef __LINUX_POWER_SUPPLY_H__ |
| 14 | #define __LINUX_POWER_SUPPLY_H__ | 14 | #define __LINUX_POWER_SUPPLY_H__ |
| 15 | 15 | ||
| 16 | #include <linux/device.h> | ||
| 17 | #include <linux/workqueue.h> | 16 | #include <linux/workqueue.h> |
| 18 | #include <linux/leds.h> | 17 | #include <linux/leds.h> |
| 19 | 18 | ||
| 19 | struct device; | ||
| 20 | |||
| 20 | /* | 21 | /* |
| 21 | * All voltages, currents, charges, energies, time and temperatures in uV, | 22 | * All voltages, currents, charges, energies, time and temperatures in uV, |
| 22 | * µA, µAh, µWh, seconds and tenths of degree Celsius unless otherwise | 23 | * µA, µAh, µWh, seconds and tenths of degree Celsius unless otherwise |
diff --git a/include/linux/prctl.h b/include/linux/prctl.h index a0413ac3abe8..e0cfec2490aa 100644 --- a/include/linux/prctl.h +++ b/include/linux/prctl.h | |||
| @@ -121,4 +121,7 @@ | |||
| 121 | #define PR_SET_PTRACER 0x59616d61 | 121 | #define PR_SET_PTRACER 0x59616d61 |
| 122 | # define PR_SET_PTRACER_ANY ((unsigned long)-1) | 122 | # define PR_SET_PTRACER_ANY ((unsigned long)-1) |
| 123 | 123 | ||
| 124 | #define PR_SET_CHILD_SUBREAPER 36 | ||
| 125 | #define PR_GET_CHILD_SUBREAPER 37 | ||
| 126 | |||
| 124 | #endif /* _LINUX_PRCTL_H */ | 127 | #endif /* _LINUX_PRCTL_H */ |
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index c2f1f6a5fcb8..5c719627c2aa 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
| @@ -51,20 +51,6 @@ | |||
| 51 | #define PTRACE_INTERRUPT 0x4207 | 51 | #define PTRACE_INTERRUPT 0x4207 |
| 52 | #define PTRACE_LISTEN 0x4208 | 52 | #define PTRACE_LISTEN 0x4208 |
| 53 | 53 | ||
| 54 | /* flags in @data for PTRACE_SEIZE */ | ||
| 55 | #define PTRACE_SEIZE_DEVEL 0x80000000 /* temp flag for development */ | ||
| 56 | |||
| 57 | /* options set using PTRACE_SETOPTIONS */ | ||
| 58 | #define PTRACE_O_TRACESYSGOOD 0x00000001 | ||
| 59 | #define PTRACE_O_TRACEFORK 0x00000002 | ||
| 60 | #define PTRACE_O_TRACEVFORK 0x00000004 | ||
| 61 | #define PTRACE_O_TRACECLONE 0x00000008 | ||
| 62 | #define PTRACE_O_TRACEEXEC 0x00000010 | ||
| 63 | #define PTRACE_O_TRACEVFORKDONE 0x00000020 | ||
| 64 | #define PTRACE_O_TRACEEXIT 0x00000040 | ||
| 65 | |||
| 66 | #define PTRACE_O_MASK 0x0000007f | ||
| 67 | |||
| 68 | /* Wait extended result codes for the above trace options. */ | 54 | /* Wait extended result codes for the above trace options. */ |
| 69 | #define PTRACE_EVENT_FORK 1 | 55 | #define PTRACE_EVENT_FORK 1 |
| 70 | #define PTRACE_EVENT_VFORK 2 | 56 | #define PTRACE_EVENT_VFORK 2 |
| @@ -72,7 +58,19 @@ | |||
| 72 | #define PTRACE_EVENT_EXEC 4 | 58 | #define PTRACE_EVENT_EXEC 4 |
| 73 | #define PTRACE_EVENT_VFORK_DONE 5 | 59 | #define PTRACE_EVENT_VFORK_DONE 5 |
| 74 | #define PTRACE_EVENT_EXIT 6 | 60 | #define PTRACE_EVENT_EXIT 6 |
| 75 | #define PTRACE_EVENT_STOP 7 | 61 | /* Extended result codes which enabled by means other than options. */ |
| 62 | #define PTRACE_EVENT_STOP 128 | ||
| 63 | |||
| 64 | /* Options set using PTRACE_SETOPTIONS or using PTRACE_SEIZE @data param */ | ||
| 65 | #define PTRACE_O_TRACESYSGOOD 1 | ||
| 66 | #define PTRACE_O_TRACEFORK (1 << PTRACE_EVENT_FORK) | ||
| 67 | #define PTRACE_O_TRACEVFORK (1 << PTRACE_EVENT_VFORK) | ||
| 68 | #define PTRACE_O_TRACECLONE (1 << PTRACE_EVENT_CLONE) | ||
| 69 | #define PTRACE_O_TRACEEXEC (1 << PTRACE_EVENT_EXEC) | ||
| 70 | #define PTRACE_O_TRACEVFORKDONE (1 << PTRACE_EVENT_VFORK_DONE) | ||
| 71 | #define PTRACE_O_TRACEEXIT (1 << PTRACE_EVENT_EXIT) | ||
| 72 | |||
| 73 | #define PTRACE_O_MASK 0x0000007f | ||
| 76 | 74 | ||
| 77 | #include <asm/ptrace.h> | 75 | #include <asm/ptrace.h> |
| 78 | 76 | ||
| @@ -88,13 +86,12 @@ | |||
| 88 | #define PT_SEIZED 0x00010000 /* SEIZE used, enable new behavior */ | 86 | #define PT_SEIZED 0x00010000 /* SEIZE used, enable new behavior */ |
| 89 | #define PT_PTRACED 0x00000001 | 87 | #define PT_PTRACED 0x00000001 |
| 90 | #define PT_DTRACE 0x00000002 /* delayed trace (used on m68k, i386) */ | 88 | #define PT_DTRACE 0x00000002 /* delayed trace (used on m68k, i386) */ |
| 91 | #define PT_TRACESYSGOOD 0x00000004 | 89 | #define PT_PTRACE_CAP 0x00000004 /* ptracer can follow suid-exec */ |
| 92 | #define PT_PTRACE_CAP 0x00000008 /* ptracer can follow suid-exec */ | ||
| 93 | 90 | ||
| 91 | #define PT_OPT_FLAG_SHIFT 3 | ||
| 94 | /* PT_TRACE_* event enable flags */ | 92 | /* PT_TRACE_* event enable flags */ |
| 95 | #define PT_EVENT_FLAG_SHIFT 4 | 93 | #define PT_EVENT_FLAG(event) (1 << (PT_OPT_FLAG_SHIFT + (event))) |
| 96 | #define PT_EVENT_FLAG(event) (1 << (PT_EVENT_FLAG_SHIFT + (event) - 1)) | 94 | #define PT_TRACESYSGOOD PT_EVENT_FLAG(0) |
| 97 | |||
| 98 | #define PT_TRACE_FORK PT_EVENT_FLAG(PTRACE_EVENT_FORK) | 95 | #define PT_TRACE_FORK PT_EVENT_FLAG(PTRACE_EVENT_FORK) |
| 99 | #define PT_TRACE_VFORK PT_EVENT_FLAG(PTRACE_EVENT_VFORK) | 96 | #define PT_TRACE_VFORK PT_EVENT_FLAG(PTRACE_EVENT_VFORK) |
| 100 | #define PT_TRACE_CLONE PT_EVENT_FLAG(PTRACE_EVENT_CLONE) | 97 | #define PT_TRACE_CLONE PT_EVENT_FLAG(PTRACE_EVENT_CLONE) |
| @@ -102,8 +99,6 @@ | |||
| 102 | #define PT_TRACE_VFORK_DONE PT_EVENT_FLAG(PTRACE_EVENT_VFORK_DONE) | 99 | #define PT_TRACE_VFORK_DONE PT_EVENT_FLAG(PTRACE_EVENT_VFORK_DONE) |
| 103 | #define PT_TRACE_EXIT PT_EVENT_FLAG(PTRACE_EVENT_EXIT) | 100 | #define PT_TRACE_EXIT PT_EVENT_FLAG(PTRACE_EVENT_EXIT) |
| 104 | 101 | ||
| 105 | #define PT_TRACE_MASK 0x000003f4 | ||
| 106 | |||
| 107 | /* single stepping state bits (used on ARM and PA-RISC) */ | 102 | /* single stepping state bits (used on ARM and PA-RISC) */ |
| 108 | #define PT_SINGLESTEP_BIT 31 | 103 | #define PT_SINGLESTEP_BIT 31 |
| 109 | #define PT_SINGLESTEP (1<<PT_SINGLESTEP_BIT) | 104 | #define PT_SINGLESTEP (1<<PT_SINGLESTEP_BIT) |
| @@ -113,6 +108,7 @@ | |||
| 113 | #include <linux/compiler.h> /* For unlikely. */ | 108 | #include <linux/compiler.h> /* For unlikely. */ |
| 114 | #include <linux/sched.h> /* For struct task_struct. */ | 109 | #include <linux/sched.h> /* For struct task_struct. */ |
| 115 | #include <linux/err.h> /* for IS_ERR_VALUE */ | 110 | #include <linux/err.h> /* for IS_ERR_VALUE */ |
| 111 | #include <linux/bug.h> /* For BUG_ON. */ | ||
| 116 | 112 | ||
| 117 | 113 | ||
| 118 | extern long arch_ptrace(struct task_struct *child, long request, | 114 | extern long arch_ptrace(struct task_struct *child, long request, |
| @@ -199,9 +195,10 @@ static inline void ptrace_event(int event, unsigned long message) | |||
| 199 | if (unlikely(ptrace_event_enabled(current, event))) { | 195 | if (unlikely(ptrace_event_enabled(current, event))) { |
| 200 | current->ptrace_message = message; | 196 | current->ptrace_message = message; |
| 201 | ptrace_notify((event << 8) | SIGTRAP); | 197 | ptrace_notify((event << 8) | SIGTRAP); |
| 202 | } else if (event == PTRACE_EVENT_EXEC && unlikely(current->ptrace)) { | 198 | } else if (event == PTRACE_EVENT_EXEC) { |
| 203 | /* legacy EXEC report via SIGTRAP */ | 199 | /* legacy EXEC report via SIGTRAP */ |
| 204 | send_sig(SIGTRAP, current, 0); | 200 | if ((current->ptrace & (PT_PTRACED|PT_SEIZED)) == PT_PTRACED) |
| 201 | send_sig(SIGTRAP, current, 0); | ||
| 205 | } | 202 | } |
| 206 | } | 203 | } |
| 207 | 204 | ||
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h index 07e360b1b282..e9a48234e693 100644 --- a/include/linux/radix-tree.h +++ b/include/linux/radix-tree.h | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | 22 | ||
| 23 | #include <linux/preempt.h> | 23 | #include <linux/preempt.h> |
| 24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
| 25 | #include <linux/bug.h> | ||
| 25 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
| 26 | #include <linux/rcupdate.h> | 27 | #include <linux/rcupdate.h> |
| 27 | 28 | ||
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 937217425c47..20fb776a1d4a 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
| @@ -42,6 +42,7 @@ | |||
| 42 | #include <linux/lockdep.h> | 42 | #include <linux/lockdep.h> |
| 43 | #include <linux/completion.h> | 43 | #include <linux/completion.h> |
| 44 | #include <linux/debugobjects.h> | 44 | #include <linux/debugobjects.h> |
| 45 | #include <linux/bug.h> | ||
| 45 | #include <linux/compiler.h> | 46 | #include <linux/compiler.h> |
| 46 | 47 | ||
| 47 | #ifdef CONFIG_RCU_TORTURE_TEST | 48 | #ifdef CONFIG_RCU_TORTURE_TEST |
| @@ -418,7 +419,7 @@ extern int rcu_my_thread_group_empty(void); | |||
| 418 | */ | 419 | */ |
| 419 | #define rcu_lockdep_assert(c, s) \ | 420 | #define rcu_lockdep_assert(c, s) \ |
| 420 | do { \ | 421 | do { \ |
| 421 | static bool __warned; \ | 422 | static bool __section(.data.unlikely) __warned; \ |
| 422 | if (debug_lockdep_rcu_enabled() && !__warned && !(c)) { \ | 423 | if (debug_lockdep_rcu_enabled() && !__warned && !(c)) { \ |
| 423 | __warned = true; \ | 424 | __warned = true; \ |
| 424 | lockdep_rcu_suspicious(__FILE__, __LINE__, s); \ | 425 | lockdep_rcu_suspicious(__FILE__, __LINE__, s); \ |
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index c47898d47c8a..a90abb6bfa64 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h | |||
| @@ -13,12 +13,13 @@ | |||
| 13 | * published by the Free Software Foundation. | 13 | * published by the Free Software Foundation. |
| 14 | */ | 14 | */ |
| 15 | 15 | ||
| 16 | #include <linux/device.h> | ||
| 17 | #include <linux/list.h> | 16 | #include <linux/list.h> |
| 18 | 17 | ||
| 19 | struct module; | 18 | struct module; |
| 19 | struct device; | ||
| 20 | struct i2c_client; | 20 | struct i2c_client; |
| 21 | struct spi_device; | 21 | struct spi_device; |
| 22 | struct regmap; | ||
| 22 | 23 | ||
| 23 | /* An enum of all the supported cache types */ | 24 | /* An enum of all the supported cache types */ |
| 24 | enum regcache_type { | 25 | enum regcache_type { |
| @@ -40,10 +41,13 @@ struct reg_default { | |||
| 40 | unsigned int def; | 41 | unsigned int def; |
| 41 | }; | 42 | }; |
| 42 | 43 | ||
| 44 | #ifdef CONFIG_REGMAP | ||
| 45 | |||
| 43 | /** | 46 | /** |
| 44 | * Configuration for the register map of a device. | 47 | * Configuration for the register map of a device. |
| 45 | * | 48 | * |
| 46 | * @reg_bits: Number of bits in a register address, mandatory. | 49 | * @reg_bits: Number of bits in a register address, mandatory. |
| 50 | * @pad_bits: Number of bits of padding between register and value. | ||
| 47 | * @val_bits: Number of bits in a register value, mandatory. | 51 | * @val_bits: Number of bits in a register value, mandatory. |
| 48 | * | 52 | * |
| 49 | * @writeable_reg: Optional callback returning true if the register | 53 | * @writeable_reg: Optional callback returning true if the register |
| @@ -74,6 +78,7 @@ struct reg_default { | |||
| 74 | */ | 78 | */ |
| 75 | struct regmap_config { | 79 | struct regmap_config { |
| 76 | int reg_bits; | 80 | int reg_bits; |
| 81 | int pad_bits; | ||
| 77 | int val_bits; | 82 | int val_bits; |
| 78 | 83 | ||
| 79 | bool (*writeable_reg)(struct device *dev, unsigned int reg); | 84 | bool (*writeable_reg)(struct device *dev, unsigned int reg); |
| @@ -127,12 +132,22 @@ struct regmap *regmap_init_i2c(struct i2c_client *i2c, | |||
| 127 | struct regmap *regmap_init_spi(struct spi_device *dev, | 132 | struct regmap *regmap_init_spi(struct spi_device *dev, |
| 128 | const struct regmap_config *config); | 133 | const struct regmap_config *config); |
| 129 | 134 | ||
| 135 | struct regmap *devm_regmap_init(struct device *dev, | ||
| 136 | const struct regmap_bus *bus, | ||
| 137 | const struct regmap_config *config); | ||
| 138 | struct regmap *devm_regmap_init_i2c(struct i2c_client *i2c, | ||
| 139 | const struct regmap_config *config); | ||
| 140 | struct regmap *devm_regmap_init_spi(struct spi_device *dev, | ||
| 141 | const struct regmap_config *config); | ||
| 142 | |||
| 130 | void regmap_exit(struct regmap *map); | 143 | void regmap_exit(struct regmap *map); |
| 131 | int regmap_reinit_cache(struct regmap *map, | 144 | int regmap_reinit_cache(struct regmap *map, |
| 132 | const struct regmap_config *config); | 145 | const struct regmap_config *config); |
| 133 | int regmap_write(struct regmap *map, unsigned int reg, unsigned int val); | 146 | int regmap_write(struct regmap *map, unsigned int reg, unsigned int val); |
| 134 | int regmap_raw_write(struct regmap *map, unsigned int reg, | 147 | int regmap_raw_write(struct regmap *map, unsigned int reg, |
| 135 | const void *val, size_t val_len); | 148 | const void *val, size_t val_len); |
| 149 | int regmap_bulk_write(struct regmap *map, unsigned int reg, const void *val, | ||
| 150 | size_t val_count); | ||
| 136 | int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val); | 151 | int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val); |
| 137 | int regmap_raw_read(struct regmap *map, unsigned int reg, | 152 | int regmap_raw_read(struct regmap *map, unsigned int reg, |
| 138 | void *val, size_t val_len); | 153 | void *val, size_t val_len); |
| @@ -146,6 +161,8 @@ int regmap_update_bits_check(struct regmap *map, unsigned int reg, | |||
| 146 | int regmap_get_val_bytes(struct regmap *map); | 161 | int regmap_get_val_bytes(struct regmap *map); |
| 147 | 162 | ||
| 148 | int regcache_sync(struct regmap *map); | 163 | int regcache_sync(struct regmap *map); |
| 164 | int regcache_sync_region(struct regmap *map, unsigned int min, | ||
| 165 | unsigned int max); | ||
| 149 | void regcache_cache_only(struct regmap *map, bool enable); | 166 | void regcache_cache_only(struct regmap *map, bool enable); |
| 150 | void regcache_cache_bypass(struct regmap *map, bool enable); | 167 | void regcache_cache_bypass(struct regmap *map, bool enable); |
| 151 | void regcache_mark_dirty(struct regmap *map); | 168 | void regcache_mark_dirty(struct regmap *map); |
| @@ -201,4 +218,115 @@ int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags, | |||
| 201 | void regmap_del_irq_chip(int irq, struct regmap_irq_chip_data *data); | 218 | void regmap_del_irq_chip(int irq, struct regmap_irq_chip_data *data); |
| 202 | int regmap_irq_chip_get_base(struct regmap_irq_chip_data *data); | 219 | int regmap_irq_chip_get_base(struct regmap_irq_chip_data *data); |
| 203 | 220 | ||
| 221 | #else | ||
| 222 | |||
| 223 | /* | ||
| 224 | * These stubs should only ever be called by generic code which has | ||
| 225 | * regmap based facilities, if they ever get called at runtime | ||
| 226 | * something is going wrong and something probably needs to select | ||
| 227 | * REGMAP. | ||
| 228 | */ | ||
| 229 | |||
| 230 | static inline int regmap_write(struct regmap *map, unsigned int reg, | ||
| 231 | unsigned int val) | ||
| 232 | { | ||
| 233 | WARN_ONCE(1, "regmap API is disabled"); | ||
| 234 | return -EINVAL; | ||
| 235 | } | ||
| 236 | |||
| 237 | static inline int regmap_raw_write(struct regmap *map, unsigned int reg, | ||
| 238 | const void *val, size_t val_len) | ||
| 239 | { | ||
| 240 | WARN_ONCE(1, "regmap API is disabled"); | ||
| 241 | return -EINVAL; | ||
| 242 | } | ||
| 243 | |||
| 244 | static inline int regmap_bulk_write(struct regmap *map, unsigned int reg, | ||
| 245 | const void *val, size_t val_count) | ||
| 246 | { | ||
| 247 | WARN_ONCE(1, "regmap API is disabled"); | ||
| 248 | return -EINVAL; | ||
| 249 | } | ||
| 250 | |||
| 251 | static inline int regmap_read(struct regmap *map, unsigned int reg, | ||
| 252 | unsigned int *val) | ||
| 253 | { | ||
| 254 | WARN_ONCE(1, "regmap API is disabled"); | ||
| 255 | return -EINVAL; | ||
| 256 | } | ||
| 257 | |||
| 258 | static inline int regmap_raw_read(struct regmap *map, unsigned int reg, | ||
| 259 | void *val, size_t val_len) | ||
| 260 | { | ||
| 261 | WARN_ONCE(1, "regmap API is disabled"); | ||
| 262 | return -EINVAL; | ||
| 263 | } | ||
| 264 | |||
| 265 | static inline int regmap_bulk_read(struct regmap *map, unsigned int reg, | ||
| 266 | void *val, size_t val_count) | ||
| 267 | { | ||
| 268 | WARN_ONCE(1, "regmap API is disabled"); | ||
| 269 | return -EINVAL; | ||
| 270 | } | ||
| 271 | |||
| 272 | static inline int regmap_update_bits(struct regmap *map, unsigned int reg, | ||
| 273 | unsigned int mask, unsigned int val) | ||
| 274 | { | ||
| 275 | WARN_ONCE(1, "regmap API is disabled"); | ||
| 276 | return -EINVAL; | ||
| 277 | } | ||
| 278 | |||
| 279 | static inline int regmap_update_bits_check(struct regmap *map, | ||
| 280 | unsigned int reg, | ||
| 281 | unsigned int mask, unsigned int val, | ||
| 282 | bool *change) | ||
| 283 | { | ||
| 284 | WARN_ONCE(1, "regmap API is disabled"); | ||
| 285 | return -EINVAL; | ||
| 286 | } | ||
| 287 | |||
| 288 | static inline int regmap_get_val_bytes(struct regmap *map) | ||
| 289 | { | ||
| 290 | WARN_ONCE(1, "regmap API is disabled"); | ||
| 291 | return -EINVAL; | ||
| 292 | } | ||
| 293 | |||
| 294 | static inline int regcache_sync(struct regmap *map) | ||
| 295 | { | ||
| 296 | WARN_ONCE(1, "regmap API is disabled"); | ||
| 297 | return -EINVAL; | ||
| 298 | } | ||
| 299 | |||
| 300 | static inline int regcache_sync_region(struct regmap *map, unsigned int min, | ||
| 301 | unsigned int max) | ||
| 302 | { | ||
| 303 | WARN_ONCE(1, "regmap API is disabled"); | ||
| 304 | return -EINVAL; | ||
| 305 | } | ||
| 306 | |||
| 307 | static inline void regcache_cache_only(struct regmap *map, bool enable) | ||
| 308 | { | ||
| 309 | WARN_ONCE(1, "regmap API is disabled"); | ||
| 310 | } | ||
| 311 | |||
| 312 | static inline void regcache_cache_bypass(struct regmap *map, bool enable) | ||
| 313 | { | ||
| 314 | WARN_ONCE(1, "regmap API is disabled"); | ||
| 315 | } | ||
| 316 | |||
| 317 | static inline void regcache_mark_dirty(struct regmap *map) | ||
| 318 | { | ||
| 319 | WARN_ONCE(1, "regmap API is disabled"); | ||
| 320 | } | ||
| 321 | |||
| 322 | static inline int regmap_register_patch(struct regmap *map, | ||
| 323 | const struct reg_default *regs, | ||
| 324 | int num_regs) | ||
| 325 | { | ||
| 326 | WARN_ONCE(1, "regmap API is disabled"); | ||
| 327 | return -EINVAL; | ||
| 328 | } | ||
| 329 | |||
| 330 | #endif | ||
| 331 | |||
| 204 | #endif | 332 | #endif |
diff --git a/include/linux/regset.h b/include/linux/regset.h index 686f37327a49..8e0c9febf495 100644 --- a/include/linux/regset.h +++ b/include/linux/regset.h | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | 15 | ||
| 16 | #include <linux/compiler.h> | 16 | #include <linux/compiler.h> |
| 17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
| 18 | #include <linux/bug.h> | ||
| 18 | #include <linux/uaccess.h> | 19 | #include <linux/uaccess.h> |
| 19 | struct task_struct; | 20 | struct task_struct; |
| 20 | struct user_regset; | 21 | struct user_regset; |
diff --git a/include/linux/regulator/bq24022.h b/include/linux/regulator/bq24022.h deleted file mode 100644 index a6d014005d49..000000000000 --- a/include/linux/regulator/bq24022.h +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Support for TI bq24022 (bqTINY-II) Dual Input (USB/AC Adpater) | ||
| 3 | * 1-Cell Li-Ion Charger connected via GPIOs. | ||
| 4 | * | ||
| 5 | * Copyright (c) 2008 Philipp Zabel | ||
| 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 version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | * | ||
| 11 | */ | ||
| 12 | |||
| 13 | struct regulator_init_data; | ||
| 14 | |||
| 15 | /** | ||
| 16 | * bq24022_mach_info - platform data for bq24022 | ||
| 17 | * @gpio_nce: GPIO line connected to the nCE pin, used to enable / disable charging | ||
| 18 | * @gpio_iset2: GPIO line connected to the ISET2 pin, used to limit charging current to 100 mA / 500 mA | ||
| 19 | */ | ||
| 20 | struct bq24022_mach_info { | ||
| 21 | int gpio_nce; | ||
| 22 | int gpio_iset2; | ||
| 23 | struct regulator_init_data *init_data; | ||
| 24 | }; | ||
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index b6c8d717c7ec..4ed1b30ac5fc 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
| @@ -35,7 +35,8 @@ | |||
| 35 | #ifndef __LINUX_REGULATOR_CONSUMER_H_ | 35 | #ifndef __LINUX_REGULATOR_CONSUMER_H_ |
| 36 | #define __LINUX_REGULATOR_CONSUMER_H_ | 36 | #define __LINUX_REGULATOR_CONSUMER_H_ |
| 37 | 37 | ||
| 38 | #include <linux/device.h> | 38 | struct device; |
| 39 | struct notifier_block; | ||
| 39 | 40 | ||
| 40 | /* | 41 | /* |
| 41 | * Regulator operating modes. | 42 | * Regulator operating modes. |
diff --git a/include/linux/relay.h b/include/linux/relay.h index a822fd71fd64..91cacc34c159 100644 --- a/include/linux/relay.h +++ b/include/linux/relay.h | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include <linux/timer.h> | 15 | #include <linux/timer.h> |
| 16 | #include <linux/wait.h> | 16 | #include <linux/wait.h> |
| 17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
| 18 | #include <linux/bug.h> | ||
| 18 | #include <linux/fs.h> | 19 | #include <linux/fs.h> |
| 19 | #include <linux/poll.h> | 20 | #include <linux/poll.h> |
| 20 | #include <linux/kref.h> | 21 | #include <linux/kref.h> |
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h new file mode 100644 index 000000000000..f1ffabb978d3 --- /dev/null +++ b/include/linux/remoteproc.h | |||
| @@ -0,0 +1,478 @@ | |||
| 1 | /* | ||
| 2 | * Remote Processor Framework | ||
| 3 | * | ||
| 4 | * Copyright(c) 2011 Texas Instruments, Inc. | ||
| 5 | * Copyright(c) 2011 Google, Inc. | ||
| 6 | * All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * * Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * * Redistributions in binary form must reproduce the above copyright | ||
| 15 | * notice, this list of conditions and the following disclaimer in | ||
| 16 | * the documentation and/or other materials provided with the | ||
| 17 | * distribution. | ||
| 18 | * * Neither the name Texas Instruments nor the names of its | ||
| 19 | * contributors may be used to endorse or promote products derived | ||
| 20 | * from this software without specific prior written permission. | ||
| 21 | * | ||
| 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| 23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| 24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
| 25 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
| 26 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 27 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
| 28 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
| 29 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
| 30 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| 31 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
| 32 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 33 | */ | ||
| 34 | |||
| 35 | #ifndef REMOTEPROC_H | ||
| 36 | #define REMOTEPROC_H | ||
| 37 | |||
| 38 | #include <linux/types.h> | ||
| 39 | #include <linux/kref.h> | ||
| 40 | #include <linux/klist.h> | ||
| 41 | #include <linux/mutex.h> | ||
| 42 | #include <linux/virtio.h> | ||
| 43 | #include <linux/completion.h> | ||
| 44 | #include <linux/idr.h> | ||
| 45 | |||
| 46 | /** | ||
| 47 | * struct resource_table - firmware resource table header | ||
| 48 | * @ver: version number | ||
| 49 | * @num: number of resource entries | ||
| 50 | * @reserved: reserved (must be zero) | ||
| 51 | * @offset: array of offsets pointing at the various resource entries | ||
| 52 | * | ||
| 53 | * A resource table is essentially a list of system resources required | ||
| 54 | * by the remote processor. It may also include configuration entries. | ||
| 55 | * If needed, the remote processor firmware should contain this table | ||
| 56 | * as a dedicated ".resource_table" ELF section. | ||
| 57 | * | ||
| 58 | * Some resources entries are mere announcements, where the host is informed | ||
| 59 | * of specific remoteproc configuration. Other entries require the host to | ||
| 60 | * do something (e.g. allocate a system resource). Sometimes a negotiation | ||
| 61 | * is expected, where the firmware requests a resource, and once allocated, | ||
| 62 | * the host should provide back its details (e.g. address of an allocated | ||
| 63 | * memory region). | ||
| 64 | * | ||
| 65 | * The header of the resource table, as expressed by this structure, | ||
| 66 | * contains a version number (should we need to change this format in the | ||
| 67 | * future), the number of available resource entries, and their offsets | ||
| 68 | * in the table. | ||
| 69 | * | ||
| 70 | * Immediately following this header are the resource entries themselves, | ||
| 71 | * each of which begins with a resource entry header (as described below). | ||
| 72 | */ | ||
| 73 | struct resource_table { | ||
| 74 | u32 ver; | ||
| 75 | u32 num; | ||
| 76 | u32 reserved[2]; | ||
| 77 | u32 offset[0]; | ||
| 78 | } __packed; | ||
| 79 | |||
| 80 | /** | ||
| 81 | * struct fw_rsc_hdr - firmware resource entry header | ||
| 82 | * @type: resource type | ||
| 83 | * @data: resource data | ||
| 84 | * | ||
| 85 | * Every resource entry begins with a 'struct fw_rsc_hdr' header providing | ||
| 86 | * its @type. The content of the entry itself will immediately follow | ||
| 87 | * this header, and it should be parsed according to the resource type. | ||
| 88 | */ | ||
| 89 | struct fw_rsc_hdr { | ||
| 90 | u32 type; | ||
| 91 | u8 data[0]; | ||
| 92 | } __packed; | ||
| 93 | |||
| 94 | /** | ||
| 95 | * enum fw_resource_type - types of resource entries | ||
| 96 | * | ||
| 97 | * @RSC_CARVEOUT: request for allocation of a physically contiguous | ||
| 98 | * memory region. | ||
| 99 | * @RSC_DEVMEM: request to iommu_map a memory-based peripheral. | ||
| 100 | * @RSC_TRACE: announces the availability of a trace buffer into which | ||
| 101 | * the remote processor will be writing logs. | ||
| 102 | * @RSC_VDEV: declare support for a virtio device, and serve as its | ||
| 103 | * virtio header. | ||
| 104 | * @RSC_LAST: just keep this one at the end | ||
| 105 | * | ||
| 106 | * For more details regarding a specific resource type, please see its | ||
| 107 | * dedicated structure below. | ||
| 108 | * | ||
| 109 | * Please note that these values are used as indices to the rproc_handle_rsc | ||
| 110 | * lookup table, so please keep them sane. Moreover, @RSC_LAST is used to | ||
| 111 | * check the validity of an index before the lookup table is accessed, so | ||
| 112 | * please update it as needed. | ||
| 113 | */ | ||
| 114 | enum fw_resource_type { | ||
| 115 | RSC_CARVEOUT = 0, | ||
| 116 | RSC_DEVMEM = 1, | ||
| 117 | RSC_TRACE = 2, | ||
| 118 | RSC_VDEV = 3, | ||
| 119 | RSC_LAST = 4, | ||
| 120 | }; | ||
| 121 | |||
| 122 | #define FW_RSC_ADDR_ANY (0xFFFFFFFFFFFFFFFF) | ||
| 123 | |||
| 124 | /** | ||
| 125 | * struct fw_rsc_carveout - physically contiguous memory request | ||
| 126 | * @da: device address | ||
| 127 | * @pa: physical address | ||
| 128 | * @len: length (in bytes) | ||
| 129 | * @flags: iommu protection flags | ||
| 130 | * @reserved: reserved (must be zero) | ||
| 131 | * @name: human-readable name of the requested memory region | ||
| 132 | * | ||
| 133 | * This resource entry requests the host to allocate a physically contiguous | ||
| 134 | * memory region. | ||
| 135 | * | ||
| 136 | * These request entries should precede other firmware resource entries, | ||
| 137 | * as other entries might request placing other data objects inside | ||
| 138 | * these memory regions (e.g. data/code segments, trace resource entries, ...). | ||
| 139 | * | ||
| 140 | * Allocating memory this way helps utilizing the reserved physical memory | ||
| 141 | * (e.g. CMA) more efficiently, and also minimizes the number of TLB entries | ||
| 142 | * needed to map it (in case @rproc is using an IOMMU). Reducing the TLB | ||
| 143 | * pressure is important; it may have a substantial impact on performance. | ||
| 144 | * | ||
| 145 | * If the firmware is compiled with static addresses, then @da should specify | ||
| 146 | * the expected device address of this memory region. If @da is set to | ||
| 147 | * FW_RSC_ADDR_ANY, then the host will dynamically allocate it, and then | ||
| 148 | * overwrite @da with the dynamically allocated address. | ||
| 149 | * | ||
| 150 | * We will always use @da to negotiate the device addresses, even if it | ||
| 151 | * isn't using an iommu. In that case, though, it will obviously contain | ||
| 152 | * physical addresses. | ||
| 153 | * | ||
| 154 | * Some remote processors needs to know the allocated physical address | ||
| 155 | * even if they do use an iommu. This is needed, e.g., if they control | ||
| 156 | * hardware accelerators which access the physical memory directly (this | ||
| 157 | * is the case with OMAP4 for instance). In that case, the host will | ||
| 158 | * overwrite @pa with the dynamically allocated physical address. | ||
| 159 | * Generally we don't want to expose physical addresses if we don't have to | ||
| 160 | * (remote processors are generally _not_ trusted), so we might want to | ||
| 161 | * change this to happen _only_ when explicitly required by the hardware. | ||
| 162 | * | ||
| 163 | * @flags is used to provide IOMMU protection flags, and @name should | ||
| 164 | * (optionally) contain a human readable name of this carveout region | ||
| 165 | * (mainly for debugging purposes). | ||
| 166 | */ | ||
| 167 | struct fw_rsc_carveout { | ||
| 168 | u32 da; | ||
| 169 | u32 pa; | ||
| 170 | u32 len; | ||
| 171 | u32 flags; | ||
| 172 | u32 reserved; | ||
| 173 | u8 name[32]; | ||
| 174 | } __packed; | ||
| 175 | |||
| 176 | /** | ||
| 177 | * struct fw_rsc_devmem - iommu mapping request | ||
| 178 | * @da: device address | ||
| 179 | * @pa: physical address | ||
| 180 | * @len: length (in bytes) | ||
| 181 | * @flags: iommu protection flags | ||
| 182 | * @reserved: reserved (must be zero) | ||
| 183 | * @name: human-readable name of the requested region to be mapped | ||
| 184 | * | ||
| 185 | * This resource entry requests the host to iommu map a physically contiguous | ||
| 186 | * memory region. This is needed in case the remote processor requires | ||
| 187 | * access to certain memory-based peripherals; _never_ use it to access | ||
| 188 | * regular memory. | ||
| 189 | * | ||
| 190 | * This is obviously only needed if the remote processor is accessing memory | ||
| 191 | * via an iommu. | ||
| 192 | * | ||
| 193 | * @da should specify the required device address, @pa should specify | ||
| 194 | * the physical address we want to map, @len should specify the size of | ||
| 195 | * the mapping and @flags is the IOMMU protection flags. As always, @name may | ||
| 196 | * (optionally) contain a human readable name of this mapping (mainly for | ||
| 197 | * debugging purposes). | ||
| 198 | * | ||
| 199 | * Note: at this point we just "trust" those devmem entries to contain valid | ||
| 200 | * physical addresses, but this isn't safe and will be changed: eventually we | ||
| 201 | * want remoteproc implementations to provide us ranges of physical addresses | ||
| 202 | * the firmware is allowed to request, and not allow firmwares to request | ||
| 203 | * access to physical addresses that are outside those ranges. | ||
| 204 | */ | ||
| 205 | struct fw_rsc_devmem { | ||
| 206 | u32 da; | ||
| 207 | u32 pa; | ||
| 208 | u32 len; | ||
| 209 | u32 flags; | ||
| 210 | u32 reserved; | ||
| 211 | u8 name[32]; | ||
| 212 | } __packed; | ||
| 213 | |||
| 214 | /** | ||
| 215 | * struct fw_rsc_trace - trace buffer declaration | ||
| 216 | * @da: device address | ||
| 217 | * @len: length (in bytes) | ||
| 218 | * @reserved: reserved (must be zero) | ||
| 219 | * @name: human-readable name of the trace buffer | ||
| 220 | * | ||
| 221 | * This resource entry provides the host information about a trace buffer | ||
| 222 | * into which the remote processor will write log messages. | ||
| 223 | * | ||
| 224 | * @da specifies the device address of the buffer, @len specifies | ||
| 225 | * its size, and @name may contain a human readable name of the trace buffer. | ||
| 226 | * | ||
| 227 | * After booting the remote processor, the trace buffers are exposed to the | ||
| 228 | * user via debugfs entries (called trace0, trace1, etc..). | ||
| 229 | */ | ||
| 230 | struct fw_rsc_trace { | ||
| 231 | u32 da; | ||
| 232 | u32 len; | ||
| 233 | u32 reserved; | ||
| 234 | u8 name[32]; | ||
| 235 | } __packed; | ||
| 236 | |||
| 237 | /** | ||
| 238 | * struct fw_rsc_vdev_vring - vring descriptor entry | ||
| 239 | * @da: device address | ||
| 240 | * @align: the alignment between the consumer and producer parts of the vring | ||
| 241 | * @num: num of buffers supported by this vring (must be power of two) | ||
| 242 | * @notifyid is a unique rproc-wide notify index for this vring. This notify | ||
| 243 | * index is used when kicking a remote processor, to let it know that this | ||
| 244 | * vring is triggered. | ||
| 245 | * @reserved: reserved (must be zero) | ||
| 246 | * | ||
| 247 | * This descriptor is not a resource entry by itself; it is part of the | ||
| 248 | * vdev resource type (see below). | ||
| 249 | * | ||
| 250 | * Note that @da should either contain the device address where | ||
| 251 | * the remote processor is expecting the vring, or indicate that | ||
| 252 | * dynamically allocation of the vring's device address is supported. | ||
| 253 | */ | ||
| 254 | struct fw_rsc_vdev_vring { | ||
| 255 | u32 da; | ||
| 256 | u32 align; | ||
| 257 | u32 num; | ||
| 258 | u32 notifyid; | ||
| 259 | u32 reserved; | ||
| 260 | } __packed; | ||
| 261 | |||
| 262 | /** | ||
| 263 | * struct fw_rsc_vdev - virtio device header | ||
| 264 | * @id: virtio device id (as in virtio_ids.h) | ||
| 265 | * @notifyid is a unique rproc-wide notify index for this vdev. This notify | ||
| 266 | * index is used when kicking a remote processor, to let it know that the | ||
| 267 | * status/features of this vdev have changes. | ||
| 268 | * @dfeatures specifies the virtio device features supported by the firmware | ||
| 269 | * @gfeatures is a place holder used by the host to write back the | ||
| 270 | * negotiated features that are supported by both sides. | ||
| 271 | * @config_len is the size of the virtio config space of this vdev. The config | ||
| 272 | * space lies in the resource table immediate after this vdev header. | ||
| 273 | * @status is a place holder where the host will indicate its virtio progress. | ||
| 274 | * @num_of_vrings indicates how many vrings are described in this vdev header | ||
| 275 | * @reserved: reserved (must be zero) | ||
| 276 | * @vring is an array of @num_of_vrings entries of 'struct fw_rsc_vdev_vring'. | ||
| 277 | * | ||
| 278 | * This resource is a virtio device header: it provides information about | ||
| 279 | * the vdev, and is then used by the host and its peer remote processors | ||
| 280 | * to negotiate and share certain virtio properties. | ||
| 281 | * | ||
| 282 | * By providing this resource entry, the firmware essentially asks remoteproc | ||
| 283 | * to statically allocate a vdev upon registration of the rproc (dynamic vdev | ||
| 284 | * allocation is not yet supported). | ||
| 285 | * | ||
| 286 | * Note: unlike virtualization systems, the term 'host' here means | ||
| 287 | * the Linux side which is running remoteproc to control the remote | ||
| 288 | * processors. We use the name 'gfeatures' to comply with virtio's terms, | ||
| 289 | * though there isn't really any virtualized guest OS here: it's the host | ||
| 290 | * which is responsible for negotiating the final features. | ||
| 291 | * Yeah, it's a bit confusing. | ||
| 292 | * | ||
| 293 | * Note: immediately following this structure is the virtio config space for | ||
| 294 | * this vdev (which is specific to the vdev; for more info, read the virtio | ||
| 295 | * spec). the size of the config space is specified by @config_len. | ||
| 296 | */ | ||
| 297 | struct fw_rsc_vdev { | ||
| 298 | u32 id; | ||
| 299 | u32 notifyid; | ||
| 300 | u32 dfeatures; | ||
| 301 | u32 gfeatures; | ||
| 302 | u32 config_len; | ||
| 303 | u8 status; | ||
| 304 | u8 num_of_vrings; | ||
| 305 | u8 reserved[2]; | ||
| 306 | struct fw_rsc_vdev_vring vring[0]; | ||
| 307 | } __packed; | ||
| 308 | |||
| 309 | /** | ||
| 310 | * struct rproc_mem_entry - memory entry descriptor | ||
| 311 | * @va: virtual address | ||
| 312 | * @dma: dma address | ||
| 313 | * @len: length, in bytes | ||
| 314 | * @da: device address | ||
| 315 | * @priv: associated data | ||
| 316 | * @node: list node | ||
| 317 | */ | ||
| 318 | struct rproc_mem_entry { | ||
| 319 | void *va; | ||
| 320 | dma_addr_t dma; | ||
| 321 | int len; | ||
| 322 | u32 da; | ||
| 323 | void *priv; | ||
| 324 | struct list_head node; | ||
| 325 | }; | ||
| 326 | |||
| 327 | struct rproc; | ||
| 328 | |||
| 329 | /** | ||
| 330 | * struct rproc_ops - platform-specific device handlers | ||
| 331 | * @start: power on the device and boot it | ||
| 332 | * @stop: power off the device | ||
| 333 | * @kick: kick a virtqueue (virtqueue id given as a parameter) | ||
| 334 | */ | ||
| 335 | struct rproc_ops { | ||
| 336 | int (*start)(struct rproc *rproc); | ||
| 337 | int (*stop)(struct rproc *rproc); | ||
| 338 | void (*kick)(struct rproc *rproc, int vqid); | ||
| 339 | }; | ||
| 340 | |||
| 341 | /** | ||
| 342 | * enum rproc_state - remote processor states | ||
| 343 | * @RPROC_OFFLINE: device is powered off | ||
| 344 | * @RPROC_SUSPENDED: device is suspended; needs to be woken up to receive | ||
| 345 | * a message. | ||
| 346 | * @RPROC_RUNNING: device is up and running | ||
| 347 | * @RPROC_CRASHED: device has crashed; need to start recovery | ||
| 348 | * @RPROC_LAST: just keep this one at the end | ||
| 349 | * | ||
| 350 | * Please note that the values of these states are used as indices | ||
| 351 | * to rproc_state_string, a state-to-name lookup table, | ||
| 352 | * so please keep the two synchronized. @RPROC_LAST is used to check | ||
| 353 | * the validity of an index before the lookup table is accessed, so | ||
| 354 | * please update it as needed too. | ||
| 355 | */ | ||
| 356 | enum rproc_state { | ||
| 357 | RPROC_OFFLINE = 0, | ||
| 358 | RPROC_SUSPENDED = 1, | ||
| 359 | RPROC_RUNNING = 2, | ||
| 360 | RPROC_CRASHED = 3, | ||
| 361 | RPROC_LAST = 4, | ||
| 362 | }; | ||
| 363 | |||
| 364 | /** | ||
| 365 | * struct rproc - represents a physical remote processor device | ||
| 366 | * @node: klist node of this rproc object | ||
| 367 | * @domain: iommu domain | ||
| 368 | * @name: human readable name of the rproc | ||
| 369 | * @firmware: name of firmware file to be loaded | ||
| 370 | * @priv: private data which belongs to the platform-specific rproc module | ||
| 371 | * @ops: platform-specific start/stop rproc handlers | ||
| 372 | * @dev: underlying device | ||
| 373 | * @refcount: refcount of users that have a valid pointer to this rproc | ||
| 374 | * @power: refcount of users who need this rproc powered up | ||
| 375 | * @state: state of the device | ||
| 376 | * @lock: lock which protects concurrent manipulations of the rproc | ||
| 377 | * @dbg_dir: debugfs directory of this rproc device | ||
| 378 | * @traces: list of trace buffers | ||
| 379 | * @num_traces: number of trace buffers | ||
| 380 | * @carveouts: list of physically contiguous memory allocations | ||
| 381 | * @mappings: list of iommu mappings we initiated, needed on shutdown | ||
| 382 | * @firmware_loading_complete: marks e/o asynchronous firmware loading | ||
| 383 | * @bootaddr: address of first instruction to boot rproc with (optional) | ||
| 384 | * @rvdevs: list of remote virtio devices | ||
| 385 | * @notifyids: idr for dynamically assigning rproc-wide unique notify ids | ||
| 386 | */ | ||
| 387 | struct rproc { | ||
| 388 | struct klist_node node; | ||
| 389 | struct iommu_domain *domain; | ||
| 390 | const char *name; | ||
| 391 | const char *firmware; | ||
| 392 | void *priv; | ||
| 393 | const struct rproc_ops *ops; | ||
| 394 | struct device *dev; | ||
| 395 | struct kref refcount; | ||
| 396 | atomic_t power; | ||
| 397 | unsigned int state; | ||
| 398 | struct mutex lock; | ||
| 399 | struct dentry *dbg_dir; | ||
| 400 | struct list_head traces; | ||
| 401 | int num_traces; | ||
| 402 | struct list_head carveouts; | ||
| 403 | struct list_head mappings; | ||
| 404 | struct completion firmware_loading_complete; | ||
| 405 | u32 bootaddr; | ||
| 406 | struct list_head rvdevs; | ||
| 407 | struct idr notifyids; | ||
| 408 | }; | ||
| 409 | |||
| 410 | /* we currently support only two vrings per rvdev */ | ||
| 411 | #define RVDEV_NUM_VRINGS 2 | ||
| 412 | |||
| 413 | /** | ||
| 414 | * struct rproc_vring - remoteproc vring state | ||
| 415 | * @va: virtual address | ||
| 416 | * @dma: dma address | ||
| 417 | * @len: length, in bytes | ||
| 418 | * @da: device address | ||
| 419 | * @align: vring alignment | ||
| 420 | * @notifyid: rproc-specific unique vring index | ||
| 421 | * @rvdev: remote vdev | ||
| 422 | * @vq: the virtqueue of this vring | ||
| 423 | */ | ||
| 424 | struct rproc_vring { | ||
| 425 | void *va; | ||
| 426 | dma_addr_t dma; | ||
| 427 | int len; | ||
| 428 | u32 da; | ||
| 429 | u32 align; | ||
| 430 | int notifyid; | ||
| 431 | struct rproc_vdev *rvdev; | ||
| 432 | struct virtqueue *vq; | ||
| 433 | }; | ||
| 434 | |||
| 435 | /** | ||
| 436 | * struct rproc_vdev - remoteproc state for a supported virtio device | ||
| 437 | * @node: list node | ||
| 438 | * @rproc: the rproc handle | ||
| 439 | * @vdev: the virio device | ||
| 440 | * @vring: the vrings for this vdev | ||
| 441 | * @dfeatures: virtio device features | ||
| 442 | * @gfeatures: virtio guest features | ||
| 443 | */ | ||
| 444 | struct rproc_vdev { | ||
| 445 | struct list_head node; | ||
| 446 | struct rproc *rproc; | ||
| 447 | struct virtio_device vdev; | ||
| 448 | struct rproc_vring vring[RVDEV_NUM_VRINGS]; | ||
| 449 | unsigned long dfeatures; | ||
| 450 | unsigned long gfeatures; | ||
| 451 | }; | ||
| 452 | |||
| 453 | struct rproc *rproc_get_by_name(const char *name); | ||
| 454 | void rproc_put(struct rproc *rproc); | ||
| 455 | |||
| 456 | struct rproc *rproc_alloc(struct device *dev, const char *name, | ||
| 457 | const struct rproc_ops *ops, | ||
| 458 | const char *firmware, int len); | ||
| 459 | void rproc_free(struct rproc *rproc); | ||
| 460 | int rproc_register(struct rproc *rproc); | ||
| 461 | int rproc_unregister(struct rproc *rproc); | ||
| 462 | |||
| 463 | int rproc_boot(struct rproc *rproc); | ||
| 464 | void rproc_shutdown(struct rproc *rproc); | ||
| 465 | |||
| 466 | static inline struct rproc_vdev *vdev_to_rvdev(struct virtio_device *vdev) | ||
| 467 | { | ||
| 468 | return container_of(vdev, struct rproc_vdev, vdev); | ||
| 469 | } | ||
| 470 | |||
| 471 | static inline struct rproc *vdev_to_rproc(struct virtio_device *vdev) | ||
| 472 | { | ||
| 473 | struct rproc_vdev *rvdev = vdev_to_rvdev(vdev); | ||
| 474 | |||
| 475 | return rvdev->rproc; | ||
| 476 | } | ||
| 477 | |||
| 478 | #endif /* REMOTEPROC_H */ | ||
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h index c6c608482cba..6fdf02737e9d 100644 --- a/include/linux/rfkill.h +++ b/include/linux/rfkill.h | |||
| @@ -117,10 +117,10 @@ enum rfkill_user_states { | |||
| 117 | #include <linux/kernel.h> | 117 | #include <linux/kernel.h> |
| 118 | #include <linux/list.h> | 118 | #include <linux/list.h> |
| 119 | #include <linux/mutex.h> | 119 | #include <linux/mutex.h> |
| 120 | #include <linux/device.h> | ||
| 121 | #include <linux/leds.h> | 120 | #include <linux/leds.h> |
| 122 | #include <linux/err.h> | 121 | #include <linux/err.h> |
| 123 | 122 | ||
| 123 | struct device; | ||
| 124 | /* this is opaque */ | 124 | /* this is opaque */ |
| 125 | struct rfkill; | 125 | struct rfkill; |
| 126 | 126 | ||
diff --git a/include/linux/rio_drv.h b/include/linux/rio_drv.h index 229b3ca23134..7f07470e1ed9 100644 --- a/include/linux/rio_drv.h +++ b/include/linux/rio_drv.h | |||
| @@ -17,7 +17,6 @@ | |||
| 17 | #include <linux/ioport.h> | 17 | #include <linux/ioport.h> |
| 18 | #include <linux/list.h> | 18 | #include <linux/list.h> |
| 19 | #include <linux/errno.h> | 19 | #include <linux/errno.h> |
| 20 | #include <linux/device.h> | ||
| 21 | #include <linux/string.h> | 20 | #include <linux/string.h> |
| 22 | #include <linux/rio.h> | 21 | #include <linux/rio.h> |
| 23 | 22 | ||
diff --git a/include/linux/rpmsg.h b/include/linux/rpmsg.h new file mode 100644 index 000000000000..a8e50e44203c --- /dev/null +++ b/include/linux/rpmsg.h | |||
| @@ -0,0 +1,326 @@ | |||
| 1 | /* | ||
| 2 | * Remote processor messaging | ||
| 3 | * | ||
| 4 | * Copyright (C) 2011 Texas Instruments, Inc. | ||
| 5 | * Copyright (C) 2011 Google, Inc. | ||
| 6 | * All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * * Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * * Redistributions in binary form must reproduce the above copyright | ||
| 15 | * notice, this list of conditions and the following disclaimer in | ||
| 16 | * the documentation and/or other materials provided with the | ||
| 17 | * distribution. | ||
| 18 | * * Neither the name Texas Instruments nor the names of its | ||
| 19 | * contributors may be used to endorse or promote products derived | ||
| 20 | * from this software without specific prior written permission. | ||
| 21 | * | ||
| 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| 23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| 24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
| 25 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
| 26 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 27 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
| 28 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
| 29 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
| 30 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| 31 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
| 32 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 33 | */ | ||
| 34 | |||
| 35 | #ifndef _LINUX_RPMSG_H | ||
| 36 | #define _LINUX_RPMSG_H | ||
| 37 | |||
| 38 | #include <linux/types.h> | ||
| 39 | #include <linux/device.h> | ||
| 40 | #include <linux/mod_devicetable.h> | ||
| 41 | |||
| 42 | /* The feature bitmap for virtio rpmsg */ | ||
| 43 | #define VIRTIO_RPMSG_F_NS 0 /* RP supports name service notifications */ | ||
| 44 | |||
| 45 | /** | ||
| 46 | * struct rpmsg_hdr - common header for all rpmsg messages | ||
| 47 | * @src: source address | ||
| 48 | * @dst: destination address | ||
| 49 | * @reserved: reserved for future use | ||
| 50 | * @len: length of payload (in bytes) | ||
| 51 | * @flags: message flags | ||
| 52 | * @data: @len bytes of message payload data | ||
| 53 | * | ||
| 54 | * Every message sent(/received) on the rpmsg bus begins with this header. | ||
| 55 | */ | ||
| 56 | struct rpmsg_hdr { | ||
| 57 | u32 src; | ||
| 58 | u32 dst; | ||
| 59 | u32 reserved; | ||
| 60 | u16 len; | ||
| 61 | u16 flags; | ||
| 62 | u8 data[0]; | ||
| 63 | } __packed; | ||
| 64 | |||
| 65 | /** | ||
| 66 | * struct rpmsg_ns_msg - dynamic name service announcement message | ||
| 67 | * @name: name of remote service that is published | ||
| 68 | * @addr: address of remote service that is published | ||
| 69 | * @flags: indicates whether service is created or destroyed | ||
| 70 | * | ||
| 71 | * This message is sent across to publish a new service, or announce | ||
| 72 | * about its removal. When we receive these messages, an appropriate | ||
| 73 | * rpmsg channel (i.e device) is created/destroyed. In turn, the ->probe() | ||
| 74 | * or ->remove() handler of the appropriate rpmsg driver will be invoked | ||
| 75 | * (if/as-soon-as one is registered). | ||
| 76 | */ | ||
| 77 | struct rpmsg_ns_msg { | ||
| 78 | char name[RPMSG_NAME_SIZE]; | ||
| 79 | u32 addr; | ||
| 80 | u32 flags; | ||
| 81 | } __packed; | ||
| 82 | |||
| 83 | /** | ||
| 84 | * enum rpmsg_ns_flags - dynamic name service announcement flags | ||
| 85 | * | ||
| 86 | * @RPMSG_NS_CREATE: a new remote service was just created | ||
| 87 | * @RPMSG_NS_DESTROY: a known remote service was just destroyed | ||
| 88 | */ | ||
| 89 | enum rpmsg_ns_flags { | ||
| 90 | RPMSG_NS_CREATE = 0, | ||
| 91 | RPMSG_NS_DESTROY = 1, | ||
| 92 | }; | ||
| 93 | |||
| 94 | #define RPMSG_ADDR_ANY 0xFFFFFFFF | ||
| 95 | |||
| 96 | struct virtproc_info; | ||
| 97 | |||
| 98 | /** | ||
| 99 | * rpmsg_channel - devices that belong to the rpmsg bus are called channels | ||
| 100 | * @vrp: the remote processor this channel belongs to | ||
| 101 | * @dev: the device struct | ||
| 102 | * @id: device id (used to match between rpmsg drivers and devices) | ||
| 103 | * @src: local address | ||
| 104 | * @dst: destination address | ||
| 105 | * @ept: the rpmsg endpoint of this channel | ||
| 106 | * @announce: if set, rpmsg will announce the creation/removal of this channel | ||
| 107 | */ | ||
| 108 | struct rpmsg_channel { | ||
| 109 | struct virtproc_info *vrp; | ||
| 110 | struct device dev; | ||
| 111 | struct rpmsg_device_id id; | ||
| 112 | u32 src; | ||
| 113 | u32 dst; | ||
| 114 | struct rpmsg_endpoint *ept; | ||
| 115 | bool announce; | ||
| 116 | }; | ||
| 117 | |||
| 118 | typedef void (*rpmsg_rx_cb_t)(struct rpmsg_channel *, void *, int, void *, u32); | ||
| 119 | |||
| 120 | /** | ||
| 121 | * struct rpmsg_endpoint - binds a local rpmsg address to its user | ||
| 122 | * @rpdev: rpmsg channel device | ||
| 123 | * @cb: rx callback handler | ||
| 124 | * @addr: local rpmsg address | ||
| 125 | * @priv: private data for the driver's use | ||
| 126 | * | ||
| 127 | * In essence, an rpmsg endpoint represents a listener on the rpmsg bus, as | ||
| 128 | * it binds an rpmsg address with an rx callback handler. | ||
| 129 | * | ||
| 130 | * Simple rpmsg drivers shouldn't use this struct directly, because | ||
| 131 | * things just work: every rpmsg driver provides an rx callback upon | ||
| 132 | * registering to the bus, and that callback is then bound to its rpmsg | ||
| 133 | * address when the driver is probed. When relevant inbound messages arrive | ||
| 134 | * (i.e. messages which their dst address equals to the src address of | ||
| 135 | * the rpmsg channel), the driver's handler is invoked to process it. | ||
| 136 | * | ||
| 137 | * More complicated drivers though, that do need to allocate additional rpmsg | ||
| 138 | * addresses, and bind them to different rx callbacks, must explicitly | ||
| 139 | * create additional endpoints by themselves (see rpmsg_create_ept()). | ||
| 140 | */ | ||
| 141 | struct rpmsg_endpoint { | ||
| 142 | struct rpmsg_channel *rpdev; | ||
| 143 | rpmsg_rx_cb_t cb; | ||
| 144 | u32 addr; | ||
| 145 | void *priv; | ||
| 146 | }; | ||
| 147 | |||
| 148 | /** | ||
| 149 | * struct rpmsg_driver - rpmsg driver struct | ||
| 150 | * @drv: underlying device driver | ||
| 151 | * @id_table: rpmsg ids serviced by this driver | ||
| 152 | * @probe: invoked when a matching rpmsg channel (i.e. device) is found | ||
| 153 | * @remove: invoked when the rpmsg channel is removed | ||
| 154 | * @callback: invoked when an inbound message is received on the channel | ||
| 155 | */ | ||
| 156 | struct rpmsg_driver { | ||
| 157 | struct device_driver drv; | ||
| 158 | const struct rpmsg_device_id *id_table; | ||
| 159 | int (*probe)(struct rpmsg_channel *dev); | ||
| 160 | void (*remove)(struct rpmsg_channel *dev); | ||
| 161 | void (*callback)(struct rpmsg_channel *, void *, int, void *, u32); | ||
| 162 | }; | ||
| 163 | |||
| 164 | int register_rpmsg_device(struct rpmsg_channel *dev); | ||
| 165 | void unregister_rpmsg_device(struct rpmsg_channel *dev); | ||
| 166 | int register_rpmsg_driver(struct rpmsg_driver *drv); | ||
| 167 | void unregister_rpmsg_driver(struct rpmsg_driver *drv); | ||
| 168 | void rpmsg_destroy_ept(struct rpmsg_endpoint *); | ||
| 169 | struct rpmsg_endpoint *rpmsg_create_ept(struct rpmsg_channel *, | ||
| 170 | rpmsg_rx_cb_t cb, void *priv, u32 addr); | ||
| 171 | int | ||
| 172 | rpmsg_send_offchannel_raw(struct rpmsg_channel *, u32, u32, void *, int, bool); | ||
| 173 | |||
| 174 | /** | ||
| 175 | * rpmsg_send() - send a message across to the remote processor | ||
| 176 | * @rpdev: the rpmsg channel | ||
| 177 | * @data: payload of message | ||
| 178 | * @len: length of payload | ||
| 179 | * | ||
| 180 | * This function sends @data of length @len on the @rpdev channel. | ||
| 181 | * The message will be sent to the remote processor which the @rpdev | ||
| 182 | * channel belongs to, using @rpdev's source and destination addresses. | ||
| 183 | * In case there are no TX buffers available, the function will block until | ||
| 184 | * one becomes available, or a timeout of 15 seconds elapses. When the latter | ||
| 185 | * happens, -ERESTARTSYS is returned. | ||
| 186 | * | ||
| 187 | * Can only be called from process context (for now). | ||
| 188 | * | ||
| 189 | * Returns 0 on success and an appropriate error value on failure. | ||
| 190 | */ | ||
| 191 | static inline int rpmsg_send(struct rpmsg_channel *rpdev, void *data, int len) | ||
| 192 | { | ||
| 193 | u32 src = rpdev->src, dst = rpdev->dst; | ||
| 194 | |||
| 195 | return rpmsg_send_offchannel_raw(rpdev, src, dst, data, len, true); | ||
| 196 | } | ||
| 197 | |||
| 198 | /** | ||
| 199 | * rpmsg_sendto() - send a message across to the remote processor, specify dst | ||
| 200 | * @rpdev: the rpmsg channel | ||
| 201 | * @data: payload of message | ||
| 202 | * @len: length of payload | ||
| 203 | * @dst: destination address | ||
| 204 | * | ||
| 205 | * This function sends @data of length @len to the remote @dst address. | ||
| 206 | * The message will be sent to the remote processor which the @rpdev | ||
| 207 | * channel belongs to, using @rpdev's source address. | ||
| 208 | * In case there are no TX buffers available, the function will block until | ||
| 209 | * one becomes available, or a timeout of 15 seconds elapses. When the latter | ||
| 210 | * happens, -ERESTARTSYS is returned. | ||
| 211 | * | ||
| 212 | * Can only be called from process context (for now). | ||
| 213 | * | ||
| 214 | * Returns 0 on success and an appropriate error value on failure. | ||
| 215 | */ | ||
| 216 | static inline | ||
| 217 | int rpmsg_sendto(struct rpmsg_channel *rpdev, void *data, int len, u32 dst) | ||
| 218 | { | ||
| 219 | u32 src = rpdev->src; | ||
| 220 | |||
| 221 | return rpmsg_send_offchannel_raw(rpdev, src, dst, data, len, true); | ||
| 222 | } | ||
| 223 | |||
| 224 | /** | ||
| 225 | * rpmsg_send_offchannel() - send a message using explicit src/dst addresses | ||
| 226 | * @rpdev: the rpmsg channel | ||
| 227 | * @src: source address | ||
| 228 | * @dst: destination address | ||
| 229 | * @data: payload of message | ||
| 230 | * @len: length of payload | ||
| 231 | * | ||
| 232 | * This function sends @data of length @len to the remote @dst address, | ||
| 233 | * and uses @src as the source address. | ||
| 234 | * The message will be sent to the remote processor which the @rpdev | ||
| 235 | * channel belongs to. | ||
| 236 | * In case there are no TX buffers available, the function will block until | ||
| 237 | * one becomes available, or a timeout of 15 seconds elapses. When the latter | ||
| 238 | * happens, -ERESTARTSYS is returned. | ||
| 239 | * | ||
| 240 | * Can only be called from process context (for now). | ||
| 241 | * | ||
| 242 | * Returns 0 on success and an appropriate error value on failure. | ||
| 243 | */ | ||
| 244 | static inline | ||
| 245 | int rpmsg_send_offchannel(struct rpmsg_channel *rpdev, u32 src, u32 dst, | ||
| 246 | void *data, int len) | ||
| 247 | { | ||
| 248 | return rpmsg_send_offchannel_raw(rpdev, src, dst, data, len, true); | ||
| 249 | } | ||
| 250 | |||
| 251 | /** | ||
| 252 | * rpmsg_send() - send a message across to the remote processor | ||
| 253 | * @rpdev: the rpmsg channel | ||
| 254 | * @data: payload of message | ||
| 255 | * @len: length of payload | ||
| 256 | * | ||
| 257 | * This function sends @data of length @len on the @rpdev channel. | ||
| 258 | * The message will be sent to the remote processor which the @rpdev | ||
| 259 | * channel belongs to, using @rpdev's source and destination addresses. | ||
| 260 | * In case there are no TX buffers available, the function will immediately | ||
| 261 | * return -ENOMEM without waiting until one becomes available. | ||
| 262 | * | ||
| 263 | * Can only be called from process context (for now). | ||
| 264 | * | ||
| 265 | * Returns 0 on success and an appropriate error value on failure. | ||
| 266 | */ | ||
| 267 | static inline | ||
| 268 | int rpmsg_trysend(struct rpmsg_channel *rpdev, void *data, int len) | ||
| 269 | { | ||
| 270 | u32 src = rpdev->src, dst = rpdev->dst; | ||
| 271 | |||
| 272 | return rpmsg_send_offchannel_raw(rpdev, src, dst, data, len, false); | ||
| 273 | } | ||
| 274 | |||
| 275 | /** | ||
| 276 | * rpmsg_sendto() - send a message across to the remote processor, specify dst | ||
| 277 | * @rpdev: the rpmsg channel | ||
| 278 | * @data: payload of message | ||
| 279 | * @len: length of payload | ||
| 280 | * @dst: destination address | ||
| 281 | * | ||
| 282 | * This function sends @data of length @len to the remote @dst address. | ||
| 283 | * The message will be sent to the remote processor which the @rpdev | ||
| 284 | * channel belongs to, using @rpdev's source address. | ||
| 285 | * In case there are no TX buffers available, the function will immediately | ||
| 286 | * return -ENOMEM without waiting until one becomes available. | ||
| 287 | * | ||
| 288 | * Can only be called from process context (for now). | ||
| 289 | * | ||
| 290 | * Returns 0 on success and an appropriate error value on failure. | ||
| 291 | */ | ||
| 292 | static inline | ||
| 293 | int rpmsg_trysendto(struct rpmsg_channel *rpdev, void *data, int len, u32 dst) | ||
| 294 | { | ||
| 295 | u32 src = rpdev->src; | ||
| 296 | |||
| 297 | return rpmsg_send_offchannel_raw(rpdev, src, dst, data, len, false); | ||
| 298 | } | ||
| 299 | |||
| 300 | /** | ||
| 301 | * rpmsg_send_offchannel() - send a message using explicit src/dst addresses | ||
| 302 | * @rpdev: the rpmsg channel | ||
| 303 | * @src: source address | ||
| 304 | * @dst: destination address | ||
| 305 | * @data: payload of message | ||
| 306 | * @len: length of payload | ||
| 307 | * | ||
| 308 | * This function sends @data of length @len to the remote @dst address, | ||
| 309 | * and uses @src as the source address. | ||
| 310 | * The message will be sent to the remote processor which the @rpdev | ||
| 311 | * channel belongs to. | ||
| 312 | * In case there are no TX buffers available, the function will immediately | ||
| 313 | * return -ENOMEM without waiting until one becomes available. | ||
| 314 | * | ||
| 315 | * Can only be called from process context (for now). | ||
| 316 | * | ||
| 317 | * Returns 0 on success and an appropriate error value on failure. | ||
| 318 | */ | ||
| 319 | static inline | ||
| 320 | int rpmsg_trysend_offchannel(struct rpmsg_channel *rpdev, u32 src, u32 dst, | ||
| 321 | void *data, int len) | ||
| 322 | { | ||
| 323 | return rpmsg_send_offchannel_raw(rpdev, src, dst, data, len, false); | ||
| 324 | } | ||
| 325 | |||
| 326 | #endif /* _LINUX_RPMSG_H */ | ||
diff --git a/include/linux/sa11x0-dma.h b/include/linux/sa11x0-dma.h new file mode 100644 index 000000000000..65839a58b8e5 --- /dev/null +++ b/include/linux/sa11x0-dma.h | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | /* | ||
| 2 | * SA11x0 DMA Engine support | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Russell King | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | #ifndef __LINUX_SA11X0_DMA_H | ||
| 11 | #define __LINUX_SA11X0_DMA_H | ||
| 12 | |||
| 13 | struct dma_chan; | ||
| 14 | |||
| 15 | #if defined(CONFIG_DMA_SA11X0) || defined(CONFIG_DMA_SA11X0_MODULE) | ||
| 16 | bool sa11x0_dma_filter_fn(struct dma_chan *, void *); | ||
| 17 | #else | ||
| 18 | static inline bool sa11x0_dma_filter_fn(struct dma_chan *c, void *d) | ||
| 19 | { | ||
| 20 | return false; | ||
| 21 | } | ||
| 22 | #endif | ||
| 23 | |||
| 24 | #endif | ||
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index 9aaf5bfdad1a..ac9586dadfa5 100644 --- a/include/linux/scatterlist.h +++ b/include/linux/scatterlist.h | |||
| @@ -1,10 +1,12 @@ | |||
| 1 | #ifndef _LINUX_SCATTERLIST_H | 1 | #ifndef _LINUX_SCATTERLIST_H |
| 2 | #define _LINUX_SCATTERLIST_H | 2 | #define _LINUX_SCATTERLIST_H |
| 3 | 3 | ||
| 4 | #include <linux/string.h> | ||
| 5 | #include <linux/bug.h> | ||
| 6 | #include <linux/mm.h> | ||
| 7 | |||
| 4 | #include <asm/types.h> | 8 | #include <asm/types.h> |
| 5 | #include <asm/scatterlist.h> | 9 | #include <asm/scatterlist.h> |
| 6 | #include <linux/mm.h> | ||
| 7 | #include <linux/string.h> | ||
| 8 | #include <asm/io.h> | 10 | #include <asm/io.h> |
| 9 | 11 | ||
| 10 | struct sg_table { | 12 | struct sg_table { |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 0c147a4260a5..0c3854b0d4b1 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -553,6 +553,18 @@ struct signal_struct { | |||
| 553 | int group_stop_count; | 553 | int group_stop_count; |
| 554 | unsigned int flags; /* see SIGNAL_* flags below */ | 554 | unsigned int flags; /* see SIGNAL_* flags below */ |
| 555 | 555 | ||
| 556 | /* | ||
| 557 | * PR_SET_CHILD_SUBREAPER marks a process, like a service | ||
| 558 | * manager, to re-parent orphan (double-forking) child processes | ||
| 559 | * to this process instead of 'init'. The service manager is | ||
| 560 | * able to receive SIGCHLD signals and is able to investigate | ||
| 561 | * the process until it calls wait(). All children of this | ||
| 562 | * process will inherit a flag if they should look for a | ||
| 563 | * child_subreaper process at exit. | ||
| 564 | */ | ||
| 565 | unsigned int is_child_subreaper:1; | ||
| 566 | unsigned int has_child_subreaper:1; | ||
| 567 | |||
| 556 | /* POSIX.1b Interval Timers */ | 568 | /* POSIX.1b Interval Timers */ |
| 557 | struct list_head posix_timers; | 569 | struct list_head posix_timers; |
| 558 | 570 | ||
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index 44f1514b00ba..fc61854f6224 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
| 5 | #include <linux/string.h> | 5 | #include <linux/string.h> |
| 6 | #include <linux/bug.h> | ||
| 6 | #include <linux/mutex.h> | 7 | #include <linux/mutex.h> |
| 7 | #include <linux/cpumask.h> | 8 | #include <linux/cpumask.h> |
| 8 | #include <linux/nodemask.h> | 9 | #include <linux/nodemask.h> |
| @@ -121,9 +122,12 @@ int single_release(struct inode *, struct file *); | |||
| 121 | void *__seq_open_private(struct file *, const struct seq_operations *, int); | 122 | void *__seq_open_private(struct file *, const struct seq_operations *, int); |
| 122 | int seq_open_private(struct file *, const struct seq_operations *, int); | 123 | int seq_open_private(struct file *, const struct seq_operations *, int); |
| 123 | int seq_release_private(struct inode *, struct file *); | 124 | int seq_release_private(struct inode *, struct file *); |
| 125 | int seq_put_decimal_ull(struct seq_file *m, char delimiter, | ||
| 126 | unsigned long long num); | ||
| 127 | int seq_put_decimal_ll(struct seq_file *m, char delimiter, | ||
| 128 | long long num); | ||
| 124 | 129 | ||
| 125 | #define SEQ_START_TOKEN ((void *)1) | 130 | #define SEQ_START_TOKEN ((void *)1) |
| 126 | |||
| 127 | /* | 131 | /* |
| 128 | * Helpers for iteration over list_head-s in seq_files | 132 | * Helpers for iteration over list_head-s in seq_files |
| 129 | */ | 133 | */ |
diff --git a/include/linux/serial_pnx8xxx.h b/include/linux/serial_pnx8xxx.h index de6c19c7f340..79ad87b0be3e 100644 --- a/include/linux/serial_pnx8xxx.h +++ b/include/linux/serial_pnx8xxx.h | |||
| @@ -20,7 +20,6 @@ | |||
| 20 | #define _LINUX_SERIAL_PNX8XXX_H | 20 | #define _LINUX_SERIAL_PNX8XXX_H |
| 21 | 21 | ||
| 22 | #include <linux/serial_core.h> | 22 | #include <linux/serial_core.h> |
| 23 | #include <linux/device.h> | ||
| 24 | 23 | ||
| 25 | #define PNX8XXX_NR_PORTS 2 | 24 | #define PNX8XXX_NR_PORTS 2 |
| 26 | 25 | ||
diff --git a/include/linux/sh_clk.h b/include/linux/sh_clk.h index 54341d811685..0a9d8f2ac519 100644 --- a/include/linux/sh_clk.h +++ b/include/linux/sh_clk.h | |||
| @@ -18,7 +18,8 @@ struct clk_mapping { | |||
| 18 | struct kref ref; | 18 | struct kref ref; |
| 19 | }; | 19 | }; |
| 20 | 20 | ||
| 21 | struct clk_ops { | 21 | |
| 22 | struct sh_clk_ops { | ||
| 22 | #ifdef CONFIG_SH_CLK_CPG_LEGACY | 23 | #ifdef CONFIG_SH_CLK_CPG_LEGACY |
| 23 | void (*init)(struct clk *clk); | 24 | void (*init)(struct clk *clk); |
| 24 | #endif | 25 | #endif |
| @@ -37,7 +38,7 @@ struct clk { | |||
| 37 | unsigned short parent_num; /* choose between */ | 38 | unsigned short parent_num; /* choose between */ |
| 38 | unsigned char src_shift; /* source clock field in the */ | 39 | unsigned char src_shift; /* source clock field in the */ |
| 39 | unsigned char src_width; /* configuration register */ | 40 | unsigned char src_width; /* configuration register */ |
| 40 | struct clk_ops *ops; | 41 | struct sh_clk_ops *ops; |
| 41 | 42 | ||
| 42 | struct list_head children; | 43 | struct list_head children; |
| 43 | struct list_head sibling; /* node for children */ | 44 | struct list_head sibling; /* node for children */ |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index a2b9953b582d..192250bd49f5 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include <linux/kmemcheck.h> | 18 | #include <linux/kmemcheck.h> |
| 19 | #include <linux/compiler.h> | 19 | #include <linux/compiler.h> |
| 20 | #include <linux/time.h> | 20 | #include <linux/time.h> |
| 21 | #include <linux/bug.h> | ||
| 21 | #include <linux/cache.h> | 22 | #include <linux/cache.h> |
| 22 | 23 | ||
| 23 | #include <linux/atomic.h> | 24 | #include <linux/atomic.h> |
| @@ -1244,7 +1245,7 @@ static inline void skb_fill_page_desc(struct sk_buff *skb, int i, | |||
| 1244 | } | 1245 | } |
| 1245 | 1246 | ||
| 1246 | extern void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, | 1247 | extern void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, |
| 1247 | int off, int size); | 1248 | int off, int size, unsigned int truesize); |
| 1248 | 1249 | ||
| 1249 | #define SKB_PAGE_ASSERT(skb) BUG_ON(skb_shinfo(skb)->nr_frags) | 1250 | #define SKB_PAGE_ASSERT(skb) BUG_ON(skb_shinfo(skb)->nr_frags) |
| 1250 | #define SKB_FRAG_ASSERT(skb) BUG_ON(skb_has_frag_list(skb)) | 1251 | #define SKB_FRAG_ASSERT(skb) BUG_ON(skb_has_frag_list(skb)) |
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index a32bcfdc7834..ca122b36aec1 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | */ | 8 | */ |
| 9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
| 10 | #include <linux/gfp.h> | 10 | #include <linux/gfp.h> |
| 11 | #include <linux/bug.h> | ||
| 11 | #include <linux/workqueue.h> | 12 | #include <linux/workqueue.h> |
| 12 | #include <linux/kobject.h> | 13 | #include <linux/kobject.h> |
| 13 | 14 | ||
diff --git a/include/linux/spi/mmc_spi.h b/include/linux/spi/mmc_spi.h index 0f4eb165f254..32be8dbdf191 100644 --- a/include/linux/spi/mmc_spi.h +++ b/include/linux/spi/mmc_spi.h | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | #ifndef __LINUX_SPI_MMC_SPI_H | 1 | #ifndef __LINUX_SPI_MMC_SPI_H |
| 2 | #define __LINUX_SPI_MMC_SPI_H | 2 | #define __LINUX_SPI_MMC_SPI_H |
| 3 | 3 | ||
| 4 | #include <linux/device.h> | ||
| 5 | #include <linux/spi/spi.h> | 4 | #include <linux/spi/spi.h> |
| 6 | #include <linux/interrupt.h> | 5 | #include <linux/interrupt.h> |
| 7 | 6 | ||
| 7 | struct device; | ||
| 8 | struct mmc_host; | 8 | struct mmc_host; |
| 9 | 9 | ||
| 10 | /* Put this in platform_data of a device being used to manage an MMC/SD | 10 | /* Put this in platform_data of a device being used to manage an MMC/SD |
diff --git a/include/linux/spi/s3c24xx.h b/include/linux/spi/s3c24xx.h new file mode 100644 index 000000000000..c23b923e493b --- /dev/null +++ b/include/linux/spi/s3c24xx.h | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2006 Simtec Electronics | ||
| 3 | * Ben Dooks <ben@simtec.co.uk> | ||
| 4 | * | ||
| 5 | * S3C2410 - SPI Controller platform_device info | ||
| 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 version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef __LINUX_SPI_S3C24XX_H | ||
| 13 | #define __LINUX_SPI_S3C24XX_H __FILE__ | ||
| 14 | |||
| 15 | struct s3c2410_spi_info { | ||
| 16 | int pin_cs; /* simple gpio cs */ | ||
| 17 | unsigned int num_cs; /* total chipselects */ | ||
| 18 | int bus_num; /* bus number to use. */ | ||
| 19 | |||
| 20 | unsigned int use_fiq:1; /* use fiq */ | ||
| 21 | |||
| 22 | void (*gpio_setup)(struct s3c2410_spi_info *spi, int enable); | ||
| 23 | void (*set_cs)(struct s3c2410_spi_info *spi, int cs, int pol); | ||
| 24 | }; | ||
| 25 | |||
| 26 | #endif /* __LINUX_SPI_S3C24XX_H */ | ||
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 7df6c17b0281..363239087263 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
| @@ -375,10 +375,7 @@ static inline int spin_can_lock(spinlock_t *lock) | |||
| 375 | return raw_spin_can_lock(&lock->rlock); | 375 | return raw_spin_can_lock(&lock->rlock); |
| 376 | } | 376 | } |
| 377 | 377 | ||
| 378 | static inline void assert_spin_locked(spinlock_t *lock) | 378 | #define assert_spin_locked(lock) assert_raw_spin_locked(&(lock)->rlock) |
| 379 | { | ||
| 380 | assert_raw_spin_locked(&lock->rlock); | ||
| 381 | } | ||
| 382 | 379 | ||
| 383 | /* | 380 | /* |
| 384 | * Pull the atomic_t declaration: | 381 | * Pull the atomic_t declaration: |
diff --git a/include/linux/ssb/ssb_driver_gige.h b/include/linux/ssb/ssb_driver_gige.h index eba52a100533..6b05dcd927ff 100644 --- a/include/linux/ssb/ssb_driver_gige.h +++ b/include/linux/ssb/ssb_driver_gige.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define LINUX_SSB_DRIVER_GIGE_H_ | 2 | #define LINUX_SSB_DRIVER_GIGE_H_ |
| 3 | 3 | ||
| 4 | #include <linux/ssb/ssb.h> | 4 | #include <linux/ssb/ssb.h> |
| 5 | #include <linux/bug.h> | ||
| 5 | #include <linux/pci.h> | 6 | #include <linux/pci.h> |
| 6 | #include <linux/spinlock.h> | 7 | #include <linux/spinlock.h> |
| 7 | 8 | ||
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index 7874a8a56638..492a36d72829 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h | |||
| @@ -99,6 +99,8 @@ struct rpc_authops { | |||
| 99 | 99 | ||
| 100 | struct rpc_cred * (*lookup_cred)(struct rpc_auth *, struct auth_cred *, int); | 100 | struct rpc_cred * (*lookup_cred)(struct rpc_auth *, struct auth_cred *, int); |
| 101 | struct rpc_cred * (*crcreate)(struct rpc_auth*, struct auth_cred *, int); | 101 | struct rpc_cred * (*crcreate)(struct rpc_auth*, struct auth_cred *, int); |
| 102 | int (*pipes_create)(struct rpc_auth *); | ||
| 103 | void (*pipes_destroy)(struct rpc_auth *); | ||
| 102 | }; | 104 | }; |
| 103 | 105 | ||
| 104 | struct rpc_credops { | 106 | struct rpc_credops { |
diff --git a/include/linux/sunrpc/bc_xprt.h b/include/linux/sunrpc/bc_xprt.h index f7f3ce340c08..969c0a671dbf 100644 --- a/include/linux/sunrpc/bc_xprt.h +++ b/include/linux/sunrpc/bc_xprt.h | |||
| @@ -35,7 +35,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||
| 35 | struct rpc_rqst *xprt_alloc_bc_request(struct rpc_xprt *xprt); | 35 | struct rpc_rqst *xprt_alloc_bc_request(struct rpc_xprt *xprt); |
| 36 | void xprt_free_bc_request(struct rpc_rqst *req); | 36 | void xprt_free_bc_request(struct rpc_rqst *req); |
| 37 | int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs); | 37 | int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs); |
| 38 | void xprt_destroy_backchannel(struct rpc_xprt *, int max_reqs); | 38 | void xprt_destroy_backchannel(struct rpc_xprt *, unsigned int max_reqs); |
| 39 | int bc_send(struct rpc_rqst *req); | 39 | int bc_send(struct rpc_rqst *req); |
| 40 | 40 | ||
| 41 | /* | 41 | /* |
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 57531f8e5956..f5fd6160dbca 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
| @@ -117,6 +117,7 @@ struct cache_detail { | |||
| 117 | struct cache_detail_procfs procfs; | 117 | struct cache_detail_procfs procfs; |
| 118 | struct cache_detail_pipefs pipefs; | 118 | struct cache_detail_pipefs pipefs; |
| 119 | } u; | 119 | } u; |
| 120 | struct net *net; | ||
| 120 | }; | 121 | }; |
| 121 | 122 | ||
| 122 | 123 | ||
| @@ -197,11 +198,14 @@ extern void cache_flush(void); | |||
| 197 | extern void cache_purge(struct cache_detail *detail); | 198 | extern void cache_purge(struct cache_detail *detail); |
| 198 | #define NEVER (0x7FFFFFFF) | 199 | #define NEVER (0x7FFFFFFF) |
| 199 | extern void __init cache_initialize(void); | 200 | extern void __init cache_initialize(void); |
| 200 | extern int cache_register(struct cache_detail *cd); | ||
| 201 | extern int cache_register_net(struct cache_detail *cd, struct net *net); | 201 | extern int cache_register_net(struct cache_detail *cd, struct net *net); |
| 202 | extern void cache_unregister(struct cache_detail *cd); | ||
| 203 | extern void cache_unregister_net(struct cache_detail *cd, struct net *net); | 202 | extern void cache_unregister_net(struct cache_detail *cd, struct net *net); |
| 204 | 203 | ||
| 204 | extern struct cache_detail *cache_create_net(struct cache_detail *tmpl, struct net *net); | ||
| 205 | extern void cache_destroy_net(struct cache_detail *cd, struct net *net); | ||
| 206 | |||
| 207 | extern void sunrpc_init_cache_detail(struct cache_detail *cd); | ||
| 208 | extern void sunrpc_destroy_cache_detail(struct cache_detail *cd); | ||
| 205 | extern int sunrpc_cache_register_pipefs(struct dentry *parent, const char *, | 209 | extern int sunrpc_cache_register_pipefs(struct dentry *parent, const char *, |
| 206 | umode_t, struct cache_detail *); | 210 | umode_t, struct cache_detail *); |
| 207 | extern void sunrpc_cache_unregister_pipefs(struct cache_detail *); | 211 | extern void sunrpc_cache_unregister_pipefs(struct cache_detail *); |
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 2c5993a17c33..523547ecfee2 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
| @@ -35,14 +35,13 @@ struct rpc_clnt { | |||
| 35 | struct list_head cl_clients; /* Global list of clients */ | 35 | struct list_head cl_clients; /* Global list of clients */ |
| 36 | struct list_head cl_tasks; /* List of tasks */ | 36 | struct list_head cl_tasks; /* List of tasks */ |
| 37 | spinlock_t cl_lock; /* spinlock */ | 37 | spinlock_t cl_lock; /* spinlock */ |
| 38 | struct rpc_xprt * cl_xprt; /* transport */ | 38 | struct rpc_xprt __rcu * cl_xprt; /* transport */ |
| 39 | struct rpc_procinfo * cl_procinfo; /* procedure info */ | 39 | struct rpc_procinfo * cl_procinfo; /* procedure info */ |
| 40 | u32 cl_prog, /* RPC program number */ | 40 | u32 cl_prog, /* RPC program number */ |
| 41 | cl_vers, /* RPC version number */ | 41 | cl_vers, /* RPC version number */ |
| 42 | cl_maxproc; /* max procedure number */ | 42 | cl_maxproc; /* max procedure number */ |
| 43 | 43 | ||
| 44 | char * cl_server; /* server machine name */ | 44 | const char * cl_protname; /* protocol name */ |
| 45 | char * cl_protname; /* protocol name */ | ||
| 46 | struct rpc_auth * cl_auth; /* authenticator */ | 45 | struct rpc_auth * cl_auth; /* authenticator */ |
| 47 | struct rpc_stat * cl_stats; /* per-program statistics */ | 46 | struct rpc_stat * cl_stats; /* per-program statistics */ |
| 48 | struct rpc_iostats * cl_metrics; /* per-client statistics */ | 47 | struct rpc_iostats * cl_metrics; /* per-client statistics */ |
| @@ -57,12 +56,11 @@ struct rpc_clnt { | |||
| 57 | 56 | ||
| 58 | int cl_nodelen; /* nodename length */ | 57 | int cl_nodelen; /* nodename length */ |
| 59 | char cl_nodename[UNX_MAXNODENAME]; | 58 | char cl_nodename[UNX_MAXNODENAME]; |
| 60 | struct path cl_path; | 59 | struct dentry * cl_dentry; |
| 61 | struct rpc_clnt * cl_parent; /* Points to parent of clones */ | 60 | struct rpc_clnt * cl_parent; /* Points to parent of clones */ |
| 62 | struct rpc_rtt cl_rtt_default; | 61 | struct rpc_rtt cl_rtt_default; |
| 63 | struct rpc_timeout cl_timeout_default; | 62 | struct rpc_timeout cl_timeout_default; |
| 64 | struct rpc_program * cl_program; | 63 | const struct rpc_program *cl_program; |
| 65 | char cl_inline_name[32]; | ||
| 66 | char *cl_principal; /* target to authenticate to */ | 64 | char *cl_principal; /* target to authenticate to */ |
| 67 | }; | 65 | }; |
| 68 | 66 | ||
| @@ -71,12 +69,12 @@ struct rpc_clnt { | |||
| 71 | */ | 69 | */ |
| 72 | #define RPC_MAXVERSION 4 | 70 | #define RPC_MAXVERSION 4 |
| 73 | struct rpc_program { | 71 | struct rpc_program { |
| 74 | char * name; /* protocol name */ | 72 | const char * name; /* protocol name */ |
| 75 | u32 number; /* program number */ | 73 | u32 number; /* program number */ |
| 76 | unsigned int nrvers; /* number of versions */ | 74 | unsigned int nrvers; /* number of versions */ |
| 77 | struct rpc_version ** version; /* version array */ | 75 | const struct rpc_version ** version; /* version array */ |
| 78 | struct rpc_stat * stats; /* statistics */ | 76 | struct rpc_stat * stats; /* statistics */ |
| 79 | char * pipe_dir_name; /* path to rpc_pipefs dir */ | 77 | const char * pipe_dir_name; /* path to rpc_pipefs dir */ |
| 80 | }; | 78 | }; |
| 81 | 79 | ||
| 82 | struct rpc_version { | 80 | struct rpc_version { |
| @@ -97,7 +95,7 @@ struct rpc_procinfo { | |||
| 97 | unsigned int p_count; /* call count */ | 95 | unsigned int p_count; /* call count */ |
| 98 | unsigned int p_timer; /* Which RTT timer to use */ | 96 | unsigned int p_timer; /* Which RTT timer to use */ |
| 99 | u32 p_statidx; /* Which procedure to account */ | 97 | u32 p_statidx; /* Which procedure to account */ |
| 100 | char * p_name; /* name of procedure */ | 98 | const char * p_name; /* name of procedure */ |
| 101 | }; | 99 | }; |
| 102 | 100 | ||
| 103 | #ifdef __KERNEL__ | 101 | #ifdef __KERNEL__ |
| @@ -109,8 +107,8 @@ struct rpc_create_args { | |||
| 109 | size_t addrsize; | 107 | size_t addrsize; |
| 110 | struct sockaddr *saddress; | 108 | struct sockaddr *saddress; |
| 111 | const struct rpc_timeout *timeout; | 109 | const struct rpc_timeout *timeout; |
| 112 | char *servername; | 110 | const char *servername; |
| 113 | struct rpc_program *program; | 111 | const struct rpc_program *program; |
| 114 | u32 prognumber; /* overrides program->number */ | 112 | u32 prognumber; /* overrides program->number */ |
| 115 | u32 version; | 113 | u32 version; |
| 116 | rpc_authflavor_t authflavor; | 114 | rpc_authflavor_t authflavor; |
| @@ -129,17 +127,18 @@ struct rpc_create_args { | |||
| 129 | 127 | ||
| 130 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); | 128 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); |
| 131 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, | 129 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, |
| 132 | struct rpc_program *, u32); | 130 | const struct rpc_program *, u32); |
| 133 | void rpc_task_reset_client(struct rpc_task *task, struct rpc_clnt *clnt); | 131 | void rpc_task_reset_client(struct rpc_task *task, struct rpc_clnt *clnt); |
| 134 | struct rpc_clnt *rpc_clone_client(struct rpc_clnt *); | 132 | struct rpc_clnt *rpc_clone_client(struct rpc_clnt *); |
| 135 | void rpc_shutdown_client(struct rpc_clnt *); | 133 | void rpc_shutdown_client(struct rpc_clnt *); |
| 136 | void rpc_release_client(struct rpc_clnt *); | 134 | void rpc_release_client(struct rpc_clnt *); |
| 137 | void rpc_task_release_client(struct rpc_task *); | 135 | void rpc_task_release_client(struct rpc_task *); |
| 138 | 136 | ||
| 139 | int rpcb_create_local(void); | 137 | int rpcb_create_local(struct net *); |
| 140 | void rpcb_put_local(void); | 138 | void rpcb_put_local(struct net *); |
| 141 | int rpcb_register(u32, u32, int, unsigned short); | 139 | int rpcb_register(struct net *, u32, u32, int, unsigned short); |
| 142 | int rpcb_v4_register(const u32 program, const u32 version, | 140 | int rpcb_v4_register(struct net *net, const u32 program, |
| 141 | const u32 version, | ||
| 143 | const struct sockaddr *address, | 142 | const struct sockaddr *address, |
| 144 | const char *netid); | 143 | const char *netid); |
| 145 | void rpcb_getport_async(struct rpc_task *); | 144 | void rpcb_getport_async(struct rpc_task *); |
| @@ -156,16 +155,19 @@ struct rpc_task *rpc_call_null(struct rpc_clnt *clnt, struct rpc_cred *cred, | |||
| 156 | int rpc_restart_call_prepare(struct rpc_task *); | 155 | int rpc_restart_call_prepare(struct rpc_task *); |
| 157 | int rpc_restart_call(struct rpc_task *); | 156 | int rpc_restart_call(struct rpc_task *); |
| 158 | void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int); | 157 | void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int); |
| 158 | int rpc_protocol(struct rpc_clnt *); | ||
| 159 | struct net * rpc_net_ns(struct rpc_clnt *); | ||
| 159 | size_t rpc_max_payload(struct rpc_clnt *); | 160 | size_t rpc_max_payload(struct rpc_clnt *); |
| 160 | void rpc_force_rebind(struct rpc_clnt *); | 161 | void rpc_force_rebind(struct rpc_clnt *); |
| 161 | size_t rpc_peeraddr(struct rpc_clnt *, struct sockaddr *, size_t); | 162 | size_t rpc_peeraddr(struct rpc_clnt *, struct sockaddr *, size_t); |
| 162 | const char *rpc_peeraddr2str(struct rpc_clnt *, enum rpc_display_format_t); | 163 | const char *rpc_peeraddr2str(struct rpc_clnt *, enum rpc_display_format_t); |
| 164 | int rpc_localaddr(struct rpc_clnt *, struct sockaddr *, size_t); | ||
| 163 | 165 | ||
| 164 | size_t rpc_ntop(const struct sockaddr *, char *, const size_t); | 166 | size_t rpc_ntop(const struct sockaddr *, char *, const size_t); |
| 165 | size_t rpc_pton(const char *, const size_t, | 167 | size_t rpc_pton(struct net *, const char *, const size_t, |
| 166 | struct sockaddr *, const size_t); | 168 | struct sockaddr *, const size_t); |
| 167 | char * rpc_sockaddr2uaddr(const struct sockaddr *, gfp_t); | 169 | char * rpc_sockaddr2uaddr(const struct sockaddr *, gfp_t); |
| 168 | size_t rpc_uaddr2sockaddr(const char *, const size_t, | 170 | size_t rpc_uaddr2sockaddr(struct net *, const char *, const size_t, |
| 169 | struct sockaddr *, const size_t); | 171 | struct sockaddr *, const size_t); |
| 170 | 172 | ||
| 171 | static inline unsigned short rpc_get_port(const struct sockaddr *sap) | 173 | static inline unsigned short rpc_get_port(const struct sockaddr *sap) |
diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h index c2786f20016f..a76cc20d98ce 100644 --- a/include/linux/sunrpc/debug.h +++ b/include/linux/sunrpc/debug.h | |||
| @@ -31,9 +31,12 @@ | |||
| 31 | /* | 31 | /* |
| 32 | * Enable RPC debugging/profiling. | 32 | * Enable RPC debugging/profiling. |
| 33 | */ | 33 | */ |
| 34 | #ifdef CONFIG_SYSCTL | 34 | #ifdef CONFIG_SUNRPC_DEBUG |
| 35 | #define RPC_DEBUG | 35 | #define RPC_DEBUG |
| 36 | #endif | 36 | #endif |
| 37 | #ifdef CONFIG_TRACEPOINTS | ||
| 38 | #define RPC_TRACEPOINTS | ||
| 39 | #endif | ||
| 37 | /* #define RPC_PROFILE */ | 40 | /* #define RPC_PROFILE */ |
| 38 | 41 | ||
| 39 | /* | 42 | /* |
| @@ -47,15 +50,32 @@ extern unsigned int nlm_debug; | |||
| 47 | #endif | 50 | #endif |
| 48 | 51 | ||
| 49 | #define dprintk(args...) dfprintk(FACILITY, ## args) | 52 | #define dprintk(args...) dfprintk(FACILITY, ## args) |
| 53 | #define dprintk_rcu(args...) dfprintk_rcu(FACILITY, ## args) | ||
| 50 | 54 | ||
| 51 | #undef ifdebug | 55 | #undef ifdebug |
| 52 | #ifdef RPC_DEBUG | 56 | #ifdef RPC_DEBUG |
| 53 | # define ifdebug(fac) if (unlikely(rpc_debug & RPCDBG_##fac)) | 57 | # define ifdebug(fac) if (unlikely(rpc_debug & RPCDBG_##fac)) |
| 54 | # define dfprintk(fac, args...) do { ifdebug(fac) printk(args); } while(0) | 58 | |
| 59 | # define dfprintk(fac, args...) \ | ||
| 60 | do { \ | ||
| 61 | ifdebug(fac) \ | ||
| 62 | printk(KERN_DEFAULT args); \ | ||
| 63 | } while (0) | ||
| 64 | |||
| 65 | # define dfprintk_rcu(fac, args...) \ | ||
| 66 | do { \ | ||
| 67 | ifdebug(fac) { \ | ||
| 68 | rcu_read_lock(); \ | ||
| 69 | printk(KERN_DEFAULT args); \ | ||
| 70 | rcu_read_unlock(); \ | ||
| 71 | } \ | ||
| 72 | } while (0) | ||
| 73 | |||
| 55 | # define RPC_IFDEBUG(x) x | 74 | # define RPC_IFDEBUG(x) x |
| 56 | #else | 75 | #else |
| 57 | # define ifdebug(fac) if (0) | 76 | # define ifdebug(fac) if (0) |
| 58 | # define dfprintk(fac, args...) do ; while (0) | 77 | # define dfprintk(fac, args...) do {} while (0) |
| 78 | # define dfprintk_rcu(fac, args...) do {} while (0) | ||
| 59 | # define RPC_IFDEBUG(x) | 79 | # define RPC_IFDEBUG(x) |
| 60 | #endif | 80 | #endif |
| 61 | 81 | ||
diff --git a/include/linux/sunrpc/metrics.h b/include/linux/sunrpc/metrics.h index b6edbc0ea83d..1565bbe86d51 100644 --- a/include/linux/sunrpc/metrics.h +++ b/include/linux/sunrpc/metrics.h | |||
| @@ -74,14 +74,16 @@ struct rpc_clnt; | |||
| 74 | #ifdef CONFIG_PROC_FS | 74 | #ifdef CONFIG_PROC_FS |
| 75 | 75 | ||
| 76 | struct rpc_iostats * rpc_alloc_iostats(struct rpc_clnt *); | 76 | struct rpc_iostats * rpc_alloc_iostats(struct rpc_clnt *); |
| 77 | void rpc_count_iostats(struct rpc_task *); | 77 | void rpc_count_iostats(const struct rpc_task *, |
| 78 | struct rpc_iostats *); | ||
| 78 | void rpc_print_iostats(struct seq_file *, struct rpc_clnt *); | 79 | void rpc_print_iostats(struct seq_file *, struct rpc_clnt *); |
| 79 | void rpc_free_iostats(struct rpc_iostats *); | 80 | void rpc_free_iostats(struct rpc_iostats *); |
| 80 | 81 | ||
| 81 | #else /* CONFIG_PROC_FS */ | 82 | #else /* CONFIG_PROC_FS */ |
| 82 | 83 | ||
| 83 | static inline struct rpc_iostats *rpc_alloc_iostats(struct rpc_clnt *clnt) { return NULL; } | 84 | static inline struct rpc_iostats *rpc_alloc_iostats(struct rpc_clnt *clnt) { return NULL; } |
| 84 | static inline void rpc_count_iostats(struct rpc_task *task) {} | 85 | static inline void rpc_count_iostats(const struct rpc_task *task, |
| 86 | struct rpc_iostats *stats) {} | ||
| 85 | static inline void rpc_print_iostats(struct seq_file *seq, struct rpc_clnt *clnt) {} | 87 | static inline void rpc_print_iostats(struct seq_file *seq, struct rpc_clnt *clnt) {} |
| 86 | static inline void rpc_free_iostats(struct rpc_iostats *stats) {} | 88 | static inline void rpc_free_iostats(struct rpc_iostats *stats) {} |
| 87 | 89 | ||
diff --git a/include/linux/sunrpc/rpc_pipe_fs.h b/include/linux/sunrpc/rpc_pipe_fs.h index 2bb03d77375a..a7b422b33eda 100644 --- a/include/linux/sunrpc/rpc_pipe_fs.h +++ b/include/linux/sunrpc/rpc_pipe_fs.h | |||
| @@ -21,21 +21,26 @@ struct rpc_pipe_ops { | |||
| 21 | void (*destroy_msg)(struct rpc_pipe_msg *); | 21 | void (*destroy_msg)(struct rpc_pipe_msg *); |
| 22 | }; | 22 | }; |
| 23 | 23 | ||
| 24 | struct rpc_inode { | 24 | struct rpc_pipe { |
| 25 | struct inode vfs_inode; | ||
| 26 | void *private; | ||
| 27 | struct list_head pipe; | 25 | struct list_head pipe; |
| 28 | struct list_head in_upcall; | 26 | struct list_head in_upcall; |
| 29 | struct list_head in_downcall; | 27 | struct list_head in_downcall; |
| 30 | int pipelen; | 28 | int pipelen; |
| 31 | int nreaders; | 29 | int nreaders; |
| 32 | int nwriters; | 30 | int nwriters; |
| 33 | int nkern_readwriters; | ||
| 34 | wait_queue_head_t waitq; | ||
| 35 | #define RPC_PIPE_WAIT_FOR_OPEN 1 | 31 | #define RPC_PIPE_WAIT_FOR_OPEN 1 |
| 36 | int flags; | 32 | int flags; |
| 37 | struct delayed_work queue_timeout; | 33 | struct delayed_work queue_timeout; |
| 38 | const struct rpc_pipe_ops *ops; | 34 | const struct rpc_pipe_ops *ops; |
| 35 | spinlock_t lock; | ||
| 36 | struct dentry *dentry; | ||
| 37 | }; | ||
| 38 | |||
| 39 | struct rpc_inode { | ||
| 40 | struct inode vfs_inode; | ||
| 41 | void *private; | ||
| 42 | struct rpc_pipe *pipe; | ||
| 43 | wait_queue_head_t waitq; | ||
| 39 | }; | 44 | }; |
| 40 | 45 | ||
| 41 | static inline struct rpc_inode * | 46 | static inline struct rpc_inode * |
| @@ -44,9 +49,28 @@ RPC_I(struct inode *inode) | |||
| 44 | return container_of(inode, struct rpc_inode, vfs_inode); | 49 | return container_of(inode, struct rpc_inode, vfs_inode); |
| 45 | } | 50 | } |
| 46 | 51 | ||
| 52 | enum { | ||
| 53 | SUNRPC_PIPEFS_NFS_PRIO, | ||
| 54 | SUNRPC_PIPEFS_RPC_PRIO, | ||
| 55 | }; | ||
| 56 | |||
| 57 | extern int rpc_pipefs_notifier_register(struct notifier_block *); | ||
| 58 | extern void rpc_pipefs_notifier_unregister(struct notifier_block *); | ||
| 59 | |||
| 60 | enum { | ||
| 61 | RPC_PIPEFS_MOUNT, | ||
| 62 | RPC_PIPEFS_UMOUNT, | ||
| 63 | }; | ||
| 64 | |||
| 65 | extern struct dentry *rpc_d_lookup_sb(const struct super_block *sb, | ||
| 66 | const unsigned char *dir_name); | ||
| 67 | extern void rpc_pipefs_init_net(struct net *net); | ||
| 68 | extern struct super_block *rpc_get_sb_net(const struct net *net); | ||
| 69 | extern void rpc_put_sb_net(const struct net *net); | ||
| 70 | |||
| 47 | extern ssize_t rpc_pipe_generic_upcall(struct file *, struct rpc_pipe_msg *, | 71 | extern ssize_t rpc_pipe_generic_upcall(struct file *, struct rpc_pipe_msg *, |
| 48 | char __user *, size_t); | 72 | char __user *, size_t); |
| 49 | extern int rpc_queue_upcall(struct inode *, struct rpc_pipe_msg *); | 73 | extern int rpc_queue_upcall(struct rpc_pipe *, struct rpc_pipe_msg *); |
| 50 | 74 | ||
| 51 | struct rpc_clnt; | 75 | struct rpc_clnt; |
| 52 | extern struct dentry *rpc_create_client_dir(struct dentry *, struct qstr *, struct rpc_clnt *); | 76 | extern struct dentry *rpc_create_client_dir(struct dentry *, struct qstr *, struct rpc_clnt *); |
| @@ -59,11 +83,13 @@ extern struct dentry *rpc_create_cache_dir(struct dentry *, | |||
| 59 | struct cache_detail *); | 83 | struct cache_detail *); |
| 60 | extern void rpc_remove_cache_dir(struct dentry *); | 84 | extern void rpc_remove_cache_dir(struct dentry *); |
| 61 | 85 | ||
| 62 | extern struct dentry *rpc_mkpipe(struct dentry *, const char *, void *, | 86 | extern int rpc_rmdir(struct dentry *dentry); |
| 63 | const struct rpc_pipe_ops *, int flags); | 87 | |
| 88 | struct rpc_pipe *rpc_mkpipe_data(const struct rpc_pipe_ops *ops, int flags); | ||
| 89 | void rpc_destroy_pipe_data(struct rpc_pipe *pipe); | ||
| 90 | extern struct dentry *rpc_mkpipe_dentry(struct dentry *, const char *, void *, | ||
| 91 | struct rpc_pipe *); | ||
| 64 | extern int rpc_unlink(struct dentry *); | 92 | extern int rpc_unlink(struct dentry *); |
| 65 | extern struct vfsmount *rpc_get_mount(void); | ||
| 66 | extern void rpc_put_mount(void); | ||
| 67 | extern int register_rpc_pipefs(void); | 93 | extern int register_rpc_pipefs(void); |
| 68 | extern void unregister_rpc_pipefs(void); | 94 | extern void unregister_rpc_pipefs(void); |
| 69 | 95 | ||
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index e7756896f3ca..dc0c3cc3ada3 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
| @@ -103,6 +103,7 @@ typedef void (*rpc_action)(struct rpc_task *); | |||
| 103 | struct rpc_call_ops { | 103 | struct rpc_call_ops { |
| 104 | void (*rpc_call_prepare)(struct rpc_task *, void *); | 104 | void (*rpc_call_prepare)(struct rpc_task *, void *); |
| 105 | void (*rpc_call_done)(struct rpc_task *, void *); | 105 | void (*rpc_call_done)(struct rpc_task *, void *); |
| 106 | void (*rpc_count_stats)(struct rpc_task *, void *); | ||
| 106 | void (*rpc_release)(void *); | 107 | void (*rpc_release)(void *); |
| 107 | }; | 108 | }; |
| 108 | 109 | ||
| @@ -195,7 +196,7 @@ struct rpc_wait_queue { | |||
| 195 | unsigned char nr; /* # tasks remaining for cookie */ | 196 | unsigned char nr; /* # tasks remaining for cookie */ |
| 196 | unsigned short qlen; /* total # tasks waiting in queue */ | 197 | unsigned short qlen; /* total # tasks waiting in queue */ |
| 197 | struct rpc_timer timer_list; | 198 | struct rpc_timer timer_list; |
| 198 | #ifdef RPC_DEBUG | 199 | #if defined(RPC_DEBUG) || defined(RPC_TRACEPOINTS) |
| 199 | const char * name; | 200 | const char * name; |
| 200 | #endif | 201 | #endif |
| 201 | }; | 202 | }; |
| @@ -235,6 +236,9 @@ void rpc_wake_up_queued_task(struct rpc_wait_queue *, | |||
| 235 | struct rpc_task *); | 236 | struct rpc_task *); |
| 236 | void rpc_wake_up(struct rpc_wait_queue *); | 237 | void rpc_wake_up(struct rpc_wait_queue *); |
| 237 | struct rpc_task *rpc_wake_up_next(struct rpc_wait_queue *); | 238 | struct rpc_task *rpc_wake_up_next(struct rpc_wait_queue *); |
| 239 | struct rpc_task *rpc_wake_up_first(struct rpc_wait_queue *, | ||
| 240 | bool (*)(struct rpc_task *, void *), | ||
| 241 | void *); | ||
| 238 | void rpc_wake_up_status(struct rpc_wait_queue *, int); | 242 | void rpc_wake_up_status(struct rpc_wait_queue *, int); |
| 239 | int rpc_queue_empty(struct rpc_wait_queue *); | 243 | int rpc_queue_empty(struct rpc_wait_queue *); |
| 240 | void rpc_delay(struct rpc_task *, unsigned long); | 244 | void rpc_delay(struct rpc_task *, unsigned long); |
| @@ -244,7 +248,8 @@ int rpciod_up(void); | |||
| 244 | void rpciod_down(void); | 248 | void rpciod_down(void); |
| 245 | int __rpc_wait_for_completion_task(struct rpc_task *task, int (*)(void *)); | 249 | int __rpc_wait_for_completion_task(struct rpc_task *task, int (*)(void *)); |
| 246 | #ifdef RPC_DEBUG | 250 | #ifdef RPC_DEBUG |
| 247 | void rpc_show_tasks(void); | 251 | struct net; |
| 252 | void rpc_show_tasks(struct net *); | ||
| 248 | #endif | 253 | #endif |
| 249 | int rpc_init_mempool(void); | 254 | int rpc_init_mempool(void); |
| 250 | void rpc_destroy_mempool(void); | 255 | void rpc_destroy_mempool(void); |
| @@ -266,11 +271,22 @@ static inline int rpc_task_has_priority(struct rpc_task *task, unsigned char pri | |||
| 266 | return (task->tk_priority + RPC_PRIORITY_LOW == prio); | 271 | return (task->tk_priority + RPC_PRIORITY_LOW == prio); |
| 267 | } | 272 | } |
| 268 | 273 | ||
| 269 | #ifdef RPC_DEBUG | 274 | #if defined(RPC_DEBUG) || defined (RPC_TRACEPOINTS) |
| 270 | static inline const char * rpc_qname(struct rpc_wait_queue *q) | 275 | static inline const char * rpc_qname(const struct rpc_wait_queue *q) |
| 271 | { | 276 | { |
| 272 | return ((q && q->name) ? q->name : "unknown"); | 277 | return ((q && q->name) ? q->name : "unknown"); |
| 273 | } | 278 | } |
| 279 | |||
| 280 | static inline void rpc_assign_waitqueue_name(struct rpc_wait_queue *q, | ||
| 281 | const char *name) | ||
| 282 | { | ||
| 283 | q->name = name; | ||
| 284 | } | ||
| 285 | #else | ||
| 286 | static inline void rpc_assign_waitqueue_name(struct rpc_wait_queue *q, | ||
| 287 | const char *name) | ||
| 288 | { | ||
| 289 | } | ||
| 274 | #endif | 290 | #endif |
| 275 | 291 | ||
| 276 | #endif /* _LINUX_SUNRPC_SCHED_H_ */ | 292 | #endif /* _LINUX_SUNRPC_SCHED_H_ */ |
diff --git a/include/linux/sunrpc/stats.h b/include/linux/sunrpc/stats.h index 680471d1f28a..edc64219f92b 100644 --- a/include/linux/sunrpc/stats.h +++ b/include/linux/sunrpc/stats.h | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | #include <linux/proc_fs.h> | 12 | #include <linux/proc_fs.h> |
| 13 | 13 | ||
| 14 | struct rpc_stat { | 14 | struct rpc_stat { |
| 15 | struct rpc_program * program; | 15 | const struct rpc_program *program; |
| 16 | 16 | ||
| 17 | unsigned int netcnt, | 17 | unsigned int netcnt, |
| 18 | netudpcnt, | 18 | netudpcnt, |
| @@ -58,24 +58,24 @@ void rpc_modcount(struct inode *, int); | |||
| 58 | #endif | 58 | #endif |
| 59 | 59 | ||
| 60 | #ifdef CONFIG_PROC_FS | 60 | #ifdef CONFIG_PROC_FS |
| 61 | struct proc_dir_entry * rpc_proc_register(struct rpc_stat *); | 61 | struct proc_dir_entry * rpc_proc_register(struct net *,struct rpc_stat *); |
| 62 | void rpc_proc_unregister(const char *); | 62 | void rpc_proc_unregister(struct net *,const char *); |
| 63 | void rpc_proc_zero(struct rpc_program *); | 63 | void rpc_proc_zero(const struct rpc_program *); |
| 64 | struct proc_dir_entry * svc_proc_register(struct svc_stat *, | 64 | struct proc_dir_entry * svc_proc_register(struct net *, struct svc_stat *, |
| 65 | const struct file_operations *); | 65 | const struct file_operations *); |
| 66 | void svc_proc_unregister(const char *); | 66 | void svc_proc_unregister(struct net *, const char *); |
| 67 | 67 | ||
| 68 | void svc_seq_show(struct seq_file *, | 68 | void svc_seq_show(struct seq_file *, |
| 69 | const struct svc_stat *); | 69 | const struct svc_stat *); |
| 70 | #else | 70 | #else |
| 71 | 71 | ||
| 72 | static inline struct proc_dir_entry *rpc_proc_register(struct rpc_stat *s) { return NULL; } | 72 | static inline struct proc_dir_entry *rpc_proc_register(struct net *net, struct rpc_stat *s) { return NULL; } |
| 73 | static inline void rpc_proc_unregister(const char *p) {} | 73 | static inline void rpc_proc_unregister(struct net *net, const char *p) {} |
| 74 | static inline void rpc_proc_zero(struct rpc_program *p) {} | 74 | static inline void rpc_proc_zero(const struct rpc_program *p) {} |
| 75 | 75 | ||
| 76 | static inline struct proc_dir_entry *svc_proc_register(struct svc_stat *s, | 76 | static inline struct proc_dir_entry *svc_proc_register(struct net *net, struct svc_stat *s, |
| 77 | const struct file_operations *f) { return NULL; } | 77 | const struct file_operations *f) { return NULL; } |
| 78 | static inline void svc_proc_unregister(const char *p) {} | 78 | static inline void svc_proc_unregister(struct net *net, const char *p) {} |
| 79 | 79 | ||
| 80 | static inline void svc_seq_show(struct seq_file *seq, | 80 | static inline void svc_seq_show(struct seq_file *seq, |
| 81 | const struct svc_stat *st) {} | 81 | const struct svc_stat *st) {} |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 35b37b1e9299..51b29ac45a8e 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
| @@ -84,7 +84,8 @@ struct svc_serv { | |||
| 84 | unsigned int sv_nrpools; /* number of thread pools */ | 84 | unsigned int sv_nrpools; /* number of thread pools */ |
| 85 | struct svc_pool * sv_pools; /* array of thread pools */ | 85 | struct svc_pool * sv_pools; /* array of thread pools */ |
| 86 | 86 | ||
| 87 | void (*sv_shutdown)(struct svc_serv *serv); | 87 | void (*sv_shutdown)(struct svc_serv *serv, |
| 88 | struct net *net); | ||
| 88 | /* Callback to use when last thread | 89 | /* Callback to use when last thread |
| 89 | * exits. | 90 | * exits. |
| 90 | */ | 91 | */ |
| @@ -413,22 +414,24 @@ struct svc_procedure { | |||
| 413 | /* | 414 | /* |
| 414 | * Function prototypes. | 415 | * Function prototypes. |
| 415 | */ | 416 | */ |
| 416 | void svc_rpcb_cleanup(struct svc_serv *serv); | 417 | int svc_rpcb_setup(struct svc_serv *serv, struct net *net); |
| 418 | void svc_rpcb_cleanup(struct svc_serv *serv, struct net *net); | ||
| 417 | struct svc_serv *svc_create(struct svc_program *, unsigned int, | 419 | struct svc_serv *svc_create(struct svc_program *, unsigned int, |
| 418 | void (*shutdown)(struct svc_serv *)); | 420 | void (*shutdown)(struct svc_serv *, struct net *net)); |
| 419 | struct svc_rqst *svc_prepare_thread(struct svc_serv *serv, | 421 | struct svc_rqst *svc_prepare_thread(struct svc_serv *serv, |
| 420 | struct svc_pool *pool, int node); | 422 | struct svc_pool *pool, int node); |
| 421 | void svc_exit_thread(struct svc_rqst *); | 423 | void svc_exit_thread(struct svc_rqst *); |
| 422 | struct svc_serv * svc_create_pooled(struct svc_program *, unsigned int, | 424 | struct svc_serv * svc_create_pooled(struct svc_program *, unsigned int, |
| 423 | void (*shutdown)(struct svc_serv *), | 425 | void (*shutdown)(struct svc_serv *, struct net *net), |
| 424 | svc_thread_fn, struct module *); | 426 | svc_thread_fn, struct module *); |
| 425 | int svc_set_num_threads(struct svc_serv *, struct svc_pool *, int); | 427 | int svc_set_num_threads(struct svc_serv *, struct svc_pool *, int); |
| 426 | int svc_pool_stats_open(struct svc_serv *serv, struct file *file); | 428 | int svc_pool_stats_open(struct svc_serv *serv, struct file *file); |
| 427 | void svc_destroy(struct svc_serv *); | 429 | void svc_destroy(struct svc_serv *); |
| 430 | void svc_shutdown_net(struct svc_serv *, struct net *); | ||
| 428 | int svc_process(struct svc_rqst *); | 431 | int svc_process(struct svc_rqst *); |
| 429 | int bc_svc_process(struct svc_serv *, struct rpc_rqst *, | 432 | int bc_svc_process(struct svc_serv *, struct rpc_rqst *, |
| 430 | struct svc_rqst *); | 433 | struct svc_rqst *); |
| 431 | int svc_register(const struct svc_serv *, const int, | 434 | int svc_register(const struct svc_serv *, struct net *, const int, |
| 432 | const unsigned short, const unsigned short); | 435 | const unsigned short, const unsigned short); |
| 433 | 436 | ||
| 434 | void svc_wake_up(struct svc_serv *); | 437 | void svc_wake_up(struct svc_serv *); |
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h index dfa900948af7..b3f64b12f141 100644 --- a/include/linux/sunrpc/svc_xprt.h +++ b/include/linux/sunrpc/svc_xprt.h | |||
| @@ -121,7 +121,8 @@ void svc_close_xprt(struct svc_xprt *xprt); | |||
| 121 | int svc_port_is_privileged(struct sockaddr *sin); | 121 | int svc_port_is_privileged(struct sockaddr *sin); |
| 122 | int svc_print_xprts(char *buf, int maxlen); | 122 | int svc_print_xprts(char *buf, int maxlen); |
| 123 | struct svc_xprt *svc_find_xprt(struct svc_serv *serv, const char *xcl_name, | 123 | struct svc_xprt *svc_find_xprt(struct svc_serv *serv, const char *xcl_name, |
| 124 | const sa_family_t af, const unsigned short port); | 124 | struct net *net, const sa_family_t af, |
| 125 | const unsigned short port); | ||
| 125 | int svc_xprt_names(struct svc_serv *serv, char *buf, const int buflen); | 126 | int svc_xprt_names(struct svc_serv *serv, char *buf, const int buflen); |
| 126 | 127 | ||
| 127 | static inline void svc_xprt_get(struct svc_xprt *xprt) | 128 | static inline void svc_xprt_get(struct svc_xprt *xprt) |
diff --git a/include/linux/sunrpc/svcauth.h b/include/linux/sunrpc/svcauth.h index 25d333c1b571..548790e9113b 100644 --- a/include/linux/sunrpc/svcauth.h +++ b/include/linux/sunrpc/svcauth.h | |||
| @@ -135,6 +135,9 @@ extern void svcauth_unix_purge(void); | |||
| 135 | extern void svcauth_unix_info_release(struct svc_xprt *xpt); | 135 | extern void svcauth_unix_info_release(struct svc_xprt *xpt); |
| 136 | extern int svcauth_unix_set_client(struct svc_rqst *rqstp); | 136 | extern int svcauth_unix_set_client(struct svc_rqst *rqstp); |
| 137 | 137 | ||
| 138 | extern int unix_gid_cache_create(struct net *net); | ||
| 139 | extern void unix_gid_cache_destroy(struct net *net); | ||
| 140 | |||
| 138 | static inline unsigned long hash_str(char *name, int bits) | 141 | static inline unsigned long hash_str(char *name, int bits) |
| 139 | { | 142 | { |
| 140 | unsigned long hash = 0; | 143 | unsigned long hash = 0; |
diff --git a/include/linux/sunrpc/svcauth_gss.h b/include/linux/sunrpc/svcauth_gss.h index 83bbee3f089c..7c32daa025eb 100644 --- a/include/linux/sunrpc/svcauth_gss.h +++ b/include/linux/sunrpc/svcauth_gss.h | |||
| @@ -18,6 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | int gss_svc_init(void); | 19 | int gss_svc_init(void); |
| 20 | void gss_svc_shutdown(void); | 20 | void gss_svc_shutdown(void); |
| 21 | int gss_svc_init_net(struct net *net); | ||
| 22 | void gss_svc_shutdown_net(struct net *net); | ||
| 21 | int svcauth_gss_register_pseudoflavor(u32 pseudoflavor, char * name); | 23 | int svcauth_gss_register_pseudoflavor(u32 pseudoflavor, char * name); |
| 22 | u32 svcauth_gss_flavor(struct auth_domain *dom); | 24 | u32 svcauth_gss_flavor(struct auth_domain *dom); |
| 23 | char *svc_gss_principal(struct svc_rqst *); | 25 | char *svc_gss_principal(struct svc_rqst *); |
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h index c84e9741cb2a..cb4ac69e1f33 100644 --- a/include/linux/sunrpc/svcsock.h +++ b/include/linux/sunrpc/svcsock.h | |||
| @@ -34,7 +34,7 @@ struct svc_sock { | |||
| 34 | /* | 34 | /* |
| 35 | * Function prototypes. | 35 | * Function prototypes. |
| 36 | */ | 36 | */ |
| 37 | void svc_close_all(struct svc_serv *); | 37 | void svc_close_net(struct svc_serv *, struct net *); |
| 38 | int svc_recv(struct svc_rqst *, long); | 38 | int svc_recv(struct svc_rqst *, long); |
| 39 | int svc_send(struct svc_rqst *); | 39 | int svc_send(struct svc_rqst *); |
| 40 | void svc_drop(struct svc_rqst *); | 40 | void svc_drop(struct svc_rqst *); |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 15518a152ac3..77d278defa70 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
| @@ -21,8 +21,8 @@ | |||
| 21 | 21 | ||
| 22 | #define RPC_MIN_SLOT_TABLE (2U) | 22 | #define RPC_MIN_SLOT_TABLE (2U) |
| 23 | #define RPC_DEF_SLOT_TABLE (16U) | 23 | #define RPC_DEF_SLOT_TABLE (16U) |
| 24 | #define RPC_MAX_SLOT_TABLE (128U) | ||
| 25 | #define RPC_MAX_SLOT_TABLE_LIMIT (65536U) | 24 | #define RPC_MAX_SLOT_TABLE_LIMIT (65536U) |
| 25 | #define RPC_MAX_SLOT_TABLE RPC_MAX_SLOT_TABLE_LIMIT | ||
| 26 | 26 | ||
| 27 | /* | 27 | /* |
| 28 | * This describes a timeout strategy | 28 | * This describes a timeout strategy |
| @@ -219,13 +219,17 @@ struct rpc_xprt { | |||
| 219 | connect_time, /* jiffies waiting for connect */ | 219 | connect_time, /* jiffies waiting for connect */ |
| 220 | sends, /* how many complete requests */ | 220 | sends, /* how many complete requests */ |
| 221 | recvs, /* how many complete requests */ | 221 | recvs, /* how many complete requests */ |
| 222 | bad_xids; /* lookup_rqst didn't find XID */ | 222 | bad_xids, /* lookup_rqst didn't find XID */ |
| 223 | max_slots; /* max rpc_slots used */ | ||
| 223 | 224 | ||
| 224 | unsigned long long req_u, /* average requests on the wire */ | 225 | unsigned long long req_u, /* average requests on the wire */ |
| 225 | bklog_u; /* backlog queue utilization */ | 226 | bklog_u, /* backlog queue utilization */ |
| 227 | sending_u, /* send q utilization */ | ||
| 228 | pending_u; /* pend q utilization */ | ||
| 226 | } stat; | 229 | } stat; |
| 227 | 230 | ||
| 228 | struct net *xprt_net; | 231 | struct net *xprt_net; |
| 232 | const char *servername; | ||
| 229 | const char *address_strings[RPC_DISPLAY_MAX]; | 233 | const char *address_strings[RPC_DISPLAY_MAX]; |
| 230 | }; | 234 | }; |
| 231 | 235 | ||
| @@ -255,6 +259,7 @@ struct xprt_create { | |||
| 255 | struct sockaddr * srcaddr; /* optional local address */ | 259 | struct sockaddr * srcaddr; /* optional local address */ |
| 256 | struct sockaddr * dstaddr; /* remote peer address */ | 260 | struct sockaddr * dstaddr; /* remote peer address */ |
| 257 | size_t addrlen; | 261 | size_t addrlen; |
| 262 | const char *servername; | ||
| 258 | struct svc_xprt *bc_xprt; /* NFSv4.1 backchannel */ | 263 | struct svc_xprt *bc_xprt; /* NFSv4.1 backchannel */ |
| 259 | }; | 264 | }; |
| 260 | 265 | ||
diff --git a/include/linux/sunrpc/xprtsock.h b/include/linux/sunrpc/xprtsock.h index 3f14a02e9cc0..1ad36cc25b2e 100644 --- a/include/linux/sunrpc/xprtsock.h +++ b/include/linux/sunrpc/xprtsock.h | |||
| @@ -12,18 +12,6 @@ | |||
| 12 | int init_socket_xprt(void); | 12 | int init_socket_xprt(void); |
| 13 | void cleanup_socket_xprt(void); | 13 | void cleanup_socket_xprt(void); |
| 14 | 14 | ||
| 15 | /* | ||
| 16 | * RPC slot table sizes for UDP, TCP transports | ||
| 17 | */ | ||
| 18 | extern unsigned int xprt_udp_slot_table_entries; | ||
| 19 | extern unsigned int xprt_tcp_slot_table_entries; | ||
| 20 | |||
| 21 | /* | ||
| 22 | * Parameters for choosing a free port | ||
| 23 | */ | ||
| 24 | extern unsigned int xprt_min_resvport; | ||
| 25 | extern unsigned int xprt_max_resvport; | ||
| 26 | |||
| 27 | #define RPC_MIN_RESVPORT (1U) | 15 | #define RPC_MIN_RESVPORT (1U) |
| 28 | #define RPC_MAX_RESVPORT (65535U) | 16 | #define RPC_MAX_RESVPORT (65535U) |
| 29 | #define RPC_DEF_MIN_RESVPORT (665U) | 17 | #define RPC_DEF_MIN_RESVPORT (665U) |
diff --git a/include/linux/swapops.h b/include/linux/swapops.h index 2189d3ffc85d..792d16d9cbc7 100644 --- a/include/linux/swapops.h +++ b/include/linux/swapops.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define _LINUX_SWAPOPS_H | 2 | #define _LINUX_SWAPOPS_H |
| 3 | 3 | ||
| 4 | #include <linux/radix-tree.h> | 4 | #include <linux/radix-tree.h> |
| 5 | #include <linux/bug.h> | ||
| 5 | 6 | ||
| 6 | /* | 7 | /* |
| 7 | * swapcache pages are stored in the swapper_space radix tree. We want to | 8 | * swapcache pages are stored in the swapper_space radix tree. We want to |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 8ec1153ff57b..3de3acb84a95 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -68,6 +68,7 @@ struct file_handle; | |||
| 68 | #include <linux/aio_abi.h> | 68 | #include <linux/aio_abi.h> |
| 69 | #include <linux/capability.h> | 69 | #include <linux/capability.h> |
| 70 | #include <linux/list.h> | 70 | #include <linux/list.h> |
| 71 | #include <linux/bug.h> | ||
| 71 | #include <linux/sem.h> | 72 | #include <linux/sem.h> |
| 72 | #include <asm/siginfo.h> | 73 | #include <asm/siginfo.h> |
| 73 | #include <asm/signal.h> | 74 | #include <asm/signal.h> |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index bb9127dd814b..c34b4c82b0dc 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
| @@ -932,34 +932,14 @@ enum | |||
| 932 | #include <linux/list.h> | 932 | #include <linux/list.h> |
| 933 | #include <linux/rcupdate.h> | 933 | #include <linux/rcupdate.h> |
| 934 | #include <linux/wait.h> | 934 | #include <linux/wait.h> |
| 935 | #include <linux/rbtree.h> | ||
| 935 | 936 | ||
| 936 | /* For the /proc/sys support */ | 937 | /* For the /proc/sys support */ |
| 937 | struct ctl_table; | 938 | struct ctl_table; |
| 938 | struct nsproxy; | 939 | struct nsproxy; |
| 939 | struct ctl_table_root; | 940 | struct ctl_table_root; |
| 940 | |||
| 941 | struct ctl_table_set { | ||
| 942 | struct list_head list; | ||
| 943 | struct ctl_table_set *parent; | ||
| 944 | int (*is_seen)(struct ctl_table_set *); | ||
| 945 | }; | ||
| 946 | |||
| 947 | extern void setup_sysctl_set(struct ctl_table_set *p, | ||
| 948 | struct ctl_table_set *parent, | ||
| 949 | int (*is_seen)(struct ctl_table_set *)); | ||
| 950 | |||
| 951 | struct ctl_table_header; | 941 | struct ctl_table_header; |
| 952 | 942 | struct ctl_dir; | |
| 953 | extern void sysctl_head_get(struct ctl_table_header *); | ||
| 954 | extern void sysctl_head_put(struct ctl_table_header *); | ||
| 955 | extern int sysctl_is_seen(struct ctl_table_header *); | ||
| 956 | extern struct ctl_table_header *sysctl_head_grab(struct ctl_table_header *); | ||
| 957 | extern struct ctl_table_header *sysctl_head_next(struct ctl_table_header *prev); | ||
| 958 | extern struct ctl_table_header *__sysctl_head_next(struct nsproxy *namespaces, | ||
| 959 | struct ctl_table_header *prev); | ||
| 960 | extern void sysctl_head_finish(struct ctl_table_header *prev); | ||
| 961 | extern int sysctl_perm(struct ctl_table_root *root, | ||
| 962 | struct ctl_table *table, int op); | ||
| 963 | 943 | ||
| 964 | typedef struct ctl_table ctl_table; | 944 | typedef struct ctl_table ctl_table; |
| 965 | 945 | ||
| @@ -1023,8 +1003,6 @@ static inline void *proc_sys_poll_event(struct ctl_table_poll *poll) | |||
| 1023 | return (void *)(unsigned long)atomic_read(&poll->event); | 1003 | return (void *)(unsigned long)atomic_read(&poll->event); |
| 1024 | } | 1004 | } |
| 1025 | 1005 | ||
| 1026 | void proc_sys_poll_notify(struct ctl_table_poll *poll); | ||
| 1027 | |||
| 1028 | #define __CTL_TABLE_POLL_INITIALIZER(name) { \ | 1006 | #define __CTL_TABLE_POLL_INITIALIZER(name) { \ |
| 1029 | .event = ATOMIC_INIT(0), \ | 1007 | .event = ATOMIC_INIT(0), \ |
| 1030 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER(name.wait) } | 1008 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER(name.wait) } |
| @@ -1039,21 +1017,16 @@ struct ctl_table | |||
| 1039 | void *data; | 1017 | void *data; |
| 1040 | int maxlen; | 1018 | int maxlen; |
| 1041 | umode_t mode; | 1019 | umode_t mode; |
| 1042 | struct ctl_table *child; | 1020 | struct ctl_table *child; /* Deprecated */ |
| 1043 | struct ctl_table *parent; /* Automatically set */ | ||
| 1044 | proc_handler *proc_handler; /* Callback for text formatting */ | 1021 | proc_handler *proc_handler; /* Callback for text formatting */ |
| 1045 | struct ctl_table_poll *poll; | 1022 | struct ctl_table_poll *poll; |
| 1046 | void *extra1; | 1023 | void *extra1; |
| 1047 | void *extra2; | 1024 | void *extra2; |
| 1048 | }; | 1025 | }; |
| 1049 | 1026 | ||
| 1050 | struct ctl_table_root { | 1027 | struct ctl_node { |
| 1051 | struct list_head root_list; | 1028 | struct rb_node node; |
| 1052 | struct ctl_table_set default_set; | 1029 | struct ctl_table_header *header; |
| 1053 | struct ctl_table_set *(*lookup)(struct ctl_table_root *root, | ||
| 1054 | struct nsproxy *namespaces); | ||
| 1055 | int (*permissions)(struct ctl_table_root *root, | ||
| 1056 | struct nsproxy *namespaces, struct ctl_table *table); | ||
| 1057 | }; | 1030 | }; |
| 1058 | 1031 | ||
| 1059 | /* struct ctl_table_header is used to maintain dynamic lists of | 1032 | /* struct ctl_table_header is used to maintain dynamic lists of |
| @@ -1063,9 +1036,9 @@ struct ctl_table_header | |||
| 1063 | union { | 1036 | union { |
| 1064 | struct { | 1037 | struct { |
| 1065 | struct ctl_table *ctl_table; | 1038 | struct ctl_table *ctl_table; |
| 1066 | struct list_head ctl_entry; | ||
| 1067 | int used; | 1039 | int used; |
| 1068 | int count; | 1040 | int count; |
| 1041 | int nreg; | ||
| 1069 | }; | 1042 | }; |
| 1070 | struct rcu_head rcu; | 1043 | struct rcu_head rcu; |
| 1071 | }; | 1044 | }; |
| @@ -1073,9 +1046,27 @@ struct ctl_table_header | |||
| 1073 | struct ctl_table *ctl_table_arg; | 1046 | struct ctl_table *ctl_table_arg; |
| 1074 | struct ctl_table_root *root; | 1047 | struct ctl_table_root *root; |
| 1075 | struct ctl_table_set *set; | 1048 | struct ctl_table_set *set; |
| 1076 | struct ctl_table *attached_by; | 1049 | struct ctl_dir *parent; |
| 1077 | struct ctl_table *attached_to; | 1050 | struct ctl_node *node; |
| 1078 | struct ctl_table_header *parent; | 1051 | }; |
| 1052 | |||
| 1053 | struct ctl_dir { | ||
| 1054 | /* Header must be at the start of ctl_dir */ | ||
| 1055 | struct ctl_table_header header; | ||
| 1056 | struct rb_root root; | ||
| 1057 | }; | ||
| 1058 | |||
| 1059 | struct ctl_table_set { | ||
| 1060 | int (*is_seen)(struct ctl_table_set *); | ||
| 1061 | struct ctl_dir dir; | ||
| 1062 | }; | ||
| 1063 | |||
| 1064 | struct ctl_table_root { | ||
| 1065 | struct ctl_table_set default_set; | ||
| 1066 | struct ctl_table_set *(*lookup)(struct ctl_table_root *root, | ||
| 1067 | struct nsproxy *namespaces); | ||
| 1068 | int (*permissions)(struct ctl_table_root *root, | ||
| 1069 | struct nsproxy *namespaces, struct ctl_table *table); | ||
| 1079 | }; | 1070 | }; |
| 1080 | 1071 | ||
| 1081 | /* struct ctl_path describes where in the hierarchy a table is added */ | 1072 | /* struct ctl_path describes where in the hierarchy a table is added */ |
| @@ -1083,16 +1074,53 @@ struct ctl_path { | |||
| 1083 | const char *procname; | 1074 | const char *procname; |
| 1084 | }; | 1075 | }; |
| 1085 | 1076 | ||
| 1077 | #ifdef CONFIG_SYSCTL | ||
| 1078 | |||
| 1079 | void proc_sys_poll_notify(struct ctl_table_poll *poll); | ||
| 1080 | |||
| 1081 | extern void setup_sysctl_set(struct ctl_table_set *p, | ||
| 1082 | struct ctl_table_root *root, | ||
| 1083 | int (*is_seen)(struct ctl_table_set *)); | ||
| 1084 | extern void retire_sysctl_set(struct ctl_table_set *set); | ||
| 1085 | |||
| 1086 | void register_sysctl_root(struct ctl_table_root *root); | 1086 | void register_sysctl_root(struct ctl_table_root *root); |
| 1087 | struct ctl_table_header *__register_sysctl_table( | ||
| 1088 | struct ctl_table_set *set, | ||
| 1089 | const char *path, struct ctl_table *table); | ||
| 1087 | struct ctl_table_header *__register_sysctl_paths( | 1090 | struct ctl_table_header *__register_sysctl_paths( |
| 1088 | struct ctl_table_root *root, struct nsproxy *namespaces, | 1091 | struct ctl_table_set *set, |
| 1089 | const struct ctl_path *path, struct ctl_table *table); | 1092 | const struct ctl_path *path, struct ctl_table *table); |
| 1093 | struct ctl_table_header *register_sysctl(const char *path, struct ctl_table *table); | ||
| 1090 | struct ctl_table_header *register_sysctl_table(struct ctl_table * table); | 1094 | struct ctl_table_header *register_sysctl_table(struct ctl_table * table); |
| 1091 | struct ctl_table_header *register_sysctl_paths(const struct ctl_path *path, | 1095 | struct ctl_table_header *register_sysctl_paths(const struct ctl_path *path, |
| 1092 | struct ctl_table *table); | 1096 | struct ctl_table *table); |
| 1093 | 1097 | ||
| 1094 | void unregister_sysctl_table(struct ctl_table_header * table); | 1098 | void unregister_sysctl_table(struct ctl_table_header * table); |
| 1095 | int sysctl_check_table(struct nsproxy *namespaces, struct ctl_table *table); | 1099 | |
| 1100 | extern int sysctl_init(void); | ||
| 1101 | #else /* CONFIG_SYSCTL */ | ||
| 1102 | static inline struct ctl_table_header *register_sysctl_table(struct ctl_table * table) | ||
| 1103 | { | ||
| 1104 | return NULL; | ||
| 1105 | } | ||
| 1106 | |||
| 1107 | static inline struct ctl_table_header *register_sysctl_paths( | ||
| 1108 | const struct ctl_path *path, struct ctl_table *table) | ||
| 1109 | { | ||
| 1110 | return NULL; | ||
| 1111 | } | ||
| 1112 | |||
| 1113 | static inline void unregister_sysctl_table(struct ctl_table_header * table) | ||
| 1114 | { | ||
| 1115 | } | ||
| 1116 | |||
| 1117 | static inline void setup_sysctl_set(struct ctl_table_set *p, | ||
| 1118 | struct ctl_table_root *root, | ||
| 1119 | int (*is_seen)(struct ctl_table_set *)) | ||
| 1120 | { | ||
| 1121 | } | ||
| 1122 | |||
| 1123 | #endif /* CONFIG_SYSCTL */ | ||
| 1096 | 1124 | ||
| 1097 | #endif /* __KERNEL__ */ | 1125 | #endif /* __KERNEL__ */ |
| 1098 | 1126 | ||
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h index a71a2927a6a0..51bd91d911c3 100644 --- a/include/linux/tracehook.h +++ b/include/linux/tracehook.h | |||
| @@ -54,12 +54,12 @@ struct linux_binprm; | |||
| 54 | /* | 54 | /* |
| 55 | * ptrace report for syscall entry and exit looks identical. | 55 | * ptrace report for syscall entry and exit looks identical. |
| 56 | */ | 56 | */ |
| 57 | static inline void ptrace_report_syscall(struct pt_regs *regs) | 57 | static inline int ptrace_report_syscall(struct pt_regs *regs) |
| 58 | { | 58 | { |
| 59 | int ptrace = current->ptrace; | 59 | int ptrace = current->ptrace; |
| 60 | 60 | ||
| 61 | if (!(ptrace & PT_PTRACED)) | 61 | if (!(ptrace & PT_PTRACED)) |
| 62 | return; | 62 | return 0; |
| 63 | 63 | ||
| 64 | ptrace_notify(SIGTRAP | ((ptrace & PT_TRACESYSGOOD) ? 0x80 : 0)); | 64 | ptrace_notify(SIGTRAP | ((ptrace & PT_TRACESYSGOOD) ? 0x80 : 0)); |
| 65 | 65 | ||
| @@ -72,6 +72,8 @@ static inline void ptrace_report_syscall(struct pt_regs *regs) | |||
| 72 | send_sig(current->exit_code, current, 1); | 72 | send_sig(current->exit_code, current, 1); |
| 73 | current->exit_code = 0; | 73 | current->exit_code = 0; |
| 74 | } | 74 | } |
| 75 | |||
| 76 | return fatal_signal_pending(current); | ||
| 75 | } | 77 | } |
| 76 | 78 | ||
| 77 | /** | 79 | /** |
| @@ -96,8 +98,7 @@ static inline void ptrace_report_syscall(struct pt_regs *regs) | |||
| 96 | static inline __must_check int tracehook_report_syscall_entry( | 98 | static inline __must_check int tracehook_report_syscall_entry( |
| 97 | struct pt_regs *regs) | 99 | struct pt_regs *regs) |
| 98 | { | 100 | { |
| 99 | ptrace_report_syscall(regs); | 101 | return ptrace_report_syscall(regs); |
| 100 | return 0; | ||
| 101 | } | 102 | } |
| 102 | 103 | ||
| 103 | /** | 104 | /** |
diff --git a/include/linux/transport_class.h b/include/linux/transport_class.h index 9ae8da3e6407..11087cdd4ad3 100644 --- a/include/linux/transport_class.h +++ b/include/linux/transport_class.h | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #define _TRANSPORT_CLASS_H_ | 10 | #define _TRANSPORT_CLASS_H_ |
| 11 | 11 | ||
| 12 | #include <linux/device.h> | 12 | #include <linux/device.h> |
| 13 | #include <linux/bug.h> | ||
| 13 | #include <linux/attribute_container.h> | 14 | #include <linux/attribute_container.h> |
| 14 | 15 | ||
| 15 | struct transport_container; | 16 | struct transport_container; |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 5e11f8a1f867..c9c9a4680cc5 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
| @@ -235,16 +235,25 @@ struct v4l2_fract { | |||
| 235 | __u32 denominator; | 235 | __u32 denominator; |
| 236 | }; | 236 | }; |
| 237 | 237 | ||
| 238 | /* | 238 | /** |
| 239 | * D R I V E R C A P A B I L I T I E S | 239 | * struct v4l2_capability - Describes V4L2 device caps returned by VIDIOC_QUERYCAP |
| 240 | */ | 240 | * |
| 241 | * @driver: name of the driver module (e.g. "bttv") | ||
| 242 | * @card: name of the card (e.g. "Hauppauge WinTV") | ||
| 243 | * @bus_info: name of the bus (e.g. "PCI:" + pci_name(pci_dev) ) | ||
| 244 | * @version: KERNEL_VERSION | ||
| 245 | * @capabilities: capabilities of the physical device as a whole | ||
| 246 | * @device_caps: capabilities accessed via this particular device (node) | ||
| 247 | * @reserved: reserved fields for future extensions | ||
| 248 | */ | ||
| 241 | struct v4l2_capability { | 249 | struct v4l2_capability { |
| 242 | __u8 driver[16]; /* i.e. "bttv" */ | 250 | __u8 driver[16]; |
| 243 | __u8 card[32]; /* i.e. "Hauppauge WinTV" */ | 251 | __u8 card[32]; |
| 244 | __u8 bus_info[32]; /* "PCI:" + pci_name(pci_dev) */ | 252 | __u8 bus_info[32]; |
| 245 | __u32 version; /* should use KERNEL_VERSION() */ | 253 | __u32 version; |
| 246 | __u32 capabilities; /* Device capabilities */ | 254 | __u32 capabilities; |
| 247 | __u32 reserved[4]; | 255 | __u32 device_caps; |
| 256 | __u32 reserved[3]; | ||
| 248 | }; | 257 | }; |
| 249 | 258 | ||
| 250 | /* Values for 'capabilities' field */ | 259 | /* Values for 'capabilities' field */ |
| @@ -274,6 +283,8 @@ struct v4l2_capability { | |||
| 274 | #define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */ | 283 | #define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */ |
| 275 | #define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */ | 284 | #define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */ |
| 276 | 285 | ||
| 286 | #define V4L2_CAP_DEVICE_CAPS 0x80000000 /* sets device capabilities field */ | ||
| 287 | |||
| 277 | /* | 288 | /* |
| 278 | * V I D E O I M A G E F O R M A T | 289 | * V I D E O I M A G E F O R M A T |
| 279 | */ | 290 | */ |
| @@ -751,20 +762,20 @@ struct v4l2_crop { | |||
| 751 | 762 | ||
| 752 | /* Selection targets */ | 763 | /* Selection targets */ |
| 753 | 764 | ||
| 754 | /* current cropping area */ | 765 | /* Current cropping area */ |
| 755 | #define V4L2_SEL_TGT_CROP_ACTIVE 0 | 766 | #define V4L2_SEL_TGT_CROP_ACTIVE 0x0000 |
| 756 | /* default cropping area */ | 767 | /* Default cropping area */ |
| 757 | #define V4L2_SEL_TGT_CROP_DEFAULT 1 | 768 | #define V4L2_SEL_TGT_CROP_DEFAULT 0x0001 |
| 758 | /* cropping bounds */ | 769 | /* Cropping bounds */ |
| 759 | #define V4L2_SEL_TGT_CROP_BOUNDS 2 | 770 | #define V4L2_SEL_TGT_CROP_BOUNDS 0x0002 |
| 760 | /* current composing area */ | 771 | /* Current composing area */ |
| 761 | #define V4L2_SEL_TGT_COMPOSE_ACTIVE 256 | 772 | #define V4L2_SEL_TGT_COMPOSE_ACTIVE 0x0100 |
| 762 | /* default composing area */ | 773 | /* Default composing area */ |
| 763 | #define V4L2_SEL_TGT_COMPOSE_DEFAULT 257 | 774 | #define V4L2_SEL_TGT_COMPOSE_DEFAULT 0x0101 |
| 764 | /* composing bounds */ | 775 | /* Composing bounds */ |
| 765 | #define V4L2_SEL_TGT_COMPOSE_BOUNDS 258 | 776 | #define V4L2_SEL_TGT_COMPOSE_BOUNDS 0x0102 |
| 766 | /* current composing area plus all padding pixels */ | 777 | /* Current composing area plus all padding pixels */ |
| 767 | #define V4L2_SEL_TGT_COMPOSE_PADDED 259 | 778 | #define V4L2_SEL_TGT_COMPOSE_PADDED 0x0103 |
| 768 | 779 | ||
| 769 | /** | 780 | /** |
| 770 | * struct v4l2_selection - selection info | 781 | * struct v4l2_selection - selection info |
| @@ -774,7 +785,7 @@ struct v4l2_crop { | |||
| 774 | * @r: coordinates of selection window | 785 | * @r: coordinates of selection window |
| 775 | * @reserved: for future use, rounds structure size to 64 bytes, set to zero | 786 | * @reserved: for future use, rounds structure size to 64 bytes, set to zero |
| 776 | * | 787 | * |
| 777 | * Hardware may use multiple helper window to process a video stream. | 788 | * Hardware may use multiple helper windows to process a video stream. |
| 778 | * The structure is used to exchange this selection areas between | 789 | * The structure is used to exchange this selection areas between |
| 779 | * an application and a driver. | 790 | * an application and a driver. |
| 780 | */ | 791 | */ |
| @@ -1125,6 +1136,7 @@ struct v4l2_ext_controls { | |||
| 1125 | #define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls */ | 1136 | #define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls */ |
| 1126 | #define V4L2_CTRL_CLASS_FM_TX 0x009b0000 /* FM Modulator control class */ | 1137 | #define V4L2_CTRL_CLASS_FM_TX 0x009b0000 /* FM Modulator control class */ |
| 1127 | #define V4L2_CTRL_CLASS_FLASH 0x009c0000 /* Camera flash controls */ | 1138 | #define V4L2_CTRL_CLASS_FLASH 0x009c0000 /* Camera flash controls */ |
| 1139 | #define V4L2_CTRL_CLASS_JPEG 0x009d0000 /* JPEG-compression controls */ | ||
| 1128 | 1140 | ||
| 1129 | #define V4L2_CTRL_ID_MASK (0x0fffffff) | 1141 | #define V4L2_CTRL_ID_MASK (0x0fffffff) |
| 1130 | #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) | 1142 | #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) |
| @@ -1396,6 +1408,16 @@ enum v4l2_mpeg_audio_ac3_bitrate { | |||
| 1396 | V4L2_MPEG_AUDIO_AC3_BITRATE_576K = 17, | 1408 | V4L2_MPEG_AUDIO_AC3_BITRATE_576K = 17, |
| 1397 | V4L2_MPEG_AUDIO_AC3_BITRATE_640K = 18, | 1409 | V4L2_MPEG_AUDIO_AC3_BITRATE_640K = 18, |
| 1398 | }; | 1410 | }; |
| 1411 | #define V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK (V4L2_CID_MPEG_BASE+112) | ||
| 1412 | enum v4l2_mpeg_audio_dec_playback { | ||
| 1413 | V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO = 0, | ||
| 1414 | V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO = 1, | ||
| 1415 | V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT = 2, | ||
| 1416 | V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT = 3, | ||
| 1417 | V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO = 4, | ||
| 1418 | V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO = 5, | ||
| 1419 | }; | ||
| 1420 | #define V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK (V4L2_CID_MPEG_BASE+113) | ||
| 1399 | 1421 | ||
| 1400 | /* MPEG video controls specific to multiplexed streams */ | 1422 | /* MPEG video controls specific to multiplexed streams */ |
| 1401 | #define V4L2_CID_MPEG_VIDEO_ENCODING (V4L2_CID_MPEG_BASE+200) | 1423 | #define V4L2_CID_MPEG_VIDEO_ENCODING (V4L2_CID_MPEG_BASE+200) |
| @@ -1446,6 +1468,9 @@ enum v4l2_mpeg_video_multi_slice_mode { | |||
| 1446 | V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_BYTES = 2, | 1468 | V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_BYTES = 2, |
| 1447 | }; | 1469 | }; |
| 1448 | #define V4L2_CID_MPEG_VIDEO_VBV_SIZE (V4L2_CID_MPEG_BASE+222) | 1470 | #define V4L2_CID_MPEG_VIDEO_VBV_SIZE (V4L2_CID_MPEG_BASE+222) |
| 1471 | #define V4L2_CID_MPEG_VIDEO_DEC_PTS (V4L2_CID_MPEG_BASE+223) | ||
| 1472 | #define V4L2_CID_MPEG_VIDEO_DEC_FRAME (V4L2_CID_MPEG_BASE+224) | ||
| 1473 | |||
| 1449 | #define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300) | 1474 | #define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300) |
| 1450 | #define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301) | 1475 | #define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301) |
| 1451 | #define V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (V4L2_CID_MPEG_BASE+302) | 1476 | #define V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (V4L2_CID_MPEG_BASE+302) |
| @@ -1734,6 +1759,29 @@ enum v4l2_flash_strobe_source { | |||
| 1734 | #define V4L2_CID_FLASH_CHARGE (V4L2_CID_FLASH_CLASS_BASE + 11) | 1759 | #define V4L2_CID_FLASH_CHARGE (V4L2_CID_FLASH_CLASS_BASE + 11) |
| 1735 | #define V4L2_CID_FLASH_READY (V4L2_CID_FLASH_CLASS_BASE + 12) | 1760 | #define V4L2_CID_FLASH_READY (V4L2_CID_FLASH_CLASS_BASE + 12) |
| 1736 | 1761 | ||
| 1762 | /* JPEG-class control IDs defined by V4L2 */ | ||
| 1763 | #define V4L2_CID_JPEG_CLASS_BASE (V4L2_CTRL_CLASS_JPEG | 0x900) | ||
| 1764 | #define V4L2_CID_JPEG_CLASS (V4L2_CTRL_CLASS_JPEG | 1) | ||
| 1765 | |||
| 1766 | #define V4L2_CID_JPEG_CHROMA_SUBSAMPLING (V4L2_CID_JPEG_CLASS_BASE + 1) | ||
| 1767 | enum v4l2_jpeg_chroma_subsampling { | ||
| 1768 | V4L2_JPEG_CHROMA_SUBSAMPLING_444 = 0, | ||
| 1769 | V4L2_JPEG_CHROMA_SUBSAMPLING_422 = 1, | ||
| 1770 | V4L2_JPEG_CHROMA_SUBSAMPLING_420 = 2, | ||
| 1771 | V4L2_JPEG_CHROMA_SUBSAMPLING_411 = 3, | ||
| 1772 | V4L2_JPEG_CHROMA_SUBSAMPLING_410 = 4, | ||
| 1773 | V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY = 5, | ||
| 1774 | }; | ||
| 1775 | #define V4L2_CID_JPEG_RESTART_INTERVAL (V4L2_CID_JPEG_CLASS_BASE + 2) | ||
| 1776 | #define V4L2_CID_JPEG_COMPRESSION_QUALITY (V4L2_CID_JPEG_CLASS_BASE + 3) | ||
| 1777 | |||
| 1778 | #define V4L2_CID_JPEG_ACTIVE_MARKER (V4L2_CID_JPEG_CLASS_BASE + 4) | ||
| 1779 | #define V4L2_JPEG_ACTIVE_MARKER_APP0 (1 << 0) | ||
| 1780 | #define V4L2_JPEG_ACTIVE_MARKER_APP1 (1 << 1) | ||
| 1781 | #define V4L2_JPEG_ACTIVE_MARKER_COM (1 << 16) | ||
| 1782 | #define V4L2_JPEG_ACTIVE_MARKER_DQT (1 << 17) | ||
| 1783 | #define V4L2_JPEG_ACTIVE_MARKER_DHT (1 << 18) | ||
| 1784 | |||
| 1737 | /* | 1785 | /* |
| 1738 | * T U N I N G | 1786 | * T U N I N G |
| 1739 | */ | 1787 | */ |
| @@ -1897,6 +1945,54 @@ struct v4l2_encoder_cmd { | |||
| 1897 | }; | 1945 | }; |
| 1898 | }; | 1946 | }; |
| 1899 | 1947 | ||
| 1948 | /* Decoder commands */ | ||
| 1949 | #define V4L2_DEC_CMD_START (0) | ||
| 1950 | #define V4L2_DEC_CMD_STOP (1) | ||
| 1951 | #define V4L2_DEC_CMD_PAUSE (2) | ||
| 1952 | #define V4L2_DEC_CMD_RESUME (3) | ||
| 1953 | |||
| 1954 | /* Flags for V4L2_DEC_CMD_START */ | ||
| 1955 | #define V4L2_DEC_CMD_START_MUTE_AUDIO (1 << 0) | ||
| 1956 | |||
| 1957 | /* Flags for V4L2_DEC_CMD_PAUSE */ | ||
| 1958 | #define V4L2_DEC_CMD_PAUSE_TO_BLACK (1 << 0) | ||
| 1959 | |||
| 1960 | /* Flags for V4L2_DEC_CMD_STOP */ | ||
| 1961 | #define V4L2_DEC_CMD_STOP_TO_BLACK (1 << 0) | ||
| 1962 | #define V4L2_DEC_CMD_STOP_IMMEDIATELY (1 << 1) | ||
| 1963 | |||
| 1964 | /* Play format requirements (returned by the driver): */ | ||
| 1965 | |||
| 1966 | /* The decoder has no special format requirements */ | ||
| 1967 | #define V4L2_DEC_START_FMT_NONE (0) | ||
| 1968 | /* The decoder requires full GOPs */ | ||
| 1969 | #define V4L2_DEC_START_FMT_GOP (1) | ||
| 1970 | |||
| 1971 | /* The structure must be zeroed before use by the application | ||
| 1972 | This ensures it can be extended safely in the future. */ | ||
| 1973 | struct v4l2_decoder_cmd { | ||
| 1974 | __u32 cmd; | ||
| 1975 | __u32 flags; | ||
| 1976 | union { | ||
| 1977 | struct { | ||
| 1978 | __u64 pts; | ||
| 1979 | } stop; | ||
| 1980 | |||
| 1981 | struct { | ||
| 1982 | /* 0 or 1000 specifies normal speed, | ||
| 1983 | 1 specifies forward single stepping, | ||
| 1984 | -1 specifies backward single stepping, | ||
| 1985 | >1: playback at speed/1000 of the normal speed, | ||
| 1986 | <-1: reverse playback at (-speed/1000) of the normal speed. */ | ||
| 1987 | __s32 speed; | ||
| 1988 | __u32 format; | ||
| 1989 | } start; | ||
| 1990 | |||
| 1991 | struct { | ||
| 1992 | __u32 data[16]; | ||
| 1993 | } raw; | ||
| 1994 | }; | ||
| 1995 | }; | ||
| 1900 | #endif | 1996 | #endif |
| 1901 | 1997 | ||
| 1902 | 1998 | ||
| @@ -2307,6 +2403,11 @@ struct v4l2_create_buffers { | |||
| 2307 | #define VIDIOC_G_SELECTION _IOWR('V', 94, struct v4l2_selection) | 2403 | #define VIDIOC_G_SELECTION _IOWR('V', 94, struct v4l2_selection) |
| 2308 | #define VIDIOC_S_SELECTION _IOWR('V', 95, struct v4l2_selection) | 2404 | #define VIDIOC_S_SELECTION _IOWR('V', 95, struct v4l2_selection) |
| 2309 | 2405 | ||
| 2406 | /* Experimental, these two ioctls may change over the next couple of kernel | ||
| 2407 | versions. */ | ||
| 2408 | #define VIDIOC_DECODER_CMD _IOWR('V', 96, struct v4l2_decoder_cmd) | ||
| 2409 | #define VIDIOC_TRY_DECODER_CMD _IOWR('V', 97, struct v4l2_decoder_cmd) | ||
| 2410 | |||
| 2310 | /* Reminder: when adding new ioctls please add support for them to | 2411 | /* Reminder: when adding new ioctls please add support for them to |
| 2311 | drivers/media/video/v4l2-compat-ioctl32.c as well! */ | 2412 | drivers/media/video/v4l2-compat-ioctl32.c as well! */ |
| 2312 | 2413 | ||
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index 5206d6541da5..7323a3390206 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h | |||
| @@ -53,6 +53,7 @@ | |||
| 53 | 53 | ||
| 54 | #ifdef __KERNEL__ | 54 | #ifdef __KERNEL__ |
| 55 | #include <linux/err.h> | 55 | #include <linux/err.h> |
| 56 | #include <linux/bug.h> | ||
| 56 | #include <linux/virtio.h> | 57 | #include <linux/virtio.h> |
| 57 | 58 | ||
| 58 | /** | 59 | /** |
diff --git a/include/linux/virtio_ids.h b/include/linux/virtio_ids.h index c5d8455c68c0..7529b854b7fd 100644 --- a/include/linux/virtio_ids.h +++ b/include/linux/virtio_ids.h | |||
| @@ -34,6 +34,7 @@ | |||
| 34 | #define VIRTIO_ID_CONSOLE 3 /* virtio console */ | 34 | #define VIRTIO_ID_CONSOLE 3 /* virtio console */ |
| 35 | #define VIRTIO_ID_RNG 4 /* virtio ring */ | 35 | #define VIRTIO_ID_RNG 4 /* virtio ring */ |
| 36 | #define VIRTIO_ID_BALLOON 5 /* virtio balloon */ | 36 | #define VIRTIO_ID_BALLOON 5 /* virtio balloon */ |
| 37 | #define VIRTIO_ID_RPMSG 7 /* virtio remote processor messaging */ | ||
| 37 | #define VIRTIO_ID_SCSI 8 /* virtio scsi */ | 38 | #define VIRTIO_ID_SCSI 8 /* virtio scsi */ |
| 38 | #define VIRTIO_ID_9P 9 /* 9p virtio console */ | 39 | #define VIRTIO_ID_9P 9 /* 9p virtio console */ |
| 39 | 40 | ||
diff --git a/include/linux/wimax/debug.h b/include/linux/wimax/debug.h index 57031b4d12f2..aaf24ba12c4d 100644 --- a/include/linux/wimax/debug.h +++ b/include/linux/wimax/debug.h | |||
| @@ -154,9 +154,9 @@ | |||
| 154 | #define __debug__h__ | 154 | #define __debug__h__ |
| 155 | 155 | ||
| 156 | #include <linux/types.h> | 156 | #include <linux/types.h> |
| 157 | #include <linux/device.h> | ||
| 158 | #include <linux/slab.h> | 157 | #include <linux/slab.h> |
| 159 | 158 | ||
| 159 | struct device; | ||
| 160 | 160 | ||
| 161 | /* Backend stuff */ | 161 | /* Backend stuff */ |
| 162 | 162 | ||
