• James Hogan's avatar
    metag: perf: fix build on Meta1 · f5d163aa
    James Hogan authored
    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: default avatarJames Hogan <james.hogan@imgtec.com>
    Cc: linux-metag@vger.kernel.org
    f5d163aa
perf_event.c 21.5 KB