Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1474836ybh; Fri, 13 Mar 2020 01:48:21 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtw0ovlQjPWcpdPEmOH3PI20qAwsHg0KprkLw8RK4dzHrVzgHuzhZ092CduMVtYOATDCbi2 X-Received: by 2002:a9d:7d89:: with SMTP id j9mr9280433otn.47.1584089300886; Fri, 13 Mar 2020 01:48:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584089300; cv=none; d=google.com; s=arc-20160816; b=W3Vq1FxUa9WHEB4yXj2g/diW8P3xmTj5C5EfOwfLKQoLFMMMt7JvvrfhYkMyEWoNdq M2c8II+E0vsYy9z5Myzly0IqC7PzHuxqDSos4tjnMNLeEt0r/9WZgnFd9mc6PPlR1Ng4 +zv946suLy243tluhKrRM7pOG7W4Dm+Lqf+I2FnZAKoGHr+EvfM4Xmh3CK8HO3J96t58 itkiDy25KsCM1DkUkm6fqDu0lCz3GOzxAdULAwIBf5FvbLtR/8F114UdNIdDupQiS/Dg yeSXNZC1PCV4mH8TW0zOX3dMLPsV7XiUfabG2zkoJSRkI4ho+s69okzCqQIPoOiXTop+ e9wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=M+tfLlw4ezD3QAzXbR2YOIRmgaAb5MX0/1YWDChZg/0=; b=wunx1i39Jsi+OLYNDxEHsK5REUwjsLZRrXzqaG60fziN3K+dS94fAunoii/dlioN1r ZCZvO1Y+7Bf+Ae2j7CRy24nEwdKL0AgAmArXMVqBF9VBqLWyv2PFr66uMX9tB1pHoNMx H6WYDsoYpVWRGE4r9grX0ZJx3I+bof3rInYVTYexyojzW2bEAdwKTXVVvjL0Ak01XUU2 idyamvJa5rdTBqoC7VIYaFsWmBx7IE2toMPE9oPhlKZQ+/+DSeMeP0NX6/Eh1oG2g0An TvMYTypLr6IBWzoKGFalasbXDIryJsUCkhmU3OsoACuVR4JKY0hcKw+CMZC9g8N57KYn WrHQ== 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 u4si3885286oic.115.2020.03.13.01.48.07; Fri, 13 Mar 2020 01:48:20 -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 S1726423AbgCMIrU (ORCPT + 99 others); Fri, 13 Mar 2020 04:47:20 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:55868 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726364AbgCMIrU (ORCPT ); Fri, 13 Mar 2020 04:47:20 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 45FAC149D649E8748D21; Fri, 13 Mar 2020 16:47:16 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Fri, 13 Mar 2020 16:47:06 +0800 From: Shaokun Zhang To: CC: Nianyao Tang , Thomas Gleixner , Marc Zyngier , Shaokun Zhang Subject: [PATCH] irqchip/gic-v4: Fix non-stick page size error for setup GITS_BASER Date: Fri, 13 Mar 2020 16:46:35 +0800 Message-ID: <1584089195-63897-1-git-send-email-zhangshaokun@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nianyao Tang There is an error when ITS is probed if hw GITS_BASER<2> only supports psz=SZ_16K while GITS_BASER<1> only supports psz=SZ_4K. In its_alloc_tables, it has updated GITS_BASER<1>.psz and uses psz=SZ_4K for setup GITS_BASER<2>, and would fail in writing GITS_BASER<2>.psz=SZ_4K. 4K PAGE is the smallest and shall stop retry for other page sizes. That latter GITS_BASER.psz is larger than former, will lead to similar error. [ 0.000000] ITS@0x0000000660000000: Virtual CPUs doesn't stick: ba1f0824404004ff ba1f0824404005ff [ 0.000000] ITS@0x0000000660000000: failed probing (-6) [ 0.000000] ITS: No ITS available, not enabling LPIs From GIC SPEC document, it's allowed for this implematation, the latter GITS_BASER.psz is larger than the former. Let's fix this error with following patch. Cc: Thomas Gleixner Cc: Marc Zyngier Signed-off-by: Nianyao Tang Signed-off-by: Shaokun Zhang --- drivers/irqchip/irq-gic-v3-its.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index 83b1186..59bf8d6 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -2341,7 +2341,6 @@ static int its_alloc_tables(struct its_node *its) } /* Update settings which will be used for next BASERn */ - psz = baser->psz; cache = baser->val & GITS_BASER_CACHEABILITY_MASK; shr = baser->val & GITS_BASER_SHAREABILITY_MASK; } -- 1.9.1