diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-22 14:38:22 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-22 14:38:22 -0500 |
commit | e30aee9e10bb5168579e047f05c3d13d09e23356 (patch) | |
tree | 12371bdcd52d2427cad838201997479e31b6a9c9 /include | |
parent | 8ff546b801e5cca0337c0f0a7234795d0a6309a1 (diff) | |
parent | 6cf18e6927c0b224f972e3042fb85770d63cb9f8 (diff) |
Merge tag 'char-misc-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver updates from Greg KH:
"Here is the big char/misc driver patchset for 4.11-rc1.
Lots of different driver subsystems updated here: rework for the
hyperv subsystem to handle new platforms better, mei and w1 and extcon
driver updates, as well as a number of other "minor" driver updates.
All of these have been in linux-next for a while with no reported
issues"
* tag 'char-misc-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (169 commits)
goldfish: Sanitize the broken interrupt handler
x86/platform/goldfish: Prevent unconditional loading
vmbus: replace modulus operation with subtraction
vmbus: constify parameters where possible
vmbus: expose hv_begin/end_read
vmbus: remove conditional locking of vmbus_write
vmbus: add direct isr callback mode
vmbus: change to per channel tasklet
vmbus: put related per-cpu variable together
vmbus: callback is in softirq not workqueue
binder: Add support for file-descriptor arrays
binder: Add support for scatter-gather
binder: Add extra size to allocator
binder: Refactor binder_transact()
binder: Support multiple /dev instances
binder: Deal with contexts in debugfs
binder: Support multiple context managers
binder: Split flat_binder_object
auxdisplay: ht16k33: remove private workqueue
auxdisplay: ht16k33: rework input device initialization
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/extcon.h | 71 | ||||
-rw-r--r-- | include/linux/extcon/extcon-adc-jack.h | 2 | ||||
-rw-r--r-- | include/linux/fpga/fpga-mgr.h | 5 | ||||
-rw-r--r-- | include/linux/fsi.h | 50 | ||||
-rw-r--r-- | include/linux/hyperv.h | 128 | ||||
-rw-r--r-- | include/linux/miscdevice.h | 1 | ||||
-rw-r--r-- | include/linux/platform_data/ti-aemif.h | 23 | ||||
-rw-r--r-- | include/linux/sram.h | 27 | ||||
-rw-r--r-- | include/linux/vme.h | 1 | ||||
-rw-r--r-- | include/linux/vmw_vmci_defs.h | 7 | ||||
-rw-r--r-- | include/uapi/linux/android/binder.h | 104 |
11 files changed, 285 insertions, 134 deletions
diff --git a/include/linux/extcon.h b/include/linux/extcon.h index b871c0cb1f02..7010fb01a81a 100644 --- a/include/linux/extcon.h +++ b/include/linux/extcon.h | |||
@@ -46,7 +46,18 @@ | |||
46 | #define EXTCON_USB 1 | 46 | #define EXTCON_USB 1 |
47 | #define EXTCON_USB_HOST 2 | 47 | #define EXTCON_USB_HOST 2 |
48 | 48 | ||
49 | /* Charging external connector */ | 49 | /* |
50 | * Charging external connector | ||
51 | * | ||
52 | * When one SDP charger connector was reported, we should also report | ||
53 | * the USB connector, which means EXTCON_CHG_USB_SDP should always | ||
54 | * appear together with EXTCON_USB. The same as ACA charger connector, | ||
55 | * EXTCON_CHG_USB_ACA would normally appear with EXTCON_USB_HOST. | ||
56 | * | ||
57 | * The EXTCON_CHG_USB_SLOW connector can provide at least 500mA of | ||
58 | * current at 5V. The EXTCON_CHG_USB_FAST connector can provide at | ||
59 | * least 1A of current at 5V. | ||
60 | */ | ||
50 | #define EXTCON_CHG_USB_SDP 5 /* Standard Downstream Port */ | 61 | #define EXTCON_CHG_USB_SDP 5 /* Standard Downstream Port */ |
51 | #define EXTCON_CHG_USB_DCP 6 /* Dedicated Charging Port */ | 62 | #define EXTCON_CHG_USB_DCP 6 /* Dedicated Charging Port */ |
52 | #define EXTCON_CHG_USB_CDP 7 /* Charging Downstream Port */ | 63 | #define EXTCON_CHG_USB_CDP 7 /* Charging Downstream Port */ |
@@ -54,6 +65,7 @@ | |||
54 | #define EXTCON_CHG_USB_FAST 9 | 65 | #define EXTCON_CHG_USB_FAST 9 |
55 | #define EXTCON_CHG_USB_SLOW 10 | 66 | #define EXTCON_CHG_USB_SLOW 10 |
56 | #define EXTCON_CHG_WPT 11 /* Wireless Power Transfer */ | 67 | #define EXTCON_CHG_WPT 11 /* Wireless Power Transfer */ |
68 | #define EXTCON_CHG_USB_PD 12 /* USB Power Delivery */ | ||
57 | 69 | ||
58 | /* Jack external connector */ | 70 | /* Jack external connector */ |
59 | #define EXTCON_JACK_MICROPHONE 20 | 71 | #define EXTCON_JACK_MICROPHONE 20 |
@@ -160,62 +172,7 @@ union extcon_property_value { | |||
160 | }; | 172 | }; |
161 | 173 | ||
162 | struct extcon_cable; | 174 | struct extcon_cable; |
163 | 175 | struct extcon_dev; | |
164 | /** | ||
165 | * struct extcon_dev - An extcon device represents one external connector. | ||
166 | * @name: The name of this extcon device. Parent device name is | ||
167 | * used if NULL. | ||
168 | * @supported_cable: Array of supported cable names ending with EXTCON_NONE. | ||
169 | * If supported_cable is NULL, cable name related APIs | ||
170 | * are disabled. | ||
171 | * @mutually_exclusive: Array of mutually exclusive set of cables that cannot | ||
172 | * be attached simultaneously. The array should be | ||
173 | * ending with NULL or be NULL (no mutually exclusive | ||
174 | * cables). For example, if it is { 0x7, 0x30, 0}, then, | ||
175 | * {0, 1}, {0, 1, 2}, {0, 2}, {1, 2}, or {4, 5} cannot | ||
176 | * be attached simulataneously. {0x7, 0} is equivalent to | ||
177 | * {0x3, 0x6, 0x5, 0}. If it is {0xFFFFFFFF, 0}, there | ||
178 | * can be no simultaneous connections. | ||
179 | * @dev: Device of this extcon. | ||
180 | * @state: Attach/detach state of this extcon. Do not provide at | ||
181 | * register-time. | ||
182 | * @nh: Notifier for the state change events from this extcon | ||
183 | * @entry: To support list of extcon devices so that users can | ||
184 | * search for extcon devices based on the extcon name. | ||
185 | * @lock: | ||
186 | * @max_supported: Internal value to store the number of cables. | ||
187 | * @extcon_dev_type: Device_type struct to provide attribute_groups | ||
188 | * customized for each extcon device. | ||
189 | * @cables: Sysfs subdirectories. Each represents one cable. | ||
190 | * | ||
191 | * In most cases, users only need to provide "User initializing data" of | ||
192 | * this struct when registering an extcon. In some exceptional cases, | ||
193 | * optional callbacks may be needed. However, the values in "internal data" | ||
194 | * are overwritten by register function. | ||
195 | */ | ||
196 | struct extcon_dev { | ||
197 | /* Optional user initializing data */ | ||
198 | const char *name; | ||
199 | const unsigned int *supported_cable; | ||
200 | const u32 *mutually_exclusive; | ||
201 | |||
202 | /* Internal data. Please do not set. */ | ||
203 | struct device dev; | ||
204 | struct raw_notifier_head *nh; | ||
205 | struct list_head entry; | ||
206 | int max_supported; | ||
207 | spinlock_t lock; /* could be called by irq handler */ | ||
208 | u32 state; | ||
209 | |||
210 | /* /sys/class/extcon/.../cable.n/... */ | ||
211 | struct device_type extcon_dev_type; | ||
212 | struct extcon_cable *cables; | ||
213 | |||
214 | /* /sys/class/extcon/.../mutually_exclusive/... */ | ||
215 | struct attribute_group attr_g_muex; | ||
216 | struct attribute **attrs_muex; | ||
217 | struct device_attribute *d_attrs_muex; | ||
218 | }; | ||
219 | 176 | ||
220 | #if IS_ENABLED(CONFIG_EXTCON) | 177 | #if IS_ENABLED(CONFIG_EXTCON) |
221 | 178 | ||
diff --git a/include/linux/extcon/extcon-adc-jack.h b/include/linux/extcon/extcon-adc-jack.h index a0e03b13b449..2aa32075bca1 100644 --- a/include/linux/extcon/extcon-adc-jack.h +++ b/include/linux/extcon/extcon-adc-jack.h | |||
@@ -59,7 +59,7 @@ struct adc_jack_pdata { | |||
59 | const char *name; | 59 | const char *name; |
60 | const char *consumer_channel; | 60 | const char *consumer_channel; |
61 | 61 | ||
62 | const enum extcon *cable_names; | 62 | const unsigned int *cable_names; |
63 | 63 | ||
64 | /* The last entry's state should be 0 */ | 64 | /* The last entry's state should be 0 */ |
65 | struct adc_jack_cond *adc_conditions; | 65 | struct adc_jack_cond *adc_conditions; |
diff --git a/include/linux/fpga/fpga-mgr.h b/include/linux/fpga/fpga-mgr.h index 16551d5eac36..57beb5d09bfc 100644 --- a/include/linux/fpga/fpga-mgr.h +++ b/include/linux/fpga/fpga-mgr.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #define _LINUX_FPGA_MGR_H | 22 | #define _LINUX_FPGA_MGR_H |
23 | 23 | ||
24 | struct fpga_manager; | 24 | struct fpga_manager; |
25 | struct sg_table; | ||
25 | 26 | ||
26 | /** | 27 | /** |
27 | * enum fpga_mgr_states - fpga framework states | 28 | * enum fpga_mgr_states - fpga framework states |
@@ -88,6 +89,7 @@ struct fpga_image_info { | |||
88 | * @state: returns an enum value of the FPGA's state | 89 | * @state: returns an enum value of the FPGA's state |
89 | * @write_init: prepare the FPGA to receive confuration data | 90 | * @write_init: prepare the FPGA to receive confuration data |
90 | * @write: write count bytes of configuration data to the FPGA | 91 | * @write: write count bytes of configuration data to the FPGA |
92 | * @write_sg: write the scatter list of configuration data to the FPGA | ||
91 | * @write_complete: set FPGA to operating state after writing is done | 93 | * @write_complete: set FPGA to operating state after writing is done |
92 | * @fpga_remove: optional: Set FPGA into a specific state during driver remove | 94 | * @fpga_remove: optional: Set FPGA into a specific state during driver remove |
93 | * | 95 | * |
@@ -102,6 +104,7 @@ struct fpga_manager_ops { | |||
102 | struct fpga_image_info *info, | 104 | struct fpga_image_info *info, |
103 | const char *buf, size_t count); | 105 | const char *buf, size_t count); |
104 | int (*write)(struct fpga_manager *mgr, const char *buf, size_t count); | 106 | int (*write)(struct fpga_manager *mgr, const char *buf, size_t count); |
107 | int (*write_sg)(struct fpga_manager *mgr, struct sg_table *sgt); | ||
105 | int (*write_complete)(struct fpga_manager *mgr, | 108 | int (*write_complete)(struct fpga_manager *mgr, |
106 | struct fpga_image_info *info); | 109 | struct fpga_image_info *info); |
107 | void (*fpga_remove)(struct fpga_manager *mgr); | 110 | void (*fpga_remove)(struct fpga_manager *mgr); |
@@ -129,6 +132,8 @@ struct fpga_manager { | |||
129 | 132 | ||
130 | int fpga_mgr_buf_load(struct fpga_manager *mgr, struct fpga_image_info *info, | 133 | int fpga_mgr_buf_load(struct fpga_manager *mgr, struct fpga_image_info *info, |
131 | const char *buf, size_t count); | 134 | const char *buf, size_t count); |
135 | int fpga_mgr_buf_load_sg(struct fpga_manager *mgr, struct fpga_image_info *info, | ||
136 | struct sg_table *sgt); | ||
132 | 137 | ||
133 | int fpga_mgr_firmware_load(struct fpga_manager *mgr, | 138 | int fpga_mgr_firmware_load(struct fpga_manager *mgr, |
134 | struct fpga_image_info *info, | 139 | struct fpga_image_info *info, |
diff --git a/include/linux/fsi.h b/include/linux/fsi.h new file mode 100644 index 000000000000..273cbf6400ea --- /dev/null +++ b/include/linux/fsi.h | |||
@@ -0,0 +1,50 @@ | |||
1 | /* FSI device & driver interfaces | ||
2 | * | ||
3 | * Copyright (C) IBM Corporation 2016 | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | */ | ||
14 | |||
15 | #ifndef LINUX_FSI_H | ||
16 | #define LINUX_FSI_H | ||
17 | |||
18 | #include <linux/device.h> | ||
19 | |||
20 | struct fsi_device { | ||
21 | struct device dev; | ||
22 | u8 engine_type; | ||
23 | u8 version; | ||
24 | }; | ||
25 | |||
26 | struct fsi_device_id { | ||
27 | u8 engine_type; | ||
28 | u8 version; | ||
29 | }; | ||
30 | |||
31 | #define FSI_VERSION_ANY 0 | ||
32 | |||
33 | #define FSI_DEVICE(t) \ | ||
34 | .engine_type = (t), .version = FSI_VERSION_ANY, | ||
35 | |||
36 | #define FSI_DEVICE_VERSIONED(t, v) \ | ||
37 | .engine_type = (t), .version = (v), | ||
38 | |||
39 | |||
40 | struct fsi_driver { | ||
41 | struct device_driver drv; | ||
42 | const struct fsi_device_id *id_table; | ||
43 | }; | ||
44 | |||
45 | #define to_fsi_dev(devp) container_of(devp, struct fsi_device, dev) | ||
46 | #define to_fsi_drv(drvp) container_of(drvp, struct fsi_driver, drv) | ||
47 | |||
48 | extern struct bus_type fsi_bus_type; | ||
49 | |||
50 | #endif /* LINUX_FSI_H */ | ||
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index 183efde54269..62bbf3c1aa4a 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h | |||
@@ -32,11 +32,10 @@ | |||
32 | #include <linux/scatterlist.h> | 32 | #include <linux/scatterlist.h> |
33 | #include <linux/list.h> | 33 | #include <linux/list.h> |
34 | #include <linux/timer.h> | 34 | #include <linux/timer.h> |
35 | #include <linux/workqueue.h> | ||
36 | #include <linux/completion.h> | 35 | #include <linux/completion.h> |
37 | #include <linux/device.h> | 36 | #include <linux/device.h> |
38 | #include <linux/mod_devicetable.h> | 37 | #include <linux/mod_devicetable.h> |
39 | 38 | #include <linux/interrupt.h> | |
40 | 39 | ||
41 | #define MAX_PAGE_BUFFER_COUNT 32 | 40 | #define MAX_PAGE_BUFFER_COUNT 32 |
42 | #define MAX_MULTIPAGE_BUFFER_COUNT 32 /* 128K */ | 41 | #define MAX_MULTIPAGE_BUFFER_COUNT 32 /* 128K */ |
@@ -139,8 +138,8 @@ struct hv_ring_buffer_info { | |||
139 | * for the specified ring buffer | 138 | * for the specified ring buffer |
140 | */ | 139 | */ |
141 | static inline void | 140 | static inline void |
142 | hv_get_ringbuffer_availbytes(struct hv_ring_buffer_info *rbi, | 141 | hv_get_ringbuffer_availbytes(const struct hv_ring_buffer_info *rbi, |
143 | u32 *read, u32 *write) | 142 | u32 *read, u32 *write) |
144 | { | 143 | { |
145 | u32 read_loc, write_loc, dsize; | 144 | u32 read_loc, write_loc, dsize; |
146 | 145 | ||
@@ -154,7 +153,7 @@ hv_get_ringbuffer_availbytes(struct hv_ring_buffer_info *rbi, | |||
154 | *read = dsize - *write; | 153 | *read = dsize - *write; |
155 | } | 154 | } |
156 | 155 | ||
157 | static inline u32 hv_get_bytes_to_read(struct hv_ring_buffer_info *rbi) | 156 | static inline u32 hv_get_bytes_to_read(const struct hv_ring_buffer_info *rbi) |
158 | { | 157 | { |
159 | u32 read_loc, write_loc, dsize, read; | 158 | u32 read_loc, write_loc, dsize, read; |
160 | 159 | ||
@@ -168,7 +167,7 @@ static inline u32 hv_get_bytes_to_read(struct hv_ring_buffer_info *rbi) | |||
168 | return read; | 167 | return read; |
169 | } | 168 | } |
170 | 169 | ||
171 | static inline u32 hv_get_bytes_to_write(struct hv_ring_buffer_info *rbi) | 170 | static inline u32 hv_get_bytes_to_write(const struct hv_ring_buffer_info *rbi) |
172 | { | 171 | { |
173 | u32 read_loc, write_loc, dsize, write; | 172 | u32 read_loc, write_loc, dsize, write; |
174 | 173 | ||
@@ -641,6 +640,7 @@ struct vmbus_channel_msginfo { | |||
641 | 640 | ||
642 | /* Synchronize the request/response if needed */ | 641 | /* Synchronize the request/response if needed */ |
643 | struct completion waitevent; | 642 | struct completion waitevent; |
643 | struct vmbus_channel *waiting_channel; | ||
644 | union { | 644 | union { |
645 | struct vmbus_channel_version_supported version_supported; | 645 | struct vmbus_channel_version_supported version_supported; |
646 | struct vmbus_channel_open_result open_result; | 646 | struct vmbus_channel_open_result open_result; |
@@ -683,11 +683,6 @@ struct hv_input_signal_event_buffer { | |||
683 | struct hv_input_signal_event event; | 683 | struct hv_input_signal_event event; |
684 | }; | 684 | }; |
685 | 685 | ||
686 | enum hv_signal_policy { | ||
687 | HV_SIGNAL_POLICY_DEFAULT = 0, | ||
688 | HV_SIGNAL_POLICY_EXPLICIT, | ||
689 | }; | ||
690 | |||
691 | enum hv_numa_policy { | 686 | enum hv_numa_policy { |
692 | HV_BALANCED = 0, | 687 | HV_BALANCED = 0, |
693 | HV_LOCALIZED, | 688 | HV_LOCALIZED, |
@@ -747,26 +742,27 @@ struct vmbus_channel { | |||
747 | 742 | ||
748 | struct vmbus_close_msg close_msg; | 743 | struct vmbus_close_msg close_msg; |
749 | 744 | ||
750 | /* Channel callback are invoked in this workqueue context */ | 745 | /* Channel callback's invoked in softirq context */ |
751 | /* HANDLE dataWorkQueue; */ | 746 | struct tasklet_struct callback_event; |
752 | |||
753 | void (*onchannel_callback)(void *context); | 747 | void (*onchannel_callback)(void *context); |
754 | void *channel_callback_context; | 748 | void *channel_callback_context; |
755 | 749 | ||
756 | /* | 750 | /* |
757 | * A channel can be marked for efficient (batched) | 751 | * A channel can be marked for one of three modes of reading: |
758 | * reading: | 752 | * BATCHED - callback called from taslket and should read |
759 | * If batched_reading is set to "true", we read until the | 753 | * channel until empty. Interrupts from the host |
760 | * channel is empty and hold off interrupts from the host | 754 | * are masked while read is in process (default). |
761 | * during the entire read process. | 755 | * DIRECT - callback called from tasklet (softirq). |
762 | * If batched_reading is set to "false", the client is not | 756 | * ISR - callback called in interrupt context and must |
763 | * going to perform batched reading. | 757 | * invoke its own deferred processing. |
764 | * | 758 | * Host interrupts are disabled and must be re-enabled |
765 | * By default we will enable batched reading; specific | 759 | * when ring is empty. |
766 | * drivers that don't want this behavior can turn it off. | ||
767 | */ | 760 | */ |
768 | 761 | enum hv_callback_mode { | |
769 | bool batched_reading; | 762 | HV_CALL_BATCHED, |
763 | HV_CALL_DIRECT, | ||
764 | HV_CALL_ISR | ||
765 | } callback_mode; | ||
770 | 766 | ||
771 | bool is_dedicated_interrupt; | 767 | bool is_dedicated_interrupt; |
772 | struct hv_input_signal_event_buffer sig_buf; | 768 | struct hv_input_signal_event_buffer sig_buf; |
@@ -850,23 +846,6 @@ struct vmbus_channel { | |||
850 | */ | 846 | */ |
851 | struct list_head percpu_list; | 847 | struct list_head percpu_list; |
852 | /* | 848 | /* |
853 | * Host signaling policy: The default policy will be | ||
854 | * based on the ring buffer state. We will also support | ||
855 | * a policy where the client driver can have explicit | ||
856 | * signaling control. | ||
857 | */ | ||
858 | enum hv_signal_policy signal_policy; | ||
859 | /* | ||
860 | * On the channel send side, many of the VMBUS | ||
861 | * device drivers explicity serialize access to the | ||
862 | * outgoing ring buffer. Give more control to the | ||
863 | * VMBUS device drivers in terms how to serialize | ||
864 | * accesss to the outgoing ring buffer. | ||
865 | * The default behavior will be to aquire the | ||
866 | * ring lock to preserve the current behavior. | ||
867 | */ | ||
868 | bool acquire_ring_lock; | ||
869 | /* | ||
870 | * For performance critical channels (storage, networking | 849 | * For performance critical channels (storage, networking |
871 | * etc,), Hyper-V has a mechanism to enhance the throughput | 850 | * etc,), Hyper-V has a mechanism to enhance the throughput |
872 | * at the expense of latency: | 851 | * at the expense of latency: |
@@ -906,32 +885,22 @@ struct vmbus_channel { | |||
906 | 885 | ||
907 | }; | 886 | }; |
908 | 887 | ||
909 | static inline void set_channel_lock_state(struct vmbus_channel *c, bool state) | ||
910 | { | ||
911 | c->acquire_ring_lock = state; | ||
912 | } | ||
913 | |||
914 | static inline bool is_hvsock_channel(const struct vmbus_channel *c) | 888 | static inline bool is_hvsock_channel(const struct vmbus_channel *c) |
915 | { | 889 | { |
916 | return !!(c->offermsg.offer.chn_flags & | 890 | return !!(c->offermsg.offer.chn_flags & |
917 | VMBUS_CHANNEL_TLNPI_PROVIDER_OFFER); | 891 | VMBUS_CHANNEL_TLNPI_PROVIDER_OFFER); |
918 | } | 892 | } |
919 | 893 | ||
920 | static inline void set_channel_signal_state(struct vmbus_channel *c, | ||
921 | enum hv_signal_policy policy) | ||
922 | { | ||
923 | c->signal_policy = policy; | ||
924 | } | ||
925 | |||
926 | static inline void set_channel_affinity_state(struct vmbus_channel *c, | 894 | static inline void set_channel_affinity_state(struct vmbus_channel *c, |
927 | enum hv_numa_policy policy) | 895 | enum hv_numa_policy policy) |
928 | { | 896 | { |
929 | c->affinity_policy = policy; | 897 | c->affinity_policy = policy; |
930 | } | 898 | } |
931 | 899 | ||
932 | static inline void set_channel_read_state(struct vmbus_channel *c, bool state) | 900 | static inline void set_channel_read_mode(struct vmbus_channel *c, |
901 | enum hv_callback_mode mode) | ||
933 | { | 902 | { |
934 | c->batched_reading = state; | 903 | c->callback_mode = mode; |
935 | } | 904 | } |
936 | 905 | ||
937 | static inline void set_per_channel_state(struct vmbus_channel *c, void *s) | 906 | static inline void set_per_channel_state(struct vmbus_channel *c, void *s) |
@@ -1054,8 +1023,7 @@ extern int vmbus_sendpacket_ctl(struct vmbus_channel *channel, | |||
1054 | u32 bufferLen, | 1023 | u32 bufferLen, |
1055 | u64 requestid, | 1024 | u64 requestid, |
1056 | enum vmbus_packet_type type, | 1025 | enum vmbus_packet_type type, |
1057 | u32 flags, | 1026 | u32 flags); |
1058 | bool kick_q); | ||
1059 | 1027 | ||
1060 | extern int vmbus_sendpacket_pagebuffer(struct vmbus_channel *channel, | 1028 | extern int vmbus_sendpacket_pagebuffer(struct vmbus_channel *channel, |
1061 | struct hv_page_buffer pagebuffers[], | 1029 | struct hv_page_buffer pagebuffers[], |
@@ -1070,8 +1038,7 @@ extern int vmbus_sendpacket_pagebuffer_ctl(struct vmbus_channel *channel, | |||
1070 | void *buffer, | 1038 | void *buffer, |
1071 | u32 bufferlen, | 1039 | u32 bufferlen, |
1072 | u64 requestid, | 1040 | u64 requestid, |
1073 | u32 flags, | 1041 | u32 flags); |
1074 | bool kick_q); | ||
1075 | 1042 | ||
1076 | extern int vmbus_sendpacket_multipagebuffer(struct vmbus_channel *channel, | 1043 | extern int vmbus_sendpacket_multipagebuffer(struct vmbus_channel *channel, |
1077 | struct hv_multipage_buffer *mpb, | 1044 | struct hv_multipage_buffer *mpb, |
@@ -1458,9 +1425,10 @@ struct hyperv_service_callback { | |||
1458 | }; | 1425 | }; |
1459 | 1426 | ||
1460 | #define MAX_SRV_VER 0x7ffffff | 1427 | #define MAX_SRV_VER 0x7ffffff |
1461 | extern bool vmbus_prep_negotiate_resp(struct icmsg_hdr *, | 1428 | extern bool vmbus_prep_negotiate_resp(struct icmsg_hdr *icmsghdrp, u8 *buf, |
1462 | struct icmsg_negotiate *, u8 *, int, | 1429 | const int *fw_version, int fw_vercnt, |
1463 | int); | 1430 | const int *srv_version, int srv_vercnt, |
1431 | int *nego_fw_version, int *nego_srv_version); | ||
1464 | 1432 | ||
1465 | void hv_event_tasklet_disable(struct vmbus_channel *channel); | 1433 | void hv_event_tasklet_disable(struct vmbus_channel *channel); |
1466 | void hv_event_tasklet_enable(struct vmbus_channel *channel); | 1434 | void hv_event_tasklet_enable(struct vmbus_channel *channel); |
@@ -1480,9 +1448,9 @@ void vmbus_set_event(struct vmbus_channel *channel); | |||
1480 | 1448 | ||
1481 | /* Get the start of the ring buffer. */ | 1449 | /* Get the start of the ring buffer. */ |
1482 | static inline void * | 1450 | static inline void * |
1483 | hv_get_ring_buffer(struct hv_ring_buffer_info *ring_info) | 1451 | hv_get_ring_buffer(const struct hv_ring_buffer_info *ring_info) |
1484 | { | 1452 | { |
1485 | return (void *)ring_info->ring_buffer->buffer; | 1453 | return ring_info->ring_buffer->buffer; |
1486 | } | 1454 | } |
1487 | 1455 | ||
1488 | /* | 1456 | /* |
@@ -1545,6 +1513,36 @@ init_cached_read_index(struct vmbus_channel *channel) | |||
1545 | } | 1513 | } |
1546 | 1514 | ||
1547 | /* | 1515 | /* |
1516 | * Mask off host interrupt callback notifications | ||
1517 | */ | ||
1518 | static inline void hv_begin_read(struct hv_ring_buffer_info *rbi) | ||
1519 | { | ||
1520 | rbi->ring_buffer->interrupt_mask = 1; | ||
1521 | |||
1522 | /* make sure mask update is not reordered */ | ||
1523 | virt_mb(); | ||
1524 | } | ||
1525 | |||
1526 | /* | ||
1527 | * Re-enable host callback and return number of outstanding bytes | ||
1528 | */ | ||
1529 | static inline u32 hv_end_read(struct hv_ring_buffer_info *rbi) | ||
1530 | { | ||
1531 | |||
1532 | rbi->ring_buffer->interrupt_mask = 0; | ||
1533 | |||
1534 | /* make sure mask update is not reordered */ | ||
1535 | virt_mb(); | ||
1536 | |||
1537 | /* | ||
1538 | * Now check to see if the ring buffer is still empty. | ||
1539 | * If it is not, we raced and we need to process new | ||
1540 | * incoming messages. | ||
1541 | */ | ||
1542 | return hv_get_bytes_to_read(rbi); | ||
1543 | } | ||
1544 | |||
1545 | /* | ||
1548 | * An API to support in-place processing of incoming VMBUS packets. | 1546 | * An API to support in-place processing of incoming VMBUS packets. |
1549 | */ | 1547 | */ |
1550 | #define VMBUS_PKT_TRAILER 8 | 1548 | #define VMBUS_PKT_TRAILER 8 |
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h index ed30d5d713e3..0590263c462c 100644 --- a/include/linux/miscdevice.h +++ b/include/linux/miscdevice.h | |||
@@ -22,6 +22,7 @@ | |||
22 | /*#define ADB_MOUSE_MINOR 10 FIXME OBSOLETE */ | 22 | /*#define ADB_MOUSE_MINOR 10 FIXME OBSOLETE */ |
23 | #define WATCHDOG_MINOR 130 /* Watchdog timer */ | 23 | #define WATCHDOG_MINOR 130 /* Watchdog timer */ |
24 | #define TEMP_MINOR 131 /* Temperature Sensor */ | 24 | #define TEMP_MINOR 131 /* Temperature Sensor */ |
25 | #define APM_MINOR_DEV 134 | ||
25 | #define RTC_MINOR 135 | 26 | #define RTC_MINOR 135 |
26 | #define EFI_RTC_MINOR 136 /* EFI Time services */ | 27 | #define EFI_RTC_MINOR 136 /* EFI Time services */ |
27 | #define VHCI_MINOR 137 | 28 | #define VHCI_MINOR 137 |
diff --git a/include/linux/platform_data/ti-aemif.h b/include/linux/platform_data/ti-aemif.h new file mode 100644 index 000000000000..ac72e115093c --- /dev/null +++ b/include/linux/platform_data/ti-aemif.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* | ||
2 | * TI DaVinci AEMIF platform glue. | ||
3 | * | ||
4 | * Copyright (C) 2017 BayLibre SAS | ||
5 | * | ||
6 | * Author: | ||
7 | * Bartosz Golaszewski <bgolaszewski@baylibre.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #ifndef __TI_DAVINCI_AEMIF_DATA_H__ | ||
15 | #define __TI_DAVINCI_AEMIF_DATA_H__ | ||
16 | |||
17 | #include <linux/of_platform.h> | ||
18 | |||
19 | struct aemif_platform_data { | ||
20 | struct of_dev_auxdata *dev_lookup; | ||
21 | }; | ||
22 | |||
23 | #endif /* __TI_DAVINCI_AEMIF_DATA_H__ */ | ||
diff --git a/include/linux/sram.h b/include/linux/sram.h new file mode 100644 index 000000000000..c97dcbe8ce25 --- /dev/null +++ b/include/linux/sram.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * Generic SRAM Driver Interface | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License as | ||
6 | * published by the Free Software Foundation version 2. | ||
7 | * | ||
8 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
9 | * kind, whether express or implied; without even the implied warranty | ||
10 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | */ | ||
13 | #ifndef __LINUX_SRAM_H__ | ||
14 | #define __LINUX_SRAM_H__ | ||
15 | |||
16 | struct gen_pool; | ||
17 | |||
18 | #ifdef CONFIG_SRAM_EXEC | ||
19 | int sram_exec_copy(struct gen_pool *pool, void *dst, void *src, size_t size); | ||
20 | #else | ||
21 | static inline int sram_exec_copy(struct gen_pool *pool, void *dst, void *src, | ||
22 | size_t size) | ||
23 | { | ||
24 | return -ENODEV; | ||
25 | } | ||
26 | #endif /* CONFIG_SRAM_EXEC */ | ||
27 | #endif /* __LINUX_SRAM_H__ */ | ||
diff --git a/include/linux/vme.h b/include/linux/vme.h index 8c589176c2f8..ec5e8bf6118e 100644 --- a/include/linux/vme.h +++ b/include/linux/vme.h | |||
@@ -108,7 +108,6 @@ struct vme_dev { | |||
108 | }; | 108 | }; |
109 | 109 | ||
110 | struct vme_driver { | 110 | struct vme_driver { |
111 | struct list_head node; | ||
112 | const char *name; | 111 | const char *name; |
113 | int (*match)(struct vme_dev *); | 112 | int (*match)(struct vme_dev *); |
114 | int (*probe)(struct vme_dev *); | 113 | int (*probe)(struct vme_dev *); |
diff --git a/include/linux/vmw_vmci_defs.h b/include/linux/vmw_vmci_defs.h index 1bd31a38c51e..b724ef7005de 100644 --- a/include/linux/vmw_vmci_defs.h +++ b/include/linux/vmw_vmci_defs.h | |||
@@ -54,13 +54,6 @@ | |||
54 | #define VMCI_IMR_DATAGRAM 0x1 | 54 | #define VMCI_IMR_DATAGRAM 0x1 |
55 | #define VMCI_IMR_NOTIFICATION 0x2 | 55 | #define VMCI_IMR_NOTIFICATION 0x2 |
56 | 56 | ||
57 | /* Interrupt type. */ | ||
58 | enum { | ||
59 | VMCI_INTR_TYPE_INTX = 0, | ||
60 | VMCI_INTR_TYPE_MSI = 1, | ||
61 | VMCI_INTR_TYPE_MSIX = 2, | ||
62 | }; | ||
63 | |||
64 | /* Maximum MSI/MSI-X interrupt vectors in the device. */ | 57 | /* Maximum MSI/MSI-X interrupt vectors in the device. */ |
65 | #define VMCI_MAX_INTRS 2 | 58 | #define VMCI_MAX_INTRS 2 |
66 | 59 | ||
diff --git a/include/uapi/linux/android/binder.h b/include/uapi/linux/android/binder.h index 41420e341e75..51f891fb1b18 100644 --- a/include/uapi/linux/android/binder.h +++ b/include/uapi/linux/android/binder.h | |||
@@ -33,6 +33,8 @@ enum { | |||
33 | BINDER_TYPE_HANDLE = B_PACK_CHARS('s', 'h', '*', B_TYPE_LARGE), | 33 | BINDER_TYPE_HANDLE = B_PACK_CHARS('s', 'h', '*', B_TYPE_LARGE), |
34 | BINDER_TYPE_WEAK_HANDLE = B_PACK_CHARS('w', 'h', '*', B_TYPE_LARGE), | 34 | BINDER_TYPE_WEAK_HANDLE = B_PACK_CHARS('w', 'h', '*', B_TYPE_LARGE), |
35 | BINDER_TYPE_FD = B_PACK_CHARS('f', 'd', '*', B_TYPE_LARGE), | 35 | BINDER_TYPE_FD = B_PACK_CHARS('f', 'd', '*', B_TYPE_LARGE), |
36 | BINDER_TYPE_FDA = B_PACK_CHARS('f', 'd', 'a', B_TYPE_LARGE), | ||
37 | BINDER_TYPE_PTR = B_PACK_CHARS('p', 't', '*', B_TYPE_LARGE), | ||
36 | }; | 38 | }; |
37 | 39 | ||
38 | enum { | 40 | enum { |
@@ -48,6 +50,14 @@ typedef __u64 binder_size_t; | |||
48 | typedef __u64 binder_uintptr_t; | 50 | typedef __u64 binder_uintptr_t; |
49 | #endif | 51 | #endif |
50 | 52 | ||
53 | /** | ||
54 | * struct binder_object_header - header shared by all binder metadata objects. | ||
55 | * @type: type of the object | ||
56 | */ | ||
57 | struct binder_object_header { | ||
58 | __u32 type; | ||
59 | }; | ||
60 | |||
51 | /* | 61 | /* |
52 | * This is the flattened representation of a Binder object for transfer | 62 | * This is the flattened representation of a Binder object for transfer |
53 | * between processes. The 'offsets' supplied as part of a binder transaction | 63 | * between processes. The 'offsets' supplied as part of a binder transaction |
@@ -56,9 +66,8 @@ typedef __u64 binder_uintptr_t; | |||
56 | * between processes. | 66 | * between processes. |
57 | */ | 67 | */ |
58 | struct flat_binder_object { | 68 | struct flat_binder_object { |
59 | /* 8 bytes for large_flat_header. */ | 69 | struct binder_object_header hdr; |
60 | __u32 type; | 70 | __u32 flags; |
61 | __u32 flags; | ||
62 | 71 | ||
63 | /* 8 bytes of data. */ | 72 | /* 8 bytes of data. */ |
64 | union { | 73 | union { |
@@ -70,6 +79,84 @@ struct flat_binder_object { | |||
70 | binder_uintptr_t cookie; | 79 | binder_uintptr_t cookie; |
71 | }; | 80 | }; |
72 | 81 | ||
82 | /** | ||
83 | * struct binder_fd_object - describes a filedescriptor to be fixed up. | ||
84 | * @hdr: common header structure | ||
85 | * @pad_flags: padding to remain compatible with old userspace code | ||
86 | * @pad_binder: padding to remain compatible with old userspace code | ||
87 | * @fd: file descriptor | ||
88 | * @cookie: opaque data, used by user-space | ||
89 | */ | ||
90 | struct binder_fd_object { | ||
91 | struct binder_object_header hdr; | ||
92 | __u32 pad_flags; | ||
93 | union { | ||
94 | binder_uintptr_t pad_binder; | ||
95 | __u32 fd; | ||
96 | }; | ||
97 | |||
98 | binder_uintptr_t cookie; | ||
99 | }; | ||
100 | |||
101 | /* struct binder_buffer_object - object describing a userspace buffer | ||
102 | * @hdr: common header structure | ||
103 | * @flags: one or more BINDER_BUFFER_* flags | ||
104 | * @buffer: address of the buffer | ||
105 | * @length: length of the buffer | ||
106 | * @parent: index in offset array pointing to parent buffer | ||
107 | * @parent_offset: offset in @parent pointing to this buffer | ||
108 | * | ||
109 | * A binder_buffer object represents an object that the | ||
110 | * binder kernel driver can copy verbatim to the target | ||
111 | * address space. A buffer itself may be pointed to from | ||
112 | * within another buffer, meaning that the pointer inside | ||
113 | * that other buffer needs to be fixed up as well. This | ||
114 | * can be done by setting the BINDER_BUFFER_FLAG_HAS_PARENT | ||
115 | * flag in @flags, by setting @parent buffer to the index | ||
116 | * in the offset array pointing to the parent binder_buffer_object, | ||
117 | * and by setting @parent_offset to the offset in the parent buffer | ||
118 | * at which the pointer to this buffer is located. | ||
119 | */ | ||
120 | struct binder_buffer_object { | ||
121 | struct binder_object_header hdr; | ||
122 | __u32 flags; | ||
123 | binder_uintptr_t buffer; | ||
124 | binder_size_t length; | ||
125 | binder_size_t parent; | ||
126 | binder_size_t parent_offset; | ||
127 | }; | ||
128 | |||
129 | enum { | ||
130 | BINDER_BUFFER_FLAG_HAS_PARENT = 0x01, | ||
131 | }; | ||
132 | |||
133 | /* struct binder_fd_array_object - object describing an array of fds in a buffer | ||
134 | * @hdr: common header structure | ||
135 | * @num_fds: number of file descriptors in the buffer | ||
136 | * @parent: index in offset array to buffer holding the fd array | ||
137 | * @parent_offset: start offset of fd array in the buffer | ||
138 | * | ||
139 | * A binder_fd_array object represents an array of file | ||
140 | * descriptors embedded in a binder_buffer_object. It is | ||
141 | * different from a regular binder_buffer_object because it | ||
142 | * describes a list of file descriptors to fix up, not an opaque | ||
143 | * blob of memory, and hence the kernel needs to treat it differently. | ||
144 | * | ||
145 | * An example of how this would be used is with Android's | ||
146 | * native_handle_t object, which is a struct with a list of integers | ||
147 | * and a list of file descriptors. The native_handle_t struct itself | ||
148 | * will be represented by a struct binder_buffer_objct, whereas the | ||
149 | * embedded list of file descriptors is represented by a | ||
150 | * struct binder_fd_array_object with that binder_buffer_object as | ||
151 | * a parent. | ||
152 | */ | ||
153 | struct binder_fd_array_object { | ||
154 | struct binder_object_header hdr; | ||
155 | binder_size_t num_fds; | ||
156 | binder_size_t parent; | ||
157 | binder_size_t parent_offset; | ||
158 | }; | ||
159 | |||
73 | /* | 160 | /* |
74 | * On 64-bit platforms where user code may run in 32-bits the driver must | 161 | * On 64-bit platforms where user code may run in 32-bits the driver must |
75 | * translate the buffer (and local binder) addresses appropriately. | 162 | * translate the buffer (and local binder) addresses appropriately. |
@@ -162,6 +249,11 @@ struct binder_transaction_data { | |||
162 | } data; | 249 | } data; |
163 | }; | 250 | }; |
164 | 251 | ||
252 | struct binder_transaction_data_sg { | ||
253 | struct binder_transaction_data transaction_data; | ||
254 | binder_size_t buffers_size; | ||
255 | }; | ||
256 | |||
165 | struct binder_ptr_cookie { | 257 | struct binder_ptr_cookie { |
166 | binder_uintptr_t ptr; | 258 | binder_uintptr_t ptr; |
167 | binder_uintptr_t cookie; | 259 | binder_uintptr_t cookie; |
@@ -346,6 +438,12 @@ enum binder_driver_command_protocol { | |||
346 | /* | 438 | /* |
347 | * void *: cookie | 439 | * void *: cookie |
348 | */ | 440 | */ |
441 | |||
442 | BC_TRANSACTION_SG = _IOW('c', 17, struct binder_transaction_data_sg), | ||
443 | BC_REPLY_SG = _IOW('c', 18, struct binder_transaction_data_sg), | ||
444 | /* | ||
445 | * binder_transaction_data_sg: the sent command. | ||
446 | */ | ||
349 | }; | 447 | }; |
350 | 448 | ||
351 | #endif /* _UAPI_LINUX_BINDER_H */ | 449 | #endif /* _UAPI_LINUX_BINDER_H */ |