On Mon, Oct 14, 2024 at 10:09:23PM +0900, Damien Le Moal wrote: > 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 ? > Sounds good to me. - Mani -- மணிவண்ணன் சதாசிவம்