Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3197788imm; Mon, 10 Sep 2018 12:38:46 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdap7OuQWP0/C1H8U2oFhHCG5wTTKdLRmRh1zhc+cVstdWvkOFZ3osC6id+7esvzs5B4RJ0I X-Received: by 2002:a63:6283:: with SMTP id w125-v6mr23634969pgb.83.1536608326033; Mon, 10 Sep 2018 12:38:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536608326; cv=none; d=google.com; s=arc-20160816; b=xa8WtZqpsK2kJzyK54p6MeqlObjz6vnmVwz7mCIxTo9ZTmVCpESsDGoMIBq0xvajqN JDHVSkoQWjGw86vHtO42gYiTsXtxLxR3Su4NLjHm5Ta4e1Y46KbXUSiErrki8lCFKfi2 LtBF9Y2eAvOQvqTZ/Is+YhH31ry+LLvVwkfawRYFVxOAkvKUaXrdda15nAFc1JS8S+UO I1g4sma8c4OWM+AmG4grUHRMfwKBREVzQNfRPb2AKb9/vGvjiCmmBBB6Ig4qYT2/oZyz 9Pjus7mkmrdQO5FXWMusji+Yg3JEPkPnUZsfBn+0BRHwOIN5o1itASguQ8aB/ShLAymC obGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=NQ3DF0wxOj3gItcYwQxOkHTuU+Qs6drjHTEkub/zHx4=; b=fUlJSNci0ywRHecNADWsfpzPXkZjiWYQCjZabD3Er2lX+bkQu7siWzk31ZQS/PuDX2 aRa3LB8rSb8AFY84ugzBYmBs51otGYDECQdJHKMdb5F93iAd6BbpPlyxjINuvPq1TwPe Z6TVv9VLqzqpx0FrEROLrqGBJgv8G61vWpLPiDnqLlcsIsMLvFeA4AH30ukJKt31qvA/ UVF4tinzPMv0xCAiJ5h6PgSD4gbmfM+hk5JVWuRMrU4US+N4/B6mICFD9rrlRokwaXg6 jtAAqKVkv+Gt+AQFAKBGrCyPdVFXDz7JXgjg8KYJTY/kILr4A77yIbq5UiqGkpnOK2J5 WU8A== ARC-Authentication-Results: i=1; mx.google.com; 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 c22-v6si17175291pgk.237.2018.09.10.12.38.23; Mon, 10 Sep 2018 12:38:46 -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; 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 S1728727AbeIKAdr (ORCPT + 99 others); Mon, 10 Sep 2018 20:33:47 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:40318 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727742AbeIKAdr (ORCPT ); Mon, 10 Sep 2018 20:33:47 -0400 Received: from p4fea45ac.dip0.t-ipconnect.de ([79.234.69.172] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fzS0V-0007xA-VJ; Mon, 10 Sep 2018 21:38:00 +0200 Date: Mon, 10 Sep 2018 21:37:59 +0200 (CEST) From: Thomas Gleixner To: Anup Patel cc: Christoph Hellwig , Daniel Lezcano , Jason Cooper , Marc Zyngier , Palmer Dabbelt , "linux-kernel@vger.kernel.org List" , Atish Patra , Albert Ou , Palmer Dabbelt , linux-riscv@lists.infradead.org Subject: Re: [PATCH v2 3/5] irqchip: RISC-V Local Interrupt Controller Driver In-Reply-To: Message-ID: References: <20180910132924.GA6987@infradead.org> <20180910133902.GB21593@infradead.org> <20180910134915.GB30774@infradead.org> <20180910161143.GA1053@infradead.org> <20180910163936.GA18699@infradead.org> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 10 Sep 2018, Anup Patel wrote: > On Mon, Sep 10, 2018 at 10:09 PM, Christoph Hellwig wrote: > > On Mon, Sep 10, 2018 at 10:05:42PM +0530, Anup Patel wrote: > >> I am quite sure RISC-V spec does not restrict the use of other > >> local interrupts. Different CPU implementations can have their > >> own local interrupts. > > > > Please take a look at sections 3.1.14 and 4.1.1 of the RISC-V privileged > > spec 1.10. > > RISC-V priv spec 1.10 defines the 9 bits in MIE and MIP registers and > other bits are reserved. > > The unused bits in MIP are WIRI (reserved write ignored and read ignored) > and unused bits in MIE are WPRI (reserved write preserve values and > read ignored). > > The RISC-V priv spec 1.10 does not tell that unused reserved bits in > MIE/MIP cannot be used for: > 1. CPU implementation specific local interrupts > 2. Per-CPU device interrupts. > > The RISC-V priv spec 1.10 tries to only describe MIE/MIP bits which > are mandatory on any RISC-V 1.10 compliant CPU but it possible to > used other reserved bits for implementation specific local interrupts. Processor local interrupts really should be architected and there are really not that many of them. But well, RISC-V decided obvsiouly not to learn from mistakes made by others. That said, if your cpu local interrupts are not architectural and cannot be made software configured architectural, then you will end up sooner than later with the need for an irqdomain in order to handle the implementer specific crap. Thanks, tglx