Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp522613imm; Thu, 26 Jul 2018 07:38:48 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe4nYK7cHshqeMoxNuSzovHGwNgY1R1ja/vzmD73/U/b+7g8BNbf32bhukfzMQobzCBo2AL X-Received: by 2002:a17:902:b08a:: with SMTP id p10-v6mr2185579plr.217.1532615928871; Thu, 26 Jul 2018 07:38:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532615928; cv=none; d=google.com; s=arc-20160816; b=AtPolWFotBlm9t5fbcFi0socrr0b/2H4MyN6TVnprXpUSlJupMfKhF6dR4fdqBov4i gIsiODj0WdMYRYwmrxZ5ibo18RuwKMDOTz796PmKhxXhdMjWUqTRCXygwMCFkGyLT2KV 0l76b27NmtkZuex8FMHNYBcSIsi+m8pZ9BFlCc50OzBhEPUHBY4fc4EY+JIPsKyIKjhc CV0z76Ohnwj/xwoCrJkiR9jtokaEXs+MearE+OSFvb8Jcma+6+7RfLRd4lvXI3dx4oYy wQNK/+E9kfe24dsY66wbib024bcnidWTLcW12aHxp+qKjEq9Vzk8GF8niABKI8TyPjTu ZdVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=AiAFQ6IM1CZIWMQ6ODZhTesmaZXEWKjq9PtsejQ/Zhs=; b=uwks724hdvdiHdUff4PGXRwx77sjzlJFG5x0fRJrKu47F2x0+0I8LVP78hu5yt8RDI WBTv96U0jhfwUkqybdYFTjHNfQ8lQ07L53kJBrRSa7DoPK+eBe3PNeb9vO8O/Q1AN5xH sluOHQ1YBFy42cIy1iOavNPiUIcY3nw0LYSqvAf3mF/XluBLQoVvZIKbw1MaoilIvEux wXZmRZ6Z34HVdiUnGt5eIoB8xdAK6arSIqmvOWl89nyv6ghjj/Ivj5sc7qEmVagKHJu/ TZF4QfY1wEvkh5wAYh4BlMd7z1P7T/n8yJCfjESJP7kLEnNc76oepgFdnmF3V5hQ9WXI qVLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=YO1l6n39; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t196-v6si1452722pgc.308.2018.07.26.07.38.33; Thu, 26 Jul 2018 07:38:48 -0700 (PDT) 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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=YO1l6n39; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731422AbeGZPyt (ORCPT + 99 others); Thu, 26 Jul 2018 11:54:49 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:57398 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729506AbeGZPys (ORCPT ); Thu, 26 Jul 2018 11:54:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=AiAFQ6IM1CZIWMQ6ODZhTesmaZXEWKjq9PtsejQ/Zhs=; b=YO1l6n39P2RzGaSk5R1oyQUBE IueKl3IBEdDdC5WQPxamfrrVyrm+MwbmJ6X75ss2FJ3sXXRRvZNh2RuPTpAC8Y1Lqlh4fvH8ZMFYw at4fzxRubNxARMLrdm08g1ekWoH35BE0YhTxqja3jvRiaC1XNC9hIzp7Hw1zlJnszdeoHzaTh8qeo 5Mx8ql/515rXbfhdgyz4v/3zWyvZukU1GNW0K9yR3kU+D28cKHe7LaL3oQmajqRPN/3Ge/ZlKX4g2 bJCWb6qxSZBIRbZgK6GjnshOmGg0QOwroRSz/683WN1+eOIVS2fcIZSy1TQVuDVLJtCFPD7SXp7hF l5kc5rLEA==; Received: from 213-225-8-157.nat.highway.a1.net ([213.225.8.157] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fihOY-0005h3-NO; Thu, 26 Jul 2018 14:37:35 +0000 From: Christoph Hellwig To: tglx@linutronix.de, palmer@sifive.com, jason@lakedaemon.net, marc.zyngier@arm.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: anup@brainfault.org, atish.patra@wdc.com, devicetree@vger.kernel.org, aou@eecs.berkeley.edu, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, shorne@gmail.com Subject: [PATCH 2/9] RISC-V: simplify software interrupt / IPI code Date: Thu, 26 Jul 2018 16:37:16 +0200 Message-Id: <20180726143723.16585-3-hch@lst.de> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180726143723.16585-1-hch@lst.de> References: <20180726143723.16585-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rename handle_ipi to riscv_software_interrupt, drop the unused return value and move the prototype to irq.h together with riscv_timer_interupt. This allows simplifying the upcoming interrupt handling support. Signed-off-by: Christoph Hellwig --- arch/riscv/include/asm/irq.h | 1 + arch/riscv/include/asm/smp.h | 3 --- arch/riscv/kernel/smp.c | 6 ++---- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/arch/riscv/include/asm/irq.h b/arch/riscv/include/asm/irq.h index 4dee9d4c13c0..c871661c9df4 100644 --- a/arch/riscv/include/asm/irq.h +++ b/arch/riscv/include/asm/irq.h @@ -22,6 +22,7 @@ #define INTERRUPT_CAUSE_EXTERNAL 9 void riscv_timer_interrupt(void); +void riscv_software_interrupt(void); #include diff --git a/arch/riscv/include/asm/smp.h b/arch/riscv/include/asm/smp.h index 85e4220839b0..c9395fff246f 100644 --- a/arch/riscv/include/asm/smp.h +++ b/arch/riscv/include/asm/smp.h @@ -44,9 +44,6 @@ void arch_send_call_function_single_ipi(int cpu); */ #define raw_smp_processor_id() (*((int*)((char*)get_current() + TASK_TI_CPU))) -/* Interprocessor interrupt handler */ -irqreturn_t handle_ipi(void); - #endif /* CONFIG_SMP */ #endif /* _ASM_RISCV_SMP_H */ diff --git a/arch/riscv/kernel/smp.c b/arch/riscv/kernel/smp.c index 6d3962435720..906fe21ea21b 100644 --- a/arch/riscv/kernel/smp.c +++ b/arch/riscv/kernel/smp.c @@ -45,7 +45,7 @@ int setup_profiling_timer(unsigned int multiplier) return -EINVAL; } -irqreturn_t handle_ipi(void) +void riscv_software_interrupt(void) { unsigned long *pending_ipis = &ipi_data[smp_processor_id()].bits; @@ -60,7 +60,7 @@ irqreturn_t handle_ipi(void) ops = xchg(pending_ipis, 0); if (ops == 0) - return IRQ_HANDLED; + return; if (ops & (1 << IPI_RESCHEDULE)) scheduler_ipi(); @@ -73,8 +73,6 @@ irqreturn_t handle_ipi(void) /* Order data access and bit testing. */ mb(); } - - return IRQ_HANDLED; } static void -- 2.18.0