perf/x86/intel/uncore: Move uncore_box_init() out of driver initialization
authorKan Liang <kan.liang@intel.com>
Tue, 20 Jan 2015 04:54:25 +0000 (04:54 +0000)
committerIngo Molnar <mingo@kernel.org>
Wed, 28 Jan 2015 12:04:34 +0000 (13:04 +0100)
commitc05199e5a57a579fea1e8fa65e2b511ceb524ffc
tree200e6737a865934728356b94cc255bc841631d01
parent4adca1cbc4cedb31aba03497b3de238ea13b566a
perf/x86/intel/uncore: Move uncore_box_init() out of driver initialization

There were some issues about the uncore driver tried to access
non-existing boxes, which caused boot crashes. These issues have
been all fixed. But we should avoid boot failures if that ever
happens again.

This patch intends to prevent this kind of potential issues.
It moves uncore_box_init out of driver initialization. The box
will be initialized when it's first enabled.

Signed-off-by: Kan Liang <kan.liang@intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1421729665-5912-1-git-send-email-kan.liang@intel.com
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Yan, Zheng <zheng.z.yan@intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/cpu/perf_event_intel_uncore.c
arch/x86/kernel/cpu/perf_event_intel_uncore.h