From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754153AbbJNPIr (ORCPT ); Wed, 14 Oct 2015 11:08:47 -0400 Received: from eu-smtp-delivery-143.mimecast.com ([207.82.80.143]:36010 "EHLO eu-smtp-delivery-143.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753278AbbJNPIq convert rfc822-to-8bit (ORCPT ); Wed, 14 Oct 2015 11:08:46 -0400 Subject: Re: [PATCHv3 02/11] arm64: Handle section maps for swapper/idmap To: Mark Rutland References: <1444821634-1689-1-git-send-email-suzuki.poulose@arm.com> <1444821634-1689-3-git-send-email-suzuki.poulose@arm.com> <20151014120618.GB2150@leverpostej> <561E56D4.40506@arm.com> <20151014145158.GA4422@leverpostej> Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, steve.capper@linaro.org, marc.zyngier@arm.com, ard.biesheuvel@linaro.org, christoffer.dall@linaro.org From: "Suzuki K. Poulose" Message-ID: <561E6FFB.3020005@arm.com> Date: Wed, 14 Oct 2015 16:08:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20151014145158.GA4422@leverpostej> X-OriginalArrivalTime: 14 Oct 2015 15:08:43.0543 (UTC) FILETIME=[376E6A70:01D10692] X-MC-Unique: fycTocqiQgCyktGYfY7fyQ-1 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/10/15 15:51, Mark Rutland wrote: >>>> +/* With 4K pages, we use section maps. */ >> /* >> * ARM64 kernel is guaranteed to be loaded at 2M aligned >> * address (as per booting requirements). Hence we can use >> * section mapping with 4K (section size = 2M) and not with >> * 16K(section size = 32M) or 64K (section size = 512M). >> */ > > That sounds much better. I hadn't figured out why myself, so thanks for > the explanation :) > > However, there's one minor nit: the start of memory below the kernel is > 2M aligned, but the offset means that the kernel itself is not loaded at > a 2M aligned address. Oh yes > > So how about: > > /* > * The linear mapping and the start of memory are both 2M aligned (per > * the arm64 booting.txt requirements). Hence we can use section mapping > * with 4K (section size = 2M) but not with 16K (section size = 32M) or > * 64K (section size = 512M). > */ Will add this Thanks Suzuki