]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
powerpc/32: Convert patch_instruction() to patch_uint()
authorBenjamin Gray <bgray@linux.ibm.com>
Wed, 15 May 2024 02:44:44 +0000 (12:44 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 21 Aug 2024 10:15:13 +0000 (20:15 +1000)
These changes are for patch_instruction() uses on data. Unlike ppc64
these should not be incorrect as-is, but using the patch_uint() alias
better reflects what kind of data being patched and allows for
benchmarking the effect of different patch_* implementations (e.g.,
skipping instruction flushing when patching data).

Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
Tested-by: Hari Bathini <hbathini@linux.ibm.com>
Acked-by: Naveen N Rao <naveen@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240515024445.236364-5-bgray@linux.ibm.com
arch/powerpc/kernel/static_call.c
arch/powerpc/platforms/powermac/smp.c

index 863a7aa24650af4fd98dae5cbb0b809b868e15c0..1502b7e439cafb0da6e13da0c50a60489df76622 100644 (file)
@@ -17,7 +17,7 @@ void arch_static_call_transform(void *site, void *tramp, void *func, bool tail)
        mutex_lock(&text_mutex);
 
        if (func && !is_short) {
-               err = patch_instruction(tramp + PPC_SCT_DATA, ppc_inst(target));
+               err = patch_ulong(tramp + PPC_SCT_DATA, target);
                if (err)
                        goto out;
        }
index 15644be31990d93f9b103ed6665283592abdea9b..d21b681f52fb0ea634a5f4a562a0516b58737a57 100644 (file)
@@ -827,7 +827,7 @@ static int smp_core99_kick_cpu(int nr)
        mdelay(1);
 
        /* Restore our exception vector */
-       patch_instruction(vector, ppc_inst(save_vector));
+       patch_uint(vector, save_vector);
 
        local_irq_restore(flags);
        if (ppc_md.progress) ppc_md.progress("smp_core99_kick_cpu done", 0x347);