Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp476663imm; Thu, 6 Sep 2018 05:40:07 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZzYHCcL1rcD+eIVCbgaQK/8K2+S5muxCpj8P9ssXOwuMpLZUBBmiHQmhNhHLqHiFCClNFK X-Received: by 2002:a17:902:28c7:: with SMTP id f65-v6mr2416614plb.240.1536237607017; Thu, 06 Sep 2018 05:40:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536237606; cv=none; d=google.com; s=arc-20160816; b=fxgX0aXn9W9m7ePTQQL2RFJtnIJfZjjCtZkR6dTSF77wKHiIG3G+jCw4ul3Pycrf2j IgkkaGKNbQf2rW7aRET8ajciSVnRMJWEJwv94ZTZekGIfQu3/3t7AsAn4b170xJ8U8cX gaQZK26NMCNEP54zIe/NCMg+du16rixgoggLeFY3p9chzw8Traz52ut+aHt7GDw50Lk+ Ogui/x7QWe1g50Oy+H0myqgtBULoWlKcGBmGeIQD/Xon/4c44E3OhVoXQHXmZrHnJUM0 ZiHBTlwrSUC4wnxHYq/qcA4L3k5F5KbA+9nzSIfbyfGLejXXxtss9XUHlFO6tMQOY5Zi s0uQ== 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; bh=5dC5MkcLBlwXZcIQ9w9cv0hXXu3tn7yMycSWCbmjdsc=; b=M8awriJUSaF/XY8HvwcJC4go55z5gyLW/pY+wEpaPgJo3ZuwNtDskYFnYhdLU/uOud u9K3Y3fL8B0BSFxwOgcoIHL/xA+9sEyjXl/Ne6j9YA5nKbd82vybjpFlYQN9QOVzHwJD FPK0O2DS+MFT5GyZiDkHyJgL14vD1L7PNEiLSxGZlx6owtRyFkqiFYJfBilxy1/upkYp hc3CAPhz4WdGUiKBuEwdn02EaI4q0E6203Nk2FYaie51I3a8twQM/ItLrHFZf+m/XmMJ t/x3dR9Qm++QmCzahNj6fB50+fKf71EHGeGJBoDg+V0mCuPBlG69/8nY4Y+7w+2SHvGn Sc8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=xsgnA0zq; 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 f13-v6si5379739pln.512.2018.09.06.05.39.51; Thu, 06 Sep 2018 05:40:06 -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=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=xsgnA0zq; 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 S1728713AbeIFRNF (ORCPT + 99 others); Thu, 6 Sep 2018 13:13:05 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:45735 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728174AbeIFRNE (ORCPT ); Thu, 6 Sep 2018 13:13:04 -0400 Received: by mail-pg1-f195.google.com with SMTP id x26-v6so5160424pge.12 for ; Thu, 06 Sep 2018 05:37:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5dC5MkcLBlwXZcIQ9w9cv0hXXu3tn7yMycSWCbmjdsc=; b=xsgnA0zq70y4wpmWZ/7WewrGDXcvhJmY/ZgiiA+QkDk3c+upTPpRUvhp1O1cd4FhjB DaCVODNZfEgWn8hsV1eTsMTr8o2i9eWpL7sqo1VjlMa2/2f0gubQ3Yae3OswqGPxXmUc cDJdsxmZ+EjPEwHAxxfZR+fu2jcc7hIOhPqrrto5F6vp74ywZg40AVCktl0z1W4G8U+s 8FaXmyMwUsbPRFE209VBA59q5TB80Vp+Fw+43mQlnfFzGGlg/3SCQoN6VFF4h750lZ78 5rzFcVEg4pCFeHOAcMKaZOHqczSsZfu1spiYVjwdJtyj3KP70T48sAYOs1fTb4Ighsm1 6kdg== 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:in-reply-to :references; bh=5dC5MkcLBlwXZcIQ9w9cv0hXXu3tn7yMycSWCbmjdsc=; b=pBY52DAXJNzZbPV+V/HhCzrBYm0MUB0pTfmgK+0dzmgmQL4cORk0jwc2JMDTqboWwo ZlQoG93oriXw5U0xgo/kTV4/qWuwyl8wPvjjy4v7ieBe75WkTUQvG4PMvuegahpcCSqD fsP3kxVOQ91X8AZYz74tVshKJMTesTtspgq4GWOVrI+fGgPr/pc26zH+mRwHOU4tjL9q 2BSEZt/a8iOuYcvfbGOXMdqo8LQkk7BTvceP6bybfyjTMIH/J+B03NSJZPhOEHwWqMGL PKxTmg6uN7Oser5UsLYQWAmLHMwCe0bFTxG3B10iIAtjK7Hi/LRj+41heYqMVRoEtug+ Owrg== X-Gm-Message-State: APzg51DtEFJ2CQdaXik8Zv3wNKsJgN87RijaXY/+E+RtCaFD4iJLBcmi fjE4/Wez7dvDDJ1oT27G1koOFzrhKP0= X-Received: by 2002:a63:d54e:: with SMTP id v14-v6mr2556270pgi.264.1536237466569; Thu, 06 Sep 2018 05:37:46 -0700 (PDT) Received: from anup-ubuntu64.wlan.qualcomm.com ([106.51.30.16]) by smtp.googlemail.com with ESMTPSA id 193-v6sm11446165pgh.47.2018.09.06.05.37.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Sep 2018 05:37:45 -0700 (PDT) From: Anup Patel To: Palmer Dabbelt , Albert Ou , Daniel Lezcano , Thomas Gleixner , Jason Cooper , Marc Zyngier Cc: Atish Patra , Christoph Hellwig , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Anup Patel Subject: [PATCH v2 5/5] RISC-V: Remove do_IRQ() function Date: Thu, 6 Sep 2018 18:06:51 +0530 Message-Id: <20180906123651.28500-6-anup@brainfault.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180906123651.28500-1-anup@brainfault.org> References: <20180906123651.28500-1-anup@brainfault.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The only thing do_IRQ() does is call handle_arch_irq function pointer. We can very well call handle_arch_irq function pointer directly from assembly and remove do_IRQ() function hence this patch. Signed-off-by: Anup Patel --- arch/riscv/kernel/entry.S | 4 +++- arch/riscv/kernel/irq.c | 6 ------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/arch/riscv/kernel/entry.S b/arch/riscv/kernel/entry.S index 6eaacfa5b63d..69fbe9dd9e0c 100644 --- a/arch/riscv/kernel/entry.S +++ b/arch/riscv/kernel/entry.S @@ -168,7 +168,9 @@ ENTRY(handle_exception) /* Handle interrupts */ move a0, sp /* pt_regs */ - tail do_IRQ + la a1, handle_arch_irq + REG_L a1, (a1) + jr a1 1: /* Exceptions run with interrupts enabled */ csrs sstatus, SR_SIE diff --git a/arch/riscv/kernel/irq.c b/arch/riscv/kernel/irq.c index 9ced284da30b..695e241d0402 100644 --- a/arch/riscv/kernel/irq.c +++ b/arch/riscv/kernel/irq.c @@ -8,12 +8,6 @@ #include #include -asmlinkage void __irq_entry do_IRQ(struct pt_regs *regs) -{ - if (handle_arch_irq) - handle_arch_irq(regs); -} - /* * This function doesn't return until a software interrupt is sent via IPI. * Obviously, all the interrupts except software interrupt should be disabled -- 2.17.1