Re: [RFC PATCH 3/4] PCI/TSM: Derive the coherent-range IPA from CXL

From: Ankit Agrawal

Date: Tue Oct 20 2026 - 05:20:28 EST


Thanks for the review!

>> Assisted-by: Claude:sonnet-5
>
> Assisted-by: LLM

Do you want the model dropped from the tag, or is this about
format? I followed Documentation/process/coding-assistants.rst
Assisted-by: AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]

>> +                     for (j = 0; j < PCI_NUM_RESOURCES; j++)
>> +                             if (resource_contains(pci_resource_n(pdev, j), res))
>> +                                     break;
>
> pci_dev_for_each_resource()

Ack.

>> +static int pci_tsm_coherent_range(struct pci_dev *pdev, u64 *out_base,
>> +                               u64 *out_size)
>
> Instead of the last two you can use struct range.

Ack.

>> +                     if (pci_tsm_coherent_range(pdev, &range_base,
>> +                                                &range_len)) {
>
> I would leave it on a single line.

Ack.

>> +             range_off = coherent ? tsm_offset :
>> +                                     tsm_offset - reporting_bar_base;
>
> Indentation is broken. I think it's better to read when it's a single line.

Ok, will fix.