From patchwork Fri Feb 8 02:52:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2114781 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 0D2383FCD5 for ; Fri, 8 Feb 2013 02:52:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759585Ab3BHCw4 (ORCPT ); Thu, 7 Feb 2013 21:52:56 -0500 Received: from mail-ob0-f172.google.com ([209.85.214.172]:65156 "EHLO mail-ob0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759545Ab3BHCwz (ORCPT ); Thu, 7 Feb 2013 21:52:55 -0500 Received: by mail-ob0-f172.google.com with SMTP id tb18so3478240obb.17 for ; Thu, 07 Feb 2013 18:52:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:x-gm-message-state; bh=TADiWoZVSzOaJDv/xImTdLgSWjWWTYTBdaLC+3wjOnI=; b=HKS7xBDxCnFLg+qfX9+Raajxly4KQ4T0KH7PFC++3c9GyRB/MVRHH1YvCoaWMQVx9O LFOHf9+QONPOccu0yoMJCuoDi7Vj6znhoyWHUcNSf8xOCvteVdAbWIQk20Xbzs5SIjAJ gnIvM4TnQNLfM8k/kWRDTS6EKQh8oP1lAS1BPQIWH+YZkBdLA0v4S9Ywdaij7wwBhnjt /40PYxeY6wtY9OLEjAF4MW6fevP27BI7Gga4CRYy1jUVeXn1WuqkdTJoPcDuaOVHltuK An5VGgPx10yhz9T29ucpgEP0DE41BLuixas+e9GSRoYSSyeclqxvIlVdqDZnXiwc1fyd IX8w== MIME-Version: 1.0 X-Received: by 10.60.29.193 with SMTP id m1mr2886599oeh.36.1360291974788; Thu, 07 Feb 2013 18:52:54 -0800 (PST) Received: by 10.182.22.65 with HTTP; Thu, 7 Feb 2013 18:52:54 -0800 (PST) In-Reply-To: <20130207193944.GA4016@thinkpad.lan> References: <20130207193944.GA4016@thinkpad.lan> Date: Fri, 8 Feb 2013 08:22:54 +0530 Message-ID: Subject: Re: [PATCH 0/4] CPUFreq Fixes for 3.9 From: Viresh Kumar To: Artem Savkov Cc: rjw@sisk.pl, valdis.kletnieks@vt.edu, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linaro-dev@lists.linaro.org, robin.randhawa@arm.com, Steve.Bannister@arm.com, Liviu.Dudau@arm.com X-Gm-Message-State: ALoCoQmFAA9Y/dVlM9XFQYb/HQ7wk0Cd1LHr3J9k2TFzjwRmtxFymxq2EjMc5hgm/71PVCCPFxex Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On 8 February 2013 01:09, Artem Savkov wrote: > Tested out linux-pm.git/linux-next with this patches pulled. It seems > that my systemd-sleep issue is fixed, however there is a new 'sleeping > in invalid context' bug during boot: > > [ 12.736484] BUG: sleeping function called from invalid context at mm/slub.c:925 > [ 12.739727] in_atomic(): 1, irqs_disabled(): 1, pid: 1799, name: systemd-modules > [ 12.742961] 2 locks held by systemd-modules/1799: > [ 12.746153] #0: (subsys mutex#3){......}, at: [] subsys_interface_register+0x36/0xb0 > [ 12.749499] #1: (cpufreq_driver_lock){......}, at: [] cpufreq_add_dev+0x22b/0x3d0 > [ 12.752865] Pid: 1799, comm: systemd-modules Not tainted 3.8.0-rc6+ #1 > [ 12.756175] Call Trace: > [ 12.759538] [] __might_sleep+0xe0/0x100 > [ 12.762156] [] kmem_cache_alloc_trace+0xb1/0x150 > [ 12.765432] [] ? acpi_cpufreq_cpu_init+0x73/0x5c0 [acpi_cpufreq] > [ 12.768780] [] acpi_cpufreq_cpu_init+0x73/0x5c0 [acpi_cpufreq] > [ 12.772161] [] ? cpufreq_add_dev+0x22b/0x3d0 > [ 12.775549] [] ? _raw_spin_lock_irqsave+0x77/0x90 > [ 12.778932] [] ? cpufreq_add_dev+0x22b/0x3d0 > [ 12.782307] [] cpufreq_add_dev+0x238/0x3d0 Can you please try out this: cpumask_or(policy->related_cpus, policy->related_cpus, policy->cpus); --- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 819aa33..a77d0bc 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -919,17 +919,14 @@ static int cpufreq_add_dev(struct device *dev, struct subsys_interface *sif) init_completion(&policy->kobj_unregister); INIT_WORK(&policy->update, handle_update); - spin_lock_irqsave(&cpufreq_driver_lock, flags); /* call driver. From then on the cpufreq must be able * to accept all calls to ->verify and ->setpolicy for this CPU */ ret = driver->init(policy); if (ret) { pr_debug("initialization failed\n"); - spin_unlock_irqrestore(&cpufreq_driver_lock, flags); goto err_set_policy_cpu; } - spin_unlock_irqrestore(&cpufreq_driver_lock, flags); /* related cpus should atleast have policy->cpus */