perf_counter: abstract wakeup flag setting in core to fix powerpc build