From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A3FDC2BA83 for ; Wed, 12 Feb 2020 08:10:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CF8082073C for ; Wed, 12 Feb 2020 08:10:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="a78fnOoI" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728464AbgBLIKs (ORCPT ); Wed, 12 Feb 2020 03:10:48 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:33217 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728250AbgBLIKr (ORCPT ); Wed, 12 Feb 2020 03:10:47 -0500 Received: by mail-pl1-f194.google.com with SMTP id ay11so673500plb.0 for ; Wed, 12 Feb 2020 00:10:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=9CFz1c+0fNvk1cgA4VQ08nCs0e3XAVZxLPN7eKmCEBM=; b=a78fnOoI0rTVtIC+JFO46RJEEvzyk/fZDQMjE9y10nP/lGnhNPun68nys1C7h7sbzk 9YBllWzWVhWfw2cmPFaTCCuEV2nfKqqHQCBcgPwbdR32gh5Rnixt+ZE8Kk/XxwlP/Tit bl/k27WscBk03Fii24U/Bn3YlT2V9B3tz0ikYzU680Oazv8B4sclT71RuUREhif3K3vf wl6SdhFyrDnFS9cRBTbGj4OpS5TePB2QBg4hAyuBUB5TNUR8LjMSxs2Zb6p3g5WUMHLd jd4FEJslzVsOyMGwzCouKDatnTR4RRkaFi7ML0j89ElqbYAkkDLBhf41JrX+fTQaso6j 996A== 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=9CFz1c+0fNvk1cgA4VQ08nCs0e3XAVZxLPN7eKmCEBM=; b=Io2UpFUWOtkiIqKlQwlavN6grKIw5ukM0Cfgzhx2PSd4u/HOy41kmnRbtFIFcutyDj 5tv0VhYQgNSe9s2eEYKaOCxpnIWdkP+ZorlU7chPAUAulsvEes+wBTDlV6q8on8fxM/P +eJgrW5kcwRgWp3WqrWmYNGj0rcMZG93pAFLqPNmvmnstPTrQRrqXWz+yLwoZTK+fQ15 IYQeV+Vg4vWk2QoEONeE5f2sssMJogdDjqrxjErLdzsgzUmr9RmIECuwliZ/VUIt3FI3 EMxE0yUpqqCFc3qfDtkngBCFLkjRIeqy+SbFu97BoTEL+dmxQyjMUBnTpP7yasr5/KOI 2dmQ== X-Gm-Message-State: APjAAAWBk16H32ODsMAubdNlFPPolhlUH85wu5o0dVzHzLPz6tFoF5ug a/8J77b5k53jxz7e9Enq9Vc+8Q== X-Google-Smtp-Source: APXvYqyjZYunT9oVxh3t0N0o3M6twZ6cdJ5DdSo7JxfAcL/PWmMM8SOizyCNVMM6Jdwf3Wer2aaM7A== X-Received: by 2002:a17:90b:14a:: with SMTP id em10mr8645460pjb.4.1581495047048; Wed, 12 Feb 2020 00:10:47 -0800 (PST) Received: from localhost ([122.167.210.63]) by smtp.gmail.com with ESMTPSA id k8sm6926990pgg.18.2020.02.12.00.10.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Feb 2020 00:10:46 -0800 (PST) Date: Wed, 12 Feb 2020 13:40:44 +0530 From: Viresh Kumar 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 , Alexander Sverdlin , 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: <20200212081044.lsw6to5kmzl22ywc@vireshk-i7> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716-391-311a52 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12-02-20, 13:32, 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 > --- > arch/arm/mach-spear/time.c | 9 ++------- > > diff --git a/arch/arm/mach-spear/time.c b/arch/arm/mach-spear/time.c > index 289e036c9c30..92b2850eeb4f 100644 > --- a/arch/arm/mach-spear/time.c > +++ b/arch/arm/mach-spear/time.c > @@ -181,12 +181,6 @@ static irqreturn_t spear_timer_interrupt(int irq, void *dev_id) > return IRQ_HANDLED; > } > > -static struct irqaction spear_timer_irq = { > - .name = "timer", > - .flags = IRQF_TIMER, > - .handler = spear_timer_interrupt > -}; > - > static void __init spear_clockevent_init(int irq) > { > u32 tick_rate; > @@ -201,7 +195,8 @@ static void __init spear_clockevent_init(int irq) > > clockevents_config_and_register(&clkevt, tick_rate, 3, 0xfff0); > > - setup_irq(irq, &spear_timer_irq); > + if (request_irq(irq, spear_timer_interrupt, IRQF_TIMER, "timer", NULL)) > + pr_err("request_irq() on %s failed\n", "timer"); > } Acked-by: Viresh Kumar -- viresh From mboxrd@z Thu Jan 1 00:00:00 1970 From: Viresh Kumar Subject: Re: [PATCH 02/18] ARM: replace setup_irq() by request_irq() Date: Wed, 12 Feb 2020 13:40:44 +0530 Message-ID: <20200212081044.lsw6to5kmzl22ywc@vireshk-i7> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-pl1-f193.google.com ([209.85.214.193]:45246 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728287AbgBLIKr (ORCPT ); Wed, 12 Feb 2020 03:10:47 -0500 Received: by mail-pl1-f193.google.com with SMTP id b22so651534pls.12 for ; Wed, 12 Feb 2020 00:10:47 -0800 (PST) Content-Disposition: inline In-Reply-To: Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org 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 , Alexander Sverdlin , 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 On 12-02-20, 13:32, 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 > --- > arch/arm/mach-spear/time.c | 9 ++------- > > diff --git a/arch/arm/mach-spear/time.c b/arch/arm/mach-spear/time.c > index 289e036c9c30..92b2850eeb4f 100644 > --- a/arch/arm/mach-spear/time.c > +++ b/arch/arm/mach-spear/time.c > @@ -181,12 +181,6 @@ static irqreturn_t spear_timer_interrupt(int irq, void *dev_id) > return IRQ_HANDLED; > } > > -static struct irqaction spear_timer_irq = { > - .name = "timer", > - .flags = IRQF_TIMER, > - .handler = spear_timer_interrupt > -}; > - > static void __init spear_clockevent_init(int irq) > { > u32 tick_rate; > @@ -201,7 +195,8 @@ static void __init spear_clockevent_init(int irq) > > clockevents_config_and_register(&clkevt, tick_rate, 3, 0xfff0); > > - setup_irq(irq, &spear_timer_irq); > + if (request_irq(irq, spear_timer_interrupt, IRQF_TIMER, "timer", NULL)) > + pr_err("request_irq() on %s failed\n", "timer"); > } Acked-by: Viresh Kumar -- viresh From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2FB5C2BA83 for ; Wed, 12 Feb 2020 08:10:52 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 73D8320714 for ; Wed, 12 Feb 2020 08:10:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PPRQZHCK"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="a78fnOoI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 73D8320714 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0pXE9QYo8/FKwbPetIiuHmEHuuSbPez8e8TzFRfcH+I=; b=PPRQZHCKo+mctF 3QJcgcRfyvn9dbxVTzrW/ztw54GDQzPRIwFC4sMtMl7Psh35RS08/vw5G5Ws7ZnAkLH6BaGoNbUkh pQ4i65tI1raaf2pGjVsscRr94G/DMrm6EQbWdErjWMYLZy41hn4EL+ITHpMVAWmobztplwJhk04tF vE4XpOJC5xzZlkRTM2hYS1a2LUm6m+GYuQkqrLyrtX7YF6HFzOgN8LqJ110glB1Sxp7/EkFmNDNDk KpfXbzaKI4AkBYJ/bVlbKaPGTnxA6WglvQaaZ59v9iizafJYa/YstOXiJGdZuYBjTy6qCknLGHXD/ Hc21cI9siHfm8jYoXdXg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j1n6h-0004ku-T6; Wed, 12 Feb 2020 08:10:51 +0000 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j1n6e-0004jz-5q for linux-arm-kernel@lists.infradead.org; Wed, 12 Feb 2020 08:10:49 +0000 Received: by mail-pl1-x642.google.com with SMTP id e8so655218plt.9 for ; Wed, 12 Feb 2020 00:10:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=9CFz1c+0fNvk1cgA4VQ08nCs0e3XAVZxLPN7eKmCEBM=; b=a78fnOoI0rTVtIC+JFO46RJEEvzyk/fZDQMjE9y10nP/lGnhNPun68nys1C7h7sbzk 9YBllWzWVhWfw2cmPFaTCCuEV2nfKqqHQCBcgPwbdR32gh5Rnixt+ZE8Kk/XxwlP/Tit bl/k27WscBk03Fii24U/Bn3YlT2V9B3tz0ikYzU680Oazv8B4sclT71RuUREhif3K3vf wl6SdhFyrDnFS9cRBTbGj4OpS5TePB2QBg4hAyuBUB5TNUR8LjMSxs2Zb6p3g5WUMHLd jd4FEJslzVsOyMGwzCouKDatnTR4RRkaFi7ML0j89ElqbYAkkDLBhf41JrX+fTQaso6j 996A== 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=9CFz1c+0fNvk1cgA4VQ08nCs0e3XAVZxLPN7eKmCEBM=; b=jw+qQXq8R0lgi3DefWAGRNLtj+5XiqsV9atoY/NEXEMARVt3TqRzYjh6Z45mR4k9iz n4J8JBVYEw8u8IUDpHv4kuKlJEonMhbmPouN8Eqxxvf6BLajkvbrd66/YDs94xLmkIyL yzbg4QsvI9nyMhXK5iOHd4+kK1q/5Y9gbM/39tFxBJGfl5opOJQnCtOJvO18Q62DA5h4 UdpBEG7uV5oBaqkaE+FuecFb6aWXC9+nUsf8ZhOUJs3RTC/fvWnD+8rgWBb3aXSetsDm FUt4vSH9bnvzV2UqLhwOt+2atkNNP+TrDBRwufXPN0Oc9ta/nECVAuFcAXf54yWI9ySt e0PQ== X-Gm-Message-State: APjAAAVNC/Cz0hzlN7ZfmQR0KPLtI86xAYXKVn2/TAuPsu+1zZX/S1cD zOsX7PumnbGG+kFXJXdnGt6t1w== X-Google-Smtp-Source: APXvYqyjZYunT9oVxh3t0N0o3M6twZ6cdJ5DdSo7JxfAcL/PWmMM8SOizyCNVMM6Jdwf3Wer2aaM7A== X-Received: by 2002:a17:90b:14a:: with SMTP id em10mr8645460pjb.4.1581495047048; Wed, 12 Feb 2020 00:10:47 -0800 (PST) Received: from localhost ([122.167.210.63]) by smtp.gmail.com with ESMTPSA id k8sm6926990pgg.18.2020.02.12.00.10.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Feb 2020 00:10:46 -0800 (PST) Date: Wed, 12 Feb 2020 13:40:44 +0530 From: Viresh Kumar To: afzal mohammed Subject: Re: [PATCH 02/18] ARM: replace setup_irq() by request_irq() Message-ID: <20200212081044.lsw6to5kmzl22ywc@vireshk-i7> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716-391-311a52 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200212_001048_230137_BD8E34AF X-CRM114-Status: GOOD ( 15.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , Tony Lindgren , Kevin Hilman , Viresh Kumar , Gregory Clement , Russell King , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth , Jason Cooper , Arnd Bergmann , Lubomir Rintel , Krzysztof Halasa , Thomas Gleixner , linux-omap@vger.kernel.org, Alexander Sverdlin , Shiraz Hashim , Allison Randal , Greg Kroah-Hartman , Aaro Koskinen , linux-kernel@vger.kernel.org, Hartley Sweeten , Enrico Weigelt Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 12-02-20, 13:32, 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 > --- > arch/arm/mach-spear/time.c | 9 ++------- > > diff --git a/arch/arm/mach-spear/time.c b/arch/arm/mach-spear/time.c > index 289e036c9c30..92b2850eeb4f 100644 > --- a/arch/arm/mach-spear/time.c > +++ b/arch/arm/mach-spear/time.c > @@ -181,12 +181,6 @@ static irqreturn_t spear_timer_interrupt(int irq, void *dev_id) > return IRQ_HANDLED; > } > > -static struct irqaction spear_timer_irq = { > - .name = "timer", > - .flags = IRQF_TIMER, > - .handler = spear_timer_interrupt > -}; > - > static void __init spear_clockevent_init(int irq) > { > u32 tick_rate; > @@ -201,7 +195,8 @@ static void __init spear_clockevent_init(int irq) > > clockevents_config_and_register(&clkevt, tick_rate, 3, 0xfff0); > > - setup_irq(irq, &spear_timer_irq); > + if (request_irq(irq, spear_timer_interrupt, IRQF_TIMER, "timer", NULL)) > + pr_err("request_irq() on %s failed\n", "timer"); > } Acked-by: Viresh Kumar -- viresh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel