Skip to content

Commit 39c3cf5

Browse files
Lorenzo Pieralisictmarinas
authored andcommitted
ACPI/IORT: Make iort_msi_map_rid() PCI agnostic
There is nothing PCI specific in iort_msi_map_rid(). Rename the function using a bus protocol agnostic name, iort_msi_map_id(), and convert current callers to it. Signed-off-by: Lorenzo Pieralisi <[email protected]> Acked-by: Bjorn Helgaas <[email protected]> Cc: Will Deacon <[email protected]> Cc: Hanjun Guo <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Sudeep Holla <[email protected]> Cc: Robin Murphy <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent d1718a1 commit 39c3cf5

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

drivers/acpi/arm64/iort.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -568,22 +568,22 @@ static struct acpi_iort_node *iort_find_dev_node(struct device *dev)
568568
}
569569

570570
/**
571-
* iort_msi_map_rid() - Map a MSI requester ID for a device
571+
* iort_msi_map_id() - Map a MSI input ID for a device
572572
* @dev: The device for which the mapping is to be done.
573-
* @req_id: The device requester ID.
573+
* @input_id: The device input ID.
574574
*
575-
* Returns: mapped MSI RID on success, input requester ID otherwise
575+
* Returns: mapped MSI ID on success, input ID otherwise
576576
*/
577-
u32 iort_msi_map_rid(struct device *dev, u32 req_id)
577+
u32 iort_msi_map_id(struct device *dev, u32 input_id)
578578
{
579579
struct acpi_iort_node *node;
580580
u32 dev_id;
581581

582582
node = iort_find_dev_node(dev);
583583
if (!node)
584-
return req_id;
584+
return input_id;
585585

586-
iort_node_map_id(node, req_id, &dev_id, IORT_MSI_TYPE);
586+
iort_node_map_id(node, input_id, &dev_id, IORT_MSI_TYPE);
587587
return dev_id;
588588
}
589589

drivers/pci/msi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1536,7 +1536,7 @@ u32 pci_msi_domain_get_msi_rid(struct irq_domain *domain, struct pci_dev *pdev)
15361536

15371537
of_node = irq_domain_get_of_node(domain);
15381538
rid = of_node ? of_msi_map_rid(&pdev->dev, of_node, rid) :
1539-
iort_msi_map_rid(&pdev->dev, rid);
1539+
iort_msi_map_id(&pdev->dev, rid);
15401540

15411541
return rid;
15421542
}

include/linux/acpi_iort.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void iort_deregister_domain_token(int trans_id);
2828
struct fwnode_handle *iort_find_domain_token(int trans_id);
2929
#ifdef CONFIG_ACPI_IORT
3030
void acpi_iort_init(void);
31-
u32 iort_msi_map_rid(struct device *dev, u32 req_id);
31+
u32 iort_msi_map_id(struct device *dev, u32 id);
3232
struct irq_domain *iort_get_device_domain(struct device *dev, u32 id,
3333
enum irq_domain_bus_token bus_token);
3434
void acpi_configure_pmsi_domain(struct device *dev);
@@ -39,8 +39,8 @@ const struct iommu_ops *iort_iommu_configure(struct device *dev);
3939
int iort_iommu_msi_get_resv_regions(struct device *dev, struct list_head *head);
4040
#else
4141
static inline void acpi_iort_init(void) { }
42-
static inline u32 iort_msi_map_rid(struct device *dev, u32 req_id)
43-
{ return req_id; }
42+
static inline u32 iort_msi_map_id(struct device *dev, u32 id)
43+
{ return id; }
4444
static inline struct irq_domain *iort_get_device_domain(
4545
struct device *dev, u32 id, enum irq_domain_bus_token bus_token)
4646
{ return NULL; }

0 commit comments

Comments
 (0)