From patchwork Sun Jan 25 20:53:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 43727 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 974A921BCE for ; Sun, 25 Jan 2015 20:53:57 +0000 (UTC) Received: by mail-wi0-f200.google.com with SMTP id fb4sf2511540wid.3 for ; Sun, 25 Jan 2015 12:53:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=8ehCdA56V033pdcAJzG0D9ZkmmirgFEJLkXJE7SehXM=; b=XeetDP1q9A18ZEK8TE4OQvFzg3Pmdzgr+qm92LhZIRrLudngB0L0EK5JXcQPgN7ysp wsJ0V1jzpqCCZN6KDfPht3zpNkrBbYZu01E5RHedhyWTrXxm97yn2D3XbCaRjrp5TmfB u+NAGUeeD/ymyfMUovbC4NtHRdgh+eultq6faW+wKWNso9/vWPLPtg6kuWYwwmTlCCCk gmQIkx4aLdtDsXUu2QON20iZbLsVl61jhMwA2rbdgOoClxGp/NRb5yMNlzUrC+HAE/qU OpSFcwdh/g2wBlzi88aqb6jAtceRfg2uTe6W8a6G0Qv4tIlvLrI6sn9JCwXT1denonRs 6NOg== X-Gm-Message-State: ALoCoQnBcY9itxoGgPCXcIer7c8wM3jIsuYY85LL6lM0AT5U2qaYq9PWaY8GCDF3ExnqQi1XOuHL X-Received: by 10.152.43.166 with SMTP id x6mr296521lal.3.1422219236727; Sun, 25 Jan 2015 12:53:56 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.69 with SMTP id i5ls293357lah.23.gmail; Sun, 25 Jan 2015 12:53:56 -0800 (PST) X-Received: by 10.112.44.230 with SMTP id h6mr17774423lbm.98.1422219236580; Sun, 25 Jan 2015 12:53:56 -0800 (PST) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id s3si7254113lbl.128.2015.01.25.12.53.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 25 Jan 2015 12:53:56 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by mail-la0-f43.google.com with SMTP id q1so4932201lam.2 for ; Sun, 25 Jan 2015 12:53:56 -0800 (PST) X-Received: by 10.112.30.71 with SMTP id q7mr17928253lbh.41.1422219236366; Sun, 25 Jan 2015 12:53:56 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp574066lbj; Sun, 25 Jan 2015 12:53:55 -0800 (PST) X-Received: by 10.70.50.228 with SMTP id f4mr28923041pdo.27.1422219234544; Sun, 25 Jan 2015 12:53:54 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id oa9si9800826pbb.139.2015.01.25.12.53.53; Sun, 25 Jan 2015 12:53:54 -0800 (PST) Received-SPF: none (google.com: linux-pm-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752454AbbAYUxw (ORCPT + 11 others); Sun, 25 Jan 2015 15:53:52 -0500 Received: from mail-wi0-f182.google.com ([209.85.212.182]:62283 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751694AbbAYUxv (ORCPT ); Sun, 25 Jan 2015 15:53:51 -0500 Received: by mail-wi0-f182.google.com with SMTP id n3so6264684wiv.3 for ; Sun, 25 Jan 2015 12:53:50 -0800 (PST) X-Received: by 10.194.71.164 with SMTP id w4mr12211668wju.19.1422219230674; Sun, 25 Jan 2015 12:53:50 -0800 (PST) Received: from mai.lan (135-224-190-109.dsl.ovh.fr. [109.190.224.135]) by mx.google.com with ESMTPSA id pl1sm11160288wic.16.2015.01.25.12.53.48 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 25 Jan 2015 12:53:49 -0800 (PST) From: Daniel Lezcano To: rjw@rjwysocki.net Cc: Sudeep.Holla@arm.com, Lorenzo.Pieralisi@arm.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] drivers: cpuidle: Don't initialize big.LITTLE driver if MCPM is unavailable Date: Sun, 25 Jan 2015 21:53:47 +0100 Message-Id: <1422219227-25808-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <54C5002C.4050600@linaro.org> References: <54C5002C.4050600@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Sudeep Holla If big.LITTLE driver is initialized even when MCPM is unavailable, we get the below warning the first time cpu tries to enter deeper C-states. ------------[ cut here ]------------ WARNING: CPU: 4 PID: 0 at kernel/arch/arm/common/mcpm_entry.c:130 mcpm_cpu_suspend+0x6d/0x74() Modules linked in: CPU: 4 PID: 0 Comm: swapper/4 Not tainted 3.19.0-rc3-00007-gaf5a2cb1ad5c-dirty #11 Hardware name: ARM-Versatile Express [] (unwind_backtrace) from [] (show_stack+0x11/0x14) [] (show_stack) from [] (dump_stack+0x6d/0x78) [] (dump_stack) from [] (warn_slowpath_common+0x69/0x90) [] (warn_slowpath_common) from [] (warn_slowpath_null+0x17/0x1c) [] (warn_slowpath_null) from [] (mcpm_cpu_suspend+0x6d/0x74) [] (mcpm_cpu_suspend) from [] (bl_powerdown_finisher+0x21/0x24) [] (bl_powerdown_finisher) from [] (cpu_suspend_abort+0x1/0x14) [] (cpu_suspend_abort) from [<00000000>] ( (null)) ---[ end trace d098e3fd00000008 ]--- This patch fixes the issue by checking for the availability of MCPM before initializing the big.LITTLE cpuidle driver Signed-off-by: Sudeep Holla Acked-by: Lorenzo Pieralisi Cc: Lorenzo Pieralisi Cc: Daniel Lezcano Cc: "Rafael J. Wysocki" Signed-off-by: Daniel Lezcano --- drivers/cpuidle/cpuidle-big_little.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/cpuidle/cpuidle-big_little.c b/drivers/cpuidle/cpuidle-big_little.c index e3e225f..40c34fa 100644 --- a/drivers/cpuidle/cpuidle-big_little.c +++ b/drivers/cpuidle/cpuidle-big_little.c @@ -182,6 +182,10 @@ static int __init bl_idle_init(void) */ if (!of_match_node(compatible_machine_match, root)) return -ENODEV; + + if (!mcpm_is_available()) + return -EUNATCH; + /* * For now the differentiation between little and big cores * is based on the part number. A7 cores are considered little