Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/riscv/riscv Fix thinko in tlb_record_asids memset s...



details:   https://anonhg.NetBSD.org/src/rev/0bac07eb546a
branches:  trunk
changeset: 990537:0bac07eb546a
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Oct 30 07:18:46 2021 +0000

description:
Fix thinko in tlb_record_asids memset size calculation.

diffstat:

 sys/arch/riscv/riscv/pmap_machdep.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r cf7171a18bae -r 0bac07eb546a sys/arch/riscv/riscv/pmap_machdep.c
--- a/sys/arch/riscv/riscv/pmap_machdep.c       Sat Oct 30 05:37:39 2021 +0000
+++ b/sys/arch/riscv/riscv/pmap_machdep.c       Sat Oct 30 07:18:46 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap_machdep.c,v 1.9 2021/10/07 07:13:35 skrll Exp $ */
+/* $NetBSD: pmap_machdep.c,v 1.10 2021/10/30 07:18:46 skrll Exp $ */
 
 /*
  * Copyright (c) 2014, 2019, 2021 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 
 #include <sys/cdefs.h>
 
-__RCSID("$NetBSD: pmap_machdep.c,v 1.9 2021/10/07 07:13:35 skrll Exp $");
+__RCSID("$NetBSD: pmap_machdep.c,v 1.10 2021/10/30 07:18:46 skrll Exp $");
 
 #include <sys/param.h>
 
@@ -214,7 +214,7 @@
 u_int
 tlb_record_asids(u_long *ptr, tlb_asid_t asid_max)
 {
-       memset(ptr, 0xff, PMAP_TLB_NUM_PIDS / (8 * sizeof(u_long)));
+       memset(ptr, 0xff, PMAP_TLB_NUM_PIDS / NBBY);
        ptr[0] = -2UL;
        return PMAP_TLB_NUM_PIDS - 1;
 }



Home | Main Index | Thread Index | Old Index