From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751898AbcFFMS1 (ORCPT ); Mon, 6 Jun 2016 08:18:27 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:58186 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751805AbcFFMSZ (ORCPT ); Mon, 6 Jun 2016 08:18:25 -0400 Date: Mon, 6 Jun 2016 13:18:12 +0100 From: Russell King - ARM Linux To: Bill Mills Cc: mark.rutland@arm.com, t-kristo@ti.com, ssantosh@kernel.org, catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, r-woodruff2@ti.com Subject: Re: [RFC v2 1/4] ARM: mm: add early page table attribute modification ability Message-ID: <20160606121812.GK1041@n2100.armlinux.org.uk> References: <1465183229-24147-1-git-send-email-wmills@ti.com> <1465183229-24147-2-git-send-email-wmills@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1465183229-24147-2-git-send-email-wmills@ti.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 05, 2016 at 11:20:26PM -0400, Bill Mills wrote: > Allow early-init to specify modifications to be made to the boot time page > table. Any modifications specified will be done with MMU off at the same > time that any Phy<->Virt fixup is done. I think this is rather over-engineered - do we need to support multiple different fixups to the page tables like this? Given how this has grown, I think it would be better to duplicate the existing swapper_pg_dir, modify the new copy, and then have the pv-fixup-asm code merely copy the new to the old with the MMU off. That way, the only two things that the assembly code has to do is to deal with the page table update, and updating the TTBR registers. Most of the complexity can then be kept in the C code. I think we also need to modify the TTBCR to match the sharability of memory - currently, TTB walks will be inner sharable, but my understanding is that if we switch memory to be outer sharable, we also need to update the TTB walks to match. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.