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

Revert "iommu/io-pgtable-arm: Check for v7s-incapable systems"

This reverts commit 82db33dc5e49fb625262d81125625d07a0d6184e.

After the commit 29859aeb8a6e ("iommu/io-pgtable-arm-v7s: Abort
allocation when table address overflows the PTE"), v7s will return fail
if the page table allocation isn't expected. this PHYS_OFFSET check
is unnecessary now.

And this check may lead to fail. For example, If CONFIG_RANDOMIZE_BASE
is enabled, the "memstart_addr" will be updated randomly, then the
PHYS_OFFSET may be random.

Reported-by: CK Hu <ck.hu@mediatek.com>
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>

authored by

Yong Wu and committed by
Joerg Roedel
2713fe37 7566ec39

-4
-4
drivers/iommu/io-pgtable-arm-v7s.c
··· 709 709 { 710 710 struct arm_v7s_io_pgtable *data; 711 711 712 - #ifdef PHYS_OFFSET 713 - if (upper_32_bits(PHYS_OFFSET)) 714 - return NULL; 715 - #endif 716 712 if (cfg->ias > ARM_V7S_ADDR_BITS || cfg->oas > ARM_V7S_ADDR_BITS) 717 713 return NULL; 718 714