early_ioremap for MIPS
Hi list,
Is there any need for early_ioremap on MIPS ? Seems like only x86_64 is implementing it for now.
Thank you for your answer.
Signature · 2 lines
Cordialement, Florian Fainelli ------------------------------
Quoted 2 lines · Florian Fainelli
Is there any need for
early_ioremapon MIPS ? Seems like onlyx86_64is implementing it for now.
There is hardly any need as generally KSEG0/KSEG1 and XPHYS mappings
fulfil the need and are always available, even before paging has been initialised. Some 32-bit systems with devices outside low 512MB of physical address space could potentially benefit though. I recall some Alchemy systems may fall into this category.
Maciej
Thomas Bogendoerfer
maintainerQuoted 7 lines · Maciej W. Rozycki
Quoted 2 lines · Florian Fainelli
Is there any need for
early_ioremapon MIPS ? Seems like onlyx86_64is implementing it for now.physical address space could potentially benefit though. I recall some Alchemy systems may fall into this category.
Jazz has the same problem. Right now it's solved by using wired tlb entries. Which is sort of an early_ioremap.
Thomas.
Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessary a good idea. [ RFC1925, 2.3 ]
Quoted 2 lines · Thomas Bogendoerfer
Jazz has the same problem. Right now it's solved by using wired tlb entries. Which is sort of an
early_ioremap.
One with a totally awkward API requiring the user having to know about the underlying TLB organization. A better implementation wouldn't be hard to do, for anything that's outside of KSEG1's address range grab a new TLB entry if needed and wire an entry into it. Use the same API as good old ioremap() and call the result early_ioremap().
Ralf
Quoted 8 lines · Ralf Baechle
Quoted 2 lines
Jazz has the same problem. Right now it's solved by using wired tlb entries. Which is sort of an
early_ioremap.One with a totally awkward API requiring the user having to know about the underlying TLB organization. A better implementation wouldn't be hard to do, for anything that's outside of KSEG1's address range grab a new TLB entry if needed and wire an entry into it. Use the same API as good old
ioremap()and call the resultearly_ioremap().
And presumably by the time paging has been set up for real, all the early
allocations could get automatically graduated to ordinary ones, freeing up all the wired TLB entries set up so far and keeping the values of cookies obtained intact.
Maciej
In message: <[email protected]>
"Maciej W. Rozycki" <[email protected]> writes:
: On Thu, 7 Feb 2008, Florian Fainelli wrote:
:
: > Is there any need for early_ioremap on MIPS ? Seems like only x86_64 is : > implementing it for now.
:
: There is hardly any need as generally KSEG0/KSEG1 and XPHYS mappings : fulfil the need and are always available, even before paging has been : initialised. Some 32-bit systems with devices outside low 512MB of : physical address space could potentially benefit though. I recall some : Alchemy systems may fall into this category.
The Acer Pica machines, as well as the Deskstation Tynes, had devices mapped outside of this range... Of course Ralf will be able to say more, if he chooses to jump into the way-back machine...
Warner
Quoted 9 lines · M. Warner Losh
: There is hardly any need as generally KSEG0/KSEG1 and XPHYS mappings : fulfil the need and are always available, even before paging has been : initialised. Some 32-bit systems with devices outside low 512MB of : physical address space could potentially benefit though. I recall some : Alchemy systems may fall into this category.
The Acer Pica machines, as well as the Deskstation Tynes, had devices mapped outside of this range... Of course Ralf will be able to say more, if he chooses to jump into the way-back machine...
Please note that it is not the sole existence of some hardware in the
physical address range inaccessible through the mapped space that matters here. It is the need to use such a piece of hardware before paging has been initialised that is of concern for early ioremap() and for most devices it means there is no issue.
Maciej
Quoted 3 lines · M. Warner Losh
The Acer Pica machines, as well as the Deskstation Tynes, had devices mapped outside of this range... Of course Ralf will be able to say more, if he chooses to jump into the way-back machine...
Yes, I recall. Unfortunately I don't have my PICA anymore; it's been a hell of a machine by the standards of its days. Anyway, designs which just like the PICA need some ioremap - and preferably available early during bootup - have been developed after the PICA and are still being developped.
Ralf