From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932546AbWBVJJA (ORCPT ); Wed, 22 Feb 2006 04:09:00 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932558AbWBVJJA (ORCPT ); Wed, 22 Feb 2006 04:09:00 -0500 Received: from odin2.bull.net ([192.90.70.84]:41897 "EHLO odin2.bull.net") by vger.kernel.org with ESMTP id S932546AbWBVJI7 convert rfc822-to-8bit (ORCPT ); Wed, 22 Feb 2006 04:08:59 -0500 From: "Serge Noiraud" To: tglx@linutronix.de Subject: Re: RT and pci_lock while reading or writing pci bus configuration. Date: Wed, 22 Feb 2006 10:16:15 +0100 User-Agent: KMail/1.7.1 Cc: Ingo Molnar , linux-kernel@vger.kernel.org References: <200602201542.19857.Serge.Noiraud@bull.net> <1140464706.2480.762.camel@localhost.localdomain> In-Reply-To: <1140464706.2480.762.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 8BIT Content-Disposition: inline Message-Id: <200602221016.18405.Serge.Noiraud@bull.net> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org lundi 20 Février 2006 20:45, Thomas Gleixner wrote/a écrit : > On Mon, 2006-02-20 at 15:42 +0100, Serge Noiraud wrote: > > Hi, > > I have one question : > > In drivers/pci/access.c we have a global lock for pci configuration access. > > In pci_bus_read_config_* or pci_bus_write_config_* functions, we acquire a lock. > > When we call spin_lock_irqsave, we obtain the following message : > > BUG: scheduling while atomic: IRQ 137/0x00000001/6431 > > caller is schedule+0x43/0x120 > > [] dump_stack+0x1c/0x20 (20) > > [] __schedule+0xf44/0x1240 (236) > > [] schedule+0x43/0x120 (12) > > [] __down_mutex+0x2bb/0x5f0 (112) > > [] _spin_lock_irqsave+0x1c/0x40 (24) > > [] pci_bus_read_config_word+0x2d/0x70 (24) > > > > Do I miss something or is it a BUG ? > > Yeah, you missed to paste the full backtrace :) OK! OK! don't flame me ! The process causing this is X when I switch from VT7 to VT1 and the driver is nvidia. I have some trouble with this driver with the RT patch. and I need it for GL because the nv GPL driver don't do that. nvidia version : 8178 here is the complete trace : nvidia: module license 'NVIDIA' taints kernel. PCI: Setting latency timer of device 0000:40:00.0 to 64 NVRM: loading NVIDIA Linux x86 NVIDIA Kernel Module 1.0-8178 Wed Dec 14 16:22:51 PST 2005 BUG: scheduling while atomic: IRQ 137/0x00000001/6431 caller is schedule+0x43/0x120 [] dump_stack+0x1c/0x20 (20) [] __schedule+0xf44/0x1240 (236) [] schedule+0x43/0x120 (12) [] __down_mutex+0x2bb/0x5f0 (112) [] _spin_lock_irqsave+0x1c/0x40 (24) [] pci_bus_read_config_word+0x2d/0x70 (24) [] nv_verify_pci_config+0x3a/0xd2 [nvidia] (40) [] rm_set_interrupts+0x114/0x144 [nvidia] (48) [] os_cond_acquire_sema+0x3a/0x5b [nvidia] (24) [] _nv002338rm+0x12/0x18 [nvidia] (32) [] _nv001650rm+0x18d/0x250 [nvidia] (80) [] _nv001647rm+0x51/0x70 [nvidia] (48) [] rm_isr+0x3b/0x4c [nvidia] (48) [] nv_kern_isr+0x29/0x65 [nvidia] (36) [] handle_IRQ_event+0x73/0x110 (52) [] thread_edge_irq+0x59/0xf0 (24) [] do_hardirq+0x36/0x80 (20) [] do_irqd+0xf8/0x1b0 (28) [] kthread+0x98/0xd0 (40) [] kernel_thread_helper+0x5/0x10 (164118556) ------------------------------ | showing all locks held by: | (IRQ 137/6431 [f7e471a0, 61]): ------------------------------ #001: [c04d3f60] {pci_lock} ... acquired at: pci_bus_read_config_word+0x2d/0x70 softirq-tasklet/8[CPU#0]: BUG in ____up_mutex at kernel/rt.c:1592 [] dump_stack+0x1c/0x20 (20) [] __WARN_ON+0x48/0x60 (40) [] rt_up+0x298/0x2f0 (40) [] os_release_sema+0x3b/0x47 [nvidia] (16) [] _nv002251rm+0x12/0x18 [nvidia] (32) [] _nv001646rm+0x9c/0xa8 [nvidia] (64) [] rm_isr_bh+0x62/0x74 [nvidia] (48) [] nv_kern_isr_bh+0x1a/0x1f [nvidia] (24) [] tasklet_action+0x5d/0x110 (28) [] ksoftirqd+0x133/0x1e0 (48) [] kthread+0x98/0xd0 (40) [] kernel_thread_helper+0x5/0x10 (1003331612) BUG: scheduling while atomic: X/0x00000001/6390 caller is schedule+0x43/0x120 [] dump_stack+0x1c/0x20 (20) [] __schedule+0xf44/0x1240 (236) [] schedule+0x43/0x120 (12) [] __down_mutex+0x2bb/0x5f0 (112) [] _spin_lock_irqsave+0x1c/0x40 (24) [] pci_bus_read_config_word+0x2d/0x70 (24) [] nv_verify_pci_config+0x3a/0xd2 [nvidia] (40) [] rm_set_interrupts+0x114/0x144 [nvidia] (48) [] os_acquire_sema+0x3f/0x60 [nvidia] (24) [] _nv002346rm+0x12/0x18 [nvidia] (32) [] _nv003158rm+0x4d/0xc8 [nvidia] (64) [] _nv001649rm+0x30b/0x5d0 [nvidia] (64) [] rm_ioctl+0x23/0x38 [nvidia] (48) [] nv_kern_ioctl+0x2a7/0x2ef [nvidia] (48) [] do_ioctl+0x4d/0x80 (36) [] vfs_ioctl+0x58/0x1c0 (40) [] sys_ioctl+0xa2/0x900 (208) [] sysenter_past_esp+0x61/0x89 (-8116) <- Here, the system is frozen. I'll try -rt17. > > Preempt count is 1, so you are calling pci_bus_read_config_word() from a > non preemptible context. > > tglx -- Serge Noiraud