iommu.c (c208916fe6c7b84e3ec95cd91853039596eeb2cf) iommu.c (26225bea1d84b090b378838a1797daec62d4ad0e)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (C) 2007-2008 Advanced Micro Devices, Inc.
4 * Author: Joerg Roedel <jroedel@suse.de>
5 */
6
7#define pr_fmt(fmt) "iommu: " fmt
8

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

3263
3264 if (WARN_ON(!group))
3265 return -EINVAL;
3266
3267 if (sysfs_streq(buf, "identity"))
3268 req_type = IOMMU_DOMAIN_IDENTITY;
3269 else if (sysfs_streq(buf, "DMA"))
3270 req_type = IOMMU_DOMAIN_DMA;
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (C) 2007-2008 Advanced Micro Devices, Inc.
4 * Author: Joerg Roedel <jroedel@suse.de>
5 */
6
7#define pr_fmt(fmt) "iommu: " fmt
8

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

3263
3264 if (WARN_ON(!group))
3265 return -EINVAL;
3266
3267 if (sysfs_streq(buf, "identity"))
3268 req_type = IOMMU_DOMAIN_IDENTITY;
3269 else if (sysfs_streq(buf, "DMA"))
3270 req_type = IOMMU_DOMAIN_DMA;
3271 else if (sysfs_streq(buf, "DMA-FQ"))
3272 req_type = IOMMU_DOMAIN_DMA_FQ;
3271 else if (sysfs_streq(buf, "auto"))
3272 req_type = 0;
3273 else
3274 return -EINVAL;
3275
3276 /*
3277 * Lock/Unlock the group mutex here before device lock to
3278 * 1. Make sure that the iommu group has only one device (this is a

--- 58 unchanged lines hidden ---
3273 else if (sysfs_streq(buf, "auto"))
3274 req_type = 0;
3275 else
3276 return -EINVAL;
3277
3278 /*
3279 * Lock/Unlock the group mutex here before device lock to
3280 * 1. Make sure that the iommu group has only one device (this is a

--- 58 unchanged lines hidden ---