linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Uros Bizjak <ubizjak@gmail.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Linux Crypto List <linux-crypto@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"Chang S. Bae" <chang.seok.bae@intel.com>,
	Sasha Levin <sashal@kernel.org>
Subject: Re: linux-next: manual merge of the tip tree with the crypto tree
Date: Fri, 17 Jul 2020 08:27:27 +0200	[thread overview]
Message-ID: <CAFULd4Ye2d-8BY7aY+_2tYwcXsfSCe3O6aJ4LF0KhvWTjVt0rA@mail.gmail.com> (raw)
In-Reply-To: <20200717144656.4bdbf81f@canb.auug.org.au>

On Fri, Jul 17, 2020 at 6:47 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> Today's linux-next merge of the tip tree got a conflict in:
>
>   arch/x86/include/asm/inst.h
>
> between commit:
>
>   d7866e503bdc ("crypto: x86 - Remove include/asm/inst.h")
>
> from the crypto tree and commit:
>
>   eaad981291ee ("x86/entry/64: Introduce the FIND_PERCPU_BASE macro")
>
> from the tip tree.
>
> I fixed it up (I brought the file back but removed what the crypto tree
> no longer needed - see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> I think if the crypto tree brought back this file as well (even without
> the RDPID macro, it would make this conflict much more manageable.

I will prepare a v2 that leaves needed part of inst.h.

Uros.

> /* SPDX-License-Identifier: GPL-2.0 */
> /*
>  * Generate .byte code for some instructions not supported by old
>  * binutils.
>  */
> #ifndef X86_ASM_INST_H
> #define X86_ASM_INST_H
>
> #ifdef __ASSEMBLY__
>
> #define REG_NUM_INVALID         100
>
> #define REG_TYPE_R32            0
> #define REG_TYPE_R64            1
> #define REG_TYPE_XMM            2
> #define REG_TYPE_INVALID        100
>
>         .macro R32_NUM opd r32
>         \opd = REG_NUM_INVALID
>         .ifc \r32,%eax
>         \opd = 0
>         .endif
>         .ifc \r32,%ecx
>         \opd = 1
>         .endif
>         .ifc \r32,%edx
>         \opd = 2
>         .endif
>         .ifc \r32,%ebx
>         \opd = 3
>         .endif
>         .ifc \r32,%esp
>         \opd = 4
>         .endif
>         .ifc \r32,%ebp
>         \opd = 5
>         .endif
>         .ifc \r32,%esi
>         \opd = 6
>         .endif
>         .ifc \r32,%edi
>         \opd = 7
>         .endif
> #ifdef CONFIG_X86_64
>         .ifc \r32,%r8d
>         \opd = 8
>         .endif
>         .ifc \r32,%r9d
>         \opd = 9
>         .endif
>         .ifc \r32,%r10d
>         \opd = 10
>         .endif
>         .ifc \r32,%r11d
>         \opd = 11
>         .endif
>         .ifc \r32,%r12d
>         \opd = 12
>         .endif
>         .ifc \r32,%r13d
>         \opd = 13
>         .endif
>         .ifc \r32,%r14d
>         \opd = 14
>         .endif
>         .ifc \r32,%r15d
>         \opd = 15
>         .endif
> #endif
>         .endm
>
>         .macro R64_NUM opd r64
>         \opd = REG_NUM_INVALID
> #ifdef CONFIG_X86_64
>         .ifc \r64,%rax
>         \opd = 0
>         .endif
>         .ifc \r64,%rcx
>         \opd = 1
>         .endif
>         .ifc \r64,%rdx
>         \opd = 2
>         .endif
>         .ifc \r64,%rbx
>         \opd = 3
>         .endif
>         .ifc \r64,%rsp
>         \opd = 4
>         .endif
>         .ifc \r64,%rbp
>         \opd = 5
>         .endif
>         .ifc \r64,%rsi
>         \opd = 6
>         .endif
>         .ifc \r64,%rdi
>         \opd = 7
>         .endif
>         .ifc \r64,%r8
>         \opd = 8
>         .endif
>         .ifc \r64,%r9
>         \opd = 9
>         .endif
>         .ifc \r64,%r10
>         \opd = 10
>         .endif
>         .ifc \r64,%r11
>         \opd = 11
>         .endif
>         .ifc \r64,%r12
>         \opd = 12
>         .endif
>         .ifc \r64,%r13
>         \opd = 13
>         .endif
>         .ifc \r64,%r14
>         \opd = 14
>         .endif
>         .ifc \r64,%r15
>         \opd = 15
>         .endif
> #endif
>         .endm
>
>         .macro XMM_NUM opd xmm
>         \opd = REG_NUM_INVALID
>         .ifc \xmm,%xmm0
>         \opd = 0
>         .endif
>         .ifc \xmm,%xmm1
>         \opd = 1
>         .endif
>         .ifc \xmm,%xmm2
>         \opd = 2
>         .endif
>         .ifc \xmm,%xmm3
>         \opd = 3
>         .endif
>         .ifc \xmm,%xmm4
>         \opd = 4
>         .endif
>         .ifc \xmm,%xmm5
>         \opd = 5
>         .endif
>         .ifc \xmm,%xmm6
>         \opd = 6
>         .endif
>         .ifc \xmm,%xmm7
>         \opd = 7
>         .endif
>         .ifc \xmm,%xmm8
>         \opd = 8
>         .endif
>         .ifc \xmm,%xmm9
>         \opd = 9
>         .endif
>         .ifc \xmm,%xmm10
>         \opd = 10
>         .endif
>         .ifc \xmm,%xmm11
>         \opd = 11
>         .endif
>         .ifc \xmm,%xmm12
>         \opd = 12
>         .endif
>         .ifc \xmm,%xmm13
>         \opd = 13
>         .endif
>         .ifc \xmm,%xmm14
>         \opd = 14
>         .endif
>         .ifc \xmm,%xmm15
>         \opd = 15
>         .endif
>         .endm
>
>         .macro REG_TYPE type reg
>         R32_NUM reg_type_r32 \reg
>         R64_NUM reg_type_r64 \reg
>         XMM_NUM reg_type_xmm \reg
>         .if reg_type_r64 <> REG_NUM_INVALID
>         \type = REG_TYPE_R64
>         .elseif reg_type_r32 <> REG_NUM_INVALID
>         \type = REG_TYPE_R32
>         .elseif reg_type_xmm <> REG_NUM_INVALID
>         \type = REG_TYPE_XMM
>         .else
>         \type = REG_TYPE_INVALID
>         .endif
>         .endm
>
>         .macro PFX_OPD_SIZE
>         .byte 0x66
>         .endm
>
>         .macro PFX_REX opd1 opd2 W=0
>         .if ((\opd1 | \opd2) & 8) || \W
>         .byte 0x40 | ((\opd1 & 8) >> 3) | ((\opd2 & 8) >> 1) | (\W << 3)
>         .endif
>         .endm
>
>         .macro MODRM mod opd1 opd2
>         .byte \mod | (\opd1 & 7) | ((\opd2 & 7) << 3)
>         .endm
>
> .macro RDPID opd
>         REG_TYPE rdpid_opd_type \opd
>         .if rdpid_opd_type == REG_TYPE_R64
>         R64_NUM rdpid_opd \opd
>         .else
>         R32_NUM rdpid_opd \opd
>         .endif
>         .byte 0xf3
>         .if rdpid_opd > 7
>         PFX_REX rdpid_opd 0
>         .endif
>         .byte 0x0f, 0xc7
>         MODRM 0xc0 rdpid_opd 0x7
> .endm
> #endif
>
> #endif
>
> --
> Cheers,
> Stephen Rothwell

  reply	other threads:[~2020-07-17  6:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-17  4:46 linux-next: manual merge of the tip tree with the crypto tree Stephen Rothwell
2020-07-17  6:27 ` Uros Bizjak [this message]
2020-07-17  6:44   ` Herbert Xu
2020-07-17  6:56     ` Stephen Rothwell
2020-07-17  7:31     ` Uros Bizjak
2020-07-20  4:03       ` Stephen Rothwell
2020-07-20  6:13         ` Uros Bizjak
2020-07-20  6:29           ` Stephen Rothwell
2020-07-20 11:59       ` Herbert Xu
  -- strict thread matches above, loose matches on Subject: below --
2022-11-28  1:29 Stephen Rothwell
2020-07-21  4:28 Stephen Rothwell
2020-08-03 22:14 ` Stephen Rothwell
2017-11-08  2:21 Stephen Rothwell
2015-10-12  3:24 Stephen Rothwell
2015-10-12  6:18 ` Herbert Xu
2015-06-17  3:21 Michael Ellerman

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=CAFULd4Ye2d-8BY7aY+_2tYwcXsfSCe3O6aJ4LF0KhvWTjVt0rA@mail.gmail.com \
    --to=ubizjak@gmail.com \
    --cc=chang.seok.bae@intel.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=hpa@zytor.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=sashal@kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=tglx@linutronix.de \
    /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).