diff options
author | Laurent Vivier <laurent@vivier.eu> | 2022-04-06 22:15:23 +0200 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2022-04-11 11:48:01 +0200 |
commit | 05d51e42df06f0211c7029ab9aa46c492ee85043 (patch) | |
tree | 0eaaad4386f25f382cdcf62e17090707d0e3f304 /arch/m68k/mm | |
parent | clocksource/drivers: Add a goldfish-timer clocksource (diff) | |
download | linux-05d51e42df06f0211c7029ab9aa46c492ee85043.tar.xz linux-05d51e42df06f0211c7029ab9aa46c492ee85043.zip |
m68k: Introduce a virtual m68k machine
This machine allows to have up to 3.2 GiB and 128 Virtio devices.
It is based on android goldfish devices.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Link: https://lore.kernel.org/r/20220406201523.243733-5-laurent@vivier.eu
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/mm')
-rw-r--r-- | arch/m68k/mm/kmap.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/arch/m68k/mm/kmap.c b/arch/m68k/mm/kmap.c index 20ddf71b43d0..7594a945732b 100644 --- a/arch/m68k/mm/kmap.c +++ b/arch/m68k/mm/kmap.c @@ -179,6 +179,12 @@ void __iomem *__ioremap(unsigned long physaddr, unsigned long size, int cachefla return (void __iomem *)physaddr; } #endif +#ifdef CONFIG_VIRT + if (MACH_IS_VIRT) { + if (physaddr >= 0xff000000 && cacheflag == IOMAP_NOCACHE_SER) + return (void __iomem *)physaddr; + } +#endif #ifdef CONFIG_COLDFIRE if (__cf_internalio(physaddr)) return (void __iomem *) physaddr; @@ -293,17 +299,20 @@ EXPORT_SYMBOL(__ioremap); void iounmap(void __iomem *addr) { #ifdef CONFIG_AMIGA - if ((!MACH_IS_AMIGA) || - (((unsigned long)addr < 0x40000000) || - ((unsigned long)addr > 0x60000000))) - free_io_area((__force void *)addr); -#else + if (MACH_IS_AMIGA && + ((unsigned long)addr >= 0x40000000) && + ((unsigned long)addr < 0x60000000)) + return; +#endif +#ifdef CONFIG_VIRT + if (MACH_IS_VIRT && (unsigned long)addr >= 0xff000000) + return; +#endif #ifdef CONFIG_COLDFIRE if (cf_internalio(addr)) return; #endif free_io_area((__force void *)addr); -#endif } EXPORT_SYMBOL(iounmap); |