Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2172933imu; Thu, 29 Nov 2018 00:11:05 -0800 (PST) X-Google-Smtp-Source: AFSGD/VZiHFE4clRoEa912+RWZqLJZ1ij2zG8za0HBAe6bQdQ/VcVj/is/+OuQggemAeCWzu7tcB X-Received: by 2002:a63:741:: with SMTP id 62mr411474pgh.352.1543479065802; Thu, 29 Nov 2018 00:11:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543479065; cv=none; d=google.com; s=arc-20160816; b=THGoKtondJUMT0S8dla9olJ6b3dQzitbzikk4MB3IVGHsLaHUk09Dp8vR7SWl0CBbt D9aW26JLbjkiXCIcCIN77S1eRho9vpeVLN2i9jb/Xdzk0ABANT/HBvgnLdDTbbk+fHY9 vfg3a73j+4qqauccCheGfnHTDAvKfzibs0nThQ8rWTgDo/qmIgixmzzI1nTnrQpx7Lyl tB9Q+tPPffxal/473nkapnsr4agqAQcqrv71zRE/gSmLpZvFehWmI5IDTSFP5sx+YNXM K73g22j7NB+BBCNb5dGvXcsaetliVF7KnNQCYAZXgrnhPUdAWxJIhPqvlkpcb/KTpWpx p6Cg== 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=yPXv20CQ8Mp3zzOBDUISqR+znywzferDaS7mrZKXc94=; b=asdAGKipiCBrc+KxWN5M+pk2ccMuUH8yYYHpUprz+droH5LkoZIf2p6yfx6j3PBKSW T+IKSV0jRz5moRglc1e4Jk82TCIeIR/7OJkImen++WUgCD6dj0CNUcuwgP4wrn3uollO znMsmW3tYAPfNIHfQjPJU21Rwzw5l0l7ro0hKOh/AvCxYQf7xMg7DSU06m0JyHHUzWQF JjWcT0ZcwQjioFbGGI+8d+pNdDoFx7+pX83jtt8dieh1sXstSa1XjhMTn6Rx3bNevPYW A43l8U17cRDmj9Rpt+O5UI0UPJPpL/vUYrCyVka8Q2tTgsxIjO+HKSQORPPBCVVn1M8Y nDag== 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 i13si1366575pgg.100.2018.11.29.00.10.51; Thu, 29 Nov 2018 00:11:05 -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; 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 S1728063AbeK2TOj (ORCPT + 99 others); Thu, 29 Nov 2018 14:14:39 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:41410 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726789AbeK2TOi (ORCPT ); Thu, 29 Nov 2018 14:14:38 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4359DY261Bz9vGlg; Thu, 29 Nov 2018 09:10:05 +0100 (CET) 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 00KF6-RPm1J6; Thu, 29 Nov 2018 09:10:05 +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 4359DY1d8Mz9vGlV; Thu, 29 Nov 2018 09:10:05 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 166538B890; Thu, 29 Nov 2018 09:10:06 +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 zaqgjfPvBWmw; Thu, 29 Nov 2018 09:10:06 +0100 (CET) Received: from po14163vm.idsi0.si.c-s.fr (unknown [192.168.232.3]) by messagerie.si.c-s.fr (Postfix) with ESMTP id DBD738B762; Thu, 29 Nov 2018 09:10:05 +0100 (CET) Received: by po14163vm.idsi0.si.c-s.fr (Postfix, from userid 0) id B7FD269B13; Thu, 29 Nov 2018 08:10:05 +0000 (UTC) Message-Id: <92106c1e558d4ecbdea315669cb4a4407f5dce5e.1543478199.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v8 01/20] powerpc/book3s32: Remove CONFIG_BOOKE dependent code To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Thu, 29 Nov 2018 08:10:05 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org BOOK3S/32 cannot be BOOKE, so remove useless code Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/32/pgalloc.h | 18 ------------------ arch/powerpc/include/asm/book3s/32/pgtable.h | 14 -------------- 2 files changed, 32 deletions(-) diff --git a/arch/powerpc/include/asm/book3s/32/pgalloc.h b/arch/powerpc/include/asm/book3s/32/pgalloc.h index 82e44b1a00ae..eb8882c6dbb0 100644 --- a/arch/powerpc/include/asm/book3s/32/pgalloc.h +++ b/arch/powerpc/include/asm/book3s/32/pgalloc.h @@ -50,8 +50,6 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) #define __pmd_free_tlb(tlb,x,a) do { } while (0) /* #define pgd_populate(mm, pmd, pte) BUG() */ -#ifndef CONFIG_BOOKE - static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp, pte_t *pte) { @@ -65,22 +63,6 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmdp, } #define pmd_pgtable(pmd) pmd_page(pmd) -#else - -static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp, - pte_t *pte) -{ - *pmdp = __pmd((unsigned long)pte | _PMD_PRESENT); -} - -static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmdp, - pgtable_t pte_page) -{ - *pmdp = __pmd((unsigned long)lowmem_page_address(pte_page) | _PMD_PRESENT); -} - -#define pmd_pgtable(pmd) pmd_page(pmd) -#endif extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr); extern pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long addr); diff --git a/arch/powerpc/include/asm/book3s/32/pgtable.h b/arch/powerpc/include/asm/book3s/32/pgtable.h index c21d33704633..32c33eccc0e2 100644 --- a/arch/powerpc/include/asm/book3s/32/pgtable.h +++ b/arch/powerpc/include/asm/book3s/32/pgtable.h @@ -328,24 +328,10 @@ static inline void __ptep_set_access_flags(struct vm_area_struct *vma, #define __HAVE_ARCH_PTE_SAME #define pte_same(A,B) (((pte_val(A) ^ pte_val(B)) & ~_PAGE_HASHPTE) == 0) -/* - * Note that on Book E processors, the pmd contains the kernel virtual - * (lowmem) address of the pte page. The physical address is less useful - * because everything runs with translation enabled (even the TLB miss - * handler). On everything else the pmd contains the physical address - * of the pte page. -- paulus - */ -#ifndef CONFIG_BOOKE #define pmd_page_vaddr(pmd) \ ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) #define pmd_page(pmd) \ pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT) -#else -#define pmd_page_vaddr(pmd) \ - ((unsigned long) (pmd_val(pmd) & PAGE_MASK)) -#define pmd_page(pmd) \ - pfn_to_page((__pa(pmd_val(pmd)) >> PAGE_SHIFT)) -#endif /* to find an entry in a kernel page-table-directory */ #define pgd_offset_k(address) pgd_offset(&init_mm, address) -- 2.13.3