Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp7044286ybn; Mon, 30 Sep 2019 07:51:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzJpsFYhn4HRR3BfCBw7h4f2+mXFAVdXwJCra24qrKkNxEfhClzCGI4dstmX3MRKcugy3Ca X-Received: by 2002:a17:906:1991:: with SMTP id g17mr6055461ejd.220.1569855069911; Mon, 30 Sep 2019 07:51:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569855069; cv=none; d=google.com; s=arc-20160816; b=MEfDAlTVGM/vgWhQhJFEK81GDh0LFj3NAl8ET2J+i3OH0rQyGZe5DEjjrCVBhLGMH1 MbY/RjhRsclIRdVOC9QkCNk7bNdPxJko77eawiXlkz8dpXNeZ2hg/LIMXdfjpzgeK4lo GRH1mj6Fh3oC+1kMUWQDeHHX4y5deXhK8qb+gXaSnnoLOepEeQkJJplL9O8LhLqYW+Ur ZXr/vMduFKyeyGzX9jvfvopNphzrZJPzfrv4bxTzrg99bYNTtEEmYKiP3ENM6lctwlPo hQez7zt9wLwcQcT8IflMOZcMw4IkkslAc+xzYBSwvj+Ruzn20RsJzX+jJz49iOiFlg2y LQFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=JIWXQJZqldRoO+0XrxzMOQjmHi6a0DLvpa/IfgLSbp8=; b=A/f3b0YCOmGe7wVCPenBa2TNo4oT+3d4VhPZSMOI9EjaiIc5j99O+USg+dm6o+lmsj ssTkQu+vx+w0aQ3cIHNEPCKQukKUwGKZEN1243CZg5FhCoTDTVsxHD1ojfRE1yRQFh6w 7dJuPJEf5cfWBvKOKhlxE/mlK60kUV9dHmBHGGi7p8RquInHTWVHmKnNOxMgmzR8vUZ/ 7W/pC/7zNHYEWKugOePVJS5snT7jje5qNPLfRhgkn2IT+XQ+ZqALbfgzbCykeMqd0kfb +hvxHFF+PuIUj/38IN/CL6WpkpM/yMHOLrtel0kq4DwSjTXC68TmxKUVTsz2etK6q9pn hxmA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f31si7842649ede.253.2019.09.30.07.50.44; Mon, 30 Sep 2019 07:51:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731717AbfI3OuC (ORCPT + 99 others); Mon, 30 Sep 2019 10:50:02 -0400 Received: from foss.arm.com ([217.140.110.172]:56078 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731459AbfI3OuC (ORCPT ); Mon, 30 Sep 2019 10:50:02 -0400 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 Cc: Remi Pommarel , Lorenzo Pieralisi , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190927114555.193a9d68@windsurf> User-Agent: Mutt/1.10.1+81 (426a6c1) (2018-08-26) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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