lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 28 Aug 2010 19:20:10 +0200
From:	Sascha Hauer <s.hauer@...gutronix.de>
To:	Marek Vasut <marek.vasut@...il.com>
Cc:	Linus Walleij <linus.ml.walleij@...il.com>,
	Dan Williams <dan.j.williams@...el.com>,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	Uwe Kleine-König 
	<u.kleine-koenig@...gutronix.de>
Subject: Re: [PATCH 3/3 v2] dmaengine: Add Freescale i.MX SDMA support

On Sat, Aug 28, 2010 at 06:30:05PM +0200, Marek Vasut wrote:
> Dne So 28. srpna 2010 18:18:58 Sascha Hauer napsal(a):
> > On Sat, Aug 28, 2010 at 05:27:10PM +0200, Marek Vasut wrote:
> > > Dne So 28. srpna 2010 17:18:17 Linus Walleij napsal(a):
> > > > 2010/8/23 Uwe Kleine-König <u.kleine-koenig@...gutronix.de>:
> > > > >> +     evt = readl(SDMA_H_EVTOVR);
> > > > >> +     mcu = readl(SDMA_H_HOSTOVR);
> > > > >> +     dsp = readl(SDMA_H_DSPOVR);
> > > > > 
> > > > > __raw_readl?
> > > > 
> > > > Sorry I never understood this __raw_[read|write][b|w|l] vs.
> > > > plain read[b|w|l] proliferation in some drivers and code.
> > > > 
> > > > What's the reason for?
> > > 
> > > Hey,
> > > 
> > > this trick is, if you create the VA<->PA mapping at the kernel start (eg.
> > > see how pxa_map_io() is replacedon some devices for instance), you then
> > > use the VA address you specified and use __raw_{read,write}[b,w,l](). So
> > > use __raw_{read,write}[b,w,l]() on drivers specific for certain device
> > > and use {read,write}[b,w,l]() on ioremap()ed memory areas, aka. in
> > > common drivers.
> > 
> > Nope, this has nothing to do with static mappings vs. ioremap. The
> > difference is that read[b,w,l] do little endian accesses suitable for
> > PCI whereas the __raw_* functions do accesses in CPU endianess.
> > Peripherals integrated into a SoC like the SDMA engine here are
> > normally accessible in native endianess and thus need the __raw_*
> > functions. An external network controller (for example a LAN9117) will
> > probably need the non raw functions. Note that 99% of the arm users use
> > little endian only and thus cpu_to_le* is a noop, so both types will work
> > for most people.
> 
> Sorry, you got me here. Why do we have io{read,write} then btw. ? That's for 
> x86's io space, right ?

Looking at the implementation in lib/iomap.c it seems that
io{read,write} can do both PIO and MMIO accesses depending on the
address given to them.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ