Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2886776ybk; Tue, 12 May 2020 10:28:48 -0700 (PDT) X-Google-Smtp-Source: APiQypLR0hgy0fLusoVo/ANcl+bBRSzt44XApD5L62zVwqE86alLAVoHjqWNU3OZ0rwJsmbDRAlw X-Received: by 2002:a17:906:9706:: with SMTP id k6mr19429174ejx.103.1589304528405; Tue, 12 May 2020 10:28:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589304528; cv=none; d=google.com; s=arc-20160816; b=Sa0wl6zHf3cfrnclbPgkAwXfG2gHfkaLL5KWLL7SEvI24ZKK4eEA4dD9yOKo52F6Na JIdKg3g/HoHVWJoCLH0rrxn3YMr+oSpeUQgLBdDJTU/NzV4b7TWR5bMbc71XPRCyiIcn ebxujVDDa9IITq9Ayogji+8XaGqrkol9S4JyVhJnHC677X4n2A7YHpKDOnZXcow7JEkY p/L/wKcN5SB89eAyu2aYMpXDoPCH0ABnwMbOd0fMj0qbbBnXU1drHAiEtXRzfxzq7Mym mlwiq4GcmFqwCxY9qqwYC4BaZsWMpW9Hb+uvNewCFhsceYlMy7kpas6b0ZHfd4dwCoec ZP3Q== 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:date:subject:cc:to:from:wdcironportexception :ironport-sdr:ironport-sdr:ironport-sdr:dkim-signature; bh=ihEijElopu6eOurwB1Pey4kfpNkG9QrDKxk17lo5BLI=; b=qmp1w5kNT+Qy6YBowBgM72XRw9KYuUbg0WVCIbZr0bNDqEzF61rLtEVjs1HJdX0664 a2Z3vWRPRMTY+b4Hll6gDKzol+8ji7BBvzpfCGuQ93nSa/pwkAG73C4sZ14YkduJZ7Jk V1PfJBLuKD9gWIBfYXu3oIzcNRdn64r9GcIwFvHJsMMhmA6e7vd1jELsnw3VpbTHmNKQ 80a2hGPFUw8m/6bvHLFf3B/s2VCAPRZpXj4VPJQd6p+RNjxG1w7qiX9IPAGK8Y8V1nPJ 614F3uMYZv9DSb13iS2JmOOcIN4iMqyUmSssC8pYYccMsavL/11uHZepf7lUKYisDhNh mj2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=aBVyQTYz; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h17si1575432ejk.369.2020.05.12.10.28.24; Tue, 12 May 2020 10:28:48 -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=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=aBVyQTYz; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728049AbgELR1E (ORCPT + 99 others); Tue, 12 May 2020 13:27:04 -0400 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:13887 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725554AbgELR1E (ORCPT ); Tue, 12 May 2020 13:27:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1589304423; x=1620840423; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=pkopmhjPeLL3KurZFQqOAJKPug0srGyFJVNPAWCZUnQ=; b=aBVyQTYzzQeCa3ulPp7UArPo5tYqUjbfE/567e2A+soIvuv2arFPQ4Y2 pnsgy5ibHjthu6v5Ap/oaVxi46RrCuY7NOU7NpfH/olTx7O0qjWyUJPwh coVqGuul5Kb3I0tOHxPHZYyr6vtT3KapMTpI7qHyqZFjpRgWvAm3LQXOq adEePkIxFZS7l14zjTpbXkOaeiut66Lb0TC5pbHfGd0Zt2ah1a1cNZtQ2 t4OKWHPziqNOthl7iuWz8ScxCAsmHpqDYlKZ09qUnJj7Ugp/K8+1Mq1fW uC9ETRjjUQbc4zAVqCpr/AX9RICb4VGNAK8hQCgAuBPnqvtXyl/5/0ucs g==; IronPort-SDR: 1r4QnSuc1yxQ0DdW5JTtqDdRKNDdK5/dYxCq6i1a2RtQXbDRADs1dIINKGH78ae8Hxg58/4sqd BbugRZ3MmTJjPvPZmRiEThdz85Vr2DLL1wueBk7l262JvIuqj8zj5bQcsHYLofwXQCD+vMe44Q 46ti7W2LFirO7tv2QhRLvWbzcheUSPbfa5RT+U6FTzlgKWDUTHLbUAddXOa/NXaGmjna7ATpEJ FHJz/NovxC+87ANjGdE8k0XZZsiUfVdrWTX33LXI7vvIuW27MyzI4FFbmhMf6iOjfaM8PknfqV Kfw= X-IronPort-AV: E=Sophos;i="5.73,384,1583164800"; d="scan'208";a="246447462" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 13 May 2020 01:27:03 +0800 IronPort-SDR: X/0pjPIPd4QjGcGAekcOIT6SDFQ2yZMz6X1o37FSnUlsiabHcagaeLgDoJvB0WXYZhtQlWTl+m eCfQ4VApc4Mc21YIPgjKSBTvHfl9J6DaA= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2020 10:17:19 -0700 IronPort-SDR: 2ejtzASysWYYZdITFELGb9zYXq8bhGjmDZIhqQerDQZ0ODBXymb1YEIFDwnpa3m4RQhiDcNDdj sHsrvCZ1Dsyw== WDCIronportException: Internal Received: from unknown (HELO yoda.hgst.com) ([10.86.57.98]) by uls-op-cesaip01.wdc.com with ESMTP; 12 May 2020 10:27:03 -0700 From: Atish Patra To: linux-kernel@vger.kernel.org Cc: "Wesley W. Terpstra" , Atish Patra , Jason Cooper , linux-riscv@lists.infradead.org, Marc Zyngier , Palmer Dabbelt , Paul Walmsley , Thomas Gleixner Subject: [PATCH] irqchip/sifive-plic: Remove incorrect requirement about number of irq contexts Date: Tue, 12 May 2020 10:26:36 -0700 Message-Id: <20200512172636.96299-1-atish.patra@wdc.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, -- 2.26.2