Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2443983ybb; Fri, 27 Mar 2020 05:46:46 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuD8bmGXPhjorIpxOh1HMu2K66fGh4FV0JzE0NArnqxnTW4DcAobI0uoloGZNdDG9vO6Wxt X-Received: by 2002:a05:6830:110c:: with SMTP id w12mr9342789otq.175.1585313205904; Fri, 27 Mar 2020 05:46:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585313205; cv=none; d=google.com; s=arc-20160816; b=0gr9MH+68f7NEwwBVKylUQN4Nb2/hSdKx5xAqEUfWi8WZq/oGmITU0fJU5NE7Kz/tm frj7KjpNFXDwMkwSwuaepH5n4sjHZYMbHr0Rg8esukWnugDeLQNK7/aW+RpNQHAKppaX adbyxoZ6ni8kovzIP6ii7gT8nRuIQBi68BCmntNSG4Y4Fb27RJrw/+ydXtaKjb9gOD9r zG5Do2oUNfBww1J4uBCpBEYhFpjtsm5v6DVXgwVPpZad6yjzhsXgZtPkJ2ndF5Adrfl2 5SdJo1K4E/VxvAoHWiGN7oJqtMtt6jdfUKRcVQGXqfmaCku2hLbCgyquliKDks3LNQVs ya5w== 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=xFdvPRnQ5Nq8J+GnOFEHtRkDs3iYX4yKgZJqfls3/Pk=; b=rAMdKwE+QaZx2KWzfHoPWnQX4RhYC2v64vbxuj/lDan7d+Hbc2GCi9yh+hQ5EXkv34 PG3Lpo6NciIaggP6D62TKur2CSSNoh7laE9qcBu+gVaHWSpbN3iqhpBjjJNRgwJ+W47h 5RCUULNNOBHHHH7eP75T54oZqYs3f8+WR/kUa89efvkUst+Apcfj3qGF35Jyu+BbAEVS SNclASW2BVT4LBavMcBo6xgIr2lyNxuEujAltUY36g4QalsjLuavIc9ld+yMeydxoz4c QgJEITqfl9Mtjl129bPp78oPOZRmegPGpTvlfnZJ9+nWpnQgvpHcvkiyIyLZ/o3Jri1/ tQaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YeUXuFl8; 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 u10si2336007oib.91.2020.03.27.05.46.33; Fri, 27 Mar 2020 05:46:45 -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=YeUXuFl8; 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 S1727575AbgC0Mor (ORCPT + 99 others); Fri, 27 Mar 2020 08:44:47 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:46546 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727242AbgC0Mor (ORCPT ); Fri, 27 Mar 2020 08:44:47 -0400 Received: by mail-pf1-f196.google.com with SMTP id q3so4428846pff.13 for ; Fri, 27 Mar 2020 05:44:45 -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=xFdvPRnQ5Nq8J+GnOFEHtRkDs3iYX4yKgZJqfls3/Pk=; b=YeUXuFl8dwFM3mWt1H2uHEqUccLT5Xz+QFYTGztMmEJoY6CJssaZCuvAawjQwmUXCq WE7TnXJ0S7ox17JZ+21+DTHw+iZW/GlO1d0lUqXN7992tY+agbibzc+IMP/oGW7vpWM5 gE13iQAxCOeB4Yl8kdzjItjkLawp/ZVSOtQ4rKgzu700xbuaJQMe5Ccsu8TwjVsLusAH wK8EPmnr3IelGS4b8u3BeSJXBSboMATZKfmjFAV+FFSy/aE3tJvInzpdaqzOsuRN9bzc vICZ6w+pbojyLVGrrIUCRIp/TNOH4/Mgwtm5lC6p4NGYsrXsAPUp7ocz2WJkTycuDQYY /ULg== 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=xFdvPRnQ5Nq8J+GnOFEHtRkDs3iYX4yKgZJqfls3/Pk=; b=Jsd0L5bwp/K8vs210gcwf/QVDeXl31yAC0yUk3qCOoOBc2VrID7c4ZTDIM047U9T4K aWlNcRuk6Zub0TXXGimqs0N/YPhMEvzJgaqqKB6xcyUjEP0Z2WoOYGLp87rFOw2+8/+k bEdnHnhgya/g+UhNPqW3OMhHVhsxgqwvZQXKrwZniG2QC2FJR1cm74U4qTcHaqaYJp1z ZdKt0Om5CwNPv0PCQ8JkrghItpog0VBmRUMzyAGkceMZ1FVSb/P79YoBGNaciELQU5OV kGEozq6fwYtMd5KbJkxcPiedua8iG3f/3yBEVJ3F2tooc/Cyn2FYgUm70NLXib8lIxoe 29Eg== X-Gm-Message-State: ANhLgQ3AbxRHIMGNsj93++FJ8kCgp9CBByAca4SjZ7d7kR+HCg58CF58 SFJ5NrlLaYTjBc8M0EH04ao= X-Received: by 2002:a63:2442:: with SMTP id k63mr5968884pgk.250.1585313085217; Fri, 27 Mar 2020 05:44:45 -0700 (PDT) Received: from localhost.localdomain ([49.207.51.33]) by smtp.gmail.com with ESMTPSA id 1sm3752699pjo.10.2020.03.27.05.44.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Mar 2020 05:44:44 -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 4/5] ARM: mmp: replace setup_irq() by request_irq() Date: Fri, 27 Mar 2020 18:14:37 +0530 Message-Id: <20200327124437.4239-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: Lubomir Rintel Tested-by: Lubomir Rintel --- v4: * Add received tags v3: * Split out from series, also split out from ARM patch to subarch level 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-mmp/time.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c index c65cfc1ad99b..049a65f47b42 100644 --- a/arch/arm/mach-mmp/time.c +++ b/arch/arm/mach-mmp/time.c @@ -175,13 +175,6 @@ static void __init timer_config(void) __raw_writel(0x2, mmp_timer_base + TMR_CER); } -static struct irqaction timer_irq = { - .name = "timer", - .flags = IRQF_TIMER | IRQF_IRQPOLL, - .handler = timer_interrupt, - .dev_id = &ckevt, -}; - void __init mmp_timer_init(int irq, unsigned long rate) { timer_config(); @@ -190,7 +183,9 @@ void __init mmp_timer_init(int irq, unsigned long rate) ckevt.cpumask = cpumask_of(0); - setup_irq(irq, &timer_irq); + if (request_irq(irq, timer_interrupt, IRQF_TIMER | IRQF_IRQPOLL, + "timer", &ckevt)) + pr_err("Failed to request irq %d (timer)\n", irq); clocksource_register_hz(&cksrc, rate); clockevents_config_and_register(&ckevt, rate, MIN_DELTA, MAX_DELTA); -- 2.25.1