diff options
author | Daniel Axtens <dja@axtens.net> | 2015-08-14 17:41:22 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-08-14 21:32:05 +1000 |
commit | c044c4154247372c86b468644de88a4e48f903e9 (patch) | |
tree | f247dbc68b7306cdc96359aac787d08b746bc6cd /drivers/staging/vme | |
parent | 575e6986f028711287fbbf250e5289a089bac8cb (diff) |
cxl: Refactor adaptor init/teardown
Some aspects of initialisation are done only once in the lifetime of
an adapter: for example, allocating memory for the adapter,
allocating the adapter number, or setting up sysfs/debugfs files.
However, we may want to be able to do some parts of the
initialisation multiple times: for example, in error recovery we
want to be able to tear down and then re-map IO memory and IRQs.
Therefore, refactor CXL init/teardown as follows.
- Keep the overarching functions 'cxl_init_adapter' and its pair,
'cxl_remove_adapter'.
- Move all 'once only' allocation/freeing steps to the existing
'cxl_alloc_adapter' function, and its pair 'cxl_release_adapter'
(This involves moving allocation of the adapter number out of
cxl_init_adapter.)
- Create two new functions: 'cxl_configure_adapter', and its pair
'cxl_deconfigure_adapter'. These two functions 'wire up' the
hardware --- they (de)configure resources that do not need to
last the entire lifetime of the adapter
Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/staging/vme')
0 files changed, 0 insertions, 0 deletions