Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3920309pxj; Mon, 21 Jun 2021 09:23:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHlIx2FEo/6dRL28aTmZD7XQGknkuIL53xoGJVF8hbcC/4EbWR/GxqSrycVTlJJuLxc6Ay X-Received: by 2002:a6b:b74e:: with SMTP id h75mr20741111iof.125.1624292608836; Mon, 21 Jun 2021 09:23:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624292608; cv=none; d=google.com; s=arc-20160816; b=PI4fYY0WZZGjFOX7PnyPg20AIqs8Hh9BWyr22Wr8KKxqeihx2xrrPV1RdranEvqIUj DoqV1Qlrz9gnOKJVEZFBh5WZcH68j4dXWHjBeLjYToZUDWoTadKYLAlx2uf/ewjtQAj6 VKAygMb/zPeBrSc4EXs46f5SoBat+l4T2LlTCz39E5Xs9Am8uMXDB8oUhMXKbTJqQSgR ZV0ukbNQMp7g0p1VSt8nDTgYmtbHERBN4uw8yeVvsy7BjDtwl3hzCAemONhwyqqw1qfD HQR4kWk/Z8x1rq+B4TgSvHy2U7wP0x7Y8jYG73A8KJWeuTjibPuAESHntMh7sUwphFY0 +IZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3H/heu0hrRVmelV0OzuQnU1HjdwaxlRQprHxFaHOLXs=; b=vrTz0cp0blBINgOyiyOLaJulp+KSGbW2staJ67Cq1W66lSmVMqFP+5KZ+8vGaQ8i2/ sITqyI07o2lV52eOfYT5Uu7USv7KsYKMbAxWsaBQs6AvyPeeVs31TlMn65CnD5cQBPtv t7aDwB+0HZMTDNjrqYDtl+jb0vjxflv/8IqmROh7Ud3w48F+pTluBkHTm1dJwtTE0r4L XBP9YZUloYrBnGdNWe9Lo9bU7MV2sgmMH8Oz2/SsLbPn1XMc+v1oYDLJ/YTuZW+qiESw dRI7PLPT+K+9PBn/fmT3ixAJLQyNBmf/w3L4O8c21283DVYniELDZtofXrIKZ/5Mv5cA Q5gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="FOrTOQ/y"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g10si18312306iok.45.2021.06.21.09.23.16; Mon, 21 Jun 2021 09:23:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="FOrTOQ/y"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232050AbhFUQYa (ORCPT + 99 others); Mon, 21 Jun 2021 12:24:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:41712 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231789AbhFUQW6 (ORCPT ); Mon, 21 Jun 2021 12:22:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6C947613B0; Mon, 21 Jun 2021 16:20:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292421; bh=Igcd6qF2Vx5ZRAwC1p8bwMQB5ccpBfN9r6Sk0XEbGTk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FOrTOQ/ywBfgZTcsY39ooRN+YVqihhRVAW8azyYJlhaw7Knor1ANI0DrdJVEPcQDg vUxTFFmP5gLWqf4oM+I+ILFbXbbTn/46D3XCEJ35eHRLXBsaqDoANpgY9UeRAGSXh1 jv/CWuigoZ5Sm+bg5ie1mPrATqzqk7/OhqWkNfpk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Daniel Lezcano , Keerthy , Tero Kristo , afzal mohammed , Tony Lindgren Subject: [PATCH 5.4 85/90] ARM: OMAP: replace setup_irq() by request_irq() Date: Mon, 21 Jun 2021 18:16:00 +0200 Message-Id: <20210621154907.033088532@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154904.159672728@linuxfoundation.org> References: <20210621154904.159672728@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: afzal mohammed commit b75ca5217743e4d7076cf65e044e88389e44318d upstream. request_irq() is preferred over setup_irq(). Invocations of setup_irq() occur after memory allocators are ready. Per tglx[1], setup_irq() existed in olden days when allocators were not ready by the time early interrupts were initialized. Hence replace setup_irq() by request_irq(). [1] https://lkml.kernel.org/r/alpine.DEB.2.20.1710191609480.1971@nanos Cc: Daniel Lezcano Cc: Keerthy Cc: Tero Kristo Signed-off-by: afzal mohammed Signed-off-by: Tony Lindgren Signed-off-by: Greg Kroah-Hartman --- arch/arm/mach-omap1/pm.c | 13 ++++++------- arch/arm/mach-omap1/time.c | 10 +++------- arch/arm/mach-omap1/timer32k.c | 10 +++------- arch/arm/mach-omap2/timer.c | 11 +++-------- 4 files changed, 15 insertions(+), 29 deletions(-) --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c @@ -596,11 +596,6 @@ static irqreturn_t omap_wakeup_interrupt return IRQ_HANDLED; } -static struct irqaction omap_wakeup_irq = { - .name = "peripheral wakeup", - .handler = omap_wakeup_interrupt -}; - static const struct platform_suspend_ops omap_pm_ops = { @@ -613,6 +608,7 @@ static const struct platform_suspend_ops static int __init omap_pm_init(void) { int error = 0; + int irq; if (!cpu_class_is_omap1()) return -ENODEV; @@ -656,9 +652,12 @@ static int __init omap_pm_init(void) arm_pm_idle = omap1_pm_idle; if (cpu_is_omap7xx()) - setup_irq(INT_7XX_WAKE_UP_REQ, &omap_wakeup_irq); + irq = INT_7XX_WAKE_UP_REQ; else if (cpu_is_omap16xx()) - setup_irq(INT_1610_WAKE_UP_REQ, &omap_wakeup_irq); + irq = INT_1610_WAKE_UP_REQ; + if (request_irq(irq, omap_wakeup_interrupt, 0, "peripheral wakeup", + NULL)) + pr_err("Failed to request irq %d (peripheral wakeup)\n", irq); /* Program new power ramp-up time * (0 for most boards since we don't lower voltage when in deep sleep) --- a/arch/arm/mach-omap1/time.c +++ b/arch/arm/mach-omap1/time.c @@ -155,15 +155,11 @@ static irqreturn_t omap_mpu_timer1_inter return IRQ_HANDLED; } -static struct irqaction omap_mpu_timer1_irq = { - .name = "mpu_timer1", - .flags = IRQF_TIMER | IRQF_IRQPOLL, - .handler = omap_mpu_timer1_interrupt, -}; - static __init void omap_init_mpu_timer(unsigned long rate) { - setup_irq(INT_TIMER1, &omap_mpu_timer1_irq); + if (request_irq(INT_TIMER1, omap_mpu_timer1_interrupt, + IRQF_TIMER | IRQF_IRQPOLL, "mpu_timer1", NULL)) + pr_err("Failed to request irq %d (mpu_timer1)\n", INT_TIMER1); omap_mpu_timer_start(0, (rate / HZ) - 1, 1); clockevent_mpu_timer1.cpumask = cpumask_of(0); --- a/arch/arm/mach-omap1/timer32k.c +++ b/arch/arm/mach-omap1/timer32k.c @@ -148,15 +148,11 @@ static irqreturn_t omap_32k_timer_interr return IRQ_HANDLED; } -static struct irqaction omap_32k_timer_irq = { - .name = "32KHz timer", - .flags = IRQF_TIMER | IRQF_IRQPOLL, - .handler = omap_32k_timer_interrupt, -}; - static __init void omap_init_32k_timer(void) { - setup_irq(INT_OS_TIMER, &omap_32k_timer_irq); + if (request_irq(INT_OS_TIMER, omap_32k_timer_interrupt, + IRQF_TIMER | IRQF_IRQPOLL, "32KHz timer", NULL)) + pr_err("Failed to request irq %d(32KHz timer)\n", INT_OS_TIMER); clockevent_32k_timer.cpumask = cpumask_of(0); clockevents_config_and_register(&clockevent_32k_timer, --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -91,12 +91,6 @@ static irqreturn_t omap2_gp_timer_interr return IRQ_HANDLED; } -static struct irqaction omap2_gp_timer_irq = { - .name = "gp_timer", - .flags = IRQF_TIMER | IRQF_IRQPOLL, - .handler = omap2_gp_timer_interrupt, -}; - static int omap2_gp_timer_set_next_event(unsigned long cycles, struct clock_event_device *evt) { @@ -382,8 +376,9 @@ static void __init omap2_gp_clockevent_i &clockevent_gpt.name, OMAP_TIMER_POSTED); BUG_ON(res); - omap2_gp_timer_irq.dev_id = &clkev; - setup_irq(clkev.irq, &omap2_gp_timer_irq); + if (request_irq(clkev.irq, omap2_gp_timer_interrupt, + IRQF_TIMER | IRQF_IRQPOLL, "gp_timer", &clkev)) + pr_err("Failed to request irq %d (gp_timer)\n", clkev.irq); __omap_dm_timer_int_enable(&clkev, OMAP_TIMER_INT_OVERFLOW);