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=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 80B0FC433B4 for ; Mon, 10 May 2021 15:58:33 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 29F13615FF for ; Mon, 10 May 2021 15:58:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 29F13615FF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:MIME-Version:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:Cc:To:From:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=HqKQ6VfMbWez7Nki3KnIZb5Iw2HROa/XeBKRRmWJVSE=; b=S0uxwuAEKLV++KHmLmGOzEirZ2 82tst9hr3pEHIZX49QmVzU7vwOWPwqghvDx4zDrKkK+i6GCOrjfPfdEnzNnUWKtGzXxqcJbrs4Wk0 FUNgi0EZ0kXoYzZu/cohEY/Sru5kXNb5FbJhb/7Jok0LtSSBG/l0RHtv5A7ZCRZO2nY5il4VXNBgm WW/c85vqNv6dVDR11qYuZPVZcrJaXn/i49OBi/ZQtm7rvAr/Qu0qAmh39j9SYVq4tb4jHV+4oTuYE HR9glnC8SAYbQomSuHjy/JtCdzsAbOkfwGomMF5a9dLOw84WeTcu4clfN7tyIj3FmYN7aU8lcuZVn Dg84081A==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lg8HM-00EqS0-DM; Mon, 10 May 2021 15:57:08 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lg8H7-00EqPa-Jk for linux-arm-kernel@desiato.infradead.org; Mon, 10 May 2021 15:56:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To:References; bh=e9vnV17tFSwe/JI0d0dDs3eBtQ1xwIbNoChZbgopfvU=; b=P+RiecrX0GzJ8dMJ0JQZ1my57z fetbWXxQx3O5jjyQDkBN8j/8gx1qFj1BGCKJ5qiTvkx6awkAnkIavd+y1eGxq3rVmbm1mcAER96Rf 0TCSHdh2S46D1gsIEqwozHnoZqOb3vhH1/kN6hkzdRhf+5M3c3gfS9+N8aj+W4lBcy4DkamvkJ6qp gg12oO41qK6sefxSZ18MBFzbOm3L8bl2eNqtoJH1I6Bol4FzZbBn/UOUEobqCCPS1Lep5ibgsohlD tiMNZNrVreUUDtSSNk/EQGkafWcQIYtn4WtGXUYUNpLCqqeU3quhDO9B4z87B5AqVdwVZ68CiIxjG fnIpODKQ==; Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lg8H4-008tKv-Mn for linux-arm-kernel@lists.infradead.org; Mon, 10 May 2021 15:56:52 +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 5C355168F; Mon, 10 May 2021 08:56:44 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 6B4B93F73B; Mon, 10 May 2021 08:56:43 -0700 (PDT) From: Mark Rutland To: linux-arm-kernel@lists.infradead.org, will@kernel.org, catalin.marinas@arm.com Cc: james.morse@arm.com, mark.rutland@arm.com, maz@kernel.org Subject: [PATCH 00/14] arm64: entry: migrate more code to C Date: Mon, 10 May 2021 16:56:07 +0100 Message-Id: <20210510155621.52811-1-mark.rutland@arm.com> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210510_085650_808648_BADA90AB X-CRM114-Status: GOOD ( 13.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series (based on v5.13-rc1) migrates most of the remaining exception triage assembly to C. All the exception vectors are given C handlers, so that we can defer all decision making to C code, and the assembly code can be made simpler and more uniform. I've stopped short of converting the ret_to_user / work_pending loop. Converting this cleanly will probably need something like the wrappers generated by SYSCALL_DEFINE() to handle the common entry/exit logic, and this is easier to build once all the handlers have been converted to C. Similar is true for portions of kernel_entry and kernel_exit that could be converted to C. It should also be possible to generate the vectors and their associated assembly handlers in one go by placing these in separate sections and using .pushsection and .popsection. I've held off doing this for now as this probably requires some changes to the linker script, and regardless it should be easier to make that change atop this series. So far this has seen some light boot testing, and had survived a few hours under Syzkaller, which I intend to leave running for a while. I've pushed the series to my arm64/entry/rework branch on kernel.org: https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/log/?h=arm64/entry/rework git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arm64/entry/rework Thanks, Mark. Mark Rutland (14): arm64: remove redundant local_daif_mask() in bad_mode() arm64: entry: unmask IRQ+FIQ after EL0 handling arm64: entry: convert SError handlers to C arm64: entry: move arm64_preempt_schedule_irq to entry-common.c arm64: entry: move preempt logic to C arm64: entry: add a call_on_irq_stack helper arm64: entry: convert IRQ+FIQ handlers to C arm64: entry: organise entry handlers consistently arm64: entry: organise entry vectors consistently arm64: entry: consolidate EL1 exception returns arm64: entry: move bad_mode() to entry-common.c arm64: entry: improve bad_mode() arm64: entry: template the entry asm functions arm64: entry: handle all vectors with C arch/arm64/include/asm/exception.h | 27 ++- arch/arm64/include/asm/processor.h | 2 - arch/arm64/kernel/entry-common.c | 185 ++++++++++++++++++- arch/arm64/kernel/entry.S | 354 ++++++++++--------------------------- arch/arm64/kernel/process.c | 17 -- arch/arm64/kernel/traps.c | 26 --- arch/arm64/mm/fault.c | 7 - 7 files changed, 292 insertions(+), 326 deletions(-) -- 2.11.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel