Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/acpi fix build without options MULTIPROCESSOR



details:   https://anonhg.NetBSD.org/src/rev/9247d6ef5a49
branches:  trunk
changeset: 451450:9247d6ef5a49
user:      ryo <ryo%NetBSD.org@localhost>
date:      Thu May 23 15:54:28 2019 +0000

description:
fix build without options MULTIPROCESSOR

diffstat:

 sys/arch/arm/acpi/acpi_platform.c |   9 +++++++--
 sys/arch/arm/acpi/cpu_acpi.c      |  11 ++++++++---
 2 files changed, 15 insertions(+), 5 deletions(-)

diffs (104 lines):

diff -r e392f48e0b1a -r 9247d6ef5a49 sys/arch/arm/acpi/acpi_platform.c
--- a/sys/arch/arm/acpi/acpi_platform.c Thu May 23 13:10:50 2019 +0000
+++ b/sys/arch/arm/acpi/acpi_platform.c Thu May 23 15:54:28 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_platform.c,v 1.11 2018/12/21 14:50:18 jmcneill Exp $ */
+/* $NetBSD: acpi_platform.c,v 1.12 2019/05/23 15:54:28 ryo Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -32,9 +32,10 @@
 #include "com.h"
 #include "plcom.h"
 #include "opt_efi.h"
+#include "opt_multiprocessor.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_platform.c,v 1.11 2018/12/21 14:50:18 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_platform.c,v 1.12 2019/05/23 15:54:28 ryo Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -113,7 +114,9 @@
 {
        ACPI_TABLE_SPCR *spcr;
        ACPI_TABLE_FADT *fadt;
+#ifdef MULTIPROCESSOR
        ACPI_TABLE_MADT *madt;
+#endif
        int baud_rate;
 
        /*
@@ -198,6 +201,7 @@
                acpi_table_unmap((ACPI_TABLE_HEADER *)fadt);
        }
 
+#ifdef MULTIPROCESSOR
        /*
         * Count CPUs
         */
@@ -212,6 +216,7 @@
                }
                acpi_table_unmap((ACPI_TABLE_HEADER *)madt);
        }
+#endif /* MULTIPROCESSOR */
 }
 
 static void
diff -r e392f48e0b1a -r 9247d6ef5a49 sys/arch/arm/acpi/cpu_acpi.c
--- a/sys/arch/arm/acpi/cpu_acpi.c      Thu May 23 13:10:50 2019 +0000
+++ b/sys/arch/arm/acpi/cpu_acpi.c      Thu May 23 15:54:28 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_acpi.c,v 1.5 2018/12/05 22:42:55 jmcneill Exp $ */
+/* $NetBSD: cpu_acpi.c,v 1.6 2019/05/23 15:54:28 ryo Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,9 +30,10 @@
  */
 
 #include "tprof.h"
+#include "opt_multiprocessor.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_acpi.c,v 1.5 2018/12/05 22:42:55 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_acpi.c,v 1.6 2019/05/23 15:54:28 ryo Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -66,12 +67,14 @@
 
 CFATTACH_DECL_NEW(cpu_acpi, 0, cpu_acpi_match, cpu_acpi_attach, NULL, NULL);
 
+#ifdef MULTIPROCESSOR
 static register_t
 cpu_acpi_mpstart_pa(void)
 {
 
        return (register_t)KERN_VTOPHYS((vaddr_t)cpu_mpstart);
 }
+#endif /* MULTIPROCESSOR */
 
 static int
 cpu_acpi_match(device_t parent, cfdata_t cf, void *aux)
@@ -94,10 +97,11 @@
        const uint64_t mpidr = gicc->ArmMpidr;
        const int unit = device_unit(self);
        struct cpu_info *ci = &cpu_info_store[unit];
-       int error;
 
+#ifdef MULTIPROCESSOR
        if (cpu_mpidr_aff_read() != mpidr) {
                const u_int cpuindex = device_unit(self);
+               int error;
 
                cpu_mpidr[cpuindex] = mpidr;
                cpu_dcache_wb_range((vaddr_t)&cpu_mpidr[cpuindex], sizeof(cpu_mpidr[cpuindex]));
@@ -117,6 +121,7 @@
                                break;
                }
        }
+#endif /* MULTIPROCESSOR */
 
        /* Store the ACPI Processor UID in cpu_info */
        ci->ci_acpiid = gicc->Uid;



Home | Main Index | Thread Index | Old Index