All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: mlord@pobox.com, albertcc@tw.ibm.com, alan@lxorguk.ukuu.org.uk,
	axboe@suse.de, forrest.zhao@intel.com, linux-ide@vger.kernel.org
Subject: Re: [PATCH 3/6] sata_sil: new interrupt handler
Date: Tue, 23 May 2006 15:07:14 -0700	[thread overview]
Message-ID: <44738792.10909@gmail.com> (raw)
In-Reply-To: <447386D3.5060109@pobox.com>

Jeff Garzik wrote:
> Tejun Heo wrote:
>> Jeff Garzik wrote:
>>>> +    /* ack bmdma irq events */
>>>> +    ap->ops->irq_clear(ap);
>>>
>>> Don't use hook in LLDD
>>
>> Okay.
>>
>>>> +    spin_lock_irqsave(&host_set->lock, flags);
>>>> +
>>>> +    for (i = 0; i < host_set->n_ports; i++) {
>>>> +        struct ata_port *ap = host_set->ports[i];
>>>> +        u32 bmdma2 = readl(mmio_base + sil_port[ap->port_no].bmdma2);
>>>> +
>>>> +        if (unlikely(!ap || ap->flags & ATA_FLAG_DISABLED))
>>>> +            continue;
>>>> +
>>>> +        if (!(bmdma2 & SIL_DMA_COMPLETE))
>>>> +            continue;
>>>> +
>>>> +        sil_host_intr(ap, bmdma2);
>>>> +        handled = 1;
>>>> +    }
>>>> +
>>>> +    spin_unlock_irqrestore(&host_set->lock, flags);
>>>
>>> NAK, unconditionally use spin_lock() and spin_unlock() on this hardware.
>>
>> Can you explain more on this?  We almost never use those in libata and 
>> I don't see what's different for sata_sil.
> 
> er, huh?  _Most_ libata drivers use spin_lock().
> 
> The only case where spin_lock_irqsave() should be used is when you are 
> dealing with multiple independent interrupts, i.e. the legacy case of 
> irqs 14/15.
> 
> Thus, the core uses the safe-in-all-cases version, and drivers that 
> implement their own interrupt handler can implement the better version.
> 
> [jgarzik@pretzel linux-2.6]$ grep -wl spin_lock drivers/scsi/ahci.c 
> drivers/scsi/pdc_adma.c drivers/scsi/sata_*.c
> drivers/scsi/ahci.c
> drivers/scsi/pdc_adma.c
> drivers/scsi/sata_mv.c
> drivers/scsi/sata_promise.c
> drivers/scsi/sata_qstor.c
> drivers/scsi/sata_sil24.c
> drivers/scsi/sata_sx4.c
> drivers/scsi/sata_vsc.c
> 

Ouch, you're right.  Sorry about the noise.

-- 
tejun

  reply	other threads:[~2006-05-23 22:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-19 15:38 [PATCHSET 02/03] prep LLDDs for hotplug support, take 2 Tejun Heo
2006-05-19 15:38 ` [PATCH 3/6] sata_sil: new interrupt handler Tejun Heo
2006-05-19 15:46   ` Jeff Garzik
2006-05-23 14:50     ` Tejun Heo
2006-05-23 22:04       ` Jeff Garzik
2006-05-23 22:07         ` Tejun Heo [this message]
2006-05-19 15:38 ` [PATCH 5/6] sata_sil24: use sata_phy_debounce() in sil24_hardreset() Tejun Heo
2006-05-19 15:47   ` Jeff Garzik
2006-05-19 15:38 ` [PATCH 1/6] libata: export ata_hsm_move() Tejun Heo
2006-05-19 15:38 ` [PATCH 6/6] sata_sil24: kill ops->tf_read() and use ata_std_noop_check_status() Tejun Heo
2006-05-19 15:48   ` Jeff Garzik
2006-05-19 15:38 ` [PATCH 2/6] sata_sil: add new constants in preparation for new interrupt handler Tejun Heo
2006-05-19 15:38 ` [PATCH 4/6] sata_sil24: rename PORT_PRB to PORT_LRAM and add PORT_LRAM_SLOT_SZ Tejun Heo
  -- strict thread matches above, loose matches on Subject: below --
2006-05-11 15:14 [PATCHSET 07/11] prep LLDDs for hotplug support, take 1 (REPOST) Tejun Heo
2006-05-11 15:14 ` [PATCH 3/6] sata_sil: new interrupt handler Tejun Heo
2006-05-11 15:40   ` Alan Cox
2006-05-11 16:16     ` Tejun Heo
2006-05-11 15:11 [PATCHSET 07/11] prep LLDDs for hotplug support, take 1 Tejun Heo
2006-05-11 15:11 ` [PATCH 3/6] sata_sil: new interrupt handler Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44738792.10909@gmail.com \
    --to=htejun@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=albertcc@tw.ibm.com \
    --cc=axboe@suse.de \
    --cc=forrest.zhao@intel.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=mlord@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.