From patchwork Tue Mar 21 10:48:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 13182565 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6916C74A5B for ; Tue, 21 Mar 2023 10:49:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229579AbjCUKt3 (ORCPT ); Tue, 21 Mar 2023 06:49:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230390AbjCUKt1 (ORCPT ); Tue, 21 Mar 2023 06:49:27 -0400 Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA1371352E for ; Tue, 21 Mar 2023 03:49:13 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id D1A103200A02; Tue, 21 Mar 2023 06:49:12 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 21 Mar 2023 06:49:13 -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=fm3; t=1679395752; x= 1679482152; bh=DzRue2E6UzyySo1j7cr7teOjJhrLZIwt1Z4PUQyyJjY=; b=y qcwtUoKiLFYiUM4e1Cx5n3MuvZZ19MD6dzYBAoSE6sTB/UuQyjwlkTizzExHb4MJ cdPt7ysxthAKamu7W36R4JpqQPANM5njd4TSfGxsCodaTb4J4HhJqDhAJFh8B7VT hvSh2erAVlWZIhLUSkzjQG2UJsKx8y2/bM2/65p56RI7MPCdi7YOmwE6j/J4ebdI Kh7iGwvMZdlV3KTP5RVVZJGPsEtbYxnd11CnD0I29tMxujD9KAJn1Va/z+Jb5lmU nnRNxxGf3zICiHASzzpMNjgm8wO7rP8HMZnH1mozyXjwmOgfuuSwS2JCo6X+38OU //2xayyY7/0hKleNG382g== 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=fm2; t=1679395752; x= 1679482152; bh=DzRue2E6UzyySo1j7cr7teOjJhrLZIwt1Z4PUQyyJjY=; b=r rd1LHbCz2ghMsGuZhuq2uvA5nVmNBWUWwEoy13juBFVvWCCcuHncQHLs8NbVkdQh ktIv4ruqzKMVlQgG5QP1m1W7sHpcRykU1ljbLtPq8q8e21MSywAHjSKEhTcuUzjZ SWrBgz7MkkdzIYGTFsVQqXrmcvCRBvk6nnUQqmpKsSp35DjVJNL4UlihfY898t7N 02xt0cqR7ugZKgVCJYSaDifJsKDOLUw420G/OUJZnDpq90ZEaplTanHbwHMLUIwm xKPp/oY9zAFj/gZ9oiXvRuhexTdZkB0b/AtJo92vjb55SjQLH+Sp4rqaNnroHAW6 GI9e6R9VVCQop+9PEoVbg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdegtddgvddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpeflihgrgihunhcujggrnhhguceojhhirgiguhhnrdihrghn ghesfhhlhihgohgrthdrtghomheqnecuggftrfgrthhtvghrnhepfeeludefheegvdeuvd dvgeekgfdvtdettdelieeihfegtedugeekhfdvhfejfedtnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhirgiguhhnrdihrghnghesfhhlhi hgohgrthdrtghomh X-ME-Proxy: Feedback-ID: ifd894703:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 21 Mar 2023 06:49:11 -0400 (EDT) From: Jiaxun Yang To: linux-mips@vger.kernel.org Cc: tsbogend@alpha.franken.de, philmd@linaro.org, sergei.shtylyov@gmail.com, aleksander.lobakin@intel.com, Jiaxun Yang Subject: [PATCH v2 06/12] MIPS: c-octeon: Provide alternative SMP cache flush function Date: Tue, 21 Mar 2023 10:48:46 +0000 Message-Id: <20230321104852.25284-7-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) In-Reply-To: <20230321104852.25284-1-jiaxun.yang@flygoat.com> References: <20230321104852.25284-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Curretly c-octeon relies on octeon's own smp function to flush I-Cache. However this function is not available on generic platform. Just use smp_call_function_many on generic platform. Signed-off-by: Jiaxun Yang --- v2: Style fix --- arch/mips/mm/c-octeon.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/mips/mm/c-octeon.c b/arch/mips/mm/c-octeon.c index c7ed589de882..b7393b61cfa7 100644 --- a/arch/mips/mm/c-octeon.c +++ b/arch/mips/mm/c-octeon.c @@ -83,8 +83,13 @@ static void octeon_flush_icache_all_cores(struct vm_area_struct *vma) else mask = *cpu_online_mask; cpumask_clear_cpu(cpu, &mask); +#ifdef CONFIG_CAVIUM_OCTEON_SOC for_each_cpu(cpu, &mask) octeon_send_ipi_single(cpu, SMP_ICACHE_FLUSH); +#else + smp_call_function_many(&mask, (smp_call_func_t)octeon_local_flush_icache, + NULL, 1); +#endif preempt_enable(); #endif