Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2004861imm; Thu, 2 Aug 2018 04:51:50 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc1Yei4ZW7cZ1xVEGYGcLutbLE8aTht9LdJzovwAB72Bkn7tnwEmOyC0EcWHGsJsApg9Toi X-Received: by 2002:a63:5421:: with SMTP id i33-v6mr2459354pgb.417.1533210710335; Thu, 02 Aug 2018 04:51:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533210710; cv=none; d=google.com; s=arc-20160816; b=ZUA9ATICTfY22z7XBs3mxtHTZDLg/dmKVdNuG1qFb4hcVqdqpSA2aN05lf972tRX2c 0sLrkkm9mtid3uurCN6pHvgWBZU7QCScck3ox5qRlzRfrrh/afHrqj3mPFyhkTEhS1GC Mg/5l6d6xK1tRWw2L1p/DVvt0VFdVcevHysCOaXZLLLJlJHHYNoTMM6uk8d3eAZ8cK70 EUNs1RI8AzsqmZhQZ3G6nR/k3kCoHJ4jOftbgk8Y8/7oHyLwOFiXPY2bbaTCNpawc2WU 8PiVAr4RZhZCB7bl+PNyFL45Y0D71AXkf/z2kyv2iTgyARsTKp/hNBl6Obytjmfva2hU /4Hg== 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=t/E+31imEnajchgTCgZaETF7keo3VLAGFABb8NZjBr03JAOEZ1fiFjkhIHU28xGy96 gRHD2n/LgErJpP/OmqLieEenN+W/Drphis1oMqmQ2KGTIaZIocBuuYkFutnzJ5ttBBtx 21GQMnE2Jfn77ZRX1wGKbDTGDjvtlZ49y9kGhdlU5jVDvjcfgT7jDd3oaGmbSc+npgbN 6KPZz+EwmZZNcWYemD8p2HzANs5PUHDGnnht563gA+OFtujog+ZpxYGQT70H0/Q2556S bv+B1GZhJqbT3URE73wZT2aooDgAGlWFlJ/rOIpDCs0k3lI2hMM0ENWWJKxRfpcsaLjr znbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=qfcCEJUA; 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 v21-v6si1677012pgn.371.2018.08.02.04.51.35; Thu, 02 Aug 2018 04:51:50 -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=qfcCEJUA; 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 S1732408AbeHBNlY (ORCPT + 99 others); Thu, 2 Aug 2018 09:41:24 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:39346 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732252AbeHBNlY (ORCPT ); Thu, 2 Aug 2018 09:41:24 -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=qfcCEJUAAk0pKvqfVctcQnNA0 PUUyi6B1adPNyUl+CDtzyn85skQKW3Kc/SlWxe7oycXBXjRjD+wYnbEIVvoTnAmh/0nU+QgWyovqR f1uQOtHF1n4U2zZE/HFF2eLuuvCfq/9B3xQIavFM4F+y/fFubT0m2AlHMrJ3muGYMMRVtVLcVlAPU HUL5v7TB7o4mt+mOQlNGmsOI/TFEZQVT+4dj7RGLydJMWztFhTewl4jyrwMWFH9q4NQtQ1tN6RZMr xFwqtcasiliBzOWqWLR9HexXeu+1KAmZrJpMC6XEuua6MxnNXKL02jDk9lM4pYjOIg0evxY4ngBOT EMyiGGuqA==; Received: from clnet-p19-102.ikbnet.co.at ([83.175.77.102] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1flC7i-0005Ft-Hu; Thu, 02 Aug 2018 11:50:31 +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 05/11] RISC-V: simplify software interrupt / IPI code Date: Thu, 2 Aug 2018 13:50:02 +0200 Message-Id: <20180802115008.4031-6-hch@lst.de> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180802115008.4031-1-hch@lst.de> References: <20180802115008.4031-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