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
This commit is contained in:
Stefan Kalkowski 2022-03-01 17:53:31 +01:00 committed by Christian Helmuth
parent 2760b67902
commit 2a35c8f9e7
2 changed files with 8 additions and 0 deletions

View File

@ -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

View File

@ -14,6 +14,10 @@
#include <lx_emul/io_port.h>
#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);