Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp335924yba; Wed, 15 May 2019 02:08:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqxsFFT3JhkkYlz555Jz05GksPul+V3bDaPUZef5DR5Xwt5wdMx3XAqeSTTkweXRANpVK424 X-Received: by 2002:a63:171c:: with SMTP id x28mr42598572pgl.12.1557911321902; Wed, 15 May 2019 02:08:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557911321; cv=none; d=google.com; s=arc-20160816; b=GyM+PJxKB4YfMpyfxSIzK8uA0/FoAhX/dLzVli6vpTeE6UBb53DkqHgw4LEhSJ4/A3 QBx5+v+K8KsFRRXWBIf6/Rt0XJBl7slTUkD0oJzhZsqq+tGkVE9a7pdUGaRv9zJ3Msb7 vtmStQdX1o56teH1sPXW+pAOGem6g/i9D1IX6lFPyfuA1clGdEHwo/8/tRBbYHbCEWhR DtQSaeZuycJVIvLlhZdknW/n91hCbhAKgCMRZ2r7NzD3drWSUQ8AVh263RWR53Pk1eMP d++oclmp1cm+/P0LXPjJWRUmU7CFt/PVgtaNeGlLCRr6v5N7kz+mnWGhTIlI36COuoJw wnYg== 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:dkim-signature; bh=wFA5k42n2PvTkAtvZj4SXJNDy7f4n0IZQu6P7nqdQFk=; b=t8gFQx1yrGvE/7ZIGEuaE1OTItJ8iyKppahW7J8d4JyxcnOJRMqGBzc/7E7FRWavO0 ie8dSOuNm16dRq7Tavpy//2N0968nbyTzLeX5way3C7OVG3Se1Fp/pcTIsm8ishoXLO1 juvmojkzs1s4DeoXhbYx/Stw9KqCZmum5/S0SZiTNpj9RnSfAin1/cb7Gj3h3xbd/nMZ bhWzotisN/GggYhwX/fm6tz2EWfYpruTCwtvXLM+/hU9aRT7TszcCrLg55rOxgWjnOLd 00yKgum6ld3y4vSIsV+neuM8mAD6+CLJtvdE1AUIOARRQq0g8EunKERdkGZ9FAGOLdJs TEoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X4kG2qR8; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ay1si1275127plb.96.2019.05.15.02.08.26; Wed, 15 May 2019 02:08:41 -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=@linaro.org header.s=google header.b=X4kG2qR8; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726424AbfEOJGX (ORCPT + 99 others); Wed, 15 May 2019 05:06:23 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:40062 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725876AbfEOJGW (ORCPT ); Wed, 15 May 2019 05:06:22 -0400 Received: by mail-wm1-f67.google.com with SMTP id h11so1646649wmb.5 for ; Wed, 15 May 2019 02:06:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=wFA5k42n2PvTkAtvZj4SXJNDy7f4n0IZQu6P7nqdQFk=; b=X4kG2qR8EPO/1PEqo1rglf1NosQAvqluV2o4RPotqdHeFYQETZNlwgC5sp94OvPiJs DoCeYV3ZOP1Mg/eir1rrA11RbRZTRbQh5fZ0eCusGa01sTnEZ9/1RYUpnVv6pmKr8h6H txEz1vwXOa8iN9LsTSXQCGhGcnw+2W+BKlFY3oNZ3kASHHImApY32cJo0XMVKVke55Dn ge0bcdddHtdn1nfNfs6ecsrMZuRL+6mXCZ9f6pZ5htntcHAxs0/uki1KLEg44imWSWc8 IHOQUocdgwy+zjsnuLk5nXtH8Fev4zefuKu5pl1FvGyF8z/MZWm3NOSPPFHpjkK1/e2k 9/4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=wFA5k42n2PvTkAtvZj4SXJNDy7f4n0IZQu6P7nqdQFk=; b=tiK7ZODXZo0tf/9/lYCIiLBDcFsdv2okjTeiIz5NoX0+vXuyQw5WqwwHVF9JmP22K9 Rq8Rx7vPf2vB/htoXyXOre2YqimnMr1XBo2oT8HWIgGbzJralU0sfhzLIyKexrZOKk5X INVJhZ6G8Fw887qisSvmLmcVHtkoVtJ4GzHm6R2B+26Mo+Y6+DOmhIMqk8QUxxmBPV3K DSYtZX4zsvDDTxV7wWxIhSDpVvAHWoehp+Izx7//bG6/Ew9YlTCAqDND97KUrYhTiWn+ Jr3/KOAatbMIy4JhhmKJPmejaxnZ42nOGsIXRp+7cqr7cyJjsHzROjEeNzJqiJF70832 9J6g== X-Gm-Message-State: APjAAAUMYpdvspW6O7shY1y3aBiikfQnZ4VTDPPB12ilRVbsBu31hivV HPhVJ/oR0g9Ek7GFy5eVwkKWAA== X-Received: by 2002:a1c:f70c:: with SMTP id v12mr21725967wmh.86.1557911180708; Wed, 15 May 2019 02:06:20 -0700 (PDT) Received: from [192.168.0.41] (sju31-1-78-210-255-2.fbx.proxad.net. [78.210.255.2]) by smtp.googlemail.com with ESMTPSA id f7sm1151307wmc.26.2019.05.15.02.06.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 May 2019 02:06:20 -0700 (PDT) Subject: Re: [PATCH v4 2/3] PM / EM: Expose perf domain struct To: Quentin Perret , edubezval@gmail.com, rui.zhang@intel.com, javi.merino@kernel.org, viresh.kumar@linaro.org, amit.kachhap@gmail.com, rjw@rjwysocki.net, will.deacon@arm.com, catalin.marinas@arm.com Cc: dietmar.eggemann@arm.com, ionela.voinescu@arm.com, mka@chromium.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20190515082318.7993-1-quentin.perret@arm.com> <20190515082318.7993-3-quentin.perret@arm.com> From: Daniel Lezcano Message-ID: <0ced18eb-e424-fe6b-b11e-165a3c108170@linaro.org> Date: Wed, 15 May 2019 11:06:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190515082318.7993-3-quentin.perret@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15/05/2019 10:23, Quentin Perret wrote: > In the current state, the perf_domain struct is fully defined only when > CONFIG_ENERGY_MODEL=y. Since we need to write code that compiles both > with or without that option in the thermal framework, make sure to > actually define the struct regardless of the config option. That allows > to avoid using stubbed accessor functions all the time in code paths > that use the EM. > > Acked-by: Viresh Kumar > Signed-off-by: Quentin Perret This patch implies the cpu cooling device can be set without the energy model. Isn't it possible to make a strong dependency for the cpu cooling device on the energy model option, add the energy model as default on arm arch and drop this patch? After all, the cpu cooling is using the em framework. > --- > include/linux/energy_model.h | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/include/linux/energy_model.h b/include/linux/energy_model.h > index aa027f7bcb3e..fb32b86a467d 100644 > --- a/include/linux/energy_model.h > +++ b/include/linux/energy_model.h > @@ -9,7 +9,6 @@ > #include > #include > > -#ifdef CONFIG_ENERGY_MODEL > /** > * em_cap_state - Capacity state of a performance domain > * @frequency: The CPU frequency in KHz, for consistency with CPUFreq > @@ -40,6 +39,7 @@ struct em_perf_domain { > unsigned long cpus[0]; > }; > > +#ifdef CONFIG_ENERGY_MODEL > #define EM_CPU_MAX_POWER 0xFFFF > > struct em_data_callback { > @@ -160,7 +160,6 @@ static inline int em_pd_nr_cap_states(struct em_perf_domain *pd) > } > > #else > -struct em_perf_domain {}; > struct em_data_callback {}; > #define EM_DATA_CB(_active_power_cb) { } > > -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog