Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4276885imm; Fri, 18 May 2018 02:19:03 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpv7c9pU0Wrxmvc0y95oOPC+Qs/lfJabwsbOJe253ZaOR8xqWNIbdbfIIgob7D8RURZFrtP X-Received: by 2002:a17:902:321:: with SMTP id 30-v6mr8684185pld.122.1526635143462; Fri, 18 May 2018 02:19:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526635143; cv=none; d=google.com; s=arc-20160816; b=ZYTehZfjANY/M22OJuvK+9F+P2x5tQ8qOjK5U9H6wd4ozCvfcwTTpeyZ7zym+4Ovjc DhCXf8dh+bUJxZ+aFcUQOTukWAHka0ISPFzFgxDOOtkHiCtSzn8K3/FO2BmyPBoOJc5l Z5lSLIEmProz6w8xqOZI1BMU93AnoLdm2CK2nIXWKxjxhDe54/UgSmB4vF2n7Z5CZugd M3UdFNPahhGsiJjRQqzh5y2OLjYHi7tpJUfidknhccOu+Jv9J8EyjxTj0cg9ybl/H/uD KhHXtRSmoYpd+MYHZjxkdnoFArTzi9mfktrUJROdG6jku6Vqd6l6Xb3jr2Wr/LtzL4yJ +EkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=lTWv5eryOTZ1CT5OJZ4a982emn82fwDjn4SpwLDoi8I=; b=gDnPoBulD63a9aUQAq/XRdUn3L6TvYm7Yqa7pRlOY0uTz+WxS2IpK09DUF+Qd96DDg TQM8qiIASgtcnZ40xBBESEg/ylLiwk/lpyGakXXy8qO2XDrYbUEFTkmssl8G/YQtMG87 SOt/yxpxI+/UAVdytlQhph8IXd98ijv4fVlbVXWtF87coZ0U2T3e4hBuKKaDmb0X6KWs jDRaOcOk+0NY75Bj8/Lt0f+wh3Zc0BSjNkPWO4qQtYTUP6kBELmOOHOHJmMcAcDp6tnG x+w3kR7z7su9QoqMA/q6LOhlpf8TeNfMVg7omTLXZsIPbgHoUlKKof+P7NaFijKdgLBm i12g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p1-v6si5730687pgr.402.2018.05.18.02.18.48; Fri, 18 May 2018 02:19:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752902AbeERJSm (ORCPT + 99 others); Fri, 18 May 2018 05:18:42 -0400 Received: from mx2.suse.de ([195.135.220.15]:45560 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753231AbeERJRx (ORCPT ); Fri, 18 May 2018 05:17:53 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 6AAE2AF3C; Fri, 18 May 2018 09:17:51 +0000 (UTC) From: Jiri Slaby To: mingo@redhat.com Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby , Thomas Gleixner , "H. Peter Anvin" , x86@kernel.org, "Rafael J. Wysocki" , Len Brown , Pavel Machek , Boris Ostrovsky , Juergen Gross , linux-pm@vger.kernel.org, xen-devel@lists.xenproject.org Subject: [PATCH v6 25/28] x86_32/asm: add ENDs to some functions and relabel with SYM_CODE_* Date: Fri, 18 May 2018 11:17:18 +0200 Message-Id: <20180518091721.7604-26-jslaby@suse.cz> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180518091721.7604-1-jslaby@suse.cz> References: <20180518091721.7604-1-jslaby@suse.cz> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org All these are functions which are invoked from elsewhere, but they are not typical C functions. So we annotate them using the new SYM_CODE_START. All these were not balanced with any END, so mark their ends by SYM_CODE_END, appropriatelly. Signed-off-by: Jiri Slaby Reviewed-by: Boris Ostrovsky [xen bits] Reviewed-by: Rafael J. Wysocki [hibernate] Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: Pavel Machek Cc: Boris Ostrovsky Cc: Juergen Gross Cc: linux-pm@vger.kernel.org Cc: xen-devel@lists.xenproject.org --- arch/x86/entry/entry_32.S | 3 ++- arch/x86/kernel/acpi/wakeup_32.S | 7 ++++--- arch/x86/kernel/ftrace_32.S | 3 ++- arch/x86/kernel/head_32.S | 3 ++- arch/x86/power/hibernate_asm_32.S | 6 ++++-- arch/x86/realmode/rm/trampoline_32.S | 6 ++++-- arch/x86/xen/xen-asm_32.S | 7 ++++--- 7 files changed, 22 insertions(+), 13 deletions(-) diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S index f701541ecf10..75d9670bffd8 100644 --- a/arch/x86/entry/entry_32.S +++ b/arch/x86/entry/entry_32.S @@ -376,9 +376,10 @@ SYM_ENTRY(__begin_SYSENTER_singlestep_region, SYM_L_GLOBAL, SYM_A_NONE) * Xen doesn't set %esp to be precisely what the normal SYSENTER * entry point expects, so fix it up before using the normal path. */ -ENTRY(xen_sysenter_target) +SYM_CODE_START(xen_sysenter_target) addl $5*4, %esp /* remove xen-provided frame */ jmp .Lsysenter_past_esp +SYM_CODE_END(xen_sysenter_target) #endif /* diff --git a/arch/x86/kernel/acpi/wakeup_32.S b/arch/x86/kernel/acpi/wakeup_32.S index feac1e5ecba0..71a05a6cc36a 100644 --- a/arch/x86/kernel/acpi/wakeup_32.S +++ b/arch/x86/kernel/acpi/wakeup_32.S @@ -8,8 +8,7 @@ .code32 ALIGN -ENTRY(wakeup_pmode_return) -wakeup_pmode_return: +SYM_CODE_START(wakeup_pmode_return) movw $__KERNEL_DS, %ax movw %ax, %ss movw %ax, %fs @@ -38,6 +37,7 @@ wakeup_pmode_return: # jump to place where we left off movl saved_eip, %eax jmp *%eax +SYM_CODE_END(wakeup_pmode_return) bogus_magic: jmp bogus_magic @@ -71,7 +71,7 @@ restore_registers: popfl ret -ENTRY(do_suspend_lowlevel) +SYM_CODE_START(do_suspend_lowlevel) call save_processor_state call save_registers pushl $3 @@ -86,6 +86,7 @@ ret_point: call restore_registers call restore_processor_state ret +SYM_CODE_END(do_suspend_lowlevel) .data ALIGN diff --git a/arch/x86/kernel/ftrace_32.S b/arch/x86/kernel/ftrace_32.S index b855dc10daeb..f4dca7df8ad6 100644 --- a/arch/x86/kernel/ftrace_32.S +++ b/arch/x86/kernel/ftrace_32.S @@ -102,7 +102,7 @@ WEAK(ftrace_stub) ret END(ftrace_caller) -ENTRY(ftrace_regs_caller) +SYM_CODE_START(ftrace_regs_caller) /* * i386 does not save SS and ESP when coming from kernel. * Instead, to get sp, ®s->sp is used (see ptrace.h). @@ -170,6 +170,7 @@ SYM_INNER_LABEL(ftrace_regs_call, SYM_L_GLOBAL) lea 3*4(%esp), %esp /* Skip orig_ax, ip and cs */ jmp .Lftrace_ret +SYM_CODE_END(ftrace_regs_caller) #else /* ! CONFIG_DYNAMIC_FTRACE */ ENTRY(function_hook) diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S index 1a6a6b4e4b4c..ba9df7cc545d 100644 --- a/arch/x86/kernel/head_32.S +++ b/arch/x86/kernel/head_32.S @@ -64,7 +64,7 @@ RESERVE_BRK(pagetables, INIT_MAP_SIZE) * can. */ __HEAD -ENTRY(startup_32) +SYM_CODE_START(startup_32) movl pa(initial_stack),%ecx /* test KEEP_SEGMENTS flag to see if the bootloader is asking @@ -172,6 +172,7 @@ num_subarch_entries = (. - subarch_entries) / 4 #else jmp .Ldefault_entry #endif /* CONFIG_PARAVIRT */ +SYM_CODE_END(startup_32) #ifdef CONFIG_HOTPLUG_CPU /* diff --git a/arch/x86/power/hibernate_asm_32.S b/arch/x86/power/hibernate_asm_32.S index 6e56815e13a0..3cd15e34aa87 100644 --- a/arch/x86/power/hibernate_asm_32.S +++ b/arch/x86/power/hibernate_asm_32.S @@ -15,7 +15,7 @@ .text -ENTRY(swsusp_arch_suspend) +SYM_CODE_START(swsusp_arch_suspend) movl %esp, saved_context_esp movl %ebx, saved_context_ebx movl %ebp, saved_context_ebp @@ -26,8 +26,9 @@ ENTRY(swsusp_arch_suspend) call swsusp_save ret +SYM_CODE_END(swsusp_arch_suspend) -ENTRY(restore_image) +SYM_CODE_START(restore_image) movl mmu_cr4_features, %ecx movl resume_pg_dir, %eax subl $__PAGE_OFFSET, %eax @@ -83,3 +84,4 @@ done: xorl %eax, %eax ret +SYM_CODE_END(restore_image) diff --git a/arch/x86/realmode/rm/trampoline_32.S b/arch/x86/realmode/rm/trampoline_32.S index e96efcd60bf7..a3b047a44c5c 100644 --- a/arch/x86/realmode/rm/trampoline_32.S +++ b/arch/x86/realmode/rm/trampoline_32.S @@ -29,7 +29,7 @@ .code16 .balign PAGE_SIZE -ENTRY(trampoline_start) +SYM_CODE_START(trampoline_start) wbinvd # Needed for NUMA-Q should be harmless for others LJMPW_RM(1f) @@ -57,11 +57,13 @@ ENTRY(trampoline_start) lmsw %dx # into protected mode ljmpl $__BOOT_CS, $pa_startup_32 +SYM_CODE_END(trampoline_start) .section ".text32","ax" .code32 -ENTRY(startup_32) # note: also used from wakeup_asm.S +SYM_CODE_START(startup_32) # note: also used from wakeup_asm.S jmp *%eax +SYM_CODE_END(startup_32) .bss .balign 8 diff --git a/arch/x86/xen/xen-asm_32.S b/arch/x86/xen/xen-asm_32.S index c15db060a242..8b8f8355b938 100644 --- a/arch/x86/xen/xen-asm_32.S +++ b/arch/x86/xen/xen-asm_32.S @@ -56,7 +56,7 @@ _ASM_EXTABLE(1b,2b) .endm -ENTRY(xen_iret) +SYM_CODE_START(xen_iret) /* test eflags for special cases */ testl $(X86_EFLAGS_VM | XEN_EFLAGS_NMI), 8(%esp) jnz hyper_iret @@ -122,6 +122,7 @@ xen_iret_end_crit: hyper_iret: /* put this out of line since its very rarely used */ jmp hypercall_page + __HYPERVISOR_iret * 32 +SYM_CODE_END(xen_iret) .globl xen_iret_start_crit, xen_iret_end_crit @@ -165,7 +166,7 @@ hyper_iret: * SAVE_ALL state before going on, since it's usermode state which we * eventually need to restore. */ -ENTRY(xen_iret_crit_fixup) +SYM_CODE_START(xen_iret_crit_fixup) /* * Paranoia: Make sure we're really coming from kernel space. * One could imagine a case where userspace jumps into the @@ -204,4 +205,4 @@ ENTRY(xen_iret_crit_fixup) lea 4(%edi), %esp /* point esp to new frame */ 2: jmp xen_do_upcall - +SYM_CODE_END(xen_iret_crit_fixup) -- 2.16.3