Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp425007yba; Wed, 15 May 2019 03:53:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqyEtNxzcR1Ucfa/z7W8pLgAGWkkciW8O91i2SnsHe7rXN2lwQ8/y23tbjv3Dq+e4N09C4Iz X-Received: by 2002:a65:610e:: with SMTP id z14mr42891980pgu.238.1557917611578; Wed, 15 May 2019 03:53:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557917611; cv=none; d=google.com; s=arc-20160816; b=VKsOwcHpDRjCWd/MhEHV2xb+zgGSu9LmiYfiu47fhPO/fnE6P51pDpeJZRApuVRiVF AqkV2XEwbpe6BikvpHaBijN2eLt3EwQqT0yMo/Z8+4oLvTCBZSpwGYWWfGIfSktAW1J8 D8eIBr4WfTtjuKGJJDhJ8kZ3aNIj8nptoDAJ+FYlkYhU+19u5zWsn727nUcx1C4tpLvs wCxYdl+82YlbuiAHASsGtCk/ljLKzMwpQT0VZk1GV9z2WYrjLefy6KHBUngtFbHgSala Zwmd3T2dA0mnGPPwI1qlMxY+BoCtUGlJIsJvJjrtpgCazBKjfkUvZvAfp0mOABeQUJ23 FxBQ== 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=IY0nzwi9vKnpYmNvcMep+bJnSeq0GrA/o59QaEDPfVQ=; b=akPZ80o7+oXbOLIimkyV3sxJ9rZJcbo/M9/Nska2mLSSkwUvLODQUP+mxo8lb6oCSG 19giIXVqAiZY6stm8Lw0VXi6GcNfsrPfjFgksqxsSJdnjywNpZuor/6nn/XqSzGH49tn pie1GVBrnFLVDXL+s0WB2gPfiw18twVrW/CLbqKoGwjlIjgPGd0Z5OqrCMEtoPtHS+g+ jYgNthJcxsTh14LzmNEweLCPBboWd3gl9qs4FamcwWf3N1YJZyZ7Ua57K6d+JOstQfcb AkxcXidgRo/qi5yvN02MT9sylKbH0TCwJtDENWvU8PQhjw62tgqvSvA0g80+97RdQKOC 5K5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K2uR2Hju; 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 s8si1787546pfm.132.2019.05.15.03.53.16; Wed, 15 May 2019 03:53:31 -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=K2uR2Hju; 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 S1726551AbfEOKwB (ORCPT + 99 others); Wed, 15 May 2019 06:52:01 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:51356 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726124AbfEOKwB (ORCPT ); Wed, 15 May 2019 06:52:01 -0400 Received: by mail-wm1-f68.google.com with SMTP id o189so2165475wmb.1 for ; Wed, 15 May 2019 03:52:00 -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=IY0nzwi9vKnpYmNvcMep+bJnSeq0GrA/o59QaEDPfVQ=; b=K2uR2Hju4uVhWUovulzfQOZU2sVFJxpNv9FmCPIwXXyr2OfVIG8MmyjhceWV5Qcgwc m/6Oie/dGfo/vulbf6FK7clXnTUuHqH3HmdEQDkPMbH+FWOYiSBzAeBrBpgs8RFhLFt3 I6nQbdna/eXio9Em1jQnzxl9jBTf0Cj38IBW5kQDc0QXS4ehFL+iKKP7MVR4gQU8jnoa grpahXWuL73Jw6za1/HUgCW/4HKMq7mEW4Q2EelfNaUTf7RJneR/o/BbpQ9V3OudxzsY X3vt87hz8kGlqdhIj0R9F18XwKuvKvZddF7io6HzFP+Ywxmlw4d5cJWgf0IvKyBo/L4a c1Mg== 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=IY0nzwi9vKnpYmNvcMep+bJnSeq0GrA/o59QaEDPfVQ=; b=FZ5g+tvjimuKQ3qQPZcXPNN883NpGiAdyv18lfebmTQBabzhbejju69o9HbJ6zH++i noZkKotW7MRORgTy9agJXF2OrpZww5DWTe0uxHwpLCswTRaNPSpJekJQOcmPfVspn7V3 bQfnZ+tsR2Xom2B2t1rGQftMurrU3QE/rxUr1mwlSHWafL5r3CL8Srs2TTWQQCNZoBEf narTiet1B6XUE3mT8QagIC5nBvufDyGLNOe+FH8iwqbctCtcGJ42d7dj/synlT34czid zyJlYWo/+BVMhzfKdo3FhypbLLvWHVL51oiUzSRJHBFBQbIi0+Ihg3Jn7Bv64hULWKek Dx2A== X-Gm-Message-State: APjAAAUAOGq/T9nQ6Dl+lVON9UlHsLFc64whba1oFS9dcivSeZ9bFtdb VEsK7Vq6CZMD2EqwiJDdU4G+YQ== X-Received: by 2002:a1c:eb07:: with SMTP id j7mr22011249wmh.138.1557917519110; Wed, 15 May 2019 03:51:59 -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 y184sm2071278wmg.7.2019.05.15.03.51.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 May 2019 03:51:58 -0700 (PDT) Subject: Re: [PATCH v4 2/3] PM / EM: Expose perf domain struct To: Quentin Perret , Viresh Kumar Cc: edubezval@gmail.com, rui.zhang@intel.com, javi.merino@kernel.org, amit.kachhap@gmail.com, rjw@rjwysocki.net, will.deacon@arm.com, catalin.marinas@arm.com, 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> <0ced18eb-e424-fe6b-b11e-165a3c108170@linaro.org> <20190515091658.sbpg6qiovhtblqyr@queper01-lin> <698400c0-e0a4-4a86-b9df-cdb9bd683c0f@linaro.org> <20190515100748.q3t4kt72h2akdpcs@queper01-lin> <20190515102200.s6uq63qnwea6xtpl@vireshk-i7> <20190515104043.vogspxgkapp6qsny@queper01-lin> <20190515104651.tv5odug7ce4zlupc@queper01-lin> From: Daniel Lezcano Message-ID: <5b55e432-f8b0-91ae-a7de-fe02e0cad322@linaro.org> Date: Wed, 15 May 2019 12:51:57 +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: <20190515104651.tv5odug7ce4zlupc@queper01-lin> 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 12:46, Quentin Perret wrote: > On Wednesday 15 May 2019 at 11:40:44 (+0100), Quentin Perret wrote: [ ... ] >> +#ifdef CONFIG_THERMAL_GOV_POWER_ALLOCATOR >> if (capacitance) { >> ret = update_freq_table(cpufreq_cdev, capacitance); >> if (ret) { >> cdev = ERR_PTR(ret); >> goto remove_ida; >> } >> - >> - cooling_ops = &cpufreq_power_cooling_ops; >> - } else { >> - cooling_ops = &cpufreq_cooling_ops; >> } >> +#endif >> + cooling_ops = &cpufreq_cooling_ops; > > Argh, that is actually broken with !capacitance and > THERMAL_GOV_POWER_ALLOCATOR=y ... Perhaps it's best to keep the two > thermal_cooling_device_ops struct separated in the end. Or alternatively you can keep one structure but instead of filling the state2power,power2state and getrequestedpower fields in the declaration, you fill them in the if (capacitance) block, no? -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog