2011/9/23 David Daney <david.daney@xxxxxxxxxx> > > The contents of arch/mips/kernel/perf_event.c and > arch/mips/kernel/perf_event_mipsxx.c were divided in a seemingly ad > hoc manner, with the first including the second. > > I moved all the hardware counter support code to perf_event_mipsxx.c > and removed the gating #ifdefs to the Kconfig and Makefile. > > Now perf_event.c contains only the callchain support, everything else > is in perf_event_mipsxx.c > Sorry for my late comment. I personally don't think it's a bad idea to use the original gating #ifdefs, because it allows sharing common code among different types of MIPS PMUs. Also, using CPU types as compiling conditions seems make sense. If you move the common hunk to perf_event_mipsxx.c, other CPUs like loognson series will have to duplicate these stuff. Deng-Cheng