Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4984906imm; Tue, 9 Oct 2018 08:05:02 -0700 (PDT) X-Google-Smtp-Source: ACcGV61F+a6ifwXvg1E/m8awI5Xn0PVsaL9dB4MivbGnnpUEaYJY+5CdBERJDPYYQIHL7zhtuS8Y X-Received: by 2002:a62:6a41:: with SMTP id f62-v6mr25689463pfc.154.1539097502888; Tue, 09 Oct 2018 08:05:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539097502; cv=none; d=google.com; s=arc-20160816; b=Ve6GNS5oIGgC4Zl/sqnJd5QAo+JA0DGgYZJ86qJVLqWmeqBXJlSy+rArQav6tCriz0 eR2XiPlv98u+jAdMAUM0PUdcirxHkWcHaWzBzf7wLNy8aj/zPr9AEntvCIj0bOsceI7Q sfZc5BVdnuIkcX8Z/q04Y+DRF6c6ET3/tJdTYejGPSlkiDWDpn7/PrLlyp8paITvTUVy uN0HqQtczObRDlGXun8KyqMeLhYiDlZxWcWqXkVcBA+bFQ4NcVJ872UfQLyfd2FVYTzd V3Ai0MBmFY7z9hZ1m+ttH0b8Gpjr5IHeOntBfVwMNw/mHVOHCKHy0lOB230niOC+3D4/ vtog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:to :from:date; bh=xsgtf68OYxqagPmATsS9UentpSt2pnb+nWBiXQhEoYw=; b=pO0hemWHKnMruVWqCZQQhQlMgWxbR2EKSU3jcYJ9d1NLQzjsSRBVMNIX8TcFJvbbvY B90ZazgDOZomppeQvrk/q+QJc83bCX2MJP6Qtl1WRQycXghH5jjmmVKRJmYUVNgf0Bh1 gG57hDtwayOZUqn63SSo+0qd0YxEnFfILiKjSwMb+AZ17ZpjWxHk8GsuhznkCp6Zo/V2 VspGtEBoddRpWNAienLGGp7U75VMBHUEkeOJZkZfvfzwfgakmS9wMr0UEKVI7mst8yDp 0wrmld4V+G0EZSB8end66WNfPdt7ZFnIzyOuir8199xfu+4JT6o4y9dofcf2GI6J+Db3 Bdmg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a11-v6si20006075plp.225.2018.10.09.08.04.47; Tue, 09 Oct 2018 08:05:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726665AbeJIWVb (ORCPT + 99 others); Tue, 9 Oct 2018 18:21:31 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:39948 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726393AbeJIWVb (ORCPT ); Tue, 9 Oct 2018 18:21:31 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8F74980D; Tue, 9 Oct 2018 08:04:10 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7C34C3F5B7; Tue, 9 Oct 2018 08:04:07 -0700 (PDT) Date: Tue, 9 Oct 2018 16:04:05 +0100 From: Mark Rutland To: AKASHI Takahiro , catalin.marinas@arm.com, will.deacon@arm.com, dhowells@redhat.com, vgoyal@redhat.com, herbert@gondor.apana.org.au, davem@davemloft.net, dyoung@redhat.com, bhe@redhat.com, arnd@arndb.de, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, prudo@linux.ibm.com, ard.biesheuvel@linaro.org, james.morse@arm.com, bhsharma@redhat.com, kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v15 07/16] arm64: add image head flag definitions Message-ID: <20181009150404.cqpkmi2wumututwa@lakrids.cambridge.arm.com> References: <20180928064841.14117-1-takahiro.akashi@linaro.org> <20180928064841.14117-8-takahiro.akashi@linaro.org> <20181001125225.7tlfzt5n25sckhyy@lakrids.cambridge.arm.com> <20181002075939.GG32578@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181002075939.GG32578@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 02, 2018 at 04:59:40PM +0900, AKASHI Takahiro wrote: > 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)? I'm perfectly happy for them to be renamed, I just don't want duplicate definitions. Let's rename them to ARM64_IMAGE_FLAG_, and place them in a new header, arch/arm64/include/asm/image.h, which arch/arm64/kernel/image.h can include and make use of. > > 2. Do you mind removing this check in image.h? > (we also need to manage 'CONFIG_EFI' part of image.h.) What exactly do we need from that? AFAICT that's all linker script stuff that shouldn't matter for kexec. Thanks, Mark.