From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752146AbbIQRdq (ORCPT ); Thu, 17 Sep 2015 13:33:46 -0400 Received: from eu-smtp-delivery-143.mimecast.com ([146.101.78.143]:36575 "EHLO eu-smtp-delivery-143.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751371AbbIQRdp (ORCPT ); Thu, 17 Sep 2015 13:33:45 -0400 From: Jeremy Linton To: Steve Capper CC: "linux-arm-kernel@lists.infradead.org" , Steve Capper , Catalin Marinas , "dwoods@ezchip.com" , "linux-kernel@vger.kernel.org" , Will Deacon , Shijie Huang Date: Thu, 17 Sep 2015 10:33:39 -0700 Subject: RE: [PATCH 7/7] arm64: Mark kernel page ranges contiguous Thread-Topic: [PATCH 7/7] arm64: Mark kernel page ranges contiguous Thread-Index: AdDxbZEQajWj3AbTRAiPfCCsqlj4JQAALWBw Message-ID: References: <1442430186-9083-1-git-send-email-jeremy.linton@arm.com> <1442430186-9083-8-git-send-email-jeremy.linton@arm.com> In-Reply-To: Accept-Language: en-US, en-GB Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US, en-GB MIME-Version: 1.0 X-MC-Unique: E8Bggk89RQCI_ceL1E0mJA-1 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id t8HHXpQa011531 |Hi Jeremy, |One quick comment for now below. |I ran into a problem testing this on my Seattle board, and needed the fix |below. |> - } while (pte++, addr += PAGE_SIZE, addr != end); |> + next = min(end, (addr + CONT_SIZE) & CONT_MASK); |> + if (((addr | next | phys) & CONT_RANGE_MASK) == 0) { |> + /* a block of CONT_RANGE_SIZE PTEs */ |> + __populate_init_pte(pte, addr, next, phys, |> + prot | __pgprot(PTE_CONT)); |> + pte += CONT_RANGE; |> + } else { |> + /* |> + * If the range being split is already inside of a |> + * contiguous range but this PTE isn't going to be |> + * contiguous, then we want to unmark the adjacent |> + * ranges, then update the portion of the range we |> + * are interrested in. |> + */ |> + clear_cont_pte_range(pte, addr); |> + __populate_init_pte(pte, addr, next, phys, prot); |> + pte += CONT_RANGE_OFFSET(next - addr); | |I think this should instead be: |pte += (next - addr) >> PAGE_SHIFT; | |Without the above change, I get panics on boot with my Seattle board when |efi_rtc is initialised. |(I think the EFI runtime stuff exacerbates the non-contiguous code path |hence I notice it on my system). I think that implies you have linear mappings >= 2M that aren’t aligned. Ok, but that almost sounds like something we want to complain about if we detect it. -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2557590 ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2548782 {.n++%ݶw{.n+{G{ayʇڙ,jfhz_(階ݢj"mG?&~iOzv^m ?I