Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3454744ybt; Tue, 30 Jun 2020 03:15:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjGSQBQ4CZwvH60XnSxojc1qRTw4oIvspNZZ/qSzZTi6/JAaXPOrtl+6RI6lOoW3Ozuix5 X-Received: by 2002:a05:6402:6c4:: with SMTP id n4mr22931104edy.353.1593512122042; Tue, 30 Jun 2020 03:15:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593512122; cv=none; d=google.com; s=arc-20160816; b=U6Q8T/IhDKIdHgMJ5tBl938qXfA0M2/6DOZvLgMnly9+b1JV9eMvFOdr2CKIKigUl2 +smXzJL2myV73aQ466tCXRWnJHrTaic9cbFQWSxcW1265o3GPsFZPgVMVi7hL8e6t58P 2WPe3ilob3q7jh3RncxzWHfobVwy+XEKjvA9UjBMt9v/EtZWNrpfIe95cVTUcSUuk3tu PvWaHf/8sGKzN8dCTVuhuCef3R7fTaSaOg/h9eS79PjQ8YyvJxCrMPShsF/X/dPdwVM+ h6ozn6hcLRYnuVQsMXa8S4H+qFXqrKoP7PEr4Drl/2cdmY2/5+CgfKC7uOPiP2dn8lBY NM+g== 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 :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:dkim-signature :dkim-signature:date; bh=EoujhNZEUXnfVLu7O8Ad2WynRdcdYfgaBs6bK4tDNIc=; b=Ld9bLCotAObnwBVO9NoinlJJLUY51WZHCPUneY5+WrFhBP2XrnSWPKLPe6nSY09PL5 uOgTtTSY4RUMFYce+8Y7cNtNWVMsjaXRQK/uI1m5ErWH1/yzhJKAQcliwtlnNLDW18iY Gc6hACgy28zM/3Jxzr+IKNqY50OZV2V/FxNz0vBXxccOsKJmYLdBOksUePn5qVobeHQ+ javxhhDYXSbRAHfYPxDVwJV28IytJ0P02ly2unYZgVCDZLNaUEk+AnIjn33gE7Vj6SYL LF/7IraW8gfsj+1OUZqfMj40p+ETitPXVmEPXcZckIVLEq1JvVgk4QYDsXIGB+Gq4b4s B/Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linutronix.de header.s=2020 header.b=HPGbQ8sI; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=G3epm60U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k22si1473223edx.125.2020.06.30.03.14.59; Tue, 30 Jun 2020 03:15:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@linutronix.de header.s=2020 header.b=HPGbQ8sI; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=G3epm60U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732366AbgF3KME (ORCPT + 99 others); Tue, 30 Jun 2020 06:12:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732261AbgF3KLx (ORCPT ); Tue, 30 Jun 2020 06:11:53 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC944C03E979; Tue, 30 Jun 2020 03:11:52 -0700 (PDT) Date: Tue, 30 Jun 2020 10:11:50 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1593511911; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EoujhNZEUXnfVLu7O8Ad2WynRdcdYfgaBs6bK4tDNIc=; b=HPGbQ8sIDpmJTG2t76BTTXj28h6D8oblKZIxMx5DRj5VERqSUIOC3+mfwIwN2mVyiBTRqp yAQjsYteRwqoiIgVFxE2HzkDolNe6uYtSMLtdS43TAb1HbtGz87W4WY+Y3Kuh2TIrGKYHU uhZcK+l9VSVP2KsuAHXV/b3xf4zKCezSFqtJiphUdgRXE1/M2COtlIt/yZe3P8Y5fX5MwI sQPb3grucmx5KnFJLi3OQ9ii4MbkL5WXzRj28pkivqXqAEFVZHihDKj+prGkHabzeweE3S R9Oi809pNcLRAfob7M8Z3aS0Lr54Df+AJhhJBRJlTCvw08t/OuzQS8NUPiotsQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1593511911; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EoujhNZEUXnfVLu7O8Ad2WynRdcdYfgaBs6bK4tDNIc=; b=G3epm60UnWNDsOQX+9zDNdo0vMQpBEgxgqroWQ/NhYTt1eRocYTOfEkkUmiqOIW2PDQGQD FCULZX065I5ZBuCg== From: "tip-bot2 for Zenghui Yu" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/urgent] irqchip/gic-v4.1: Use readx_poll_timeout_atomic() to fix sleep in atomic Cc: Zenghui Yu , Marc Zyngier , x86 , LKML In-Reply-To: <20200605052345.1494-1-yuzenghui@huawei.com> References: <20200605052345.1494-1-yuzenghui@huawei.com> MIME-Version: 1.0 Message-ID: <159351191045.4006.6389349419327393336.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the irq/urgent branch of tip: Commit-ID: 31dbb6b1d025506b3b8b8b74e9b697df47b9f696 Gitweb: https://git.kernel.org/tip/31dbb6b1d025506b3b8b8b74e9b697df47b9f696 Author: Zenghui Yu AuthorDate: Fri, 05 Jun 2020 13:23:45 +08:00 Committer: Marc Zyngier CommitterDate: Sun, 21 Jun 2020 15:13:11 +01:00 irqchip/gic-v4.1: Use readx_poll_timeout_atomic() to fix sleep in atomic readx_poll_timeout() can sleep if @sleep_us is specified by the caller, and is therefore unsafe to be used inside the atomic context, which is this case when we use it to poll the GICR_VPENDBASER.Dirty bit in irq_set_vcpu_affinity() callback. Let's convert to its atomic version instead which helps to get the v4.1 board back to life! Fixes: 96806229ca03 ("irqchip/gic-v4.1: Add support for VPENDBASER's Dirty+Valid signaling") Signed-off-by: Zenghui Yu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200605052345.1494-1-yuzenghui@huawei.com --- drivers/irqchip/irq-gic-v3-its.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index cd685f5..6a5a87f 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -3797,10 +3797,10 @@ static void its_wait_vpt_parse_complete(void) if (!gic_rdists->has_vpend_valid_dirty) return; - WARN_ON_ONCE(readq_relaxed_poll_timeout(vlpi_base + GICR_VPENDBASER, - val, - !(val & GICR_VPENDBASER_Dirty), - 10, 500)); + WARN_ON_ONCE(readq_relaxed_poll_timeout_atomic(vlpi_base + GICR_VPENDBASER, + val, + !(val & GICR_VPENDBASER_Dirty), + 10, 500)); } static void its_vpe_schedule(struct its_vpe *vpe)