Re: [PATCH v3] MIPS: Avoid warnings from use of dla in 32 bit kernels

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

 



On Thu, 30 Mar 2017, Paul Burton wrote:

> One seemingly straightforward fix would be to make use of the PTR_LA
> macro to emit the appropriate pseudo-instruction, however this would
> involve including asm.h which is intended solely for inclusion in
> assembly code. When included by C code its definition of various generic
> & non-namespaced macros such as LONG, PTR, CAT etc cause numerous build
> failures.

 This is however exactly what we do in several places, and I would 
recommend here as well.  Can you point me at the earlier review of your 
proposal?

> Instead fix this by adding a ".set gp=64" directive to inform the
> assembler that general purpose registers are 64 bit for the dla
> instruction. This is a lie, but no more so than using the dla
> instruction to begin with.

 I agree using DLA unconditionally is wrong, so if using <asm/asm.h> and 
its PTR_LA turns out infeasible indeed, then please define a local macro 
that expands to LA or DLA as appropriate and does not cause a namespace 
issue, and use it in `instruction_hazard' (all instances) rather than this 
horrible hack.

  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