From patchwork Tue Oct 8 08:56:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 3001491 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A419A9F243 for ; Tue, 8 Oct 2013 08:56:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F1476201F2 for ; Tue, 8 Oct 2013 08:56:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3C6EB201EF for ; Tue, 8 Oct 2013 08:56:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751725Ab3JHIz6 (ORCPT ); Tue, 8 Oct 2013 04:55:58 -0400 Received: from mail-ee0-f44.google.com ([74.125.83.44]:59771 "EHLO mail-ee0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751733Ab3JHIz4 (ORCPT ); Tue, 8 Oct 2013 04:55:56 -0400 Received: by mail-ee0-f44.google.com with SMTP id b47so3855847eek.3 for ; Tue, 08 Oct 2013 01:55:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id; bh=d/IwvN9ZSw7n3S/AxJLGbv7RPvQ8CmW4pNm5QKj/5jw=; b=TpPUn2h+BYI+MpAaYEZSRh2Cy/V2szm2fElkoOfeYD3vS93xGFGRuuTAyZBEOJA2Ab pDDOAss8KNpNgPsdLL6bHCOxr0oA0HeWD+h9wXKEywx/YGvlAy/zucxRZxhDYoKkY/w9 SuTgV3bRxTU1ZtHQxVUjaZ3qiQsNdLGuTRpoM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=d/IwvN9ZSw7n3S/AxJLGbv7RPvQ8CmW4pNm5QKj/5jw=; b=e4Miin6b27m3WlvpUkkKPr2yJx80YblvM+uoGk0uKxM0EaIpM6G04QI1KXPoaSD38d xJ+sp1H129i0SiB81RB9yJ2mMQ5XMAqlwsOYhZa3+XeWthREkUWJAFmBY3jTemU8nr98 ISkn0KfdVLsJjv+j0owRsIwmu29kMPPYy+LSgyxO/rSqtv09bRNoNTys3zNGr1BCkSEi ShAjEOeKlqsee4yDbi/HuaQb4rf3gg30nA56RvJZmQ2ih8L8m8fA9TVmty1nBDk2rbpW b0Sc4S8XsFa90616yByqp50LDKgkLGXsTEmRl3yqiV+4zyZ849WCTvEmIjoAlC/M/EBt T8+g== X-Gm-Message-State: ALoCoQlg83yxvLwgfZbQBCpEc1Z4TVmLjVdqZC/PjLehQAPzu+US6yLDX0xHFF5DmFxN/e16lBvq X-Received: by 10.14.45.70 with SMTP id o46mr684579eeb.19.1381222554925; Tue, 08 Oct 2013 01:55:54 -0700 (PDT) Received: from phenom.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPSA id h52sm73272538eez.3.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 08 Oct 2013 01:55:54 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Cc: Chris Wilson , Daniel Vetter , kbuild test robot , "Rafael J. Wysocki" , Viresh Kumar , cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] cpufreq: Add dummy cpufreq_cpu_get/put for CONFIG_CPU_FREQ=n Date: Tue, 8 Oct 2013 10:56:11 +0200 Message-Id: <1381222571-20317-1-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.8.4.rc3 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The drm/i915 driver wants to adjust it's own power policies using the cpu policies as a guideline (we can implicitly boost the cpus through the gpus on some platforms). To avoid a dreaded select (since a depends will leave users wondering where where their driver has gone too) add dummy functions. Reported-by: kbuild test robot Cc: kbuild test robot Cc: "Rafael J. Wysocki" Cc: Viresh Kumar Cc: cpufreq@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Vetter --- A quick ack for merging this this through the drm-intel tree is probably the simplest way forward. -Daniel --- include/linux/cpufreq.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index fcabc42..5ad9a4e 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -93,8 +93,16 @@ struct cpufreq_policy { #define CPUFREQ_SHARED_TYPE_ALL (2) /* All dependent CPUs should set freq */ #define CPUFREQ_SHARED_TYPE_ANY (3) /* Freq can be set from any dependent CPU*/ +#ifdef CONFIG_CPU_FREQ struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu); void cpufreq_cpu_put(struct cpufreq_policy *policy); +#else +static inline struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu) +{ + return NULL; +} +static inline void cpufreq_cpu_put(struct cpufreq_policy *policy) { } +#endif static inline bool policy_is_shared(struct cpufreq_policy *policy) {