[patch 2/4] [ARM] mmp: support marvell ARMADA610

Russell King - ARM Linux linux at arm.linux.org.uk
Mon Jan 4 05:30:51 EST 2010


On Mon, Jan 04, 2010 at 10:49:05AM +0800, Eric Miao wrote:
> On Mon, Jan 4, 2010 at 10:27 AM, Haojian Zhuang
> <haojian.zhuang at gmail.com> wrote:
> > get_irqnr_preamble can only carries one base parameter and one tmp
> > parameter. base parameter is already used for interrupt control
> > register. Only one tmp parameter is left for use. If we want to check
> > chip id, one parameter is not enought.
> 
> I'm a bit confused, but those are just registers that the macro is able to use,
> not something as parameters??

Correct - they're for sanity with the rest of the code.  They're a way
of saying "this macro can use these registers", and the rest of the code
which calls the macros really doesn't care what you do with them in the
macro.

Imagine what the situation would be if we didn't do this, and everyone
used their own sets of registers in these macros - it'd quickly become
impossible to safely modify the surrounding code, since we wouldn't
know what registers the macro used.



More information about the linux-arm-kernel mailing list