On 13 March 2012 00:18, Rusty Russell <rusty at rustcorp.com.au> wrote: > + ? ? ? MCR(p15, 1, ANY, 9, 0, 2, ignore_write, 0), > + ? ? ? MRC(p15, 1, ANY, 9, 0, 2, read_l2ctlr, 0), Hmm. I'm generally a bit suspicious of anything that doesn't explicitly say which are crn/crm/op1/op2, because the various docs and tables in TRMs and manuals have no particular consistency about ordering and it's fantastically easy to get confused. However the MRC()/MCR() are quite cute. Are you going to want to encode "this is how this cp15 register is reset" in your tables at some point? Or "r/o for user mode but r/w for kernel" or other complicated permissions? One downside of these macros is that you've lost the ability to use named fields in the struct initialisers and are back to a plain list, which is fine when there are only 2 things other than the crn/crm/op1/op2 but might get ugly if we need to add more later. -- PMM