Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp3963932ybf; Tue, 3 Mar 2020 16:51:21 -0800 (PST) X-Google-Smtp-Source: ADFU+vsoZf2mGIJBDeEXkt/ROMdjR8pgo5nfs84xDLAHO+cxPUTfc86bIYWVcLU7mI4wTV63MvZ/ X-Received: by 2002:a05:6808:2ce:: with SMTP id a14mr119416oid.37.1583283080987; Tue, 03 Mar 2020 16:51:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583283080; cv=none; d=google.com; s=arc-20160816; b=LVliof55IYhzfTmVAw/OHVMlcRAahkLDTS5flIX7/hCz3Q28KA36/eX9p40BN20cHF WCpeP6qtof2D2csikQeZcc2Ai4Wgldf1Y0+ohOvVgWEgLMUz48+LvDDdxQETm6bdneTe R/skzQm6t8TlO7cq+BIezphn5jB9U+jY3iyIdFjzCf5jB3QycAWh51epHVS2ZmiJgEXl xwE8dPHdpMYau1BQvbgAYAvLljOTo8EWDlwB/3AZ5qTT1lzbSmm9/bUYr6lFtWwC2qPG z+BzOX96T0r5P3jdY5RSXR621iifyGFlhQohABFaxu6bSqszQHyMD+awvZa3ZC5cxzU8 aRMA== 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=YjDxnROOsFBZHH9G4FkwXuXreuByRCX6q2DAdQ6+okY=; b=uiCMCctrpVLYy+cdqSgETzvMKndKs7FUHlWrC+JP17yqG6FB8S4GrU5XbshH2R/KV5 yi84lrxyvu6KoAG26FuirUyRka2jtqHjQzFuxF+wrvwlAjCJVPZbSLeXRgUoUffjnwas SjkgzHsdRZR6+pGlXn3RFbcWyWLkWSStQpBmS3UCyGFVSyqal01/z7VNXIC/dxthfmzU sdkfd6ypQPvqOK5vlKNu/7SJYqyMFq9vpmgwgNmfvBolHR2a4R8Ysi3LgEI0FxL2YpLR flESRlYPNHbbidzYfWzKFRFfJ/oxYOjHGl1EDnwzimSXobrpKpirpnazVExRkcC+AVz1 dVkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tfTyG1nv; 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 b25si158248otf.151.2020.03.03.16.51.09; Tue, 03 Mar 2020 16:51:20 -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=tfTyG1nv; 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 S2387418AbgCDAvB (ORCPT + 99 others); Tue, 3 Mar 2020 19:51:01 -0500 Received: from mail-pj1-f67.google.com ([209.85.216.67]:34910 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727895AbgCDAvB (ORCPT ); Tue, 3 Mar 2020 19:51:01 -0500 Received: by mail-pj1-f67.google.com with SMTP id s8so118879pjq.0; Tue, 03 Mar 2020 16:50:59 -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=YjDxnROOsFBZHH9G4FkwXuXreuByRCX6q2DAdQ6+okY=; b=tfTyG1nvuYZjCHvhLdckSkWT0ydHTOp26o/TpzJtgDi372G8CIy9PQvX/6lJKr3bYm kZ51baTCu5A6t2GzydkX5hH54CVKkANwxX9qGZiFqJdVq+bYQE7OlzcinCcGy8GMNHCH Fm7E53rUzGAsN5PK5kWqjfxuf2+iHvwYIbQlis9AUOFBJQK2jZUw/lrn7YDwKtty4nYH imOmmTxzoWWsmgjXQxtUoIZZsIUUDZ/p64rj/72GgBJNhxqkNx+DoGF7v4dkPALyIbhI /D86tPtXbSF7/w3pTxCpQPDr95EovA4G0+vmkUfCRU7ItyQAE7HgTDxEs786gqaDs5Z2 CVPQ== 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=YjDxnROOsFBZHH9G4FkwXuXreuByRCX6q2DAdQ6+okY=; b=E0frPc13CRgOFcd1mOrx+PS81hD74wBzMAHNgAdKeLChFfb+TtKmgBePgfN0eFKdKJ 6kwVym36KrhsWuAExhSVtXuncMdwnooLS640zdN3aF7UoRPTkKEkMd3jdOZDZUFpBVYE Uf0iJ7AKunE9ECeBPrw+akWzW2cLk6h0rbgpgjHaih2Yb+e5j1EtC8jR2xcQa3AS1blA EXIagA9HV9F/XRXRJcHedS38207w0/8Oa5YlYPiQGLEIlMh5v4Qq9EVloztkSd9SEP5H 7agWFK9Q5xNE7of0ZHc2pZOfiiOSNx5dERSO9xqH56TrPK0wCD7Ll13/BQq9r2TLC6YM GidA== X-Gm-Message-State: ANhLgQ3PPGZ6V7JfW+F/maJkwQ44pb1yqB/ZYwlsFNM1uM5daONjSTJ9 tzWU87JxrxQRKkMeHqakL8ZwkzKg X-Received: by 2002:a17:902:9886:: with SMTP id s6mr611605plp.100.1583283058310; Tue, 03 Mar 2020 16:50:58 -0800 (PST) Received: from localhost.localdomain ([106.51.232.35]) by smtp.gmail.com with ESMTPSA id r13sm343720pjp.14.2020.03.03.16.50.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Mar 2020 16:50:57 -0800 (PST) From: afzal mohammed To: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Cc: afzal mohammed , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Sebastian Ott , Peter Oberparleiter Subject: [PATCH v3] s390: replace setup_irq() by request_irq() Date: Wed, 4 Mar 2020 06:20:48 +0530 Message-Id: <20200304005049.5291-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 s390 maintainers, if okay w/ this change, please consider taking it thr' your tree, else please let me know. Regards afzal Link to v2 & v1, [v2] https://lkml.kernel.org/r/cover.1582471508.git.afzal.mohd.ma@gmail.com [v1] https://lkml.kernel.org/r/cover.1581478323.git.afzal.mohd.ma@gmail.com v3: * Split out from tree wide series, as Thomas suggested to get it thr' respective maintainers * Modify pr_err displayed in case of error * Re-arrange code & choose pr_err args 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/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..015c9dc45f7d 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("Failed to register EXT interrupt\n"); } static DEFINE_SPINLOCK(irq_subclass_lock); diff --git a/drivers/s390/cio/airq.c b/drivers/s390/cio/airq.c index 427b2e24a8ce..a860da77b0d1 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("Failed to register AIO interrupt\n"); } 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..94a66d6d32a3 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("Failed to register I/O interrupt\n"); } #ifdef CONFIG_CCW_CONSOLE -- 2.25.1