Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5357710imm; Tue, 31 Jul 2018 09:34:19 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe9MqUjAyoGr13uHkngqTjaRM3j8vHLRIXpbujyRwmjrMVtQ0QLvgq65g9dgqDarr9IRvSu X-Received: by 2002:a63:dd09:: with SMTP id t9-v6mr21372101pgg.370.1533054859762; Tue, 31 Jul 2018 09:34:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533054859; cv=none; d=google.com; s=arc-20160816; b=tgQOtYK2Dv7AunXThYIkOt0tDwf6bGI2Dxjmoy2Xm9Pu4z/o12bNq9lsDcFFQyMjiR 4YCM2+6fkPcQml3FZ3ggdBXMHd9TEAWjP0s04uoHZLOXhSK7ZBTvY+CT/T7RKvGRePX0 fhJbC9xxBQIx5OoUFunYkEJrU3WjZE/LCSMdBixmm/k6BrxJJjJbu8egC0xP0WaxIgDZ jg0BXXIG/gxuEz6oMJfaUbAc67jIZTSBchzqrGEQEjz0zZkJCPe8+eTkqLVBiOujGAUR vbzGCM9BQfgbDgTgxJaIvQXZ3lQ668mjDshIpOkYunbtqPxk7B/tnHsFVFViZHUZ1oKZ OgHQ== 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=5PiFqTFYCxCkbd3eVFY9bHuj8lYmq/go3HRrb9pswoY=; b=ZAV9GBZoxhp7XO5TpSgYsW6ynXOOBFBxyHq4kb6trMC8b/kMnUN0fx3o+rdiTnjoEh CRe3tAdxGvT+p7o2IY6g/aCeANXCQmyNVBJr6k8OVx1xb1LQxaifEWVCGNjuHFeT1z8t ykl7MOQEpqz9UNLT/QRmN81VO8HjOeIg5jUGFexZbfTBucYNJKROForXz0EaE6vSACU8 ojSvoPcYEdbThlU1UCflDenP3njutlgv3T6Ew32lE7aX/wceG/8v7G+6odd/aC/u44V4 HFMLjloWzA76Ri3BS/AFjZcllnk9J6lusT0wmkBscV5KHNhx4z8Cvz4RnBLHzfK61rFH k8MA== 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 s10-v6si14030768pgh.6.2018.07.31.09.34.05; Tue, 31 Jul 2018 09:34:19 -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 S1732479AbeGaSOW (ORCPT + 99 others); Tue, 31 Jul 2018 14:14:22 -0400 Received: from verein.lst.de ([213.95.11.211]:58102 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727063AbeGaSOW (ORCPT ); Tue, 31 Jul 2018 14:14:22 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id D917B68D64; Tue, 31 Jul 2018 18:37:41 +0200 (CEST) Date: Tue, 31 Jul 2018 18:37:41 +0200 From: Christoph Hellwig To: Atish Patra Cc: Christoph Hellwig , "tglx@linutronix.de" , "palmer@sifive.com" , "jason@lakedaemon.net" , "marc.zyngier@arm.com" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "anup@brainfault.org" , "devicetree@vger.kernel.org" , "aou@eecs.berkeley.edu" , "linux-kernel@vger.kernel.org" , "linux-riscv@lists.infradead.org" , "shorne@gmail.com" Subject: Re: [PATCH 7/9] irqchip: add a RISC-V PLIC driver Message-ID: <20180731163741.GA2359@lst.de> References: <20180726143723.16585-1-hch@lst.de> <20180726143723.16585-8-hch@lst.de> <1b3f6066-0c7c-a5f5-75ad-559fe81091ee@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1b3f6066-0c7c-a5f5-75ad-559fe81091ee@wdc.com> 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 Fri, Jul 27, 2018 at 05:04:52PM -0700, Atish Patra wrote: >> +#define MAX_DEVICES 1024 >> +#define MAX_CONTEXTS 15872 >> + > > Is there any way we can preserve some of the comments in the original patch > about memory-mapped control registers or at least a reference where to find > the register offset calculations? The comments really do not help to describe a why or how. I'd love to add a reference to a spec, but I could not find anything that looks like an authoritative spec for the SiFive PLIC layout. >> + u32 __iomem *reg = plic_regs + ENABLE_BASE + ctxid * ENABLE_PER_HART; > > shouldn't it be > u32 __iomem *reg = plic_regs + ENABLE_BASE + ctxid * ENABLE_PER_HART + > (hwirq / 32) * 4; Yes, it should. Fixed. >> + if (unlikely(irq <= 0)) { >> + pr_warn_ratelimited("can't find mapping for hwirq %lu\n", >> + hwirq); > > Ratlimiting the warning message here didn't help as ack_bad_irq() still > print message still flooded the console without any useful info. I've dropped the somewhat pointless ack_bad_irq call, thanks.