Messages in this thread | | | Date | Thu, 1 Sep 2022 07:31:14 +0200 | From | Robert Richter <> | Subject | Re: [PATCH 02/15] cxl/core: Check physical address before mapping it in devm_cxl_iomap_block() |
| |
On 31.08.22 09:56:51, Jonathan Cameron wrote: > On Wed, 31 Aug 2022 10:15:50 +0200 > Robert Richter <rrichter@amd.com> wrote: > > > The physical base address of a CXL range can be invalid and is then > > set to CXL_RESOURCE_NONE. Early check this case before mapping a > > memory block in devm_cxl_iomap_block(). > > An example of when it is invalid would be a useful addition > to this description. Feels to me like this is papering over the cracks > in something we should have ruled out earlier in the flow.
IIRC this happened during code development in cxl_pci_probe() when cxl_map_regs() is called but the base addr was not determined correctly before. It's similar to a NULL pointer check.
-Robert
| |