summaryrefslogtreecommitdiff
path: root/sys/src/libaml/aml.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2018-11-04 16:00:32 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2018-11-04 16:00:32 +0100
commit89c659d80b91170a20157119975b19492c33a1dd (patch)
treeedc823e2c47e5b4a98cfd658bc0ac97b0009dee5 /sys/src/libaml/aml.c
parentdd82b657c0a92a5e8f2d3df6c7ca3ae83403ce91 (diff)
bcm: fix mysterious core clock resets under SMP (thanks richard miller)
reference: https://github.com/raspberrypi/firmware/issues/542 procsave(Proc* p) { uvlong t; cycles(&t); p->pcycles += t; // TODO: save and restore VFPv3 FP state once 5[cal] know the new registers. fpuprocsave(p); /* * Prevent the following scenario: * pX sleeps on cpuA, leaving its page tables in mmul1 * pX wakes up on cpuB, and exits, freeing its page tables * pY on cpuB allocates a freed page table page and overwrites with data * cpuA takes an interrupt, and is now running with bad page tables * In theory this shouldn't hurt because only user address space tables * are affected, and mmuswitch will clear mmul1 before a user process is * dispatched. But empirically it correlates with weird problems, eg * resetting of the core clock at 0x4000001C which confuses local timers. */ if(conf.nmach > 1) mmuswitch(nil); }
Diffstat (limited to 'sys/src/libaml/aml.c')
0 files changed, 0 insertions, 0 deletions