Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp511841imm; Thu, 13 Sep 2018 03:33:59 -0700 (PDT) X-Google-Smtp-Source: ANB0VdajaKhflPKe3pZAgVjpBheZpbbYcRQgfUbwPXUPAoc3eXzcI3Mp6H5Pd2PblFqeJMxyw/83 X-Received: by 2002:a63:6949:: with SMTP id e70-v6mr6569602pgc.119.1536834839674; Thu, 13 Sep 2018 03:33:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536834839; cv=none; d=google.com; s=arc-20160816; b=npYKkUYrs5mqUCNKEirY3HfSQySvk53sIsNUaRkKoBl4NFCPR7zVqTPMAPtTqLz7B/ zZ62wep3KMWWs0h8b8tplfMsqtLpJ/wrXdFPHT/Os4OWPFdz/mk6QlFt1VryC9ZOoVR5 wCLG1D7Etivg45HYyKDlyh13hy4sovoEqXI/z21ocFBYpl9jUDsNvoPTwO05YoxP/qUD Wbja6/lyUBFoEuUS0atUFGvT9FlpWXM/yik+A1mhx5vKLzVjMfPsi1t/4z9g3Xcp2Ah/ Q/8XqBvqcxhNn1wwAhVOjjoUB0DU3WaZsKr69r4QeapJUtq1vZpdvXy8GMOxLJ9No/CJ TaXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=UHCODOE/TUIdmetnuZZoOdWNPlzBQHtUo60U/8iTW/0=; b=WRRCPZfcuWQvRTKDzrjpw0Yg53GgYaRoQ+1scbhZ4m27WWjDtCxs2P5lnEJeMw0SyZ ydY8uG+IRdpSaNiZlpBaQMSqIHwfo7AoC+6mi59B8HHwz3of7Rvt/R7cMSolvsS3/Qg9 axuXwNp1VuhKDjF4F9GKxLu8fCg1au9+YRRt2QLL379nGQ+chCdUx0a5mUtx0knuA5dH lGREfXSge9GV07kXHW8R5byVlVH8uhH6xipDZZGUw9xKslohy5wtwqwqLAvR0hNFj8aR +ZNys6YcmrWy5h0NMGiOd2TjFaPeuC5/tdUp5V3xn463w9P7HOreEG1e1uW9P3jXatYF u5SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@Synaptics.onmicrosoft.com header.s=selector1-synaptics-com header.b=GyTJj8sj; 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 w65-v6si3882971pgb.476.2018.09.13.03.33.43; Thu, 13 Sep 2018 03:33:59 -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; dkim=pass header.i=@Synaptics.onmicrosoft.com header.s=selector1-synaptics-com header.b=GyTJj8sj; 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 S1727348AbeIMPmT (ORCPT + 99 others); Thu, 13 Sep 2018 11:42:19 -0400 Received: from mail-eopbgr700073.outbound.protection.outlook.com ([40.107.70.73]:62130 "EHLO NAM04-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726854AbeIMPmS (ORCPT ); Thu, 13 Sep 2018 11:42:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector1-synaptics-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UHCODOE/TUIdmetnuZZoOdWNPlzBQHtUo60U/8iTW/0=; b=GyTJj8sjpRLv2hbf+yWGUHhB8eChF8KCp99mZFoFg+mre7kMK8wlQ1hqlI+cxjnGIvBsMQGEPH1ZAXA9Pwr1vaDBxGO5lg5FgltH/wl1QhMmh5tdN6bMs1rQeFWePZJFDVOyKV+0gjfTbXsWx7kqdyZN+tiozGryfnCkwqpByXQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jisheng.Zhang@synaptics.com; Received: from xhacker.debian (124.74.246.114) by BLUPR0301MB1569.namprd03.prod.outlook.com (2a01:111:e400:52a9::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.17; Thu, 13 Sep 2018 10:33:22 +0000 Date: Thu, 13 Sep 2018 18:29:54 +0800 From: Jisheng Zhang To: Lorenzo Pieralisi Cc: Jingoo Han , Joao Pinto , Bjorn Helgaas , , , Subject: Re: [PATCH v3] PCI: dwc: fix scheduling while atomic issues Message-ID: <20180913182926.365d155b@xhacker.debian> In-Reply-To: <20180913091534.GB32721@e107981-ln.cambridge.arm.com> References: <20180829110408.556c3622@xhacker.debian> <20180910165722.38218779@xhacker.debian> <20180913091534.GB32721@e107981-ln.cambridge.arm.com> X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Originating-IP: [124.74.246.114] X-ClientProxiedBy: TYXPR01CA0064.jpnprd01.prod.outlook.com (2603:1096:403:a::34) To BLUPR0301MB1569.namprd03.prod.outlook.com (2a01:111:e400:52a9::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 09b11934-0a8e-4687-f54b-08d6196455af X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:BLUPR0301MB1569; X-Microsoft-Exchange-Diagnostics: 1;BLUPR0301MB1569;3:5PGBhS+CW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zmqbe6+iZKpUjHw8/T81izn5be67DjdHzpRqDPcGY0jPH30s4de5EnugWohasKHwTO6HyVOHbqi3KawgJvLZnQnimZ6TxbImbq5Eb06NLB1UFTWge9AxcIxOxTvsak/I9JQUtR67QkGXUz//TpXsmupl0v85KXMsxSN/bJfrLApZWjb7nmmFv3VVlE+RKBc5XL4qJDfhMJtl1hLrRhx70hYEhts7/2NPJyFXGD8YE3JgWH1mrTAbDJsZuWATl917bsStabjYHcB2d3h7rS/HSrBhCFYvLg5VV5vq9Ghp2XkKEDSFtOFrre896Lj+0XOc2DIz9tchyrmW8C7NPkkt60gWRgDecnmiS;4:YqQsv2ky+F5bnEzaH2aCHtr1nDPr/nlw2+aQoSLUigXYsj9AeIDqTOOBhInyyAG/a6JU3jyZylEvsL685ddkAd9S7NYPr8RWwV83sFm+ob1sG5RI6Zya8GkIkgXBAwxCM6QHLOiRqQUZlSnOS+vZSDzoXfBRJmRqg55VQZVBipHqMrIRLZOXpB8K9law2XkfUZ8B1hPh4q2PGQF8lePjkwiyrJd5FCAXewyl7LrV3K2uSrwz4nGbD8mD5D8WdR/pnF3W/vvesNBoAlBzfd2BZQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(3231311)(944501410)(52105095)(10201501046)(149027)(150027)(6041310)(20161123562045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(201708071742011)(7699050);SRVR:BLUPR0301MB1569;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0301MB1569; X-Forefront-PRVS: 07943272E1 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(39850400004)(346002)(396003)(136003)(366004)(376002)(199004)(189003)(53754006)(81166006)(8676002)(81156014)(33896004)(76176011)(50226002)(5660300001)(229853002)(316002)(54906003)(72206003)(1076002)(6666003)(52116002)(7696005)(8936002)(6916009)(97736004)(23726003)(3846002)(6116002)(6246003)(478600001)(446003)(39060400002)(11346002)(68736007)(2906002)(305945005)(186003)(16526019)(25786009)(26005)(7736002)(4326008)(47776003)(50466002)(105586002)(230700001)(476003)(956004)(486006)(106356001)(55016002)(53936002)(9686003)(86362001)(66066001)(386003)(6506007)(39210200001);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR0301MB1569;H:xhacker.debian;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: synaptics.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BLUPR0301MB1569;23:oM/rFOgpmjdByMb0H5aekxwQwnm41ipo29xwJpt?= =?us-ascii?Q?fa/tpVorujqw1m7/ykxzJ5ieAZwC90qgl7erD6HLDzEOTSAipgtacdZZGA27?= =?us-ascii?Q?ZyMiRpZk2XWfmhxar2h/rwfGGmOskVqZfxgnPei+h8NlGsH3FjXJWjvSfCU5?= =?us-ascii?Q?Xdpavd41ELadhnZyIL3yzH2Qpa4DIcxl47Kzyk1ryhuNcUhVJnbCML/gmr0c?= =?us-ascii?Q?RhWDLssdHLDqBBu+InUDrFzlmqdXRXyTciVGaNVJkiS6YTtQsoYQh+4gnppN?= =?us-ascii?Q?GbTXgmzjoxQGee4g3tf2fwdOej/7srlKoCUawH7n3TP4x/0IAP4fpOxKp1zZ?= =?us-ascii?Q?1vVIvu9q0nBjo6ZKrY5BFFsmVYT83wEe0ycmauOvecmxXlV4wuz8E0Kec633?= =?us-ascii?Q?n8/fWWnUSpt78fpDAecZn295SVmJIwdtLbGqb/Eg/83SHpc6UiYrdFI7k6Jg?= =?us-ascii?Q?AHQTExluBQiJA/Bx6mTIqVonViKPpguz1prfIevjS2rq1NTt6Fz7/34fqxPh?= =?us-ascii?Q?N+gArU7u3OdnTTbBQLv0BXZyKMPHmarTD8JJQlo5dh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rDrxgrDvDd0T5J4MdI5ClD6DsmXNE+WYeBQUW9UoqLb0mEvipDS3JR5C7cpwu1Wzyz0Kr1r0guqZLkrF91+qPMf2E7P4WzLfP271HAMo8Tt+IcuA9OTfZJZ+7JhVDUSFq5aqCOEf SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2018 10:33:22.3584 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 09b11934-0a8e-4687-f54b-08d6196455af X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0301MB1569 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Lorenzo, On Thu, 13 Sep 2018 10:15:34 +0100 Lorenzo Pieralisi wrote: > On Mon, Sep 10, 2018 at 04:57:22PM +0800, Jisheng Zhang wrote: > > Hi all, > > > > On Wed, 29 Aug 2018 11:04:08 +0800 Jisheng Zhang wrote: > > > > > When programming inbound/outbound atu, we call usleep_range() after > > > each checking PCIE_ATU_ENABLE bit. Unfortunately, the atu programming > > > can be called in atomic context: > > > > > > inbound atu programming could be called through > > > pci_epc_write_header() > > > =>dw_pcie_ep_write_header() > > > =>dw_pcie_prog_inbound_atu() > > > > > > outbound atu programming could be called through > > > pci_bus_read_config_dword() > > > =>dw_pcie_rd_conf() > > > =>dw_pcie_prog_outbound_atu() > > > > > > Fix this issue by calling mdelay() instead. > > > > Any comments about this patch? > > > > Thanks, > > Jisheng > > > > > > > > Fixes: f8aed6ec624f ("PCI: dwc: designware: Add EP mode support") > > > Fixes: d8bbeb39fbf3 ("PCI: designware: Wait for iATU enable") > > Can you split it into two patches and repost it please ? It will make > everyone's life easier to backport it if there is need, I will apply > then. IIUC, the purpose of this split is to make the backport to stable easier. If so, I realise that the Fixes tags were not enough, we missed: Fixes: edd45e396829 ("PCI: dwc: designware: Move _unroll configurations to a separate function") I'm not sure how to handle this case. From another side, the issue to be fixed is the same: call sleep in atomic context in the same driver, is it better to use one patch? As for stable tree, I could send out separate patches instead. What do you think? Thanks, Jisheng