Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp838178ybk; Wed, 13 May 2020 14:38:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCP/eyRgfw7RRhQFcO9LTKmko3bRLvNT8XzoPlRdJC2siG68USdqwZuLBoUrzMg+7ALr5o X-Received: by 2002:a17:906:724b:: with SMTP id n11mr996087ejk.355.1589405891153; Wed, 13 May 2020 14:38:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589405891; cv=none; d=google.com; s=arc-20160816; b=FVlBOJsM1RaWDpCluLw+/S5eCYsbNW53MD1RDSNpMm7VfzGcuEg97GPo3pQ9UcuJoi XNWCz0iKuSZeoX1q7dISN3LEbJ4I7mTZwbnpVxNLBGinV1mM0SonvHHwpxr/zMdyhHlY VAovDUlnZLIYm/KNQuzjh0IsvW3QmKDC+wFG5gRfU53OrMNpsy7yNAN1UMrz/whp8W5I ML4RwFdvLT2PzSqROcUMIYroLXF0u4iglt+OaZeWkVN3yprSzOPBz7c2qceqqfUhwwKy 4ZLdaoTzYwSbsiWDsQwnk6Ff3Tp+d0y+rO1DYuLH+otoElboyUswIUHscUWixwH4zjG0 2NtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=LQvZ3cnoxWWWtAQPX/y16TnIryLF7O8ppBXXbOpkfJE=; b=IS99X/JOKVbwM6m8JD9MNpvgabt71NgrUk3M+q/PD/o1GQm6B9JdaAN3pCelBmC46W HYdGp+Chts4c8Zm4atNfFYExzynyZkSA0eVOFl9wVNnJWAbjAcZvfrsnpna6zQtuCsDy 2Vuy4MaScmdAwcOC9u5jqrdTjc6dCAymL0huMrR0Jq9u7sFvjXj1IfMToMjsZVAPGeSl 6aYe5QP9wpMAzPyTKOIjNQ9HPv9F1c8bgesH2WAkwN2xWX2S00hS9fcdZp5fGS6HotV/ Ehrv902jNj7UqD2Bucfu1eDFEbOfQfaNADxUXeYhYERxVOlSMK+VphJnCXxEpq2zFwax DFyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dabbelt-com.20150623.gappssmtp.com header.s=20150623 header.b=iFgMMOoR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k12si495039edj.143.2020.05.13.14.37.48; Wed, 13 May 2020 14:38:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@dabbelt-com.20150623.gappssmtp.com header.s=20150623 header.b=iFgMMOoR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728954AbgEMVeO (ORCPT + 99 others); Wed, 13 May 2020 17:34:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728711AbgEMVeO (ORCPT ); Wed, 13 May 2020 17:34:14 -0400 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEECDC061A0C for ; Wed, 13 May 2020 14:34:13 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id u15so341312plm.2 for ; Wed, 13 May 2020 14:34:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20150623.gappssmtp.com; s=20150623; h=date:subject:in-reply-to:cc:from:to:message-id:mime-version :content-transfer-encoding; bh=LQvZ3cnoxWWWtAQPX/y16TnIryLF7O8ppBXXbOpkfJE=; b=iFgMMOoReZ85Q2Uo0jGImdbsoBegv49w87WiEqZhNYhvoog2bsz4o7CTmTLm4XieeO ftN9bDcc6DdF8g75K7+/B8AxEBdwcSwArR3cx8osqD/HZUKQIL30MKHIyvE4kfLfZv0e WHs5SKUsoKUegLPENvjP/IrrAoV/vZo88hU1ekN0L5yIyZDqBURGPxKqPWHQBxUH5AU8 O/q8slAIWWgn4KCx7SlRdflaVne3T6kK9DAH6MJ+jYRcrlWjnvxApbpGt2v0ozBMIoy7 kLowFy2v1voohCXt+Xyvm16PrqX4LdZu8yaSd82XbS4SewWsn9iTNMhbX/pZv0X57lK+ jh+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=LQvZ3cnoxWWWtAQPX/y16TnIryLF7O8ppBXXbOpkfJE=; b=d0/QDQsHhOOynYU0b86Jep9ccijKOaewISS49iP8gDk7o5dneteKEgjEe0ueo7stBt 82Uj/P5qdRV7YpsyOD+wY3t4tQVLy8l13Oqz6KCEDmu4fAg269ocoXbXlEUmoZEEO9wt z7KM9ubN8ZPN3gzHi4zloTfO+rbFYhmYuvYTXOyTehR4C63hmIpjEvdxx84YQ9/ydTJ6 34Jotss9+K3v+6aQR+k7cau2VAPKcohbXo6T/lUUUYf6P9K9mzdUavm9eNrhfVqjdHE8 Ia0CfPU5xEomQ5rbFUpvmpUmqU+Lw02I4m+tlMpx1d+32+4u65naNx7uU/DdLqGgmiF6 GJbQ== X-Gm-Message-State: AGi0PubAI8GKV8D+XSM687JWLB6oMrAdrRlar3ExlquPqLTlz26AlojE BjUkcZYMyeBWxa+ZxE8hRoFLyYnxoR4= X-Received: by 2002:a17:90a:4e5:: with SMTP id g92mr36920442pjg.148.1589405652819; Wed, 13 May 2020 14:34:12 -0700 (PDT) Received: from localhost (76-210-143-223.lightspeed.sntcca.sbcglobal.net. [76.210.143.223]) by smtp.gmail.com with ESMTPSA id r21sm16167599pjo.2.2020.05.13.14.34.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 14:34:12 -0700 (PDT) Date: Wed, 13 May 2020 14:34:12 -0700 (PDT) X-Google-Original-Date: Wed, 13 May 2020 14:33:02 PDT (-0700) Subject: Re: [PATCH] irqchip/sifive-plic: Remove incorrect requirement about number of irq contexts In-Reply-To: <20200512172636.96299-1-atish.patra@wdc.com> CC: linux-kernel@vger.kernel.org, wesley@sifive.com, Atish Patra , jason@lakedaemon.net, linux-riscv@lists.infradead.org, Paul Walmsley From: Palmer Dabbelt To: Atish Patra , Mark Zyngier , tglx@linutronix.de Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 12 May 2020 10:26:36 PDT (-0700), Atish Patra wrote: > From: "Wesley W. Terpstra" > > A PLIC may not be connected to all the cores. In that case, nr_contexts > may be less than num_possible_cpus. This requirement is only valid a single > PLIC is the only interrupt controller for the whole system. > > Signed-off-by: Atish Patra > [Atish: Modified the commit text] > Signed-off-by: "Wesley W. Terpstra" > --- > drivers/irqchip/irq-sifive-plic.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/irqchip/irq-sifive-plic.c b/drivers/irqchip/irq-sifive-plic.c > index d0a71febdadc..822e074c0600 100644 > --- a/drivers/irqchip/irq-sifive-plic.c > +++ b/drivers/irqchip/irq-sifive-plic.c > @@ -301,8 +301,6 @@ static int __init plic_init(struct device_node *node, > nr_contexts = of_irq_count(node); > if (WARN_ON(!nr_contexts)) > goto out_iounmap; > - if (WARN_ON(nr_contexts < num_possible_cpus())) > - goto out_iounmap; > > error = -ENOMEM; > priv->irqdomain = irq_domain_add_linear(node, nr_irqs + 1, Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt I'm assuming this is going through the irqchip tree. Thanks!