Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp893527yba; Thu, 18 Apr 2019 11:20:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqzWYh9T1pGIslkaIA+iOaOZqFTWO1QaP0j/XIID/KYWastoYTsMSm+Yqv18gxRr8b/CBSx+ X-Received: by 2002:a62:5144:: with SMTP id f65mr98583070pfb.13.1555611606765; Thu, 18 Apr 2019 11:20:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555611606; cv=none; d=google.com; s=arc-20160816; b=vn10Lme4hBKJIk3IB5nBI315ID0EqXgUyoN0ivX4Io2nMnf1m1Pfx1U363nYDrMFVN GC4Nq27oGEBSeNar0Y+245PSlDlgy6pGCL0tPsMWDeqEnOYGl5yfOfYWOTUZauFkzmTh MYYFm1JarLIgqtr96xSNkLy43MJKJuaXkAWDOS+6iswypZXKNKtrOjllmPnWgvTsVEef L/WEnpyTR27myfH5nugKUb4Nh7wgcSzMzSgbYDivNH4nPL10NvUwTXD2s8QdhoEyCwo7 wgfdIwqdQYvUUhZ95YwYOflnIrBAR+0jhYcBl1bKtVw7AIdPQrEuPgvIDTzFABbBneHE EkRA== 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=3PELvZrAqkKB+0W77/X8JNjUEJSMZT1AC3AlFQpvrOk=; b=Tp1GWhJlJc5DnCk3oPk2GOrSYT5DuEyTt/TwlncZEqb/6OxGInzWROh/yRxuf9OwZU /4aNheaoBqi2RscC9iZbzjJ728f4CSmTsCGyXcPUYAyoe3GWQWDfOEbMue1daJF/b7a6 jGkL8IJi7VzRke2rqfprnajOWr5ABiSd++PNzypLaURNHighwdafafWyo9W74mm3JDon V7g7i9mRTIgCfsxrYGoilDLOb3VKVwIwBTEDy4lAN+pJu8KrfLtg4u/AoxKDultjRL8K /1rAlpkUsbmOT00FT/dEKw2M7HmGy0Mo2VhFIepgmeCLbx3tVnsfF7Sigt6bSjYlLyk7 KvrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fxqLr10J; 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 e14si2842259pfn.203.2019.04.18.11.19.52; Thu, 18 Apr 2019 11:20:06 -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=fxqLr10J; 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 S2404229AbfDRSRJ (ORCPT + 99 others); Thu, 18 Apr 2019 14:17:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:43748 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404232AbfDRSLa (ORCPT ); Thu, 18 Apr 2019 14:11:30 -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 D761020675; Thu, 18 Apr 2019 18:11:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555611090; bh=+HSAIJn2BKwQh6KJhlYzv3t1vGt5wtHyLlJ4rBZhFI4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fxqLr10JCsInzKiOz6japHBmIHazwJ3SxCCmdpP47w2C4G1eFPGFQwGizEZwcU7fh H0YuBrc9ql4bd6W/o1gFiBqMP8GX+APJhyjpGY6bt0d4mOTT0XOsTjdKdpJOVOILbj mNOjqZpzj/i2NXocFJKcTPyClr0nsY1WPx7cavEY= 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 5.0 55/93] irqchip/mbigen: Dont clear eventid when freeing an MSI Date: Thu, 18 Apr 2019 19:57:33 +0200 Message-Id: <20190418160443.175526264@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190418160436.781762249@linuxfoundation.org> References: <20190418160436.781762249@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 567b29c47608..98b6e1d4b1a6 100644 --- a/drivers/irqchip/irq-mbigen.c +++ b/drivers/irqchip/irq-mbigen.c @@ -161,6 +161,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