aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hv/hv_balloon.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-29 14:50:17 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-29 14:50:17 -0400
commit9c5891bd4342349a200676d33f742dd1b864822c (patch)
treeb14c1698f2d8ce5276e1befd562f6398a46b48b9 /drivers/hv/hv_balloon.c
parentecda040ff3724f021a96491ecee88d48e968c153 (diff)
parent5ae90d8e467e625e447000cb4335c4db973b1095 (diff)
Merge 3.11-rc3 into char-misc-next.
This resolves a merge issue with: drivers/misc/mei/init.c Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv/hv_balloon.c')
-rw-r--r--drivers/hv/hv_balloon.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c
index 8dd08c029da2..2d094cfdb1e0 100644
--- a/drivers/hv/hv_balloon.c
+++ b/drivers/hv/hv_balloon.c
@@ -562,7 +562,7 @@ static void hv_mem_hot_add(unsigned long start, unsigned long size,
562 struct hv_hotadd_state *has) 562 struct hv_hotadd_state *has)
563{ 563{
564 int ret = 0; 564 int ret = 0;
565 int i, nid, t; 565 int i, nid;
566 unsigned long start_pfn; 566 unsigned long start_pfn;
567 unsigned long processed_pfn; 567 unsigned long processed_pfn;
568 unsigned long total_pfn = pfn_count; 568 unsigned long total_pfn = pfn_count;
@@ -607,14 +607,11 @@ static void hv_mem_hot_add(unsigned long start, unsigned long size,
607 607
608 /* 608 /*
609 * Wait for the memory block to be onlined. 609 * Wait for the memory block to be onlined.
610 * Since the hot add has succeeded, it is ok to
611 * proceed even if the pages in the hot added region
612 * have not been "onlined" within the allowed time.
610 */ 613 */
611 t = wait_for_completion_timeout(&dm_device.ol_waitevent, 5*HZ); 614 wait_for_completion_timeout(&dm_device.ol_waitevent, 5*HZ);
612 if (t == 0) {
613 pr_info("hot_add memory timedout\n");
614 has->ha_end_pfn -= HA_CHUNK;
615 has->covered_end_pfn -= processed_pfn;
616 break;
617 }
618 615
619 } 616 }
620 617
@@ -978,6 +975,14 @@ static void post_status(struct hv_dynmem_device *dm)
978 dm->num_pages_ballooned + 975 dm->num_pages_ballooned +
979 compute_balloon_floor(); 976 compute_balloon_floor();
980 977
978 /*
979 * If our transaction ID is no longer current, just don't
980 * send the status. This can happen if we were interrupted
981 * after we picked our transaction ID.
982 */
983 if (status.hdr.trans_id != atomic_read(&trans_id))
984 return;
985
981 vmbus_sendpacket(dm->dev->channel, &status, 986 vmbus_sendpacket(dm->dev->channel, &status,
982 sizeof(struct dm_status), 987 sizeof(struct dm_status),
983 (unsigned long)NULL, 988 (unsigned long)NULL,