[PATCH 1/3] OMAP4: Add L2 Cache support

Shilimkar, Santosh santosh.shilimkar at ti.com
Tue Feb 2 01:49:34 EST 2010


> > Since this code was used only ones in init, I haven't converted it to
> > function. With clobber list as well as you know adding r12 to clobber
> > list, compiler don't generate the save code and r11 can't be added to
> > clobber list.
> 
> Well, we seem to have two places with the same code structure.  Let's
> pull them together into a common function, such as:
> 
> void omap_smc1(u32 fn, u32 arg)
> {
> 	register u32 r12 asm("r12") = fn;
> 	register u32 r0 asm("r0") = arg;
> 	asm volatile(
> 		"str r11, [sp], #-4\n"
> 		"dsb\n"
> 		"smc\n"
> 		"ldr r11, [sp, #4]!"
> 		: "+r" (r0), "+r" (r12)
> 		:
> 		: "r0-r10", "lr", "cc");
> }
> EXPORT_SYMBOL(omap_smc1);
> 
> The code there probably may not be Thumb-2 compatible.
I will re-arrange the series and sent combined the errata + l2 support
with above change since dependency.

Regards,
Santosh



More information about the linux-arm-kernel mailing list