acpi/acpi.c: Reduce scope of functions used locally

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: Ieca5d8d175923f690ebfa3108e393e029ea97c80
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75732
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
This commit is contained in:
Arthur Heymans 2023-06-08 19:56:51 +02:00 committed by Felix Held
parent edee16ec8c
commit 9362dd75d8
2 changed files with 5 additions and 13 deletions

View File

@ -110,7 +110,7 @@ void acpi_add_table(acpi_rsdp_t *rsdp, void *table)
i + 1, entries_num, rsdt->header.length); i + 1, entries_num, rsdt->header.length);
} }
int acpi_create_mcfg_mmconfig(acpi_mcfg_mmconfig_t *mmconfig, u32 base, static int acpi_create_mcfg_mmconfig(acpi_mcfg_mmconfig_t *mmconfig, u32 base,
u16 seg_nr, u8 start, u8 end) u16 seg_nr, u8 start, u8 end)
{ {
memset(mmconfig, 0, sizeof(*mmconfig)); memset(mmconfig, 0, sizeof(*mmconfig));
@ -197,7 +197,7 @@ static unsigned long acpi_create_madt_lapics(unsigned long current)
return current; return current;
} }
int acpi_create_madt_ioapic(acpi_madt_ioapic_t *ioapic, u8 id, u32 addr, static int acpi_create_madt_ioapic(acpi_madt_ioapic_t *ioapic, u8 id, u32 addr,
u32 gsi_base) u32 gsi_base)
{ {
ioapic->type = IO_APIC; /* I/O APIC structure */ ioapic->type = IO_APIC; /* I/O APIC structure */
@ -244,7 +244,7 @@ static u16 acpi_sci_int(void)
#endif #endif
} }
int acpi_create_madt_irqoverride(acpi_madt_irqoverride_t *irqoverride, static int acpi_create_madt_irqoverride(acpi_madt_irqoverride_t *irqoverride,
u8 bus, u8 source, u32 gsirq, u16 flags) u8 bus, u8 source, u32 gsirq, u16 flags)
{ {
irqoverride->type = IRQ_SOURCE_OVERRIDE; /* Interrupt source override */ irqoverride->type = IRQ_SOURCE_OVERRIDE; /* Interrupt source override */
@ -257,7 +257,7 @@ int acpi_create_madt_irqoverride(acpi_madt_irqoverride_t *irqoverride,
return irqoverride->length; return irqoverride->length;
} }
int acpi_create_madt_sci_override(acpi_madt_irqoverride_t *irqoverride) static int acpi_create_madt_sci_override(acpi_madt_irqoverride_t *irqoverride)
{ {
u8 gsi, irq, flags; u8 gsi, irq, flags;
@ -331,7 +331,7 @@ unsigned long acpi_create_madt_lapic_nmis(unsigned long current)
return current; return current;
} }
unsigned long acpi_create_madt_lapics_with_nmis(unsigned long current) static unsigned long acpi_create_madt_lapics_with_nmis(unsigned long current)
{ {
current = acpi_create_madt_lapics(current); current = acpi_create_madt_lapics(current);
current = acpi_create_madt_lapic_nmis(current); current = acpi_create_madt_lapic_nmis(current);

View File

@ -1363,15 +1363,9 @@ int acpi_create_cedt_chbs(acpi_cedt_chbs_t *chbs, u32 uid, u32 cxl_ver, u64 base
int acpi_create_cedt_cfmws(acpi_cedt_cfmws_t *cfmws, u64 base_hpa, u64 window_size, int acpi_create_cedt_cfmws(acpi_cedt_cfmws_t *cfmws, u64 base_hpa, u64 window_size,
u8 eniw, u32 hbig, u16 restriction, u16 qtg_id, const u32 *interleave_target); u8 eniw, u32 hbig, u16 restriction, u16 qtg_id, const u32 *interleave_target);
int acpi_create_madt_ioapic(acpi_madt_ioapic_t *ioapic, u8 id, u32 addr,
u32 gsi_base);
int acpi_create_madt_ioapic_from_hw(acpi_madt_ioapic_t *ioapic, u32 addr); int acpi_create_madt_ioapic_from_hw(acpi_madt_ioapic_t *ioapic, u32 addr);
int acpi_create_madt_irqoverride(acpi_madt_irqoverride_t *irqoverride,
u8 bus, u8 source, u32 gsirq, u16 flags);
int acpi_create_madt_sci_override(acpi_madt_irqoverride_t *irqoverride);
unsigned long acpi_create_madt_one_lapic(unsigned long current, u32 cpu, u32 apic); unsigned long acpi_create_madt_one_lapic(unsigned long current, u32 cpu, u32 apic);
unsigned long acpi_create_madt_lapics_with_nmis(unsigned long current);
unsigned long acpi_create_madt_lapic_nmis(unsigned long current); unsigned long acpi_create_madt_lapic_nmis(unsigned long current);
@ -1385,8 +1379,6 @@ int acpi_create_srat_mem(acpi_srat_mem_t *mem, u8 node, u32 basek, u32 sizek,
*/ */
int acpi_create_srat_gia_pci(acpi_srat_gia_t *gia, u32 proximity_domain, int acpi_create_srat_gia_pci(acpi_srat_gia_t *gia, u32 proximity_domain,
u16 seg, u8 bus, u8 dev, u8 func, u32 flags); u16 seg, u8 bus, u8 dev, u8 func, u32 flags);
int acpi_create_mcfg_mmconfig(acpi_mcfg_mmconfig_t *mmconfig, u32 base,
u16 seg_nr, u8 start, u8 end);
unsigned long acpi_create_srat_lapics(unsigned long current); unsigned long acpi_create_srat_lapics(unsigned long current);
void acpi_create_srat(acpi_srat_t *srat, void acpi_create_srat(acpi_srat_t *srat,
unsigned long (*acpi_fill_srat)(unsigned long current)); unsigned long (*acpi_fill_srat)(unsigned long current));