[U-Boot] [PATCH 23/82] x86: Use unsigned long for address in table generation
Simon Glass
sjg at chromium.org
Mon Sep 26 05:33:26 CEST 2016
We should use unsigned long rather than u32 for addresses. Update this so
that the table-generation code builds correctly on 64-bit machines.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
arch/x86/cpu/irq.c | 2 +-
arch/x86/include/asm/acpi_table.h | 2 +-
arch/x86/include/asm/mpspec.h | 2 +-
arch/x86/include/asm/sfi.h | 2 +-
arch/x86/include/asm/smbios.h | 2 +-
arch/x86/include/asm/tables.h | 2 +-
arch/x86/lib/acpi_table.c | 4 ++--
arch/x86/lib/mpspec.c | 2 +-
arch/x86/lib/sfi.c | 2 +-
arch/x86/lib/smbios.c | 2 +-
arch/x86/lib/tables.c | 2 +-
drivers/misc/qfw.c | 4 ++--
12 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/arch/x86/cpu/irq.c b/arch/x86/cpu/irq.c
index df3cd0a..516d84a 100644
--- a/arch/x86/cpu/irq.c
+++ b/arch/x86/cpu/irq.c
@@ -263,7 +263,7 @@ int irq_router_probe(struct udevice *dev)
return irq_router_common_init(dev);
}
-u32 write_pirq_routing_table(u32 addr)
+ulong write_pirq_routing_table(ulong addr)
{
if (!pirq_routing_table)
return addr;
diff --git a/arch/x86/include/asm/acpi_table.h b/arch/x86/include/asm/acpi_table.h
index caff4d8..bbd80a1 100644
--- a/arch/x86/include/asm/acpi_table.h
+++ b/arch/x86/include/asm/acpi_table.h
@@ -316,4 +316,4 @@ int acpi_create_madt_lapic_nmi(struct acpi_madt_lapic_nmi *lapic_nmi,
u8 cpu, u16 flags, u8 lint);
u32 acpi_fill_madt(u32 current);
void acpi_create_gnvs(struct acpi_global_nvs *gnvs);
-u32 write_acpi_tables(u32 start);
+ulong write_acpi_tables(ulong start);
diff --git a/arch/x86/include/asm/mpspec.h b/arch/x86/include/asm/mpspec.h
index ad8eba9..146a4b0 100644
--- a/arch/x86/include/asm/mpspec.h
+++ b/arch/x86/include/asm/mpspec.h
@@ -456,6 +456,6 @@ int mp_determine_pci_dstirq(int bus, int dev, int func, int pirq);
* @addr: start address to write MP table
* @return: end address of MP table
*/
-u32 write_mp_table(u32 addr);
+ulong write_mp_table(ulong addr);
#endif /* __ASM_MPSPEC_H */
diff --git a/arch/x86/include/asm/sfi.h b/arch/x86/include/asm/sfi.h
index d1f0f0c..d6c44c9 100644
--- a/arch/x86/include/asm/sfi.h
+++ b/arch/x86/include/asm/sfi.h
@@ -132,6 +132,6 @@ typedef int (*sfi_table_handler) (struct sfi_table_header *table);
* @base: Address to write table to
* @return address to use for the next table
*/
-u32 write_sfi_table(u32 base);
+ulong write_sfi_table(ulong base);
#endif /*_LINUX_SFI_H */
diff --git a/arch/x86/include/asm/smbios.h b/arch/x86/include/asm/smbios.h
index fd13f2d..4e508c3 100644
--- a/arch/x86/include/asm/smbios.h
+++ b/arch/x86/include/asm/smbios.h
@@ -231,6 +231,6 @@ typedef int (*smbios_write_type)(ulong *addr, int handle);
* @addr: start address to write SMBIOS table
* @return: end address of SMBIOS table
*/
-u32 write_smbios_table(u32 addr);
+ulong write_smbios_table(ulong addr);
#endif /* _SMBIOS_H_ */
diff --git a/arch/x86/include/asm/tables.h b/arch/x86/include/asm/tables.h
index ae9f0d0..6154dd1 100644
--- a/arch/x86/include/asm/tables.h
+++ b/arch/x86/include/asm/tables.h
@@ -63,6 +63,6 @@ void write_tables(void);
* @start: start address to write PIRQ routing table
* @return: end address of PIRQ routing table
*/
-u32 write_pirq_routing_table(u32 start);
+ulong write_pirq_routing_table(ulong start);
#endif /* _X86_TABLES_H_ */
diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c
index 7001e8b..355456d 100644
--- a/arch/x86/lib/acpi_table.c
+++ b/arch/x86/lib/acpi_table.c
@@ -327,7 +327,7 @@ static void enter_acpi_mode(int pm1_cnt)
* QEMU's version of write_acpi_tables is defined in
* arch/x86/cpu/qemu/acpi_table.c
*/
-u32 write_acpi_tables(u32 start)
+ulong write_acpi_tables(ulong start)
{
u32 current;
struct acpi_rsdp *rsdp;
@@ -345,7 +345,7 @@ u32 write_acpi_tables(u32 start)
/* Align ACPI tables to 16 byte */
current = ALIGN(current, 16);
- debug("ACPI: Writing ACPI tables at %x\n", start);
+ debug("ACPI: Writing ACPI tables at %lx\n", start);
/* We need at least an RSDP and an RSDT Table */
rsdp = (struct acpi_rsdp *)current;
diff --git a/arch/x86/lib/mpspec.c b/arch/x86/lib/mpspec.c
index 6ab43f1..516d7b3 100644
--- a/arch/x86/lib/mpspec.c
+++ b/arch/x86/lib/mpspec.c
@@ -365,7 +365,7 @@ static void mptable_add_lintsrc(struct mp_config_table *mc, int bus_isa)
bus_isa, 0, MP_APIC_ALL, 1);
}
-u32 write_mp_table(u32 addr)
+ulong write_mp_table(ulong addr)
{
struct mp_config_table *mc;
int ioapic_id, ioapic_ver;
diff --git a/arch/x86/lib/sfi.c b/arch/x86/lib/sfi.c
index 3d36580..9564853 100644
--- a/arch/x86/lib/sfi.c
+++ b/arch/x86/lib/sfi.c
@@ -131,7 +131,7 @@ static int sfi_write_xsdt(struct table_info *tab)
return 0;
}
-u32 write_sfi_table(u32 base)
+ulong write_sfi_table(ulong base)
{
struct table_info table;
diff --git a/arch/x86/lib/smbios.c b/arch/x86/lib/smbios.c
index c338b82..975bbf2 100644
--- a/arch/x86/lib/smbios.c
+++ b/arch/x86/lib/smbios.c
@@ -221,7 +221,7 @@ static smbios_write_type smbios_write_funcs[] = {
smbios_write_type127
};
-u32 write_smbios_table(u32 addr)
+ulong write_smbios_table(ulong addr)
{
struct smbios_entry *se;
ulong tables;
diff --git a/arch/x86/lib/tables.c b/arch/x86/lib/tables.c
index f92111e..351fc44 100644
--- a/arch/x86/lib/tables.c
+++ b/arch/x86/lib/tables.c
@@ -18,7 +18,7 @@
* @addr: start address to write the table
* @return: end address of the table
*/
-typedef u32 (*table_write)(u32 addr);
+typedef ulong (*table_write)(ulong addr);
static table_write table_write_funcs[] = {
#ifdef CONFIG_GENERATE_PIRQ_TABLE
diff --git a/drivers/misc/qfw.c b/drivers/misc/qfw.c
index d43d1d3..a8af9e0 100644
--- a/drivers/misc/qfw.c
+++ b/drivers/misc/qfw.c
@@ -32,7 +32,7 @@ static LIST_HEAD(fw_list);
* be ignored.
* @return: 0 on success, or negative value on failure
*/
-static int bios_linker_allocate(struct bios_linker_entry *entry, u32 *addr)
+static int bios_linker_allocate(struct bios_linker_entry *entry, ulong *addr)
{
uint32_t size, align;
struct fw_file *file;
@@ -147,7 +147,7 @@ static int bios_linker_add_checksum(struct bios_linker_entry *entry)
}
/* This function loads and patches ACPI tables provided by QEMU */
-u32 write_acpi_tables(u32 addr)
+ulong write_acpi_tables(ulong addr)
{
int i, ret = 0;
struct fw_file *file;
--
2.8.0.rc3.226.g39d4020
More information about the U-Boot
mailing list