From: Mark Lord <liml@rtr.ca>
To: Jeff Garzik <jgarzik@pobox.com>,
IDE/ATA development list <linux-ide@vger.kernel.org>
Subject: [PATCH 02/04] sata_mv: don't read hc_irq_cause
Date: Mon, 19 Jan 2009 18:05:42 -0500 [thread overview]
Message-ID: <49750746.3010709@rtr.ca> (raw)
In-Reply-To: <49750705.7010709@rtr.ca>
Remove silly read-modify-write sequences when clearing interrupts in hc_irq_cause.
This gets rid of unneeded MMIO reads, resulting in a slight performance boost
when switching between EDMA and non-EDMA modes (eg. for cache flushes).
Signed-off-by: Mark Lord <mlord@pobox.com>
--- old/drivers/ata/sata_mv.c 2009-01-16 11:52:17.000000000 -0500
+++ linux/drivers/ata/sata_mv.c 2009-01-19 16:47:24.000000000 -0500
@@ -35,8 +35,6 @@
*
* --> Investigate problems with PCI Message Signalled Interrupts (MSI).
*
- * --> Cache frequently-accessed registers in mv_port_priv to reduce overhead.
- *
* --> Develop a low-power-consumption strategy, and implement it.
*
* --> [Experiment, low priority] Investigate interrupt coalescing.
@@ -884,18 +882,14 @@
int hardport = mv_hardport_from_port(ap->port_no);
void __iomem *hc_mmio = mv_hc_base_from_port(
mv_host_base(ap->host), ap->port_no);
- u32 hc_irq_cause, ipending;
+ u32 hc_irq_cause;
/* clear EDMA event indicators, if any */
writelfl(0, port_mmio + EDMA_ERR_IRQ_CAUSE_OFS);
- /* clear EDMA interrupt indicator, if any */
- hc_irq_cause = readl(hc_mmio + HC_IRQ_CAUSE_OFS);
- ipending = (DEV_IRQ | DMA_IRQ) << hardport;
- if (hc_irq_cause & ipending) {
- writelfl(hc_irq_cause & ~ipending,
- hc_mmio + HC_IRQ_CAUSE_OFS);
- }
+ /* clear pending irq events */
+ hc_irq_cause = ~((DEV_IRQ | DMA_IRQ) << hardport);
+ writelfl(hc_irq_cause, hc_mmio + HC_IRQ_CAUSE_OFS);
mv_edma_cfg(ap, want_ncq);
@@ -2821,8 +2815,7 @@
writel(0, port_mmio + EDMA_ERR_IRQ_CAUSE_OFS);
/* clear pending irq events */
- hc_irq_cause = readl(hc_mmio + HC_IRQ_CAUSE_OFS);
- hc_irq_cause &= ~((DEV_IRQ | DMA_IRQ) << hardport);
+ hc_irq_cause = ~((DEV_IRQ | DMA_IRQ) << hardport);
writelfl(hc_irq_cause, hc_mmio + HC_IRQ_CAUSE_OFS);
mv_enable_port_irqs(ap, ERR_IRQ);
next prev parent reply other threads:[~2009-01-19 23:05 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-19 23:04 [PATCH 01/04] sata_mv: fix 8-port timeouts on 508x/6081 chips Mark Lord
2009-01-19 23:05 ` Mark Lord [this message]
2009-01-19 23:06 ` [PATCH 03/04] sata_mv: remove bogus nsect restriction Mark Lord
2009-01-19 23:07 ` [PATCH 04/04] sata_mv: msi masking Mark Lord
2009-01-20 18:19 ` [PATCH 05/04] sata_mv: msi fix and cleanup Mark Lord
2009-01-20 18:49 ` [PATCH 06/06] sata_mv: remove experimental designation Mark Lord
2009-01-21 1:54 ` [PATCH 04/04] sata_mv: msi masking Grant Grundler
2009-01-21 15:15 ` Mark Lord
2009-01-21 15:31 ` [PATCH 04/05] sata_mv: msi masking fix (v2) Mark Lord
2009-01-21 15:34 ` [PATCH 05/05] sata_mv: no longer experimental (v2) Mark Lord
2009-01-26 11:43 ` Jeff Garzik
2009-01-21 17:03 ` [PATCH 04/05] sata_mv: msi masking fix (v2) Grant Grundler
2009-01-22 1:02 ` Tejun Heo
2009-01-22 5:17 ` Mark Lord
2009-01-22 5:19 ` Mark Lord
2009-01-22 5:22 ` Tejun Heo
2009-01-23 17:20 ` sata_mv: basic PIO-only ATAPI support? Mark Lord
2009-01-23 17:23 ` Mark Lord
2009-01-23 17:52 ` Alan Cox
2009-01-23 18:37 ` Mark Lord
2009-01-26 11:42 ` [PATCH 04/05] sata_mv: msi masking fix (v2) Jeff Garzik
2009-01-26 11:39 ` [PATCH 01/04] sata_mv: fix 8-port timeouts on 508x/6081 chips Jeff Garzik
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=49750746.3010709@rtr.ca \
--to=liml@rtr.ca \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).