diff options
Diffstat (limited to 'include')
84 files changed, 1084 insertions, 302 deletions
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index eba66043cf1b..e8bcc4742e0e 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
@@ -499,9 +499,10 @@ typedef u64 acpi_integer; | |||
499 | #define ACPI_STATE_D0 (u8) 0 | 499 | #define ACPI_STATE_D0 (u8) 0 |
500 | #define ACPI_STATE_D1 (u8) 1 | 500 | #define ACPI_STATE_D1 (u8) 1 |
501 | #define ACPI_STATE_D2 (u8) 2 | 501 | #define ACPI_STATE_D2 (u8) 2 |
502 | #define ACPI_STATE_D3 (u8) 3 | 502 | #define ACPI_STATE_D3_HOT (u8) 3 |
503 | #define ACPI_STATE_D3_COLD (u8) 4 | 503 | #define ACPI_STATE_D3 (u8) 4 |
504 | #define ACPI_D_STATES_MAX ACPI_STATE_D3_COLD | 504 | #define ACPI_STATE_D3_COLD ACPI_STATE_D3 |
505 | #define ACPI_D_STATES_MAX ACPI_STATE_D3 | ||
505 | #define ACPI_D_STATE_COUNT 5 | 506 | #define ACPI_D_STATE_COUNT 5 |
506 | 507 | ||
507 | #define ACPI_STATE_C0 (u8) 0 | 508 | #define ACPI_STATE_C0 (u8) 0 |
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/asm-generic/siginfo.h b/include/asm-generic/siginfo.h index 0dd4e87f6fba..5e5e3865f1ed 100644 --- a/include/asm-generic/siginfo.h +++ b/include/asm-generic/siginfo.h | |||
@@ -35,6 +35,14 @@ typedef union sigval { | |||
35 | #define __ARCH_SI_BAND_T long | 35 | #define __ARCH_SI_BAND_T long |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | #ifndef __ARCH_SI_CLOCK_T | ||
39 | #define __ARCH_SI_CLOCK_T __kernel_clock_t | ||
40 | #endif | ||
41 | |||
42 | #ifndef __ARCH_SI_ATTRIBUTES | ||
43 | #define __ARCH_SI_ATTRIBUTES | ||
44 | #endif | ||
45 | |||
38 | #ifndef HAVE_ARCH_SIGINFO_T | 46 | #ifndef HAVE_ARCH_SIGINFO_T |
39 | 47 | ||
40 | typedef struct siginfo { | 48 | typedef struct siginfo { |
@@ -72,8 +80,8 @@ typedef struct siginfo { | |||
72 | __kernel_pid_t _pid; /* which child */ | 80 | __kernel_pid_t _pid; /* which child */ |
73 | __ARCH_SI_UID_T _uid; /* sender's uid */ | 81 | __ARCH_SI_UID_T _uid; /* sender's uid */ |
74 | int _status; /* exit code */ | 82 | int _status; /* exit code */ |
75 | __kernel_clock_t _utime; | 83 | __ARCH_SI_CLOCK_T _utime; |
76 | __kernel_clock_t _stime; | 84 | __ARCH_SI_CLOCK_T _stime; |
77 | } _sigchld; | 85 | } _sigchld; |
78 | 86 | ||
79 | /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ | 87 | /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ |
@@ -91,7 +99,7 @@ typedef struct siginfo { | |||
91 | int _fd; | 99 | int _fd; |
92 | } _sigpoll; | 100 | } _sigpoll; |
93 | } _sifields; | 101 | } _sifields; |
94 | } siginfo_t; | 102 | } __ARCH_SI_ATTRIBUTES siginfo_t; |
95 | 103 | ||
96 | #endif | 104 | #endif |
97 | 105 | ||
diff --git a/include/asm-generic/statfs.h b/include/asm-generic/statfs.h index 0fd28e028de1..c749af9c0983 100644 --- a/include/asm-generic/statfs.h +++ b/include/asm-generic/statfs.h | |||
@@ -15,7 +15,7 @@ typedef __kernel_fsid_t fsid_t; | |||
15 | * with a 10' pole. | 15 | * with a 10' pole. |
16 | */ | 16 | */ |
17 | #ifndef __statfs_word | 17 | #ifndef __statfs_word |
18 | #if BITS_PER_LONG == 64 | 18 | #if __BITS_PER_LONG == 64 |
19 | #define __statfs_word long | 19 | #define __statfs_word long |
20 | #else | 20 | #else |
21 | #define __statfs_word __u32 | 21 | #define __statfs_word __u32 |
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/exynos_drm.h b/include/drm/exynos_drm.h index 3963116083ae..e478de4e5d56 100644 --- a/include/drm/exynos_drm.h +++ b/include/drm/exynos_drm.h | |||
@@ -85,7 +85,7 @@ struct drm_exynos_gem_mmap { | |||
85 | struct drm_exynos_vidi_connection { | 85 | struct drm_exynos_vidi_connection { |
86 | unsigned int connection; | 86 | unsigned int connection; |
87 | unsigned int extensions; | 87 | unsigned int extensions; |
88 | uint64_t *edid; | 88 | uint64_t edid; |
89 | }; | 89 | }; |
90 | 90 | ||
91 | struct drm_exynos_plane_set_zpos { | 91 | struct drm_exynos_plane_set_zpos { |
@@ -96,7 +96,8 @@ struct drm_exynos_plane_set_zpos { | |||
96 | /* memory type definitions. */ | 96 | /* memory type definitions. */ |
97 | enum e_drm_exynos_gem_mem_type { | 97 | enum e_drm_exynos_gem_mem_type { |
98 | /* Physically Non-Continuous memory. */ | 98 | /* Physically Non-Continuous memory. */ |
99 | EXYNOS_BO_NONCONTIG = 1 << 0 | 99 | EXYNOS_BO_NONCONTIG = 1 << 0, |
100 | EXYNOS_BO_MASK = EXYNOS_BO_NONCONTIG | ||
100 | }; | 101 | }; |
101 | 102 | ||
102 | #define DRM_EXYNOS_GEM_CREATE 0x00 | 103 | #define DRM_EXYNOS_GEM_CREATE 0x00 |
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/amba/bus.h b/include/linux/amba/bus.h index 7847e197730a..8d54f79457ba 100644 --- a/include/linux/amba/bus.h +++ b/include/linux/amba/bus.h | |||
@@ -30,7 +30,6 @@ struct amba_device { | |||
30 | struct device dev; | 30 | struct device dev; |
31 | struct resource res; | 31 | struct resource res; |
32 | struct clk *pclk; | 32 | struct clk *pclk; |
33 | struct regulator *vcore; | ||
34 | u64 dma_mask; | 33 | u64 dma_mask; |
35 | unsigned int periphid; | 34 | unsigned int periphid; |
36 | unsigned int irq[AMBA_NR_IRQS]; | 35 | unsigned int irq[AMBA_NR_IRQS]; |
@@ -75,12 +74,6 @@ void amba_release_regions(struct amba_device *); | |||
75 | #define amba_pclk_disable(d) \ | 74 | #define amba_pclk_disable(d) \ |
76 | do { if (!IS_ERR((d)->pclk)) clk_disable((d)->pclk); } while (0) | 75 | do { if (!IS_ERR((d)->pclk)) clk_disable((d)->pclk); } while (0) |
77 | 76 | ||
78 | #define amba_vcore_enable(d) \ | ||
79 | (IS_ERR((d)->vcore) ? 0 : regulator_enable((d)->vcore)) | ||
80 | |||
81 | #define amba_vcore_disable(d) \ | ||
82 | do { if (!IS_ERR((d)->vcore)) regulator_disable((d)->vcore); } while (0) | ||
83 | |||
84 | /* Some drivers don't use the struct amba_device */ | 77 | /* Some drivers don't use the struct amba_device */ |
85 | #define AMBA_CONFIG_BITS(a) (((a) >> 24) & 0xff) | 78 | #define AMBA_CONFIG_BITS(a) (((a) >> 24) & 0xff) |
86 | #define AMBA_REV_BITS(a) (((a) >> 20) & 0x0f) | 79 | #define AMBA_REV_BITS(a) (((a) >> 20) & 0x0f) |
diff --git a/include/linux/amba/pl022.h b/include/linux/amba/pl022.h index b8c51124ed19..76dd1b199a1b 100644 --- a/include/linux/amba/pl022.h +++ b/include/linux/amba/pl022.h | |||
@@ -25,6 +25,8 @@ | |||
25 | #ifndef _SSP_PL022_H | 25 | #ifndef _SSP_PL022_H |
26 | #define _SSP_PL022_H | 26 | #define _SSP_PL022_H |
27 | 27 | ||
28 | #include <linux/types.h> | ||
29 | |||
28 | /** | 30 | /** |
29 | * whether SSP is in loopback mode or not | 31 | * whether SSP is in loopback mode or not |
30 | */ | 32 | */ |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 606cf339bb56..2aa24664a5b5 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -426,14 +426,10 @@ struct request_queue { | |||
426 | (1 << QUEUE_FLAG_SAME_COMP) | \ | 426 | (1 << QUEUE_FLAG_SAME_COMP) | \ |
427 | (1 << QUEUE_FLAG_ADD_RANDOM)) | 427 | (1 << QUEUE_FLAG_ADD_RANDOM)) |
428 | 428 | ||
429 | static inline int queue_is_locked(struct request_queue *q) | 429 | static inline void queue_lockdep_assert_held(struct request_queue *q) |
430 | { | 430 | { |
431 | #ifdef CONFIG_SMP | 431 | if (q->queue_lock) |
432 | spinlock_t *lock = q->queue_lock; | 432 | lockdep_assert_held(q->queue_lock); |
433 | return lock && spin_is_locked(lock); | ||
434 | #else | ||
435 | return 1; | ||
436 | #endif | ||
437 | } | 433 | } |
438 | 434 | ||
439 | static inline void queue_flag_set_unlocked(unsigned int flag, | 435 | static inline void queue_flag_set_unlocked(unsigned int flag, |
@@ -445,7 +441,7 @@ static inline void queue_flag_set_unlocked(unsigned int flag, | |||
445 | static inline int queue_flag_test_and_clear(unsigned int flag, | 441 | static inline int queue_flag_test_and_clear(unsigned int flag, |
446 | struct request_queue *q) | 442 | struct request_queue *q) |
447 | { | 443 | { |
448 | WARN_ON_ONCE(!queue_is_locked(q)); | 444 | queue_lockdep_assert_held(q); |
449 | 445 | ||
450 | if (test_bit(flag, &q->queue_flags)) { | 446 | if (test_bit(flag, &q->queue_flags)) { |
451 | __clear_bit(flag, &q->queue_flags); | 447 | __clear_bit(flag, &q->queue_flags); |
@@ -458,7 +454,7 @@ static inline int queue_flag_test_and_clear(unsigned int flag, | |||
458 | static inline int queue_flag_test_and_set(unsigned int flag, | 454 | static inline int queue_flag_test_and_set(unsigned int flag, |
459 | struct request_queue *q) | 455 | struct request_queue *q) |
460 | { | 456 | { |
461 | WARN_ON_ONCE(!queue_is_locked(q)); | 457 | queue_lockdep_assert_held(q); |
462 | 458 | ||
463 | if (!test_bit(flag, &q->queue_flags)) { | 459 | if (!test_bit(flag, &q->queue_flags)) { |
464 | __set_bit(flag, &q->queue_flags); | 460 | __set_bit(flag, &q->queue_flags); |
@@ -470,7 +466,7 @@ static inline int queue_flag_test_and_set(unsigned int flag, | |||
470 | 466 | ||
471 | static inline void queue_flag_set(unsigned int flag, struct request_queue *q) | 467 | static inline void queue_flag_set(unsigned int flag, struct request_queue *q) |
472 | { | 468 | { |
473 | WARN_ON_ONCE(!queue_is_locked(q)); | 469 | queue_lockdep_assert_held(q); |
474 | __set_bit(flag, &q->queue_flags); | 470 | __set_bit(flag, &q->queue_flags); |
475 | } | 471 | } |
476 | 472 | ||
@@ -487,7 +483,7 @@ static inline int queue_in_flight(struct request_queue *q) | |||
487 | 483 | ||
488 | static inline void queue_flag_clear(unsigned int flag, struct request_queue *q) | 484 | static inline void queue_flag_clear(unsigned int flag, struct request_queue *q) |
489 | { | 485 | { |
490 | WARN_ON_ONCE(!queue_is_locked(q)); | 486 | queue_lockdep_assert_held(q); |
491 | __clear_bit(flag, &q->queue_flags); | 487 | __clear_bit(flag, &q->queue_flags); |
492 | } | 488 | } |
493 | 489 | ||
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/dmaengine.h b/include/linux/dmaengine.h index 676f967390ae..f9a2e5e67a54 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -974,6 +974,7 @@ int dma_async_device_register(struct dma_device *device); | |||
974 | void dma_async_device_unregister(struct dma_device *device); | 974 | void dma_async_device_unregister(struct dma_device *device); |
975 | void dma_run_dependencies(struct dma_async_tx_descriptor *tx); | 975 | void dma_run_dependencies(struct dma_async_tx_descriptor *tx); |
976 | struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type); | 976 | struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type); |
977 | struct dma_chan *net_dma_find_channel(void); | ||
977 | #define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y) | 978 | #define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y) |
978 | 979 | ||
979 | /* --- Helper iov-locking functions --- */ | 980 | /* --- Helper iov-locking functions --- */ |
diff --git a/include/linux/efi.h b/include/linux/efi.h index 88ec80670d5f..ec45ccd8708a 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
@@ -554,7 +554,18 @@ extern int __init efi_setup_pcdp_console(char *); | |||
554 | #define EFI_VARIABLE_NON_VOLATILE 0x0000000000000001 | 554 | #define EFI_VARIABLE_NON_VOLATILE 0x0000000000000001 |
555 | #define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x0000000000000002 | 555 | #define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x0000000000000002 |
556 | #define EFI_VARIABLE_RUNTIME_ACCESS 0x0000000000000004 | 556 | #define EFI_VARIABLE_RUNTIME_ACCESS 0x0000000000000004 |
557 | 557 | #define EFI_VARIABLE_HARDWARE_ERROR_RECORD 0x0000000000000008 | |
558 | #define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 0x0000000000000010 | ||
559 | #define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS 0x0000000000000020 | ||
560 | #define EFI_VARIABLE_APPEND_WRITE 0x0000000000000040 | ||
561 | |||
562 | #define EFI_VARIABLE_MASK (EFI_VARIABLE_NON_VOLATILE | \ | ||
563 | EFI_VARIABLE_BOOTSERVICE_ACCESS | \ | ||
564 | EFI_VARIABLE_RUNTIME_ACCESS | \ | ||
565 | EFI_VARIABLE_HARDWARE_ERROR_RECORD | \ | ||
566 | EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS | \ | ||
567 | EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS | \ | ||
568 | EFI_VARIABLE_APPEND_WRITE) | ||
558 | /* | 569 | /* |
559 | * The type of search to perform when calling boottime->locate_handle | 570 | * The type of search to perform when calling boottime->locate_handle |
560 | */ | 571 | */ |
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/fuse.h b/include/linux/fuse.h index 8ba2c9460b28..8f2ab8fef929 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h | |||
@@ -593,7 +593,7 @@ struct fuse_dirent { | |||
593 | __u64 off; | 593 | __u64 off; |
594 | __u32 namelen; | 594 | __u32 namelen; |
595 | __u32 type; | 595 | __u32 type; |
596 | char name[0]; | 596 | char name[]; |
597 | }; | 597 | }; |
598 | 598 | ||
599 | #define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name) | 599 | #define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name) |
diff --git a/include/linux/gpio-pxa.h b/include/linux/gpio-pxa.h index 05071ee34c3f..d755b28ba635 100644 --- a/include/linux/gpio-pxa.h +++ b/include/linux/gpio-pxa.h | |||
@@ -13,4 +13,8 @@ extern int pxa_last_gpio; | |||
13 | 13 | ||
14 | extern int pxa_irq_to_gpio(int irq); | 14 | extern int pxa_irq_to_gpio(int irq); |
15 | 15 | ||
16 | struct pxa_gpio_platform_data { | ||
17 | int (*gpio_set_wake)(unsigned int gpio, unsigned int on); | ||
18 | }; | ||
19 | |||
16 | #endif /* __GPIO_PXA_H */ | 20 | #endif /* __GPIO_PXA_H */ |
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..56fae865e272 --- /dev/null +++ b/include/linux/hsi/hsi.h | |||
@@ -0,0 +1,413 @@ | |||
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/list.h> | ||
30 | #include <linux/module.h> | ||
31 | #include <linux/notifier.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 | * @e_handler: Callback for handling port events (RX Wake High/Low) | ||
125 | * @pclaimed: Keeps tracks if the clients claimed its associated HSI port | ||
126 | * @nb: Notifier block for port events | ||
127 | */ | ||
128 | struct hsi_client { | ||
129 | struct device device; | ||
130 | struct hsi_config tx_cfg; | ||
131 | struct hsi_config rx_cfg; | ||
132 | /* private: */ | ||
133 | void (*ehandler)(struct hsi_client *, unsigned long); | ||
134 | unsigned int pclaimed:1; | ||
135 | struct notifier_block nb; | ||
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 | int hsi_register_port_event(struct hsi_client *cl, | ||
151 | void (*handler)(struct hsi_client *, unsigned long)); | ||
152 | int hsi_unregister_port_event(struct hsi_client *cl); | ||
153 | |||
154 | /** | ||
155 | * struct hsi_client_driver - Driver associated to an HSI client | ||
156 | * @driver: Driver model representation of the driver | ||
157 | */ | ||
158 | struct hsi_client_driver { | ||
159 | struct device_driver driver; | ||
160 | }; | ||
161 | |||
162 | #define to_hsi_client_driver(drv) container_of(drv, struct hsi_client_driver,\ | ||
163 | driver) | ||
164 | |||
165 | int hsi_register_client_driver(struct hsi_client_driver *drv); | ||
166 | |||
167 | static inline void hsi_unregister_client_driver(struct hsi_client_driver *drv) | ||
168 | { | ||
169 | driver_unregister(&drv->driver); | ||
170 | } | ||
171 | |||
172 | /** | ||
173 | * struct hsi_msg - HSI message descriptor | ||
174 | * @link: Free to use by the current descriptor owner | ||
175 | * @cl: HSI device client that issues the transfer | ||
176 | * @sgt: Head of the scatterlist array | ||
177 | * @context: Client context data associated to the transfer | ||
178 | * @complete: Transfer completion callback | ||
179 | * @destructor: Destructor to free resources when flushing | ||
180 | * @status: Status of the transfer when completed | ||
181 | * @actual_len: Actual length of data transfered on completion | ||
182 | * @channel: Channel were to TX/RX the message | ||
183 | * @ttype: Transfer type (TX if set, RX otherwise) | ||
184 | * @break_frame: if true HSI will send/receive a break frame. Data buffers are | ||
185 | * ignored in the request. | ||
186 | */ | ||
187 | struct hsi_msg { | ||
188 | struct list_head link; | ||
189 | struct hsi_client *cl; | ||
190 | struct sg_table sgt; | ||
191 | void *context; | ||
192 | |||
193 | void (*complete)(struct hsi_msg *msg); | ||
194 | void (*destructor)(struct hsi_msg *msg); | ||
195 | |||
196 | int status; | ||
197 | unsigned int actual_len; | ||
198 | unsigned int channel; | ||
199 | unsigned int ttype:1; | ||
200 | unsigned int break_frame:1; | ||
201 | }; | ||
202 | |||
203 | struct hsi_msg *hsi_alloc_msg(unsigned int n_frag, gfp_t flags); | ||
204 | void hsi_free_msg(struct hsi_msg *msg); | ||
205 | |||
206 | /** | ||
207 | * struct hsi_port - HSI port device | ||
208 | * @device: Driver model representation of the device | ||
209 | * @tx_cfg: Current TX path configuration | ||
210 | * @rx_cfg: Current RX path configuration | ||
211 | * @num: Port number | ||
212 | * @shared: Set when port can be shared by different clients | ||
213 | * @claimed: Reference count of clients which claimed the port | ||
214 | * @lock: Serialize port claim | ||
215 | * @async: Asynchronous transfer callback | ||
216 | * @setup: Callback to set the HSI client configuration | ||
217 | * @flush: Callback to clean the HW state and destroy all pending transfers | ||
218 | * @start_tx: Callback to inform that a client wants to TX data | ||
219 | * @stop_tx: Callback to inform that a client no longer wishes to TX data | ||
220 | * @release: Callback to inform that a client no longer uses the port | ||
221 | * @n_head: Notifier chain for signaling port events to the clients. | ||
222 | */ | ||
223 | struct hsi_port { | ||
224 | struct device device; | ||
225 | struct hsi_config tx_cfg; | ||
226 | struct hsi_config rx_cfg; | ||
227 | unsigned int num; | ||
228 | unsigned int shared:1; | ||
229 | int claimed; | ||
230 | struct mutex lock; | ||
231 | int (*async)(struct hsi_msg *msg); | ||
232 | int (*setup)(struct hsi_client *cl); | ||
233 | int (*flush)(struct hsi_client *cl); | ||
234 | int (*start_tx)(struct hsi_client *cl); | ||
235 | int (*stop_tx)(struct hsi_client *cl); | ||
236 | int (*release)(struct hsi_client *cl); | ||
237 | /* private */ | ||
238 | struct atomic_notifier_head n_head; | ||
239 | }; | ||
240 | |||
241 | #define to_hsi_port(dev) container_of(dev, struct hsi_port, device) | ||
242 | #define hsi_get_port(cl) to_hsi_port((cl)->device.parent) | ||
243 | |||
244 | int hsi_event(struct hsi_port *port, unsigned long event); | ||
245 | int hsi_claim_port(struct hsi_client *cl, unsigned int share); | ||
246 | void hsi_release_port(struct hsi_client *cl); | ||
247 | |||
248 | static inline int hsi_port_claimed(struct hsi_client *cl) | ||
249 | { | ||
250 | return cl->pclaimed; | ||
251 | } | ||
252 | |||
253 | static inline void hsi_port_set_drvdata(struct hsi_port *port, void *data) | ||
254 | { | ||
255 | dev_set_drvdata(&port->device, data); | ||
256 | } | ||
257 | |||
258 | static inline void *hsi_port_drvdata(struct hsi_port *port) | ||
259 | { | ||
260 | return dev_get_drvdata(&port->device); | ||
261 | } | ||
262 | |||
263 | /** | ||
264 | * struct hsi_controller - HSI controller device | ||
265 | * @device: Driver model representation of the device | ||
266 | * @owner: Pointer to the module owning the controller | ||
267 | * @id: HSI controller ID | ||
268 | * @num_ports: Number of ports in the HSI controller | ||
269 | * @port: Array of HSI ports | ||
270 | */ | ||
271 | struct hsi_controller { | ||
272 | struct device device; | ||
273 | struct module *owner; | ||
274 | unsigned int id; | ||
275 | unsigned int num_ports; | ||
276 | struct hsi_port **port; | ||
277 | }; | ||
278 | |||
279 | #define to_hsi_controller(dev) container_of(dev, struct hsi_controller, device) | ||
280 | |||
281 | struct hsi_controller *hsi_alloc_controller(unsigned int n_ports, gfp_t flags); | ||
282 | void hsi_put_controller(struct hsi_controller *hsi); | ||
283 | int hsi_register_controller(struct hsi_controller *hsi); | ||
284 | void hsi_unregister_controller(struct hsi_controller *hsi); | ||
285 | |||
286 | static inline void hsi_controller_set_drvdata(struct hsi_controller *hsi, | ||
287 | void *data) | ||
288 | { | ||
289 | dev_set_drvdata(&hsi->device, data); | ||
290 | } | ||
291 | |||
292 | static inline void *hsi_controller_drvdata(struct hsi_controller *hsi) | ||
293 | { | ||
294 | return dev_get_drvdata(&hsi->device); | ||
295 | } | ||
296 | |||
297 | static inline struct hsi_port *hsi_find_port_num(struct hsi_controller *hsi, | ||
298 | unsigned int num) | ||
299 | { | ||
300 | return (num < hsi->num_ports) ? hsi->port[num] : NULL; | ||
301 | } | ||
302 | |||
303 | /* | ||
304 | * API for HSI clients | ||
305 | */ | ||
306 | int hsi_async(struct hsi_client *cl, struct hsi_msg *msg); | ||
307 | |||
308 | /** | ||
309 | * hsi_id - Get HSI controller ID associated to a client | ||
310 | * @cl: Pointer to a HSI client | ||
311 | * | ||
312 | * Return the controller id where the client is attached to | ||
313 | */ | ||
314 | static inline unsigned int hsi_id(struct hsi_client *cl) | ||
315 | { | ||
316 | return to_hsi_controller(cl->device.parent->parent)->id; | ||
317 | } | ||
318 | |||
319 | /** | ||
320 | * hsi_port_id - Gets the port number a client is attached to | ||
321 | * @cl: Pointer to HSI client | ||
322 | * | ||
323 | * Return the port number associated to the client | ||
324 | */ | ||
325 | static inline unsigned int hsi_port_id(struct hsi_client *cl) | ||
326 | { | ||
327 | return to_hsi_port(cl->device.parent)->num; | ||
328 | } | ||
329 | |||
330 | /** | ||
331 | * hsi_setup - Configure the client's port | ||
332 | * @cl: Pointer to the HSI client | ||
333 | * | ||
334 | * When sharing ports, clients should either relay on a single | ||
335 | * client setup or have the same setup for all of them. | ||
336 | * | ||
337 | * Return -errno on failure, 0 on success | ||
338 | */ | ||
339 | static inline int hsi_setup(struct hsi_client *cl) | ||
340 | { | ||
341 | if (!hsi_port_claimed(cl)) | ||
342 | return -EACCES; | ||
343 | return hsi_get_port(cl)->setup(cl); | ||
344 | } | ||
345 | |||
346 | /** | ||
347 | * hsi_flush - Flush all pending transactions on the client's port | ||
348 | * @cl: Pointer to the HSI client | ||
349 | * | ||
350 | * This function will destroy all pending hsi_msg in the port and reset | ||
351 | * the HW port so it is ready to receive and transmit from a clean state. | ||
352 | * | ||
353 | * Return -errno on failure, 0 on success | ||
354 | */ | ||
355 | static inline int hsi_flush(struct hsi_client *cl) | ||
356 | { | ||
357 | if (!hsi_port_claimed(cl)) | ||
358 | return -EACCES; | ||
359 | return hsi_get_port(cl)->flush(cl); | ||
360 | } | ||
361 | |||
362 | /** | ||
363 | * hsi_async_read - Submit a read transfer | ||
364 | * @cl: Pointer to the HSI client | ||
365 | * @msg: HSI message descriptor of the transfer | ||
366 | * | ||
367 | * Return -errno on failure, 0 on success | ||
368 | */ | ||
369 | static inline int hsi_async_read(struct hsi_client *cl, struct hsi_msg *msg) | ||
370 | { | ||
371 | msg->ttype = HSI_MSG_READ; | ||
372 | return hsi_async(cl, msg); | ||
373 | } | ||
374 | |||
375 | /** | ||
376 | * hsi_async_write - Submit a write transfer | ||
377 | * @cl: Pointer to the HSI client | ||
378 | * @msg: HSI message descriptor of the transfer | ||
379 | * | ||
380 | * Return -errno on failure, 0 on success | ||
381 | */ | ||
382 | static inline int hsi_async_write(struct hsi_client *cl, struct hsi_msg *msg) | ||
383 | { | ||
384 | msg->ttype = HSI_MSG_WRITE; | ||
385 | return hsi_async(cl, msg); | ||
386 | } | ||
387 | |||
388 | /** | ||
389 | * hsi_start_tx - Signal the port that the client wants to start a TX | ||
390 | * @cl: Pointer to the HSI client | ||
391 | * | ||
392 | * Return -errno on failure, 0 on success | ||
393 | */ | ||
394 | static inline int hsi_start_tx(struct hsi_client *cl) | ||
395 | { | ||
396 | if (!hsi_port_claimed(cl)) | ||
397 | return -EACCES; | ||
398 | return hsi_get_port(cl)->start_tx(cl); | ||
399 | } | ||
400 | |||
401 | /** | ||
402 | * hsi_stop_tx - Signal the port that the client no longer wants to transmit | ||
403 | * @cl: Pointer to the HSI client | ||
404 | * | ||
405 | * Return -errno on failure, 0 on success | ||
406 | */ | ||
407 | static inline int hsi_stop_tx(struct hsi_client *cl) | ||
408 | { | ||
409 | if (!hsi_port_claimed(cl)) | ||
410 | return -EACCES; | ||
411 | return hsi_get_port(cl)->stop_tx(cl); | ||
412 | } | ||
413 | #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/i2c/twl.h b/include/linux/i2c/twl.h index 2463b6100333..1f90de0cfdbe 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h | |||
@@ -666,23 +666,11 @@ struct twl4030_codec_data { | |||
666 | unsigned int check_defaults:1; | 666 | unsigned int check_defaults:1; |
667 | unsigned int reset_registers:1; | 667 | unsigned int reset_registers:1; |
668 | unsigned int hs_extmute:1; | 668 | unsigned int hs_extmute:1; |
669 | u16 hs_left_step; | ||
670 | u16 hs_right_step; | ||
671 | u16 hf_left_step; | ||
672 | u16 hf_right_step; | ||
673 | void (*set_hs_extmute)(int mute); | 669 | void (*set_hs_extmute)(int mute); |
674 | }; | 670 | }; |
675 | 671 | ||
676 | struct twl4030_vibra_data { | 672 | struct twl4030_vibra_data { |
677 | unsigned int coexist; | 673 | unsigned int coexist; |
678 | |||
679 | /* twl6040 */ | ||
680 | unsigned int vibldrv_res; /* left driver resistance */ | ||
681 | unsigned int vibrdrv_res; /* right driver resistance */ | ||
682 | unsigned int viblmotor_res; /* left motor resistance */ | ||
683 | unsigned int vibrmotor_res; /* right motor resistance */ | ||
684 | int vddvibl_uV; /* VDDVIBL volt, set 0 for fixed reg */ | ||
685 | int vddvibr_uV; /* VDDVIBR volt, set 0 for fixed reg */ | ||
686 | }; | 674 | }; |
687 | 675 | ||
688 | struct twl4030_audio_data { | 676 | struct twl4030_audio_data { |
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/irq.h b/include/linux/irq.h index bff29c58da23..b27cfcfd3a59 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -49,6 +49,12 @@ typedef void (*irq_preflow_handler_t)(struct irq_data *data); | |||
49 | * IRQ_TYPE_LEVEL_LOW - low level triggered | 49 | * IRQ_TYPE_LEVEL_LOW - low level triggered |
50 | * IRQ_TYPE_LEVEL_MASK - Mask to filter out the level bits | 50 | * IRQ_TYPE_LEVEL_MASK - Mask to filter out the level bits |
51 | * IRQ_TYPE_SENSE_MASK - Mask for all the above bits | 51 | * IRQ_TYPE_SENSE_MASK - Mask for all the above bits |
52 | * IRQ_TYPE_DEFAULT - For use by some PICs to ask irq_set_type | ||
53 | * to setup the HW to a sane default (used | ||
54 | * by irqdomain map() callbacks to synchronize | ||
55 | * the HW state and SW flags for a newly | ||
56 | * allocated descriptor). | ||
57 | * | ||
52 | * IRQ_TYPE_PROBE - Special flag for probing in progress | 58 | * IRQ_TYPE_PROBE - Special flag for probing in progress |
53 | * | 59 | * |
54 | * Bits which can be modified via irq_set/clear/modify_status_flags() | 60 | * Bits which can be modified via irq_set/clear/modify_status_flags() |
@@ -77,6 +83,7 @@ enum { | |||
77 | IRQ_TYPE_LEVEL_LOW = 0x00000008, | 83 | IRQ_TYPE_LEVEL_LOW = 0x00000008, |
78 | IRQ_TYPE_LEVEL_MASK = (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH), | 84 | IRQ_TYPE_LEVEL_MASK = (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH), |
79 | IRQ_TYPE_SENSE_MASK = 0x0000000f, | 85 | IRQ_TYPE_SENSE_MASK = 0x0000000f, |
86 | IRQ_TYPE_DEFAULT = IRQ_TYPE_SENSE_MASK, | ||
80 | 87 | ||
81 | IRQ_TYPE_PROBE = 0x00000010, | 88 | IRQ_TYPE_PROBE = 0x00000010, |
82 | 89 | ||
@@ -263,6 +270,11 @@ static inline void irqd_clr_chained_irq_inprogress(struct irq_data *d) | |||
263 | d->state_use_accessors &= ~IRQD_IRQ_INPROGRESS; | 270 | d->state_use_accessors &= ~IRQD_IRQ_INPROGRESS; |
264 | } | 271 | } |
265 | 272 | ||
273 | static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d) | ||
274 | { | ||
275 | return d->hwirq; | ||
276 | } | ||
277 | |||
266 | /** | 278 | /** |
267 | * struct irq_chip - hardware interrupt chip descriptor | 279 | * struct irq_chip - hardware interrupt chip descriptor |
268 | * | 280 | * |
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index ead4a4215797..c65740d76e66 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h | |||
@@ -42,12 +42,6 @@ struct of_device_id; | |||
42 | /* Number of irqs reserved for a legacy isa controller */ | 42 | /* Number of irqs reserved for a legacy isa controller */ |
43 | #define NUM_ISA_INTERRUPTS 16 | 43 | #define NUM_ISA_INTERRUPTS 16 |
44 | 44 | ||
45 | /* This type is the placeholder for a hardware interrupt number. It has to | ||
46 | * be big enough to enclose whatever representation is used by a given | ||
47 | * platform. | ||
48 | */ | ||
49 | typedef unsigned long irq_hw_number_t; | ||
50 | |||
51 | /** | 45 | /** |
52 | * struct irq_domain_ops - Methods for irq_domain objects | 46 | * struct irq_domain_ops - Methods for irq_domain objects |
53 | * @match: Match an interrupt controller device node to a host, returns | 47 | * @match: Match an interrupt controller device node to a host, returns |
@@ -104,6 +98,9 @@ struct irq_domain { | |||
104 | unsigned int size; | 98 | unsigned int size; |
105 | unsigned int *revmap; | 99 | unsigned int *revmap; |
106 | } linear; | 100 | } linear; |
101 | struct { | ||
102 | unsigned int max_irq; | ||
103 | } nomap; | ||
107 | struct radix_tree_root tree; | 104 | struct radix_tree_root tree; |
108 | } revmap_data; | 105 | } revmap_data; |
109 | const struct irq_domain_ops *ops; | 106 | const struct irq_domain_ops *ops; |
@@ -126,6 +123,7 @@ struct irq_domain *irq_domain_add_linear(struct device_node *of_node, | |||
126 | const struct irq_domain_ops *ops, | 123 | const struct irq_domain_ops *ops, |
127 | void *host_data); | 124 | void *host_data); |
128 | struct irq_domain *irq_domain_add_nomap(struct device_node *of_node, | 125 | struct irq_domain *irq_domain_add_nomap(struct device_node *of_node, |
126 | unsigned int max_irq, | ||
129 | const struct irq_domain_ops *ops, | 127 | const struct irq_domain_ops *ops, |
130 | void *host_data); | 128 | void *host_data); |
131 | struct irq_domain *irq_domain_add_tree(struct device_node *of_node, | 129 | struct irq_domain *irq_domain_add_tree(struct device_node *of_node, |
@@ -134,7 +132,6 @@ struct irq_domain *irq_domain_add_tree(struct device_node *of_node, | |||
134 | 132 | ||
135 | extern struct irq_domain *irq_find_host(struct device_node *node); | 133 | extern struct irq_domain *irq_find_host(struct device_node *node); |
136 | extern void irq_set_default_host(struct irq_domain *host); | 134 | extern void irq_set_default_host(struct irq_domain *host); |
137 | extern void irq_set_virq_count(unsigned int count); | ||
138 | 135 | ||
139 | static inline struct irq_domain *irq_domain_add_legacy_isa( | 136 | static inline struct irq_domain *irq_domain_add_legacy_isa( |
140 | struct device_node *of_node, | 137 | struct device_node *of_node, |
@@ -146,7 +143,6 @@ static inline struct irq_domain *irq_domain_add_legacy_isa( | |||
146 | } | 143 | } |
147 | extern struct irq_domain *irq_find_host(struct device_node *node); | 144 | extern struct irq_domain *irq_find_host(struct device_node *node); |
148 | extern void irq_set_default_host(struct irq_domain *host); | 145 | extern void irq_set_default_host(struct irq_domain *host); |
149 | extern void irq_set_virq_count(unsigned int count); | ||
150 | 146 | ||
151 | 147 | ||
152 | extern unsigned int irq_create_mapping(struct irq_domain *host, | 148 | extern unsigned int irq_create_mapping(struct irq_domain *host, |
diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h index 067eda0e4b32..be342b94c640 100644 --- a/include/linux/kconfig.h +++ b/include/linux/kconfig.h | |||
@@ -4,29 +4,43 @@ | |||
4 | #include <generated/autoconf.h> | 4 | #include <generated/autoconf.h> |
5 | 5 | ||
6 | /* | 6 | /* |
7 | * Helper macros to use CONFIG_ options in C expressions. Note that | 7 | * Helper macros to use CONFIG_ options in C/CPP expressions. Note that |
8 | * these only work with boolean and tristate options. | 8 | * these only work with boolean and tristate options. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | /* | 11 | /* |
12 | * Getting something that works in C and CPP for an arg that may or may | ||
13 | * not be defined is tricky. Here, if we have "#define CONFIG_BOOGER 1" | ||
14 | * we match on the placeholder define, insert the "0," for arg1 and generate | ||
15 | * the triplet (0, 1, 0). Then the last step cherry picks the 2nd arg (a one). | ||
16 | * When CONFIG_BOOGER is not defined, we generate a (... 1, 0) pair, and when | ||
17 | * the last step cherry picks the 2nd arg, we get a zero. | ||
18 | */ | ||
19 | #define __ARG_PLACEHOLDER_1 0, | ||
20 | #define config_enabled(cfg) _config_enabled(cfg) | ||
21 | #define _config_enabled(value) __config_enabled(__ARG_PLACEHOLDER_##value) | ||
22 | #define __config_enabled(arg1_or_junk) ___config_enabled(arg1_or_junk 1, 0) | ||
23 | #define ___config_enabled(__ignored, val, ...) val | ||
24 | |||
25 | /* | ||
12 | * IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm', | 26 | * IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm', |
13 | * 0 otherwise. | 27 | * 0 otherwise. |
14 | * | 28 | * |
15 | */ | 29 | */ |
16 | #define IS_ENABLED(option) \ | 30 | #define IS_ENABLED(option) \ |
17 | (__enabled_ ## option || __enabled_ ## option ## _MODULE) | 31 | (config_enabled(option) || config_enabled(option##_MODULE)) |
18 | 32 | ||
19 | /* | 33 | /* |
20 | * IS_BUILTIN(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y', 0 | 34 | * IS_BUILTIN(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y', 0 |
21 | * otherwise. For boolean options, this is equivalent to | 35 | * otherwise. For boolean options, this is equivalent to |
22 | * IS_ENABLED(CONFIG_FOO). | 36 | * IS_ENABLED(CONFIG_FOO). |
23 | */ | 37 | */ |
24 | #define IS_BUILTIN(option) __enabled_ ## option | 38 | #define IS_BUILTIN(option) config_enabled(option) |
25 | 39 | ||
26 | /* | 40 | /* |
27 | * IS_MODULE(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'm', 0 | 41 | * IS_MODULE(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'm', 0 |
28 | * otherwise. | 42 | * otherwise. |
29 | */ | 43 | */ |
30 | #define IS_MODULE(option) __enabled_ ## option ## _MODULE | 44 | #define IS_MODULE(option) config_enabled(option##_MODULE) |
31 | 45 | ||
32 | #endif /* __LINUX_KCONFIG_H */ | 46 | #endif /* __LINUX_KCONFIG_H */ |
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/kvm_host.h b/include/linux/kvm_host.h index 665a260c7e09..72cbf08d45fb 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -596,6 +596,7 @@ void kvm_free_irq_source_id(struct kvm *kvm, int irq_source_id); | |||
596 | 596 | ||
597 | #ifdef CONFIG_IOMMU_API | 597 | #ifdef CONFIG_IOMMU_API |
598 | int kvm_iommu_map_pages(struct kvm *kvm, struct kvm_memory_slot *slot); | 598 | int kvm_iommu_map_pages(struct kvm *kvm, struct kvm_memory_slot *slot); |
599 | void kvm_iommu_unmap_pages(struct kvm *kvm, struct kvm_memory_slot *slot); | ||
599 | int kvm_iommu_map_guest(struct kvm *kvm); | 600 | int kvm_iommu_map_guest(struct kvm *kvm); |
600 | int kvm_iommu_unmap_guest(struct kvm *kvm); | 601 | int kvm_iommu_unmap_guest(struct kvm *kvm); |
601 | int kvm_assign_device(struct kvm *kvm, | 602 | int kvm_assign_device(struct kvm *kvm, |
@@ -609,6 +610,11 @@ static inline int kvm_iommu_map_pages(struct kvm *kvm, | |||
609 | return 0; | 610 | return 0; |
610 | } | 611 | } |
611 | 612 | ||
613 | static inline void kvm_iommu_unmap_pages(struct kvm *kvm, | ||
614 | struct kvm_memory_slot *slot) | ||
615 | { | ||
616 | } | ||
617 | |||
612 | static inline int kvm_iommu_map_guest(struct kvm *kvm) | 618 | static inline int kvm_iommu_map_guest(struct kvm *kvm) |
613 | { | 619 | { |
614 | return -ENODEV; | 620 | return -ENODEV; |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 42378d637ffb..e926df7b54c9 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -996,7 +996,8 @@ extern int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *dev, | |||
996 | extern void ata_sas_port_destroy(struct ata_port *); | 996 | extern void ata_sas_port_destroy(struct ata_port *); |
997 | extern struct ata_port *ata_sas_port_alloc(struct ata_host *, | 997 | extern struct ata_port *ata_sas_port_alloc(struct ata_host *, |
998 | struct ata_port_info *, struct Scsi_Host *); | 998 | struct ata_port_info *, struct Scsi_Host *); |
999 | extern int ata_sas_async_port_init(struct ata_port *); | 999 | extern void ata_sas_async_probe(struct ata_port *ap); |
1000 | extern int ata_sas_sync_probe(struct ata_port *ap); | ||
1000 | extern int ata_sas_port_init(struct ata_port *); | 1001 | extern int ata_sas_port_init(struct ata_port *); |
1001 | extern int ata_sas_port_start(struct ata_port *ap); | 1002 | extern int ata_sas_port_start(struct ata_port *ap); |
1002 | extern void ata_sas_port_stop(struct ata_port *ap); | 1003 | extern void ata_sas_port_stop(struct ata_port *ap); |
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/mfd/db5500-prcmu.h b/include/linux/mfd/db5500-prcmu.h index 9890687f582d..5a049dfaf153 100644 --- a/include/linux/mfd/db5500-prcmu.h +++ b/include/linux/mfd/db5500-prcmu.h | |||
@@ -8,41 +8,14 @@ | |||
8 | #ifndef __MFD_DB5500_PRCMU_H | 8 | #ifndef __MFD_DB5500_PRCMU_H |
9 | #define __MFD_DB5500_PRCMU_H | 9 | #define __MFD_DB5500_PRCMU_H |
10 | 10 | ||
11 | #ifdef CONFIG_MFD_DB5500_PRCMU | 11 | static inline int prcmu_resetout(u8 resoutn, u8 state) |
12 | |||
13 | void db5500_prcmu_early_init(void); | ||
14 | int db5500_prcmu_set_epod(u16 epod_id, u8 epod_state); | ||
15 | int db5500_prcmu_set_display_clocks(void); | ||
16 | int db5500_prcmu_disable_dsipll(void); | ||
17 | int db5500_prcmu_enable_dsipll(void); | ||
18 | int db5500_prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size); | ||
19 | int db5500_prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size); | ||
20 | void db5500_prcmu_enable_wakeups(u32 wakeups); | ||
21 | int db5500_prcmu_request_clock(u8 clock, bool enable); | ||
22 | void db5500_prcmu_config_abb_event_readout(u32 abb_events); | ||
23 | void db5500_prcmu_get_abb_event_buffer(void __iomem **buf); | ||
24 | int prcmu_resetout(u8 resoutn, u8 state); | ||
25 | int db5500_prcmu_set_power_state(u8 state, bool keep_ulp_clk, | ||
26 | bool keep_ap_pll); | ||
27 | int db5500_prcmu_config_esram0_deep_sleep(u8 state); | ||
28 | void db5500_prcmu_system_reset(u16 reset_code); | ||
29 | u16 db5500_prcmu_get_reset_code(void); | ||
30 | bool db5500_prcmu_is_ac_wake_requested(void); | ||
31 | int db5500_prcmu_set_arm_opp(u8 opp); | ||
32 | int db5500_prcmu_get_arm_opp(void); | ||
33 | |||
34 | #else /* !CONFIG_UX500_SOC_DB5500 */ | ||
35 | |||
36 | static inline void db5500_prcmu_early_init(void) {} | ||
37 | |||
38 | static inline int db5500_prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size) | ||
39 | { | 12 | { |
40 | return -ENOSYS; | 13 | return 0; |
41 | } | 14 | } |
42 | 15 | ||
43 | static inline int db5500_prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size) | 16 | static inline int db5500_prcmu_set_epod(u16 epod_id, u8 epod_state) |
44 | { | 17 | { |
45 | return -ENOSYS; | 18 | return 0; |
46 | } | 19 | } |
47 | 20 | ||
48 | static inline int db5500_prcmu_request_clock(u8 clock, bool enable) | 21 | static inline int db5500_prcmu_request_clock(u8 clock, bool enable) |
@@ -50,69 +23,82 @@ static inline int db5500_prcmu_request_clock(u8 clock, bool enable) | |||
50 | return 0; | 23 | return 0; |
51 | } | 24 | } |
52 | 25 | ||
53 | static inline int db5500_prcmu_set_display_clocks(void) | 26 | static inline int db5500_prcmu_set_power_state(u8 state, bool keep_ulp_clk, |
27 | bool keep_ap_pll) | ||
54 | { | 28 | { |
55 | return 0; | 29 | return 0; |
56 | } | 30 | } |
57 | 31 | ||
58 | static inline int db5500_prcmu_disable_dsipll(void) | 32 | static inline int db5500_prcmu_config_esram0_deep_sleep(u8 state) |
59 | { | 33 | { |
60 | return 0; | 34 | return 0; |
61 | } | 35 | } |
62 | 36 | ||
63 | static inline int db5500_prcmu_enable_dsipll(void) | 37 | static inline u16 db5500_prcmu_get_reset_code(void) |
64 | { | 38 | { |
65 | return 0; | 39 | return 0; |
66 | } | 40 | } |
67 | 41 | ||
68 | static inline int db5500_prcmu_config_esram0_deep_sleep(u8 state) | 42 | static inline bool db5500_prcmu_is_ac_wake_requested(void) |
69 | { | 43 | { |
70 | return 0; | 44 | return 0; |
71 | } | 45 | } |
72 | 46 | ||
73 | static inline void db5500_prcmu_enable_wakeups(u32 wakeups) {} | 47 | static inline int db5500_prcmu_set_arm_opp(u8 opp) |
74 | |||
75 | static inline int prcmu_resetout(u8 resoutn, u8 state) | ||
76 | { | 48 | { |
77 | return 0; | 49 | return 0; |
78 | } | 50 | } |
79 | 51 | ||
80 | static inline int db5500_prcmu_set_epod(u16 epod_id, u8 epod_state) | 52 | static inline int db5500_prcmu_get_arm_opp(void) |
81 | { | 53 | { |
82 | return 0; | 54 | return 0; |
83 | } | 55 | } |
84 | 56 | ||
85 | static inline void db5500_prcmu_get_abb_event_buffer(void __iomem **buf) {} | ||
86 | static inline void db5500_prcmu_config_abb_event_readout(u32 abb_events) {} | 57 | static inline void db5500_prcmu_config_abb_event_readout(u32 abb_events) {} |
87 | 58 | ||
88 | static inline int db5500_prcmu_set_power_state(u8 state, bool keep_ulp_clk, | 59 | static inline void db5500_prcmu_get_abb_event_buffer(void __iomem **buf) {} |
89 | bool keep_ap_pll) | ||
90 | { | ||
91 | return 0; | ||
92 | } | ||
93 | 60 | ||
94 | static inline void db5500_prcmu_system_reset(u16 reset_code) {} | 61 | static inline void db5500_prcmu_system_reset(u16 reset_code) {} |
95 | 62 | ||
96 | static inline u16 db5500_prcmu_get_reset_code(void) | 63 | static inline void db5500_prcmu_enable_wakeups(u32 wakeups) {} |
64 | |||
65 | #ifdef CONFIG_MFD_DB5500_PRCMU | ||
66 | |||
67 | void db5500_prcmu_early_init(void); | ||
68 | int db5500_prcmu_set_display_clocks(void); | ||
69 | int db5500_prcmu_disable_dsipll(void); | ||
70 | int db5500_prcmu_enable_dsipll(void); | ||
71 | int db5500_prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size); | ||
72 | int db5500_prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size); | ||
73 | |||
74 | #else /* !CONFIG_UX500_SOC_DB5500 */ | ||
75 | |||
76 | static inline void db5500_prcmu_early_init(void) {} | ||
77 | |||
78 | static inline int db5500_prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size) | ||
97 | { | 79 | { |
98 | return 0; | 80 | return -ENOSYS; |
99 | } | 81 | } |
100 | 82 | ||
101 | static inline bool db5500_prcmu_is_ac_wake_requested(void) | 83 | static inline int db5500_prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size) |
102 | { | 84 | { |
103 | return 0; | 85 | return -ENOSYS; |
104 | } | 86 | } |
105 | 87 | ||
106 | static inline int db5500_prcmu_set_arm_opp(u8 opp) | 88 | static inline int db5500_prcmu_set_display_clocks(void) |
107 | { | 89 | { |
108 | return 0; | 90 | return 0; |
109 | } | 91 | } |
110 | 92 | ||
111 | static inline int db5500_prcmu_get_arm_opp(void) | 93 | static inline int db5500_prcmu_disable_dsipll(void) |
112 | { | 94 | { |
113 | return 0; | 95 | return 0; |
114 | } | 96 | } |
115 | 97 | ||
98 | static inline int db5500_prcmu_enable_dsipll(void) | ||
99 | { | ||
100 | return 0; | ||
101 | } | ||
116 | 102 | ||
117 | #endif /* CONFIG_MFD_DB5500_PRCMU */ | 103 | #endif /* CONFIG_MFD_DB5500_PRCMU */ |
118 | 104 | ||
diff --git a/include/linux/mfd/rc5t583.h b/include/linux/mfd/rc5t583.h index a2c61609d21d..0b64b19d81ab 100644 --- a/include/linux/mfd/rc5t583.h +++ b/include/linux/mfd/rc5t583.h | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | #include <linux/mutex.h> | 27 | #include <linux/mutex.h> |
28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
29 | #include <linux/regmap.h> | ||
29 | 30 | ||
30 | #define RC5T583_MAX_REGS 0xF8 | 31 | #define RC5T583_MAX_REGS 0xF8 |
31 | 32 | ||
@@ -279,14 +280,44 @@ struct rc5t583_platform_data { | |||
279 | bool enable_shutdown; | 280 | bool enable_shutdown; |
280 | }; | 281 | }; |
281 | 282 | ||
282 | int rc5t583_write(struct device *dev, u8 reg, uint8_t val); | 283 | static inline int rc5t583_write(struct device *dev, uint8_t reg, uint8_t val) |
283 | int rc5t583_read(struct device *dev, uint8_t reg, uint8_t *val); | 284 | { |
284 | int rc5t583_set_bits(struct device *dev, unsigned int reg, | 285 | struct rc5t583 *rc5t583 = dev_get_drvdata(dev); |
285 | unsigned int bit_mask); | 286 | return regmap_write(rc5t583->regmap, reg, val); |
286 | int rc5t583_clear_bits(struct device *dev, unsigned int reg, | 287 | } |
287 | unsigned int bit_mask); | 288 | |
288 | int rc5t583_update(struct device *dev, unsigned int reg, | 289 | static inline int rc5t583_read(struct device *dev, uint8_t reg, uint8_t *val) |
289 | unsigned int val, unsigned int mask); | 290 | { |
291 | struct rc5t583 *rc5t583 = dev_get_drvdata(dev); | ||
292 | unsigned int ival; | ||
293 | int ret; | ||
294 | ret = regmap_read(rc5t583->regmap, reg, &ival); | ||
295 | if (!ret) | ||
296 | *val = (uint8_t)ival; | ||
297 | return ret; | ||
298 | } | ||
299 | |||
300 | static inline int rc5t583_set_bits(struct device *dev, unsigned int reg, | ||
301 | unsigned int bit_mask) | ||
302 | { | ||
303 | struct rc5t583 *rc5t583 = dev_get_drvdata(dev); | ||
304 | return regmap_update_bits(rc5t583->regmap, reg, bit_mask, bit_mask); | ||
305 | } | ||
306 | |||
307 | static inline int rc5t583_clear_bits(struct device *dev, unsigned int reg, | ||
308 | unsigned int bit_mask) | ||
309 | { | ||
310 | struct rc5t583 *rc5t583 = dev_get_drvdata(dev); | ||
311 | return regmap_update_bits(rc5t583->regmap, reg, bit_mask, 0); | ||
312 | } | ||
313 | |||
314 | static inline int rc5t583_update(struct device *dev, unsigned int reg, | ||
315 | unsigned int val, unsigned int mask) | ||
316 | { | ||
317 | struct rc5t583 *rc5t583 = dev_get_drvdata(dev); | ||
318 | return regmap_update_bits(rc5t583->regmap, reg, mask, val); | ||
319 | } | ||
320 | |||
290 | int rc5t583_ext_power_req_config(struct device *dev, int deepsleep_id, | 321 | int rc5t583_ext_power_req_config(struct device *dev, int deepsleep_id, |
291 | int ext_pwr_req, int deepsleep_slot_nr); | 322 | int ext_pwr_req, int deepsleep_slot_nr); |
292 | int rc5t583_irq_init(struct rc5t583 *rc5t583, int irq, int irq_base); | 323 | int rc5t583_irq_init(struct rc5t583 *rc5t583, int irq, int irq_base); |
diff --git a/include/linux/mfd/twl6040.h b/include/linux/mfd/twl6040.h index 9bc9ac651dad..b15b5f03f5c4 100644 --- a/include/linux/mfd/twl6040.h +++ b/include/linux/mfd/twl6040.h | |||
@@ -174,8 +174,35 @@ | |||
174 | #define TWL6040_SYSCLK_SEL_LPPLL 0 | 174 | #define TWL6040_SYSCLK_SEL_LPPLL 0 |
175 | #define TWL6040_SYSCLK_SEL_HPPLL 1 | 175 | #define TWL6040_SYSCLK_SEL_HPPLL 1 |
176 | 176 | ||
177 | struct twl6040_codec_data { | ||
178 | u16 hs_left_step; | ||
179 | u16 hs_right_step; | ||
180 | u16 hf_left_step; | ||
181 | u16 hf_right_step; | ||
182 | }; | ||
183 | |||
184 | struct twl6040_vibra_data { | ||
185 | unsigned int vibldrv_res; /* left driver resistance */ | ||
186 | unsigned int vibrdrv_res; /* right driver resistance */ | ||
187 | unsigned int viblmotor_res; /* left motor resistance */ | ||
188 | unsigned int vibrmotor_res; /* right motor resistance */ | ||
189 | int vddvibl_uV; /* VDDVIBL volt, set 0 for fixed reg */ | ||
190 | int vddvibr_uV; /* VDDVIBR volt, set 0 for fixed reg */ | ||
191 | }; | ||
192 | |||
193 | struct twl6040_platform_data { | ||
194 | int audpwron_gpio; /* audio power-on gpio */ | ||
195 | unsigned int irq_base; | ||
196 | |||
197 | struct twl6040_codec_data *codec; | ||
198 | struct twl6040_vibra_data *vibra; | ||
199 | }; | ||
200 | |||
201 | struct regmap; | ||
202 | |||
177 | struct twl6040 { | 203 | struct twl6040 { |
178 | struct device *dev; | 204 | struct device *dev; |
205 | struct regmap *regmap; | ||
179 | struct mutex mutex; | 206 | struct mutex mutex; |
180 | struct mutex io_mutex; | 207 | struct mutex io_mutex; |
181 | struct mutex irq_mutex; | 208 | struct mutex irq_mutex; |
diff --git a/include/linux/mm.h b/include/linux/mm.h index d8738a464b94..74aa71bea1e4 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1393,29 +1393,20 @@ extern int install_special_mapping(struct mm_struct *mm, | |||
1393 | 1393 | ||
1394 | extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); | 1394 | extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); |
1395 | 1395 | ||
1396 | extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, | ||
1397 | unsigned long len, unsigned long prot, | ||
1398 | unsigned long flag, unsigned long pgoff); | ||
1399 | extern unsigned long mmap_region(struct file *file, unsigned long addr, | 1396 | extern unsigned long mmap_region(struct file *file, unsigned long addr, |
1400 | unsigned long len, unsigned long flags, | 1397 | unsigned long len, unsigned long flags, |
1401 | vm_flags_t vm_flags, unsigned long pgoff); | 1398 | vm_flags_t vm_flags, unsigned long pgoff); |
1402 | 1399 | extern unsigned long do_mmap(struct file *, unsigned long, | |
1403 | static inline unsigned long do_mmap(struct file *file, unsigned long addr, | 1400 | unsigned long, unsigned long, |
1404 | unsigned long len, unsigned long prot, | 1401 | unsigned long, unsigned long); |
1405 | unsigned long flag, unsigned long offset) | ||
1406 | { | ||
1407 | unsigned long ret = -EINVAL; | ||
1408 | if ((offset + PAGE_ALIGN(len)) < offset) | ||
1409 | goto out; | ||
1410 | if (!(offset & ~PAGE_MASK)) | ||
1411 | ret = do_mmap_pgoff(file, addr, len, prot, flag, offset >> PAGE_SHIFT); | ||
1412 | out: | ||
1413 | return ret; | ||
1414 | } | ||
1415 | |||
1416 | extern int do_munmap(struct mm_struct *, unsigned long, size_t); | 1402 | extern int do_munmap(struct mm_struct *, unsigned long, size_t); |
1417 | 1403 | ||
1418 | extern unsigned long do_brk(unsigned long, unsigned long); | 1404 | /* These take the mm semaphore themselves */ |
1405 | extern unsigned long vm_brk(unsigned long, unsigned long); | ||
1406 | extern int vm_munmap(unsigned long, size_t); | ||
1407 | extern unsigned long vm_mmap(struct file *, unsigned long, | ||
1408 | unsigned long, unsigned long, | ||
1409 | unsigned long, unsigned long); | ||
1419 | 1410 | ||
1420 | /* truncate.c */ | 1411 | /* truncate.c */ |
1421 | extern void truncate_inode_pages(struct address_space *, loff_t); | 1412 | extern void truncate_inode_pages(struct address_space *, loff_t); |
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 01beae78f079..629b823f8836 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
@@ -481,7 +481,7 @@ struct mmc_driver { | |||
481 | struct device_driver drv; | 481 | struct device_driver drv; |
482 | int (*probe)(struct mmc_card *); | 482 | int (*probe)(struct mmc_card *); |
483 | void (*remove)(struct mmc_card *); | 483 | void (*remove)(struct mmc_card *); |
484 | int (*suspend)(struct mmc_card *, pm_message_t); | 484 | int (*suspend)(struct mmc_card *); |
485 | int (*resume)(struct mmc_card *); | 485 | int (*resume)(struct mmc_card *); |
486 | }; | 486 | }; |
487 | 487 | ||
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/netfilter_bridge.h b/include/linux/netfilter_bridge.h index 0ddd161f3b06..31d2844e6572 100644 --- a/include/linux/netfilter_bridge.h +++ b/include/linux/netfilter_bridge.h | |||
@@ -104,9 +104,18 @@ struct bridge_skb_cb { | |||
104 | } daddr; | 104 | } daddr; |
105 | }; | 105 | }; |
106 | 106 | ||
107 | static inline void br_drop_fake_rtable(struct sk_buff *skb) | ||
108 | { | ||
109 | struct dst_entry *dst = skb_dst(skb); | ||
110 | |||
111 | if (dst && (dst->flags & DST_FAKE_RTABLE)) | ||
112 | skb_dst_drop(skb); | ||
113 | } | ||
114 | |||
107 | #else | 115 | #else |
108 | #define nf_bridge_maybe_copy_header(skb) (0) | 116 | #define nf_bridge_maybe_copy_header(skb) (0) |
109 | #define nf_bridge_pad(skb) (0) | 117 | #define nf_bridge_pad(skb) (0) |
118 | #define br_drop_fake_rtable(skb) do { } while (0) | ||
110 | #endif /* CONFIG_BRIDGE_NETFILTER */ | 119 | #endif /* CONFIG_BRIDGE_NETFILTER */ |
111 | 120 | ||
112 | #endif /* __KERNEL__ */ | 121 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h index f549adccc94c..1bc898b14a80 100644 --- a/include/linux/netfilter_ipv6/ip6_tables.h +++ b/include/linux/netfilter_ipv6/ip6_tables.h | |||
@@ -287,7 +287,17 @@ extern unsigned int ip6t_do_table(struct sk_buff *skb, | |||
287 | struct xt_table *table); | 287 | struct xt_table *table); |
288 | 288 | ||
289 | /* Check for an extension */ | 289 | /* Check for an extension */ |
290 | extern int ip6t_ext_hdr(u8 nexthdr); | 290 | static inline int |
291 | ip6t_ext_hdr(u8 nexthdr) | ||
292 | { return (nexthdr == IPPROTO_HOPOPTS) || | ||
293 | (nexthdr == IPPROTO_ROUTING) || | ||
294 | (nexthdr == IPPROTO_FRAGMENT) || | ||
295 | (nexthdr == IPPROTO_ESP) || | ||
296 | (nexthdr == IPPROTO_AH) || | ||
297 | (nexthdr == IPPROTO_NONE) || | ||
298 | (nexthdr == IPPROTO_DSTOPTS); | ||
299 | } | ||
300 | |||
291 | /* find specified header and get offset to it */ | 301 | /* find specified header and get offset to it */ |
292 | extern int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset, | 302 | extern int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset, |
293 | int target, unsigned short *fragoff); | 303 | int target, unsigned short *fragoff); |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index bfd0d1bf6707..7ba3551a0414 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -312,6 +312,11 @@ struct nfs4_layoutreturn { | |||
312 | int rpc_status; | 312 | int rpc_status; |
313 | }; | 313 | }; |
314 | 314 | ||
315 | struct stateowner_id { | ||
316 | __u64 create_time; | ||
317 | __u32 uniquifier; | ||
318 | }; | ||
319 | |||
315 | /* | 320 | /* |
316 | * Arguments to the open call. | 321 | * Arguments to the open call. |
317 | */ | 322 | */ |
@@ -321,7 +326,7 @@ struct nfs_openargs { | |||
321 | int open_flags; | 326 | int open_flags; |
322 | fmode_t fmode; | 327 | fmode_t fmode; |
323 | __u64 clientid; | 328 | __u64 clientid; |
324 | __u64 id; | 329 | struct stateowner_id id; |
325 | union { | 330 | union { |
326 | struct { | 331 | struct { |
327 | struct iattr * attrs; /* UNCHECKED, GUARDED */ | 332 | struct iattr * attrs; /* UNCHECKED, GUARDED */ |
diff --git a/include/linux/nfsd/Kbuild b/include/linux/nfsd/Kbuild index b8d4001212b3..5b7d84ac954a 100644 --- a/include/linux/nfsd/Kbuild +++ b/include/linux/nfsd/Kbuild | |||
@@ -1,3 +1,4 @@ | |||
1 | header-y += cld.h | ||
1 | header-y += debug.h | 2 | header-y += debug.h |
2 | header-y += export.h | 3 | header-y += export.h |
3 | header-y += nfsfh.h | 4 | header-y += nfsfh.h |
diff --git a/include/linux/pinctrl/machine.h b/include/linux/pinctrl/machine.h index fee4349364f7..e4d1de742502 100644 --- a/include/linux/pinctrl/machine.h +++ b/include/linux/pinctrl/machine.h | |||
@@ -12,6 +12,8 @@ | |||
12 | #ifndef __LINUX_PINCTRL_MACHINE_H | 12 | #ifndef __LINUX_PINCTRL_MACHINE_H |
13 | #define __LINUX_PINCTRL_MACHINE_H | 13 | #define __LINUX_PINCTRL_MACHINE_H |
14 | 14 | ||
15 | #include <linux/bug.h> | ||
16 | |||
15 | #include "pinctrl-state.h" | 17 | #include "pinctrl-state.h" |
16 | 18 | ||
17 | enum pinctrl_map_type { | 19 | enum pinctrl_map_type { |
@@ -148,7 +150,7 @@ struct pinctrl_map { | |||
148 | #define PIN_MAP_CONFIGS_GROUP_HOG_DEFAULT(dev, grp, cfgs) \ | 150 | #define PIN_MAP_CONFIGS_GROUP_HOG_DEFAULT(dev, grp, cfgs) \ |
149 | PIN_MAP_CONFIGS_GROUP(dev, PINCTRL_STATE_DEFAULT, dev, grp, cfgs) | 151 | PIN_MAP_CONFIGS_GROUP(dev, PINCTRL_STATE_DEFAULT, dev, grp, cfgs) |
150 | 152 | ||
151 | #ifdef CONFIG_PINMUX | 153 | #ifdef CONFIG_PINCTRL |
152 | 154 | ||
153 | extern int pinctrl_register_mappings(struct pinctrl_map const *map, | 155 | extern int pinctrl_register_mappings(struct pinctrl_map const *map, |
154 | unsigned num_maps); | 156 | unsigned num_maps); |
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index 6d626ff0cfd0..e1ac1ce16fb0 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
@@ -6,6 +6,7 @@ | |||
6 | #define PIPE_BUF_FLAG_LRU 0x01 /* page is on the LRU */ | 6 | #define PIPE_BUF_FLAG_LRU 0x01 /* page is on the LRU */ |
7 | #define PIPE_BUF_FLAG_ATOMIC 0x02 /* was atomically mapped */ | 7 | #define PIPE_BUF_FLAG_ATOMIC 0x02 /* was atomically mapped */ |
8 | #define PIPE_BUF_FLAG_GIFT 0x04 /* page is a gift */ | 8 | #define PIPE_BUF_FLAG_GIFT 0x04 /* page is a gift */ |
9 | #define PIPE_BUF_FLAG_PACKET 0x08 /* read() as a packet */ | ||
9 | 10 | ||
10 | /** | 11 | /** |
11 | * struct pipe_buffer - a linux kernel pipe buffer | 12 | * struct pipe_buffer - a linux kernel pipe buffer |
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/seqlock.h b/include/linux/seqlock.h index c6db9fb33c44..600060e25ec6 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h | |||
@@ -141,7 +141,7 @@ static inline unsigned __read_seqcount_begin(const seqcount_t *s) | |||
141 | unsigned ret; | 141 | unsigned ret; |
142 | 142 | ||
143 | repeat: | 143 | repeat: |
144 | ret = s->sequence; | 144 | ret = ACCESS_ONCE(s->sequence); |
145 | if (unlikely(ret & 1)) { | 145 | if (unlikely(ret & 1)) { |
146 | cpu_relax(); | 146 | cpu_relax(); |
147 | goto repeat; | 147 | goto repeat; |
@@ -166,6 +166,27 @@ static inline unsigned read_seqcount_begin(const seqcount_t *s) | |||
166 | } | 166 | } |
167 | 167 | ||
168 | /** | 168 | /** |
169 | * raw_seqcount_begin - begin a seq-read critical section | ||
170 | * @s: pointer to seqcount_t | ||
171 | * Returns: count to be passed to read_seqcount_retry | ||
172 | * | ||
173 | * raw_seqcount_begin opens a read critical section of the given seqcount. | ||
174 | * Validity of the critical section is tested by checking read_seqcount_retry | ||
175 | * function. | ||
176 | * | ||
177 | * Unlike read_seqcount_begin(), this function will not wait for the count | ||
178 | * to stabilize. If a writer is active when we begin, we will fail the | ||
179 | * read_seqcount_retry() instead of stabilizing at the beginning of the | ||
180 | * critical section. | ||
181 | */ | ||
182 | static inline unsigned raw_seqcount_begin(const seqcount_t *s) | ||
183 | { | ||
184 | unsigned ret = ACCESS_ONCE(s->sequence); | ||
185 | smp_rmb(); | ||
186 | return ret & ~1; | ||
187 | } | ||
188 | |||
189 | /** | ||
169 | * __read_seqcount_retry - end a seq-read critical section (without barrier) | 190 | * __read_seqcount_retry - end a seq-read critical section (without barrier) |
170 | * @s: pointer to seqcount_t | 191 | * @s: pointer to seqcount_t |
171 | * @start: count, from read_seqcount_begin | 192 | * @start: count, from read_seqcount_begin |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index f51bf2e70c69..2db407a40051 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -357,7 +357,7 @@ struct uart_port { | |||
357 | #define UPF_CONS_FLOW ((__force upf_t) (1 << 23)) | 357 | #define UPF_CONS_FLOW ((__force upf_t) (1 << 23)) |
358 | #define UPF_SHARE_IRQ ((__force upf_t) (1 << 24)) | 358 | #define UPF_SHARE_IRQ ((__force upf_t) (1 << 24)) |
359 | #define UPF_EXAR_EFR ((__force upf_t) (1 << 25)) | 359 | #define UPF_EXAR_EFR ((__force upf_t) (1 << 25)) |
360 | #define UPF_IIR_ONCE ((__force upf_t) (1 << 26)) | 360 | #define UPF_BUG_THRE ((__force upf_t) (1 << 26)) |
361 | /* The exact UART type is known and should not be probed. */ | 361 | /* The exact UART type is known and should not be probed. */ |
362 | #define UPF_FIXED_TYPE ((__force upf_t) (1 << 27)) | 362 | #define UPF_FIXED_TYPE ((__force upf_t) (1 << 27)) |
363 | #define UPF_BOOT_AUTOCONF ((__force upf_t) (1 << 28)) | 363 | #define UPF_BOOT_AUTOCONF ((__force upf_t) (1 << 28)) |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 33370271b8b2..111f26b6e28b 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -238,11 +238,12 @@ enum { | |||
238 | /* | 238 | /* |
239 | * The callback notifies userspace to release buffers when skb DMA is done in | 239 | * The callback notifies userspace to release buffers when skb DMA is done in |
240 | * lower device, the skb last reference should be 0 when calling this. | 240 | * lower device, the skb last reference should be 0 when calling this. |
241 | * The desc is used to track userspace buffer index. | 241 | * The ctx field is used to track device context. |
242 | * The desc field is used to track userspace buffer index. | ||
242 | */ | 243 | */ |
243 | struct ubuf_info { | 244 | struct ubuf_info { |
244 | void (*callback)(void *); | 245 | void (*callback)(struct ubuf_info *); |
245 | void *arg; | 246 | void *ctx; |
246 | unsigned long desc; | 247 | unsigned long desc; |
247 | }; | 248 | }; |
248 | 249 | ||
@@ -481,6 +482,7 @@ struct sk_buff { | |||
481 | union { | 482 | union { |
482 | __u32 mark; | 483 | __u32 mark; |
483 | __u32 dropcount; | 484 | __u32 dropcount; |
485 | __u32 avail_size; | ||
484 | }; | 486 | }; |
485 | 487 | ||
486 | sk_buff_data_t transport_header; | 488 | sk_buff_data_t transport_header; |
@@ -1018,7 +1020,7 @@ static inline void skb_queue_splice(const struct sk_buff_head *list, | |||
1018 | } | 1020 | } |
1019 | 1021 | ||
1020 | /** | 1022 | /** |
1021 | * skb_queue_splice - join two skb lists and reinitialise the emptied list | 1023 | * skb_queue_splice_init - join two skb lists and reinitialise the emptied list |
1022 | * @list: the new list to add | 1024 | * @list: the new list to add |
1023 | * @head: the place to add it in the first list | 1025 | * @head: the place to add it in the first list |
1024 | * | 1026 | * |
@@ -1049,7 +1051,7 @@ static inline void skb_queue_splice_tail(const struct sk_buff_head *list, | |||
1049 | } | 1051 | } |
1050 | 1052 | ||
1051 | /** | 1053 | /** |
1052 | * skb_queue_splice_tail - join two skb lists and reinitialise the emptied list | 1054 | * skb_queue_splice_tail_init - join two skb lists and reinitialise the emptied list |
1053 | * @list: the new list to add | 1055 | * @list: the new list to add |
1054 | * @head: the place to add it in the first list | 1056 | * @head: the place to add it in the first list |
1055 | * | 1057 | * |
@@ -1366,6 +1368,18 @@ static inline int skb_tailroom(const struct sk_buff *skb) | |||
1366 | } | 1368 | } |
1367 | 1369 | ||
1368 | /** | 1370 | /** |
1371 | * skb_availroom - bytes at buffer end | ||
1372 | * @skb: buffer to check | ||
1373 | * | ||
1374 | * Return the number of bytes of free space at the tail of an sk_buff | ||
1375 | * allocated by sk_stream_alloc() | ||
1376 | */ | ||
1377 | static inline int skb_availroom(const struct sk_buff *skb) | ||
1378 | { | ||
1379 | return skb_is_nonlinear(skb) ? 0 : skb->avail_size - skb->len; | ||
1380 | } | ||
1381 | |||
1382 | /** | ||
1369 | * skb_reserve - adjust headroom | 1383 | * skb_reserve - adjust headroom |
1370 | * @skb: buffer to alter | 1384 | * @skb: buffer to alter |
1371 | * @len: bytes to move | 1385 | * @len: bytes to move |
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/spi/spi.h b/include/linux/spi/spi.h index 98679b061b63..fa702aeb5038 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -254,7 +254,7 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) | |||
254 | * driver is finished with this message, it must call | 254 | * driver is finished with this message, it must call |
255 | * spi_finalize_current_message() so the subsystem can issue the next | 255 | * spi_finalize_current_message() so the subsystem can issue the next |
256 | * transfer | 256 | * transfer |
257 | * @prepare_transfer_hardware: there are currently no more messages on the | 257 | * @unprepare_transfer_hardware: there are currently no more messages on the |
258 | * queue so the subsystem notifies the driver that it may relax the | 258 | * queue so the subsystem notifies the driver that it may relax the |
259 | * hardware by issuing this call | 259 | * hardware by issuing this call |
260 | * | 260 | * |
diff --git a/include/linux/stddef.h b/include/linux/stddef.h index 6a40c76bdcf1..1747b6787b9e 100644 --- a/include/linux/stddef.h +++ b/include/linux/stddef.h | |||
@@ -3,14 +3,10 @@ | |||
3 | 3 | ||
4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
5 | 5 | ||
6 | #ifdef __KERNEL__ | ||
7 | |||
6 | #undef NULL | 8 | #undef NULL |
7 | #if defined(__cplusplus) | ||
8 | #define NULL 0 | ||
9 | #else | ||
10 | #define NULL ((void *)0) | 9 | #define NULL ((void *)0) |
11 | #endif | ||
12 | |||
13 | #ifdef __KERNEL__ | ||
14 | 10 | ||
15 | enum { | 11 | enum { |
16 | false = 0, | 12 | false = 0, |
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/linux/types.h b/include/linux/types.h index e5fa50345516..7f480db60231 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
@@ -210,6 +210,12 @@ typedef u32 phys_addr_t; | |||
210 | 210 | ||
211 | typedef phys_addr_t resource_size_t; | 211 | typedef phys_addr_t resource_size_t; |
212 | 212 | ||
213 | /* | ||
214 | * This type is the placeholder for a hardware interrupt number. It has to be | ||
215 | * big enough to enclose whatever representation is used by a given platform. | ||
216 | */ | ||
217 | typedef unsigned long irq_hw_number_t; | ||
218 | |||
213 | typedef struct { | 219 | typedef struct { |
214 | int counter; | 220 | int counter; |
215 | } atomic_t; | 221 | } atomic_t; |
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index 5de415707c23..d28cc78a38e4 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h | |||
@@ -126,6 +126,8 @@ struct usb_hcd { | |||
126 | unsigned wireless:1; /* Wireless USB HCD */ | 126 | unsigned wireless:1; /* Wireless USB HCD */ |
127 | unsigned authorized_default:1; | 127 | unsigned authorized_default:1; |
128 | unsigned has_tt:1; /* Integrated TT in root hub */ | 128 | unsigned has_tt:1; /* Integrated TT in root hub */ |
129 | unsigned broken_pci_sleep:1; /* Don't put the | ||
130 | controller in PCI-D3 for system sleep */ | ||
129 | 131 | ||
130 | unsigned int irq; /* irq allocated */ | 132 | unsigned int irq; /* irq allocated */ |
131 | void __iomem *regs; /* device memory/io */ | 133 | void __iomem *regs; /* device memory/io */ |
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h index f67810f8f21b..38ab3f46346f 100644 --- a/include/linux/usb/otg.h +++ b/include/linux/usb/otg.h | |||
@@ -94,6 +94,7 @@ struct usb_phy { | |||
94 | 94 | ||
95 | struct usb_otg *otg; | 95 | struct usb_otg *otg; |
96 | 96 | ||
97 | struct device *io_dev; | ||
97 | struct usb_phy_io_ops *io_ops; | 98 | struct usb_phy_io_ops *io_ops; |
98 | void __iomem *io_priv; | 99 | void __iomem *io_priv; |
99 | 100 | ||
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index fbb666b1b670..474283888233 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -28,13 +28,6 @@ | |||
28 | /* parity check flag */ | 28 | /* parity check flag */ |
29 | #define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK)) | 29 | #define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK)) |
30 | 30 | ||
31 | enum port_dev_state { | ||
32 | PORT_UNREGISTERED, | ||
33 | PORT_REGISTERING, | ||
34 | PORT_REGISTERED, | ||
35 | PORT_UNREGISTERING, | ||
36 | }; | ||
37 | |||
38 | /* USB serial flags */ | 31 | /* USB serial flags */ |
39 | #define USB_SERIAL_WRITE_BUSY 0 | 32 | #define USB_SERIAL_WRITE_BUSY 0 |
40 | 33 | ||
@@ -124,7 +117,6 @@ struct usb_serial_port { | |||
124 | char throttle_req; | 117 | char throttle_req; |
125 | unsigned long sysrq; /* sysrq timeout */ | 118 | unsigned long sysrq; /* sysrq timeout */ |
126 | struct device dev; | 119 | struct device dev; |
127 | enum port_dev_state dev_state; | ||
128 | }; | 120 | }; |
129 | #define to_usb_serial_port(d) container_of(d, struct usb_serial_port, dev) | 121 | #define to_usb_serial_port(d) container_of(d, struct usb_serial_port, dev) |
130 | 122 | ||
diff --git a/include/linux/vgaarb.h b/include/linux/vgaarb.h index 9c3120dca294..b572f80bdfd5 100644 --- a/include/linux/vgaarb.h +++ b/include/linux/vgaarb.h | |||
@@ -47,6 +47,8 @@ | |||
47 | */ | 47 | */ |
48 | #define VGA_DEFAULT_DEVICE (NULL) | 48 | #define VGA_DEFAULT_DEVICE (NULL) |
49 | 49 | ||
50 | struct pci_dev; | ||
51 | |||
50 | /* For use by clients */ | 52 | /* For use by clients */ |
51 | 53 | ||
52 | /** | 54 | /** |
diff --git a/include/linux/vm_event_item.h b/include/linux/vm_event_item.h index 03b90cdc1921..06f8e3858251 100644 --- a/include/linux/vm_event_item.h +++ b/include/linux/vm_event_item.h | |||
@@ -26,13 +26,14 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, | |||
26 | PGFREE, PGACTIVATE, PGDEACTIVATE, | 26 | PGFREE, PGACTIVATE, PGDEACTIVATE, |
27 | PGFAULT, PGMAJFAULT, | 27 | PGFAULT, PGMAJFAULT, |
28 | FOR_ALL_ZONES(PGREFILL), | 28 | FOR_ALL_ZONES(PGREFILL), |
29 | FOR_ALL_ZONES(PGSTEAL), | 29 | FOR_ALL_ZONES(PGSTEAL_KSWAPD), |
30 | FOR_ALL_ZONES(PGSTEAL_DIRECT), | ||
30 | FOR_ALL_ZONES(PGSCAN_KSWAPD), | 31 | FOR_ALL_ZONES(PGSCAN_KSWAPD), |
31 | FOR_ALL_ZONES(PGSCAN_DIRECT), | 32 | FOR_ALL_ZONES(PGSCAN_DIRECT), |
32 | #ifdef CONFIG_NUMA | 33 | #ifdef CONFIG_NUMA |
33 | PGSCAN_ZONE_RECLAIM_FAILED, | 34 | PGSCAN_ZONE_RECLAIM_FAILED, |
34 | #endif | 35 | #endif |
35 | PGINODESTEAL, SLABS_SCANNED, KSWAPD_STEAL, KSWAPD_INODESTEAL, | 36 | PGINODESTEAL, SLABS_SCANNED, KSWAPD_INODESTEAL, |
36 | KSWAPD_LOW_WMARK_HIT_QUICKLY, KSWAPD_HIGH_WMARK_HIT_QUICKLY, | 37 | KSWAPD_LOW_WMARK_HIT_QUICKLY, KSWAPD_HIGH_WMARK_HIT_QUICKLY, |
37 | KSWAPD_SKIP_CONGESTION_WAIT, | 38 | KSWAPD_SKIP_CONGESTION_WAIT, |
38 | PAGEOUTRUN, ALLOCSTALL, PGROTATED, | 39 | PAGEOUTRUN, ALLOCSTALL, PGROTATED, |
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 344b0f972828..d47e523c9d83 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -92,6 +92,7 @@ enum { | |||
92 | HCI_SERVICE_CACHE, | 92 | HCI_SERVICE_CACHE, |
93 | HCI_LINK_KEYS, | 93 | HCI_LINK_KEYS, |
94 | HCI_DEBUG_KEYS, | 94 | HCI_DEBUG_KEYS, |
95 | HCI_UNREGISTER, | ||
95 | 96 | ||
96 | HCI_LE_SCAN, | 97 | HCI_LE_SCAN, |
97 | HCI_SSP_ENABLED, | 98 | HCI_SSP_ENABLED, |
@@ -1327,8 +1328,8 @@ struct sockaddr_hci { | |||
1327 | #define HCI_DEV_NONE 0xffff | 1328 | #define HCI_DEV_NONE 0xffff |
1328 | 1329 | ||
1329 | #define HCI_CHANNEL_RAW 0 | 1330 | #define HCI_CHANNEL_RAW 0 |
1330 | #define HCI_CHANNEL_CONTROL 1 | ||
1331 | #define HCI_CHANNEL_MONITOR 2 | 1331 | #define HCI_CHANNEL_MONITOR 2 |
1332 | #define HCI_CHANNEL_CONTROL 3 | ||
1332 | 1333 | ||
1333 | struct hci_filter { | 1334 | struct hci_filter { |
1334 | unsigned long type_mask; | 1335 | unsigned long type_mask; |
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index daefaac51131..db1c5df45224 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -314,6 +314,7 @@ struct hci_conn { | |||
314 | 314 | ||
315 | __u8 remote_cap; | 315 | __u8 remote_cap; |
316 | __u8 remote_auth; | 316 | __u8 remote_auth; |
317 | bool flush_key; | ||
317 | 318 | ||
318 | unsigned int sent; | 319 | unsigned int sent; |
319 | 320 | ||
@@ -427,7 +428,7 @@ enum { | |||
427 | static inline bool hci_conn_ssp_enabled(struct hci_conn *conn) | 428 | static inline bool hci_conn_ssp_enabled(struct hci_conn *conn) |
428 | { | 429 | { |
429 | struct hci_dev *hdev = conn->hdev; | 430 | struct hci_dev *hdev = conn->hdev; |
430 | return (test_bit(HCI_SSP_ENABLED, &hdev->flags) && | 431 | return (test_bit(HCI_SSP_ENABLED, &hdev->dev_flags) && |
431 | test_bit(HCI_CONN_SSP_ENABLED, &conn->flags)); | 432 | test_bit(HCI_CONN_SSP_ENABLED, &conn->flags)); |
432 | } | 433 | } |
433 | 434 | ||
@@ -907,11 +908,13 @@ static inline void hci_role_switch_cfm(struct hci_conn *conn, __u8 status, | |||
907 | 908 | ||
908 | static inline bool eir_has_data_type(u8 *data, size_t data_len, u8 type) | 909 | static inline bool eir_has_data_type(u8 *data, size_t data_len, u8 type) |
909 | { | 910 | { |
910 | u8 field_len; | 911 | size_t parsed = 0; |
911 | size_t parsed; | ||
912 | 912 | ||
913 | for (parsed = 0; parsed < data_len - 1; parsed += field_len) { | 913 | if (data_len < 2) |
914 | field_len = data[0]; | 914 | return false; |
915 | |||
916 | while (parsed < data_len - 1) { | ||
917 | u8 field_len = data[0]; | ||
915 | 918 | ||
916 | if (field_len == 0) | 919 | if (field_len == 0) |
917 | break; | 920 | break; |
@@ -978,7 +981,7 @@ int mgmt_discoverable(struct hci_dev *hdev, u8 discoverable); | |||
978 | int mgmt_connectable(struct hci_dev *hdev, u8 connectable); | 981 | int mgmt_connectable(struct hci_dev *hdev, u8 connectable); |
979 | int mgmt_write_scan_failed(struct hci_dev *hdev, u8 scan, u8 status); | 982 | int mgmt_write_scan_failed(struct hci_dev *hdev, u8 scan, u8 status); |
980 | int mgmt_new_link_key(struct hci_dev *hdev, struct link_key *key, | 983 | int mgmt_new_link_key(struct hci_dev *hdev, struct link_key *key, |
981 | u8 persistent); | 984 | bool persistent); |
982 | int mgmt_device_connected(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, | 985 | int mgmt_device_connected(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, |
983 | u8 addr_type, u32 flags, u8 *name, u8 name_len, | 986 | u8 addr_type, u32 flags, u8 *name, u8 name_len, |
984 | u8 *dev_class); | 987 | u8 *dev_class); |
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h index ffc1377e092e..ebfd91fc20f8 100644 --- a/include/net/bluetooth/mgmt.h +++ b/include/net/bluetooth/mgmt.h | |||
@@ -117,7 +117,7 @@ struct mgmt_mode { | |||
117 | #define MGMT_OP_SET_DISCOVERABLE 0x0006 | 117 | #define MGMT_OP_SET_DISCOVERABLE 0x0006 |
118 | struct mgmt_cp_set_discoverable { | 118 | struct mgmt_cp_set_discoverable { |
119 | __u8 val; | 119 | __u8 val; |
120 | __u16 timeout; | 120 | __le16 timeout; |
121 | } __packed; | 121 | } __packed; |
122 | #define MGMT_SET_DISCOVERABLE_SIZE 3 | 122 | #define MGMT_SET_DISCOVERABLE_SIZE 3 |
123 | 123 | ||
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/dst.h b/include/net/dst.h index 59c5d18cc385..bed833d9796a 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -36,7 +36,11 @@ struct dst_entry { | |||
36 | struct net_device *dev; | 36 | struct net_device *dev; |
37 | struct dst_ops *ops; | 37 | struct dst_ops *ops; |
38 | unsigned long _metrics; | 38 | unsigned long _metrics; |
39 | unsigned long expires; | 39 | union { |
40 | unsigned long expires; | ||
41 | /* point to where the dst_entry copied from */ | ||
42 | struct dst_entry *from; | ||
43 | }; | ||
40 | struct dst_entry *path; | 44 | struct dst_entry *path; |
41 | struct neighbour __rcu *_neighbour; | 45 | struct neighbour __rcu *_neighbour; |
42 | #ifdef CONFIG_XFRM | 46 | #ifdef CONFIG_XFRM |
@@ -55,6 +59,7 @@ struct dst_entry { | |||
55 | #define DST_NOCACHE 0x0010 | 59 | #define DST_NOCACHE 0x0010 |
56 | #define DST_NOCOUNT 0x0020 | 60 | #define DST_NOCOUNT 0x0020 |
57 | #define DST_NOPEER 0x0040 | 61 | #define DST_NOPEER 0x0040 |
62 | #define DST_FAKE_RTABLE 0x0080 | ||
58 | 63 | ||
59 | short error; | 64 | short error; |
60 | short obsolete; | 65 | short obsolete; |
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h index b26bb8101981..0ae759a6c76e 100644 --- a/include/net/ip6_fib.h +++ b/include/net/ip6_fib.h | |||
@@ -123,6 +123,54 @@ static inline struct inet6_dev *ip6_dst_idev(struct dst_entry *dst) | |||
123 | return ((struct rt6_info *)dst)->rt6i_idev; | 123 | return ((struct rt6_info *)dst)->rt6i_idev; |
124 | } | 124 | } |
125 | 125 | ||
126 | static inline void rt6_clean_expires(struct rt6_info *rt) | ||
127 | { | ||
128 | if (!(rt->rt6i_flags & RTF_EXPIRES) && rt->dst.from) | ||
129 | dst_release(rt->dst.from); | ||
130 | |||
131 | rt->rt6i_flags &= ~RTF_EXPIRES; | ||
132 | rt->dst.from = NULL; | ||
133 | } | ||
134 | |||
135 | static inline void rt6_set_expires(struct rt6_info *rt, unsigned long expires) | ||
136 | { | ||
137 | if (!(rt->rt6i_flags & RTF_EXPIRES) && rt->dst.from) | ||
138 | dst_release(rt->dst.from); | ||
139 | |||
140 | rt->rt6i_flags |= RTF_EXPIRES; | ||
141 | rt->dst.expires = expires; | ||
142 | } | ||
143 | |||
144 | static inline void rt6_update_expires(struct rt6_info *rt, int timeout) | ||
145 | { | ||
146 | if (!(rt->rt6i_flags & RTF_EXPIRES)) { | ||
147 | if (rt->dst.from) | ||
148 | dst_release(rt->dst.from); | ||
149 | /* dst_set_expires relies on expires == 0 | ||
150 | * if it has not been set previously. | ||
151 | */ | ||
152 | rt->dst.expires = 0; | ||
153 | } | ||
154 | |||
155 | dst_set_expires(&rt->dst, timeout); | ||
156 | rt->rt6i_flags |= RTF_EXPIRES; | ||
157 | } | ||
158 | |||
159 | static inline void rt6_set_from(struct rt6_info *rt, struct rt6_info *from) | ||
160 | { | ||
161 | struct dst_entry *new = (struct dst_entry *) from; | ||
162 | |||
163 | if (!(rt->rt6i_flags & RTF_EXPIRES) && rt->dst.from) { | ||
164 | if (new == rt->dst.from) | ||
165 | return; | ||
166 | dst_release(rt->dst.from); | ||
167 | } | ||
168 | |||
169 | rt->rt6i_flags &= ~RTF_EXPIRES; | ||
170 | rt->dst.from = new; | ||
171 | dst_hold(new); | ||
172 | } | ||
173 | |||
126 | struct fib6_walker_t { | 174 | struct fib6_walker_t { |
127 | struct list_head lh; | 175 | struct list_head lh; |
128 | struct fib6_node *root, *node; | 176 | struct fib6_node *root, *node; |
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 2bdee51ba30d..72522f087375 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -393,7 +393,7 @@ struct ip_vs_protocol { | |||
393 | 393 | ||
394 | void (*exit)(struct ip_vs_protocol *pp); | 394 | void (*exit)(struct ip_vs_protocol *pp); |
395 | 395 | ||
396 | void (*init_netns)(struct net *net, struct ip_vs_proto_data *pd); | 396 | int (*init_netns)(struct net *net, struct ip_vs_proto_data *pd); |
397 | 397 | ||
398 | void (*exit_netns)(struct net *net, struct ip_vs_proto_data *pd); | 398 | void (*exit_netns)(struct net *net, struct ip_vs_proto_data *pd); |
399 | 399 | ||
@@ -1203,6 +1203,8 @@ ip_vs_lookup_real_service(struct net *net, int af, __u16 protocol, | |||
1203 | 1203 | ||
1204 | extern int ip_vs_use_count_inc(void); | 1204 | extern int ip_vs_use_count_inc(void); |
1205 | extern void ip_vs_use_count_dec(void); | 1205 | extern void ip_vs_use_count_dec(void); |
1206 | extern int ip_vs_register_nl_ioctl(void); | ||
1207 | extern void ip_vs_unregister_nl_ioctl(void); | ||
1206 | extern int ip_vs_control_init(void); | 1208 | extern int ip_vs_control_init(void); |
1207 | extern void ip_vs_control_cleanup(void); | 1209 | extern void ip_vs_control_cleanup(void); |
1208 | extern struct ip_vs_dest * | 1210 | extern struct ip_vs_dest * |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 87d203ff7a8a..9210bdc7bd8d 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -1327,7 +1327,7 @@ static inline struct ieee80211_rate * | |||
1327 | ieee80211_get_tx_rate(const struct ieee80211_hw *hw, | 1327 | ieee80211_get_tx_rate(const struct ieee80211_hw *hw, |
1328 | const struct ieee80211_tx_info *c) | 1328 | const struct ieee80211_tx_info *c) |
1329 | { | 1329 | { |
1330 | if (WARN_ON(c->control.rates[0].idx < 0)) | 1330 | if (WARN_ON_ONCE(c->control.rates[0].idx < 0)) |
1331 | return NULL; | 1331 | return NULL; |
1332 | return &hw->wiphy->bands[c->band]->bitrates[c->control.rates[0].idx]; | 1332 | return &hw->wiphy->bands[c->band]->bitrates[c->control.rates[0].idx]; |
1333 | } | 1333 | } |
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/net/red.h b/include/net/red.h index 77d4c3745cb5..ef46058d35bf 100644 --- a/include/net/red.h +++ b/include/net/red.h | |||
@@ -245,7 +245,7 @@ static inline unsigned long red_calc_qavg_from_idle_time(const struct red_parms | |||
245 | * | 245 | * |
246 | * dummy packets as a burst after idle time, i.e. | 246 | * dummy packets as a burst after idle time, i.e. |
247 | * | 247 | * |
248 | * p->qavg *= (1-W)^m | 248 | * v->qavg *= (1-W)^m |
249 | * | 249 | * |
250 | * This is an apparently overcomplicated solution (f.e. we have to | 250 | * This is an apparently overcomplicated solution (f.e. we have to |
251 | * precompute a table to make this calculation in reasonable time) | 251 | * precompute a table to make this calculation in reasonable time) |
@@ -279,7 +279,7 @@ static inline unsigned long red_calc_qavg_no_idle_time(const struct red_parms *p | |||
279 | unsigned int backlog) | 279 | unsigned int backlog) |
280 | { | 280 | { |
281 | /* | 281 | /* |
282 | * NOTE: p->qavg is fixed point number with point at Wlog. | 282 | * NOTE: v->qavg is fixed point number with point at Wlog. |
283 | * The formula below is equvalent to floating point | 283 | * The formula below is equvalent to floating point |
284 | * version: | 284 | * version: |
285 | * | 285 | * |
@@ -390,7 +390,7 @@ static inline void red_adaptative_algo(struct red_parms *p, struct red_vars *v) | |||
390 | if (red_is_idling(v)) | 390 | if (red_is_idling(v)) |
391 | qavg = red_calc_qavg_from_idle_time(p, v); | 391 | qavg = red_calc_qavg_from_idle_time(p, v); |
392 | 392 | ||
393 | /* p->qavg is fixed point number with point at Wlog */ | 393 | /* v->qavg is fixed point number with point at Wlog */ |
394 | qavg >>= p->Wlog; | 394 | qavg >>= p->Wlog; |
395 | 395 | ||
396 | if (qavg > p->target_max && p->max_P <= MAX_P_MAX) | 396 | if (qavg > p->target_max && p->max_P <= MAX_P_MAX) |
diff --git a/include/net/sock.h b/include/net/sock.h index a6ba1f8871fd..5a0a58ac4126 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -246,6 +246,7 @@ struct cg_proto; | |||
246 | * @sk_user_data: RPC layer private data | 246 | * @sk_user_data: RPC layer private data |
247 | * @sk_sndmsg_page: cached page for sendmsg | 247 | * @sk_sndmsg_page: cached page for sendmsg |
248 | * @sk_sndmsg_off: cached offset for sendmsg | 248 | * @sk_sndmsg_off: cached offset for sendmsg |
249 | * @sk_peek_off: current peek_offset value | ||
249 | * @sk_send_head: front of stuff to transmit | 250 | * @sk_send_head: front of stuff to transmit |
250 | * @sk_security: used by security modules | 251 | * @sk_security: used by security modules |
251 | * @sk_mark: generic packet mark | 252 | * @sk_mark: generic packet mark |
@@ -1128,9 +1129,9 @@ sk_sockets_allocated_read_positive(struct sock *sk) | |||
1128 | struct proto *prot = sk->sk_prot; | 1129 | struct proto *prot = sk->sk_prot; |
1129 | 1130 | ||
1130 | if (mem_cgroup_sockets_enabled && sk->sk_cgrp) | 1131 | if (mem_cgroup_sockets_enabled && sk->sk_cgrp) |
1131 | return percpu_counter_sum_positive(sk->sk_cgrp->sockets_allocated); | 1132 | return percpu_counter_read_positive(sk->sk_cgrp->sockets_allocated); |
1132 | 1133 | ||
1133 | return percpu_counter_sum_positive(prot->sockets_allocated); | 1134 | return percpu_counter_read_positive(prot->sockets_allocated); |
1134 | } | 1135 | } |
1135 | 1136 | ||
1136 | static inline int | 1137 | static inline int |
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 5f5ed1b8b41b..f4f1c96dca72 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h | |||
@@ -217,11 +217,29 @@ struct domain_device { | |||
217 | struct kref kref; | 217 | struct kref kref; |
218 | }; | 218 | }; |
219 | 219 | ||
220 | struct sas_discovery_event { | 220 | struct sas_work { |
221 | struct list_head drain_node; | ||
221 | struct work_struct work; | 222 | struct work_struct work; |
223 | }; | ||
224 | |||
225 | static inline void INIT_SAS_WORK(struct sas_work *sw, void (*fn)(struct work_struct *)) | ||
226 | { | ||
227 | INIT_WORK(&sw->work, fn); | ||
228 | INIT_LIST_HEAD(&sw->drain_node); | ||
229 | } | ||
230 | |||
231 | struct sas_discovery_event { | ||
232 | struct sas_work work; | ||
222 | struct asd_sas_port *port; | 233 | struct asd_sas_port *port; |
223 | }; | 234 | }; |
224 | 235 | ||
236 | static inline struct sas_discovery_event *to_sas_discovery_event(struct work_struct *work) | ||
237 | { | ||
238 | struct sas_discovery_event *ev = container_of(work, typeof(*ev), work.work); | ||
239 | |||
240 | return ev; | ||
241 | } | ||
242 | |||
225 | struct sas_discovery { | 243 | struct sas_discovery { |
226 | struct sas_discovery_event disc_work[DISC_NUM_EVENTS]; | 244 | struct sas_discovery_event disc_work[DISC_NUM_EVENTS]; |
227 | unsigned long pending; | 245 | unsigned long pending; |
@@ -244,7 +262,7 @@ struct asd_sas_port { | |||
244 | struct list_head destroy_list; | 262 | struct list_head destroy_list; |
245 | enum sas_linkrate linkrate; | 263 | enum sas_linkrate linkrate; |
246 | 264 | ||
247 | struct work_struct work; | 265 | struct sas_work work; |
248 | 266 | ||
249 | /* public: */ | 267 | /* public: */ |
250 | int id; | 268 | int id; |
@@ -270,10 +288,17 @@ struct asd_sas_port { | |||
270 | }; | 288 | }; |
271 | 289 | ||
272 | struct asd_sas_event { | 290 | struct asd_sas_event { |
273 | struct work_struct work; | 291 | struct sas_work work; |
274 | struct asd_sas_phy *phy; | 292 | struct asd_sas_phy *phy; |
275 | }; | 293 | }; |
276 | 294 | ||
295 | static inline struct asd_sas_event *to_asd_sas_event(struct work_struct *work) | ||
296 | { | ||
297 | struct asd_sas_event *ev = container_of(work, typeof(*ev), work.work); | ||
298 | |||
299 | return ev; | ||
300 | } | ||
301 | |||
277 | /* The phy pretty much is controlled by the LLDD. | 302 | /* The phy pretty much is controlled by the LLDD. |
278 | * The class only reads those fields. | 303 | * The class only reads those fields. |
279 | */ | 304 | */ |
@@ -333,10 +358,17 @@ struct scsi_core { | |||
333 | }; | 358 | }; |
334 | 359 | ||
335 | struct sas_ha_event { | 360 | struct sas_ha_event { |
336 | struct work_struct work; | 361 | struct sas_work work; |
337 | struct sas_ha_struct *ha; | 362 | struct sas_ha_struct *ha; |
338 | }; | 363 | }; |
339 | 364 | ||
365 | static inline struct sas_ha_event *to_sas_ha_event(struct work_struct *work) | ||
366 | { | ||
367 | struct sas_ha_event *ev = container_of(work, typeof(*ev), work.work); | ||
368 | |||
369 | return ev; | ||
370 | } | ||
371 | |||
340 | enum sas_ha_state { | 372 | enum sas_ha_state { |
341 | SAS_HA_REGISTERED, | 373 | SAS_HA_REGISTERED, |
342 | SAS_HA_DRAINING, | 374 | SAS_HA_DRAINING, |
diff --git a/include/scsi/sas_ata.h b/include/scsi/sas_ata.h index cdccd2eb7b6c..77670e823ed8 100644 --- a/include/scsi/sas_ata.h +++ b/include/scsi/sas_ata.h | |||
@@ -37,7 +37,7 @@ static inline int dev_is_sata(struct domain_device *dev) | |||
37 | } | 37 | } |
38 | 38 | ||
39 | int sas_get_ata_info(struct domain_device *dev, struct ex_phy *phy); | 39 | int sas_get_ata_info(struct domain_device *dev, struct ex_phy *phy); |
40 | int sas_ata_init_host_and_port(struct domain_device *found_dev); | 40 | int sas_ata_init(struct domain_device *dev); |
41 | void sas_ata_task_abort(struct sas_task *task); | 41 | void sas_ata_task_abort(struct sas_task *task); |
42 | void sas_ata_strategy_handler(struct Scsi_Host *shost); | 42 | void sas_ata_strategy_handler(struct Scsi_Host *shost); |
43 | void sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q, | 43 | void sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q, |
@@ -52,7 +52,7 @@ static inline int dev_is_sata(struct domain_device *dev) | |||
52 | { | 52 | { |
53 | return 0; | 53 | return 0; |
54 | } | 54 | } |
55 | static inline int sas_ata_init_host_and_port(struct domain_device *found_dev) | 55 | static inline int sas_ata_init(struct domain_device *dev) |
56 | { | 56 | { |
57 | return 0; | 57 | return 0; |
58 | } | 58 | } |
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 377df4a28512..1e1198546c72 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h | |||
@@ -134,6 +134,9 @@ struct scsi_cmnd { | |||
134 | 134 | ||
135 | static inline struct scsi_driver *scsi_cmd_to_driver(struct scsi_cmnd *cmd) | 135 | static inline struct scsi_driver *scsi_cmd_to_driver(struct scsi_cmnd *cmd) |
136 | { | 136 | { |
137 | if (!cmd->request->rq_disk) | ||
138 | return NULL; | ||
139 | |||
137 | return *(struct scsi_driver **)cmd->request->rq_disk->private_data; | 140 | return *(struct scsi_driver **)cmd->request->rq_disk->private_data; |
138 | } | 141 | } |
139 | 142 | ||
diff --git a/include/sound/core.h b/include/sound/core.h index b6e0f57d451d..bc056687f647 100644 --- a/include/sound/core.h +++ b/include/sound/core.h | |||
@@ -325,6 +325,13 @@ void release_and_free_resource(struct resource *res); | |||
325 | 325 | ||
326 | /* --- */ | 326 | /* --- */ |
327 | 327 | ||
328 | /* sound printk debug levels */ | ||
329 | enum { | ||
330 | SND_PR_ALWAYS, | ||
331 | SND_PR_DEBUG, | ||
332 | SND_PR_VERBOSE, | ||
333 | }; | ||
334 | |||
328 | #if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK) | 335 | #if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK) |
329 | __printf(4, 5) | 336 | __printf(4, 5) |
330 | void __snd_printk(unsigned int level, const char *file, int line, | 337 | void __snd_printk(unsigned int level, const char *file, int line, |
@@ -354,6 +361,8 @@ void __snd_printk(unsigned int level, const char *file, int line, | |||
354 | */ | 361 | */ |
355 | #define snd_printd(fmt, args...) \ | 362 | #define snd_printd(fmt, args...) \ |
356 | __snd_printk(1, __FILE__, __LINE__, fmt, ##args) | 363 | __snd_printk(1, __FILE__, __LINE__, fmt, ##args) |
364 | #define _snd_printd(level, fmt, args...) \ | ||
365 | __snd_printk(level, __FILE__, __LINE__, fmt, ##args) | ||
357 | 366 | ||
358 | /** | 367 | /** |
359 | * snd_BUG - give a BUG warning message and stack trace | 368 | * snd_BUG - give a BUG warning message and stack trace |
@@ -383,6 +392,7 @@ void __snd_printk(unsigned int level, const char *file, int line, | |||
383 | #else /* !CONFIG_SND_DEBUG */ | 392 | #else /* !CONFIG_SND_DEBUG */ |
384 | 393 | ||
385 | #define snd_printd(fmt, args...) do { } while (0) | 394 | #define snd_printd(fmt, args...) do { } while (0) |
395 | #define _snd_printd(level, fmt, args...) do { } while (0) | ||
386 | #define snd_BUG() do { } while (0) | 396 | #define snd_BUG() do { } while (0) |
387 | static inline int __snd_bug_on(int cond) | 397 | static inline int __snd_bug_on(int cond) |
388 | { | 398 | { |
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, |