Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/marvell Fix a uvm_fault panic that memory is no...
details: https://anonhg.NetBSD.org/src/rev/a59c6b1a7c55
branches: trunk
changeset: 782808:a59c6b1a7c55
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Wed Nov 21 08:03:18 2012 +0000
description:
Fix a uvm_fault panic that memory is not allocated for the last few GPIO bits.
diffstat:
sys/arch/arm/marvell/mvsocgpp.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r d1836c5836c4 -r a59c6b1a7c55 sys/arch/arm/marvell/mvsocgpp.c
--- a/sys/arch/arm/marvell/mvsocgpp.c Wed Nov 21 08:00:56 2012 +0000
+++ b/sys/arch/arm/marvell/mvsocgpp.c Wed Nov 21 08:03:18 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mvsocgpp.c,v 1.4 2012/09/10 08:50:37 msaitoh Exp $ */
+/* $NetBSD: mvsocgpp.c,v 1.5 2012/11/21 08:03:18 msaitoh Exp $ */
/*
* Copyright (c) 2008, 2010 KIYOHARA Takashi
* All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mvsocgpp.c,v 1.4 2012/09/10 08:50:37 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mvsocgpp.c,v 1.5 2012/11/21 08:03:18 msaitoh Exp $");
#include "gpio.h"
@@ -168,7 +168,8 @@
MVSOCGPP_WRITE(sc, MVSOCGPP_GPIOIC(i), 0);
sc->sc_pic =
- kmem_zalloc(sizeof(struct mvsocgpp_pic) * gpp_npins / 8, KM_SLEEP);
+ kmem_zalloc(sizeof(struct mvsocgpp_pic) * howmany(gpp_npins, 8),
+ KM_SLEEP);
for (i = 0, j = 0; i < gpp_npins; i += 8, j++) {
gpio_pic = &(sc->sc_pic + j)->gpio_pic;
gpio_pic->pic_ops = &gpio_pic_ops;
Home |
Main Index |
Thread Index |
Old Index