Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1233330ybf; Sun, 1 Mar 2020 04:23:37 -0800 (PST) X-Google-Smtp-Source: APXvYqyqkM6TRC+cFFf7o6nGvyWGwCu2fRrD0PizWSfzyo6Xv8Gn2szlat0M+S75AEn+JLM44q/5 X-Received: by 2002:aca:f517:: with SMTP id t23mr8227847oih.160.1583065417501; Sun, 01 Mar 2020 04:23:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583065417; cv=none; d=google.com; s=arc-20160816; b=0BP1nIuuyU4U4loaFfCvlM5//+/hl0WzzNlmTjGj53E4iHy4uID9gu4bOjlcNd7CY1 n9bVrRsmzVaG+v/42OHuMQ65NUamITW2WjE+SQaox4D6RohI2w8b1vNNlqfUNo3hjj0a /09yvfvuBfGs4Up0CtabfV24A53DXhGiZPzySbTK71L8VkBDe2BtJdPKgLzAkgZdAhDr 3c9+Atdj5BoBdzDWD8LTRWAjKsDR2TMQSVoZ+c8ohK/TCOZbkwl7L8LmIJUHfu8KszCc qOLVVhLcyLoGqKuJtLzuLjtvxi9whDrMiqrm/SFghNX7R7A2WZBvpTn2U9rE87xyFqdC 9AlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=6RuW8LcV5g6WypRcQIvGZ/SRPet4fNoET5RxUt4w0FQ=; b=z3Ki4tj4NgSCsZAGCh/WLkb/51PWPtWS5/PLIBgJUfFPa0CEt1PiSytpmz3TuVeg6C Cq4ElmHHOknKI1lwxMJr4cxiCKaIbZKOTTrrEnpW9cGtxnpWwI6zYsGawh/5gZ6jjRLr ecum4z2W46KKt66wavuS24AiyJRi7vi5gQisXZmV21P9XnJkEkgwQlmNp3K8ns1Ypzo+ loHHQrAbV7T/dBnn8UfjQIBjr35K+Mt0RDjH7WUEdSiaVJEUpuWKgqxJuPJiok2vQcEl ++lCypzwz6tSM6b50hNXncxAKD5EFmpgJEgEgeN/8N922/064L5Rf6F7LdaFGjLJ7Aw7 iiSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="hNpiy/uV"; 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 h25si1183643oie.192.2020.03.01.04.23.26; Sun, 01 Mar 2020 04:23:37 -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="hNpiy/uV"; 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 S1726946AbgCAMWQ (ORCPT + 99 others); Sun, 1 Mar 2020 07:22:16 -0500 Received: from mail-pj1-f67.google.com ([209.85.216.67]:37233 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726783AbgCAMWP (ORCPT ); Sun, 1 Mar 2020 07:22:15 -0500 Received: by mail-pj1-f67.google.com with SMTP id o2so1300492pjp.2 for ; Sun, 01 Mar 2020 04:22:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=6RuW8LcV5g6WypRcQIvGZ/SRPet4fNoET5RxUt4w0FQ=; b=hNpiy/uVydyqMqWo83KwxexQEzJHid6YWnsfsiep0CUh6gNn2RqgFVOHvY6gTJMyiD Eaf+TcdWuvFMS9DJRFcH8XWQIPeCCtXML4Tfwek2bBmaDjtfksppHrMIi956IGrBqndC PfLL+9/TpG6+hrDk75dDl8tT3Q5nRU5IxaR8VBwW8cRm8PCEtRhEV8gZacp3OzWY76Sj 28ihxoPU2aHwvBHH47CDcophZnBA8/6n2cc65GE3Ml8tigk18JQXpqOUuvrx9hnS19xE +8GMnkBaopOecBmMKgif+qRehxN4EtqVMmQyydbabPUWMgomywtsCBaIumrlucE4PeKy syAA== 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; bh=6RuW8LcV5g6WypRcQIvGZ/SRPet4fNoET5RxUt4w0FQ=; b=PA67OD+bcVKKKFY1iJ2OyrXKWP59HkZqWcDEqoXESTLirJIJOFFlSL3PFaJGn4JFx1 TBsks914rvZL0hx7hKmvp7j1aHqLUGCQp6WwHqZZ0B4uXJ3AMhPFBTqAF/AMEj71Rsel dZgt4rdik81vriuDqkot3dHsBT2fOImMI+P7i2TsU5osVvayBVv1rbssV8EOuTgHmC3U AR/5v2D186Dp1VI9vWTvbn16l5HFee15JDrJmDXN6dGarPGH1ojjTgg+EkUcvRdslHLE kDQMDPtceIIrGRSX+M3/2txHW/wMHvAzV6tNyNnH7PcNpttSdf9GQIlKfn8bX94vBZEe X6WQ== X-Gm-Message-State: APjAAAVgUXB2GvCt52GIvp4/nW/WwTmhWqcsA35mGZWSIkC01kcBVCj3 l1ewLxuijLuItpJ43yfDWW/vSi0x X-Received: by 2002:a17:902:4a:: with SMTP id 68mr13359156pla.245.1583065334897; Sun, 01 Mar 2020 04:22:14 -0800 (PST) Received: from localhost.localdomain ([106.51.232.35]) by smtp.gmail.com with ESMTPSA id e1sm17520364pff.188.2020.03.01.04.22.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Mar 2020 04:22:14 -0800 (PST) From: afzal mohammed To: Viresh Kumar , Russell King , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: afzal mohammed Subject: [PATCH v3] ARM: ebsa110: replace setup_irq() by request_irq() Date: Sun, 1 Mar 2020 17:52:09 +0530 Message-Id: <20200301122210.4013-1-afzal.mohd.ma@gmail.com> X-Mailer: git-send-email 2.18.0 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 --- Hi sub-arch maintainers, If the patch is okay, please take it thr' your tree. Regards afzal 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-ebsa110/core.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c index da2ff4f61d6b..575b2e2b6759 100644 --- a/arch/arm/mach-ebsa110/core.c +++ b/arch/arm/mach-ebsa110/core.c @@ -201,17 +201,13 @@ ebsa110_timer_interrupt(int irq, void *dev_id) return IRQ_HANDLED; } -static struct irqaction ebsa110_timer_irq = { - .name = "EBSA110 Timer Tick", - .flags = IRQF_TIMER | IRQF_IRQPOLL, - .handler = ebsa110_timer_interrupt, -}; - /* * Set up timer interrupt. */ void __init ebsa110_timer_init(void) { + int irq = IRQ_EBSA110_TIMER0; + arch_gettimeoffset = ebsa110_gettimeoffset; /* @@ -221,7 +217,9 @@ void __init ebsa110_timer_init(void) __raw_writeb(COUNT & 0xff, PIT_T1); __raw_writeb(COUNT >> 8, PIT_T1); - setup_irq(IRQ_EBSA110_TIMER0, &ebsa110_timer_irq); + if (request_irq(irq, ebsa110_timer_interrupt, IRQF_TIMER | IRQF_IRQPOLL, + "EBSA110 Timer Tick", NULL)) + pr_err("Failed to request irq %d (EBSA110 Timer Tick)\n", irq); } static struct plat_serial8250_port serial_platform_data[] = { -- 2.25.1