Re: [RFC PATCH] sparc32: make srmmu helpers leon compatible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Sam Ravnborg <sam@xxxxxxxxxxxx>
Date: Sun, 20 May 2012 22:44:47 +0200

> This is what I came up with - on top of the other patches I sent
> which introduced flushi().
> Only RFC for now - I plan to submit a longer set
> of patches that does most of the work to allow leon
> to be used in parallel with the sun platfroms.

Looks great.  If you want to get fancy you can write a macro for the
whole section dance and LEON insn entry stuff.

> The sparc64 code I copied the run-time patching from used
> the following sequence for flushing the ICache:
> 	
>                 wmb();
>                 __asm__ __volatile__("flush     %0" : : "r" (addr +  0));
> 
> Compare this to the flushi() variant:
> #define flushi(addr)    __asm__ __volatile__ ("flush %0" : : "r" (addr) : "memory")
> 
> As far as I understand the macros "wmb()" is just another way to tell
> gcc what it may do. And the "memory" clobber in flushi()
> serve the same purpose as wmb().
> 
> On sparc64 wmb() is: __asm__ __volatile__("":::"memory")
> 
> One could introduce flushi() in the relevant functions in setup_64.c..

On sparc64wmb() used to actually do something, with a membar (MEMory
BARrier) instruction, which sparc32 doesn't have and doesn't need.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux