From 46c82f8bb359d2e133032d3eb13a86a8a5b77856 Mon Sep 17 00:00:00 2001 From: matt Date: Thu, 17 Jan 2013 06:24:44 +0000 Subject: [PATCH] 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). --- sys/dev/usb/usb_mem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/usb/usb_mem.c b/sys/dev/usb/usb_mem.c index 696c162ff8bd..42beafabbf7d 100644 --- a/sys/dev/usb/usb_mem.c +++ b/sys/dev/usb/usb_mem.c @@ -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 -__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 #include @@ -70,7 +70,7 @@ extern int usbdebug; #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)