feature-fixups.c (446279168e030fd0ed68e2bba336bef8bb3da352) feature-fixups.c (3e7318584dfec11992f3ac45658c4bc1210b3778)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
4 *
5 * Modifications for ppc64:
6 * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
7 *
8 * Copyright 2008 Michael Ellerman, IBM Corporation.

--- 536 unchanged lines hidden (view full) ---

545
546 start = PTRRELOC(&__start___barrier_nospec_fixup);
547 end = PTRRELOC(&__stop___barrier_nospec_fixup);
548
549 do_barrier_nospec_fixups_range(enable, start, end);
550}
551#endif /* CONFIG_PPC_BARRIER_NOSPEC */
552
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
4 *
5 * Modifications for ppc64:
6 * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
7 *
8 * Copyright 2008 Michael Ellerman, IBM Corporation.

--- 536 unchanged lines hidden (view full) ---

545
546 start = PTRRELOC(&__start___barrier_nospec_fixup);
547 end = PTRRELOC(&__stop___barrier_nospec_fixup);
548
549 do_barrier_nospec_fixups_range(enable, start, end);
550}
551#endif /* CONFIG_PPC_BARRIER_NOSPEC */
552
553#ifdef CONFIG_PPC_FSL_BOOK3E
553#ifdef CONFIG_PPC_E500
554void do_barrier_nospec_fixups_range(bool enable, void *fixup_start, void *fixup_end)
555{
556 unsigned int instr[2], *dest;
557 long *start, *end;
558 int i;
559
560 start = fixup_start;
561 end = fixup_end;

--- 35 unchanged lines hidden (view full) ---

597 long *start, *end;
598
599 start = PTRRELOC(&__start__btb_flush_fixup);
600 end = PTRRELOC(&__stop__btb_flush_fixup);
601
602 for (; start < end; start += 2)
603 patch_btb_flush_section(start);
604}
554void do_barrier_nospec_fixups_range(bool enable, void *fixup_start, void *fixup_end)
555{
556 unsigned int instr[2], *dest;
557 long *start, *end;
558 int i;
559
560 start = fixup_start;
561 end = fixup_end;

--- 35 unchanged lines hidden (view full) ---

597 long *start, *end;
598
599 start = PTRRELOC(&__start__btb_flush_fixup);
600 end = PTRRELOC(&__stop__btb_flush_fixup);
601
602 for (; start < end; start += 2)
603 patch_btb_flush_section(start);
604}
605#endif /* CONFIG_PPC_FSL_BOOK3E */
605#endif /* CONFIG_PPC_E500 */
606
607void do_lwsync_fixups(unsigned long value, void *fixup_start, void *fixup_end)
608{
609 long *start, *end;
610 u32 *dest;
611
612 if (!(value & CPU_FTR_LWSYNC))
613 return ;

--- 405 unchanged lines hidden ---
606
607void do_lwsync_fixups(unsigned long value, void *fixup_start, void *fixup_end)
608{
609 long *start, *end;
610 u32 *dest;
611
612 if (!(value & CPU_FTR_LWSYNC))
613 return ;

--- 405 unchanged lines hidden ---