Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5645387imm; Wed, 12 Sep 2018 09:00:34 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY3R42Bk5MAc2EzHdT3oibudp/pmHPz0TEA3kTYBhGm2sRNpj0rvs80VsAFkZ0z0WXn49Fz X-Received: by 2002:a63:e255:: with SMTP id y21-v6mr3078657pgj.160.1536768034157; Wed, 12 Sep 2018 09:00:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536768034; cv=none; d=google.com; s=arc-20160816; b=vFZcCLGSKA0Nu5daKQjAFuoPOHtVnb7X7geVyUz0uLiJbV5hxt4IYzWCu7GM71/S21 3KV+bDssU935xnE+o9O40rMLm289PoPHwM9yjjtXI6yXZM8x4z4PZYFiBkZJqVuphIyA KKyFXwFAGIghe7PItVGWXCMORciSH31qD2NXMyyAQoYBVmfNCs/BvT1kunSASgZyHfYJ knIONlC7CnzRpQSHdBScMyEDMeH/MaVSzrU8nSB5b10RMvj/UNhOJDmGo4buaunHlaKd YFlPTjzrpz1pxvQmdztC36K+d79BxyBfbnpkN8WqFGgnN2dmgTY3EGh6nkegCzYgLKfo 6Pvw== 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; bh=FA3pJnAyihEiUy3oIk09WRh6qFOkjp2T2kiDEJZ1ZE4=; b=J8nj3oM0aMakXSDj+0DZkjPS69TnEkuxrVaxNEPiaTJyAaGi/jBwH6D5NK2lLfr5xX pnpCCg55x/ynnioCFhPDPbyoiWHkbVQQnO3r5/tmbVK6M4dj33RY+IOukhkUHeDFq/Kx 8nmeSgGhnuz+Wvql9ddMacu6FnSmtxXa49kUAS+ixJARtZSuEJNEJd4EYWTgCWiYg7ML igjX84kLkckKMy2rEpM2Bw/sPmsCMVAZLwITX8Q6iuPf0fsbcUYh0r/0EoPGkizkTWlN hQSMaRVisRaMxhbTxd3X2pAlTWRgj4hRz3hYxOXPdOIPr0hdjZOC9CiAs87evWGFqbfr RVKw== 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 u5-v6si1440908pgc.459.2018.09.12.09.00.13; Wed, 12 Sep 2018 09:00:34 -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 S1728443AbeILVEJ (ORCPT + 99 others); Wed, 12 Sep 2018 17:04:09 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:51691 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728182AbeILVEI (ORCPT ); Wed, 12 Sep 2018 17:04:08 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 429RKY5Nhqz9ttS2; Wed, 12 Sep 2018 17:58:57 +0200 (CEST) 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 g9T0v6wXYspi; Wed, 12 Sep 2018 17:58:57 +0200 (CEST) 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 429RKY4qwlz9ttRt; Wed, 12 Sep 2018 17:58:57 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id A0ED38B858; Wed, 12 Sep 2018 17:58:57 +0200 (CEST) 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 FaP4MRYv_OeW; Wed, 12 Sep 2018 17:58:57 +0200 (CEST) Received: from pc16082vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.3]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 017628B873; Wed, 12 Sep 2018 17:58:56 +0200 (CEST) Received: by pc16082vm.idsi0.si.c-s.fr (Postfix, from userid 0) id A88C271913; Wed, 12 Sep 2018 15:58:56 +0000 (UTC) Message-Id: <88c230e7629f287437cd7ea7fccf4c8abf090a4c.1536692743.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v2 21/24] powerpc/mm: Define platform default caches related flags To: Bartlomiej Zolnierkiewicz , Benjamin Herrenschmidt , Dominik Brodowski , Geoff Levand , Jens Axboe , Kumar Gala , Li Yang , Michael Ellerman , Nicholas Piggin , Paul Mackerras , Scott Wood , aneesh.kumar@linux.vnet.ibm.com Cc: linux-arm-kernel@lists.infradead.org, linux-block@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, dri-devel@lists.freedesktop.org Date: Wed, 12 Sep 2018 15:58:56 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Cache related flags like _PAGE_COHERENT and _PAGE_WRITETHRU are defined on most platforms. The platforms not defining them don't define any alternative. So we can give them a NUL value directly for those platforms directly. Reviewed-by: Aneesh Kumar K.V Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/32/pte-40x.h | 3 +++ arch/powerpc/include/asm/nohash/32/pte-8xx.h | 4 ++++ arch/powerpc/include/asm/pte-common.h | 11 ----------- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/arch/powerpc/include/asm/nohash/32/pte-40x.h b/arch/powerpc/include/asm/nohash/32/pte-40x.h index ab043b3e9b99..7a8b3c94592f 100644 --- a/arch/powerpc/include/asm/nohash/32/pte-40x.h +++ b/arch/powerpc/include/asm/nohash/32/pte-40x.h @@ -53,6 +53,9 @@ /* No page size encoding in the linux PTE */ #define _PAGE_PSIZE 0 +/* cache related flags non existing on 40x */ +#define _PAGE_COHERENT 0 + #define _PAGE_KERNEL_RO 0 #define _PAGE_KERNEL_ROX _PAGE_EXEC #define _PAGE_KERNEL_RW (_PAGE_DIRTY | _PAGE_RW | _PAGE_HWWRITE) diff --git a/arch/powerpc/include/asm/nohash/32/pte-8xx.h b/arch/powerpc/include/asm/nohash/32/pte-8xx.h index b899c3c877ac..2b4669b3badb 100644 --- a/arch/powerpc/include/asm/nohash/32/pte-8xx.h +++ b/arch/powerpc/include/asm/nohash/32/pte-8xx.h @@ -46,6 +46,10 @@ #define _PAGE_NA 0x0200 /* Supervisor NA, User no access */ #define _PAGE_RO 0x0600 /* Supervisor RO, User no access */ +/* cache related flags non existing on 8xx */ +#define _PAGE_COHERENT 0 +#define _PAGE_WRITETHRU 0 + #define _PAGE_KERNEL_RO (_PAGE_PRIVILEGED | _PAGE_RO) #define _PAGE_KERNEL_ROX (_PAGE_PRIVILEGED | _PAGE_RO | _PAGE_EXEC) #define _PAGE_KERNEL_RW (_PAGE_PRIVILEGED | _PAGE_DIRTY) diff --git a/arch/powerpc/include/asm/pte-common.h b/arch/powerpc/include/asm/pte-common.h index 1a2102f8b1e7..ff01368a175a 100644 --- a/arch/powerpc/include/asm/pte-common.h +++ b/arch/powerpc/include/asm/pte-common.h @@ -1,17 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 */ /* Included from asm/pgtable-*.h only ! */ -/* - * Some bits are only used on some cpu families... Make sure that all - * the undefined gets a sensible default - */ -#ifndef _PAGE_COHERENT -#define _PAGE_COHERENT 0 -#endif -#ifndef _PAGE_WRITETHRU -#define _PAGE_WRITETHRU 0 -#endif - /* Location of the PFN in the PTE. Most 32-bit platforms use the same * as _PAGE_SHIFT here (ie, naturally aligned). * Platform who don't just pre-define the value so we don't override it here -- 2.13.3