Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4716457img; Tue, 26 Mar 2019 15:28:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqxFwSmeMr9IinDcFMLDN6JxrAP2cImF8c/lKbbYvvqQMZm4Jaquv5dYPyZeBBZQSzunKm/U X-Received: by 2002:a17:902:8202:: with SMTP id x2mr26493958pln.318.1553639316071; Tue, 26 Mar 2019 15:28:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553639316; cv=none; d=google.com; s=arc-20160816; b=0WMb4ZeIYG5A4G7wi8N+5lPxJgXsswVh+iCMSBeeqTEkG/59J1mXKTeM/lb1U4Rle6 frfCWEbkX1VjPRgjH4z7AnRdAKC5flSGmoDvmRt2zgWeDe178ZCycfAKteTq5lzOimY4 QJ8lrmpV7LCJd0AGSfELxN2j9M+mQMJ08B3cEJglMKEscFzkJI96rw9Dek+ii5ULXvAt ui9r0iD8wFr4LFizUoNEOhBb2CHr6v2ujffDwSQnLqxuwlL8O7MSH5o1ar1q4U3anu3a taq2unhf+oLRS8JAtw1CHPynRCVdK8+FlxL0HyYDDCK0iT9Lh+07Tp+XOFYMIjMumLxw QhDw== 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 :in-reply-to:references:mime-version:dkim-signature; bh=7MY6geL1C4e1zi1eCmJeExb/Ee8HRUHJ9waYR3/unZU=; b=oUNNW0srWk9dz9IMFSximhmPIRAtgbeTIZjLMdqYPIyIx6LaHWgVuJxzETRdd9CM92 RhmbxvtkLDdOgEi9PzXqXxl2DhdrIjNc4J+Wqfun2z1czCzkFr17puOWUelWxSQLeDC2 zBK4vXVQLmfsAtIEJbmwAV+7zzMiuGAJHR97gl1+elQshGDqmitrYMh9G6VpTfUTys0T kFTZGWa6Aq+G/QvJAAQ9aNQ312vIrGFwckVsLYTNCownpNJm8jZLQSwgJjxWuy+jV2AE V9q1478lw2uvQUPcPKIO2pZB/AjD9Vj2DziEu1ISQHqKbP+RbrxFhXID8uvWARtacUsw W/yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Pbw3ccyh; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c2si6975858pls.226.2019.03.26.15.28.20; Tue, 26 Mar 2019 15:28:36 -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=@gmail.com header.s=20161025 header.b=Pbw3ccyh; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731690AbfCZW1m (ORCPT + 99 others); Tue, 26 Mar 2019 18:27:42 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:39090 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725962AbfCZW1l (ORCPT ); Tue, 26 Mar 2019 18:27:41 -0400 Received: by mail-lj1-f196.google.com with SMTP id l7so12605554ljg.6 for ; Tue, 26 Mar 2019 15:27:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7MY6geL1C4e1zi1eCmJeExb/Ee8HRUHJ9waYR3/unZU=; b=Pbw3ccyh3V3o3JDVt0w7NoTp68sq1FJ9PffEoRtUfZhlOu5noOHPPinBsaRtBka1Jz iGe1JYKXPXLNvJa606IfQLp1kKcubeeRsu/bdVW0ZNEspB+Pz3SYL2JMlFVAxDO82VkX 6haorFxk/nekxvaxjp8ZBmlHVTSJM+Z/AzU2S3rqMc//37qXLO0PiCpQ2EblNRLMCfCd t7bWzyqS3IHfGymisr+N12V5celmXhq3OBSeiU/wcHy5aNdExb3PgrT3R5PirqNO+RQl 7wEj7yVZ10emVccmOVXWNUxYfEdDOgRZ/v6QdFe9OZ5uPI5xNaVtvmdwI1lpFjsG/PaE sUTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7MY6geL1C4e1zi1eCmJeExb/Ee8HRUHJ9waYR3/unZU=; b=FQ9J+xvagcGOhODhICVPKlDoUyd1DmUrqGJWZeo5LRMr/7Ldwd0Dsn/DH+jWCIgl9N SS9kM/B9SOYm5W5u7eHK99oFLdJAyg5R1f+i5B4envCZYQNXnU9ns781Wp9Pjl9LrxGC 7DtFaH/uaIwWvjobJ8D1Nrr2FqI35pirahSvN2TjpI2RZAJGHaOaiWkJ1r3NqLzQhV/3 mPoU8fby3HMPzI9eVnnmeGJan9lC5PlSS98KgFbqAUKQpqJjk5Cpni1bdtgwYwJiwSXZ SYLOECXghuoWK82vXhyLnjpaCjzJC7sI8zK/t4yJ8O4dej5CWnTBzrXVYikPoWXnUgGK OsTQ== X-Gm-Message-State: APjAAAVi9KCboyzmxCz0fRdjIbZrDoiJ6lWKAJ8EYycVQxr9V8FvCSo4 EolIYemQ4U9Vgq9cSRXAzK+OgD5uQimh41rwT2E= X-Received: by 2002:a2e:85d2:: with SMTP id h18mr17271116ljj.128.1553639259897; Tue, 26 Mar 2019 15:27:39 -0700 (PDT) MIME-Version: 1.0 References: <20190320223853.1209-1-alistair.francis@wdc.com> <20190320234858.GA5304@infradead.org> <20190322132748.GD19263@infradead.org> In-Reply-To: <20190322132748.GD19263@infradead.org> From: Alistair Francis Date: Tue, 26 Mar 2019 15:26:20 -0700 Message-ID: Subject: Re: [PATCH] irqchip: plic: Fix priority base offset To: Christoph Hellwig Cc: Alistair Francis , "palmer@sifive.com" , "linux-riscv@lists.infradead.org" , "linux-kernel@vger.kernel.org" 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 Fri, Mar 22, 2019 at 6:27 AM Christoph Hellwig wrote: > > On Wed, Mar 20, 2019 at 05:04:58PM -0700, Alistair Francis wrote: > > > Well, it starts at 0x00, but the first one is reserved. If you think > > > that is too confusing I'd rather throw in a comment explaining this > > > fact rather than making the calculating more complicated. > > > > It doesn't mention that it starts at 0 when you look here: > > https://sifive.cdn.prismic.io/sifive%2F834354f0-08e6-423c-bf1f-0cb58ef14061_fu540-c000-v1.0.pdf > > It doesn't say that. But it is completely obvious from the map, > and from how everything else works. In this case I think the > documentation is simply written in a confusing way, and we need to fix > it once we have an official riscv spec level documentation of this > hardware. I agree that the documentation is written in a confusing way. In saying that we make it even more confusing by not following the documentation and doing something different, which is what we are doing now. If the documentation changes in the future we can update the code to make the new documentation but at the moment I think it makes more sense to match the documentation. It makes it a lot easier to compare the code and the documentation when they match. Hopefully that can avoid and off-by-one index issues as we have seen recently. Alistair