Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261455AbVBNUqW (ORCPT ); Mon, 14 Feb 2005 15:46:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261460AbVBNUqW (ORCPT ); Mon, 14 Feb 2005 15:46:22 -0500 Received: from fmr18.intel.com ([134.134.136.17]:34525 "EHLO orsfmr003.jf.intel.com") by vger.kernel.org with ESMTP id S261455AbVBNUqN (ORCPT ); Mon, 14 Feb 2005 15:46:13 -0500 From: Mark Gross Organization: Intel To: linux-kernel@vger.kernel.org Subject: queue_work from interrupt Real time preemption2.6.11-rc2-RT-V0.7.37-03 Date: Mon, 14 Feb 2005 12:40:14 -0800 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200502141240.14355.mgross@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2347 Lines: 59 I'm working on a tweak to the preepmtive soft IRQ implementation using work queues and I'm having problems with a BUG assert when trying to queue_work. Souldn't I be able to call queue_work form ISR context? --mgross --------------------------- | preempt count: 00000001 ] | 1-level deep critical section nesting: ---------------------------------------- .. [] .... print_traces+0x1d/0x60 .....[] .. ( <= dump_stack+0x23/0x30) BUG: sleeping function called from invalid context IRQ 20(2039) at kernel/rt.c in_atomic():0 [00000000], irqs_disabled():1 [] dump_stack+0x23/0x30 (20) [] __might_sleep+0xe5/0x100 (36) [] __spin_lock+0x39/0x60 (24) [] _spin_lock_irqsave+0x1d/0x30 (16) [] __queue_work+0x22/0x70 (28) [] queue_work+0x58/0xa0 (32) [] __raise_softirq+0x2d/0x50 (12) [] e100_intr+0x124/0x170 [e100] (36) [] handle_IRQ_event+0x69/0xf0 (52) [] do_hardirq+0xa5/0x110 (40) [] do_irqd+0x121/0x1f0 (48) [] kthread+0xbb/0xc0 (48) [] kernel_thread_helper+0x5/0xc (154181652) --------------------------- | preempt count: 00010001 ] | 1-level deep critical section nesting: ---------------------------------------- .. [] .... print_traces+0x1d/0x60 .....[] .. ( <= dump_stack+0x23/0x30) BUG: sleeping function called from invalid context swapper(0) at kernel/rt.c:1 in_atomic():1 [00010000], irqs_disabled():1 [] dump_stack+0x23/0x30 (20) [] __might_sleep+0xe5/0x100 (36) [] __spin_lock+0x39/0x60 (24) [] _spin_lock_irqsave+0x1d/0x30 (16) [] __queue_work+0x22/0x70 (28) [] queue_work+0x58/0xa0 (32) [] raise_softirq+0x3e/0xb0 (20) [] update_process_times+0x45/0x110 (32) [] smp_apic_timer_interrupt+0xea/0xf0 (36) [] apic_timer_interrupt+0x1c/0x24 (60) [] cpu_idle+0x83/0x90 (24) [] start_kernel+0x19d/0x1e0 (32) [] 0xc010020e (1077727247) --------------------------- - 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/