Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/acpi Fix table offset when walking MCFG allocation s...



details:   https://anonhg.NetBSD.org/src/rev/f16fe070cbdd
branches:  trunk
changeset: 994098:f16fe070cbdd
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Fri Oct 19 14:06:13 2018 +0000

description:
Fix table offset when walking MCFG allocation subtables

diffstat:

 sys/dev/acpi/acpi_mcfg.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 0c2d5c6c2506 -r f16fe070cbdd sys/dev/acpi/acpi_mcfg.c
--- a/sys/dev/acpi/acpi_mcfg.c  Fri Oct 19 13:40:33 2018 +0000
+++ b/sys/dev/acpi/acpi_mcfg.c  Fri Oct 19 14:06:13 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpi_mcfg.c,v 1.10 2018/10/17 01:16:23 jmcneill Exp $  */
+/*     $NetBSD: acpi_mcfg.c,v 1.11 2018/10/19 14:06:13 jmcneill Exp $  */
 
 /*-
  * Copyright (C) 2015 NONAKA Kimihiro <nonaka%NetBSD.org@localhost>
@@ -28,7 +28,7 @@
 #include "opt_pci.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_mcfg.c,v 1.10 2018/10/17 01:16:23 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_mcfg.c,v 1.11 2018/10/19 14:06:13 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -304,7 +304,7 @@
                    ama->Address);
                nsegs++;
                offset += sizeof(ACPI_MCFG_ALLOCATION);
-               ama = ACPI_ADD_PTR(ACPI_MCFG_ALLOCATION, ama, offset);
+               ama = ACPI_ADD_PTR(ACPI_MCFG_ALLOCATION, mcfg, offset);
        }
        if (nsegs == 0) {
                mcfg = NULL;
@@ -413,7 +413,7 @@
 
  next:
                offset += sizeof(ACPI_MCFG_ALLOCATION);
-               ama = ACPI_ADD_PTR(ACPI_MCFG_ALLOCATION, ama, offset);
+               ama = ACPI_ADD_PTR(ACPI_MCFG_ALLOCATION, mcfg, offset);
        }
        if (nsegs == 0)
                return ENOENT;



Home | Main Index | Thread Index | Old Index