Module Name: src
Committed By: jmcneill
Date: Thu Nov 1 10:48:49 UTC 2018
Modified Files:
src/sys/arch/evbarm/fdt: fdt_memory.c
Log Message:
Fix previous
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/fdt/fdt_memory.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/evbarm/fdt/fdt_memory.c
diff -u src/sys/arch/evbarm/fdt/fdt_memory.c:1.2 src/sys/arch/evbarm/fdt/fdt_memory.c:1.3
--- src/sys/arch/evbarm/fdt/fdt_memory.c:1.2 Thu Nov 1 10:21:41 2018
+++ src/sys/arch/evbarm/fdt/fdt_memory.c Thu Nov 1 10:48:48 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_memory.c,v 1.2 2018/11/01 10:21:41 jmcneill Exp $ */
+/* $NetBSD: fdt_memory.c,v 1.3 2018/11/01 10:48:48 jmcneill Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#include "opt_bootconfig.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdt_memory.c,v 1.2 2018/11/01 10:21:41 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_memory.c,v 1.3 2018/11/01 10:48:48 jmcneill Exp $");
#include <sys/param.h>
#include <sys/queue.h>
@@ -147,12 +147,12 @@ fdt_memory_remove_range(uint64_t start,
next->mr_mem.end = mr->mr_mem.end;
mr->mr_mem.end = start;
TAILQ_INSERT_AFTER(&fdt_memory_ranges, mr, next, mr_list);
- } else if (start <= mr->mr_mem.start && end < mr->mr_mem.end) {
+ } else if (start <= mr->mr_mem.start && end > mr->mr_mem.start && end < mr->mr_mem.end) {
/*
* Partial overlap at the beginning of the range.
*/
mr->mr_mem.start = end;
- } else if (start > mr->mr_mem.start && end >= mr->mr_mem.end) {
+ } else if (start > mr->mr_mem.start && start < mr->mr_mem.end && end >= mr->mr_mem.end) {
/*
* Partial overlap at the end of the range.
*/