LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Bartlomiej Zolnierkiewicz" <bzolnier@gmail.com>
To: Alan <alan@lxorguk.ukuu.org.uk>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 19/19] ide: use PIO/MMIO operations directly where possible
Date: Fri, 12 Jan 2007 15:19:43 +0100	[thread overview]
Message-ID: <58cb370e0701120619v27ca51dek48154136e54defd5@mail.gmail.com> (raw)
In-Reply-To: <20070112100641.02858876@localhost.localdomain>

On 1/12/07, Alan <alan@lxorguk.ukuu.org.uk> wrote:
> On Fri, 12 Jan 2007 05:28:07 +0100
> Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:
>
> > [PATCH] ide: use PIO/MMIO operations directly where possible
> >
> > This results in smaller/faster/simpler code and allows future optimizations.
> > Also remove no longer needed ide[_mm]_{inl,outl}() and ide_hwif_t.{INL,OUTL}.
> >
> > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
>
> > --- a.orig/drivers/ide/ide-dma.c
> > +++ a/drivers/ide/ide-dma.c
> > @@ -565,7 +565,10 @@ int ide_dma_setup(ide_drive_t *drive)
> >       }
> >
> >       /* PRD table */
> > -     hwif->OUTL(hwif->dmatable_dma, hwif->dma_prdtable);
> > +     if (hwif->mmio == 2)
> > +             writel(hwif->dmatable_dma, (void __iomem *)hwif->dma_prdtable);
> > +     else
> > +             outl(hwif->dmatable_dma, hwif->dma_prdtable);
>
>
> This should simply be if (hwif->mmio)
>
> mmio = 1 is still used by some amiga and other oddments and indicates
> mmio in old form. I don't think this causes a bug as they don't use the
> DMA layer, but its a bug waiting to happen if the mmio==1 case doesn't
> get handled correctly or BUG()

mmio = 1 isn't used in the current IDE code and we have BUG_ON()
for it in ide.c:ide_hwif_request_regions() so the above change is safe.

Anyway thanks for bringing mmio = 1 issue - it can be converted
to flag now (will let us avoid similar confusions in the future).

Bart

  reply	other threads:[~2007-01-12 14:19 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-12  4:26 [PATCH 2/19] ide: add it8213 driver Bartlomiej Zolnierkiewicz
2007-01-12  4:26 ` [PATCH 3/19] ide: it8213 driver update Bartlomiej Zolnierkiewicz
2007-01-12  4:26 ` [PATCH 4/19] ia64: add pci_get_legacy_ide_irq() Bartlomiej Zolnierkiewicz
2007-01-12  4:26 ` [PATCH 5/19] ide: add missing __init tags to IDE PCI host drivers Bartlomiej Zolnierkiewicz
2007-01-12  4:26 ` [PATCH 6/19] pdc202xx_old: remove dead code Bartlomiej Zolnierkiewicz
2007-01-12  4:26 ` [PATCH 7/19] au1xxx-ide: " Bartlomiej Zolnierkiewicz
2007-01-12  4:26 ` [PATCH 8/19] ide: remove write-only ide_pio_data_t.blacklisted Bartlomiej Zolnierkiewicz
2007-01-12  4:27 ` [PATCH 9/19] ide: remove write-only ide_hwif_t.no_dsc flag Bartlomiej Zolnierkiewicz
2007-01-12  4:27 ` [PATCH 10/19] trm290: remove redundant CONFIG_BLK_DEV_IDEDMA Bartlomiej Zolnierkiewicz
2007-01-12  4:27 ` [PATCH 11/19] ide: remove ide_pci_device_t tables with only one entry Bartlomiej Zolnierkiewicz
2007-01-12  4:27 ` [PATCH 12/19] ide: remove ide_drive_t.usage Bartlomiej Zolnierkiewicz
2007-01-12  4:27 ` [PATCH 13/19] hpt366: remove redundant check from init_dma_hpt366() Bartlomiej Zolnierkiewicz
2007-01-12  4:27 ` [PATCH 14/19] cs5530: small cleanup Bartlomiej Zolnierkiewicz
2007-01-12  4:27 ` [PATCH 15/19] svwks: " Bartlomiej Zolnierkiewicz
2007-01-12  4:27 ` [PATCH 16/19] sis5513: sis5513_config_xfer_rate() cleanup Bartlomiej Zolnierkiewicz
2007-01-12  4:27 ` [PATCH 17/19] ide: unexport ide_set_xfer_rate() Bartlomiej Zolnierkiewicz
2007-01-12  4:28 ` [PATCH 18/19] ide: add ide_use_fast_pio() helper Bartlomiej Zolnierkiewicz
2007-01-12 10:08   ` Alan
2007-01-12 14:00     ` Bartlomiej Zolnierkiewicz
2007-01-12 14:30       ` Alan
2007-01-12 14:43         ` Bartlomiej Zolnierkiewicz
2007-01-12 15:16           ` Alan
2007-01-12 17:24             ` Bartlomiej Zolnierkiewicz
2007-01-12  4:28 ` [PATCH 19/19] ide: use PIO/MMIO operations directly where possible Bartlomiej Zolnierkiewicz
2007-01-12 10:06   ` Alan
2007-01-12 14:19     ` Bartlomiej Zolnierkiewicz [this message]
2007-06-21 17:16   ` Sergei Shtylyov
2007-06-21 18:19     ` Bartlomiej Zolnierkiewicz

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=58cb370e0701120619v27ca51dek48154136e54defd5@mail.gmail.com \
    --to=bzolnier@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH 19/19] ide: use PIO/MMIO operations directly where possible' \
    /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

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).