diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-04 17:26:39 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-04 17:26:39 -0700 |
| commit | 1d0da63c6781741b6e9cc9558b13918c09445903 (patch) | |
| tree | 069426fd313f3a6758c1ece7c74e63530796d481 /f07.patch | |
| parent | f2a4447ad2255b39ebc3de81bf020ea667fdf983 (diff) | |
| download | patches-1d0da63c6781741b6e9cc9558b13918c09445903.tar.gz | |
more patches added to clean up dev_attrs
Diffstat (limited to 'f07.patch')
| -rw-r--r-- | f07.patch | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/f07.patch b/f07.patch new file mode 100644 index 00000000000000..4deced3d2168e0 --- /dev/null +++ b/f07.patch @@ -0,0 +1,94 @@ +--- + drivers/hv/channel.c | 10 ++++------ + drivers/hv/connection.c | 21 ++++++++++----------- + drivers/hv/hyperv_vmbus.h | 2 +- + 3 files changed, 15 insertions(+), 18 deletions(-) + +--- a/drivers/hv/channel.c ++++ b/drivers/hv/channel.c +@@ -47,8 +47,8 @@ static void vmbus_setevent(struct vmbus_ + (unsigned long *) vmbus_connection.send_int_page + + (channel->offermsg.child_relid >> 5)); + +- monitorpage = vmbus_connection.monitor_pages; +- monitorpage++; /* Get the child to parent monitor page */ ++ /* Get the child to parent monitor page */ ++ monitorpage = vmbus_connection.monitor_pages[1]; + + sync_set_bit(channel->monitor_bit, + (unsigned long *)&monitorpage->trigger_group +@@ -69,8 +69,7 @@ void vmbus_get_debug_info(struct vmbus_c + u8 monitor_group = (u8)channel->offermsg.monitorid / 32; + u8 monitor_offset = (u8)channel->offermsg.monitorid % 32; + +- monitorpage = (struct hv_monitor_page *)vmbus_connection.monitor_pages; +- ++ monitorpage = vmbus_connection.monitor_pages[0]; + debuginfo->servermonitor_pending = + monitorpage->trigger_group[monitor_group].pending; + debuginfo->servermonitor_latency = +@@ -79,8 +78,7 @@ void vmbus_get_debug_info(struct vmbus_c + monitorpage->parameter[monitor_group] + [monitor_offset].connectionid.u.id; + +- monitorpage++; +- ++ monitorpage = vmbus_connection.monitor_pages[1]; + debuginfo->clientmonitor_pending = + monitorpage->trigger_group[monitor_group].pending; + debuginfo->clientmonitor_latency = +--- a/drivers/hv/connection.c ++++ b/drivers/hv/connection.c +@@ -76,10 +76,8 @@ static int vmbus_negotiate_version(struc + msg->header.msgtype = CHANNELMSG_INITIATE_CONTACT; + msg->vmbus_version_requested = version; + msg->interrupt_page = virt_to_phys(vmbus_connection.int_page); +- msg->monitor_page1 = virt_to_phys(vmbus_connection.monitor_pages); +- msg->monitor_page2 = virt_to_phys( +- (void *)((unsigned long)vmbus_connection.monitor_pages + +- PAGE_SIZE)); ++ msg->monitor_page1 = virt_to_phys(vmbus_connection.monitor_pages[0]); ++ msg->monitor_page2 = virt_to_phys(vmbus_connection.monitor_pages[1]); + + /* + * Add to list before we send the request since we may +@@ -169,9 +167,10 @@ int vmbus_connect(void) + * Setup the monitor notification facility. The 1st page for + * parent->child and the 2nd page for child->parent + */ +- vmbus_connection.monitor_pages = +- (void *)__get_free_pages((GFP_KERNEL|__GFP_ZERO), 1); +- if (vmbus_connection.monitor_pages == NULL) { ++ vmbus_connection.monitor_pages[0] = (void *)__get_free_pages((GFP_KERNEL|__GFP_ZERO), 0); ++ vmbus_connection.monitor_pages[1] = (void *)__get_free_pages((GFP_KERNEL|__GFP_ZERO), 0); ++ if ((vmbus_connection.monitor_pages[0] == NULL) || ++ (vmbus_connection.monitor_pages[1] == NULL)) { + ret = -ENOMEM; + goto cleanup; + } +@@ -229,10 +228,10 @@ cleanup: + vmbus_connection.int_page = NULL; + } + +- if (vmbus_connection.monitor_pages) { +- free_pages((unsigned long)vmbus_connection.monitor_pages, 1); +- vmbus_connection.monitor_pages = NULL; +- } ++ free_pages((unsigned long)vmbus_connection.monitor_pages[0], 1); ++ free_pages((unsigned long)vmbus_connection.monitor_pages[1], 1); ++ vmbus_connection.monitor_pages[0] = NULL; ++ vmbus_connection.monitor_pages[1] = NULL; + + kfree(msginfo); + +--- a/drivers/hv/hyperv_vmbus.h ++++ b/drivers/hv/hyperv_vmbus.h +@@ -612,7 +612,7 @@ struct vmbus_connection { + * 2 pages - 1st page for parent->child notification and 2nd + * is child->parent notification + */ +- void *monitor_pages; ++ struct hv_monitor_page *monitor_pages[2]; + struct list_head chn_msg_list; + spinlock_t channelmsg_lock; + |
