Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Livius90/526508dbbb167dca5ffc90b021b98543 to your computer and use it in GitHub Desktop.
Save Livius90/526508dbbb167dca5ffc90b021b98543 to your computer and use it in GitHub Desktop.
diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h
index 877495a..0b0b12a 100644
--- a/arch/arm64/include/asm/io.h
+++ b/arch/arm64/include/asm/io.h
@@ -142,8 +142,6 @@ extern void __memset_io(volatile void __iomem *, int, size_t);
bool ioremap_allowed(phys_addr_t phys_addr, size_t size, unsigned long prot);
#define ioremap_allowed ioremap_allowed
-#define _PAGE_IOREMAP PROT_DEVICE_nGnRE
-
#define ioremap_wc(addr, size) \
ioremap_prot((addr), (size), PROT_NORMAL_NC)
#define ioremap_np(addr, size) \
diff --git a/arch/arm64/include/asm/pgtable-prot.h b/arch/arm64/include/asm/pgtable-prot.h
index 9b16511..d298c04 100644
--- a/arch/arm64/include/asm/pgtable-prot.h
+++ b/arch/arm64/include/asm/pgtable-prot.h
@@ -64,6 +64,7 @@ extern bool arm64_use_ng_mappings;
#define PROT_SECT_NORMAL_EXEC (PROT_SECT_DEFAULT | PMD_SECT_UXN | PMD_ATTRINDX(MT_NORMAL))
#define _PAGE_DEFAULT (_PROT_DEFAULT | PTE_ATTRINDX(MT_NORMAL))
+#define _PAGE_IOREMAP PROT_DEVICE_nGnRE
#define PAGE_KERNEL __pgprot(PROT_NORMAL)
#define PAGE_KERNEL_RO __pgprot((PROT_NORMAL & ~PTE_WRITE) | PTE_RDONLY)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment