Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1517884imm; Wed, 25 Jul 2018 20:39:50 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfmIi13xWzs3lN+XS9PA/B0H6XUo1QZ4heLUIwGp32xPtxQEz9Fz9OpoSSTwRS99ZkmlKGE X-Received: by 2002:a17:902:18a:: with SMTP id b10-v6mr347899plb.62.1532576390483; Wed, 25 Jul 2018 20:39:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532576390; cv=none; d=google.com; s=arc-20160816; b=QFmbcRgHh8Mon1Z63TVZwZOLHAyAJGRAgHOLkSP8aU3cr2SZsmpcCZccy5E+m0VPCm ze5zz3OhvIx8iuuxOOYySrZxE+ctbhis3KygCgTmWNuZbeaNbFqgPae5108LDHw0SnIE FCbGCxcgwYissvTS16/eENdgNRVxBDcy/vEwc73Q43z6opwzbLONLzrZ97KmABzgMjZK hjWZ8c2DtVqt/0LkNbRM1j4JtJ/Dbf2drl+Tv/FCExdTS+ga6FOBHNqszcFYoioDWTWX cKgNzq/LTbbvg+rhYXeXLUYqADZIyIdKIc+SI4QshKSv4l+5qEGSglQDCFZamPhJVoH5 4S+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=vbSlzqOTIYV4ZYP1HsjWbxsyNi/Vrqffqj98+AEo8+A=; b=t/mYAXIL4luE81pKn5mFN9VD/TceqUjbuDJeBcDTixo5KA1h/eKhFcFtMh/4lpuENa AxnVael0yYPKSSh1q83W0ae3Bn3a5xE0CUw514/x+JRVrpLLPIQ9OGvy3NyEndzbQx50 rJhpORCLJCZEGpgNDNNdhITMX0MI+jwp5mm/9HNZJOPNDfHk2w11pvid9SGA1rUHLxjh AurcnpI5MR1ZZ0kZ3iFbYxl44CtMRPZ7zuHECOfnre/OAsSEIb9aEhOlXJqYBPLRG8mX PDQoLwn8m24MWP0DkLPNKbq/mi7j+2DMsWtlPxZWXNNpIlTng4qj3LZcFyEDk/3gEeGf JPnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=qtVMd4zg; 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 k13-v6si259022pgg.346.2018.07.25.20.39.35; Wed, 25 Jul 2018 20:39: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=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=qtVMd4zg; 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 S1727847AbeGZEwr (ORCPT + 99 others); Thu, 26 Jul 2018 00:52:47 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:40508 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725941AbeGZEwr (ORCPT ); Thu, 26 Jul 2018 00:52:47 -0400 Received: by mail-wm0-f68.google.com with SMTP id y9-v6so466615wma.5 for ; Wed, 25 Jul 2018 20:38:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=vbSlzqOTIYV4ZYP1HsjWbxsyNi/Vrqffqj98+AEo8+A=; b=qtVMd4zgDIxYm3I1oIWg4/HldJkKMV1pXhHiw+ZudZKnQcf1I5zFQux1ZGg1rcoPsG gitKaoIIptvbFROKTHVccLG+E7uYIGsRqw2fNS9QlYMn66i8RfLKPFyiIDCMvzMXCFOZ gr/8uTto8d4zvu4srSSwVA6DOSOdEOgh7PwZ/9ZCOEnAcaPsQqJA/+zISzChvJlbm3mA BEdO2e4rS1qXEDyq8ekISuV0Z0cF0ILGhlpisQabKV+na1kNJ7ULa8LWNZ34J0oAINHT bJVtm0U70OlULw6OaTXD9twaqB9dkM3c8H8g/4ZH1wFeBwbBLlTqR5zx4oX4u5KumEc5 sWUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=vbSlzqOTIYV4ZYP1HsjWbxsyNi/Vrqffqj98+AEo8+A=; b=pAc/6kPC7qoY+jn21LaJVen7UqpIcbVbs+GrM7EGvxSiy2TB3HS865znGzfwaPiemU 8c3JDD0Xj12fwU1jpg3tVP4sHF5d808tKwATieDElyqz2HoeBaMdhsna9rWV3PLUV2SW 4uEJXv5KNECLxXuJrc9OR8G72up1pMXKOP/vjMQ6bdsiegW2/0EBLZPBVQGiksMEov33 s37L1MbLXLjIcy2y9ABnwRTeRFox1zEszDFPHARlu6K4FGmuwt9oM1r0KtCjRrzW911e IzK2lX9guEPFL47GeScv/bTS00fXsuxVjTXPkl6cuuMK6ejmsff+cmGolHMxAyB9Nkss 9epg== X-Gm-Message-State: AOUpUlE4ZhkIUY9s0rMLQ6OESPsy4ttQNGjWcWbZJMcdGWrN5nOG660C Ps3BYEpfGzr/AV6RAhL3d4WRixh0B0WZZVGp5IydVg== X-Received: by 2002:a1c:8a04:: with SMTP id m4-v6mr307687wmd.137.1532576280888; Wed, 25 Jul 2018 20:38:00 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:adf:9dd2:0:0:0:0:0 with HTTP; Wed, 25 Jul 2018 20:38:00 -0700 (PDT) In-Reply-To: <20180725112457.GA24502@lst.de> References: <20180725093649.32332-1-hch@lst.de> <20180725093649.32332-4-hch@lst.de> <20180725112457.GA24502@lst.de> From: Anup Patel Date: Thu, 26 Jul 2018 09:08:00 +0530 Message-ID: Subject: Re: [PATCH 3/6] irqchip: RISC-V Local Interrupt Controller Driver To: Christoph Hellwig Cc: Marc Zyngier , Thomas Gleixner , palmer@sifive.com, jason@lakedaemon.net, Rob Herring , Mark Rutland , devicetree@vger.kernel.org, aou@eecs.berkeley.edu, "linux-kernel@vger.kernel.org List" , linux-riscv@lists.infradead.org, shorne@gmail.com, Palmer Dabbelt Content-Type: text/plain; charset="UTF-8" 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 4:54 PM, Christoph Hellwig wrote: > 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? Actually, RISCV HLIC and PLIC are very similar to RPi2 and RPi3 SOCs. On RPi2 and RPi3, we have per-CPU BCM2836 local intc and the global interrupts are managed using BCM2835 intc. You should certainly have a look a this drivers because these very simple compared to GICv2 and GICv3 drivers. Regards, Anup