Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1719150

Re: [PATCH 4/4] powerpc/32: remove a NOP from memset()

From Michael Ellerman <mpe@ellerman.id.au>
Newsgroups linux.kernel
Subject Re: [PATCH 4/4] powerpc/32: remove a NOP from memset()
Date 2017-08-24 13:00 +0200
Message-ID <uhY1H-5ln-9@gated-at.bofh.it> (permalink)
References <uhFip-1PN-3@gated-at.bofh.it> <uhFip-1PN-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Christophe Leroy <christophe.leroy@c-s.fr> writes:

> memset() is patched after initialisation to activate the
> optimised part which uses cache instructions.
>
> Today we have a 'b 2f' to skip the optimised patch, which then gets
> replaced by a NOP, implying a useless cycle consumption.
> As we have a 'bne 2f' just before, we could use that instruction
> for the live patching, hence removing the need to have a
> dedicated 'b 2f' to be replaced by a NOP.
>
> This patch changes the 'bne 2f' by a 'b 2f'. During init, that
> 'b 2f' is then replaced by 'bne 2f'

I'm not sure what the sequence is during boot for the 32-bit code, but
can you use an ALT_FTR section for this? Possibly that doesn't get done
at the right time though.

cheers

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 4/4] powerpc/32: remove a NOP from memset() Christophe Leroy <christophe.leroy@c-s.fr> - 2017-08-23 17:00 +0200
  Re: [PATCH 4/4] powerpc/32: remove a NOP from memset() Michael Ellerman <mpe@ellerman.id.au> - 2017-08-24 13:00 +0200
    Re: [PATCH 4/4] powerpc/32: remove a NOP from memset() Christophe LEROY <christophe.leroy@c-s.fr> - 2017-08-24 16:00 +0200
      Re: [PATCH 4/4] powerpc/32: remove a NOP from memset() Michael Ellerman <mpe@ellerman.id.au> - 2017-08-25 02:20 +0200

csiph-web