scan.c (5c89c2c7fbfa9124dd521c375b9c82b9ed75bc28) scan.c (db59e1b6e49201beacdbd0622aa3594f2de4f727)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * scan.c - support for transforming the ACPI namespace into individual objects
4 */
5
6#include <linux/module.h>
7#include <linux/init.h>
8#include <linux/slab.h>

--- 1523 unchanged lines hidden (view full) ---

1532 const struct iommu_ops *iommu;
1533 u64 dma_addr = 0, size = 0;
1534
1535 if (attr == DEV_DMA_NOT_SUPPORTED) {
1536 set_dma_ops(dev, &dma_dummy_ops);
1537 return 0;
1538 }
1539
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * scan.c - support for transforming the ACPI namespace into individual objects
4 */
5
6#include <linux/module.h>
7#include <linux/init.h>
8#include <linux/slab.h>

--- 1523 unchanged lines hidden (view full) ---

1532 const struct iommu_ops *iommu;
1533 u64 dma_addr = 0, size = 0;
1534
1535 if (attr == DEV_DMA_NOT_SUPPORTED) {
1536 set_dma_ops(dev, &dma_dummy_ops);
1537 return 0;
1538 }
1539
1540 iort_dma_setup(dev, &dma_addr, &size);
1540 acpi_arch_dma_setup(dev, &dma_addr, &size);
1541
1542 iommu = iort_iommu_configure_id(dev, input_id);
1543 if (PTR_ERR(iommu) == -EPROBE_DEFER)
1544 return -EPROBE_DEFER;
1545
1546 arch_setup_dma_ops(dev, dma_addr, size,
1547 iommu, attr == DEV_DMA_COHERENT);
1548

--- 806 unchanged lines hidden (view full) ---

2355 acpi_detach_data(acpi_root->handle,
2356 acpi_scan_drop_device);
2357 acpi_device_del(acpi_root);
2358 acpi_bus_put_acpi_device(acpi_root);
2359 goto out;
2360 }
2361 }
2362
1541
1542 iommu = iort_iommu_configure_id(dev, input_id);
1543 if (PTR_ERR(iommu) == -EPROBE_DEFER)
1544 return -EPROBE_DEFER;
1545
1546 arch_setup_dma_ops(dev, dma_addr, size,
1547 iommu, attr == DEV_DMA_COHERENT);
1548

--- 806 unchanged lines hidden (view full) ---

2355 acpi_detach_data(acpi_root->handle,
2356 acpi_scan_drop_device);
2357 acpi_device_del(acpi_root);
2358 acpi_bus_put_acpi_device(acpi_root);
2359 goto out;
2360 }
2361 }
2362
2363 acpi_turn_off_unused_power_resources();
2363 acpi_turn_off_unused_power_resources(true);
2364
2365 acpi_scan_initialized = true;
2366
2367 out:
2368 mutex_unlock(&acpi_scan_lock);
2369 return result;
2370}
2371

--- 92 unchanged lines hidden ---
2364
2365 acpi_scan_initialized = true;
2366
2367 out:
2368 mutex_unlock(&acpi_scan_lock);
2369 return result;
2370}
2371

--- 92 unchanged lines hidden ---