Revert "ANDROID: mm/vmalloc: Add arch-specific callbacks to track io{remap,unmap} physical pages"

This reverts commit acd8b4b1f1.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Ie56327837f823b424f3438d5b974c8086f8ba1e9
This commit is contained in:
Will Deacon
2022-07-07 15:51:02 +01:00
parent 3f0f2c7b38
commit 432cf24bb2
3 changed files with 1 additions and 18 deletions

View File

@@ -21,8 +21,6 @@ void __ioread32_copy(void *to, const void __iomem *from, size_t count);
void __iowrite64_copy(void __iomem *to, const void *from, size_t count);
#ifdef CONFIG_MMU
void ioremap_phys_range_hook(phys_addr_t phys_addr, size_t size, pgprot_t prot);
void iounmap_phys_range_hook(phys_addr_t phys_addr, size_t size);
int ioremap_page_range(unsigned long addr, unsigned long end,
phys_addr_t phys_addr, pgprot_t prot);
#else

View File

@@ -897,11 +897,6 @@ config IO_MAPPING
config SECRETMEM
def_bool ARCH_HAS_SET_DIRECT_MAP && !EMBEDDED
# Some architectures want callbacks for all IO mappings in order to
# track the physical addresses that get used as devices.
config ARCH_HAS_IOREMAP_PHYS_HOOKS
bool
config ANON_VMA_NAME
bool "Anonymous VMA name support"
depends on PROC_FS && ADVISE_SYSCALLS && MMU

View File

@@ -38,7 +38,6 @@
#include <linux/pgtable.h>
#include <linux/uaccess.h>
#include <linux/hugetlb.h>
#include <linux/io.h>
#include <asm/tlbflush.h>
#include <asm/shmparam.h>
@@ -317,14 +316,9 @@ int ioremap_page_range(unsigned long addr, unsigned long end,
{
int err;
prot = pgprot_nx(prot);
err = vmap_range_noflush(addr, end, phys_addr, prot,
err = vmap_range_noflush(addr, end, phys_addr, pgprot_nx(prot),
ioremap_max_page_shift);
flush_cache_vmap(addr, end);
if (IS_ENABLED(CONFIG_ARCH_HAS_IOREMAP_PHYS_HOOKS) && !err)
ioremap_phys_range_hook(phys_addr, end - addr, prot);
return err;
}
@@ -2634,10 +2628,6 @@ static void __vunmap(const void *addr, int deallocate_pages)
kasan_poison_vmalloc(area->addr, get_vm_area_size(area));
if (IS_ENABLED(CONFIG_ARCH_HAS_IOREMAP_PHYS_HOOKS) &&
area->flags & VM_IOREMAP)
iounmap_phys_range_hook(area->phys_addr, get_vm_area_size(area));
vm_remove_mappings(area, deallocate_pages);
if (deallocate_pages) {