From patchwork Mon Sep 6 15:57:40 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejun Heo X-Patchwork-Id: 63946 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 2E619B710A for ; Tue, 7 Sep 2010 02:03:28 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755370Ab0IFQBU (ORCPT ); Mon, 6 Sep 2010 12:01:20 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:43244 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754942Ab0IFP5n (ORCPT ); Mon, 6 Sep 2010 11:57:43 -0400 Received: by mail-fx0-f46.google.com with SMTP id 13so2522611fxm.19 for ; Mon, 06 Sep 2010 08:57:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=Eyw4g2WoWLIMmMRDcFI2Rq3esElUL7+pjcZG8ysdQyg=; b=nm8N9lTev3BdQs+giZE3Jzk5Ah7nPNhF46sQYthb83+nW8b3XaLYi9xRFM40d8ej74 Ks6Rmjr/BKGRBE6Zxo8feg1bRYEbLlXPbmXTLUOKEQV39utdA2w6zQfuId70ojvGAMMj arBmKecbFOqDB/yXjdjD8jv2t0sXtAU07ctt0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=MlhQSUh9I3Ajp/AHOA8AE6soKfWUTjgg1CN4DEspC7MDLAAugFxor20bbwwGOpssVD UreyXGgVgnFSYuKoLaAWKHSWuw2s/X9fXU1s3bb/uTeNv+/pgtSfDFsIIcymYIxqce1/ G9qjnDHede4KehGYihJ0aB69/QRlf0Ge3Ji5k= Received: by 10.223.120.70 with SMTP id c6mr2710873far.40.1283788662709; Mon, 06 Sep 2010 08:57:42 -0700 (PDT) Received: from htj.dyndns.org ([130.75.117.88]) by mx.google.com with ESMTPS id e17sm2398514faa.39.2010.09.06.08.57.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 06 Sep 2010 08:57:42 -0700 (PDT) Received: from [127.0.0.2] (htj.dyndns.org [127.0.0.2]) by htj.dyndns.org (Postfix) with ESMTPSA id 9453F1CC0683; Mon, 6 Sep 2010 17:57:40 +0200 (CEST) Message-ID: <4C850F74.3020908@gmail.com> Date: Mon, 06 Sep 2010 17:57:40 +0200 From: Tejun Heo User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: Jeff Garzik , "linux-ide@vger.kernel.org" , Alan Cox , yuanding02@gmail.com Subject: [PATCH #upstream 3/3] ata_piix: remove SIDPR locking References: <4C850F2D.4030601@kernel.org> <4C850F5A.7030602@gmail.com> In-Reply-To: <4C850F5A.7030602@gmail.com> X-Enigmail-Version: 1.1.1 Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Now that libata provides proper cross-port EH exclusion. The SIDPR locking added by commit 213373cf (ata_piix: fix locking around SIDPR access) is no longer necessary. Remove it. Signed-off-by: Tejun Heo --- drivers/ata/ata_piix.c | 8 -------- 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index 3971bc0..7409f98 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c @@ -158,7 +158,6 @@ struct piix_map_db { struct piix_host_priv { const int *map; u32 saved_iocfg; - spinlock_t sidpr_lock; /* FIXME: remove once locking in EH is fixed */ void __iomem *sidpr; }; @@ -952,15 +951,12 @@ static int piix_sidpr_scr_read(struct ata_link *link, unsigned int reg, u32 *val) { struct piix_host_priv *hpriv = link->ap->host->private_data; - unsigned long flags; if (reg >= ARRAY_SIZE(piix_sidx_map)) return -EINVAL; - spin_lock_irqsave(&hpriv->sidpr_lock, flags); piix_sidpr_sel(link, reg); *val = ioread32(hpriv->sidpr + PIIX_SIDPR_DATA); - spin_unlock_irqrestore(&hpriv->sidpr_lock, flags); return 0; } @@ -968,15 +964,12 @@ static int piix_sidpr_scr_write(struct ata_link *link, unsigned int reg, u32 val) { struct piix_host_priv *hpriv = link->ap->host->private_data; - unsigned long flags; if (reg >= ARRAY_SIZE(piix_sidx_map)) return -EINVAL; - spin_lock_irqsave(&hpriv->sidpr_lock, flags); piix_sidpr_sel(link, reg); iowrite32(val, hpriv->sidpr + PIIX_SIDPR_DATA); - spin_unlock_irqrestore(&hpriv->sidpr_lock, flags); return 0; } @@ -1573,7 +1566,6 @@ static int __devinit piix_init_one(struct pci_dev *pdev, hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL); if (!hpriv) return -ENOMEM; - spin_lock_init(&hpriv->sidpr_lock); /* Save IOCFG, this will be used for cable detection, quirk * detection and restoration on detach. This is necessary