Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp676411imm; Wed, 25 Jul 2018 04:22:31 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcqPdWLBcRuNsGV0RyquCgENbNxchvMidQpZ4XQuXBS14gch4IFH+BoW/qWBXqVy6i0ypv+ X-Received: by 2002:a63:9311:: with SMTP id b17-v6mr20142115pge.261.1532517751789; Wed, 25 Jul 2018 04:22:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532517751; cv=none; d=google.com; s=arc-20160816; b=z+6pYNXxm2jD7Y56KKXHdL1GtzJ+zAb3jw2NjaEHKYiuHasxCt0MkbOvLXYtTiWmgq GT7+4amPZzT7m+NjYYzVMzDhVI40MwXmPmR5k/1DmRoR6EsZZWFGDeXg8tX61UGySv/C vBZckkbGFffYQRrPbG1lCsKL9H0yCe7YG2nedeNUOo3tqTbQxCNYiEgza2zx+AV1mYM6 L2WpSi1TQTltApwcjbJplD8JmvLY3NdTj79cBhCh1TDSN2wbAzdvUaCnh8sfzFuwZpn+ kVoWH5BKVbKUA99TvC6mry9qrubfV1p04undOk/aqPG+/Nu0N8dzIwi9BTA0P348eB5i JElw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=j3lZ8RpExvujtUDdEbEY4UsHaUsUk8e6g1ZNBRKbDIA=; b=JXHyllSoYJ2PmqLbTLB4oFR2Z0HFStf9p9zl2UHcx4XDGTkUbxqgZAEp0boPNvNFfw ieH+SiW8YwBUFLExQhdmK8K8z2Z8wuKQrcn/xvW3+YzE6RclY5XGBU/4KQOUthH0HV1f h67MskeYY/X8CcNW2MudQoA87zB9/NZ0l4fnbg8oRUx4O2RI99kGHWd87z/u3LD7GhIm kbbUveWgbJQlC4Aw2x3xvAcJ6g9VXr3tEzE3FBzJIs9n21YO8gnvRVzC542oP1NUiAQr TaMNHQtihcUsTeY4pcXgSRZSJMb9Qp2kv3q++DPPEPtbUYozOqNun9e3KW9KUWWAvNzx mOTw== 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 q13-v6si13459075pgq.526.2018.07.25.04.22.16; Wed, 25 Jul 2018 04:22:31 -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 S1728803AbeGYMce (ORCPT + 99 others); Wed, 25 Jul 2018 08:32:34 -0400 Received: from verein.lst.de ([213.95.11.211]:59098 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728390AbeGYMce (ORCPT ); Wed, 25 Jul 2018 08:32:34 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 5F7EB68D64; Wed, 25 Jul 2018 13:24:57 +0200 (CEST) Date: Wed, 25 Jul 2018 13:24:57 +0200 From: Christoph Hellwig To: Marc Zyngier Cc: Christoph Hellwig , tglx@linutronix.de, palmer@sifive.com, jason@lakedaemon.net, robh+dt@kernel.org, mark.rutland@arm.com, devicetree@vger.kernel.org, aou@eecs.berkeley.edu, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, shorne@gmail.com, Palmer Dabbelt Subject: Re: [PATCH 3/6] irqchip: RISC-V Local Interrupt Controller Driver Message-ID: <20180725112457.GA24502@lst.de> References: <20180725093649.32332-1-hch@lst.de> <20180725093649.32332-4-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 25, 2018 at 12:18:39PM +0100, Marc Zyngier wrote: > This feels odd. It means that you cannot have the following sequence: > > local_irq_disable(); > enable_irq(x); // where x is owned by a remote hart > > as smp_call_function_single() requires interrupts to be enabled. > > More fundamentally, why are you trying to make these interrupts look > global while they aren't? arm/arm64 have similar restrictions with GICv2 > and earlier, and treats these interrupts as per-cpu. > > Given that the drivers that deal with drivers connected to the per-hart > irqchip are themselves likely to be aware of the per-cpu aspect, it > would make sense to align things (we've been through that same > discussion about the clocksource driver a few weeks back). Right now the only direct consumers are said clocksource, the PLIC driver later in this series and the RISC-V arch IPI code. None of them is going to do a manual enable_irq, so I guess the remote case of the code is simply dead code. I'll take a look at converting them to per-cpu. I guess the GICv2 driver is the best template?