diff options
author | Paul Mackerras <paulus@samba.org> | 2008-03-13 00:26:33 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-03-13 00:26:33 -0400 |
commit | bed04a4413376265746053be2a9cfbfc80c98ec9 (patch) | |
tree | 8f582294a655f70496cd08aedeb86de31dbad140 /arch/ppc | |
parent | e37c772e36a7943b2e0bd8f48312e78474c0df15 (diff) | |
parent | c463be3520065ef8c05e3cbdf946c69604e91ceb (diff) |
Merge branch 'linux-2.6'
Diffstat (limited to 'arch/ppc')
-rw-r--r-- | arch/ppc/kernel/head_8xx.S | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/arch/ppc/kernel/head_8xx.S b/arch/ppc/kernel/head_8xx.S index eb8d26f8736..321bda2de2c 100644 --- a/arch/ppc/kernel/head_8xx.S +++ b/arch/ppc/kernel/head_8xx.S | |||
@@ -329,8 +329,18 @@ InstructionTLBMiss: | |||
329 | mfspr r11, SPRN_MD_TWC /* ....and get the pte address */ | 329 | mfspr r11, SPRN_MD_TWC /* ....and get the pte address */ |
330 | lwz r10, 0(r11) /* Get the pte */ | 330 | lwz r10, 0(r11) /* Get the pte */ |
331 | 331 | ||
332 | #ifdef CONFIG_SWAP | ||
333 | /* do not set the _PAGE_ACCESSED bit of a non-present page */ | ||
334 | andi. r11, r10, _PAGE_PRESENT | ||
335 | beq 4f | ||
336 | ori r10, r10, _PAGE_ACCESSED | ||
337 | mfspr r11, SPRN_MD_TWC /* get the pte address again */ | ||
338 | stw r10, 0(r11) | ||
339 | 4: | ||
340 | #else | ||
332 | ori r10, r10, _PAGE_ACCESSED | 341 | ori r10, r10, _PAGE_ACCESSED |
333 | stw r10, 0(r11) | 342 | stw r10, 0(r11) |
343 | #endif | ||
334 | 344 | ||
335 | /* The Linux PTE won't go exactly into the MMU TLB. | 345 | /* The Linux PTE won't go exactly into the MMU TLB. |
336 | * Software indicator bits 21, 22 and 28 must be clear. | 346 | * Software indicator bits 21, 22 and 28 must be clear. |
@@ -395,8 +405,17 @@ DataStoreTLBMiss: | |||
395 | DO_8xx_CPU6(0x3b80, r3) | 405 | DO_8xx_CPU6(0x3b80, r3) |
396 | mtspr SPRN_MD_TWC, r11 | 406 | mtspr SPRN_MD_TWC, r11 |
397 | 407 | ||
398 | mfspr r11, SPRN_MD_TWC /* get the pte address again */ | 408 | #ifdef CONFIG_SWAP |
409 | /* do not set the _PAGE_ACCESSED bit of a non-present page */ | ||
410 | andi. r11, r10, _PAGE_PRESENT | ||
411 | beq 4f | ||
412 | ori r10, r10, _PAGE_ACCESSED | ||
413 | 4: | ||
414 | /* and update pte in table */ | ||
415 | #else | ||
399 | ori r10, r10, _PAGE_ACCESSED | 416 | ori r10, r10, _PAGE_ACCESSED |
417 | #endif | ||
418 | mfspr r11, SPRN_MD_TWC /* get the pte address again */ | ||
400 | stw r10, 0(r11) | 419 | stw r10, 0(r11) |
401 | 420 | ||
402 | /* The Linux PTE won't go exactly into the MMU TLB. | 421 | /* The Linux PTE won't go exactly into the MMU TLB. |
@@ -575,7 +594,16 @@ DataTLBError: | |||
575 | 594 | ||
576 | /* Update 'changed', among others. | 595 | /* Update 'changed', among others. |
577 | */ | 596 | */ |
597 | #ifdef CONFIG_SWAP | ||
598 | ori r10, r10, _PAGE_DIRTY|_PAGE_HWWRITE | ||
599 | /* do not set the _PAGE_ACCESSED bit of a non-present page */ | ||
600 | andi. r11, r10, _PAGE_PRESENT | ||
601 | beq 4f | ||
602 | ori r10, r10, _PAGE_ACCESSED | ||
603 | 4: | ||
604 | #else | ||
578 | ori r10, r10, _PAGE_DIRTY|_PAGE_ACCESSED|_PAGE_HWWRITE | 605 | ori r10, r10, _PAGE_DIRTY|_PAGE_ACCESSED|_PAGE_HWWRITE |
606 | #endif | ||
579 | mfspr r11, SPRN_MD_TWC /* Get pte address again */ | 607 | mfspr r11, SPRN_MD_TWC /* Get pte address again */ |
580 | stw r10, 0(r11) /* and update pte in table */ | 608 | stw r10, 0(r11) /* and update pte in table */ |
581 | 609 | ||