From patchwork Sun Apr 16 14:21:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 751141 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3w5YWw4ZtFz9s3w for ; Mon, 17 Apr 2017 00:22:52 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="h0q9htwN"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3w5YWw3VYpzDqFw for ; Mon, 17 Apr 2017 00:22:52 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="h0q9htwN"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3w5YVP6KJ5zDq7h for ; Mon, 17 Apr 2017 00:21:33 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="h0q9htwN"; dkim-atps=neutral Received: by mail-pf0-x242.google.com with SMTP id g23so6425615pfj.1 for ; Sun, 16 Apr 2017 07:21:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=jDDl/lfNu9u6rN/O/EgGfYYIVW9SCuUudOJfuu7CI+8=; b=h0q9htwNI5kUqQWxNb1MiQd8mpzirEBuzIezB9MtyeNHNl+1dH+Auk7YsCtPp5bx/G UZM3ypR19wSNi9AchOoHafx84leZxtfz1Yx8fmXTOZlNL6b3rvrC4rD4N64GBpmEVSiW 4Ksd6xdVb6fq//FANkm8Mzo2h6J4lGX095wIeZ4txzUOdCWL3C4uPmKEA1+8ahLVzLGD Zc+3PfSpMuhwl6UscXrCcvpwBZdXdl7q6fLJ+3THyZISXyclXNjn47TuNR6Fx9iALM86 niYPALBTOdFyowC4dE4sGz+Nkg7MUlfVSm03KVaeYRMBRLKmGLJuQ7UV2LQd0dtgP22n IWVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=jDDl/lfNu9u6rN/O/EgGfYYIVW9SCuUudOJfuu7CI+8=; b=jl6nnCML9O/Uix0AdeEun/S2aRbaFjN+mPLKcxNNXBToCdkA2IamobjguTytQx3I45 fPG+6nXovg4RyEGNyA4VHF+ROzit+kXpWFJjTWe2NQIZVe062BaUqq4CUPN01GwVRvTh 40uXvH0Io1ZVe/TfNt0c02/32I5LXp4XBs14+FULK6ZuP0QhzfG+Tm5y0yrS0W0fF1HD Mo4FLp0CtAeapYoT3AoPyKCXBy8F4hwqhx+dZteG8ITZB3949bfoKlRt7UgHXOyhAmk5 nGHqHBvaaOmEJIuW793aY89pBu1iMEFanlpnEQ2gbQj6OCjK7ILAe5o7gKWdPqo4OX95 Mp0g== X-Gm-Message-State: AN3rC/7R5uEmtGeMSS8EFsgDVMQZSgATh56Gznlc4Yaa1I2bpYCMF7zi 6A37T1KKoISYgA== X-Received: by 10.99.44.209 with SMTP id s200mr7372645pgs.25.1492352490795; Sun, 16 Apr 2017 07:21:30 -0700 (PDT) Received: from roar.local0.net (14-202-189-126.tpgi.com.au. [14.202.189.126]) by smtp.gmail.com with ESMTPSA id i73sm12835991pfi.131.2017.04.16.07.21.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Apr 2017 07:21:29 -0700 (PDT) From: Nicholas Piggin To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH] powerpc/64s: Minor fix for MCE TLB flush for radix Date: Mon, 17 Apr 2017 00:21:19 +1000 Message-Id: <20170416142119.27242-1-npiggin@gmail.com> X-Mailer: git-send-email 2.11.0 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Aneesh Kumar K . V" , Nicholas Piggin Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" The TLB flush for radix first flushes TLB for radix configuration, then flushes for hash configuration. The second flush is unnecessary but does not affect correctness. Fixes: 1a472c9dba6b9 ("powerpc/mm/radix: Add tlbflush routines") Signed-off-by: Nicholas Piggin Reviewed-by: Aneesh Kumar K.V --- arch/powerpc/kernel/mce_power.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/mce_power.c b/arch/powerpc/kernel/mce_power.c index 763d6f58caa8..7b765aa9f2ff 100644 --- a/arch/powerpc/kernel/mce_power.c +++ b/arch/powerpc/kernel/mce_power.c @@ -72,10 +72,13 @@ void __flush_tlb_power8(unsigned int action) void __flush_tlb_power9(unsigned int action) { - if (radix_enabled()) - flush_tlb_206(POWER9_TLB_SETS_RADIX, action); + unsigned int num_sets; - flush_tlb_206(POWER9_TLB_SETS_HASH, action); + if (radix_enabled()) + num_sets = POWER9_TLB_SETS_RADIX; + else + num_sets = POWER9_TLB_SETS_HASH; + flush_tlb_206(num_sets, action); }