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/teg2/mmu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/src/9/teg2') diff --git a/sys/src/9/teg2/mmu.c b/sys/src/9/teg2/mmu.c index 6005e5065..bdafac19d 100644 --- a/sys/src/9/teg2/mmu.c +++ b/sys/src/9/teg2/mmu.c @@ -574,10 +574,11 @@ putmmu(uintptr va, uintptr pa, Page* page) */ l1cache->wb(); - if(page->txtflush & (1<machno)){ + if(needtxtflush(page)){ cacheiinv(); - page->txtflush &= ~(1<machno); + donetxtflush(page); } + if (Debug) iprint("putmmu %#p %#p %#p\n", va, pa, PPN(pa)|x); } -- cgit v1.2.3