Re: [RFC] mips: Add MXU context switching support

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

 



On Tue, 5 Jul 2016, PrasannaKumar Muralidharan wrote:

> >> +     asm volatile(".word     0x700803ee\n\t");
> >> +     tsk->thread.mxu.xr[15] = reg_val;
> >> +}
> >
> >  Not using an output operand with asms here?
> 
> I think the instruction saves the xr* register value to reg_val
> without need for output operand.

 It does, a classic `asm' is supposed to act as an optimisation barrier.  

 However since you've used an operand `asm' in `__restore_mxu' I think 
it would be good for consistency to use one here as well; it would make 
this piece of code a little bit more readable too, as you wouldn't have 
to guess that the `asm' writes to `reg_val' then.

 So I suggest that you convert `__save_mxu' to use an operand `asm' as 
well.

  Maciej




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux