Re: [PATCH v6 3/6] PCI: endpoint: Introduce pci_epc_mem_map()/unmap()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/13/24 18:06, Niklas Cassel wrote:
>>   * @map_addr: ops to map CPU address to PCI address
>>   * @unmap_addr: ops to unmap CPU address and PCI address
>>   * @set_msi: ops to set the requested number of MSI interrupts in the MSI
>> @@ -61,6 +93,8 @@ struct pci_epc_ops {
>>  			   struct pci_epf_bar *epf_bar);
>>  	void	(*clear_bar)(struct pci_epc *epc, u8 func_no, u8 vfunc_no,
>>  			     struct pci_epf_bar *epf_bar);
>> +	phys_addr_t (*align_addr)(struct pci_epc *epc, phys_addr_t pci_addr,
>> +				  size_t *size, size_t *offset);
> 
> This functions returns an aligned PCI address.
> Making it return a phys_addr_t for someone used to reading code in
> drivers/pci is very confusing, as you automatically assume that this is
> then the "CPU address" (which is not the case here).
> 
> Please change the return type (basically the same as my first comment in
> this reply) in order to make the API more clear.

Sure I can send an incremental patch to change this to use u64 like other
operation s (e.g. map_addr) for the pci address.

Mani,

Are you OK with that ?

-- 
Damien Le Moal
Western Digital Research




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux