Re: [PATCH] powerpc: Add POWER9 copy_page() loop
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2017-04-03 01:02:08
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2017-04-03 01:02:08
On Mon, 2017-04-03 at 10:54 +1000, Anton Blanchard wrote:
quoted
quoted
Good idea, I hadn't thought of embedding it all in a feature section.It may not work currently because you get those ftr_alt_97 relocation errors with the "else" parts because relative branches to other code need to be direct and I think reachable from both places.I thought about this a bit more. One potential issue will be profiling - perf annotate will match the samples against the unpatched code which could be very confusing.
Could we make all those functions a dynamic-linker style stub ? IE, they "find" the right target function and call a helper to patch the calling site to call directly into the right one on the first call. Cheers, Ben.