linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* ask two question about e500 implementation in arch/ppc/kernel/head_fsl_booke.S
@ 2007-07-11 10:21 kang shuo
  2007-07-11 13:41 ` Kumar Gala
  0 siblings, 1 reply; 2+ messages in thread
From: kang shuo @ 2007-07-11 10:21 UTC (permalink / raw)
  To: galak; +Cc: linuxppc-embedded

hi,galak:
              I have two question about e500 part of linux kernel. I
can not get reponse from maillist . So I sent the questions to you
directly.

1. in  arch/ppc/kernel/head_fsl_booke.S
 603         FIND_PTE
 604         andi.   r13, r11, _PAGE_PRESENT /* Is the page present? */
 605         beq     2f                      /* Bail if not present */

That seems _PAGE_PRESENT should be set before enter DataTLBError
exception handler(Or the following finish_tlb_load function will not
execute), but  in __ioremap function of e500 implementation,
_PAGE_PRESENT bit is not set for an io address map.Why?

2. still in   arch/ppc/kernel/head_fsl_booke.S
 791 #ifdef CONFIG_E200
 792         /* Round robin TLB1 entries assignment */
 793         mfspr   r12, SPRN_MAS0
 794
 795         /* Extract TLB1CFG(NENTRY) */
 796         mfspr   r11, SPRN_TLB1CFG
 797         andi.   r11, r11, 0xfff
 798
 799         /* Extract MAS0(NV) */
 800         andi.   r13, r12, 0xfff
 801         addi    r13, r13, 1
 802         cmpw    0, r13, r11
 803         addi    r12, r12, 1
 804
 805         /* check if we need to wrap */
 806         blt     7f
 807
 808         /* wrap back to first free tlbcam entry */
 809         lis     r13, tlbcam_index@ha
 810         lwz     r13, tlbcam_index@l(r13)
 811         rlwimi  r12, r13, 0, 20, 31
 812 7:
 813         mtspr   SPRN_MAS0,r12
 814 #endif /* CONFIG_E200 */
 815
 816         tlbwe

That seems original tlb entry will be overwritten in the above code
for e500? Why , I thought a free tlb entry should be select and fill
for e500. Just like CONFIG_E200.


-- Thanks
-- Michael.Kang

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ask two question about e500 implementation in arch/ppc/kernel/head_fsl_booke.S
  2007-07-11 10:21 ask two question about e500 implementation in arch/ppc/kernel/head_fsl_booke.S kang shuo
@ 2007-07-11 13:41 ` Kumar Gala
  0 siblings, 0 replies; 2+ messages in thread
From: Kumar Gala @ 2007-07-11 13:41 UTC (permalink / raw)
  To: kang shuo; +Cc: linuxppc-embedded


On Jul 11, 2007, at 5:21 AM, kang shuo wrote:

> hi,galak:
>              I have two question about e500 part of linux kernel. I
> can not get reponse from maillist . So I sent the questions to you
> directly.
>
> 1. in  arch/ppc/kernel/head_fsl_booke.S
> 603         FIND_PTE
> 604         andi.   r13, r11, _PAGE_PRESENT /* Is the page present? */
> 605         beq     2f                      /* Bail if not present */
>
> That seems _PAGE_PRESENT should be set before enter DataTLBError
> exception handler(Or the following finish_tlb_load function will not
> execute), but  in __ioremap function of e500 implementation,
> _PAGE_PRESENT bit is not set for an io address map.Why?

_PAGE_PRESENT is sent when we use the page not when we map it.  So on  
the first fault we set _PAGE_PRESENT.

> 2. still in   arch/ppc/kernel/head_fsl_booke.S
> 791 #ifdef CONFIG_E200
> 792         /* Round robin TLB1 entries assignment */
> 793         mfspr   r12, SPRN_MAS0
> 794
> 795         /* Extract TLB1CFG(NENTRY) */
> 796         mfspr   r11, SPRN_TLB1CFG
> 797         andi.   r11, r11, 0xfff
> 798
> 799         /* Extract MAS0(NV) */
> 800         andi.   r13, r12, 0xfff
> 801         addi    r13, r13, 1
> 802         cmpw    0, r13, r11
> 803         addi    r12, r12, 1
> 804
> 805         /* check if we need to wrap */
> 806         blt     7f
> 807
> 808         /* wrap back to first free tlbcam entry */
> 809         lis     r13, tlbcam_index@ha
> 810         lwz     r13, tlbcam_index@l(r13)
> 811         rlwimi  r12, r13, 0, 20, 31
> 812 7:
> 813         mtspr   SPRN_MAS0,r12
> 814 #endif /* CONFIG_E200 */
> 815
> 816         tlbwe
>
> That seems original tlb entry will be overwritten in the above code
> for e500? Why , I thought a free tlb entry should be select and fill
> for e500. Just like CONFIG_E200.

Huh? The above code is for E200 only.  Maybe the issue you're missing  
is that on E500 the NV bit is updated by HW.

- k

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-07-11 13:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-11 10:21 ask two question about e500 implementation in arch/ppc/kernel/head_fsl_booke.S kang shuo
2007-07-11 13:41 ` Kumar Gala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).