On 2-Jun-13, at 12:43 PM, James Bottomley wrote:
On Sun, 2013-06-02 at 12:21 -0400, John David Anglin wrote:
The comment at the start of pacache.S states that the base and index
registers used for
fdc,fic, and pdc instructions should not use shadowed registers.
Although this is probably
unnecessary for tmpalias flushes, there is also no reason not to
comply. The same
index register (%r23) is used as in other routines.
Please don't do this, it's a misinterpretation of the comment.
I don't think so. See the discussion around cases 16 and 17 in
handle_interruption.
What the comment is trying to say is that we use unshadowed
registers to
pass information to the tmpalias handler in our tlb insertion
interruption. It's the do_alias macro in entry.S. The only actual
unshadowed registers it uses are %r23 and %r26. Apart from these
having
to have specific values, the rest of the routine is free to use any
other registers (either shadowed or unshadowed) as it sees fit.
If the comment is unclear, perhaps it needs fixing?
%r23 is only used by the do_alias macro for interruptions in the
'from' region.
See this hunk:
#ifdef CONFIG_64BIT
extrd,u,*= \va,41,1,%r0
#else
extrw,u,= \va,9,1,%r0
#endif
or,COND(tr) %r23,%r0,\pte
or %r26,%r0,\pte
The extract instruction tests whether the interruption was in the 'to'
tmpalias
region. If it is in the 'to' region, the instruction following using
%r23 is nullified.
So, %r23 can be used for the index register in these two functions
which don't
use the 'from' tmpalias region.
Dave
--
John David Anglin dave.anglin@xxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html