Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm64: assembler: remove conditional NEON yield macros

The users of the conditional NEON yield macros have all been switched to
the simplified cond_yield macro, and so the NEON specific ones can be
removed.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20210302090118.30666-2-ardb@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>

authored by

Ard Biesheuvel and committed by
Catalin Marinas
27248fe1 1e28eed1

-70
-70
arch/arm64/include/asm/assembler.h
··· 692 692 isb 693 693 .endm 694 694 695 - /* 696 - * Check whether to yield to another runnable task from kernel mode NEON code 697 - * (which runs with preemption disabled). 698 - * 699 - * if_will_cond_yield_neon 700 - * // pre-yield patchup code 701 - * do_cond_yield_neon 702 - * // post-yield patchup code 703 - * endif_yield_neon <label> 704 - * 705 - * where <label> is optional, and marks the point where execution will resume 706 - * after a yield has been performed. If omitted, execution resumes right after 707 - * the endif_yield_neon invocation. Note that the entire sequence, including 708 - * the provided patchup code, will be omitted from the image if 709 - * CONFIG_PREEMPTION is not defined. 710 - * 711 - * As a convenience, in the case where no patchup code is required, the above 712 - * sequence may be abbreviated to 713 - * 714 - * cond_yield_neon <label> 715 - * 716 - * Note that the patchup code does not support assembler directives that change 717 - * the output section, any use of such directives is undefined. 718 - * 719 - * The yield itself consists of the following: 720 - * - Check whether the preempt count is exactly 1 and a reschedule is also 721 - * needed. If so, calling of preempt_enable() in kernel_neon_end() will 722 - * trigger a reschedule. If it is not the case, yielding is pointless. 723 - * - Disable and re-enable kernel mode NEON, and branch to the yield fixup 724 - * code. 725 - * 726 - * This macro sequence may clobber all CPU state that is not guaranteed by the 727 - * AAPCS to be preserved across an ordinary function call. 728 - */ 729 - 730 - .macro cond_yield_neon, lbl 731 - if_will_cond_yield_neon 732 - do_cond_yield_neon 733 - endif_yield_neon \lbl 734 - .endm 735 - 736 - .macro if_will_cond_yield_neon 737 - #ifdef CONFIG_PREEMPTION 738 - get_current_task x0 739 - ldr x0, [x0, #TSK_TI_PREEMPT] 740 - sub x0, x0, #PREEMPT_DISABLE_OFFSET 741 - cbz x0, .Lyield_\@ 742 - /* fall through to endif_yield_neon */ 743 - .subsection 1 744 - .Lyield_\@ : 745 - #else 746 - .section ".discard.cond_yield_neon", "ax" 747 - #endif 748 - .endm 749 - 750 - .macro do_cond_yield_neon 751 - bl kernel_neon_end 752 - bl kernel_neon_begin 753 - .endm 754 - 755 - .macro endif_yield_neon, lbl 756 - .ifnb \lbl 757 - b \lbl 758 - .else 759 - b .Lyield_out_\@ 760 - .endif 761 - .previous 762 - .Lyield_out_\@ : 763 - .endm 764 - 765 695 /* 766 696 * Check whether preempt-disabled code should yield as soon as it 767 697 * is able. This is the case if re-enabling preemption a single