Received: by 10.223.185.116 with SMTP id b49csp2205311wrg; Thu, 15 Feb 2018 08:05:14 -0800 (PST) X-Google-Smtp-Source: AH8x225Md4wrzdJD4gzPRTJP3eOl8e9sB6nghIKp4DGjgUwN3UUkEuTkgzAO48POz3zg+Z74lvzI X-Received: by 10.98.79.65 with SMTP id d62mr3102454pfb.138.1518710714027; Thu, 15 Feb 2018 08:05:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518710713; cv=none; d=google.com; s=arc-20160816; b=FMkbwBbp1xDB8Irl/SubMrT8HGk4tvpImkm9O+D47mxhKHf8hcoJtEi83BdqB1sroN +Xbieds9Ts1UzKYijTZo25vxtP3aLfYdm5jaKKVmyDn2ojK2tVmu0qXll3t0aYHAoW9F HOwYz4KCG+fcPt2xlsafnIlaemn0raTDdoLiYAWloh2868EzT+Fiwa9mvc6kwfUAhBT/ /f7alJwGn0ElmNHHD0gXilrS7NY4O00oZywjMd8PvjThUr66e8tKFfRpvwVnC+zkqT0F futHoO2Z0S9Hd/0fLoxIz5Zd7cmhG0TDI81+8wa+SnyxTbhF7r5arDBPpH3jj3j8e1YO g5FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=jNaxW92hpJ67D2hDsGRogjuhwLWi54xO/FvWmccSnxs=; b=wkIhXI7X/4pxGWGZV+j3Ga5/n7td8N2czx5P6/T7aQW4rnSdWKgzTP8zQ+WNZwBadK bfMG/da6rIGJ2KkBAOJMD+TFBnYMSMHCd1AHvnMSBO3VU1H4jvKzbjjge3oLfCXyuMn2 Olw411x+pZEk3v1UrlKKPbxevuXqtTpMEhCbIp1sB2rzkuuhnSxXL8zLXo2BgEAmlONz pxrByUX6IX9C/Pb3rngA5GW01+/oOCTiIAKAJT1s8a/N9QsRicrK7umTwAaJspAXHmsW wUXEFEdPh2LxsyvJ2208ikJCKnXGbmSknw+xb4wtT/2Zyzc34eI1gXueCnprR+AZI00c sW1A== ARC-Authentication-Results: i=1; mx.google.com; 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 t6si16360pgc.749.2018.02.15.08.04.59; Thu, 15 Feb 2018 08:05:13 -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; 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 S1424730AbeBOPqp (ORCPT + 99 others); Thu, 15 Feb 2018 10:46:45 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:35870 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1424685AbeBOPqh (ORCPT ); Thu, 15 Feb 2018 10:46:37 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id EF302D72; Thu, 15 Feb 2018 15:46:36 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Meelis Roos , Thomas Gleixner Subject: [PATCH 4.15 175/202] genirq: Make legacy autoprobing work again Date: Thu, 15 Feb 2018 16:17:55 +0100 Message-Id: <20180215151722.025049372@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180215151712.768794354@linuxfoundation.org> References: <20180215151712.768794354@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Thomas Gleixner commit 1beaeacdc88b537703d04d5536235d0bbb36db93 upstream. Meelis reported the following warning on a quad P3 HP NetServer museum piece: WARNING: CPU: 3 PID: 258 at kernel/irq/chip.c:244 __irq_startup+0x80/0x100 EIP: __irq_startup+0x80/0x100 irq_startup+0x7e/0x170 probe_irq_on+0x128/0x2b0 parport_irq_probe.constprop.18+0x8d/0x1af [parport_pc] parport_pc_probe_port+0xf11/0x1260 [parport_pc] parport_pc_init+0x78a/0xf10 [parport_pc] parport_parse_param.constprop.16+0xf0/0xf0 [parport_pc] do_one_initcall+0x45/0x1e0 This is caused by the rewrite of the irq activation/startup sequence which missed to convert a callsite in the irq legacy auto probing code. To fix this irq_activate_and_startup() needs to gain a return value so the pending logic can work proper. Fixes: c942cee46bba ("genirq: Separate activation and startup") Reported-by: Meelis Roos Signed-off-by: Thomas Gleixner Tested-by: Meelis Roos Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1801301935410.1797@nanos Signed-off-by: Greg Kroah-Hartman --- kernel/irq/autoprobe.c | 2 +- kernel/irq/chip.c | 6 +++--- kernel/irq/internals.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) --- a/kernel/irq/autoprobe.c +++ b/kernel/irq/autoprobe.c @@ -71,7 +71,7 @@ unsigned long probe_irq_on(void) raw_spin_lock_irq(&desc->lock); if (!desc->action && irq_settings_can_probe(desc)) { desc->istate |= IRQS_AUTODETECT | IRQS_WAITING; - if (irq_startup(desc, IRQ_NORESEND, IRQ_START_FORCE)) + if (irq_activate_and_startup(desc, IRQ_NORESEND)) desc->istate |= IRQS_PENDING; } raw_spin_unlock_irq(&desc->lock); --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -294,11 +294,11 @@ int irq_activate(struct irq_desc *desc) return 0; } -void irq_activate_and_startup(struct irq_desc *desc, bool resend) +int irq_activate_and_startup(struct irq_desc *desc, bool resend) { if (WARN_ON(irq_activate(desc))) - return; - irq_startup(desc, resend, IRQ_START_FORCE); + return 0; + return irq_startup(desc, resend, IRQ_START_FORCE); } static void __irq_disable(struct irq_desc *desc, bool mask); --- a/kernel/irq/internals.h +++ b/kernel/irq/internals.h @@ -76,7 +76,7 @@ extern void __enable_irq(struct irq_desc #define IRQ_START_COND false extern int irq_activate(struct irq_desc *desc); -extern void irq_activate_and_startup(struct irq_desc *desc, bool resend); +extern int irq_activate_and_startup(struct irq_desc *desc, bool resend); extern int irq_startup(struct irq_desc *desc, bool resend, bool force); extern void irq_shutdown(struct irq_desc *desc);