From patchwork Fri Feb 2 18:21:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 195978 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp617104dyc; Fri, 2 Feb 2024 10:23:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IFWPv2LLt1NfBbV+bAbp/xgSd9lPyNMRtybAJDoZG2+wKniX9nT/WHpjuPkhXcT1UWJMLXH X-Received: by 2002:a05:6a21:2d85:b0:19c:aaee:bb1b with SMTP id ty5-20020a056a212d8500b0019caaeebb1bmr3516949pzb.7.1706898235083; Fri, 02 Feb 2024 10:23:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706898235; cv=pass; d=google.com; s=arc-20160816; b=BUWevrlf4xwxG8TQ6h1eZkUoNtrLxxJXFzDMQf4E1fRMZEwin2b+uJSqgc++yOMsJz abu4TnoHU9E2PIN4+l9hab+pVNKwoDuMrcs3l5R7Pm4h1qTg9rk4SqcSQclBcxaDd5gX mx/PcyxDFLOlo1M1rNRp6kSZ3fD4XULhuhs45m+DeRYA/MRq54/sGQHZNhcthSCM5vvR oF4PkJlpL32v/q9QDT06T8Fbtvpv8sR6kEGpNkEDb2B4pFrZd4kCn3u/ZJoyYAny9lIt rOi/uq53k9unPIGt5N/zpXJz97eQhOaVxKuIQO5+CjieXu4RZhUUJtk2s0qrBya5UhDc F9Jg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:feedback-id:dkim-signature:dkim-signature; bh=5CMEthdiIfkclr3TTuMp0s9GIA2qa1FQiAoY820EjG8=; fh=RzYPKWcexxuvMv1XjAFIh37QX/xpM3ArGNN15Do5bms=; b=wpNgBErQDSJq3ptE59I2c3TFv4yvylIgJ/NrR8L2HYo2dPjr0onkc6/t7rUe4wklW9 J5OPNxLYXuX6Ywydjtc8YQx0r0sSXqb/yPyI3uLGyBhJUh4u04uVj+peZDN9dxuBGTy/ ktrgP3tjEE9+26guE/g3j9ig17MSH15DCIj926gqLeK5Hwb6EoLsrED8BxaQ8lsjDEJC 3iGzU9IFU1m4f3xrVrfpAVfKcQIPlLHqpkp3DrGuoC6Q1lnFcN1APCDFGwzMI6+T7Tog DDCSSnXLRLvRX4yxGGCE6lTkof3O26PTWRojYjuZTiBvfsV2ETOsQZMzajhBqSQ9bwte UwLg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=rPAK5d6z; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=Nn7eTDEs; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=flygoat.com); spf=pass (google.com: domain of linux-kernel+bounces-50308-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50308-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com X-Forwarded-Encrypted: i=1; AJvYcCXGx/HFFjSlFwrlidwWilnLXo12ETBVR345osZKi81XxMJtml1XRP5TD6nv4b8avr4EkqstYX6oRMZ+uUnfps1JFgQFFA== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id c19-20020a63da13000000b005d8e3a180cbsi1961803pgh.841.2024.02.02.10.23.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 10:23:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50308-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=rPAK5d6z; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=Nn7eTDEs; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=flygoat.com); spf=pass (google.com: domain of linux-kernel+bounces-50308-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50308-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 36072290EF1 for ; Fri, 2 Feb 2024 18:22:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 02C82150993; Fri, 2 Feb 2024 18:22:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b="rPAK5d6z"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Nn7eTDEs" Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E22C414D447; Fri, 2 Feb 2024 18:21:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706898118; cv=none; b=fQe2ZK5vJj1AymDPTvm/nPZD1vqSj0TkmJDaOcEIMFL5thIQzVXIYMr/uM2fg4m9rf8yTHrBEAsdYfDnyNMU6UfvbOJZgaWxj2bAVY0IAPNeVEfiBlWDetbv8brPXmc8k5ibJ2nofC1Qxw8Wya+RGMkc6u/hlU09AuYF/baUcD0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706898118; c=relaxed/simple; bh=G7pEwmE2rBW0Y6l+YNkudDnlODmTUfzEzQVNoJ8fF9c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=n0bMJJlurBav+/iscBjfq9b5QDZER6XwAm2hDm6jU4ZWED56UYfsgKuYW2ZUEbJzg6MK2Nw6Xuw2sQhOwOAinGPyFk4eBfXUP4qJPJS+Vk1F5QE/syy6Ln7h+NGynwLhEKrQ7w7hCFkhIBm3gzOvPHfrV7qsaAJUlLk/+/qwenU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=flygoat.com; spf=pass smtp.mailfrom=flygoat.com; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b=rPAK5d6z; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Nn7eTDEs; arc=none smtp.client-ip=64.147.123.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=flygoat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flygoat.com Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailout.west.internal (Postfix) with ESMTP id 4B4583200AF4; Fri, 2 Feb 2024 13:21:55 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Fri, 02 Feb 2024 13:21:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1706898114; x=1706984514; bh=5CMEthdiIfkclr3TTuMp0s9GIA2qa1FQiAoY820EjG8=; b= rPAK5d6zq4uoNfX8tRxazchKVNcHaje4l0KNYEijXEdzUsimsq3cZNERaGeaMH/g FIyvsr45/vHzspx5cK485TewE5M02LNkUUDv/oq9asrrfaR4vsktV8s6izL4UROR KoIiQYLk/cn0/jE/hftPAqrJ1ytINVxorkV3/+PqxR250hhMPxraetC06ndlBYL9 Cs2NIOuM8CndQtj1BQIcjBVjUHg0/YvRsEIvlTi3+lCASc/OuVy8geW8wfZEDUIh 7DiFbOAbYVNCzpZ7ItEmhZu2Q0x3TnjfK0ENY+pkRP4dl1p2Pa9WakcV3HS5lZRF ZK4gRgAWDInSCTNl2YrStg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1706898114; x= 1706984514; bh=5CMEthdiIfkclr3TTuMp0s9GIA2qa1FQiAoY820EjG8=; b=N n7eTDEskqTJPNfy9iMMA8jaefWuj/aC4vGh1OFPl16GSsunPNH73jk4VXZd8+DLx 2XKmEj2leFK9yCNSuUr7V7NtLbqxAOIzFov/SSqDaEiY/rTlD2X0PqpsUo/SJ7dc YPdeJnnbJk/vfih83Z/r8wMOhxoEyVA1ZpLsOJxGrkO64ulgub40SeetNiKbNOsl wbgrJa+R0EAp2NBRnR8gqFvXBaO149ZI2latqFm3rVC0xwOp6XauMFXByhslQwGf Y63iOCDlaVuh3q3NmSUA8BIuO7XlDLdHyhP6pCw9JEq8MSAOhMifM21e1IEZyq6s tUn/VldX1/z7zwHN7sG6Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfedugedguddtlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredtjeenucfhrhhomheplfhi rgiguhhnucgjrghnghcuoehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhmqe enucggtffrrghtthgvrhhnpefgleegfeekgeeggeeifeethfejjefhuddvleelheetveek tdehgeeghefhffegteenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhirgiguhhnrdihrghn ghesfhhlhihgohgrthdrtghomh X-ME-Proxy: Feedback-ID: ifd894703:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 2 Feb 2024 13:21:53 -0500 (EST) From: Jiaxun Yang Date: Fri, 02 Feb 2024 18:21:40 +0000 Subject: [PATCH 1/8] MIPS: Probe toolchain support of -msym32 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240202-llvm-msym32-v1-1-52f0631057d6@flygoat.com> References: <20240202-llvm-msym32-v1-0-52f0631057d6@flygoat.com> In-Reply-To: <20240202-llvm-msym32-v1-0-52f0631057d6@flygoat.com> To: Thomas Bogendoerfer , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Jiaxun Yang X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=753; i=jiaxun.yang@flygoat.com; h=from:subject:message-id; bh=G7pEwmE2rBW0Y6l+YNkudDnlODmTUfzEzQVNoJ8fF9c=; b=owGbwMvMwCXmXMhTe71c8zDjabUkhtS9RrsNmDc1yE7SXiVesZxhCmt20av+NeUXthrxHjZcN /+9vqpFRwkLgxgXg6yYIkuIgFLfhsaLC64/yPoDM4eVCWQIAxenAEyE8ycjw3O32RMmsbVfTb5w YmXt838fOa5zb1xxRdlUfKW72wHnLfMZflxrcFzIkqgYr8a0PvDEvDWyu2zzfyg8Fbp3WnJtN58 nHwA= X-Developer-Key: i=jiaxun.yang@flygoat.com; a=openpgp; fpr=980379BEFEBFBF477EA04EF9C111949073FC0F67 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789812523604916681 X-GMAIL-MSGID: 1789812523604916681 msym32 is not supported by LLVM toolchain. Workaround by probe toolchain support of msym32 for KBUILD_SYM32 feature. Link: https://github.com/ClangBuiltLinux/linux/issues/1544 Signed-off-by: Jiaxun Yang --- arch/mips/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/Makefile b/arch/mips/Makefile index f49807e1f19b..0888074f4dfe 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -299,7 +299,7 @@ drivers-$(CONFIG_PCI) += arch/mips/pci/ ifdef CONFIG_64BIT ifndef KBUILD_SYM32 ifeq ($(shell expr $(load-y) \< 0xffffffff80000000), 0) - KBUILD_SYM32 = y + KBUILD_SYM32 = $(call cc-option-yn, -msym32) endif endif From patchwork Fri Feb 2 18:21:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 195975 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp616433dyc; Fri, 2 Feb 2024 10:23:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IE+nA/bE2JSPM/AiWIk8wc2be2DAYthtRVclI6cWzF4+Rz0iNlsXvEc7nkcGrk5X87OapqH X-Received: by 2002:a17:906:2819:b0:a36:7dd8:637f with SMTP id r25-20020a170906281900b00a367dd8637fmr2213433ejc.23.1706898181583; Fri, 02 Feb 2024 10:23:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706898181; cv=pass; d=google.com; s=arc-20160816; b=vt6HjmqeuZSJiCPtSJFxtAvLVkaKYberYbul+phhDl+tNKXDN7+q3HGN8Djoddahqp qfMyum7rfDO7GojxlTXIemfUkJebaRzyCQ3+mPJ3FwgioEkc5n+EFp8Omja7maGstsqt on0o7Rrz3u45dNqEusLnEv4UckIL6nkYtFNWm6e4tYTjIniB3MQpDN9PrzHdXqe3r3kp W3MUIJSn1GuEpDIz663cbgjFmJ1hRgi29+Ql43ufRd8wpG/7PrS5bNgI7zc36yo1r3+N uVa4dd5klCmFuwWnN0uKh6wbuN3Jqb5mEqGeLgr09YTsCzbRFck3sblQntufhY+B1bRe xSWA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:feedback-id:dkim-signature:dkim-signature; bh=7wgclmPc7Zcc1oFkurQBvEr0p3fHo8FQzvtyaCB6UcM=; fh=o6vcwXVOa2IAAzTlaJz6MrcjSjKfTF6t9SWEqx/+0B4=; b=Taso6HQGnw/5PUG71gcaDq2SkvJK37o1e7OpvJFnCEat81p8DBXOICUWK66To/mq6h ZD+25EgQY9Y39eftsNkhG9ce/VR37TCfRSwmfDO7WV3Y3p9HdDr3srTDijZng2NDH3BL lxRPM8KeKb+21IjR2La5xjDLE0JVM5RnPeLhoopjByfUmYy49MAa+zGAEQPpYoyoWc82 Dty7PsN/jGM9Z9Xqof/Y8lD47uX5CCitwXNzU2vrRp4+jv0G+1oj2vo3CI2hFCAiVIyh xE6D4R825QbRaAK3CagnN6irtpJRpDNkl+YPbr7PB/8UP3Hj2wDeewkE7L60qqHrTGoN NWWw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b="a/bM/jNo"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=W3QCf6yk; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=flygoat.com); spf=pass (google.com: domain of linux-kernel+bounces-50309-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50309-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com X-Forwarded-Encrypted: i=1; AJvYcCXi7HVkJ54ZkZeU78zxgUVo7tBE3JydMyWF1J1RubpumIEUVhIerSAehtsUfRhCJoTxjLAFeWpzCSdPa2GZp8qAkYFNAA== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id rn24-20020a170906d93800b00a353eb7f6d6si1055369ejb.724.2024.02.02.10.23.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 10:23:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50309-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b="a/bM/jNo"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=W3QCf6yk; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=flygoat.com); spf=pass (google.com: domain of linux-kernel+bounces-50309-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50309-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0D26B1F2307D for ; Fri, 2 Feb 2024 18:23:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 34BF31509A9; Fri, 2 Feb 2024 18:22:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b="a/bM/jNo"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="W3QCf6yk" Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2EE79150986; Fri, 2 Feb 2024 18:21:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706898121; cv=none; b=KDH1uyfhhHG49lzIHE8A2PH+ANB0NNHwgvAPexHgSpnehxzapEToXzD3MPKm3ASVxX0g9Xu5cdeZF4iMMN8CRPreXgNA5kmAaxbWPZFQVbBgJvK7iw3VE277tyKPPHcWOFGdR44Pt3eY61nhRO223OAPDiCqIePOklETjGk299g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706898121; c=relaxed/simple; bh=dISe+F7C2E/OK8vn8VrH+/L47GTB4CFDBhY7zPjHwyE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=LswExIEtCbmY+GpuAVY/ARbWLawLCdOUkyweR5OZAYJuEwHj5xMzn4t7xPB2tf8H97ZIrxFHP0PfTq386rJ86undLmXpm4OIf6SUOicGNsJqlMMve+1QsIfDgSPJE9JKgfD6CrMFx6NYH3m2yB+VIBNTgmRndvMXnM7WalzqJqw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=flygoat.com; spf=pass smtp.mailfrom=flygoat.com; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b=a/bM/jNo; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=W3QCf6yk; arc=none smtp.client-ip=64.147.123.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=flygoat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flygoat.com Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 931843200A70; Fri, 2 Feb 2024 13:21:58 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 02 Feb 2024 13:21:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1706898118; x=1706984518; bh=7wgclmPc7Zcc1oFkurQBvEr0p3fHo8FQzvtyaCB6UcM=; b= a/bM/jNoNSVsm0Nm2UZ44k0tDLkXAmooFTyqsy5WYFgpNIxjflRtKgAQL+jRlRbO VvvQooBuwuPU/WEqP7wJOR1csLKT4/Uz4QjOvzEeuwlVH0VsF3UvYyMHv1bhGz57 rqcg4Ap3zwbm23e/b+kB6ANl7rm+oQ3iPbyEym4QIZwDtbZ1JG+L0bLcjIwTE3sf /eRXA/JpGAdcPRTdDCNFJrxBn1o2WPehvRx1aBLoEOi5A/ZKd53oDhAGVzzyM4nY Q0RnxIYGYxPFp/hZ6KiIz9nBsS4dPac8mSntsnzq/s1Ii2kXeueFE4h41/CPtLPu 14MSyL0veMwnJ752dqXyNw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1706898118; x= 1706984518; bh=7wgclmPc7Zcc1oFkurQBvEr0p3fHo8FQzvtyaCB6UcM=; b=W 3QCf6ykzdQJbwC/HRB67d3Hckq0nyXLifBVJyEGkTmdetbQjSCts9lrrPJh14OJs ds3ZX5l7dhWyE/W87iF8bi/l8by5v+9AMrKenSyztD0w8OwJb3noBedKmEkstUJu Rm4XkNve1HJTP9UqoOkmnQmRxIO1DKjgISwwFs18xrqEgibAC3IYvZ11QddbF+ie GzENWcLyWeHA+B8yaVbMzosP7sYOOaUGp9KAio7EJYsC7Y+5Duc2pT6LEwEIOR2y gsqwBbT1BPktYdVrjaBcs/mv1AIO98Vi7QYUThtI3QP/ef1rwpXmOCqBJrzBxkC0 nYhcJWtswOJr7zYyOdmmg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfedugedguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredtjeenucfhrhhomheplfhi rgiguhhnucgjrghnghcuoehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhmqe enucggtffrrghtthgvrhhnpeevudejhfffhfevkefhffekteevgfetjeekuedtudeiheei geefjedtleevjeetudenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhirgiguhhnrdihrghn ghesfhhlhihgohgrthdrtghomh X-ME-Proxy: Feedback-ID: ifd894703:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 2 Feb 2024 13:21:56 -0500 (EST) From: Jiaxun Yang Date: Fri, 02 Feb 2024 18:21:41 +0000 Subject: [PATCH 2/8] MIPS: Remove cc-option checks for -march=octeon Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240202-llvm-msym32-v1-2-52f0631057d6@flygoat.com> References: <20240202-llvm-msym32-v1-0-52f0631057d6@flygoat.com> In-Reply-To: <20240202-llvm-msym32-v1-0-52f0631057d6@flygoat.com> To: Thomas Bogendoerfer , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Jiaxun Yang X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1156; i=jiaxun.yang@flygoat.com; h=from:subject:message-id; bh=dISe+F7C2E/OK8vn8VrH+/L47GTB4CFDBhY7zPjHwyE=; b=owGbwMvMwCXmXMhTe71c8zDjabUkhtS9Rns+XGj/k285+dCeH281Hx8W+tVWu+uLj+8k+wfHm 48uyDil3FHKwiDGxSArpsgSIqDUt6Hx4oLrD7L+wMxhZQIZwsDFKQATMahjZPhw5c/m701u/ow5 W6Z9nspU+fHQgtmBJWHr/n9sn2hUbO7EyNC4aMm9PdLPnF+vEz57rj5mywXeIj4fgemrP5aZWDy w3sUIAA== X-Developer-Key: i=jiaxun.yang@flygoat.com; a=openpgp; fpr=980379BEFEBFBF477EA04EF9C111949073FC0F67 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789812467520934077 X-GMAIL-MSGID: 1789812467520934077 Nowadays our minimal supported GCC/Clang all support -march=octeon. Remove cc-option checks to simplify code. Signed-off-by: Jiaxun Yang --- v0: https://lore.kernel.org/all/20230414080701.15503-6-jiaxun.yang@flygoat.com/ --- arch/mips/Makefile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 0888074f4dfe..daa569ca4372 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -174,10 +174,7 @@ cflags-$(CONFIG_CPU_SB1) += $(call cc-option,-mno-mdmx) cflags-$(CONFIG_CPU_SB1) += $(call cc-option,-mno-mips3d) cflags-$(CONFIG_CPU_R10000) += $(call cc-option,-march=r10000,-march=r8000) \ -Wa,--trap -cflags-$(CONFIG_CPU_CAVIUM_OCTEON) += $(call cc-option,-march=octeon) -Wa,--trap -ifeq (,$(findstring march=octeon, $(cflags-$(CONFIG_CPU_CAVIUM_OCTEON)))) -cflags-$(CONFIG_CPU_CAVIUM_OCTEON) += -Wa,-march=octeon -endif +cflags-$(CONFIG_CPU_CAVIUM_OCTEON) += -march=octeon -Wa,--trap cflags-$(CONFIG_CAVIUM_CN63XXP1) += -Wa,-mfix-cn63xxp1 cflags-$(CONFIG_CPU_BMIPS) += -march=mips32 -Wa,-mips32 -Wa,--trap From patchwork Fri Feb 2 18:21:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 195976 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp616731dyc; Fri, 2 Feb 2024 10:23:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IF0cG7OxvW5ahjH2/6bRk1IBAbHYr/4wcLL52QnsIQZ6xVK2wsag4Yn/5NhrH51MHwZYdou X-Received: by 2002:a05:622a:51:b0:42b:ff78:2033 with SMTP id y17-20020a05622a005100b0042bff782033mr4699129qtw.56.1706898203339; Fri, 02 Feb 2024 10:23:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706898203; cv=pass; d=google.com; s=arc-20160816; b=shP6KYLNoO+kmavC9NRLN3hvQf9Mh6R6nOnnxynSG9acABVPCIynuw8aEz794+mbBZ qc1ixy/lwrlGikf3f4CXtYbh5zO1ubY5rhVqLi0ucq3i5aPlSNV0VlTx0KDAVgj7tJiJ WN8nAb2sSRO7tLWw5T/AMivUpbquXb8HZPKjir+06ikhb2bJ5Cj1pNHW4Mg2wL6tGuJJ Vwza4Ji9DXlgOUbElvL7iW7tFYR0bw7JSBfc7O0G1ZC48UZe4naFmKRo5yu28+2iRX92 BbzmSymTunTG0t3ZQfz1BWxlESsbnRLdvC7IVpgB2Pxxf+nKkwuWYjNHULC/t0tvRRHd rFwQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:feedback-id:dkim-signature:dkim-signature; bh=emcywIphRaq4Lx/jCRr9GZGkq7nczp4uQNYi6N38LSE=; fh=cr1NmbbnA7UOAXejjLYSDUJo9wJz5keh+Or3qDTf9YA=; b=mRI7QxlF6VWUaD5HEPDityAuVLfwjkQLT2KJE9Hp/h89cvIsy3RqshDZ/HCRrkaIuj vzOuh06fG/tOvcsHUx+2yrXg2uAG71PbpvK0qTtD4q+ekcaJHFhOjjmL6dNTEFmJhy1m oBoMHvXq9QIHuCd5Fpeuxf859g3NiOVqXsVwMM9QHINEsTI7dVCfnmzN4q0+JqUIJJ3a wfyROir5yp/loY5C4S4s0k4egfhU5UlaVHs8/RnIM3ELQWBtXF4OUtS2aV2R/jCxv4hQ dgGiFtIK3XrEuO5MrPumoXRrdk43VgBkg9wEdiFg3sJYoAXtZwqMFagspYKDGh/db4H1 pDLw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=NzM2wZlS; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=cfUC+lbU; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=flygoat.com); spf=pass (google.com: domain of linux-kernel+bounces-50310-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50310-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com X-Forwarded-Encrypted: i=1; AJvYcCW1NOu0UyOogd7X/Wu4TZBXsZP5Ek7EMums1vGOhDQUPPMBeMOb+oYu7c115vT37GSCUc6obgcxP2J9vtjbo6wdN0dhZw== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id e1-20020ac84e41000000b0042aa62a9292si2506443qtw.38.2024.02.02.10.23.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 10:23:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50310-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=NzM2wZlS; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=cfUC+lbU; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=flygoat.com); spf=pass (google.com: domain of linux-kernel+bounces-50310-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50310-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 184C71C23CDC for ; Fri, 2 Feb 2024 18:23:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DD73B15144E; Fri, 2 Feb 2024 18:22:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b="NzM2wZlS"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="cfUC+lbU" Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A9F415099F; Fri, 2 Feb 2024 18:22:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706898125; cv=none; b=eATd3mG0a3TRYDFw15spMSR991GRXFEV2fdjhBUPjbsVE+5HEDgaawK+k7DbSqA78X7/v7Dlox8NNzcWeFABlRd7Pwq5NS6XfhWNRtWuVt4RoBCE927iwIQovSzsSK1h2bhH4taKXROcKRpmwPISYcQ1xRRCmkWb+sLBK5h6SVg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706898125; c=relaxed/simple; bh=3pIaTRooovaG0E4dcQJ7FyxUskX83he+uJFNra6jZ64=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NYxxgXaZZUmGhse4rJk4+K6GFZd1ahxolmjwNx6Zjs2+x6nI5KSaCp0ENNqtvdYqmeO4UJsvunIx94yMDqawN9utNfY+tJKxU0iRle5tiKv6XEDa8T6YLnshw8te7ICVznteWGKVaawzPbQg4hW7eHQ90HtEsK4i/ykkDKP0bCo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=flygoat.com; spf=pass smtp.mailfrom=flygoat.com; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b=NzM2wZlS; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=cfUC+lbU; arc=none smtp.client-ip=64.147.123.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=flygoat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flygoat.com Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailout.west.internal (Postfix) with ESMTP id 077E83200AF4; Fri, 2 Feb 2024 13:22:01 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Fri, 02 Feb 2024 13:22:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1706898121; x=1706984521; bh=emcywIphRaq4Lx/jCRr9GZGkq7nczp4uQNYi6N38LSE=; b= NzM2wZlSP0m2rswR4Bg25pV1/EwYtaRgy4INDUAvQPBMHeigpRFLvP0+ZOtdeHe5 FjAhFX6mVycxh3UXVP00PXuYr0CfFyLCYQcV0LLyn5zAOBYEpAr46mtKBcFUfZAo zt7/bgnsV7Kb2SZM5tvyD6QUhe4a4DpO0tU8QoQojOX3PTgtOF7+2z0do+Wefbnn vV7lAHw8BhoCdPVeoIcn+Pmxho68uIleJWwHSnKOWDKSZ6PMkGLADqb5KPx6PNpP GgC6xCIan/valeLe36nxjJhIqkdh1Eo5U9szUNC2vQEk66lOtuFbcpgmpPYcuGGf bjlBNHM1KLumtA+ix9HkTw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1706898121; x= 1706984521; bh=emcywIphRaq4Lx/jCRr9GZGkq7nczp4uQNYi6N38LSE=; b=c fUC+lbU356dfgiCSoob5VJnSnBsmVYoaIQk9xzs07CI9E2S9ep5syv3yJQaqb7GS uqGhtwi5Xsuw8tnHuLx73Ggq+Ve/m0o+1vs79JHmuOBe0TqaF7zBAKvuluYgIra3 ZNci4v4nRuyFVY+I+HzNyNQmHQF4/2mRuuamkLqelhsQA6cU2t6M8Xnn3LYogSjn MWhR9rD+x4IGyZ3JX2jBMoFLOurs2j56A74JLUXegAskK5HWHir8gHhvTJFFpa79 ASGDOch1h/Q15VEUxetKjena36dvjZqZDtn8iFJuqfrv4BIeZvcEQ7oBCvBfPU6U dCUns01DVTzBi1Lbt1s0w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfedugedguddtlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredtjeenucfhrhhomheplfhi rgiguhhnucgjrghnghcuoehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhmqe enucggtffrrghtthgvrhhnpeffveeifeeljeejfeetgfeiueejieffgeeuieegtdekffek geduudduteejleevtdenucffohhmrghinhepghhithhhuhgsrdgtohhmpdhkvghrnhgvlh drohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhm X-ME-Proxy: Feedback-ID: ifd894703:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 2 Feb 2024 13:21:59 -0500 (EST) From: Jiaxun Yang Date: Fri, 02 Feb 2024 18:21:42 +0000 Subject: [PATCH 3/8] MIPS: Fallback CPU -march flag to ISA level if unsupported Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240202-llvm-msym32-v1-3-52f0631057d6@flygoat.com> References: <20240202-llvm-msym32-v1-0-52f0631057d6@flygoat.com> In-Reply-To: <20240202-llvm-msym32-v1-0-52f0631057d6@flygoat.com> To: Thomas Bogendoerfer , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Jiaxun Yang X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=4062; i=jiaxun.yang@flygoat.com; h=from:subject:message-id; bh=3pIaTRooovaG0E4dcQJ7FyxUskX83he+uJFNra6jZ64=; b=owGbwMvMwCXmXMhTe71c8zDjabUkhtS9Rnts7QrWMnn7PVFYoXRr2sJa8bSnH67+32D1YkavW 8sVldwlHaUsDGJcDLJiiiwhAkp9GxovLrj+IOsPzBxWJpAhDFycAjCRrQcZGe6p/Ph06O5q53+i xofyy1Y5RRxXmLWjqcx36s37uTsbdisx/K9S2mThPvWkWE4e26aHNsbee56klf1I5L3g9jNiWcx jOV4A X-Developer-Key: i=jiaxun.yang@flygoat.com; a=openpgp; fpr=980379BEFEBFBF477EA04EF9C111949073FC0F67 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789812490331331533 X-GMAIL-MSGID: 1789812490331331533 LLVM does not implement some of -march options. However those options are not mandatory for kernel to build for those CPUs. Fallback -march CFLAG to ISA level if unsupported by toolchain so we can get those kernel to build with LLVM. Link: https://github.com/ClangBuiltLinux/linux/issues/1544 Reported-by: Nathan Chancellor Signed-off-by: Jiaxun Yang --- v0: https://lore.kernel.org/all/20230414080701.15503-7-jiaxun.yang@flygoat.com/ v1: Fix SB1 arch level to mips64 --- arch/mips/Makefile | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/arch/mips/Makefile b/arch/mips/Makefile index daa569ca4372..91470931a5b8 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -148,10 +148,10 @@ cflags-y += $(call cc-option,-Wa$(comma)-mno-fix-loongson3-llsc,) # # CPU-dependent compiler/assembler options for optimization. # -cflags-$(CONFIG_CPU_R3000) += -march=r3000 -cflags-$(CONFIG_CPU_R4300) += -march=r4300 -Wa,--trap -cflags-$(CONFIG_CPU_R4X00) += -march=r4600 -Wa,--trap -cflags-$(CONFIG_CPU_TX49XX) += -march=r4600 -Wa,--trap +cflags-$(CONFIG_CPU_R3000) += $(call cc-option,-march=r3000,-march=mips1) +cflags-$(CONFIG_CPU_R4300) += $(call cc-option,-march=r4300,-march=mips3) -Wa,--trap +cflags-$(CONFIG_CPU_R4X00) += $(call cc-option,-march=r4600,-march=mips3) -Wa,--trap +cflags-$(CONFIG_CPU_TX49XX) += $(call cc-option,-march=r4600,-march=mips3) -Wa,--trap cflags-$(CONFIG_CPU_MIPS32_R1) += -march=mips32 -Wa,--trap cflags-$(CONFIG_CPU_MIPS32_R2) += -march=mips32r2 -Wa,--trap cflags-$(CONFIG_CPU_MIPS32_R5) += -march=mips32r5 -Wa,--trap -modd-spreg @@ -160,26 +160,30 @@ cflags-$(CONFIG_CPU_MIPS64_R1) += -march=mips64 -Wa,--trap cflags-$(CONFIG_CPU_MIPS64_R2) += -march=mips64r2 -Wa,--trap cflags-$(CONFIG_CPU_MIPS64_R5) += -march=mips64r5 -Wa,--trap cflags-$(CONFIG_CPU_MIPS64_R6) += -march=mips64r6 -Wa,--trap -cflags-$(CONFIG_CPU_P5600) += -march=p5600 -Wa,--trap -modd-spreg -cflags-$(CONFIG_CPU_R5000) += -march=r5000 -Wa,--trap -cflags-$(CONFIG_CPU_R5500) += $(call cc-option,-march=r5500,-march=r5000) \ +cflags-$(CONFIG_CPU_P5600) += $(call cc-option,-march=p5600,-march=mips32r5) \ + -Wa,--trap -modd-spreg +cflags-$(CONFIG_CPU_R5000) += $(call cc-option,-march=r5000,-march=mips4) \ -Wa,--trap -cflags-$(CONFIG_CPU_NEVADA) += $(call cc-option,-march=rm5200,-march=r5000) \ +cflags-$(CONFIG_CPU_R5500) += $(call cc-option,-march=r5500,-march=mips4) \ -Wa,--trap -cflags-$(CONFIG_CPU_RM7000) += $(call cc-option,-march=rm7000,-march=r5000) \ +cflags-$(CONFIG_CPU_NEVADA) += $(call cc-option,-march=rm5200,-march=mips4) \ -Wa,--trap -cflags-$(CONFIG_CPU_SB1) += $(call cc-option,-march=sb1,-march=r5000) \ +cflags-$(CONFIG_CPU_RM7000) += $(call cc-option,-march=rm7000,-march=mips4) \ + -Wa,--trap +cflags-$(CONFIG_CPU_SB1) += $(call cc-option,-march=sb1,-march=mips64) \ -Wa,--trap cflags-$(CONFIG_CPU_SB1) += $(call cc-option,-mno-mdmx) cflags-$(CONFIG_CPU_SB1) += $(call cc-option,-mno-mips3d) -cflags-$(CONFIG_CPU_R10000) += $(call cc-option,-march=r10000,-march=r8000) \ +cflags-$(CONFIG_CPU_R10000) += $(call cc-option,-march=r10000,-march=mips4) \ -Wa,--trap cflags-$(CONFIG_CPU_CAVIUM_OCTEON) += -march=octeon -Wa,--trap cflags-$(CONFIG_CAVIUM_CN63XXP1) += -Wa,-mfix-cn63xxp1 cflags-$(CONFIG_CPU_BMIPS) += -march=mips32 -Wa,-mips32 -Wa,--trap -cflags-$(CONFIG_CPU_LOONGSON2E) += -march=loongson2e -Wa,--trap -cflags-$(CONFIG_CPU_LOONGSON2F) += -march=loongson2f -Wa,--trap +cflags-$(CONFIG_CPU_LOONGSON2E) += \ + $(call cc-option,-march=loongson2e,-march=mips3) -Wa,--trap +cflags-$(CONFIG_CPU_LOONGSON2F) += \ + $(call cc-option,-march=loongson2f,-march=mips3) -Wa,--trap # Some -march= flags enable MMI instructions, and GCC complains about that # support being enabled alongside -msoft-float. Thus explicitly disable MMI. cflags-$(CONFIG_CPU_LOONGSON2EF) += $(call cc-option,-mno-loongson-mmi) From patchwork Fri Feb 2 18:21:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 195977 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp616861dyc; Fri, 2 Feb 2024 10:23:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IFL/u+54cZkwHp9evBMte5PtfvvWuDGNDQzYDW2SUqgbVnMYItgrgXDXeMWXTwzU4De2jAO X-Received: by 2002:a05:620a:170f:b0:785:48a3:6d2e with SMTP id az15-20020a05620a170f00b0078548a36d2emr5924850qkb.23.1706898214318; Fri, 02 Feb 2024 10:23:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706898214; cv=pass; d=google.com; s=arc-20160816; b=sBpXFdEiDDCypuzARogXxwHqBLJf7mdtvNMZDetDFtnZ0ZdLaypDJ3ajAX5SS2ZILZ kk4SSTmbACwkb1tpI2B3d7WtUlvqo8eBUuHQdjpKalmBigk8VUZT4qhCERVMcuy0rs9J AjOdNTr+Yj7F1mea5c9ypFYJIk6h8o1yGK2DpK+Cnr+NEbVLbSEKTlcbfGCl3ON9ppS+ z5/N4WbusKzMVM21zdrTJv9438K1rQZmHFuFD//tcS6L08IRXxIz4N7BOzrsKDwn1IRI ttrnQxSxmyoYH6yTv5nYrkBayqe6B6Iq885q9G4YRHmdFPn7Sjbi3+m8vP0OrTpnrUEL jEdQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:feedback-id:dkim-signature:dkim-signature; bh=Ym9BQIoq4bXHoovH8doDvstMiDl4stxFFOM8v58VZtY=; fh=+kMwoqHXdRh3SGYDgGpB8XAzvO7qMlrTMWAdeOVUF/o=; b=Eq1xUCX00R5Z+xBlnXcqs+5ayNmINxQiPWhg8YwMeps846nEpT/6vLWJFj5zIj+ZHt /dP9YnZbTLdQ3ub6TpCFpsrN/AzxjWmGJGzedespKMA7aDivIMV1eR6K4mYI0cQ+5tiO NDcOh2EhzXS27x/HgL3pObezRGP6PWXIjs9pK+6R6piR6g9VdhaOAyoQ2Pc+tEPLtqNJ gXefbctU9b5ktMKroyNHKaTkaq8z4fvJD2FhNzqIcH8Ihn+m9ftqc+30Y8Ln6YINuSkz 9rKAGJQiLn1KtaYrBQItYtMeUJjJ/qEKezlN0uCrwrkOw5BKbXLiQlDBbs/WHcJS/woC LeRQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=SHXlUraW; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=RP+5UG87; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=flygoat.com); spf=pass (google.com: domain of linux-kernel+bounces-50311-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50311-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com X-Forwarded-Encrypted: i=1; AJvYcCWxhgK7fOPB0fX5O7JHkXM2g3WcncXEk81GYOi0WDQrU9NYAqctY9Yp0NdJksjlY12pLe9eVCc5HmULG/saxL6xpseklA== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d2-20020a05620a240200b00783df78822asi2856495qkn.645.2024.02.02.10.23.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 10:23:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50311-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=SHXlUraW; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=RP+5UG87; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=flygoat.com); spf=pass (google.com: domain of linux-kernel+bounces-50311-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50311-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 213911C23457 for ; Fri, 2 Feb 2024 18:23:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BC994151460; Fri, 2 Feb 2024 18:22:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b="SHXlUraW"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="RP+5UG87" Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD6911509B2; Fri, 2 Feb 2024 18:22:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706898128; cv=none; b=M2zyxCuzVIix7tVkJtir/Jmr9nP2Tb6E9LO65PAQLO4I2GDgOPjDda6q0rmZY1Hrh4VknGWb9sJVjwuVbUr8EWZW6fpXMNJ6du6C8uDNgo3P4mcLETUi3wiZEPPIiPUo8GKtIXuH54KLDNMGPPHSuvrEUXg1QoR3d2Vw2kNb5C4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706898128; c=relaxed/simple; bh=371ht8cjT3hC6+X+HE+TEFeE+DMZEi/5TF0EdLjCURA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GkiDSRl0zCpiivWwXQtH/31hf+RrNHb6RNw0QYpaO4+UH5BqqCnz7pH+M+HlFqT+53C3S/y98tikb2a4jtA2+prOmUohbMPPKpMADGfPQkE7fkTdWQ2tuwoU+iQ3yk8qGonaEGUeBSHZuEZsHun3eQZpvRKPWBUOkUJm56PSTXQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=flygoat.com; spf=pass smtp.mailfrom=flygoat.com; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b=SHXlUraW; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=RP+5UG87; arc=none smtp.client-ip=64.147.123.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=flygoat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flygoat.com Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 440103200B0E; Fri, 2 Feb 2024 13:22:05 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 02 Feb 2024 13:22:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1706898124; x=1706984524; bh=Ym9BQIoq4bXHoovH8doDvstMiDl4stxFFOM8v58VZtY=; b= SHXlUraWZka6/TNeJOUfDuDBLsAUwfvXDABwYa5w968lyAkcF8/ogksmFsgHPhlq FPYbr1Wy/tzCWjC5rC/Nu/CMISobgsutYnnshRq8qw/0WsFLxfrADZmAvw2dYy9N bGeqVz27WR5Xlf8O1RCP0Q8UIGL05mxJSUi45rIy6Nz0WwQu23GPaR7vtMioGEwQ remnxqV3R7/5tkngWJI8pNtgKSs1pjXjUC0k/YhS35dV0rnH2XifZiJR7UgJzoGj GLa1cB9ayIeRLDGUG3nU03D+IroUkAvT3TMTBCTpas/ssTqn9ab2+HfGg4UHUwoR 8U/AKCTZ/XhnM/YYIOl6XA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1706898124; x= 1706984524; bh=Ym9BQIoq4bXHoovH8doDvstMiDl4stxFFOM8v58VZtY=; b=R P+5UG87JVziEs3cMsEp7L76/EopWOB+3bAz2IFUrQ9b/HZZelKG+hpIqOZt7bSgy sz7qkwrcPhGVGjEPclnJlayXe8W4g53/jUWjhlMwinvXVFWiwbTdN965nGSEWE9J HYuXVt33CZeg47VCQxFFdDrnTzhZz0z+ITz+Nf4T7dhgH362ERx22UrVMEheXsQq 872outDP76YKmEQx8l1vWrmhgDSMkoOY1Xpa++Z2V7TMFoxxmhu8AhsShTjC3Q6p 6q93I6Kqplii8hhD90LbykVBSptJhgKvEGXhC1Hf1iAA0TJqgVtwxmZjyYXfRKAN spuEwsyUmnsE64aZxQPmA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfedugedguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredtjeenucfhrhhomheplfhi rgiguhhnucgjrghnghcuoehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhmqe enucggtffrrghtthgvrhhnpedvkeeihfefveekueevteefleffkeegudeghfdtuddugefh ueevgeffgedukeejleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhm X-ME-Proxy: Feedback-ID: ifd894703:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 2 Feb 2024 13:22:03 -0500 (EST) From: Jiaxun Yang Date: Fri, 02 Feb 2024 18:21:43 +0000 Subject: [PATCH 4/8] MIPS: BMIPS: Drop unnecessary assembler flag Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240202-llvm-msym32-v1-4-52f0631057d6@flygoat.com> References: <20240202-llvm-msym32-v1-0-52f0631057d6@flygoat.com> In-Reply-To: <20240202-llvm-msym32-v1-0-52f0631057d6@flygoat.com> To: Thomas Bogendoerfer , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Jiaxun Yang X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1386; i=jiaxun.yang@flygoat.com; h=from:subject:message-id; bh=371ht8cjT3hC6+X+HE+TEFeE+DMZEi/5TF0EdLjCURA=; b=owGbwMvMwCXmXMhTe71c8zDjabUkhtS9RnsMr0qGsOV8PLTcXGSx9VYmzoXG9haPWlNOX037X TWJc+GRjlIWBjEuBlkxRZYQAaW+DY0XF1x/kPUHZg4rE8gQBi5OAZhI8DlGhivTbnh2c6ZuLV/l /m+l00aB45ZiJzsm3l5xvnn747tPT/MzMvTrzxIM2a+TkHZJU/1sPVf0ScdjjIme2/U7mxmP5m5 cwAcA X-Developer-Key: i=jiaxun.yang@flygoat.com; a=openpgp; fpr=980379BEFEBFBF477EA04EF9C111949073FC0F67 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789812501663518623 X-GMAIL-MSGID: 1789812501663518623 Nowadays GCC will always pass -march flag to gas, so there is no need to pass another mips32 flag to assembler. Signed-off-by: Jiaxun Yang --- arch/mips/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 91470931a5b8..5a078c5487d6 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -170,7 +170,7 @@ cflags-$(CONFIG_CPU_NEVADA) += $(call cc-option,-march=rm5200,-march=mips4) \ -Wa,--trap cflags-$(CONFIG_CPU_RM7000) += $(call cc-option,-march=rm7000,-march=mips4) \ -Wa,--trap -cflags-$(CONFIG_CPU_SB1) += $(call cc-option,-march=sb1,-march=mips64) \ +cflags-$(CONFIG_CPU_SB1) += $(call cc-option,-march=sb1,-march=mips64r1) \ -Wa,--trap cflags-$(CONFIG_CPU_SB1) += $(call cc-option,-mno-mdmx) cflags-$(CONFIG_CPU_SB1) += $(call cc-option,-mno-mips3d) @@ -178,7 +178,7 @@ cflags-$(CONFIG_CPU_R10000) += $(call cc-option,-march=r10000,-march=mips4) \ -Wa,--trap cflags-$(CONFIG_CPU_CAVIUM_OCTEON) += -march=octeon -Wa,--trap cflags-$(CONFIG_CAVIUM_CN63XXP1) += -Wa,-mfix-cn63xxp1 -cflags-$(CONFIG_CPU_BMIPS) += -march=mips32 -Wa,-mips32 -Wa,--trap +cflags-$(CONFIG_CPU_BMIPS) += -march=mips32 -Wa,--trap cflags-$(CONFIG_CPU_LOONGSON2E) += \ $(call cc-option,-march=loongson2e,-march=mips3) -Wa,--trap From patchwork Fri Feb 2 18:21:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 195999 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp633679dyc; Fri, 2 Feb 2024 10:54:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IF69135Aszo3qUFN9ECCyw8yfYXIimFYbKsukST1YG8Ps9R6OEbvsEmoalC3JEC2HC774uQ X-Received: by 2002:a05:6a20:3947:b0:19c:6392:bd04 with SMTP id r7-20020a056a20394700b0019c6392bd04mr8248968pzg.12.1706900094716; Fri, 02 Feb 2024 10:54:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706900094; cv=pass; d=google.com; s=arc-20160816; b=tTwqlHiLdUuvoBfp/TYRtcMDUBua7fYGRgc/qWCl+B/OWd5Kutc8v91sU1Rcf6dXEf 9xkxVOY3FcVc9kxOLO5Yq2TOv0nahNaUmSWFlbSej5M3wGuywM57lxX5cwqNHxH+c0Gk /iIOEDPdryrB+857iqng9u00gUwUAus+ltIyInz19OBO2ww508cw0As5gXXtml+kV9q/ 8Ot0nINSmd53DnNGWpL4eve55arc5UCEVsuSrb5adqEkNp/6V24jO6EUEHe+dGwrCCYG mzKz4q5U/vmTlBWliQm+NKskByQD2HescqokT4UbaZWaoUZrky+eJwVOI8TufUAeNNsN I35w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:feedback-id:dkim-signature:dkim-signature; bh=IbdTvmw85NIYEo0qhjhBFbrN8ThSw9KMlRfPR97H1bc=; fh=1oku/jmy/ejkAicLEmvwkjOzXcUwTe1IOwnHzDO6yig=; b=FhUdGAmbq0iTqeSl+UPIxLmo+U6uqFMh998x25uXKji8WecYAlv51tz/bVsHiZd3UE bpwGVwaHkC2yAZ5H00PIYZI5BZchrmsdSNN4qInGoSn6OC8UOIXI4Q2+WXPvSGIsWiKC j1z4mA3Y/W9mce2ZyJI9DPYiqF4qb6SeO5mOcBuxE7ntS/VR5fOivgvo3WrdCVzcmlf1 ZnXs21592hU2dSrUo+0nFVT2J+ntMy/gwIhW+P0agG/aGDw8GnWjN628pYGmew3JT0MQ ednyLLZ3/mO1SRiSEG9uFRt35G3+zIzlNZ8Z+yrXPDaVpXCvNzKIR8O0hoft8b5pfKw5 BvhA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=Wt76hWQR; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=hcUXBHN9; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=flygoat.com); spf=pass (google.com: domain of linux-kernel+bounces-50312-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50312-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com X-Forwarded-Encrypted: i=1; AJvYcCWgSNmmQDH//YbIK36usaT658SMQhUW9Ei8x5oL4RPhfttpV/OvII8mntxqmiq9nVGaQtKl5ChQncs2QU8kGZZMNa/SCA== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id v30-20020a63481e000000b005d6d3897a65si1917631pga.830.2024.02.02.10.54.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 10:54:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50312-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=Wt76hWQR; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=hcUXBHN9; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=flygoat.com); spf=pass (google.com: domain of linux-kernel+bounces-50312-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50312-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C3D2CB2879D for ; Fri, 2 Feb 2024 18:23:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D479914D450; Fri, 2 Feb 2024 18:22:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b="Wt76hWQR"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="hcUXBHN9" Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E0979151450; Fri, 2 Feb 2024 18:22:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706898131; cv=none; b=GgLZKOrRWKDF7smj7mLuLr0LmQe4JNYtjUt1YjswYbthFCXDeH0e0dz29tQxJUd4lSS4vgI654aDwIQM+KDy4ngLSepvnpjP1f5vqPweFSeP5UMFC/oLRG9DPx5SMCs3ne0c9X9wGpEH9RpiebRsWTwalLRaSnNbXLKsaKk5ElI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706898131; c=relaxed/simple; bh=v3fm5XNxNbZ/kFpT9LC1Qs1K1vIdZfDhhfNiJ9dOdaE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hs7ooPchGI9HRFhr0e8a4Nu0eg6iSYgv0YZlaSl3CGwQaLR/YIMJt/foXyRN4Q6/D2LhNA/BJDeT510hYiexai+Ognf74RsBfDkoQgMl+tFKA80kE7SQTIE2GjYzAGfpAjRfveF7hLFVvqkltEy5JgUl+RbLezdw9kR2qvizD2k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=flygoat.com; spf=pass smtp.mailfrom=flygoat.com; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b=Wt76hWQR; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=hcUXBHN9; arc=none smtp.client-ip=64.147.123.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=flygoat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flygoat.com Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 7BE013200AF4; Fri, 2 Feb 2024 13:22:08 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 02 Feb 2024 13:22:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1706898127; x=1706984527; bh=IbdTvmw85NIYEo0qhjhBFbrN8ThSw9KMlRfPR97H1bc=; b= Wt76hWQRf/z6qzsifN5aQvc/i7TEQqwX635opQbW5FK0Lgm5j2VkfDOb8pR/mj/b siYiY7TZgVw7N8zgV5Wxm0oaILZCb4FogLZrXe8ivnyaV0LuG78KJBcxX1UhDUUw mpKhVtWIz8NWZOtSJ7XODFzas90JmE72eohpclqicfhjnX1/IaKQNDdZ0mLQvn3c CmAB18tt/LKh6NMSzCXp/zoP3iM/TFrJr1td57CfD/veez4F/uTpRtzI29ygoH39 /dG1U6YeaXOEyuxa2ZhHJfIrtGP4KAnU8NWRNhq6JE2X0/a2gH0ogDNfBpMYS4yW q5AWGCAFCLIcVSYSJS5WYQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1706898127; x= 1706984527; bh=IbdTvmw85NIYEo0qhjhBFbrN8ThSw9KMlRfPR97H1bc=; b=h cUXBHN915XntnvG8QqbriYHqCCzYzrzyvUp+CHx1R1fKS1ahWmG3zksaPGuOjf1o 5xX1W1hXgGbVUCpDd9j1FTZFi1LvWWW8QKTHvWdRBjt+7G7mc/kD6kHVJn4n09XP /+oZBjG4ylAf4I0gZtSjTzWQFxyJgfkhacAMvv2+qoimjIbiCM5vhXVmsBrwjcld hVUqNuHDnZR/vZksaf5y81VHaQFiylCrB/+noDRRvT833oXluodGXqkHfCjfdDAM Y9W0fbGOitz1MyxCHzcx+lP3LSmntYvRBrekwhKeTCGW9bUT+5q6NFtraW7N+305 030pjC4sLF9qLU1oBuGoQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfedugedguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredtjeenucfhrhhomheplfhi rgiguhhnucgjrghnghcuoehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhmqe enucggtffrrghtthgvrhhnpedvkeeihfefveekueevteefleffkeegudeghfdtuddugefh ueevgeffgedukeejleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhm X-ME-Proxy: Feedback-ID: ifd894703:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 2 Feb 2024 13:22:06 -0500 (EST) From: Jiaxun Yang Date: Fri, 02 Feb 2024 18:21:44 +0000 Subject: [PATCH 5/8] MIPS: Loongson64: test for -march=loongson3a cflag Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240202-llvm-msym32-v1-5-52f0631057d6@flygoat.com> References: <20240202-llvm-msym32-v1-0-52f0631057d6@flygoat.com> In-Reply-To: <20240202-llvm-msym32-v1-0-52f0631057d6@flygoat.com> To: Thomas Bogendoerfer , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Jiaxun Yang X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1172; i=jiaxun.yang@flygoat.com; h=from:subject:message-id; bh=v3fm5XNxNbZ/kFpT9LC1Qs1K1vIdZfDhhfNiJ9dOdaE=; b=owGbwMvMwCXmXMhTe71c8zDjabUkhtS9Rnv4ejglhHL17eUe7177ou1bs0d41Mlm5wWpPXum+ ma1lxV3lLIwiHExyIopsoQIKPVtaLy44PqDrD8wc1iZQIYwcHEKwER6/zD8U+6WiWT+vzPmWs6k 5JsTZp3Iti5/FDDlW2/T5ontQQ18UowMZ0I/7bH98uhg/+WvtmFK2at2FBox7U/ycBWrVNTrddz NDQA= X-Developer-Key: i=jiaxun.yang@flygoat.com; a=openpgp; fpr=980379BEFEBFBF477EA04EF9C111949073FC0F67 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789814473565269355 X-GMAIL-MSGID: 1789814473565269355 Currently march flag is hardcoded to loongson3a for GCC and mips64r2 for clang. We can actually test it to simplify the code. Signed-off-by: Jiaxun Yang --- arch/mips/Makefile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 5a078c5487d6..80aecba24892 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -187,11 +187,8 @@ cflags-$(CONFIG_CPU_LOONGSON2F) += \ # Some -march= flags enable MMI instructions, and GCC complains about that # support being enabled alongside -msoft-float. Thus explicitly disable MMI. cflags-$(CONFIG_CPU_LOONGSON2EF) += $(call cc-option,-mno-loongson-mmi) -ifdef CONFIG_CPU_LOONGSON64 -cflags-$(CONFIG_CPU_LOONGSON64) += -Wa,--trap -cflags-$(CONFIG_CC_IS_GCC) += -march=loongson3a -cflags-$(CONFIG_CC_IS_CLANG) += -march=mips64r2 -endif +cflags-$(CONFIG_CPU_LOONGSON64) += \ + $(call cc-option,-march=loongson3a,-march=mips64r2) -Wa,--trap cflags-$(CONFIG_CPU_LOONGSON64) += $(call cc-option,-mno-loongson-mmi) cflags-$(CONFIG_CPU_R4000_WORKAROUNDS) += $(call cc-option,-mfix-r4000,) From patchwork Fri Feb 2 18:21:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 195980 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp617534dyc; Fri, 2 Feb 2024 10:24:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IESERJogToRvssTqKV6XSkDsYHKDQxtepMCRjHXCtitU/TPC89LJwpjFWCVv/R59orBtW/p X-Received: by 2002:a17:90a:43e2:b0:296:416e:ce88 with SMTP id r89-20020a17090a43e200b00296416ece88mr1961087pjg.49.1706898278827; Fri, 02 Feb 2024 10:24:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706898278; cv=pass; d=google.com; s=arc-20160816; b=vPq5ZzxvdfpEny7xI459oURb4+NYmOZXNxTM4MajPyZMQltZ9/v6sDrBr5DY19QEKN 03lHbNuGsDZIUoCOrTptQxGhVhguWZwqHoIKCgNCe3PzcggIaDhQH08ntXJS6Qn7enKI SdRXR7k8jZUBCaOUiX/ptMb/vifN2N94zQkPOJAgPOgAy2Uzp9VyDBamZBtSFT20rkoy F1vDGTO2F+hhGXzvWWtKImZYMTW/aDGA5NStQwugjCswxyiiSr6J1KwLdYWufSq3VLp+ zuDULlRBbPXkBQXztszORENkFTBqqmbXJnWatguBSMX7P8IYxKGV4E2P9VhDvxeM6gBl M80g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:feedback-id:dkim-signature:dkim-signature; bh=OExBeIhg8SJBJvjWKHPnt5PnhMHFu9TlyU4PxD6rmZk=; fh=r+60zk7CkDr2WMGwyTBtk1SDiIq/nC27y1YbhLH5t+A=; b=F8rL/IJgd8YmsV41ENS2Dk/IWXWG0yiSbSqvPeOjT6f2qUCHHjNScozbCkkGpNF2ys DSgW2XAil31aBQvdTr0w6g75Y0lug4rdjfxawuIHleBNUGMeSlfNwnqQThCmHYvrksOz 7tzmh4S/ttHQA0mxUC4/l0ibyNbI4HIFcQgNn+zDpmSrQUjL5jv4uTgdRVFS1ZAQPsai CUObeIBjx83pED9RKZQ5P/U8Ih6w1b7AzTXKcow7T2hnV7r4pKFQuBbwgCm+iOC1DZAP 0/I3ydJaYRUlgly5UCwRO0jTkMwuDh08gLlnaSObIGQ5+wBqH04xUSHfi9sKBiAovTmk 4AYg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=LAf4uM32; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=U3WdxLjS; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=flygoat.com); spf=pass (google.com: domain of linux-kernel+bounces-50313-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50313-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com X-Forwarded-Encrypted: i=1; AJvYcCXD5ZbWQbU/bnUJR6v6moIqvfSG1+YydUjI2sWWi0oglxW1Y44pj7uD3ozN2ySTYmqiD8V//GDnzaZaqdyCYDQR41ASUA== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id mz2-20020a17090b378200b0028cedacbccdsi305013pjb.53.2024.02.02.10.24.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 10:24:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50313-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=LAf4uM32; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=U3WdxLjS; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=flygoat.com); spf=pass (google.com: domain of linux-kernel+bounces-50313-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50313-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 846B8290A98 for ; Fri, 2 Feb 2024 18:24:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4C935151CD4; Fri, 2 Feb 2024 18:22:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b="LAf4uM32"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="U3WdxLjS" Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 772EB14D44D; Fri, 2 Feb 2024 18:22:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706898134; cv=none; b=Q0L6Twg68e9va/x9QHEQXIjkLO4PfA4Qibzxq/sQIWYBUG9cd1Q/ZKSb2Uh6M6s2lP0ugTqud1+PWXvwXoj7JefY6rbE/Ys6v+2TY5fJu3o4m7MS+wRWsXKb/S7DqqjTG5Y/bsZdV7u/7LIxYMTmXDamkUKmkqNbOVA8sefaQAA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706898134; c=relaxed/simple; bh=N59Bj8/WdhFntIwAd6AT31VUOMyxOe1WmRe/HYmvrls=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=EFlywia5viMkl9iL0GZmyYRmdOZlVPaTQ5OoO8jyvJPdHPX1rO2x97PxusFH/YPcGO4SH9yY8hQvzILFi4yk4C/NYoeCzkUwEbtoMBWdaOON6+mSafaQPs/jgdmwDhRbKZqurud2ueaI3BlaJ843hei8a3hiWdf2LQSkTR9i6kE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=flygoat.com; spf=pass smtp.mailfrom=flygoat.com; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b=LAf4uM32; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=U3WdxLjS; arc=none smtp.client-ip=64.147.123.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=flygoat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flygoat.com Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailout.west.internal (Postfix) with ESMTP id DEB063200B0B; Fri, 2 Feb 2024 13:22:11 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Fri, 02 Feb 2024 13:22:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1706898131; x=1706984531; bh=OExBeIhg8SJBJvjWKHPnt5PnhMHFu9TlyU4PxD6rmZk=; b= LAf4uM325odBgKk2X3ivSYBTTYNzZQCWuJWKsQjcG1jC1El6ojoK0DiaYSz6MBrs NxNvs5XnNcYJ+WRkNn3ee0i/MfGig+pPvibfmmzRb+/WvpeZpokhgXON2AVl0S11 uoZlBqaWUh1iofMGHTBfKEGkpP0lJkJ1Hkc/1EJTMHgyh+RkNDsVvqAhdA6Hu4AA Y4Ofnx1PD1WO8RALj56dmFVTHcGDyjqXQJ4aPeA0nTGu58hRFGOKCwo+bEwUtHmE 50oS1sIVJB1LuRA6sTavr34idiwwD8s2Djhd1NPly0U91A0kPo64cUgD69+U+cCy hCUWflT2WtAxJMCmkm3/FA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1706898131; x= 1706984531; bh=OExBeIhg8SJBJvjWKHPnt5PnhMHFu9TlyU4PxD6rmZk=; b=U 3WdxLjSK7lWM9oJ7/UqRa7tMAjSwGJkP6JotbNOrEdmGPehJEfRB2JoB/c3/RmzO wqkMLmpiFXW6C+FFri1uM0ZllM315CTekH9Y0+WDk7lDtIvNBoyThvyN1FH/gD5e GQnBWKxXbr1Gl0hurii5pOLrFktchlMxSNlJv/OeJXBq8k5Dc2OPDCHfeLPBnBex k431ma2PqwlPIlKy7ks7NZ8Uost+1XLCDW1sO64S7tE3v5rgvKk7gqzEQRrH8UsP zwDK8wm4t3pJNq28fBD7t9AQ1g67UggtKNY45+OskTLzNeOpWISP6Vh99KhZ3ceR 0rITwX5U0uzAz18wYV1Hg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfedugedguddtlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredtjeenucfhrhhomheplfhi rgiguhhnucgjrghnghcuoehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhmqe enucggtffrrghtthgvrhhnpeevudejhfffhfevkefhffekteevgfetjeekuedtudeiheei geefjedtleevjeetudenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhirgiguhhnrdihrghn ghesfhhlhihgohgrthdrtghomh X-ME-Proxy: Feedback-ID: ifd894703:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 2 Feb 2024 13:22:09 -0500 (EST) From: Jiaxun Yang Date: Fri, 02 Feb 2024 18:21:45 +0000 Subject: [PATCH 6/8] MIPS: Limit MIPS_MT_SMP support by ISA reversion Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240202-llvm-msym32-v1-6-52f0631057d6@flygoat.com> References: <20240202-llvm-msym32-v1-0-52f0631057d6@flygoat.com> In-Reply-To: <20240202-llvm-msym32-v1-0-52f0631057d6@flygoat.com> To: Thomas Bogendoerfer , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Jiaxun Yang , Guenter Roeck X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=961; i=jiaxun.yang@flygoat.com; h=from:subject:message-id; bh=N59Bj8/WdhFntIwAd6AT31VUOMyxOe1WmRe/HYmvrls=; b=owGbwMvMwCXmXMhTe71c8zDjabUkhtS9RnvO13XHvSx4mP4hUsvI3d41drnz7bkC4T88Du/0Y J7/gD2so5SFQYyLQVZMkSVEQKlvQ+PFBdcfZP2BmcPKBDKEgYtTACZS28fI8G1ujlNJ00vR6ZJe m47ujC6+98d0MsNBr1lJHw969UikMTAyvJ/zQDpGds+n1etCTS2Wv36tyKAQqbLl+tuDLb86GWR 52AE= X-Developer-Key: i=jiaxun.yang@flygoat.com; a=openpgp; fpr=980379BEFEBFBF477EA04EF9C111949073FC0F67 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789812569405302887 X-GMAIL-MSGID: 1789812569405302887 MIPS MT ASE is only available on ISA between Release 1 and Release 5. Add ISA level dependency to Kconfig to fix build. Reported-by: Guenter Roeck Signed-off-by: Jiaxun Yang --- v0: https://lore.kernel.org/all/20230414080701.15503-8-jiaxun.yang@flygoat.com/ --- arch/mips/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 797ae590ebdb..c44358a6d93e 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -2171,7 +2171,8 @@ config CPU_R4K_CACHE_TLB config MIPS_MT_SMP bool "MIPS MT SMP support (1 TC on each available VPE)" default y - depends on SYS_SUPPORTS_MULTITHREADING && !CPU_MIPSR6 && !CPU_MICROMIPS + depends on TARGET_ISA_REV > 0 && TARGET_ISA_REV < 6 + depends on SYS_SUPPORTS_MULTITHREADING && !CPU_MICROMIPS select CPU_MIPSR2_IRQ_VI select CPU_MIPSR2_IRQ_EI select SYNC_R4K From patchwork Fri Feb 2 18:21:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 195979 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp617530dyc; Fri, 2 Feb 2024 10:24:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IF1Trr9+qhufkhYsdskqeawP8RWRXJKuySqqe30rOa5tdz3X5oNjcpgghZJoB2f5VmL4s1F X-Received: by 2002:a17:906:40d4:b0:a37:2f9f:f684 with SMTP id a20-20020a17090640d400b00a372f9ff684mr659348ejk.36.1706898278113; Fri, 02 Feb 2024 10:24:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706898278; cv=pass; d=google.com; s=arc-20160816; b=Ch1pnRHuzLw00xxzTfNLCkYEusWwqnHdghivP8cEk/sTPqrKuZvxbl84qajQOURRB6 f2rj4MJympc3IlY+NlVNiPFmLqYocQ5h6oR/ncDpqLYYkUukwlfzl8kppZEKNEUuukmt oeq4tzWQwMfGCHRkP4GbMGQnD/7Ht3uZoVMOuZFep3BOjHUccs9DDLpAEjhCLO3FXUaU nacD+5PorbrGd2tlZAqP8C1kOBrUtXhvvuyIaO8UiPmRB9PwUCp2/N25nLFEy/0NW086 FyKEiVr/Az/xJY3kO2t607JjCqKIAO2DilywI1WlbfLfbxVXEiZHVUSVqFhClJqOsUZL F1yg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:feedback-id:dkim-signature:dkim-signature; bh=kN+Tzvk742jUfjiEPOWlEG5RSH0lecf7eek117CaFiA=; fh=M0uZs6WkO0Vm+Mrg5B4dCnoxhhdLSg8UxmOOrJB4Tqs=; b=S/p8Mnolf21HC9Mg3ppWD6ADussRT9ZQcKaFmOYFxFvKDIwILPUEBlHogjT00ptXiN YxdS9ltJlYajn4q6sdY+gkFcGjukLirYMPbEblzDFhrQAWXst5dMVdoCFSvNJgxJSRpI fi7NnwnbEnaIvcHR75MTY5Z7u4bB8KfWOTlGUvnZzujZgnJaO6z1z8UPX7V3YMpwG72t b6whxZOhEljTuJVbA+n0tA9DcEbAGSaCUb4pPzgnxrSfXbWbi+5kHjKVwPVN+M3Z/1Wv Z2n238v81kbBOTkVZoJ1suYZ8g3KZv+WSZ4QeuiVBZIxzj92FHv+uiDWvjYJ7tjuQqRx LYLg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=GbUoij+M; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="wlii2G/A"; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=flygoat.com); spf=pass (google.com: domain of linux-kernel+bounces-50314-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50314-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com X-Forwarded-Encrypted: i=1; AJvYcCVFeDPMOzfSki9Sp0jN2Zo6EqqWI34jbQYf+3ICJ0pWz5r6vajvvKjUIwhKzGD0nM1rU0ATkSa0Rmdq0KkzZ5FQfcRTDg== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id n23-20020a170906379700b00a3655d68679si1033426ejc.24.2024.02.02.10.24.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 10:24:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50314-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=GbUoij+M; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="wlii2G/A"; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=flygoat.com); spf=pass (google.com: domain of linux-kernel+bounces-50314-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50314-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6BC7C1F2742F for ; Fri, 2 Feb 2024 18:24:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 11DFE151CFF; Fri, 2 Feb 2024 18:22:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b="GbUoij+M"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="wlii2G/A" Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF712151CCA; Fri, 2 Feb 2024 18:22:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706898138; cv=none; b=T05XnOa02ZjHJjhFuqvAHys9n8hlOUDsK1SFvHjqreGkKvzp/EHnFn6/4GTXNAORNlwAK8bJNyQwRYraePj7ef6KGMVuWQbhsdAmRhVdHFLbKy04qm63TMmAbVdYyPVzy22P8qkIE+40An5NH5wl1U1v7pKm2jaz9l11YULSt2M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706898138; c=relaxed/simple; bh=YjTBZ8cpVs/d0tQGcFu2zYjjAAYAPyu7887lmJOQ2iU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Ped2MlJ0g5AZleBngik1s+9I+KzS72jmBFJb1XzyvHmiTjxx62lXWEN/QoocAtqsz0J250/sND5fBamnA9sOkNNsd6JmRpcJxRUo/Nd+Lz9PS1HZnFc+1uIdusQtc+ukQ3iS01QEq1PUpuN6efV9RMN4ymi52KBOkFhQE6LpyvY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=flygoat.com; spf=pass smtp.mailfrom=flygoat.com; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b=GbUoij+M; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=wlii2G/A; arc=none smtp.client-ip=64.147.123.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=flygoat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flygoat.com Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailout.west.internal (Postfix) with ESMTP id 89DDA32009F9; Fri, 2 Feb 2024 13:22:15 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Fri, 02 Feb 2024 13:22:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1706898134; x=1706984534; bh=kN+Tzvk742jUfjiEPOWlEG5RSH0lecf7eek117CaFiA=; b= GbUoij+MjvOFQVRuR1fAxNyfmNTtxp+clhMLSING46NCslU+6U7444eBHNk3HRl0 JIO+fNocEN2P4I2LI35qAdWqB+qajv5ONsYUwbvxpMtkza58o4UOZ3hCXdjh8ntx SzDdAdQDo0N2GH5WTMh1QZk/tSOc7vMzWocmUqb0lTjXSqi/PCOUlCBDf4wIX0c4 SPmbrbKekCM9kLD2J0dyicUHCaMp8QwzkZ2r+4RkmkDBUgl/y/0LW4sGLO21RNpH /iAu7WCCi2o5nCq1JI7AXZbOeJWMIcZ+heIzUtcV4j9D9qGVLDfDCQsY6RsapAUC m2MNn9DWFzwBUoIEAc9IXg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1706898134; x= 1706984534; bh=kN+Tzvk742jUfjiEPOWlEG5RSH0lecf7eek117CaFiA=; b=w lii2G/AkTHFNikbzma7hXrHneyHSpGF2RQwkl7QGMHMhaqP130LlhCoXTIsW2qOq X35WEDA6srrRHteoR8Qzj+Ej1vgSGgpxg2wRMLdwufCHpcGgXYT3yjPknCO1+u8O JvumKQ2cqwAwrtP5iVWkYYeu8BOHYwUViiYM7CA2X3NLi3XDQYa4poj1b/JhyBjO 26oA0dagSgttwK0BFbEcGfqF1aiHZdBz5j3YJG/zDmJbU8itqyoNwbeU2BaU18Aw GLsdFGWWJpYVXVccm1UfqygphNP64doiIsG2gNhE+HYmkhOypP/IF2js5VeUeWp1 SIhblYvOyAzE7AFFyoOAA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfedugedguddtlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhfffugggtgffkfhgjvfevofesthekredtredtjeenucfhrhhomheplfhi rgiguhhnucgjrghnghcuoehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhmqe enucggtffrrghtthgvrhhnpeevveetheeggfegjeekjedttdetueeludehveejgfejtedv hfdugeetgfelhfevkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhm X-ME-Proxy: Feedback-ID: ifd894703:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 2 Feb 2024 13:22:13 -0500 (EST) From: Jiaxun Yang Date: Fri, 02 Feb 2024 18:21:46 +0000 Subject: [PATCH 7/8] MIPS: Implement microMIPS MT ASE helpers Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240202-llvm-msym32-v1-7-52f0631057d6@flygoat.com> References: <20240202-llvm-msym32-v1-0-52f0631057d6@flygoat.com> In-Reply-To: <20240202-llvm-msym32-v1-0-52f0631057d6@flygoat.com> To: Thomas Bogendoerfer , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Jiaxun Yang X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=14695; i=jiaxun.yang@flygoat.com; h=from:subject:message-id; bh=YjTBZ8cpVs/d0tQGcFu2zYjjAAYAPyu7887lmJOQ2iU=; b=owGbwMvMwCXmXMhTe71c8zDjabUkhtS9Rnv4OWzvTmaJkpXasfP1xvsTJq2O6o/PuOj34MCW8 1eK71240FHKwiDGxSArpsgSIqDUt6Hx4oLrD7L+wMxhZQIZwsDFKQATudbAyPBVbbdhRtW+3evD GcuOPF72sexd69Zbgdeb+jaYsa2pqrrAyDD5gwzDQc0+XusCr+BVFatq42Z7vU3cqRml2DPtzSr uHC4A X-Developer-Key: i=jiaxun.yang@flygoat.com; a=openpgp; fpr=980379BEFEBFBF477EA04EF9C111949073FC0F67 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789812569081581631 X-GMAIL-MSGID: 1789812569081581631 Implement various microMIPS MT ASE helpers accroading to: MIPS® Architecture for Programmers Volume IV-f: The MIPS® MT Module for the microMIPS32™ Architecture Fixes build error: {standard input}:2616: Error: branch to a symbol in another ISA mode This make MT ASE available on microMIPS as well. Boot tested on M5150 with microMIPS enabled on M5150. Signed-off-by: Jiaxun Yang --- v1: MTTGPR takes register name as rt --- arch/mips/include/asm/asmmacro.h | 22 ++-- arch/mips/include/asm/mipsmtregs.h | 256 ++++++++++++++++++++++--------------- arch/mips/include/asm/mipsregs.h | 9 ++ arch/mips/kernel/vpe-mt.c | 4 +- 4 files changed, 179 insertions(+), 112 deletions(-) diff --git a/arch/mips/include/asm/asmmacro.h b/arch/mips/include/asm/asmmacro.h index 067a635d3bc8..18c2ae58cdf3 100644 --- a/arch/mips/include/asm/asmmacro.h +++ b/arch/mips/include/asm/asmmacro.h @@ -216,27 +216,33 @@ * Temporary until all gas have MT ASE support */ .macro DMT reg=0 - .word 0x41600bc1 | (\reg << 16) + insn_if_mips 0x41600bc1 | (\reg << 16) + insn32_if_mm 0x0000057C | (\reg << 21) .endm .macro EMT reg=0 - .word 0x41600be1 | (\reg << 16) + insn_if_mips 0x41600be1 | (\reg << 16) + insn32_if_mm 0x0000257C | (\reg << 21) .endm .macro DVPE reg=0 - .word 0x41600001 | (\reg << 16) + insn_if_mips 0x41600001 | (\reg << 16) + insn32_if_mm 0x0000157C | (\reg << 21) .endm .macro EVPE reg=0 - .word 0x41600021 | (\reg << 16) + insn_if_mips 0x41600021 | (\reg << 16) + insn32_if_mm 0x0000357C | (\reg << 21) .endm - .macro MFTR rt=0, rd=0, u=0, sel=0 - .word 0x41000000 | (\rt << 16) | (\rd << 11) | (\u << 5) | (\sel) + .macro MFTR rs=0, rt=0, u=0, sel=0 + insn_if_mips 0x41000000 | (\rt << 16) | (\rs << 11) | (\u << 5) | (\sel) + insn32_if_mm 0x0000000E | (\rt << 21) | (\rs << 16) | (\u << 10) | (\sel << 4) .endm - .macro MTTR rt=0, rd=0, u=0, sel=0 - .word 0x41800000 | (\rt << 16) | (\rd << 11) | (\u << 5) | (\sel) + .macro MTTR rt=0, rs=0, u=0, sel=0 + insn_if_mips 0x41800000 | (\rt << 16) | (\rs << 11) | (\u << 5) | (\sel) + insn32_if_mm 0x00000006 | (\rt << 21) | (\rs << 16) | (\u << 10) | (\sel << 4) .endm #ifdef TOOLCHAIN_SUPPORTS_MSA diff --git a/arch/mips/include/asm/mipsmtregs.h b/arch/mips/include/asm/mipsmtregs.h index a8d67c2f4f7b..30e86861c206 100644 --- a/arch/mips/include/asm/mipsmtregs.h +++ b/arch/mips/include/asm/mipsmtregs.h @@ -189,19 +189,24 @@ static inline unsigned core_nvpes(void) return ((conf0 & MVPCONF0_PVPE) >> MVPCONF0_PVPE_SHIFT) + 1; } +#define _ASM_SET_DVPE \ + _ASM_MACRO_1R(dvpe, rt, \ + _ASM_INSN_IF_MIPS(0x41600001 | __rt << 16) \ + _ASM_INSN32_IF_MM(0x0000157C | __rt << 21)) +#define _ASM_UNSET_DVPE ".purgem dvpe\n\t" + static inline unsigned int dvpe(void) { int res = 0; __asm__ __volatile__( - " .set push \n" - " .set noreorder \n" - " .set noat \n" - " .set mips32r2 \n" - " .word 0x41610001 # dvpe $1 \n" - " move %0, $1 \n" - " ehb \n" - " .set pop \n" + " .set push \n" + " .set "MIPS_ISA_LEVEL" \n" + _ASM_SET_DVPE + " dvpe %0 \n" + " ehb \n" + _ASM_UNSET_DVPE + " .set pop \n" : "=r" (res)); instruction_hazard(); @@ -209,16 +214,22 @@ static inline unsigned int dvpe(void) return res; } +#define _ASM_SET_EVPE \ + _ASM_MACRO_1R(evpe, rt, \ + _ASM_INSN_IF_MIPS(0x41600021 | __rt << 16) \ + _ASM_INSN32_IF_MM(0x0000357C | __rt << 21)) +#define _ASM_UNSET_EVPE ".purgem evpe\n\t" + static inline void __raw_evpe(void) { __asm__ __volatile__( - " .set push \n" - " .set noreorder \n" - " .set noat \n" - " .set mips32r2 \n" - " .word 0x41600021 # evpe \n" - " ehb \n" - " .set pop \n"); + " .set push \n" + " .set "MIPS_ISA_LEVEL" \n" + _ASM_SET_EVPE + " evpe $0 \n" + " ehb \n" + _ASM_UNSET_EVPE + " .set pop \n"); } /* Enable virtual processor execution if previous suggested it should be. @@ -232,18 +243,24 @@ static inline void evpe(int previous) __raw_evpe(); } +#define _ASM_SET_DMT \ + _ASM_MACRO_1R(dmt, rt, \ + _ASM_INSN_IF_MIPS(0x41600bc1 | __rt << 16) \ + _ASM_INSN32_IF_MM(0x0000057C | __rt << 21)) +#define _ASM_UNSET_DMT ".purgem dmt\n\t" + static inline unsigned int dmt(void) { int res; __asm__ __volatile__( - " .set push \n" - " .set mips32r2 \n" - " .set noat \n" - " .word 0x41610BC1 # dmt $1 \n" - " ehb \n" - " move %0, $1 \n" - " .set pop \n" + " .set push \n" + " .set "MIPS_ISA_LEVEL" \n" + _ASM_SET_DMT + " dmt %0 \n" + " ehb \n" + _ASM_UNSET_DMT + " .set pop \n" : "=r" (res)); instruction_hazard(); @@ -251,14 +268,21 @@ static inline unsigned int dmt(void) return res; } +#define _ASM_SET_EMT \ + _ASM_MACRO_1R(emt, rt, \ + _ASM_INSN_IF_MIPS(0x41600be1 | __rt << 16) \ + _ASM_INSN32_IF_MM(0x0000257C | __rt << 21)) +#define _ASM_UNSET_EMT ".purgem emt\n\t" + static inline void __raw_emt(void) { __asm__ __volatile__( - " .set push \n" - " .set noreorder \n" - " .set mips32r2 \n" - " .word 0x41600be1 # emt \n" - " ehb \n" + " .set push \n" + " .set "MIPS_ISA_LEVEL" \n" + _ASM_SET_EMT + " emt $0 \n" + _ASM_UNSET_EMT + " ehb \n" " .set pop"); } @@ -276,41 +300,55 @@ static inline void emt(int previous) static inline void ehb(void) { __asm__ __volatile__( - " .set push \n" - " .set mips32r2 \n" - " ehb \n" - " .set pop \n"); + " .set push \n" + " .set "MIPS_ISA_LEVEL" \n" + " ehb \n" + " .set pop \n"); } -#define mftc0(rt,sel) \ +#define _ASM_SET_MFTC0 \ + _ASM_MACRO_2R_1S(mftc0, rs, rt, sel, \ + _ASM_INSN_IF_MIPS(0x41000000 | __rt << 16 | \ + __rs << 11 | \\sel) \ + _ASM_INSN32_IF_MM(0x0000000E | __rt << 21 | \ + __rs << 16 | \\sel << 4)) +#define _ASM_UNSET_MFTC0 ".purgem mftc0\n\t" + +#define mftc0(rt, sel) \ ({ \ - unsigned long __res; \ + unsigned long __res; \ \ __asm__ __volatile__( \ - " .set push \n" \ - " .set mips32r2 \n" \ - " .set noat \n" \ - " # mftc0 $1, $" #rt ", " #sel " \n" \ - " .word 0x41000800 | (" #rt " << 16) | " #sel " \n" \ - " move %0, $1 \n" \ - " .set pop \n" \ + " .set push \n" \ + " .set "MIPS_ISA_LEVEL" \n" \ + _ASM_SET_MFTC0 \ + " mftc0 $1, " #rt ", " #sel " \n" \ + _ASM_UNSET_MFTC0 \ + " .set pop \n" \ : "=r" (__res)); \ \ __res; \ }) +#define _ASM_SET_MFTGPR \ + _ASM_MACRO_2R(mftgpr, rs, rt, \ + _ASM_INSN_IF_MIPS(0x41000020 | __rt << 16 | \ + __rs << 11) \ + _ASM_INSN32_IF_MM(0x0000040E | __rt << 21 | \ + __rs << 16)) +#define _ASM_UNSET_MFTGPR ".purgem mftgpr\n\t" + #define mftgpr(rt) \ ({ \ unsigned long __res; \ \ __asm__ __volatile__( \ - " .set push \n" \ - " .set noat \n" \ - " .set mips32r2 \n" \ - " # mftgpr $1," #rt " \n" \ - " .word 0x41000820 | (" #rt " << 16) \n" \ - " move %0, $1 \n" \ - " .set pop \n" \ + " .set push \n" \ + " .set "MIPS_ISA_LEVEL" \n" \ + _ASM_SET_MFTGPR \ + " mftgpr %0," #rt " \n" \ + _ASM_UNSET_MFTGPR \ + " .set pop \n" \ : "=r" (__res)); \ \ __res; \ @@ -321,35 +359,49 @@ static inline void ehb(void) unsigned long __res; \ \ __asm__ __volatile__( \ - " mftr %0, " #rt ", " #u ", " #sel " \n" \ + " mftr %0, " #rt ", " #u ", " #sel " \n" \ : "=r" (__res)); \ \ __res; \ }) -#define mttgpr(rd,v) \ +#define _ASM_SET_MTTGPR \ + _ASM_MACRO_2R(mttgpr, rt, rs, \ + _ASM_INSN_IF_MIPS(0x41800020 | __rt << 16 | \ + __rs << 11) \ + _ASM_INSN32_IF_MM(0x00000406 | __rt << 21 | \ + __rs << 16)) +#define _ASM_UNSET_MTTGPR ".purgem mttgpr\n\t" + +#define mttgpr(rs, v) \ do { \ __asm__ __volatile__( \ - " .set push \n" \ - " .set mips32r2 \n" \ - " .set noat \n" \ - " move $1, %0 \n" \ - " # mttgpr $1, " #rd " \n" \ - " .word 0x41810020 | (" #rd " << 11) \n" \ - " .set pop \n" \ + " .set push \n" \ + " .set "MIPS_ISA_LEVEL" \n" \ + _ASM_SET_MTTGPR \ + " mttgpr %0, " #rs " \n" \ + _ASM_UNSET_MTTGPR \ + " .set pop \n" \ : : "r" (v)); \ } while (0) -#define mttc0(rd, sel, v) \ +#define _ASM_SET_MTTC0 \ + _ASM_MACRO_2R_1S(mttc0, rt, rs, sel, \ + _ASM_INSN_IF_MIPS(0x41800000 | __rt << 16 | \ + __rs << 11 | \\sel) \ + _ASM_INSN32_IF_MM(0x0000040E | __rt << 21 | \ + __rs << 16 | \\sel << 4)) +#define _ASM_UNSET_MTTC0 ".purgem mttc0\n\t" + +#define mttc0(rs, sel, v) \ ({ \ __asm__ __volatile__( \ - " .set push \n" \ - " .set mips32r2 \n" \ - " .set noat \n" \ - " move $1, %0 \n" \ - " # mttc0 %0," #rd ", " #sel " \n" \ - " .word 0x41810000 | (" #rd " << 11) | " #sel " \n" \ - " .set pop \n" \ + " .set push \n" \ + " .set "MIPS_ISA_LEVEL" \n" \ + _ASM_SET_MTTC0 \ + " mttc0 %0," #rs ", " #sel " \n" \ + _ASM_UNSET_MTTC0 \ + " .set pop \n" \ : \ : "r" (v)); \ }) @@ -371,49 +423,49 @@ do { \ /* you *must* set the target tc (settc) before trying to use these */ -#define read_vpe_c0_vpecontrol() mftc0(1, 1) -#define write_vpe_c0_vpecontrol(val) mttc0(1, 1, val) -#define read_vpe_c0_vpeconf0() mftc0(1, 2) -#define write_vpe_c0_vpeconf0(val) mttc0(1, 2, val) -#define read_vpe_c0_vpeconf1() mftc0(1, 3) -#define write_vpe_c0_vpeconf1(val) mttc0(1, 3, val) -#define read_vpe_c0_count() mftc0(9, 0) -#define write_vpe_c0_count(val) mttc0(9, 0, val) -#define read_vpe_c0_status() mftc0(12, 0) -#define write_vpe_c0_status(val) mttc0(12, 0, val) -#define read_vpe_c0_cause() mftc0(13, 0) -#define write_vpe_c0_cause(val) mttc0(13, 0, val) -#define read_vpe_c0_config() mftc0(16, 0) -#define write_vpe_c0_config(val) mttc0(16, 0, val) -#define read_vpe_c0_config1() mftc0(16, 1) -#define write_vpe_c0_config1(val) mttc0(16, 1, val) -#define read_vpe_c0_config7() mftc0(16, 7) -#define write_vpe_c0_config7(val) mttc0(16, 7, val) -#define read_vpe_c0_ebase() mftc0(15, 1) -#define write_vpe_c0_ebase(val) mttc0(15, 1, val) -#define write_vpe_c0_compare(val) mttc0(11, 0, val) -#define read_vpe_c0_badvaddr() mftc0(8, 0) -#define read_vpe_c0_epc() mftc0(14, 0) -#define write_vpe_c0_epc(val) mttc0(14, 0, val) +#define read_vpe_c0_vpecontrol() mftc0($1, 1) +#define write_vpe_c0_vpecontrol(val) mttc0($1, 1, val) +#define read_vpe_c0_vpeconf0() mftc0($1, 2) +#define write_vpe_c0_vpeconf0(val) mttc0($1, 2, val) +#define read_vpe_c0_vpeconf1() mftc0($1, 3) +#define write_vpe_c0_vpeconf1(val) mttc0($1, 3, val) +#define read_vpe_c0_count() mftc0($9, 0) +#define write_vpe_c0_count(val) mttc0($9, 0, val) +#define read_vpe_c0_status() mftc0($12, 0) +#define write_vpe_c0_status(val) mttc0($12, 0, val) +#define read_vpe_c0_cause() mftc0($13, 0) +#define write_vpe_c0_cause(val) mttc0($13, 0, val) +#define read_vpe_c0_config() mftc0($16, 0) +#define write_vpe_c0_config(val) mttc0($16, 0, val) +#define read_vpe_c0_config1() mftc0($16, 1) +#define write_vpe_c0_config1(val) mttc0($16, 1, val) +#define read_vpe_c0_config7() mftc0($16, 7) +#define write_vpe_c0_config7(val) mttc0($16, 7, val) +#define read_vpe_c0_ebase() mftc0($15, 1) +#define write_vpe_c0_ebase(val) mttc0($15, 1, val) +#define write_vpe_c0_compare(val) mttc0($11, 0, val) +#define read_vpe_c0_badvaddr() mftc0($8, 0) +#define read_vpe_c0_epc() mftc0($14, 0) +#define write_vpe_c0_epc(val) mttc0($14, 0, val) /* TC */ -#define read_tc_c0_tcstatus() mftc0(2, 1) -#define write_tc_c0_tcstatus(val) mttc0(2, 1, val) -#define read_tc_c0_tcbind() mftc0(2, 2) -#define write_tc_c0_tcbind(val) mttc0(2, 2, val) -#define read_tc_c0_tcrestart() mftc0(2, 3) -#define write_tc_c0_tcrestart(val) mttc0(2, 3, val) -#define read_tc_c0_tchalt() mftc0(2, 4) -#define write_tc_c0_tchalt(val) mttc0(2, 4, val) -#define read_tc_c0_tccontext() mftc0(2, 5) -#define write_tc_c0_tccontext(val) mttc0(2, 5, val) +#define read_tc_c0_tcstatus() mftc0($2, 1) +#define write_tc_c0_tcstatus(val) mttc0($2, 1, val) +#define read_tc_c0_tcbind() mftc0($2, 2) +#define write_tc_c0_tcbind(val) mttc0($2, 2, val) +#define read_tc_c0_tcrestart() mftc0($2, 3) +#define write_tc_c0_tcrestart(val) mttc0($2, 3, val) +#define read_tc_c0_tchalt() mftc0($2, 4) +#define write_tc_c0_tchalt(val) mttc0($2, 4, val) +#define read_tc_c0_tccontext() mftc0($2, 5) +#define write_tc_c0_tccontext(val) mttc0($2, 5, val) /* GPR */ -#define read_tc_gpr_sp() mftgpr(29) -#define write_tc_gpr_sp(val) mttgpr(29, val) -#define read_tc_gpr_gp() mftgpr(28) -#define write_tc_gpr_gp(val) mttgpr(28, val) +#define read_tc_gpr_sp() mftgpr($29) +#define write_tc_gpr_sp(val) mttgpr($29, val) +#define read_tc_gpr_gp() mftgpr($28) +#define write_tc_gpr_gp(val) mttgpr($28, val) __BUILD_SET_C0(mvpcontrol) diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h index ec58cb76d076..dfb268f8aef8 100644 --- a/arch/mips/include/asm/mipsregs.h +++ b/arch/mips/include/asm/mipsregs.h @@ -1307,6 +1307,15 @@ static inline int mm_insn_16bit(u16 insn) * the ENC encodings. */ +/* Instructions with 1 register operand */ +#define _ASM_MACRO_1R(OP, R1, ENC) \ + ".macro " #OP " " #R1 "\n\t" \ + _ASM_SET_PARSE_R \ + "parse_r __" #R1 ", \\" #R1 "\n\t" \ + ENC \ + _ASM_UNSET_PARSE_R \ + ".endm\n\t" + /* Instructions with 1 register operand & 1 immediate operand */ #define _ASM_MACRO_1R1I(OP, R1, I2, ENC) \ ".macro " #OP " " #R1 ", " #I2 "\n\t" \ diff --git a/arch/mips/kernel/vpe-mt.c b/arch/mips/kernel/vpe-mt.c index 667bc75f6420..84124ac2d2a5 100644 --- a/arch/mips/kernel/vpe-mt.c +++ b/arch/mips/kernel/vpe-mt.c @@ -95,8 +95,8 @@ int vpe_run(struct vpe *v) * We don't pass the memsize here, so VPE programs need to be * compiled with DFLT_STACK_SIZE and DFLT_HEAP_SIZE defined. */ - mttgpr(7, 0); - mttgpr(6, v->ntcs); + mttgpr($7, 0); + mttgpr($6, v->ntcs); /* set up VPE1 */ /* From patchwork Fri Feb 2 18:21:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 195981 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp617553dyc; Fri, 2 Feb 2024 10:24:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IFDovdIC6/Jb3PU/OCXcYjeWzIxgdJ61alkspJUd0d4Es9k5Cv+mxllg2f8dkEfVhco0vSy X-Received: by 2002:a17:906:cc47:b0:a37:20be:edaf with SMTP id mm7-20020a170906cc4700b00a3720beedafmr1174520ejb.62.1706898280445; Fri, 02 Feb 2024 10:24:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706898280; cv=pass; d=google.com; s=arc-20160816; b=zuKzjPgnr9HxY3AWFYtptdjGUFqSJqg9z6pKBTEW7q5/X21U4prs77OhXswu9SY6cS +6I7A5gJ9DzNrkd+NvXp4x93Y0iSz+rauVhtm52e6pcg83i6iii9fMKDzUCBHrE5zQUa l+4XIH89tbSJnbRhaJFGu5i3ue0WxNwxTpxRU+3jcR9MV1OP9gCZ6xtcQxlRf3u2HVbD +pLChrFbkykG5uztsEdHz9ODOcplcBqygsIWe/rg1wyWrq5e9s7jFhydyJGYtaLGmW5I 12wvx6sqT2NDc0Zp0mdM+voR2I12uOOwad4YeUIfvIUKZrCvfp2jEW44GfKWojViJpRd Cahw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:feedback-id:dkim-signature:dkim-signature; bh=uKviyZxmRZlj3pVPOpppzhplKj0Xg++k94Zg3QVf1wI=; fh=A3hyODdamMG2h65VIgmiT/6IhQYVUMGNohwVEfm3mCY=; b=bvJyv9ZUJJzx83A+5X/ntC4J/E6l89yNwThWwoaBNHGlLY8AY0MH62qrlbc4ZtnqSd QefBuZ1QOp7/xYCsms0MfziAN3JBZnpNZLHaftJs3JfGZYHD7kUfoDWRvGDcTrxILRG3 UcQazzvNXZmTmiJ4A54hTuU9bXpmUUy5ht1ZfDGI86jrsE37JpyXskTHJvl5COVs8aGF PwCFhir2JjPLq23YTBdfcJMVf2zoO2F1WyT7tZl2YYKiQsbNKbd1RyeEtJ8rDJr4IBiD 7QC4oUkNjpUMbzdAcdwvG+/NKkvnRttHNm5zyM4X5jfGXBKALTcy1VUyvGEMfki6RmrE drGw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=cm7td9MG; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=iYYrscqS; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=flygoat.com); spf=pass (google.com: domain of linux-kernel+bounces-50315-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50315-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com X-Forwarded-Encrypted: i=1; AJvYcCXymwEsMGYHhcguUc376c7LrJVUMv+u4r2nRhoFsApycHs8k6vbxvcBnEuV/rwS1LIcs3bNBndv0rTsd8qoWw2qu3ob7g== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id b7-20020a170906660700b00a352bbd232bsi1021916ejp.74.2024.02.02.10.24.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 10:24:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50315-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=cm7td9MG; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=iYYrscqS; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=flygoat.com); spf=pass (google.com: domain of linux-kernel+bounces-50315-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50315-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 11AA21F2723A for ; Fri, 2 Feb 2024 18:24:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9E8E8151CFD; Fri, 2 Feb 2024 18:22:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b="cm7td9MG"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="iYYrscqS" Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6B6A8151CD3; Fri, 2 Feb 2024 18:22:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706898141; cv=none; b=d4wgiQTn7TPTS5meaU9f1/gOiIEexE08rhLgV7Q+jZHGdvJCtktpZxocXC2BlWMD6c/QyPbujFBk8VwW82t03NH0YnMZiTZQWg9w9sHcduTWckT3HJ0WJo7JQ6nqIejobNQamTTq0qtW7jiOZvy7QvDdvkrXWndY/9kw2dX0yZ4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706898141; c=relaxed/simple; bh=K9jVRbvoC4pJRRadOkCl26uHM4IaJfzZZjnpU9UIQlI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=E00locpeGTXvbJKuk1bld3utHsB20Z23Y+k7CQ7xaWpyBJkH3p/Nt5e0lB7JtoX13z0iLj7fGjWZR/tttUS3x2AFJh1BjHamc1QkHIUjHN/aluesUnQktIdqG0NRRvybukQXadegbumhKpe6UsUHP2zOCIYLV1GysFjfCLLC6TQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=flygoat.com; spf=pass smtp.mailfrom=flygoat.com; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b=cm7td9MG; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=iYYrscqS; arc=none smtp.client-ip=64.147.123.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=flygoat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flygoat.com Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailout.west.internal (Postfix) with ESMTP id E4FD83200B13; Fri, 2 Feb 2024 13:22:18 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Fri, 02 Feb 2024 13:22:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1706898138; x=1706984538; bh=uKviyZxmRZlj3pVPOpppzhplKj0Xg++k94Zg3QVf1wI=; b= cm7td9MG9Y0Ih5bS8N1IdVzpxEnNuBFXWN4k4kQMXLTOt3kn2TDPR2w83+A2SwJs i/Bu3IQJN8V1sFnygjrWDc0V1qcwDG7Eq2yWDyG5KH9MMRgXLHuWtzHK0O3OXMJ2 AJIPJ2j9nt67+PL42GA2R9YZAlF4jpD/AYJUMV1BTnkZlK3bLT6Ziq0+h9BwCmyy fHL4Wr4yROgmXsqJyUAlAfKfqThocYySejOwmx/nGRq0tUAICFOz1BMsyX4v53oL McRiYKXO7bz8aPeCqopQ8llkIOSnm5z4ZKsQBukbxQQ3N8zAWqYTBgvEl3PNZ0RC DJ+88OmYQIa0bTnszXPxmg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1706898138; x= 1706984538; bh=uKviyZxmRZlj3pVPOpppzhplKj0Xg++k94Zg3QVf1wI=; b=i YYrscqSSFgaGXnSReDw9COKFJ2bE0PA6VgUdnYCSqj8jO61kv9APmJxILqP1kJ/P mxoegijWoBnoZMWdTG8v+Xbuv4qbhTDYdYCJvOoF9Uz3dNktBKNGLPkQEVVtsJqy NIxF9V1S244Xv7kLUROOXVzSxfgmU3ymvFQ05GdVHwp5sT+3QQm2p/A2oNE2bwV7 vR/Q0VNsIIjh37DusIs5aS83o6fct3iWhOrodXPkQQnB3oWyce4H7qeuvDw8k5ui D0HF0yc/HEeP1Hf4lBMNHRdl+W40KpCw5bQLGDUAZxTfTYEUtbdHCx+tL44vShiF 9jXiqEPeUDrIi9NAJpHRA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfedugedguddtlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredtjeenucfhrhhomheplfhi rgiguhhnucgjrghnghcuoehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhmqe enucggtffrrghtthgvrhhnpedvkeeihfefveekueevteefleffkeegudeghfdtuddugefh ueevgeffgedukeejleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhm X-ME-Proxy: Feedback-ID: ifd894703:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 2 Feb 2024 13:22:16 -0500 (EST) From: Jiaxun Yang Date: Fri, 02 Feb 2024 18:21:47 +0000 Subject: [PATCH 8/8] MIPS: mipsregs: Set proper ISA level for virt extensions Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240202-llvm-msym32-v1-8-52f0631057d6@flygoat.com> References: <20240202-llvm-msym32-v1-0-52f0631057d6@flygoat.com> In-Reply-To: <20240202-llvm-msym32-v1-0-52f0631057d6@flygoat.com> To: Thomas Bogendoerfer , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Jiaxun Yang X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=2256; i=jiaxun.yang@flygoat.com; h=from:subject:message-id; bh=K9jVRbvoC4pJRRadOkCl26uHM4IaJfzZZjnpU9UIQlI=; b=owGbwMvMwCXmXMhTe71c8zDjabUkhtS9Rnu2nixsmCM6O+rPS4duvg/WzatLZL9zHnsst0Ne4 87kaUW7O0pZGMS4GGTFFFlCBJT6NjReXHD9QdYfmDmsTCBDGLg4BWAiH2IYGW4+uxO2UihTf96V q4adJ4scPk6f23Z618q+KHvBQ2eKNasZGe6IH1jJb1rA7McmvyxwUcykieyV8squk3UdpL7sXB+ pzAAA X-Developer-Key: i=jiaxun.yang@flygoat.com; a=openpgp; fpr=980379BEFEBFBF477EA04EF9C111949073FC0F67 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789812570820222916 X-GMAIL-MSGID: 1789812570820222916 c994a3ec7ecc ("MIPS: set mips32r5 for virt extensions") setted some instructions in virt extensions to ISA level mips32r5. However TLB related vz instructions was leftover, also this shouldn't be done to a R5 or R6 kernel buid. Reorg macros to set ISA level as needed when _ASM_SET_VIRT is called. Signed-off-by: Jiaxun Yang --- arch/mips/include/asm/mipsregs.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h index dfb268f8aef8..6e97811fa936 100644 --- a/arch/mips/include/asm/mipsregs.h +++ b/arch/mips/include/asm/mipsregs.h @@ -2087,7 +2087,14 @@ do { \ _ASM_INSN_IF_MIPS(0x4200000c) \ _ASM_INSN32_IF_MM(0x0000517c) #else /* !TOOLCHAIN_SUPPORTS_VIRT */ -#define _ASM_SET_VIRT ".set\tvirt\n\t" +#if MIPS_ISA_REV >= 5 +#define _ASM_SET_VIRT_ISA +#elif defined(CONFIG_64BIT) +#define _ASM_SET_VIRT_ISA ".set\tmips64r5\n\t" +#else +#define _ASM_SET_VIRT_ISA ".set\tmips32r5\n\t" +#endif +#define _ASM_SET_VIRT _ASM_SET_VIRT_ISA ".set\tvirt\n\t" #define _ASM_SET_MFGC0 _ASM_SET_VIRT #define _ASM_SET_DMFGC0 _ASM_SET_VIRT #define _ASM_SET_MTGC0 _ASM_SET_VIRT @@ -2108,7 +2115,6 @@ do { \ ({ int __res; \ __asm__ __volatile__( \ ".set\tpush\n\t" \ - ".set\tmips32r5\n\t" \ _ASM_SET_MFGC0 \ "mfgc0\t%0, " #source ", %1\n\t" \ _ASM_UNSET_MFGC0 \ @@ -2122,7 +2128,6 @@ do { \ ({ unsigned long long __res; \ __asm__ __volatile__( \ ".set\tpush\n\t" \ - ".set\tmips64r5\n\t" \ _ASM_SET_DMFGC0 \ "dmfgc0\t%0, " #source ", %1\n\t" \ _ASM_UNSET_DMFGC0 \ @@ -2136,7 +2141,6 @@ do { \ do { \ __asm__ __volatile__( \ ".set\tpush\n\t" \ - ".set\tmips32r5\n\t" \ _ASM_SET_MTGC0 \ "mtgc0\t%z0, " #register ", %1\n\t" \ _ASM_UNSET_MTGC0 \ @@ -2149,7 +2153,6 @@ do { \ do { \ __asm__ __volatile__( \ ".set\tpush\n\t" \ - ".set\tmips64r5\n\t" \ _ASM_SET_DMTGC0 \ "dmtgc0\t%z0, " #register ", %1\n\t" \ _ASM_UNSET_DMTGC0 \