Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/arch/powerpc/powerpc/bus_space.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/arch/powerpc/powerpc/bus_space.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.18 retrieving revision 1.19 diff -u -p -r1.18 -r1.19 --- src/sys/arch/powerpc/powerpc/bus_space.c 2008/02/23 19:50:41 1.18 +++ src/sys/arch/powerpc/powerpc/bus_space.c 2008/03/04 08:12:12 1.19 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_space.c,v 1.18 2008/02/23 19:50:41 matt Exp $ */ +/* $NetBSD: bus_space.c,v 1.19 2008/03/04 08:12:12 mrg Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.18 2008/02/23 19:50:41 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.19 2008/03/04 08:12:12 mrg Exp $"); #include #include @@ -529,7 +529,6 @@ memio_map(bus_space_tag_t t, bus_addr_t #ifdef DEBUG printf("bus_space_map(%p[%x:%x], %#x, %#x) failed: EINVAL\n", t, t->pbs_base, t->pbs_limit, bpa, size); - #endif return (EINVAL); } @@ -689,8 +688,13 @@ memio_alloc(bus_space_tag_t t, bus_addr_ size = _BUS_SPACE_STRIDE(t, size); rstart = _BUS_SPACE_STRIDE(t, rstart); - if (rstart + size > t->pbs_limit) + if (rstart + size > t->pbs_limit) { +#ifdef DEBUG + printf("%s(%p[%x:%x], %#x, %#x) failed: EINVAL\n", + __func__, t, t->pbs_base, t->pbs_limit, rstart, size); +#endif return (EINVAL); + } /* * Can't map I/O space as linear.