question about x86 paging_init

ganesh@cse.iitb.ernet.in
Mon, 28 Jul 1997 19:38:23 +0530 (IST)


hi,
this is a snippet from arch/i386/mm/init.c:paging_init (2.1.47)

if (x86_capability & X86_FEATURE_PSE) {
unsigned long __pe;

set_in_cr4(X86_CR4_PSE);
wp_works_ok = 1;
__pe = _PAGE_TABLE + _PAGE_4M + __pa(address);
/* Make it "global" too if supported */
if (x86_capability & X86_FEATURE_PGE) {
set_in_cr4(X86_CR4_PGE);
__pe += _PAGE_GLOBAL;
}
pgd_val(pg_dir[768]) = _PAGE_TABLE + _PAGE_4M + __pa(address);

Shouldn't that be pgd_val(pg_dir[768]) = __pe ?
Otherwise the _PAGE_GLOBAL is never set. Or was it disabled because it was
buggy ?
Also those +'s ought to be |'s.

-- ganesh