From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932707AbVKYW6N (ORCPT ); Fri, 25 Nov 2005 17:58:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932708AbVKYW6N (ORCPT ); Fri, 25 Nov 2005 17:58:13 -0500 Received: from ms-smtp-03.nyroc.rr.com ([24.24.2.57]:22463 "EHLO ms-smtp-03.nyroc.rr.com") by vger.kernel.org with ESMTP id S932707AbVKYW6M (ORCPT ); Fri, 25 Nov 2005 17:58:12 -0500 Subject: Re: [PATCH -rt] convert compat sem in block device sx8 From: Steven Rostedt To: Ingo Molnar Cc: LKML , Daniel Walker , Aleksey Makarov In-Reply-To: <1132959025.24417.30.camel@localhost.localdomain> References: <438709F5.1050801@dev.rtsoft.ru> <1132929218.11915.2.camel@localhost.localdomain> <1132959025.24417.30.camel@localhost.localdomain> Content-Type: text/plain Date: Fri, 25 Nov 2005 17:57:55 -0500 Message-Id: <1132959475.24417.38.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2005-11-25 at 17:50 -0500, Steven Rostedt wrote: > Ingo, > > I decided to add a few more conversions to the list :-) > > Here's sx8. Unfortunately, I was only able to test compiling it, since I > don't have the hardware. Hence, I'm not sending this to mainline unless > someone can test it on yours. (your patch is the new -mm ;-) > Ack! I sent this after making a small change and never refreshing quilt. So this would not even compile! Here's the fixed patch: -- Steve Index: linux-2.6.14-rt15/drivers/block/sx8.c =================================================================== --- linux-2.6.14-rt15.orig/drivers/block/sx8.c 2005-11-25 10:14:09.000000000 -0500 +++ linux-2.6.14-rt15/drivers/block/sx8.c 2005-11-25 17:39:12.000000000 -0500 @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -280,10 +281,7 @@ struct work_struct fsm_task; - /* - * PREEMPT_RT: should be converted to completions. - */ - struct compat_semaphore probe_sem; + struct completion probe_comp; }; struct carm_response { @@ -1345,7 +1343,7 @@ } case HST_PROBE_FINISHED: - up(&host->probe_sem); + complete(&host->probe_comp); break; case HST_ERROR: @@ -1621,7 +1619,7 @@ host->flags = pci_dac ? FL_DAC : 0; spin_lock_init(&host->lock); INIT_WORK(&host->fsm_task, carm_fsm_task, host); - init_MUTEX_LOCKED(&host->probe_sem); + init_completion(&host->probe_comp); for (i = 0; i < ARRAY_SIZE(host->req); i++) host->req[i].tag = i; @@ -1690,8 +1688,8 @@ if (rc) goto err_out_free_irq; - DPRINTK("waiting for probe_sem\n"); - down(&host->probe_sem); + DPRINTK("waiting for probe_comp\n"); + wait_for_completion(&host->probe_comp); printk(KERN_INFO "%s: pci %s, ports %d, io %lx, irq %u, major %d\n", host->name, pci_name(pdev), (int) CARM_MAX_PORTS,