Re: [PATCH v4 14/14] coresight: allow the coresight core driver to be built as a module

From: Suzuki K Poulose
Date: Wed Jun 06 2018 - 05:57:41 EST

On 06/05/2018 10:07 PM, Kim Phillips wrote:
Allow to build coresight as a module. This enhances
coresight developer efficiency by allowing the development to
take place exclusively on the target, and without needing to
reboot in between changes.

- Kconfig becomes a tristate, to allow =m
- append -core to source file name to allow module to
be called coresight by the Makefile
- modules can have only one init/exit, so we add the core bus
register/unregister function calls to the etm_perf init/exit
functions, since coresight.c does not have etm_pmu defined.

It feels a bit weird to move the coresight core specific steps to
etm_perf_init. Why not call etm_perf_init from coresight init routine
and keep everything core specific in the coresight-core.c ?