Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp40315lqh; Fri, 3 May 2024 12:39:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWpwO/We7u9uN1zx0kvJqFOjfqnWlelUG4PvkOZDakmCxZWYCBe8lwaTRG9XmFcoXopnzpE6QM6jOKCy6CoD1FVzWv2mbFGeeXVLtBr5Q== X-Google-Smtp-Source: AGHT+IG6yhluEHjlFeL1RsyFkJzBmvPufFfKQ06vvv9qBmLQp2DLYlsTivizK1DOey/sx1/9y+E/ X-Received: by 2002:a17:90a:62cc:b0:2ae:6e16:da91 with SMTP id k12-20020a17090a62cc00b002ae6e16da91mr3905284pjs.29.1714765164908; Fri, 03 May 2024 12:39:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714765164; cv=pass; d=google.com; s=arc-20160816; b=tB9kzgYRY6gJ30DUhimuT9xDjACrpvA35UAKknHjVwFinJJuWvLxJQp7FSKCAmhS2W UlCfxt84eJuWcm1o6EXo3VIezyBpaP+8eYxD9R4lpFQ8Cf/KfGnlnIVmsbiKjW9g8Cuu mw2XNZvW0puB6IIE+z7XURM/GUFS9dDpyIQbBGc77wEP3YGc9MRSgx5FmrZSnwCf6T2b LoKICW57Z0iX4d4lIotYFKwcfl5SLdjbh2tjmRZ/vJspSkY/LpNGcAMiasE/E0uV6IMg enibyYz2TFLROKPQbqYv8ygmGgxurGAOBiAFgBAiDmyG0oyBqjlO27bBkNYopzGvdTof 9o+Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:subject:cc:to:from :date:message-id:dkim-signature; bh=esCvH2EjpXiL6Ux6iq1p6xHlRACpAYrTng9Vg9T+Qac=; fh=xb0OfhHzoFDgYBbI452cgCsPxQNVCg9qZKWTtk/ldVw=; b=lrq0wxCCO6LR9y1zQak0F0GQUA78Zj+0OEcUnKPdqcDzt+uFmwqDkctq+nfbJXPv/C p3R9MyZvKMRcwKkzzxJnYGcsIk8H1zfR5dHJkgenre9YS920TNmdt24jJlGEoRk4YKRa g074Laxb8wFA8D/kmzhPmq+ls3aWejjFwx30GqqoFksT9PukY8AfaomqbJ/evax3HI17 JKMjCr6GzuPQeB7Mbw9+Ty468nmCybAHn3C3D3iS7NagyHlj0Sa4S9ya18JA4w8ZQf/k mfjL2I45cgmCYiNwXmUYgWKN90FGnsDtjPoK8RH5js7PCFe2b9iQCTRlmYtWTDlx2QtA Ydrg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MO70nfrz; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-168145-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168145-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id gm20-20020a17090b101400b002b2873189b4si3641680pjb.170.2024.05.03.12.39.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 12:39:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168145-linux.lists.archive=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=@gmail.com header.s=20230601 header.b=MO70nfrz; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-168145-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168145-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 80B50281B02 for ; Fri, 3 May 2024 19:39:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9A053158A39; Fri, 3 May 2024 19:39:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MO70nfrz" Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 555DC13957E; Fri, 3 May 2024 19:39:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714765156; cv=none; b=F9ZEUBDna5K78mJiNJaLg3/ObXWNr729rPVkt+SJLBM0BMRFaHp5avgoS2teEglVT3J4q4aiRSyzaJrRr08+aphbfGzHAe7k9qMUcJ80W4f2P/bi6vFRoy1WSppqWDyHTkkbFR6MmG22EbcAFY4qjmJxphAwGaemh5kekUJTbQs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714765156; c=relaxed/simple; bh=kz5QM7ohZQWoGwCDRooPeCesA7DdX2T5IDw4jkGpQpY=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=O72yJGPOYIMS3QUa0RrM94wO0SeLofdCEUJ/eSw5tJ+sdests0iqZgUxsQ+mfzaiNzpWTZvmUf1s5lFs0Xjj8690xLwR5SWCjt7H6tFoumuR1WZu/tgbKVnvVEuhEXcDIhnX9aaG/RkDA7lTUd6oCuYG6AGHJPUx5EHHw4wnG10= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=MO70nfrz; arc=none smtp.client-ip=209.85.221.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-34dc129accaso20734f8f.0; Fri, 03 May 2024 12:39:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714765153; x=1715369953; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=esCvH2EjpXiL6Ux6iq1p6xHlRACpAYrTng9Vg9T+Qac=; b=MO70nfrzSeH3mhjfPEZ+v9FtK1EKRJC9vErHISZUcJj37KPwFObDOxVlFG4kT2mRQp rQ5CK7FicE1mQMmGQubV8w4T+P/1V5y7k9iexZ+otfmqahre2pQ1pfsziviI6fkiaZn4 jBtx3J+zg3XJ0K8XSEro6E71mOjGby7WR+F2s2g5Rw0i/U0MDw0X4G7tDvxYy5X8G1NQ XIW7gKYbGo83WUSWqX7h5cmK0p3zRT6G1NPfY7D/JKy9l/aAZ4pleLGpbquvV6jJCQIv NWdVL+KqhRr3pPqBEiAgExj8PSP5RQpBUBF/yNdzvqu1qZQ+M7DPQs6AMwUWojSor5yK tLsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714765153; x=1715369953; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=esCvH2EjpXiL6Ux6iq1p6xHlRACpAYrTng9Vg9T+Qac=; b=oYAPzZUjhxAjwMiAO106WhE2YogCc6Ep02TY/Tc0zw/Y+0cFEMcDIC8KVA/azYMgQY 3ZuFAoFoIBkILOc+CWBz72SREijaGfZVGqwjmiXwj7+TvZ3OlFQJ0QAeyjJJl8cALyxq OG9go2qPUbCs8FTgbtnAzF00mtRL1phs+aahy43UTWk7PpjrSOCdOiRrNdkDiwZQIuk9 Xx0TCIDtTxK4Ia/ejZiuhfiiGG2tT2ysHYoDHCD910h//InJsuyDZmH3d/QFYptAlsTW tmpwzq0kHkCfI63LzFgjHkWol6FWnIlXSXzexDHHZ3G3ShDyVMKwY50Z6Qj0AMhhXt8W 5IKQ== X-Forwarded-Encrypted: i=1; AJvYcCXpL2rN/TfQbAdKFj5Z759hl67LFFqwoRHGtSPAvOAEtztDpb5lfKZuVWhh5AgLL9qy+3R6In9hYCkPaJnecbSqztyShOd7BvVbTBidqRMZh8PsdLej71fOgr8mcEWI6PuEuB7TUY2XXZjDFPWWskng4rnJZ4BtWHvcC6qrSgELT/ebMiU= X-Gm-Message-State: AOJu0YzITfPmc6C8lJAwG/uw0FQnBxwIPgpM+4sTF0ze+zGi+rnh4zYW /jZOtbc7ewiC5XETvIvtM5+s+aJfdwVm359/uWx22o0kw5HclHc4 X-Received: by 2002:a5d:5102:0:b0:34d:9639:79bc with SMTP id s2-20020a5d5102000000b0034d963979bcmr2775337wrt.44.1714765153275; Fri, 03 May 2024 12:39:13 -0700 (PDT) Received: from Ansuel-XPS. (93-34-90-105.ip49.fastwebnet.it. [93.34.90.105]) by smtp.gmail.com with ESMTPSA id f20-20020a05600c4e9400b0041b5500e438sm6705944wmq.23.2024.05.03.12.39.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 12:39:12 -0700 (PDT) Message-ID: <66353d60.050a0220.df862.761f@mx.google.com> X-Google-Original-Message-ID: Date: Fri, 3 May 2024 21:39:11 +0200 From: Christian Marangi To: Florian Fainelli Cc: Hauke Mehrtens , =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= , Thomas Bogendoerfer , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Broadcom internal kernel review list , =?iso-8859-1?Q?=C1lvaro_Fern=E1ndez?= Rojas , linux-mips@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Daniel =?iso-8859-1?Q?Gonz=E1lez?= Cabanelas Subject: Re: [PATCH 6/6] bmips: dma: drop redundant boot_cpu_type in arch_dma_sync References: <20240503135455.966-1-ansuelsmth@gmail.com> <20240503135455.966-7-ansuelsmth@gmail.com> <4821338d-bae1-418e-b4a8-6218f62d74dd@broadcom.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4821338d-bae1-418e-b4a8-6218f62d74dd@broadcom.com> On Fri, May 03, 2024 at 12:07:45PM -0700, Florian Fainelli wrote: > On 5/3/24 06:54, Christian Marangi wrote: > > Drop redundant boot_cpu_type in arch_sync_dma_for_cpu_all. These needs > > to be parsed only once and we can make use of bmips_rac_flush_disable to > > disable RAC flush on unsupported CPU. > > > > Set this value in bmips_cpu_setup for unsupported CPU to skip this > > redundant check every time DMA needs to be synced. > > > > Signed-off-by: Christian Marangi > > You are taking a shortcut that is reasonable in premise, but keying off the > bmips_rac_flush_disable is IMHO misleading. The RAC is enabled in the > BMIPS5000 and BMIPS5200 cores, just it does not need SW management unlike > earlier cores. > > If you renamed it to bmips_rac_flush_needed that might be more compelling. > Also, the other reason is that on a kernel that was configured for > supporting only BMIPS5000 and BMIPS5200 CPUs, I think we could get some > decent dead code elimination of the boot_cpu_type() check, which would not > be the case. I was a bit confused by the last part, should I drop this or just rename the variable? Cause I think for kernel that support ONLY those CPU I guess the DMA function will be optimized anyway since the bool will always be false I guess? -- Ansuel