summaryrefslogtreecommitdiffstats
path: root/drivers/staging/hv/hv.c
diff options
context:
space:
mode:
authorHank Janssen <hjanssen@microsoft.com>2011-03-29 13:58:44 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-04-04 22:03:05 -0700
commit98e087022b611c6f748c74d952193ccf69280f52 (patch)
tree728961cb31187d1e354f99961e65bd9f88fed635 /drivers/staging/hv/hv.c
parentf3365453a3c4a1e8ca28c0dedabf371385456d1f (diff)
downloadop-kernel-dev-98e087022b611c6f748c74d952193ccf69280f52.zip
op-kernel-dev-98e087022b611c6f748c74d952193ccf69280f52.tar.gz
staging: hv: Remove all unneeded DPRINT from hv_vmbus
Remove all un-needed DPRINT calls from hv_vmbus. Several are remaining that will be cleaned up in my next set of patches. They deal with printing out the ringbuffer debugging which is going to be implemented slightly differently. This patch deals with hv_vmbus only. Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/hv/hv.c')
-rw-r--r--drivers/staging/hv/hv.c54
1 files changed, 8 insertions, 46 deletions
diff --git a/drivers/staging/hv/hv.c b/drivers/staging/hv/hv.c
index 2d492ad..d627a83 100644
--- a/drivers/staging/hv/hv.c
+++ b/drivers/staging/hv/hv.c
@@ -80,7 +80,7 @@ static int query_hypervisor_info(void)
op = HVCPUID_VENDOR_MAXFUNCTION;
cpuid(op, &eax, &ebx, &ecx, &edx);
- DPRINT_INFO(VMBUS, "Vendor ID: %c%c%c%c%c%c%c%c%c%c%c%c",
+/* DPRINT_INFO(VMBUS, "Vendor ID: %c%c%c%c%c%c%c%c%c%c%c%c",
(ebx & 0xFF),
((ebx >> 8) & 0xFF),
((ebx >> 16) & 0xFF),
@@ -93,9 +93,9 @@ static int query_hypervisor_info(void)
((edx >> 8) & 0xFF),
((edx >> 16) & 0xFF),
((edx >> 24) & 0xFF));
-
+*/
max_leaf = eax;
- eax = 0;
+/* eax = 0;
ebx = 0;
ecx = 0;
edx = 0;
@@ -107,6 +107,7 @@ static int query_hypervisor_info(void)
((eax >> 8) & 0xFF),
((eax >> 16) & 0xFF),
((eax >> 24) & 0xFF));
+*/
if (max_leaf >= HVCPUID_VERSION) {
eax = 0;
@@ -137,18 +138,11 @@ static u64 do_hypercall(u64 control, void *input, void *output)
u64 output_address = (output) ? virt_to_phys(output) : 0;
volatile void *hypercall_page = hv_context.hypercall_page;
- DPRINT_DBG(VMBUS, "Hypercall <control %llx input phys %llx virt %p "
- "output phys %llx virt %p hypercall %p>",
- control, input_address, input,
- output_address, output, hypercall_page);
-
__asm__ __volatile__("mov %0, %%r8" : : "r" (output_address) : "r8");
__asm__ __volatile__("call *%3" : "=a" (hv_status) :
"c" (control), "d" (input_address),
"m" (hypercall_page));
- DPRINT_DBG(VMBUS, "Hypercall <return %llx>", hv_status);
-
return hv_status;
#else
@@ -165,18 +159,12 @@ static u64 do_hypercall(u64 control, void *input, void *output)
u32 output_address_lo = output_address & 0xFFFFFFFF;
volatile void *hypercall_page = hv_context.hypercall_page;
- DPRINT_DBG(VMBUS, "Hypercall <control %llx input %p output %p>",
- control, input, output);
-
__asm__ __volatile__ ("call *%8" : "=d"(hv_status_hi),
"=a"(hv_status_lo) : "d" (control_hi),
"a" (control_lo), "b" (input_address_hi),
"c" (input_address_lo), "D"(output_address_hi),
"S"(output_address_lo), "m" (hypercall_page));
- DPRINT_DBG(VMBUS, "Hypercall <return %llx>",
- hv_status_lo | ((u64)hv_status_hi << 32));
-
return hv_status_lo | ((u64)hv_status_hi << 32);
#endif /* !x86_64 */
}
@@ -197,13 +185,8 @@ int hv_init(void)
memset(hv_context.synic_message_page, 0,
sizeof(void *) * MAX_NUM_CPUS);
- if (!query_hypervisor_presence()) {
- DPRINT_ERR(VMBUS, "No Windows hypervisor detected!!");
+ if (!query_hypervisor_presence())
goto Cleanup;
- }
-
- DPRINT_INFO(VMBUS,
- "Windows hypervisor detected! Retrieving more info...");
max_leaf = query_hypervisor_info();
/* HvQueryHypervisorFeatures(maxLeaf); */
@@ -213,11 +196,8 @@ int hv_init(void)
*/
rdmsrl(HV_X64_MSR_GUEST_OS_ID, hv_context.guestid);
- if (hv_context.guestid != 0) {
- DPRINT_ERR(VMBUS, "Unknown guest id (0x%llx)!!",
- hv_context.guestid);
+ if (hv_context.guestid != 0)
goto Cleanup;
- }
/* Write our OS info */
wrmsrl(HV_X64_MSR_GUEST_OS_ID, HV_LINUX_GUEST_ID);
@@ -232,11 +212,8 @@ int hv_init(void)
*/
virtaddr = __vmalloc(PAGE_SIZE, GFP_KERNEL, PAGE_KERNEL_EXEC);
- if (!virtaddr) {
- DPRINT_ERR(VMBUS,
- "unable to allocate hypercall page!!");
+ if (!virtaddr)
goto Cleanup;
- }
hypercall_msr.enable = 1;
@@ -247,17 +224,11 @@ int hv_init(void)
hypercall_msr.as_uint64 = 0;
rdmsrl(HV_X64_MSR_HYPERCALL, hypercall_msr.as_uint64);
- if (!hypercall_msr.enable) {
- DPRINT_ERR(VMBUS, "unable to set hypercall page!!");
+ if (!hypercall_msr.enable)
goto Cleanup;
- }
hv_context.hypercall_page = virtaddr;
- DPRINT_INFO(VMBUS, "Hypercall page VA=%p, PA=0x%0llx",
- hv_context.hypercall_page,
- (u64)hypercall_msr.guest_physical_address << PAGE_SHIFT);
-
/* Setup the global signal event param for the signal event hypercall */
hv_context.signal_event_buffer =
kmalloc(sizeof(struct hv_input_signal_event_buffer),
@@ -394,8 +365,6 @@ void hv_synic_init(void *irqarg)
/* Check the version */
rdmsrl(HV_X64_MSR_SVERSION, version);
- DPRINT_INFO(VMBUS, "SynIC version: %llx", version);
-
hv_context.synic_message_page[cpu] =
(void *)get_zeroed_page(GFP_ATOMIC);
@@ -420,8 +389,6 @@ void hv_synic_init(void *irqarg)
simp.base_simp_gpa = virt_to_phys(hv_context.synic_message_page[cpu])
>> PAGE_SHIFT;
- DPRINT_DBG(VMBUS, "HV_X64_MSR_SIMP msr set to: %llx", simp.as_uint64);
-
wrmsrl(HV_X64_MSR_SIMP, simp.as_uint64);
/* Setup the Synic's event page */
@@ -430,8 +397,6 @@ void hv_synic_init(void *irqarg)
siefp.base_siefp_gpa = virt_to_phys(hv_context.synic_event_page[cpu])
>> PAGE_SHIFT;
- DPRINT_DBG(VMBUS, "HV_X64_MSR_SIEFP msr set to: %llx", siefp.as_uint64);
-
wrmsrl(HV_X64_MSR_SIEFP, siefp.as_uint64);
/* Setup the interception SINT. */
@@ -446,9 +411,6 @@ void hv_synic_init(void *irqarg)
shared_sint.masked = false;
shared_sint.auto_eoi = true;
- DPRINT_DBG(VMBUS, "HV_X64_MSR_SINT1 msr set to: %llx",
- shared_sint.as_uint64);
-
wrmsrl(HV_X64_MSR_SINT0 + VMBUS_MESSAGE_SINT, shared_sint.as_uint64);
/* Enable the global synic bit */
OpenPOWER on IntegriCloud