Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2684464ybl; Mon, 20 Jan 2020 07:29:47 -0800 (PST) X-Google-Smtp-Source: APXvYqyx/HX2zWjnlJEYvZERBmc13k5DgtHd49itM+5B427O4GzkWEisEhiG5otel3z/tj0aAx7R X-Received: by 2002:aca:50cd:: with SMTP id e196mr13066997oib.178.1579534187553; Mon, 20 Jan 2020 07:29:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579534187; cv=none; d=google.com; s=arc-20160816; b=ceq3PZZMhgA2I8GN3VqWmLXrmjjU/d67+T9xvpcg4TD0bELuI29El3DPKKUhLd96Jm broXPatD7EZDXMxljhbzhDRzybcvys7XwkhMOawEIy+pPoAug+fcRuXYFifcRhBbG3mC cIRJJfGqfI8b81LHwqS69COvifjMi22E3PPZ45JiNL5eZeo4ABdJiK0MpYNO1QqkdnnB 6ftx4Vk/uQhwtrLG/5R5HRy/toG5BbT7MpNjh96mzYJTiGCYjl1lUcdbzaCtybwGixK6 rJR4KHq67X8Av+dZcF4bfFRgnb3JsxYqi7B07EetkRsvWjZnx5s1927Oi7ZAaoMNfaTV oUQw== 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:dkim-signature; bh=w+9WBX8T8487sYdaCRBOXdftKEOOIGARUU12ptPCXoI=; b=KrWS45+ZDMLnnQqVZGi/5/napAgWP7IgSQkHg5vGujhc+v9141T6+q4kptWE2YRtCT OUNUnvS2Rt+281dr5hi0aVFNid9e6kIBAseYQQfnSm+JSjHI2WTMCc4hAYep02WIyUe2 JA/B4dMUr4cDfa6xhzHOW5QrdBWMn6hW/FHTERKPcJ4jQqBQP6niJjGSodS+KGCbNZsB vxlntQlE+znuFXRv6qt0CcAWDvw42a7TAPI8kGEixvOkfiqjEjc0bzRNrnmZx7MqqTMA 3N/wmiM70j3ksyhzkteC7vk8tNc8B6YDPZ9YNy854OIowxnXNEglx3K+1UCyXIbLMHd9 MV+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="WM3/QuTj"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j19si17368753oij.51.2020.01.20.07.29.34; Mon, 20 Jan 2020 07:29:47 -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=@google.com header.s=20161025 header.b="WM3/QuTj"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728760AbgATP2K (ORCPT + 99 others); Mon, 20 Jan 2020 10:28:10 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:56193 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727289AbgATP2K (ORCPT ); Mon, 20 Jan 2020 10:28:10 -0500 Received: by mail-wm1-f68.google.com with SMTP id q9so14896700wmj.5 for ; Mon, 20 Jan 2020 07:28:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=w+9WBX8T8487sYdaCRBOXdftKEOOIGARUU12ptPCXoI=; b=WM3/QuTjf8YHugRgHr0CAc4EPmW7lL5TBdACtz7cIwWejTZRMsjvhvpYDk1vBCv8x/ mwSEMBD6BloK3XpD4M9pIYUXdWrL2+620dZ1+sv7VzGqnDERmsL63ChlF8tg20oIUyHN 52ASdnLuNO3Sz8qauPMfDhgnCWpxUMumc6RftxuofGduJ6V4Ri+m9/ezp6kMCpjP0Cag AtFqAedbPek8I2J21QlxubzVd67+p4k75DZEBCr6gQdRH2dUKnHDTWK3kJyHePYYwXMd 8gKlHjdsZ26gCY4wieLh8B5FzXN/qNQg1wHFrQ0GWe3qX7B5O2cOpVF0DpGUbwhfDz+P oqIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=w+9WBX8T8487sYdaCRBOXdftKEOOIGARUU12ptPCXoI=; b=MqThzFsQTUIhMePlQjCsvuI1qQQhLE0kg4y1PzsKdxKBrzDqvSewhEFFumq/zvohuz 5PNfCauUgx6iEeQYtm+2QiudxJwNHzVd1RvtqchZPt6rX1RbtdhsFZyJY8+9lb8Upt9R 4OkisXZrgZO+vvRynjcuCOMyE/Ovlusgdvl9TuUkaydUDy1V0/hnRq4SLYbvQV7aISqw zZa3yDFMWzCblWdhxiJXCCqdBPe4miv6jqg29wSJc4giIFpV5Nc3zg4i+Z45wsMMucCo r9G0Gicv2jFgbc0R3Q6pfv07F2Kd2JiMGzXifDikuvfsmeNt8zXcPSq/Qvckl4gwRy7k ysKQ== X-Gm-Message-State: APjAAAVSnoJ3L94JhtONz530DG+z5gJMwQ4TrlPZPvDFYAFnp+6rFfuR ZWo/sMT6XeP0U66HZd0sg9ciwA== X-Received: by 2002:a1c:dcd5:: with SMTP id t204mr19453471wmg.34.1579534088409; Mon, 20 Jan 2020 07:28:08 -0800 (PST) Received: from google.com ([2a00:79e0:d:110:d6cc:2030:37c1:9964]) by smtp.gmail.com with ESMTPSA id d14sm51225920wru.9.2020.01.20.07.28.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2020 07:28:07 -0800 (PST) Date: Mon, 20 Jan 2020 15:28:04 +0000 From: Quentin Perret To: Dietmar Eggemann Cc: lukasz.luba@arm.com, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-omap@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-imx@nxp.com, Morten.Rasmussen@arm.com, Chris.Redpath@arm.com, ionela.voinescu@arm.com, javi.merino@arm.com, cw00.choi@samsung.com, b.zolnierkie@samsung.com, rjw@rjwysocki.net, sudeep.holla@arm.com, viresh.kumar@linaro.org, nm@ti.com, sboyd@kernel.org, rui.zhang@intel.com, amit.kucheria@verdurent.com, daniel.lezcano@linaro.org, mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, kernel@pengutronix.de, khilman@kernel.org, agross@kernel.org, bjorn.andersson@linaro.org, robh@kernel.org, matthias.bgg@gmail.com, steven.price@arm.com, tomeu.vizoso@collabora.com, alyssa.rosenzweig@collabora.com, airlied@linux.ie, daniel@ffwll.ch, patrick.bellasi@matbug.net Subject: Re: [PATCH 1/4] PM / EM: and devices to Energy Model Message-ID: <20200120152804.GB164543@google.com> References: <20200116152032.11301-1-lukasz.luba@arm.com> <20200116152032.11301-2-lukasz.luba@arm.com> <17b77e0c-9455-0479-d37b-c57717c784c7@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17b77e0c-9455-0479-d37b-c57717c784c7@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday 20 Jan 2020 at 15:53:35 (+0100), Dietmar Eggemann wrote: > Would be really nice if this wouldn't be required. We should really aim > for 1 framework == 1 set of interfaces. > > What happens if someone calls em_get_pd() on a CPU EM? > > E.g: > > static struct perf_domain *pd_init(int cpu) > { > - struct em_perf_domain *obj = em_cpu_get(cpu); > + struct device *dev = get_cpu_device(cpu); > + struct em_perf_domain *obj = em_pd_get(dev); > struct perf_domain *pd; > > Two versions of one functionality will confuse API user from the > beginning ... Agreed, this looks a bit confusing. It should be trivial to make em_dev_get() (or whatever we end up calling it) work for CPUs too, though. And we could always have a em_cpu_get(int cpu) API that is a basically a wrapper around em_dev_get() for convenience. Thanks, Quentin