diff options
author | James Hogan <jhogan@kernel.org> | 2017-10-24 15:07:54 +0300 |
---|---|---|
committer | James Hogan <jhogan@kernel.org> | 2018-02-22 14:07:21 +0300 |
commit | bb6fb6dfcc17cddac11ac295861f7608194447a7 (patch) | |
tree | 47ee071a415546dd01adbf628f61acb80473d476 /arch/metag/mm/ioremap.c | |
parent | 91ab883eb21325ad80f3473633f794c78ac87f51 (diff) | |
download | linux-bb6fb6dfcc17cddac11ac295861f7608194447a7.tar.xz |
metag: Remove arch/metag/
The earliest Meta architecture port of Linux I have a record of was an
import of a Meta port of Linux v2.4.1 in February 2004, which was worked
on significantly over the next few years by Graham Whaley, Will Newton,
Matt Fleming, myself and others.
Eventually the port was merged into mainline in v3.9 in March 2013, not
long after Imagination Technologies bought MIPS Technologies and shifted
its CPU focus over to the MIPS architecture.
As a result, though the port was maintained for a while, kept on life
support for a while longer, and useful for testing a few specific
drivers for which I don't have ready access to the equivalent MIPS
hardware, it is now essentially dead with no users.
It is also stuck using an out-of-tree toolchain based on GCC 4.2.4 which
is no longer maintained, now struggles to build modern kernels due to
toolchain bugs, and doesn't itself build with a modern GCC. The latest
buildroot port is still using an old uClibc snapshot which is no longer
served, and the latest uClibc doesn't build with GCC 4.2.4.
So lets call it a day and drop the Meta architecture port from the
kernel. RIP Meta.
Signed-off-by: James Hogan <jhogan@kernel.org>
Link: https://lkml.kernel.org/r/95906b76-6ce1-3f84-eaba-c29b4ae952eb@roeck-us.net
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Graham Whaley <graham.whaley@gmail.com>
Cc: linux-metag@vger.kernel.org
Diffstat (limited to 'arch/metag/mm/ioremap.c')
-rw-r--r-- | arch/metag/mm/ioremap.c | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/arch/metag/mm/ioremap.c b/arch/metag/mm/ioremap.c deleted file mode 100644 index df2b59cb02eb..000000000000 --- a/arch/metag/mm/ioremap.c +++ /dev/null @@ -1,90 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * Re-map IO memory to kernel address space so that we can access it. - * Needed for memory-mapped I/O devices mapped outside our normal DRAM - * window (that is, all memory-mapped I/O devices). - * - * Copyright (C) 1995,1996 Linus Torvalds - * - * Meta port based on CRIS-port by Axis Communications AB - */ - -#include <linux/vmalloc.h> -#include <linux/io.h> -#include <linux/export.h> -#include <linux/slab.h> -#include <linux/mm.h> - -#include <asm/pgtable.h> - -/* - * Remap an arbitrary physical address space into the kernel virtual - * address space. Needed when the kernel wants to access high addresses - * directly. - * - * NOTE! We need to allow non-page-aligned mappings too: we will obviously - * have to convert them into an offset in a page-aligned mapping, but the - * caller shouldn't need to know that small detail. - */ -void __iomem *__ioremap(unsigned long phys_addr, size_t size, - unsigned long flags) -{ - unsigned long addr; - struct vm_struct *area; - unsigned long offset, last_addr; - pgprot_t prot; - - /* Don't allow wraparound or zero size */ - last_addr = phys_addr + size - 1; - if (!size || last_addr < phys_addr) - return NULL; - - /* Custom region addresses are accessible and uncached by default. */ - if (phys_addr >= LINSYSCUSTOM_BASE && - phys_addr < (LINSYSCUSTOM_BASE + LINSYSCUSTOM_LIMIT)) - return (__force void __iomem *) phys_addr; - - /* - * Mappings have to be page-aligned - */ - offset = phys_addr & ~PAGE_MASK; - phys_addr &= PAGE_MASK; - size = PAGE_ALIGN(last_addr+1) - phys_addr; - prot = __pgprot(_PAGE_PRESENT | _PAGE_WRITE | _PAGE_DIRTY | - _PAGE_ACCESSED | _PAGE_KERNEL | _PAGE_CACHE_WIN0 | - flags); - - /* - * Ok, go for it.. - */ - area = get_vm_area(size, VM_IOREMAP); - if (!area) - return NULL; - area->phys_addr = phys_addr; - addr = (unsigned long) area->addr; - if (ioremap_page_range(addr, addr + size, phys_addr, prot)) { - vunmap((void *) addr); - return NULL; - } - return (__force void __iomem *) (offset + (char *)addr); -} -EXPORT_SYMBOL(__ioremap); - -void __iounmap(void __iomem *addr) -{ - struct vm_struct *p; - - if ((__force unsigned long)addr >= LINSYSCUSTOM_BASE && - (__force unsigned long)addr < (LINSYSCUSTOM_BASE + - LINSYSCUSTOM_LIMIT)) - return; - - p = remove_vm_area((void *)(PAGE_MASK & (unsigned long __force)addr)); - if (unlikely(!p)) { - pr_err("iounmap: bad address %p\n", addr); - return; - } - - kfree(p); -} -EXPORT_SYMBOL(__iounmap); |