cxl/region: Move HPA setup to cxl_region_attach()
authorDan Williams <dan.j.williams@intel.com>
Fri, 5 Aug 2022 20:27:40 +0000 (13:27 -0700)
committerDan Williams <dan.j.williams@intel.com>
Fri, 5 Aug 2022 23:10:03 +0000 (16:10 -0700)
commit910bc55da8285605308cb76f69a335b36780da43
treecc4d647a0812d3858c45841b081273feabe63554
parent2901c8bdedca19e5efdab2ea55b465102231b315
cxl/region: Move HPA setup to cxl_region_attach()

A recent bug fix added the setup of the endpoint decoder interleave
geometry settings to cxl_region_attach(). Move the HPA setup there as
well to keep all endpoint decoder parameter setting in a central
location.

For symmetry, move endpoint HPA teardown to cxl_region_detach(), and for
switches move HPA setup / teardown to cxl_port_{setup,reset}_targets().

Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Link: https://lore.kernel.org/r/165973126020.1526540.14701949254436069807.stgit@dwillia2-xfh.jf.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/core/hdm.c
drivers/cxl/core/region.c