Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1954580rwd; Mon, 15 May 2023 05:32:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5JiRAYnx/dM1FGatDwwqwQkQ1d+MaPj1OCH1VcxKvF4OaYyU9LuOD7s/bt5f1sBOXTtJQR X-Received: by 2002:a17:90a:684e:b0:24e:27a:e91f with SMTP id e14-20020a17090a684e00b0024e027ae91fmr40884298pjm.11.1684153967554; Mon, 15 May 2023 05:32:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684153967; cv=none; d=google.com; s=arc-20160816; b=JW8vcOKQVTXwX7Q/9CDX1doEXf4uxSlTbfkfLIx+jh2xAvkLMI9yn5rzPyW07OWKEo YnUtr4Ikj5OsYm37qnP/SnxWy6EK++yDLFh+eptrOB2OW6fjFOTlII6r3UqB4FVkM58C xBxkHCBVMp57tNTmqPQ5jkQnv6w/oj/eGVJRHS2qBF1uK4rW9H2OlAENXEEuSot+tb7N XBC6fjcl9DytDBKmeGExfQlClurgsppPOKiJsLfjvaHM5IS3SOuM9rkkNwpI8DUiLfaF Q2swZMVEMxddUwDaIyM/hv1sWYmejymMX2gftmwcCM9Un4OjXsYPBclpsQUp/y/r2+7F B5xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=xqB1HEkPZpGvtfCkcHEYX5FGj/tivz9e+OfN69sgbAc=; b=wU9Undi5NK/I36vf+D7IaxbJ+LO3IEuVIgzufoKI+e+jR8RFhtT3xvrYtzSZlkKJKj p7uOzbPUKmv93t12kBL1tKIjJRhfUTlRydBHTmgcOuQeuvkPtQLhwL6YlUzaxg8u2ZJ4 sgzfqpz/wsHU1hhBhyPaPSRA9zfCWfgRSVwWxTSlxPmZWIp3P3ncTihZXCRscPl/yhiM lUY6jMWpIYIhsHlH9fh7AsW63iPxYRd5SA0eAhwTMEvYn8Gwn6hPEhf7WDlKmX34tSGb CSgHUTDOZBzta1HiJMZUS7hXcZLN1NZ6nduEV48GU+1cMtlrAuX1ulocJU2pKpqPJW8L 3UUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=hisilicon.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j192-20020a638bc9000000b0052c844f06c1si16489021pge.460.2023.05.15.05.32.35; Mon, 15 May 2023 05:32:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=hisilicon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241572AbjEOMPD (ORCPT + 99 others); Mon, 15 May 2023 08:15:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241710AbjEOMOw (ORCPT ); Mon, 15 May 2023 08:14:52 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 234D0E50 for ; Mon, 15 May 2023 05:14:50 -0700 (PDT) Received: from dggpemm500003.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4QKdV231LczTkjW; Mon, 15 May 2023 20:10:02 +0800 (CST) Received: from localhost.localdomain (10.28.77.120) by dggpemm500003.china.huawei.com (7.185.36.56) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Mon, 15 May 2023 20:14:47 +0800 From: wangwudi To: CC: wangwudi , Thomas Gleixner , Marc Zyngier Subject: [PATCH] irqchip: gic-v3: Collection table support muti pages Date: Mon, 15 May 2023 20:10:04 +0800 Message-ID: <1684152604-12621-1-git-send-email-wangwudi@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.28.77.120] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm500003.china.huawei.com (7.185.36.56) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Only one page is allocated to the collection table. Recalculate the page number of collection table based on the number of CPUs. Cc: Thomas Gleixner Cc: Marc Zyngier Signed-off-by: wangwudi --- drivers/irqchip/irq-gic-v3-its.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index 0ec2b1e1df75..dfdeba86b9aa 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -2626,6 +2626,10 @@ static int its_alloc_tables(struct its_node *its) indirect = its_parse_indirect_baser(its, baser, &order, ITS_MAX_VPEID_BITS); break; + case GITS_BASER_TYPE_COLLECTION: + indirect = its_parse_indirect_baser(its, baser, &order, + order_base_2(num_possible_cpus())); + break; } err = its_setup_baser(its, baser, cache, shr, order, indirect); -- 2.7.4