From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6551C32792 for ; Mon, 30 Sep 2019 14:50:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 845BE20842 for ; Mon, 30 Sep 2019 14:50:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="sy+qksyc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 845BE20842 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=65ORRuFLOWHVW3dkjMLXEH2vX/r+7Ed1huODriE5J4E=; b=sy+qksycNQlpgl PC/Fls2pvo3fEJk3t9mThwdGj5wH2TNhGyGbGJihBJk4XNzB+ZLmr/rflT67zIshLPrIW+gaaRMqD FeWy+KABy/f8KeVUI5MH2VIzUYHLzlKmxKp+erEndWXHUbQwhtXxReONwHdXdQ4Sc+qriR/YfPqBz +5NHdLskmVAxtRFGfuJCVKPBSzEPsanXxLuBmZNSp2+9ehccspr5KEfXKOESJr0AiiXhim9SkDlqW 2lc6Cuz2yg4OoWvY1112N6tEuwMYOp8MKspHnp/GPzQm6SWzxkdsURiEagun2z0hxAwpXHDcZ8WmT /qkwwWPC88CF3jjCOWlA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iEx03-0005vD-1M; Mon, 30 Sep 2019 14:50:07 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iEwzz-0005C2-Uh for linux-arm-kernel@lists.infradead.org; Mon, 30 Sep 2019 14:50:05 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6C2F628; Mon, 30 Sep 2019 07:50:01 -0700 (PDT) Received: from localhost (unknown [10.37.6.20]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D7DC63F706; Mon, 30 Sep 2019 07:50:00 -0700 (PDT) Date: Mon, 30 Sep 2019 15:49:59 +0100 From: Andrew Murray To: Thomas Petazzoni Subject: Re: [PATCH v3] PCI: aardvark: Don't rely on jiffies while holding spinlock Message-ID: <20190930144958.GA42880@e119886-lin.cambridge.arm.com> References: <20190927085502.1758-1-repk@triplefau.lt> <20190927114555.193a9d68@windsurf> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190927114555.193a9d68@windsurf> User-Agent: Mutt/1.10.1+81 (426a6c1) (2018-08-26) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190930_075004_036849_71F74850 X-CRM114-Status: GOOD ( 12.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lorenzo Pieralisi , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Remi Pommarel , Bjorn Helgaas , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Sep 27, 2019 at 11:45:55AM +0200, Thomas Petazzoni wrote: > On Fri, 27 Sep 2019 10:55:02 +0200 > Remi Pommarel wrote: > > > advk_pcie_wait_pio() can be called while holding a spinlock (from > > pci_bus_read_config_dword()), then depends on jiffies in order to > > timeout while polling on PIO state registers. In the case the PIO > > transaction failed, the timeout will never happen and will also cause > > the cpu to stall. > > > > This decrements a variable and wait instead of using jiffies. > > > > Signed-off-by: Remi Pommarel > > Acked-by: Thomas Petazzoni > Reviewed-by: Andrew Murray > Thanks! > > Thomas > -- > Thomas Petazzoni, CTO, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel