From: Jiri Slaby <jirislaby@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org, Greg KH <gregkh@suse.de>,
linux-ide@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz,
Jeff Garzik <jgarzik@pobox.com>
Subject: readXs on pci*iomap-ped regions [Was: [PATCH] /drivers/char sx.c ioremap -> pci_ioremap api]
Date: Sat, 25 Aug 2007 10:45:52 +0200 [thread overview]
Message-ID: <46CFEC40.7060006@gmail.com> (raw)
In-Reply-To: <20070824213439.0007e653@the-village.bc.nu>
Alan Cox napsal(a):
>>>>> + rebase = pci_iomap(pdev, 0, 0x80);
>>>>> t = readl(rebase + CNTRL_REG_OFFSET);
>>> Switch to ioread* if you are using the iomap interface. Its not a trivial
>> Why, if you know it's surely a mem region (and thus you rely on it and do
>> ioremap)? There are many places in the kernel, where this approach is used, e.g.
>> libata piix.
>
> Every single one of them is wrong. The encoding of iomap values is
> platform dependant. Fixed in my tree.
OK, fast search found these suspicious (not considering e.g. arch/):
$ find drivers/ -name '*.c' -exec grep -q pci.*iomap {} \; -a -exec grep -l
'\<readl\>' {} \+
drivers/firewire/fw-ohci.c
drivers/scsi/sym53c8xx_2/sym_glue.c
drivers/media/dvb/pluto2/pluto2.c
drivers/media/dvb/b2c2/flexcop-pci.c
drivers/ssb/scan.c
drivers/char/cyclades.c
drivers/char/sx.c
drivers/ata/ata_piix.c
drivers/ata/sata_inic162x.c
drivers/ata/pata_pdc2027x.c
drivers/ata/sata_sx4.c
drivers/ata/sata_qstor.c
drivers/ata/sata_mv.c
drivers/ata/sata_svw.c
drivers/ata/sata_nv.c
drivers/ata/sata_sil.c
drivers/ata/sata_vsc.c
drivers/ata/sata_promise.c
drivers/ata/ahci.c
drivers/ata/sata_sil24.c
drivers/net/cassini.c
drivers/mtd/nand/cafe_nand.c
How do you imagine a proper fix?
- move to ioreadX/iowriteX
or
- move back to ioremap (unlikely for the most)
or?
thanks,
--
Jiri Slaby (jirislaby@gmail.com)
Faculty of Informatics, Masaryk University
next prev parent reply other threads:[~2007-08-25 8:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-24 18:49 [PATCH] /drivers/char sx.c ioremap -> pci_ioremap api Scott Thompson
2007-08-24 18:59 ` Jiri Slaby
2007-08-24 19:15 ` Alan Cox
2007-08-24 20:03 ` Jiri Slaby
2007-08-24 20:34 ` Alan Cox
2007-08-25 8:45 ` Jiri Slaby [this message]
2007-08-25 8:56 ` readXs on pci*iomap-ped regions [Was: [PATCH] /drivers/char sx.c ioremap -> pci_ioremap api] Jeff Garzik
2007-08-25 9:02 ` Jiri Slaby
2007-08-25 10:17 ` Alan Cox
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=46CFEC40.7060006@gmail.com \
--to=jirislaby@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=gregkh@suse.de \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
/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