Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2441051ybb; Fri, 27 Mar 2020 05:42:58 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv9TQfOKZ8iNqbEbKEDKIy8aneedg193lIxLtRihFHDIL9IWAYXx/X7DAG4vOMzZTiQD8iY X-Received: by 2002:a4a:4c46:: with SMTP id a67mr8966202oob.1.1585312978022; Fri, 27 Mar 2020 05:42:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585312978; cv=none; d=google.com; s=arc-20160816; b=oUm/GnVNzoKwWh3POunDbDZx2TkLKNiueSwCnpbuumjOz7LT8dR6g+Ajf0JPhvWhrI bwGWRvJGJtfZkAUPn09R8yYYN4iFVH94jfjQo27p9zgRLXFYqqnhyBUwInVy6TPicMb8 h9fkaP1XCrlfLjtPM1tiGpbjsqK2c+cADzCZTLEslr/2hUhOn8VC7ydZC8naT2fWgIgl /aPXBWbKwK8CoPgVswSQYO2kuskMJtijnzzBYrSiBPi9SOXiH/fs9MYrv8OCQSo6JfkD g41aQ9bHCbDQtoDmAwdzABxOOpCpT7Kqvr5vUqrBWDEdP2uKk4pOEG2REPtCJX7+WsW7 jv6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=SOrOCCE4z6J1sHuFdxhVTWwdjpzsQ9adaFltG09BEVg=; b=0IfDshnLK5yLSuCGJItCv10yuzPSMKDeJCUiIqfJubo0fUTE39g3wgqKmNwOL+YQyX hmPMN9ajAh3DTgTHyEa1X3DBPKi5XwtEr7LJTZVAUz33r1oQcLAKWvjuemUE9IMh3TzI 9R8PwNKSXS22Xk9NqGmMNyyTiSCtnkoCRSlrrRzAmMoNJspc2jK+DAiE+k1U5dASsvRM T1y3l4ZuCKTRJObyvFzy63lWTe19vMmXnChh1MY1LZblIPl/+8J+2mUicy3QATH9FFIF MhbDBBoXKRgXAQBjrm/iiK+WW+evh8OmCzDc4rH0HZCJKMjnaBtgdcOKKgBbah+Quk+Z SsgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Zmey7Rsg; 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 t7si2572746otj.7.2020.03.27.05.42.45; Fri, 27 Mar 2020 05:42:58 -0700 (PDT) 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=Zmey7Rsg; 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 S1727349AbgC0MmQ (ORCPT + 99 others); Fri, 27 Mar 2020 08:42:16 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:37944 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727125AbgC0MmP (ORCPT ); Fri, 27 Mar 2020 08:42:15 -0400 Received: by mail-pg1-f195.google.com with SMTP id x7so4523087pgh.5 for ; Fri, 27 Mar 2020 05:42:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SOrOCCE4z6J1sHuFdxhVTWwdjpzsQ9adaFltG09BEVg=; b=Zmey7RsgY68gZWN8kn7J/bo1k0I5hL0K5gpKxpY/nsuhHSOvUn//t6VTyA4quSZuw4 w14513DwK6CaTS3h900o86OPh57a6eL6rua/lzuOOnaitGQbO3XpDG/1B29SNo3fL/j3 bCB5Tz4QWUYD+Jk6dD0MFC+5JdsJ1h9GKB9MkDn++uQ7HhxZr2TxfMl9DZYI3zlgQqOF Bzf1T7YDvBZYf9qOgWOc3eon+XSD7fwg//6qy6r/mnmvVo3g5tDDrkewZUZzqOzgDGBN KUMIwGPhtjQ3/wIpX+GNVYUvU0iYuotNuoAbX4xHMP59RfBeKoeQ+jAt0vqJCJfyXyp9 CUPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=SOrOCCE4z6J1sHuFdxhVTWwdjpzsQ9adaFltG09BEVg=; b=Uix1jdPZgeKI4X0ghCgJaHM4RHdvMHmHymEoAzKoRIwLpnQDyrCc81TPolPOBVcSI9 ND5GgF7InQhNACXOscEqPTImz/SGqQwPPb2w7JbPCrApiJzB0mTbTpT53ZlDp4od6cOu 5VGLm3EeJhGyNl8gulYfykOkwxGywotTsmMDftkIAjlDyItaPzI0aFdIyvgJ1yVMEwj3 OOLK5as9VmW3qaFIpkDPZpZ1+jViBBA7XhH1TBKi38PVvIL0q+97KOdS/uHew+CnRNgR JLnWpnHaf8ZpP9qd4zmjZ8E3P0XIYK/BCRxJR074HSee7FbXGrPXzIjXeWWTMzQS+Yfk YE3g== X-Gm-Message-State: ANhLgQ1i8qTjDTZod24M84wW+JvL/Scq4y0Le+gF5KC8d/Yo3y+KKZ+B W0Mw/5s6kV2wLfau/bdGsps= X-Received: by 2002:a63:1d52:: with SMTP id d18mr13398372pgm.443.1585312934746; Fri, 27 Mar 2020 05:42:14 -0700 (PDT) Received: from localhost.localdomain ([49.207.51.33]) by smtp.gmail.com with ESMTPSA id x186sm4014317pfb.151.2020.03.27.05.42.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Mar 2020 05:42:14 -0700 (PDT) From: afzal mohammed To: Arnd Bergmann , SoC Team Cc: afzal mohammed , Thomas Gleixner , Tony Lindgren , Alexander Sverdlin , =?UTF-8?q?Krzysztof=20Ha=C5=82asa?= , Viresh Kumar , Lubomir Rintel , Gregory CLEMENT , Hartley Sweeten , Viresh Kumar , Shiraz Hashim , Andrew Lunn , Jason Cooper , Sebastian Hesselbarth , Russell King , Linux ARM , "linux-kernel@vger.kernel.org" , arm-soc , Olof Johansson Subject: [PATCH v4 1/5] ARM: ep93xx: Replace setup_irq() by request_irq() Date: Fri, 27 Mar 2020 18:11:43 +0530 Message-Id: <20200327124143.3520-1-afzal.mohd.ma@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: afzal mohammed Acked-by: Alexander Sverdlin --- v4: * Add received tags v3: * Split out from series, also create subarch level patch as Thomas suggested to take it thr' respective maintainers * Modify string displayed in case of error as suggested by Thomas * Re-arrange code as required to improve readability * Remove irrelevant parts from commit message & improve v2: * Replace pr_err("request_irq() on %s failed" by pr_err("%s: request_irq() failed" * Commit message massage arch/arm/mach-ep93xx/timer-ep93xx.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-ep93xx/timer-ep93xx.c b/arch/arm/mach-ep93xx/timer-ep93xx.c index de998830f534..dd4b164d1831 100644 --- a/arch/arm/mach-ep93xx/timer-ep93xx.c +++ b/arch/arm/mach-ep93xx/timer-ep93xx.c @@ -117,15 +117,11 @@ 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) { + int irq = IRQ_EP93XX_TIMER3; + unsigned long flags = IRQF_TIMER | IRQF_IRQPOLL; + /* Enable and register clocksource and sched_clock on timer 4 */ writel(EP93XX_TIMER4_VALUE_HIGH_ENABLE, EP93XX_TIMER4_VALUE_HIGH); @@ -136,7 +132,9 @@ 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_timer_interrupt, flags, "ep93xx timer", + &ep93xx_clockevent)) + pr_err("Failed to request irq %d (ep93xx timer)\n", irq); clockevents_config_and_register(&ep93xx_clockevent, EP93XX_TIMER123_RATE, 1, -- 2.25.1