[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] [patch] memory management initialisationcleanup
Hey Yashi,
Yasushi SHOJI wrote:
> At Fri, 30 Jul 2004 15:29:46 +1000,
> John Williams wrote:
>
>>Basically I've just lifted the mechanism used in arm/armnommu kernels.
>>They take a clean approach to the whole thing.
>
> yup, it is clean, but it has some unneeded code for mmu-less cpu, ie
> most of free_memmap(), {O,V}_PFN_{UP,DOWN}. but the patch looks good
> for the start.
Yeah.. it was a quick hack, so I just concentrated on getting it
working. It could certainly be trimmed down a little.
> IMHO, we need to provide __pa() __va() family macro for seemless
> integration for arch independent code. but we should keep
> arch/microblaze/* as clean as we can.
Not quite sure what you mean here - __pa() and __va() macros are already
defined for microblaze in asm-microblaze/page.h They just reduce to
identity functions of course since physical == virtual for nommu system.
> or, we can keep arch/microblaze/mm/* code in sync with arm so that we
> can play with other fun stuff ;p
>
> any plan in your mind, John?
Well, our research agenda here basically requires discontigmem, and from
a quick look armnommu seemed the only no-mmu target with clean support
(indeed /any/ support). So, I'm not committed to tracking arm as such,
but rather just providing the functionality.
This arch-specific mem mgmt stuff changes so rarely, so I don't think we
need to achieve patch-level compatibility with armnommu or any other
target. Common architectural roots should be enough to do what we need.
>>This patch reverts the link scripts (mbvanilla.ld and suzaku.ld) to page
>>align the __init_end, as discussed in my previous email. Yashi (and
>>anyone else who's interested), can you please give this a try and let me
>>know if it works for you?
>
>
> it worked on SUZAKU without discon mem. I haven't tested with discon
> mem setup, yet.
That's good news. I'd be v. surprised if discontigmem works yet, I've
certainly not tested it. I'll try to look at it this week.
> we need to modify a few line to tell the kernel how
> many banks we have on each platform.
I'm picturing a function that goes in {mbvanilla|suzaku}.c, which builds
a meminfo struct that describes that platforms memory architecture.
Then the common code in kernel/setup.c passes this off to bootmem_init()
and paging_init().
Anyway I'll apply the first patch now - it should be ready for cvs
updates shortly.
John
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/