Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6598796imu; Sun, 2 Dec 2018 22:44:46 -0800 (PST) X-Google-Smtp-Source: AFSGD/XRqkiv/bRicZAj2Wjn+kqj3t0MXpkcZeqG8DFaLJC6GfJP2KZC91VTBf3pCjnh2bYxFRwR X-Received: by 2002:a17:902:8a95:: with SMTP id p21mr15102759plo.183.1543819486741; Sun, 02 Dec 2018 22:44:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543819486; cv=none; d=google.com; s=arc-20160816; b=J0deBmQWAv4T4s+37OoZQLgCdI87kMs1A1rFqIWZSP7S6uZXqD+Y7aZu1CrpUU6OMM S6IsD85v3mvcnZ5PJ+3IdkmUAhjXkzt6A9HjeJ8P1iTmB7SU9JQC6mwEJr3wj0bDgvyw 5q+ljFSEbJTxiteFYOcR9O9fvhXGKWGGGRYY4fK5LbwjENmwJ6gVLGK0FRjLgsrN8MCk kp0PV5qZ1qBQzwvVG2OBg0+m37x0eR2aVln5v+uhIiwH2b3TUTAoEAO4oVa+GN9wyzux p18PNdkE1psB/izMfC7cxwWxiLafcTy+RxdcBxpDB5H9/tkOefg4xpP0dUIMx47fH/ZH ZHHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dmarc-filter:dkim-signature :dkim-signature; bh=1jqWbHzkoz/xP7FF/8KvdjTC5J0NEBGt/wWaoay6v1I=; b=wBTm+U4dDB7nXC1072EDqlG/xFm1SiFo9vmM/3xtAAB+a9ftUe8jtCd2Lpx+i02RcO rh+7SKHbVjaitBSpqHDAWchwbgbQiKYQ2HpNuyU2TJUs9OlA6W57R9e3RryyHe7ij4pk 7uHK5mHOj9YbQnbZGCFTWNNDuz1lAYIPzLA0PxzHgENqpq0g/X3PTfEJwe7btNd61Mhq 1A+4wPnxGyG21Xo4pkw0AR8GCn9C1UMRUSSmeGROzCZbPJZewwYmcX7v34/+lZxdXzjG XoIqumgiww7YUKOaHiPlTaT6INxdzhi2CbpS6Lt+1jr4NlJiiXKsPU9zbcM+SVk2HvdD UDIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b="Iq+fC/dm"; dkim=pass header.i=@codeaurora.org header.s=default header.b=FNMAsACU; 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 s13si11847807pgh.583.2018.12.02.22.44.32; Sun, 02 Dec 2018 22:44:46 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b="Iq+fC/dm"; dkim=pass header.i=@codeaurora.org header.s=default header.b=FNMAsACU; 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 S1725940AbeLCGnz (ORCPT + 99 others); Mon, 3 Dec 2018 01:43:55 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:41282 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725818AbeLCGnz (ORCPT ); Mon, 3 Dec 2018 01:43:55 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 309F5607B5; Mon, 3 Dec 2018 06:43:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1543819433; bh=Les4Qx6dK08W40oJQcZWCv0Zrwup0GDOfZoZVz8D+do=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Iq+fC/dm8uQm9Pnk3ENMN5zJzxksDTdi1BsMjuL2fiDcGB2Teqvdh/iWBVrIZmtI7 TSt7BlfZco0mS8naZYSh6kh4AZaUQO7ltAPdwSiZ7wcEqszBLaYUOnTi0zRo0dmezt LephWSepsc63V/6HJkEuPLl4dUvc23o0wrt82NIQ= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: vivek.gautam@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 62CD260AD8; Mon, 3 Dec 2018 06:43:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1543819432; bh=Les4Qx6dK08W40oJQcZWCv0Zrwup0GDOfZoZVz8D+do=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=FNMAsACUAYXAxYXn6R/wXpVtHSwPOeNjIOQAfMhoYnvJKqwTRRbjU26Y8gylQnasO issC5l//duLoU8h5WTVzHzdVYqOVf76BjN883aK4aNgJ0tzNOFlpP2gv4TEfzg7akc 7oBbC1RNjNcJkeKLoSQEQUqCx2bmuvH+kRTINDqk= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 62CD260AD8 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=vivek.gautam@codeaurora.org Received: by mail-qt1-f181.google.com with SMTP id i7so12525655qtj.10; Sun, 02 Dec 2018 22:43:52 -0800 (PST) X-Gm-Message-State: AA+aEWbxiemjVZKX5ZlBycq4oMAeEgLyeU1MuvnsJPtE1CrY5M+lOLIb u3gtf9/E4Fhl/YauFnpbA/JcKhfZZYiOimbHES0= X-Received: by 2002:a0c:c60b:: with SMTP id v11mr14558876qvi.198.1543819431619; Sun, 02 Dec 2018 22:43:51 -0800 (PST) MIME-Version: 1.0 References: <20181127101145.7682-1-vivek.gautam@codeaurora.org> <20181127101145.7682-2-vivek.gautam@codeaurora.org> <154342225921.88331.14467967828250776155@swboyd.mtv.corp.google.com> <0d76b669-6c4f-7c3b-50a1-084201f2c07a@arm.com> <20181130181536.GA15274@arm.com> In-Reply-To: <20181130181536.GA15274@arm.com> From: Vivek Gautam Date: Mon, 3 Dec 2018 12:13:38 +0530 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v18 1/5] iommu/arm-smmu: Add pm_runtime/sleep ops To: Will Deacon Cc: Robin Murphy , sboyd@kernel.org, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "list@263.net:IOMMU DRIVERS , Joerg Roedel ," , Joerg Roedel , "robh+dt" , Mark Rutland , Linux PM , "Rafael J. Wysocki" , open list , alex.williamson@redhat.com, linux-arm-msm , freedreno Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 30, 2018 at 11:45 PM Will Deacon wrote: > > On Thu, Nov 29, 2018 at 08:25:20PM +0530, Vivek Gautam wrote: > > On Wed, Nov 28, 2018 at 10:07 PM Robin Murphy wrote: > > > > > > On 28/11/2018 16:24, Stephen Boyd wrote: > > > > Quoting Vivek Gautam (2018-11-27 02:11:41) > > > >> @@ -1966,6 +1970,23 @@ static const struct of_device_id arm_smmu_of_match[] = { > > > >> }; > > > >> MODULE_DEVICE_TABLE(of, arm_smmu_of_match); > > > >> > > > >> +static void arm_smmu_fill_clk_data(struct arm_smmu_device *smmu, > > > >> + const char * const *clks) > > > >> +{ > > > >> + int i; > > > >> + > > > >> + if (smmu->num_clks < 1) > > > >> + return; > > > >> + > > > >> + smmu->clks = devm_kcalloc(smmu->dev, smmu->num_clks, > > > >> + sizeof(*smmu->clks), GFP_KERNEL); > > > >> + if (!smmu->clks) > > > >> + return; > > > >> + > > > >> + for (i = 0; i < smmu->num_clks; i++) > > > >> + smmu->clks[i].id = clks[i]; > > > > > > > > Is this clk_bulk_get_all()? > > > > From what I remember, and now I could go back to v7 and check [1], we parked > > clk_bulk_get out of OF's sole purview as we also have > > arm_smmu_device_acpi_probe() besides arm_smmu_device_dt_probe(). > > > > arm_smmu_device_dt_probe() could get the clocks from dt and fill in > > the clock bulk data, and > > similarly, arm_smmu_device_acpi_probe() could fill the clock bulk data > > by getting it from ACPI. > > > > clk_bulk_get_all() seems like going only the OF way. > > Is there another way here to have something common between ACPI > > and OF, and then do the clk_bulk_get? > > I'd say just go with clk_bulk_get_all() and if somebody really wants to > mess with the SMMU clocks on a system booted via ACPI, then it's their > problem to solve. My understanding is that the design of IORT makes this > next to impossible to solve anyway, because a static table is used and > therefore we're unable to run whatever ASL methods need to be invoked to > mess with the clocks. Sure then. I will respin this patch-series. > > Will -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation