From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CAFF3C4724C for ; Fri, 1 May 2020 12:33:56 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 958C120708 for ; Fri, 1 May 2020 12:33:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hz1bOap+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 958C120708 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Ppwr2Vz/hTqenf+Wai97mYFRU4t18T7MvSU3dRYbRPA=; b=hz1bOap+R16Ece +6+J4eS15RO2UHq1wqs8I8hv0NhZ15awP88marF/WK2pDeD+Soqz2jKKT7ZKHvVDL9JBBu17pNs3U Zah5Ab1TT6D+SbKo0GfutpUhThVR9gbhEt3cjD7dfJiIzc+xA96zuCXjohDDehQGtHdKikC9m//pn b+hOC1N2haDeZMWKodRVXjDHDDs9a1RWTWjDD2Uvxj62v7eL0zw35RiH5MhyqcRVpC9xDtivsXIZs 4g/mFrFVMBnBC4/a4FD+WitrX1QU6i6jHkTq88C/7NTPt4Xy/4mGuw58Gf3rWhj2pJP86FWv/EiWj lpM28EQNFjkkcVsEVE4Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jUUrc-0007XX-8a; Fri, 01 May 2020 12:33:56 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jUUrZ-0007X6-Br for linux-arm-kernel@lists.infradead.org; Fri, 01 May 2020 12:33:54 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3B96D1FB; Fri, 1 May 2020 05:33:52 -0700 (PDT) Received: from C02TD0UTHF1T.local (unknown [10.57.7.8]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 16F0A3F305; Fri, 1 May 2020 05:33:50 -0700 (PDT) Date: Fri, 1 May 2020 13:33:42 +0100 From: Mark Rutland To: Mark Brown Subject: Re: [PATCH v2 1/3] arm64: entry: Refactor and modernise annotation for ret_to_user Message-ID: <20200501123342.GA53528@C02TD0UTHF1T.local> References: <20200501115430.37315-1-broonie@kernel.org> <20200501115430.37315-2-broonie@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200501115430.37315-2-broonie@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200501_053353_449373_B6B03279 X-CRM114-Status: GOOD ( 19.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, May 01, 2020 at 12:54:28PM +0100, Mark Brown wrote: > As part of an effort to clarify and clean up the assembler annotations > new macros have been introduced which annotate the start and end of blocks > of code in assembler files. Currently ret_to_user has an out of line slow > path work_pending placed above the main function which makes annotating the > start and end of these blocks of code awkward. > > Since work_pending is only referenced from within ret_to_user try to make > things a bit clearer by moving it after the current ret_to_user and then > marking both ret_to_user and work_pending as part of a single ret_to_user > code block. > > Signed-off-by: Mark Brown Makes sense to me, and the change looks sound, so: Acked-by: Mark Rutland Mark. > --- > arch/arm64/kernel/entry.S | 27 ++++++++++++++------------- > 1 file changed, 14 insertions(+), 13 deletions(-) > > diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S > index ddcde093c433..73e2c8f5b728 100644 > --- a/arch/arm64/kernel/entry.S > +++ b/arch/arm64/kernel/entry.S > @@ -727,21 +727,10 @@ el0_error_naked: > b ret_to_user > SYM_CODE_END(el0_error) > > -/* > - * Ok, we need to do extra processing, enter the slow path. > - */ > -work_pending: > - mov x0, sp // 'regs' > - bl do_notify_resume > -#ifdef CONFIG_TRACE_IRQFLAGS > - bl trace_hardirqs_on // enabled while in userspace > -#endif > - ldr x1, [tsk, #TSK_TI_FLAGS] // re-check for single-step > - b finish_ret_to_user > /* > * "slow" syscall return path. > */ > -ret_to_user: > +SYM_CODE_START_LOCAL(ret_to_user) > disable_daif > gic_prio_kentry_setup tmp=x3 > ldr x1, [tsk, #TSK_TI_FLAGS] > @@ -753,7 +742,19 @@ finish_ret_to_user: > bl stackleak_erase > #endif > kernel_exit 0 > -ENDPROC(ret_to_user) > + > +/* > + * Ok, we need to do extra processing, enter the slow path. > + */ > +work_pending: > + mov x0, sp // 'regs' > + bl do_notify_resume > +#ifdef CONFIG_TRACE_IRQFLAGS > + bl trace_hardirqs_on // enabled while in userspace > +#endif > + ldr x1, [tsk, #TSK_TI_FLAGS] // re-check for single-step > + b finish_ret_to_user > +SYM_CODE_END(ret_to_user) > > .popsection // .entry.text > > -- > 2.20.1 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel