Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3011752imu; Mon, 19 Nov 2018 09:19:59 -0800 (PST) X-Google-Smtp-Source: AJdET5cV85rvgUfwdNYVNMkp75rumsG4TI08KO48rkiVbN8XRpSW4ssqecjyDPPy7wwRGZjbmu5D X-Received: by 2002:a62:4e49:: with SMTP id c70mr23522310pfb.167.1542647999225; Mon, 19 Nov 2018 09:19:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542647999; cv=none; d=google.com; s=arc-20160816; b=UD7N/E0LS7g/arsuJ2yhNTCERBTEnPauZEYPxzMsmu3IskrmN6HcWFmx5bVHuK4SZ4 XKJ/izAsdADGLTy07VzkOOmYve3dK/TLQainrIKHTLWaNeW8WZqQjIRe7zCQrDGDLa/y D5V/xTR1XL1MI4h3VGvvZnCuKn9Qw8LtIJFEc2EaQaUJ6C1zn8GAnA5VPKZUs8aVZYZb Xkzz4MfMlVxmO8t3GCx9l9OyZKo2Ys650SQ/QPw4sZ+D2Lf0UjTsu8EjAgfQvYES9QUD cIHCC6zII/POp7Za/Q1DsvXJqr+21iaj6rbDJVBLjdVQ26S4iO7yxR6ChI0LUB+tZn7r AEJQ== 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=hAGljb1P/cu3bmNkXucAlNQM7aWJW+FZqao9fJ7FmfA=; b=uo8kWdmploJCdwOTA9G8TppPwNIhr7GuoqYA+9j/p0/HwiN8NOetXArp9Hs3EzhCqk pZ78R78ztWzFOhpvWFFca6A7nb5wMOB3iNrHal649FGnOYfq0xafqTsLAlP4IK3C3ckE h2nLURoWQwinPC2r7x5WJP/SevsoZhvBBpa+RfHnl5J4zXVjZpB+N1zVEi++jOMyz0Dr 6YCX4MWOJCcjLq412zNgja7xNathtzRlcSo3pbkrbB9A8GHWMuYA9jyZKddIBgbNbVt9 rSuVDN356M/ZgMyqGJELmRChH9B1fxliTd5iZsNZPrsNxAihIzt7ZOWT+/N3MuqmyJNn qVBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZWQC7g+h; 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 r2si38429969pgo.483.2018.11.19.09.19.34; Mon, 19 Nov 2018 09:19:59 -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=ZWQC7g+h; 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 S2405559AbeKTDZW (ORCPT + 99 others); Mon, 19 Nov 2018 22:25:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:38508 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404694AbeKTDZV (ORCPT ); Mon, 19 Nov 2018 22:25:21 -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 E375622353; Mon, 19 Nov 2018 17:01:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542646865; bh=gIXLsj21ktHFZcioVfzvXisGqKPQ1v2Iu0zsKUNAErA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZWQC7g+hfldsj47iLmxzttR9xscEm3I5n97IvP/7XhfCrO/Z6P88atKrT+XDyakcy Ws1gfGIUzlZeBcs0b0KpX7JH1XFJ4g5U67/AZ2H3G9bR2w66D8eJK9ST7Nd1WPNIyh /3mAULfNhQAm8GYSLd9S/mt07ZYRho9jH9N1dgb0= 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.4 121/160] MIPS: Loongson-3: Fix BRIDGE irq delivery problem Date: Mon, 19 Nov 2018 17:29:20 +0100 Message-Id: <20181119162642.345044623@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119162630.031306128@linuxfoundation.org> References: <20181119162630.031306128@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.4-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 d18c45c7c394..19ff9ce46c02 100644 --- a/arch/mips/include/asm/mach-loongson64/irq.h +++ b/arch/mips/include/asm/mach-loongson64/irq.h @@ -9,7 +9,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 53424f2a53f3..241cb88f9c03 100644 --- a/arch/mips/loongson64/loongson-3/irq.c +++ b/arch/mips/loongson64/loongson-3/irq.c @@ -42,12 +42,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) { } @@ -88,11 +82,10 @@ void __init mach_init_irq(void) init_i8259_irqs(); 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