diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2022-01-16 19:25:11 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2022-01-16 19:25:11 +0000 |
commit | 6f9838a6a5b80e0253bdc8fb194ad6f15eb655f5 (patch) | |
tree | b7b6770ef352dd40e389ef300f4e3495031d139e /sys/src/9/port/fault.c | |
parent | 6e64d30454f71ecda88dba1bd792e97509115d73 (diff) |
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.
Diffstat (limited to 'sys/src/9/port/fault.c')
-rw-r--r-- | sys/src/9/port/fault.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/src/9/port/fault.c b/sys/src/9/port/fault.c index 6e317a6e0..719b64f46 100644 --- a/sys/src/9/port/fault.c +++ b/sys/src/9/port/fault.c @@ -135,8 +135,7 @@ retry: } done: putpage(new); - if(s->flushme) - (*p)->txtflush = ~0; + settxtflush(*p, s->flushme); } static int @@ -202,8 +201,7 @@ fixfault(Segment *s, uintptr addr, int read) new = newpage(0, &s, addr); if(s == nil) return -1; - if(s->flushme) - new->txtflush = ~0; + settxtflush(new, s->flushme); *pg = new; copypage(old, *pg); putpage(old); @@ -242,8 +240,7 @@ mapphys(Segment *s, uintptr addr, int attr) pg.ref = 1; pg.va = addr; pg.pa = s->pseg->pa+(addr-s->base); - if(s->flushme) - pg.txtflush = ~0; + settxtflush(&pg, s->flushme); mmuphys = PPN(pg.pa) | PTEVALID; if((attr & SG_RONLY) == 0) |