Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4282901imm; Fri, 18 May 2018 02:26:56 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo0A1sVZ31YmYMrePLEl2ryW23vDci+kPs39ut1mYKqLmEpbJBNY5BKWVLwH9pe3KwJE0+U X-Received: by 2002:a17:902:bd46:: with SMTP id b6-v6mr8776389plx.170.1526635615999; Fri, 18 May 2018 02:26:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526635615; cv=none; d=google.com; s=arc-20160816; b=hSNJ8zhbZ3nVWbyipAVSoe9FU9KF5rVdM/Xw6qKgjSGhBWT71muS9V5rI2VTPBkS6W WhLBGRuNVb+hjfQojvzZWmz0SCONApPusSJNr7Pp0N+5dGRE5BIHCd1DBgxm/cdh3I0h p26anEMCg0aHCMI1vFGL0DrzaLFW2gAaMMv88hZq50/otSEFVXeIQRY2ziOaxjiMgDfO f3OQIVBbqyo8LyRiUoS34u1OXK5ZVEGllCCMTVbvjlVAJ+Ihd/KGUZQn+uu7FgGNSaTs 1Te9DVQxuPTxD3Cc9Z80hQa34+TGOCbjAm/VkE9Na6Vtbj/nFQ3VSFQEvZu2W1JygU3U 6CMQ== 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=lww90Om8DeX5g87hZOkXdWLS7zUX+Yrp8u7CaHoQSRI=; b=DSJHRyjKe84N7kcNmsBBQJTEQZIZr1QjuSUD/aNtYlhGUyeIOcsA8x0/WTXb1FoTuc BvvGfQcy7f/6iaFQFdmgmWvgC8s9HiEb1iTSjL9mxaHpdkV6hBPGWyFLLvkmq7HEL8Wc wPoJf4rknI3AfZ4fD8U8qzTHXW/7B5/SlP4Lrqnrj7N62CKKbgczslaHSIyz8ufms7/h NXN9RScW9CIDmE+uJgpkSiXb+hRUrvV/n2yulk4dCGljW18+ijKkYLanapH8yfHiP6ck WjqiNhlArfJf7NP1a7eBak2wjP/SYmp7Wl2GQXO6COUixkyax8Y355up/xCCIZ9xjJKu ddxg== 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 f5-v6si3679232pgn.453.2018.05.18.02.26.41; Fri, 18 May 2018 02:26:55 -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 S1752994AbeERJYy (ORCPT + 99 others); Fri, 18 May 2018 05:24:54 -0400 Received: from mx2.suse.de ([195.135.220.15]:45410 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753056AbeERJRh (ORCPT ); Fri, 18 May 2018 05:17:37 -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 F1616AF5D; Fri, 18 May 2018 09:17:35 +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 Subject: [PATCH v6 10/28] x86/asm/entry: annotate interrupt symbols properly Date: Fri, 18 May 2018 11:17:03 +0200 Message-Id: <20180518091721.7604-11-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 * annotate functions properly by SYM_CODE_START, SYM_CODE_START_LOCAL* and SYM_CODE_END -- these are not C-like functions, so we have to annotate them using CODE. * use SYM_INNER_LABEL* for labels being in the middle of other functions [v4] alignments preserved Signed-off-by: Jiri Slaby Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: --- arch/x86/entry/entry_32.S | 15 ++++++++------- arch/x86/entry/entry_64.S | 9 ++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S index 030fbeba5f4a..4b80b2fb4de1 100644 --- a/arch/x86/entry/entry_32.S +++ b/arch/x86/entry/entry_32.S @@ -340,7 +340,7 @@ ret_from_intr: cmpl $USER_RPL, %eax jb resume_kernel # not returning to v8086 or userspace -ENTRY(resume_userspace) +SYM_INNER_LABEL_ALIGN(resume_userspace, SYM_L_LOCAL) DISABLE_INTERRUPTS(CLBR_ANY) TRACE_IRQS_OFF movl %esp, %eax @@ -579,10 +579,11 @@ restore_all: INTERRUPT_RETURN .section .fixup, "ax" -ENTRY(iret_exc ) +SYM_CODE_START(iret_exc) pushl $0 # no error code pushl $do_iret_error jmp common_exception +SYM_CODE_END(iret_exc) .previous _ASM_EXTABLE(.Lirq_return, iret_exc) @@ -674,7 +675,7 @@ END(irq_entries_start) * so IRQ-flags tracing has to follow that: */ .p2align CONFIG_X86_L1_CACHE_SHIFT -common_interrupt: +SYM_CODE_START_LOCAL(common_interrupt) ASM_CLAC addl $-0x80, (%esp) /* Adjust vector into the [-256, -1] range */ SAVE_ALL @@ -683,7 +684,7 @@ common_interrupt: movl %esp, %eax call do_IRQ jmp ret_from_intr -ENDPROC(common_interrupt) +SYM_CODE_END(common_interrupt) #define BUILD_INTERRUPT3(name, nr, fn) \ ENTRY(name) \ @@ -835,7 +836,7 @@ ENTRY(xen_hypervisor_callback) jmp xen_iret_crit_fixup -ENTRY(xen_do_upcall) +SYM_INNER_LABEL_ALIGN(xen_do_upcall, SYM_L_GLOBAL) 1: mov %esp, %eax call xen_evtchn_do_upcall #ifndef CONFIG_PREEMPT @@ -920,7 +921,7 @@ ENTRY(page_fault) jmp common_exception END(page_fault) -common_exception: +SYM_CODE_START_LOCAL_NOALIGN(common_exception) /* the function address is in %gs's slot on the stack */ pushl %fs pushl %es @@ -950,7 +951,7 @@ common_exception: movl %esp, %eax # pt_regs pointer CALL_NOSPEC %edi jmp ret_from_exception -END(common_exception) +SYM_CODE_END(common_exception) ENTRY(debug) /* diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index 80045cb2f44c..e0798c044055 100644 --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -637,7 +637,7 @@ END(interrupt_entry) * then jump to common_interrupt. */ .p2align CONFIG_X86_L1_CACHE_SHIFT -common_interrupt: +SYM_CODE_START_LOCAL(common_interrupt) addq $-0x80, (%rsp) /* Adjust vector to [-256, -1] range */ call interrupt_entry UNWIND_HINT_REGS indirect=1 @@ -733,7 +733,7 @@ GLOBAL(restore_regs_and_return_to_kernel) */ INTERRUPT_RETURN -ENTRY(native_iret) +SYM_INNER_LABEL_ALIGN(native_iret, SYM_L_GLOBAL) UNWIND_HINT_IRET_REGS /* * Are we returning to a stack segment from the LDT? Note: in @@ -744,8 +744,7 @@ ENTRY(native_iret) jnz native_irq_return_ldt #endif -.global native_irq_return_iret -native_irq_return_iret: +SYM_INNER_LABEL(native_irq_return_iret, SYM_L_GLOBAL) /* * This may fault. Non-paranoid faults on return to userspace are * handled by fixup_bad_iret. These include #SS, #GP, and #NP. @@ -827,7 +826,7 @@ native_irq_return_ldt: */ jmp native_irq_return_iret #endif -END(common_interrupt) +SYM_CODE_END(common_interrupt) /* * APIC interrupts. -- 2.16.3