Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci don't attempt to extent_alloc_subregion outside ...



details:   https://anonhg.NetBSD.org/src/rev/ebd365c0f7b2
branches:  trunk
changeset: 968555:ebd365c0f7b2
user:      skrll <skrll%NetBSD.org@localhost>
date:      Mon Jan 20 10:35:42 2020 +0000

description:
don't attempt to extent_alloc_subregion outside the parent extent ranges

diffstat:

 sys/dev/pci/pciconf.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 2f4685ebac3f -r ebd365c0f7b2 sys/dev/pci/pciconf.c
--- a/sys/dev/pci/pciconf.c     Mon Jan 20 07:19:04 2020 +0000
+++ b/sys/dev/pci/pciconf.c     Mon Jan 20 10:35:42 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pciconf.c,v 1.44 2020/01/18 22:17:34 thorpej Exp $     */
+/*     $NetBSD: pciconf.c,v 1.45 2020/01/20 10:35:42 skrll Exp $       */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pciconf.c,v 1.44 2020/01/18 22:17:34 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pciconf.c,v 1.45 2020/01/20 10:35:42 skrll Exp $");
 
 #include "opt_pci.h"
 
@@ -1195,7 +1195,7 @@
         */
        u_long addr64;
        if (ex->ex_end > (1UL << 32) &&
-           extent_alloc_subregion(ex, (1UL << 32),
+           extent_alloc_subregion(ex, MAX((1UL << 32), ex->ex_start),
                                   ex->ex_end,
                                   1 /* size */,
                                   1 /* alignment */,



Home | Main Index | Thread Index | Old Index