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:
Bahadir Balban
2009-10-09 16:45:10 +03:00
parent a8a4b5ce6c
commit d39ffc6acd
6 changed files with 83 additions and 12 deletions

View File

@@ -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));