diff options
| author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-09-05 08:05:11 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-09-05 08:05:11 -0400 |
| commit | 75d8f2931a803b803cb4a850448460475c20f30b (patch) | |
| tree | 9853b9084fa55609c8e4abbc1763bc500e05da50 /include | |
| parent | ffb690d5aa36d38d7bed7579e3f07b84ff6b3a08 (diff) | |
| parent | e93c7d1bc350189511d32cec2f0af79c30e7fa47 (diff) | |
Merge branch 'asoc-omap' into for-3.7
Diffstat (limited to 'include')
28 files changed, 148 insertions, 62 deletions
diff --git a/include/asm-generic/mutex-xchg.h b/include/asm-generic/mutex-xchg.h index 580a6d35c700..c04e0db8a2d6 100644 --- a/include/asm-generic/mutex-xchg.h +++ b/include/asm-generic/mutex-xchg.h | |||
| @@ -26,7 +26,13 @@ static inline void | |||
| 26 | __mutex_fastpath_lock(atomic_t *count, void (*fail_fn)(atomic_t *)) | 26 | __mutex_fastpath_lock(atomic_t *count, void (*fail_fn)(atomic_t *)) |
| 27 | { | 27 | { |
| 28 | if (unlikely(atomic_xchg(count, 0) != 1)) | 28 | if (unlikely(atomic_xchg(count, 0) != 1)) |
| 29 | fail_fn(count); | 29 | /* |
| 30 | * We failed to acquire the lock, so mark it contended | ||
| 31 | * to ensure that any waiting tasks are woken up by the | ||
| 32 | * unlock slow path. | ||
| 33 | */ | ||
| 34 | if (likely(atomic_xchg(count, -1) != 1)) | ||
| 35 | fail_fn(count); | ||
| 30 | } | 36 | } |
| 31 | 37 | ||
| 32 | /** | 38 | /** |
| @@ -43,7 +49,8 @@ static inline int | |||
| 43 | __mutex_fastpath_lock_retval(atomic_t *count, int (*fail_fn)(atomic_t *)) | 49 | __mutex_fastpath_lock_retval(atomic_t *count, int (*fail_fn)(atomic_t *)) |
| 44 | { | 50 | { |
| 45 | if (unlikely(atomic_xchg(count, 0) != 1)) | 51 | if (unlikely(atomic_xchg(count, 0) != 1)) |
| 46 | return fail_fn(count); | 52 | if (likely(atomic_xchg(count, -1) != 1)) |
| 53 | return fail_fn(count); | ||
| 47 | return 0; | 54 | return 0; |
| 48 | } | 55 | } |
| 49 | 56 | ||
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index a1a0386e0160..bfacf0d5a225 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
| @@ -118,7 +118,8 @@ enum drm_mode_status { | |||
| 118 | .hdisplay = (hd), .hsync_start = (hss), .hsync_end = (hse), \ | 118 | .hdisplay = (hd), .hsync_start = (hss), .hsync_end = (hse), \ |
| 119 | .htotal = (ht), .hskew = (hsk), .vdisplay = (vd), \ | 119 | .htotal = (ht), .hskew = (hsk), .vdisplay = (vd), \ |
| 120 | .vsync_start = (vss), .vsync_end = (vse), .vtotal = (vt), \ | 120 | .vsync_start = (vss), .vsync_end = (vse), .vtotal = (vt), \ |
| 121 | .vscan = (vs), .flags = (f), .vrefresh = 0 | 121 | .vscan = (vs), .flags = (f), .vrefresh = 0, \ |
| 122 | .base.type = DRM_MODE_OBJECT_MODE | ||
| 122 | 123 | ||
| 123 | #define CRTC_INTERLACE_HALVE_V 0x1 /* halve V values for interlacing */ | 124 | #define CRTC_INTERLACE_HALVE_V 0x1 /* halve V values for interlacing */ |
| 124 | 125 | ||
| @@ -166,8 +167,6 @@ struct drm_display_mode { | |||
| 166 | int crtc_vsync_start; | 167 | int crtc_vsync_start; |
| 167 | int crtc_vsync_end; | 168 | int crtc_vsync_end; |
| 168 | int crtc_vtotal; | 169 | int crtc_vtotal; |
| 169 | int crtc_hadjusted; | ||
| 170 | int crtc_vadjusted; | ||
| 171 | 170 | ||
| 172 | /* Driver private mode info */ | 171 | /* Driver private mode info */ |
| 173 | int private_size; | 172 | int private_size; |
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h index 5581980b14f6..3d6301b6ec16 100644 --- a/include/drm/drm_mode.h +++ b/include/drm/drm_mode.h | |||
| @@ -359,8 +359,9 @@ struct drm_mode_mode_cmd { | |||
| 359 | struct drm_mode_modeinfo mode; | 359 | struct drm_mode_modeinfo mode; |
| 360 | }; | 360 | }; |
| 361 | 361 | ||
| 362 | #define DRM_MODE_CURSOR_BO (1<<0) | 362 | #define DRM_MODE_CURSOR_BO 0x01 |
| 363 | #define DRM_MODE_CURSOR_MOVE (1<<1) | 363 | #define DRM_MODE_CURSOR_MOVE 0x02 |
| 364 | #define DRM_MODE_CURSOR_FLAGS 0x03 | ||
| 364 | 365 | ||
| 365 | /* | 366 | /* |
| 366 | * depending on the value in flags different members are used. | 367 | * depending on the value in flags different members are used. |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 4e72a9d48232..4a2ab7c85393 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -601,7 +601,7 @@ static inline void blk_clear_rl_full(struct request_list *rl, bool sync) | |||
| 601 | * it already be started by driver. | 601 | * it already be started by driver. |
| 602 | */ | 602 | */ |
| 603 | #define RQ_NOMERGE_FLAGS \ | 603 | #define RQ_NOMERGE_FLAGS \ |
| 604 | (REQ_NOMERGE | REQ_STARTED | REQ_SOFTBARRIER | REQ_FLUSH | REQ_FUA) | 604 | (REQ_NOMERGE | REQ_STARTED | REQ_SOFTBARRIER | REQ_FLUSH | REQ_FUA | REQ_DISCARD) |
| 605 | #define rq_mergeable(rq) \ | 605 | #define rq_mergeable(rq) \ |
| 606 | (!((rq)->cmd_flags & RQ_NOMERGE_FLAGS) && \ | 606 | (!((rq)->cmd_flags & RQ_NOMERGE_FLAGS) && \ |
| 607 | (((rq)->cmd_flags & REQ_DISCARD) || \ | 607 | (((rq)->cmd_flags & REQ_DISCARD) || \ |
| @@ -894,6 +894,8 @@ extern void blk_queue_flush_queueable(struct request_queue *q, bool queueable); | |||
| 894 | extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev); | 894 | extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev); |
| 895 | 895 | ||
| 896 | extern int blk_rq_map_sg(struct request_queue *, struct request *, struct scatterlist *); | 896 | extern int blk_rq_map_sg(struct request_queue *, struct request *, struct scatterlist *); |
| 897 | extern int blk_bio_map_sg(struct request_queue *q, struct bio *bio, | ||
| 898 | struct scatterlist *sglist); | ||
| 897 | extern void blk_dump_rq_flags(struct request *, char *); | 899 | extern void blk_dump_rq_flags(struct request *, char *); |
| 898 | extern long nr_blockdev_pages(void); | 900 | extern long nr_blockdev_pages(void); |
| 899 | 901 | ||
| @@ -1139,6 +1141,16 @@ static inline int queue_limit_discard_alignment(struct queue_limits *lim, sector | |||
| 1139 | & (lim->discard_granularity - 1); | 1141 | & (lim->discard_granularity - 1); |
| 1140 | } | 1142 | } |
| 1141 | 1143 | ||
| 1144 | static inline int bdev_discard_alignment(struct block_device *bdev) | ||
| 1145 | { | ||
| 1146 | struct request_queue *q = bdev_get_queue(bdev); | ||
| 1147 | |||
| 1148 | if (bdev != bdev->bd_contains) | ||
| 1149 | return bdev->bd_part->discard_alignment; | ||
| 1150 | |||
| 1151 | return q->limits.discard_alignment; | ||
| 1152 | } | ||
| 1153 | |||
| 1142 | static inline unsigned int queue_discard_zeroes_data(struct request_queue *q) | 1154 | static inline unsigned int queue_discard_zeroes_data(struct request_queue *q) |
| 1143 | { | 1155 | { |
| 1144 | if (q->limits.max_discard_sectors && q->limits.discard_zeroes_data == 1) | 1156 | if (q->limits.max_discard_sectors && q->limits.discard_zeroes_data == 1) |
diff --git a/include/linux/compaction.h b/include/linux/compaction.h index 133ddcf83397..ef658147e4e8 100644 --- a/include/linux/compaction.h +++ b/include/linux/compaction.h | |||
| @@ -22,7 +22,7 @@ extern int sysctl_extfrag_handler(struct ctl_table *table, int write, | |||
| 22 | extern int fragmentation_index(struct zone *zone, unsigned int order); | 22 | extern int fragmentation_index(struct zone *zone, unsigned int order); |
| 23 | extern unsigned long try_to_compact_pages(struct zonelist *zonelist, | 23 | extern unsigned long try_to_compact_pages(struct zonelist *zonelist, |
| 24 | int order, gfp_t gfp_mask, nodemask_t *mask, | 24 | int order, gfp_t gfp_mask, nodemask_t *mask, |
| 25 | bool sync); | 25 | bool sync, bool *contended); |
| 26 | extern int compact_pgdat(pg_data_t *pgdat, int order); | 26 | extern int compact_pgdat(pg_data_t *pgdat, int order); |
| 27 | extern unsigned long compaction_suitable(struct zone *zone, int order); | 27 | extern unsigned long compaction_suitable(struct zone *zone, int order); |
| 28 | 28 | ||
| @@ -64,7 +64,7 @@ static inline bool compaction_deferred(struct zone *zone, int order) | |||
| 64 | #else | 64 | #else |
| 65 | static inline unsigned long try_to_compact_pages(struct zonelist *zonelist, | 65 | static inline unsigned long try_to_compact_pages(struct zonelist *zonelist, |
| 66 | int order, gfp_t gfp_mask, nodemask_t *nodemask, | 66 | int order, gfp_t gfp_mask, nodemask_t *nodemask, |
| 67 | bool sync) | 67 | bool sync, bool *contended) |
| 68 | { | 68 | { |
| 69 | return COMPACT_CONTINUE; | 69 | return COMPACT_CONTINUE; |
| 70 | } | 70 | } |
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 040b13b5c14a..279b1eaa8b73 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
| @@ -194,6 +194,10 @@ static inline int cpuidle_play_dead(void) {return -ENODEV; } | |||
| 194 | 194 | ||
| 195 | #ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED | 195 | #ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED |
| 196 | void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev, atomic_t *a); | 196 | void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev, atomic_t *a); |
| 197 | #else | ||
| 198 | static inline void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev, atomic_t *a) | ||
| 199 | { | ||
| 200 | } | ||
| 197 | #endif | 201 | #endif |
| 198 | 202 | ||
| 199 | /****************************** | 203 | /****************************** |
diff --git a/include/linux/efi.h b/include/linux/efi.h index 103adc6d7e3a..ec45ccd8708a 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
| @@ -503,6 +503,8 @@ extern u64 efi_mem_attribute (unsigned long phys_addr, unsigned long size); | |||
| 503 | extern int __init efi_uart_console_only (void); | 503 | extern int __init efi_uart_console_only (void); |
| 504 | extern void efi_initialize_iomem_resources(struct resource *code_resource, | 504 | extern void efi_initialize_iomem_resources(struct resource *code_resource, |
| 505 | struct resource *data_resource, struct resource *bss_resource); | 505 | struct resource *data_resource, struct resource *bss_resource); |
| 506 | extern unsigned long efi_get_time(void); | ||
| 507 | extern int efi_set_rtc_mmss(unsigned long nowtime); | ||
| 506 | extern void efi_reserve_boot_services(void); | 508 | extern void efi_reserve_boot_services(void); |
| 507 | extern struct efi_memory_map memmap; | 509 | extern struct efi_memory_map memmap; |
| 508 | 510 | ||
diff --git a/include/linux/if_team.h b/include/linux/if_team.h index 6960fc1841a7..aa2e167e1ef4 100644 --- a/include/linux/if_team.h +++ b/include/linux/if_team.h | |||
| @@ -96,21 +96,6 @@ static inline void team_netpoll_send_skb(struct team_port *port, | |||
| 96 | } | 96 | } |
| 97 | #endif | 97 | #endif |
| 98 | 98 | ||
| 99 | static inline int team_dev_queue_xmit(struct team *team, struct team_port *port, | ||
| 100 | struct sk_buff *skb) | ||
| 101 | { | ||
| 102 | BUILD_BUG_ON(sizeof(skb->queue_mapping) != | ||
| 103 | sizeof(qdisc_skb_cb(skb)->slave_dev_queue_mapping)); | ||
| 104 | skb_set_queue_mapping(skb, qdisc_skb_cb(skb)->slave_dev_queue_mapping); | ||
| 105 | |||
| 106 | skb->dev = port->dev; | ||
| 107 | if (unlikely(netpoll_tx_running(port->dev))) { | ||
| 108 | team_netpoll_send_skb(port, skb); | ||
| 109 | return 0; | ||
| 110 | } | ||
| 111 | return dev_queue_xmit(skb); | ||
| 112 | } | ||
| 113 | |||
| 114 | struct team_mode_ops { | 99 | struct team_mode_ops { |
| 115 | int (*init)(struct team *team); | 100 | int (*init)(struct team *team); |
| 116 | void (*exit)(struct team *team); | 101 | void (*exit)(struct team *team); |
| @@ -200,6 +185,21 @@ struct team { | |||
| 200 | long mode_priv[TEAM_MODE_PRIV_LONGS]; | 185 | long mode_priv[TEAM_MODE_PRIV_LONGS]; |
| 201 | }; | 186 | }; |
| 202 | 187 | ||
| 188 | static inline int team_dev_queue_xmit(struct team *team, struct team_port *port, | ||
| 189 | struct sk_buff *skb) | ||
| 190 | { | ||
| 191 | BUILD_BUG_ON(sizeof(skb->queue_mapping) != | ||
| 192 | sizeof(qdisc_skb_cb(skb)->slave_dev_queue_mapping)); | ||
| 193 | skb_set_queue_mapping(skb, qdisc_skb_cb(skb)->slave_dev_queue_mapping); | ||
| 194 | |||
| 195 | skb->dev = port->dev; | ||
| 196 | if (unlikely(netpoll_tx_running(team->dev))) { | ||
| 197 | team_netpoll_send_skb(port, skb); | ||
| 198 | return 0; | ||
| 199 | } | ||
| 200 | return dev_queue_xmit(skb); | ||
| 201 | } | ||
| 202 | |||
| 203 | static inline struct hlist_head *team_port_index_hash(struct team *team, | 203 | static inline struct hlist_head *team_port_index_hash(struct team *team, |
| 204 | int port_index) | 204 | int port_index) |
| 205 | { | 205 | { |
diff --git a/include/linux/iio/frequency/adf4350.h b/include/linux/iio/frequency/adf4350.h index b76b4a87065e..be91f344d5fc 100644 --- a/include/linux/iio/frequency/adf4350.h +++ b/include/linux/iio/frequency/adf4350.h | |||
| @@ -87,6 +87,8 @@ | |||
| 87 | #define ADF4350_MAX_BANDSEL_CLK 125000 /* Hz */ | 87 | #define ADF4350_MAX_BANDSEL_CLK 125000 /* Hz */ |
| 88 | #define ADF4350_MAX_FREQ_REFIN 250000000 /* Hz */ | 88 | #define ADF4350_MAX_FREQ_REFIN 250000000 /* Hz */ |
| 89 | #define ADF4350_MAX_MODULUS 4095 | 89 | #define ADF4350_MAX_MODULUS 4095 |
| 90 | #define ADF4350_MAX_R_CNT 1023 | ||
| 91 | |||
| 90 | 92 | ||
| 91 | /** | 93 | /** |
| 92 | * struct adf4350_platform_data - platform specific information | 94 | * struct adf4350_platform_data - platform specific information |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index f334c7fab967..3efc43f3f162 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
| @@ -1125,6 +1125,7 @@ extern int jbd2_journal_destroy (journal_t *); | |||
| 1125 | extern int jbd2_journal_recover (journal_t *journal); | 1125 | extern int jbd2_journal_recover (journal_t *journal); |
| 1126 | extern int jbd2_journal_wipe (journal_t *, int); | 1126 | extern int jbd2_journal_wipe (journal_t *, int); |
| 1127 | extern int jbd2_journal_skip_recovery (journal_t *); | 1127 | extern int jbd2_journal_skip_recovery (journal_t *); |
| 1128 | extern void jbd2_journal_update_sb_errno(journal_t *); | ||
| 1128 | extern void jbd2_journal_update_sb_log_tail (journal_t *, tid_t, | 1129 | extern void jbd2_journal_update_sb_log_tail (journal_t *, tid_t, |
| 1129 | unsigned long, int); | 1130 | unsigned long, int); |
| 1130 | extern void __jbd2_journal_abort_hard (journal_t *); | 1131 | extern void __jbd2_journal_abort_hard (journal_t *); |
diff --git a/include/linux/kref.h b/include/linux/kref.h index 9c07dcebded7..65af6887872f 100644 --- a/include/linux/kref.h +++ b/include/linux/kref.h | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include <linux/bug.h> | 18 | #include <linux/bug.h> |
| 19 | #include <linux/atomic.h> | 19 | #include <linux/atomic.h> |
| 20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
| 21 | #include <linux/mutex.h> | ||
| 21 | 22 | ||
| 22 | struct kref { | 23 | struct kref { |
| 23 | atomic_t refcount; | 24 | atomic_t refcount; |
| @@ -93,4 +94,21 @@ static inline int kref_put(struct kref *kref, void (*release)(struct kref *kref) | |||
| 93 | { | 94 | { |
| 94 | return kref_sub(kref, 1, release); | 95 | return kref_sub(kref, 1, release); |
| 95 | } | 96 | } |
| 97 | |||
| 98 | static inline int kref_put_mutex(struct kref *kref, | ||
| 99 | void (*release)(struct kref *kref), | ||
| 100 | struct mutex *lock) | ||
| 101 | { | ||
| 102 | WARN_ON(release == NULL); | ||
| 103 | if (unlikely(!atomic_add_unless(&kref->refcount, -1, 1))) { | ||
| 104 | mutex_lock(lock); | ||
| 105 | if (unlikely(!atomic_dec_and_test(&kref->refcount))) { | ||
| 106 | mutex_unlock(lock); | ||
| 107 | return 0; | ||
| 108 | } | ||
| 109 | release(kref); | ||
| 110 | return 1; | ||
| 111 | } | ||
| 112 | return 0; | ||
| 113 | } | ||
| 96 | #endif /* _KREF_H_ */ | 114 | #endif /* _KREF_H_ */ |
diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 603bec2913b0..06177ba10a16 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h | |||
| @@ -58,13 +58,6 @@ union ktime { | |||
| 58 | 58 | ||
| 59 | typedef union ktime ktime_t; /* Kill this */ | 59 | typedef union ktime ktime_t; /* Kill this */ |
| 60 | 60 | ||
| 61 | #define KTIME_MAX ((s64)~((u64)1 << 63)) | ||
| 62 | #if (BITS_PER_LONG == 64) | ||
| 63 | # define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC) | ||
| 64 | #else | ||
| 65 | # define KTIME_SEC_MAX LONG_MAX | ||
| 66 | #endif | ||
| 67 | |||
| 68 | /* | 61 | /* |
| 69 | * ktime_t definitions when using the 64-bit scalar representation: | 62 | * ktime_t definitions when using the 64-bit scalar representation: |
| 70 | */ | 63 | */ |
diff --git a/include/linux/mv643xx_eth.h b/include/linux/mv643xx_eth.h index 51bf8ada6dc0..49258e0ed1c6 100644 --- a/include/linux/mv643xx_eth.h +++ b/include/linux/mv643xx_eth.h | |||
| @@ -15,6 +15,8 @@ | |||
| 15 | #define MV643XX_ETH_SIZE_REG_4 0x2224 | 15 | #define MV643XX_ETH_SIZE_REG_4 0x2224 |
| 16 | #define MV643XX_ETH_BASE_ADDR_ENABLE_REG 0x2290 | 16 | #define MV643XX_ETH_BASE_ADDR_ENABLE_REG 0x2290 |
| 17 | 17 | ||
| 18 | #define MV643XX_TX_CSUM_DEFAULT_LIMIT 0 | ||
| 19 | |||
| 18 | struct mv643xx_eth_shared_platform_data { | 20 | struct mv643xx_eth_shared_platform_data { |
| 19 | struct mbus_dram_target_info *dram; | 21 | struct mbus_dram_target_info *dram; |
| 20 | struct platform_device *shared_smi; | 22 | struct platform_device *shared_smi; |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index a9db4f33407f..59dc05f38247 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -953,7 +953,8 @@ struct net_device_ops { | |||
| 953 | #ifdef CONFIG_NET_POLL_CONTROLLER | 953 | #ifdef CONFIG_NET_POLL_CONTROLLER |
| 954 | void (*ndo_poll_controller)(struct net_device *dev); | 954 | void (*ndo_poll_controller)(struct net_device *dev); |
| 955 | int (*ndo_netpoll_setup)(struct net_device *dev, | 955 | int (*ndo_netpoll_setup)(struct net_device *dev, |
| 956 | struct netpoll_info *info); | 956 | struct netpoll_info *info, |
| 957 | gfp_t gfp); | ||
| 957 | void (*ndo_netpoll_cleanup)(struct net_device *dev); | 958 | void (*ndo_netpoll_cleanup)(struct net_device *dev); |
| 958 | #endif | 959 | #endif |
| 959 | int (*ndo_set_vf_mac)(struct net_device *dev, | 960 | int (*ndo_set_vf_mac)(struct net_device *dev, |
| @@ -1521,6 +1522,8 @@ struct packet_type { | |||
| 1521 | struct sk_buff **(*gro_receive)(struct sk_buff **head, | 1522 | struct sk_buff **(*gro_receive)(struct sk_buff **head, |
| 1522 | struct sk_buff *skb); | 1523 | struct sk_buff *skb); |
| 1523 | int (*gro_complete)(struct sk_buff *skb); | 1524 | int (*gro_complete)(struct sk_buff *skb); |
| 1525 | bool (*id_match)(struct packet_type *ptype, | ||
| 1526 | struct sock *sk); | ||
| 1524 | void *af_packet_priv; | 1527 | void *af_packet_priv; |
| 1525 | struct list_head list; | 1528 | struct list_head list; |
| 1526 | }; | 1529 | }; |
diff --git a/include/linux/netfilter/nf_conntrack_sip.h b/include/linux/netfilter/nf_conntrack_sip.h index 0dfc8b7210a3..89f2a627f3f0 100644 --- a/include/linux/netfilter/nf_conntrack_sip.h +++ b/include/linux/netfilter/nf_conntrack_sip.h | |||
| @@ -164,7 +164,7 @@ extern int ct_sip_parse_address_param(const struct nf_conn *ct, const char *dptr | |||
| 164 | unsigned int dataoff, unsigned int datalen, | 164 | unsigned int dataoff, unsigned int datalen, |
| 165 | const char *name, | 165 | const char *name, |
| 166 | unsigned int *matchoff, unsigned int *matchlen, | 166 | unsigned int *matchoff, unsigned int *matchlen, |
| 167 | union nf_inet_addr *addr); | 167 | union nf_inet_addr *addr, bool delim); |
| 168 | extern int ct_sip_parse_numerical_param(const struct nf_conn *ct, const char *dptr, | 168 | extern int ct_sip_parse_numerical_param(const struct nf_conn *ct, const char *dptr, |
| 169 | unsigned int off, unsigned int datalen, | 169 | unsigned int off, unsigned int datalen, |
| 170 | const char *name, | 170 | const char *name, |
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index 28f5389c924b..66d5379c305e 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h | |||
| @@ -23,6 +23,7 @@ struct netpoll { | |||
| 23 | u8 remote_mac[ETH_ALEN]; | 23 | u8 remote_mac[ETH_ALEN]; |
| 24 | 24 | ||
| 25 | struct list_head rx; /* rx_np list element */ | 25 | struct list_head rx; /* rx_np list element */ |
| 26 | struct rcu_head rcu; | ||
| 26 | }; | 27 | }; |
| 27 | 28 | ||
| 28 | struct netpoll_info { | 29 | struct netpoll_info { |
| @@ -38,28 +39,40 @@ struct netpoll_info { | |||
| 38 | struct delayed_work tx_work; | 39 | struct delayed_work tx_work; |
| 39 | 40 | ||
| 40 | struct netpoll *netpoll; | 41 | struct netpoll *netpoll; |
| 42 | struct rcu_head rcu; | ||
| 41 | }; | 43 | }; |
| 42 | 44 | ||
| 43 | void netpoll_send_udp(struct netpoll *np, const char *msg, int len); | 45 | void netpoll_send_udp(struct netpoll *np, const char *msg, int len); |
| 44 | void netpoll_print_options(struct netpoll *np); | 46 | void netpoll_print_options(struct netpoll *np); |
| 45 | int netpoll_parse_options(struct netpoll *np, char *opt); | 47 | int netpoll_parse_options(struct netpoll *np, char *opt); |
| 46 | int __netpoll_setup(struct netpoll *np, struct net_device *ndev); | 48 | int __netpoll_setup(struct netpoll *np, struct net_device *ndev, gfp_t gfp); |
| 47 | int netpoll_setup(struct netpoll *np); | 49 | int netpoll_setup(struct netpoll *np); |
| 48 | int netpoll_trap(void); | 50 | int netpoll_trap(void); |
| 49 | void netpoll_set_trap(int trap); | 51 | void netpoll_set_trap(int trap); |
| 50 | void __netpoll_cleanup(struct netpoll *np); | 52 | void __netpoll_cleanup(struct netpoll *np); |
| 53 | void __netpoll_free_rcu(struct netpoll *np); | ||
| 51 | void netpoll_cleanup(struct netpoll *np); | 54 | void netpoll_cleanup(struct netpoll *np); |
| 52 | int __netpoll_rx(struct sk_buff *skb); | 55 | int __netpoll_rx(struct sk_buff *skb, struct netpoll_info *npinfo); |
| 53 | void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb, | 56 | void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb, |
| 54 | struct net_device *dev); | 57 | struct net_device *dev); |
| 55 | static inline void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) | 58 | static inline void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) |
| 56 | { | 59 | { |
| 60 | unsigned long flags; | ||
| 61 | local_irq_save(flags); | ||
| 57 | netpoll_send_skb_on_dev(np, skb, np->dev); | 62 | netpoll_send_skb_on_dev(np, skb, np->dev); |
| 63 | local_irq_restore(flags); | ||
| 58 | } | 64 | } |
| 59 | 65 | ||
| 60 | 66 | ||
| 61 | 67 | ||
| 62 | #ifdef CONFIG_NETPOLL | 68 | #ifdef CONFIG_NETPOLL |
| 69 | static inline bool netpoll_rx_on(struct sk_buff *skb) | ||
| 70 | { | ||
| 71 | struct netpoll_info *npinfo = rcu_dereference_bh(skb->dev->npinfo); | ||
| 72 | |||
| 73 | return npinfo && (!list_empty(&npinfo->rx_np) || npinfo->rx_flags); | ||
| 74 | } | ||
| 75 | |||
| 63 | static inline bool netpoll_rx(struct sk_buff *skb) | 76 | static inline bool netpoll_rx(struct sk_buff *skb) |
| 64 | { | 77 | { |
| 65 | struct netpoll_info *npinfo; | 78 | struct netpoll_info *npinfo; |
| @@ -67,14 +80,14 @@ static inline bool netpoll_rx(struct sk_buff *skb) | |||
| 67 | bool ret = false; | 80 | bool ret = false; |
| 68 | 81 | ||
| 69 | local_irq_save(flags); | 82 | local_irq_save(flags); |
| 70 | npinfo = rcu_dereference_bh(skb->dev->npinfo); | ||
| 71 | 83 | ||
| 72 | if (!npinfo || (list_empty(&npinfo->rx_np) && !npinfo->rx_flags)) | 84 | if (!netpoll_rx_on(skb)) |
| 73 | goto out; | 85 | goto out; |
| 74 | 86 | ||
| 87 | npinfo = rcu_dereference_bh(skb->dev->npinfo); | ||
| 75 | spin_lock(&npinfo->rx_lock); | 88 | spin_lock(&npinfo->rx_lock); |
| 76 | /* check rx_flags again with the lock held */ | 89 | /* check rx_flags again with the lock held */ |
| 77 | if (npinfo->rx_flags && __netpoll_rx(skb)) | 90 | if (npinfo->rx_flags && __netpoll_rx(skb, npinfo)) |
| 78 | ret = true; | 91 | ret = true; |
| 79 | spin_unlock(&npinfo->rx_lock); | 92 | spin_unlock(&npinfo->rx_lock); |
| 80 | 93 | ||
| @@ -83,13 +96,6 @@ out: | |||
| 83 | return ret; | 96 | return ret; |
| 84 | } | 97 | } |
| 85 | 98 | ||
| 86 | static inline int netpoll_rx_on(struct sk_buff *skb) | ||
| 87 | { | ||
| 88 | struct netpoll_info *npinfo = rcu_dereference_bh(skb->dev->npinfo); | ||
| 89 | |||
| 90 | return npinfo && (!list_empty(&npinfo->rx_np) || npinfo->rx_flags); | ||
| 91 | } | ||
| 92 | |||
| 93 | static inline int netpoll_receive_skb(struct sk_buff *skb) | 99 | static inline int netpoll_receive_skb(struct sk_buff *skb) |
| 94 | { | 100 | { |
| 95 | if (!list_empty(&skb->dev->napi_list)) | 101 | if (!list_empty(&skb->dev->napi_list)) |
| @@ -119,7 +125,7 @@ static inline void netpoll_poll_unlock(void *have) | |||
| 119 | } | 125 | } |
| 120 | } | 126 | } |
| 121 | 127 | ||
| 122 | static inline int netpoll_tx_running(struct net_device *dev) | 128 | static inline bool netpoll_tx_running(struct net_device *dev) |
| 123 | { | 129 | { |
| 124 | return irqs_disabled(); | 130 | return irqs_disabled(); |
| 125 | } | 131 | } |
| @@ -127,11 +133,11 @@ static inline int netpoll_tx_running(struct net_device *dev) | |||
| 127 | #else | 133 | #else |
| 128 | static inline bool netpoll_rx(struct sk_buff *skb) | 134 | static inline bool netpoll_rx(struct sk_buff *skb) |
| 129 | { | 135 | { |
| 130 | return 0; | 136 | return false; |
| 131 | } | 137 | } |
| 132 | static inline int netpoll_rx_on(struct sk_buff *skb) | 138 | static inline bool netpoll_rx_on(struct sk_buff *skb) |
| 133 | { | 139 | { |
| 134 | return 0; | 140 | return false; |
| 135 | } | 141 | } |
| 136 | static inline int netpoll_receive_skb(struct sk_buff *skb) | 142 | static inline int netpoll_receive_skb(struct sk_buff *skb) |
| 137 | { | 143 | { |
| @@ -147,9 +153,9 @@ static inline void netpoll_poll_unlock(void *have) | |||
| 147 | static inline void netpoll_netdev_init(struct net_device *dev) | 153 | static inline void netpoll_netdev_init(struct net_device *dev) |
| 148 | { | 154 | { |
| 149 | } | 155 | } |
| 150 | static inline int netpoll_tx_running(struct net_device *dev) | 156 | static inline bool netpoll_tx_running(struct net_device *dev) |
| 151 | { | 157 | { |
| 152 | return 0; | 158 | return false; |
| 153 | } | 159 | } |
| 154 | #endif | 160 | #endif |
| 155 | 161 | ||
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index 880805774f9f..92ce5783b707 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h | |||
| @@ -69,6 +69,7 @@ struct nfs_pageio_descriptor { | |||
| 69 | const struct nfs_pgio_completion_ops *pg_completion_ops; | 69 | const struct nfs_pgio_completion_ops *pg_completion_ops; |
| 70 | struct pnfs_layout_segment *pg_lseg; | 70 | struct pnfs_layout_segment *pg_lseg; |
| 71 | struct nfs_direct_req *pg_dreq; | 71 | struct nfs_direct_req *pg_dreq; |
| 72 | void *pg_layout_private; | ||
| 72 | }; | 73 | }; |
| 73 | 74 | ||
| 74 | #define NFS_WBACK_BUSY(req) (test_bit(PG_BUSY,&(req)->wb_flags)) | 75 | #define NFS_WBACK_BUSY(req) (test_bit(PG_BUSY,&(req)->wb_flags)) |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 00485e084394..ac7c8ae254f2 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -1248,6 +1248,7 @@ struct nfs_pgio_header { | |||
| 1248 | void (*release) (struct nfs_pgio_header *hdr); | 1248 | void (*release) (struct nfs_pgio_header *hdr); |
| 1249 | const struct nfs_pgio_completion_ops *completion_ops; | 1249 | const struct nfs_pgio_completion_ops *completion_ops; |
| 1250 | struct nfs_direct_req *dreq; | 1250 | struct nfs_direct_req *dreq; |
| 1251 | void *layout_private; | ||
| 1251 | spinlock_t lock; | 1252 | spinlock_t lock; |
| 1252 | /* fields protected by lock */ | 1253 | /* fields protected by lock */ |
| 1253 | int pnfs_error; | 1254 | int pnfs_error; |
diff --git a/include/linux/of.h b/include/linux/of.h index 5919ee33f2b7..1b1163225f3b 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
| @@ -190,10 +190,17 @@ extern struct device_node *of_get_parent(const struct device_node *node); | |||
| 190 | extern struct device_node *of_get_next_parent(struct device_node *node); | 190 | extern struct device_node *of_get_next_parent(struct device_node *node); |
| 191 | extern struct device_node *of_get_next_child(const struct device_node *node, | 191 | extern struct device_node *of_get_next_child(const struct device_node *node, |
| 192 | struct device_node *prev); | 192 | struct device_node *prev); |
| 193 | extern struct device_node *of_get_next_available_child( | ||
| 194 | const struct device_node *node, struct device_node *prev); | ||
| 195 | |||
| 193 | #define for_each_child_of_node(parent, child) \ | 196 | #define for_each_child_of_node(parent, child) \ |
| 194 | for (child = of_get_next_child(parent, NULL); child != NULL; \ | 197 | for (child = of_get_next_child(parent, NULL); child != NULL; \ |
| 195 | child = of_get_next_child(parent, child)) | 198 | child = of_get_next_child(parent, child)) |
| 196 | 199 | ||
| 200 | #define for_each_available_child_of_node(parent, child) \ | ||
| 201 | for (child = of_get_next_available_child(parent, NULL); child != NULL; \ | ||
| 202 | child = of_get_next_available_child(parent, child)) | ||
| 203 | |||
| 197 | static inline int of_get_child_count(const struct device_node *np) | 204 | static inline int of_get_child_count(const struct device_node *np) |
| 198 | { | 205 | { |
| 199 | struct device_node *child; | 206 | struct device_node *child; |
diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.h index 6dd96fb45482..e9b7f4350844 100644 --- a/include/linux/pinctrl/consumer.h +++ b/include/linux/pinctrl/consumer.h | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | /* This struct is private to the core and should be regarded as a cookie */ | 20 | /* This struct is private to the core and should be regarded as a cookie */ |
| 21 | struct pinctrl; | 21 | struct pinctrl; |
| 22 | struct pinctrl_state; | 22 | struct pinctrl_state; |
| 23 | struct device; | ||
| 23 | 24 | ||
| 24 | #ifdef CONFIG_PINCTRL | 25 | #ifdef CONFIG_PINCTRL |
| 25 | 26 | ||
diff --git a/include/linux/string.h b/include/linux/string.h index ffe0442e18d2..b9178812d9df 100644 --- a/include/linux/string.h +++ b/include/linux/string.h | |||
| @@ -144,8 +144,8 @@ static inline bool strstarts(const char *str, const char *prefix) | |||
| 144 | { | 144 | { |
| 145 | return strncmp(str, prefix, strlen(prefix)) == 0; | 145 | return strncmp(str, prefix, strlen(prefix)) == 0; |
| 146 | } | 146 | } |
| 147 | #endif | ||
| 148 | 147 | ||
| 149 | extern size_t memweight(const void *ptr, size_t bytes); | 148 | extern size_t memweight(const void *ptr, size_t bytes); |
| 150 | 149 | ||
| 150 | #endif /* __KERNEL__ */ | ||
| 151 | #endif /* _LINUX_STRING_H_ */ | 151 | #endif /* _LINUX_STRING_H_ */ |
diff --git a/include/linux/time.h b/include/linux/time.h index c81c5e40fcb5..b51e664c83e7 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
| @@ -107,11 +107,36 @@ static inline struct timespec timespec_sub(struct timespec lhs, | |||
| 107 | return ts_delta; | 107 | return ts_delta; |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | #define KTIME_MAX ((s64)~((u64)1 << 63)) | ||
| 111 | #if (BITS_PER_LONG == 64) | ||
| 112 | # define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC) | ||
| 113 | #else | ||
| 114 | # define KTIME_SEC_MAX LONG_MAX | ||
| 115 | #endif | ||
| 116 | |||
| 110 | /* | 117 | /* |
| 111 | * Returns true if the timespec is norm, false if denorm: | 118 | * Returns true if the timespec is norm, false if denorm: |
| 112 | */ | 119 | */ |
| 113 | #define timespec_valid(ts) \ | 120 | static inline bool timespec_valid(const struct timespec *ts) |
| 114 | (((ts)->tv_sec >= 0) && (((unsigned long) (ts)->tv_nsec) < NSEC_PER_SEC)) | 121 | { |
| 122 | /* Dates before 1970 are bogus */ | ||
| 123 | if (ts->tv_sec < 0) | ||
| 124 | return false; | ||
| 125 | /* Can't have more nanoseconds then a second */ | ||
| 126 | if ((unsigned long)ts->tv_nsec >= NSEC_PER_SEC) | ||
| 127 | return false; | ||
| 128 | return true; | ||
| 129 | } | ||
| 130 | |||
| 131 | static inline bool timespec_valid_strict(const struct timespec *ts) | ||
| 132 | { | ||
| 133 | if (!timespec_valid(ts)) | ||
| 134 | return false; | ||
| 135 | /* Disallow values that could overflow ktime_t */ | ||
| 136 | if ((unsigned long long)ts->tv_sec >= KTIME_SEC_MAX) | ||
| 137 | return false; | ||
| 138 | return true; | ||
| 139 | } | ||
| 115 | 140 | ||
| 116 | extern void read_persistent_clock(struct timespec *ts); | 141 | extern void read_persistent_clock(struct timespec *ts); |
| 117 | extern void read_boot_clock(struct timespec *ts); | 142 | extern void read_boot_clock(struct timespec *ts); |
diff --git a/include/net/llc.h b/include/net/llc.h index 226c846cab08..f2d0fc570527 100644 --- a/include/net/llc.h +++ b/include/net/llc.h | |||
| @@ -133,7 +133,7 @@ extern int llc_build_and_send_ui_pkt(struct llc_sap *sap, struct sk_buff *skb, | |||
| 133 | extern void llc_sap_handler(struct llc_sap *sap, struct sk_buff *skb); | 133 | extern void llc_sap_handler(struct llc_sap *sap, struct sk_buff *skb); |
| 134 | extern void llc_conn_handler(struct llc_sap *sap, struct sk_buff *skb); | 134 | extern void llc_conn_handler(struct llc_sap *sap, struct sk_buff *skb); |
| 135 | 135 | ||
| 136 | extern int llc_station_init(void); | 136 | extern void llc_station_init(void); |
| 137 | extern void llc_station_exit(void); | 137 | extern void llc_station_exit(void); |
| 138 | 138 | ||
| 139 | #ifdef CONFIG_PROC_FS | 139 | #ifdef CONFIG_PROC_FS |
diff --git a/include/net/scm.h b/include/net/scm.h index 079d7887dac1..7dc0854f0b38 100644 --- a/include/net/scm.h +++ b/include/net/scm.h | |||
| @@ -70,9 +70,11 @@ static __inline__ void scm_destroy(struct scm_cookie *scm) | |||
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | static __inline__ int scm_send(struct socket *sock, struct msghdr *msg, | 72 | static __inline__ int scm_send(struct socket *sock, struct msghdr *msg, |
| 73 | struct scm_cookie *scm) | 73 | struct scm_cookie *scm, bool forcecreds) |
| 74 | { | 74 | { |
| 75 | memset(scm, 0, sizeof(*scm)); | 75 | memset(scm, 0, sizeof(*scm)); |
| 76 | if (forcecreds) | ||
| 77 | scm_set_cred(scm, task_tgid(current), current_cred()); | ||
| 76 | unix_get_peersec_dgram(sock, scm); | 78 | unix_get_peersec_dgram(sock, scm); |
| 77 | if (msg->msg_controllen <= 0) | 79 | if (msg->msg_controllen <= 0) |
| 78 | return 0; | 80 | return 0; |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 62b619e82a90..976a81abe1a2 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
| @@ -292,6 +292,8 @@ struct xfrm_policy_afinfo { | |||
| 292 | struct flowi *fl, | 292 | struct flowi *fl, |
| 293 | int reverse); | 293 | int reverse); |
| 294 | int (*get_tos)(const struct flowi *fl); | 294 | int (*get_tos)(const struct flowi *fl); |
| 295 | void (*init_dst)(struct net *net, | ||
| 296 | struct xfrm_dst *dst); | ||
| 295 | int (*init_path)(struct xfrm_dst *path, | 297 | int (*init_path)(struct xfrm_dst *path, |
| 296 | struct dst_entry *dst, | 298 | struct dst_entry *dst, |
| 297 | int nfheader_len); | 299 | int nfheader_len); |
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index c75c0d1a85e2..cdca2ab1e711 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
| @@ -1075,7 +1075,8 @@ static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max) | |||
| 1075 | const char *snd_pcm_format_name(snd_pcm_format_t format); | 1075 | const char *snd_pcm_format_name(snd_pcm_format_t format); |
| 1076 | 1076 | ||
| 1077 | /** | 1077 | /** |
| 1078 | * Get a string naming the direction of a stream | 1078 | * snd_pcm_stream_str - Get a string naming the direction of a stream |
| 1079 | * @substream: the pcm substream instance | ||
| 1079 | */ | 1080 | */ |
| 1080 | static inline const char *snd_pcm_stream_str(struct snd_pcm_substream *substream) | 1081 | static inline const char *snd_pcm_stream_str(struct snd_pcm_substream *substream) |
| 1081 | { | 1082 | { |
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 128ce46fa48a..015cea01ae39 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
| @@ -503,8 +503,6 @@ struct se_cmd { | |||
| 503 | u32 se_ordered_id; | 503 | u32 se_ordered_id; |
| 504 | /* Total size in bytes associated with command */ | 504 | /* Total size in bytes associated with command */ |
| 505 | u32 data_length; | 505 | u32 data_length; |
| 506 | /* SCSI Presented Data Transfer Length */ | ||
| 507 | u32 cmd_spdtl; | ||
| 508 | u32 residual_count; | 506 | u32 residual_count; |
| 509 | u32 orig_fe_lun; | 507 | u32 orig_fe_lun; |
| 510 | /* Persistent Reservation key */ | 508 | /* Persistent Reservation key */ |
diff --git a/include/xen/events.h b/include/xen/events.h index 9c641deb65d2..04399b28e821 100644 --- a/include/xen/events.h +++ b/include/xen/events.h | |||
| @@ -58,8 +58,6 @@ void notify_remote_via_irq(int irq); | |||
| 58 | 58 | ||
| 59 | void xen_irq_resume(void); | 59 | void xen_irq_resume(void); |
| 60 | 60 | ||
| 61 | void xen_hvm_prepare_kexec(struct shared_info *sip, unsigned long pfn); | ||
| 62 | |||
| 63 | /* Clear an irq's pending state, in preparation for polling on it */ | 61 | /* Clear an irq's pending state, in preparation for polling on it */ |
| 64 | void xen_clear_irq_pending(int irq); | 62 | void xen_clear_irq_pending(int irq); |
| 65 | void xen_set_irq_pending(int irq); | 63 | void xen_set_irq_pending(int irq); |
