Merge tag 'metag-for-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 16 May 2016 23:50:38 +0000 (16:50 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 16 May 2016 23:50:38 +0000 (16:50 -0700)
Pull metag architecture updates from James Hogan:
 "Three minor fixes:

   - removal of stale comment
   - fix build for Meta1 when perf events are enabled
   - fix inline asm constraint in atomics"

* tag 'metag-for-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag:
  metag: Fix atomic_*_return inline asm constraints
  metag: perf: fix build on Meta1
  metag: ftrace: remove the misleading comment for ftrace_dyn_arch_init

arch/metag/include/asm/atomic_lnkget.h
arch/metag/kernel/ftrace.c
arch/metag/kernel/perf/perf_event.c

index a625818..88fa25f 100644 (file)
@@ -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();                                                       \
index ac8c039..f7b23d3 100644 (file)
@@ -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;
index 2478ec6..33a365f 100644 (file)
@@ -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