Module Name:    src
Committed By:   cherry
Date:           Sat Dec 24 19:02:16 UTC 2016

Modified Files:
        src/sys/arch/powerpc/ibm4xx: pmap.c

Log Message:
Conform API use of uvm_hotplug(9) to documented behaviour:

When testing for an invalid uvm_physseg_t,
compare with UVM_PHYSSEG_TYPE_INVALID which is implementation agnostic.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/powerpc/ibm4xx/pmap.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/powerpc/ibm4xx/pmap.c
diff -u src/sys/arch/powerpc/ibm4xx/pmap.c:1.75 src/sys/arch/powerpc/ibm4xx/pmap.c:1.76
--- src/sys/arch/powerpc/ibm4xx/pmap.c:1.75	Sat Dec 24 18:07:31 2016
+++ src/sys/arch/powerpc/ibm4xx/pmap.c	Sat Dec 24 19:02:16 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.75 2016/12/24 18:07:31 cherry Exp $	*/
+/*	$NetBSD: pmap.c,v 1.76 2016/12/24 19:02:16 cherry Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.75 2016/12/24 18:07:31 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.76 2016/12/24 19:02:16 cherry Exp $");
 
 #include <sys/param.h>
 #include <sys/cpu.h>
@@ -201,7 +201,7 @@ pa_to_pv(paddr_t pa)
 	psize_t pg;
 
 	bank = uvm_physseg_find(atop(pa), &pg);
-	if (bank == -1)
+	if (bank == UVM_PHYSSEG_TYPE_INVALID)
 		return NULL;
 	return &uvm_physseg_get_pmseg(bank)->pvent[pg];
 }
@@ -213,7 +213,7 @@ pa_to_attr(paddr_t pa)
 	psize_t pg;
 
 	bank = uvm_physseg_find(atop(pa), &pg);
-	if (bank == -1)
+	if (bank == UVM_PHYSSEG_TYPE_INVALID)
 		return NULL;
 	return &uvm_physseg_get_pmseg(bank)->attrs[pg];
 }

Reply via email to