diff options
| author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-05-21 12:39:21 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-05-21 12:39:21 -0400 |
| commit | 4510dbe324876f2f2f3dc9931e97ec0e98f1ee26 (patch) | |
| tree | d42a8ff24b82e0c6b01756b3f2c33756fc30fc17 /include/linux | |
| parent | b296263398f08d21e68d5d7b2afc43228c208b71 (diff) | |
| parent | c7788792a5e7b0d5d7f96d0766b4cb6112d47d75 (diff) | |
Merge tag 'v3.10-rc2' into asoc-ux500
Linux 3.10-rc2
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/journal-head.h | 8 | ||||
| -rw-r--r-- | include/linux/kref.h | 33 | ||||
| -rw-r--r-- | include/linux/mlx4/qp.h | 29 | ||||
| -rw-r--r-- | include/linux/of_platform.h | 5 | ||||
| -rw-r--r-- | include/linux/pinctrl/pinconf-generic.h | 12 | ||||
| -rw-r--r-- | include/linux/spi/spi.h | 4 | ||||
| -rw-r--r-- | include/linux/time.h | 4 |
7 files changed, 77 insertions, 18 deletions
diff --git a/include/linux/journal-head.h b/include/linux/journal-head.h index 13a3da25ff07..98cd41bb39c8 100644 --- a/include/linux/journal-head.h +++ b/include/linux/journal-head.h | |||
| @@ -30,15 +30,19 @@ struct journal_head { | |||
| 30 | 30 | ||
| 31 | /* | 31 | /* |
| 32 | * Journalling list for this buffer [jbd_lock_bh_state()] | 32 | * Journalling list for this buffer [jbd_lock_bh_state()] |
| 33 | * NOTE: We *cannot* combine this with b_modified into a bitfield | ||
| 34 | * as gcc would then (which the C standard allows but which is | ||
| 35 | * very unuseful) make 64-bit accesses to the bitfield and clobber | ||
| 36 | * b_jcount if its update races with bitfield modification. | ||
| 33 | */ | 37 | */ |
| 34 | unsigned b_jlist:4; | 38 | unsigned b_jlist; |
| 35 | 39 | ||
| 36 | /* | 40 | /* |
| 37 | * This flag signals the buffer has been modified by | 41 | * This flag signals the buffer has been modified by |
| 38 | * the currently running transaction | 42 | * the currently running transaction |
| 39 | * [jbd_lock_bh_state()] | 43 | * [jbd_lock_bh_state()] |
| 40 | */ | 44 | */ |
| 41 | unsigned b_modified:1; | 45 | unsigned b_modified; |
| 42 | 46 | ||
| 43 | /* | 47 | /* |
| 44 | * Copy of the buffer data frozen for writing to the log. | 48 | * Copy of the buffer data frozen for writing to the log. |
diff --git a/include/linux/kref.h b/include/linux/kref.h index e15828fd71f1..484604d184be 100644 --- a/include/linux/kref.h +++ b/include/linux/kref.h | |||
| @@ -19,6 +19,7 @@ | |||
| 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 | #include <linux/mutex.h> |
| 22 | #include <linux/spinlock.h> | ||
| 22 | 23 | ||
| 23 | struct kref { | 24 | struct kref { |
| 24 | atomic_t refcount; | 25 | atomic_t refcount; |
| @@ -98,6 +99,38 @@ static inline int kref_put(struct kref *kref, void (*release)(struct kref *kref) | |||
| 98 | return kref_sub(kref, 1, release); | 99 | return kref_sub(kref, 1, release); |
| 99 | } | 100 | } |
| 100 | 101 | ||
| 102 | /** | ||
| 103 | * kref_put_spinlock_irqsave - decrement refcount for object. | ||
| 104 | * @kref: object. | ||
| 105 | * @release: pointer to the function that will clean up the object when the | ||
| 106 | * last reference to the object is released. | ||
| 107 | * This pointer is required, and it is not acceptable to pass kfree | ||
| 108 | * in as this function. | ||
| 109 | * @lock: lock to take in release case | ||
| 110 | * | ||
| 111 | * Behaves identical to kref_put with one exception. If the reference count | ||
| 112 | * drops to zero, the lock will be taken atomically wrt dropping the reference | ||
| 113 | * count. The release function has to call spin_unlock() without _irqrestore. | ||
| 114 | */ | ||
| 115 | static inline int kref_put_spinlock_irqsave(struct kref *kref, | ||
| 116 | void (*release)(struct kref *kref), | ||
| 117 | spinlock_t *lock) | ||
| 118 | { | ||
| 119 | unsigned long flags; | ||
| 120 | |||
| 121 | WARN_ON(release == NULL); | ||
| 122 | if (atomic_add_unless(&kref->refcount, -1, 1)) | ||
| 123 | return 0; | ||
| 124 | spin_lock_irqsave(lock, flags); | ||
| 125 | if (atomic_dec_and_test(&kref->refcount)) { | ||
| 126 | release(kref); | ||
| 127 | local_irq_restore(flags); | ||
| 128 | return 1; | ||
| 129 | } | ||
| 130 | spin_unlock_irqrestore(lock, flags); | ||
| 131 | return 0; | ||
| 132 | } | ||
| 133 | |||
| 101 | static inline int kref_put_mutex(struct kref *kref, | 134 | static inline int kref_put_mutex(struct kref *kref, |
| 102 | void (*release)(struct kref *kref), | 135 | void (*release)(struct kref *kref), |
| 103 | struct mutex *lock) | 136 | struct mutex *lock) |
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h index 67f46ad6920a..352eec9df1b8 100644 --- a/include/linux/mlx4/qp.h +++ b/include/linux/mlx4/qp.h | |||
| @@ -126,7 +126,7 @@ struct mlx4_rss_context { | |||
| 126 | 126 | ||
| 127 | struct mlx4_qp_path { | 127 | struct mlx4_qp_path { |
| 128 | u8 fl; | 128 | u8 fl; |
| 129 | u8 reserved1[1]; | 129 | u8 vlan_control; |
| 130 | u8 disable_pkey_check; | 130 | u8 disable_pkey_check; |
| 131 | u8 pkey_index; | 131 | u8 pkey_index; |
| 132 | u8 counter_index; | 132 | u8 counter_index; |
| @@ -141,11 +141,32 @@ struct mlx4_qp_path { | |||
| 141 | u8 sched_queue; | 141 | u8 sched_queue; |
| 142 | u8 vlan_index; | 142 | u8 vlan_index; |
| 143 | u8 feup; | 143 | u8 feup; |
| 144 | u8 reserved3; | 144 | u8 fvl_rx; |
| 145 | u8 reserved4[2]; | 145 | u8 reserved4[2]; |
| 146 | u8 dmac[6]; | 146 | u8 dmac[6]; |
| 147 | }; | 147 | }; |
| 148 | 148 | ||
| 149 | enum { /* fl */ | ||
| 150 | MLX4_FL_CV = 1 << 6, | ||
| 151 | MLX4_FL_ETH_HIDE_CQE_VLAN = 1 << 2 | ||
| 152 | }; | ||
| 153 | enum { /* vlan_control */ | ||
| 154 | MLX4_VLAN_CTRL_ETH_TX_BLOCK_TAGGED = 1 << 6, | ||
| 155 | MLX4_VLAN_CTRL_ETH_RX_BLOCK_TAGGED = 1 << 2, | ||
| 156 | MLX4_VLAN_CTRL_ETH_RX_BLOCK_PRIO_TAGGED = 1 << 1, /* 802.1p priority tag */ | ||
| 157 | MLX4_VLAN_CTRL_ETH_RX_BLOCK_UNTAGGED = 1 << 0 | ||
| 158 | }; | ||
| 159 | |||
| 160 | enum { /* feup */ | ||
| 161 | MLX4_FEUP_FORCE_ETH_UP = 1 << 6, /* force Eth UP */ | ||
| 162 | MLX4_FSM_FORCE_ETH_SRC_MAC = 1 << 5, /* force Source MAC */ | ||
| 163 | MLX4_FVL_FORCE_ETH_VLAN = 1 << 3 /* force Eth vlan */ | ||
| 164 | }; | ||
| 165 | |||
| 166 | enum { /* fvl_rx */ | ||
| 167 | MLX4_FVL_RX_FORCE_ETH_VLAN = 1 << 0 /* enforce Eth rx vlan */ | ||
| 168 | }; | ||
| 169 | |||
| 149 | struct mlx4_qp_context { | 170 | struct mlx4_qp_context { |
| 150 | __be32 flags; | 171 | __be32 flags; |
| 151 | __be32 pd; | 172 | __be32 pd; |
| @@ -185,6 +206,10 @@ struct mlx4_qp_context { | |||
| 185 | u32 reserved5[10]; | 206 | u32 reserved5[10]; |
| 186 | }; | 207 | }; |
| 187 | 208 | ||
| 209 | enum { /* param3 */ | ||
| 210 | MLX4_STRIP_VLAN = 1 << 30 | ||
| 211 | }; | ||
| 212 | |||
| 188 | /* Which firmware version adds support for NEC (NoErrorCompletion) bit */ | 213 | /* Which firmware version adds support for NEC (NoErrorCompletion) bit */ |
| 189 | #define MLX4_FW_VER_WQE_CTRL_NEC mlx4_fw_ver(2, 2, 232) | 214 | #define MLX4_FW_VER_WQE_CTRL_NEC mlx4_fw_ver(2, 2, 232) |
| 190 | 215 | ||
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index 3863a4dbdf18..2a93b64a3869 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h | |||
| @@ -11,9 +11,10 @@ | |||
| 11 | * | 11 | * |
| 12 | */ | 12 | */ |
| 13 | 13 | ||
| 14 | #ifdef CONFIG_OF_DEVICE | ||
| 15 | #include <linux/device.h> | 14 | #include <linux/device.h> |
| 16 | #include <linux/mod_devicetable.h> | 15 | #include <linux/mod_devicetable.h> |
| 16 | |||
| 17 | #ifdef CONFIG_OF_DEVICE | ||
| 17 | #include <linux/pm.h> | 18 | #include <linux/pm.h> |
| 18 | #include <linux/of_device.h> | 19 | #include <linux/of_device.h> |
| 19 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
| @@ -100,7 +101,7 @@ extern int of_platform_populate(struct device_node *root, | |||
| 100 | 101 | ||
| 101 | #if !defined(CONFIG_OF_ADDRESS) | 102 | #if !defined(CONFIG_OF_ADDRESS) |
| 102 | struct of_dev_auxdata; | 103 | struct of_dev_auxdata; |
| 103 | struct device; | 104 | struct device_node; |
| 104 | static inline int of_platform_populate(struct device_node *root, | 105 | static inline int of_platform_populate(struct device_node *root, |
| 105 | const struct of_device_id *matches, | 106 | const struct of_device_id *matches, |
| 106 | const struct of_dev_auxdata *lookup, | 107 | const struct of_dev_auxdata *lookup, |
diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h index 72474e18f1e0..6aa238096622 100644 --- a/include/linux/pinctrl/pinconf-generic.h +++ b/include/linux/pinctrl/pinconf-generic.h | |||
| @@ -37,17 +37,17 @@ | |||
| 37 | * if it is 0, pull-down is disabled. | 37 | * if it is 0, pull-down is disabled. |
| 38 | * @PIN_CONFIG_DRIVE_PUSH_PULL: the pin will be driven actively high and | 38 | * @PIN_CONFIG_DRIVE_PUSH_PULL: the pin will be driven actively high and |
| 39 | * low, this is the most typical case and is typically achieved with two | 39 | * low, this is the most typical case and is typically achieved with two |
| 40 | * active transistors on the output. Sending this config will enabale | 40 | * active transistors on the output. Setting this config will enable |
| 41 | * push-pull mode, the argument is ignored. | 41 | * push-pull mode, the argument is ignored. |
| 42 | * @PIN_CONFIG_DRIVE_OPEN_DRAIN: the pin will be driven with open drain (open | 42 | * @PIN_CONFIG_DRIVE_OPEN_DRAIN: the pin will be driven with open drain (open |
| 43 | * collector) which means it is usually wired with other output ports | 43 | * collector) which means it is usually wired with other output ports |
| 44 | * which are then pulled up with an external resistor. Sending this | 44 | * which are then pulled up with an external resistor. Setting this |
| 45 | * config will enabale open drain mode, the argument is ignored. | 45 | * config will enable open drain mode, the argument is ignored. |
| 46 | * @PIN_CONFIG_DRIVE_OPEN_SOURCE: the pin will be driven with open source | 46 | * @PIN_CONFIG_DRIVE_OPEN_SOURCE: the pin will be driven with open source |
| 47 | * (open emitter). Sending this config will enabale open drain mode, the | 47 | * (open emitter). Setting this config will enable open drain mode, the |
| 48 | * argument is ignored. | 48 | * argument is ignored. |
| 49 | * @PIN_CONFIG_DRIVE_STRENGTH: the pin will output the current passed as | 49 | * @PIN_CONFIG_DRIVE_STRENGTH: the pin will sink or source at most the current |
| 50 | * argument. The argument is in mA. | 50 | * passed as argument. The argument is in mA. |
| 51 | * @PIN_CONFIG_INPUT_SCHMITT_ENABLE: control schmitt-trigger mode on the pin. | 51 | * @PIN_CONFIG_INPUT_SCHMITT_ENABLE: control schmitt-trigger mode on the pin. |
| 52 | * If the argument != 0, schmitt-trigger mode is enabled. If it's 0, | 52 | * If the argument != 0, schmitt-trigger mode is enabled. If it's 0, |
| 53 | * schmitt-trigger mode is disabled. | 53 | * schmitt-trigger mode is disabled. |
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 733eb5ee31c5..6ff26c8db7b9 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
| @@ -57,7 +57,7 @@ extern struct bus_type spi_bus_type; | |||
| 57 | * @modalias: Name of the driver to use with this device, or an alias | 57 | * @modalias: Name of the driver to use with this device, or an alias |
| 58 | * for that name. This appears in the sysfs "modalias" attribute | 58 | * for that name. This appears in the sysfs "modalias" attribute |
| 59 | * for driver coldplugging, and in uevents used for hotplugging | 59 | * for driver coldplugging, and in uevents used for hotplugging |
| 60 | * @cs_gpio: gpio number of the chipselect line (optional, -EINVAL when | 60 | * @cs_gpio: gpio number of the chipselect line (optional, -ENOENT when |
| 61 | * when not using a GPIO line) | 61 | * when not using a GPIO line) |
| 62 | * | 62 | * |
| 63 | * A @spi_device is used to interchange data between an SPI slave | 63 | * A @spi_device is used to interchange data between an SPI slave |
| @@ -266,7 +266,7 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) | |||
| 266 | * queue so the subsystem notifies the driver that it may relax the | 266 | * queue so the subsystem notifies the driver that it may relax the |
| 267 | * hardware by issuing this call | 267 | * hardware by issuing this call |
| 268 | * @cs_gpios: Array of GPIOs to use as chip select lines; one per CS | 268 | * @cs_gpios: Array of GPIOs to use as chip select lines; one per CS |
| 269 | * number. Any individual value may be -EINVAL for CS lines that | 269 | * number. Any individual value may be -ENOENT for CS lines that |
| 270 | * are not GPIOs (driven by the SPI controller itself). | 270 | * are not GPIOs (driven by the SPI controller itself). |
| 271 | * | 271 | * |
| 272 | * Each SPI master controller can communicate with one or more @spi_device | 272 | * Each SPI master controller can communicate with one or more @spi_device |
diff --git a/include/linux/time.h b/include/linux/time.h index 22d81b3c955b..d5d229b2e5af 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
| @@ -117,14 +117,10 @@ static inline bool timespec_valid_strict(const struct timespec *ts) | |||
| 117 | 117 | ||
| 118 | extern bool persistent_clock_exist; | 118 | extern bool persistent_clock_exist; |
| 119 | 119 | ||
| 120 | #ifdef ALWAYS_USE_PERSISTENT_CLOCK | ||
| 121 | #define has_persistent_clock() true | ||
| 122 | #else | ||
| 123 | static inline bool has_persistent_clock(void) | 120 | static inline bool has_persistent_clock(void) |
| 124 | { | 121 | { |
| 125 | return persistent_clock_exist; | 122 | return persistent_clock_exist; |
| 126 | } | 123 | } |
| 127 | #endif | ||
| 128 | 124 | ||
| 129 | extern void read_persistent_clock(struct timespec *ts); | 125 | extern void read_persistent_clock(struct timespec *ts); |
| 130 | extern void read_boot_clock(struct timespec *ts); | 126 | extern void read_boot_clock(struct timespec *ts); |
