Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Make sure a USB small memory fragment is a multi...



details:   https://anonhg.NetBSD.org/src/rev/480d4d60abc3
branches:  trunk
changeset: 784067:480d4d60abc3
user:      matt <matt%NetBSD.org@localhost>
date:      Thu Jan 17 06:24:44 2013 +0000

description:
Make sure a USB small memory fragment is a multiple of the cache line size.
(since CACHE_LINE_SIZE defaults to 64, for most instances this won't result
in any code changing).

diffstat:

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

diffs (27 lines):

diff -r d8a789ab6efe -r 480d4d60abc3 sys/dev/usb/usb_mem.c
--- a/sys/dev/usb/usb_mem.c     Thu Jan 17 01:32:02 2013 +0000
+++ b/sys/dev/usb/usb_mem.c     Thu Jan 17 06:24:44 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usb_mem.c,v 1.55 2013/01/07 15:07:41 prlw1 Exp $       */
+/*     $NetBSD: usb_mem.c,v 1.56 2013/01/17 06:24:44 matt Exp $        */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usb_mem.c,v 1.55 2013/01/07 15:07:41 prlw1 Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_mem.c,v 1.56 2013/01/17 06:24:44 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -70,7 +70,7 @@
 #define DPRINTFN(n,x)
 #endif
 
-#define USB_MEM_SMALL 64
+#define USB_MEM_SMALL roundup(64, CACHE_LINE_SIZE)
 #define USB_MEM_CHUNKS 64
 #define USB_MEM_BLOCK (USB_MEM_SMALL * USB_MEM_CHUNKS)
 



Home | Main Index | Thread Index | Old Index