All of lore.kernel.org
 help / color / mirror / Atom feed
* about PMD_SHIFT value (22 or 18?)
@ 2014-05-01 11:44 Chan Kim
  2014-05-02  5:34 ` Chan Kim
  0 siblings, 1 reply; 2+ messages in thread
From: Chan Kim @ 2014-05-01 11:44 UTC (permalink / raw)
  To: kernelnewbies


Hi,
Hope someone could answer to this question..
As some of you know, SRMMU(Sparc Reference MMU in Sparc V8) uses top 8, 6, 6 bits of the linear address as PGT, PMD, PTE table index.
so PGDIR_SHIFT is 24 and PMD_SHIFT is 18, and PTE_SHIFT is 12. (page size 4096) These shift values are for getting the index to into each table.

But in http://lxr.free-electrons.com/source/arch/sparc/include/asm/pgtable_32.h#L35
#define PMD_SHIFT 22.
and in http://lxr.free-electrons.com/source/arch/sparc/include/asm/page_32.h#L84
typedef struct { unsigned long pmdv[16]; } pmd_t;

Why is it like this? (those sources are for sparc)
I'm having some confusion from this.. 
Could someone please explain it or give me a good reference about this?
Best regards,

Chan

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

* about PMD_SHIFT value (22 or 18?)
  2014-05-01 11:44 about PMD_SHIFT value (22 or 18?) Chan Kim
@ 2014-05-02  5:34 ` Chan Kim
  0 siblings, 0 replies; 2+ messages in thread
From: Chan Kim @ 2014-05-02  5:34 UTC (permalink / raw)
  To: kernelnewbies


oh, I'm answerting to my own question again..I've beeing following the initial sparc page table setup.
Looks like the PMD table which has 64 entries are managed by 4 blocks of 16 entries and the allocation of PTE table is by each 16 entry-block at one time. This is populating only 1/4 of PMD table and connecting 16 64-entry PTE tables each time.
regards,
Chan



?? ?? : "Chan Kim" <ckim@etri.re.kr>
?? ?? : 2014-05-01 20:49:25 ( +09:00 )
?? ?? : kernelnewbies at kernelnewbies.org <kernelnewbies@kernelnewbies.org>
?? : 
?? : about PMD_SHIFT value (22 or 18?)


Hi,
Hope someone could answer to this question..
As some of you know, SRMMU(Sparc Reference MMU in Sparc V8) uses top 8, 6, 6 bits of the linear address as PGT, PMD, PTE table index.
so PGDIR_SHIFT is 24 and PMD_SHIFT is 18, and PTE_SHIFT is 12. (page size 4096) These shift values are for getting the index to into each table.

But in http://lxr.free-electrons.com/source/arch/sparc/include/asm/pgtable_32.h#L35
#define PMD_SHIFT 22.
and in http://lxr.free-electrons.com/source/arch/sparc/include/asm/page_32.h#L84
typedef struct { unsigned long pmdv[16]; } pmd_t;

Why is it like this? (those sources are for sparc)
I'm having some confusion from this.. 
Could someone please explain it or give me a good reference about this?
Best regards,

Chan
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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

end of thread, other threads:[~2014-05-02  5:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-01 11:44 about PMD_SHIFT value (22 or 18?) Chan Kim
2014-05-02  5:34 ` Chan Kim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.