Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/80266?usp=email )
Change subject: soc/amd/common/data_fabric/domain: use unsigned long for resource index ......................................................................
soc/amd/common/data_fabric/domain: use unsigned long for resource index
Use an unsigned long as resource index type instead of an int to match the data type used for the index in the resource struct.
Signed-off-by: Felix Held felix-coreboot@felixheld.de Change-Id: I60ac0e30627001698565b7256421780f9a94bf65 Reviewed-on: https://review.coreboot.org/c/coreboot/+/80266 Reviewed-by: Paul Menzel paulepanter@mailbox.org Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Arthur Heymans arthur@aheymans.xyz Reviewed-by: Varshit Pandya pandyavarshit@gmail.com --- M src/soc/amd/common/block/data_fabric/domain.c M src/soc/amd/common/block/include/amdblocks/root_complex.h M src/soc/amd/common/block/root_complex/non_pci_resources.c 3 files changed, 7 insertions(+), 7 deletions(-)
Approvals: build bot (Jenkins): Verified Arthur Heymans: Looks good to me, approved Paul Menzel: Looks good to me, but someone else must approve Varshit Pandya: Looks good to me, approved
diff --git a/src/soc/amd/common/block/data_fabric/domain.c b/src/soc/amd/common/block/data_fabric/domain.c index 7bcc01b..8533dff 100644 --- a/src/soc/amd/common/block/data_fabric/domain.c +++ b/src/soc/amd/common/block/data_fabric/domain.c @@ -78,7 +78,7 @@ return true; }
-static void report_data_fabric_mmio(struct device *domain, unsigned int idx, +static void report_data_fabric_mmio(struct device *domain, unsigned long idx, resource_t mmio_base, resource_t mmio_limit) { struct resource *res; @@ -89,7 +89,7 @@ }
/* Tell the resource allocator about the usable MMIO ranges configured in the data fabric */ -static void add_data_fabric_mmio_regions(struct device *domain, unsigned int *idx) +static void add_data_fabric_mmio_regions(struct device *domain, unsigned long *idx) { const signed int iohc_dest_fabric_id = get_iohc_fabric_id(domain); union df_mmio_control ctrl; @@ -140,7 +140,7 @@ } }
-static void report_data_fabric_io(struct device *domain, unsigned int idx, +static void report_data_fabric_io(struct device *domain, unsigned long idx, resource_t io_base, resource_t io_limit) { struct resource *res; @@ -151,7 +151,7 @@ }
/* Tell the resource allocator about the usable I/O space */ -static void add_data_fabric_io_regions(struct device *domain, unsigned int *idx) +static void add_data_fabric_io_regions(struct device *domain, unsigned long *idx) { const signed int iohc_dest_fabric_id = get_iohc_fabric_id(domain); union df_io_base base_reg; @@ -193,7 +193,7 @@
void amd_pci_domain_read_resources(struct device *domain) { - unsigned int idx = 0; + unsigned long idx = 0;
add_data_fabric_io_regions(domain, &idx);
diff --git a/src/soc/amd/common/block/include/amdblocks/root_complex.h b/src/soc/amd/common/block/include/amdblocks/root_complex.h index dd0e68a..d774af0 100644 --- a/src/soc/amd/common/block/include/amdblocks/root_complex.h +++ b/src/soc/amd/common/block/include/amdblocks/root_complex.h @@ -20,7 +20,7 @@ unsigned long res_idx; /* Use NON_PCI_RES_IDX_AUTO or a specific resource index */ };
-void read_non_pci_resources(struct device *domain, unsigned int *idx); +void read_non_pci_resources(struct device *domain, unsigned long *idx);
uint32_t get_iohc_misc_smn_base(struct device *domain); const struct non_pci_mmio_reg *get_iohc_non_pci_mmio_regs(size_t *count); diff --git a/src/soc/amd/common/block/root_complex/non_pci_resources.c b/src/soc/amd/common/block/root_complex/non_pci_resources.c index 31f4eb0..54f3de2 100644 --- a/src/soc/amd/common/block/root_complex/non_pci_resources.c +++ b/src/soc/amd/common/block/root_complex/non_pci_resources.c @@ -7,7 +7,7 @@
#define IOHC_MMIO_EN BIT(0)
-void read_non_pci_resources(struct device *domain, unsigned int *idx) +void read_non_pci_resources(struct device *domain, unsigned long *idx) { const uint32_t iohc_misc_base = get_iohc_misc_smn_base(domain); const struct non_pci_mmio_reg *regs;