Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1849050ybv; Sun, 23 Feb 2020 16:52:04 -0800 (PST) X-Google-Smtp-Source: APXvYqz1kAdbteXgHHwgBMyaMc9FoTle+92FWFxlTLfteugjp5BiI7VXU7J5IOj+uUQviTgI92WT X-Received: by 2002:a05:6830:1c8:: with SMTP id r8mr25771726ota.63.1582505524155; Sun, 23 Feb 2020 16:52:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582505524; cv=none; d=google.com; s=arc-20160816; b=QCZuwc+s3YQOuE6+guzdpXevMyHIvFt4iQK4JPQa0CjRoJHWV+8/X5m5ab26tWhuA+ zsmfZKTQ6O1VFyOA8Klee7RVhKBZzAYPXM5aGtan3sO1R3hiG7OiFzgZZ68p0k6hlp/X AW1Cmznu3gbJ6Pl8pWcyeSGZRZyklvkxQaF9x6QAofePzlyYk74ntOUZ5XIIwy3iz6YU vdZSAzFfnWGj5I9ezk/ic1Y9k+NuMLZGgl7cYRkWLoLQQM/wu1GaCbUoxdZTcVqwG7kX qUq8iha9hWHTiN9i5fNUNI5KzJLVBU7mMeEiT1rAyAk0kI3+NMSSx//cREomyzilo4Xf 4lsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=VsG4BeuVio7/IOcNePuekG7++39/uybEVsFZxG/8vQI=; b=D/8nUIszH07Qr/bKg68aOeDUvhP6ANwXG5LUgI43H/8AmpmRCTM2Tk0B2cjHOEwzih EOFkvHK8nXAl1Oj5CFBheWDmvfG5CD7ZkPu1ecBzEbYY/SLVt8uHdqWZnTlAlNrgd8rK 6vo3S1dy1kPAWc6pf9FW6vIHUfS39tJRCJzS1Ds09kNXNL0va1OVtLnQOdEdgzYXWHxB LGnmhm68mRiYFbRYdwYwwLGUPIxbrXmub+XX5VD/UP4xmyx/dFzXqtu2btq71nIhE9dy JHB9G7LHEJT+bBFXW81qkszxzVbohTP7SfCOWScv2ipEu+bnLBnpi34lKsLpU78Q5uak lMDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=N23VItJ6; 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 i15si5412374otk.120.2020.02.23.16.51.52; Sun, 23 Feb 2020 16:52:04 -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=N23VItJ6; 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 S1727283AbgBXAvo (ORCPT + 99 others); Sun, 23 Feb 2020 19:51:44 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:37638 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727165AbgBXAvo (ORCPT ); Sun, 23 Feb 2020 19:51:44 -0500 Received: by mail-pf1-f196.google.com with SMTP id p14so4456817pfn.4; Sun, 23 Feb 2020 16:51:44 -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:references:mime-version :content-disposition:in-reply-to:user-agent; bh=VsG4BeuVio7/IOcNePuekG7++39/uybEVsFZxG/8vQI=; b=N23VItJ61aSj1MCeDYlg10QYF0y3CMgpIojPPayY5qEj83Tuw3SW7a6YSJSt797PnT j5noqvGTh2W9YQJqBBKPgZ12bVjrOAof4ox3n6c8xcNA9UXw2V4+PFmerRdl6Abx80wD zS5T7PlMn18L0E1Zc25oDv/SK2AZHmOWx2heFIUNTIJbOXxIV6BtcyireVicc7FQ/NeK GO7jEWFvYrY+DZQ5LqR8nFTnzu/Oz9QoM6SoT8ZULTnCobaLAYfNxlvHy05RJK/TAuhi XnWps2MerkhrTd1xKOpJf1e2qA4JszViIgn5cX/1lToyzHsG2fzdVLTSnFHxZxBnE0Wh C6dw== 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=VsG4BeuVio7/IOcNePuekG7++39/uybEVsFZxG/8vQI=; b=ud6Y4Y11dD3Pf8jEGM74PJFGeQwHuNL5VlhHAYuOagFQkMqpViIF1SWpyVT6nsDyPh wId4uEz9ov7bZgfZ+Rg4Tz/LnykWYhTg65sY9mF/Yn5Yof+i7kOvRb+Q4c35edvnSrjy ES7eDSoemE4TXcTCamrsFKrIi34qiOZk3xSCdgSDViw7lqLvAH87uPGbTzkKsUtSogC4 AWDOtJMR51xWBxVhWpoegQa0ZVeBPshqcJ5K8AIQdJkcc8hk/Uon+QUa8LcwfSu9B7Gu nisdDwobwbg/esphYG4d2ExwLWqSJeue+LEsexhgZme/+nZfwpSZAAOE0DDTfwEpI+EJ z9ew== X-Gm-Message-State: APjAAAWBIjBzZgQ+je1qoAI6q/cm2YmrJcaGRLa4sfHIHoi8OTPalBiF KnerAazIST7Ax5qPVj4FAF3CQEP2ZeQ= X-Received: by 2002:aa7:9a42:: with SMTP id x2mr49346060pfj.71.1582505503702; Sun, 23 Feb 2020 16:51:43 -0800 (PST) Received: from localhost ([106.51.232.35]) by smtp.gmail.com with ESMTPSA id i27sm9957493pgn.76.2020.02.23.16.51.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 23 Feb 2020 16:51:43 -0800 (PST) Date: Mon, 24 Feb 2020 06:21:41 +0530 From: afzal mohammed To: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Sebastian Ott , Peter Oberparleiter , Martin Schwidefsky , Thomas Gleixner Subject: [PATCH v2 11/18] s390: replace setup_irq() by request_irq() Message-ID: <463586b1fb5ca6dd60b4b5264312f86924281552.1582471508.git.afzal.mohd.ma@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) 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(). The early boot setup_irq() invocations happen either via 'init_IRQ()' or '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 --- v2: * Replace pr_err("request_irq() on %s failed" by pr_err("%s: request_irq() failed" * Commit message massage arch/s390/kernel/irq.c | 8 ++------ drivers/s390/cio/airq.c | 8 ++------ drivers/s390/cio/cio.c | 8 ++------ 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c index 8371855042dc..2cbe7296f069 100644 --- a/arch/s390/kernel/irq.c +++ b/arch/s390/kernel/irq.c @@ -294,11 +294,6 @@ static irqreturn_t do_ext_interrupt(int irq, void *dummy) return IRQ_HANDLED; } -static struct irqaction external_interrupt = { - .name = "EXT", - .handler = do_ext_interrupt, -}; - void __init init_ext_interrupts(void) { int idx; @@ -308,7 +303,8 @@ void __init init_ext_interrupts(void) irq_set_chip_and_handler(EXT_INTERRUPT, &dummy_irq_chip, handle_percpu_irq); - setup_irq(EXT_INTERRUPT, &external_interrupt); + if (request_irq(EXT_INTERRUPT, do_ext_interrupt, 0, "EXT", NULL)) + pr_err("%s: request_irq() failed\n", "EXT"); } static DEFINE_SPINLOCK(irq_subclass_lock); diff --git a/drivers/s390/cio/airq.c b/drivers/s390/cio/airq.c index 427b2e24a8ce..8d062d8ff669 100644 --- a/drivers/s390/cio/airq.c +++ b/drivers/s390/cio/airq.c @@ -105,16 +105,12 @@ static irqreturn_t do_airq_interrupt(int irq, void *dummy) return IRQ_HANDLED; } -static struct irqaction airq_interrupt = { - .name = "AIO", - .handler = do_airq_interrupt, -}; - void __init init_airq_interrupts(void) { irq_set_chip_and_handler(THIN_INTERRUPT, &dummy_irq_chip, handle_percpu_irq); - setup_irq(THIN_INTERRUPT, &airq_interrupt); + if (request_irq(THIN_INTERRUPT, do_airq_interrupt, 0, "AIO", NULL)) + pr_err("%s: request_irq() failed\n", "AIO"); } static inline unsigned long iv_size(unsigned long bits) diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index 18f5458f90e8..703265786756 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c @@ -563,16 +563,12 @@ static irqreturn_t do_cio_interrupt(int irq, void *dummy) return IRQ_HANDLED; } -static struct irqaction io_interrupt = { - .name = "I/O", - .handler = do_cio_interrupt, -}; - void __init init_cio_interrupts(void) { irq_set_chip_and_handler(IO_INTERRUPT, &dummy_irq_chip, handle_percpu_irq); - setup_irq(IO_INTERRUPT, &io_interrupt); + if (request_irq(IO_INTERRUPT, do_cio_interrupt, 0, "I/O", NULL)) + pr_err("%s: request_irq() failed\n", "I/O"); } #ifdef CONFIG_CCW_CONSOLE -- 2.25.1