From 879d08ec30586ade3e785fe993ba50b8c89d05ef Mon Sep 17 00:00:00 2001 From: Li Bin Date: Mon, 28 Dec 2015 16:34:07 +0800 Subject: metag: ftrace: remove the misleading comment for ftrace_dyn_arch_init ftrace_dyn_arch_init no longer in kstop_machine, so remove the corresponding comment. Signed-off-by: Li Bin Signed-off-by: James Hogan diff --git a/arch/metag/kernel/ftrace.c b/arch/metag/kernel/ftrace.c index ac8c039..f7b23d3 100644 --- a/arch/metag/kernel/ftrace.c +++ b/arch/metag/kernel/ftrace.c @@ -115,7 +115,6 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) return ftrace_modify_code(ip, old, new); } -/* run from kstop_machine */ int __init ftrace_dyn_arch_init(void) { return 0; -- cgit v0.10.2 From f5d163aad31e4ec30f7258e655503824a2b03d45 Mon Sep 17 00:00:00 2001 From: James Hogan Date: Mon, 22 Jul 2013 15:18:34 +0100 Subject: metag: perf: fix build on Meta1 Meta1 doesn't support PERF_ICORE or PERF_CHAN registers resulting in build errors due to missing definitions. Fix this with an ifdef matching the one in asm/metag_mem.h. The build errors (found by a randconfig): arch/metag/kernel/perf/perf_event.c: In function 'metag_pmu_enable_counter': arch/metag/kernel/perf/perf_event.c:639: error: 'PERF_ICORE0' undeclared (first use in this function) arch/metag/kernel/perf/perf_event.c:639: error: (Each undeclared identifier is reported only once arch/metag/kernel/perf/perf_event.c:639: error: for each function it appears in.) arch/metag/kernel/perf/perf_event.c:643: error: 'PERF_CHAN0' undeclared (first use in this function) Signed-off-by: James Hogan Cc: linux-metag@vger.kernel.org diff --git a/arch/metag/kernel/perf/perf_event.c b/arch/metag/kernel/perf/perf_event.c index 2478ec6..33a365f 100644 --- a/arch/metag/kernel/perf/perf_event.c +++ b/arch/metag/kernel/perf/perf_event.c @@ -618,6 +618,8 @@ static void metag_pmu_enable_counter(struct hw_perf_event *event, int idx) /* Check for a core internal or performance channel event. */ if (tmp) { + /* PERF_ICORE/PERF_CHAN only exist since Meta2 */ +#ifdef METAC_2_1 void *perf_addr; /* @@ -640,6 +642,7 @@ static void metag_pmu_enable_counter(struct hw_perf_event *event, int idx) if (perf_addr) metag_out32((config & 0x0f), perf_addr); +#endif /* * Now we use the high nibble as the performance event to -- cgit v0.10.2 From 096a8b6d5e7ab9f8ca3d2474b3ca6a1fe79e0371 Mon Sep 17 00:00:00 2001 From: James Hogan Date: Tue, 3 May 2016 09:11:21 +0100 Subject: metag: Fix atomic_*_return inline asm constraints The argument i of atomic_*_return() operations is given to inline asm with the "bd" constraint, which means "An Op2 register where Op1 is a data unit register and the instruction supports O2R", however Op1 is constrained by "da" which allows an address unit register to be used. Fix the constraint to use "br", meaning "An Op2 register and the instruction supports O2R", i.e. not requiring Op1 to be a data unit register. Fixes: d6dfe2509da9 ("locking,arch,metag: Fold atomic_ops") Signed-off-by: James Hogan Cc: Peter Zijlstra Cc: linux-metag@vger.kernel.org diff --git a/arch/metag/include/asm/atomic_lnkget.h b/arch/metag/include/asm/atomic_lnkget.h index a625818..88fa25f 100644 --- a/arch/metag/include/asm/atomic_lnkget.h +++ b/arch/metag/include/asm/atomic_lnkget.h @@ -61,7 +61,7 @@ static inline int atomic_##op##_return(int i, atomic_t *v) \ " CMPT %0, #HI(0x02000000)\n" \ " BNZ 1b\n" \ : "=&d" (temp), "=&da" (result) \ - : "da" (&v->counter), "bd" (i) \ + : "da" (&v->counter), "br" (i) \ : "cc"); \ \ smp_mb(); \ -- cgit v0.10.2