IRC logs for #openrisc Wednesday, 2014-01-08

--- Log opened Wed Jan 08 00:00:44 2014
-!- rah_ is now known as rah09:30
-!- Netsplit *.net <-> *.split quits: vxe14:40
-!- Netsplit over, joins: vxe14:43
stekernjonibo: you around?15:11
joniboyup, for once :)15:11
jonibowhat's up, stekern?15:12
stekernI'm wondering if the PTRS_PER_PGD in pgtable.h isn't wrong for openrisc?15:12
jonibowouldn't be surprised15:13
stekernI'm thinking that a patch to correct it would be something like this:
jonibowhat's it set to15:13
stekernit's set to (1<<(PAGE_SHIFT-2)) = 204815:14
stekernbut IMO it should be 25615:14
stekernthat formula happens to work for 4k pagetables and it looks like it was copied from cris (which I assume have 4k page tables)15:15
joniboopenrisc is one of the few oddballs that has 8k pagetables15:15
stekernyes, pages, sorry ;)15:15
joniboi know i've seen this before and I recall leaving it as it was for some reason15:16
jonibo...can't quite recall why, right now15:16
stekernprobably because it breaks the code in init.c, but I think that was wrong too15:16
stekernbut I'm not certain about that, that's where I'd like your input15:16
joniboPTRS_PER_PTE... doesn't that seem weird?15:18
joniboisn't a PTE a pointer?15:18
stekernI think the name is weird15:18
stekernbut that's what linux seem to call it ;)15:18
stekernisn't it "number of pointers in the last pagetable"15:19
joniboyeah, should be15:19
joniboso we have pgd, pmd, and pte15:20
jonibopte has 2048 pts15:20
jonibopmd has 2048 ptrs15:20
stekernand if I understand what that code in init.c does, it fills an area that should represent "the last pagetable"15:20
jonibomy head's not working today... how many do we need in the top level then15:21
jonibowhere in init.c?15:21
stekernthe thing I change in the pastie I pasted:
jonibook, right... PTRS_PER_PGD kind of assumes that all the page directories are full15:24
jonibowhich isn't the case15:24
jonibook, I think your patch is good15:25
jonibodoes it have implications elsewhere... is having a correct value of PTRS_PER_PGD useful somewhere else15:25
stekerngood, I'll smack a nice commit message on it and post it then ;)15:26
joniboplease do15:26
stekernfrom what I can see, no, it's only used in arch specific parts15:27
stekernso, the only disadvantage with having it wrong was that we spent a couple of cycles extra here:
joniboI think, when we init a new process, we copy the kernel's page table entries to the new process's page tables, as well... we probably copy too much there, too15:31
stekernswapper_pg_dir is set to be 8192 bytes in head.S, which is "wrong" too, but perhaps the _unhandled_stack that is defined after it needs to be page aligned15:31
joniboi don't even remember where unhandled_stack is used15:32
jonibo...i'd say it should definitely be page aligned15:32
joniboswapper_pg_dir size is wrong, yes, but it makes sense to allocate a page for the page directories15:32
jonibo...but I suppose the space could be used for something else if we fixed it up15:33
jonibothe alignment of unhandled_stack is easy enough to fix15:33
jonibofeel free to fix that up, if you want15:34
joniboi'd also be interested in having the swapper_pg_dir preinitialized... it's in .data after all, not .bss15:34
jonibonot sure if that's feasible15:34
stekernme neither, I can look around a bit what others do with it15:36
stekernbut, got to run, thanks for the input!15:36
jonibosure, my pleasure15:36
jonibogood to hear from you15:37
-!- olofk_ is now known as olofk16:25
--- Log closed Thu Jan 09 00:00:46 2014

Generated by 2.15.2 by Marius Gedminas - find it at!