Re: [RFC] bt_ioremap question / cyclone-timer_A1 patch

From: john stultz (johnstul@us.ibm.com)
Date: Tue Jul 09 2002 - 21:18:59 EST


On Tue, 2002-07-09 at 04:03, Mikael Pettersson wrote:
> On 08 Jul 2002 19:36:23 -0700, john stultz wrote:
> >Mainly I'm concerned about my usage of bt_ioremap. Early in the boot
> >processes, I need to map in a couple of chipset registers and poke
> >values into them.
>
> How early? If this is just to get gettimeofday() working, can't it
> wait until the regular initcalls are done?

I guess I might be able to pull it out and do the initialization
somewhere else, but really time_init() seems like the best spot.

> > However one of the registers needs to be kept mapped
> >for the life of the system (look for "cyclone_timer" below). I couldn't
> >find any documentation on whether memory mapped with bt_ioremap can be
> >held across mem_init(). It seems to "just work" but I wanted to find out
> >if I really should be re-mapping the register w/ ioremap once it becomes
> >available.
>
> If you look in include/asm-i386/fixmap.h you'll see that the BT ioremap
> pages are temporary, and they do disappear once mem_init() [or whatever]
> is done [pgtable.h sets VMALLOC_END to just below FIXADDR_START, which
> protects the permanent fixmaps but intensionally not the temporary ones].
> If it seemed to work for you then that's just luck, or perhaps it does
> work in highmem kernels?
>
> For things that must be mapped very early and continue to be mapped as
> long as the kernel is up, you need a permanent fixmap. fixmap.h has a
> number of permanent fixmaps defined #ifdef CONFIG_* and you can easily
> add your own there, under #ifdef CONFIG_X86_IBMEXA.

Thank you for the pointer. I gave it a whirl (see attached) and it seems
to work fine! If anyone notices that I'm still just horribly lucky and
I've done everything wrong, please let me know. :)

Thanks again for the feedback and suggestions!
-john

ps: Again, if anyone feels so inclined to try this patch, do note that
it depends on my tsc-disable patch to apply cleanly. Send me a note and
I'll fwd you my latest version.



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jul 15 2002 - 22:00:16 EST