Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp896832yba; Thu, 18 Apr 2019 11:23:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqypmJHVivnk7HzsuXEzgq3JmZegY/11+YdrF5FT1u6aFvWVQ6AtvXl8EM/396e5f5rhFsDg X-Received: by 2002:a17:902:2827:: with SMTP id e36mr85688129plb.45.1555611830024; Thu, 18 Apr 2019 11:23:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555611830; cv=none; d=google.com; s=arc-20160816; b=UnT6JtWD6s6x60HLQPhITk/0s8BwjcUVT9sdBCnZ+N3jLlyXmxYwznrb84doJUVKg2 07JQv6plspq006+WveMggiGzyCet0UYd834D6+I9lOCKdj83vJi1yvm8JyHoNvFlTigY MhXoWcH8VvBroVlDb3pREEB9/u/IsczqqwN0jJv0nbm13D9IwQhTZdoZonNsT/hQ4a1E imOfNnf6Dm3Yhz4IZ6t8NO38uTRkjr0sX+G3G9BzdKzTrUQFsqjdU1LQRXXcrMlh8NVF adnYPQMEQ/wucOc6CpyNP7RYHbJlxR10DtLd0K5biO1jFneHsIYADxpLMTbKHbV1T3YP Ekhw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=I4ZOYVTwvk4aPVURir6QIo6yNhsUbjLdEMoSXIHFv5E=; b=k+pniN9D2fawHIqPnnLMab1XBaCNBinCDH/jOJbE82K3d/Sr4H2XSt4+Y5p/mnJ/Pa j/FV1PVPjL3ugv0ZsgcvvqwbQMgiuyQbFkJzF7JdGDkz6rAMYyU6hDgxF9yPxC8bdU2a /VCZfsDtuQcecIrICmEy7jn5pMhDlyr9auVYApJxMgP/j9W/Svh81KrKE+xqP5iiFmWN O0ssXnvq/Zcvlkr68DZl5XQWLYMQv4pmSPsPqKEFraNdK8Yi0M0CJLT6EXWL9PRJjD4u nPNWsTR1EhHUerFV4/qAoZIKRIY9tNbCBn9Fl6KpKo3KkqQAHeVum12ykhMDvTlzX5ce L57g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YNjN0krL; 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 t14si2395636pgv.506.2019.04.18.11.23.35; Thu, 18 Apr 2019 11:23:50 -0700 (PDT) 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=pass header.i=@kernel.org header.s=default header.b=YNjN0krL; 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 S2391671AbfDRSHv (ORCPT + 99 others); Thu, 18 Apr 2019 14:07:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:38756 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391661AbfDRSHs (ORCPT ); Thu, 18 Apr 2019 14:07:48 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CBBF9218AF; Thu, 18 Apr 2019 18:07:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555610868; bh=0XS73U07dqcyfCv6Z5YJW9wqBA+jox0cjvNKJqfOPQo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YNjN0krL6aGTHwKAtBmrvuUa8LOobvX4iuxT8QjBB7NDDFiIUw4iLwS+qTZuXOFqB Xccbr6ev52KggUksrtO/mBwOcmSZv31fPJVhYhprn656ThnPrIzT0vEufxRtE01jma chWm5vlljbIIXN3U7nmwqAtg+senHSOzQ/JELliw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jianguo Chen , Marc Zyngier , Sasha Levin Subject: [PATCH 4.9 21/50] irqchip/mbigen: Dont clear eventid when freeing an MSI Date: Thu, 18 Apr 2019 19:57:32 +0200 Message-Id: <20190418160425.314668490@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190418160422.455656724@linuxfoundation.org> References: <20190418160422.455656724@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit fca269f201a8d9985c0a31fb60b15d4eb57cef80 ] mbigen_write_msg clears eventid bits of a mbigen register when free a interrupt, because msi_domain_deactivate memset struct msg to zero. Then multiple mbigen pins with zero eventid will report the same interrupt number. The eventid clear call trace: free_irq __free_irq irq_shutdown irq_domain_deactivate_irq __irq_domain_deactivate_irq __irq_domain_deactivate_irq msi_domain_deactivate platform_msi_write_msg mbigen_write_msg Signed-off-by: Jianguo Chen [maz: massaged subject] Signed-off-by: Marc Zyngier Signed-off-by: Sasha Levin --- drivers/irqchip/irq-mbigen.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/irqchip/irq-mbigen.c b/drivers/irqchip/irq-mbigen.c index 05d87f60d929..406bfe618448 100644 --- a/drivers/irqchip/irq-mbigen.c +++ b/drivers/irqchip/irq-mbigen.c @@ -160,6 +160,9 @@ static void mbigen_write_msg(struct msi_desc *desc, struct msi_msg *msg) void __iomem *base = d->chip_data; u32 val; + if (!msg->address_lo && !msg->address_hi) + return; + base += get_mbigen_vec_reg(d->hwirq); val = readl_relaxed(base); -- 2.19.1