Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3065234imu; Mon, 19 Nov 2018 10:06:16 -0800 (PST) X-Google-Smtp-Source: AJdET5eSi8WnJ6QnA2dk7Du168NwboJjiNMUYW0aeGAmjQk/bOSjD/Ql+hUskF6g+JbRTmJSBjfV X-Received: by 2002:a17:902:2702:: with SMTP id c2-v6mr23368204plb.314.1542650776196; Mon, 19 Nov 2018 10:06:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542650776; cv=none; d=google.com; s=arc-20160816; b=IjW7cPxzNddtk2FKFhZPTHv04O7g0eZbYU0SU7FpEyV3ywcMYQHDr6eLSMUjKqxjJH bje9XORnz3cT5pilrn3XOVqx6yaMAnswt/VDEC/1xV9r7GOXjpEISYYZJh9NePwLYbCx EjbQycoQ8m+17sTEHJvBdsOruI88gcHW/cFEbgGN4Fnb4uxGu34pTqLrAddiraWjSfVK IV2smTNqqmkoVwznwk2PlXasVPvLxuq3fk4mKQz7ta8ld8WnB6eXJR3iBmCWVJgQ1iZt 6ueeL78EV1KbYtp/3nG2BYHyv1Sbk2p/LbHhrQYxxZB0xG9UotsGyw/AZ2w0olCXiysS U72w== 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=k5DquWlLpMYF9JMaUEIbX5O0d3i+psRG6kt+bNsZvXM=; b=IGI5T4JfSRCT2HDSuOV5LgyAq4McIAAl3ew7evZJRtY0yhtlO8Sscgs8vEwiC1qF5y Pfwnu0IJAiIq+d72vkCZLaP+Q2iNd/+S0hV0Li4NCkZsvRSZoKRSxZXI1YQ56NxEhOoF Kq8dWA9WnP7z2L5MqMcnFmuYOcql9nmVUvB47RUIHkt0S5xHHDg/4UVhoJ86E8RwIlD0 LMk1CxQqf3A57aZV0iD7+9QBiv9DLQdq65Pzdq3xysy35WX3YWjolQxoT3QboS6+TjYu h+730zOxM/6oWsRsO/KTtfq+FXwhDcgwK5vIVJwDusmaFutFnkLY7r06uCmfn6Wje6Vd eGqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wLOFFCJh; 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 f5si821525pfn.259.2018.11.19.10.06.01; Mon, 19 Nov 2018 10:06:16 -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=pass header.i=@kernel.org header.s=default header.b=wLOFFCJh; 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 S1731082AbeKTC53 (ORCPT + 99 others); Mon, 19 Nov 2018 21:57:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:56162 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730241AbeKTC53 (ORCPT ); Mon, 19 Nov 2018 21:57:29 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.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 42B632089F; Mon, 19 Nov 2018 16:33:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542645200; bh=NwVX0xIHh3KVX21/54p1HNYYZEbNy3ieQ3KxOeXPc3E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wLOFFCJhAjhq0QRUhtIZn8lT2Bijja75Z9zp6jmtIA7LiyeZu0zLKwBgiHqUZAD7y O2WmTdNoJR6EmVYw2TAMU/R/EG1yxz7EU4OwQuaB2NtJ/G+MZfuItb5pQBL3NzptvJ QUz3m+mPPSzfa+aqaWE0BIkai/brHkwipkBwBVCk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Huacai Chen , Paul Burton , Ralf Baechle , James Hogan , linux-mips@linux-mips.org, Fuxin Zhang , Zhangjin Wu , Huacai Chen , Sasha Levin Subject: [PATCH 4.19 075/205] MIPS: Loongson-3: Fix BRIDGE irq delivery problem Date: Mon, 19 Nov 2018 17:26:22 +0100 Message-Id: <20181119162630.225691769@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119162616.586062722@linuxfoundation.org> References: <20181119162616.586062722@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 360fe725f8849aaddc53475fef5d4a0c439b05ae ] After commit e509bd7da149dc349160 ("genirq: Allow migration of chained interrupts by installing default action") Loongson-3 fails at here: setup_irq(LOONGSON_HT1_IRQ, &cascade_irqaction); This is because both chained_action and cascade_irqaction don't have IRQF_SHARED flag. This will cause Loongson-3 resume fails because HPET timer interrupt can't be delivered during S3. So we set the irqchip of the chained irq to loongson_irq_chip which doesn't disable the chained irq in CP0.Status. Cc: stable@vger.kernel.org Signed-off-by: Huacai Chen Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/20434/ Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: Fuxin Zhang Cc: Zhangjin Wu Cc: Huacai Chen Signed-off-by: Sasha Levin --- arch/mips/include/asm/mach-loongson64/irq.h | 2 +- arch/mips/loongson64/loongson-3/irq.c | 13 +++---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/arch/mips/include/asm/mach-loongson64/irq.h b/arch/mips/include/asm/mach-loongson64/irq.h index 3644b68c0ccc..be9f727a9328 100644 --- a/arch/mips/include/asm/mach-loongson64/irq.h +++ b/arch/mips/include/asm/mach-loongson64/irq.h @@ -10,7 +10,7 @@ #define MIPS_CPU_IRQ_BASE 56 #define LOONGSON_UART_IRQ (MIPS_CPU_IRQ_BASE + 2) /* UART */ -#define LOONGSON_HT1_IRQ (MIPS_CPU_IRQ_BASE + 3) /* HT1 */ +#define LOONGSON_BRIDGE_IRQ (MIPS_CPU_IRQ_BASE + 3) /* CASCADE */ #define LOONGSON_TIMER_IRQ (MIPS_CPU_IRQ_BASE + 7) /* CPU Timer */ #define LOONGSON_HT1_CFG_BASE loongson_sysconf.ht_control_base diff --git a/arch/mips/loongson64/loongson-3/irq.c b/arch/mips/loongson64/loongson-3/irq.c index 2e115ab66a00..5605061f5f98 100644 --- a/arch/mips/loongson64/loongson-3/irq.c +++ b/arch/mips/loongson64/loongson-3/irq.c @@ -96,12 +96,6 @@ void mach_irq_dispatch(unsigned int pending) } } -static struct irqaction cascade_irqaction = { - .handler = no_action, - .flags = IRQF_NO_SUSPEND, - .name = "cascade", -}; - static inline void mask_loongson_irq(struct irq_data *d) { } static inline void unmask_loongson_irq(struct irq_data *d) { } @@ -147,11 +141,10 @@ void __init mach_init_irq(void) irq_set_chip_and_handler(LOONGSON_UART_IRQ, &loongson_irq_chip, handle_percpu_irq); + irq_set_chip_and_handler(LOONGSON_BRIDGE_IRQ, + &loongson_irq_chip, handle_percpu_irq); - /* setup HT1 irq */ - setup_irq(LOONGSON_HT1_IRQ, &cascade_irqaction); - - set_c0_status(STATUSF_IP2 | STATUSF_IP6); + set_c0_status(STATUSF_IP2 | STATUSF_IP3 | STATUSF_IP6); } #ifdef CONFIG_HOTPLUG_CPU -- 2.17.1