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]
Message-Id: <200610071650.04887.david-b@pacbell.net>
Date:	Sat, 7 Oct 2006 16:50:04 -0700
From:	David Brownell <david-b@...bell.net>
To:	"Andrea Paterniani" <a.paterniani@...pp-eng.it>
Cc:	"Andrew Morton" <akpm@...l.org>,
	"Linux Kernel list" <linux-kernel@...r.kernel.org>
Subject: Re: [patch 2.6.18-git] SPI -- Freescale iMX SPI controller driver

On Saturday 07 October 2006 4:01 am, you wrote:
> > > > ...
> > > > ug.  Why not simply open-code
> > > >
> > > > 	readl(addr + DATA);
> > ...
> 
> What you're saying is clear.
> But I'm a little bit confused...what about the lot of definitions
> that use __REG or __REG2 macros to define registers address 
> (inside imx-regs.h, pxa-regs.h and so on) ?

There are two conventions; accessing chip registers like globals
(matching chip documentation) is a second convention.  The __REG32
style accessors can generate better code in many cases, too.

Thing is, you shouldn't create a third convention.


> > > > The use of loops_per_jiffy seems inappropriate.  That's an IO-space read in
> > > > there, which is slow.  This timeout will be very long indeed.
> > >
> > > Please suggest me what it's more appropriate.
> >
> > Pick a constant, use it.
> 
> How should I choose the value of that costant ?

You could pick the value of loops_per_jiffy at HZ=1000,
for one example.  You're using that limit to avoid
spinning too long with IRQs blocked, so you basically
just need a loop count which, if it's exceeded, will
pretty clearly indicate a hardware bug.

- Dave

-
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