Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3029069imu; Mon, 19 Nov 2018 09:34:11 -0800 (PST) X-Google-Smtp-Source: AJdET5fHRHWOnEXVcIeaXaBq/BH9z5acnlXFJ4HXeG3rYES+GdQYBtfD22Oj9zAMUHMBZkSYsCVV X-Received: by 2002:a65:48c4:: with SMTP id o4mr20378086pgs.371.1542648850969; Mon, 19 Nov 2018 09:34:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542648850; cv=none; d=google.com; s=arc-20160816; b=Clrsz2jJRQr244/C5WilJPUC8mBGz2rTdATBOmyn9FWcrFcVH8deIJycnP/1oMAp6p T35xixlkxut1zrCtvJwyOnXdtKs6DAPNgxSIOQ2JZslN5u/znkx9sTVuh3EnlW7Wa7kp gOaQ+By3sfc2wZCKPBf0AbG2xl+gRgD7s7Chh0F2rKarWOAtV+VSLTdmNCaH30HWiNb1 776oaKO6YlthThCcCgeexXFA1IjGFxxzb9kkffy7HWFNA7SA5MBjJ5Ag2h5qYiy75mx7 wQFqIzFrGjUDp5JZ+SS/xN3kpwD/XHoyDP1k2ADrvRAGzFL3bQrTkbmGLn/+MjGhB0vA U+Cw== 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=795RP5XVAqsEm7l9J9IpWC1lk859A2twBz6yy3a61f8=; b=sRbfO64UNrIBftPW05qd5PIQp88bpAQ8sm6rkR10dUoSpPxqbPk2v396j9J7R2OeRm maL4TdZxNWvz7kmr81OdeBE0UZB4+q0spi52yPTPWDhD35mrF/VKFZtoJHNvhdiR8StI mfB+uRPBJ1YU/uzxeVrKGZDqKrJndT8SwlxnL1K4B/CrhwQgABSKk5iJxmVinpbxbrgM 7s/x0sejq4a19OpAu0eXb43anOfJv+w/3+vT7+eHNthlFPB5zMIKdBB5/tAcyB7rNVXe dLKPnGXNQhGUmbUSNfT1dUSgXOGspZmBEpZbiLA3YQ0Ls3N7R40+//EKUb51YZEk59wy K5Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MnYxBUIl; 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 n34si6486351pld.381.2018.11.19.09.33.45; Mon, 19 Nov 2018 09:34:10 -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=MnYxBUIl; 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 S2390941AbeKTDS3 (ORCPT + 99 others); Mon, 19 Nov 2018 22:18:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:57336 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390935AbeKTDS2 (ORCPT ); Mon, 19 Nov 2018 22:18:28 -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 25C21206BA; Mon, 19 Nov 2018 16:54:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542646453; bh=bruG8EqjvdHBHjS42kA7ZoPBoZzYBiqIlsqveoGsWFM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MnYxBUIlXEoIWX09Vk2ETJ2s+Am0M+/IJZ8dJ/fJn8a7I8UBjbnYcDnInhm9SKZEc H91/kyc4ID6yrKsTkvIAVxwGJCOlbCdpakCuzEkn6ZEwdPXgikhhLW9YnUmRUi4fbb PRdocZmXQgbrRHeSWmay3bDNNPFur14uARYIIdms= 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.9 30/83] MIPS: Loongson-3: Fix BRIDGE irq delivery problem Date: Mon, 19 Nov 2018 17:28:56 +0100 Message-Id: <20181119162618.490777317@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119162612.046511542@linuxfoundation.org> References: <20181119162612.046511542@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.9-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 ec5f2b30646c..027f53e3bc81 100644 --- a/arch/mips/loongson64/loongson-3/irq.c +++ b/arch/mips/loongson64/loongson-3/irq.c @@ -44,12 +44,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) { } @@ -90,11 +84,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