From 2a35c8f9e7bef69b6bc6ad644957f5b765667d0d Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Tue, 1 Mar 2022 17:53:31 +0100 Subject: [PATCH] lx_emul: add page macros to x86 shadow headers * Add page_to_phys and dummy macro for pgprot_device Original commit provided by Josef Soentgen Ref genodelabs/genode#4438 --- repos/dde_linux/src/include/lx_emul/shadow/linux/pgtable.h | 4 ++++ repos/dde_linux/src/include/spec/x86/lx_emul/shadow/asm/io.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/repos/dde_linux/src/include/lx_emul/shadow/linux/pgtable.h b/repos/dde_linux/src/include/lx_emul/shadow/linux/pgtable.h index 0b097da5c7..b24b831f68 100644 --- a/repos/dde_linux/src/include/lx_emul/shadow/linux/pgtable.h +++ b/repos/dde_linux/src/include/lx_emul/shadow/linux/pgtable.h @@ -23,6 +23,10 @@ int pmd_swp_soft_dirty(pmd_t pmd); void __init pgtable_cache_init(void); +#ifndef pgprot_device +#define pgprot_device(prot) (prot) +#endif + #ifndef pgprot_decrypted #define pgprot_decrypted(prot) (prot) #endif diff --git a/repos/dde_linux/src/include/spec/x86/lx_emul/shadow/asm/io.h b/repos/dde_linux/src/include/spec/x86/lx_emul/shadow/asm/io.h index 3a7750d14e..67eda8eb04 100644 --- a/repos/dde_linux/src/include/spec/x86/lx_emul/shadow/asm/io.h +++ b/repos/dde_linux/src/include/spec/x86/lx_emul/shadow/asm/io.h @@ -14,6 +14,10 @@ #include +#ifndef page_to_phys +#define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT) +#endif + void __iomem *ioremap(resource_size_t offset, unsigned long size); void iounmap(volatile void __iomem *addr);