* Warning about add_wired_entry
@ 2009-12-07 15:02 Ralf Baechle
2009-12-07 15:41 ` pascal
0 siblings, 1 reply; 2+ messages in thread
From: Ralf Baechle @ 2009-12-07 15:02 UTC (permalink / raw)
To: linux-mips
The earlier posting wrt. add_wired_entry reminded my of this long standing
issue.
The kernel does not reserve any address space for use by add_wired_entry().
In other words there is the possibility that vmalloc, ioremap or other
kernel APIs will use the same address space resulting in a crash or worse.
Currently there are three users of add_wired_entry:
- Alchemy
- Cavium
- Jazz
The interface itself also is hostile as it directly exposes the MIPS TLB
registers to the C programmer so should die. And often wiring a TLB entry
is a bad idea. TLB entries are a scarce resource and wasting them unwisely
may impact performance. Especially on the lowest-end CPUs with just
16 TLB entries this can be significant but even on the high-end TLBs with
64 entries it's not always clear if wiring entries is a good idea. And
there are a few core types that don't even have the capability of wiring
entries.
Ralf
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Warning about add_wired_entry
2009-12-07 15:02 Warning about add_wired_entry Ralf Baechle
@ 2009-12-07 15:41 ` pascal
0 siblings, 0 replies; 2+ messages in thread
From: pascal @ 2009-12-07 15:41 UTC (permalink / raw)
To: linux-mips
Ralf Baechle wrote:
> The kernel does not reserve any address space for use by add_wired_entry().
> In other words there is the possibility that vmalloc, ioremap or other
> kernel APIs will use the same address space resulting in a crash or worse.
Thanks, I was not aware of that.
But what is the alternative ? I have an Alchemy 1550 board with
an ethernet chip at 0xD-1000-0000, and last time I tried, enabling
CONFIG_64BIT_PHYS_ADDR,
CONFIG_ARCH_PHYS_ADDR_T_64BIT and
CONFIG_PHYS_ADDR_T_64BIT
did not seem to allow access to the 36-bit I/O address space
through the platform_get_resource/request_mem_region machinery.
Is this supposed to work now ?
Pascal
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-12-07 15:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-07 15:02 Warning about add_wired_entry Ralf Baechle
2009-12-07 15:41 ` pascal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).