meaning of vmalloc shortcut comment in fault.c

Bjorn Wesen (bjorn@sparta.lu.se)
Tue, 5 Jun 2001 14:56:06 +0200 (MET DST)


Can someone elaborate on why it's bad to refer to tsk directly below (this
is a 2.4.5 change in x86) and why it's needed on x86 and not other archs..

What should I do for an arch that does not have a "cr3" machine register
to check with ?

/BW

vmalloc_fault:
{
/*
* Synchronize this task's top level page-table
* with the 'reference' page table.
*
* Do _not_ use "tsk" here. We might be inside
* an interrupt in the middle of a task switch..
*/
int offset = __pgd_offset(address);
pgd_t *pgd, *pgd_k;
pmd_t *pmd, *pmd_k;
pte_t *pte_k;

asm("movl %%cr3,%0":"=r" (pgd));
pgd = offset + (pgd_t *)__va(pgd);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/