From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g7FZY-0005pC-Od for kexec@lists.infradead.org; Tue, 02 Oct 2018 07:58:26 +0000 Received: by mail-pl1-x642.google.com with SMTP id 30-v6so454427plb.10 for ; Tue, 02 Oct 2018 00:58:14 -0700 (PDT) Date: Tue, 2 Oct 2018 16:59:40 +0900 From: AKASHI Takahiro Subject: Re: [PATCH v15 07/16] arm64: add image head flag definitions Message-ID: <20181002075939.GG32578@linaro.org> References: <20180928064841.14117-1-takahiro.akashi@linaro.org> <20180928064841.14117-8-takahiro.akashi@linaro.org> <20181001125225.7tlfzt5n25sckhyy@lakrids.cambridge.arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20181001125225.7tlfzt5n25sckhyy@lakrids.cambridge.arm.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Mark Rutland Cc: prudo@linux.ibm.com, herbert@gondor.apana.org.au, bhe@redhat.com, ard.biesheuvel@linaro.org, catalin.marinas@arm.com, bhsharma@redhat.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, heiko.carstens@de.ibm.com, dhowells@redhat.com, arnd@arndb.de, linux-arm-kernel@lists.infradead.org, kexec@lists.infradead.org, schwidefsky@de.ibm.com, james.morse@arm.com, dyoung@redhat.com, davem@davemloft.net, vgoyal@redhat.com Hi Mark, On Mon, Oct 01, 2018 at 01:52:26PM +0100, Mark Rutland wrote: > On Fri, Sep 28, 2018 at 03:48:32PM +0900, AKASHI Takahiro wrote: > > Those image head's flags will be used later by kexec_file loader. > > > > Signed-off-by: AKASHI Takahiro > > Cc: Catalin Marinas > > Cc: Will Deacon > > Acked-by: James Morse > > --- > > arch/arm64/include/asm/boot.h | 15 +++++++++++++++ > > arch/arm64/kernel/head.S | 2 +- > > 2 files changed, 16 insertions(+), 1 deletion(-) > > > > diff --git a/arch/arm64/include/asm/boot.h b/arch/arm64/include/asm/boot.h > > index 355e552a9175..0bab7eed3012 100644 > > --- a/arch/arm64/include/asm/boot.h > > +++ b/arch/arm64/include/asm/boot.h > > @@ -5,6 +5,21 @@ > > > > #include > > > > +#define ARM64_MAGIC "ARM\x64" > > + > > +#define HEAD_FLAG_BE_SHIFT 0 > > +#define HEAD_FLAG_PAGE_SIZE_SHIFT 1 > > +#define HEAD_FLAG_BE_MASK 0x1 > > +#define HEAD_FLAG_PAGE_SIZE_MASK 0x3 > > + > > +#define HEAD_FLAG_BE 1 > > These already exist in some form in arch/arm64/kernel/image.h; can we > please factor those out rather than duplicating them? Sure. > I'd be happy if you'd update image.h to use the new HEAD_FLAG_* names, > and removed the old definitions. I want to make sure two things; 1. Do you assume all the existing __HEAD_FLAG_xyz's NOT be renamed (say, to HEAD_FLAG_xyz)? 2. Do you mind removing this check in image.h? (we also need to manage 'CONFIG_EFI' part of image.h.) > #ifndef LINKER_SCRIPT > #error This file should only be included in vmlinux.lds.S > #endif Thanks, -Takahiro Akashi > > +#define HEAD_FLAG_PAGE_SIZE_4K 1 > > +#define HEAD_FLAG_PAGE_SIZE_16K 2 > > +#define HEAD_FLAG_PAGE_SIZE_64K 3 > > I appreciate these are new, since we didn't previously need definitions. > > Thanks, > Mark. > > > + > > +#define head_flag_field(flags, field) \ > > + (((flags) >> field##_SHIFT) & field##_MASK) > > + > > /* > > * arm64 requires the DTB to be 8 byte aligned and > > * not exceed 2MB in size. > > diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S > > index b0853069702f..8cbac6232ed1 100644 > > --- a/arch/arm64/kernel/head.S > > +++ b/arch/arm64/kernel/head.S > > @@ -91,7 +91,7 @@ _head: > > .quad 0 // reserved > > .quad 0 // reserved > > .quad 0 // reserved > > - .ascii "ARM\x64" // Magic number > > + .ascii ARM64_MAGIC // Magic number > > #ifdef CONFIG_EFI > > .long pe_header - _head // Offset to the PE header. > > > > -- > > 2.19.0 > > _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec