Commit d01149b
cxl/region: Use region data to get the root decoder
To find a region's root decoder, the endpoint's HPA range is used to
search the matching decoder by its range. With address translation the
endpoint decoder's range is in a different address space and thus
cannot be used to determine the root decoder.
The region parameters are encapsulated within struct cxl_region_context
and may include the translated Host Physical Address (HPA) range. Use
this context to identify the root decoder rather than relying on the
endpoint.
Modify cxl_find_root_decoder() and add the region context as
parameter. Rename this function to get_cxl_root_decoder() as a
counterpart to put_cxl_root_decoder(). Simplify the implementation by
removing function cxl_port_find_switch_decode(). The function is
unnecessary because it is not referenced or utilized elsewhere in the
code.
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Tested-by: Gregory Price <gourry@gourry.net>
Signed-off-by: Robert Richter <rrichter@amd.com>
Link: https://patch.msgid.link/20260114164837.1076338-8-rrichter@amd.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>1 parent 1fd6c38 commit d01149b
1 file changed
Lines changed: 24 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3469 | 3469 | | |
3470 | 3470 | | |
3471 | 3471 | | |
3472 | | - | |
| 3472 | + | |
3473 | 3473 | | |
3474 | 3474 | | |
3475 | | - | |
| 3475 | + | |
3476 | 3476 | | |
3477 | | - | |
| 3477 | + | |
3478 | 3478 | | |
3479 | 3479 | | |
3480 | | - | |
3481 | | - | |
3482 | | - | |
3483 | | - | |
3484 | | - | |
3485 | | - | |
3486 | | - | |
3487 | | - | |
3488 | | - | |
3489 | | - | |
| 3480 | + | |
| 3481 | + | |
3490 | 3482 | | |
3491 | | - | |
| 3483 | + | |
3492 | 3484 | | |
3493 | 3485 | | |
| 3486 | + | |
| 3487 | + | |
| 3488 | + | |
| 3489 | + | |
3494 | 3490 | | |
3495 | | - | |
| 3491 | + | |
| 3492 | + | |
3496 | 3493 | | |
3497 | 3494 | | |
3498 | 3495 | | |
3499 | 3496 | | |
3500 | | - | |
3501 | | - | |
| 3497 | + | |
3502 | 3498 | | |
3503 | | - | |
3504 | | - | |
| 3499 | + | |
| 3500 | + | |
| 3501 | + | |
3505 | 3502 | | |
3506 | 3503 | | |
3507 | | - | |
3508 | | - | |
3509 | | - | |
| 3504 | + | |
| 3505 | + | |
| 3506 | + | |
3510 | 3507 | | |
3511 | 3508 | | |
3512 | | - | |
| 3509 | + | |
3513 | 3510 | | |
3514 | 3511 | | |
3515 | 3512 | | |
| |||
3706 | 3703 | | |
3707 | 3704 | | |
3708 | 3705 | | |
3709 | | - | |
3710 | | - | |
3711 | | - | |
| 3706 | + | |
| 3707 | + | |
| 3708 | + | |
| 3709 | + | |
3712 | 3710 | | |
3713 | 3711 | | |
3714 | 3712 | | |
| |||
0 commit comments