diff options
author | James Hogan <jhogan@kernel.org> | 2017-10-24 13:07:54 +0100 |
---|---|---|
committer | James Hogan <jhogan@kernel.org> | 2018-02-22 11:07:21 +0000 |
commit | bb6fb6dfcc17cddac11ac295861f7608194447a7 (patch) | |
tree | 47ee071a415546dd01adbf628f61acb80473d476 /arch/metag/oprofile/backtrace.c | |
parent | 91ab883eb21325ad80f3473633f794c78ac87f51 (diff) | |
download | op-kernel-dev-bb6fb6dfcc17cddac11ac295861f7608194447a7.zip op-kernel-dev-bb6fb6dfcc17cddac11ac295861f7608194447a7.tar.gz |
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/oprofile/backtrace.c')
-rw-r--r-- | arch/metag/oprofile/backtrace.c | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/arch/metag/oprofile/backtrace.c b/arch/metag/oprofile/backtrace.c deleted file mode 100644 index 7cc3f37..0000000 --- a/arch/metag/oprofile/backtrace.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2010-2013 Imagination Technologies Ltd. - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - */ - -#include <linux/oprofile.h> -#include <linux/uaccess.h> -#include <asm/processor.h> -#include <asm/stacktrace.h> - -#include "backtrace.h" - -static void user_backtrace_fp(unsigned long __user *fp, unsigned int depth) -{ - while (depth-- && access_ok(VERIFY_READ, fp, 8)) { - unsigned long addr; - unsigned long __user *fpnew; - if (__copy_from_user_inatomic(&addr, fp + 1, sizeof(addr))) - break; - addr -= 4; - - oprofile_add_trace(addr); - - /* stack grows up, so frame pointers must decrease */ - if (__copy_from_user_inatomic(&fpnew, fp + 0, sizeof(fpnew))) - break; - if (fpnew >= fp) - break; - fp = fpnew; - } -} - -static int kernel_backtrace_frame(struct stackframe *frame, void *data) -{ - unsigned int *depth = data; - - oprofile_add_trace(frame->pc); - - /* decrement depth and stop if we reach 0 */ - if ((*depth)-- == 0) - return 1; - - /* otherwise onto the next frame */ - return 0; -} - -void metag_backtrace(struct pt_regs * const regs, unsigned int depth) -{ - if (user_mode(regs)) { - unsigned long *fp = (unsigned long *)regs->ctx.AX[1].U0; - user_backtrace_fp((unsigned long __user __force *)fp, depth); - } else { - struct stackframe frame; - frame.fp = regs->ctx.AX[1].U0; /* A0FrP */ - frame.sp = user_stack_pointer(regs); /* A0StP */ - frame.lr = 0; /* from stack */ - frame.pc = regs->ctx.CurrPC; /* PC */ - walk_stackframe(&frame, &kernel_backtrace_frame, &depth); - } -} |