| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2013 - Virtual Open Systems |
|---|
| 3 | 4 | * Author: Antonios Motakis <a.motakis@virtualopensystems.com> |
|---|
| 4 | | - * |
|---|
| 5 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 6 | | - * it under the terms of the GNU General Public License, version 2, as |
|---|
| 7 | | - * published by the Free Software Foundation. |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 10 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 11 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 12 | | - * GNU General Public License for more details. |
|---|
| 13 | 5 | */ |
|---|
| 6 | + |
|---|
| 7 | +#define dev_fmt(fmt) "VFIO: " fmt |
|---|
| 14 | 8 | |
|---|
| 15 | 9 | #include <linux/device.h> |
|---|
| 16 | 10 | #include <linux/acpi.h> |
|---|
| .. | .. |
|---|
| 63 | 57 | |
|---|
| 64 | 58 | adev = ACPI_COMPANION(dev); |
|---|
| 65 | 59 | if (!adev) { |
|---|
| 66 | | - pr_err("VFIO: ACPI companion device not found for %s\n", |
|---|
| 60 | + dev_err(dev, "ACPI companion device not found for %s\n", |
|---|
| 67 | 61 | vdev->name); |
|---|
| 68 | 62 | return -ENODEV; |
|---|
| 69 | 63 | } |
|---|
| .. | .. |
|---|
| 78 | 72 | const char **extra_dbg) |
|---|
| 79 | 73 | { |
|---|
| 80 | 74 | #ifdef CONFIG_ACPI |
|---|
| 81 | | - struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; |
|---|
| 82 | 75 | struct device *dev = vdev->device; |
|---|
| 83 | 76 | acpi_handle handle = ACPI_HANDLE(dev); |
|---|
| 84 | 77 | acpi_status acpi_ret; |
|---|
| 85 | 78 | |
|---|
| 86 | | - acpi_ret = acpi_evaluate_object(handle, "_RST", NULL, &buffer); |
|---|
| 79 | + acpi_ret = acpi_evaluate_object(handle, "_RST", NULL, NULL); |
|---|
| 87 | 80 | if (ACPI_FAILURE(acpi_ret)) { |
|---|
| 88 | 81 | if (extra_dbg) |
|---|
| 89 | 82 | *extra_dbg = acpi_format_exception(acpi_ret); |
|---|
| .. | .. |
|---|
| 414 | 407 | |
|---|
| 415 | 408 | if (!reg->ioaddr) { |
|---|
| 416 | 409 | reg->ioaddr = |
|---|
| 417 | | - ioremap_nocache(reg->addr, reg->size); |
|---|
| 410 | + ioremap(reg->addr, reg->size); |
|---|
| 418 | 411 | |
|---|
| 419 | 412 | if (!reg->ioaddr) |
|---|
| 420 | 413 | return -ENOMEM; |
|---|
| .. | .. |
|---|
| 491 | 484 | |
|---|
| 492 | 485 | if (!reg->ioaddr) { |
|---|
| 493 | 486 | reg->ioaddr = |
|---|
| 494 | | - ioremap_nocache(reg->addr, reg->size); |
|---|
| 487 | + ioremap(reg->addr, reg->size); |
|---|
| 495 | 488 | |
|---|
| 496 | 489 | if (!reg->ioaddr) |
|---|
| 497 | 490 | return -ENOMEM; |
|---|
| .. | .. |
|---|
| 637 | 630 | ret = device_property_read_string(dev, "compatible", |
|---|
| 638 | 631 | &vdev->compat); |
|---|
| 639 | 632 | if (ret) |
|---|
| 640 | | - pr_err("VFIO: Cannot retrieve compat for %s\n", vdev->name); |
|---|
| 633 | + dev_err(dev, "Cannot retrieve compat for %s\n", vdev->name); |
|---|
| 641 | 634 | |
|---|
| 642 | 635 | return ret; |
|---|
| 643 | 636 | } |
|---|
| .. | .. |
|---|
| 679 | 672 | |
|---|
| 680 | 673 | ret = vfio_platform_get_reset(vdev); |
|---|
| 681 | 674 | if (ret && vdev->reset_required) { |
|---|
| 682 | | - pr_err("VFIO: No reset function found for device %s\n", |
|---|
| 683 | | - vdev->name); |
|---|
| 675 | + dev_err(dev, "No reset function found for device %s\n", |
|---|
| 676 | + vdev->name); |
|---|
| 684 | 677 | return ret; |
|---|
| 685 | 678 | } |
|---|
| 686 | 679 | |
|---|
| 687 | 680 | group = vfio_iommu_group_get(dev); |
|---|
| 688 | 681 | if (!group) { |
|---|
| 689 | | - pr_err("VFIO: No IOMMU group for device %s\n", vdev->name); |
|---|
| 682 | + dev_err(dev, "No IOMMU group for device %s\n", vdev->name); |
|---|
| 690 | 683 | ret = -EINVAL; |
|---|
| 691 | 684 | goto put_reset; |
|---|
| 692 | 685 | } |
|---|