mirror of
https://github.com/drasko/codezero.git
synced 2026-01-18 22:03:16 +01:00
Fixed utcb updating issue that was a significant burden.
Any thread that touches a utcb inside the kernel now properly checks whether the utcb is mapped on its owner, and whether the mapped physical address matches that of the current thread's tables. If not the tables are updated. This way, even though page tables become incoherent on utcb address change situations (such as fork() exit(), execve()) they get updated as they are referenced. Since mappings are added only conditionally, caches are flushed only when an update is necessary.
This commit is contained in:
@@ -112,7 +112,8 @@ void fault_ipc_to_pager(u32 faulty_pc, u32 fsr, u32 far)
|
||||
* on mapping the buffer. Remember that if a task maps its own user buffer to itself
|
||||
* this way, the kernel can access it, since it shares that task's page table.
|
||||
*/
|
||||
int pager_pagein_request(unsigned long addr, unsigned long size, unsigned int flags)
|
||||
int pager_pagein_request(unsigned long addr, unsigned long size,
|
||||
unsigned int flags)
|
||||
{
|
||||
u32 abort = 0;
|
||||
unsigned long npages = __pfn(align_up(size, PAGE_SIZE));
|
||||
|
||||
Reference in New Issue
Block a user