Re: [PATCH 1/2] MIPS: tracing: move insn_has_delay_slot to a shared header

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

 



On 05.10.2016 01:18, Ralf Baechle wrote:
On Fri, Sep 30, 2016 at 11:33:45AM +0200, Marcin Nowakowski wrote:

Currently both kprobes and uprobes code have definitions of the
insn_has_delay_slot method. Move it to a separate header as an inline
method that each probe-specific method can later use.
No functional change intended, although the methods slightly varied in
the constraints they set for the methods - the uprobes one was chosen as
it is slightly more specific when filtering opcode fields.

Applied - but this is way to big for an inline function and will end up
getting expanded two times in uprobes.c for no good reason.  I think this
function should become go to something like arch/mips/kernel/branch.c -
or maybe a helper library like arch/mips/lib/bdelay.c.

  Ralf


Well - that's the behaviour my change hasn't modified.
But I agree that it may be better to simply make it a library function that could be used everywhere. The main reason I didn't do it in the first place was to keep the implementation in kprobes in __kprobes section like the original code did, but I guess it won't do any harm for the code that is used in the uprobes path to exist in the kprobe section as well?

It's probably not the last change in this area yet so I'll keep this in mind and will update later.

Marcin




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

  Powered by Linux