Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1391919lqe; Mon, 8 Apr 2024 07:42:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWutz9tnJ90A6P7nca77C441SM/XznEZQDVjE6EHZXgGfBITsI8+pBUr6qDLBjKUvylK4IttDASEKBChTZHRISBwbcbA9QIU1aOxaOhjA== X-Google-Smtp-Source: AGHT+IHPkwjMqzzmz6TMRMoVmBKf+1KKNSHg3bAwKmarnpu0tR4xiDpk9IOU+Xws58Jduwlj6os1 X-Received: by 2002:a05:620a:3953:b0:78b:de20:932a with SMTP id qs19-20020a05620a395300b0078bde20932amr16819646qkn.13.1712587377274; Mon, 08 Apr 2024 07:42:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712587377; cv=pass; d=google.com; s=arc-20160816; b=pG31UZiJzw2y5ex3DnhsvyZMHZ/e35gUvjdctDUHmw2NYMFb8Wc3PX/lIiegP1O472 dNdzfR23kYlY4OJlTzgnEZqEpTZpAGrSN9NQu3h+iWtw7c7ZL1D/S/YlxALptyDRz47h oszEhhAZefP79YK3VK8MBRKhbSlQhcDI1EcMp+oMhTYPFijA6qbR8rxnPw6vQUmQUSDG 3i+JjJ3eES83o+0EDU21Asom2S6G3Ou0FGS67Y53iOVNEV/8mhJGwiDr5d5EpbzYRMLE lm/9+f434WbKdorAFYRfJNpG7zMp0FGonaH+M4nYjUVUesU7ueKuTcWd6DJj3QL6kSSU BSwQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:references:from:to:cc:subject:message-id:date :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=w1UE2sxyoFblN4SN6YPSdjZQv3UkhTWujwZEjiE2yx0=; fh=PO/yX8OCDCYcvlgWL+TkO2NKKNlgiMCdb2+J8Sylcck=; b=YZ76Z8tTDfbpb3Nf8Wbpn+1dLaLKCzY6deKY3r7FvoT5iq9FBEi3oCyS+qYBybEppv 0NbfucxeiLssBese55bpPtZTWeALxG98zQmNSi6hTKmilLoQYc+6RBU8xoNr+9Mjlxx7 72gda8v7/GXUMP2fBeCAw+jMGRY2383t8gC9SEwFAaM8HLRFJPOxEwB8HoT7SEAnNIC8 F/2NT/4BIpn4ct++Bfexee7L4OwMThX7VhCoL05zJIfRlQztJb8gwpDpwjpXJNZAqEwN 3NwTCioSkl9rcWT5/luVSZcvDhCdmpUr7g5wDVOU88KjIS6Ijx6Gx9rqaUr5w1BWW4UO bx3w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=GywKzvNY; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-135535-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135535-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id i12-20020a37c20c000000b0078d4eccd81esi6968651qkm.636.2024.04.08.07.42.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 07:42:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-135535-linux.lists.archive=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=@bootlin.com header.s=gm1 header.b=GywKzvNY; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-135535-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135535-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.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 03A2B1C2193F for ; Mon, 8 Apr 2024 14:42:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B52D913F00B; Mon, 8 Apr 2024 14:42:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="GywKzvNY" Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (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 7B77E13E414; Mon, 8 Apr 2024 14:42:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.193 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712587370; cv=none; b=utTAvY6P3Mh+l2J+iiSb+oOfjLCWybbKA4k45OKH4eMDT5qnFeyiwPdtEPLqfKOo2Gg/u0PouqtAOdycXCyBsFJrzuzEO0A6QrYNK3KhSrAXRHS+9RUOXdFX3L6XIBJfnhUQ9Sfn0xbflHjOXPvwj0KYEUDzQTO6KDorAefnYY8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712587370; c=relaxed/simple; bh=w1UE2sxyoFblN4SN6YPSdjZQv3UkhTWujwZEjiE2yx0=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=Hzht/lfkV8Ot4iLJLlG+UIt8KyKpt4i/+AKMu6tD56K61UPB/otG3R4U5H54nhkJkchiJ8zu7zJuYjMGGjZermddbj7KedItmixLqyyTrXBzvsf02bUh7YUXQLVkE8sgqhDY5MtmsdSVQP2omZ/INDA1diSr+/37wpnCbAowiWw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=GywKzvNY; arc=none smtp.client-ip=217.70.183.193 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id F16AF240006; Mon, 8 Apr 2024 14:42:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1712587364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=w1UE2sxyoFblN4SN6YPSdjZQv3UkhTWujwZEjiE2yx0=; b=GywKzvNY2eDKgeW83ZxtzjtMfxXPMq5lMdUx/lrgACZHXRyFPFfgzFs2KtfiNtQGXBNw7M K2h1Nd2a12C3ujCjDrZLb7TlYYswQyE8O3gLkgr6oP4p/g/CWyMCla4KDWNf0+1gQGQUSL Xjk3dsXuPFPeNJYLQJhTA5lU+NBzUWc6Vr5E51foLHjY/uFLtTARCcheLfJGn/OadS5FP3 +KgOF9Sb0WafHiyOx+zYBeys2g/jLpp0uYfTYghtQk0tkPOCh3Pfox2Hbrrx6e2AlT5Uv2 0HLA2NF1TNhbXVJPF8CwHxVb9Ub35yZ9EI/ATeLv8cEDOE2VxFzyvAmrM6P9pA== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 08 Apr 2024 16:42:43 +0200 Message-Id: Subject: Re: [PATCH v2 08/11] spi: cadence-qspi: add early busywait to cqspi_wait_for_bit() Cc: "Rob Herring" , "Krzysztof Kozlowski" , "Conor Dooley" , "Vaishnav Achath" , "Thomas Bogendoerfer" , "Rob Herring" , , , , , "Vladimir Kondratiev" , "Gregory CLEMENT" , "Thomas Petazzoni" , "Tawfik Bayouk" To: "Mark Brown" From: =?utf-8?q?Th=C3=A9o_Lebrun?= X-Mailer: aerc 0.15.2 References: <20240405-cdns-qspi-mbly-v2-0-956679866d6d@bootlin.com> <20240405-cdns-qspi-mbly-v2-8-956679866d6d@bootlin.com> <1f7087ad-824e-47fe-9953-ed5152c8f18f@sirena.org.uk> In-Reply-To: <1f7087ad-824e-47fe-9953-ed5152c8f18f@sirena.org.uk> X-GND-Sasl: theo.lebrun@bootlin.com Hello, On Mon Apr 8, 2024 at 4:16 PM CEST, Mark Brown wrote: > On Fri, Apr 05, 2024 at 05:02:18PM +0200, Th=C3=A9o Lebrun wrote: > > > If the CQSPI_BUSYWAIT_EARLY quirk flag is on, call > > readl_relaxed_poll_timeout() with no sleep at the start of > > cqspi_wait_for_bit(). If its short timeout expires, a sleeping > > readl_relaxed_poll_timeout() call takes the relay. > >=20 > > Behavior is hidden behind a quirk flag to keep the previous behavior th= e > > same on all platforms. > >=20 > > The reason is to avoid hrtimer interrupts on the system. All read > > operations take less than 100=C2=B5s. > > Why would this be platform specific, this seems like a very standard > optimisation technique? It does not make sense if you know that all read operations take more than 100=C2=B5s. I preferred being conservative. If you confirm it makes sense I'll remove the quirk. Regards, -- Th=C3=A9o Lebrun, Bootlin Embedded Linux and Kernel engineering https://bootlin.com