From patchwork Fri Feb 8 14:50:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2116231 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 0911DDFE75 for ; Fri, 8 Feb 2013 14:50:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760139Ab3BHOuZ (ORCPT ); Fri, 8 Feb 2013 09:50:25 -0500 Received: from mail-wi0-f171.google.com ([209.85.212.171]:50991 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752515Ab3BHOuW (ORCPT ); Fri, 8 Feb 2013 09:50:22 -0500 Received: by mail-wi0-f171.google.com with SMTP id hn17so952583wib.10 for ; Fri, 08 Feb 2013 06:50:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=vO+Jns2ERVLzxo8xO/e+t+UjCdKECH+C40OEcVg7UgM=; b=XAKJAPn+k5CGZMq49eVyavcgCB8Yqk9WSVcMOIwfZDUiqnAAS2qkyNg2EVWfndjbsk xi3EauhyMw7r8hp6RneRVfDUVADmF55SMqZTmdncn6gLBBiNIqWk77R/huXlR3XNtZR+ hrBQZD60wSn9jpRSU0Sse7Y+P685TO64RoURjvURXJJtsyanZlAgClHrBEXZShpIQl++ N/8nJGz7P0vUS41N4Z137cvurA426+Y+aK3leBNfUHKfZkqdlSgG5ol/uj4IpgV7wAcV N/7QoyWEuuNXKUL6QzKNVRJ005JKhTYIMNiquFDIkIrkmJ/iwAvlQS2zGVGsCzph+2H+ ZRTQ== MIME-Version: 1.0 X-Received: by 10.180.79.65 with SMTP id h1mr3124607wix.15.1360335019924; Fri, 08 Feb 2013 06:50:19 -0800 (PST) Received: by 10.194.124.208 with HTTP; Fri, 8 Feb 2013 06:50:19 -0800 (PST) In-Reply-To: References: <2612804.Hcyse1lRVO@vostro.rjw.lan> Date: Fri, 8 Feb 2013 20:20:19 +0530 X-Google-Sender-Auth: wyOQ_youZ29rZOPI2rri--ZQPbM Message-ID: Subject: Re: linux-next: Tree for Feb 8 [ smp|cpufreq: WARNING: at kernel/smp.c:245 smp_call_function_single ] From: Viresh Kumar To: sedat.dilek@gmail.com Cc: "Rafael J. Wysocki" , Hillf Danton , Stephen Rothwell , linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, Linux ACPI , Linux PM List , x86@kernel.org, Ingo Molnar , Chuansheng Liu Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Fri, Feb 8, 2013 at 7:45 PM, Sedat Dilek wrote: > "...some...changes..." is not very concrete :-). > Which commit(s) caused this trouble? > > Is current (meanwhile updated?) linux-pm.git#linux-next good (didn't > check last commit-ids of your tree from Next/ dir)? Attached patch would fix it for you and it looks like and is going to be pulled in by Rafael: From: Viresh Kumar Date: Fri, 8 Feb 2013 10:35:31 +0530 Subject: [PATCH] cpufreq: Remove unnecessary locking I have placed some locks intentionally around calls to driver->ops (init/exit), which look to be wrong as these calls can call routines that potentially sleep. Lets remove these locks. Signed-off-by: Viresh Kumar Tested-by: Sedat Dilek --- drivers/cpufreq/cpufreq.c | 7 ------- 1 file changed, 7 deletions(-) cpumask_or(policy->related_cpus, policy->related_cpus, policy->cpus); @@ -1100,10 +1095,8 @@ static int __cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif wait_for_completion(cmp); pr_debug("wait complete\n"); - spin_lock_irqsave(&cpufreq_driver_lock, flags); if (driver->exit) driver->exit(data); - spin_unlock_irqrestore(&cpufreq_driver_lock, flags); free_cpumask_var(data->related_cpus); free_cpumask_var(data->cpus); diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 5d8a422..04aab05 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -795,10 +795,8 @@ static int cpufreq_add_dev_interface(unsigned int cpu, if (ret) { pr_debug("setting policy failed\n"); - spin_lock_irqsave(&cpufreq_driver_lock, flags); if (driver->exit) driver->exit(policy); - spin_unlock_irqrestore(&cpufreq_driver_lock, flags); } return ret; @@ -920,17 +918,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 */