Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5346359rwl; Tue, 11 Apr 2023 04:15:47 -0700 (PDT) X-Google-Smtp-Source: AKy350YFJ80zKSGGbkG+JXokNCGawIGtACtJSu43WdvpjXUsLCKgSZQ0ZpcGQ/nePJatbySVBOSk X-Received: by 2002:a17:907:c23:b0:94a:6cc0:aa09 with SMTP id ga35-20020a1709070c2300b0094a6cc0aa09mr9408042ejc.9.1681211746762; Tue, 11 Apr 2023 04:15:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681211746; cv=none; d=google.com; s=arc-20160816; b=ZjUuCZJIsu7cTyjbCbgqdIMn34QC406FyfuvA31ctljLj4gSPeEuP0TXCIXMGMz9f6 anZLjk2A4MFGPr7T0RcEUqHq0hgFMquiiEe+TypVv4Ahus9LR4a2E/nosccnhS8u+fuq /KZpqNnwcSOfqkpCMzM17A3otyuTzoB1IdkdFiyW999vxVNyysZYbTrTNwjKw3L5WncQ rwdoc8DTaEmW/xvfd8m2zysOpYg7F3WqDWYwZDnooHlXC+XOFOOAjntB7ZGpxSi4GBWv OOAyRq5g6tUviWAwsiQFZcQDjsAyl4GPn3/32PMrIP4wbJitCn/mXbDmDwPTBI9MwNnM lJVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :feedback-id:dkim-signature:dkim-signature; bh=nTO6Ylpmk7/Iff7I5htSerd/uHZn47TmohbEAcaDuVI=; b=JMWll3EXDEHMLaDoaFtNC/QIJlA1/VeHlIZQfjJNBpnubs/8a7wTQ0FOxHm7HmY9nY achePLU+/wN3YYtdu8h9yqhuTQVY5dLQ4NftHhPuTgykCoCjcpzlW3pGrQdciRva1RIG vnf0hZOKjr11SfM7BJ02XNWG6NZfe77QRYO33vvtcHAnRzWhYstAaTJgHp6wHQk9Bv/4 6/eQpJ3mT8KqbehT8BI/zLDW8ETATxxTsWm8GWctr9vhd4cydez2+WgTFmvMHU6C47ji PAeZRSeKbcncoIRyU1p806sylfmZU0uAn9vp9EFvCnvC3htG8xP6HTafmOipzX8whGq0 5vMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=kF008sRZ; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=OQgtJ9YZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ux18-20020a170907cf9200b0094a01a24351si8428952ejc.462.2023.04.11.04.15.21; Tue, 11 Apr 2023 04:15:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=kF008sRZ; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=OQgtJ9YZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229999AbjDKLM7 (ORCPT + 99 others); Tue, 11 Apr 2023 07:12:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229773AbjDKLMr (ORCPT ); Tue, 11 Apr 2023 07:12:47 -0400 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF491449C; Tue, 11 Apr 2023 04:12:46 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 6A9745C0098; Tue, 11 Apr 2023 07:12:46 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 11 Apr 2023 07:12:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1681211566; x= 1681297966; bh=nTO6Ylpmk7/Iff7I5htSerd/uHZn47TmohbEAcaDuVI=; b=k F008sRZX7LingIautpxvaTwqE3oUkC7QTLhyOXkz6YKJb7WdaTTbCcwcGVGzjyGW HeCj3jyHJ7Y/qHUIjTgYb1xYECR56vlhNhWqpjkTFDh7ks90p4PUeEGY+OkISVt0 Nm1PDDd9Kcj9kbIWU3/OK1g2dGyj2cQTCY2G/DizlwxqDJA2om5ZQ+XFLBeLyyfl j3PfM7syorDuhWlIJ2m/iqmx8lhOlbKUVeAWuNogtjBWfPfLAvht8Dloj5ERYD5O yPXwft8r2IsGsAdcipKmln3NomILrf5Y/+iYPlTgl3ma6CDczr/Ye/AIcSqBI0Wk SjQvjGa4fD+fHMSR3PYuw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1681211566; x= 1681297966; bh=nTO6Ylpmk7/Iff7I5htSerd/uHZn47TmohbEAcaDuVI=; b=O QgtJ9YZfCrkLi4sU7qzvg97o1qigbQHx+yUShqlaN5mOjvnr+J+eul2VW1/oq2bR vRreAvyjiqw4u6K+Lr26ikuX59245ffA90bGnqpKcc57MME0ib9ijg8wnGAZabnz /5jus8wu9oqib+pbhxzqtTB5ZricCmuE4MytX2WoavZVyBIxKD56AdD76276/6+l ml/np3l7uUr8WzRr6LvTUCyIMbgZhcOXnCgLMchk+nGL/EdtOQmsoTX6plPxUvy+ EyaIoUu4qMkvSVr1rOlTJd5qSYrAcL8Cfg0mmr0f3WTZigkfvU9f17nYneD7yxwh P8B1S/iDujltnd5JgJQxg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdekgedgfeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpeflihgrgihunhcujggrnhhguceojhhirgiguhhnrdihrghn ghesfhhlhihgohgrthdrtghomheqnecuggftrfgrthhtvghrnhepfeeludefheegvdeuvd dvgeekgfdvtdettdelieeihfegtedugeekhfdvhfejfedtnecuvehluhhsthgvrhfuihii vgepvdenucfrrghrrghmpehmrghilhhfrhhomhepjhhirgiguhhnrdihrghnghesfhhlhi hgohgrthdrtghomh X-ME-Proxy: Feedback-ID: ifd894703:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 11 Apr 2023 07:12:45 -0400 (EDT) From: Jiaxun Yang To: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org, tsbogend@alpha.franken.de, and@gmx.com, Jiaxun Yang Subject: [PATCH 6/8] MIPS: c-r4k: Use cache_op function for rm7k_erratum31 Date: Tue, 11 Apr 2023 12:12:23 +0100 Message-Id: <20230411111225.55725-7-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.39.2 (Apple Git-143) In-Reply-To: <20230411111225.55725-1-jiaxun.yang@flygoat.com> References: <20230411111225.55725-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org LLVM assembler is not happy with offset that may overflow immediate field. Use cache_op function instead of inline assembly to fix build error: arch/mips/mm/c-r4k.c:922:23: error: instruction requires a CPU feature not currently enabled "cache\t%1, 0(%0)\n\t" Signed-off-by: Jiaxun Yang --- arch/mips/mm/c-r4k.c | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index 420440cc40b1..89603d033180 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c @@ -915,25 +915,20 @@ static inline void rm7k_erratum31(void) write_c0_taghi(0); for (addr = INDEX_BASE; addr <= INDEX_BASE + 4096; addr += ic_lsize) { - __asm__ __volatile__ ( - ".set push\n\t" - ".set noreorder\n\t" - ".set "MIPS_ISA_LEVEL"\n\t" - "cache\t%1, 0(%0)\n\t" - "cache\t%1, 0x1000(%0)\n\t" - "cache\t%1, 0x2000(%0)\n\t" - "cache\t%1, 0x3000(%0)\n\t" - "cache\t%2, 0(%0)\n\t" - "cache\t%2, 0x1000(%0)\n\t" - "cache\t%2, 0x2000(%0)\n\t" - "cache\t%2, 0x3000(%0)\n\t" - "cache\t%1, 0(%0)\n\t" - "cache\t%1, 0x1000(%0)\n\t" - "cache\t%1, 0x2000(%0)\n\t" - "cache\t%1, 0x3000(%0)\n\t" - ".set pop\n" - : - : "r" (addr), "i" (Index_Store_Tag_I), "i" (Fill_I)); + cache_op(Index_Store_Tag_I, addr); + cache_op(Index_Store_Tag_I, addr + 0x1000); + cache_op(Index_Store_Tag_I, addr + 0x2000); + cache_op(Index_Store_Tag_I, addr + 0x3000); + + cache_op(Fill_I, addr); + cache_op(Fill_I, addr + 0x1000); + cache_op(Fill_I, addr + 0x2000); + cache_op(Fill_I, addr + 0x3000); + + cache_op(Index_Store_Tag_I, addr); + cache_op(Index_Store_Tag_I, addr + 0x1000); + cache_op(Index_Store_Tag_I, addr + 0x2000); + cache_op(Index_Store_Tag_I, addr + 0x3000); } } -- 2.39.2 (Apple Git-143)