Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'for-linus-5.8b-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip

Pull xen updates from Juergen Gross:

- several smaller cleanups

- a fix for a Xen guest regression with CPU offlining

- a small fix in the xen pvcalls backend driver

- an update of MAINTAINERS

* tag 'for-linus-5.8b-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
MAINTAINERS: Update PARAVIRT_OPS_INTERFACE and VMWARE_HYPERVISOR_INTERFACE
xen/pci: Get rid of verbose_request and use dev_dbg() instead
xenbus: Use dev_printk() when possible
xen-pciback: Use dev_printk() when possible
xen: enable BALLOON_MEMORY_HOTPLUG by default
xen: expand BALLOON_MEMORY_HOTPLUG description
xen/pvcalls: Make pvcalls_back_global static
xen/cpuhotplug: Fix initial CPU offlining for PV(H) guests
xen-platform: Constify dev_pm_ops
xen/pvcalls-back: test for errors when calling backend_connect()

+90 -142
+2 -2
MAINTAINERS
··· 12911 12911 12912 12912 PARAVIRT_OPS INTERFACE 12913 12913 M: Juergen Gross <jgross@suse.com> 12914 - M: Thomas Hellstrom <thellstrom@vmware.com> 12914 + M: Deep Shah <sdeep@vmware.com> 12915 12915 M: "VMware, Inc." <pv-drivers@vmware.com> 12916 12916 L: virtualization@lists.linux-foundation.org 12917 12917 S: Supported ··· 18287 18287 F: drivers/misc/vmw_balloon.c 18288 18288 18289 18289 VMWARE HYPERVISOR INTERFACE 18290 - M: Thomas Hellstrom <thellstrom@vmware.com> 18290 + M: Deep Shah <sdeep@vmware.com> 18291 18291 M: "VMware, Inc." <pv-drivers@vmware.com> 18292 18292 L: virtualization@lists.linux-foundation.org 18293 18293 S: Supported
+10 -17
drivers/pci/xen-pcifront.c
··· 77 77 static DEFINE_SPINLOCK(pcifront_dev_lock); 78 78 static struct pcifront_device *pcifront_dev; 79 79 80 - static int verbose_request; 81 - module_param(verbose_request, int, 0644); 82 - 83 80 static int errno_to_pcibios_err(int errno) 84 81 { 85 82 switch (errno) { ··· 187 190 struct pcifront_sd *sd = bus->sysdata; 188 191 struct pcifront_device *pdev = pcifront_get_pdev(sd); 189 192 190 - if (verbose_request) 191 - dev_info(&pdev->xdev->dev, 192 - "read dev=%04x:%02x:%02x.%d - offset %x size %d\n", 193 - pci_domain_nr(bus), bus->number, PCI_SLOT(devfn), 194 - PCI_FUNC(devfn), where, size); 193 + dev_dbg(&pdev->xdev->dev, 194 + "read dev=%04x:%02x:%02x.%d - offset %x size %d\n", 195 + pci_domain_nr(bus), bus->number, PCI_SLOT(devfn), 196 + PCI_FUNC(devfn), where, size); 195 197 196 198 err = do_pci_op(pdev, &op); 197 199 198 200 if (likely(!err)) { 199 - if (verbose_request) 200 - dev_info(&pdev->xdev->dev, "read got back value %x\n", 201 - op.value); 201 + dev_dbg(&pdev->xdev->dev, "read got back value %x\n", 202 + op.value); 202 203 203 204 *val = op.value; 204 205 } else if (err == -ENODEV) { ··· 224 229 struct pcifront_sd *sd = bus->sysdata; 225 230 struct pcifront_device *pdev = pcifront_get_pdev(sd); 226 231 227 - if (verbose_request) 228 - dev_info(&pdev->xdev->dev, 229 - "write dev=%04x:%02x:%02x.%d - " 230 - "offset %x size %d val %x\n", 231 - pci_domain_nr(bus), bus->number, 232 - PCI_SLOT(devfn), PCI_FUNC(devfn), where, size, val); 232 + dev_dbg(&pdev->xdev->dev, 233 + "write dev=%04x:%02x:%02x.%d - offset %x size %d val %x\n", 234 + pci_domain_nr(bus), bus->number, 235 + PCI_SLOT(devfn), PCI_FUNC(devfn), where, size, val); 233 236 234 237 return errno_to_pcibios_err(do_pci_op(pdev, &op)); 235 238 }
+4
drivers/xen/Kconfig
··· 13 13 config XEN_BALLOON_MEMORY_HOTPLUG 14 14 bool "Memory hotplug support for Xen balloon driver" 15 15 depends on XEN_BALLOON && MEMORY_HOTPLUG 16 + default y 16 17 help 17 18 Memory hotplug support for Xen balloon driver allows expanding memory 18 19 available for the system above limit declared at system startup. 19 20 It is very useful on critical systems which require long 20 21 run without rebooting. 22 + 23 + It's also very useful for non PV domains to obtain unpopulated physical 24 + memory ranges to use in order to map foreign memory or grants. 21 25 22 26 Memory could be hotplugged in following steps: 23 27
+3 -5
drivers/xen/cpu_hotplug.c
··· 93 93 (void)register_xenbus_watch(&cpu_watch); 94 94 95 95 for_each_possible_cpu(cpu) { 96 - if (vcpu_online(cpu) == 0) { 97 - device_offline(get_cpu_device(cpu)); 98 - set_cpu_present(cpu, false); 99 - } 96 + if (vcpu_online(cpu) == 0) 97 + disable_hotplug_cpu(cpu); 100 98 } 101 99 102 100 return NOTIFY_DONE; ··· 117 119 return 0; 118 120 } 119 121 120 - arch_initcall(setup_vcpu_hotplug_event); 122 + late_initcall(setup_vcpu_hotplug_event); 121 123
+1 -1
drivers/xen/platform-pci.c
··· 168 168 {0,} 169 169 }; 170 170 171 - static struct dev_pm_ops platform_pm_ops = { 171 + static const struct dev_pm_ops platform_pm_ops = { 172 172 .resume_noirq = platform_pci_resume, 173 173 }; 174 174
+3 -2
drivers/xen/pvcalls-back.c
··· 24 24 #define PVCALLS_VERSIONS "1" 25 25 #define MAX_RING_ORDER XENBUS_MAX_RING_GRANT_ORDER 26 26 27 - struct pvcalls_back_global { 27 + static struct pvcalls_back_global { 28 28 struct list_head frontends; 29 29 struct semaphore frontends_lock; 30 30 } pvcalls_back_global; ··· 1088 1088 case XenbusStateInitialised: 1089 1089 switch (state) { 1090 1090 case XenbusStateConnected: 1091 - backend_connect(dev); 1091 + if (backend_connect(dev)) 1092 + return; 1092 1093 xenbus_switch_state(dev, XenbusStateConnected); 1093 1094 break; 1094 1095 case XenbusStateClosing:
+6 -10
drivers/xen/xen-pciback/conf_space.c
··· 10 10 * Author: Ryan Wilson <hap9@epoch.ncsc.mil> 11 11 */ 12 12 13 + #define dev_fmt(fmt) DRV_NAME ": " fmt 14 + 13 15 #include <linux/kernel.h> 14 16 #include <linux/moduleparam.h> 15 17 #include <linux/pci.h> ··· 156 154 * (as if device didn't respond) */ 157 155 u32 value = 0, tmp_val; 158 156 159 - if (unlikely(verbose_request)) 160 - printk(KERN_DEBUG DRV_NAME ": %s: read %d bytes at 0x%x\n", 161 - pci_name(dev), size, offset); 157 + dev_dbg(&dev->dev, "read %d bytes at 0x%x\n", size, offset); 162 158 163 159 if (!valid_request(offset, size)) { 164 160 err = XEN_PCI_ERR_invalid_offset; ··· 195 195 } 196 196 197 197 out: 198 - if (unlikely(verbose_request)) 199 - printk(KERN_DEBUG DRV_NAME ": %s: read %d bytes at 0x%x = %x\n", 200 - pci_name(dev), size, offset, value); 198 + dev_dbg(&dev->dev, "read %d bytes at 0x%x = %x\n", size, offset, value); 201 199 202 200 *ret_val = value; 203 201 return xen_pcibios_err_to_errno(err); ··· 210 212 u32 tmp_val; 211 213 int field_start, field_end; 212 214 213 - if (unlikely(verbose_request)) 214 - printk(KERN_DEBUG 215 - DRV_NAME ": %s: write request %d bytes at 0x%x = %x\n", 216 - pci_name(dev), size, offset, value); 215 + dev_dbg(&dev->dev, "write request %d bytes at 0x%x = %x\n", 216 + size, offset, value); 217 217 218 218 if (!valid_request(offset, size)) 219 219 return XEN_PCI_ERR_invalid_offset;
+14 -30
drivers/xen/xen-pciback/conf_space_header.c
··· 6 6 */ 7 7 8 8 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 9 + #define dev_fmt pr_fmt 9 10 10 11 #include <linux/kernel.h> 11 12 #include <linux/pci.h> ··· 68 67 69 68 dev_data = pci_get_drvdata(dev); 70 69 if (!pci_is_enabled(dev) && is_enable_cmd(value)) { 71 - if (unlikely(verbose_request)) 72 - printk(KERN_DEBUG DRV_NAME ": %s: enable\n", 73 - pci_name(dev)); 70 + dev_dbg(&dev->dev, "enable\n"); 74 71 err = pci_enable_device(dev); 75 72 if (err) 76 73 return err; 77 74 if (dev_data) 78 75 dev_data->enable_intx = 1; 79 76 } else if (pci_is_enabled(dev) && !is_enable_cmd(value)) { 80 - if (unlikely(verbose_request)) 81 - printk(KERN_DEBUG DRV_NAME ": %s: disable\n", 82 - pci_name(dev)); 77 + dev_dbg(&dev->dev, "disable\n"); 83 78 pci_disable_device(dev); 84 79 if (dev_data) 85 80 dev_data->enable_intx = 0; 86 81 } 87 82 88 83 if (!dev->is_busmaster && is_master_cmd(value)) { 89 - if (unlikely(verbose_request)) 90 - printk(KERN_DEBUG DRV_NAME ": %s: set bus master\n", 91 - pci_name(dev)); 84 + dev_dbg(&dev->dev, "set bus master\n"); 92 85 pci_set_master(dev); 93 86 } else if (dev->is_busmaster && !is_master_cmd(value)) { 94 - if (unlikely(verbose_request)) 95 - printk(KERN_DEBUG DRV_NAME ": %s: clear bus master\n", 96 - pci_name(dev)); 87 + dev_dbg(&dev->dev, "clear bus master\n"); 97 88 pci_clear_master(dev); 98 89 } 99 90 100 91 if (!(cmd->val & PCI_COMMAND_INVALIDATE) && 101 92 (value & PCI_COMMAND_INVALIDATE)) { 102 - if (unlikely(verbose_request)) 103 - printk(KERN_DEBUG 104 - DRV_NAME ": %s: enable memory-write-invalidate\n", 105 - pci_name(dev)); 93 + dev_dbg(&dev->dev, "enable memory-write-invalidate\n"); 106 94 err = pci_set_mwi(dev); 107 95 if (err) { 108 - pr_warn("%s: cannot enable memory-write-invalidate (%d)\n", 109 - pci_name(dev), err); 96 + dev_warn(&dev->dev, "cannot enable memory-write-invalidate (%d)\n", 97 + err); 110 98 value &= ~PCI_COMMAND_INVALIDATE; 111 99 } 112 100 } else if ((cmd->val & PCI_COMMAND_INVALIDATE) && 113 101 !(value & PCI_COMMAND_INVALIDATE)) { 114 - if (unlikely(verbose_request)) 115 - printk(KERN_DEBUG 116 - DRV_NAME ": %s: disable memory-write-invalidate\n", 117 - pci_name(dev)); 102 + dev_dbg(&dev->dev, "disable memory-write-invalidate\n"); 118 103 pci_clear_mwi(dev); 119 104 } 120 105 ··· 144 157 struct pci_bar_info *bar = data; 145 158 146 159 if (unlikely(!bar)) { 147 - pr_warn(DRV_NAME ": driver data not found for %s\n", 148 - pci_name(dev)); 160 + dev_warn(&dev->dev, "driver data not found\n"); 149 161 return XEN_PCI_ERR_op_failed; 150 162 } 151 163 ··· 180 194 u32 mask; 181 195 182 196 if (unlikely(!bar)) { 183 - pr_warn(DRV_NAME ": driver data not found for %s\n", 184 - pci_name(dev)); 197 + dev_warn(&dev->dev, "driver data not found\n"); 185 198 return XEN_PCI_ERR_op_failed; 186 199 } 187 200 ··· 213 228 struct pci_bar_info *bar = data; 214 229 215 230 if (unlikely(!bar)) { 216 - pr_warn(DRV_NAME ": driver data not found for %s\n", 217 - pci_name(dev)); 231 + dev_warn(&dev->dev, "driver data not found\n"); 218 232 return XEN_PCI_ERR_op_failed; 219 233 } 220 234 ··· 417 433 418 434 default: 419 435 err = -EINVAL; 420 - pr_err("%s: Unsupported header type %d!\n", 421 - pci_name(dev), dev->hdr_type); 436 + dev_err(&dev->dev, "Unsupported header type %d!\n", 437 + dev->hdr_type); 422 438 break; 423 439 } 424 440
+4 -2
drivers/xen/xen-pciback/conf_space_quirks.c
··· 6 6 * Author: Chris Bookholt <hap10@epoch.ncsc.mil> 7 7 */ 8 8 9 + #define dev_fmt(fmt) DRV_NAME ": " fmt 10 + 9 11 #include <linux/kernel.h> 10 12 #include <linux/pci.h> 11 13 #include "pciback.h" ··· 37 35 if (match_one_device(&tmp_quirk->devid, dev) != NULL) 38 36 goto out; 39 37 tmp_quirk = NULL; 40 - printk(KERN_DEBUG DRV_NAME 41 - ": quirk didn't match any device known\n"); 38 + dev_printk(KERN_DEBUG, &dev->dev, 39 + "quirk didn't match any device known\n"); 42 40 out: 43 41 return tmp_quirk; 44 42 }
+16 -22
drivers/xen/xen-pciback/pci_stub.c
··· 6 6 */ 7 7 8 8 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 9 + #define dev_fmt pr_fmt 9 10 10 11 #include <linux/module.h> 11 12 #include <linux/init.h> ··· 627 626 if (found_psdev->pdev) { 628 627 int domid = xen_find_device_domain_owner(dev); 629 628 630 - pr_warn("****** removing device %s while still in-use by domain %d! ******\n", 629 + dev_warn(&dev->dev, "****** removing device %s while still in-use by domain %d! ******\n", 631 630 pci_name(found_psdev->dev), domid); 632 - pr_warn("****** driver domain may still access this device's i/o resources!\n"); 633 - pr_warn("****** shutdown driver domain before binding device\n"); 634 - pr_warn("****** to other drivers or domains\n"); 631 + dev_warn(&dev->dev, "****** driver domain may still access this device's i/o resources!\n"); 632 + dev_warn(&dev->dev, "****** shutdown driver domain before binding device\n"); 633 + dev_warn(&dev->dev, "****** to other drivers or domains\n"); 635 634 636 635 /* N.B. This ends up calling pcistub_put_pci_dev which ends up 637 636 * doing the FLR. */ ··· 712 711 ret = xen_pcibk_get_pcifront_dev(psdev->dev, psdev->pdev, 713 712 &aer_op->domain, &aer_op->bus, &aer_op->devfn); 714 713 if (!ret) { 715 - dev_err(&psdev->dev->dev, 716 - DRV_NAME ": failed to get pcifront device\n"); 714 + dev_err(&psdev->dev->dev, "failed to get pcifront device\n"); 717 715 return PCI_ERS_RESULT_NONE; 718 716 } 719 717 wmb(); 720 718 721 - dev_dbg(&psdev->dev->dev, 722 - DRV_NAME ": aer_op %x dom %x bus %x devfn %x\n", 719 + dev_dbg(&psdev->dev->dev, "aer_op %x dom %x bus %x devfn %x\n", 723 720 aer_cmd, aer_op->domain, aer_op->bus, aer_op->devfn); 724 721 /*local flag to mark there's aer request, xen_pcibk callback will use 725 722 * this flag to judge whether we need to check pci-front give aer ··· 753 754 754 755 if (test_bit(_XEN_PCIF_active, 755 756 (unsigned long *)&sh_info->flags)) { 756 - dev_dbg(&psdev->dev->dev, 757 - "schedule pci_conf service in " DRV_NAME "\n"); 757 + dev_dbg(&psdev->dev->dev, "schedule pci_conf service\n"); 758 758 xen_pcibk_test_and_schedule_op(psdev->pdev); 759 759 } 760 760 ··· 784 786 PCI_FUNC(dev->devfn)); 785 787 786 788 if (!psdev || !psdev->pdev) { 787 - dev_err(&dev->dev, 788 - DRV_NAME " device is not found/assigned\n"); 789 + dev_err(&dev->dev, "device is not found/assigned\n"); 789 790 goto end; 790 791 } 791 792 792 793 if (!psdev->pdev->sh_info) { 793 - dev_err(&dev->dev, DRV_NAME " device is not connected or owned" 794 + dev_err(&dev->dev, "device is not connected or owned" 794 795 " by HVM, kill it\n"); 795 796 kill_domain_by_device(psdev); 796 797 goto end; ··· 841 844 PCI_FUNC(dev->devfn)); 842 845 843 846 if (!psdev || !psdev->pdev) { 844 - dev_err(&dev->dev, 845 - DRV_NAME " device is not found/assigned\n"); 847 + dev_err(&dev->dev, "device is not found/assigned\n"); 846 848 goto end; 847 849 } 848 850 849 851 if (!psdev->pdev->sh_info) { 850 - dev_err(&dev->dev, DRV_NAME " device is not connected or owned" 852 + dev_err(&dev->dev, "device is not connected or owned" 851 853 " by HVM, kill it\n"); 852 854 kill_domain_by_device(psdev); 853 855 goto end; ··· 898 902 PCI_FUNC(dev->devfn)); 899 903 900 904 if (!psdev || !psdev->pdev) { 901 - dev_err(&dev->dev, 902 - DRV_NAME " device is not found/assigned\n"); 905 + dev_err(&dev->dev, "device is not found/assigned\n"); 903 906 goto end; 904 907 } 905 908 906 909 if (!psdev->pdev->sh_info) { 907 - dev_err(&dev->dev, DRV_NAME " device is not connected or owned" 910 + dev_err(&dev->dev, "device is not connected or owned" 908 911 " by HVM, kill it\n"); 909 912 kill_domain_by_device(psdev); 910 913 goto end; ··· 951 956 PCI_FUNC(dev->devfn)); 952 957 953 958 if (!psdev || !psdev->pdev) { 954 - dev_err(&dev->dev, 955 - DRV_NAME " device is not found/assigned\n"); 959 + dev_err(&dev->dev, "device is not found/assigned\n"); 956 960 goto end; 957 961 } 958 962 959 963 if (!psdev->pdev->sh_info) { 960 - dev_err(&dev->dev, DRV_NAME " device is not connected or owned" 964 + dev_err(&dev->dev, "device is not connected or owned" 961 965 " by HVM, kill it\n"); 962 966 kill_domain_by_device(psdev); 963 967 goto end;
-2
drivers/xen/xen-pciback/pciback.h
··· 186 186 int xen_pcibk_xenbus_register(void); 187 187 void xen_pcibk_xenbus_unregister(void); 188 188 189 - extern int verbose_request; 190 - 191 189 void xen_pcibk_test_and_schedule_op(struct xen_pcibk_device *pdev); 192 190 #endif 193 191
+17 -38
drivers/xen/xen-pciback/pciback_ops.c
··· 6 6 */ 7 7 8 8 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 9 + #define dev_fmt pr_fmt 9 10 10 11 #include <linux/moduleparam.h> 11 12 #include <linux/wait.h> ··· 14 13 #include <xen/events.h> 15 14 #include <linux/sched.h> 16 15 #include "pciback.h" 17 - 18 - int verbose_request; 19 - module_param(verbose_request, int, 0644); 20 16 21 17 static irqreturn_t xen_pcibk_guest_interrupt(int irq, void *dev_id); 22 18 ··· 145 147 struct xen_pcibk_dev_data *dev_data; 146 148 int status; 147 149 148 - if (unlikely(verbose_request)) 149 - printk(KERN_DEBUG DRV_NAME ": %s: enable MSI\n", pci_name(dev)); 150 - 151 150 if (dev->msi_enabled) 152 151 status = -EALREADY; 153 152 else if (dev->msix_enabled) ··· 153 158 status = pci_enable_msi(dev); 154 159 155 160 if (status) { 156 - pr_warn_ratelimited("%s: error enabling MSI for guest %u: err %d\n", 157 - pci_name(dev), pdev->xdev->otherend_id, 158 - status); 161 + dev_warn_ratelimited(&dev->dev, "error enabling MSI for guest %u: err %d\n", 162 + pdev->xdev->otherend_id, status); 159 163 op->value = 0; 160 164 return XEN_PCI_ERR_op_failed; 161 165 } ··· 163 169 * the local domain's IRQ number. */ 164 170 165 171 op->value = dev->irq ? xen_pirq_from_irq(dev->irq) : 0; 166 - if (unlikely(verbose_request)) 167 - printk(KERN_DEBUG DRV_NAME ": %s: MSI: %d\n", pci_name(dev), 168 - op->value); 172 + 173 + dev_dbg(&dev->dev, "MSI: %d\n", op->value); 169 174 170 175 dev_data = pci_get_drvdata(dev); 171 176 if (dev_data) ··· 177 184 int xen_pcibk_disable_msi(struct xen_pcibk_device *pdev, 178 185 struct pci_dev *dev, struct xen_pci_op *op) 179 186 { 180 - if (unlikely(verbose_request)) 181 - printk(KERN_DEBUG DRV_NAME ": %s: disable MSI\n", 182 - pci_name(dev)); 183 - 184 187 if (dev->msi_enabled) { 185 188 struct xen_pcibk_dev_data *dev_data; 186 189 ··· 187 198 dev_data->ack_intr = 1; 188 199 } 189 200 op->value = dev->irq ? xen_pirq_from_irq(dev->irq) : 0; 190 - if (unlikely(verbose_request)) 191 - printk(KERN_DEBUG DRV_NAME ": %s: MSI: %d\n", pci_name(dev), 192 - op->value); 201 + 202 + dev_dbg(&dev->dev, "MSI: %d\n", op->value); 203 + 193 204 return 0; 194 205 } 195 206 ··· 202 213 struct msix_entry *entries; 203 214 u16 cmd; 204 215 205 - if (unlikely(verbose_request)) 206 - printk(KERN_DEBUG DRV_NAME ": %s: enable MSI-X\n", 207 - pci_name(dev)); 216 + dev_dbg(&dev->dev, "enable MSI-X\n"); 208 217 209 218 if (op->value > SH_INFO_MAX_VEC) 210 219 return -EINVAL; ··· 235 248 if (entries[i].vector) { 236 249 op->msix_entries[i].vector = 237 250 xen_pirq_from_irq(entries[i].vector); 238 - if (unlikely(verbose_request)) 239 - printk(KERN_DEBUG DRV_NAME ": %s: " \ 240 - "MSI-X[%d]: %d\n", 241 - pci_name(dev), i, 242 - op->msix_entries[i].vector); 251 + dev_dbg(&dev->dev, "MSI-X[%d]: %d\n", i, 252 + op->msix_entries[i].vector); 243 253 } 244 254 } 245 255 } else 246 - pr_warn_ratelimited("%s: error enabling MSI-X for guest %u: err %d!\n", 247 - pci_name(dev), pdev->xdev->otherend_id, 248 - result); 256 + dev_warn_ratelimited(&dev->dev, "error enabling MSI-X for guest %u: err %d!\n", 257 + pdev->xdev->otherend_id, result); 249 258 kfree(entries); 250 259 251 260 op->value = result; ··· 256 273 int xen_pcibk_disable_msix(struct xen_pcibk_device *pdev, 257 274 struct pci_dev *dev, struct xen_pci_op *op) 258 275 { 259 - if (unlikely(verbose_request)) 260 - printk(KERN_DEBUG DRV_NAME ": %s: disable MSI-X\n", 261 - pci_name(dev)); 262 - 263 276 if (dev->msix_enabled) { 264 277 struct xen_pcibk_dev_data *dev_data; 265 278 ··· 270 291 * an undefined IRQ value of zero. 271 292 */ 272 293 op->value = dev->irq ? xen_pirq_from_irq(dev->irq) : 0; 273 - if (unlikely(verbose_request)) 274 - printk(KERN_DEBUG DRV_NAME ": %s: MSI-X: %d\n", 275 - pci_name(dev), op->value); 294 + 295 + dev_dbg(&dev->dev, "MSI-X: %d\n", op->value); 296 + 276 297 return 0; 277 298 } 278 299 #endif ··· 403 424 dev_data->handled++; 404 425 if ((dev_data->handled % 1000) == 0) { 405 426 if (xen_test_irq_shared(irq)) { 406 - pr_info("%s IRQ line is not shared " 427 + dev_info(&dev->dev, "%s IRQ line is not shared " 407 428 "with other domains. Turning ISR off\n", 408 429 dev_data->irq_name); 409 430 dev_data->ack_intr = 0;
+5 -5
drivers/xen/xen-pciback/vpci.c
··· 7 7 */ 8 8 9 9 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 10 + #define dev_fmt pr_fmt 10 11 11 12 #include <linux/list.h> 12 13 #include <linux/slab.h> ··· 106 105 struct pci_dev_entry, list); 107 106 108 107 if (match_slot(dev, t->dev)) { 109 - pr_info("vpci: %s: assign to virtual slot %d func %d\n", 110 - pci_name(dev), slot, 111 - PCI_FUNC(dev->devfn)); 108 + dev_info(&dev->dev, "vpci: assign to virtual slot %d func %d\n", 109 + slot, PCI_FUNC(dev->devfn)); 112 110 list_add_tail(&dev_entry->list, 113 111 &vpci_dev->dev_list[slot]); 114 112 func = PCI_FUNC(dev->devfn); ··· 119 119 /* Assign to a new slot on the virtual PCI bus */ 120 120 for (slot = 0; slot < PCI_SLOT_MAX; slot++) { 121 121 if (list_empty(&vpci_dev->dev_list[slot])) { 122 - pr_info("vpci: %s: assign to virtual slot %d\n", 123 - pci_name(dev), slot); 122 + dev_info(&dev->dev, "vpci: assign to virtual slot %d\n", 123 + slot); 124 124 list_add_tail(&dev_entry->list, 125 125 &vpci_dev->dev_list[slot]); 126 126 func = dev->is_virtfn ? 0 : PCI_FUNC(dev->devfn);
+5 -6
drivers/xen/xenbus/xenbus_probe.c
··· 31 31 */ 32 32 33 33 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 34 + #define dev_fmt pr_fmt 34 35 35 36 #define DPRINTK(fmt, args...) \ 36 37 pr_debug("xenbus_probe (%s:%d) " fmt ".\n", \ ··· 608 607 if (drv->suspend) 609 608 err = drv->suspend(xdev); 610 609 if (err) 611 - pr_warn("suspend %s failed: %i\n", dev_name(dev), err); 610 + dev_warn(dev, "suspend failed: %i\n", err); 612 611 return 0; 613 612 } 614 613 EXPORT_SYMBOL_GPL(xenbus_dev_suspend); ··· 627 626 drv = to_xenbus_driver(dev->driver); 628 627 err = talk_to_otherend(xdev); 629 628 if (err) { 630 - pr_warn("resume (talk_to_otherend) %s failed: %i\n", 631 - dev_name(dev), err); 629 + dev_warn(dev, "resume (talk_to_otherend) failed: %i\n", err); 632 630 return err; 633 631 } 634 632 ··· 636 636 if (drv->resume) { 637 637 err = drv->resume(xdev); 638 638 if (err) { 639 - pr_warn("resume %s failed: %i\n", dev_name(dev), err); 639 + dev_warn(dev, "resume failed: %i\n", err); 640 640 return err; 641 641 } 642 642 } 643 643 644 644 err = watch_otherend(xdev); 645 645 if (err) { 646 - pr_warn("resume (watch_otherend) %s failed: %d.\n", 647 - dev_name(dev), err); 646 + dev_warn(dev, "resume (watch_otherend) failed: %d\n", err); 648 647 return err; 649 648 } 650 649