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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 14 May 2008 23:46:05 +0100 (BST)
From:	"Maciej W. Rozycki" <macro@...ux-mips.org>
To:	Ben Dooks <ben@...ff.org>
cc:	Jean Delvare <khali@...ux-fr.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-mips@...ux-mips.org, i2c@...sensors.org,
	linux-kernel@...r.kernel.org
Subject: Re: [i2c] [PATCH] I2C: SiByte: Convert the driver to make use of
 interrupts

On Wed, 14 May 2008, Ben Dooks wrote:

> My recollection is that the return of ioremap() was meant to be
> used with read{b,w,l} and not their __raw_xxx() counterparts.

 Well, what would the definition of the cookie passed to these raw MMIO
access calls be then?

 They have to be used here, because SOC on-chip registers are accessed by
the driver and therefore data transferred must never be swapped in any
way.  The internal registers always have the same numerical value (bit
positions) regardless of the endianness configured when the SOC's on-chip
CPU cores are reset.

 For the external buses the arrangement varies, for example the PCI
interface is always little-endian and the Generic Bus is always
big-endian.  To access these, cooked MMIO calls would normally be used
(these without a prefix) which swap bytes as necessary to preserve bit
positions.  The notable exception are PIO-style data transfers, such as
ones used by some IDE drivers (including the GenBus one), where the
ultimate destination is system memory (which is endian-neutral) and thus
bit positions do not matter but addresses of individual bytes do --
__mem_xxx() calls have been defined for this purpose, which swap bytes as
necessary.  See include/asm-mips/mach-generic/mangle-port.h for details.

  Maciej
--
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