]> git.baikalelectronics.ru Git - kernel.git/commit
perf/x86/intel/uncore: Factor out box ref/unref functions
authorKan Liang <kan.liang@linux.intel.com>
Wed, 1 May 2019 00:53:45 +0000 (17:53 -0700)
committerIngo Molnar <mingo@kernel.org>
Mon, 17 Jun 2019 10:36:19 +0000 (12:36 +0200)
commita8cb24cde6e50b55545d46fe3af0056916251c76
tree75b43ca2116423e9c63e3fe22b87cf5d986e8dd6
parent41c40b8ed33c8f609a32be630f75a620e7048785
perf/x86/intel/uncore: Factor out box ref/unref functions

For uncore box which can only be accessed by MSR, its reference
box->refcnt is updated in CPU hot plug. The uncore boxes need to be
initalized and exited accordingly for the first/last CPU of a socket.

Starts from Snow Ridge server, a new type of uncore box is introduced,
which can only be accessed by MMIO. The driver needs to map/unmap
MMIO space for the first/last CPU of a socket.

Extract the codes of box ref/unref and init/exit for reuse later.

There is no functional change.

Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: acme@kernel.org
Cc: eranian@google.com
Link: https://lkml.kernel.org/r/1556672028-119221-4-git-send-email-kan.liang@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/events/intel/uncore.c