From patchwork Tue Apr 14 21:40:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 1270737 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=sparclinux-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=default header.b=w/mx/JlW; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 491zS75CYwz9sSb for ; Wed, 15 Apr 2020 07:40:39 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2633982AbgDNVke (ORCPT ); Tue, 14 Apr 2020 17:40:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:42266 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2633973AbgDNVk2 (ORCPT ); Tue, 14 Apr 2020 17:40:28 -0400 Received: from localhost.localdomain (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0EEC32076C; Tue, 14 Apr 2020 21:40:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586900428; bh=ve7sv4les00ZVqpVE/yt4gMPSgxJivLn9fk5bQ5+EmY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=w/mx/JlWob8BANxK2lx+xGXhxtrKDIUO0pqls7LKmCmybl82tcTprQERGRPUWLSIc DmG7aHkm7XMTtbRcj/NBtwJiX/PKbTAe3lnBx7EAI8rslN8+KIhBqqfzO1KTC9of9r msqoqsOIgoa9iD4JgszOzQUlC0ngAeDee2y9vQjU= From: Will Deacon To: linux-kernel@vger.kernel.org Cc: Will Deacon , "David S. Miller" , Peter Zijlstra , Nick Desaulniers , Matt Fleming , sparclinux@vger.kernel.org, kernel-team@android.com Subject: [RESEND PATCH 4/4] sparc32: mm: Reduce allocation size for PMD and PTE tables Date: Tue, 14 Apr 2020 22:40:11 +0100 Message-Id: <20200414214011.2699-5-will@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200414214011.2699-1-will@kernel.org> References: <20200414214011.2699-1-will@kernel.org> MIME-Version: 1.0 Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org Now that the page table allocator can free page table allocations smaller than PAGE_SIZE, reduce the size of the PMD and PTE allocations to avoid needlessly wasting memory. Cc: "David S. Miller" Cc: Peter Zijlstra Signed-off-by: Will Deacon --- arch/sparc/include/asm/pgtsrmmu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/sparc/include/asm/pgtsrmmu.h b/arch/sparc/include/asm/pgtsrmmu.h index 58ea8e8c6ee7..7708d015712b 100644 --- a/arch/sparc/include/asm/pgtsrmmu.h +++ b/arch/sparc/include/asm/pgtsrmmu.h @@ -17,8 +17,8 @@ /* Number of contexts is implementation-dependent; 64k is the most we support */ #define SRMMU_MAX_CONTEXTS 65536 -#define SRMMU_PTE_TABLE_SIZE (PAGE_SIZE) -#define SRMMU_PMD_TABLE_SIZE (PAGE_SIZE) +#define SRMMU_PTE_TABLE_SIZE (PTRS_PER_PTE*4) +#define SRMMU_PMD_TABLE_SIZE (PTRS_PER_PMD*4) #define SRMMU_PGD_TABLE_SIZE (PTRS_PER_PGD*4) /* Definition of the values in the ET field of PTD's and PTE's */