From patchwork Tue Oct 24 13:26:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= X-Patchwork-Id: 13434515 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 94E89C07545 for ; Tue, 24 Oct 2023 13:28:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=iKs1GCyWvBTVvAhzVH+E1vJLUaWs8uH+Mm1QY8LsPgA=; b=AuO5UIzUrDoSbM oCEfjpBqEC2tLWrsGXk2UnbMpzLcnVlOulTMIFvZbyLaDx9WK+VZ0IfeO61Gweoo6sViQFZFuiWXF huvQ2Hz/HyYgc3tNDXBzEwOVEHNHvwfu4vIOkVthe2EhqbMiOXC738M24l9cyHydlCa/GroK+XR9O 660YWxlNFNctboCkO/ngSUfwBIiFRxAXXd9U2eWhZbp8oy/dksRnuuPU+P1CdGRQP/j/X4GUsOBvh LRrpWtNAVgsR1R6U2Dgqgy0v29cPUJH/JzcA8FIe7Ev/N73kJ3mOiZ0DBCQojJSd+OvBQc6EQEvCa FmDq1u7HIxM9Xnk+bbRQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qvHRs-009wlU-1C; Tue, 24 Oct 2023 13:27:56 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qvHRo-009wjQ-34 for linux-riscv@lists.infradead.org; Tue, 24 Oct 2023 13:27:54 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-408fd07bb78so2448265e9.1 for ; Tue, 24 Oct 2023 06:27:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1698154071; x=1698758871; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=p7NxDbO7GUxLbtod+vtUf5vVuxdvzarRCEG44wnrlEM=; b=dd82eUWWUrfRCIB7xjhA2Sha6dC4WM1yhz+2a0Kdnh2IKvOvQZX1GrnS/DAFEmUDOa PH6e3W8tHf2gtESpBHBw0dSgfByEWoEEyFmE6ovvVm6iE5dJHH5wEl9tNY4FUZX+SnG1 8EZ3kxVexWw/5HFD1PuiuiSVR/WP/Qors8/UeDBpGEY3r0NwRmQHAfEFlDdDdId5Um4a WqhWKagw3w3YXkELWThQKtmE/Jx10A+SZgZ/6HM0xFZn5A8pr9Vx6m+2ho0F7t58xJFf hT0n4Ysh1CmfAgomVR7rHIsMfDcBmx+8or9613Rb8CYmdiCVFn7JGrqUzy1g/zktuj6c KzRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698154071; x=1698758871; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=p7NxDbO7GUxLbtod+vtUf5vVuxdvzarRCEG44wnrlEM=; b=PmuQ9hySGiNTI+0KMe2yKs7TsoR9MqDgqsKUMrhZrBLsj9rEbAa0QRo6BvqBgz37xX GErJuc++sbXLtWhIY95MEiv9+ZTMCnPUfgUFZPPbWn3jxRy50DjZUKZpgO7J2MOIq3tN fAWSYOBFSpryfyzsgSaGouGoLuK8EywUWtj7FqwSRukYqqhcNcF2lUspc+EhLXlfDS+D UwrCrxJp2xcryHs8hi1JObHBdOW7+mVELHPSXjA0MTbPrLAR4CjDmndFu9S+I4AlIMA5 JsuPjPVMOR4TbOF+gRmSxshTGy0Z2/foBKWgJJRxFefZY7Q/RVuULoN5aDYcS1HfKqTv 3lPA== X-Gm-Message-State: AOJu0YwPX6AXgYyu8jnmTT4UxUcuV3vPi7wXY90zmOJI3CCWq0uzCWPg 9bmv4O6vHUj7CSHeXMLPLGXcNQ== X-Google-Smtp-Source: AGHT+IH77/PUgfFp7lhNctpa+rJkehqrdIV97sCBXLPajMuJnwUEvoVFCh76kpQkxXAlg1/QWfUznw== X-Received: by 2002:a05:600c:2293:b0:403:334:fb0d with SMTP id 19-20020a05600c229300b004030334fb0dmr9098071wmf.4.1698154071124; Tue, 24 Oct 2023 06:27:51 -0700 (PDT) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:597d:e2c5:6741:bac9]) by smtp.gmail.com with ESMTPSA id c17-20020a5d4151000000b0032d87b13240sm10034964wrq.73.2023.10.24.06.27.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 06:27:50 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Anup Patel , Atish Patra , Andrew Jones Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org Subject: [PATCH v2 0/5] riscv: cleanup assembly usage of ENTRY()/END() and use local labels Date: Tue, 24 Oct 2023 15:26:50 +0200 Message-ID: <20231024132655.730417-1-cleger@rivosinc.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231024_062753_228505_780E0135 X-CRM114-Status: GOOD ( 11.32 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org This series does a cleanup of all ENTRY()/END() macros that are used in arch/riscv/ as well as use of local labels. This allows to remove the use of the now deprecated ENTRY()/END()/WEAK() macros as well as using the new SYM_*() ones which provide a better understanding of what is meant to be annotated. Some wrong usage of SYM_FUNC_START() are also fixed in this series by using the correct annotations. Finally a few labels that were meant to be local have been renamed to use the .L suffix and thus not to be emitted as visible symbols. Note: the patches have been split between arch/riscv/ and arch/riscv/kvm/ due to having different maintainers. --- Changes in V2: - Remove duplicated SYM_FUNC_END(memmove) - Use SYM_DATA for simple .quad usage - Added Andrew Rb: Clément Léger (5): riscv: use ".L" local labels in assembly when applicable riscv: Use SYM_*() assembly macros instead of deprecated ones riscv: kernel: Use correct SYM_DATA_*() macro for data riscv: kvm: Use SYM_*() assembly macros instead of deprecated ones riscv: kvm: use ".L" local labels in assembly when applicable arch/riscv/kernel/copy-unaligned.S | 8 +-- arch/riscv/kernel/entry.S | 19 +++---- arch/riscv/kernel/fpu.S | 8 +-- arch/riscv/kernel/head.S | 30 +++++----- arch/riscv/kernel/hibernate-asm.S | 12 ++-- arch/riscv/kernel/mcount-dyn.S | 20 +++---- arch/riscv/kernel/mcount.S | 18 +++--- arch/riscv/kernel/probes/rethook_trampoline.S | 4 +- arch/riscv/kernel/suspend_entry.S | 4 +- arch/riscv/kernel/vdso/flush_icache.S | 4 +- arch/riscv/kernel/vdso/getcpu.S | 4 +- arch/riscv/kernel/vdso/rt_sigreturn.S | 4 +- arch/riscv/kernel/vdso/sys_hwprobe.S | 4 +- arch/riscv/kvm/vcpu_switch.S | 32 +++++------ arch/riscv/lib/memcpy.S | 6 +- arch/riscv/lib/memmove.S | 57 +++++++++---------- arch/riscv/lib/memset.S | 6 +- arch/riscv/lib/uaccess.S | 11 ++-- arch/riscv/purgatory/entry.S | 16 ++---- 19 files changed, 124 insertions(+), 143 deletions(-)