diff options
author | Steve French <sfrench@us.ibm.com> | 2008-03-14 15:29:18 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2008-03-14 15:29:18 -0400 |
commit | ebe8912be214662c8289977fb416c1f015df4a0b (patch) | |
tree | cb82c552c602e5ae1a4bd8c11bd171bf88a58c35 /arch/powerpc/kernel/head_8xx.S | |
parent | 50531444fac593c8c8e3ff2e41944d9507bb4665 (diff) | |
parent | dba92d3bc49c036056a48661d2d8fefe4c78375a (diff) |
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'arch/powerpc/kernel/head_8xx.S')
-rw-r--r-- | arch/powerpc/kernel/head_8xx.S | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index f7458396cd7c..3c9452d4308b 100644 --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S | |||
@@ -332,8 +332,18 @@ InstructionTLBMiss: | |||
332 | mfspr r11, SPRN_MD_TWC /* ....and get the pte address */ | 332 | mfspr r11, SPRN_MD_TWC /* ....and get the pte address */ |
333 | lwz r10, 0(r11) /* Get the pte */ | 333 | lwz r10, 0(r11) /* Get the pte */ |
334 | 334 | ||
335 | #ifdef CONFIG_SWAP | ||
336 | /* do not set the _PAGE_ACCESSED bit of a non-present page */ | ||
337 | andi. r11, r10, _PAGE_PRESENT | ||
338 | beq 4f | ||
339 | ori r10, r10, _PAGE_ACCESSED | ||
340 | mfspr r11, SPRN_MD_TWC /* get the pte address again */ | ||
341 | stw r10, 0(r11) | ||
342 | 4: | ||
343 | #else | ||
335 | ori r10, r10, _PAGE_ACCESSED | 344 | ori r10, r10, _PAGE_ACCESSED |
336 | stw r10, 0(r11) | 345 | stw r10, 0(r11) |
346 | #endif | ||
337 | 347 | ||
338 | /* The Linux PTE won't go exactly into the MMU TLB. | 348 | /* The Linux PTE won't go exactly into the MMU TLB. |
339 | * Software indicator bits 21, 22 and 28 must be clear. | 349 | * Software indicator bits 21, 22 and 28 must be clear. |
@@ -398,8 +408,17 @@ DataStoreTLBMiss: | |||
398 | DO_8xx_CPU6(0x3b80, r3) | 408 | DO_8xx_CPU6(0x3b80, r3) |
399 | mtspr SPRN_MD_TWC, r11 | 409 | mtspr SPRN_MD_TWC, r11 |
400 | 410 | ||
401 | mfspr r11, SPRN_MD_TWC /* get the pte address again */ | 411 | #ifdef CONFIG_SWAP |
412 | /* do not set the _PAGE_ACCESSED bit of a non-present page */ | ||
413 | andi. r11, r10, _PAGE_PRESENT | ||
414 | beq 4f | ||
402 | ori r10, r10, _PAGE_ACCESSED | 415 | ori r10, r10, _PAGE_ACCESSED |
416 | 4: | ||
417 | /* and update pte in table */ | ||
418 | #else | ||
419 | ori r10, r10, _PAGE_ACCESSED | ||
420 | #endif | ||
421 | mfspr r11, SPRN_MD_TWC /* get the pte address again */ | ||
403 | stw r10, 0(r11) | 422 | stw r10, 0(r11) |
404 | 423 | ||
405 | /* The Linux PTE won't go exactly into the MMU TLB. | 424 | /* The Linux PTE won't go exactly into the MMU TLB. |
@@ -507,7 +526,16 @@ DataTLBError: | |||
507 | 526 | ||
508 | /* Update 'changed', among others. | 527 | /* Update 'changed', among others. |
509 | */ | 528 | */ |
529 | #ifdef CONFIG_SWAP | ||
530 | ori r10, r10, _PAGE_DIRTY|_PAGE_HWWRITE | ||
531 | /* do not set the _PAGE_ACCESSED bit of a non-present page */ | ||
532 | andi. r11, r10, _PAGE_PRESENT | ||
533 | beq 4f | ||
534 | ori r10, r10, _PAGE_ACCESSED | ||
535 | 4: | ||
536 | #else | ||
510 | ori r10, r10, _PAGE_DIRTY|_PAGE_ACCESSED|_PAGE_HWWRITE | 537 | ori r10, r10, _PAGE_DIRTY|_PAGE_ACCESSED|_PAGE_HWWRITE |
538 | #endif | ||
511 | mfspr r11, SPRN_MD_TWC /* Get pte address again */ | 539 | mfspr r11, SPRN_MD_TWC /* Get pte address again */ |
512 | stw r10, 0(r11) /* and update pte in table */ | 540 | stw r10, 0(r11) /* and update pte in table */ |
513 | 541 | ||