diff options
Diffstat (limited to 'include')
111 files changed, 1242 insertions, 377 deletions
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index 3a4767c01c5f..4f7b44866b76 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h | |||
| @@ -65,6 +65,8 @@ | |||
| 65 | #define ACPI_VIDEO_HID "LNXVIDEO" | 65 | #define ACPI_VIDEO_HID "LNXVIDEO" |
| 66 | #define ACPI_BAY_HID "LNXIOBAY" | 66 | #define ACPI_BAY_HID "LNXIOBAY" |
| 67 | #define ACPI_DOCK_HID "LNXDOCK" | 67 | #define ACPI_DOCK_HID "LNXDOCK" |
| 68 | /* Quirk for broken IBM BIOSes */ | ||
| 69 | #define ACPI_SMBUS_IBM_HID "SMBUSIBM" | ||
| 68 | 70 | ||
| 69 | /* | 71 | /* |
| 70 | * For fixed hardware buttons, we fabricate acpi_devices with HID | 72 | * For fixed hardware buttons, we fabricate acpi_devices with HID |
diff --git a/include/asm-generic/dma-mapping-common.h b/include/asm-generic/dma-mapping-common.h index e694263445f7..69206957b72c 100644 --- a/include/asm-generic/dma-mapping-common.h +++ b/include/asm-generic/dma-mapping-common.h | |||
| @@ -131,7 +131,7 @@ static inline void dma_sync_single_range_for_cpu(struct device *dev, | |||
| 131 | debug_dma_sync_single_range_for_cpu(dev, addr, offset, size, dir); | 131 | debug_dma_sync_single_range_for_cpu(dev, addr, offset, size, dir); |
| 132 | 132 | ||
| 133 | } else | 133 | } else |
| 134 | dma_sync_single_for_cpu(dev, addr, size, dir); | 134 | dma_sync_single_for_cpu(dev, addr + offset, size, dir); |
| 135 | } | 135 | } |
| 136 | 136 | ||
| 137 | static inline void dma_sync_single_range_for_device(struct device *dev, | 137 | static inline void dma_sync_single_range_for_device(struct device *dev, |
| @@ -148,7 +148,7 @@ static inline void dma_sync_single_range_for_device(struct device *dev, | |||
| 148 | debug_dma_sync_single_range_for_device(dev, addr, offset, size, dir); | 148 | debug_dma_sync_single_range_for_device(dev, addr, offset, size, dir); |
| 149 | 149 | ||
| 150 | } else | 150 | } else |
| 151 | dma_sync_single_for_device(dev, addr, size, dir); | 151 | dma_sync_single_for_device(dev, addr + offset, size, dir); |
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | static inline void | 154 | static inline void |
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 4a3c4e441027..2f3b3a00b7a3 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
| @@ -55,6 +55,7 @@ | |||
| 55 | #include <linux/mm.h> | 55 | #include <linux/mm.h> |
| 56 | #include <linux/cdev.h> | 56 | #include <linux/cdev.h> |
| 57 | #include <linux/mutex.h> | 57 | #include <linux/mutex.h> |
| 58 | #include <linux/slab.h> | ||
| 58 | #if defined(__alpha__) || defined(__powerpc__) | 59 | #if defined(__alpha__) || defined(__powerpc__) |
| 59 | #include <asm/pgtable.h> /* For pte_wrprotect */ | 60 | #include <asm/pgtable.h> /* For pte_wrprotect */ |
| 60 | #endif | 61 | #endif |
| @@ -1545,39 +1546,7 @@ static __inline__ void drm_core_dropmap(struct drm_local_map *map) | |||
| 1545 | { | 1546 | { |
| 1546 | } | 1547 | } |
| 1547 | 1548 | ||
| 1548 | 1549 | #include "drm_mem_util.h" | |
| 1549 | static __inline__ void *drm_calloc_large(size_t nmemb, size_t size) | ||
| 1550 | { | ||
| 1551 | if (size != 0 && nmemb > ULONG_MAX / size) | ||
| 1552 | return NULL; | ||
| 1553 | |||
| 1554 | if (size * nmemb <= PAGE_SIZE) | ||
| 1555 | return kcalloc(nmemb, size, GFP_KERNEL); | ||
| 1556 | |||
| 1557 | return __vmalloc(size * nmemb, | ||
| 1558 | GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, PAGE_KERNEL); | ||
| 1559 | } | ||
| 1560 | |||
| 1561 | /* Modeled after cairo's malloc_ab, it's like calloc but without the zeroing. */ | ||
| 1562 | static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size) | ||
| 1563 | { | ||
| 1564 | if (size != 0 && nmemb > ULONG_MAX / size) | ||
| 1565 | return NULL; | ||
| 1566 | |||
| 1567 | if (size * nmemb <= PAGE_SIZE) | ||
| 1568 | return kmalloc(nmemb * size, GFP_KERNEL); | ||
| 1569 | |||
| 1570 | return __vmalloc(size * nmemb, | ||
| 1571 | GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL); | ||
| 1572 | } | ||
| 1573 | |||
| 1574 | static __inline void drm_free_large(void *ptr) | ||
| 1575 | { | ||
| 1576 | if (!is_vmalloc_addr(ptr)) | ||
| 1577 | return kfree(ptr); | ||
| 1578 | |||
| 1579 | vfree(ptr); | ||
| 1580 | } | ||
| 1581 | /*@}*/ | 1550 | /*@}*/ |
| 1582 | 1551 | ||
| 1583 | #endif /* __KERNEL__ */ | 1552 | #endif /* __KERNEL__ */ |
diff --git a/include/drm/drm_mem_util.h b/include/drm/drm_mem_util.h new file mode 100644 index 000000000000..6bd325fedc87 --- /dev/null +++ b/include/drm/drm_mem_util.h | |||
| @@ -0,0 +1,65 @@ | |||
| 1 | /* | ||
| 2 | * Copyright © 2008 Intel Corporation | ||
| 3 | * | ||
| 4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
| 5 | * copy of this software and associated documentation files (the "Software"), | ||
| 6 | * to deal in the Software without restriction, including without limitation | ||
| 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
| 8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 9 | * Software is furnished to do so, subject to the following conditions: | ||
| 10 | * | ||
| 11 | * The above copyright notice and this permission notice (including the next | ||
| 12 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 13 | * Software. | ||
| 14 | * | ||
| 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
| 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
| 21 | * IN THE SOFTWARE. | ||
| 22 | * | ||
| 23 | * Authors: | ||
| 24 | * Jesse Barnes <jbarnes@virtuousgeek.org> | ||
| 25 | * | ||
| 26 | */ | ||
| 27 | #ifndef _DRM_MEM_UTIL_H_ | ||
| 28 | #define _DRM_MEM_UTIL_H_ | ||
| 29 | |||
| 30 | #include <linux/vmalloc.h> | ||
| 31 | |||
| 32 | static __inline__ void *drm_calloc_large(size_t nmemb, size_t size) | ||
| 33 | { | ||
| 34 | if (size != 0 && nmemb > ULONG_MAX / size) | ||
| 35 | return NULL; | ||
| 36 | |||
| 37 | if (size * nmemb <= PAGE_SIZE) | ||
| 38 | return kcalloc(nmemb, size, GFP_KERNEL); | ||
| 39 | |||
| 40 | return __vmalloc(size * nmemb, | ||
| 41 | GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, PAGE_KERNEL); | ||
| 42 | } | ||
| 43 | |||
| 44 | /* Modeled after cairo's malloc_ab, it's like calloc but without the zeroing. */ | ||
| 45 | static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size) | ||
| 46 | { | ||
| 47 | if (size != 0 && nmemb > ULONG_MAX / size) | ||
| 48 | return NULL; | ||
| 49 | |||
| 50 | if (size * nmemb <= PAGE_SIZE) | ||
| 51 | return kmalloc(nmemb * size, GFP_KERNEL); | ||
| 52 | |||
| 53 | return __vmalloc(size * nmemb, | ||
| 54 | GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL); | ||
| 55 | } | ||
| 56 | |||
| 57 | static __inline void drm_free_large(void *ptr) | ||
| 58 | { | ||
| 59 | if (!is_vmalloc_addr(ptr)) | ||
| 60 | return kfree(ptr); | ||
| 61 | |||
| 62 | vfree(ptr); | ||
| 63 | } | ||
| 64 | |||
| 65 | #endif | ||
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index 676104b7818c..2d428b088cc8 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | {0x1002, 0x3150, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY}, \ | 6 | {0x1002, 0x3150, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY}, \ |
| 7 | {0x1002, 0x3152, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 7 | {0x1002, 0x3152, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
| 8 | {0x1002, 0x3154, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 8 | {0x1002, 0x3154, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
| 9 | {0x1002, 0x3155, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
| 9 | {0x1002, 0x3E50, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \ | 10 | {0x1002, 0x3E50, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \ |
| 10 | {0x1002, 0x3E54, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \ | 11 | {0x1002, 0x3E54, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \ |
| 11 | {0x1002, 0x4136, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS100|RADEON_IS_IGP}, \ | 12 | {0x1002, 0x4136, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS100|RADEON_IS_IGP}, \ |
| @@ -410,6 +411,7 @@ | |||
| 410 | {0x1002, 0x9712, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 411 | {0x1002, 0x9712, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
| 411 | {0x1002, 0x9713, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 412 | {0x1002, 0x9713, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
| 412 | {0x1002, 0x9714, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 413 | {0x1002, 0x9714, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
| 414 | {0x1002, 0x9715, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
| 413 | {0, 0, 0} | 415 | {0, 0, 0} |
| 414 | 416 | ||
| 415 | #define r128_PCI_IDS \ | 417 | #define r128_PCI_IDS \ |
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index e3f1b4a4b601..6b9db917e717 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h | |||
| @@ -115,7 +115,6 @@ struct ttm_backend { | |||
| 115 | struct ttm_backend_func *func; | 115 | struct ttm_backend_func *func; |
| 116 | }; | 116 | }; |
| 117 | 117 | ||
| 118 | #define TTM_PAGE_FLAG_VMALLOC (1 << 0) | ||
| 119 | #define TTM_PAGE_FLAG_USER (1 << 1) | 118 | #define TTM_PAGE_FLAG_USER (1 << 1) |
| 120 | #define TTM_PAGE_FLAG_USER_DIRTY (1 << 2) | 119 | #define TTM_PAGE_FLAG_USER_DIRTY (1 << 2) |
| 121 | #define TTM_PAGE_FLAG_WRITE (1 << 3) | 120 | #define TTM_PAGE_FLAG_WRITE (1 << 3) |
| @@ -790,34 +789,6 @@ extern void ttm_bo_unreserve(struct ttm_buffer_object *bo); | |||
| 790 | extern int ttm_bo_wait_unreserved(struct ttm_buffer_object *bo, | 789 | extern int ttm_bo_wait_unreserved(struct ttm_buffer_object *bo, |
| 791 | bool interruptible); | 790 | bool interruptible); |
| 792 | 791 | ||
| 793 | /** | ||
| 794 | * ttm_bo_block_reservation | ||
| 795 | * | ||
| 796 | * @bo: A pointer to a struct ttm_buffer_object. | ||
| 797 | * @interruptible: Use interruptible sleep when waiting. | ||
| 798 | * @no_wait: Don't sleep, but rather return -EBUSY. | ||
| 799 | * | ||
| 800 | * Block reservation for validation by simply reserving the buffer. | ||
| 801 | * This is intended for single buffer use only without eviction, | ||
| 802 | * and thus needs no deadlock protection. | ||
| 803 | * | ||
| 804 | * Returns: | ||
| 805 | * -EBUSY: If no_wait == 1 and the buffer is already reserved. | ||
| 806 | * -ERESTARTSYS: If interruptible == 1 and the process received a signal | ||
| 807 | * while sleeping. | ||
| 808 | */ | ||
| 809 | extern int ttm_bo_block_reservation(struct ttm_buffer_object *bo, | ||
| 810 | bool interruptible, bool no_wait); | ||
| 811 | |||
| 812 | /** | ||
| 813 | * ttm_bo_unblock_reservation | ||
| 814 | * | ||
| 815 | * @bo: A pointer to a struct ttm_buffer_object. | ||
| 816 | * | ||
| 817 | * Unblocks reservation leaving lru lists untouched. | ||
| 818 | */ | ||
| 819 | extern void ttm_bo_unblock_reservation(struct ttm_buffer_object *bo); | ||
| 820 | |||
| 821 | /* | 792 | /* |
| 822 | * ttm_bo_util.c | 793 | * ttm_bo_util.c |
| 823 | */ | 794 | */ |
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h index 6816be6c3f77..8b1038607831 100644 --- a/include/linux/amba/bus.h +++ b/include/linux/amba/bus.h | |||
| @@ -14,6 +14,9 @@ | |||
| 14 | #ifndef ASMARM_AMBA_H | 14 | #ifndef ASMARM_AMBA_H |
| 15 | #define ASMARM_AMBA_H | 15 | #define ASMARM_AMBA_H |
| 16 | 16 | ||
| 17 | #include <linux/device.h> | ||
| 18 | #include <linux/resource.h> | ||
| 19 | |||
| 17 | #define AMBA_NR_IRQS 2 | 20 | #define AMBA_NR_IRQS 2 |
| 18 | 21 | ||
| 19 | struct amba_device { | 22 | struct amba_device { |
diff --git a/include/linux/amba/pl061.h b/include/linux/amba/pl061.h index b4fbd9862606..5ddd9ad4b19c 100644 --- a/include/linux/amba/pl061.h +++ b/include/linux/amba/pl061.h | |||
| @@ -1,3 +1,5 @@ | |||
| 1 | #include <linux/types.h> | ||
| 2 | |||
| 1 | /* platform data for the PL061 GPIO driver */ | 3 | /* platform data for the PL061 GPIO driver */ |
| 2 | 4 | ||
| 3 | struct pl061_platform_data { | 5 | struct pl061_platform_data { |
diff --git a/include/linux/ata.h b/include/linux/ata.h index b4c85e2adef5..700c5b9b3583 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
| @@ -1025,8 +1025,8 @@ static inline int ata_ok(u8 status) | |||
| 1025 | 1025 | ||
| 1026 | static inline int lba_28_ok(u64 block, u32 n_block) | 1026 | static inline int lba_28_ok(u64 block, u32 n_block) |
| 1027 | { | 1027 | { |
| 1028 | /* check the ending block number */ | 1028 | /* check the ending block number: must be LESS THAN 0x0fffffff */ |
| 1029 | return ((block + n_block) < ((u64)1 << 28)) && (n_block <= 256); | 1029 | return ((block + n_block) < ((1 << 28) - 1)) && (n_block <= 256); |
| 1030 | } | 1030 | } |
| 1031 | 1031 | ||
| 1032 | static inline int lba_48_ok(u64 block, u32 n_block) | 1032 | static inline int lba_48_ok(u64 block, u32 n_block) |
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index fcbc26af00e4..bd0e3c6f323f 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h | |||
| @@ -101,6 +101,7 @@ int bdi_register(struct backing_dev_info *bdi, struct device *parent, | |||
| 101 | const char *fmt, ...); | 101 | const char *fmt, ...); |
| 102 | int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev); | 102 | int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev); |
| 103 | void bdi_unregister(struct backing_dev_info *bdi); | 103 | void bdi_unregister(struct backing_dev_info *bdi); |
| 104 | int bdi_setup_and_register(struct backing_dev_info *, char *, unsigned int); | ||
| 104 | void bdi_start_writeback(struct backing_dev_info *bdi, struct super_block *sb, | 105 | void bdi_start_writeback(struct backing_dev_info *bdi, struct super_block *sb, |
| 105 | long nr_pages); | 106 | long nr_pages); |
| 106 | int bdi_writeback_task(struct bdi_writeback *wb); | 107 | int bdi_writeback_task(struct bdi_writeback *wb); |
| @@ -246,6 +247,7 @@ int bdi_set_max_ratio(struct backing_dev_info *bdi, unsigned int max_ratio); | |||
| 246 | #endif | 247 | #endif |
| 247 | 248 | ||
| 248 | extern struct backing_dev_info default_backing_dev_info; | 249 | extern struct backing_dev_info default_backing_dev_info; |
| 250 | extern struct backing_dev_info noop_backing_dev_info; | ||
| 249 | void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page); | 251 | void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page); |
| 250 | 252 | ||
| 251 | int writeback_in_progress(struct backing_dev_info *bdi); | 253 | int writeback_in_progress(struct backing_dev_info *bdi); |
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index b79389879238..b796eab5ca75 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
| @@ -21,9 +21,6 @@ | |||
| 21 | (bit) < (size); \ | 21 | (bit) < (size); \ |
| 22 | (bit) = find_next_bit((addr), (size), (bit) + 1)) | 22 | (bit) = find_next_bit((addr), (size), (bit) + 1)) |
| 23 | 23 | ||
| 24 | /* Temporary */ | ||
| 25 | #define for_each_bit(bit, addr, size) for_each_set_bit(bit, addr, size) | ||
| 26 | |||
| 27 | static __inline__ int get_bitmask_order(unsigned int count) | 24 | static __inline__ int get_bitmask_order(unsigned int count) |
| 28 | { | 25 | { |
| 29 | int order; | 26 | int order; |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index ebd22dbed861..6690e8bae7bb 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -158,7 +158,6 @@ enum rq_flag_bits { | |||
| 158 | struct request { | 158 | struct request { |
| 159 | struct list_head queuelist; | 159 | struct list_head queuelist; |
| 160 | struct call_single_data csd; | 160 | struct call_single_data csd; |
| 161 | int cpu; | ||
| 162 | 161 | ||
| 163 | struct request_queue *q; | 162 | struct request_queue *q; |
| 164 | 163 | ||
| @@ -166,9 +165,11 @@ struct request { | |||
| 166 | enum rq_cmd_type_bits cmd_type; | 165 | enum rq_cmd_type_bits cmd_type; |
| 167 | unsigned long atomic_flags; | 166 | unsigned long atomic_flags; |
| 168 | 167 | ||
| 168 | int cpu; | ||
| 169 | |||
| 169 | /* the following two fields are internal, NEVER access directly */ | 170 | /* the following two fields are internal, NEVER access directly */ |
| 170 | sector_t __sector; /* sector cursor */ | ||
| 171 | unsigned int __data_len; /* total data len */ | 171 | unsigned int __data_len; /* total data len */ |
| 172 | sector_t __sector; /* sector cursor */ | ||
| 172 | 173 | ||
| 173 | struct bio *bio; | 174 | struct bio *bio; |
| 174 | struct bio *biotail; | 175 | struct bio *biotail; |
| @@ -201,20 +202,20 @@ struct request { | |||
| 201 | 202 | ||
| 202 | unsigned short ioprio; | 203 | unsigned short ioprio; |
| 203 | 204 | ||
| 205 | int ref_count; | ||
| 206 | |||
| 204 | void *special; /* opaque pointer available for LLD use */ | 207 | void *special; /* opaque pointer available for LLD use */ |
| 205 | char *buffer; /* kaddr of the current segment if available */ | 208 | char *buffer; /* kaddr of the current segment if available */ |
| 206 | 209 | ||
| 207 | int tag; | 210 | int tag; |
| 208 | int errors; | 211 | int errors; |
| 209 | 212 | ||
| 210 | int ref_count; | ||
| 211 | |||
| 212 | /* | 213 | /* |
| 213 | * when request is used as a packet command carrier | 214 | * when request is used as a packet command carrier |
| 214 | */ | 215 | */ |
| 215 | unsigned short cmd_len; | ||
| 216 | unsigned char __cmd[BLK_MAX_CDB]; | 216 | unsigned char __cmd[BLK_MAX_CDB]; |
| 217 | unsigned char *cmd; | 217 | unsigned char *cmd; |
| 218 | unsigned short cmd_len; | ||
| 218 | 219 | ||
| 219 | unsigned int extra_len; /* length of alignment and padding */ | 220 | unsigned int extra_len; /* length of alignment and padding */ |
| 220 | unsigned int sense_len; | 221 | unsigned int sense_len; |
| @@ -921,26 +922,7 @@ extern void blk_cleanup_queue(struct request_queue *); | |||
| 921 | extern void blk_queue_make_request(struct request_queue *, make_request_fn *); | 922 | extern void blk_queue_make_request(struct request_queue *, make_request_fn *); |
| 922 | extern void blk_queue_bounce_limit(struct request_queue *, u64); | 923 | extern void blk_queue_bounce_limit(struct request_queue *, u64); |
| 923 | extern void blk_queue_max_hw_sectors(struct request_queue *, unsigned int); | 924 | extern void blk_queue_max_hw_sectors(struct request_queue *, unsigned int); |
| 924 | |||
| 925 | /* Temporary compatibility wrapper */ | ||
| 926 | static inline void blk_queue_max_sectors(struct request_queue *q, unsigned int max) | ||
| 927 | { | ||
| 928 | blk_queue_max_hw_sectors(q, max); | ||
| 929 | } | ||
| 930 | |||
| 931 | extern void blk_queue_max_segments(struct request_queue *, unsigned short); | 925 | extern void blk_queue_max_segments(struct request_queue *, unsigned short); |
| 932 | |||
| 933 | static inline void blk_queue_max_phys_segments(struct request_queue *q, unsigned short max) | ||
| 934 | { | ||
| 935 | blk_queue_max_segments(q, max); | ||
| 936 | } | ||
| 937 | |||
| 938 | static inline void blk_queue_max_hw_segments(struct request_queue *q, unsigned short max) | ||
| 939 | { | ||
| 940 | blk_queue_max_segments(q, max); | ||
| 941 | } | ||
| 942 | |||
| 943 | |||
| 944 | extern void blk_queue_max_segment_size(struct request_queue *, unsigned int); | 926 | extern void blk_queue_max_segment_size(struct request_queue *, unsigned int); |
| 945 | extern void blk_queue_max_discard_sectors(struct request_queue *q, | 927 | extern void blk_queue_max_discard_sectors(struct request_queue *q, |
| 946 | unsigned int max_discard_sectors); | 928 | unsigned int max_discard_sectors); |
| @@ -1030,11 +1012,6 @@ static inline int sb_issue_discard(struct super_block *sb, | |||
| 1030 | 1012 | ||
| 1031 | extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm); | 1013 | extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm); |
| 1032 | 1014 | ||
| 1033 | #define MAX_PHYS_SEGMENTS 128 | ||
| 1034 | #define MAX_HW_SEGMENTS 128 | ||
| 1035 | #define SAFE_MAX_SECTORS 255 | ||
| 1036 | #define MAX_SEGMENT_SIZE 65536 | ||
| 1037 | |||
| 1038 | enum blk_default_limits { | 1015 | enum blk_default_limits { |
| 1039 | BLK_MAX_SEGMENTS = 128, | 1016 | BLK_MAX_SEGMENTS = 128, |
| 1040 | BLK_SAFE_MAX_SECTORS = 255, | 1017 | BLK_SAFE_MAX_SECTORS = 255, |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index b8ad1ea99586..8f78073d7caa 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
| @@ -530,6 +530,7 @@ static inline struct cgroup_subsys_state *task_subsys_state( | |||
| 530 | { | 530 | { |
| 531 | return rcu_dereference_check(task->cgroups->subsys[subsys_id], | 531 | return rcu_dereference_check(task->cgroups->subsys[subsys_id], |
| 532 | rcu_read_lock_held() || | 532 | rcu_read_lock_held() || |
| 533 | lockdep_is_held(&task->alloc_lock) || | ||
| 533 | cgroup_lock_is_held()); | 534 | cgroup_lock_is_held()); |
| 534 | } | 535 | } |
| 535 | 536 | ||
diff --git a/include/linux/circ_buf.h b/include/linux/circ_buf.h index a2ed0591fb19..90f2471dc6f2 100644 --- a/include/linux/circ_buf.h +++ b/include/linux/circ_buf.h | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | /* | ||
| 2 | * See Documentation/circular-buffers.txt for more information. | ||
| 3 | */ | ||
| 4 | |||
| 1 | #ifndef _LINUX_CIRC_BUF_H | 5 | #ifndef _LINUX_CIRC_BUF_H |
| 2 | #define _LINUX_CIRC_BUF_H 1 | 6 | #define _LINUX_CIRC_BUF_H 1 |
| 3 | 7 | ||
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index 0cf725bdd2a1..fc53492b6ad7 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h | |||
| @@ -73,6 +73,7 @@ enum clock_event_nofitiers { | |||
| 73 | * @list: list head for the management code | 73 | * @list: list head for the management code |
| 74 | * @mode: operating mode assigned by the management code | 74 | * @mode: operating mode assigned by the management code |
| 75 | * @next_event: local storage for the next event in oneshot mode | 75 | * @next_event: local storage for the next event in oneshot mode |
| 76 | * @retries: number of forced programming retries | ||
| 76 | */ | 77 | */ |
| 77 | struct clock_event_device { | 78 | struct clock_event_device { |
| 78 | const char *name; | 79 | const char *name; |
| @@ -93,6 +94,7 @@ struct clock_event_device { | |||
| 93 | struct list_head list; | 94 | struct list_head list; |
| 94 | enum clock_event_mode mode; | 95 | enum clock_event_mode mode; |
| 95 | ktime_t next_event; | 96 | ktime_t next_event; |
| 97 | unsigned long retries; | ||
| 96 | }; | 98 | }; |
| 97 | 99 | ||
| 98 | /* | 100 | /* |
diff --git a/include/linux/coda_psdev.h b/include/linux/coda_psdev.h index 5b5d4731f956..8859e2ede9fe 100644 --- a/include/linux/coda_psdev.h +++ b/include/linux/coda_psdev.h | |||
| @@ -7,6 +7,8 @@ | |||
| 7 | #define MAX_CODADEVS 5 /* how many do we allow */ | 7 | #define MAX_CODADEVS 5 /* how many do we allow */ |
| 8 | 8 | ||
| 9 | #ifdef __KERNEL__ | 9 | #ifdef __KERNEL__ |
| 10 | #include <linux/backing-dev.h> | ||
| 11 | |||
| 10 | struct kstatfs; | 12 | struct kstatfs; |
| 11 | 13 | ||
| 12 | /* communication pending/processing queues */ | 14 | /* communication pending/processing queues */ |
| @@ -17,6 +19,7 @@ struct venus_comm { | |||
| 17 | struct list_head vc_processing; | 19 | struct list_head vc_processing; |
| 18 | int vc_inuse; | 20 | int vc_inuse; |
| 19 | struct super_block *vc_sb; | 21 | struct super_block *vc_sb; |
| 22 | struct backing_dev_info bdi; | ||
| 20 | }; | 23 | }; |
| 21 | 24 | ||
| 22 | 25 | ||
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 30b93b2a01a4..eebb617c17d8 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
| @@ -186,6 +186,8 @@ d_iput: no no no yes | |||
| 186 | 186 | ||
| 187 | #define DCACHE_FSNOTIFY_PARENT_WATCHED 0x0080 /* Parent inode is watched by some fsnotify listener */ | 187 | #define DCACHE_FSNOTIFY_PARENT_WATCHED 0x0080 /* Parent inode is watched by some fsnotify listener */ |
| 188 | 188 | ||
| 189 | #define DCACHE_CANT_MOUNT 0x0100 | ||
| 190 | |||
| 189 | extern spinlock_t dcache_lock; | 191 | extern spinlock_t dcache_lock; |
| 190 | extern seqlock_t rename_lock; | 192 | extern seqlock_t rename_lock; |
| 191 | 193 | ||
| @@ -358,6 +360,18 @@ static inline int d_unlinked(struct dentry *dentry) | |||
| 358 | return d_unhashed(dentry) && !IS_ROOT(dentry); | 360 | return d_unhashed(dentry) && !IS_ROOT(dentry); |
| 359 | } | 361 | } |
| 360 | 362 | ||
| 363 | static inline int cant_mount(struct dentry *dentry) | ||
| 364 | { | ||
| 365 | return (dentry->d_flags & DCACHE_CANT_MOUNT); | ||
| 366 | } | ||
| 367 | |||
| 368 | static inline void dont_mount(struct dentry *dentry) | ||
| 369 | { | ||
| 370 | spin_lock(&dentry->d_lock); | ||
| 371 | dentry->d_flags |= DCACHE_CANT_MOUNT; | ||
| 372 | spin_unlock(&dentry->d_lock); | ||
| 373 | } | ||
| 374 | |||
| 361 | static inline struct dentry *dget_parent(struct dentry *dentry) | 375 | static inline struct dentry *dget_parent(struct dentry *dentry) |
| 362 | { | 376 | { |
| 363 | struct dentry *ret; | 377 | struct dentry *ret; |
diff --git a/include/linux/delayacct.h b/include/linux/delayacct.h index 5076fe0c8a96..6cee17c22313 100644 --- a/include/linux/delayacct.h +++ b/include/linux/delayacct.h | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #define _LINUX_DELAYACCT_H | 18 | #define _LINUX_DELAYACCT_H |
| 19 | 19 | ||
| 20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
| 21 | #include <linux/slab.h> | ||
| 21 | 22 | ||
| 22 | /* | 23 | /* |
| 23 | * Per-task flags relevant to delay accounting | 24 | * Per-task flags relevant to delay accounting |
diff --git a/include/linux/drbd.h b/include/linux/drbd.h index 78962272338a..4341b1a97a34 100644 --- a/include/linux/drbd.h +++ b/include/linux/drbd.h | |||
| @@ -56,7 +56,7 @@ extern const char *drbd_buildtag(void); | |||
| 56 | #define REL_VERSION "8.3.7" | 56 | #define REL_VERSION "8.3.7" |
| 57 | #define API_VERSION 88 | 57 | #define API_VERSION 88 |
| 58 | #define PRO_VERSION_MIN 86 | 58 | #define PRO_VERSION_MIN 86 |
| 59 | #define PRO_VERSION_MAX 91 | 59 | #define PRO_VERSION_MAX 92 |
| 60 | 60 | ||
| 61 | 61 | ||
| 62 | enum drbd_io_error_p { | 62 | enum drbd_io_error_p { |
diff --git a/include/linux/drbd_nl.h b/include/linux/drbd_nl.h index a4d82f895994..f7431a4ca608 100644 --- a/include/linux/drbd_nl.h +++ b/include/linux/drbd_nl.h | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | #endif | 12 | #endif |
| 13 | 13 | ||
| 14 | NL_PACKET(primary, 1, | 14 | NL_PACKET(primary, 1, |
| 15 | NL_BIT( 1, T_MAY_IGNORE, overwrite_peer) | 15 | NL_BIT( 1, T_MAY_IGNORE, primary_force) |
| 16 | ) | 16 | ) |
| 17 | 17 | ||
| 18 | NL_PACKET(secondary, 2, ) | 18 | NL_PACKET(secondary, 2, ) |
| @@ -63,6 +63,7 @@ NL_PACKET(net_conf, 5, | |||
| 63 | NL_BIT( 41, T_MAY_IGNORE, always_asbp) | 63 | NL_BIT( 41, T_MAY_IGNORE, always_asbp) |
| 64 | NL_BIT( 61, T_MAY_IGNORE, no_cork) | 64 | NL_BIT( 61, T_MAY_IGNORE, no_cork) |
| 65 | NL_BIT( 62, T_MANDATORY, auto_sndbuf_size) | 65 | NL_BIT( 62, T_MANDATORY, auto_sndbuf_size) |
| 66 | NL_BIT( 70, T_MANDATORY, dry_run) | ||
| 66 | ) | 67 | ) |
| 67 | 68 | ||
| 68 | NL_PACKET(disconnect, 6, ) | 69 | NL_PACKET(disconnect, 6, ) |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index cac84b006667..5f494b465097 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
| @@ -565,17 +565,17 @@ enum { | |||
| 565 | 565 | ||
| 566 | static inline int ext3_test_inode_state(struct inode *inode, int bit) | 566 | static inline int ext3_test_inode_state(struct inode *inode, int bit) |
| 567 | { | 567 | { |
| 568 | return test_bit(bit, &EXT3_I(inode)->i_state); | 568 | return test_bit(bit, &EXT3_I(inode)->i_state_flags); |
| 569 | } | 569 | } |
| 570 | 570 | ||
| 571 | static inline void ext3_set_inode_state(struct inode *inode, int bit) | 571 | static inline void ext3_set_inode_state(struct inode *inode, int bit) |
| 572 | { | 572 | { |
| 573 | set_bit(bit, &EXT3_I(inode)->i_state); | 573 | set_bit(bit, &EXT3_I(inode)->i_state_flags); |
| 574 | } | 574 | } |
| 575 | 575 | ||
| 576 | static inline void ext3_clear_inode_state(struct inode *inode, int bit) | 576 | static inline void ext3_clear_inode_state(struct inode *inode, int bit) |
| 577 | { | 577 | { |
| 578 | clear_bit(bit, &EXT3_I(inode)->i_state); | 578 | clear_bit(bit, &EXT3_I(inode)->i_state_flags); |
| 579 | } | 579 | } |
| 580 | #else | 580 | #else |
| 581 | /* Assume that user mode programs are passing in an ext3fs superblock, not | 581 | /* Assume that user mode programs are passing in an ext3fs superblock, not |
diff --git a/include/linux/ext3_fs_i.h b/include/linux/ext3_fs_i.h index 7679acdb519a..f42c098aed8d 100644 --- a/include/linux/ext3_fs_i.h +++ b/include/linux/ext3_fs_i.h | |||
| @@ -87,7 +87,7 @@ struct ext3_inode_info { | |||
| 87 | * near to their parent directory's inode. | 87 | * near to their parent directory's inode. |
| 88 | */ | 88 | */ |
| 89 | __u32 i_block_group; | 89 | __u32 i_block_group; |
| 90 | unsigned long i_state; /* Dynamic state flags for ext3 */ | 90 | unsigned long i_state_flags; /* Dynamic state flags for ext3 */ |
| 91 | 91 | ||
| 92 | /* block reservation info */ | 92 | /* block reservation info */ |
| 93 | struct ext3_block_alloc_info *i_block_alloc_info; | 93 | struct ext3_block_alloc_info *i_block_alloc_info; |
diff --git a/include/linux/firewire-cdev.h b/include/linux/firewire-cdev.h index 40b11013408e..68f883b30a53 100644 --- a/include/linux/firewire-cdev.h +++ b/include/linux/firewire-cdev.h | |||
| @@ -1,21 +1,26 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Char device interface. | 2 | * Char device interface. |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2005-2006 Kristian Hoegsberg <krh@bitplanet.net> | 4 | * Copyright (C) 2005-2007 Kristian Hoegsberg <krh@bitplanet.net> |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | 6 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 7 | * it under the terms of the GNU General Public License as published by | 7 | * copy of this software and associated documentation files (the "Software"), |
| 8 | * the Free Software Foundation; either version 2 of the License, or | 8 | * to deal in the Software without restriction, including without limitation |
| 9 | * (at your option) any later version. | 9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 10 | * | 10 | * and/or sell copies of the Software, and to permit persons to whom the |
| 11 | * This program is distributed in the hope that it will be useful, | 11 | * Software is furnished to do so, subject to the following conditions: |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * The above copyright notice and this permission notice (including the next |
| 14 | * GNU General Public License for more details. | 14 | * paragraph) shall be included in all copies or substantial portions of the |
| 15 | * | 15 | * Software. |
| 16 | * You should have received a copy of the GNU General Public License | 16 | * |
| 17 | * along with this program; if not, write to the Free Software Foundation, | 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 18 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 20 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 21 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 22 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
| 23 | * DEALINGS IN THE SOFTWARE. | ||
| 19 | */ | 24 | */ |
| 20 | 25 | ||
| 21 | #ifndef _LINUX_FIREWIRE_CDEV_H | 26 | #ifndef _LINUX_FIREWIRE_CDEV_H |
| @@ -438,7 +443,7 @@ struct fw_cdev_remove_descriptor { | |||
| 438 | * @type: %FW_CDEV_ISO_CONTEXT_TRANSMIT or %FW_CDEV_ISO_CONTEXT_RECEIVE | 443 | * @type: %FW_CDEV_ISO_CONTEXT_TRANSMIT or %FW_CDEV_ISO_CONTEXT_RECEIVE |
| 439 | * @header_size: Header size to strip for receive contexts | 444 | * @header_size: Header size to strip for receive contexts |
| 440 | * @channel: Channel to bind to | 445 | * @channel: Channel to bind to |
| 441 | * @speed: Speed to transmit at | 446 | * @speed: Speed for transmit contexts |
| 442 | * @closure: To be returned in &fw_cdev_event_iso_interrupt | 447 | * @closure: To be returned in &fw_cdev_event_iso_interrupt |
| 443 | * @handle: Handle to context, written back by kernel | 448 | * @handle: Handle to context, written back by kernel |
| 444 | * | 449 | * |
| @@ -451,6 +456,9 @@ struct fw_cdev_remove_descriptor { | |||
| 451 | * If a context was successfully created, the kernel writes back a handle to the | 456 | * If a context was successfully created, the kernel writes back a handle to the |
| 452 | * context, which must be passed in for subsequent operations on that context. | 457 | * context, which must be passed in for subsequent operations on that context. |
| 453 | * | 458 | * |
| 459 | * For receive contexts, @header_size must be at least 4 and must be a multiple | ||
| 460 | * of 4. | ||
| 461 | * | ||
| 454 | * Note that the effect of a @header_size > 4 depends on | 462 | * Note that the effect of a @header_size > 4 depends on |
| 455 | * &fw_cdev_get_info.version, as documented at &fw_cdev_event_iso_interrupt. | 463 | * &fw_cdev_get_info.version, as documented at &fw_cdev_event_iso_interrupt. |
| 456 | */ | 464 | */ |
| @@ -481,10 +489,34 @@ struct fw_cdev_create_iso_context { | |||
| 481 | * | 489 | * |
| 482 | * &struct fw_cdev_iso_packet is used to describe isochronous packet queues. | 490 | * &struct fw_cdev_iso_packet is used to describe isochronous packet queues. |
| 483 | * | 491 | * |
| 484 | * Use the FW_CDEV_ISO_ macros to fill in @control. The sy and tag fields are | 492 | * Use the FW_CDEV_ISO_ macros to fill in @control. |
| 485 | * specified by IEEE 1394a and IEC 61883. | 493 | * |
| 486 | * | 494 | * For transmit packets, the header length must be a multiple of 4 and specifies |
| 487 | * FIXME - finish this documentation | 495 | * the numbers of bytes in @header that will be prepended to the packet's |
| 496 | * payload; these bytes are copied into the kernel and will not be accessed | ||
| 497 | * after the ioctl has returned. The sy and tag fields are copied to the iso | ||
| 498 | * packet header (these fields are specified by IEEE 1394a and IEC 61883-1). | ||
| 499 | * The skip flag specifies that no packet is to be sent in a frame; when using | ||
| 500 | * this, all other fields except the interrupt flag must be zero. | ||
| 501 | * | ||
| 502 | * For receive packets, the header length must be a multiple of the context's | ||
| 503 | * header size; if the header length is larger than the context's header size, | ||
| 504 | * multiple packets are queued for this entry. The sy and tag fields are | ||
| 505 | * ignored. If the sync flag is set, the context drops all packets until | ||
| 506 | * a packet with a matching sy field is received (the sync value to wait for is | ||
| 507 | * specified in the &fw_cdev_start_iso structure). The payload length defines | ||
| 508 | * how many payload bytes can be received for one packet (in addition to payload | ||
| 509 | * quadlets that have been defined as headers and are stripped and returned in | ||
| 510 | * the &fw_cdev_event_iso_interrupt structure). If more bytes are received, the | ||
| 511 | * additional bytes are dropped. If less bytes are received, the remaining | ||
| 512 | * bytes in this part of the payload buffer will not be written to, not even by | ||
| 513 | * the next packet, i.e., packets received in consecutive frames will not | ||
| 514 | * necessarily be consecutive in memory. If an entry has queued multiple | ||
| 515 | * packets, the payload length is divided equally among them. | ||
| 516 | * | ||
| 517 | * When a packet with the interrupt flag set has been completed, the | ||
| 518 | * &fw_cdev_event_iso_interrupt event will be sent. An entry that has queued | ||
| 519 | * multiple receive packets is completed when its last packet is completed. | ||
| 488 | */ | 520 | */ |
| 489 | struct fw_cdev_iso_packet { | 521 | struct fw_cdev_iso_packet { |
| 490 | __u32 control; | 522 | __u32 control; |
| @@ -501,7 +533,7 @@ struct fw_cdev_iso_packet { | |||
| 501 | * Queue a number of isochronous packets for reception or transmission. | 533 | * Queue a number of isochronous packets for reception or transmission. |
| 502 | * This ioctl takes a pointer to an array of &fw_cdev_iso_packet structs, | 534 | * This ioctl takes a pointer to an array of &fw_cdev_iso_packet structs, |
| 503 | * which describe how to transmit from or receive into a contiguous region | 535 | * which describe how to transmit from or receive into a contiguous region |
| 504 | * of a mmap()'ed payload buffer. As part of the packet descriptors, | 536 | * of a mmap()'ed payload buffer. As part of transmit packet descriptors, |
| 505 | * a series of headers can be supplied, which will be prepended to the | 537 | * a series of headers can be supplied, which will be prepended to the |
| 506 | * payload during DMA. | 538 | * payload during DMA. |
| 507 | * | 539 | * |
| @@ -620,8 +652,8 @@ struct fw_cdev_get_cycle_timer2 { | |||
| 620 | * instead of allocated. | 652 | * instead of allocated. |
| 621 | * An %FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED event concludes this operation. | 653 | * An %FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED event concludes this operation. |
| 622 | * | 654 | * |
| 623 | * To summarize, %FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE allocates iso resources | 655 | * To summarize, %FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE allocates iso resources |
| 624 | * for the lifetime of the fd or handle. | 656 | * for the lifetime of the fd or @handle. |
| 625 | * In contrast, %FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE_ONCE allocates iso resources | 657 | * In contrast, %FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE_ONCE allocates iso resources |
| 626 | * for the duration of a bus generation. | 658 | * for the duration of a bus generation. |
| 627 | * | 659 | * |
diff --git a/include/linux/firewire-constants.h b/include/linux/firewire-constants.h index b316770a43fd..9b4bb5fbba4b 100644 --- a/include/linux/firewire-constants.h +++ b/include/linux/firewire-constants.h | |||
| @@ -1,3 +1,28 @@ | |||
| 1 | /* | ||
| 2 | * IEEE 1394 constants. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2005-2007 Kristian Hoegsberg <krh@bitplanet.net> | ||
| 5 | * | ||
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
| 7 | * copy of this software and associated documentation files (the "Software"), | ||
| 8 | * to deal in the Software without restriction, including without limitation | ||
| 9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
| 10 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 11 | * Software is furnished to do so, subject to the following conditions: | ||
| 12 | * | ||
| 13 | * The above copyright notice and this permission notice (including the next | ||
| 14 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 15 | * Software. | ||
| 16 | * | ||
| 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 20 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 21 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 22 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
| 23 | * DEALINGS IN THE SOFTWARE. | ||
| 24 | */ | ||
| 25 | |||
| 1 | #ifndef _LINUX_FIREWIRE_CONSTANTS_H | 26 | #ifndef _LINUX_FIREWIRE_CONSTANTS_H |
| 2 | #define _LINUX_FIREWIRE_CONSTANTS_H | 27 | #define _LINUX_FIREWIRE_CONSTANTS_H |
| 3 | 28 | ||
| @@ -21,7 +46,7 @@ | |||
| 21 | #define EXTCODE_WRAP_ADD 0x6 | 46 | #define EXTCODE_WRAP_ADD 0x6 |
| 22 | #define EXTCODE_VENDOR_DEPENDENT 0x7 | 47 | #define EXTCODE_VENDOR_DEPENDENT 0x7 |
| 23 | 48 | ||
| 24 | /* Juju specific tcodes */ | 49 | /* Linux firewire-core (Juju) specific tcodes */ |
| 25 | #define TCODE_LOCK_MASK_SWAP (0x10 | EXTCODE_MASK_SWAP) | 50 | #define TCODE_LOCK_MASK_SWAP (0x10 | EXTCODE_MASK_SWAP) |
| 26 | #define TCODE_LOCK_COMPARE_SWAP (0x10 | EXTCODE_COMPARE_SWAP) | 51 | #define TCODE_LOCK_COMPARE_SWAP (0x10 | EXTCODE_COMPARE_SWAP) |
| 27 | #define TCODE_LOCK_FETCH_ADD (0x10 | EXTCODE_FETCH_ADD) | 52 | #define TCODE_LOCK_FETCH_ADD (0x10 | EXTCODE_FETCH_ADD) |
| @@ -36,7 +61,7 @@ | |||
| 36 | #define RCODE_TYPE_ERROR 0x6 | 61 | #define RCODE_TYPE_ERROR 0x6 |
| 37 | #define RCODE_ADDRESS_ERROR 0x7 | 62 | #define RCODE_ADDRESS_ERROR 0x7 |
| 38 | 63 | ||
| 39 | /* Juju specific rcodes */ | 64 | /* Linux firewire-core (Juju) specific rcodes */ |
| 40 | #define RCODE_SEND_ERROR 0x10 | 65 | #define RCODE_SEND_ERROR 0x10 |
| 41 | #define RCODE_CANCELLED 0x11 | 66 | #define RCODE_CANCELLED 0x11 |
| 42 | #define RCODE_BUSY 0x12 | 67 | #define RCODE_BUSY 0x12 |
diff --git a/include/linux/freezer.h b/include/linux/freezer.h index 5a361f85cfec..da7e52b099f3 100644 --- a/include/linux/freezer.h +++ b/include/linux/freezer.h | |||
| @@ -64,9 +64,12 @@ extern bool freeze_task(struct task_struct *p, bool sig_only); | |||
| 64 | extern void cancel_freezing(struct task_struct *p); | 64 | extern void cancel_freezing(struct task_struct *p); |
| 65 | 65 | ||
| 66 | #ifdef CONFIG_CGROUP_FREEZER | 66 | #ifdef CONFIG_CGROUP_FREEZER |
| 67 | extern int cgroup_frozen(struct task_struct *task); | 67 | extern int cgroup_freezing_or_frozen(struct task_struct *task); |
| 68 | #else /* !CONFIG_CGROUP_FREEZER */ | 68 | #else /* !CONFIG_CGROUP_FREEZER */ |
| 69 | static inline int cgroup_frozen(struct task_struct *task) { return 0; } | 69 | static inline int cgroup_freezing_or_frozen(struct task_struct *task) |
| 70 | { | ||
| 71 | return 0; | ||
| 72 | } | ||
| 70 | #endif /* !CONFIG_CGROUP_FREEZER */ | 73 | #endif /* !CONFIG_CGROUP_FREEZER */ |
| 71 | 74 | ||
| 72 | /* | 75 | /* |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 10b8dedcd18b..44f35aea2f1f 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -2212,6 +2212,7 @@ extern int generic_segment_checks(const struct iovec *iov, | |||
| 2212 | /* fs/block_dev.c */ | 2212 | /* fs/block_dev.c */ |
| 2213 | extern ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov, | 2213 | extern ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov, |
| 2214 | unsigned long nr_segs, loff_t pos); | 2214 | unsigned long nr_segs, loff_t pos); |
| 2215 | extern int blkdev_fsync(struct file *filp, struct dentry *dentry, int datasync); | ||
| 2215 | 2216 | ||
| 2216 | /* fs/splice.c */ | 2217 | /* fs/splice.c */ |
| 2217 | extern ssize_t generic_file_splice_read(struct file *, loff_t *, | 2218 | extern ssize_t generic_file_splice_read(struct file *, loff_t *, |
| @@ -2314,8 +2315,9 @@ extern int vfs_fstatat(int , char __user *, struct kstat *, int); | |||
| 2314 | extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd, | 2315 | extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd, |
| 2315 | unsigned long arg); | 2316 | unsigned long arg); |
| 2316 | extern int __generic_block_fiemap(struct inode *inode, | 2317 | extern int __generic_block_fiemap(struct inode *inode, |
| 2317 | struct fiemap_extent_info *fieinfo, u64 start, | 2318 | struct fiemap_extent_info *fieinfo, |
| 2318 | u64 len, get_block_t *get_block); | 2319 | loff_t start, loff_t len, |
| 2320 | get_block_t *get_block); | ||
| 2319 | extern int generic_block_fiemap(struct inode *inode, | 2321 | extern int generic_block_fiemap(struct inode *inode, |
| 2320 | struct fiemap_extent_info *fieinfo, u64 start, | 2322 | struct fiemap_extent_info *fieinfo, u64 start, |
| 2321 | u64 len, get_block_t *get_block); | 2323 | u64 len, get_block_t *get_block); |
diff --git a/include/linux/fscache-cache.h b/include/linux/fscache-cache.h index 7be0c6fbe880..c57db27ac861 100644 --- a/include/linux/fscache-cache.h +++ b/include/linux/fscache-cache.h | |||
| @@ -105,7 +105,7 @@ struct fscache_operation { | |||
| 105 | /* operation releaser */ | 105 | /* operation releaser */ |
| 106 | fscache_operation_release_t release; | 106 | fscache_operation_release_t release; |
| 107 | 107 | ||
| 108 | #ifdef CONFIG_SLOW_WORK_PROC | 108 | #ifdef CONFIG_SLOW_WORK_DEBUG |
| 109 | const char *name; /* operation name */ | 109 | const char *name; /* operation name */ |
| 110 | const char *state; /* operation state */ | 110 | const char *state; /* operation state */ |
| 111 | #define fscache_set_op_name(OP, N) do { (OP)->name = (N); } while(0) | 111 | #define fscache_set_op_name(OP, N) do { (OP)->name = (N); } while(0) |
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index df8fd9a3b214..01755909ce81 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include <linux/inotify.h> | 15 | #include <linux/inotify.h> |
| 16 | #include <linux/fsnotify_backend.h> | 16 | #include <linux/fsnotify_backend.h> |
| 17 | #include <linux/audit.h> | 17 | #include <linux/audit.h> |
| 18 | #include <linux/slab.h> | ||
| 18 | 19 | ||
| 19 | /* | 20 | /* |
| 20 | * fsnotify_d_instantiate - instantiate a dentry for inode | 21 | * fsnotify_d_instantiate - instantiate a dentry for inode |
diff --git a/include/linux/gameport.h b/include/linux/gameport.h index 48e68da097f6..361d1cc288d0 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include <linux/mutex.h> | 16 | #include <linux/mutex.h> |
| 17 | #include <linux/device.h> | 17 | #include <linux/device.h> |
| 18 | #include <linux/timer.h> | 18 | #include <linux/timer.h> |
| 19 | #include <linux/slab.h> | ||
| 19 | 20 | ||
| 20 | struct gameport { | 21 | struct gameport { |
| 21 | 22 | ||
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 56b50514ab25..5f2f4c4d8fb0 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
| @@ -109,7 +109,7 @@ struct hd_struct { | |||
| 109 | }; | 109 | }; |
| 110 | 110 | ||
| 111 | #define GENHD_FL_REMOVABLE 1 | 111 | #define GENHD_FL_REMOVABLE 1 |
| 112 | #define GENHD_FL_DRIVERFS 2 | 112 | /* 2 is unused */ |
| 113 | #define GENHD_FL_MEDIA_CHANGE_NOTIFY 4 | 113 | #define GENHD_FL_MEDIA_CHANGE_NOTIFY 4 |
| 114 | #define GENHD_FL_CD 8 | 114 | #define GENHD_FL_CD 8 |
| 115 | #define GENHD_FL_UP 16 | 115 | #define GENHD_FL_UP 16 |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 0a5da639b327..6ed1d59bfb1e 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
| @@ -355,6 +355,8 @@ struct i2c_adapter { | |||
| 355 | int nr; | 355 | int nr; |
| 356 | char name[48]; | 356 | char name[48]; |
| 357 | struct completion dev_released; | 357 | struct completion dev_released; |
| 358 | |||
| 359 | struct list_head userspace_clients; | ||
| 358 | }; | 360 | }; |
| 359 | #define to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev) | 361 | #define to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev) |
| 360 | 362 | ||
diff --git a/include/linux/i2o.h b/include/linux/i2o.h index 87018dc5527d..9e7a12d6385d 100644 --- a/include/linux/i2o.h +++ b/include/linux/i2o.h | |||
| @@ -782,7 +782,6 @@ extern int i2o_exec_lct_get(struct i2o_controller *); | |||
| 782 | #define to_i2o_driver(drv) container_of(drv,struct i2o_driver, driver) | 782 | #define to_i2o_driver(drv) container_of(drv,struct i2o_driver, driver) |
| 783 | #define to_i2o_device(dev) container_of(dev, struct i2o_device, device) | 783 | #define to_i2o_device(dev) container_of(dev, struct i2o_device, device) |
| 784 | #define to_i2o_controller(dev) container_of(dev, struct i2o_controller, device) | 784 | #define to_i2o_controller(dev) container_of(dev, struct i2o_controller, device) |
| 785 | #define kobj_to_i2o_device(kobj) to_i2o_device(container_of(kobj, struct device, kobj)) | ||
| 786 | 785 | ||
| 787 | /** | 786 | /** |
| 788 | * i2o_out_to_virt - Turn an I2O message to a virtual address | 787 | * i2o_out_to_virt - Turn an I2O message to a virtual address |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 97e6ab435184..3239d1c10acb 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
| @@ -1169,6 +1169,7 @@ extern void ide_stall_queue(ide_drive_t *drive, unsigned long timeout); | |||
| 1169 | extern void ide_timer_expiry(unsigned long); | 1169 | extern void ide_timer_expiry(unsigned long); |
| 1170 | extern irqreturn_t ide_intr(int irq, void *dev_id); | 1170 | extern irqreturn_t ide_intr(int irq, void *dev_id); |
| 1171 | extern void do_ide_request(struct request_queue *); | 1171 | extern void do_ide_request(struct request_queue *); |
| 1172 | extern void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq); | ||
| 1172 | 1173 | ||
| 1173 | void ide_init_disk(struct gendisk *, ide_drive_t *); | 1174 | void ide_init_disk(struct gendisk *, ide_drive_t *); |
| 1174 | 1175 | ||
diff --git a/include/linux/if_link.h b/include/linux/if_link.h index c9bf92cd7653..d94963b379d9 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h | |||
| @@ -79,10 +79,7 @@ enum { | |||
| 79 | IFLA_NET_NS_PID, | 79 | IFLA_NET_NS_PID, |
| 80 | IFLA_IFALIAS, | 80 | IFLA_IFALIAS, |
| 81 | IFLA_NUM_VF, /* Number of VFs if device is SR-IOV PF */ | 81 | IFLA_NUM_VF, /* Number of VFs if device is SR-IOV PF */ |
| 82 | IFLA_VF_MAC, /* Hardware queue specific attributes */ | 82 | IFLA_VFINFO_LIST, |
| 83 | IFLA_VF_VLAN, | ||
| 84 | IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */ | ||
| 85 | IFLA_VFINFO, | ||
| 86 | __IFLA_MAX | 83 | __IFLA_MAX |
| 87 | }; | 84 | }; |
| 88 | 85 | ||
| @@ -203,6 +200,24 @@ enum macvlan_mode { | |||
| 203 | 200 | ||
| 204 | /* SR-IOV virtual function managment section */ | 201 | /* SR-IOV virtual function managment section */ |
| 205 | 202 | ||
| 203 | enum { | ||
| 204 | IFLA_VF_INFO_UNSPEC, | ||
| 205 | IFLA_VF_INFO, | ||
| 206 | __IFLA_VF_INFO_MAX, | ||
| 207 | }; | ||
| 208 | |||
| 209 | #define IFLA_VF_INFO_MAX (__IFLA_VF_INFO_MAX - 1) | ||
| 210 | |||
| 211 | enum { | ||
| 212 | IFLA_VF_UNSPEC, | ||
| 213 | IFLA_VF_MAC, /* Hardware queue specific attributes */ | ||
| 214 | IFLA_VF_VLAN, | ||
| 215 | IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */ | ||
| 216 | __IFLA_VF_MAX, | ||
| 217 | }; | ||
| 218 | |||
| 219 | #define IFLA_VF_MAX (__IFLA_VF_MAX - 1) | ||
| 220 | |||
| 206 | struct ifla_vf_mac { | 221 | struct ifla_vf_mac { |
| 207 | __u32 vf; | 222 | __u32 vf; |
| 208 | __u8 mac[32]; /* MAX_ADDR_LEN */ | 223 | __u8 mac[32]; /* MAX_ADDR_LEN */ |
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h index 1822d635be6b..16b92d008bed 100644 --- a/include/linux/if_tunnel.h +++ b/include/linux/if_tunnel.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define _IF_TUNNEL_H_ | 2 | #define _IF_TUNNEL_H_ |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
| 5 | #include <asm/byteorder.h> | ||
| 5 | 6 | ||
| 6 | #ifdef __KERNEL__ | 7 | #ifdef __KERNEL__ |
| 7 | #include <linux/ip.h> | 8 | #include <linux/ip.h> |
diff --git a/include/linux/input/matrix_keypad.h b/include/linux/input/matrix_keypad.h index 3bd018baae20..c964cd7f436a 100644 --- a/include/linux/input/matrix_keypad.h +++ b/include/linux/input/matrix_keypad.h | |||
| @@ -44,6 +44,7 @@ struct matrix_keymap_data { | |||
| 44 | * @active_low: gpio polarity | 44 | * @active_low: gpio polarity |
| 45 | * @wakeup: controls whether the device should be set up as wakeup | 45 | * @wakeup: controls whether the device should be set up as wakeup |
| 46 | * source | 46 | * source |
| 47 | * @no_autorepeat: disable key autorepeat | ||
| 47 | * | 48 | * |
| 48 | * This structure represents platform-specific data that use used by | 49 | * This structure represents platform-specific data that use used by |
| 49 | * matrix_keypad driver to perform proper initialization. | 50 | * matrix_keypad driver to perform proper initialization. |
| @@ -64,6 +65,7 @@ struct matrix_keypad_platform_data { | |||
| 64 | 65 | ||
| 65 | bool active_low; | 66 | bool active_low; |
| 66 | bool wakeup; | 67 | bool wakeup; |
| 68 | bool no_autorepeat; | ||
| 67 | }; | 69 | }; |
| 68 | 70 | ||
| 69 | /** | 71 | /** |
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h index 97eb928b4924..25085ddd955f 100644 --- a/include/linux/io-mapping.h +++ b/include/linux/io-mapping.h | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #define _LINUX_IO_MAPPING_H | 19 | #define _LINUX_IO_MAPPING_H |
| 20 | 20 | ||
| 21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
| 22 | #include <linux/slab.h> | ||
| 22 | #include <asm/io.h> | 23 | #include <asm/io.h> |
| 23 | #include <asm/page.h> | 24 | #include <asm/page.h> |
| 24 | #include <asm/iomap.h> | 25 | #include <asm/iomap.h> |
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 71ab79da7e7f..26fad187d661 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
| @@ -112,12 +112,14 @@ struct resource_list { | |||
| 112 | extern struct resource ioport_resource; | 112 | extern struct resource ioport_resource; |
| 113 | extern struct resource iomem_resource; | 113 | extern struct resource iomem_resource; |
| 114 | 114 | ||
| 115 | extern struct resource *request_resource_conflict(struct resource *root, struct resource *new); | ||
| 115 | extern int request_resource(struct resource *root, struct resource *new); | 116 | extern int request_resource(struct resource *root, struct resource *new); |
| 116 | extern int release_resource(struct resource *new); | 117 | extern int release_resource(struct resource *new); |
| 117 | void release_child_resources(struct resource *new); | 118 | void release_child_resources(struct resource *new); |
| 118 | extern void reserve_region_with_split(struct resource *root, | 119 | extern void reserve_region_with_split(struct resource *root, |
| 119 | resource_size_t start, resource_size_t end, | 120 | resource_size_t start, resource_size_t end, |
| 120 | const char *name); | 121 | const char *name); |
| 122 | extern struct resource *insert_resource_conflict(struct resource *parent, struct resource *new); | ||
| 121 | extern int insert_resource(struct resource *parent, struct resource *new); | 123 | extern int insert_resource(struct resource *parent, struct resource *new); |
| 122 | extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new); | 124 | extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new); |
| 123 | extern int allocate_resource(struct resource *root, struct resource *new, | 125 | extern int allocate_resource(struct resource *root, struct resource *new, |
diff --git a/include/linux/iscsi_ibft.h b/include/linux/iscsi_ibft.h index 6092487e2950..d2e4042f8f5e 100644 --- a/include/linux/iscsi_ibft.h +++ b/include/linux/iscsi_ibft.h | |||
| @@ -42,9 +42,13 @@ extern struct ibft_table_header *ibft_addr; | |||
| 42 | * mapped address is set in the ibft_addr variable. | 42 | * mapped address is set in the ibft_addr variable. |
| 43 | */ | 43 | */ |
| 44 | #ifdef CONFIG_ISCSI_IBFT_FIND | 44 | #ifdef CONFIG_ISCSI_IBFT_FIND |
| 45 | extern void __init reserve_ibft_region(void); | 45 | unsigned long find_ibft_region(unsigned long *sizep); |
| 46 | #else | 46 | #else |
| 47 | static inline void reserve_ibft_region(void) { } | 47 | static inline unsigned long find_ibft_region(unsigned long *sizep) |
| 48 | { | ||
| 49 | *sizep = 0; | ||
| 50 | return 0; | ||
| 51 | } | ||
| 48 | #endif | 52 | #endif |
| 49 | 53 | ||
| 50 | #endif /* ISCSI_IBFT_H */ | 54 | #endif /* ISCSI_IBFT_H */ |
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index f3aa59cb675d..516a2a27e87a 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
| 32 | #include <linux/timer.h> | 32 | #include <linux/timer.h> |
| 33 | #include <linux/lockdep.h> | 33 | #include <linux/lockdep.h> |
| 34 | #include <linux/slab.h> | ||
| 34 | 35 | ||
| 35 | #define journal_oom_retry 1 | 36 | #define journal_oom_retry 1 |
| 36 | 37 | ||
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 1ec876358180..a4d2e9f7088a 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
| @@ -30,6 +30,7 @@ | |||
| 30 | #include <linux/bit_spinlock.h> | 30 | #include <linux/bit_spinlock.h> |
| 31 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
| 32 | #include <linux/timer.h> | 32 | #include <linux/timer.h> |
| 33 | #include <linux/slab.h> | ||
| 33 | #endif | 34 | #endif |
| 34 | 35 | ||
| 35 | #define journal_oom_retry 1 | 36 | #define journal_oom_retry 1 |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 7f0707463360..9365227dbaf6 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -426,7 +426,7 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
| 426 | .burst = DEFAULT_RATELIMIT_BURST, \ | 426 | .burst = DEFAULT_RATELIMIT_BURST, \ |
| 427 | }; \ | 427 | }; \ |
| 428 | \ | 428 | \ |
| 429 | if (!__ratelimit(&_rs)) \ | 429 | if (__ratelimit(&_rs)) \ |
| 430 | printk(fmt, ##__VA_ARGS__); \ | 430 | printk(fmt, ##__VA_ARGS__); \ |
| 431 | }) | 431 | }) |
| 432 | #else | 432 | #else |
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index bc0fc795bd35..e117b1aee69c 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h | |||
| @@ -86,7 +86,8 @@ union { \ | |||
| 86 | */ | 86 | */ |
| 87 | #define INIT_KFIFO(name) \ | 87 | #define INIT_KFIFO(name) \ |
| 88 | name = __kfifo_initializer(sizeof(name##kfifo_buffer) - \ | 88 | name = __kfifo_initializer(sizeof(name##kfifo_buffer) - \ |
| 89 | sizeof(struct kfifo), name##kfifo_buffer) | 89 | sizeof(struct kfifo), \ |
| 90 | name##kfifo_buffer + sizeof(struct kfifo)) | ||
| 90 | 91 | ||
| 91 | /** | 92 | /** |
| 92 | * DEFINE_KFIFO - macro to define and initialize a kfifo | 93 | * DEFINE_KFIFO - macro to define and initialize a kfifo |
| @@ -102,8 +103,6 @@ union { \ | |||
| 102 | unsigned char name##kfifo_buffer[size]; \ | 103 | unsigned char name##kfifo_buffer[size]; \ |
| 103 | struct kfifo name = __kfifo_initializer(size, name##kfifo_buffer) | 104 | struct kfifo name = __kfifo_initializer(size, name##kfifo_buffer) |
| 104 | 105 | ||
| 105 | #undef __kfifo_initializer | ||
| 106 | |||
| 107 | extern void kfifo_init(struct kfifo *fifo, void *buffer, | 106 | extern void kfifo_init(struct kfifo *fifo, void *buffer, |
| 108 | unsigned int size); | 107 | unsigned int size); |
| 109 | extern __must_check int kfifo_alloc(struct kfifo *fifo, unsigned int size, | 108 | extern __must_check int kfifo_alloc(struct kfifo *fifo, unsigned int size, |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index a3fd0f91d943..169d07758ee5 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
| @@ -54,7 +54,7 @@ extern struct kmem_cache *kvm_vcpu_cache; | |||
| 54 | */ | 54 | */ |
| 55 | struct kvm_io_bus { | 55 | struct kvm_io_bus { |
| 56 | int dev_count; | 56 | int dev_count; |
| 57 | #define NR_IOBUS_DEVS 6 | 57 | #define NR_IOBUS_DEVS 200 |
| 58 | struct kvm_io_device *devs[NR_IOBUS_DEVS]; | 58 | struct kvm_io_device *devs[NR_IOBUS_DEVS]; |
| 59 | }; | 59 | }; |
| 60 | 60 | ||
| @@ -119,6 +119,11 @@ struct kvm_memory_slot { | |||
| 119 | int user_alloc; | 119 | int user_alloc; |
| 120 | }; | 120 | }; |
| 121 | 121 | ||
| 122 | static inline unsigned long kvm_dirty_bitmap_bytes(struct kvm_memory_slot *memslot) | ||
| 123 | { | ||
| 124 | return ALIGN(memslot->npages, BITS_PER_LONG) / 8; | ||
| 125 | } | ||
| 126 | |||
| 122 | struct kvm_kernel_irq_routing_entry { | 127 | struct kvm_kernel_irq_routing_entry { |
| 123 | u32 gsi; | 128 | u32 gsi; |
| 124 | u32 type; | 129 | u32 type; |
diff --git a/include/linux/lcm.h b/include/linux/lcm.h new file mode 100644 index 000000000000..7bf01d779b45 --- /dev/null +++ b/include/linux/lcm.h | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | #ifndef _LCM_H | ||
| 2 | #define _LCM_H | ||
| 3 | |||
| 4 | #include <linux/compiler.h> | ||
| 5 | |||
| 6 | unsigned long lcm(unsigned long a, unsigned long b) __attribute_const__; | ||
| 7 | |||
| 8 | #endif /* _LCM_H */ | ||
diff --git a/include/linux/libata.h b/include/linux/libata.h index f8ea71e6d0e2..b2f2003b92e5 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -146,6 +146,7 @@ enum { | |||
| 146 | ATA_DFLAG_SLEEPING = (1 << 15), /* device is sleeping */ | 146 | ATA_DFLAG_SLEEPING = (1 << 15), /* device is sleeping */ |
| 147 | ATA_DFLAG_DUBIOUS_XFER = (1 << 16), /* data transfer not verified */ | 147 | ATA_DFLAG_DUBIOUS_XFER = (1 << 16), /* data transfer not verified */ |
| 148 | ATA_DFLAG_NO_UNLOAD = (1 << 17), /* device doesn't support unload */ | 148 | ATA_DFLAG_NO_UNLOAD = (1 << 17), /* device doesn't support unload */ |
| 149 | ATA_DFLAG_UNLOCK_HPA = (1 << 18), /* unlock HPA */ | ||
| 149 | ATA_DFLAG_INIT_MASK = (1 << 24) - 1, | 150 | ATA_DFLAG_INIT_MASK = (1 << 24) - 1, |
| 150 | 151 | ||
| 151 | ATA_DFLAG_DETACH = (1 << 24), | 152 | ATA_DFLAG_DETACH = (1 << 24), |
diff --git a/include/linux/mm.h b/include/linux/mm.h index e70f21beb4b4..462acaf36f3a 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -783,8 +783,8 @@ struct mm_walk { | |||
| 783 | int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, struct mm_walk *); | 783 | int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, struct mm_walk *); |
| 784 | int (*pte_entry)(pte_t *, unsigned long, unsigned long, struct mm_walk *); | 784 | int (*pte_entry)(pte_t *, unsigned long, unsigned long, struct mm_walk *); |
| 785 | int (*pte_hole)(unsigned long, unsigned long, struct mm_walk *); | 785 | int (*pte_hole)(unsigned long, unsigned long, struct mm_walk *); |
| 786 | int (*hugetlb_entry)(pte_t *, unsigned long, unsigned long, | 786 | int (*hugetlb_entry)(pte_t *, unsigned long, |
| 787 | struct mm_walk *); | 787 | unsigned long, unsigned long, struct mm_walk *); |
| 788 | struct mm_struct *mm; | 788 | struct mm_struct *mm; |
| 789 | void *private; | 789 | void *private; |
| 790 | }; | 790 | }; |
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index c02c8db73701..8a49cbf0376d 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
| @@ -268,6 +268,7 @@ struct _mmc_csd { | |||
| 268 | 268 | ||
| 269 | #define EXT_CSD_CARD_TYPE_26 (1<<0) /* Card can run at 26MHz */ | 269 | #define EXT_CSD_CARD_TYPE_26 (1<<0) /* Card can run at 26MHz */ |
| 270 | #define EXT_CSD_CARD_TYPE_52 (1<<1) /* Card can run at 52MHz */ | 270 | #define EXT_CSD_CARD_TYPE_52 (1<<1) /* Card can run at 52MHz */ |
| 271 | #define EXT_CSD_CARD_TYPE_MASK 0x3 /* Mask out reserved and DDR bits */ | ||
| 271 | 272 | ||
| 272 | #define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */ | 273 | #define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */ |
| 273 | #define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */ | 274 | #define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */ |
diff --git a/include/linux/module.h b/include/linux/module.h index 5e869ffd34aa..515d53ae6a79 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -330,8 +330,11 @@ struct module | |||
| 330 | struct module_notes_attrs *notes_attrs; | 330 | struct module_notes_attrs *notes_attrs; |
| 331 | #endif | 331 | #endif |
| 332 | 332 | ||
| 333 | #ifdef CONFIG_SMP | ||
| 333 | /* Per-cpu data. */ | 334 | /* Per-cpu data. */ |
| 334 | void *percpu; | 335 | void __percpu *percpu; |
| 336 | unsigned int percpu_size; | ||
| 337 | #endif | ||
| 335 | 338 | ||
| 336 | /* The command line arguments (may be mangled). People like | 339 | /* The command line arguments (may be mangled). People like |
| 337 | keeping pointers to this stuff */ | 340 | keeping pointers to this stuff */ |
| @@ -365,7 +368,8 @@ struct module | |||
| 365 | void (*exit)(void); | 368 | void (*exit)(void); |
| 366 | 369 | ||
| 367 | struct module_ref { | 370 | struct module_ref { |
| 368 | int count; | 371 | unsigned int incs; |
| 372 | unsigned int decs; | ||
| 369 | } __percpu *refptr; | 373 | } __percpu *refptr; |
| 370 | #endif | 374 | #endif |
| 371 | 375 | ||
| @@ -392,6 +396,7 @@ static inline int module_is_live(struct module *mod) | |||
| 392 | struct module *__module_text_address(unsigned long addr); | 396 | struct module *__module_text_address(unsigned long addr); |
| 393 | struct module *__module_address(unsigned long addr); | 397 | struct module *__module_address(unsigned long addr); |
| 394 | bool is_module_address(unsigned long addr); | 398 | bool is_module_address(unsigned long addr); |
| 399 | bool is_module_percpu_address(unsigned long addr); | ||
| 395 | bool is_module_text_address(unsigned long addr); | 400 | bool is_module_text_address(unsigned long addr); |
| 396 | 401 | ||
| 397 | static inline int within_module_core(unsigned long addr, struct module *mod) | 402 | static inline int within_module_core(unsigned long addr, struct module *mod) |
| @@ -459,9 +464,9 @@ static inline void __module_get(struct module *module) | |||
| 459 | { | 464 | { |
| 460 | if (module) { | 465 | if (module) { |
| 461 | preempt_disable(); | 466 | preempt_disable(); |
| 462 | __this_cpu_inc(module->refptr->count); | 467 | __this_cpu_inc(module->refptr->incs); |
| 463 | trace_module_get(module, _THIS_IP_, | 468 | trace_module_get(module, _THIS_IP_, |
| 464 | __this_cpu_read(module->refptr->count)); | 469 | __this_cpu_read(module->refptr->incs)); |
| 465 | preempt_enable(); | 470 | preempt_enable(); |
| 466 | } | 471 | } |
| 467 | } | 472 | } |
| @@ -474,11 +479,10 @@ static inline int try_module_get(struct module *module) | |||
| 474 | preempt_disable(); | 479 | preempt_disable(); |
| 475 | 480 | ||
| 476 | if (likely(module_is_live(module))) { | 481 | if (likely(module_is_live(module))) { |
| 477 | __this_cpu_inc(module->refptr->count); | 482 | __this_cpu_inc(module->refptr->incs); |
| 478 | trace_module_get(module, _THIS_IP_, | 483 | trace_module_get(module, _THIS_IP_, |
| 479 | __this_cpu_read(module->refptr->count)); | 484 | __this_cpu_read(module->refptr->incs)); |
| 480 | } | 485 | } else |
| 481 | else | ||
| 482 | ret = 0; | 486 | ret = 0; |
| 483 | 487 | ||
| 484 | preempt_enable(); | 488 | preempt_enable(); |
| @@ -563,6 +567,11 @@ static inline bool is_module_address(unsigned long addr) | |||
| 563 | return false; | 567 | return false; |
| 564 | } | 568 | } |
| 565 | 569 | ||
| 570 | static inline bool is_module_percpu_address(unsigned long addr) | ||
| 571 | { | ||
| 572 | return false; | ||
| 573 | } | ||
| 574 | |||
| 566 | static inline bool is_module_text_address(unsigned long addr) | 575 | static inline bool is_module_text_address(unsigned long addr) |
| 567 | { | 576 | { |
| 568 | return false; | 577 | return false; |
diff --git a/include/linux/ncp_fs_sb.h b/include/linux/ncp_fs_sb.h index 6330fc76b00f..5ec9ca671687 100644 --- a/include/linux/ncp_fs_sb.h +++ b/include/linux/ncp_fs_sb.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include <linux/ncp_mount.h> | 12 | #include <linux/ncp_mount.h> |
| 13 | #include <linux/net.h> | 13 | #include <linux/net.h> |
| 14 | #include <linux/mutex.h> | 14 | #include <linux/mutex.h> |
| 15 | #include <linux/backing-dev.h> | ||
| 15 | 16 | ||
| 16 | #ifdef __KERNEL__ | 17 | #ifdef __KERNEL__ |
| 17 | 18 | ||
| @@ -127,6 +128,7 @@ struct ncp_server { | |||
| 127 | size_t len; | 128 | size_t len; |
| 128 | __u8 data[128]; | 129 | __u8 data[128]; |
| 129 | } unexpected_packet; | 130 | } unexpected_packet; |
| 131 | struct backing_dev_info bdi; | ||
| 130 | }; | 132 | }; |
| 131 | 133 | ||
| 132 | extern void ncp_tcp_rcv_proc(struct work_struct *work); | 134 | extern void ncp_tcp_rcv_proc(struct work_struct *work); |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index c79a88be7c33..fa8b47637997 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -2059,12 +2059,12 @@ static inline void skb_bond_set_mac_by_master(struct sk_buff *skb, | |||
| 2059 | * duplicates except for 802.3ad ETH_P_SLOW, alb non-mcast/bcast, and | 2059 | * duplicates except for 802.3ad ETH_P_SLOW, alb non-mcast/bcast, and |
| 2060 | * ARP on active-backup slaves with arp_validate enabled. | 2060 | * ARP on active-backup slaves with arp_validate enabled. |
| 2061 | */ | 2061 | */ |
| 2062 | static inline int skb_bond_should_drop(struct sk_buff *skb) | 2062 | static inline int skb_bond_should_drop(struct sk_buff *skb, |
| 2063 | struct net_device *master) | ||
| 2063 | { | 2064 | { |
| 2064 | struct net_device *dev = skb->dev; | ||
| 2065 | struct net_device *master = dev->master; | ||
| 2066 | |||
| 2067 | if (master) { | 2065 | if (master) { |
| 2066 | struct net_device *dev = skb->dev; | ||
| 2067 | |||
| 2068 | if (master->priv_flags & IFF_MASTER_ARPMON) | 2068 | if (master->priv_flags & IFF_MASTER_ARPMON) |
| 2069 | dev->last_rx = jiffies; | 2069 | dev->last_rx = jiffies; |
| 2070 | 2070 | ||
diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h index 53923868c9bd..361d6b5630ee 100644 --- a/include/linux/netfilter/nfnetlink.h +++ b/include/linux/netfilter/nfnetlink.h | |||
| @@ -76,7 +76,7 @@ extern int nfnetlink_subsys_unregister(const struct nfnetlink_subsystem *n); | |||
| 76 | extern int nfnetlink_has_listeners(struct net *net, unsigned int group); | 76 | extern int nfnetlink_has_listeners(struct net *net, unsigned int group); |
| 77 | extern int nfnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, unsigned group, | 77 | extern int nfnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, unsigned group, |
| 78 | int echo, gfp_t flags); | 78 | int echo, gfp_t flags); |
| 79 | extern void nfnetlink_set_err(struct net *net, u32 pid, u32 group, int error); | 79 | extern int nfnetlink_set_err(struct net *net, u32 pid, u32 group, int error); |
| 80 | extern int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u_int32_t pid, int flags); | 80 | extern int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u_int32_t pid, int flags); |
| 81 | 81 | ||
| 82 | extern void nfnl_lock(void); | 82 | extern void nfnl_lock(void); |
diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h index d654873aa25a..1f7e300094cd 100644 --- a/include/linux/netfilter_ipv6.h +++ b/include/linux/netfilter_ipv6.h | |||
| @@ -59,6 +59,7 @@ | |||
| 59 | enum nf_ip6_hook_priorities { | 59 | enum nf_ip6_hook_priorities { |
| 60 | NF_IP6_PRI_FIRST = INT_MIN, | 60 | NF_IP6_PRI_FIRST = INT_MIN, |
| 61 | NF_IP6_PRI_CONNTRACK_DEFRAG = -400, | 61 | NF_IP6_PRI_CONNTRACK_DEFRAG = -400, |
| 62 | NF_IP6_PRI_RAW = -300, | ||
| 62 | NF_IP6_PRI_SELINUX_FIRST = -225, | 63 | NF_IP6_PRI_SELINUX_FIRST = -225, |
| 63 | NF_IP6_PRI_CONNTRACK = -200, | 64 | NF_IP6_PRI_CONNTRACK = -200, |
| 64 | NF_IP6_PRI_MANGLE = -150, | 65 | NF_IP6_PRI_MANGLE = -150, |
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index fde27c017326..6eaca5e1e8ca 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
| @@ -188,7 +188,7 @@ extern int netlink_has_listeners(struct sock *sk, unsigned int group); | |||
| 188 | extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock); | 188 | extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock); |
| 189 | extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid, | 189 | extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid, |
| 190 | __u32 group, gfp_t allocation); | 190 | __u32 group, gfp_t allocation); |
| 191 | extern void netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code); | 191 | extern int netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code); |
| 192 | extern int netlink_register_notifier(struct notifier_block *nb); | 192 | extern int netlink_register_notifier(struct notifier_block *nb); |
| 193 | extern int netlink_unregister_notifier(struct notifier_block *nb); | 193 | extern int netlink_unregister_notifier(struct notifier_block *nb); |
| 194 | 194 | ||
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 1a0b85aa151e..07ce4609fe50 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
| @@ -209,6 +209,7 @@ struct nfs_inode { | |||
| 209 | #define NFS_INO_FLUSHING (4) /* inode is flushing out data */ | 209 | #define NFS_INO_FLUSHING (4) /* inode is flushing out data */ |
| 210 | #define NFS_INO_FSCACHE (5) /* inode can be cached by FS-Cache */ | 210 | #define NFS_INO_FSCACHE (5) /* inode can be cached by FS-Cache */ |
| 211 | #define NFS_INO_FSCACHE_LOCK (6) /* FS-Cache cookie management lock */ | 211 | #define NFS_INO_FSCACHE_LOCK (6) /* FS-Cache cookie management lock */ |
| 212 | #define NFS_INO_COMMIT (7) /* inode is committing unstable writes */ | ||
| 212 | 213 | ||
| 213 | static inline struct nfs_inode *NFS_I(const struct inode *inode) | 214 | static inline struct nfs_inode *NFS_I(const struct inode *inode) |
| 214 | { | 215 | { |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 717a5e54eb1d..e82957acea56 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
| @@ -176,6 +176,7 @@ struct nfs_server { | |||
| 176 | #define NFS_CAP_ATIME (1U << 11) | 176 | #define NFS_CAP_ATIME (1U << 11) |
| 177 | #define NFS_CAP_CTIME (1U << 12) | 177 | #define NFS_CAP_CTIME (1U << 12) |
| 178 | #define NFS_CAP_MTIME (1U << 13) | 178 | #define NFS_CAP_MTIME (1U << 13) |
| 179 | #define NFS_CAP_POSIX_LOCK (1U << 14) | ||
| 179 | 180 | ||
| 180 | 181 | ||
| 181 | /* maximum number of slots to use */ | 182 | /* maximum number of slots to use */ |
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h index 30b08136fdf3..aef22ae2af47 100644 --- a/include/linux/page_cgroup.h +++ b/include/linux/page_cgroup.h | |||
| @@ -39,6 +39,7 @@ enum { | |||
| 39 | PCG_CACHE, /* charged as cache */ | 39 | PCG_CACHE, /* charged as cache */ |
| 40 | PCG_USED, /* this object is in use. */ | 40 | PCG_USED, /* this object is in use. */ |
| 41 | PCG_ACCT_LRU, /* page has been accounted for */ | 41 | PCG_ACCT_LRU, /* page has been accounted for */ |
| 42 | PCG_FILE_MAPPED, /* page is accounted as "mapped" */ | ||
| 42 | }; | 43 | }; |
| 43 | 44 | ||
| 44 | #define TESTPCGFLAG(uname, lname) \ | 45 | #define TESTPCGFLAG(uname, lname) \ |
| @@ -73,6 +74,11 @@ CLEARPCGFLAG(AcctLRU, ACCT_LRU) | |||
| 73 | TESTPCGFLAG(AcctLRU, ACCT_LRU) | 74 | TESTPCGFLAG(AcctLRU, ACCT_LRU) |
| 74 | TESTCLEARPCGFLAG(AcctLRU, ACCT_LRU) | 75 | TESTCLEARPCGFLAG(AcctLRU, ACCT_LRU) |
| 75 | 76 | ||
| 77 | |||
| 78 | SETPCGFLAG(FileMapped, FILE_MAPPED) | ||
| 79 | CLEARPCGFLAG(FileMapped, FILE_MAPPED) | ||
| 80 | TESTPCGFLAG(FileMapped, FILE_MAPPED) | ||
| 81 | |||
| 76 | static inline int page_cgroup_nid(struct page_cgroup *pc) | 82 | static inline int page_cgroup_nid(struct page_cgroup *pc) |
| 77 | { | 83 | { |
| 78 | return page_to_nid(pc->page); | 84 | return page_to_nid(pc->page); |
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index a93e5bfdccb8..d3a38d687104 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
| @@ -2,10 +2,10 @@ | |||
| 2 | #define __LINUX_PERCPU_H | 2 | #define __LINUX_PERCPU_H |
| 3 | 3 | ||
| 4 | #include <linux/preempt.h> | 4 | #include <linux/preempt.h> |
| 5 | #include <linux/slab.h> /* For kmalloc() */ | ||
| 6 | #include <linux/smp.h> | 5 | #include <linux/smp.h> |
| 7 | #include <linux/cpumask.h> | 6 | #include <linux/cpumask.h> |
| 8 | #include <linux/pfn.h> | 7 | #include <linux/pfn.h> |
| 8 | #include <linux/init.h> | ||
| 9 | 9 | ||
| 10 | #include <asm/percpu.h> | 10 | #include <asm/percpu.h> |
| 11 | 11 | ||
| @@ -135,9 +135,7 @@ extern int __init pcpu_page_first_chunk(size_t reserved_size, | |||
| 135 | #define per_cpu_ptr(ptr, cpu) SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu))) | 135 | #define per_cpu_ptr(ptr, cpu) SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu))) |
| 136 | 136 | ||
| 137 | extern void __percpu *__alloc_reserved_percpu(size_t size, size_t align); | 137 | extern void __percpu *__alloc_reserved_percpu(size_t size, size_t align); |
| 138 | extern void __percpu *__alloc_percpu(size_t size, size_t align); | 138 | extern bool is_kernel_percpu_address(unsigned long addr); |
| 139 | extern void free_percpu(void __percpu *__pdata); | ||
| 140 | extern phys_addr_t per_cpu_ptr_to_phys(void *addr); | ||
| 141 | 139 | ||
| 142 | #ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA | 140 | #ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA |
| 143 | extern void __init setup_per_cpu_areas(void); | 141 | extern void __init setup_per_cpu_areas(void); |
| @@ -147,25 +145,10 @@ extern void __init setup_per_cpu_areas(void); | |||
| 147 | 145 | ||
| 148 | #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) | 146 | #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) |
| 149 | 147 | ||
| 150 | static inline void __percpu *__alloc_percpu(size_t size, size_t align) | 148 | /* can't distinguish from other static vars, always false */ |
| 149 | static inline bool is_kernel_percpu_address(unsigned long addr) | ||
| 151 | { | 150 | { |
| 152 | /* | 151 | return false; |
| 153 | * Can't easily make larger alignment work with kmalloc. WARN | ||
| 154 | * on it. Larger alignment should only be used for module | ||
| 155 | * percpu sections on SMP for which this path isn't used. | ||
| 156 | */ | ||
| 157 | WARN_ON_ONCE(align > SMP_CACHE_BYTES); | ||
| 158 | return kzalloc(size, GFP_KERNEL); | ||
| 159 | } | ||
| 160 | |||
| 161 | static inline void free_percpu(void __percpu *p) | ||
| 162 | { | ||
| 163 | kfree(p); | ||
| 164 | } | ||
| 165 | |||
| 166 | static inline phys_addr_t per_cpu_ptr_to_phys(void *addr) | ||
| 167 | { | ||
| 168 | return __pa(addr); | ||
| 169 | } | 152 | } |
| 170 | 153 | ||
| 171 | static inline void __init setup_per_cpu_areas(void) { } | 154 | static inline void __init setup_per_cpu_areas(void) { } |
| @@ -177,6 +160,10 @@ static inline void *pcpu_lpage_remapped(void *kaddr) | |||
| 177 | 160 | ||
| 178 | #endif /* CONFIG_SMP */ | 161 | #endif /* CONFIG_SMP */ |
| 179 | 162 | ||
| 163 | extern void __percpu *__alloc_percpu(size_t size, size_t align); | ||
| 164 | extern void free_percpu(void __percpu *__pdata); | ||
| 165 | extern phys_addr_t per_cpu_ptr_to_phys(void *addr); | ||
| 166 | |||
| 180 | #define alloc_percpu(type) \ | 167 | #define alloc_percpu(type) \ |
| 181 | (typeof(type) __percpu *)__alloc_percpu(sizeof(type), __alignof__(type)) | 168 | (typeof(type) __percpu *)__alloc_percpu(sizeof(type), __alignof__(type)) |
| 182 | 169 | ||
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 95477038a72a..c8e375440403 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
| @@ -842,13 +842,6 @@ extern atomic_t perf_swevent_enabled[PERF_COUNT_SW_MAX]; | |||
| 842 | 842 | ||
| 843 | extern void __perf_sw_event(u32, u64, int, struct pt_regs *, u64); | 843 | extern void __perf_sw_event(u32, u64, int, struct pt_regs *, u64); |
| 844 | 844 | ||
| 845 | static inline void | ||
| 846 | perf_sw_event(u32 event_id, u64 nr, int nmi, struct pt_regs *regs, u64 addr) | ||
| 847 | { | ||
| 848 | if (atomic_read(&perf_swevent_enabled[event_id])) | ||
| 849 | __perf_sw_event(event_id, nr, nmi, regs, addr); | ||
| 850 | } | ||
| 851 | |||
| 852 | extern void | 845 | extern void |
| 853 | perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip); | 846 | perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip); |
| 854 | 847 | ||
| @@ -887,6 +880,20 @@ static inline void perf_fetch_caller_regs(struct pt_regs *regs, int skip) | |||
| 887 | return perf_arch_fetch_caller_regs(regs, ip, skip); | 880 | return perf_arch_fetch_caller_regs(regs, ip, skip); |
| 888 | } | 881 | } |
| 889 | 882 | ||
| 883 | static inline void | ||
| 884 | perf_sw_event(u32 event_id, u64 nr, int nmi, struct pt_regs *regs, u64 addr) | ||
| 885 | { | ||
| 886 | if (atomic_read(&perf_swevent_enabled[event_id])) { | ||
| 887 | struct pt_regs hot_regs; | ||
| 888 | |||
| 889 | if (!regs) { | ||
| 890 | perf_fetch_caller_regs(&hot_regs, 1); | ||
| 891 | regs = &hot_regs; | ||
| 892 | } | ||
| 893 | __perf_sw_event(event_id, nr, nmi, regs, addr); | ||
| 894 | } | ||
| 895 | } | ||
| 896 | |||
| 890 | extern void __perf_event_mmap(struct vm_area_struct *vma); | 897 | extern void __perf_event_mmap(struct vm_area_struct *vma); |
| 891 | 898 | ||
| 892 | static inline void perf_event_mmap(struct vm_area_struct *vma) | 899 | static inline void perf_event_mmap(struct vm_area_struct *vma) |
diff --git a/include/linux/poison.h b/include/linux/poison.h index 2110a81c5e2a..34066ffd893d 100644 --- a/include/linux/poison.h +++ b/include/linux/poison.h | |||
| @@ -48,6 +48,15 @@ | |||
| 48 | #define POISON_FREE 0x6b /* for use-after-free poisoning */ | 48 | #define POISON_FREE 0x6b /* for use-after-free poisoning */ |
| 49 | #define POISON_END 0xa5 /* end-byte of poisoning */ | 49 | #define POISON_END 0xa5 /* end-byte of poisoning */ |
| 50 | 50 | ||
| 51 | /********** mm/hugetlb.c **********/ | ||
| 52 | /* | ||
| 53 | * Private mappings of hugetlb pages use this poisoned value for | ||
| 54 | * page->mapping. The core VM should not be doing anything with this mapping | ||
| 55 | * but futex requires the existence of some page->mapping value even though it | ||
| 56 | * is unused if PAGE_MAPPING_ANON is set. | ||
| 57 | */ | ||
| 58 | #define HUGETLB_POISON ((void *)(0x00300300 + POISON_POINTER_DELTA + PAGE_MAPPING_ANON)) | ||
| 59 | |||
| 51 | /********** arch/$ARCH/mm/init.c **********/ | 60 | /********** arch/$ARCH/mm/init.c **********/ |
| 52 | #define POISON_FREE_INITMEM 0xcc | 61 | #define POISON_FREE_INITMEM 0xcc |
| 53 | 62 | ||
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h index c5da74918096..55ca73cf25e5 100644 --- a/include/linux/radix-tree.h +++ b/include/linux/radix-tree.h | |||
| @@ -121,6 +121,13 @@ do { \ | |||
| 121 | * (Note, rcu_assign_pointer and rcu_dereference are not needed to control | 121 | * (Note, rcu_assign_pointer and rcu_dereference are not needed to control |
| 122 | * access to data items when inserting into or looking up from the radix tree) | 122 | * access to data items when inserting into or looking up from the radix tree) |
| 123 | * | 123 | * |
| 124 | * Note that the value returned by radix_tree_tag_get() may not be relied upon | ||
| 125 | * if only the RCU read lock is held. Functions to set/clear tags and to | ||
| 126 | * delete nodes running concurrently with it may affect its result such that | ||
| 127 | * two consecutive reads in the same locked section may return different | ||
| 128 | * values. If reliability is required, modification functions must also be | ||
| 129 | * excluded from concurrency. | ||
| 130 | * | ||
| 124 | * radix_tree_tagged is able to be called without locking or RCU. | 131 | * radix_tree_tagged is able to be called without locking or RCU. |
| 125 | */ | 132 | */ |
| 126 | 133 | ||
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 3024050c82a1..db266bbed23f 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
| @@ -101,10 +101,7 @@ extern struct lockdep_map rcu_sched_lock_map; | |||
| 101 | # define rcu_read_release_sched() \ | 101 | # define rcu_read_release_sched() \ |
| 102 | lock_release(&rcu_sched_lock_map, 1, _THIS_IP_) | 102 | lock_release(&rcu_sched_lock_map, 1, _THIS_IP_) |
| 103 | 103 | ||
| 104 | static inline int debug_lockdep_rcu_enabled(void) | 104 | extern int debug_lockdep_rcu_enabled(void); |
| 105 | { | ||
| 106 | return likely(rcu_scheduler_active && debug_locks); | ||
| 107 | } | ||
| 108 | 105 | ||
| 109 | /** | 106 | /** |
| 110 | * rcu_read_lock_held - might we be in RCU read-side critical section? | 107 | * rcu_read_lock_held - might we be in RCU read-side critical section? |
| @@ -123,22 +120,11 @@ static inline int rcu_read_lock_held(void) | |||
| 123 | return lock_is_held(&rcu_lock_map); | 120 | return lock_is_held(&rcu_lock_map); |
| 124 | } | 121 | } |
| 125 | 122 | ||
| 126 | /** | 123 | /* |
| 127 | * rcu_read_lock_bh_held - might we be in RCU-bh read-side critical section? | 124 | * rcu_read_lock_bh_held() is defined out of line to avoid #include-file |
| 128 | * | 125 | * hell. |
| 129 | * If CONFIG_PROVE_LOCKING is selected and enabled, returns nonzero iff in | ||
| 130 | * an RCU-bh read-side critical section. In absence of CONFIG_PROVE_LOCKING, | ||
| 131 | * this assumes we are in an RCU-bh read-side critical section unless it can | ||
| 132 | * prove otherwise. | ||
| 133 | * | ||
| 134 | * Check rcu_scheduler_active to prevent false positives during boot. | ||
| 135 | */ | 126 | */ |
| 136 | static inline int rcu_read_lock_bh_held(void) | 127 | extern int rcu_read_lock_bh_held(void); |
| 137 | { | ||
| 138 | if (!debug_lockdep_rcu_enabled()) | ||
| 139 | return 1; | ||
| 140 | return lock_is_held(&rcu_bh_lock_map); | ||
| 141 | } | ||
| 142 | 128 | ||
| 143 | /** | 129 | /** |
| 144 | * rcu_read_lock_sched_held - might we be in RCU-sched read-side critical section? | 130 | * rcu_read_lock_sched_held - might we be in RCU-sched read-side critical section? |
| @@ -160,7 +146,7 @@ static inline int rcu_read_lock_sched_held(void) | |||
| 160 | return 1; | 146 | return 1; |
| 161 | if (debug_locks) | 147 | if (debug_locks) |
| 162 | lockdep_opinion = lock_is_held(&rcu_sched_lock_map); | 148 | lockdep_opinion = lock_is_held(&rcu_sched_lock_map); |
| 163 | return lockdep_opinion || preempt_count() != 0; | 149 | return lockdep_opinion || preempt_count() != 0 || irqs_disabled(); |
| 164 | } | 150 | } |
| 165 | #else /* #ifdef CONFIG_PREEMPT */ | 151 | #else /* #ifdef CONFIG_PREEMPT */ |
| 166 | static inline int rcu_read_lock_sched_held(void) | 152 | static inline int rcu_read_lock_sched_held(void) |
| @@ -191,7 +177,7 @@ static inline int rcu_read_lock_bh_held(void) | |||
| 191 | #ifdef CONFIG_PREEMPT | 177 | #ifdef CONFIG_PREEMPT |
| 192 | static inline int rcu_read_lock_sched_held(void) | 178 | static inline int rcu_read_lock_sched_held(void) |
| 193 | { | 179 | { |
| 194 | return !rcu_scheduler_active || preempt_count() != 0; | 180 | return !rcu_scheduler_active || preempt_count() != 0 || irqs_disabled(); |
| 195 | } | 181 | } |
| 196 | #else /* #ifdef CONFIG_PREEMPT */ | 182 | #else /* #ifdef CONFIG_PREEMPT */ |
| 197 | static inline int rcu_read_lock_sched_held(void) | 183 | static inline int rcu_read_lock_sched_held(void) |
| @@ -204,14 +190,34 @@ static inline int rcu_read_lock_sched_held(void) | |||
| 204 | 190 | ||
| 205 | #ifdef CONFIG_PROVE_RCU | 191 | #ifdef CONFIG_PROVE_RCU |
| 206 | 192 | ||
| 193 | extern int rcu_my_thread_group_empty(void); | ||
| 194 | |||
| 207 | /** | 195 | /** |
| 208 | * rcu_dereference_check - rcu_dereference with debug checking | 196 | * rcu_dereference_check - rcu_dereference with debug checking |
| 197 | * @p: The pointer to read, prior to dereferencing | ||
| 198 | * @c: The conditions under which the dereference will take place | ||
| 209 | * | 199 | * |
| 210 | * Do an rcu_dereference(), but check that the context is correct. | 200 | * Do an rcu_dereference(), but check that the conditions under which the |
| 211 | * For example, rcu_dereference_check(gp, rcu_read_lock_held()) to | 201 | * dereference will take place are correct. Typically the conditions indicate |
| 212 | * ensure that the rcu_dereference_check() executes within an RCU | 202 | * the various locking conditions that should be held at that point. The check |
| 213 | * read-side critical section. It is also possible to check for | 203 | * should return true if the conditions are satisfied. |
| 214 | * locks being held, for example, by using lockdep_is_held(). | 204 | * |
| 205 | * For example: | ||
| 206 | * | ||
| 207 | * bar = rcu_dereference_check(foo->bar, rcu_read_lock_held() || | ||
| 208 | * lockdep_is_held(&foo->lock)); | ||
| 209 | * | ||
| 210 | * could be used to indicate to lockdep that foo->bar may only be dereferenced | ||
| 211 | * if either the RCU read lock is held, or that the lock required to replace | ||
| 212 | * the bar struct at foo->bar is held. | ||
| 213 | * | ||
| 214 | * Note that the list of conditions may also include indications of when a lock | ||
| 215 | * need not be held, for example during initialisation or destruction of the | ||
| 216 | * target struct: | ||
| 217 | * | ||
| 218 | * bar = rcu_dereference_check(foo->bar, rcu_read_lock_held() || | ||
| 219 | * lockdep_is_held(&foo->lock) || | ||
| 220 | * atomic_read(&foo->usage) == 0); | ||
| 215 | */ | 221 | */ |
| 216 | #define rcu_dereference_check(p, c) \ | 222 | #define rcu_dereference_check(p, c) \ |
| 217 | ({ \ | 223 | ({ \ |
| @@ -220,13 +226,45 @@ static inline int rcu_read_lock_sched_held(void) | |||
| 220 | rcu_dereference_raw(p); \ | 226 | rcu_dereference_raw(p); \ |
| 221 | }) | 227 | }) |
| 222 | 228 | ||
| 229 | /** | ||
| 230 | * rcu_dereference_protected - fetch RCU pointer when updates prevented | ||
| 231 | * | ||
| 232 | * Return the value of the specified RCU-protected pointer, but omit | ||
| 233 | * both the smp_read_barrier_depends() and the ACCESS_ONCE(). This | ||
| 234 | * is useful in cases where update-side locks prevent the value of the | ||
| 235 | * pointer from changing. Please note that this primitive does -not- | ||
| 236 | * prevent the compiler from repeating this reference or combining it | ||
| 237 | * with other references, so it should not be used without protection | ||
| 238 | * of appropriate locks. | ||
| 239 | */ | ||
| 240 | #define rcu_dereference_protected(p, c) \ | ||
| 241 | ({ \ | ||
| 242 | if (debug_lockdep_rcu_enabled() && !(c)) \ | ||
| 243 | lockdep_rcu_dereference(__FILE__, __LINE__); \ | ||
| 244 | (p); \ | ||
| 245 | }) | ||
| 246 | |||
| 223 | #else /* #ifdef CONFIG_PROVE_RCU */ | 247 | #else /* #ifdef CONFIG_PROVE_RCU */ |
| 224 | 248 | ||
| 225 | #define rcu_dereference_check(p, c) rcu_dereference_raw(p) | 249 | #define rcu_dereference_check(p, c) rcu_dereference_raw(p) |
| 250 | #define rcu_dereference_protected(p, c) (p) | ||
| 226 | 251 | ||
| 227 | #endif /* #else #ifdef CONFIG_PROVE_RCU */ | 252 | #endif /* #else #ifdef CONFIG_PROVE_RCU */ |
| 228 | 253 | ||
| 229 | /** | 254 | /** |
| 255 | * rcu_access_pointer - fetch RCU pointer with no dereferencing | ||
| 256 | * | ||
| 257 | * Return the value of the specified RCU-protected pointer, but omit the | ||
| 258 | * smp_read_barrier_depends() and keep the ACCESS_ONCE(). This is useful | ||
| 259 | * when the value of this pointer is accessed, but the pointer is not | ||
| 260 | * dereferenced, for example, when testing an RCU-protected pointer against | ||
| 261 | * NULL. This may also be used in cases where update-side locks prevent | ||
| 262 | * the value of the pointer from changing, but rcu_dereference_protected() | ||
| 263 | * is a lighter-weight primitive for this use case. | ||
| 264 | */ | ||
| 265 | #define rcu_access_pointer(p) ACCESS_ONCE(p) | ||
| 266 | |||
| 267 | /** | ||
| 230 | * rcu_read_lock - mark the beginning of an RCU read-side critical section. | 268 | * rcu_read_lock - mark the beginning of an RCU read-side critical section. |
| 231 | * | 269 | * |
| 232 | * When synchronize_rcu() is invoked on one CPU while other CPUs | 270 | * When synchronize_rcu() is invoked on one CPU while other CPUs |
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 28c9fd020d39..ebd747265294 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
| @@ -183,9 +183,13 @@ static inline struct regulator *__must_check regulator_get(struct device *dev, | |||
| 183 | { | 183 | { |
| 184 | /* Nothing except the stubbed out regulator API should be | 184 | /* Nothing except the stubbed out regulator API should be |
| 185 | * looking at the value except to check if it is an error | 185 | * looking at the value except to check if it is an error |
| 186 | * value so the actual return value doesn't matter. | 186 | * value. Drivers are free to handle NULL specifically by |
| 187 | * skipping all regulator API calls, but they don't have to. | ||
| 188 | * Drivers which don't, should make sure they properly handle | ||
| 189 | * corner cases of the API, such as regulator_get_voltage() | ||
| 190 | * returning 0. | ||
| 187 | */ | 191 | */ |
| 188 | return (struct regulator *)id; | 192 | return NULL; |
| 189 | } | 193 | } |
| 190 | static inline void regulator_put(struct regulator *regulator) | 194 | static inline void regulator_put(struct regulator *regulator) |
| 191 | { | 195 | { |
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index 99928dce37ea..7fa02b4af838 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h | |||
| @@ -70,6 +70,11 @@ int reiserfs_security_write(struct reiserfs_transaction_handle *th, | |||
| 70 | void reiserfs_security_free(struct reiserfs_security_handle *sec); | 70 | void reiserfs_security_free(struct reiserfs_security_handle *sec); |
| 71 | #endif | 71 | #endif |
| 72 | 72 | ||
| 73 | static inline int reiserfs_xattrs_initialized(struct super_block *sb) | ||
| 74 | { | ||
| 75 | return REISERFS_SB(sb)->priv_root != NULL; | ||
| 76 | } | ||
| 77 | |||
| 73 | #define xattr_size(size) ((size) + sizeof(struct reiserfs_xattr_header)) | 78 | #define xattr_size(size) ((size) + sizeof(struct reiserfs_xattr_header)) |
| 74 | static inline loff_t reiserfs_xattr_nblocks(struct inode *inode, loff_t size) | 79 | static inline loff_t reiserfs_xattr_nblocks(struct inode *inode, loff_t size) |
| 75 | { | 80 | { |
diff --git a/include/linux/sched.h b/include/linux/sched.h index dad7f668ebf7..2b7b81df78b3 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -1497,7 +1497,6 @@ struct task_struct { | |||
| 1497 | /* bitmask of trace recursion */ | 1497 | /* bitmask of trace recursion */ |
| 1498 | unsigned long trace_recursion; | 1498 | unsigned long trace_recursion; |
| 1499 | #endif /* CONFIG_TRACING */ | 1499 | #endif /* CONFIG_TRACING */ |
| 1500 | unsigned long stack_start; | ||
| 1501 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR /* memcg uses this to do batch job */ | 1500 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR /* memcg uses this to do batch job */ |
| 1502 | struct memcg_batch_info { | 1501 | struct memcg_batch_info { |
| 1503 | int do_batch; /* incremented when batch uncharge started */ | 1502 | int do_batch; /* incremented when batch uncharge started */ |
diff --git a/include/linux/security.h b/include/linux/security.h index 233d20b52c1b..3158dd982d27 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | #include <linux/sched.h> | 33 | #include <linux/sched.h> |
| 34 | #include <linux/key.h> | 34 | #include <linux/key.h> |
| 35 | #include <linux/xfrm.h> | 35 | #include <linux/xfrm.h> |
| 36 | #include <linux/gfp.h> | 36 | #include <linux/slab.h> |
| 37 | #include <net/flow.h> | 37 | #include <net/flow.h> |
| 38 | 38 | ||
| 39 | /* Maximum number of letters for an LSM name string */ | 39 | /* Maximum number of letters for an LSM name string */ |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 03f816a9b659..124f90cd5a38 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -190,9 +190,6 @@ struct skb_shared_info { | |||
| 190 | atomic_t dataref; | 190 | atomic_t dataref; |
| 191 | unsigned short nr_frags; | 191 | unsigned short nr_frags; |
| 192 | unsigned short gso_size; | 192 | unsigned short gso_size; |
| 193 | #ifdef CONFIG_HAS_DMA | ||
| 194 | dma_addr_t dma_head; | ||
| 195 | #endif | ||
| 196 | /* Warning: this field is not always filled in (UFO)! */ | 193 | /* Warning: this field is not always filled in (UFO)! */ |
| 197 | unsigned short gso_segs; | 194 | unsigned short gso_segs; |
| 198 | unsigned short gso_type; | 195 | unsigned short gso_type; |
| @@ -201,9 +198,6 @@ struct skb_shared_info { | |||
| 201 | struct sk_buff *frag_list; | 198 | struct sk_buff *frag_list; |
| 202 | struct skb_shared_hwtstamps hwtstamps; | 199 | struct skb_shared_hwtstamps hwtstamps; |
| 203 | skb_frag_t frags[MAX_SKB_FRAGS]; | 200 | skb_frag_t frags[MAX_SKB_FRAGS]; |
| 204 | #ifdef CONFIG_HAS_DMA | ||
| 205 | dma_addr_t dma_maps[MAX_SKB_FRAGS]; | ||
| 206 | #endif | ||
| 207 | /* Intermediate layers must ensure that destructor_arg | 201 | /* Intermediate layers must ensure that destructor_arg |
| 208 | * remains valid until skb destructor */ | 202 | * remains valid until skb destructor */ |
| 209 | void * destructor_arg; | 203 | void * destructor_arg; |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 488446289cab..49d1247cd6d9 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
| @@ -106,6 +106,7 @@ int kmem_cache_shrink(struct kmem_cache *); | |||
| 106 | void kmem_cache_free(struct kmem_cache *, void *); | 106 | void kmem_cache_free(struct kmem_cache *, void *); |
| 107 | unsigned int kmem_cache_size(struct kmem_cache *); | 107 | unsigned int kmem_cache_size(struct kmem_cache *); |
| 108 | const char *kmem_cache_name(struct kmem_cache *); | 108 | const char *kmem_cache_name(struct kmem_cache *); |
| 109 | int kern_ptr_validate(const void *ptr, unsigned long size); | ||
| 109 | int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr); | 110 | int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr); |
| 110 | 111 | ||
| 111 | /* | 112 | /* |
diff --git a/include/linux/smb_fs_sb.h b/include/linux/smb_fs_sb.h index 8a060a7040d8..bb947dd1fba9 100644 --- a/include/linux/smb_fs_sb.h +++ b/include/linux/smb_fs_sb.h | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #define _SMB_FS_SB | 10 | #define _SMB_FS_SB |
| 11 | 11 | ||
| 12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
| 13 | #include <linux/backing-dev.h> | ||
| 13 | #include <linux/smb.h> | 14 | #include <linux/smb.h> |
| 14 | 15 | ||
| 15 | /* | 16 | /* |
| @@ -74,6 +75,8 @@ struct smb_sb_info { | |||
| 74 | struct smb_ops *ops; | 75 | struct smb_ops *ops; |
| 75 | 76 | ||
| 76 | struct super_block *super_block; | 77 | struct super_block *super_block; |
| 78 | |||
| 79 | struct backing_dev_info bdi; | ||
| 77 | }; | 80 | }; |
| 78 | 81 | ||
| 79 | static inline int | 82 | static inline int |
diff --git a/include/linux/socket.h b/include/linux/socket.h index 7b3aae2052a6..354cc5617f8b 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
| @@ -255,6 +255,7 @@ struct ucred { | |||
| 255 | #define MSG_ERRQUEUE 0x2000 /* Fetch message from error queue */ | 255 | #define MSG_ERRQUEUE 0x2000 /* Fetch message from error queue */ |
| 256 | #define MSG_NOSIGNAL 0x4000 /* Do not generate SIGPIPE */ | 256 | #define MSG_NOSIGNAL 0x4000 /* Do not generate SIGPIPE */ |
| 257 | #define MSG_MORE 0x8000 /* Sender will send more */ | 257 | #define MSG_MORE 0x8000 /* Sender will send more */ |
| 258 | #define MSG_WAITFORONE 0x10000 /* recvmmsg(): block until 1+ packets avail */ | ||
| 258 | 259 | ||
| 259 | #define MSG_EOF MSG_FIN | 260 | #define MSG_EOF MSG_FIN |
| 260 | 261 | ||
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 97b60b37f445..af56071b06f9 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | 21 | ||
| 22 | #include <linux/device.h> | 22 | #include <linux/device.h> |
| 23 | #include <linux/mod_devicetable.h> | 23 | #include <linux/mod_devicetable.h> |
| 24 | #include <linux/slab.h> | ||
| 24 | 25 | ||
| 25 | /* | 26 | /* |
| 26 | * INTERFACES between SPI master-side drivers and SPI infrastructure. | 27 | * INTERFACES between SPI master-side drivers and SPI infrastructure. |
diff --git a/include/linux/sunrpc/bc_xprt.h b/include/linux/sunrpc/bc_xprt.h index d7152b451e21..7c91260c44a9 100644 --- a/include/linux/sunrpc/bc_xprt.h +++ b/include/linux/sunrpc/bc_xprt.h | |||
| @@ -36,7 +36,6 @@ 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 *, int max_reqs); |
| 39 | void bc_release_request(struct rpc_task *); | ||
| 40 | int bc_send(struct rpc_rqst *req); | 39 | int bc_send(struct rpc_rqst *req); |
| 41 | 40 | ||
| 42 | /* | 41 | /* |
| @@ -59,6 +58,10 @@ static inline int svc_is_backchannel(const struct svc_rqst *rqstp) | |||
| 59 | { | 58 | { |
| 60 | return 0; | 59 | return 0; |
| 61 | } | 60 | } |
| 61 | |||
| 62 | static inline void xprt_free_bc_request(struct rpc_rqst *req) | ||
| 63 | { | ||
| 64 | } | ||
| 62 | #endif /* CONFIG_NFS_V4_1 */ | 65 | #endif /* CONFIG_NFS_V4_1 */ |
| 63 | #endif /* _LINUX_SUNRPC_BC_XPRT_H */ | 66 | #endif /* _LINUX_SUNRPC_BC_XPRT_H */ |
| 64 | 67 | ||
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index f994ae58a002..057929b0a651 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -688,7 +688,7 @@ asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg); | |||
| 688 | asmlinkage long sys_shmget(key_t key, size_t size, int flag); | 688 | asmlinkage long sys_shmget(key_t key, size_t size, int flag); |
| 689 | asmlinkage long sys_shmdt(char __user *shmaddr); | 689 | asmlinkage long sys_shmdt(char __user *shmaddr); |
| 690 | asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); | 690 | asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); |
| 691 | asmlinkage long sys_ipc(unsigned int call, int first, int second, | 691 | asmlinkage long sys_ipc(unsigned int call, int first, unsigned long second, |
| 692 | unsigned long third, void __user *ptr, long fifth); | 692 | unsigned long third, void __user *ptr, long fifth); |
| 693 | 693 | ||
| 694 | asmlinkage long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr); | 694 | asmlinkage long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr); |
diff --git a/include/linux/taskstats_kern.h b/include/linux/taskstats_kern.h index b6523c1427ce..58de6edf751f 100644 --- a/include/linux/taskstats_kern.h +++ b/include/linux/taskstats_kern.h | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | 9 | ||
| 10 | #include <linux/taskstats.h> | 10 | #include <linux/taskstats.h> |
| 11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
| 12 | #include <linux/slab.h> | ||
| 12 | 13 | ||
| 13 | #ifdef CONFIG_TASKSTATS | 14 | #ifdef CONFIG_TASKSTATS |
| 14 | extern struct kmem_cache *taskstats_cache; | 15 | extern struct kmem_cache *taskstats_cache; |
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index f59604ed0ec6..78b4bd3be496 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
| @@ -49,7 +49,7 @@ struct tracepoint { | |||
| 49 | void **it_func; \ | 49 | void **it_func; \ |
| 50 | \ | 50 | \ |
| 51 | rcu_read_lock_sched_notrace(); \ | 51 | rcu_read_lock_sched_notrace(); \ |
| 52 | it_func = rcu_dereference((tp)->funcs); \ | 52 | it_func = rcu_dereference_sched((tp)->funcs); \ |
| 53 | if (it_func) { \ | 53 | if (it_func) { \ |
| 54 | do { \ | 54 | do { \ |
| 55 | ((void(*)(proto))(*it_func))(args); \ | 55 | ((void(*)(proto))(*it_func))(args); \ |
diff --git a/include/linux/usb.h b/include/linux/usb.h index ce1323c4e47c..739f1fd1cc15 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
| @@ -1085,7 +1085,7 @@ typedef void (*usb_complete_t)(struct urb *); | |||
| 1085 | * Alternatively, drivers may pass the URB_NO_xxx_DMA_MAP transfer flags, | 1085 | * Alternatively, drivers may pass the URB_NO_xxx_DMA_MAP transfer flags, |
| 1086 | * which tell the host controller driver that no such mapping is needed since | 1086 | * which tell the host controller driver that no such mapping is needed since |
| 1087 | * the device driver is DMA-aware. For example, a device driver might | 1087 | * the device driver is DMA-aware. For example, a device driver might |
| 1088 | * allocate a DMA buffer with usb_buffer_alloc() or call usb_buffer_map(). | 1088 | * allocate a DMA buffer with usb_alloc_coherent() or call usb_buffer_map(). |
| 1089 | * When these transfer flags are provided, host controller drivers will | 1089 | * When these transfer flags are provided, host controller drivers will |
| 1090 | * attempt to use the dma addresses found in the transfer_dma and/or | 1090 | * attempt to use the dma addresses found in the transfer_dma and/or |
| 1091 | * setup_dma fields rather than determining a dma address themselves. | 1091 | * setup_dma fields rather than determining a dma address themselves. |
| @@ -1366,11 +1366,23 @@ static inline int usb_urb_dir_out(struct urb *urb) | |||
| 1366 | return (urb->transfer_flags & URB_DIR_MASK) == URB_DIR_OUT; | 1366 | return (urb->transfer_flags & URB_DIR_MASK) == URB_DIR_OUT; |
| 1367 | } | 1367 | } |
| 1368 | 1368 | ||
| 1369 | void *usb_buffer_alloc(struct usb_device *dev, size_t size, | 1369 | void *usb_alloc_coherent(struct usb_device *dev, size_t size, |
| 1370 | gfp_t mem_flags, dma_addr_t *dma); | 1370 | gfp_t mem_flags, dma_addr_t *dma); |
| 1371 | void usb_buffer_free(struct usb_device *dev, size_t size, | 1371 | void usb_free_coherent(struct usb_device *dev, size_t size, |
| 1372 | void *addr, dma_addr_t dma); | 1372 | void *addr, dma_addr_t dma); |
| 1373 | 1373 | ||
| 1374 | /* Compatible macros while we switch over */ | ||
| 1375 | static inline void *usb_buffer_alloc(struct usb_device *dev, size_t size, | ||
| 1376 | gfp_t mem_flags, dma_addr_t *dma) | ||
| 1377 | { | ||
| 1378 | return usb_alloc_coherent(dev, size, mem_flags, dma); | ||
| 1379 | } | ||
| 1380 | static inline void usb_buffer_free(struct usb_device *dev, size_t size, | ||
| 1381 | void *addr, dma_addr_t dma) | ||
| 1382 | { | ||
| 1383 | return usb_free_coherent(dev, size, addr, dma); | ||
| 1384 | } | ||
| 1385 | |||
| 1374 | #if 0 | 1386 | #if 0 |
| 1375 | struct urb *usb_buffer_map(struct urb *urb); | 1387 | struct urb *usb_buffer_map(struct urb *urb); |
| 1376 | void usb_buffer_dmasync(struct urb *urb); | 1388 | void usb_buffer_dmasync(struct urb *urb); |
diff --git a/include/linux/usb/audio-v2.h b/include/linux/usb/audio-v2.h new file mode 100644 index 000000000000..2389f93a28b5 --- /dev/null +++ b/include/linux/usb/audio-v2.h | |||
| @@ -0,0 +1,378 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2010 Daniel Mack <daniel@caiaq.de> | ||
| 3 | * | ||
| 4 | * This software is distributed under the terms of the GNU General Public | ||
| 5 | * License ("GPL") version 2, as published by the Free Software Foundation. | ||
| 6 | * | ||
| 7 | * This file holds USB constants and structures defined | ||
| 8 | * by the USB Device Class Definition for Audio Devices in version 2.0. | ||
| 9 | * Comments below reference relevant sections of the documents contained | ||
| 10 | * in http://www.usb.org/developers/devclass_docs/Audio2.0_final.zip | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifndef __LINUX_USB_AUDIO_V2_H | ||
| 14 | #define __LINUX_USB_AUDIO_V2_H | ||
| 15 | |||
| 16 | #include <linux/types.h> | ||
| 17 | |||
| 18 | /* v1.0 and v2.0 of this standard have many things in common. For the rest | ||
| 19 | * of the definitions, please refer to audio.h */ | ||
| 20 | |||
| 21 | /* 4.7.2.1 Clock Source Descriptor */ | ||
| 22 | |||
| 23 | struct uac_clock_source_descriptor { | ||
| 24 | __u8 bLength; | ||
| 25 | __u8 bDescriptorType; | ||
| 26 | __u8 bDescriptorSubtype; | ||
| 27 | __u8 bClockID; | ||
| 28 | __u8 bmAttributes; | ||
| 29 | __u8 bmControls; | ||
| 30 | __u8 bAssocTerminal; | ||
| 31 | __u8 iClockSource; | ||
| 32 | } __attribute__((packed)); | ||
| 33 | |||
| 34 | /* 4.7.2.2 Clock Source Descriptor */ | ||
| 35 | |||
| 36 | struct uac_clock_selector_descriptor { | ||
| 37 | __u8 bLength; | ||
| 38 | __u8 bDescriptorType; | ||
| 39 | __u8 bDescriptorSubtype; | ||
| 40 | __u8 bClockID; | ||
| 41 | __u8 bNrInPins; | ||
| 42 | __u8 bmControls; | ||
| 43 | __u8 baCSourceID[]; | ||
| 44 | } __attribute__((packed)); | ||
| 45 | |||
| 46 | /* 4.7.2.4 Input terminal descriptor */ | ||
| 47 | |||
| 48 | struct uac2_input_terminal_descriptor { | ||
| 49 | __u8 bLength; | ||
| 50 | __u8 bDescriptorType; | ||
| 51 | __u8 bDescriptorSubtype; | ||
| 52 | __u8 bTerminalID; | ||
| 53 | __u16 wTerminalType; | ||
| 54 | __u8 bAssocTerminal; | ||
| 55 | __u8 bCSourceID; | ||
| 56 | __u8 bNrChannels; | ||
| 57 | __u32 bmChannelConfig; | ||
| 58 | __u8 iChannelNames; | ||
| 59 | __u16 bmControls; | ||
| 60 | __u8 iTerminal; | ||
| 61 | } __attribute__((packed)); | ||
| 62 | |||
| 63 | /* 4.7.2.5 Output terminal descriptor */ | ||
| 64 | |||
| 65 | struct uac2_output_terminal_descriptor { | ||
| 66 | __u8 bLength; | ||
| 67 | __u8 bDescriptorType; | ||
| 68 | __u8 bDescriptorSubtype; | ||
| 69 | __u8 bTerminalID; | ||
| 70 | __u16 wTerminalType; | ||
| 71 | __u8 bAssocTerminal; | ||
| 72 | __u8 bSourceID; | ||
| 73 | __u8 bCSourceID; | ||
| 74 | __u16 bmControls; | ||
| 75 | __u8 iTerminal; | ||
| 76 | } __attribute__((packed)); | ||
| 77 | |||
| 78 | |||
| 79 | |||
| 80 | /* 4.7.2.8 Feature Unit Descriptor */ | ||
| 81 | |||
| 82 | struct uac2_feature_unit_descriptor { | ||
| 83 | __u8 bLength; | ||
| 84 | __u8 bDescriptorType; | ||
| 85 | __u8 bDescriptorSubtype; | ||
| 86 | __u8 bUnitID; | ||
| 87 | __u8 bSourceID; | ||
| 88 | /* bmaControls is actually u32, | ||
| 89 | * but u8 is needed for the hybrid parser */ | ||
| 90 | __u8 bmaControls[0]; /* variable length */ | ||
| 91 | } __attribute__((packed)); | ||
| 92 | |||
| 93 | /* 4.9.2 Class-Specific AS Interface Descriptor */ | ||
| 94 | |||
| 95 | struct uac_as_header_descriptor_v2 { | ||
| 96 | __u8 bLength; | ||
| 97 | __u8 bDescriptorType; | ||
| 98 | __u8 bDescriptorSubtype; | ||
| 99 | __u8 bTerminalLink; | ||
| 100 | __u8 bmControls; | ||
| 101 | __u8 bFormatType; | ||
| 102 | __u32 bmFormats; | ||
| 103 | __u8 bNrChannels; | ||
| 104 | __u32 bmChannelConfig; | ||
| 105 | __u8 iChannelNames; | ||
| 106 | } __attribute__((packed)); | ||
| 107 | |||
| 108 | /* 6.1 Interrupt Data Message */ | ||
| 109 | |||
| 110 | #define UAC2_INTERRUPT_DATA_MSG_VENDOR (1 << 0) | ||
| 111 | #define UAC2_INTERRUPT_DATA_MSG_EP (1 << 1) | ||
| 112 | |||
| 113 | struct uac2_interrupt_data_msg { | ||
| 114 | __u8 bInfo; | ||
| 115 | __u8 bAttribute; | ||
| 116 | __le16 wValue; | ||
| 117 | __le16 wIndex; | ||
| 118 | } __attribute__((packed)); | ||
| 119 | |||
| 120 | /* A.7 Audio Function Category Codes */ | ||
| 121 | #define UAC2_FUNCTION_SUBCLASS_UNDEFINED 0x00 | ||
| 122 | #define UAC2_FUNCTION_DESKTOP_SPEAKER 0x01 | ||
| 123 | #define UAC2_FUNCTION_HOME_THEATER 0x02 | ||
| 124 | #define UAC2_FUNCTION_MICROPHONE 0x03 | ||
| 125 | #define UAC2_FUNCTION_HEADSET 0x04 | ||
| 126 | #define UAC2_FUNCTION_TELEPHONE 0x05 | ||
| 127 | #define UAC2_FUNCTION_CONVERTER 0x06 | ||
| 128 | #define UAC2_FUNCTION_SOUND_RECORDER 0x07 | ||
| 129 | #define UAC2_FUNCTION_IO_BOX 0x08 | ||
| 130 | #define UAC2_FUNCTION_MUSICAL_INSTRUMENT 0x09 | ||
| 131 | #define UAC2_FUNCTION_PRO_AUDIO 0x0a | ||
| 132 | #define UAC2_FUNCTION_AUDIO_VIDEO 0x0b | ||
| 133 | #define UAC2_FUNCTION_CONTROL_PANEL 0x0c | ||
| 134 | #define UAC2_FUNCTION_OTHER 0xff | ||
| 135 | |||
| 136 | /* A.9 Audio Class-Specific AC Interface Descriptor Subtypes */ | ||
| 137 | /* see audio.h for the rest, which is identical to v1 */ | ||
| 138 | #define UAC2_EFFECT_UNIT 0x07 | ||
| 139 | #define UAC2_PROCESSING_UNIT_V2 0x08 | ||
| 140 | #define UAC2_EXTENSION_UNIT_V2 0x09 | ||
| 141 | #define UAC2_CLOCK_SOURCE 0x0a | ||
| 142 | #define UAC2_CLOCK_SELECTOR 0x0b | ||
| 143 | #define UAC2_CLOCK_MULTIPLIER 0x0c | ||
| 144 | #define UAC2_SAMPLE_RATE_CONVERTER 0x0d | ||
| 145 | |||
| 146 | /* A.10 Audio Class-Specific AS Interface Descriptor Subtypes */ | ||
| 147 | /* see audio.h for the rest, which is identical to v1 */ | ||
| 148 | #define UAC2_ENCODER 0x03 | ||
| 149 | #define UAC2_DECODER 0x04 | ||
| 150 | |||
| 151 | /* A.11 Effect Unit Effect Types */ | ||
| 152 | #define UAC2_EFFECT_UNDEFINED 0x00 | ||
| 153 | #define UAC2_EFFECT_PARAM_EQ 0x01 | ||
| 154 | #define UAC2_EFFECT_REVERB 0x02 | ||
| 155 | #define UAC2_EFFECT_MOD_DELAY 0x03 | ||
| 156 | #define UAC2_EFFECT_DYN_RANGE_COMP 0x04 | ||
| 157 | |||
| 158 | /* A.12 Processing Unit Process Types */ | ||
| 159 | #define UAC2_PROCESS_UNDEFINED 0x00 | ||
| 160 | #define UAC2_PROCESS_UP_DOWNMIX 0x01 | ||
| 161 | #define UAC2_PROCESS_DOLBY_PROLOCIC 0x02 | ||
| 162 | #define UAC2_PROCESS_STEREO_EXTENDER 0x03 | ||
| 163 | |||
| 164 | /* A.14 Audio Class-Specific Request Codes */ | ||
| 165 | #define UAC2_CS_CUR 0x01 | ||
| 166 | #define UAC2_CS_RANGE 0x02 | ||
| 167 | #define UAC2_CS_MEM 0x03 | ||
| 168 | |||
| 169 | /* A.15 Encoder Type Codes */ | ||
| 170 | #define UAC2_ENCODER_UNDEFINED 0x00 | ||
| 171 | #define UAC2_ENCODER_OTHER 0x01 | ||
| 172 | #define UAC2_ENCODER_MPEG 0x02 | ||
| 173 | #define UAC2_ENCODER_AC3 0x03 | ||
| 174 | #define UAC2_ENCODER_WMA 0x04 | ||
| 175 | #define UAC2_ENCODER_DTS 0x05 | ||
| 176 | |||
| 177 | /* A.16 Decoder Type Codes */ | ||
| 178 | #define UAC2_DECODER_UNDEFINED 0x00 | ||
| 179 | #define UAC2_DECODER_OTHER 0x01 | ||
| 180 | #define UAC2_DECODER_MPEG 0x02 | ||
| 181 | #define UAC2_DECODER_AC3 0x03 | ||
| 182 | #define UAC2_DECODER_WMA 0x04 | ||
| 183 | #define UAC2_DECODER_DTS 0x05 | ||
| 184 | |||
| 185 | /* A.17.1 Clock Source Control Selectors */ | ||
| 186 | #define UAC2_CS_UNDEFINED 0x00 | ||
| 187 | #define UAC2_CS_CONTROL_SAM_FREQ 0x01 | ||
| 188 | #define UAC2_CS_CONTROL_CLOCK_VALID 0x02 | ||
| 189 | |||
| 190 | /* A.17.2 Clock Selector Control Selectors */ | ||
| 191 | #define UAC2_CX_UNDEFINED 0x00 | ||
| 192 | #define UAC2_CX_CLOCK_SELECTOR 0x01 | ||
| 193 | |||
| 194 | /* A.17.3 Clock Multiplier Control Selectors */ | ||
| 195 | #define UAC2_CM_UNDEFINED 0x00 | ||
| 196 | #define UAC2_CM_NUMERATOR 0x01 | ||
| 197 | #define UAC2_CM_DENOMINTATOR 0x02 | ||
| 198 | |||
| 199 | /* A.17.4 Terminal Control Selectors */ | ||
| 200 | #define UAC2_TE_UNDEFINED 0x00 | ||
| 201 | #define UAC2_TE_COPY_PROTECT 0x01 | ||
| 202 | #define UAC2_TE_CONNECTOR 0x02 | ||
| 203 | #define UAC2_TE_OVERLOAD 0x03 | ||
| 204 | #define UAC2_TE_CLUSTER 0x04 | ||
| 205 | #define UAC2_TE_UNDERFLOW 0x05 | ||
| 206 | #define UAC2_TE_OVERFLOW 0x06 | ||
| 207 | #define UAC2_TE_LATENCY 0x07 | ||
| 208 | |||
| 209 | /* A.17.5 Mixer Control Selectors */ | ||
| 210 | #define UAC2_MU_UNDEFINED 0x00 | ||
| 211 | #define UAC2_MU_MIXER 0x01 | ||
| 212 | #define UAC2_MU_CLUSTER 0x02 | ||
| 213 | #define UAC2_MU_UNDERFLOW 0x03 | ||
| 214 | #define UAC2_MU_OVERFLOW 0x04 | ||
| 215 | #define UAC2_MU_LATENCY 0x05 | ||
| 216 | |||
| 217 | /* A.17.6 Selector Control Selectors */ | ||
| 218 | #define UAC2_SU_UNDEFINED 0x00 | ||
| 219 | #define UAC2_SU_SELECTOR 0x01 | ||
| 220 | #define UAC2_SU_LATENCY 0x02 | ||
| 221 | |||
| 222 | /* A.17.7 Feature Unit Control Selectors */ | ||
| 223 | /* see audio.h for the rest, which is identical to v1 */ | ||
| 224 | #define UAC2_FU_INPUT_GAIN 0x0b | ||
| 225 | #define UAC2_FU_INPUT_GAIN_PAD 0x0c | ||
| 226 | #define UAC2_FU_PHASE_INVERTER 0x0d | ||
| 227 | #define UAC2_FU_UNDERFLOW 0x0e | ||
| 228 | #define UAC2_FU_OVERFLOW 0x0f | ||
| 229 | #define UAC2_FU_LATENCY 0x10 | ||
| 230 | |||
| 231 | /* A.17.8.1 Parametric Equalizer Section Effect Unit Control Selectors */ | ||
| 232 | #define UAC2_PE_UNDEFINED 0x00 | ||
| 233 | #define UAC2_PE_ENABLE 0x01 | ||
| 234 | #define UAC2_PE_CENTERFREQ 0x02 | ||
| 235 | #define UAC2_PE_QFACTOR 0x03 | ||
| 236 | #define UAC2_PE_GAIN 0x04 | ||
| 237 | #define UAC2_PE_UNDERFLOW 0x05 | ||
| 238 | #define UAC2_PE_OVERFLOW 0x06 | ||
| 239 | #define UAC2_PE_LATENCY 0x07 | ||
| 240 | |||
| 241 | /* A.17.8.2 Reverberation Effect Unit Control Selectors */ | ||
| 242 | #define UAC2_RV_UNDEFINED 0x00 | ||
| 243 | #define UAC2_RV_ENABLE 0x01 | ||
| 244 | #define UAC2_RV_TYPE 0x02 | ||
| 245 | #define UAC2_RV_LEVEL 0x03 | ||
| 246 | #define UAC2_RV_TIME 0x04 | ||
| 247 | #define UAC2_RV_FEEDBACK 0x05 | ||
| 248 | #define UAC2_RV_PREDELAY 0x06 | ||
| 249 | #define UAC2_RV_DENSITY 0x07 | ||
| 250 | #define UAC2_RV_HIFREQ_ROLLOFF 0x08 | ||
| 251 | #define UAC2_RV_UNDERFLOW 0x09 | ||
| 252 | #define UAC2_RV_OVERFLOW 0x0a | ||
| 253 | #define UAC2_RV_LATENCY 0x0b | ||
| 254 | |||
| 255 | /* A.17.8.3 Modulation Delay Effect Control Selectors */ | ||
| 256 | #define UAC2_MD_UNDEFINED 0x00 | ||
| 257 | #define UAC2_MD_ENABLE 0x01 | ||
| 258 | #define UAC2_MD_BALANCE 0x02 | ||
| 259 | #define UAC2_MD_RATE 0x03 | ||
| 260 | #define UAC2_MD_DEPTH 0x04 | ||
| 261 | #define UAC2_MD_TIME 0x05 | ||
| 262 | #define UAC2_MD_FEEDBACK 0x06 | ||
| 263 | #define UAC2_MD_UNDERFLOW 0x07 | ||
| 264 | #define UAC2_MD_OVERFLOW 0x08 | ||
| 265 | #define UAC2_MD_LATENCY 0x09 | ||
| 266 | |||
| 267 | /* A.17.8.4 Dynamic Range Compressor Effect Unit Control Selectors */ | ||
| 268 | #define UAC2_DR_UNDEFINED 0x00 | ||
| 269 | #define UAC2_DR_ENABLE 0x01 | ||
| 270 | #define UAC2_DR_COMPRESSION_RATE 0x02 | ||
| 271 | #define UAC2_DR_MAXAMPL 0x03 | ||
| 272 | #define UAC2_DR_THRESHOLD 0x04 | ||
| 273 | #define UAC2_DR_ATTACK_TIME 0x05 | ||
| 274 | #define UAC2_DR_RELEASE_TIME 0x06 | ||
| 275 | #define UAC2_DR_UNDEFLOW 0x07 | ||
| 276 | #define UAC2_DR_OVERFLOW 0x08 | ||
| 277 | #define UAC2_DR_LATENCY 0x09 | ||
| 278 | |||
| 279 | /* A.17.9.1 Up/Down-mix Processing Unit Control Selectors */ | ||
| 280 | #define UAC2_UD_UNDEFINED 0x00 | ||
| 281 | #define UAC2_UD_ENABLE 0x01 | ||
| 282 | #define UAC2_UD_MODE_SELECT 0x02 | ||
| 283 | #define UAC2_UD_CLUSTER 0x03 | ||
| 284 | #define UAC2_UD_UNDERFLOW 0x04 | ||
| 285 | #define UAC2_UD_OVERFLOW 0x05 | ||
| 286 | #define UAC2_UD_LATENCY 0x06 | ||
| 287 | |||
| 288 | /* A.17.9.2 Dolby Prologic[tm] Processing Unit Control Selectors */ | ||
| 289 | #define UAC2_DP_UNDEFINED 0x00 | ||
| 290 | #define UAC2_DP_ENABLE 0x01 | ||
| 291 | #define UAC2_DP_MODE_SELECT 0x02 | ||
| 292 | #define UAC2_DP_CLUSTER 0x03 | ||
| 293 | #define UAC2_DP_UNDERFFLOW 0x04 | ||
| 294 | #define UAC2_DP_OVERFLOW 0x05 | ||
| 295 | #define UAC2_DP_LATENCY 0x06 | ||
| 296 | |||
| 297 | /* A.17.9.3 Stereo Expander Processing Unit Control Selectors */ | ||
| 298 | #define UAC2_ST_EXT_UNDEFINED 0x00 | ||
| 299 | #define UAC2_ST_EXT_ENABLE 0x01 | ||
| 300 | #define UAC2_ST_EXT_WIDTH 0x02 | ||
| 301 | #define UAC2_ST_EXT_UNDEFLOW 0x03 | ||
| 302 | #define UAC2_ST_EXT_OVERFLOW 0x04 | ||
| 303 | #define UAC2_ST_EXT_LATENCY 0x05 | ||
| 304 | |||
| 305 | /* A.17.10 Extension Unit Control Selectors */ | ||
| 306 | #define UAC2_XU_UNDEFINED 0x00 | ||
| 307 | #define UAC2_XU_ENABLE 0x01 | ||
| 308 | #define UAC2_XU_CLUSTER 0x02 | ||
| 309 | #define UAC2_XU_UNDERFLOW 0x03 | ||
| 310 | #define UAC2_XU_OVERFLOW 0x04 | ||
| 311 | #define UAC2_XU_LATENCY 0x05 | ||
| 312 | |||
| 313 | /* A.17.11 AudioStreaming Interface Control Selectors */ | ||
| 314 | #define UAC2_AS_UNDEFINED 0x00 | ||
| 315 | #define UAC2_AS_ACT_ALT_SETTING 0x01 | ||
| 316 | #define UAC2_AS_VAL_ALT_SETTINGS 0x02 | ||
| 317 | #define UAC2_AS_AUDIO_DATA_FORMAT 0x03 | ||
| 318 | |||
| 319 | /* A.17.12 Encoder Control Selectors */ | ||
| 320 | #define UAC2_EN_UNDEFINED 0x00 | ||
| 321 | #define UAC2_EN_BIT_RATE 0x01 | ||
| 322 | #define UAC2_EN_QUALITY 0x02 | ||
| 323 | #define UAC2_EN_VBR 0x03 | ||
| 324 | #define UAC2_EN_TYPE 0x04 | ||
| 325 | #define UAC2_EN_UNDERFLOW 0x05 | ||
| 326 | #define UAC2_EN_OVERFLOW 0x06 | ||
| 327 | #define UAC2_EN_ENCODER_ERROR 0x07 | ||
| 328 | #define UAC2_EN_PARAM1 0x08 | ||
| 329 | #define UAC2_EN_PARAM2 0x09 | ||
| 330 | #define UAC2_EN_PARAM3 0x0a | ||
| 331 | #define UAC2_EN_PARAM4 0x0b | ||
| 332 | #define UAC2_EN_PARAM5 0x0c | ||
| 333 | #define UAC2_EN_PARAM6 0x0d | ||
| 334 | #define UAC2_EN_PARAM7 0x0e | ||
| 335 | #define UAC2_EN_PARAM8 0x0f | ||
| 336 | |||
| 337 | /* A.17.13.1 MPEG Decoder Control Selectors */ | ||
| 338 | #define UAC2_MPEG_UNDEFINED 0x00 | ||
| 339 | #define UAC2_MPEG_DUAL_CHANNEL 0x01 | ||
| 340 | #define UAC2_MPEG_SECOND_STEREO 0x02 | ||
| 341 | #define UAC2_MPEG_MULTILINGUAL 0x03 | ||
| 342 | #define UAC2_MPEG_DYN_RANGE 0x04 | ||
| 343 | #define UAC2_MPEG_SCALING 0x05 | ||
| 344 | #define UAC2_MPEG_HILO_SCALING 0x06 | ||
| 345 | #define UAC2_MPEG_UNDERFLOW 0x07 | ||
| 346 | #define UAC2_MPEG_OVERFLOW 0x08 | ||
| 347 | #define UAC2_MPEG_DECODER_ERROR 0x09 | ||
| 348 | |||
| 349 | /* A17.13.2 AC3 Decoder Control Selectors */ | ||
| 350 | #define UAC2_AC3_UNDEFINED 0x00 | ||
| 351 | #define UAC2_AC3_MODE 0x01 | ||
| 352 | #define UAC2_AC3_DYN_RANGE 0x02 | ||
| 353 | #define UAC2_AC3_SCALING 0x03 | ||
| 354 | #define UAC2_AC3_HILO_SCALING 0x04 | ||
| 355 | #define UAC2_AC3_UNDERFLOW 0x05 | ||
| 356 | #define UAC2_AC3_OVERFLOW 0x06 | ||
| 357 | #define UAC2_AC3_DECODER_ERROR 0x07 | ||
| 358 | |||
| 359 | /* A17.13.3 WMA Decoder Control Selectors */ | ||
| 360 | #define UAC2_WMA_UNDEFINED 0x00 | ||
| 361 | #define UAC2_WMA_UNDERFLOW 0x01 | ||
| 362 | #define UAC2_WMA_OVERFLOW 0x02 | ||
| 363 | #define UAC2_WMA_DECODER_ERROR 0x03 | ||
| 364 | |||
| 365 | /* A17.13.4 DTS Decoder Control Selectors */ | ||
| 366 | #define UAC2_DTS_UNDEFINED 0x00 | ||
| 367 | #define UAC2_DTS_UNDERFLOW 0x01 | ||
| 368 | #define UAC2_DTS_OVERFLOW 0x02 | ||
| 369 | #define UAC2_DTS_DECODER_ERROR 0x03 | ||
| 370 | |||
| 371 | /* A17.14 Endpoint Control Selectors */ | ||
| 372 | #define UAC2_EP_CS_UNDEFINED 0x00 | ||
| 373 | #define UAC2_EP_CS_PITCH 0x01 | ||
| 374 | #define UAC2_EP_CS_DATA_OVERRUN 0x02 | ||
| 375 | #define UAC2_EP_CS_DATA_UNDERRUN 0x03 | ||
| 376 | |||
| 377 | #endif /* __LINUX_USB_AUDIO_V2_H */ | ||
| 378 | |||
diff --git a/include/linux/usb/audio.h b/include/linux/usb/audio.h index 4d3e450e2b03..c0ef18dc2da7 100644 --- a/include/linux/usb/audio.h +++ b/include/linux/usb/audio.h | |||
| @@ -13,6 +13,9 @@ | |||
| 13 | * Comments below reference relevant sections of that document: | 13 | * Comments below reference relevant sections of that document: |
| 14 | * | 14 | * |
| 15 | * http://www.usb.org/developers/devclass_docs/audio10.pdf | 15 | * http://www.usb.org/developers/devclass_docs/audio10.pdf |
| 16 | * | ||
| 17 | * Types and defines in this file are either specific to version 1.0 of | ||
| 18 | * this standard or common for newer versions. | ||
| 16 | */ | 19 | */ |
| 17 | 20 | ||
| 18 | #ifndef __LINUX_USB_AUDIO_H | 21 | #ifndef __LINUX_USB_AUDIO_H |
| @@ -20,14 +23,15 @@ | |||
| 20 | 23 | ||
| 21 | #include <linux/types.h> | 24 | #include <linux/types.h> |
| 22 | 25 | ||
| 26 | /* bInterfaceProtocol values to denote the version of the standard used */ | ||
| 27 | #define UAC_VERSION_1 0x00 | ||
| 28 | #define UAC_VERSION_2 0x20 | ||
| 29 | |||
| 23 | /* A.2 Audio Interface Subclass Codes */ | 30 | /* A.2 Audio Interface Subclass Codes */ |
| 24 | #define USB_SUBCLASS_AUDIOCONTROL 0x01 | 31 | #define USB_SUBCLASS_AUDIOCONTROL 0x01 |
| 25 | #define USB_SUBCLASS_AUDIOSTREAMING 0x02 | 32 | #define USB_SUBCLASS_AUDIOSTREAMING 0x02 |
| 26 | #define USB_SUBCLASS_MIDISTREAMING 0x03 | 33 | #define USB_SUBCLASS_MIDISTREAMING 0x03 |
| 27 | 34 | ||
| 28 | #define UAC_VERSION_1 0x00 | ||
| 29 | #define UAC_VERSION_2 0x20 | ||
| 30 | |||
| 31 | /* A.5 Audio Class-Specific AC Interface Descriptor Subtypes */ | 35 | /* A.5 Audio Class-Specific AC Interface Descriptor Subtypes */ |
| 32 | #define UAC_HEADER 0x01 | 36 | #define UAC_HEADER 0x01 |
| 33 | #define UAC_INPUT_TERMINAL 0x02 | 37 | #define UAC_INPUT_TERMINAL 0x02 |
| @@ -38,15 +42,6 @@ | |||
| 38 | #define UAC_PROCESSING_UNIT_V1 0x07 | 42 | #define UAC_PROCESSING_UNIT_V1 0x07 |
| 39 | #define UAC_EXTENSION_UNIT_V1 0x08 | 43 | #define UAC_EXTENSION_UNIT_V1 0x08 |
| 40 | 44 | ||
| 41 | /* UAC v2.0 types */ | ||
| 42 | #define UAC_EFFECT_UNIT 0x07 | ||
| 43 | #define UAC_PROCESSING_UNIT_V2 0x08 | ||
| 44 | #define UAC_EXTENSION_UNIT_V2 0x09 | ||
| 45 | #define UAC_CLOCK_SOURCE 0x0a | ||
| 46 | #define UAC_CLOCK_SELECTOR 0x0b | ||
| 47 | #define UAC_CLOCK_MULTIPLIER 0x0c | ||
| 48 | #define UAC_SAMPLE_RATE_CONVERTER 0x0d | ||
| 49 | |||
| 50 | /* A.6 Audio Class-Specific AS Interface Descriptor Subtypes */ | 45 | /* A.6 Audio Class-Specific AS Interface Descriptor Subtypes */ |
| 51 | #define UAC_AS_GENERAL 0x01 | 46 | #define UAC_AS_GENERAL 0x01 |
| 52 | #define UAC_FORMAT_TYPE 0x02 | 47 | #define UAC_FORMAT_TYPE 0x02 |
| @@ -78,10 +73,6 @@ | |||
| 78 | 73 | ||
| 79 | #define UAC_GET_STAT 0xff | 74 | #define UAC_GET_STAT 0xff |
| 80 | 75 | ||
| 81 | /* Audio class v2.0 handles all the parameter calls differently */ | ||
| 82 | #define UAC2_CS_CUR 0x01 | ||
| 83 | #define UAC2_CS_RANGE 0x02 | ||
| 84 | |||
| 85 | /* MIDI - A.1 MS Class-Specific Interface Descriptor Subtypes */ | 76 | /* MIDI - A.1 MS Class-Specific Interface Descriptor Subtypes */ |
| 86 | #define UAC_MS_HEADER 0x01 | 77 | #define UAC_MS_HEADER 0x01 |
| 87 | #define UAC_MIDI_IN_JACK 0x02 | 78 | #define UAC_MIDI_IN_JACK 0x02 |
| @@ -190,6 +181,156 @@ struct uac_feature_unit_descriptor_##ch { \ | |||
| 190 | __u8 iFeature; \ | 181 | __u8 iFeature; \ |
| 191 | } __attribute__ ((packed)) | 182 | } __attribute__ ((packed)) |
| 192 | 183 | ||
| 184 | /* 4.3.2.3 Mixer Unit Descriptor */ | ||
| 185 | struct uac_mixer_unit_descriptor { | ||
| 186 | __u8 bLength; | ||
| 187 | __u8 bDescriptorType; | ||
| 188 | __u8 bDescriptorSubtype; | ||
| 189 | __u8 bUnitID; | ||
| 190 | __u8 bNrInPins; | ||
| 191 | __u8 baSourceID[]; | ||
| 192 | } __attribute__ ((packed)); | ||
| 193 | |||
| 194 | static inline __u8 uac_mixer_unit_bNrChannels(struct uac_mixer_unit_descriptor *desc) | ||
| 195 | { | ||
| 196 | return desc->baSourceID[desc->bNrInPins]; | ||
| 197 | } | ||
| 198 | |||
| 199 | static inline __u32 uac_mixer_unit_wChannelConfig(struct uac_mixer_unit_descriptor *desc, | ||
| 200 | int protocol) | ||
| 201 | { | ||
| 202 | if (protocol == UAC_VERSION_1) | ||
| 203 | return (desc->baSourceID[desc->bNrInPins + 2] << 8) | | ||
| 204 | desc->baSourceID[desc->bNrInPins + 1]; | ||
| 205 | else | ||
| 206 | return (desc->baSourceID[desc->bNrInPins + 4] << 24) | | ||
| 207 | (desc->baSourceID[desc->bNrInPins + 3] << 16) | | ||
| 208 | (desc->baSourceID[desc->bNrInPins + 2] << 8) | | ||
| 209 | (desc->baSourceID[desc->bNrInPins + 1]); | ||
| 210 | } | ||
| 211 | |||
| 212 | static inline __u8 uac_mixer_unit_iChannelNames(struct uac_mixer_unit_descriptor *desc, | ||
| 213 | int protocol) | ||
| 214 | { | ||
| 215 | return (protocol == UAC_VERSION_1) ? | ||
| 216 | desc->baSourceID[desc->bNrInPins + 3] : | ||
| 217 | desc->baSourceID[desc->bNrInPins + 5]; | ||
| 218 | } | ||
| 219 | |||
| 220 | static inline __u8 *uac_mixer_unit_bmControls(struct uac_mixer_unit_descriptor *desc, | ||
| 221 | int protocol) | ||
| 222 | { | ||
| 223 | return (protocol == UAC_VERSION_1) ? | ||
| 224 | &desc->baSourceID[desc->bNrInPins + 4] : | ||
| 225 | &desc->baSourceID[desc->bNrInPins + 6]; | ||
| 226 | } | ||
| 227 | |||
| 228 | static inline __u8 uac_mixer_unit_iMixer(struct uac_mixer_unit_descriptor *desc) | ||
| 229 | { | ||
| 230 | __u8 *raw = (__u8 *) desc; | ||
| 231 | return raw[desc->bLength - 1]; | ||
| 232 | } | ||
| 233 | |||
| 234 | /* 4.3.2.4 Selector Unit Descriptor */ | ||
| 235 | struct uac_selector_unit_descriptor { | ||
| 236 | __u8 bLength; | ||
| 237 | __u8 bDescriptorType; | ||
| 238 | __u8 bDescriptorSubtype; | ||
| 239 | __u8 bUintID; | ||
| 240 | __u8 bNrInPins; | ||
| 241 | __u8 baSourceID[]; | ||
| 242 | } __attribute__ ((packed)); | ||
| 243 | |||
| 244 | static inline __u8 uac_selector_unit_iSelector(struct uac_selector_unit_descriptor *desc) | ||
| 245 | { | ||
| 246 | __u8 *raw = (__u8 *) desc; | ||
| 247 | return raw[9 + desc->bLength - 1]; | ||
| 248 | } | ||
| 249 | |||
| 250 | /* 4.3.2.5 Feature Unit Descriptor */ | ||
| 251 | struct uac_feature_unit_descriptor { | ||
| 252 | __u8 bLength; | ||
| 253 | __u8 bDescriptorType; | ||
| 254 | __u8 bDescriptorSubtype; | ||
| 255 | __u8 bUnitID; | ||
| 256 | __u8 bSourceID; | ||
| 257 | __u8 bControlSize; | ||
| 258 | __u8 bmaControls[0]; /* variable length */ | ||
| 259 | } __attribute__((packed)); | ||
| 260 | |||
| 261 | static inline __u8 uac_feature_unit_iFeature(struct uac_feature_unit_descriptor *desc) | ||
| 262 | { | ||
| 263 | __u8 *raw = (__u8 *) desc; | ||
| 264 | return raw[desc->bLength - 1]; | ||
| 265 | } | ||
| 266 | |||
| 267 | /* 4.3.2.6 Processing Unit Descriptors */ | ||
| 268 | struct uac_processing_unit_descriptor { | ||
| 269 | __u8 bLength; | ||
| 270 | __u8 bDescriptorType; | ||
| 271 | __u8 bDescriptorSubtype; | ||
| 272 | __u8 bUnitID; | ||
| 273 | __u16 wProcessType; | ||
| 274 | __u8 bNrInPins; | ||
| 275 | __u8 baSourceID[]; | ||
| 276 | } __attribute__ ((packed)); | ||
| 277 | |||
| 278 | static inline __u8 uac_processing_unit_bNrChannels(struct uac_processing_unit_descriptor *desc) | ||
| 279 | { | ||
| 280 | return desc->baSourceID[desc->bNrInPins]; | ||
| 281 | } | ||
| 282 | |||
| 283 | static inline __u32 uac_processing_unit_wChannelConfig(struct uac_processing_unit_descriptor *desc, | ||
| 284 | int protocol) | ||
| 285 | { | ||
| 286 | if (protocol == UAC_VERSION_1) | ||
| 287 | return (desc->baSourceID[desc->bNrInPins + 2] << 8) | | ||
| 288 | desc->baSourceID[desc->bNrInPins + 1]; | ||
| 289 | else | ||
| 290 | return (desc->baSourceID[desc->bNrInPins + 4] << 24) | | ||
| 291 | (desc->baSourceID[desc->bNrInPins + 3] << 16) | | ||
| 292 | (desc->baSourceID[desc->bNrInPins + 2] << 8) | | ||
| 293 | (desc->baSourceID[desc->bNrInPins + 1]); | ||
| 294 | } | ||
| 295 | |||
| 296 | static inline __u8 uac_processing_unit_iChannelNames(struct uac_processing_unit_descriptor *desc, | ||
| 297 | int protocol) | ||
| 298 | { | ||
| 299 | return (protocol == UAC_VERSION_1) ? | ||
| 300 | desc->baSourceID[desc->bNrInPins + 3] : | ||
| 301 | desc->baSourceID[desc->bNrInPins + 5]; | ||
| 302 | } | ||
| 303 | |||
| 304 | static inline __u8 uac_processing_unit_bControlSize(struct uac_processing_unit_descriptor *desc, | ||
| 305 | int protocol) | ||
| 306 | { | ||
| 307 | return (protocol == UAC_VERSION_1) ? | ||
| 308 | desc->baSourceID[desc->bNrInPins + 4] : | ||
| 309 | desc->baSourceID[desc->bNrInPins + 6]; | ||
| 310 | } | ||
| 311 | |||
| 312 | static inline __u8 *uac_processing_unit_bmControls(struct uac_processing_unit_descriptor *desc, | ||
| 313 | int protocol) | ||
| 314 | { | ||
| 315 | return (protocol == UAC_VERSION_1) ? | ||
| 316 | &desc->baSourceID[desc->bNrInPins + 5] : | ||
| 317 | &desc->baSourceID[desc->bNrInPins + 7]; | ||
| 318 | } | ||
| 319 | |||
| 320 | static inline __u8 uac_processing_unit_iProcessing(struct uac_processing_unit_descriptor *desc, | ||
| 321 | int protocol) | ||
| 322 | { | ||
| 323 | __u8 control_size = uac_processing_unit_bControlSize(desc, protocol); | ||
| 324 | return desc->baSourceID[desc->bNrInPins + control_size]; | ||
| 325 | } | ||
| 326 | |||
| 327 | static inline __u8 *uac_processing_unit_specific(struct uac_processing_unit_descriptor *desc, | ||
| 328 | int protocol) | ||
| 329 | { | ||
| 330 | __u8 control_size = uac_processing_unit_bControlSize(desc, protocol); | ||
| 331 | return &desc->baSourceID[desc->bNrInPins + control_size + 1]; | ||
| 332 | } | ||
| 333 | |||
| 193 | /* 4.5.2 Class-Specific AS Interface Descriptor */ | 334 | /* 4.5.2 Class-Specific AS Interface Descriptor */ |
| 194 | struct uac_as_header_descriptor_v1 { | 335 | struct uac_as_header_descriptor_v1 { |
| 195 | __u8 bLength; /* in bytes: 7 */ | 336 | __u8 bLength; /* in bytes: 7 */ |
| @@ -200,19 +341,6 @@ struct uac_as_header_descriptor_v1 { | |||
| 200 | __le16 wFormatTag; /* The Audio Data Format */ | 341 | __le16 wFormatTag; /* The Audio Data Format */ |
| 201 | } __attribute__ ((packed)); | 342 | } __attribute__ ((packed)); |
| 202 | 343 | ||
| 203 | struct uac_as_header_descriptor_v2 { | ||
| 204 | __u8 bLength; | ||
| 205 | __u8 bDescriptorType; | ||
| 206 | __u8 bDescriptorSubtype; | ||
| 207 | __u8 bTerminalLink; | ||
| 208 | __u8 bmControls; | ||
| 209 | __u8 bFormatType; | ||
| 210 | __u32 bmFormats; | ||
| 211 | __u8 bNrChannels; | ||
| 212 | __u32 bmChannelConfig; | ||
| 213 | __u8 iChannelNames; | ||
| 214 | } __attribute__((packed)); | ||
| 215 | |||
| 216 | #define UAC_DT_AS_HEADER_SIZE 7 | 344 | #define UAC_DT_AS_HEADER_SIZE 7 |
| 217 | 345 | ||
| 218 | /* Formats - A.1.1 Audio Data Format Type I Codes */ | 346 | /* Formats - A.1.1 Audio Data Format Type I Codes */ |
| @@ -277,7 +405,6 @@ struct uac_format_type_i_ext_descriptor { | |||
| 277 | __u8 bSideBandProtocol; | 405 | __u8 bSideBandProtocol; |
| 278 | } __attribute__((packed)); | 406 | } __attribute__((packed)); |
| 279 | 407 | ||
| 280 | |||
| 281 | /* Formats - Audio Data Format Type I Codes */ | 408 | /* Formats - Audio Data Format Type I Codes */ |
| 282 | 409 | ||
| 283 | #define UAC_FORMAT_TYPE_II_MPEG 0x1001 | 410 | #define UAC_FORMAT_TYPE_II_MPEG 0x1001 |
| @@ -329,38 +456,15 @@ struct uac_iso_endpoint_descriptor { | |||
| 329 | __u8 bmAttributes; | 456 | __u8 bmAttributes; |
| 330 | __u8 bLockDelayUnits; | 457 | __u8 bLockDelayUnits; |
| 331 | __le16 wLockDelay; | 458 | __le16 wLockDelay; |
| 332 | }; | 459 | } __attribute__((packed)); |
| 333 | #define UAC_ISO_ENDPOINT_DESC_SIZE 7 | 460 | #define UAC_ISO_ENDPOINT_DESC_SIZE 7 |
| 334 | 461 | ||
| 335 | #define UAC_EP_CS_ATTR_SAMPLE_RATE 0x01 | 462 | #define UAC_EP_CS_ATTR_SAMPLE_RATE 0x01 |
| 336 | #define UAC_EP_CS_ATTR_PITCH_CONTROL 0x02 | 463 | #define UAC_EP_CS_ATTR_PITCH_CONTROL 0x02 |
| 337 | #define UAC_EP_CS_ATTR_FILL_MAX 0x80 | 464 | #define UAC_EP_CS_ATTR_FILL_MAX 0x80 |
| 338 | 465 | ||
| 339 | /* Audio class v2.0: CLOCK_SOURCE descriptor */ | ||
| 340 | |||
| 341 | struct uac_clock_source_descriptor { | ||
| 342 | __u8 bLength; | ||
| 343 | __u8 bDescriptorType; | ||
| 344 | __u8 bDescriptorSubtype; | ||
| 345 | __u8 bClockID; | ||
| 346 | __u8 bmAttributes; | ||
| 347 | __u8 bmControls; | ||
| 348 | __u8 bAssocTerminal; | ||
| 349 | __u8 iClockSource; | ||
| 350 | } __attribute__((packed)); | ||
| 351 | |||
| 352 | /* A.10.2 Feature Unit Control Selectors */ | 466 | /* A.10.2 Feature Unit Control Selectors */ |
| 353 | 467 | ||
| 354 | struct uac_feature_unit_descriptor { | ||
| 355 | __u8 bLength; | ||
| 356 | __u8 bDescriptorType; | ||
| 357 | __u8 bDescriptorSubtype; | ||
| 358 | __u8 bUnitID; | ||
| 359 | __u8 bSourceID; | ||
| 360 | __u8 bControlSize; | ||
| 361 | __u8 controls[0]; /* variable length */ | ||
| 362 | } __attribute__((packed)); | ||
| 363 | |||
| 364 | #define UAC_FU_CONTROL_UNDEFINED 0x00 | 468 | #define UAC_FU_CONTROL_UNDEFINED 0x00 |
| 365 | #define UAC_MUTE_CONTROL 0x01 | 469 | #define UAC_MUTE_CONTROL 0x01 |
| 366 | #define UAC_VOLUME_CONTROL 0x02 | 470 | #define UAC_VOLUME_CONTROL 0x02 |
| @@ -384,6 +488,21 @@ struct uac_feature_unit_descriptor { | |||
| 384 | #define UAC_FU_BASS_BOOST (1 << (UAC_BASS_BOOST_CONTROL - 1)) | 488 | #define UAC_FU_BASS_BOOST (1 << (UAC_BASS_BOOST_CONTROL - 1)) |
| 385 | #define UAC_FU_LOUDNESS (1 << (UAC_LOUDNESS_CONTROL - 1)) | 489 | #define UAC_FU_LOUDNESS (1 << (UAC_LOUDNESS_CONTROL - 1)) |
| 386 | 490 | ||
| 491 | /* status word format (3.7.1.1) */ | ||
| 492 | |||
| 493 | #define UAC1_STATUS_TYPE_ORIG_MASK 0x0f | ||
| 494 | #define UAC1_STATUS_TYPE_ORIG_AUDIO_CONTROL_IF 0x0 | ||
| 495 | #define UAC1_STATUS_TYPE_ORIG_AUDIO_STREAM_IF 0x1 | ||
| 496 | #define UAC1_STATUS_TYPE_ORIG_AUDIO_STREAM_EP 0x2 | ||
| 497 | |||
| 498 | #define UAC1_STATUS_TYPE_IRQ_PENDING (1 << 7) | ||
| 499 | #define UAC1_STATUS_TYPE_MEM_CHANGED (1 << 6) | ||
| 500 | |||
| 501 | struct uac1_status_word { | ||
| 502 | __u8 bStatusType; | ||
| 503 | __u8 bOriginator; | ||
| 504 | } __attribute__((packed)); | ||
| 505 | |||
| 387 | #ifdef __KERNEL__ | 506 | #ifdef __KERNEL__ |
| 388 | 507 | ||
| 389 | struct usb_audio_control { | 508 | struct usb_audio_control { |
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index bbf45d500b6d..f4b7ca516cdd 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
| @@ -15,6 +15,8 @@ | |||
| 15 | #ifndef __LINUX_USB_GADGET_H | 15 | #ifndef __LINUX_USB_GADGET_H |
| 16 | #define __LINUX_USB_GADGET_H | 16 | #define __LINUX_USB_GADGET_H |
| 17 | 17 | ||
| 18 | #include <linux/slab.h> | ||
| 19 | |||
| 18 | struct usb_ep; | 20 | struct usb_ep; |
| 19 | 21 | ||
| 20 | /** | 22 | /** |
diff --git a/include/linux/virtio_console.h b/include/linux/virtio_console.h index ae4f039515b4..92228a8fbcbc 100644 --- a/include/linux/virtio_console.h +++ b/include/linux/virtio_console.h | |||
| @@ -12,37 +12,14 @@ | |||
| 12 | 12 | ||
| 13 | /* Feature bits */ | 13 | /* Feature bits */ |
| 14 | #define VIRTIO_CONSOLE_F_SIZE 0 /* Does host provide console size? */ | 14 | #define VIRTIO_CONSOLE_F_SIZE 0 /* Does host provide console size? */ |
| 15 | #define VIRTIO_CONSOLE_F_MULTIPORT 1 /* Does host provide multiple ports? */ | ||
| 16 | 15 | ||
| 17 | struct virtio_console_config { | 16 | struct virtio_console_config { |
| 18 | /* colums of the screens */ | 17 | /* colums of the screens */ |
| 19 | __u16 cols; | 18 | __u16 cols; |
| 20 | /* rows of the screens */ | 19 | /* rows of the screens */ |
| 21 | __u16 rows; | 20 | __u16 rows; |
| 22 | /* max. number of ports this device can hold */ | ||
| 23 | __u32 max_nr_ports; | ||
| 24 | /* number of ports added so far */ | ||
| 25 | __u32 nr_ports; | ||
| 26 | } __attribute__((packed)); | 21 | } __attribute__((packed)); |
| 27 | 22 | ||
| 28 | /* | ||
| 29 | * A message that's passed between the Host and the Guest for a | ||
| 30 | * particular port. | ||
| 31 | */ | ||
| 32 | struct virtio_console_control { | ||
| 33 | __u32 id; /* Port number */ | ||
| 34 | __u16 event; /* The kind of control event (see below) */ | ||
| 35 | __u16 value; /* Extra information for the key */ | ||
| 36 | }; | ||
| 37 | |||
| 38 | /* Some events for control messages */ | ||
| 39 | #define VIRTIO_CONSOLE_PORT_READY 0 | ||
| 40 | #define VIRTIO_CONSOLE_CONSOLE_PORT 1 | ||
| 41 | #define VIRTIO_CONSOLE_RESIZE 2 | ||
| 42 | #define VIRTIO_CONSOLE_PORT_OPEN 3 | ||
| 43 | #define VIRTIO_CONSOLE_PORT_NAME 4 | ||
| 44 | #define VIRTIO_CONSOLE_PORT_REMOVE 5 | ||
| 45 | |||
| 46 | #ifdef __KERNEL__ | 23 | #ifdef __KERNEL__ |
| 47 | int __init virtio_cons_early_init(int (*put_chars)(u32, const char *, int)); | 24 | int __init virtio_cons_early_init(int (*put_chars)(u32, const char *, int)); |
| 48 | #endif /* __KERNEL__ */ | 25 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/wimax/debug.h b/include/linux/wimax/debug.h index db8096e88533..57031b4d12f2 100644 --- a/include/linux/wimax/debug.h +++ b/include/linux/wimax/debug.h | |||
| @@ -155,6 +155,7 @@ | |||
| 155 | 155 | ||
| 156 | #include <linux/types.h> | 156 | #include <linux/types.h> |
| 157 | #include <linux/device.h> | 157 | #include <linux/device.h> |
| 158 | #include <linux/slab.h> | ||
| 158 | 159 | ||
| 159 | 160 | ||
| 160 | /* Backend stuff */ | 161 | /* Backend stuff */ |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 76e8903cd204..36520ded3e06 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
| @@ -34,6 +34,9 @@ struct writeback_control { | |||
| 34 | enum writeback_sync_modes sync_mode; | 34 | enum writeback_sync_modes sync_mode; |
| 35 | unsigned long *older_than_this; /* If !NULL, only write back inodes | 35 | unsigned long *older_than_this; /* If !NULL, only write back inodes |
| 36 | older than this */ | 36 | older than this */ |
| 37 | unsigned long wb_start; /* Time writeback_inodes_wb was | ||
| 38 | called. This is needed to avoid | ||
| 39 | extra jobs and livelock */ | ||
| 37 | long nr_to_write; /* Write this many pages, and decrement | 40 | long nr_to_write; /* Write this many pages, and decrement |
| 38 | this for each page written */ | 41 | this for each page written */ |
| 39 | long pages_skipped; /* Pages which were not written */ | 42 | long pages_skipped; /* Pages which were not written */ |
diff --git a/include/media/saa7146_vv.h b/include/media/saa7146_vv.h index b9da1f5591e7..4aeff96ff7d8 100644 --- a/include/media/saa7146_vv.h +++ b/include/media/saa7146_vv.h | |||
| @@ -188,7 +188,6 @@ void saa7146_buffer_timeout(unsigned long data); | |||
| 188 | void saa7146_dma_free(struct saa7146_dev* dev,struct videobuf_queue *q, | 188 | void saa7146_dma_free(struct saa7146_dev* dev,struct videobuf_queue *q, |
| 189 | struct saa7146_buf *buf); | 189 | struct saa7146_buf *buf); |
| 190 | 190 | ||
| 191 | int saa7146_vv_devinit(struct saa7146_dev *dev); | ||
| 192 | int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv); | 191 | int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv); |
| 193 | int saa7146_vv_release(struct saa7146_dev* dev); | 192 | int saa7146_vv_release(struct saa7146_dev* dev); |
| 194 | 193 | ||
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index f076dfa75ae8..4f3760afc20f 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
| @@ -54,6 +54,7 @@ enum p9_proto_versions{ | |||
| 54 | 54 | ||
| 55 | enum p9_trans_status { | 55 | enum p9_trans_status { |
| 56 | Connected, | 56 | Connected, |
| 57 | BeginDisconnect, | ||
| 57 | Disconnected, | 58 | Disconnected, |
| 58 | Hung, | 59 | Hung, |
| 59 | }; | 60 | }; |
| @@ -198,6 +199,7 @@ int p9_client_version(struct p9_client *); | |||
| 198 | struct p9_client *p9_client_create(const char *dev_name, char *options); | 199 | struct p9_client *p9_client_create(const char *dev_name, char *options); |
| 199 | void p9_client_destroy(struct p9_client *clnt); | 200 | void p9_client_destroy(struct p9_client *clnt); |
| 200 | void p9_client_disconnect(struct p9_client *clnt); | 201 | void p9_client_disconnect(struct p9_client *clnt); |
| 202 | void p9_client_begin_disconnect(struct p9_client *clnt); | ||
| 201 | struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid, | 203 | struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid, |
| 202 | char *uname, u32 n_uname, char *aname); | 204 | char *uname, u32 n_uname, char *aname); |
| 203 | struct p9_fid *p9_client_auth(struct p9_client *clnt, char *uname, | 205 | struct p9_fid *p9_client_auth(struct p9_client *clnt, char *uname, |
diff --git a/include/net/ax25.h b/include/net/ax25.h index 717e2192d521..206d22297ac3 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #include <linux/spinlock.h> | 10 | #include <linux/spinlock.h> |
| 11 | #include <linux/timer.h> | 11 | #include <linux/timer.h> |
| 12 | #include <linux/list.h> | 12 | #include <linux/list.h> |
| 13 | #include <linux/slab.h> | ||
| 13 | #include <asm/atomic.h> | 14 | #include <asm/atomic.h> |
| 14 | 15 | ||
| 15 | #define AX25_T1CLAMPLO 1 | 16 | #define AX25_T1CLAMPLO 1 |
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 04a6908e38d2..ff77e8f882f1 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h | |||
| @@ -176,6 +176,6 @@ extern void hci_sock_cleanup(void); | |||
| 176 | extern int bt_sysfs_init(void); | 176 | extern int bt_sysfs_init(void); |
| 177 | extern void bt_sysfs_cleanup(void); | 177 | extern void bt_sysfs_cleanup(void); |
| 178 | 178 | ||
| 179 | extern struct class *bt_class; | 179 | extern struct dentry *bt_debugfs; |
| 180 | 180 | ||
| 181 | #endif /* __BLUETOOTH_H */ | 181 | #endif /* __BLUETOOTH_H */ |
diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h index c07ac9650ebc..c49086d2bc7d 100644 --- a/include/net/fib_rules.h +++ b/include/net/fib_rules.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define __NET_FIB_RULES_H | 2 | #define __NET_FIB_RULES_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
| 5 | #include <linux/slab.h> | ||
| 5 | #include <linux/netdevice.h> | 6 | #include <linux/netdevice.h> |
| 6 | #include <linux/fib_rules.h> | 7 | #include <linux/fib_rules.h> |
| 7 | #include <net/flow.h> | 8 | #include <net/flow.h> |
diff --git a/include/net/ipx.h b/include/net/ipx.h index a14121dd1932..ef51a668ba19 100644 --- a/include/net/ipx.h +++ b/include/net/ipx.h | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include <net/datalink.h> | 13 | #include <net/datalink.h> |
| 14 | #include <linux/ipx.h> | 14 | #include <linux/ipx.h> |
| 15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
| 16 | #include <linux/slab.h> | ||
| 16 | 17 | ||
| 17 | struct ipx_address { | 18 | struct ipx_address { |
| 18 | __be32 net; | 19 | __be32 net; |
diff --git a/include/net/iucv/iucv.h b/include/net/iucv/iucv.h index 5e310c8d8e2f..205a3360156e 100644 --- a/include/net/iucv/iucv.h +++ b/include/net/iucv/iucv.h | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | */ | 28 | */ |
| 29 | 29 | ||
| 30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
| 31 | #include <linux/slab.h> | ||
| 31 | #include <asm/debug.h> | 32 | #include <asm/debug.h> |
| 32 | 33 | ||
| 33 | /* | 34 | /* |
diff --git a/include/net/netfilter/nf_conntrack_extend.h b/include/net/netfilter/nf_conntrack_extend.h index 2d2a1f9a61d8..32d15bd6efa3 100644 --- a/include/net/netfilter/nf_conntrack_extend.h +++ b/include/net/netfilter/nf_conntrack_extend.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _NF_CONNTRACK_EXTEND_H | 1 | #ifndef _NF_CONNTRACK_EXTEND_H |
| 2 | #define _NF_CONNTRACK_EXTEND_H | 2 | #define _NF_CONNTRACK_EXTEND_H |
| 3 | 3 | ||
| 4 | #include <linux/slab.h> | ||
| 5 | |||
| 4 | #include <net/netfilter/nf_conntrack.h> | 6 | #include <net/netfilter/nf_conntrack.h> |
| 5 | 7 | ||
| 6 | enum nf_ct_ext_id { | 8 | enum nf_ct_ext_id { |
diff --git a/include/net/netlabel.h b/include/net/netlabel.h index 60ebbc1fef46..9db401a8b4d9 100644 --- a/include/net/netlabel.h +++ b/include/net/netlabel.h | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | #define _NETLABEL_H | 31 | #define _NETLABEL_H |
| 32 | 32 | ||
| 33 | #include <linux/types.h> | 33 | #include <linux/types.h> |
| 34 | #include <linux/slab.h> | ||
| 34 | #include <linux/net.h> | 35 | #include <linux/net.h> |
| 35 | #include <linux/skbuff.h> | 36 | #include <linux/skbuff.h> |
| 36 | #include <linux/in.h> | 37 | #include <linux/in.h> |
diff --git a/include/net/netlink.h b/include/net/netlink.h index f82e463c875a..4fc05b58503e 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h | |||
| @@ -945,7 +945,11 @@ static inline u64 nla_get_u64(const struct nlattr *nla) | |||
| 945 | */ | 945 | */ |
| 946 | static inline __be64 nla_get_be64(const struct nlattr *nla) | 946 | static inline __be64 nla_get_be64(const struct nlattr *nla) |
| 947 | { | 947 | { |
| 948 | return *(__be64 *) nla_data(nla); | 948 | __be64 tmp; |
| 949 | |||
| 950 | nla_memcpy(&tmp, nla, sizeof(tmp)); | ||
| 951 | |||
| 952 | return tmp; | ||
| 949 | } | 953 | } |
| 950 | 954 | ||
| 951 | /** | 955 | /** |
diff --git a/include/net/netrom.h b/include/net/netrom.h index ab170a60e7d3..f0793c1cb5f8 100644 --- a/include/net/netrom.h +++ b/include/net/netrom.h | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | 9 | ||
| 10 | #include <linux/netrom.h> | 10 | #include <linux/netrom.h> |
| 11 | #include <linux/list.h> | 11 | #include <linux/list.h> |
| 12 | #include <linux/slab.h> | ||
| 12 | #include <net/sock.h> | 13 | #include <net/sock.h> |
| 13 | 14 | ||
| 14 | #define NR_NETWORK_LEN 15 | 15 | #define NR_NETWORK_LEN 15 |
diff --git a/include/net/sctp/command.h b/include/net/sctp/command.h index 8be5135ff7aa..2c55a7ea20af 100644 --- a/include/net/sctp/command.h +++ b/include/net/sctp/command.h | |||
| @@ -107,6 +107,7 @@ typedef enum { | |||
| 107 | SCTP_CMD_T1_RETRAN, /* Mark for retransmission after T1 timeout */ | 107 | SCTP_CMD_T1_RETRAN, /* Mark for retransmission after T1 timeout */ |
| 108 | SCTP_CMD_UPDATE_INITTAG, /* Update peer inittag */ | 108 | SCTP_CMD_UPDATE_INITTAG, /* Update peer inittag */ |
| 109 | SCTP_CMD_SEND_MSG, /* Send the whole use message */ | 109 | SCTP_CMD_SEND_MSG, /* Send the whole use message */ |
| 110 | SCTP_CMD_SEND_NEXT_ASCONF, /* Send the next ASCONF after ACK */ | ||
| 110 | SCTP_CMD_LAST | 111 | SCTP_CMD_LAST |
| 111 | } sctp_verb_t; | 112 | } sctp_verb_t; |
| 112 | 113 | ||
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 78740ec57d5d..fa6cde578a1d 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
| @@ -128,6 +128,7 @@ extern int sctp_register_pf(struct sctp_pf *, sa_family_t); | |||
| 128 | int sctp_backlog_rcv(struct sock *sk, struct sk_buff *skb); | 128 | int sctp_backlog_rcv(struct sock *sk, struct sk_buff *skb); |
| 129 | int sctp_inet_listen(struct socket *sock, int backlog); | 129 | int sctp_inet_listen(struct socket *sock, int backlog); |
| 130 | void sctp_write_space(struct sock *sk); | 130 | void sctp_write_space(struct sock *sk); |
| 131 | void sctp_data_ready(struct sock *sk, int len); | ||
| 131 | unsigned int sctp_poll(struct file *file, struct socket *sock, | 132 | unsigned int sctp_poll(struct file *file, struct socket *sock, |
| 132 | poll_table *wait); | 133 | poll_table *wait); |
| 133 | void sctp_sock_rfree(struct sk_buff *skb); | 134 | void sctp_sock_rfree(struct sk_buff *skb); |
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h index 851c813adb3a..61d73e37d543 100644 --- a/include/net/sctp/sm.h +++ b/include/net/sctp/sm.h | |||
| @@ -279,6 +279,7 @@ int sctp_do_sm(sctp_event_t event_type, sctp_subtype_t subtype, | |||
| 279 | /* 2nd level prototypes */ | 279 | /* 2nd level prototypes */ |
| 280 | void sctp_generate_t3_rtx_event(unsigned long peer); | 280 | void sctp_generate_t3_rtx_event(unsigned long peer); |
| 281 | void sctp_generate_heartbeat_event(unsigned long peer); | 281 | void sctp_generate_heartbeat_event(unsigned long peer); |
| 282 | void sctp_generate_proto_unreach_event(unsigned long peer); | ||
| 282 | 283 | ||
| 283 | void sctp_ootb_pkt_free(struct sctp_packet *); | 284 | void sctp_ootb_pkt_free(struct sctp_packet *); |
| 284 | 285 | ||
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index ff3017744711..219043a67bf7 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
| @@ -778,6 +778,7 @@ int sctp_user_addto_chunk(struct sctp_chunk *chunk, int off, int len, | |||
| 778 | struct iovec *data); | 778 | struct iovec *data); |
| 779 | void sctp_chunk_free(struct sctp_chunk *); | 779 | void sctp_chunk_free(struct sctp_chunk *); |
| 780 | void *sctp_addto_chunk(struct sctp_chunk *, int len, const void *data); | 780 | void *sctp_addto_chunk(struct sctp_chunk *, int len, const void *data); |
| 781 | void *sctp_addto_chunk_fixed(struct sctp_chunk *, int len, const void *data); | ||
| 781 | struct sctp_chunk *sctp_chunkify(struct sk_buff *, | 782 | struct sctp_chunk *sctp_chunkify(struct sk_buff *, |
| 782 | const struct sctp_association *, | 783 | const struct sctp_association *, |
| 783 | struct sock *); | 784 | struct sock *); |
| @@ -1009,6 +1010,9 @@ struct sctp_transport { | |||
| 1009 | /* Heartbeat timer is per destination. */ | 1010 | /* Heartbeat timer is per destination. */ |
| 1010 | struct timer_list hb_timer; | 1011 | struct timer_list hb_timer; |
| 1011 | 1012 | ||
| 1013 | /* Timer to handle ICMP proto unreachable envets */ | ||
| 1014 | struct timer_list proto_unreach_timer; | ||
| 1015 | |||
| 1012 | /* Since we're using per-destination retransmission timers | 1016 | /* Since we're using per-destination retransmission timers |
| 1013 | * (see above), we're also using per-destination "transmitted" | 1017 | * (see above), we're also using per-destination "transmitted" |
| 1014 | * queues. This probably ought to be a private struct | 1018 | * queues. This probably ought to be a private struct |
diff --git a/include/net/sock.h b/include/net/sock.h index 092b0551e77f..1ad6435f252e 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -51,6 +51,7 @@ | |||
| 51 | #include <linux/skbuff.h> /* struct sk_buff */ | 51 | #include <linux/skbuff.h> /* struct sk_buff */ |
| 52 | #include <linux/mm.h> | 52 | #include <linux/mm.h> |
| 53 | #include <linux/security.h> | 53 | #include <linux/security.h> |
| 54 | #include <linux/slab.h> | ||
| 54 | 55 | ||
| 55 | #include <linux/filter.h> | 56 | #include <linux/filter.h> |
| 56 | #include <linux/rculist_nulls.h> | 57 | #include <linux/rculist_nulls.h> |
| @@ -73,7 +74,7 @@ | |||
| 73 | printk(KERN_DEBUG msg); } while (0) | 74 | printk(KERN_DEBUG msg); } while (0) |
| 74 | #else | 75 | #else |
| 75 | /* Validate arguments and do nothing */ | 76 | /* Validate arguments and do nothing */ |
| 76 | static void inline int __attribute__ ((format (printf, 2, 3))) | 77 | static inline void __attribute__ ((format (printf, 2, 3))) |
| 77 | SOCK_DEBUG(struct sock *sk, const char *msg, ...) | 78 | SOCK_DEBUG(struct sock *sk, const char *msg, ...) |
| 78 | { | 79 | { |
| 79 | } | 80 | } |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 75be5a28815d..aa04b9a5093b 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
| @@ -1197,30 +1197,15 @@ extern int tcp_v4_md5_do_del(struct sock *sk, | |||
| 1197 | extern struct tcp_md5sig_pool * __percpu *tcp_alloc_md5sig_pool(struct sock *); | 1197 | extern struct tcp_md5sig_pool * __percpu *tcp_alloc_md5sig_pool(struct sock *); |
| 1198 | extern void tcp_free_md5sig_pool(void); | 1198 | extern void tcp_free_md5sig_pool(void); |
| 1199 | 1199 | ||
| 1200 | extern struct tcp_md5sig_pool *__tcp_get_md5sig_pool(int cpu); | 1200 | extern struct tcp_md5sig_pool *tcp_get_md5sig_pool(void); |
| 1201 | extern void __tcp_put_md5sig_pool(void); | 1201 | extern void tcp_put_md5sig_pool(void); |
| 1202 | |||
| 1202 | extern int tcp_md5_hash_header(struct tcp_md5sig_pool *, struct tcphdr *); | 1203 | extern int tcp_md5_hash_header(struct tcp_md5sig_pool *, struct tcphdr *); |
| 1203 | extern int tcp_md5_hash_skb_data(struct tcp_md5sig_pool *, struct sk_buff *, | 1204 | extern int tcp_md5_hash_skb_data(struct tcp_md5sig_pool *, struct sk_buff *, |
| 1204 | unsigned header_len); | 1205 | unsigned header_len); |
| 1205 | extern int tcp_md5_hash_key(struct tcp_md5sig_pool *hp, | 1206 | extern int tcp_md5_hash_key(struct tcp_md5sig_pool *hp, |
| 1206 | struct tcp_md5sig_key *key); | 1207 | struct tcp_md5sig_key *key); |
| 1207 | 1208 | ||
| 1208 | static inline | ||
| 1209 | struct tcp_md5sig_pool *tcp_get_md5sig_pool(void) | ||
| 1210 | { | ||
| 1211 | int cpu = get_cpu(); | ||
| 1212 | struct tcp_md5sig_pool *ret = __tcp_get_md5sig_pool(cpu); | ||
| 1213 | if (!ret) | ||
| 1214 | put_cpu(); | ||
| 1215 | return ret; | ||
| 1216 | } | ||
| 1217 | |||
| 1218 | static inline void tcp_put_md5sig_pool(void) | ||
| 1219 | { | ||
| 1220 | __tcp_put_md5sig_pool(); | ||
| 1221 | put_cpu(); | ||
| 1222 | } | ||
| 1223 | |||
| 1224 | /* write queue abstraction */ | 1209 | /* write queue abstraction */ |
| 1225 | static inline void tcp_write_queue_purge(struct sock *sk) | 1210 | static inline void tcp_write_queue_purge(struct sock *sk) |
| 1226 | { | 1211 | { |
diff --git a/include/net/x25.h b/include/net/x25.h index 9baa07dc7d17..468551ea4f1d 100644 --- a/include/net/x25.h +++ b/include/net/x25.h | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #ifndef _X25_H | 10 | #ifndef _X25_H |
| 11 | #define _X25_H | 11 | #define _X25_H |
| 12 | #include <linux/x25.h> | 12 | #include <linux/x25.h> |
| 13 | #include <linux/slab.h> | ||
| 13 | #include <net/sock.h> | 14 | #include <net/sock.h> |
| 14 | 15 | ||
| 15 | #define X25_ADDR_LEN 16 | 16 | #define X25_ADDR_LEN 16 |
| @@ -182,6 +183,10 @@ extern int sysctl_x25_clear_request_timeout; | |||
| 182 | extern int sysctl_x25_ack_holdback_timeout; | 183 | extern int sysctl_x25_ack_holdback_timeout; |
| 183 | extern int sysctl_x25_forward; | 184 | extern int sysctl_x25_forward; |
| 184 | 185 | ||
| 186 | extern int x25_parse_address_block(struct sk_buff *skb, | ||
| 187 | struct x25_address *called_addr, | ||
| 188 | struct x25_address *calling_addr); | ||
| 189 | |||
| 185 | extern int x25_addr_ntoa(unsigned char *, struct x25_address *, | 190 | extern int x25_addr_ntoa(unsigned char *, struct x25_address *, |
| 186 | struct x25_address *); | 191 | struct x25_address *); |
| 187 | extern int x25_addr_aton(unsigned char *, struct x25_address *, | 192 | extern int x25_addr_aton(unsigned char *, struct x25_address *, |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index d74e080ba6c9..ac52f33f3e4a 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include <linux/in6.h> | 12 | #include <linux/in6.h> |
| 13 | #include <linux/mutex.h> | 13 | #include <linux/mutex.h> |
| 14 | #include <linux/audit.h> | 14 | #include <linux/audit.h> |
| 15 | #include <linux/slab.h> | ||
| 15 | 16 | ||
| 16 | #include <net/sock.h> | 17 | #include <net/sock.h> |
| 17 | #include <net/dst.h> | 18 | #include <net/dst.h> |
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h index d57847f2f6c1..aab3c13dc310 100644 --- a/include/pcmcia/ds.h +++ b/include/pcmcia/ds.h | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | #ifdef __KERNEL__ | 26 | #ifdef __KERNEL__ |
| 27 | #include <linux/device.h> | 27 | #include <linux/device.h> |
| 28 | #include <pcmcia/ss.h> | 28 | #include <pcmcia/ss.h> |
| 29 | #include <asm/atomic.h> | ||
| 29 | 30 | ||
| 30 | /* | 31 | /* |
| 31 | * PCMCIA device drivers (16-bit cards only; 32-bit cards require CardBus | 32 | * PCMCIA device drivers (16-bit cards only; 32-bit cards require CardBus |
| @@ -94,10 +95,8 @@ struct pcmcia_device { | |||
| 94 | config_req_t conf; | 95 | config_req_t conf; |
| 95 | window_handle_t win; | 96 | window_handle_t win; |
| 96 | 97 | ||
| 97 | /* Is the device suspended, or in the process of | 98 | /* Is the device suspended? */ |
| 98 | * being removed? */ | ||
| 99 | u16 suspended:1; | 99 | u16 suspended:1; |
| 100 | u16 _removed:1; | ||
| 101 | 100 | ||
| 102 | /* Flags whether io, irq, win configurations were | 101 | /* Flags whether io, irq, win configurations were |
| 103 | * requested, and whether the configuration is "locked" */ | 102 | * requested, and whether the configuration is "locked" */ |
| @@ -115,7 +114,7 @@ struct pcmcia_device { | |||
| 115 | u16 has_card_id:1; | 114 | u16 has_card_id:1; |
| 116 | u16 has_func_id:1; | 115 | u16 has_func_id:1; |
| 117 | 116 | ||
| 118 | u16 reserved:3; | 117 | u16 reserved:4; |
| 119 | 118 | ||
| 120 | u8 func_id; | 119 | u8 func_id; |
| 121 | u16 manf_id; | 120 | u16 manf_id; |
diff --git a/include/pcmcia/ss.h b/include/pcmcia/ss.h index 32896a773910..344705cb42f4 100644 --- a/include/pcmcia/ss.h +++ b/include/pcmcia/ss.h | |||
| @@ -224,18 +224,16 @@ struct pcmcia_socket { | |||
| 224 | 224 | ||
| 225 | /* 16-bit state: */ | 225 | /* 16-bit state: */ |
| 226 | struct { | 226 | struct { |
| 227 | /* PCMCIA card is present in socket */ | ||
| 228 | u8 present:1; | ||
| 229 | /* "master" ioctl is used */ | 227 | /* "master" ioctl is used */ |
| 230 | u8 busy:1; | 228 | u8 busy:1; |
| 231 | /* pcmcia module is being unloaded */ | ||
| 232 | u8 dead:1; | ||
| 233 | /* the PCMCIA card consists of two pseudo devices */ | 229 | /* the PCMCIA card consists of two pseudo devices */ |
| 234 | u8 has_pfc:1; | 230 | u8 has_pfc:1; |
| 235 | 231 | ||
| 236 | u8 reserved:4; | 232 | u8 reserved:6; |
| 237 | } pcmcia_state; | 233 | } pcmcia_state; |
| 238 | 234 | ||
| 235 | /* non-zero if PCMCIA card is present */ | ||
| 236 | atomic_t present; | ||
| 239 | 237 | ||
| 240 | #ifdef CONFIG_PCMCIA_IOCTL | 238 | #ifdef CONFIG_PCMCIA_IOCTL |
| 241 | struct user_info_t *user; | 239 | struct user_info_t *user; |
| @@ -277,12 +275,6 @@ extern struct pccard_resource_ops pccard_nonstatic_ops; | |||
| 277 | #endif | 275 | #endif |
| 278 | 276 | ||
| 279 | 277 | ||
| 280 | /* socket drivers are expected to use these callbacks in their .drv struct */ | ||
| 281 | extern int pcmcia_socket_dev_suspend(struct device *dev); | ||
| 282 | extern void pcmcia_socket_dev_early_resume(struct device *dev); | ||
| 283 | extern void pcmcia_socket_dev_late_resume(struct device *dev); | ||
| 284 | extern int pcmcia_socket_dev_resume(struct device *dev); | ||
| 285 | |||
| 286 | /* socket drivers use this callback in their IRQ handler */ | 278 | /* socket drivers use this callback in their IRQ handler */ |
| 287 | extern void pcmcia_parse_events(struct pcmcia_socket *socket, | 279 | extern void pcmcia_parse_events(struct pcmcia_socket *socket, |
| 288 | unsigned int events); | 280 | unsigned int events); |
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 9eaa3f05f954..3b586859669c 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | #include <scsi/scsi_cmnd.h> | 36 | #include <scsi/scsi_cmnd.h> |
| 37 | #include <scsi/scsi_transport_sas.h> | 37 | #include <scsi/scsi_transport_sas.h> |
| 38 | #include <linux/scatterlist.h> | 38 | #include <linux/scatterlist.h> |
| 39 | #include <linux/slab.h> | ||
| 39 | 40 | ||
| 40 | struct block_device; | 41 | struct block_device; |
| 41 | 42 | ||
diff --git a/include/sound/ak4113.h b/include/sound/ak4113.h index 8988edae1609..2609048c1d44 100644 --- a/include/sound/ak4113.h +++ b/include/sound/ak4113.h | |||
| @@ -307,7 +307,7 @@ struct ak4113 { | |||
| 307 | 307 | ||
| 308 | int snd_ak4113_create(struct snd_card *card, ak4113_read_t *read, | 308 | int snd_ak4113_create(struct snd_card *card, ak4113_read_t *read, |
| 309 | ak4113_write_t *write, | 309 | ak4113_write_t *write, |
| 310 | const unsigned char pgm[AK4113_WRITABLE_REGS], | 310 | const unsigned char *pgm, |
| 311 | void *private_data, struct ak4113 **r_ak4113); | 311 | void *private_data, struct ak4113 **r_ak4113); |
| 312 | void snd_ak4113_reg_write(struct ak4113 *ak4113, unsigned char reg, | 312 | void snd_ak4113_reg_write(struct ak4113 *ak4113, unsigned char reg, |
| 313 | unsigned char mask, unsigned char val); | 313 | unsigned char mask, unsigned char val); |
diff --git a/include/sound/asound.h b/include/sound/asound.h index 098595500632..9f1eecf99e6b 100644 --- a/include/sound/asound.h +++ b/include/sound/asound.h | |||
| @@ -574,7 +574,7 @@ enum { | |||
| 574 | #define SNDRV_TIMER_FLG_SLAVE (1<<0) /* cannot be controlled */ | 574 | #define SNDRV_TIMER_FLG_SLAVE (1<<0) /* cannot be controlled */ |
| 575 | 575 | ||
| 576 | struct snd_timer_id { | 576 | struct snd_timer_id { |
| 577 | int dev_class; | 577 | int dev_class; |
| 578 | int dev_sclass; | 578 | int dev_sclass; |
| 579 | int card; | 579 | int card; |
| 580 | int device; | 580 | int device; |
| @@ -762,7 +762,7 @@ struct snd_ctl_elem_id { | |||
| 762 | snd_ctl_elem_iface_t iface; /* interface identifier */ | 762 | snd_ctl_elem_iface_t iface; /* interface identifier */ |
| 763 | unsigned int device; /* device/client number */ | 763 | unsigned int device; /* device/client number */ |
| 764 | unsigned int subdevice; /* subdevice (substream) number */ | 764 | unsigned int subdevice; /* subdevice (substream) number */ |
| 765 | unsigned char name[44]; /* ASCII name of item */ | 765 | unsigned char name[44]; /* ASCII name of item */ |
| 766 | unsigned int index; /* index of item */ | 766 | unsigned int index; /* index of item */ |
| 767 | }; | 767 | }; |
| 768 | 768 | ||
| @@ -809,7 +809,7 @@ struct snd_ctl_elem_info { | |||
| 809 | struct snd_ctl_elem_value { | 809 | struct snd_ctl_elem_value { |
| 810 | struct snd_ctl_elem_id id; /* W: element ID */ | 810 | struct snd_ctl_elem_id id; /* W: element ID */ |
| 811 | unsigned int indirect: 1; /* W: indirect access - obsoleted */ | 811 | unsigned int indirect: 1; /* W: indirect access - obsoleted */ |
| 812 | union { | 812 | union { |
| 813 | union { | 813 | union { |
| 814 | long value[128]; | 814 | long value[128]; |
| 815 | long *value_ptr; /* obsoleted */ | 815 | long *value_ptr; /* obsoleted */ |
| @@ -827,15 +827,15 @@ struct snd_ctl_elem_value { | |||
| 827 | unsigned char *data_ptr; /* obsoleted */ | 827 | unsigned char *data_ptr; /* obsoleted */ |
| 828 | } bytes; | 828 | } bytes; |
| 829 | struct snd_aes_iec958 iec958; | 829 | struct snd_aes_iec958 iec958; |
| 830 | } value; /* RO */ | 830 | } value; /* RO */ |
| 831 | struct timespec tstamp; | 831 | struct timespec tstamp; |
| 832 | unsigned char reserved[128-sizeof(struct timespec)]; | 832 | unsigned char reserved[128-sizeof(struct timespec)]; |
| 833 | }; | 833 | }; |
| 834 | 834 | ||
| 835 | struct snd_ctl_tlv { | 835 | struct snd_ctl_tlv { |
| 836 | unsigned int numid; /* control element numeric identification */ | 836 | unsigned int numid; /* control element numeric identification */ |
| 837 | unsigned int length; /* in bytes aligned to 4 */ | 837 | unsigned int length; /* in bytes aligned to 4 */ |
| 838 | unsigned int tlv[0]; /* first TLV */ | 838 | unsigned int tlv[0]; /* first TLV */ |
| 839 | }; | 839 | }; |
| 840 | 840 | ||
| 841 | #define SNDRV_CTL_IOCTL_PVERSION _IOR('U', 0x00, int) | 841 | #define SNDRV_CTL_IOCTL_PVERSION _IOR('U', 0x00, int) |
| @@ -886,8 +886,8 @@ struct snd_ctl_event { | |||
| 886 | unsigned int mask; | 886 | unsigned int mask; |
| 887 | struct snd_ctl_elem_id id; | 887 | struct snd_ctl_elem_id id; |
| 888 | } elem; | 888 | } elem; |
| 889 | unsigned char data8[60]; | 889 | unsigned char data8[60]; |
| 890 | } data; | 890 | } data; |
| 891 | }; | 891 | }; |
| 892 | 892 | ||
| 893 | /* | 893 | /* |
diff --git a/include/sound/es1688.h b/include/sound/es1688.h index 10fcf1465810..3ec7ecbe2502 100644 --- a/include/sound/es1688.h +++ b/include/sound/es1688.h | |||
| @@ -44,7 +44,6 @@ struct snd_es1688 { | |||
| 44 | unsigned char pad; | 44 | unsigned char pad; |
| 45 | unsigned int dma_size; | 45 | unsigned int dma_size; |
| 46 | 46 | ||
| 47 | struct snd_card *card; | ||
| 48 | struct snd_pcm *pcm; | 47 | struct snd_pcm *pcm; |
| 49 | struct snd_pcm_substream *playback_substream; | 48 | struct snd_pcm_substream *playback_substream; |
| 50 | struct snd_pcm_substream *capture_substream; | 49 | struct snd_pcm_substream *capture_substream; |
| @@ -108,14 +107,16 @@ struct snd_es1688 { | |||
| 108 | void snd_es1688_mixer_write(struct snd_es1688 *chip, unsigned char reg, unsigned char data); | 107 | void snd_es1688_mixer_write(struct snd_es1688 *chip, unsigned char reg, unsigned char data); |
| 109 | 108 | ||
| 110 | int snd_es1688_create(struct snd_card *card, | 109 | int snd_es1688_create(struct snd_card *card, |
| 110 | struct snd_es1688 *chip, | ||
| 111 | unsigned long port, | 111 | unsigned long port, |
| 112 | unsigned long mpu_port, | 112 | unsigned long mpu_port, |
| 113 | int irq, | 113 | int irq, |
| 114 | int mpu_irq, | 114 | int mpu_irq, |
| 115 | int dma8, | 115 | int dma8, |
| 116 | unsigned short hardware, | 116 | unsigned short hardware); |
| 117 | struct snd_es1688 ** rchip); | 117 | int snd_es1688_pcm(struct snd_card *card, struct snd_es1688 *chip, int device, |
| 118 | int snd_es1688_pcm(struct snd_es1688 *chip, int device, struct snd_pcm ** rpcm); | 118 | struct snd_pcm **rpcm); |
| 119 | int snd_es1688_mixer(struct snd_es1688 *chip); | 119 | int snd_es1688_mixer(struct snd_card *card, struct snd_es1688 *chip); |
| 120 | int snd_es1688_reset(struct snd_es1688 *chip); | ||
| 120 | 121 | ||
| 121 | #endif /* __SOUND_ES1688_H */ | 122 | #endif /* __SOUND_ES1688_H */ |
diff --git a/include/sound/info.h b/include/sound/info.h index 112e8949e1a7..4e94cf1ff762 100644 --- a/include/sound/info.h +++ b/include/sound/info.h | |||
| @@ -51,18 +51,18 @@ struct snd_info_entry_ops { | |||
| 51 | unsigned short mode, void **file_private_data); | 51 | unsigned short mode, void **file_private_data); |
| 52 | int (*release)(struct snd_info_entry *entry, | 52 | int (*release)(struct snd_info_entry *entry, |
| 53 | unsigned short mode, void *file_private_data); | 53 | unsigned short mode, void *file_private_data); |
| 54 | long (*read)(struct snd_info_entry *entry, void *file_private_data, | 54 | ssize_t (*read)(struct snd_info_entry *entry, void *file_private_data, |
| 55 | struct file *file, char __user *buf, | 55 | struct file *file, char __user *buf, |
| 56 | unsigned long count, unsigned long pos); | 56 | size_t count, loff_t pos); |
| 57 | long (*write)(struct snd_info_entry *entry, void *file_private_data, | 57 | ssize_t (*write)(struct snd_info_entry *entry, void *file_private_data, |
| 58 | struct file *file, const char __user *buf, | 58 | struct file *file, const char __user *buf, |
| 59 | unsigned long count, unsigned long pos); | 59 | size_t count, loff_t pos); |
| 60 | long long (*llseek)(struct snd_info_entry *entry, | 60 | loff_t (*llseek)(struct snd_info_entry *entry, |
| 61 | void *file_private_data, struct file *file, | 61 | void *file_private_data, struct file *file, |
| 62 | long long offset, int orig); | 62 | loff_t offset, int orig); |
| 63 | unsigned int(*poll)(struct snd_info_entry *entry, | 63 | unsigned int (*poll)(struct snd_info_entry *entry, |
| 64 | void *file_private_data, struct file *file, | 64 | void *file_private_data, struct file *file, |
| 65 | poll_table *wait); | 65 | poll_table *wait); |
| 66 | int (*ioctl)(struct snd_info_entry *entry, void *file_private_data, | 66 | int (*ioctl)(struct snd_info_entry *entry, void *file_private_data, |
| 67 | struct file *file, unsigned int cmd, unsigned long arg); | 67 | struct file *file, unsigned int cmd, unsigned long arg); |
| 68 | int (*mmap)(struct snd_info_entry *entry, void *file_private_data, | 68 | int (*mmap)(struct snd_info_entry *entry, void *file_private_data, |
diff --git a/include/sound/version.h b/include/sound/version.h index 7fed23442db8..bf69a5b7e65f 100644 --- a/include/sound/version.h +++ b/include/sound/version.h | |||
| @@ -1,3 +1,3 @@ | |||
| 1 | /* include/version.h */ | 1 | /* include/version.h */ |
| 2 | #define CONFIG_SND_VERSION "1.0.22.1" | 2 | #define CONFIG_SND_VERSION "1.0.23" |
| 3 | #define CONFIG_SND_DATE "" | 3 | #define CONFIG_SND_DATE "" |
diff --git a/include/trace/events/block.h b/include/trace/events/block.h index 5fb72733331e..d870a918559c 100644 --- a/include/trace/events/block.h +++ b/include/trace/events/block.h | |||
| @@ -40,6 +40,16 @@ DECLARE_EVENT_CLASS(block_rq_with_error, | |||
| 40 | __entry->nr_sector, __entry->errors) | 40 | __entry->nr_sector, __entry->errors) |
| 41 | ); | 41 | ); |
| 42 | 42 | ||
| 43 | /** | ||
| 44 | * block_rq_abort - abort block operation request | ||
| 45 | * @q: queue containing the block operation request | ||
| 46 | * @rq: block IO operation request | ||
| 47 | * | ||
| 48 | * Called immediately after pending block IO operation request @rq in | ||
| 49 | * queue @q is aborted. The fields in the operation request @rq | ||
| 50 | * can be examined to determine which device and sectors the pending | ||
| 51 | * operation would access. | ||
| 52 | */ | ||
| 43 | DEFINE_EVENT(block_rq_with_error, block_rq_abort, | 53 | DEFINE_EVENT(block_rq_with_error, block_rq_abort, |
| 44 | 54 | ||
| 45 | TP_PROTO(struct request_queue *q, struct request *rq), | 55 | TP_PROTO(struct request_queue *q, struct request *rq), |
| @@ -47,6 +57,15 @@ DEFINE_EVENT(block_rq_with_error, block_rq_abort, | |||
| 47 | TP_ARGS(q, rq) | 57 | TP_ARGS(q, rq) |
| 48 | ); | 58 | ); |
| 49 | 59 | ||
| 60 | /** | ||
| 61 | * block_rq_requeue - place block IO request back on a queue | ||
| 62 | * @q: queue holding operation | ||
| 63 | * @rq: block IO operation request | ||
| 64 | * | ||
| 65 | * The block operation request @rq is being placed back into queue | ||
| 66 | * @q. For some reason the request was not completed and needs to be | ||
| 67 | * put back in the queue. | ||
| 68 | */ | ||
| 50 | DEFINE_EVENT(block_rq_with_error, block_rq_requeue, | 69 | DEFINE_EVENT(block_rq_with_error, block_rq_requeue, |
| 51 | 70 | ||
| 52 | TP_PROTO(struct request_queue *q, struct request *rq), | 71 | TP_PROTO(struct request_queue *q, struct request *rq), |
| @@ -54,6 +73,17 @@ DEFINE_EVENT(block_rq_with_error, block_rq_requeue, | |||
| 54 | TP_ARGS(q, rq) | 73 | TP_ARGS(q, rq) |
| 55 | ); | 74 | ); |
| 56 | 75 | ||
| 76 | /** | ||
| 77 | * block_rq_complete - block IO operation completed by device driver | ||
| 78 | * @q: queue containing the block operation request | ||
| 79 | * @rq: block operations request | ||
| 80 | * | ||
| 81 | * The block_rq_complete tracepoint event indicates that some portion | ||
| 82 | * of operation request has been completed by the device driver. If | ||
| 83 | * the @rq->bio is %NULL, then there is absolutely no additional work to | ||
| 84 | * do for the request. If @rq->bio is non-NULL then there is | ||
| 85 | * additional work required to complete the request. | ||
| 86 | */ | ||
| 57 | DEFINE_EVENT(block_rq_with_error, block_rq_complete, | 87 | DEFINE_EVENT(block_rq_with_error, block_rq_complete, |
| 58 | 88 | ||
| 59 | TP_PROTO(struct request_queue *q, struct request *rq), | 89 | TP_PROTO(struct request_queue *q, struct request *rq), |
| @@ -95,6 +125,16 @@ DECLARE_EVENT_CLASS(block_rq, | |||
| 95 | __entry->nr_sector, __entry->comm) | 125 | __entry->nr_sector, __entry->comm) |
| 96 | ); | 126 | ); |
| 97 | 127 | ||
| 128 | /** | ||
| 129 | * block_rq_insert - insert block operation request into queue | ||
| 130 | * @q: target queue | ||
| 131 | * @rq: block IO operation request | ||
| 132 | * | ||
| 133 | * Called immediately before block operation request @rq is inserted | ||
| 134 | * into queue @q. The fields in the operation request @rq struct can | ||
| 135 | * be examined to determine which device and sectors the pending | ||
| 136 | * operation would access. | ||
| 137 | */ | ||
| 98 | DEFINE_EVENT(block_rq, block_rq_insert, | 138 | DEFINE_EVENT(block_rq, block_rq_insert, |
| 99 | 139 | ||
| 100 | TP_PROTO(struct request_queue *q, struct request *rq), | 140 | TP_PROTO(struct request_queue *q, struct request *rq), |
| @@ -102,6 +142,14 @@ DEFINE_EVENT(block_rq, block_rq_insert, | |||
| 102 | TP_ARGS(q, rq) | 142 | TP_ARGS(q, rq) |
| 103 | ); | 143 | ); |
| 104 | 144 | ||
| 145 | /** | ||
| 146 | * block_rq_issue - issue pending block IO request operation to device driver | ||
| 147 | * @q: queue holding operation | ||
| 148 | * @rq: block IO operation operation request | ||
| 149 | * | ||
| 150 | * Called when block operation request @rq from queue @q is sent to a | ||
| 151 | * device driver for processing. | ||
| 152 | */ | ||
| 105 | DEFINE_EVENT(block_rq, block_rq_issue, | 153 | DEFINE_EVENT(block_rq, block_rq_issue, |
| 106 | 154 | ||
| 107 | TP_PROTO(struct request_queue *q, struct request *rq), | 155 | TP_PROTO(struct request_queue *q, struct request *rq), |
| @@ -109,6 +157,17 @@ DEFINE_EVENT(block_rq, block_rq_issue, | |||
| 109 | TP_ARGS(q, rq) | 157 | TP_ARGS(q, rq) |
| 110 | ); | 158 | ); |
| 111 | 159 | ||
| 160 | /** | ||
| 161 | * block_bio_bounce - used bounce buffer when processing block operation | ||
| 162 | * @q: queue holding the block operation | ||
| 163 | * @bio: block operation | ||
| 164 | * | ||
| 165 | * A bounce buffer was used to handle the block operation @bio in @q. | ||
| 166 | * This occurs when hardware limitations prevent a direct transfer of | ||
| 167 | * data between the @bio data memory area and the IO device. Use of a | ||
| 168 | * bounce buffer requires extra copying of data and decreases | ||
| 169 | * performance. | ||
| 170 | */ | ||
| 112 | TRACE_EVENT(block_bio_bounce, | 171 | TRACE_EVENT(block_bio_bounce, |
| 113 | 172 | ||
| 114 | TP_PROTO(struct request_queue *q, struct bio *bio), | 173 | TP_PROTO(struct request_queue *q, struct bio *bio), |
| @@ -138,6 +197,14 @@ TRACE_EVENT(block_bio_bounce, | |||
| 138 | __entry->nr_sector, __entry->comm) | 197 | __entry->nr_sector, __entry->comm) |
| 139 | ); | 198 | ); |
| 140 | 199 | ||
| 200 | /** | ||
| 201 | * block_bio_complete - completed all work on the block operation | ||
| 202 | * @q: queue holding the block operation | ||
| 203 | * @bio: block operation completed | ||
| 204 | * | ||
| 205 | * This tracepoint indicates there is no further work to do on this | ||
| 206 | * block IO operation @bio. | ||
| 207 | */ | ||
| 141 | TRACE_EVENT(block_bio_complete, | 208 | TRACE_EVENT(block_bio_complete, |
| 142 | 209 | ||
| 143 | TP_PROTO(struct request_queue *q, struct bio *bio), | 210 | TP_PROTO(struct request_queue *q, struct bio *bio), |
| @@ -193,6 +260,14 @@ DECLARE_EVENT_CLASS(block_bio, | |||
| 193 | __entry->nr_sector, __entry->comm) | 260 | __entry->nr_sector, __entry->comm) |
| 194 | ); | 261 | ); |
| 195 | 262 | ||
| 263 | /** | ||
| 264 | * block_bio_backmerge - merging block operation to the end of an existing operation | ||
| 265 | * @q: queue holding operation | ||
| 266 | * @bio: new block operation to merge | ||
| 267 | * | ||
| 268 | * Merging block request @bio to the end of an existing block request | ||
| 269 | * in queue @q. | ||
| 270 | */ | ||
| 196 | DEFINE_EVENT(block_bio, block_bio_backmerge, | 271 | DEFINE_EVENT(block_bio, block_bio_backmerge, |
| 197 | 272 | ||
| 198 | TP_PROTO(struct request_queue *q, struct bio *bio), | 273 | TP_PROTO(struct request_queue *q, struct bio *bio), |
| @@ -200,6 +275,14 @@ DEFINE_EVENT(block_bio, block_bio_backmerge, | |||
| 200 | TP_ARGS(q, bio) | 275 | TP_ARGS(q, bio) |
| 201 | ); | 276 | ); |
| 202 | 277 | ||
| 278 | /** | ||
| 279 | * block_bio_frontmerge - merging block operation to the beginning of an existing operation | ||
| 280 | * @q: queue holding operation | ||
| 281 | * @bio: new block operation to merge | ||
| 282 | * | ||
| 283 | * Merging block IO operation @bio to the beginning of an existing block | ||
| 284 | * operation in queue @q. | ||
| 285 | */ | ||
| 203 | DEFINE_EVENT(block_bio, block_bio_frontmerge, | 286 | DEFINE_EVENT(block_bio, block_bio_frontmerge, |
| 204 | 287 | ||
| 205 | TP_PROTO(struct request_queue *q, struct bio *bio), | 288 | TP_PROTO(struct request_queue *q, struct bio *bio), |
| @@ -207,6 +290,13 @@ DEFINE_EVENT(block_bio, block_bio_frontmerge, | |||
| 207 | TP_ARGS(q, bio) | 290 | TP_ARGS(q, bio) |
| 208 | ); | 291 | ); |
| 209 | 292 | ||
| 293 | /** | ||
| 294 | * block_bio_queue - putting new block IO operation in queue | ||
| 295 | * @q: queue holding operation | ||
| 296 | * @bio: new block operation | ||
| 297 | * | ||
| 298 | * About to place the block IO operation @bio into queue @q. | ||
| 299 | */ | ||
| 210 | DEFINE_EVENT(block_bio, block_bio_queue, | 300 | DEFINE_EVENT(block_bio, block_bio_queue, |
| 211 | 301 | ||
| 212 | TP_PROTO(struct request_queue *q, struct bio *bio), | 302 | TP_PROTO(struct request_queue *q, struct bio *bio), |
| @@ -243,6 +333,15 @@ DECLARE_EVENT_CLASS(block_get_rq, | |||
| 243 | __entry->nr_sector, __entry->comm) | 333 | __entry->nr_sector, __entry->comm) |
| 244 | ); | 334 | ); |
| 245 | 335 | ||
| 336 | /** | ||
| 337 | * block_getrq - get a free request entry in queue for block IO operations | ||
| 338 | * @q: queue for operations | ||
| 339 | * @bio: pending block IO operation | ||
| 340 | * @rw: low bit indicates a read (%0) or a write (%1) | ||
| 341 | * | ||
| 342 | * A request struct for queue @q has been allocated to handle the | ||
| 343 | * block IO operation @bio. | ||
| 344 | */ | ||
| 246 | DEFINE_EVENT(block_get_rq, block_getrq, | 345 | DEFINE_EVENT(block_get_rq, block_getrq, |
| 247 | 346 | ||
| 248 | TP_PROTO(struct request_queue *q, struct bio *bio, int rw), | 347 | TP_PROTO(struct request_queue *q, struct bio *bio, int rw), |
| @@ -250,6 +349,17 @@ DEFINE_EVENT(block_get_rq, block_getrq, | |||
| 250 | TP_ARGS(q, bio, rw) | 349 | TP_ARGS(q, bio, rw) |
| 251 | ); | 350 | ); |
| 252 | 351 | ||
| 352 | /** | ||
| 353 | * block_sleeprq - waiting to get a free request entry in queue for block IO operation | ||
| 354 | * @q: queue for operation | ||
| 355 | * @bio: pending block IO operation | ||
| 356 | * @rw: low bit indicates a read (%0) or a write (%1) | ||
| 357 | * | ||
| 358 | * In the case where a request struct cannot be provided for queue @q | ||
| 359 | * the process needs to wait for an request struct to become | ||
| 360 | * available. This tracepoint event is generated each time the | ||
| 361 | * process goes to sleep waiting for request struct become available. | ||
| 362 | */ | ||
| 253 | DEFINE_EVENT(block_get_rq, block_sleeprq, | 363 | DEFINE_EVENT(block_get_rq, block_sleeprq, |
| 254 | 364 | ||
| 255 | TP_PROTO(struct request_queue *q, struct bio *bio, int rw), | 365 | TP_PROTO(struct request_queue *q, struct bio *bio, int rw), |
| @@ -257,6 +367,14 @@ DEFINE_EVENT(block_get_rq, block_sleeprq, | |||
| 257 | TP_ARGS(q, bio, rw) | 367 | TP_ARGS(q, bio, rw) |
| 258 | ); | 368 | ); |
| 259 | 369 | ||
| 370 | /** | ||
| 371 | * block_plug - keep operations requests in request queue | ||
| 372 | * @q: request queue to plug | ||
| 373 | * | ||
| 374 | * Plug the request queue @q. Do not allow block operation requests | ||
| 375 | * to be sent to the device driver. Instead, accumulate requests in | ||
| 376 | * the queue to improve throughput performance of the block device. | ||
| 377 | */ | ||
| 260 | TRACE_EVENT(block_plug, | 378 | TRACE_EVENT(block_plug, |
| 261 | 379 | ||
| 262 | TP_PROTO(struct request_queue *q), | 380 | TP_PROTO(struct request_queue *q), |
| @@ -293,6 +411,13 @@ DECLARE_EVENT_CLASS(block_unplug, | |||
| 293 | TP_printk("[%s] %d", __entry->comm, __entry->nr_rq) | 411 | TP_printk("[%s] %d", __entry->comm, __entry->nr_rq) |
| 294 | ); | 412 | ); |
| 295 | 413 | ||
| 414 | /** | ||
| 415 | * block_unplug_timer - timed release of operations requests in queue to device driver | ||
| 416 | * @q: request queue to unplug | ||
| 417 | * | ||
| 418 | * Unplug the request queue @q because a timer expired and allow block | ||
| 419 | * operation requests to be sent to the device driver. | ||
| 420 | */ | ||
| 296 | DEFINE_EVENT(block_unplug, block_unplug_timer, | 421 | DEFINE_EVENT(block_unplug, block_unplug_timer, |
| 297 | 422 | ||
| 298 | TP_PROTO(struct request_queue *q), | 423 | TP_PROTO(struct request_queue *q), |
| @@ -300,6 +425,13 @@ DEFINE_EVENT(block_unplug, block_unplug_timer, | |||
| 300 | TP_ARGS(q) | 425 | TP_ARGS(q) |
| 301 | ); | 426 | ); |
| 302 | 427 | ||
| 428 | /** | ||
| 429 | * block_unplug_io - release of operations requests in request queue | ||
| 430 | * @q: request queue to unplug | ||
| 431 | * | ||
| 432 | * Unplug request queue @q because device driver is scheduled to work | ||
| 433 | * on elements in the request queue. | ||
| 434 | */ | ||
| 303 | DEFINE_EVENT(block_unplug, block_unplug_io, | 435 | DEFINE_EVENT(block_unplug, block_unplug_io, |
| 304 | 436 | ||
| 305 | TP_PROTO(struct request_queue *q), | 437 | TP_PROTO(struct request_queue *q), |
| @@ -307,6 +439,17 @@ DEFINE_EVENT(block_unplug, block_unplug_io, | |||
| 307 | TP_ARGS(q) | 439 | TP_ARGS(q) |
| 308 | ); | 440 | ); |
| 309 | 441 | ||
| 442 | /** | ||
| 443 | * block_split - split a single bio struct into two bio structs | ||
| 444 | * @q: queue containing the bio | ||
| 445 | * @bio: block operation being split | ||
| 446 | * @new_sector: The starting sector for the new bio | ||
| 447 | * | ||
| 448 | * The bio request @bio in request queue @q needs to be split into two | ||
| 449 | * bio requests. The newly created @bio request starts at | ||
| 450 | * @new_sector. This split may be required due to hardware limitation | ||
| 451 | * such as operation crossing device boundaries in a RAID system. | ||
| 452 | */ | ||
| 310 | TRACE_EVENT(block_split, | 453 | TRACE_EVENT(block_split, |
| 311 | 454 | ||
| 312 | TP_PROTO(struct request_queue *q, struct bio *bio, | 455 | TP_PROTO(struct request_queue *q, struct bio *bio, |
| @@ -337,6 +480,16 @@ TRACE_EVENT(block_split, | |||
| 337 | __entry->comm) | 480 | __entry->comm) |
| 338 | ); | 481 | ); |
| 339 | 482 | ||
| 483 | /** | ||
| 484 | * block_remap - map request for a partition to the raw device | ||
| 485 | * @q: queue holding the operation | ||
| 486 | * @bio: revised operation | ||
| 487 | * @dev: device for the operation | ||
| 488 | * @from: original sector for the operation | ||
| 489 | * | ||
| 490 | * An operation for a partition on a block device has been mapped to the | ||
| 491 | * raw block device. | ||
| 492 | */ | ||
| 340 | TRACE_EVENT(block_remap, | 493 | TRACE_EVENT(block_remap, |
| 341 | 494 | ||
| 342 | TP_PROTO(struct request_queue *q, struct bio *bio, dev_t dev, | 495 | TP_PROTO(struct request_queue *q, struct bio *bio, dev_t dev, |
| @@ -370,6 +523,17 @@ TRACE_EVENT(block_remap, | |||
| 370 | (unsigned long long)__entry->old_sector) | 523 | (unsigned long long)__entry->old_sector) |
| 371 | ); | 524 | ); |
| 372 | 525 | ||
| 526 | /** | ||
| 527 | * block_rq_remap - map request for a block operation request | ||
| 528 | * @q: queue holding the operation | ||
| 529 | * @rq: block IO operation request | ||
| 530 | * @dev: device for the operation | ||
| 531 | * @from: original sector for the operation | ||
| 532 | * | ||
| 533 | * The block operation request @rq in @q has been remapped. The block | ||
| 534 | * operation request @rq holds the current information and @from hold | ||
| 535 | * the original sector. | ||
| 536 | */ | ||
| 373 | TRACE_EVENT(block_rq_remap, | 537 | TRACE_EVENT(block_rq_remap, |
| 374 | 538 | ||
| 375 | TP_PROTO(struct request_queue *q, struct request *rq, dev_t dev, | 539 | TP_PROTO(struct request_queue *q, struct request *rq, dev_t dev, |
diff --git a/include/xen/xenbus.h b/include/xen/xenbus.h index b9763badbd77..43e2d7d33976 100644 --- a/include/xen/xenbus.h +++ b/include/xen/xenbus.h | |||
| @@ -39,6 +39,7 @@ | |||
| 39 | #include <linux/mutex.h> | 39 | #include <linux/mutex.h> |
| 40 | #include <linux/completion.h> | 40 | #include <linux/completion.h> |
| 41 | #include <linux/init.h> | 41 | #include <linux/init.h> |
| 42 | #include <linux/slab.h> | ||
| 42 | #include <xen/interface/xen.h> | 43 | #include <xen/interface/xen.h> |
| 43 | #include <xen/interface/grant_table.h> | 44 | #include <xen/interface/grant_table.h> |
| 44 | #include <xen/interface/io/xenbus.h> | 45 | #include <xen/interface/io/xenbus.h> |
