mirror of https://github.com/torvalds/linux.git
cxl: Rename region_res_match_cxl_range() to spa_maps_hpa()
The function name region_res_match_cxl_range() does not accurately convey the operation of address comparison with cache size. Rename to spa_maps_hpa() to provide a better function name. Suggested-by: Dan Williams <dan.j.williams@intel.com> Link: https://lore.kernel.org/linux-cxl/68eea19c7e67e_2f899100a8@dwillia2-mobl4.notmuch/ Reviewed-by: Jonathan Cameron <jonathan.cameron@huwei.com> Reviewed-by: Gregory Price <gourry@gourry.net> Link: https://patch.msgid.link/20251106170108.1468304-2-dave.jiang@intel.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
This commit is contained in:
parent
15e1426788
commit
c43521b9db
|
|
@ -844,8 +844,8 @@ static int match_free_decoder(struct device *dev, const void *data)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static bool region_res_match_cxl_range(const struct cxl_region_params *p,
|
||||
const struct range *range)
|
||||
static bool spa_maps_hpa(const struct cxl_region_params *p,
|
||||
const struct range *range)
|
||||
{
|
||||
if (!p->res)
|
||||
return false;
|
||||
|
|
@ -871,7 +871,7 @@ static int match_auto_decoder(struct device *dev, const void *data)
|
|||
cxld = to_cxl_decoder(dev);
|
||||
r = &cxld->hpa_range;
|
||||
|
||||
if (region_res_match_cxl_range(p, r))
|
||||
if (spa_maps_hpa(p, r))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
|
@ -1483,7 +1483,7 @@ static int cxl_port_setup_targets(struct cxl_port *port,
|
|||
if (test_bit(CXL_REGION_F_AUTO, &cxlr->flags)) {
|
||||
if (cxld->interleave_ways != iw ||
|
||||
(iw > 1 && cxld->interleave_granularity != ig) ||
|
||||
!region_res_match_cxl_range(p, &cxld->hpa_range) ||
|
||||
!spa_maps_hpa(p, &cxld->hpa_range) ||
|
||||
((cxld->flags & CXL_DECODER_F_ENABLE) == 0)) {
|
||||
dev_err(&cxlr->dev,
|
||||
"%s:%s %s expected iw: %d ig: %d %pr\n",
|
||||
|
|
@ -3417,7 +3417,7 @@ static int match_region_by_range(struct device *dev, const void *data)
|
|||
p = &cxlr->params;
|
||||
|
||||
guard(rwsem_read)(&cxl_rwsem.region);
|
||||
return region_res_match_cxl_range(p, r);
|
||||
return spa_maps_hpa(p, r);
|
||||
}
|
||||
|
||||
static int cxl_extended_linear_cache_resize(struct cxl_region *cxlr,
|
||||
|
|
|
|||
Loading…
Reference in New Issue