Skip to content

Commit b4d8ae0

Browse files
niklas88joergroedel
authored andcommitted
iommu/s390: Fix incorrect pgsize_bitmap
The .pgsize_bitmap property of struct iommu_ops is not a page mask but rather has a bit set for each size of pages the IOMMU supports. As the comment correctly pointed out at this moment the code only support 4K pages so simply use SZ_4K here. Reviewed-by: Matthew Rosato <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Signed-off-by: Niklas Schnelle <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent a4d996c commit b4d8ae0

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

drivers/iommu/s390-iommu.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@
1212
#include <linux/sizes.h>
1313
#include <asm/pci_dma.h>
1414

15-
/*
16-
* Physically contiguous memory regions can be mapped with 4 KiB alignment,
17-
* we allow all page sizes that are an order of 4KiB (no special large page
18-
* support so far).
19-
*/
20-
#define S390_IOMMU_PGSIZES (~0xFFFUL)
21-
2215
static const struct iommu_ops s390_iommu_ops;
2316

2417
struct s390_domain {
@@ -363,7 +356,7 @@ static const struct iommu_ops s390_iommu_ops = {
363356
.probe_device = s390_iommu_probe_device,
364357
.release_device = s390_iommu_release_device,
365358
.device_group = generic_device_group,
366-
.pgsize_bitmap = S390_IOMMU_PGSIZES,
359+
.pgsize_bitmap = SZ_4K,
367360
.get_resv_regions = s390_iommu_get_resv_regions,
368361
.default_domain_ops = &(const struct iommu_domain_ops) {
369362
.attach_dev = s390_iommu_attach_device,

0 commit comments

Comments
 (0)