Thread (11 messages) flat view 11 messages, 6 authors, 2011-12-19

Re: [PATCH] powerpc: POWER7 optimised copy_to_user/copy_from_user using VMX

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2011-12-08 19:40:28

On Thu, 2011-12-08 at 17:04 +1100, Anton Blanchard wrote:
Hi,
quoted
I hate the idea of having a POWER7 FTR bit.  Every loon will (and has
tried to in the past) attach every POWER7 related thing to it, rather
than thinking about what the feature really is for.  

What about other processors which could also benefit from this copy
loop?  Turning on CPU_FTR_POWER7 for them is gonna look a bit silly.
As we discussed online, we could call it CPU_FTR_VMX_COPY and start
thinking about a better way to solve the CPU feature bit mess.

One idea would be to have a structure of function pointers for each
CPU that gets runtime patched into the right places, similar to how we
do some of the MMU fixups.
Or the vdso... we have a table of some sort which is used to patch
symbols.

But it's keyed off cpu features.

I'm reluctant to adding another table of PVRs, it needs to deal with the
pseudo-PVRs from pHyp, and things will get out of sync.

CPU features are the way to go, tho we can use them to key off a branch
patching mechanism if we want to. It's easy to add new bitmasks for
in-kernel features at least (it's the user features which are more nasty
but they are a separate thing).

So if we have to we can split cpu feature into another separate mask
like I did for mmu features with the same macros etc... For example, the
debug features could be moved out, or whatever.

Cheers,
Ben.
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help