From patchwork Wed Dec 7 20:52:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 9465227 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 18FBE60236 for ; Wed, 7 Dec 2016 20:52:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1956E2853E for ; Wed, 7 Dec 2016 20:52:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E1AB28554; Wed, 7 Dec 2016 20:52:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA2E82853E for ; Wed, 7 Dec 2016 20:52:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932614AbcLGUww (ORCPT ); Wed, 7 Dec 2016 15:52:52 -0500 Received: from mout.gmx.net ([212.227.15.18]:56319 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932536AbcLGUwv (ORCPT ); Wed, 7 Dec 2016 15:52:51 -0500 Received: from ls3530 ([92.203.57.191]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LmbVT-1cot2G2ryt-00aBTg; Wed, 07 Dec 2016 21:52:43 +0100 Date: Wed, 7 Dec 2016 21:52:40 +0100 From: Helge Deller To: linux-parisc@vger.kernel.org, James Bottomley , John David Anglin Subject: [PATCH] parisc: Fix TLB related boot crash with PA8000-PA8700 CPUs Message-ID: <20161207205240.GA5917@ls3530> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.7.1 (2016-10-04) X-Provags-ID: V03:K0:5w2Uo+6UF/Pl5d9g8ie4+y5b0svHR3i558CYzClUhPKAo5hIv2I 3GBPnuH4IPBMyMrQEQiVMwhQ++KLSybUWd+hn7Wxlbmn3SqZblzznKCJC/BIHPOpufkbmHV Bnjben7wsNaTo6dy0lIIIRz4XsE+H1uibTdqa3gKJrH4LgDXtS0ekrw87t5dfb2dDBIv5mi PemrkEu1OW5QTme588zrw== X-UI-Out-Filterresults: notjunk:1; V01:K0:d3fgzfncjV4=:iVVanGqFRxTASkcpepkN0O Croy9QYe2T6ShWjRo6dqg+mAnn2141gc9r7z0l6hOzZ91a5SeZKDvAl2NYyZHH7eyHKI0Icup 2EwPc8SNJEblaPct9GXoI5sHctuTJ7+TacX7vxPJ+RU+WXZ2d5efeOs1mImfkMzdjlQEh52pj nisM3ZJKUz10eiNp85Joz7/Ocnvgx/wcT+TYNpepwWuG53RnxFCqzgkIRmErX1pxxKqE/uhuk aS8tmgBXwxu7KjnkO4cHfsRb8xQPriRK3g/RRsvbDwrBzstLEZ/cHrHP6B4DmEj5kMUJYKbo9 x08S+uoKSKu9igXSCz9uiAJEK0BUh4jFukGQ8eg9deYQEtenEHsaDFQF20Nz1eqiUcGx2uSDE o1HpPHu+1OL8zE/3RJvnpmV7l8JEmVm24rl3tP7R4XDkV6RkM/XIbQzRMzNqF9Ze+Scq+CgG9 wXIRiwe+L8SAzOxe9DhqDHUSo5LdLhDvY1H8d+SxGTiVZygvyEq2Vl0LKefGZeXObGBOkHeFF QdkY9j/BeLGUt/C1ABDf6N+BOLlZIxLO2pcl52P1790Pg2mlhcJ5G6DgIDMV/ZsSvdZd2lSAQ ZB09cXX05VdBTm22V8YxRgjb1V57vGG3C6RN7VNRD58aHAHDGWhneCG0vvdToXZcPWFZr9aKC VthO3hpFLgsdV6D6J9EZGIRpuOlq2CUtZz1Ba0sRFUQpW8yBVD37CLf/E9GGddFuWWPtQ+6GV 8fLfBEVpecQMoMDpTQLO9Dqs2UFZ3RqVok4t7fcVbCl1Z9cgNsM8QIMIgnY= Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Machines with PA8000-PA8700 CPUs crash during startup while we measure and calculate a good threshold for the TLB flush. Avoid this crash by simply skipping the test until we figure out what really triggers the crash. Cc: # v3.18+ Signed-off-by: Helge Deller --- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c index c263301..63c10ea 100644 --- a/arch/parisc/kernel/cache.c +++ b/arch/parisc/kernel/cache.c @@ -393,6 +393,14 @@ void __init parisc_setup_cache_timing(void) /* calculate TLB flush threshold */ + /* skip TLB measure on PA8000-PA8700 CPUs */ + if (boot_cpu_data.cpu_type >= pcxu && + boot_cpu_data.cpu_type <= pcxw2) { + threshold = max(cache_info.it_size, cache_info.dt_size); + threshold *= PAGE_SIZE; + goto set_tlb_threshold; + } + alltime = mfctl(16); flush_tlb_all(); alltime = mfctl(16) - alltime; @@ -411,6 +419,8 @@ void __init parisc_setup_cache_timing(void) alltime, size, rangetime); threshold = PAGE_ALIGN(num_online_cpus() * size * alltime / rangetime); + +set_tlb_threshold: if (threshold) parisc_tlb_flush_threshold = threshold; printk(KERN_INFO "TLB flush threshold set to %lu KiB\n",