Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753303AbXLBGfY (ORCPT ); Sun, 2 Dec 2007 01:35:24 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751254AbXLBGfL (ORCPT ); Sun, 2 Dec 2007 01:35:11 -0500 Received: from hera.kernel.org ([140.211.167.34]:42445 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750715AbXLBGfI (ORCPT ); Sun, 2 Dec 2007 01:35:08 -0500 From: Len Brown Organization: Intel Open Source Technology Center To: Zhao Yakui , Linus Torvalds Subject: Re: ACPI related Warning in 2.6.24-rc3-git2 Date: Sun, 2 Dec 2007 01:34:13 -0500 User-Agent: KMail/1.9.5 Cc: "Pallipadi, Venkatesh" , "Rafael J. Wysocki" , Lukas Hejtmanek , "Li, Shaohua" , linux-kernel@vger.kernel.org, ACPI Devel Maling List , Alexey Starikovskiy References: <20071127150557.GA4365@ics.muni.cz> <924EFEDD5F540B4284297C4DC59F3DEE2B3AD7@orsmsx423.amr.corp.intel.com> <1196324563.4062.15.camel@yakui_zhao.sh.intel.com> In-Reply-To: <1196324563.4062.15.camel@yakui_zhao.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200712020134.14573.lenb@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 12268 Lines: 296 Applied to ACPI tree. Linus, I reproduced this issue on my T61, and saw it go away w/ this patch. I'll be sending you a pull request probably Sunday night w/ this pach in it. But if you are in a hurry to cut rc4 before then, consider this an Acked-by: Len Brown thanks, -Len On Thursday 29 November 2007 03:22, Zhao Yakui wrote: > Subject: ACPI : Delete the IRQ operation in throttling controll via PTC > >From : Zhao Yakui > > The IRQ operation(enable/disable) should be avoided when throttling is > controlled via PTC method. It is replaced by the migration of task. > > Signed-off-by: Zhao Yakui > > --- > drivers/acpi/processor_throttling.c | 36 > ++++++++++++++++++++++++++++-------- > 1 file changed, 28 insertions(+), 8 deletions(-) > > Index: linux-2.6.24-rc3-git3/drivers/acpi/processor_throttling.c > =================================================================== > --- linux-2.6.24-rc3-git3.orig/drivers/acpi/processor_throttling.c > +++ linux-2.6.24-rc3-git3/drivers/acpi/processor_throttling.c > @@ -29,6 +29,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -413,7 +414,7 @@ static int acpi_throttling_rdmsr(struct > } else { > msr_low = 0; > msr_high = 0; > - rdmsr_on_cpu(cpu, MSR_IA32_THERM_CONTROL, > + rdmsr_safe(MSR_IA32_THERM_CONTROL, > (u32 *)&msr_low , (u32 *) &msr_high); > msr = (msr_high << 32) | msr_low; > *value = (acpi_integer) msr; > @@ -438,7 +439,7 @@ static int acpi_throttling_wrmsr(struct > "HARDWARE addr space,NOT supported yet\n"); > } else { > msr = value; > - wrmsr_on_cpu(cpu, MSR_IA32_THERM_CONTROL, > + wrmsr_safe(MSR_IA32_THERM_CONTROL, > msr & 0xffffffff, msr >> 32); > ret = 0; > } > @@ -572,21 +573,32 @@ static int acpi_processor_get_throttling > return -ENODEV; > > pr->throttling.state = 0; > - local_irq_disable(); > + > value = 0; > ret = acpi_read_throttling_status(pr, &value); > if (ret >= 0) { > state = acpi_get_throttling_state(pr, value); > pr->throttling.state = state; > } > - local_irq_enable(); > > return 0; > } > > static int acpi_processor_get_throttling(struct acpi_processor *pr) > { > - return pr->throttling.acpi_processor_get_throttling(pr); > + cpumask_t saved_mask; > + int ret; > + > + /* > + * Migrate task to the cpu pointed by pr. > + */ > + saved_mask = current->cpus_allowed; > + set_cpus_allowed(current, cpumask_of_cpu(pr->id)); > + ret = pr->throttling.acpi_processor_get_throttling(pr); > + /* restore the previous state */ > + set_cpus_allowed(current, saved_mask); > + > + return ret; > } > > static int acpi_processor_get_fadt_info(struct acpi_processor *pr) > @@ -717,21 +729,29 @@ static int acpi_processor_set_throttling > if (state < pr->throttling_platform_limit) > return -EPERM; > > - local_irq_disable(); > value = 0; > ret = acpi_get_throttling_value(pr, state, &value); > if (ret >= 0) { > acpi_write_throttling_state(pr, value); > pr->throttling.state = state; > } > - local_irq_enable(); > > return 0; > } > > int acpi_processor_set_throttling(struct acpi_processor *pr, int state) > { > - return pr->throttling.acpi_processor_set_throttling(pr, state); > + cpumask_t saved_mask; > + int ret; > + /* > + * Migrate task to the cpu pointed by pr. > + */ > + saved_mask = current->cpus_allowed; > + set_cpus_allowed(current, cpumask_of_cpu(pr->id)); > + ret = pr->throttling.acpi_processor_set_throttling(pr, state); > + /* restore the previous state */ > + set_cpus_allowed(current, saved_mask); > + return ret; > } > > int acpi_processor_get_throttling_info(struct acpi_processor *pr) > > On Wed, 2007-11-28 at 14:42 +0800, Pallipadi, Venkatesh wrote: > > Yakui, > > > > Can you look at this. Seems to be coming from commit f79f06ab9f86 > > FixedHW support tries to read MSR with interrupts disabled. > > > > Thanks, > > Venki > > > > >-----Original Message----- > > >From: linux-kernel-owner@vger.kernel.org > > >[mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of > > >Rafael J. Wysocki > > >Sent: Tuesday, November 27, 2007 7:37 AM > > >To: Lukas Hejtmanek > > >Cc: linux-kernel@vger.kernel.org; ACPI Devel Maling List; Len > > >Brown; Alexey Starikovskiy > > >Subject: Re: ACPI related Warning in 2.6.24-rc3-git2 > > > > > >On Tuesday, 27 of November 2007, Lukas Hejtmanek wrote: > > >> Hello, > > >> > > >> in recent kernel, I got the following warnings while > > >booting. It's ACPI > > >> related. Does anybode care? Lenovo ThinkPad T61 (6465CTO). > > > > > >Appropriate Ccs added. > > > > > >Did it happen before? > > > > > >> [ 13.114814] Pid: 1, comm: swapper Not tainted 2.6.24-rc3-git2 #3 > > >> [ 13.114885] > > >> [ 13.114885] Call Trace: > > >> [ 13.115020] [] > > >acpi_ut_update_ref_count+0x50/0x9d > > >> [ 13.115095] [] > > >smp_call_function_single+0xbd/0xd0 > > >> [ 13.115169] [] _rdmsr_on_cpu+0x5c/0x60 > > >> [ 13.115241] [] > > >> acpi_processor_get_throttling_ptc+0xf3/0x158 > > >> [ 13.115323] [] > > >> acpi_processor_get_throttling_info+0x460/0x4af > > >> [ 13.115406] [] acpi_processor_start+0x54a/0x606 > > >> [ 13.115478] [] ifind+0x48/0xd0 > > >> [ 13.115550] [] > > >acpi_start_single_object+0x24/0x46 > > >> [ 13.115622] [] acpi_device_probe+0x7d/0x91 > > >> [ 13.115694] [] driver_probe_device+0x9c/0x1b0 > > >> [ 13.115766] [] __driver_attach+0xc9/0xd0 > > >> [ 13.115840] [] __driver_attach+0x0/0xd0 > > >> [ 13.115924] [] bus_for_each_dev+0x4d/0x80 > > >> [ 13.115994] [] bus_add_driver+0xac/0x220 > > >> [ 13.116080] [] acpi_processor_init+0x8f/0xfc > > >> [ 13.116153] [] kernel_init+0x154/0x330 > > >> [ 13.116225] [] child_rip+0xa/0x12 > > >> [ 13.116295] [] kernel_init+0x0/0x330 > > >> [ 13.116365] [] child_rip+0x0/0x12 > > >> [ 13.116435] > > >> [ 13.116504] WARNING: at arch/x86/kernel/smp_64.c:397 > > >> smp_call_function_mask() > > >> [ 13.116577] Pid: 1, comm: swapper Not tainted 2.6.24-rc3-git2 #3 > > >> [ 13.116648] > > >> [ 13.116648] Call Trace: > > >> [ 13.116779] [] > > >acpi_ut_update_ref_count+0x50/0x9d > > >> [ 13.116851] [] smp_call_function_mask+0x8f/0xa0 > > >> [ 13.116923] [] _rdmsr_on_cpu+0x5c/0x60 > > >> [ 13.116994] [] > > >> acpi_processor_get_throttling_ptc+0xf3/0x158 > > >> [ 13.117077] [] > > >> acpi_processor_get_throttling_info+0x460/0x4af > > >> [ 13.117169] [] acpi_processor_start+0x54a/0x606 > > >> [ 13.117248] [] ifind+0x48/0xd0 > > >> [ 13.117330] [] > > >acpi_start_single_object+0x24/0x46 > > >> [ 13.117402] [] acpi_device_probe+0x7d/0x91 > > >> [ 13.117488] [] driver_probe_device+0x9c/0x1b0 > > >> [ 13.117559] [] __driver_attach+0xc9/0xd0 > > >> [ 13.117631] [] __driver_attach+0x0/0xd0 > > >> [ 13.117715] [] bus_for_each_dev+0x4d/0x80 > > >> [ 13.117786] [] bus_add_driver+0xac/0x220 > > >> [ 13.117856] [] acpi_processor_init+0x8f/0xfc > > >> [ 13.117941] [] kernel_init+0x154/0x330 > > >> [ 13.118018] [] child_rip+0xa/0x12 > > >> [ 13.118088] [] kernel_init+0x0/0x330 > > >> [ 13.118158] [] child_rip+0x0/0x12 > > >> [ 13.118227] > > >> [...] > > >> [ 13.124714] WARNING: at arch/x86/kernel/smp_64.c:427 > > >> smp_call_function_single() > > >> [ 13.124798] Pid: 1, comm: swapper Not tainted 2.6.24-rc3-git2 #3 > > >> [ 13.125460] > > >> [ 13.125461] Call Trace: > > >> [ 13.125592] [] > > >acpi_ut_update_ref_count+0x50/0x9d > > >> [ 13.125665] [] > > >smp_call_function_single+0xbd/0xd0 > > >> [ 13.125737] [] _rdmsr_on_cpu+0x5c/0x60 > > >> [ 13.125807] [] > > >> acpi_processor_get_throttling_ptc+0xf3/0x158 > > >> [ 13.125903] [] > > >> acpi_processor_get_throttling_info+0x460/0x4af > > >> [ 13.125999] [] acpi_processor_start+0x54a/0x606 > > >> [ 13.126071] [] acpi_processor_add+0x24/0x6b > > >> [ 13.126142] [] > > >acpi_start_single_object+0x24/0x46 > > >> [ 13.126214] [] acpi_device_probe+0x7d/0x91 > > >> [ 13.126285] [] driver_probe_device+0x9c/0x1b0 > > >> [ 13.126357] [] __driver_attach+0xc9/0xd0 > > >> [ 13.126441] [] __driver_attach+0x0/0xd0 > > >> [ 13.126518] [] bus_for_each_dev+0x4d/0x80 > > >> [ 13.126600] [] bus_add_driver+0xac/0x220 > > >> [ 13.126670] [] acpi_processor_init+0x8f/0xfc > > >> [ 13.126755] [] kernel_init+0x154/0x330 > > >> [ 13.126832] [] child_rip+0xa/0x12 > > >> [ 13.126916] [] kernel_init+0x0/0x330 > > >> [ 13.126986] [] child_rip+0x0/0x12 > > >> [ 13.127059] > > >> [ 13.127124] WARNING: at arch/x86/kernel/smp_64.c:397 > > >> smp_call_function_mask() > > >> [ 13.127197] Pid: 1, comm: swapper Not tainted 2.6.24-rc3-git2 #3 > > >> [ 13.127267] > > >> [ 13.127268] Call Trace: > > >> [ 13.127398] [] > > >acpi_ut_update_ref_count+0x50/0x9d > > >> [ 13.127473] [] smp_call_function_mask+0x8f/0xa0 > > >> [ 13.127545] [] _rdmsr_on_cpu+0x5c/0x60 > > >> [ 13.127616] [] > > >> acpi_processor_get_throttling_ptc+0xf3/0x158 > > >> [ 13.127699] [] > > >> acpi_processor_get_throttling_info+0x460/0x4af > > >> [ 13.127782] [] acpi_processor_start+0x54a/0x606 > > >> [ 13.127861] [] acpi_processor_add+0x24/0x6b > > >> [ 13.127933] [] > > >acpi_start_single_object+0x24/0x46 > > >> [ 13.128005] [] acpi_device_probe+0x7d/0x91 > > >> [ 13.128076] [] driver_probe_device+0x9c/0x1b0 > > >> [ 13.128147] [] __driver_attach+0xc9/0xd0 > > >> [ 13.128226] [] __driver_attach+0x0/0xd0 > > >> [ 13.128310] [] bus_for_each_dev+0x4d/0x80 > > >> [ 13.128381] [] bus_add_driver+0xac/0x220 > > >> [ 13.128452] [] acpi_processor_init+0x8f/0xfc > > >> [ 13.128523] [] kernel_init+0x154/0x330 > > >> [ 13.128594] [] child_rip+0xa/0x12 > > >> [ 13.128664] [] kernel_init+0x0/0x330 > > >> [ 13.128734] [] child_rip+0x0/0x12 > > >> > > >> > > > > > > > > > > > >-- > > >"Premature optimization is the root of all evil." - Donald Knuth > > >- > > >To unsubscribe from this list: send the line "unsubscribe > > >linux-kernel" in > > >the body of a message to majordomo@vger.kernel.org > > >More majordomo info at http://vger.kernel.org/majordomo-info.html > > >Please read the FAQ at http://www.tux.org/lkml/ > > > > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/