diff options
Diffstat (limited to 'include')
32 files changed, 663 insertions, 121 deletions
diff --git a/include/asm-generic/cmpxchg.h b/include/asm-generic/cmpxchg.h index 8a361834dc25..14883026015d 100644 --- a/include/asm-generic/cmpxchg.h +++ b/include/asm-generic/cmpxchg.h | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #error "Cannot use generic cmpxchg on SMP" | 10 | #error "Cannot use generic cmpxchg on SMP" |
| 11 | #endif | 11 | #endif |
| 12 | 12 | ||
| 13 | #include <linux/types.h> | ||
| 13 | #include <linux/irqflags.h> | 14 | #include <linux/irqflags.h> |
| 14 | 15 | ||
| 15 | #ifndef xchg | 16 | #ifndef xchg |
diff --git a/include/crypto/internal/aead.h b/include/crypto/internal/aead.h index d838c945575a..2eba340230a7 100644 --- a/include/crypto/internal/aead.h +++ b/include/crypto/internal/aead.h | |||
| @@ -31,6 +31,8 @@ static inline void crypto_set_aead_spawn( | |||
| 31 | crypto_set_spawn(&spawn->base, inst); | 31 | crypto_set_spawn(&spawn->base, inst); |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | struct crypto_alg *crypto_lookup_aead(const char *name, u32 type, u32 mask); | ||
| 35 | |||
| 34 | int crypto_grab_aead(struct crypto_aead_spawn *spawn, const char *name, | 36 | int crypto_grab_aead(struct crypto_aead_spawn *spawn, const char *name, |
| 35 | u32 type, u32 mask); | 37 | u32 type, u32 mask); |
| 36 | 38 | ||
diff --git a/include/crypto/internal/skcipher.h b/include/crypto/internal/skcipher.h index 3a748a6bf772..06e8b32d541c 100644 --- a/include/crypto/internal/skcipher.h +++ b/include/crypto/internal/skcipher.h | |||
| @@ -34,6 +34,8 @@ static inline void crypto_set_skcipher_spawn( | |||
| 34 | int crypto_grab_skcipher(struct crypto_skcipher_spawn *spawn, const char *name, | 34 | int crypto_grab_skcipher(struct crypto_skcipher_spawn *spawn, const char *name, |
| 35 | u32 type, u32 mask); | 35 | u32 type, u32 mask); |
| 36 | 36 | ||
| 37 | struct crypto_alg *crypto_lookup_skcipher(const char *name, u32 type, u32 mask); | ||
| 38 | |||
| 37 | static inline void crypto_drop_skcipher(struct crypto_skcipher_spawn *spawn) | 39 | static inline void crypto_drop_skcipher(struct crypto_skcipher_spawn *spawn) |
| 38 | { | 40 | { |
| 39 | crypto_drop_spawn(&spawn->base); | 41 | crypto_drop_spawn(&spawn->base); |
diff --git a/include/drm/drm.h b/include/drm/drm.h index 34a7b89fd006..64ff02d5b730 100644 --- a/include/drm/drm.h +++ b/include/drm/drm.h | |||
| @@ -617,6 +617,17 @@ struct drm_get_cap { | |||
| 617 | __u64 value; | 617 | __u64 value; |
| 618 | }; | 618 | }; |
| 619 | 619 | ||
| 620 | #define DRM_CLOEXEC O_CLOEXEC | ||
| 621 | struct drm_prime_handle { | ||
| 622 | __u32 handle; | ||
| 623 | |||
| 624 | /** Flags.. only applicable for handle->fd */ | ||
| 625 | __u32 flags; | ||
| 626 | |||
| 627 | /** Returned dmabuf file descriptor */ | ||
| 628 | __s32 fd; | ||
| 629 | }; | ||
| 630 | |||
| 620 | #include "drm_mode.h" | 631 | #include "drm_mode.h" |
| 621 | 632 | ||
| 622 | #define DRM_IOCTL_BASE 'd' | 633 | #define DRM_IOCTL_BASE 'd' |
| @@ -673,7 +684,8 @@ struct drm_get_cap { | |||
| 673 | #define DRM_IOCTL_UNLOCK DRM_IOW( 0x2b, struct drm_lock) | 684 | #define DRM_IOCTL_UNLOCK DRM_IOW( 0x2b, struct drm_lock) |
| 674 | #define DRM_IOCTL_FINISH DRM_IOW( 0x2c, struct drm_lock) | 685 | #define DRM_IOCTL_FINISH DRM_IOW( 0x2c, struct drm_lock) |
| 675 | 686 | ||
| 676 | #define DRM_IOCTL_GEM_PRIME_OPEN DRM_IOWR(0x2e, struct drm_gem_open) | 687 | #define DRM_IOCTL_PRIME_HANDLE_TO_FD DRM_IOWR(0x2d, struct drm_prime_handle) |
| 688 | #define DRM_IOCTL_PRIME_FD_TO_HANDLE DRM_IOWR(0x2e, struct drm_prime_handle) | ||
| 677 | 689 | ||
| 678 | #define DRM_IOCTL_AGP_ACQUIRE DRM_IO( 0x30) | 690 | #define DRM_IOCTL_AGP_ACQUIRE DRM_IO( 0x30) |
| 679 | #define DRM_IOCTL_AGP_RELEASE DRM_IO( 0x31) | 691 | #define DRM_IOCTL_AGP_RELEASE DRM_IO( 0x31) |
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 574bd1c81ebd..dd731043fecd 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
| @@ -91,6 +91,7 @@ struct drm_device; | |||
| 91 | #define DRM_UT_CORE 0x01 | 91 | #define DRM_UT_CORE 0x01 |
| 92 | #define DRM_UT_DRIVER 0x02 | 92 | #define DRM_UT_DRIVER 0x02 |
| 93 | #define DRM_UT_KMS 0x04 | 93 | #define DRM_UT_KMS 0x04 |
| 94 | #define DRM_UT_PRIME 0x08 | ||
| 94 | /* | 95 | /* |
| 95 | * Three debug levels are defined. | 96 | * Three debug levels are defined. |
| 96 | * drm_core, drm_driver, drm_kms | 97 | * drm_core, drm_driver, drm_kms |
| @@ -150,6 +151,7 @@ int drm_err(const char *func, const char *format, ...); | |||
| 150 | #define DRIVER_IRQ_VBL2 0x800 | 151 | #define DRIVER_IRQ_VBL2 0x800 |
| 151 | #define DRIVER_GEM 0x1000 | 152 | #define DRIVER_GEM 0x1000 |
| 152 | #define DRIVER_MODESET 0x2000 | 153 | #define DRIVER_MODESET 0x2000 |
| 154 | #define DRIVER_PRIME 0x4000 | ||
| 153 | 155 | ||
| 154 | #define DRIVER_BUS_PCI 0x1 | 156 | #define DRIVER_BUS_PCI 0x1 |
| 155 | #define DRIVER_BUS_PLATFORM 0x2 | 157 | #define DRIVER_BUS_PLATFORM 0x2 |
| @@ -215,6 +217,11 @@ int drm_err(const char *func, const char *format, ...); | |||
| 215 | drm_ut_debug_printk(DRM_UT_KMS, DRM_NAME, \ | 217 | drm_ut_debug_printk(DRM_UT_KMS, DRM_NAME, \ |
| 216 | __func__, fmt, ##args); \ | 218 | __func__, fmt, ##args); \ |
| 217 | } while (0) | 219 | } while (0) |
| 220 | #define DRM_DEBUG_PRIME(fmt, args...) \ | ||
| 221 | do { \ | ||
| 222 | drm_ut_debug_printk(DRM_UT_PRIME, DRM_NAME, \ | ||
| 223 | __func__, fmt, ##args); \ | ||
| 224 | } while (0) | ||
| 218 | #define DRM_LOG(fmt, args...) \ | 225 | #define DRM_LOG(fmt, args...) \ |
| 219 | do { \ | 226 | do { \ |
| 220 | drm_ut_debug_printk(DRM_UT_CORE, NULL, \ | 227 | drm_ut_debug_printk(DRM_UT_CORE, NULL, \ |
| @@ -238,6 +245,7 @@ int drm_err(const char *func, const char *format, ...); | |||
| 238 | #else | 245 | #else |
| 239 | #define DRM_DEBUG_DRIVER(fmt, args...) do { } while (0) | 246 | #define DRM_DEBUG_DRIVER(fmt, args...) do { } while (0) |
| 240 | #define DRM_DEBUG_KMS(fmt, args...) do { } while (0) | 247 | #define DRM_DEBUG_KMS(fmt, args...) do { } while (0) |
| 248 | #define DRM_DEBUG_PRIME(fmt, args...) do { } while (0) | ||
| 241 | #define DRM_DEBUG(fmt, arg...) do { } while (0) | 249 | #define DRM_DEBUG(fmt, arg...) do { } while (0) |
| 242 | #define DRM_LOG(fmt, arg...) do { } while (0) | 250 | #define DRM_LOG(fmt, arg...) do { } while (0) |
| 243 | #define DRM_LOG_KMS(fmt, args...) do { } while (0) | 251 | #define DRM_LOG_KMS(fmt, args...) do { } while (0) |
| @@ -410,6 +418,12 @@ struct drm_pending_event { | |||
| 410 | void (*destroy)(struct drm_pending_event *event); | 418 | void (*destroy)(struct drm_pending_event *event); |
| 411 | }; | 419 | }; |
| 412 | 420 | ||
| 421 | /* initial implementaton using a linked list - todo hashtab */ | ||
| 422 | struct drm_prime_file_private { | ||
| 423 | struct list_head head; | ||
| 424 | struct mutex lock; | ||
| 425 | }; | ||
| 426 | |||
| 413 | /** File private data */ | 427 | /** File private data */ |
| 414 | struct drm_file { | 428 | struct drm_file { |
| 415 | int authenticated; | 429 | int authenticated; |
| @@ -437,6 +451,8 @@ struct drm_file { | |||
| 437 | wait_queue_head_t event_wait; | 451 | wait_queue_head_t event_wait; |
| 438 | struct list_head event_list; | 452 | struct list_head event_list; |
| 439 | int event_space; | 453 | int event_space; |
| 454 | |||
| 455 | struct drm_prime_file_private prime; | ||
| 440 | }; | 456 | }; |
| 441 | 457 | ||
| 442 | /** Wait queue */ | 458 | /** Wait queue */ |
| @@ -652,6 +668,12 @@ struct drm_gem_object { | |||
| 652 | uint32_t pending_write_domain; | 668 | uint32_t pending_write_domain; |
| 653 | 669 | ||
| 654 | void *driver_private; | 670 | void *driver_private; |
| 671 | |||
| 672 | /* dma buf exported from this GEM object */ | ||
| 673 | struct dma_buf *export_dma_buf; | ||
| 674 | |||
| 675 | /* dma buf attachment backing this object */ | ||
| 676 | struct dma_buf_attachment *import_attach; | ||
| 655 | }; | 677 | }; |
| 656 | 678 | ||
| 657 | #include "drm_crtc.h" | 679 | #include "drm_crtc.h" |
| @@ -890,6 +912,20 @@ struct drm_driver { | |||
| 890 | int (*gem_open_object) (struct drm_gem_object *, struct drm_file *); | 912 | int (*gem_open_object) (struct drm_gem_object *, struct drm_file *); |
| 891 | void (*gem_close_object) (struct drm_gem_object *, struct drm_file *); | 913 | void (*gem_close_object) (struct drm_gem_object *, struct drm_file *); |
| 892 | 914 | ||
| 915 | /* prime: */ | ||
| 916 | /* export handle -> fd (see drm_gem_prime_handle_to_fd() helper) */ | ||
| 917 | int (*prime_handle_to_fd)(struct drm_device *dev, struct drm_file *file_priv, | ||
| 918 | uint32_t handle, uint32_t flags, int *prime_fd); | ||
| 919 | /* import fd -> handle (see drm_gem_prime_fd_to_handle() helper) */ | ||
| 920 | int (*prime_fd_to_handle)(struct drm_device *dev, struct drm_file *file_priv, | ||
| 921 | int prime_fd, uint32_t *handle); | ||
| 922 | /* export GEM -> dmabuf */ | ||
| 923 | struct dma_buf * (*gem_prime_export)(struct drm_device *dev, | ||
| 924 | struct drm_gem_object *obj, int flags); | ||
| 925 | /* import dmabuf -> GEM */ | ||
| 926 | struct drm_gem_object * (*gem_prime_import)(struct drm_device *dev, | ||
| 927 | struct dma_buf *dma_buf); | ||
| 928 | |||
| 893 | /* vga arb irq handler */ | 929 | /* vga arb irq handler */ |
| 894 | void (*vgaarb_irq)(struct drm_device *dev, bool state); | 930 | void (*vgaarb_irq)(struct drm_device *dev, bool state); |
| 895 | 931 | ||
| @@ -1509,6 +1545,32 @@ extern int drm_vblank_info(struct seq_file *m, void *data); | |||
| 1509 | extern int drm_clients_info(struct seq_file *m, void* data); | 1545 | extern int drm_clients_info(struct seq_file *m, void* data); |
| 1510 | extern int drm_gem_name_info(struct seq_file *m, void *data); | 1546 | extern int drm_gem_name_info(struct seq_file *m, void *data); |
| 1511 | 1547 | ||
| 1548 | |||
| 1549 | extern int drm_gem_prime_handle_to_fd(struct drm_device *dev, | ||
| 1550 | struct drm_file *file_priv, uint32_t handle, uint32_t flags, | ||
| 1551 | int *prime_fd); | ||
| 1552 | extern int drm_gem_prime_fd_to_handle(struct drm_device *dev, | ||
| 1553 | struct drm_file *file_priv, int prime_fd, uint32_t *handle); | ||
| 1554 | |||
| 1555 | extern int drm_prime_handle_to_fd_ioctl(struct drm_device *dev, void *data, | ||
| 1556 | struct drm_file *file_priv); | ||
| 1557 | extern int drm_prime_fd_to_handle_ioctl(struct drm_device *dev, void *data, | ||
| 1558 | struct drm_file *file_priv); | ||
| 1559 | |||
| 1560 | extern struct sg_table *drm_prime_pages_to_sg(struct page **pages, int nr_pages); | ||
| 1561 | extern void drm_prime_gem_destroy(struct drm_gem_object *obj, struct sg_table *sg); | ||
| 1562 | |||
| 1563 | |||
| 1564 | void drm_prime_init_file_private(struct drm_prime_file_private *prime_fpriv); | ||
| 1565 | void drm_prime_destroy_file_private(struct drm_prime_file_private *prime_fpriv); | ||
| 1566 | int drm_prime_add_imported_buf_handle(struct drm_prime_file_private *prime_fpriv, struct dma_buf *dma_buf, uint32_t handle); | ||
| 1567 | int drm_prime_lookup_imported_buf_handle(struct drm_prime_file_private *prime_fpriv, struct dma_buf *dma_buf, uint32_t *handle); | ||
| 1568 | void drm_prime_remove_imported_buf_handle(struct drm_prime_file_private *prime_fpriv, struct dma_buf *dma_buf); | ||
| 1569 | |||
| 1570 | int drm_prime_add_dma_buf(struct drm_device *dev, struct drm_gem_object *obj); | ||
| 1571 | int drm_prime_lookup_obj(struct drm_device *dev, struct dma_buf *buf, | ||
| 1572 | struct drm_gem_object **obj); | ||
| 1573 | |||
| 1512 | #if DRM_DEBUG_CODE | 1574 | #if DRM_DEBUG_CODE |
| 1513 | extern int drm_vma_info(struct seq_file *m, void *data); | 1575 | extern int drm_vma_info(struct seq_file *m, void *data); |
| 1514 | #endif | 1576 | #endif |
diff --git a/include/drm/intel-gtt.h b/include/drm/intel-gtt.h index 0a0001b9dc78..923afb5dcf0c 100644 --- a/include/drm/intel-gtt.h +++ b/include/drm/intel-gtt.h | |||
| @@ -44,4 +44,8 @@ void intel_gtt_insert_pages(unsigned int first_entry, unsigned int num_entries, | |||
| 44 | /* flag for GFDT type */ | 44 | /* flag for GFDT type */ |
| 45 | #define AGP_USER_CACHED_MEMORY_GFDT (1 << 3) | 45 | #define AGP_USER_CACHED_MEMORY_GFDT (1 << 3) |
| 46 | 46 | ||
| 47 | #ifdef CONFIG_INTEL_IOMMU | ||
| 48 | extern int intel_iommu_gfx_mapped; | ||
| 49 | #endif | ||
| 50 | |||
| 47 | #endif | 51 | #endif |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index d05df2810354..3c9b616c834a 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
| @@ -3,6 +3,7 @@ header-y += can/ | |||
| 3 | header-y += caif/ | 3 | header-y += caif/ |
| 4 | header-y += dvb/ | 4 | header-y += dvb/ |
| 5 | header-y += hdlc/ | 5 | header-y += hdlc/ |
| 6 | header-y += hsi/ | ||
| 6 | header-y += isdn/ | 7 | header-y += isdn/ |
| 7 | header-y += mmc/ | 8 | header-y += mmc/ |
| 8 | header-y += nfsd/ | 9 | header-y += nfsd/ |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 1ffdb9856bb9..a2c819d3c96e 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
| @@ -764,12 +764,6 @@ static inline const struct cpumask *get_cpu_mask(unsigned int cpu) | |||
| 764 | * | 764 | * |
| 765 | */ | 765 | */ |
| 766 | #ifndef CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS | 766 | #ifndef CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS |
| 767 | /* These strip const, as traditionally they weren't const. */ | ||
| 768 | #define cpu_possible_map (*(cpumask_t *)cpu_possible_mask) | ||
| 769 | #define cpu_online_map (*(cpumask_t *)cpu_online_mask) | ||
| 770 | #define cpu_present_map (*(cpumask_t *)cpu_present_mask) | ||
| 771 | #define cpu_active_map (*(cpumask_t *)cpu_active_mask) | ||
| 772 | |||
| 773 | #define cpumask_of_cpu(cpu) (*get_cpu_mask(cpu)) | 767 | #define cpumask_of_cpu(cpu) (*get_cpu_mask(cpu)) |
| 774 | 768 | ||
| 775 | #define CPU_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(NR_CPUS) | 769 | #define CPU_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(NR_CPUS) |
diff --git a/include/linux/cryptouser.h b/include/linux/cryptouser.h index 532fb58f16bf..4abf2ea6a887 100644 --- a/include/linux/cryptouser.h +++ b/include/linux/cryptouser.h | |||
| @@ -100,3 +100,6 @@ struct crypto_report_rng { | |||
| 100 | char type[CRYPTO_MAX_NAME]; | 100 | char type[CRYPTO_MAX_NAME]; |
| 101 | unsigned int seedsize; | 101 | unsigned int seedsize; |
| 102 | }; | 102 | }; |
| 103 | |||
| 104 | #define CRYPTO_REPORT_MAXSIZE (sizeof(struct crypto_user_alg) + \ | ||
| 105 | sizeof(struct crypto_report_blkcipher)) | ||
diff --git a/include/linux/dma-attrs.h b/include/linux/dma-attrs.h index 71ad34eca6e3..547ab568d3ae 100644 --- a/include/linux/dma-attrs.h +++ b/include/linux/dma-attrs.h | |||
| @@ -13,6 +13,8 @@ | |||
| 13 | enum dma_attr { | 13 | enum dma_attr { |
| 14 | DMA_ATTR_WRITE_BARRIER, | 14 | DMA_ATTR_WRITE_BARRIER, |
| 15 | DMA_ATTR_WEAK_ORDERING, | 15 | DMA_ATTR_WEAK_ORDERING, |
| 16 | DMA_ATTR_WRITE_COMBINE, | ||
| 17 | DMA_ATTR_NON_CONSISTENT, | ||
| 16 | DMA_ATTR_MAX, | 18 | DMA_ATTR_MAX, |
| 17 | }; | 19 | }; |
| 18 | 20 | ||
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 5a736af3cc7a..dfc099e56a66 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
| @@ -9,10 +9,15 @@ | |||
| 9 | #include <linux/scatterlist.h> | 9 | #include <linux/scatterlist.h> |
| 10 | 10 | ||
| 11 | struct dma_map_ops { | 11 | struct dma_map_ops { |
| 12 | void* (*alloc_coherent)(struct device *dev, size_t size, | 12 | void* (*alloc)(struct device *dev, size_t size, |
| 13 | dma_addr_t *dma_handle, gfp_t gfp); | 13 | dma_addr_t *dma_handle, gfp_t gfp, |
| 14 | void (*free_coherent)(struct device *dev, size_t size, | 14 | struct dma_attrs *attrs); |
| 15 | void *vaddr, dma_addr_t dma_handle); | 15 | void (*free)(struct device *dev, size_t size, |
| 16 | void *vaddr, dma_addr_t dma_handle, | ||
| 17 | struct dma_attrs *attrs); | ||
| 18 | int (*mmap)(struct device *, struct vm_area_struct *, | ||
| 19 | void *, dma_addr_t, size_t, struct dma_attrs *attrs); | ||
| 20 | |||
| 16 | dma_addr_t (*map_page)(struct device *dev, struct page *page, | 21 | dma_addr_t (*map_page)(struct device *dev, struct page *page, |
| 17 | unsigned long offset, size_t size, | 22 | unsigned long offset, size_t size, |
| 18 | enum dma_data_direction dir, | 23 | enum dma_data_direction dir, |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index e1d9e0ede309..f5647b59a90e 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
| @@ -896,8 +896,7 @@ static inline u32 ethtool_rxfh_indir_default(u32 index, u32 n_rx_rings) | |||
| 896 | * | 896 | * |
| 897 | * All operations are optional (i.e. the function pointer may be set | 897 | * All operations are optional (i.e. the function pointer may be set |
| 898 | * to %NULL) and callers must take this into account. Callers must | 898 | * to %NULL) and callers must take this into account. Callers must |
| 899 | * hold the RTNL, except that for @get_drvinfo the caller may or may | 899 | * hold the RTNL lock. |
| 900 | * not hold the RTNL. | ||
| 901 | * | 900 | * |
| 902 | * See the structures used by these operations for further documentation. | 901 | * See the structures used by these operations for further documentation. |
| 903 | * | 902 | * |
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index 4db7b68f0582..cdc9b719e9c7 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define _LINUX_FIREWIRE_H | 2 | #define _LINUX_FIREWIRE_H |
| 3 | 3 | ||
| 4 | #include <linux/completion.h> | 4 | #include <linux/completion.h> |
| 5 | #include <linux/device.h> | ||
| 5 | #include <linux/dma-mapping.h> | 6 | #include <linux/dma-mapping.h> |
| 6 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
| 7 | #include <linux/kref.h> | 8 | #include <linux/kref.h> |
| @@ -64,8 +65,6 @@ | |||
| 64 | #define CSR_MODEL 0x17 | 65 | #define CSR_MODEL 0x17 |
| 65 | #define CSR_DIRECTORY_ID 0x20 | 66 | #define CSR_DIRECTORY_ID 0x20 |
| 66 | 67 | ||
| 67 | struct device; | ||
| 68 | |||
| 69 | struct fw_csr_iterator { | 68 | struct fw_csr_iterator { |
| 70 | const u32 *p; | 69 | const u32 *p; |
| 71 | const u32 *end; | 70 | const u32 *end; |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 135693e79f2b..8de675523e46 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -1215,6 +1215,7 @@ extern int vfs_setlease(struct file *, long, struct file_lock **); | |||
| 1215 | extern int lease_modify(struct file_lock **, int); | 1215 | extern int lease_modify(struct file_lock **, int); |
| 1216 | extern int lock_may_read(struct inode *, loff_t start, unsigned long count); | 1216 | extern int lock_may_read(struct inode *, loff_t start, unsigned long count); |
| 1217 | extern int lock_may_write(struct inode *, loff_t start, unsigned long count); | 1217 | extern int lock_may_write(struct inode *, loff_t start, unsigned long count); |
| 1218 | extern void locks_delete_block(struct file_lock *waiter); | ||
| 1218 | extern void lock_flocks(void); | 1219 | extern void lock_flocks(void); |
| 1219 | extern void unlock_flocks(void); | 1220 | extern void unlock_flocks(void); |
| 1220 | #else /* !CONFIG_FILE_LOCKING */ | 1221 | #else /* !CONFIG_FILE_LOCKING */ |
| @@ -1359,6 +1360,10 @@ static inline int lock_may_write(struct inode *inode, loff_t start, | |||
| 1359 | return 1; | 1360 | return 1; |
| 1360 | } | 1361 | } |
| 1361 | 1362 | ||
| 1363 | static inline void locks_delete_block(struct file_lock *waiter) | ||
| 1364 | { | ||
| 1365 | } | ||
| 1366 | |||
| 1362 | static inline void lock_flocks(void) | 1367 | static inline void lock_flocks(void) |
| 1363 | { | 1368 | { |
| 1364 | } | 1369 | } |
| @@ -2506,6 +2511,7 @@ extern int dcache_readdir(struct file *, void *, filldir_t); | |||
| 2506 | extern int simple_setattr(struct dentry *, struct iattr *); | 2511 | extern int simple_setattr(struct dentry *, struct iattr *); |
| 2507 | extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *); | 2512 | extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *); |
| 2508 | extern int simple_statfs(struct dentry *, struct kstatfs *); | 2513 | extern int simple_statfs(struct dentry *, struct kstatfs *); |
| 2514 | extern int simple_open(struct inode *inode, struct file *file); | ||
| 2509 | extern int simple_link(struct dentry *, struct inode *, struct dentry *); | 2515 | extern int simple_link(struct dentry *, struct inode *, struct dentry *); |
| 2510 | extern int simple_unlink(struct inode *, struct dentry *); | 2516 | extern int simple_unlink(struct inode *, struct dentry *); |
| 2511 | extern int simple_rmdir(struct inode *, struct dentry *); | 2517 | extern int simple_rmdir(struct inode *, struct dentry *); |
diff --git a/include/linux/hsi/Kbuild b/include/linux/hsi/Kbuild new file mode 100644 index 000000000000..271a770b4784 --- /dev/null +++ b/include/linux/hsi/Kbuild | |||
| @@ -0,0 +1 @@ | |||
| header-y += hsi_char.h | |||
diff --git a/include/linux/hsi/hsi.h b/include/linux/hsi/hsi.h new file mode 100644 index 000000000000..4b178067f405 --- /dev/null +++ b/include/linux/hsi/hsi.h | |||
| @@ -0,0 +1,410 @@ | |||
| 1 | /* | ||
| 2 | * HSI core header file. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Nokia Corporation. All rights reserved. | ||
| 5 | * | ||
| 6 | * Contact: Carlos Chinea <carlos.chinea@nokia.com> | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or | ||
| 9 | * modify it under the terms of the GNU General Public License | ||
| 10 | * version 2 as published by the Free Software Foundation. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, but | ||
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 15 | * General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
| 20 | * 02110-1301 USA | ||
| 21 | */ | ||
| 22 | |||
| 23 | #ifndef __LINUX_HSI_H__ | ||
| 24 | #define __LINUX_HSI_H__ | ||
| 25 | |||
| 26 | #include <linux/device.h> | ||
| 27 | #include <linux/mutex.h> | ||
| 28 | #include <linux/scatterlist.h> | ||
| 29 | #include <linux/spinlock.h> | ||
| 30 | #include <linux/list.h> | ||
| 31 | #include <linux/module.h> | ||
| 32 | |||
| 33 | /* HSI message ttype */ | ||
| 34 | #define HSI_MSG_READ 0 | ||
| 35 | #define HSI_MSG_WRITE 1 | ||
| 36 | |||
| 37 | /* HSI configuration values */ | ||
| 38 | enum { | ||
| 39 | HSI_MODE_STREAM = 1, | ||
| 40 | HSI_MODE_FRAME, | ||
| 41 | }; | ||
| 42 | |||
| 43 | enum { | ||
| 44 | HSI_FLOW_SYNC, /* Synchronized flow */ | ||
| 45 | HSI_FLOW_PIPE, /* Pipelined flow */ | ||
| 46 | }; | ||
| 47 | |||
| 48 | enum { | ||
| 49 | HSI_ARB_RR, /* Round-robin arbitration */ | ||
| 50 | HSI_ARB_PRIO, /* Channel priority arbitration */ | ||
| 51 | }; | ||
| 52 | |||
| 53 | #define HSI_MAX_CHANNELS 16 | ||
| 54 | |||
| 55 | /* HSI message status codes */ | ||
| 56 | enum { | ||
| 57 | HSI_STATUS_COMPLETED, /* Message transfer is completed */ | ||
| 58 | HSI_STATUS_PENDING, /* Message pending to be read/write (POLL) */ | ||
| 59 | HSI_STATUS_PROCEEDING, /* Message transfer is ongoing */ | ||
| 60 | HSI_STATUS_QUEUED, /* Message waiting to be served */ | ||
| 61 | HSI_STATUS_ERROR, /* Error when message transfer was ongoing */ | ||
| 62 | }; | ||
| 63 | |||
| 64 | /* HSI port event codes */ | ||
| 65 | enum { | ||
| 66 | HSI_EVENT_START_RX, | ||
| 67 | HSI_EVENT_STOP_RX, | ||
| 68 | }; | ||
| 69 | |||
| 70 | /** | ||
| 71 | * struct hsi_config - Configuration for RX/TX HSI modules | ||
| 72 | * @mode: Bit transmission mode (STREAM or FRAME) | ||
| 73 | * @channels: Number of channels to use [1..16] | ||
| 74 | * @speed: Max bit transmission speed (Kbit/s) | ||
| 75 | * @flow: RX flow type (SYNCHRONIZED or PIPELINE) | ||
| 76 | * @arb_mode: Arbitration mode for TX frame (Round robin, priority) | ||
| 77 | */ | ||
| 78 | struct hsi_config { | ||
| 79 | unsigned int mode; | ||
| 80 | unsigned int channels; | ||
| 81 | unsigned int speed; | ||
| 82 | union { | ||
| 83 | unsigned int flow; /* RX only */ | ||
| 84 | unsigned int arb_mode; /* TX only */ | ||
| 85 | }; | ||
| 86 | }; | ||
| 87 | |||
| 88 | /** | ||
| 89 | * struct hsi_board_info - HSI client board info | ||
| 90 | * @name: Name for the HSI device | ||
| 91 | * @hsi_id: HSI controller id where the client sits | ||
| 92 | * @port: Port number in the controller where the client sits | ||
| 93 | * @tx_cfg: HSI TX configuration | ||
| 94 | * @rx_cfg: HSI RX configuration | ||
| 95 | * @platform_data: Platform related data | ||
| 96 | * @archdata: Architecture-dependent device data | ||
| 97 | */ | ||
| 98 | struct hsi_board_info { | ||
| 99 | const char *name; | ||
| 100 | unsigned int hsi_id; | ||
| 101 | unsigned int port; | ||
| 102 | struct hsi_config tx_cfg; | ||
| 103 | struct hsi_config rx_cfg; | ||
| 104 | void *platform_data; | ||
| 105 | struct dev_archdata *archdata; | ||
| 106 | }; | ||
| 107 | |||
| 108 | #ifdef CONFIG_HSI_BOARDINFO | ||
| 109 | extern int hsi_register_board_info(struct hsi_board_info const *info, | ||
| 110 | unsigned int len); | ||
| 111 | #else | ||
| 112 | static inline int hsi_register_board_info(struct hsi_board_info const *info, | ||
| 113 | unsigned int len) | ||
| 114 | { | ||
| 115 | return 0; | ||
| 116 | } | ||
| 117 | #endif /* CONFIG_HSI_BOARDINFO */ | ||
| 118 | |||
| 119 | /** | ||
| 120 | * struct hsi_client - HSI client attached to an HSI port | ||
| 121 | * @device: Driver model representation of the device | ||
| 122 | * @tx_cfg: HSI TX configuration | ||
| 123 | * @rx_cfg: HSI RX configuration | ||
| 124 | * @hsi_start_rx: Called after incoming wake line goes high | ||
| 125 | * @hsi_stop_rx: Called after incoming wake line goes low | ||
| 126 | */ | ||
| 127 | struct hsi_client { | ||
| 128 | struct device device; | ||
| 129 | struct hsi_config tx_cfg; | ||
| 130 | struct hsi_config rx_cfg; | ||
| 131 | void (*hsi_start_rx)(struct hsi_client *cl); | ||
| 132 | void (*hsi_stop_rx)(struct hsi_client *cl); | ||
| 133 | /* private: */ | ||
| 134 | unsigned int pclaimed:1; | ||
| 135 | struct list_head link; | ||
| 136 | }; | ||
| 137 | |||
| 138 | #define to_hsi_client(dev) container_of(dev, struct hsi_client, device) | ||
| 139 | |||
| 140 | static inline void hsi_client_set_drvdata(struct hsi_client *cl, void *data) | ||
| 141 | { | ||
| 142 | dev_set_drvdata(&cl->device, data); | ||
| 143 | } | ||
| 144 | |||
| 145 | static inline void *hsi_client_drvdata(struct hsi_client *cl) | ||
| 146 | { | ||
| 147 | return dev_get_drvdata(&cl->device); | ||
| 148 | } | ||
| 149 | |||
| 150 | /** | ||
| 151 | * struct hsi_client_driver - Driver associated to an HSI client | ||
| 152 | * @driver: Driver model representation of the driver | ||
| 153 | */ | ||
| 154 | struct hsi_client_driver { | ||
| 155 | struct device_driver driver; | ||
| 156 | }; | ||
| 157 | |||
| 158 | #define to_hsi_client_driver(drv) container_of(drv, struct hsi_client_driver,\ | ||
| 159 | driver) | ||
| 160 | |||
| 161 | int hsi_register_client_driver(struct hsi_client_driver *drv); | ||
| 162 | |||
| 163 | static inline void hsi_unregister_client_driver(struct hsi_client_driver *drv) | ||
| 164 | { | ||
| 165 | driver_unregister(&drv->driver); | ||
| 166 | } | ||
| 167 | |||
| 168 | /** | ||
| 169 | * struct hsi_msg - HSI message descriptor | ||
| 170 | * @link: Free to use by the current descriptor owner | ||
| 171 | * @cl: HSI device client that issues the transfer | ||
| 172 | * @sgt: Head of the scatterlist array | ||
| 173 | * @context: Client context data associated to the transfer | ||
| 174 | * @complete: Transfer completion callback | ||
| 175 | * @destructor: Destructor to free resources when flushing | ||
| 176 | * @status: Status of the transfer when completed | ||
| 177 | * @actual_len: Actual length of data transfered on completion | ||
| 178 | * @channel: Channel were to TX/RX the message | ||
| 179 | * @ttype: Transfer type (TX if set, RX otherwise) | ||
| 180 | * @break_frame: if true HSI will send/receive a break frame. Data buffers are | ||
| 181 | * ignored in the request. | ||
| 182 | */ | ||
| 183 | struct hsi_msg { | ||
| 184 | struct list_head link; | ||
| 185 | struct hsi_client *cl; | ||
| 186 | struct sg_table sgt; | ||
| 187 | void *context; | ||
| 188 | |||
| 189 | void (*complete)(struct hsi_msg *msg); | ||
| 190 | void (*destructor)(struct hsi_msg *msg); | ||
| 191 | |||
| 192 | int status; | ||
| 193 | unsigned int actual_len; | ||
| 194 | unsigned int channel; | ||
| 195 | unsigned int ttype:1; | ||
| 196 | unsigned int break_frame:1; | ||
| 197 | }; | ||
| 198 | |||
| 199 | struct hsi_msg *hsi_alloc_msg(unsigned int n_frag, gfp_t flags); | ||
| 200 | void hsi_free_msg(struct hsi_msg *msg); | ||
| 201 | |||
| 202 | /** | ||
| 203 | * struct hsi_port - HSI port device | ||
| 204 | * @device: Driver model representation of the device | ||
| 205 | * @tx_cfg: Current TX path configuration | ||
| 206 | * @rx_cfg: Current RX path configuration | ||
| 207 | * @num: Port number | ||
| 208 | * @shared: Set when port can be shared by different clients | ||
| 209 | * @claimed: Reference count of clients which claimed the port | ||
| 210 | * @lock: Serialize port claim | ||
| 211 | * @async: Asynchronous transfer callback | ||
| 212 | * @setup: Callback to set the HSI client configuration | ||
| 213 | * @flush: Callback to clean the HW state and destroy all pending transfers | ||
| 214 | * @start_tx: Callback to inform that a client wants to TX data | ||
| 215 | * @stop_tx: Callback to inform that a client no longer wishes to TX data | ||
| 216 | * @release: Callback to inform that a client no longer uses the port | ||
| 217 | * @clients: List of hsi_clients using the port. | ||
| 218 | * @clock: Lock to serialize access to the clients list. | ||
| 219 | */ | ||
| 220 | struct hsi_port { | ||
| 221 | struct device device; | ||
| 222 | struct hsi_config tx_cfg; | ||
| 223 | struct hsi_config rx_cfg; | ||
| 224 | unsigned int num; | ||
| 225 | unsigned int shared:1; | ||
| 226 | int claimed; | ||
| 227 | struct mutex lock; | ||
| 228 | int (*async)(struct hsi_msg *msg); | ||
| 229 | int (*setup)(struct hsi_client *cl); | ||
| 230 | int (*flush)(struct hsi_client *cl); | ||
| 231 | int (*start_tx)(struct hsi_client *cl); | ||
| 232 | int (*stop_tx)(struct hsi_client *cl); | ||
| 233 | int (*release)(struct hsi_client *cl); | ||
| 234 | struct list_head clients; | ||
| 235 | spinlock_t clock; | ||
| 236 | }; | ||
| 237 | |||
| 238 | #define to_hsi_port(dev) container_of(dev, struct hsi_port, device) | ||
| 239 | #define hsi_get_port(cl) to_hsi_port((cl)->device.parent) | ||
| 240 | |||
| 241 | void hsi_event(struct hsi_port *port, unsigned int event); | ||
| 242 | int hsi_claim_port(struct hsi_client *cl, unsigned int share); | ||
| 243 | void hsi_release_port(struct hsi_client *cl); | ||
| 244 | |||
| 245 | static inline int hsi_port_claimed(struct hsi_client *cl) | ||
| 246 | { | ||
| 247 | return cl->pclaimed; | ||
| 248 | } | ||
| 249 | |||
| 250 | static inline void hsi_port_set_drvdata(struct hsi_port *port, void *data) | ||
| 251 | { | ||
| 252 | dev_set_drvdata(&port->device, data); | ||
| 253 | } | ||
| 254 | |||
| 255 | static inline void *hsi_port_drvdata(struct hsi_port *port) | ||
| 256 | { | ||
| 257 | return dev_get_drvdata(&port->device); | ||
| 258 | } | ||
| 259 | |||
| 260 | /** | ||
| 261 | * struct hsi_controller - HSI controller device | ||
| 262 | * @device: Driver model representation of the device | ||
| 263 | * @owner: Pointer to the module owning the controller | ||
| 264 | * @id: HSI controller ID | ||
| 265 | * @num_ports: Number of ports in the HSI controller | ||
| 266 | * @port: Array of HSI ports | ||
| 267 | */ | ||
| 268 | struct hsi_controller { | ||
| 269 | struct device device; | ||
| 270 | struct module *owner; | ||
| 271 | unsigned int id; | ||
| 272 | unsigned int num_ports; | ||
| 273 | struct hsi_port *port; | ||
| 274 | }; | ||
| 275 | |||
| 276 | #define to_hsi_controller(dev) container_of(dev, struct hsi_controller, device) | ||
| 277 | |||
| 278 | struct hsi_controller *hsi_alloc_controller(unsigned int n_ports, gfp_t flags); | ||
| 279 | void hsi_free_controller(struct hsi_controller *hsi); | ||
| 280 | int hsi_register_controller(struct hsi_controller *hsi); | ||
| 281 | void hsi_unregister_controller(struct hsi_controller *hsi); | ||
| 282 | |||
| 283 | static inline void hsi_controller_set_drvdata(struct hsi_controller *hsi, | ||
| 284 | void *data) | ||
| 285 | { | ||
| 286 | dev_set_drvdata(&hsi->device, data); | ||
| 287 | } | ||
| 288 | |||
| 289 | static inline void *hsi_controller_drvdata(struct hsi_controller *hsi) | ||
| 290 | { | ||
| 291 | return dev_get_drvdata(&hsi->device); | ||
| 292 | } | ||
| 293 | |||
| 294 | static inline struct hsi_port *hsi_find_port_num(struct hsi_controller *hsi, | ||
| 295 | unsigned int num) | ||
| 296 | { | ||
| 297 | return (num < hsi->num_ports) ? &hsi->port[num] : NULL; | ||
| 298 | } | ||
| 299 | |||
| 300 | /* | ||
| 301 | * API for HSI clients | ||
| 302 | */ | ||
| 303 | int hsi_async(struct hsi_client *cl, struct hsi_msg *msg); | ||
| 304 | |||
| 305 | /** | ||
| 306 | * hsi_id - Get HSI controller ID associated to a client | ||
| 307 | * @cl: Pointer to a HSI client | ||
| 308 | * | ||
| 309 | * Return the controller id where the client is attached to | ||
| 310 | */ | ||
| 311 | static inline unsigned int hsi_id(struct hsi_client *cl) | ||
| 312 | { | ||
| 313 | return to_hsi_controller(cl->device.parent->parent)->id; | ||
| 314 | } | ||
| 315 | |||
| 316 | /** | ||
| 317 | * hsi_port_id - Gets the port number a client is attached to | ||
| 318 | * @cl: Pointer to HSI client | ||
| 319 | * | ||
| 320 | * Return the port number associated to the client | ||
| 321 | */ | ||
| 322 | static inline unsigned int hsi_port_id(struct hsi_client *cl) | ||
| 323 | { | ||
| 324 | return to_hsi_port(cl->device.parent)->num; | ||
| 325 | } | ||
| 326 | |||
| 327 | /** | ||
| 328 | * hsi_setup - Configure the client's port | ||
| 329 | * @cl: Pointer to the HSI client | ||
| 330 | * | ||
| 331 | * When sharing ports, clients should either relay on a single | ||
| 332 | * client setup or have the same setup for all of them. | ||
| 333 | * | ||
| 334 | * Return -errno on failure, 0 on success | ||
| 335 | */ | ||
| 336 | static inline int hsi_setup(struct hsi_client *cl) | ||
| 337 | { | ||
| 338 | if (!hsi_port_claimed(cl)) | ||
| 339 | return -EACCES; | ||
| 340 | return hsi_get_port(cl)->setup(cl); | ||
| 341 | } | ||
| 342 | |||
| 343 | /** | ||
| 344 | * hsi_flush - Flush all pending transactions on the client's port | ||
| 345 | * @cl: Pointer to the HSI client | ||
| 346 | * | ||
| 347 | * This function will destroy all pending hsi_msg in the port and reset | ||
| 348 | * the HW port so it is ready to receive and transmit from a clean state. | ||
| 349 | * | ||
| 350 | * Return -errno on failure, 0 on success | ||
| 351 | */ | ||
| 352 | static inline int hsi_flush(struct hsi_client *cl) | ||
| 353 | { | ||
| 354 | if (!hsi_port_claimed(cl)) | ||
| 355 | return -EACCES; | ||
| 356 | return hsi_get_port(cl)->flush(cl); | ||
| 357 | } | ||
| 358 | |||
| 359 | /** | ||
| 360 | * hsi_async_read - Submit a read transfer | ||
| 361 | * @cl: Pointer to the HSI client | ||
| 362 | * @msg: HSI message descriptor of the transfer | ||
| 363 | * | ||
| 364 | * Return -errno on failure, 0 on success | ||
| 365 | */ | ||
| 366 | static inline int hsi_async_read(struct hsi_client *cl, struct hsi_msg *msg) | ||
| 367 | { | ||
| 368 | msg->ttype = HSI_MSG_READ; | ||
| 369 | return hsi_async(cl, msg); | ||
| 370 | } | ||
| 371 | |||
| 372 | /** | ||
| 373 | * hsi_async_write - Submit a write transfer | ||
| 374 | * @cl: Pointer to the HSI client | ||
| 375 | * @msg: HSI message descriptor of the transfer | ||
| 376 | * | ||
| 377 | * Return -errno on failure, 0 on success | ||
| 378 | */ | ||
| 379 | static inline int hsi_async_write(struct hsi_client *cl, struct hsi_msg *msg) | ||
| 380 | { | ||
| 381 | msg->ttype = HSI_MSG_WRITE; | ||
| 382 | return hsi_async(cl, msg); | ||
| 383 | } | ||
| 384 | |||
| 385 | /** | ||
| 386 | * hsi_start_tx - Signal the port that the client wants to start a TX | ||
| 387 | * @cl: Pointer to the HSI client | ||
| 388 | * | ||
| 389 | * Return -errno on failure, 0 on success | ||
| 390 | */ | ||
| 391 | static inline int hsi_start_tx(struct hsi_client *cl) | ||
| 392 | { | ||
| 393 | if (!hsi_port_claimed(cl)) | ||
| 394 | return -EACCES; | ||
| 395 | return hsi_get_port(cl)->start_tx(cl); | ||
| 396 | } | ||
| 397 | |||
| 398 | /** | ||
| 399 | * hsi_stop_tx - Signal the port that the client no longer wants to transmit | ||
| 400 | * @cl: Pointer to the HSI client | ||
| 401 | * | ||
| 402 | * Return -errno on failure, 0 on success | ||
| 403 | */ | ||
| 404 | static inline int hsi_stop_tx(struct hsi_client *cl) | ||
| 405 | { | ||
| 406 | if (!hsi_port_claimed(cl)) | ||
| 407 | return -EACCES; | ||
| 408 | return hsi_get_port(cl)->stop_tx(cl); | ||
| 409 | } | ||
| 410 | #endif /* __LINUX_HSI_H__ */ | ||
diff --git a/include/linux/hsi/hsi_char.h b/include/linux/hsi/hsi_char.h new file mode 100644 index 000000000000..76160b4f455d --- /dev/null +++ b/include/linux/hsi/hsi_char.h | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | /* | ||
| 2 | * Part of the HSI character device driver. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Nokia Corporation. All rights reserved. | ||
| 5 | * | ||
| 6 | * Contact: Andras Domokos <andras.domokos at nokia.com> | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or | ||
| 9 | * modify it under the terms of the GNU General Public License | ||
| 10 | * version 2 as published by the Free Software Foundation. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, but | ||
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 15 | * General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
| 20 | * 02110-1301 USA | ||
| 21 | */ | ||
| 22 | |||
| 23 | |||
| 24 | #ifndef __HSI_CHAR_H | ||
| 25 | #define __HSI_CHAR_H | ||
| 26 | |||
| 27 | #define HSI_CHAR_MAGIC 'k' | ||
| 28 | #define HSC_IOW(num, dtype) _IOW(HSI_CHAR_MAGIC, num, dtype) | ||
| 29 | #define HSC_IOR(num, dtype) _IOR(HSI_CHAR_MAGIC, num, dtype) | ||
| 30 | #define HSC_IOWR(num, dtype) _IOWR(HSI_CHAR_MAGIC, num, dtype) | ||
| 31 | #define HSC_IO(num) _IO(HSI_CHAR_MAGIC, num) | ||
| 32 | |||
| 33 | #define HSC_RESET HSC_IO(16) | ||
| 34 | #define HSC_SET_PM HSC_IO(17) | ||
| 35 | #define HSC_SEND_BREAK HSC_IO(18) | ||
| 36 | #define HSC_SET_RX HSC_IOW(19, struct hsc_rx_config) | ||
| 37 | #define HSC_GET_RX HSC_IOW(20, struct hsc_rx_config) | ||
| 38 | #define HSC_SET_TX HSC_IOW(21, struct hsc_tx_config) | ||
| 39 | #define HSC_GET_TX HSC_IOW(22, struct hsc_tx_config) | ||
| 40 | |||
| 41 | #define HSC_PM_DISABLE 0 | ||
| 42 | #define HSC_PM_ENABLE 1 | ||
| 43 | |||
| 44 | #define HSC_MODE_STREAM 1 | ||
| 45 | #define HSC_MODE_FRAME 2 | ||
| 46 | #define HSC_FLOW_SYNC 0 | ||
| 47 | #define HSC_ARB_RR 0 | ||
| 48 | #define HSC_ARB_PRIO 1 | ||
| 49 | |||
| 50 | struct hsc_rx_config { | ||
| 51 | uint32_t mode; | ||
| 52 | uint32_t flow; | ||
| 53 | uint32_t channels; | ||
| 54 | }; | ||
| 55 | |||
| 56 | struct hsc_tx_config { | ||
| 57 | uint32_t mode; | ||
| 58 | uint32_t channels; | ||
| 59 | uint32_t speed; | ||
| 60 | uint32_t arb_mode; | ||
| 61 | }; | ||
| 62 | |||
| 63 | #endif /* __HSI_CHAR_H */ | ||
diff --git a/include/linux/if_eql.h b/include/linux/if_eql.h index 79c4f268410d..18a5d02a8644 100644 --- a/include/linux/if_eql.h +++ b/include/linux/if_eql.h | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | #define EQL_DEFAULT_SLAVE_PRIORITY 28800 | 22 | #define EQL_DEFAULT_SLAVE_PRIORITY 28800 |
| 23 | #define EQL_DEFAULT_MAX_SLAVES 4 | 23 | #define EQL_DEFAULT_MAX_SLAVES 4 |
| 24 | #define EQL_DEFAULT_MTU 576 | 24 | #define EQL_DEFAULT_MTU 576 |
| 25 | #define EQL_DEFAULT_RESCHED_IVAL 100 | 25 | #define EQL_DEFAULT_RESCHED_IVAL HZ |
| 26 | 26 | ||
| 27 | #define EQL_ENSLAVE (SIOCDEVPRIVATE) | 27 | #define EQL_ENSLAVE (SIOCDEVPRIVATE) |
| 28 | #define EQL_EMANCIPATE (SIOCDEVPRIVATE + 1) | 28 | #define EQL_EMANCIPATE (SIOCDEVPRIVATE + 1) |
diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h index fa391835508d..c4d2fc194ede 100644 --- a/include/linux/kgdb.h +++ b/include/linux/kgdb.h | |||
| @@ -63,7 +63,8 @@ enum kgdb_bptype { | |||
| 63 | BP_HARDWARE_BREAKPOINT, | 63 | BP_HARDWARE_BREAKPOINT, |
| 64 | BP_WRITE_WATCHPOINT, | 64 | BP_WRITE_WATCHPOINT, |
| 65 | BP_READ_WATCHPOINT, | 65 | BP_READ_WATCHPOINT, |
| 66 | BP_ACCESS_WATCHPOINT | 66 | BP_ACCESS_WATCHPOINT, |
| 67 | BP_POKE_BREAKPOINT, | ||
| 67 | }; | 68 | }; |
| 68 | 69 | ||
| 69 | enum kgdb_bpstate { | 70 | enum kgdb_bpstate { |
| @@ -207,8 +208,8 @@ extern void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long pc); | |||
| 207 | 208 | ||
| 208 | /* Optional functions. */ | 209 | /* Optional functions. */ |
| 209 | extern int kgdb_validate_break_address(unsigned long addr); | 210 | extern int kgdb_validate_break_address(unsigned long addr); |
| 210 | extern int kgdb_arch_set_breakpoint(unsigned long addr, char *saved_instr); | 211 | extern int kgdb_arch_set_breakpoint(struct kgdb_bkpt *bpt); |
| 211 | extern int kgdb_arch_remove_breakpoint(unsigned long addr, char *bundle); | 212 | extern int kgdb_arch_remove_breakpoint(struct kgdb_bkpt *bpt); |
| 212 | 213 | ||
| 213 | /** | 214 | /** |
| 214 | * kgdb_arch_late - Perform any architecture specific initalization. | 215 | * kgdb_arch_late - Perform any architecture specific initalization. |
diff --git a/include/linux/kmod.h b/include/linux/kmod.h index 9efeae679106..dd99c329e161 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h | |||
| @@ -110,12 +110,29 @@ call_usermodehelper(char *path, char **argv, char **envp, int wait) | |||
| 110 | 110 | ||
| 111 | extern struct ctl_table usermodehelper_table[]; | 111 | extern struct ctl_table usermodehelper_table[]; |
| 112 | 112 | ||
| 113 | enum umh_disable_depth { | ||
| 114 | UMH_ENABLED = 0, | ||
| 115 | UMH_FREEZING, | ||
| 116 | UMH_DISABLED, | ||
| 117 | }; | ||
| 118 | |||
| 113 | extern void usermodehelper_init(void); | 119 | extern void usermodehelper_init(void); |
| 114 | 120 | ||
| 115 | extern int usermodehelper_disable(void); | 121 | extern int __usermodehelper_disable(enum umh_disable_depth depth); |
| 116 | extern void usermodehelper_enable(void); | 122 | extern void __usermodehelper_set_disable_depth(enum umh_disable_depth depth); |
| 117 | extern bool usermodehelper_is_disabled(void); | 123 | |
| 118 | extern void read_lock_usermodehelper(void); | 124 | static inline int usermodehelper_disable(void) |
| 119 | extern void read_unlock_usermodehelper(void); | 125 | { |
| 126 | return __usermodehelper_disable(UMH_DISABLED); | ||
| 127 | } | ||
| 128 | |||
| 129 | static inline void usermodehelper_enable(void) | ||
| 130 | { | ||
| 131 | __usermodehelper_set_disable_depth(UMH_ENABLED); | ||
| 132 | } | ||
| 133 | |||
| 134 | extern int usermodehelper_read_trylock(void); | ||
| 135 | extern long usermodehelper_read_lock_wait(long timeout); | ||
| 136 | extern void usermodehelper_read_unlock(void); | ||
| 120 | 137 | ||
| 121 | #endif /* __LINUX_KMOD_H__ */ | 138 | #endif /* __LINUX_KMOD_H__ */ |
diff --git a/include/linux/lsm_audit.h b/include/linux/lsm_audit.h index eab507f2b1cb..fad48aab893b 100644 --- a/include/linux/lsm_audit.h +++ b/include/linux/lsm_audit.h | |||
| @@ -22,6 +22,23 @@ | |||
| 22 | #include <linux/key.h> | 22 | #include <linux/key.h> |
| 23 | #include <linux/skbuff.h> | 23 | #include <linux/skbuff.h> |
| 24 | 24 | ||
| 25 | struct lsm_network_audit { | ||
| 26 | int netif; | ||
| 27 | struct sock *sk; | ||
| 28 | u16 family; | ||
| 29 | __be16 dport; | ||
| 30 | __be16 sport; | ||
| 31 | union { | ||
| 32 | struct { | ||
| 33 | __be32 daddr; | ||
| 34 | __be32 saddr; | ||
| 35 | } v4; | ||
| 36 | struct { | ||
| 37 | struct in6_addr daddr; | ||
| 38 | struct in6_addr saddr; | ||
| 39 | } v6; | ||
| 40 | } fam; | ||
| 41 | }; | ||
| 25 | 42 | ||
| 26 | /* Auxiliary data to use in generating the audit record. */ | 43 | /* Auxiliary data to use in generating the audit record. */ |
| 27 | struct common_audit_data { | 44 | struct common_audit_data { |
| @@ -41,23 +58,7 @@ struct common_audit_data { | |||
| 41 | struct path path; | 58 | struct path path; |
| 42 | struct dentry *dentry; | 59 | struct dentry *dentry; |
| 43 | struct inode *inode; | 60 | struct inode *inode; |
| 44 | struct { | 61 | struct lsm_network_audit *net; |
| 45 | int netif; | ||
| 46 | struct sock *sk; | ||
| 47 | u16 family; | ||
| 48 | __be16 dport; | ||
| 49 | __be16 sport; | ||
| 50 | union { | ||
| 51 | struct { | ||
| 52 | __be32 daddr; | ||
| 53 | __be32 saddr; | ||
| 54 | } v4; | ||
| 55 | struct { | ||
| 56 | struct in6_addr daddr; | ||
| 57 | struct in6_addr saddr; | ||
| 58 | } v6; | ||
| 59 | } fam; | ||
| 60 | } net; | ||
| 61 | int cap; | 62 | int cap; |
| 62 | int ipc_id; | 63 | int ipc_id; |
| 63 | struct task_struct *tsk; | 64 | struct task_struct *tsk; |
| @@ -72,64 +73,15 @@ struct common_audit_data { | |||
| 72 | /* this union contains LSM specific data */ | 73 | /* this union contains LSM specific data */ |
| 73 | union { | 74 | union { |
| 74 | #ifdef CONFIG_SECURITY_SMACK | 75 | #ifdef CONFIG_SECURITY_SMACK |
| 75 | /* SMACK data */ | 76 | struct smack_audit_data *smack_audit_data; |
| 76 | struct smack_audit_data { | ||
| 77 | const char *function; | ||
| 78 | char *subject; | ||
| 79 | char *object; | ||
| 80 | char *request; | ||
| 81 | int result; | ||
| 82 | } smack_audit_data; | ||
| 83 | #endif | 77 | #endif |
| 84 | #ifdef CONFIG_SECURITY_SELINUX | 78 | #ifdef CONFIG_SECURITY_SELINUX |
| 85 | /* SELinux data */ | 79 | struct selinux_audit_data *selinux_audit_data; |
| 86 | struct { | ||
| 87 | u32 ssid; | ||
| 88 | u32 tsid; | ||
| 89 | u16 tclass; | ||
| 90 | u32 requested; | ||
| 91 | u32 audited; | ||
| 92 | u32 denied; | ||
| 93 | /* | ||
| 94 | * auditdeny is a bit tricky and unintuitive. See the | ||
| 95 | * comments in avc.c for it's meaning and usage. | ||
| 96 | */ | ||
| 97 | u32 auditdeny; | ||
| 98 | struct av_decision *avd; | ||
| 99 | int result; | ||
| 100 | } selinux_audit_data; | ||
| 101 | #endif | 80 | #endif |
| 102 | #ifdef CONFIG_SECURITY_APPARMOR | 81 | #ifdef CONFIG_SECURITY_APPARMOR |
| 103 | struct { | 82 | struct apparmor_audit_data *apparmor_audit_data; |
| 104 | int error; | ||
| 105 | int op; | ||
| 106 | int type; | ||
| 107 | void *profile; | ||
| 108 | const char *name; | ||
| 109 | const char *info; | ||
| 110 | union { | ||
| 111 | void *target; | ||
| 112 | struct { | ||
| 113 | long pos; | ||
| 114 | void *target; | ||
| 115 | } iface; | ||
| 116 | struct { | ||
| 117 | int rlim; | ||
| 118 | unsigned long max; | ||
| 119 | } rlim; | ||
| 120 | struct { | ||
| 121 | const char *target; | ||
| 122 | u32 request; | ||
| 123 | u32 denied; | ||
| 124 | uid_t ouid; | ||
| 125 | } fs; | ||
| 126 | }; | ||
| 127 | } apparmor_audit_data; | ||
| 128 | #endif | 83 | #endif |
| 129 | }; | 84 | }; /* per LSM data pointer union */ |
| 130 | /* these callback will be implemented by a specific LSM */ | ||
| 131 | void (*lsm_pre_audit)(struct audit_buffer *, void *); | ||
| 132 | void (*lsm_post_audit)(struct audit_buffer *, void *); | ||
| 133 | }; | 85 | }; |
| 134 | 86 | ||
| 135 | #define v4info fam.v4 | 87 | #define v4info fam.v4 |
| @@ -146,6 +98,8 @@ int ipv6_skb_to_auditdata(struct sk_buff *skb, | |||
| 146 | { memset((_d), 0, sizeof(struct common_audit_data)); \ | 98 | { memset((_d), 0, sizeof(struct common_audit_data)); \ |
| 147 | (_d)->type = LSM_AUDIT_DATA_##_t; } | 99 | (_d)->type = LSM_AUDIT_DATA_##_t; } |
| 148 | 100 | ||
| 149 | void common_lsm_audit(struct common_audit_data *a); | 101 | void common_lsm_audit(struct common_audit_data *a, |
| 102 | void (*pre_audit)(struct audit_buffer *, void *), | ||
| 103 | void (*post_audit)(struct audit_buffer *, void *)); | ||
| 150 | 104 | ||
| 151 | #endif | 105 | #endif |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 1f77540bdc95..5cbaa20f1659 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -2604,8 +2604,6 @@ extern void net_disable_timestamp(void); | |||
| 2604 | extern void *dev_seq_start(struct seq_file *seq, loff_t *pos); | 2604 | extern void *dev_seq_start(struct seq_file *seq, loff_t *pos); |
| 2605 | extern void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos); | 2605 | extern void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos); |
| 2606 | extern void dev_seq_stop(struct seq_file *seq, void *v); | 2606 | extern void dev_seq_stop(struct seq_file *seq, void *v); |
| 2607 | extern int dev_seq_open_ops(struct inode *inode, struct file *file, | ||
| 2608 | const struct seq_operations *ops); | ||
| 2609 | #endif | 2607 | #endif |
| 2610 | 2608 | ||
| 2611 | extern int netdev_class_create_file(struct class_attribute *class_attr); | 2609 | extern int netdev_class_create_file(struct class_attribute *class_attr); |
diff --git a/include/linux/netfilter/xt_set.h b/include/linux/netfilter/xt_set.h index c0405ac92870..e3a9978f259f 100644 --- a/include/linux/netfilter/xt_set.h +++ b/include/linux/netfilter/xt_set.h | |||
| @@ -58,8 +58,8 @@ struct xt_set_info_target_v1 { | |||
| 58 | struct xt_set_info_target_v2 { | 58 | struct xt_set_info_target_v2 { |
| 59 | struct xt_set_info add_set; | 59 | struct xt_set_info add_set; |
| 60 | struct xt_set_info del_set; | 60 | struct xt_set_info del_set; |
| 61 | u32 flags; | 61 | __u32 flags; |
| 62 | u32 timeout; | 62 | __u32 timeout; |
| 63 | }; | 63 | }; |
| 64 | 64 | ||
| 65 | #endif /*_XT_SET_H*/ | 65 | #endif /*_XT_SET_H*/ |
diff --git a/include/linux/platform_data/atmel.h b/include/linux/platform_data/atmel.h index d056263545b1..b0f2c56a8ea2 100644 --- a/include/linux/platform_data/atmel.h +++ b/include/linux/platform_data/atmel.h | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | * GPL v2 Only | 4 | * GPL v2 Only |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | #ifndef __ATMEL_NAND_H__ | 7 | #ifndef __ATMEL_H__ |
| 8 | #define __ATMEL_NAND_H__ | 8 | #define __ATMEL_H__ |
| 9 | 9 | ||
| 10 | #include <linux/mtd/nand.h> | 10 | #include <linux/mtd/nand.h> |
| 11 | 11 | ||
| @@ -24,4 +24,4 @@ struct atmel_nand_data { | |||
| 24 | unsigned int num_parts; | 24 | unsigned int num_parts; |
| 25 | }; | 25 | }; |
| 26 | 26 | ||
| 27 | #endif /* __ATMEL_NAND_H__ */ | 27 | #endif /* __ATMEL_H__ */ |
diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h index 2e9191a712f3..233149cb19f4 100644 --- a/include/linux/pm_qos.h +++ b/include/linux/pm_qos.h | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | #include <linux/notifier.h> | 8 | #include <linux/notifier.h> |
| 9 | #include <linux/miscdevice.h> | 9 | #include <linux/miscdevice.h> |
| 10 | #include <linux/device.h> | 10 | #include <linux/device.h> |
| 11 | #include <linux/workqueue.h> | ||
| 11 | 12 | ||
| 12 | enum { | 13 | enum { |
| 13 | PM_QOS_RESERVED = 0, | 14 | PM_QOS_RESERVED = 0, |
| @@ -29,6 +30,7 @@ enum { | |||
| 29 | struct pm_qos_request { | 30 | struct pm_qos_request { |
| 30 | struct plist_node node; | 31 | struct plist_node node; |
| 31 | int pm_qos_class; | 32 | int pm_qos_class; |
| 33 | struct delayed_work work; /* for pm_qos_update_request_timeout */ | ||
| 32 | }; | 34 | }; |
| 33 | 35 | ||
| 34 | struct dev_pm_qos_request { | 36 | struct dev_pm_qos_request { |
| @@ -73,6 +75,8 @@ void pm_qos_add_request(struct pm_qos_request *req, int pm_qos_class, | |||
| 73 | s32 value); | 75 | s32 value); |
| 74 | void pm_qos_update_request(struct pm_qos_request *req, | 76 | void pm_qos_update_request(struct pm_qos_request *req, |
| 75 | s32 new_value); | 77 | s32 new_value); |
| 78 | void pm_qos_update_request_timeout(struct pm_qos_request *req, | ||
| 79 | s32 new_value, unsigned long timeout_us); | ||
| 76 | void pm_qos_remove_request(struct pm_qos_request *req); | 80 | void pm_qos_remove_request(struct pm_qos_request *req); |
| 77 | 81 | ||
| 78 | int pm_qos_request(int pm_qos_class); | 82 | int pm_qos_request(int pm_qos_class); |
diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h index 7abb16093312..b02108446be7 100644 --- a/include/linux/regulator/machine.h +++ b/include/linux/regulator/machine.h | |||
| @@ -71,7 +71,7 @@ struct regulator_state { | |||
| 71 | * @uV_offset: Offset applied to voltages from consumer to compensate for | 71 | * @uV_offset: Offset applied to voltages from consumer to compensate for |
| 72 | * voltage drops. | 72 | * voltage drops. |
| 73 | * | 73 | * |
| 74 | * @min_uA: Smallest consumers consumers may set. | 74 | * @min_uA: Smallest current consumers may set. |
| 75 | * @max_uA: Largest current consumers may set. | 75 | * @max_uA: Largest current consumers may set. |
| 76 | * | 76 | * |
| 77 | * @valid_modes_mask: Mask of modes which may be configured by consumers. | 77 | * @valid_modes_mask: Mask of modes which may be configured by consumers. |
| @@ -134,10 +134,8 @@ struct regulation_constraints { | |||
| 134 | /** | 134 | /** |
| 135 | * struct regulator_consumer_supply - supply -> device mapping | 135 | * struct regulator_consumer_supply - supply -> device mapping |
| 136 | * | 136 | * |
| 137 | * This maps a supply name to a device. Only one of dev or dev_name | 137 | * This maps a supply name to a device. Use of dev_name allows support for |
| 138 | * can be specified. Use of dev_name allows support for buses which | 138 | * buses which make struct device available late such as I2C. |
| 139 | * make struct device available late such as I2C and is the preferred | ||
| 140 | * form. | ||
| 141 | * | 139 | * |
| 142 | * @dev_name: Result of dev_name() for the consumer. | 140 | * @dev_name: Result of dev_name() for the consumer. |
| 143 | * @supply: Name for the supply. | 141 | * @supply: Name for the supply. |
diff --git a/include/linux/socket.h b/include/linux/socket.h index da2d3e2543f3..b84bbd48b874 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
| @@ -265,7 +265,7 @@ struct ucred { | |||
| 265 | #define MSG_NOSIGNAL 0x4000 /* Do not generate SIGPIPE */ | 265 | #define MSG_NOSIGNAL 0x4000 /* Do not generate SIGPIPE */ |
| 266 | #define MSG_MORE 0x8000 /* Sender will send more */ | 266 | #define MSG_MORE 0x8000 /* Sender will send more */ |
| 267 | #define MSG_WAITFORONE 0x10000 /* recvmmsg(): block until 1+ packets avail */ | 267 | #define MSG_WAITFORONE 0x10000 /* recvmmsg(): block until 1+ packets avail */ |
| 268 | 268 | #define MSG_SENDPAGE_NOTLAST 0x20000 /* sendpage() internal : not the last page */ | |
| 269 | #define MSG_EOF MSG_FIN | 269 | #define MSG_EOF MSG_FIN |
| 270 | 270 | ||
| 271 | #define MSG_CMSG_CLOEXEC 0x40000000 /* Set close_on_exit for file | 271 | #define MSG_CMSG_CLOEXEC 0x40000000 /* Set close_on_exit for file |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 8dc0ea7caf02..b1fd5c7925fe 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
| @@ -305,6 +305,13 @@ static inline int mem_cgroup_swappiness(struct mem_cgroup *mem) | |||
| 305 | return vm_swappiness; | 305 | return vm_swappiness; |
| 306 | } | 306 | } |
| 307 | #endif | 307 | #endif |
| 308 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP | ||
| 309 | extern void mem_cgroup_uncharge_swap(swp_entry_t ent); | ||
| 310 | #else | ||
| 311 | static inline void mem_cgroup_uncharge_swap(swp_entry_t ent) | ||
| 312 | { | ||
| 313 | } | ||
| 314 | #endif | ||
| 308 | #ifdef CONFIG_SWAP | 315 | #ifdef CONFIG_SWAP |
| 309 | /* linux/mm/page_io.c */ | 316 | /* linux/mm/page_io.c */ |
| 310 | extern int swap_readpage(struct page *); | 317 | extern int swap_readpage(struct page *); |
| @@ -375,13 +382,6 @@ mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout) | |||
| 375 | { | 382 | { |
| 376 | } | 383 | } |
| 377 | #endif | 384 | #endif |
| 378 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP | ||
| 379 | extern void mem_cgroup_uncharge_swap(swp_entry_t ent); | ||
| 380 | #else | ||
| 381 | static inline void mem_cgroup_uncharge_swap(swp_entry_t ent) | ||
| 382 | { | ||
| 383 | } | ||
| 384 | #endif | ||
| 385 | 385 | ||
| 386 | #else /* CONFIG_SWAP */ | 386 | #else /* CONFIG_SWAP */ |
| 387 | 387 | ||
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 248fb05feb63..83d800c31e3c 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
| @@ -620,8 +620,10 @@ struct sta_bss_parameters { | |||
| 620 | * @llid: mesh local link id | 620 | * @llid: mesh local link id |
| 621 | * @plid: mesh peer link id | 621 | * @plid: mesh peer link id |
| 622 | * @plink_state: mesh peer link state | 622 | * @plink_state: mesh peer link state |
| 623 | * @signal: signal strength of last received packet in dBm | 623 | * @signal: the signal strength, type depends on the wiphy's signal_type |
| 624 | * @signal_avg: signal strength average in dBm | 624 | NOTE: For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_. |
| 625 | * @signal_avg: avg signal strength, type depends on the wiphy's signal_type | ||
| 626 | NOTE: For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_. | ||
| 625 | * @txrate: current unicast bitrate from this station | 627 | * @txrate: current unicast bitrate from this station |
| 626 | * @rxrate: current unicast bitrate to this station | 628 | * @rxrate: current unicast bitrate to this station |
| 627 | * @rx_packets: packets received from this station | 629 | * @rx_packets: packets received from this station |
diff --git a/include/net/netfilter/xt_log.h b/include/net/netfilter/xt_log.h index 7e1544e8f70d..9d9756cca013 100644 --- a/include/net/netfilter/xt_log.h +++ b/include/net/netfilter/xt_log.h | |||
| @@ -47,7 +47,7 @@ static void sb_close(struct sbuff *m) | |||
| 47 | if (likely(m != &emergency)) | 47 | if (likely(m != &emergency)) |
| 48 | kfree(m); | 48 | kfree(m); |
| 49 | else { | 49 | else { |
| 50 | xchg(&emergency_ptr, m); | 50 | emergency_ptr = m; |
| 51 | local_bh_enable(); | 51 | local_bh_enable(); |
| 52 | } | 52 | } |
| 53 | } | 53 | } |
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index fbc7b1ad929b..ea7a2035456d 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h | |||
| @@ -295,7 +295,7 @@ TRACE_EVENT(sched_process_exec, | |||
| 295 | TP_fast_assign( | 295 | TP_fast_assign( |
| 296 | __assign_str(filename, bprm->filename); | 296 | __assign_str(filename, bprm->filename); |
| 297 | __entry->pid = p->pid; | 297 | __entry->pid = p->pid; |
| 298 | __entry->old_pid = p->pid; | 298 | __entry->old_pid = old_pid; |
| 299 | ), | 299 | ), |
| 300 | 300 | ||
| 301 | TP_printk("filename=%s pid=%d old_pid=%d", __get_str(filename), | 301 | TP_printk("filename=%s pid=%d old_pid=%d", __get_str(filename), |
diff --git a/include/xen/swiotlb-xen.h b/include/xen/swiotlb-xen.h index 2ea2fdc79c16..4f4d449f00f6 100644 --- a/include/xen/swiotlb-xen.h +++ b/include/xen/swiotlb-xen.h | |||
| @@ -7,11 +7,13 @@ extern void xen_swiotlb_init(int verbose); | |||
| 7 | 7 | ||
| 8 | extern void | 8 | extern void |
| 9 | *xen_swiotlb_alloc_coherent(struct device *hwdev, size_t size, | 9 | *xen_swiotlb_alloc_coherent(struct device *hwdev, size_t size, |
| 10 | dma_addr_t *dma_handle, gfp_t flags); | 10 | dma_addr_t *dma_handle, gfp_t flags, |
| 11 | struct dma_attrs *attrs); | ||
| 11 | 12 | ||
| 12 | extern void | 13 | extern void |
| 13 | xen_swiotlb_free_coherent(struct device *hwdev, size_t size, | 14 | xen_swiotlb_free_coherent(struct device *hwdev, size_t size, |
| 14 | void *vaddr, dma_addr_t dma_handle); | 15 | void *vaddr, dma_addr_t dma_handle, |
| 16 | struct dma_attrs *attrs); | ||
| 15 | 17 | ||
| 16 | extern dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page, | 18 | extern dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page, |
| 17 | unsigned long offset, size_t size, | 19 | unsigned long offset, size_t size, |
