[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH] xen/acpi: Don't fail if SPCR table is absent
Absence of a SPCR table likely means the console is a framebuffer. In such case acpi_iomem_deny_access() should NOT fail. Signed-off-by: Elliott Mitchell <ehem+xen@xxxxxxx> --- xen/arch/arm/acpi/domain_build.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/xen/arch/arm/acpi/domain_build.c b/xen/arch/arm/acpi/domain_build.c index 1b1cfabb00..bbdc90f92c 100644 --- a/xen/arch/arm/acpi/domain_build.c +++ b/xen/arch/arm/acpi/domain_build.c @@ -42,17 +42,18 @@ static int __init acpi_iomem_deny_access(struct domain *d) status = acpi_get_table(ACPI_SIG_SPCR, 0, (struct acpi_table_header **)&spcr); - if ( ACPI_FAILURE(status) ) + if ( ACPI_SUCCESS(status) ) { - printk("Failed to get SPCR table\n"); - return -EINVAL; + mfn = spcr->serial_port.address >> PAGE_SHIFT; + /* Deny MMIO access for UART */ + rc = iomem_deny_access(d, mfn, mfn + 1); + if ( rc ) + return rc; + } + else + { + printk("Failed to get SPCR table, Xen console may be unavailable\n"); } - - mfn = spcr->serial_port.address >> PAGE_SHIFT; - /* Deny MMIO access for UART */ - rc = iomem_deny_access(d, mfn, mfn + 1); - if ( rc ) - return rc; /* Deny MMIO access for GIC regions */ return gic_iomem_deny_access(d); -- 2.20.1 -- (\___(\___(\______ --=> 8-) EHM <=-- ______/)___/)___/) \BS ( | ehem+sigmsg@xxxxxxx PGP 87145445 | ) / \_CS\ | _____ -O #include <stddisclaimer.h> O- _____ | / _/ 8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |