aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hyperv.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-21 12:42:58 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-21 12:42:58 -0400
commit1fc149933fd49a5b0e7738dc0853dbfbac4ae0e1 (patch)
treedfe99751c21aaf39e49765379d0b9b32114c757d /include/linux/hyperv.h
parent41d5e08ea86af3359239d5a6f7021cdc61beaa49 (diff)
parentea5505fabd3b59608750bfd3721d0f8bc5c8b0bb (diff)
Merge tag 'char-misc-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver updates from Greg KH: "Here's the big char/misc driver patchset for 4.1-rc1. Lots of different driver subsystem updates here, nothing major, full details are in the shortlog. All of this has been in linux-next for a while" * tag 'char-misc-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (133 commits) mei: trace: remove unused TRACE_SYSTEM_STRING DTS: ARM: OMAP3-N900: Add lis3lv02d support Documentation: DT: lis302: update wakeup binding lis3lv02d: DT: add wakeup unit 2 and wakeup threshold lis3lv02d: DT: use s32 to support negative values Drivers: hv: hv_balloon: correctly handle num_pages>INT_MAX case Drivers: hv: hv_balloon: correctly handle val.freeram<num_pages case mei: replace check for connection instead of transitioning mei: use mei_cl_is_connected consistently mei: fix mei_poll operation hv_vmbus: Add gradually increased delay for retries in vmbus_post_msg() Drivers: hv: hv_balloon: survive ballooning request with num_pages=0 Drivers: hv: hv_balloon: eliminate jumps in piecewiese linear floor function Drivers: hv: hv_balloon: do not online pages in offline blocks hv: remove the per-channel workqueue hv: don't schedule new works in vmbus_onoffer()/vmbus_onoffer_rescind() hv: run non-blocking message handlers in the dispatch tasklet coresight: moving to new "hwtracing" directory coresight-tmc: Adding a status interface to sysfs coresight: remove the unnecessary configuration coresight-default-sink ...
Diffstat (limited to 'include/linux/hyperv.h')
-rw-r--r--include/linux/hyperv.h37
1 files changed, 34 insertions, 3 deletions
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index 5a2ba674795e..902c37aef67e 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -646,12 +646,13 @@ struct hv_input_signal_event_buffer {
646}; 646};
647 647
648struct vmbus_channel { 648struct vmbus_channel {
649 /* Unique channel id */
650 int id;
651
649 struct list_head listentry; 652 struct list_head listentry;
650 653
651 struct hv_device *device_obj; 654 struct hv_device *device_obj;
652 655
653 struct work_struct work;
654
655 enum vmbus_channel_state state; 656 enum vmbus_channel_state state;
656 657
657 struct vmbus_channel_offer_channel offermsg; 658 struct vmbus_channel_offer_channel offermsg;
@@ -672,7 +673,6 @@ struct vmbus_channel {
672 struct hv_ring_buffer_info outbound; /* send to parent */ 673 struct hv_ring_buffer_info outbound; /* send to parent */
673 struct hv_ring_buffer_info inbound; /* receive from parent */ 674 struct hv_ring_buffer_info inbound; /* receive from parent */
674 spinlock_t inbound_lock; 675 spinlock_t inbound_lock;
675 struct workqueue_struct *controlwq;
676 676
677 struct vmbus_close_msg close_msg; 677 struct vmbus_close_msg close_msg;
678 678
@@ -758,6 +758,9 @@ struct vmbus_channel {
758 * link up channels based on their CPU affinity. 758 * link up channels based on their CPU affinity.
759 */ 759 */
760 struct list_head percpu_list; 760 struct list_head percpu_list;
761
762 int num_sc;
763 int next_oc;
761}; 764};
762 765
763static inline void set_channel_read_state(struct vmbus_channel *c, bool state) 766static inline void set_channel_read_state(struct vmbus_channel *c, bool state)
@@ -861,6 +864,14 @@ extern int vmbus_sendpacket(struct vmbus_channel *channel,
861 enum vmbus_packet_type type, 864 enum vmbus_packet_type type,
862 u32 flags); 865 u32 flags);
863 866
867extern int vmbus_sendpacket_ctl(struct vmbus_channel *channel,
868 void *buffer,
869 u32 bufferLen,
870 u64 requestid,
871 enum vmbus_packet_type type,
872 u32 flags,
873 bool kick_q);
874
864extern int vmbus_sendpacket_pagebuffer(struct vmbus_channel *channel, 875extern int vmbus_sendpacket_pagebuffer(struct vmbus_channel *channel,
865 struct hv_page_buffer pagebuffers[], 876 struct hv_page_buffer pagebuffers[],
866 u32 pagecount, 877 u32 pagecount,
@@ -868,6 +879,15 @@ extern int vmbus_sendpacket_pagebuffer(struct vmbus_channel *channel,
868 u32 bufferlen, 879 u32 bufferlen,
869 u64 requestid); 880 u64 requestid);
870 881
882extern int vmbus_sendpacket_pagebuffer_ctl(struct vmbus_channel *channel,
883 struct hv_page_buffer pagebuffers[],
884 u32 pagecount,
885 void *buffer,
886 u32 bufferlen,
887 u64 requestid,
888 u32 flags,
889 bool kick_q);
890
871extern int vmbus_sendpacket_multipagebuffer(struct vmbus_channel *channel, 891extern int vmbus_sendpacket_multipagebuffer(struct vmbus_channel *channel,
872 struct hv_multipage_buffer *mpb, 892 struct hv_multipage_buffer *mpb,
873 void *buffer, 893 void *buffer,
@@ -1107,6 +1127,16 @@ void vmbus_driver_unregister(struct hv_driver *hv_driver);
1107 } 1127 }
1108 1128
1109/* 1129/*
1130 * NetworkDirect. This is the guest RDMA service.
1131 * {8c2eaf3d-32a7-4b09-ab99-bd1f1c86b501}
1132 */
1133#define HV_ND_GUID \
1134 .guid = { \
1135 0x3d, 0xaf, 0x2e, 0x8c, 0xa7, 0x32, 0x09, 0x4b, \
1136 0xab, 0x99, 0xbd, 0x1f, 0x1c, 0x86, 0xb5, 0x01 \
1137 }
1138
1139/*
1110 * Common header for Hyper-V ICs 1140 * Common header for Hyper-V ICs
1111 */ 1141 */
1112 1142
@@ -1213,6 +1243,7 @@ void hv_kvp_onchannelcallback(void *);
1213int hv_vss_init(struct hv_util_service *); 1243int hv_vss_init(struct hv_util_service *);
1214void hv_vss_deinit(void); 1244void hv_vss_deinit(void);
1215void hv_vss_onchannelcallback(void *); 1245void hv_vss_onchannelcallback(void *);
1246void hv_process_channel_removal(struct vmbus_channel *channel, u32 relid);
1216 1247
1217extern struct resource hyperv_mmio; 1248extern struct resource hyperv_mmio;
1218 1249