From patchwork Wed Sep 4 07:10:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1157502 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sipsolutions.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZawRHM96"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46NZj764G8z9sBF for ; Wed, 4 Sep 2019 17:10:35 +1000 (AEST) 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:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=dyJkaS3AnybikL0L2Z6FqXjxq2kNmnEETdAmDBW+2Pk=; b=ZawRHM96JmrgwK yqflK/LT5hBarTCgIlKqEJ8NNNq77ya9UERmksJE98a56qy8M96JKfZvm29Qm/DIApJpmjnUYFhUO 5/V6RfeM/wI2vPKhPRy0VhVKEfmKKDnk5SywvA1gjDzFhZMUzMq7KQp8pF7Qiw2943vxuF6Kv+mP2 /4xGQec+vIb4P2Lngrg65IbKJGXPlUiPt+jIVX1DFmFpVoWRzXAGIQM7mA/1+Rjnab0d9B9xkVFLi x6XVgy75vaXW1nxfhmdsrQ6AvpgfMvWQ7B2vRSfyB8fVjW5e97OBIpcAxeXQlJPUFXiU18tD+DBDX bG6OhG7RTitub69eyIpQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i5PQt-00066j-8I; Wed, 04 Sep 2019 07:10:23 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i5PQq-00066A-Sc for linux-um@lists.infradead.org; Wed, 04 Sep 2019 07:10:22 +0000 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.92.1) (envelope-from ) id 1i5PQo-0008Rc-7g; Wed, 04 Sep 2019 09:10:18 +0200 From: Johannes Berg To: linux-um@lists.infradead.org Subject: [PATCH v2] um: irq: Fix LAST_IRQ usage Date: Wed, 4 Sep 2019 09:10:07 +0200 Message-Id: <20190904071007.7837-1-johannes@sipsolutions.net> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190904_001020_928389_4FEA0EAD X-CRM114-Status: UNSURE ( 7.46 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Erel Geron , Johannes Berg Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Erel Geron LAST_IRQ was used incorrectly in init_IRQ. Fix this. Change-Id: I8676920b31fbe61adadc35e36d6f8ad677af5b08 Signed-off-by: Erel Geron Reviewed-by: Johannes Berg Reviewed-on: https://git-ger-8.devtools.intel.com/gerrit/95123 Tested-by: Johannes Berg --- arch/um/include/asm/irq.h | 2 +- arch/um/kernel/irq.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/um/include/asm/irq.h b/arch/um/include/asm/irq.h index 49ed3e35b35a..ce7a78c3bcf2 100644 --- a/arch/um/include/asm/irq.h +++ b/arch/um/include/asm/irq.h @@ -23,7 +23,7 @@ #define VECTOR_BASE_IRQ 15 #define VECTOR_IRQ_SPACE 8 -#define LAST_IRQ (VECTOR_IRQ_SPACE + VECTOR_BASE_IRQ) +#define LAST_IRQ (VECTOR_IRQ_SPACE + VECTOR_BASE_IRQ - 1) #else diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c index efde1f16c603..402e59bdb65b 100644 --- a/arch/um/kernel/irq.c +++ b/arch/um/kernel/irq.c @@ -480,7 +480,7 @@ void __init init_IRQ(void) irq_set_chip_and_handler(TIMER_IRQ, &SIGVTALRM_irq_type, handle_edge_irq); - for (i = 1; i < LAST_IRQ; i++) + for (i = 1; i <= LAST_IRQ; i++) irq_set_chip_and_handler(i, &normal_irq_type, handle_edge_irq); /* Initialize EPOLL Loop */ os_setup_epoll();