Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2974359imu; Mon, 19 Nov 2018 08:51:00 -0800 (PST) X-Google-Smtp-Source: AJdET5ewIQi+XyTQCxtSWuJl+yHlJnq/QwLc31FvyIpwwrmpUhqPfz3P9LdzankYg0e93+z0uv7s X-Received: by 2002:a63:4342:: with SMTP id q63mr20850781pga.63.1542646260563; Mon, 19 Nov 2018 08:51:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542646260; cv=none; d=google.com; s=arc-20160816; b=z5Ikn0DlA2uUO2lYtrLE2rQtwl1dxqnHGk/sxDLXC6gy3CxciZ2yApIP81FuTnGtsg rJO7fPVpCVCTL58BkvSO1wNqZWRQuYWO2N3xfUwJS0VQEDRJphGj9p920FR/I3X2c2NR PkHxn1gWULhwH3Qoa+Mzz7IDTiUnHxh9kzGlpuubqiQwEntBHaA30g3b8AMOd6w0D3cs H7HuI3C1rNWzbaRDOAVTBZvtqPolGv/mjJmn6H/XkOzUrL95Sj/aXdwWROPBj3shMzXf 6gn1DQgM2rCFqyayHXKbgKdqOTEZjEJCY7h1ZAC3cwwpTW+9FJ9VaoOwIaMbeiOp6jst Zyyg== 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=/1cx786RMjYnY0vI8+Ndv7wDOh9BLA/aLXr3hkdYN/M=; b=Bz+oUaQ/GF9TEUNbepioesZGmDmIxgvGxFUHpwIu9CN4pJXbt0QNbLU/UwXABixAKK As0o/Q9TvNQ5LQFyOOWb1cUW7FMilO0Hj0dMLJ3K59zQjlSG4ui7ZQ55O1wUIcjJO3QB 4HxfA2dKMBIDGe0xKk4n4hpxIbBlv+68hSJL0K93bKV1dG9nvYc1+hyEUS2fWfiHyoab VDdAIviIwv3FD8NV3ViQRus8q3akli409cgdEOtp3CukuaCFJH6iyDXMx42YEhdratoO n9lkEuPOxltWFJOWK6gArLDzxeczo3J3GIzsN3dTB1k232FLy6RvdHQYL8hNRUUgA1kR JcwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Cz/EoD7o"; 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 h4-v6si3384053plt.315.2018.11.19.08.50.44; Mon, 19 Nov 2018 08:51:00 -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="Cz/EoD7o"; 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 S2389886AbeKTDOK (ORCPT + 99 others); Mon, 19 Nov 2018 22:14:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:51328 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388976AbeKTDOJ (ORCPT ); Mon, 19 Nov 2018 22:14:09 -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 B5A6D20C01; Mon, 19 Nov 2018 16:49:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542646196; bh=PtTKiDmdzS0jRGw3s3rstKzS2GG5YRLYwcfsSoi3/4c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cz/EoD7onrzbvQnV/oV9+RMHU4hLJ7yRD05OmVeZCDGIGEjUVxCXiIyrADU+TPoqY ZuZ+d7BrfGHPz7t1dJ1VC9jVKxgV3PHdl+xKMGkszlIt0+Lq4cA/GH+wZIgnYOJjog EYdjxR1cslfJczPf1psHwwuvhuCXvKz4Ud+qyOPc= 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.14 036/124] MIPS: Loongson-3: Fix BRIDGE irq delivery problem Date: Mon, 19 Nov 2018 17:28:10 +0100 Message-Id: <20181119162620.630719076@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119162612.951907286@linuxfoundation.org> References: <20181119162612.951907286@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.14-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