Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp524152imm; Thu, 26 Jul 2018 07:40:21 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfIITcNo2O9lQPQOXJbfplOqAkvTzvWmlihxFkoDABk4pHb+htrEaRkZDtWptXXdgn2yswJ X-Received: by 2002:a63:35c3:: with SMTP id c186-v6mr2211071pga.217.1532616021131; Thu, 26 Jul 2018 07:40:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532616021; cv=none; d=google.com; s=arc-20160816; b=Ib+yU0AGS1coHbGzhNlrkfTdft2q1ZE/QRj/g/H2DXOyD4omV+d2XtpTSm1nuDx7q9 k9QYL6XrE1ZuHkjsrVBqxDWeJFM73lMmVZkbAy0SrPOK+MQP+/mFQMJWgYFKeXVI88Pi 4RDnbiATB5rrF0Z1wAMYPjAbIpK9LL/chTTcxbPRWJ6ZTiQgqHEcHS2Qih1gVKqFZW8L QvwzkxwGf7krWH1NqNcDpOwv46cpy0IM0rwsLN4MKhvygASp7WKw4iNfb49464eK54UG SozxIFI802y13dHzImrvH+PLV0C9kyb5MO6hJaeBa877QlqNEy8nPi/2+x9vgdOKPbKl 7Uqg== 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:arc-authentication-results; bh=ocXrQec0oLhDiwtCXIb0Qh8KvflUULsfS4Yd+58q6mM=; b=m1lUmpp+PcrlJnseHPF5Oizy40aM8or5bo8GYcZqMUTxW86tVXvnO9ZADyOfHHgtXM eM12q408E9fxQBvhqw8L60My9a38yAVZgxNDX127lPpSHxePknqjRvzW3Tx86WvvEq4e J4kPxkEWrklwLpzMvSRPFWQMrr7y30rgIbUBbgQ4WgvmhMOxZZ0Le7XiE9EggEv2C3di hjaOJtmjwG8FAwM4B9zR9aIbuAwO3z0cOX+FJ//6ZqQ1EgY3UBZSTJ24QGZ5FCBaSvVn qw5rEY+txeRrGboNCGpUWk4vgwaFnsEWByo71cOG7cPK0HPKj/F0/4HFwFvIhAmBawhJ 3+gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=MEc2zvz8; 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 s6-v6si1393958pgg.41.2018.07.26.07.40.06; Thu, 26 Jul 2018 07:40:21 -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=MEc2zvz8; 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 S1730517AbeGZPyo (ORCPT + 99 others); Thu, 26 Jul 2018 11:54:44 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:57260 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729506AbeGZPyo (ORCPT ); Thu, 26 Jul 2018 11:54:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=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:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ocXrQec0oLhDiwtCXIb0Qh8KvflUULsfS4Yd+58q6mM=; b=MEc2zvz84QeRpTgqPHZBz20cv gTrXXmFgUbgwN+j4wISYylhC3D7PsU7h+zxWoh4Ozw2kxh5xnxH4GvuMt7gr4XxIrnQCO+DknBFcD o1CUSc62zWkHHOckQyxMLXYi2qPScwZd1Y1JsKlFU6ZILmobm/caki+Sc6r2kIlynV1eOKzB4AZk4 jHm0ulq6XdBqNtcUs7iGSJx5rGWTBwL1sIM/Gv9+ZaJDn3D+dtLlOssxtGW/QG7zWoPV9lNnoYJNH 6YZtXJX71XpgKAkRX3Za0XvWD/DMvFWNcO0djURKEID4zAvwjh5JRQcn2W65+d+eY4O+hBGKIh/J3 6PcQ00YrQ==; 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 1fihOS-0005fm-Dg; Thu, 26 Jul 2018 14:37:29 +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: RFC: simplified RISC-V interrupt and clocksource handling Date: Thu, 26 Jul 2018 16:37:14 +0200 Message-Id: <20180726143723.16585-1-hch@lst.de> X-Mailer: git-send-email 2.18.0 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 This series tries adds support for interrupt handling and timers for the RISC-V architecture. The basic per-hart interrupt handling implemented by the scause and sie CSRs is extremely simple and implemented directly in arch/riscv/kernel/irq.c. In addition there is a irqchip driver for the PLIC external interrupt controller, which is called through the set_handle_irq API, and a clocksource driver that gets its timer interrupt directly from the low-level interrupt handling. Compared to previous iterations this version does not try to use an irqchip driver for the low-level interrupt handling. This saves a couple indirect calls and an additional read of the scause CSR in the hot path, makes the code much simpler and last but not least avoid the dependency on a device tree for a mandatory architectural feature. A git tree is available here (contains a few more patches before the ones in this series) git://git.infradead.org/users/hch/riscv.git riscv-irq-simple Gitweb: http://git.infradead.org/users/hch/riscv.git/shortlog/refs/heads/riscv-irq-simple