Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933213AbbLVRxs (ORCPT ); Tue, 22 Dec 2015 12:53:48 -0500 Received: from mail-am1on0095.outbound.protection.outlook.com ([157.56.112.95]:43768 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751859AbbLVRxk (ORCPT ); Tue, 22 Dec 2015 12:53:40 -0500 Authentication-Results: spf=fail (sender IP is 12.216.194.146) smtp.mailfrom=ezchip.com; gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=ezchip.com; From: Chris Metcalf To: CC: Chris Metcalf , Sudip Mukherjee Subject: [PATCH] tile: provide CONFIG_PAGE_SIZE_64KB etc for tilepro Date: Tue, 22 Dec 2015 12:38:36 -0500 Message-ID: <1450805916-26638-3-git-send-email-cmetcalf@ezchip.com> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1450805916-26638-1-git-send-email-cmetcalf@ezchip.com> References: <1450805916-26638-1-git-send-email-cmetcalf@ezchip.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;DB3FFO11FD044;1:dEl0hvtyBhwE7qFKQ+RnzJLFWbpfFfNp4KZDbMTpha223HoqoGLZLNUqYb6qfJRFPa6/5oPQDFSg+DLKXY86Owhj9xXwL60xwbNGyprSMdlu7I+3qMGhN15SbnIADYJZu5XXOddo+SQer7LBsNkq4VwlpQ4n8Kt8nIITUc2E55hVtSWuUB5iBmn+xVi1G/LH+tVqdo55DOuc9QTcNLJlFN/8fODzUKwlR+JRFPVfcMak3WSboM1P30e9DYObU0CuapcXEkN4SMm96719c4DIOxqKEw3wx+4NySRnUDmhgIoGzihI28pz+RP5Ns6OFyJv1PMGGnBZE9qyXOZzpQZPXwMxB3uZyJvhbt5NSkdtMnmIoUmrxvzhRqAy/JI7e10U9dPKNQHTAxkUHWUgJf3DDg== X-Forefront-Antispam-Report: CIP:12.216.194.146;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(105606002)(106466001)(47776003)(104016004)(6806005)(42186005)(5008740100001)(76176999)(50986999)(2950100001)(19580395003)(19580405001)(36756003)(48376002)(92566002)(50466002)(50226001)(87936001)(575784001)(86362001)(229853001)(33646002)(2351001)(11100500001)(586003)(85426001)(189998001)(5001970100001)(110136002)(5003940100001)(1220700001)(1096002);DIR:OUT;SFP:1101;SCL:1;SRVR:DB4PR02MB127;H:lab-41.internal.tilera.com;FPR:;SPF:Fail;PTR:wb-fw1.tilera.com;MX:1;A:1;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;DB4PR02MB127;2:ZOIpDwolC8bh2tfm2Jg+6tKPIYjWfoy2mkkXtBvAgkeIMOzMxFQTNMOJJU/0oZQPNqaWk41WScRc7f67J2k1oIsAPEpCn9ZjyCs5yVoRg2nLoefPk4cNTycqNG1ycQ2QRjU//WNUyZwbwEDaoIRnDg==;3:1938UXh7HPlc3H+sW84dpqLj/2xtjd+FavfYc3IYFKm4Ulntf8bXtwsycizinbXWXLpJUtAW47HLrwUIyZMMOQMfrmv8TGXikalKust7Nb6mockbr1dlEMndNKUqvYq+G5NeXGLAdbLL3UMT+obTWc3f0ZdLDxdae/pn+gJBhmtSVfWyms94i0o1vlfS7hI7PsSaot5ctD/lI8lJUQWJmW0NbTlOOyuBA26HqcZmY9Q=;25:6dMxJO+zNzx/6Rf+S1upPSVVzhaq2T0aAMJQQ6KeYfK5A/J9VVQBJNcmbjj7KyFldi4ZYzEgvKVOT2hQg6h/4tHR2P/70TIZb1qUA+iPWFoR4zHRCg9T6fkEe/Bwt2n1375SvfN9aJq6+uO4ZbZkyP1kS5rF1xFG3w6G6QefeTB4zxTSGa6D3fAcRcAvlDLN4HSB6D3eGGn808qDw6RR2CtNqDB+7Us38z49PZ3uXd7DArhTadgcUeTluFDunop/w+A79Zb4ggW6/8Sqt1f1ew==;20:53y1ujJ6GcRDNZ0jbk4ZXLrX2flwFHka2PMdtc7+0pVF04RX+tSmpzS085XhjfuGzDHrStYktGgWUOPFXjy02DwYWFf17gnUJd2mhKoE3yTOReOHn6m8Mn5sd8NecDDEYDwmbDF792U+o3fwppruBh/h1EStW+B8Whb+HAGP1kc= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB4PR02MB127; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(121898900299872); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(3002001)(10201501046);SRVR:DB4PR02MB127;BCL:0;PCL:0;RULEID:;SRVR:DB4PR02MB127; X-Microsoft-Exchange-Diagnostics: 1;DB4PR02MB127;4:YApBLpvdg22JntAkPjolBgfsPKHxLAOb/T1U8PvUP2ZqEmnf7qMpbek5ZTKb57f1cMyTZL2Cd82CM3gDFUcZImgl9z+ccSGzaGycR0PPrvO7iNlDJnawAXGS6At2oHU80MBDJa6PhENAdY+8xnvaAjicuWIyE7ct4ekn2elV9CTaPOKHF4fJt/F9qrrilAT/Tvm/HwCADOLFoxaFi0/CSEhY3/Sv1JdCFl8MMyBilZa0IyCgjKS60Tca31sM/9jW6cC3t8lOSq6lDTw/L3k+pGM1NRUTaKohqSXLfaIe+yY7QwuWRk/BuVXFUAWJa6f7M6sY4ddm4LR4HXHYxL2mUR2/Mu/3kUuldGotLTp4C66b9GviurorvxAcHjBjoJ83cgtEzv5jA4MXfs6dM/I+4N9fzUXUCp1MtbtpX2/68I1f5nbSati8lfcJtxH8+8ld X-Forefront-PRVS: 0798146F16 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DB4PR02MB127;23:DC2T+xE5ccNBJxR12YAjjppjuUJhltNDqx0a47KC6Z?= =?us-ascii?Q?0G28BM1rSu7duXOi1y+XO3DRBFqpICnVtESy6XgrtWc3M5BE9lLdiYs/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KYrSCF8piSAjFUUMooYYGPR0nvuOJXLNpa5l9jwGbi?= =?us-ascii?Q?EjmKNxonjGt2hDB4ncx8brb3mUM8fjAXopasxoQQNe3Q=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;DB4PR02MB127;5:Q5vSQPV9wWrrnnkLc+35I1qLplq7YNRwBvb+ilwqwUOECQuXa5QVdIz3f4eiHK26NrCch9lEh7OkpL5Rag+5oQzvDMqqEaE/vmzW908DNOKfBZQxzubsWQzgf9+GQaTbvE55LOZ9NO6cUJuwbHeH1g==;24:DLVuYDNwQDQHKVx4pdDaa2IloVsZwBckE5JsjFeHFqP6vsQeyniloGRZVtV+LSJptrdBgZXhPxg8LrzLcfWo+ciMKAkISXXeNtzokt7tXg4= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2015 17:38:46.3617 (UTC) X-MS-Exchange-CrossTenant-Id: 0fc16e0a-3cd3-4092-8b2f-0a42cff122c3 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=0fc16e0a-3cd3-4092-8b2f-0a42cff122c3;Ip=[12.216.194.146];Helo=[lab-41.internal.tilera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR02MB127 X-Microsoft-Exchange-Diagnostics: 1;DB4PR02MB0368;2:Sy29ouWMAfUk6JoGE+qBCCoSijIUJL8MSz0zs9PQc7q/dXslcE9+QEllhpSjSP/Boxbs0bqrxQ41xbtIPd57JVWrbnz0CDtPjAA+KTUlU1t7wIZkgyn2Bi9+IGbRbhBf06af1LR//9L3jDVq0zoemg==;23:MtmSBZR5J8RGq0Z9WB5AJVpqjUMi3kKxwP5gNllk2bo/z8C+ZvVbe6nEPpLjeCPkgKSrDkk4EjndfzRwULMxFMpp83E5PObALrTRmanroxs+DvXRpw85ZWu4/6ZLXN2a2+cvlCycqTVeLki2kgjsp8EaQokRj/3Q8J/BscEPxTckl6y/eAHzQfONgkPrz4W/ X-OriginatorOrg: ezchip.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2799 Lines: 87 This allows the build system to know that it can't attempt to configure the Lustre virtual block device, for example, when tilepro is using 64KB pages (as it does by default). The tilegx build already provided those symbols. Previously we required that the tilepro hypervisor be rebuilt with a different hardcoded page size in its headers, and then Linux be rebuilt using the updated hypervisor header. Now we allow each of the hypervisor and Linux to be built independently. We still check at boot time to ensure that the page size provided by the hypervisor matches what Linux expects. Signed-off-by: Chris Metcalf --- arch/tile/Kconfig | 11 +++++------ arch/tile/include/asm/page.h | 8 +++++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig index 49be476f9feb..5aa0c97c8a5e 100644 --- a/arch/tile/Kconfig +++ b/arch/tile/Kconfig @@ -177,8 +177,6 @@ config NR_CPUS smaller kernel memory footprint results from using a smaller value on chips with fewer tiles. -if TILEGX - choice prompt "Kernel page size" default PAGE_SIZE_64KB @@ -189,8 +187,11 @@ choice connections, etc., it may be better to select 16KB, which uses memory more efficiently at some cost in TLB performance. - Note that this option is TILE-Gx specific; currently - TILEPro page size is set by rebuilding the hypervisor. + Note that for TILEPro, you must also rebuild the hypervisor + with a matching page size. + +config PAGE_SIZE_4KB + bool "4KB" if TILEPRO config PAGE_SIZE_16KB bool "16KB" @@ -200,8 +201,6 @@ config PAGE_SIZE_64KB endchoice -endif - source "kernel/Kconfig.hz" config KEXEC diff --git a/arch/tile/include/asm/page.h b/arch/tile/include/asm/page.h index 5cee2cbff2b1..498a5f71245d 100644 --- a/arch/tile/include/asm/page.h +++ b/arch/tile/include/asm/page.h @@ -20,15 +20,17 @@ #include /* PAGE_SHIFT and HPAGE_SHIFT determine the page sizes. */ -#if defined(CONFIG_PAGE_SIZE_16KB) +#if defined(CONFIG_PAGE_SIZE_4KB) /* tilepro only */ +#define PAGE_SHIFT 12 +#define CTX_PAGE_FLAG HV_CTX_PG_SM_4K +#elif defined(CONFIG_PAGE_SIZE_16KB) #define PAGE_SHIFT 14 #define CTX_PAGE_FLAG HV_CTX_PG_SM_16K #elif defined(CONFIG_PAGE_SIZE_64KB) #define PAGE_SHIFT 16 #define CTX_PAGE_FLAG HV_CTX_PG_SM_64K #else -#define PAGE_SHIFT HV_LOG2_DEFAULT_PAGE_SIZE_SMALL -#define CTX_PAGE_FLAG 0 +#error Page size not specified in Kconfig #endif #define HPAGE_SHIFT HV_LOG2_DEFAULT_PAGE_SIZE_LARGE -- 2.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/