From patchwork Fri Sep 14 15:30:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 969934 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42BfmT3L79z9sB5 for ; Sat, 15 Sep 2018 01:38:01 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="G8Fr757l"; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42BfmT1jhPzF3XQ for ; Sat, 15 Sep 2018 01:38:01 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com 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="G8Fr757l"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::443; helo=mail-pf1-x443.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="G8Fr757l"; dkim-atps=neutral Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) (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 42Bfcd1GWYzF3X6 for ; Sat, 15 Sep 2018 01:31:13 +1000 (AEST) Received: by mail-pf1-x443.google.com with SMTP id h79-v6so4470966pfk.8 for ; Fri, 14 Sep 2018 08:31:12 -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:in-reply-to:references; bh=5MJsLZRVZaxaaqCAASBGCRFMpyOBJb5ZWbSGPVluPiw=; b=G8Fr757lqmTUSZdtMlRpZDwjBIq9E+FPuahXKNTWpyQBjTjwwuHQJ3oFsRSDxNt+Mw UD7AzwGtAP5O9y1ZjVHPnTKe9VXx7zCRwZ4z+2Qs0VjLj8L6Rco9A39u3l4orWpT2W8e GFQ/4x7MUSXHgLWqkveI8gxqtbLiIhDpXbNH0RijMd/W3LhjW57hAF0mVQJk9/61h5L3 4lt1cjyY0mh37eSWXybT16ohVagOvpxOda4bnJQdAATgTQmEq1PQ/acyJdw1bhIJ16oN 1fYZIyssYMYkFs5Kg76GWSw60R7RrcGCQh7ZJqv6+xkeFxsMxvI9oqNgXw3QRWcNkekD hglw== 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:in-reply-to :references; bh=5MJsLZRVZaxaaqCAASBGCRFMpyOBJb5ZWbSGPVluPiw=; b=PKjWAeSIIjbvJkUcqWgNaw7oQ9xAcRuja/k/16m/XJrlvvsFftYOgYCiCyuB4L4khW pxjipWTrwB/8HEB9Wsd89mDXYm/N3/4xW0zSQjlHS7KHwxf7X9ZTsHHYL6qFHp93LNlG d0vn7fllAnsHpY3yTJFJGBf0OdD/RT0k6ID2E/snlwxpElyc0skTdCWP4NY/GjvET9tf oa63ik0QQiQCzLnP3Pv4TuiLHi/ffIJAqdidEJFw+ArG6Gu0HTm9lSW3+bhRmhUabsOB +StwE8ZkXlFxEYNqD60jDnVLrF7/VXWxbWPlDqkhyhBoNZ0Bi4znKttYHtgsOM0QBGb/ WAjg== X-Gm-Message-State: APzg51DDqiVwvtyaQopR4EG0czkdjFgPIIghNm9pS3FPUoeXd+OdJscb G0up2XSCQgXH2+TuGco9p0gBa0tA X-Google-Smtp-Source: ANB0VdaMw8AOZQkIkbpoO+3oaShLqr0Lfl1wZgam8rGhFrz0LRIShyniuPZ7s6BUMdZv6F1n6TTQPQ== X-Received: by 2002:a62:46c8:: with SMTP id o69-v6mr13267679pfi.21.1536939071255; Fri, 14 Sep 2018 08:31:11 -0700 (PDT) Received: from roar.local0.net (115-64-249-220.tpgi.com.au. [115.64.249.220]) by smtp.gmail.com with ESMTPSA id a19-v6sm12870721pfj.38.2018.09.14.08.31.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Sep 2018 08:31:10 -0700 (PDT) From: Nicholas Piggin To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH 02/12] powerpc/64s/hash: avoid the POWER5 < DD2.1 slb invalidate workaround on POWER8/9 Date: Sat, 15 Sep 2018 01:30:46 +1000 Message-Id: <20180914153056.3644-3-npiggin@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180914153056.3644-1-npiggin@gmail.com> References: <20180914153056.3644-1-npiggin@gmail.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 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" I only have POWER8/9 to test, so just remove it for those. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/entry_64.S | 2 ++ arch/powerpc/mm/slb.c | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 2206912ea4f0..77a888bfcb53 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S @@ -672,7 +672,9 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_1T_SEGMENT) isync slbie r6 +BEGIN_FTR_SECTION slbie r6 /* Workaround POWER5 < DD2.1 issue */ +END_FTR_SECTION_IFCLR(CPU_FTR_ARCH_207S) slbmte r7,r0 isync 2: diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c index 2f162c6e52d4..1c7128c63a4b 100644 --- a/arch/powerpc/mm/slb.c +++ b/arch/powerpc/mm/slb.c @@ -256,9 +256,11 @@ void switch_slb(struct task_struct *tsk, struct mm_struct *mm) __slb_flush_and_rebolt(); } - /* Workaround POWER5 < DD2.1 issue */ - if (offset == 1 || offset > SLB_CACHE_ENTRIES) - asm volatile("slbie %0" : : "r" (slbie_data)); + if (!cpu_has_feature(CPU_FTR_ARCH_207S)) { + /* Workaround POWER5 < DD2.1 issue */ + if (offset == 1 || offset > SLB_CACHE_ENTRIES) + asm volatile("slbie %0" : : "r" (slbie_data)); + } get_paca()->slb_cache_ptr = 0; copy_mm_to_paca(mm);