Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp3585685imb; Tue, 5 Mar 2019 13:21:58 -0800 (PST) X-Google-Smtp-Source: APXvYqxBasBg8pBc58okqELCQ10rlswkuBSeBgmOOAILgUAdRqh/t7QjKKUIn8ERON0fRH+glJ7c X-Received: by 2002:a17:902:2ec1:: with SMTP id r59mr3285022plb.334.1551820918053; Tue, 05 Mar 2019 13:21:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551820918; cv=none; d=google.com; s=arc-20160816; b=wAcZfKY3iirFJ518EgSDSNKbcu3Zn6iXQU3pj8hMhJFvt3t8Z51Dk00WkJZcYyrBgF tdtdEaw7GlxvZloa+jUiLB+wz/1VzebV7OWa2T3Z5rf7+5EKFpbbP996bWYtI2EyuOn9 zvLvRlr7yBghfBwwS3bBK2cLCzVwJR010b5yeaS6vA+FTnCKTNhoj9lqV+qIB/ttD59d 1E45kJef+lBf+4gNr+XkWMY6jOIH5CMNMcxmxBPHG4yCMTMUcmV4suaP3KNmtKMteX8/ iAVasWDAFv07HloArX4WIe0wBQilRw4A6ea6R3n5hLSpeH8qJuTzQewhpPMG51J9kmOd Q3yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:references :in-reply-to:message-id:dkim-signature; bh=o3DoY+B3KCcVzArHFfp45/Qxe1eH3v+W9oDWBkO93eY=; b=XWgol3s689V7zYyejiq4yA0NO/rf0Wt5JZfyZkkIPbibUGw//bixncKb6XPsToHBBU JtjVxEn1j0KQrBwiihLvtmg2Om/igR8W5OxHLaKl//R0VCwqdS66wzIaaYQ/D74bgGBw uezxUsM+aCAjIXadnKtPJgBwimQBFPahHIewnNl/z1Dn8QM/oF+vqUqnzmHV1LSxfg8q eNKDGwskQBXthPDEm5wMCrmb9Q45MK4vsBTGAqCBFOgGmejMnUrZYJDQWInsGIoyI9zJ O2UOQZXv4hqAe1X6RmgsudM1oMR1EK03kwn4qilz2Uhlr8BwjNrlYAHJsW6Nan16jrCU Raeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=fpKPnlSQ; 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 q14si9151891pls.204.2019.03.05.13.21.43; Tue, 05 Mar 2019 13:21:58 -0800 (PST) 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; dkim=pass header.i=@c-s.fr header.s=mail header.b=fpKPnlSQ; 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 S1728800AbfCEVST (ORCPT + 99 others); Tue, 5 Mar 2019 16:18:19 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:9669 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728733AbfCEVSS (ORCPT ); Tue, 5 Mar 2019 16:18:18 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 44DV9h0dS7z9v6LT; Tue, 5 Mar 2019 22:18:16 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=fpKPnlSQ; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id IfTXD3oRrwCs; Tue, 5 Mar 2019 22:18:16 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 44DV9g6dGTz9v6LR; Tue, 5 Mar 2019 22:18:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1551820695; bh=o3DoY+B3KCcVzArHFfp45/Qxe1eH3v+W9oDWBkO93eY=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=fpKPnlSQjGpqqICiO/cxhdqBYH2EY1UKKA/rnglhjknHisd4IuqV2r+GVJ1t+kBSR T2wepmlhVdAYHeL2esU9KNQidXkAw3wVh9LsC6jJ+5r4VVckFcYePsGsCwtPpn2YBD AH4BHellcyEew/Mp966dZ0N9XLq5TAmeuu8QT3BQ= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 1902F8B860; Tue, 5 Mar 2019 22:18:16 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id ihQdhvOd_lnk; Tue, 5 Mar 2019 22:18:16 +0100 (CET) Received: from po16846vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id DEEAE8B83A; Tue, 5 Mar 2019 22:18:15 +0100 (CET) Received: by localhost.localdomain (Postfix, from userid 0) id B4AFB6F8CD; Tue, 5 Mar 2019 21:18:15 +0000 (UTC) Message-Id: In-Reply-To: References: From: Christophe Leroy Subject: [PATCH 2/7] powerpc/8xx: Only define APG0 and APG1 To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , ruscur@russell.cc Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Tue, 5 Mar 2019 21:18:15 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since the 8xx implements hardware page table walk assistance, the PGD entries always point to a 4k aligned page, so the 2 upper bit of the APG are not clobbered anymore and remain 0. Therefore only APG0 and APG1 are used and need a definition. We set the other APG to the lowest permission level. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/32/mmu-8xx.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/include/asm/nohash/32/mmu-8xx.h b/arch/powerpc/include/asm/nohash/32/mmu-8xx.h index 0a1a3fc54e54..fc5a653d5dd2 100644 --- a/arch/powerpc/include/asm/nohash/32/mmu-8xx.h +++ b/arch/powerpc/include/asm/nohash/32/mmu-8xx.h @@ -35,11 +35,11 @@ * Then we use the APG to say whether accesses are according to Page rules or * "all Supervisor" rules (Access to all) * Therefore, we define 2 APG groups. lsb is _PMD_USER - * 0 => No user => 01 (all accesses performed according to page definition) + * 0 => Kernel => 01 (all accesses performed according to page definition) * 1 => User => 00 (all accesses performed as supervisor iaw page definition) - * We define all 16 groups so that all other bits of APG can take any value + * 2-16 => NA => 11 (all accesses performed as user iaw page definition) */ -#define MI_APG_INIT 0x44444444 +#define MI_APG_INIT 0x4fffffff /* The effective page number register. When read, contains the information * about the last instruction TLB miss. When MI_RPN is written, bits in @@ -108,11 +108,11 @@ * Then we use the APG to say whether accesses are according to Page rules or * "all Supervisor" rules (Access to all) * Therefore, we define 2 APG groups. lsb is _PMD_USER - * 0 => No user => 01 (all accesses performed according to page definition) + * 0 => Kernel => 01 (all accesses performed according to page definition) * 1 => User => 00 (all accesses performed as supervisor iaw page definition) - * We define all 16 groups so that all other bits of APG can take any value + * 2-16 => NA => 11 (all accesses performed as user iaw page definition) */ -#define MD_APG_INIT 0x44444444 +#define MD_APG_INIT 0x4fffffff /* The effective page number register. When read, contains the information * about the last instruction TLB miss. When MD_RPN is written, bits in -- 2.13.3