Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2692757ybl; Mon, 20 Jan 2020 07:38:08 -0800 (PST) X-Google-Smtp-Source: APXvYqxsJ+0M+Y9kGY5RBaI8V8b4S2jov2glcEKAn2aP7ChaiTN0MeYes9TrbaXjooEd2/a7kLC9 X-Received: by 2002:a05:6830:1bf2:: with SMTP id k18mr15001otb.78.1579534687763; Mon, 20 Jan 2020 07:38:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579534687; cv=none; d=google.com; s=arc-20160816; b=rnB+T6Iee0bpE1MxzjXdtSpbyd2G7rfO7XbrJh62sUk9KJO7oOcJNeh4+fL2u3ko9F mcG+XTRjvCkxm2wOsobDjqMybHWX7Oq1tAC7BKsEsISd/QkRe6KIGMta9PJuDz5a9oX8 YoKlgxjkG6cBI4H5jDa6IYPXoR4pOQn7hct+zfyVuQwSNDMk5+yC0zEJXVLPEn8lqsxr OZgcQ9j3/Vqt6QUCdpYoWUrmfXKzFZUac+Ah0J4pNQAO49ZAtxPiH1kMid8/hItUYZkA IhqthQ9dJXt32cnNm1+Nea6s52TdxOhl90kHDocL5dGddyRiGGELetis+/OEvSyAJytT Gt6w== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=rwjhPIqV7ooST0X1zRHXhc58Whw6UT3jQ/L+C+KulDU=; b=z3qGRsHU/M7WrYmKBZm4Q+oR1fxC/SDJxVUyCV2VlENTD7QkB3vROp+XjhjZ6xfhFg IXTUkYbvdnpgQa+lT+Sj+g+1wK111JijZ47LD8dHnfiUQXhn4gb9i2mgBJ4555Fg3aR+ r8+mM6joksQwbIbS9b6cEBbIdwPycIQ2bZvd7NJphNvYBWbKbg9m99poFFJmnFHjEdxb Vx8EOmmTD6vD6831GBKaQ7axm9KWmv+2Z3y1csTx2CxGcil7sQw6KGnj0FXnIU+aaows RqMFYojTqd6V08pk6nXF7MuuPUJRpi8sLIrCeY1itbD4wqerx036d2vgAIrIHaiWLvO8 86xg== 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 z4si20365339oti.93.2020.01.20.07.37.54; Mon, 20 Jan 2020 07:38:07 -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 S1727573AbgATPhA (ORCPT + 99 others); Mon, 20 Jan 2020 10:37:00 -0500 Received: from foss.arm.com ([217.140.110.172]:33812 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726876AbgATPg7 (ORCPT ); Mon, 20 Jan 2020 10:36:59 -0500 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 BBC2830E; Mon, 20 Jan 2020 07:36:58 -0800 (PST) Received: from [10.37.12.169] (unknown [10.37.12.169]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 024BF3F52E; Mon, 20 Jan 2020 07:36:48 -0800 (PST) Subject: Re: [PATCH 1/4] PM / EM: and devices to Energy Model To: Dietmar Eggemann , 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 Cc: 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, qperret@google.com, 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 References: <20200116152032.11301-1-lukasz.luba@arm.com> <20200116152032.11301-2-lukasz.luba@arm.com> <17b77e0c-9455-0479-d37b-c57717c784c7@arm.com> From: Lukasz Luba Message-ID: <38307e88-f7ff-bc2a-bbce-5e508e275526@arm.com> Date: Mon, 20 Jan 2020 15:36:46 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/20/20 3:11 PM, Dietmar Eggemann wrote: > On 20/01/2020 15:53, Dietmar Eggemann wrote: >> On 16/01/2020 16:20, lukasz.luba@arm.com wrote: >>> From: Lukasz Luba > > [...] > >>> +enum em_type { >>> + EM_SIMPLE, >>> + EM_CPU, >>> +}; >> >> s/EM_SIMPLE/EM_DEV ? >> >> Right now I only see energy models and _one_ specific type (the CPU EM). >> So a tag 'is a CPU EM' would suffice. No need for EM_SIMPE ... > > Wait, you even have > > struct em_device { > struct em_perf_domain *em_pd; > struct device *dev; > ... > } > > static bool _is_cpu_device(struct device *dev) > > Shouldn't this be enough to distinguish between EM and special CPU EM > under the API? Even when required to use container_of() to get from > em_perf_domain to device. > Agree, I will remove this em_type related code. Lukasz