Received: by 10.223.148.5 with SMTP id 5csp7492773wrq; Thu, 18 Jan 2018 06:13:05 -0800 (PST) X-Google-Smtp-Source: ACJfBotAYktJLBENNVWs02D9g15HPoW56/r1pmbcQxgpu6FjclrB0iIqNCupLiNORHTfveCv7KDH X-Received: by 10.99.5.69 with SMTP id 66mr29459654pgf.80.1516284785019; Thu, 18 Jan 2018 06:13:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516284784; cv=none; d=google.com; s=arc-20160816; b=a0R9i1ZEQN3byG1DGE6WW51ke4YhkGaWAJIJtBmYjR51z7F0QVJhmRbXfOGNeLYgOy SjDNzIIBHaWrgYXxs8mxYV5MrKsLN9iu/bEUb+0eEtpKCCg3mBeQw/9cHxZhRYRy/ooi cCESlujuwDC+0gd6NGSLRfV29SzAPYiVp8i/4Ed93Y2gdyRInPUlQ1aIS+W74rQ0+2Ti 4wT9erbZRWCQP9fDgu6CRZAvk/ohTpDd/i9hIe6TZ5sMdi8eHGTe6y3DSBnTpD38/hYN IWVg2L6zv3Pr1Ffs5VvxaCUSmBeBhX3sh2VjNsF4iusTWnYRkM93QY5vVrchffDl6nZB qI9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :references:subject:cc:to:mime-version:user-agent:from:date :message-id:arc-authentication-results; bh=f2J3kaZeQnIJygPqbZ3k2K3+oYQp3bSr/X2/ue8TMnM=; b=N4iIgJ7E+HqtB2QrdAXWvp7DVQP6lk5GLzTQYVtf5TwyTXNknj/zwU+ELX+8+otB6S S0a3hMr9ADwNCl/ZNk2tAvz9PMT8FFWmK/xZdzD3nVQP21j5dzR9gqIgCWF+hIqX4TPv M7ktKebOEnMuGeokM8wwAkKsLPkw2zL0o3HHlDxR1Jku5y1FRjD8Cka4/XjdoK0UKmOU Uk3TLnxudkqMFQOcfbSLjnVCmJ4MIOis9qT5qlXIlDQfv9oIRvY99JdXzcEaJXWdlOBh mpS8Fe9X+28AYPPgmpykQmb9+Nx5jtmpvmo6q6kt2D8wWRFRv+qpyi1KBijvnlBrfldk BcGA== 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 n4si6220931pgu.398.2018.01.18.06.12.50; Thu, 18 Jan 2018 06:13:04 -0800 (PST) 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 S1756531AbeAROMP (ORCPT + 99 others); Thu, 18 Jan 2018 09:12:15 -0500 Received: from regular1.263xmail.com ([211.150.99.136]:49148 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756279AbeAROMN (ORCPT ); Thu, 18 Jan 2018 09:12:13 -0500 Received: from jeffy.chen?rock-chips.com (unknown [192.168.167.190]) by regular1.263xmail.com (Postfix) with ESMTP id B78103A; Thu, 18 Jan 2018 22:11:50 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 Received: from [172.16.22.190] (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTPA id B371838D; Thu, 18 Jan 2018 22:11:43 +0800 (CST) X-RL-SENDER: jeffy.chen@rock-chips.com X-FST-TO: robin.murphy@arm.com X-SENDER-IP: 103.29.142.67 X-LOGIN-NAME: jeffy.chen@rock-chips.com X-UNIQUE-TAG: <1e524925792b89d143c7e2e843aefeb1> X-ATTACHMENT-NUM: 0 X-SENDER: cjf@rock-chips.com X-DNS-TYPE: 0 Received: from [172.16.22.190] (unknown [103.29.142.67]) by smtp.263.net (Postfix) whith ESMTP id 12240JJ11JR; Thu, 18 Jan 2018 22:11:51 +0800 (CST) Message-ID: <5A60AB1D.9080002@rock-chips.com> Date: Thu, 18 Jan 2018 22:11:41 +0800 From: JeffyChen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:19.0) Gecko/20130126 Thunderbird/19.0 MIME-Version: 1.0 To: Robin Murphy , linux-kernel@vger.kernel.org, tfiga@chromium.org CC: jcliang@chromium.org, xxm@rock-chips.com, Heiko Stuebner , linux-rockchip@lists.infradead.org, iommu@lists.linux-foundation.org, Joerg Roedel , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v4 05/13] iommu/rockchip: Use iopoll helpers to wait for hardware References: <20180118115251.5542-1-jeffy.chen@rock-chips.com> <20180118115251.5542-6-jeffy.chen@rock-chips.com> <064794b9-98ae-221e-76bd-e11130514826@arm.com> In-Reply-To: <064794b9-98ae-221e-76bd-e11130514826@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Robin, On 01/18/2018 09:09 PM, Robin Murphy wrote: >> -#define FORCE_RESET_TIMEOUT 100 /* ms */ >> +#define FORCE_RESET_TIMEOUT 100000 /* us */ >> +#define POLL_TIMEOUT 1000 /* us */ > > Nit: the callsites look a bit odd with the combination of POLL_TIMEOUT > and the magic number 100 - should we not also define something like > POLL_PERIOD for that? Also POLL_TIMEOUT is a rather generic name and > overlaps with several other drivers, so a namespace prefix would be > helpful (i.e. RK_IOMMU_POLL*, or at least RK_POLL*). > > FWIW, my personal preference would be to also suffix these with _US for > absolute clarity, but it's not essential (especially if longer names > lead to more linebreaks at the callsites). right, that make sense, will fix it in next version, thanks :) > > With those undocumented "100"s fixed up, > > Reviewed-by: Robin Murphy