]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commitdiff
xenoprof: drop unnecessary macro
authorDoug Goldstein <cardoe@cardoe.com>
Wed, 24 Feb 2016 11:06:28 +0000 (12:06 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 24 Feb 2016 11:06:28 +0000 (12:06 +0100)
This macro doesn't really provide a benefit. When support is added the
implementer can implement this how it needs to be and not conform to the
macro. Additionally this change limits the output of the warning to just
once instead of nrpages worth. While editing this area I dropped
trailing whitespace.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/common/xenoprof.c
xen/include/asm-x86/xenoprof.h

index 7a3fc862e9903885a48834eada796fa32110ace2..a5fe6204a57ee0de7d20e0feb7d49def16c58e9b 100644 (file)
@@ -177,11 +177,14 @@ xenoprof_shared_gmfn_with_guest(
     struct domain *d, unsigned long maddr, unsigned long gmaddr, int npages)
 {
     int i;
-    
+
     for ( i = 0; i < npages; i++, maddr += PAGE_SIZE, gmaddr += PAGE_SIZE )
     {
         BUG_ON(page_get_owner(maddr_to_page(maddr)) != d);
-        xenoprof_shared_gmfn(d, gmaddr, maddr);
+        if ( i == 0 )
+            gdprintk(XENLOG_WARNING,
+                     "xenoprof unsupported with autotranslated guests\n");
+
     }
 }
 
index dca422336fe2b1eaf1b14ac58ab9de762ee296b6..3a1b001edb89d841ca632ee21097ee06e8515c13 100644 (file)
@@ -62,14 +62,6 @@ static inline int xenoprof_backtrace_supported(void)
 void xenoprof_backtrace(struct vcpu *, const struct cpu_user_regs *,
                         unsigned long depth, int mode);
 
-#define xenoprof_shared_gmfn(d, gmaddr, maddr)                      \
-    do {                                                            \
-        (void)(maddr);                                              \
-        gdprintk(XENLOG_WARNING,                                    \
-                 "xenoprof/x86 with autotranslated mode enabled"    \
-                 "isn't supported yet\n");                          \
-    } while (0)
-
 int passive_domain_do_rdmsr(unsigned int msr, uint64_t *msr_content);
 int passive_domain_do_wrmsr(unsigned int msr, uint64_t msr_content);
 void passive_domain_destroy(struct vcpu *v);