Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Fix previous by using roundup (and not howmany).
details: https://anonhg.NetBSD.org/src/rev/9790782434b3
branches: trunk
changeset: 371917:9790782434b3
user: skrll <skrll%NetBSD.org@localhost>
date: Mon Oct 17 07:03:19 2022 +0000
description:
Fix previous by using roundup (and not howmany).
diffstat:
sys/dev/pci/virtio.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 45f6587a8f8b -r 9790782434b3 sys/dev/pci/virtio.c
--- a/sys/dev/pci/virtio.c Mon Oct 17 03:05:32 2022 +0000
+++ b/sys/dev/pci/virtio.c Mon Oct 17 07:03:19 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: virtio.c,v 1.60 2022/10/15 19:55:37 riastradh Exp $ */
+/* $NetBSD: virtio.c,v 1.61 2022/10/17 07:03:19 skrll Exp $ */
/*
* Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.60 2022/10/15 19:55:37 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.61 2022/10/17 07:03:19 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -760,7 +760,7 @@
{
int vq_size, allocsize1, allocsize2, allocsize3, allocsize = 0;
int rsegs, r, hdrlen;
-#define VIRTQUEUE_ALIGN(n) howmany(n, VIRTIO_PAGE_SIZE)
+#define VIRTQUEUE_ALIGN(n) roundup(n, VIRTIO_PAGE_SIZE)
/* Make sure callers allocate vqs in order */
KASSERT(sc->sc_nvqs == index);
Home |
Main Index |
Thread Index |
Old Index