From 6f9838a6a5b80e0253bdc8fb194ad6f15eb655f5 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sun, 16 Jan 2022 19:25:11 +0000 Subject: kernel: make Page.txtflush into an array To avoid a MAXMACH limit of 32 and make txtflush into an array for the bitmap. Provide portable macros for testing and clearing the bits: needtxtflush(), donetxtflush(). On pc/pc64, define inittxtflush()/settxtflush() as no-op macros, avoiding the storage overhead of the txtflush array alltogether. --- sys/src/9/zynq/mmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/src/9/zynq') diff --git a/sys/src/9/zynq/mmu.c b/sys/src/9/zynq/mmu.c index 9b4c67d4c..ab3c7c871 100644 --- a/sys/src/9/zynq/mmu.c +++ b/sys/src/9/zynq/mmu.c @@ -176,14 +176,14 @@ putmmu(uintptr va, uintptr pa, Page *pg) old = *e; *e = pa | L2VALID | L2USER | L2LOCAL; tmpunmap(l2); - splx(s); if((old & L2VALID) != 0) flushpg((void *) va); - if(pg->txtflush & (1<machno)){ + if(needtxtflush(pg)){ cleandse((void *) va, (void *) (va + BY2PG)); invalise((void *) va, (void *) (va + BY2PG)); - pg->txtflush &= ~(1<machno); + donetxtflush(pg); } + splx(s); } void -- cgit v1.2.3