From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: Re: Protection of critical section in PREEMPT_RT Date: Mon, 4 Feb 2013 11:40:53 +0100 (CET) Message-ID: References: <50FE68EF.8060909@meduna.org> <510ACB87.3080007@am.sony.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: frank.rowand@am.sony.com, Stanislav Meduna , "linux-rt-users@vger.kernel.org" To: Jacky Lam Return-path: Received: from www.linutronix.de ([62.245.132.108]:42959 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751085Ab3BDKlA (ORCPT ); Mon, 4 Feb 2013 05:41:00 -0500 In-Reply-To: Sender: linux-rt-users-owner@vger.kernel.org List-ID: Jacky, On Mon, 4 Feb 2013, Jacky Lam wrote: > Thanks. Please stop top posting! > I finally find that if I disable interrupt during ata_qc_issue() in > libata-scsi.c, my sata driver works without any problem. This is wrong. Which driver are you taling about ? > But I find USB EHCI driver is more complicated. Kernel crashes every > where when RT is turned on. It seems whenever the stack spin_lock > ehci->lock and interrupt comes at that moment, kernel will be crashes. > The reason is EHCI interrupt handler will also take the same lock. If > my point of view, USB stack seems no PREEMPT_RT safe. Is it correct? > Am I miss anything? Probably. First of all you don't tell us which driver you are using. And w/o seing the code and the output of the kernel crash, we can't help you at all. Thanks, tglx