Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6586528ybv; Wed, 12 Feb 2020 15:28:16 -0800 (PST) X-Google-Smtp-Source: APXvYqxjLnZywuP/gTDk3/5duYL0BZsTRE+3O5V8VJPwQkKMdcdosXYN4CiB74p+3jNj0rE1/Skn X-Received: by 2002:a05:6830:1643:: with SMTP id h3mr10655701otr.70.1581550096392; Wed, 12 Feb 2020 15:28:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581550096; cv=none; d=google.com; s=arc-20160816; b=WsN3Ieb78Ug96o4Z3wFeAOSECVL+7JlQQbJDqm+dl/v64OdWaTL/TrioWwGSLp31kG ixj5JqUNMFtvHs79ScaAARSQFHJOXE4xz+CfylT6g06tzJr97Y49UI2GefsLquqqmWVB 3Qk1Mg8/diogmdYsQhK3BXDdlYQWxksmA7AYfZSc8EDEf4H5fmwU2iCkCaFp0IhKdCW7 FbLK9QNzkTF3EKkxfwWzNOMYAwmTO1Pr+4Qj1ng66W4AUxzaTWzfKoK8jfzPd/g50aqz lVHt6gKxqNTpU9Ko4aLDN85DWZFW8NFiRV2HVgyJO+O5cQWcY1H9Pe22LTC/gx4kEw07 vsrA== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=qWWr8Tj/x5Uxzxfr4XDatmqFLDK9WTySpZSm5Bv0Ekw=; b=w8gCZBnSlUccPe6ItfZ9d+kmPCsy/cVN+9IPm7fC4YzzM8mWmVpVTQvzjAbvVAHhxH T4SLNXb4w2VvAoxbi6YiouStLfQCCfGIl6Y0a6OhCwAaEgAij9C9lUDca42zyVJ9EDVe Z6BNzcCOPYyU0SeGYC2a8DcOZCS+yN9RMaDtacsu14M1iuC8LbnDnQGNdctPfuKnZF4X xwkvWu+ITlZb+17UcADKsZeacPZx/z6IjPgHP4cWpOU0S/DxZ9Okq/7deSDQKbs891aI Bj7KmKa7x6DLZntB51BPF6Lc+bakD4P+gdUmUBnWsypFKoGFy2NfOUfwpxpIqzxSyop1 +m0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=L6IULQpe; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w18si171417otl.54.2020.02.12.15.28.03; Wed, 12 Feb 2020 15:28:16 -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=@gmail.com header.s=20161025 header.b=L6IULQpe; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729237AbgBLX1Y (ORCPT + 99 others); Wed, 12 Feb 2020 18:27:24 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:50649 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727117AbgBLX1Y (ORCPT ); Wed, 12 Feb 2020 18:27:24 -0500 Received: by mail-wm1-f66.google.com with SMTP id a5so4226140wmb.0; Wed, 12 Feb 2020 15:27:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qWWr8Tj/x5Uxzxfr4XDatmqFLDK9WTySpZSm5Bv0Ekw=; b=L6IULQpe2FXdlwNT2BiPLqWq4HKawYV5jKJh49o0/jP5CDMlvCqZK22kL7aN1LDv1f hKnKN29sw2xQ9cpKhAhNHODtLuSVrxF98GiCI8yuByWFJkHjVo8NQDoxUaoIaNnywUTr u7COFa6iqbCTJrkneJKEzzJW+vHp1Aujis9A6v+zMDKgP1FG19mzCGkUMjaez9si8j/G C0+L63IO28L9orTsObc2mFInroI3Ebit6T+cgK6I1LnPHpdj+BzG9+6DRW4CB8uSKpEV Y2xAzXbYQ83NSp123ZJnRj3Fek0lPZywolgT1jcuINgkJIddUKRpWeCNESRM29F01VRs geGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qWWr8Tj/x5Uxzxfr4XDatmqFLDK9WTySpZSm5Bv0Ekw=; b=IK9v180tWku7cx6K3CmNipqiLnKSe8FR76MxyTEnwzbTrtF33DGahvLDYWtGun1NCL uHMYib67r2bZWLuOAfENhOuBR5CHoO4fMXn0nGkRTUagCbpwDp+bY1Cbp18oDUVMgzam fA2+bnE7ruORyD4mEWV47Y7b0PZGsCZ7FtR7ozyLOQtpgOv8548eCz3dFHo0Lb9xYkl+ 6XNgo14eEeFRphitJqIeCDcT7e7HaIJd3n06SU8yyHj/R6l4iEQiL7lb9cryqryY8+Fo vWJFZZFpPc+eiwz7mz47joXzLOn/Vtpszbsl5NR+FpDGIetQCmeriYQj2iMhRGT1UFkf nU5Q== X-Gm-Message-State: APjAAAXNHbSn4ta53XlqxXN1O5Z3OExKfJBjFnv26/IKeCFfkIXcVdm3 P4tCv9nMgAXXMpAfaUo1dus= X-Received: by 2002:a05:600c:242:: with SMTP id 2mr1463304wmj.2.1581550038818; Wed, 12 Feb 2020 15:27:18 -0800 (PST) Received: from giga-mm ([62.68.27.198]) by smtp.gmail.com with ESMTPSA id l6sm423504wmg.42.2020.02.12.15.27.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Feb 2020 15:27:17 -0800 (PST) Date: Thu, 13 Feb 2020 00:27:16 +0100 From: Alexander Sverdlin To: afzal mohammed Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Krzysztof Halasa , Russell King , Hartley Sweeten , Lubomir Rintel , Kevin Hilman , Aaro Koskinen , Tony Lindgren , Viresh Kumar , Shiraz Hashim , Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Allison Randal , Greg Kroah-Hartman , Thomas Gleixner , Arnd Bergmann , Enrico Weigelt Subject: Re: [PATCH 02/18] ARM: replace setup_irq() by request_irq() Message-Id: <20200213002716.99258cfd73002fdd4bbd17d9@gmail.com> In-Reply-To: References: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! On Wed, 12 Feb 2020 13:32:43 +0530 afzal mohammed wrote: > request_irq() is preferred over setup_irq(). Existing callers of > setup_irq() reached mostly via 'init_IRQ()' & 'time_init()', while > memory allocators are ready by 'mm_init()'. > > 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(). > > Seldom remove_irq() usage has been observed coupled with setup_irq(), > wherever that has been found, it too has been replaced by free_irq(). > > [1] https://lkml.kernel.org/r/alpine.DEB.2.20.1710191609480.1971@nanos > > Signed-off-by: afzal mohammed For the EP93xx part: Tested-by: Alexander Sverdlin Acked-by: Alexander Sverdlin > diff --git a/arch/arm/mach-ep93xx/timer-ep93xx.c b/arch/arm/mach-ep93xx/timer-ep93xx.c > index de998830f534..0335f3b93340 100644 > --- a/arch/arm/mach-ep93xx/timer-ep93xx.c > +++ b/arch/arm/mach-ep93xx/timer-ep93xx.c > @@ -117,13 +117,6 @@ static irqreturn_t ep93xx_timer_interrupt(int irq, void *dev_id) > return IRQ_HANDLED; > } > > -static struct irqaction ep93xx_timer_irq = { > - .name = "ep93xx timer", > - .flags = IRQF_TIMER | IRQF_IRQPOLL, > - .handler = ep93xx_timer_interrupt, > - .dev_id = &ep93xx_clockevent, > -}; > - > void __init ep93xx_timer_init(void) > { > /* Enable and register clocksource and sched_clock on timer 4 */ > @@ -136,7 +129,10 @@ void __init ep93xx_timer_init(void) > EP93XX_TIMER4_RATE); > > /* Set up clockevent on timer 3 */ > - setup_irq(IRQ_EP93XX_TIMER3, &ep93xx_timer_irq); > + if (request_irq(IRQ_EP93XX_TIMER3, ep93xx_timer_interrupt, > + IRQF_TIMER | IRQF_IRQPOLL, "ep93xx timer", > + &ep93xx_clockevent)) > + pr_err("request_irq() on %s failed\n", "ep93xx timer"); > clockevents_config_and_register(&ep93xx_clockevent, > EP93XX_TIMER123_RATE, > 1, -- Alexander Sverdlin.