From patchwork Thu Jan 16 23:17:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 11337963 X-Patchwork-Delegate: paulburton@kernel.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8FFA7139A for ; Thu, 16 Jan 2020 23:25:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6E5B22077C for ; Thu, 16 Jan 2020 23:25:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579217135; bh=Am514viuDR+6nowEVV3dj8GfLUbRHk3fnPYTQWZhNqw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=cZ9HrAIAaHJqP4f+ocS8AEe0lmly4e3puy40oxLQ7+w3ZH81+bkBJyFXD2mhFeHSM pVWvsfPYrtWdB1B6CfS8JBHNACJlAB1vbmjutpG9OYCRnbuCvyUdX7YMoz3Xi10Q4P fij5OVn3nqOalJJiShk9wPPB3yNY0/hbgPmZ2GJk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729799AbgAPXZc (ORCPT ); Thu, 16 Jan 2020 18:25:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:55012 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388789AbgAPXZX (ORCPT ); Thu, 16 Jan 2020 18:25:23 -0500 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 4619B20684; Thu, 16 Jan 2020 23:25:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579217122; bh=Am514viuDR+6nowEVV3dj8GfLUbRHk3fnPYTQWZhNqw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DWxHVMMMXDyUO9kXyBbNYV9qP8boOs6qE8F1yak5lQ4+W+uc48aPV10EFNf1KZspa KC57C8fNJAaK2vXHJyXH0zqPEu24kXrVvJABU+zPmcgbwwulWlSwh7Fx/vs1Smb4Pk fFw0VR7bNHng5wxH0Rk045j1/z5RJz2AjTzCyjF0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Bogendoerfer , Paul Burton , Ralf Baechle , James Hogan , linux-mips@vger.kernel.org Subject: [PATCH 5.4 140/203] MIPS: PCI: remember nasid changed by set interrupt affinity Date: Fri, 17 Jan 2020 00:17:37 +0100 Message-Id: <20200116231757.243032912@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200116231745.218684830@linuxfoundation.org> References: <20200116231745.218684830@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org From: Thomas Bogendoerfer commit 37640adbefd66491cb8083a438f7bf366ac09bc7 upstream. When changing interrupt affinity remember the possible changed nasid, otherwise an interrupt deactivate/activate sequence will incorrectly setup interrupt. Fixes: e6308b6d35ea ("MIPS: SGI-IP27: abstract chipset irq from bridge") Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- arch/mips/pci/pci-xtalk-bridge.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/arch/mips/pci/pci-xtalk-bridge.c +++ b/arch/mips/pci/pci-xtalk-bridge.c @@ -279,16 +279,15 @@ static int bridge_set_affinity(struct ir struct bridge_irq_chip_data *data = d->chip_data; int bit = d->parent_data->hwirq; int pin = d->hwirq; - nasid_t nasid; int ret, cpu; ret = irq_chip_set_affinity_parent(d, mask, force); if (ret >= 0) { cpu = cpumask_first_and(mask, cpu_online_mask); - nasid = COMPACT_TO_NASID_NODEID(cpu_to_node(cpu)); + data->nnasid = COMPACT_TO_NASID_NODEID(cpu_to_node(cpu)); bridge_write(data->bc, b_int_addr[pin].addr, (((data->bc->intr_addr >> 30) & 0x30000) | - bit | (nasid << 8))); + bit | (data->nasid << 8))); bridge_read(data->bc, b_wid_tflush); } return ret;