From: NIIBE Y. <gn...@ch...> - 2000-10-13 00:53:38
|
NIIBE Yutaka wrote: > I think that wired TLB entry is better. Some (or most) drivers don't > expect TLB fault would occur with I/O access functions. Reading test10-pre2, I've changed my mind. It reads: --- v2.4.0-test9/linux/arch/i386/mm/fault.c Wed May 24 18:38:26 2000 +++ linux/arch/i386/mm/fault.c Thu Oct 12 12:57:31 2000 @@ -130,6 +130,19 @@ __asm__("movl %%cr2,%0":"=r" (address)); tsk = current; + + /* + * We fault-in kernel-space virtual memory on-demand. The + * 'reference' page table is init_mm.pgd. + * + * NOTE! We MUST NOT take any locks for this case. We may + * be in an interrupt or a critical region, and should + * only copy the information from the master page table, + * nothing more. + */ + if (address >= TASK_SIZE) + goto vmalloc_fault; + ------------------------------- It explicitly says this fault may occur in a interrupt handler or in a critical region. I _was_ afraid of exactly on this issue (TLB falut in interrupt handler or a critical region), I now understand that we should implement the TLB fault handler with this condition. Please go ahead on your original TLB implementation. Please include ChangeLog entries when commit. I'll do the changes of optimizing PGD and removing set_pgdir for SuperH. -- |