diff options
author | Joe Perches <joe@perches.com> | 2013-06-28 06:21:41 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2013-06-28 11:19:58 -0400 |
commit | 283c0972d53769ee44750cad4c27e3f5fa26ec1f (patch) | |
tree | 598a36146515f114e21047daa9e19ea8ac8e5fdc | |
parent | 65e053a7038c608f89272d4fb1f899890c579f0a (diff) |
xen: Convert printks to pr_<level>
Convert printks to pr_<level> (excludes printk(KERN_DEBUG...)
to be more consistent throughout the xen subsystem.
Add pr_fmt with KBUILD_MODNAME or "xen:" KBUILD_MODNAME
Coalesce formats and add missing word spaces
Add missing newlines
Align arguments and reflow to 80 columns
Remove DRV_NAME from formats as pr_fmt adds the same content
This does change some of the prefixes of these messages
but it also does make them more consistent.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
34 files changed, 215 insertions, 196 deletions
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 930fb6817901..e33615335aa0 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c | |||
@@ -36,6 +36,8 @@ | |||
36 | * IN THE SOFTWARE. | 36 | * IN THE SOFTWARE. |
37 | */ | 37 | */ |
38 | 38 | ||
39 | #define pr_fmt(fmt) "xen:" KBUILD_MODNAME ": " fmt | ||
40 | |||
39 | #include <linux/kernel.h> | 41 | #include <linux/kernel.h> |
40 | #include <linux/sched.h> | 42 | #include <linux/sched.h> |
41 | #include <linux/errno.h> | 43 | #include <linux/errno.h> |
@@ -242,7 +244,7 @@ static enum bp_state reserve_additional_memory(long credit) | |||
242 | rc = add_memory(nid, hotplug_start_paddr, balloon_hotplug << PAGE_SHIFT); | 244 | rc = add_memory(nid, hotplug_start_paddr, balloon_hotplug << PAGE_SHIFT); |
243 | 245 | ||
244 | if (rc) { | 246 | if (rc) { |
245 | pr_info("xen_balloon: %s: add_memory() failed: %i\n", __func__, rc); | 247 | pr_info("%s: add_memory() failed: %i\n", __func__, rc); |
246 | return BP_EAGAIN; | 248 | return BP_EAGAIN; |
247 | } | 249 | } |
248 | 250 | ||
@@ -591,7 +593,7 @@ static int __init balloon_init(void) | |||
591 | if (!xen_domain()) | 593 | if (!xen_domain()) |
592 | return -ENODEV; | 594 | return -ENODEV; |
593 | 595 | ||
594 | pr_info("xen/balloon: Initialising balloon driver.\n"); | 596 | pr_info("Initialising balloon driver\n"); |
595 | 597 | ||
596 | balloon_stats.current_pages = xen_pv_domain() | 598 | balloon_stats.current_pages = xen_pv_domain() |
597 | ? min(xen_start_info->nr_pages - xen_released_pages, max_pfn) | 599 | ? min(xen_start_info->nr_pages - xen_released_pages, max_pfn) |
diff --git a/drivers/xen/cpu_hotplug.c b/drivers/xen/cpu_hotplug.c index 084041d42c9a..cc6513a176b0 100644 --- a/drivers/xen/cpu_hotplug.c +++ b/drivers/xen/cpu_hotplug.c | |||
@@ -1,3 +1,5 @@ | |||
1 | #define pr_fmt(fmt) "xen:" KBUILD_MODNAME ": " fmt | ||
2 | |||
1 | #include <linux/notifier.h> | 3 | #include <linux/notifier.h> |
2 | 4 | ||
3 | #include <xen/xen.h> | 5 | #include <xen/xen.h> |
@@ -31,7 +33,7 @@ static int vcpu_online(unsigned int cpu) | |||
31 | err = xenbus_scanf(XBT_NIL, dir, "availability", "%15s", state); | 33 | err = xenbus_scanf(XBT_NIL, dir, "availability", "%15s", state); |
32 | if (err != 1) { | 34 | if (err != 1) { |
33 | if (!xen_initial_domain()) | 35 | if (!xen_initial_domain()) |
34 | printk(KERN_ERR "XENBUS: Unable to read cpu state\n"); | 36 | pr_err("Unable to read cpu state\n"); |
35 | return err; | 37 | return err; |
36 | } | 38 | } |
37 | 39 | ||
@@ -40,7 +42,7 @@ static int vcpu_online(unsigned int cpu) | |||
40 | else if (strcmp(state, "offline") == 0) | 42 | else if (strcmp(state, "offline") == 0) |
41 | return 0; | 43 | return 0; |
42 | 44 | ||
43 | printk(KERN_ERR "XENBUS: unknown state(%s) on CPU%d\n", state, cpu); | 45 | pr_err("unknown state(%s) on CPU%d\n", state, cpu); |
44 | return -EINVAL; | 46 | return -EINVAL; |
45 | } | 47 | } |
46 | static void vcpu_hotplug(unsigned int cpu) | 48 | static void vcpu_hotplug(unsigned int cpu) |
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 6a6bbe4ede92..a58ac435a9a4 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c | |||
@@ -21,6 +21,8 @@ | |||
21 | * Jeremy Fitzhardinge <jeremy@xensource.com>, XenSource Inc, 2007 | 21 | * Jeremy Fitzhardinge <jeremy@xensource.com>, XenSource Inc, 2007 |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #define pr_fmt(fmt) "xen:" KBUILD_MODNAME ": " fmt | ||
25 | |||
24 | #include <linux/linkage.h> | 26 | #include <linux/linkage.h> |
25 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
26 | #include <linux/irq.h> | 28 | #include <linux/irq.h> |
@@ -600,8 +602,7 @@ static unsigned int __startup_pirq(unsigned int irq) | |||
600 | rc = HYPERVISOR_event_channel_op(EVTCHNOP_bind_pirq, &bind_pirq); | 602 | rc = HYPERVISOR_event_channel_op(EVTCHNOP_bind_pirq, &bind_pirq); |
601 | if (rc != 0) { | 603 | if (rc != 0) { |
602 | if (!probing_irq(irq)) | 604 | if (!probing_irq(irq)) |
603 | printk(KERN_INFO "Failed to obtain physical IRQ %d\n", | 605 | pr_info("Failed to obtain physical IRQ %d\n", irq); |
604 | irq); | ||
605 | return 0; | 606 | return 0; |
606 | } | 607 | } |
607 | evtchn = bind_pirq.port; | 608 | evtchn = bind_pirq.port; |
@@ -693,8 +694,8 @@ int xen_bind_pirq_gsi_to_irq(unsigned gsi, | |||
693 | 694 | ||
694 | irq = xen_irq_from_gsi(gsi); | 695 | irq = xen_irq_from_gsi(gsi); |
695 | if (irq != -1) { | 696 | if (irq != -1) { |
696 | printk(KERN_INFO "xen_map_pirq_gsi: returning irq %d for gsi %u\n", | 697 | pr_info("%s: returning irq %d for gsi %u\n", |
697 | irq, gsi); | 698 | __func__, irq, gsi); |
698 | goto out; | 699 | goto out; |
699 | } | 700 | } |
700 | 701 | ||
@@ -812,10 +813,10 @@ int xen_destroy_irq(int irq) | |||
812 | * (free_domain_pirqs). | 813 | * (free_domain_pirqs). |
813 | */ | 814 | */ |
814 | if ((rc == -ESRCH && info->u.pirq.domid != DOMID_SELF)) | 815 | if ((rc == -ESRCH && info->u.pirq.domid != DOMID_SELF)) |
815 | printk(KERN_INFO "domain %d does not have %d anymore\n", | 816 | pr_info("domain %d does not have %d anymore\n", |
816 | info->u.pirq.domid, info->u.pirq.pirq); | 817 | info->u.pirq.domid, info->u.pirq.pirq); |
817 | else if (rc) { | 818 | else if (rc) { |
818 | printk(KERN_WARNING "unmap irq failed %d\n", rc); | 819 | pr_warn("unmap irq failed %d\n", rc); |
819 | goto out; | 820 | goto out; |
820 | } | 821 | } |
821 | } | 822 | } |
@@ -1621,8 +1622,8 @@ static void restore_pirqs(void) | |||
1621 | 1622 | ||
1622 | rc = HYPERVISOR_physdev_op(PHYSDEVOP_map_pirq, &map_irq); | 1623 | rc = HYPERVISOR_physdev_op(PHYSDEVOP_map_pirq, &map_irq); |
1623 | if (rc) { | 1624 | if (rc) { |
1624 | printk(KERN_WARNING "xen map irq failed gsi=%d irq=%d pirq=%d rc=%d\n", | 1625 | pr_warn("xen map irq failed gsi=%d irq=%d pirq=%d rc=%d\n", |
1625 | gsi, irq, pirq, rc); | 1626 | gsi, irq, pirq, rc); |
1626 | xen_free_irq(irq); | 1627 | xen_free_irq(irq); |
1627 | continue; | 1628 | continue; |
1628 | } | 1629 | } |
@@ -1844,13 +1845,11 @@ void xen_callback_vector(void) | |||
1844 | callback_via = HVM_CALLBACK_VECTOR(HYPERVISOR_CALLBACK_VECTOR); | 1845 | callback_via = HVM_CALLBACK_VECTOR(HYPERVISOR_CALLBACK_VECTOR); |
1845 | rc = xen_set_callback_via(callback_via); | 1846 | rc = xen_set_callback_via(callback_via); |
1846 | if (rc) { | 1847 | if (rc) { |
1847 | printk(KERN_ERR "Request for Xen HVM callback vector" | 1848 | pr_err("Request for Xen HVM callback vector failed\n"); |
1848 | " failed.\n"); | ||
1849 | xen_have_vector_callback = 0; | 1849 | xen_have_vector_callback = 0; |
1850 | return; | 1850 | return; |
1851 | } | 1851 | } |
1852 | printk(KERN_INFO "Xen HVM callback vector for event delivery is " | 1852 | pr_info("Xen HVM callback vector for event delivery is enabled\n"); |
1853 | "enabled\n"); | ||
1854 | /* in the restore case the vector has already been allocated */ | 1853 | /* in the restore case the vector has already been allocated */ |
1855 | if (!test_bit(HYPERVISOR_CALLBACK_VECTOR, used_vectors)) | 1854 | if (!test_bit(HYPERVISOR_CALLBACK_VECTOR, used_vectors)) |
1856 | alloc_intr_gate(HYPERVISOR_CALLBACK_VECTOR, | 1855 | alloc_intr_gate(HYPERVISOR_CALLBACK_VECTOR, |
diff --git a/drivers/xen/evtchn.c b/drivers/xen/evtchn.c index 45c8efaa6b3e..8feecf01d55c 100644 --- a/drivers/xen/evtchn.c +++ b/drivers/xen/evtchn.c | |||
@@ -31,6 +31,8 @@ | |||
31 | * IN THE SOFTWARE. | 31 | * IN THE SOFTWARE. |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #define pr_fmt(fmt) "xen:" KBUILD_MODNAME ": " fmt | ||
35 | |||
34 | #include <linux/module.h> | 36 | #include <linux/module.h> |
35 | #include <linux/kernel.h> | 37 | #include <linux/kernel.h> |
36 | #include <linux/sched.h> | 38 | #include <linux/sched.h> |
@@ -547,11 +549,11 @@ static int __init evtchn_init(void) | |||
547 | /* Create '/dev/xen/evtchn'. */ | 549 | /* Create '/dev/xen/evtchn'. */ |
548 | err = misc_register(&evtchn_miscdev); | 550 | err = misc_register(&evtchn_miscdev); |
549 | if (err != 0) { | 551 | if (err != 0) { |
550 | printk(KERN_ERR "Could not register /dev/xen/evtchn\n"); | 552 | pr_err("Could not register /dev/xen/evtchn\n"); |
551 | return err; | 553 | return err; |
552 | } | 554 | } |
553 | 555 | ||
554 | printk(KERN_INFO "Event-channel device installed.\n"); | 556 | pr_info("Event-channel device installed\n"); |
555 | 557 | ||
556 | return 0; | 558 | return 0; |
557 | } | 559 | } |
diff --git a/drivers/xen/gntalloc.c b/drivers/xen/gntalloc.c index 4097987b330e..787d17945418 100644 --- a/drivers/xen/gntalloc.c +++ b/drivers/xen/gntalloc.c | |||
@@ -48,6 +48,8 @@ | |||
48 | * grant operation. | 48 | * grant operation. |
49 | */ | 49 | */ |
50 | 50 | ||
51 | #define pr_fmt(fmt) "xen:" KBUILD_MODNAME ": " fmt | ||
52 | |||
51 | #include <linux/atomic.h> | 53 | #include <linux/atomic.h> |
52 | #include <linux/module.h> | 54 | #include <linux/module.h> |
53 | #include <linux/miscdevice.h> | 55 | #include <linux/miscdevice.h> |
@@ -507,7 +509,7 @@ static int gntalloc_mmap(struct file *filp, struct vm_area_struct *vma) | |||
507 | int rv, i; | 509 | int rv, i; |
508 | 510 | ||
509 | if (!(vma->vm_flags & VM_SHARED)) { | 511 | if (!(vma->vm_flags & VM_SHARED)) { |
510 | printk(KERN_ERR "%s: Mapping must be shared.\n", __func__); | 512 | pr_err("%s: Mapping must be shared\n", __func__); |
511 | return -EINVAL; | 513 | return -EINVAL; |
512 | } | 514 | } |
513 | 515 | ||
@@ -584,7 +586,7 @@ static int __init gntalloc_init(void) | |||
584 | 586 | ||
585 | err = misc_register(&gntalloc_miscdev); | 587 | err = misc_register(&gntalloc_miscdev); |
586 | if (err != 0) { | 588 | if (err != 0) { |
587 | printk(KERN_ERR "Could not register misc gntalloc device\n"); | 589 | pr_err("Could not register misc gntalloc device\n"); |
588 | return err; | 590 | return err; |
589 | } | 591 | } |
590 | 592 | ||
diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c index 3c8803feba26..eab5427c75f5 100644 --- a/drivers/xen/gntdev.c +++ b/drivers/xen/gntdev.c | |||
@@ -19,6 +19,8 @@ | |||
19 | 19 | ||
20 | #undef DEBUG | 20 | #undef DEBUG |
21 | 21 | ||
22 | #define pr_fmt(fmt) "xen:" KBUILD_MODNAME ": " fmt | ||
23 | |||
22 | #include <linux/module.h> | 24 | #include <linux/module.h> |
23 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
24 | #include <linux/init.h> | 26 | #include <linux/init.h> |
@@ -760,7 +762,7 @@ static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma) | |||
760 | if (use_ptemod && map->vma) | 762 | if (use_ptemod && map->vma) |
761 | goto unlock_out; | 763 | goto unlock_out; |
762 | if (use_ptemod && priv->mm != vma->vm_mm) { | 764 | if (use_ptemod && priv->mm != vma->vm_mm) { |
763 | printk(KERN_WARNING "Huh? Other mm?\n"); | 765 | pr_warn("Huh? Other mm?\n"); |
764 | goto unlock_out; | 766 | goto unlock_out; |
765 | } | 767 | } |
766 | 768 | ||
@@ -795,7 +797,7 @@ static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma) | |||
795 | vma->vm_end - vma->vm_start, | 797 | vma->vm_end - vma->vm_start, |
796 | find_grant_ptes, map); | 798 | find_grant_ptes, map); |
797 | if (err) { | 799 | if (err) { |
798 | printk(KERN_WARNING "find_grant_ptes() failure.\n"); | 800 | pr_warn("find_grant_ptes() failure.\n"); |
799 | goto out_put_map; | 801 | goto out_put_map; |
800 | } | 802 | } |
801 | } | 803 | } |
@@ -855,7 +857,7 @@ static int __init gntdev_init(void) | |||
855 | 857 | ||
856 | err = misc_register(&gntdev_miscdev); | 858 | err = misc_register(&gntdev_miscdev); |
857 | if (err != 0) { | 859 | if (err != 0) { |
858 | printk(KERN_ERR "Could not register gntdev device\n"); | 860 | pr_err("Could not register gntdev device\n"); |
859 | return err; | 861 | return err; |
860 | } | 862 | } |
861 | return 0; | 863 | return 0; |
diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c index 04c1b2d9b775..04cdeb8e3719 100644 --- a/drivers/xen/grant-table.c +++ b/drivers/xen/grant-table.c | |||
@@ -31,6 +31,8 @@ | |||
31 | * IN THE SOFTWARE. | 31 | * IN THE SOFTWARE. |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #define pr_fmt(fmt) "xen:" KBUILD_MODNAME ": " fmt | ||
35 | |||
34 | #include <linux/module.h> | 36 | #include <linux/module.h> |
35 | #include <linux/sched.h> | 37 | #include <linux/sched.h> |
36 | #include <linux/mm.h> | 38 | #include <linux/mm.h> |
@@ -508,8 +510,7 @@ static void gnttab_handle_deferred(unsigned long unused) | |||
508 | entry = NULL; | 510 | entry = NULL; |
509 | } else { | 511 | } else { |
510 | if (!--entry->warn_delay) | 512 | if (!--entry->warn_delay) |
511 | pr_info("g.e. %#x still pending\n", | 513 | pr_info("g.e. %#x still pending\n", entry->ref); |
512 | entry->ref); | ||
513 | if (!first) | 514 | if (!first) |
514 | first = entry; | 515 | first = entry; |
515 | } | 516 | } |
@@ -838,7 +839,7 @@ gnttab_retry_eagain_gop(unsigned int cmd, void *gop, int16_t *status, | |||
838 | } while ((*status == GNTST_eagain) && (delay < MAX_DELAY)); | 839 | } while ((*status == GNTST_eagain) && (delay < MAX_DELAY)); |
839 | 840 | ||
840 | if (delay >= MAX_DELAY) { | 841 | if (delay >= MAX_DELAY) { |
841 | printk(KERN_ERR "%s: %s eagain grant\n", func, current->comm); | 842 | pr_err("%s: %s eagain grant\n", func, current->comm); |
842 | *status = GNTST_bad_page; | 843 | *status = GNTST_bad_page; |
843 | } | 844 | } |
844 | } | 845 | } |
@@ -1048,8 +1049,8 @@ static int gnttab_map(unsigned int start_idx, unsigned int end_idx) | |||
1048 | xatp.gpfn = (xen_hvm_resume_frames >> PAGE_SHIFT) + i; | 1049 | xatp.gpfn = (xen_hvm_resume_frames >> PAGE_SHIFT) + i; |
1049 | rc = HYPERVISOR_memory_op(XENMEM_add_to_physmap, &xatp); | 1050 | rc = HYPERVISOR_memory_op(XENMEM_add_to_physmap, &xatp); |
1050 | if (rc != 0) { | 1051 | if (rc != 0) { |
1051 | printk(KERN_WARNING | 1052 | pr_warn("grant table add_to_physmap failed, err=%d\n", |
1052 | "grant table add_to_physmap failed, err=%d\n", rc); | 1053 | rc); |
1053 | break; | 1054 | break; |
1054 | } | 1055 | } |
1055 | } while (i-- > start_idx); | 1056 | } while (i-- > start_idx); |
@@ -1131,8 +1132,7 @@ static void gnttab_request_version(void) | |||
1131 | grefs_per_grant_frame = PAGE_SIZE / sizeof(struct grant_entry_v1); | 1132 | grefs_per_grant_frame = PAGE_SIZE / sizeof(struct grant_entry_v1); |
1132 | gnttab_interface = &gnttab_v1_ops; | 1133 | gnttab_interface = &gnttab_v1_ops; |
1133 | } | 1134 | } |
1134 | printk(KERN_INFO "Grant tables using version %d layout.\n", | 1135 | pr_info("Grant tables using version %d layout\n", grant_table_version); |
1135 | grant_table_version); | ||
1136 | } | 1136 | } |
1137 | 1137 | ||
1138 | static int gnttab_setup(void) | 1138 | static int gnttab_setup(void) |
@@ -1150,8 +1150,7 @@ static int gnttab_setup(void) | |||
1150 | gnttab_shared.addr = xen_remap(xen_hvm_resume_frames, | 1150 | gnttab_shared.addr = xen_remap(xen_hvm_resume_frames, |
1151 | PAGE_SIZE * max_nr_gframes); | 1151 | PAGE_SIZE * max_nr_gframes); |
1152 | if (gnttab_shared.addr == NULL) { | 1152 | if (gnttab_shared.addr == NULL) { |
1153 | printk(KERN_WARNING | 1153 | pr_warn("Failed to ioremap gnttab share frames!\n"); |
1154 | "Failed to ioremap gnttab share frames!"); | ||
1155 | return -ENOMEM; | 1154 | return -ENOMEM; |
1156 | } | 1155 | } |
1157 | } | 1156 | } |
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c index b1005d4a953d..9385b4524547 100644 --- a/drivers/xen/manage.c +++ b/drivers/xen/manage.c | |||
@@ -1,6 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Handle extern requests for shutdown, reboot and sysrq | 2 | * Handle extern requests for shutdown, reboot and sysrq |
3 | */ | 3 | */ |
4 | |||
5 | #define pr_fmt(fmt) "xen:" KBUILD_MODNAME ": " fmt | ||
6 | |||
4 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
5 | #include <linux/err.h> | 8 | #include <linux/err.h> |
6 | #include <linux/slab.h> | 9 | #include <linux/slab.h> |
@@ -73,8 +76,7 @@ static int xen_suspend(void *data) | |||
73 | 76 | ||
74 | err = syscore_suspend(); | 77 | err = syscore_suspend(); |
75 | if (err) { | 78 | if (err) { |
76 | printk(KERN_ERR "xen_suspend: system core suspend failed: %d\n", | 79 | pr_err("%s: system core suspend failed: %d\n", __func__, err); |
77 | err); | ||
78 | return err; | 80 | return err; |
79 | } | 81 | } |
80 | 82 | ||
@@ -115,14 +117,14 @@ static void do_suspend(void) | |||
115 | during suspend. */ | 117 | during suspend. */ |
116 | err = freeze_processes(); | 118 | err = freeze_processes(); |
117 | if (err) { | 119 | if (err) { |
118 | printk(KERN_ERR "xen suspend: freeze failed %d\n", err); | 120 | pr_err("%s: freeze failed %d\n", __func__, err); |
119 | goto out; | 121 | goto out; |
120 | } | 122 | } |
121 | #endif | 123 | #endif |
122 | 124 | ||
123 | err = dpm_suspend_start(PMSG_FREEZE); | 125 | err = dpm_suspend_start(PMSG_FREEZE); |
124 | if (err) { | 126 | if (err) { |
125 | printk(KERN_ERR "xen suspend: dpm_suspend_start %d\n", err); | 127 | pr_err("%s: dpm_suspend_start %d\n", __func__, err); |
126 | goto out_thaw; | 128 | goto out_thaw; |
127 | } | 129 | } |
128 | 130 | ||
@@ -131,7 +133,7 @@ static void do_suspend(void) | |||
131 | 133 | ||
132 | err = dpm_suspend_end(PMSG_FREEZE); | 134 | err = dpm_suspend_end(PMSG_FREEZE); |
133 | if (err) { | 135 | if (err) { |
134 | printk(KERN_ERR "dpm_suspend_end failed: %d\n", err); | 136 | pr_err("dpm_suspend_end failed: %d\n", err); |
135 | si.cancelled = 0; | 137 | si.cancelled = 0; |
136 | goto out_resume; | 138 | goto out_resume; |
137 | } | 139 | } |
@@ -153,7 +155,7 @@ static void do_suspend(void) | |||
153 | dpm_resume_start(si.cancelled ? PMSG_THAW : PMSG_RESTORE); | 155 | dpm_resume_start(si.cancelled ? PMSG_THAW : PMSG_RESTORE); |
154 | 156 | ||
155 | if (err) { | 157 | if (err) { |
156 | printk(KERN_ERR "failed to start xen_suspend: %d\n", err); | 158 | pr_err("failed to start xen_suspend: %d\n", err); |
157 | si.cancelled = 1; | 159 | si.cancelled = 1; |
158 | } | 160 | } |
159 | 161 | ||
@@ -245,7 +247,7 @@ static void shutdown_handler(struct xenbus_watch *watch, | |||
245 | if (handler->cb) { | 247 | if (handler->cb) { |
246 | handler->cb(); | 248 | handler->cb(); |
247 | } else { | 249 | } else { |
248 | printk(KERN_INFO "Ignoring shutdown request: %s\n", str); | 250 | pr_info("Ignoring shutdown request: %s\n", str); |
249 | shutting_down = SHUTDOWN_INVALID; | 251 | shutting_down = SHUTDOWN_INVALID; |
250 | } | 252 | } |
251 | 253 | ||
@@ -265,8 +267,7 @@ static void sysrq_handler(struct xenbus_watch *watch, const char **vec, | |||
265 | if (err) | 267 | if (err) |
266 | return; | 268 | return; |
267 | if (!xenbus_scanf(xbt, "control", "sysrq", "%c", &sysrq_key)) { | 269 | if (!xenbus_scanf(xbt, "control", "sysrq", "%c", &sysrq_key)) { |
268 | printk(KERN_ERR "Unable to read sysrq code in " | 270 | pr_err("Unable to read sysrq code in control/sysrq\n"); |
269 | "control/sysrq\n"); | ||
270 | xenbus_transaction_end(xbt, 1); | 271 | xenbus_transaction_end(xbt, 1); |
271 | return; | 272 | return; |
272 | } | 273 | } |
@@ -299,14 +300,14 @@ static int setup_shutdown_watcher(void) | |||
299 | 300 | ||
300 | err = register_xenbus_watch(&shutdown_watch); | 301 | err = register_xenbus_watch(&shutdown_watch); |
301 | if (err) { | 302 | if (err) { |
302 | printk(KERN_ERR "Failed to set shutdown watcher\n"); | 303 | pr_err("Failed to set shutdown watcher\n"); |
303 | return err; | 304 | return err; |
304 | } | 305 | } |
305 | 306 | ||
306 | #ifdef CONFIG_MAGIC_SYSRQ | 307 | #ifdef CONFIG_MAGIC_SYSRQ |
307 | err = register_xenbus_watch(&sysrq_watch); | 308 | err = register_xenbus_watch(&sysrq_watch); |
308 | if (err) { | 309 | if (err) { |
309 | printk(KERN_ERR "Failed to set sysrq watcher\n"); | 310 | pr_err("Failed to set sysrq watcher\n"); |
310 | return err; | 311 | return err; |
311 | } | 312 | } |
312 | #endif | 313 | #endif |
diff --git a/drivers/xen/mcelog.c b/drivers/xen/mcelog.c index 8feee08bcb43..6ab6a79c38a5 100644 --- a/drivers/xen/mcelog.c +++ b/drivers/xen/mcelog.c | |||
@@ -32,6 +32,8 @@ | |||
32 | * IN THE SOFTWARE. | 32 | * IN THE SOFTWARE. |
33 | */ | 33 | */ |
34 | 34 | ||
35 | #define pr_fmt(fmt) "xen_mcelog: " fmt | ||
36 | |||
35 | #include <linux/init.h> | 37 | #include <linux/init.h> |
36 | #include <linux/types.h> | 38 | #include <linux/types.h> |
37 | #include <linux/kernel.h> | 39 | #include <linux/kernel.h> |
@@ -51,8 +53,6 @@ | |||
51 | #include <asm/xen/hypercall.h> | 53 | #include <asm/xen/hypercall.h> |
52 | #include <asm/xen/hypervisor.h> | 54 | #include <asm/xen/hypervisor.h> |
53 | 55 | ||
54 | #define XEN_MCELOG "xen_mcelog: " | ||
55 | |||
56 | static struct mc_info g_mi; | 56 | static struct mc_info g_mi; |
57 | static struct mcinfo_logical_cpu *g_physinfo; | 57 | static struct mcinfo_logical_cpu *g_physinfo; |
58 | static uint32_t ncpus; | 58 | static uint32_t ncpus; |
@@ -227,7 +227,7 @@ static int convert_log(struct mc_info *mi) | |||
227 | mic = NULL; | 227 | mic = NULL; |
228 | x86_mcinfo_lookup(&mic, mi, MC_TYPE_GLOBAL); | 228 | x86_mcinfo_lookup(&mic, mi, MC_TYPE_GLOBAL); |
229 | if (unlikely(!mic)) { | 229 | if (unlikely(!mic)) { |
230 | pr_warning(XEN_MCELOG "Failed to find global error info\n"); | 230 | pr_warn("Failed to find global error info\n"); |
231 | return -ENODEV; | 231 | return -ENODEV; |
232 | } | 232 | } |
233 | 233 | ||
@@ -241,8 +241,7 @@ static int convert_log(struct mc_info *mi) | |||
241 | if (g_physinfo[i].mc_apicid == m.apicid) | 241 | if (g_physinfo[i].mc_apicid == m.apicid) |
242 | break; | 242 | break; |
243 | if (unlikely(i == ncpus)) { | 243 | if (unlikely(i == ncpus)) { |
244 | pr_warning(XEN_MCELOG "Failed to match cpu with apicid %d\n", | 244 | pr_warn("Failed to match cpu with apicid %d\n", m.apicid); |
245 | m.apicid); | ||
246 | return -ENODEV; | 245 | return -ENODEV; |
247 | } | 246 | } |
248 | 247 | ||
@@ -254,7 +253,7 @@ static int convert_log(struct mc_info *mi) | |||
254 | mic = NULL; | 253 | mic = NULL; |
255 | x86_mcinfo_lookup(&mic, mi, MC_TYPE_BANK); | 254 | x86_mcinfo_lookup(&mic, mi, MC_TYPE_BANK); |
256 | if (unlikely(!mic)) { | 255 | if (unlikely(!mic)) { |
257 | pr_warning(XEN_MCELOG "Fail to find bank error info\n"); | 256 | pr_warn("Fail to find bank error info\n"); |
258 | return -ENODEV; | 257 | return -ENODEV; |
259 | } | 258 | } |
260 | 259 | ||
@@ -295,9 +294,8 @@ static int mc_queue_handle(uint32_t flags) | |||
295 | mc_op.u.mc_fetch.flags = flags; | 294 | mc_op.u.mc_fetch.flags = flags; |
296 | ret = HYPERVISOR_mca(&mc_op); | 295 | ret = HYPERVISOR_mca(&mc_op); |
297 | if (ret) { | 296 | if (ret) { |
298 | pr_err(XEN_MCELOG "Failed to fetch %s error log\n", | 297 | pr_err("Failed to fetch %surgent error log\n", |
299 | (flags == XEN_MC_URGENT) ? | 298 | flags == XEN_MC_URGENT ? "" : "non"); |
300 | "urgnet" : "nonurgent"); | ||
301 | break; | 299 | break; |
302 | } | 300 | } |
303 | 301 | ||
@@ -307,15 +305,12 @@ static int mc_queue_handle(uint32_t flags) | |||
307 | else { | 305 | else { |
308 | ret = convert_log(&g_mi); | 306 | ret = convert_log(&g_mi); |
309 | if (ret) | 307 | if (ret) |
310 | pr_warning(XEN_MCELOG | 308 | pr_warn("Failed to convert this error log, continue acking it anyway\n"); |
311 | "Failed to convert this error log, " | ||
312 | "continue acking it anyway\n"); | ||
313 | 309 | ||
314 | mc_op.u.mc_fetch.flags = flags | XEN_MC_ACK; | 310 | mc_op.u.mc_fetch.flags = flags | XEN_MC_ACK; |
315 | ret = HYPERVISOR_mca(&mc_op); | 311 | ret = HYPERVISOR_mca(&mc_op); |
316 | if (ret) { | 312 | if (ret) { |
317 | pr_err(XEN_MCELOG | 313 | pr_err("Failed to ack previous error log\n"); |
318 | "Failed to ack previous error log\n"); | ||
319 | break; | 314 | break; |
320 | } | 315 | } |
321 | } | 316 | } |
@@ -334,15 +329,12 @@ static void xen_mce_work_fn(struct work_struct *work) | |||
334 | /* urgent mc_info */ | 329 | /* urgent mc_info */ |
335 | err = mc_queue_handle(XEN_MC_URGENT); | 330 | err = mc_queue_handle(XEN_MC_URGENT); |
336 | if (err) | 331 | if (err) |
337 | pr_err(XEN_MCELOG | 332 | pr_err("Failed to handle urgent mc_info queue, continue handling nonurgent mc_info queue anyway\n"); |
338 | "Failed to handle urgent mc_info queue, " | ||
339 | "continue handling nonurgent mc_info queue anyway.\n"); | ||
340 | 333 | ||
341 | /* nonurgent mc_info */ | 334 | /* nonurgent mc_info */ |
342 | err = mc_queue_handle(XEN_MC_NONURGENT); | 335 | err = mc_queue_handle(XEN_MC_NONURGENT); |
343 | if (err) | 336 | if (err) |
344 | pr_err(XEN_MCELOG | 337 | pr_err("Failed to handle nonurgent mc_info queue\n"); |
345 | "Failed to handle nonurgent mc_info queue.\n"); | ||
346 | 338 | ||
347 | /* wake processes polling /dev/mcelog */ | 339 | /* wake processes polling /dev/mcelog */ |
348 | wake_up_interruptible(&xen_mce_chrdev_wait); | 340 | wake_up_interruptible(&xen_mce_chrdev_wait); |
@@ -370,7 +362,7 @@ static int bind_virq_for_mce(void) | |||
370 | set_xen_guest_handle(mc_op.u.mc_physcpuinfo.info, g_physinfo); | 362 | set_xen_guest_handle(mc_op.u.mc_physcpuinfo.info, g_physinfo); |
371 | ret = HYPERVISOR_mca(&mc_op); | 363 | ret = HYPERVISOR_mca(&mc_op); |
372 | if (ret) { | 364 | if (ret) { |
373 | pr_err(XEN_MCELOG "Failed to get CPU numbers\n"); | 365 | pr_err("Failed to get CPU numbers\n"); |
374 | return ret; | 366 | return ret; |
375 | } | 367 | } |
376 | 368 | ||
@@ -383,7 +375,7 @@ static int bind_virq_for_mce(void) | |||
383 | set_xen_guest_handle(mc_op.u.mc_physcpuinfo.info, g_physinfo); | 375 | set_xen_guest_handle(mc_op.u.mc_physcpuinfo.info, g_physinfo); |
384 | ret = HYPERVISOR_mca(&mc_op); | 376 | ret = HYPERVISOR_mca(&mc_op); |
385 | if (ret) { | 377 | if (ret) { |
386 | pr_err(XEN_MCELOG "Failed to get CPU info\n"); | 378 | pr_err("Failed to get CPU info\n"); |
387 | kfree(g_physinfo); | 379 | kfree(g_physinfo); |
388 | return ret; | 380 | return ret; |
389 | } | 381 | } |
@@ -391,7 +383,7 @@ static int bind_virq_for_mce(void) | |||
391 | ret = bind_virq_to_irqhandler(VIRQ_MCA, 0, | 383 | ret = bind_virq_to_irqhandler(VIRQ_MCA, 0, |
392 | xen_mce_interrupt, 0, "mce", NULL); | 384 | xen_mce_interrupt, 0, "mce", NULL); |
393 | if (ret < 0) { | 385 | if (ret < 0) { |
394 | pr_err(XEN_MCELOG "Failed to bind virq\n"); | 386 | pr_err("Failed to bind virq\n"); |
395 | kfree(g_physinfo); | 387 | kfree(g_physinfo); |
396 | return ret; | 388 | return ret; |
397 | } | 389 | } |
diff --git a/drivers/xen/pcpu.c b/drivers/xen/pcpu.c index 6536d5ab1697..79e1dff7ed4f 100644 --- a/drivers/xen/pcpu.c +++ b/drivers/xen/pcpu.c | |||
@@ -31,6 +31,8 @@ | |||
31 | * IN THE SOFTWARE. | 31 | * IN THE SOFTWARE. |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #define pr_fmt(fmt) "xen_cpu: " fmt | ||
35 | |||
34 | #include <linux/interrupt.h> | 36 | #include <linux/interrupt.h> |
35 | #include <linux/spinlock.h> | 37 | #include <linux/spinlock.h> |
36 | #include <linux/cpu.h> | 38 | #include <linux/cpu.h> |
@@ -44,7 +46,6 @@ | |||
44 | #include <asm/xen/hypervisor.h> | 46 | #include <asm/xen/hypervisor.h> |
45 | #include <asm/xen/hypercall.h> | 47 | #include <asm/xen/hypercall.h> |
46 | 48 | ||
47 | #define XEN_PCPU "xen_cpu: " | ||
48 | 49 | ||
49 | /* | 50 | /* |
50 | * @cpu_id: Xen physical cpu logic number | 51 | * @cpu_id: Xen physical cpu logic number |
@@ -242,8 +243,7 @@ static struct pcpu *create_and_register_pcpu(struct xenpf_pcpuinfo *info) | |||
242 | 243 | ||
243 | err = register_pcpu(pcpu); | 244 | err = register_pcpu(pcpu); |
244 | if (err) { | 245 | if (err) { |
245 | pr_warning(XEN_PCPU "Failed to register pcpu%u\n", | 246 | pr_warn("Failed to register pcpu%u\n", info->xen_cpuid); |
246 | info->xen_cpuid); | ||
247 | return ERR_PTR(-ENOENT); | 247 | return ERR_PTR(-ENOENT); |
248 | } | 248 | } |
249 | 249 | ||
@@ -378,19 +378,19 @@ static int __init xen_pcpu_init(void) | |||
378 | xen_pcpu_interrupt, 0, | 378 | xen_pcpu_interrupt, 0, |
379 | "xen-pcpu", NULL); | 379 | "xen-pcpu", NULL); |
380 | if (irq < 0) { | 380 | if (irq < 0) { |
381 | pr_warning(XEN_PCPU "Failed to bind pcpu virq\n"); | 381 | pr_warn("Failed to bind pcpu virq\n"); |
382 | return irq; | 382 | return irq; |
383 | } | 383 | } |
384 | 384 | ||
385 | ret = subsys_system_register(&xen_pcpu_subsys, NULL); | 385 | ret = subsys_system_register(&xen_pcpu_subsys, NULL); |
386 | if (ret) { | 386 | if (ret) { |
387 | pr_warning(XEN_PCPU "Failed to register pcpu subsys\n"); | 387 | pr_warn("Failed to register pcpu subsys\n"); |
388 | goto err1; | 388 | goto err1; |
389 | } | 389 | } |
390 | 390 | ||
391 | ret = xen_sync_pcpus(); | 391 | ret = xen_sync_pcpus(); |
392 | if (ret) { | 392 | if (ret) { |
393 | pr_warning(XEN_PCPU "Failed to sync pcpu info\n"); | 393 | pr_warn("Failed to sync pcpu info\n"); |
394 | goto err2; | 394 | goto err2; |
395 | } | 395 | } |
396 | 396 | ||
diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c index 2cfc24d76fc5..f8e5dd701ecb 100644 --- a/drivers/xen/privcmd.c +++ b/drivers/xen/privcmd.c | |||
@@ -6,6 +6,8 @@ | |||
6 | * Copyright (c) 2002-2004, K A Fraser, B Dragovic | 6 | * Copyright (c) 2002-2004, K A Fraser, B Dragovic |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #define pr_fmt(fmt) "xen:" KBUILD_MODNAME ": " fmt | ||
10 | |||
9 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
10 | #include <linux/module.h> | 12 | #include <linux/module.h> |
11 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
@@ -565,7 +567,7 @@ static int __init privcmd_init(void) | |||
565 | 567 | ||
566 | err = misc_register(&privcmd_dev); | 568 | err = misc_register(&privcmd_dev); |
567 | if (err != 0) { | 569 | if (err != 0) { |
568 | printk(KERN_ERR "Could not register Xen privcmd device\n"); | 570 | pr_err("Could not register Xen privcmd device\n"); |
569 | return err; | 571 | return err; |
570 | } | 572 | } |
571 | return 0; | 573 | return 0; |
diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index 1d94316f0ea4..aadffcf7db9b 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c | |||
@@ -33,6 +33,8 @@ | |||
33 | * | 33 | * |
34 | */ | 34 | */ |
35 | 35 | ||
36 | #define pr_fmt(fmt) "xen:" KBUILD_MODNAME ": " fmt | ||
37 | |||
36 | #include <linux/bootmem.h> | 38 | #include <linux/bootmem.h> |
37 | #include <linux/dma-mapping.h> | 39 | #include <linux/dma-mapping.h> |
38 | #include <linux/export.h> | 40 | #include <linux/export.h> |
@@ -202,8 +204,8 @@ retry: | |||
202 | order--; | 204 | order--; |
203 | } | 205 | } |
204 | if (order != get_order(bytes)) { | 206 | if (order != get_order(bytes)) { |
205 | pr_warn("Warning: only able to allocate %ld MB " | 207 | pr_warn("Warning: only able to allocate %ld MB for software IO TLB\n", |
206 | "for software IO TLB\n", (PAGE_SIZE << order) >> 20); | 208 | (PAGE_SIZE << order) >> 20); |
207 | xen_io_tlb_nslabs = SLABS_PER_PAGE << order; | 209 | xen_io_tlb_nslabs = SLABS_PER_PAGE << order; |
208 | bytes = xen_io_tlb_nslabs << IO_TLB_SHIFT; | 210 | bytes = xen_io_tlb_nslabs << IO_TLB_SHIFT; |
209 | } | 211 | } |
@@ -242,11 +244,11 @@ error: | |||
242 | if (repeat--) { | 244 | if (repeat--) { |
243 | xen_io_tlb_nslabs = max(1024UL, /* Min is 2MB */ | 245 | xen_io_tlb_nslabs = max(1024UL, /* Min is 2MB */ |
244 | (xen_io_tlb_nslabs >> 1)); | 246 | (xen_io_tlb_nslabs >> 1)); |
245 | printk(KERN_INFO "Xen-SWIOTLB: Lowering to %luMB\n", | 247 | pr_info("Lowering to %luMB\n", |
246 | (xen_io_tlb_nslabs << IO_TLB_SHIFT) >> 20); | 248 | (xen_io_tlb_nslabs << IO_TLB_SHIFT) >> 20); |
247 | goto retry; | 249 | goto retry; |
248 | } | 250 | } |
249 | pr_err("%s (rc:%d)", xen_swiotlb_error(m_ret), rc); | 251 | pr_err("%s (rc:%d)\n", xen_swiotlb_error(m_ret), rc); |
250 | if (early) | 252 | if (early) |
251 | panic("%s (rc:%d)", xen_swiotlb_error(m_ret), rc); | 253 | panic("%s (rc:%d)", xen_swiotlb_error(m_ret), rc); |
252 | else | 254 | else |
diff --git a/drivers/xen/tmem.c b/drivers/xen/tmem.c index cc072c66c766..fd823877b947 100644 --- a/drivers/xen/tmem.c +++ b/drivers/xen/tmem.c | |||
@@ -5,6 +5,8 @@ | |||
5 | * Author: Dan Magenheimer | 5 | * Author: Dan Magenheimer |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #define pr_fmt(fmt) "xen:" KBUILD_MODNAME ": " fmt | ||
9 | |||
8 | #include <linux/module.h> | 10 | #include <linux/module.h> |
9 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
10 | #include <linux/types.h> | 12 | #include <linux/types.h> |
@@ -388,8 +390,8 @@ static int xen_tmem_init(void) | |||
388 | return PTR_ERR(old_ops); | 390 | return PTR_ERR(old_ops); |
389 | s = " (WARNING: frontswap_ops overridden)"; | 391 | s = " (WARNING: frontswap_ops overridden)"; |
390 | } | 392 | } |
391 | printk(KERN_INFO "frontswap enabled, RAM provided by " | 393 | pr_info("frontswap enabled, RAM provided by Xen Transcendent Memory%s\n", |
392 | "Xen Transcendent Memory%s\n", s); | 394 | s); |
393 | } | 395 | } |
394 | #endif | 396 | #endif |
395 | #ifdef CONFIG_CLEANCACHE | 397 | #ifdef CONFIG_CLEANCACHE |
@@ -400,8 +402,8 @@ static int xen_tmem_init(void) | |||
400 | cleancache_register_ops(&tmem_cleancache_ops); | 402 | cleancache_register_ops(&tmem_cleancache_ops); |
401 | if (old_ops) | 403 | if (old_ops) |
402 | s = " (WARNING: cleancache_ops overridden)"; | 404 | s = " (WARNING: cleancache_ops overridden)"; |
403 | printk(KERN_INFO "cleancache enabled, RAM provided by " | 405 | pr_info("cleancache enabled, RAM provided by Xen Transcendent Memory%s\n", |
404 | "Xen Transcendent Memory%s\n", s); | 406 | s); |
405 | } | 407 | } |
406 | #endif | 408 | #endif |
407 | #ifdef CONFIG_XEN_SELFBALLOONING | 409 | #ifdef CONFIG_XEN_SELFBALLOONING |
diff --git a/drivers/xen/xen-acpi-cpuhotplug.c b/drivers/xen/xen-acpi-cpuhotplug.c index 18c742bec91b..0caf4863be8c 100644 --- a/drivers/xen/xen-acpi-cpuhotplug.c +++ b/drivers/xen/xen-acpi-cpuhotplug.c | |||
@@ -15,6 +15,8 @@ | |||
15 | * details. | 15 | * details. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
19 | |||
18 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
19 | #include <linux/module.h> | 21 | #include <linux/module.h> |
20 | #include <linux/init.h> | 22 | #include <linux/init.h> |
diff --git a/drivers/xen/xen-acpi-memhotplug.c b/drivers/xen/xen-acpi-memhotplug.c index faef5b396051..9083f1e474f8 100644 --- a/drivers/xen/xen-acpi-memhotplug.c +++ b/drivers/xen/xen-acpi-memhotplug.c | |||
@@ -15,6 +15,8 @@ | |||
15 | * details. | 15 | * details. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
19 | |||
18 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
19 | #include <linux/module.h> | 21 | #include <linux/module.h> |
20 | #include <linux/init.h> | 22 | #include <linux/init.h> |
diff --git a/drivers/xen/xen-acpi-pad.c b/drivers/xen/xen-acpi-pad.c index c763479ed85e..59708fdd068b 100644 --- a/drivers/xen/xen-acpi-pad.c +++ b/drivers/xen/xen-acpi-pad.c | |||
@@ -14,6 +14,8 @@ | |||
14 | * more details. | 14 | * more details. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
18 | |||
17 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
18 | #include <linux/types.h> | 20 | #include <linux/types.h> |
19 | #include <acpi/acpi_bus.h> | 21 | #include <acpi/acpi_bus.h> |
diff --git a/drivers/xen/xen-acpi-processor.c b/drivers/xen/xen-acpi-processor.c index 8abd7d579037..13bc6c31c060 100644 --- a/drivers/xen/xen-acpi-processor.c +++ b/drivers/xen/xen-acpi-processor.c | |||
@@ -17,6 +17,8 @@ | |||
17 | * | 17 | * |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
21 | |||
20 | #include <linux/cpumask.h> | 22 | #include <linux/cpumask.h> |
21 | #include <linux/cpufreq.h> | 23 | #include <linux/cpufreq.h> |
22 | #include <linux/freezer.h> | 24 | #include <linux/freezer.h> |
@@ -34,8 +36,6 @@ | |||
34 | #include <xen/interface/platform.h> | 36 | #include <xen/interface/platform.h> |
35 | #include <asm/xen/hypercall.h> | 37 | #include <asm/xen/hypercall.h> |
36 | 38 | ||
37 | #define DRV_NAME "xen-acpi-processor: " | ||
38 | |||
39 | static int no_hypercall; | 39 | static int no_hypercall; |
40 | MODULE_PARM_DESC(off, "Inhibit the hypercall."); | 40 | MODULE_PARM_DESC(off, "Inhibit the hypercall."); |
41 | module_param_named(off, no_hypercall, int, 0400); | 41 | module_param_named(off, no_hypercall, int, 0400); |
@@ -104,7 +104,7 @@ static int push_cxx_to_hypervisor(struct acpi_processor *_pr) | |||
104 | set_xen_guest_handle(dst_cx->dp, NULL); | 104 | set_xen_guest_handle(dst_cx->dp, NULL); |
105 | } | 105 | } |
106 | if (!ok) { | 106 | if (!ok) { |
107 | pr_debug(DRV_NAME "No _Cx for ACPI CPU %u\n", _pr->acpi_id); | 107 | pr_debug("No _Cx for ACPI CPU %u\n", _pr->acpi_id); |
108 | kfree(dst_cx_states); | 108 | kfree(dst_cx_states); |
109 | return -EINVAL; | 109 | return -EINVAL; |
110 | } | 110 | } |
@@ -133,7 +133,7 @@ static int push_cxx_to_hypervisor(struct acpi_processor *_pr) | |||
133 | /* EINVAL means the ACPI ID is incorrect - meaning the ACPI | 133 | /* EINVAL means the ACPI ID is incorrect - meaning the ACPI |
134 | * table is referencing a non-existing CPU - which can happen | 134 | * table is referencing a non-existing CPU - which can happen |
135 | * with broken ACPI tables. */ | 135 | * with broken ACPI tables. */ |
136 | pr_err(DRV_NAME "(CX): Hypervisor error (%d) for ACPI CPU%u\n", | 136 | pr_err("(CX): Hypervisor error (%d) for ACPI CPU%u\n", |
137 | ret, _pr->acpi_id); | 137 | ret, _pr->acpi_id); |
138 | 138 | ||
139 | kfree(dst_cx_states); | 139 | kfree(dst_cx_states); |
@@ -239,7 +239,7 @@ static int push_pxx_to_hypervisor(struct acpi_processor *_pr) | |||
239 | dst_perf->flags |= XEN_PX_PSD; | 239 | dst_perf->flags |= XEN_PX_PSD; |
240 | 240 | ||
241 | if (dst_perf->flags != (XEN_PX_PSD | XEN_PX_PSS | XEN_PX_PCT | XEN_PX_PPC)) { | 241 | if (dst_perf->flags != (XEN_PX_PSD | XEN_PX_PSS | XEN_PX_PCT | XEN_PX_PPC)) { |
242 | pr_warn(DRV_NAME "ACPI CPU%u missing some P-state data (%x), skipping.\n", | 242 | pr_warn("ACPI CPU%u missing some P-state data (%x), skipping\n", |
243 | _pr->acpi_id, dst_perf->flags); | 243 | _pr->acpi_id, dst_perf->flags); |
244 | ret = -ENODEV; | 244 | ret = -ENODEV; |
245 | goto err_free; | 245 | goto err_free; |
@@ -265,8 +265,8 @@ static int push_pxx_to_hypervisor(struct acpi_processor *_pr) | |||
265 | /* EINVAL means the ACPI ID is incorrect - meaning the ACPI | 265 | /* EINVAL means the ACPI ID is incorrect - meaning the ACPI |
266 | * table is referencing a non-existing CPU - which can happen | 266 | * table is referencing a non-existing CPU - which can happen |
267 | * with broken ACPI tables. */ | 267 | * with broken ACPI tables. */ |
268 | pr_warn(DRV_NAME "(_PXX): Hypervisor error (%d) for ACPI CPU%u\n", | 268 | pr_warn("(_PXX): Hypervisor error (%d) for ACPI CPU%u\n", |
269 | ret, _pr->acpi_id); | 269 | ret, _pr->acpi_id); |
270 | err_free: | 270 | err_free: |
271 | if (!IS_ERR_OR_NULL(dst_states)) | 271 | if (!IS_ERR_OR_NULL(dst_states)) |
272 | kfree(dst_states); | 272 | kfree(dst_states); |
@@ -318,7 +318,7 @@ static unsigned int __init get_max_acpi_id(void) | |||
318 | max_acpi_id = max(info->acpi_id, max_acpi_id); | 318 | max_acpi_id = max(info->acpi_id, max_acpi_id); |
319 | } | 319 | } |
320 | max_acpi_id *= 2; /* Slack for CPU hotplug support. */ | 320 | max_acpi_id *= 2; /* Slack for CPU hotplug support. */ |
321 | pr_debug(DRV_NAME "Max ACPI ID: %u\n", max_acpi_id); | 321 | pr_debug("Max ACPI ID: %u\n", max_acpi_id); |
322 | return max_acpi_id; | 322 | return max_acpi_id; |
323 | } | 323 | } |
324 | /* | 324 | /* |
@@ -365,15 +365,14 @@ read_acpi_id(acpi_handle handle, u32 lvl, void *context, void **rv) | |||
365 | /* There are more ACPI Processor objects than in x2APIC or MADT. | 365 | /* There are more ACPI Processor objects than in x2APIC or MADT. |
366 | * This can happen with incorrect ACPI SSDT declerations. */ | 366 | * This can happen with incorrect ACPI SSDT declerations. */ |
367 | if (acpi_id > nr_acpi_bits) { | 367 | if (acpi_id > nr_acpi_bits) { |
368 | pr_debug(DRV_NAME "We only have %u, trying to set %u\n", | 368 | pr_debug("We only have %u, trying to set %u\n", |
369 | nr_acpi_bits, acpi_id); | 369 | nr_acpi_bits, acpi_id); |
370 | return AE_OK; | 370 | return AE_OK; |
371 | } | 371 | } |
372 | /* OK, There is a ACPI Processor object */ | 372 | /* OK, There is a ACPI Processor object */ |
373 | __set_bit(acpi_id, acpi_id_present); | 373 | __set_bit(acpi_id, acpi_id_present); |
374 | 374 | ||
375 | pr_debug(DRV_NAME "ACPI CPU%u w/ PBLK:0x%lx\n", acpi_id, | 375 | pr_debug("ACPI CPU%u w/ PBLK:0x%lx\n", acpi_id, (unsigned long)pblk); |
376 | (unsigned long)pblk); | ||
377 | 376 | ||
378 | status = acpi_evaluate_object(handle, "_CST", NULL, &buffer); | 377 | status = acpi_evaluate_object(handle, "_CST", NULL, &buffer); |
379 | if (ACPI_FAILURE(status)) { | 378 | if (ACPI_FAILURE(status)) { |
@@ -476,7 +475,7 @@ static int xen_upload_processor_pm_data(void) | |||
476 | unsigned int i; | 475 | unsigned int i; |
477 | int rc = 0; | 476 | int rc = 0; |
478 | 477 | ||
479 | pr_info(DRV_NAME "Uploading Xen processor PM info\n"); | 478 | pr_info("Uploading Xen processor PM info\n"); |
480 | 479 | ||
481 | for_each_possible_cpu(i) { | 480 | for_each_possible_cpu(i) { |
482 | struct acpi_processor *_pr; | 481 | struct acpi_processor *_pr; |
@@ -523,7 +522,7 @@ static int __init xen_acpi_processor_init(void) | |||
523 | 522 | ||
524 | acpi_perf_data = alloc_percpu(struct acpi_processor_performance); | 523 | acpi_perf_data = alloc_percpu(struct acpi_processor_performance); |
525 | if (!acpi_perf_data) { | 524 | if (!acpi_perf_data) { |
526 | pr_debug(DRV_NAME "Memory allocation error for acpi_perf_data.\n"); | 525 | pr_debug("Memory allocation error for acpi_perf_data\n"); |
527 | kfree(acpi_ids_done); | 526 | kfree(acpi_ids_done); |
528 | return -ENOMEM; | 527 | return -ENOMEM; |
529 | } | 528 | } |
diff --git a/drivers/xen/xen-balloon.c b/drivers/xen/xen-balloon.c index 8f37e23f6d13..e555845d61fa 100644 --- a/drivers/xen/xen-balloon.c +++ b/drivers/xen/xen-balloon.c | |||
@@ -30,6 +30,8 @@ | |||
30 | * IN THE SOFTWARE. | 30 | * IN THE SOFTWARE. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
34 | |||
33 | #include <linux/kernel.h> | 35 | #include <linux/kernel.h> |
34 | #include <linux/module.h> | 36 | #include <linux/module.h> |
35 | #include <linux/capability.h> | 37 | #include <linux/capability.h> |
@@ -81,7 +83,7 @@ static int balloon_init_watcher(struct notifier_block *notifier, | |||
81 | 83 | ||
82 | err = register_xenbus_watch(&target_watch); | 84 | err = register_xenbus_watch(&target_watch); |
83 | if (err) | 85 | if (err) |
84 | printk(KERN_ERR "Failed to set balloon watcher\n"); | 86 | pr_err("Failed to set balloon watcher\n"); |
85 | 87 | ||
86 | return NOTIFY_DONE; | 88 | return NOTIFY_DONE; |
87 | } | 89 | } |
@@ -95,7 +97,7 @@ static int __init balloon_init(void) | |||
95 | if (!xen_domain()) | 97 | if (!xen_domain()) |
96 | return -ENODEV; | 98 | return -ENODEV; |
97 | 99 | ||
98 | pr_info("xen-balloon: Initialising balloon driver.\n"); | 100 | pr_info("Initialising balloon driver\n"); |
99 | 101 | ||
100 | register_balloon(&balloon_dev); | 102 | register_balloon(&balloon_dev); |
101 | 103 | ||
diff --git a/drivers/xen/xen-pciback/conf_space_header.c b/drivers/xen/xen-pciback/conf_space_header.c index 3daf862d739d..c5ee82587e8c 100644 --- a/drivers/xen/xen-pciback/conf_space_header.c +++ b/drivers/xen/xen-pciback/conf_space_header.c | |||
@@ -4,6 +4,8 @@ | |||
4 | * Author: Ryan Wilson <hap9@epoch.ncsc.mil> | 4 | * Author: Ryan Wilson <hap9@epoch.ncsc.mil> |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
8 | |||
7 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
8 | #include <linux/pci.h> | 10 | #include <linux/pci.h> |
9 | #include "pciback.h" | 11 | #include "pciback.h" |
@@ -75,10 +77,8 @@ static int command_write(struct pci_dev *dev, int offset, u16 value, void *data) | |||
75 | pci_name(dev)); | 77 | pci_name(dev)); |
76 | err = pci_set_mwi(dev); | 78 | err = pci_set_mwi(dev); |
77 | if (err) { | 79 | if (err) { |
78 | printk(KERN_WARNING | 80 | pr_warn("%s: cannot enable memory-write-invalidate (%d)\n", |
79 | DRV_NAME ": %s: cannot enable " | 81 | pci_name(dev), err); |
80 | "memory-write-invalidate (%d)\n", | ||
81 | pci_name(dev), err); | ||
82 | value &= ~PCI_COMMAND_INVALIDATE; | 82 | value &= ~PCI_COMMAND_INVALIDATE; |
83 | } | 83 | } |
84 | } | 84 | } |
@@ -91,7 +91,7 @@ static int rom_write(struct pci_dev *dev, int offset, u32 value, void *data) | |||
91 | struct pci_bar_info *bar = data; | 91 | struct pci_bar_info *bar = data; |
92 | 92 | ||
93 | if (unlikely(!bar)) { | 93 | if (unlikely(!bar)) { |
94 | printk(KERN_WARNING DRV_NAME ": driver data not found for %s\n", | 94 | pr_warn(DRV_NAME ": driver data not found for %s\n", |
95 | pci_name(dev)); | 95 | pci_name(dev)); |
96 | return XEN_PCI_ERR_op_failed; | 96 | return XEN_PCI_ERR_op_failed; |
97 | } | 97 | } |
@@ -125,7 +125,7 @@ static int bar_write(struct pci_dev *dev, int offset, u32 value, void *data) | |||
125 | struct pci_bar_info *bar = data; | 125 | struct pci_bar_info *bar = data; |
126 | 126 | ||
127 | if (unlikely(!bar)) { | 127 | if (unlikely(!bar)) { |
128 | printk(KERN_WARNING DRV_NAME ": driver data not found for %s\n", | 128 | pr_warn(DRV_NAME ": driver data not found for %s\n", |
129 | pci_name(dev)); | 129 | pci_name(dev)); |
130 | return XEN_PCI_ERR_op_failed; | 130 | return XEN_PCI_ERR_op_failed; |
131 | } | 131 | } |
@@ -153,7 +153,7 @@ static int bar_read(struct pci_dev *dev, int offset, u32 * value, void *data) | |||
153 | struct pci_bar_info *bar = data; | 153 | struct pci_bar_info *bar = data; |
154 | 154 | ||
155 | if (unlikely(!bar)) { | 155 | if (unlikely(!bar)) { |
156 | printk(KERN_WARNING DRV_NAME ": driver data not found for %s\n", | 156 | pr_warn(DRV_NAME ": driver data not found for %s\n", |
157 | pci_name(dev)); | 157 | pci_name(dev)); |
158 | return XEN_PCI_ERR_op_failed; | 158 | return XEN_PCI_ERR_op_failed; |
159 | } | 159 | } |
@@ -375,7 +375,7 @@ int xen_pcibk_config_header_add_fields(struct pci_dev *dev) | |||
375 | 375 | ||
376 | default: | 376 | default: |
377 | err = -EINVAL; | 377 | err = -EINVAL; |
378 | printk(KERN_ERR DRV_NAME ": %s: Unsupported header type %d!\n", | 378 | pr_err("%s: Unsupported header type %d!\n", |
379 | pci_name(dev), dev->hdr_type); | 379 | pci_name(dev), dev->hdr_type); |
380 | break; | 380 | break; |
381 | } | 381 | } |
diff --git a/drivers/xen/xen-pciback/pci_stub.c b/drivers/xen/xen-pciback/pci_stub.c index 002089918260..62fcd485f0a7 100644 --- a/drivers/xen/xen-pciback/pci_stub.c +++ b/drivers/xen/xen-pciback/pci_stub.c | |||
@@ -4,6 +4,9 @@ | |||
4 | * Ryan Wilson <hap9@epoch.ncsc.mil> | 4 | * Ryan Wilson <hap9@epoch.ncsc.mil> |
5 | * Chris Bookholt <hap10@epoch.ncsc.mil> | 5 | * Chris Bookholt <hap10@epoch.ncsc.mil> |
6 | */ | 6 | */ |
7 | |||
8 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
9 | |||
7 | #include <linux/module.h> | 10 | #include <linux/module.h> |
8 | #include <linux/init.h> | 11 | #include <linux/init.h> |
9 | #include <linux/rwsem.h> | 12 | #include <linux/rwsem.h> |
@@ -425,8 +428,6 @@ static int __init pcistub_init_devices_late(void) | |||
425 | unsigned long flags; | 428 | unsigned long flags; |
426 | int err = 0; | 429 | int err = 0; |
427 | 430 | ||
428 | pr_debug(DRV_NAME ": pcistub_init_devices_late\n"); | ||
429 | |||
430 | spin_lock_irqsave(&pcistub_devices_lock, flags); | 431 | spin_lock_irqsave(&pcistub_devices_lock, flags); |
431 | 432 | ||
432 | while (!list_empty(&seized_devices)) { | 433 | while (!list_empty(&seized_devices)) { |
@@ -544,15 +545,11 @@ static void pcistub_remove(struct pci_dev *dev) | |||
544 | found_psdev->pdev); | 545 | found_psdev->pdev); |
545 | 546 | ||
546 | if (found_psdev->pdev) { | 547 | if (found_psdev->pdev) { |
547 | printk(KERN_WARNING DRV_NAME ": ****** removing device " | 548 | pr_warn("****** removing device %s while still in-use! ******\n", |
548 | "%s while still in-use! ******\n", | ||
549 | pci_name(found_psdev->dev)); | 549 | pci_name(found_psdev->dev)); |
550 | printk(KERN_WARNING DRV_NAME ": ****** driver domain may" | 550 | pr_warn("****** driver domain may still access this device's i/o resources!\n"); |
551 | " still access this device's i/o resources!\n"); | 551 | pr_warn("****** shutdown driver domain before binding device\n"); |
552 | printk(KERN_WARNING DRV_NAME ": ****** shutdown driver " | 552 | pr_warn("****** to other drivers or domains\n"); |
553 | "domain before binding device\n"); | ||
554 | printk(KERN_WARNING DRV_NAME ": ****** to other drivers " | ||
555 | "or domains\n"); | ||
556 | 553 | ||
557 | xen_pcibk_release_pci_dev(found_psdev->pdev, | 554 | xen_pcibk_release_pci_dev(found_psdev->pdev, |
558 | found_psdev->dev); | 555 | found_psdev->dev); |
@@ -1018,7 +1015,7 @@ static int pcistub_device_id_add(int domain, int bus, int slot, int func) | |||
1018 | pci_dev_id->bus = bus; | 1015 | pci_dev_id->bus = bus; |
1019 | pci_dev_id->devfn = devfn; | 1016 | pci_dev_id->devfn = devfn; |
1020 | 1017 | ||
1021 | pr_debug(DRV_NAME ": wants to seize %04x:%02x:%02x.%d\n", | 1018 | pr_debug("wants to seize %04x:%02x:%02x.%d\n", |
1022 | domain, bus, slot, func); | 1019 | domain, bus, slot, func); |
1023 | 1020 | ||
1024 | spin_lock_irqsave(&device_ids_lock, flags); | 1021 | spin_lock_irqsave(&device_ids_lock, flags); |
@@ -1048,8 +1045,8 @@ static int pcistub_device_id_remove(int domain, int bus, int slot, int func) | |||
1048 | 1045 | ||
1049 | err = 0; | 1046 | err = 0; |
1050 | 1047 | ||
1051 | pr_debug(DRV_NAME ": removed %04x:%02x:%02x.%d from " | 1048 | pr_debug("removed %04x:%02x:%02x.%d from seize list\n", |
1052 | "seize list\n", domain, bus, slot, func); | 1049 | domain, bus, slot, func); |
1053 | } | 1050 | } |
1054 | } | 1051 | } |
1055 | spin_unlock_irqrestore(&device_ids_lock, flags); | 1052 | spin_unlock_irqrestore(&device_ids_lock, flags); |
@@ -1474,7 +1471,7 @@ out: | |||
1474 | return err; | 1471 | return err; |
1475 | 1472 | ||
1476 | parse_error: | 1473 | parse_error: |
1477 | printk(KERN_ERR DRV_NAME ": Error parsing pci_devs_to_hide at \"%s\"\n", | 1474 | pr_err("Error parsing pci_devs_to_hide at \"%s\"\n", |
1478 | pci_devs_to_hide + pos); | 1475 | pci_devs_to_hide + pos); |
1479 | return -EINVAL; | 1476 | return -EINVAL; |
1480 | } | 1477 | } |
diff --git a/drivers/xen/xen-pciback/pciback_ops.c b/drivers/xen/xen-pciback/pciback_ops.c index b98cf0c35725..64eb0cd8b8af 100644 --- a/drivers/xen/xen-pciback/pciback_ops.c +++ b/drivers/xen/xen-pciback/pciback_ops.c | |||
@@ -3,6 +3,9 @@ | |||
3 | * | 3 | * |
4 | * Author: Ryan Wilson <hap9@epoch.ncsc.mil> | 4 | * Author: Ryan Wilson <hap9@epoch.ncsc.mil> |
5 | */ | 5 | */ |
6 | |||
7 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
8 | |||
6 | #include <linux/module.h> | 9 | #include <linux/module.h> |
7 | #include <linux/wait.h> | 10 | #include <linux/wait.h> |
8 | #include <linux/bitops.h> | 11 | #include <linux/bitops.h> |
@@ -144,7 +147,7 @@ int xen_pcibk_enable_msi(struct xen_pcibk_device *pdev, | |||
144 | status = pci_enable_msi(dev); | 147 | status = pci_enable_msi(dev); |
145 | 148 | ||
146 | if (status) { | 149 | if (status) { |
147 | pr_warn_ratelimited(DRV_NAME ": %s: error enabling MSI for guest %u: err %d\n", | 150 | pr_warn_ratelimited("%s: error enabling MSI for guest %u: err %d\n", |
148 | pci_name(dev), pdev->xdev->otherend_id, | 151 | pci_name(dev), pdev->xdev->otherend_id, |
149 | status); | 152 | status); |
150 | op->value = 0; | 153 | op->value = 0; |
@@ -225,7 +228,7 @@ int xen_pcibk_enable_msix(struct xen_pcibk_device *pdev, | |||
225 | op->msix_entries[i].vector); | 228 | op->msix_entries[i].vector); |
226 | } | 229 | } |
227 | } else | 230 | } else |
228 | pr_warn_ratelimited(DRV_NAME ": %s: error enabling MSI-X for guest %u: err %d!\n", | 231 | pr_warn_ratelimited("%s: error enabling MSI-X for guest %u: err %d!\n", |
229 | pci_name(dev), pdev->xdev->otherend_id, | 232 | pci_name(dev), pdev->xdev->otherend_id, |
230 | result); | 233 | result); |
231 | kfree(entries); | 234 | kfree(entries); |
@@ -372,7 +375,7 @@ static irqreturn_t xen_pcibk_guest_interrupt(int irq, void *dev_id) | |||
372 | dev_data->handled++; | 375 | dev_data->handled++; |
373 | if ((dev_data->handled % 1000) == 0) { | 376 | if ((dev_data->handled % 1000) == 0) { |
374 | if (xen_test_irq_shared(irq)) { | 377 | if (xen_test_irq_shared(irq)) { |
375 | printk(KERN_INFO "%s IRQ line is not shared " | 378 | pr_info("%s IRQ line is not shared " |
376 | "with other domains. Turning ISR off\n", | 379 | "with other domains. Turning ISR off\n", |
377 | dev_data->irq_name); | 380 | dev_data->irq_name); |
378 | dev_data->ack_intr = 0; | 381 | dev_data->ack_intr = 0; |
diff --git a/drivers/xen/xen-pciback/vpci.c b/drivers/xen/xen-pciback/vpci.c index 0f478ac483cd..3165ce361b00 100644 --- a/drivers/xen/xen-pciback/vpci.c +++ b/drivers/xen/xen-pciback/vpci.c | |||
@@ -5,6 +5,8 @@ | |||
5 | * Author: Ryan Wilson <hap9@epoch.ncsc.mil> | 5 | * Author: Ryan Wilson <hap9@epoch.ncsc.mil> |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
9 | |||
8 | #include <linux/list.h> | 10 | #include <linux/list.h> |
9 | #include <linux/slab.h> | 11 | #include <linux/slab.h> |
10 | #include <linux/pci.h> | 12 | #include <linux/pci.h> |
@@ -102,8 +104,7 @@ static int __xen_pcibk_add_pci_dev(struct xen_pcibk_device *pdev, | |||
102 | struct pci_dev_entry, list); | 104 | struct pci_dev_entry, list); |
103 | 105 | ||
104 | if (match_slot(dev, t->dev)) { | 106 | if (match_slot(dev, t->dev)) { |
105 | pr_info(DRV_NAME ": vpci: %s: " | 107 | pr_info("vpci: %s: assign to virtual slot %d func %d\n", |
106 | "assign to virtual slot %d func %d\n", | ||
107 | pci_name(dev), slot, | 108 | pci_name(dev), slot, |
108 | PCI_FUNC(dev->devfn)); | 109 | PCI_FUNC(dev->devfn)); |
109 | list_add_tail(&dev_entry->list, | 110 | list_add_tail(&dev_entry->list, |
@@ -117,9 +118,8 @@ static int __xen_pcibk_add_pci_dev(struct xen_pcibk_device *pdev, | |||
117 | /* Assign to a new slot on the virtual PCI bus */ | 118 | /* Assign to a new slot on the virtual PCI bus */ |
118 | for (slot = 0; slot < PCI_SLOT_MAX; slot++) { | 119 | for (slot = 0; slot < PCI_SLOT_MAX; slot++) { |
119 | if (list_empty(&vpci_dev->dev_list[slot])) { | 120 | if (list_empty(&vpci_dev->dev_list[slot])) { |
120 | printk(KERN_INFO DRV_NAME | 121 | pr_info("vpci: %s: assign to virtual slot %d\n", |
121 | ": vpci: %s: assign to virtual slot %d\n", | 122 | pci_name(dev), slot); |
122 | pci_name(dev), slot); | ||
123 | list_add_tail(&dev_entry->list, | 123 | list_add_tail(&dev_entry->list, |
124 | &vpci_dev->dev_list[slot]); | 124 | &vpci_dev->dev_list[slot]); |
125 | func = dev->is_virtfn ? 0 : PCI_FUNC(dev->devfn); | 125 | func = dev->is_virtfn ? 0 : PCI_FUNC(dev->devfn); |
diff --git a/drivers/xen/xen-pciback/xenbus.c b/drivers/xen/xen-pciback/xenbus.c index 64b11f99eacc..a9ed867afaba 100644 --- a/drivers/xen/xen-pciback/xenbus.c +++ b/drivers/xen/xen-pciback/xenbus.c | |||
@@ -3,6 +3,9 @@ | |||
3 | * | 3 | * |
4 | * Author: Ryan Wilson <hap9@epoch.ncsc.mil> | 4 | * Author: Ryan Wilson <hap9@epoch.ncsc.mil> |
5 | */ | 5 | */ |
6 | |||
7 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
8 | |||
6 | #include <linux/module.h> | 9 | #include <linux/module.h> |
7 | #include <linux/init.h> | 10 | #include <linux/init.h> |
8 | #include <linux/list.h> | 11 | #include <linux/list.h> |
@@ -723,14 +726,13 @@ int __init xen_pcibk_xenbus_register(void) | |||
723 | { | 726 | { |
724 | xen_pcibk_wq = create_workqueue("xen_pciback_workqueue"); | 727 | xen_pcibk_wq = create_workqueue("xen_pciback_workqueue"); |
725 | if (!xen_pcibk_wq) { | 728 | if (!xen_pcibk_wq) { |
726 | printk(KERN_ERR "%s: create" | 729 | pr_err("%s: create xen_pciback_workqueue failed\n", __func__); |
727 | "xen_pciback_workqueue failed\n", __func__); | ||
728 | return -EFAULT; | 730 | return -EFAULT; |
729 | } | 731 | } |
730 | xen_pcibk_backend = &xen_pcibk_vpci_backend; | 732 | xen_pcibk_backend = &xen_pcibk_vpci_backend; |
731 | if (passthrough) | 733 | if (passthrough) |
732 | xen_pcibk_backend = &xen_pcibk_passthrough_backend; | 734 | xen_pcibk_backend = &xen_pcibk_passthrough_backend; |
733 | pr_info(DRV_NAME ": backend is %s\n", xen_pcibk_backend->name); | 735 | pr_info("backend is %s\n", xen_pcibk_backend->name); |
734 | return xenbus_register_backend(&xen_pcibk_driver); | 736 | return xenbus_register_backend(&xen_pcibk_driver); |
735 | } | 737 | } |
736 | 738 | ||
diff --git a/drivers/xen/xen-selfballoon.c b/drivers/xen/xen-selfballoon.c index f70984a892aa..02817a85f877 100644 --- a/drivers/xen/xen-selfballoon.c +++ b/drivers/xen/xen-selfballoon.c | |||
@@ -64,6 +64,8 @@ | |||
64 | * | 64 | * |
65 | */ | 65 | */ |
66 | 66 | ||
67 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
68 | |||
67 | #include <linux/kernel.h> | 69 | #include <linux/kernel.h> |
68 | #include <linux/bootmem.h> | 70 | #include <linux/bootmem.h> |
69 | #include <linux/swap.h> | 71 | #include <linux/swap.h> |
@@ -510,22 +512,19 @@ int xen_selfballoon_init(bool use_selfballooning, bool use_frontswap_selfshrink) | |||
510 | return -ENODEV; | 512 | return -ENODEV; |
511 | 513 | ||
512 | if (xen_initial_domain()) { | 514 | if (xen_initial_domain()) { |
513 | pr_info("xen/balloon: Xen selfballooning driver " | 515 | pr_info("Xen selfballooning driver disabled for domain0\n"); |
514 | "disabled for domain0.\n"); | ||
515 | return -ENODEV; | 516 | return -ENODEV; |
516 | } | 517 | } |
517 | 518 | ||
518 | xen_selfballooning_enabled = tmem_enabled && use_selfballooning; | 519 | xen_selfballooning_enabled = tmem_enabled && use_selfballooning; |
519 | if (xen_selfballooning_enabled) { | 520 | if (xen_selfballooning_enabled) { |
520 | pr_info("xen/balloon: Initializing Xen " | 521 | pr_info("Initializing Xen selfballooning driver\n"); |
521 | "selfballooning driver.\n"); | ||
522 | enable = true; | 522 | enable = true; |
523 | } | 523 | } |
524 | #ifdef CONFIG_FRONTSWAP | 524 | #ifdef CONFIG_FRONTSWAP |
525 | frontswap_selfshrinking = tmem_enabled && use_frontswap_selfshrink; | 525 | frontswap_selfshrinking = tmem_enabled && use_frontswap_selfshrink; |
526 | if (frontswap_selfshrinking) { | 526 | if (frontswap_selfshrinking) { |
527 | pr_info("xen/balloon: Initializing frontswap " | 527 | pr_info("Initializing frontswap selfshrinking driver\n"); |
528 | "selfshrinking driver.\n"); | ||
529 | enable = true; | 528 | enable = true; |
530 | } | 529 | } |
531 | #endif | 530 | #endif |
diff --git a/drivers/xen/xenbus/xenbus_comms.c b/drivers/xen/xenbus/xenbus_comms.c index c5aa55c5d371..fdb0f339d0a7 100644 --- a/drivers/xen/xenbus/xenbus_comms.c +++ b/drivers/xen/xenbus/xenbus_comms.c | |||
@@ -30,6 +30,8 @@ | |||
30 | * IN THE SOFTWARE. | 30 | * IN THE SOFTWARE. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
34 | |||
33 | #include <linux/wait.h> | 35 | #include <linux/wait.h> |
34 | #include <linux/interrupt.h> | 36 | #include <linux/interrupt.h> |
35 | #include <linux/sched.h> | 37 | #include <linux/sched.h> |
@@ -205,13 +207,12 @@ int xb_init_comms(void) | |||
205 | struct xenstore_domain_interface *intf = xen_store_interface; | 207 | struct xenstore_domain_interface *intf = xen_store_interface; |
206 | 208 | ||
207 | if (intf->req_prod != intf->req_cons) | 209 | if (intf->req_prod != intf->req_cons) |
208 | printk(KERN_ERR "XENBUS request ring is not quiescent " | 210 | pr_err("request ring is not quiescent (%08x:%08x)!\n", |
209 | "(%08x:%08x)!\n", intf->req_cons, intf->req_prod); | 211 | intf->req_cons, intf->req_prod); |
210 | 212 | ||
211 | if (intf->rsp_prod != intf->rsp_cons) { | 213 | if (intf->rsp_prod != intf->rsp_cons) { |
212 | printk(KERN_WARNING "XENBUS response ring is not quiescent " | 214 | pr_warn("response ring is not quiescent (%08x:%08x): fixing up\n", |
213 | "(%08x:%08x): fixing up\n", | 215 | intf->rsp_cons, intf->rsp_prod); |
214 | intf->rsp_cons, intf->rsp_prod); | ||
215 | /* breaks kdump */ | 216 | /* breaks kdump */ |
216 | if (!reset_devices) | 217 | if (!reset_devices) |
217 | intf->rsp_cons = intf->rsp_prod; | 218 | intf->rsp_cons = intf->rsp_prod; |
@@ -225,7 +226,7 @@ int xb_init_comms(void) | |||
225 | err = bind_evtchn_to_irqhandler(xen_store_evtchn, wake_waiting, | 226 | err = bind_evtchn_to_irqhandler(xen_store_evtchn, wake_waiting, |
226 | 0, "xenbus", &xb_waitq); | 227 | 0, "xenbus", &xb_waitq); |
227 | if (err < 0) { | 228 | if (err < 0) { |
228 | printk(KERN_ERR "XENBUS request irq failed %i\n", err); | 229 | pr_err("request irq failed %i\n", err); |
229 | return err; | 230 | return err; |
230 | } | 231 | } |
231 | 232 | ||
diff --git a/drivers/xen/xenbus/xenbus_dev_backend.c b/drivers/xen/xenbus/xenbus_dev_backend.c index a6f42fc01407..b17707ee07d4 100644 --- a/drivers/xen/xenbus/xenbus_dev_backend.c +++ b/drivers/xen/xenbus/xenbus_dev_backend.c | |||
@@ -1,3 +1,5 @@ | |||
1 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
2 | |||
1 | #include <linux/slab.h> | 3 | #include <linux/slab.h> |
2 | #include <linux/types.h> | 4 | #include <linux/types.h> |
3 | #include <linux/mm.h> | 5 | #include <linux/mm.h> |
@@ -127,7 +129,7 @@ static int __init xenbus_backend_init(void) | |||
127 | 129 | ||
128 | err = misc_register(&xenbus_backend_dev); | 130 | err = misc_register(&xenbus_backend_dev); |
129 | if (err) | 131 | if (err) |
130 | printk(KERN_ERR "Could not register xenbus backend device\n"); | 132 | pr_err("Could not register xenbus backend device\n"); |
131 | return err; | 133 | return err; |
132 | } | 134 | } |
133 | 135 | ||
diff --git a/drivers/xen/xenbus/xenbus_dev_frontend.c b/drivers/xen/xenbus/xenbus_dev_frontend.c index ac727028e658..85534ea63555 100644 --- a/drivers/xen/xenbus/xenbus_dev_frontend.c +++ b/drivers/xen/xenbus/xenbus_dev_frontend.c | |||
@@ -35,6 +35,8 @@ | |||
35 | * Turned xenfs into a loadable module. | 35 | * Turned xenfs into a loadable module. |
36 | */ | 36 | */ |
37 | 37 | ||
38 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
39 | |||
38 | #include <linux/kernel.h> | 40 | #include <linux/kernel.h> |
39 | #include <linux/errno.h> | 41 | #include <linux/errno.h> |
40 | #include <linux/uio.h> | 42 | #include <linux/uio.h> |
@@ -616,7 +618,7 @@ static int __init xenbus_init(void) | |||
616 | 618 | ||
617 | err = misc_register(&xenbus_dev); | 619 | err = misc_register(&xenbus_dev); |
618 | if (err) | 620 | if (err) |
619 | printk(KERN_ERR "Could not register xenbus frontend device\n"); | 621 | pr_err("Could not register xenbus frontend device\n"); |
620 | return err; | 622 | return err; |
621 | } | 623 | } |
622 | 624 | ||
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c index 56cfaaa9d006..cb1afc00c96d 100644 --- a/drivers/xen/xenbus/xenbus_probe.c +++ b/drivers/xen/xenbus/xenbus_probe.c | |||
@@ -30,6 +30,8 @@ | |||
30 | * IN THE SOFTWARE. | 30 | * IN THE SOFTWARE. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
34 | |||
33 | #define DPRINTK(fmt, args...) \ | 35 | #define DPRINTK(fmt, args...) \ |
34 | pr_debug("xenbus_probe (%s:%d) " fmt ".\n", \ | 36 | pr_debug("xenbus_probe (%s:%d) " fmt ".\n", \ |
35 | __func__, __LINE__, ##args) | 37 | __func__, __LINE__, ##args) |
@@ -280,15 +282,15 @@ void xenbus_dev_shutdown(struct device *_dev) | |||
280 | 282 | ||
281 | get_device(&dev->dev); | 283 | get_device(&dev->dev); |
282 | if (dev->state != XenbusStateConnected) { | 284 | if (dev->state != XenbusStateConnected) { |
283 | printk(KERN_INFO "%s: %s: %s != Connected, skipping\n", __func__, | 285 | pr_info("%s: %s: %s != Connected, skipping\n", |
284 | dev->nodename, xenbus_strstate(dev->state)); | 286 | __func__, dev->nodename, xenbus_strstate(dev->state)); |
285 | goto out; | 287 | goto out; |
286 | } | 288 | } |
287 | xenbus_switch_state(dev, XenbusStateClosing); | 289 | xenbus_switch_state(dev, XenbusStateClosing); |
288 | timeout = wait_for_completion_timeout(&dev->down, timeout); | 290 | timeout = wait_for_completion_timeout(&dev->down, timeout); |
289 | if (!timeout) | 291 | if (!timeout) |
290 | printk(KERN_INFO "%s: %s timeout closing device\n", | 292 | pr_info("%s: %s timeout closing device\n", |
291 | __func__, dev->nodename); | 293 | __func__, dev->nodename); |
292 | out: | 294 | out: |
293 | put_device(&dev->dev); | 295 | put_device(&dev->dev); |
294 | } | 296 | } |
@@ -579,8 +581,7 @@ int xenbus_dev_suspend(struct device *dev) | |||
579 | if (drv->suspend) | 581 | if (drv->suspend) |
580 | err = drv->suspend(xdev); | 582 | err = drv->suspend(xdev); |
581 | if (err) | 583 | if (err) |
582 | printk(KERN_WARNING | 584 | pr_warn("suspend %s failed: %i\n", dev_name(dev), err); |
583 | "xenbus: suspend %s failed: %i\n", dev_name(dev), err); | ||
584 | return 0; | 585 | return 0; |
585 | } | 586 | } |
586 | EXPORT_SYMBOL_GPL(xenbus_dev_suspend); | 587 | EXPORT_SYMBOL_GPL(xenbus_dev_suspend); |
@@ -599,9 +600,8 @@ int xenbus_dev_resume(struct device *dev) | |||
599 | drv = to_xenbus_driver(dev->driver); | 600 | drv = to_xenbus_driver(dev->driver); |
600 | err = talk_to_otherend(xdev); | 601 | err = talk_to_otherend(xdev); |
601 | if (err) { | 602 | if (err) { |
602 | printk(KERN_WARNING | 603 | pr_warn("resume (talk_to_otherend) %s failed: %i\n", |
603 | "xenbus: resume (talk_to_otherend) %s failed: %i\n", | 604 | dev_name(dev), err); |
604 | dev_name(dev), err); | ||
605 | return err; | 605 | return err; |
606 | } | 606 | } |
607 | 607 | ||
@@ -610,18 +610,15 @@ int xenbus_dev_resume(struct device *dev) | |||
610 | if (drv->resume) { | 610 | if (drv->resume) { |
611 | err = drv->resume(xdev); | 611 | err = drv->resume(xdev); |
612 | if (err) { | 612 | if (err) { |
613 | printk(KERN_WARNING | 613 | pr_warn("resume %s failed: %i\n", dev_name(dev), err); |
614 | "xenbus: resume %s failed: %i\n", | ||
615 | dev_name(dev), err); | ||
616 | return err; | 614 | return err; |
617 | } | 615 | } |
618 | } | 616 | } |
619 | 617 | ||
620 | err = watch_otherend(xdev); | 618 | err = watch_otherend(xdev); |
621 | if (err) { | 619 | if (err) { |
622 | printk(KERN_WARNING | 620 | pr_warn("resume (watch_otherend) %s failed: %d.\n", |
623 | "xenbus_probe: resume (watch_otherend) %s failed: " | 621 | dev_name(dev), err); |
624 | "%d.\n", dev_name(dev), err); | ||
625 | return err; | 622 | return err; |
626 | } | 623 | } |
627 | 624 | ||
@@ -776,8 +773,7 @@ static int __init xenbus_init(void) | |||
776 | /* Initialize the interface to xenstore. */ | 773 | /* Initialize the interface to xenstore. */ |
777 | err = xs_init(); | 774 | err = xs_init(); |
778 | if (err) { | 775 | if (err) { |
779 | printk(KERN_WARNING | 776 | pr_warn("Error initializing xenstore comms: %i\n", err); |
780 | "XENBUS: Error initializing xenstore comms: %i\n", err); | ||
781 | goto out_error; | 777 | goto out_error; |
782 | } | 778 | } |
783 | 779 | ||
diff --git a/drivers/xen/xenbus/xenbus_probe_backend.c b/drivers/xen/xenbus/xenbus_probe_backend.c index 257be37d9091..998bbbab816b 100644 --- a/drivers/xen/xenbus/xenbus_probe_backend.c +++ b/drivers/xen/xenbus/xenbus_probe_backend.c | |||
@@ -31,9 +31,11 @@ | |||
31 | * IN THE SOFTWARE. | 31 | * IN THE SOFTWARE. |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #define DPRINTK(fmt, args...) \ | 34 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
35 | pr_debug("xenbus_probe (%s:%d) " fmt ".\n", \ | 35 | |
36 | __func__, __LINE__, ##args) | 36 | #define DPRINTK(fmt, ...) \ |
37 | pr_debug("(%s:%d) " fmt "\n", \ | ||
38 | __func__, __LINE__, ##__VA_ARGS__) | ||
37 | 39 | ||
38 | #include <linux/kernel.h> | 40 | #include <linux/kernel.h> |
39 | #include <linux/err.h> | 41 | #include <linux/err.h> |
diff --git a/drivers/xen/xenbus/xenbus_probe_frontend.c b/drivers/xen/xenbus/xenbus_probe_frontend.c index a7e25073de19..6ed8a9df4472 100644 --- a/drivers/xen/xenbus/xenbus_probe_frontend.c +++ b/drivers/xen/xenbus/xenbus_probe_frontend.c | |||
@@ -1,6 +1,8 @@ | |||
1 | #define DPRINTK(fmt, args...) \ | 1 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
2 | pr_debug("xenbus_probe (%s:%d) " fmt ".\n", \ | 2 | |
3 | __func__, __LINE__, ##args) | 3 | #define DPRINTK(fmt, ...) \ |
4 | pr_debug("(%s:%d) " fmt "\n", \ | ||
5 | __func__, __LINE__, ##__VA_ARGS__) | ||
4 | 6 | ||
5 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
6 | #include <linux/err.h> | 8 | #include <linux/err.h> |
@@ -36,13 +38,13 @@ static int frontend_bus_id(char bus_id[XEN_BUS_ID_SIZE], const char *nodename) | |||
36 | { | 38 | { |
37 | nodename = strchr(nodename, '/'); | 39 | nodename = strchr(nodename, '/'); |
38 | if (!nodename || strlen(nodename + 1) >= XEN_BUS_ID_SIZE) { | 40 | if (!nodename || strlen(nodename + 1) >= XEN_BUS_ID_SIZE) { |
39 | printk(KERN_WARNING "XENBUS: bad frontend %s\n", nodename); | 41 | pr_warn("bad frontend %s\n", nodename); |
40 | return -EINVAL; | 42 | return -EINVAL; |
41 | } | 43 | } |
42 | 44 | ||
43 | strlcpy(bus_id, nodename + 1, XEN_BUS_ID_SIZE); | 45 | strlcpy(bus_id, nodename + 1, XEN_BUS_ID_SIZE); |
44 | if (!strchr(bus_id, '/')) { | 46 | if (!strchr(bus_id, '/')) { |
45 | printk(KERN_WARNING "XENBUS: bus_id %s no slash\n", bus_id); | 47 | pr_warn("bus_id %s no slash\n", bus_id); |
46 | return -EINVAL; | 48 | return -EINVAL; |
47 | } | 49 | } |
48 | *strchr(bus_id, '/') = '-'; | 50 | *strchr(bus_id, '/') = '-'; |
@@ -234,15 +236,13 @@ static int print_device_status(struct device *dev, void *data) | |||
234 | 236 | ||
235 | if (!dev->driver) { | 237 | if (!dev->driver) { |
236 | /* Information only: is this too noisy? */ | 238 | /* Information only: is this too noisy? */ |
237 | printk(KERN_INFO "XENBUS: Device with no driver: %s\n", | 239 | pr_info("Device with no driver: %s\n", xendev->nodename); |
238 | xendev->nodename); | ||
239 | } else if (xendev->state < XenbusStateConnected) { | 240 | } else if (xendev->state < XenbusStateConnected) { |
240 | enum xenbus_state rstate = XenbusStateUnknown; | 241 | enum xenbus_state rstate = XenbusStateUnknown; |
241 | if (xendev->otherend) | 242 | if (xendev->otherend) |
242 | rstate = xenbus_read_driver_state(xendev->otherend); | 243 | rstate = xenbus_read_driver_state(xendev->otherend); |
243 | printk(KERN_WARNING "XENBUS: Timeout connecting " | 244 | pr_warn("Timeout connecting to device: %s (local state %d, remote state %d)\n", |
244 | "to device: %s (local state %d, remote state %d)\n", | 245 | xendev->nodename, xendev->state, rstate); |
245 | xendev->nodename, xendev->state, rstate); | ||
246 | } | 246 | } |
247 | 247 | ||
248 | return 0; | 248 | return 0; |
@@ -256,12 +256,13 @@ static bool wait_loop(unsigned long start, unsigned int max_delay, | |||
256 | { | 256 | { |
257 | if (time_after(jiffies, start + (*seconds_waited+5)*HZ)) { | 257 | if (time_after(jiffies, start + (*seconds_waited+5)*HZ)) { |
258 | if (!*seconds_waited) | 258 | if (!*seconds_waited) |
259 | printk(KERN_WARNING "XENBUS: Waiting for " | 259 | pr_warn("Waiting for devices to initialise: "); |
260 | "devices to initialise: "); | ||
261 | *seconds_waited += 5; | 260 | *seconds_waited += 5; |
262 | printk("%us...", max_delay - *seconds_waited); | 261 | pr_cont("%us...", max_delay - *seconds_waited); |
263 | if (*seconds_waited == max_delay) | 262 | if (*seconds_waited == max_delay) { |
263 | pr_cont("\n"); | ||
264 | return true; | 264 | return true; |
265 | } | ||
265 | } | 266 | } |
266 | 267 | ||
267 | schedule_timeout_interruptible(HZ/10); | 268 | schedule_timeout_interruptible(HZ/10); |
@@ -342,7 +343,7 @@ static void xenbus_reset_wait_for_backend(char *be, int expected) | |||
342 | timeout = wait_event_interruptible_timeout(backend_state_wq, | 343 | timeout = wait_event_interruptible_timeout(backend_state_wq, |
343 | backend_state == expected, 5 * HZ); | 344 | backend_state == expected, 5 * HZ); |
344 | if (timeout <= 0) | 345 | if (timeout <= 0) |
345 | printk(KERN_INFO "XENBUS: backend %s timed out.\n", be); | 346 | pr_info("backend %s timed out\n", be); |
346 | } | 347 | } |
347 | 348 | ||
348 | /* | 349 | /* |
@@ -365,7 +366,7 @@ static void xenbus_reset_frontend(char *fe, char *be, int be_state) | |||
365 | be_watch.callback = xenbus_reset_backend_state_changed; | 366 | be_watch.callback = xenbus_reset_backend_state_changed; |
366 | backend_state = XenbusStateUnknown; | 367 | backend_state = XenbusStateUnknown; |
367 | 368 | ||
368 | printk(KERN_INFO "XENBUS: triggering reconnect on %s\n", be); | 369 | pr_info("triggering reconnect on %s\n", be); |
369 | register_xenbus_watch(&be_watch); | 370 | register_xenbus_watch(&be_watch); |
370 | 371 | ||
371 | /* fall through to forward backend to state XenbusStateInitialising */ | 372 | /* fall through to forward backend to state XenbusStateInitialising */ |
@@ -384,7 +385,7 @@ static void xenbus_reset_frontend(char *fe, char *be, int be_state) | |||
384 | } | 385 | } |
385 | 386 | ||
386 | unregister_xenbus_watch(&be_watch); | 387 | unregister_xenbus_watch(&be_watch); |
387 | printk(KERN_INFO "XENBUS: reconnect done on %s\n", be); | 388 | pr_info("reconnect done on %s\n", be); |
388 | kfree(be_watch.node); | 389 | kfree(be_watch.node); |
389 | } | 390 | } |
390 | 391 | ||
diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c index 88e677b0de74..b6d5fff43d16 100644 --- a/drivers/xen/xenbus/xenbus_xs.c +++ b/drivers/xen/xenbus/xenbus_xs.c | |||
@@ -31,6 +31,8 @@ | |||
31 | * IN THE SOFTWARE. | 31 | * IN THE SOFTWARE. |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
35 | |||
34 | #include <linux/unistd.h> | 36 | #include <linux/unistd.h> |
35 | #include <linux/errno.h> | 37 | #include <linux/errno.h> |
36 | #include <linux/types.h> | 38 | #include <linux/types.h> |
@@ -129,9 +131,8 @@ static int get_error(const char *errorstring) | |||
129 | 131 | ||
130 | for (i = 0; strcmp(errorstring, xsd_errors[i].errstring) != 0; i++) { | 132 | for (i = 0; strcmp(errorstring, xsd_errors[i].errstring) != 0; i++) { |
131 | if (i == ARRAY_SIZE(xsd_errors) - 1) { | 133 | if (i == ARRAY_SIZE(xsd_errors) - 1) { |
132 | printk(KERN_WARNING | 134 | pr_warn("xen store gave: unknown error %s\n", |
133 | "XENBUS xen store gave: unknown error %s", | 135 | errorstring); |
134 | errorstring); | ||
135 | return EINVAL; | 136 | return EINVAL; |
136 | } | 137 | } |
137 | } | 138 | } |
@@ -272,10 +273,8 @@ static void *xs_talkv(struct xenbus_transaction t, | |||
272 | } | 273 | } |
273 | 274 | ||
274 | if (msg.type != type) { | 275 | if (msg.type != type) { |
275 | if (printk_ratelimit()) | 276 | pr_warn_ratelimited("unexpected type [%d], expected [%d]\n", |
276 | printk(KERN_WARNING | 277 | msg.type, type); |
277 | "XENBUS unexpected type [%d], expected [%d]\n", | ||
278 | msg.type, type); | ||
279 | kfree(ret); | 278 | kfree(ret); |
280 | return ERR_PTR(-EINVAL); | 279 | return ERR_PTR(-EINVAL); |
281 | } | 280 | } |
@@ -655,7 +654,7 @@ static void xs_reset_watches(void) | |||
655 | 654 | ||
656 | err = xs_error(xs_single(XBT_NIL, XS_RESET_WATCHES, "", NULL)); | 655 | err = xs_error(xs_single(XBT_NIL, XS_RESET_WATCHES, "", NULL)); |
657 | if (err && err != -EEXIST) | 656 | if (err && err != -EEXIST) |
658 | printk(KERN_WARNING "xs_reset_watches failed: %d\n", err); | 657 | pr_warn("xs_reset_watches failed: %d\n", err); |
659 | } | 658 | } |
660 | 659 | ||
661 | /* Register callback to watch this node. */ | 660 | /* Register callback to watch this node. */ |
@@ -705,9 +704,7 @@ void unregister_xenbus_watch(struct xenbus_watch *watch) | |||
705 | 704 | ||
706 | err = xs_unwatch(watch->node, token); | 705 | err = xs_unwatch(watch->node, token); |
707 | if (err) | 706 | if (err) |
708 | printk(KERN_WARNING | 707 | pr_warn("Failed to release watch %s: %i\n", watch->node, err); |
709 | "XENBUS Failed to release watch %s: %i\n", | ||
710 | watch->node, err); | ||
711 | 708 | ||
712 | up_read(&xs_state.watch_mutex); | 709 | up_read(&xs_state.watch_mutex); |
713 | 710 | ||
@@ -901,8 +898,7 @@ static int xenbus_thread(void *unused) | |||
901 | for (;;) { | 898 | for (;;) { |
902 | err = process_msg(); | 899 | err = process_msg(); |
903 | if (err) | 900 | if (err) |
904 | printk(KERN_WARNING "XENBUS error %d while reading " | 901 | pr_warn("error %d while reading message\n", err); |
905 | "message\n", err); | ||
906 | if (kthread_should_stop()) | 902 | if (kthread_should_stop()) |
907 | break; | 903 | break; |
908 | } | 904 | } |
diff --git a/drivers/xen/xencomm.c b/drivers/xen/xencomm.c index b91f8ff50d05..4793fc594549 100644 --- a/drivers/xen/xencomm.c +++ b/drivers/xen/xencomm.c | |||
@@ -18,6 +18,8 @@ | |||
18 | * Authors: Hollis Blanchard <hollisb@us.ibm.com> | 18 | * Authors: Hollis Blanchard <hollisb@us.ibm.com> |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
22 | |||
21 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
22 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
23 | #include <asm/page.h> | 25 | #include <asm/page.h> |
diff --git a/drivers/xen/xenfs/super.c b/drivers/xen/xenfs/super.c index 71679875f056..06092e0fe8ce 100644 --- a/drivers/xen/xenfs/super.c +++ b/drivers/xen/xenfs/super.c | |||
@@ -7,6 +7,8 @@ | |||
7 | * Turned xenfs into a loadable module. | 7 | * Turned xenfs into a loadable module. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
11 | |||
10 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
11 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
12 | #include <linux/module.h> | 14 | #include <linux/module.h> |
@@ -82,7 +84,7 @@ static int __init xenfs_init(void) | |||
82 | if (xen_domain()) | 84 | if (xen_domain()) |
83 | return register_filesystem(&xenfs_type); | 85 | return register_filesystem(&xenfs_type); |
84 | 86 | ||
85 | printk(KERN_INFO "XENFS: not registering filesystem on non-xen platform\n"); | 87 | pr_info("not registering filesystem on non-xen platform\n"); |
86 | return 0; | 88 | return 0; |
87 | } | 89 | } |
88 | 90 | ||
diff --git a/include/xen/hvm.h b/include/xen/hvm.h index 13e43e41637d..63917a8de3b0 100644 --- a/include/xen/hvm.h +++ b/include/xen/hvm.h | |||
@@ -44,8 +44,8 @@ static inline int hvm_get_parameter(int idx, uint64_t *value) | |||
44 | xhv.index = idx; | 44 | xhv.index = idx; |
45 | r = HYPERVISOR_hvm_op(HVMOP_get_param, &xhv); | 45 | r = HYPERVISOR_hvm_op(HVMOP_get_param, &xhv); |
46 | if (r < 0) { | 46 | if (r < 0) { |
47 | printk(KERN_ERR "Cannot get hvm parameter %s (%d): %d!\n", | 47 | pr_err("Cannot get hvm parameter %s (%d): %d!\n", |
48 | param_name(idx), idx, r); | 48 | param_name(idx), idx, r); |
49 | return r; | 49 | return r; |
50 | } | 50 | } |
51 | *value = xhv.value; | 51 | *value = xhv.value; |