From patchwork Tue Oct 10 10:16:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 823782 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yBCkD18tTz9tY3 for ; Tue, 10 Oct 2017 21:18:28 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="bwiCsA7S"; 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 3yBCkC6jF4zDr69 for ; Tue, 10 Oct 2017 21:18:27 +1100 (AEDT) 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="bwiCsA7S"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:400e:c00::243; helo=mail-pf0-x243.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="bwiCsA7S"; dkim-atps=neutral Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) (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 3yBChQ2wK4zDqlv for ; Tue, 10 Oct 2017 21:16:53 +1100 (AEDT) Received: by mail-pf0-x243.google.com with SMTP id z80so15969949pff.4 for ; Tue, 10 Oct 2017 03:16:53 -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=voeKXqRVsaoSCC8NrEgqNveHZTTZ4hZHWjVsJK1n+e0=; b=bwiCsA7SJ6HpUKKb0U/UTvV4hWxp+A4ZxjEA0zUKj/Xqkv/8WGRfoT/s/4J0MhIxiw m1jp7qHWpFcPmbObrFChPib6TXoANjb0mH+xH5cGcOOH7GN3AsrWbZjTrKagLhUC6lCi Bs9O1qaesCBaqJY1a3LK2dRodP9e4Axuk4XoapFYfOMUPsd83XHjiaL9PG8AJXW2+JTp f41otM3Dnh/iQiRR+iV5S/njpzUVwxfWCr1i5f9Irv13Qyl2tvXJiPqgzaZfsQtxHmze kgsQSb6tN9u5XpLQAbt2O0MOI2KLyMFUBQhD6CwBMdsxY4XZ+AoTRi72ii2KxdTSoCxt +Cdw== 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=voeKXqRVsaoSCC8NrEgqNveHZTTZ4hZHWjVsJK1n+e0=; b=ZMnSIvWQzPuA8SCPM7QQb4R6U6Rjaf5lmRNylRMeC1uQOj/o4x4k/j1M9C5nmxnDc6 4v1ohsfjBf3EXGBpEi82KZ5uN9chc2jv6JwTs7866RTxs+xaG7zUsGZcpiK2XFEU3gy2 1+9U9uKjQuBCqJTJ0V8F2UUusoyOVLQ/jQuBmtedelgOky0iFrNBFUruXM3uGBlwEOsn EYVfGG8UYf1AaUFYUoqrWaPP2/0Zx9QXIzcb/dQYChlhTZGrPe5wbWGiOLEYWcJPuU9c k1s/K8i4v7NFBkF/db/1/F6ZQ/bJmxk7zZ/f0wi1KCvGyf1qQuT2Lcx+JEvx9Zb//41T FvPA== X-Gm-Message-State: AMCzsaXJJ9KZ/qlxGAUYZbEaDkWn+sEXlnRS14OMY0MMC9SVSP5hH0Ku JJ4MwvU7+9LiJnKWRNtLoVmDvA== X-Google-Smtp-Source: AOwi7QC+tr/3CbXPYOD/b2hVNlFRw8ku/IdoHPhatYaLfYKMgJCdj+rUoCUpfAwGh8+AuPBS+ymBJQ== X-Received: by 10.84.131.74 with SMTP id 68mr11890349pld.227.1507630611187; Tue, 10 Oct 2017 03:16:51 -0700 (PDT) Received: from roar.au.ibm.com (220-244-152-14.tpgi.com.au. [220.244.152.14]) by smtp.gmail.com with ESMTPSA id w69sm8471400pfd.22.2017.10.10.03.16.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Oct 2017 03:16:50 -0700 (PDT) From: Nicholas Piggin To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH] powerpc/64s/radix: fix preempt imbalance in TLB flush Date: Tue, 10 Oct 2017 20:16:41 +1000 Message-Id: <20171010101641.5714-1-npiggin@gmail.com> X-Mailer: git-send-email 2.13.3 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.24 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" Signed-off-by: Nicholas Piggin --- arch/powerpc/mm/tlb-radix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/mm/tlb-radix.c b/arch/powerpc/mm/tlb-radix.c index b3e849c4886e..de414460287a 100644 --- a/arch/powerpc/mm/tlb-radix.c +++ b/arch/powerpc/mm/tlb-radix.c @@ -358,7 +358,7 @@ void radix__flush_tlb_collapsed_pmd(struct mm_struct *mm, unsigned long addr) unsigned long ap = mmu_get_ap(mmu_virtual_psize); unsigned long pid, end; - + preempt_disable(); pid = mm ? mm->context.id : 0; if (unlikely(pid == MMU_NO_CONTEXT)) goto no_context; @@ -366,6 +366,7 @@ void radix__flush_tlb_collapsed_pmd(struct mm_struct *mm, unsigned long addr) /* 4k page size, just blow the world */ if (PAGE_SIZE == 0x1000) { radix__flush_all_mm(mm); + preempt_enable(); return; }