From patchwork Wed Oct 4 14:30:49 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: 14918 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:254a:b0:403:3b70:6f57 with SMTP id hf10csp178297vqb; Wed, 4 Oct 2023 07:34:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHegm/hHABnWklLSKOdE1QsihOGdaOnjuHNUN6O82N9NOuRxh6mrZ3U3PUtBTsgHdbqzmbO X-Received: by 2002:a05:6a00:39a8:b0:693:42d2:cde0 with SMTP id fi40-20020a056a0039a800b0069342d2cde0mr2382742pfb.22.1696430097895; Wed, 04 Oct 2023 07:34:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696430097; cv=none; d=google.com; s=arc-20160816; b=LGHDE6Qj7/D3JorBXcrTJcEqrFovdo/svbhI41oNUkJGBSizLqPnMpTye9VNghRTAF G+5idyyRTmOHH0SfCoDNK4csVqKqV5iw+VCtYMlBxReP5TmChPN82Kn4Hs7ojBE8Qm0F hMgTM53AVeCqpqdeEZ/KWHWK2reI2r6yNgBkvUfxNfjev9TDPBruUhV0Oaj8HKoaS+mR s13fAmMz9Ym1j9nddnlFaaBX7zCOTpidIlt/XUBm3pdMuKtOBR+hX8sKlqpBeQxyNq7Y oEIRt0AnA+DBu5dQekFo9mugBBNpqb8wb4DlEfTHMisGjC+6JgxxQ+pHd2aHpYAcOeEa Ou7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=CM1tzOwYIRfBowwMaDOZ0YTv6DSHjRM1ieV3JngoGb0=; fh=LGqxV//S2dNc9ZXry/APvah5P8y0u5J065Xrxe/jE+g=; b=H74Z/XCW2LFpBsVHYW0IPNjarqt3UIATs6SZGDSfIweydEiLxLkgieP5Xsur0DqVy/ 5eOEDbyey0yigGEEHZxWzqflRbow2reLoYUY4bOFz4vcaWLz2oTI0BaB/nRdHoWNa1hs jXxvKwbF2meVVMlsC2IoGlQiijbm+Fxggix08pSTewJke/Z6M0hkAy4ii0tDb3Tkq7z4 kbNhSFCrMpjtHmeFSTtGnnD1YMkN/+moLtdeMnu5hB/ORdMM3VqrKsAmCh1sbLqxjSGF fFfNs4ojtL64sna3+t6px7t7KMglhD4VbNNYEQlQ1xuRIWiCKrBI7ASzW4nZkZMiEaxQ Dq8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=zEip87a0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id z1-20020a63c041000000b00565e42ba541si3660886pgi.482.2023.10.04.07.34.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 07:34:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=zEip87a0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 8483F8220753; Wed, 4 Oct 2023 07:34:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242781AbjJDOew (ORCPT + 18 others); Wed, 4 Oct 2023 10:34:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233111AbjJDOeu (ORCPT ); Wed, 4 Oct 2023 10:34:50 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66FC9C1 for ; Wed, 4 Oct 2023 07:34:45 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-406532c49dcso4962755e9.0 for ; Wed, 04 Oct 2023 07:34:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1696430084; x=1697034884; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=CM1tzOwYIRfBowwMaDOZ0YTv6DSHjRM1ieV3JngoGb0=; b=zEip87a0BH1j92Z/jps+EGC6DV3MxeNx5LtX4FBEpISjNNEYsJg4mbdQGHLOHSdLHy xFbG7KASGIupi44Jia+cpHBuRqQsy5dzriC6VLao+g8Lc7CtUIEtnGyTp77u+dzSuozk AfMZWpToKPycdJjYhyOwSvf5hNTXtpAMROuH20kp64XvBxRqL74v1Dyn9p7ONQbX1wxg b+0COpHsMLnzJ2qWwnfmVWGnZIkRZyKLxzCxjdaF3X0zljQ57WdRkjDdrsDdycU1Pngu 9GfPuT6IdQ4ZaxUvtdogEsCm3eQPtgmPjSb8JTUhUZbho6HztewR37Ogt/4DXdjIyBlC Us/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696430084; x=1697034884; 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=CM1tzOwYIRfBowwMaDOZ0YTv6DSHjRM1ieV3JngoGb0=; b=kmsL9voWoMP6qrIXRGzWvsUNEGbYWb2Qd/vlJR8SGw7gKeEAx4VyKQ2sujfXHBqalQ WGoTV8M/SBEPvCd7Byny9TFgziK+uWtsm22+2WZwmW8yCfIAwxzqxLZ6/0efys8gaT1K JA+prUxlzAxGo3Cn/K2opG7+1p9doZYaLY2WpZd49a/Dt/oI4GbnHEMS1xwBqRoENifA SNJ1l2oR/ZjvlBm2ZIhnDMiKisSTlfLIN16ZvDwWlYVSKmDxvOIiQkShmc3wu7Oqd89F hXimkZkj2UGiI1X+BYjWLq3GrPtYynGdot0HZfogFqUNlC5dLJJiNBiRFMloWTno9tlp rHcQ== X-Gm-Message-State: AOJu0YxR1q/ViocVuZh19cmpVrP5SwpyyCzBEXhIyOdqKtQNXXFy8Lgc pPk955lcBiFsFJPpFP+uyQ9MTg== X-Received: by 2002:a05:600c:5114:b0:405:4127:f471 with SMTP id o20-20020a05600c511400b004054127f471mr2532705wms.1.1696430083756; Wed, 04 Oct 2023 07:34:43 -0700 (PDT) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:9474:8d75:5115:42cb]) by smtp.gmail.com with ESMTPSA id t20-20020a1c7714000000b00401e32b25adsm1686205wmi.4.2023.10.04.07.34.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 07:34:43 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Anup Patel , Atish Patra 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 0/5] riscv: cleanup assembly usage of ENTRY()/END() and use local labels Date: Wed, 4 Oct 2023 16:30:49 +0200 Message-ID: <20231004143054.482091-1-cleger@rivosinc.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 04 Oct 2023 07:34:56 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778835885830504669 X-GMAIL-MSGID: 1778835885830504669 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. 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 | 56 +++++++++---------- arch/riscv/lib/memset.S | 6 +- arch/riscv/lib/uaccess.S | 11 ++-- arch/riscv/purgatory/entry.S | 16 ++---- 19 files changed, 125 insertions(+), 141 deletions(-)