diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-04-01 00:22:26 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-04-01 00:22:26 -0400 |
commit | 399f486286f44d55c4fff0e9cc5d712f2b443489 (patch) | |
tree | 0c2820b3e04232eaa96f08c1057b87728fb3e7a4 /arch/powerpc/kernel/head_8xx.S | |
parent | 481419ec9fbdf3f4ec5389c7e91a81b4a7ebee8d (diff) | |
parent | a9edadbf790d72adf6ebed476cb5caf7743e7e4a (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
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 | ||