Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6195201ybv; Wed, 12 Feb 2020 07:43:11 -0800 (PST) X-Google-Smtp-Source: APXvYqy2BKRBLi63IHEFxYRuMAHCYq3OJFQFeS+UwSD9SZ6cR1hRz0XXlad6IPUeiAau+tap5BBd X-Received: by 2002:a05:6830:1d8d:: with SMTP id y13mr9370298oti.344.1581522191847; Wed, 12 Feb 2020 07:43:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581522191; cv=none; d=google.com; s=arc-20160816; b=0eJ0ZuPfv6Gdp88ePARDmnMdVCBMT9lxS+KlNXbweFsphdGaW/6NeLqEDHI/834nqW Jf+tObhl1fv4rRFA3ZsFEQQTJbJqiYlp9WMZF+xY0naYtCGrnI4qa9p27sKt0+xdOkqj gJ7zArAla7fmhdLdHF5KOznIZ42EuktdyspRww6dmPdoNZbtNDakCecnByF+3MCthMIp xz+FsJr3kKOGLAfx1zADEYVBH96pEBvUmlatEncuVRURpmFses4Vp3t1tp8CLCenB0my GgWDWkL7AXoNAsocgoLb5/IW2AJhHFuolKCGdy8Kuj0cEqj6UypCelx7DbMQC0ixvgxp Dvxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5OPGKMDn7v6yquvwDI32AgBMyK1Qn16Qz2yjNol8DFg=; b=rbEI9z9/my8fOZxfqXBbYityUql24rL1XkHm8arv/dcd4TKaze6+/lwDv/jNjVtZL0 e4ofCYyx9x92LTMBdB/toFdsKtNzsbI7yn9NLitSKRxjWCIzyCs+MZgk60oxAJGbg1Ax m068q/pDmTE8qPZFBMg3hbiTt0Zo9L7o0+Pn4dGChQe3QvOVAVlPKk99pqOrhOAONRor aRs97+GZ1pkmOoezN0uQg+taUqD0fdvyCfv2YERJbCaHAv9VJorP+YyucMJLNdilAWA6 5AqkHWilsZDk+WbdNUOI4rjWmDCCeeWM377wiI/99gwVEadydaqYPj2A9T2sEh2R2Ry9 mpxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@monstr-eu.20150623.gappssmtp.com header.s=20150623 header.b=iynOD97N; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k9si3293338oiw.262.2020.02.12.07.42.59; Wed, 12 Feb 2020 07:43:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@monstr-eu.20150623.gappssmtp.com header.s=20150623 header.b=iynOD97N; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728656AbgBLPmo (ORCPT + 99 others); Wed, 12 Feb 2020 10:42:44 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:34113 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728245AbgBLPmn (ORCPT ); Wed, 12 Feb 2020 10:42:43 -0500 Received: by mail-wr1-f66.google.com with SMTP id n10so988194wrm.1 for ; Wed, 12 Feb 2020 07:42:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5OPGKMDn7v6yquvwDI32AgBMyK1Qn16Qz2yjNol8DFg=; b=iynOD97NVB3crI2MU6hPS1zHYgD6a1SO/HVX3FzDyD0a5T5AiakT13hOPUU/wdoCHf HOWkcQpj7D1dmy6zR7n7NqJda4P950XJVTdKkQKuj4uSopI0hWmwEsxwsggK454QBfJW tcjZXS8vVpW/yUXnbB+JDJZFhlFgrKu1MpWlZLfrtcUa74myEIQFCYOzSi+O1wdjxqnF txsVVPpR8q+DnvYdL8SwIjm9nSqYsA3rmv54nZOBmhYQ3HRpgR3/JkYGnmrKTimb3C+H HuqWzaoNES9ehirn5hDDdhwQSdMPxvDye7O8kVuUQxpssrPvfVQeZgYglSvIXc9mnLfk AAlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=5OPGKMDn7v6yquvwDI32AgBMyK1Qn16Qz2yjNol8DFg=; b=cWZk6/0w2LWj8y3VcOOGd1z7DXasu1Tkc4aSjMgg3wvxl5uPZYzLtLLRRlFRYyxuev 5OrQPBzZHKJzC8/JtNQdGOwSofhO1+D84XqH2KMQGQVPW0QMD6GEEOWgINMxsKzr1iNQ IRcoivvewgogrPvSDOGl/l+dPSZoByoAqcZS9gd3GKO7CWzChLyujSJthk+OQSn85XQ4 esARWgf4llXHchXXBE3YKKXt7whxqJM0v+/mAl6UtXcQTOSuVTlZ+A/E/prtImESEYoZ n3j4d/16BPKPlL0hjLKMOVXcQLpNH0nPojqo8DaFPMzXIezKl83YIntz/Nq/61OABeh4 OYmA== X-Gm-Message-State: APjAAAUB/jFJmz6u0K2mVECmI+vUqoFEQtElC583/2CIvxiQrx7ZOnnQ cEymbI6aGu9KoFzt3pHQGjBcsmU5ouLXOySI X-Received: by 2002:a5d:4a8c:: with SMTP id o12mr15347181wrq.43.1581522160957; Wed, 12 Feb 2020 07:42:40 -0800 (PST) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id n3sm1184741wmc.27.2020.02.12.07.42.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Feb 2020 07:42:40 -0800 (PST) From: Michal Simek To: linux-kernel@vger.kernel.org, monstr@monstr.eu, michal.simek@xilinx.com, git@xilinx.com, arnd@arndb.de Cc: Stefan Asserhall , Andrew Morton , Mike Rapoport , Thomas Gleixner Subject: [PATCH 5/7] microblaze: Remove disabling IRQ while pte_update() run Date: Wed, 12 Feb 2020 16:42:27 +0100 Message-Id: <79fa9cfeefc699b21f500c53279098b66275e2bb.1581522136.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stefan Asserhall There is no need to disable local IRQ for pte update. Use exclusive load/store instruction for it. Signed-off-by: Stefan Asserhall Signed-off-by: Michal Simek --- arch/microblaze/include/asm/pgtable.h | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/arch/microblaze/include/asm/pgtable.h b/arch/microblaze/include/asm/pgtable.h index 45b30878fc17..cf1e3095514b 100644 --- a/arch/microblaze/include/asm/pgtable.h +++ b/arch/microblaze/include/asm/pgtable.h @@ -372,20 +372,19 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) static inline unsigned long pte_update(pte_t *p, unsigned long clr, unsigned long set) { - unsigned long flags, old, tmp; - - raw_local_irq_save(flags); - - __asm__ __volatile__( "lw %0, %2, r0 \n" - "andn %1, %0, %3 \n" - "or %1, %1, %4 \n" - "sw %1, %2, r0 \n" + unsigned long old, tmp; + + __asm__ __volatile__( + "1: lwx %0, %2, r0;\n" + " andn %1, %0, %3;\n" + " or %1, %1, %4;\n" + " swx %1, %2, r0;\n" + " addic %1, r0, 0;\n" + " bnei %1, 1b;\n" : "=&r" (old), "=&r" (tmp) : "r" ((unsigned long)(p + 1) - 4), "r" (clr), "r" (set) : "cc"); - raw_local_irq_restore(flags); - return old; } -- 2.25.0