From: David Laight <David.Laight@ACULAB.COM>
To: 'Peter Zijlstra' <peterz@infradead.org>,
Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: bpf <bpf@vger.kernel.org>, Steven Rostedt <rostedt@goodmis.org>,
"H. Peter Anvin" <hpa@zytor.com>, X86 ML <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: RE: The killing of ideal_nops[]
Date: Thu, 11 Mar 2021 09:28:46 +0000 [thread overview]
Message-ID: <3913a992a9384fe083a5f24e4ef86fdc@AcuMS.aculab.com> (raw)
In-Reply-To: <YEjuArPJsSYDaYeI@hirez.programming.kicks-ass.net>
From: Peter Zijlstra <peterz@infradead.org>
...
> Below is the latest version which I just pushed out to my git tree so
> that the robots can have a go at it.
Why not delete the indirection table?
So you end up with:
> +#ifndef CONFIG_64BIT
> +
> +/*
> + * Generic 32bit nops from GAS:
> + *
> + * 1: nop
> + * 2: movl %esi,%esi
> + * 3: leal 0x00(%esi),%esi
> + * 4: leal 0x00(,%esi,1),%esi
> + * 5: leal %ds:0x00(,%esi,1),%esi
> + * 6: leal 0x00000000(%esi),%esi
> + * 7: leal 0x00000000(,%esi,1),%esi
> + * 8: leal %ds:0x00000000(,%esi,1),%esi
> *
> - * *_NOP5_ATOMIC must be a single instruction.
> + * Except 5 and 8, which are DS prefixed 4 and 7 resp, where GAS would emit 2
> + * nop instructions.
> */
> +#define BYTES_NOP1 0x90
> +#define BYTES_NOP2 0x89,0xf6
> +#define BYTES_NOP3 0x8d,0x76,0x00
> +#define BYTES_NOP4 0x8d,0x74,0x26,0x00
> +#define BYTES_NOP5 0x3e,BYTES_NOP4
> +#define BYTES_NOP6 0x8d,0xb6,0x00,0x00,0x00,0x00
> +#define BYTES_NOP7 0x8d,0xb4,0x26,0x00,0x00,0x00,0x00
> +#define BYTES_NOP8 0x3e,BYTES_NOP7
const unsigned char const x86_nops[8][8] = {
{ BYTES_NOP1 },
{ BYTES_NOP2 },
{ BYTES_NOP3 },
{ BYTES_NOP4 },
{ BYTES_NOP5 },
{ BYTES_NOP6 },
{ BYTES_NOP7 },
{ BYTES_NOP8 }
};
The rest of the patch may not need changing.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2021-03-11 9:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <YEepKVHc5kkDybu6@hirez.programming.kicks-ass.net>
[not found] ` <20210309120519.7c6bbb97@gandalf.local.home>
[not found] ` <YEfnnFUbizbJUQig@hirez.programming.kicks-ass.net>
[not found] ` <362BD2A4-016D-4F6B-8974-92C84DC0DDB4@zytor.com>
[not found] ` <YEiN+/Zp4uE/ISWD@hirez.programming.kicks-ass.net>
[not found] ` <YEiS8Xws0tTFmMJp@hirez.programming.kicks-ass.net>
[not found] ` <YEiZXtB74cnsLTx/@hirez.programming.kicks-ass.net>
[not found] ` <YEid+HQnqgnt3iyY@hirez.programming.kicks-ass.net>
[not found] ` <20210310091324.0c346d5f@oasis.local.home>
[not found] ` <YEjWryS/9uB2y62O@hirez.programming.kicks-ass.net>
2021-03-10 15:48 ` The killing of ideal_nops[] Alexei Starovoitov
2021-03-10 16:04 ` Peter Zijlstra
2021-03-11 9:28 ` David Laight [this message]
2021-03-14 22:43 ` Maciej W. Rozycki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3913a992a9384fe083a5f24e4ef86fdc@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=alexei.starovoitov@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).