Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp9055751ybc; Fri, 29 Nov 2019 23:42:02 -0800 (PST) X-Google-Smtp-Source: APXvYqwYHJH2AgqYuVmNQvO+KNK7ihmHobN05oG/w26DcdX7nJb1pPy8yTruGiTyGrMEJxnC1Mmm X-Received: by 2002:a05:6402:1a50:: with SMTP id bf16mr50331228edb.116.1575099721918; Fri, 29 Nov 2019 23:42:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575099721; cv=none; d=google.com; s=arc-20160816; b=eVtCqO5jZtlFe0x6hmGcB24y1OF9TxwTqeEZDzC2wg7lFCxHVS7hBmqBMtDC4OEjtz qA5NA0KnEzIsX0Nq80dXJC3uNps5oVXLc8ChUb1jWNSLAqpScrm6PNOtf84TWjD+tnsu RA1d7vdhoPE5OZFofKyFhUyrtA/cyYc2Z6MKX10ZHbu0hajloneISFhqciQTLP8pqPkP qb3WlUYlTCzPzjyHtDB2NTze+hbAmughgUJjs6tORHHMO6hT/DK1JklavnRcf0Urnfcr rbXA0CpqaE1cP9upZHnfZLQ2eUH0CASPBx74Rh+7pofjsIvMdlWk1YhxRUguqUHR3bE4 8ewQ== 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; bh=tIj11A/P3rsgtNMoKCQsvmLuY42bsnQNbCZihLrxLH8=; b=XP47X3O7ek5iU/Y7+xXnquVwDIt2CmHe26q33fhKLkD3UkyflY/RhcCS8VVA5eXc+B GTKcA838CpTIy0gJwx01WrNGxV7Ail+IcXcOD/ox5A4CHmg0lOT3kH6VDnlTDIxxvaJD 6OgVAVGBucRXvg4DXaBT6PeYyT0Cc2bQZIzghM5pZjkqP9t51rrb7SJc1/WwC4tvWH9s ThOmZ6naycscvOTU6tHYQb4Pw5QfN8H91oE1dmpi9YLkzp0DvCenaSKOElfJa13peAt4 94b8Nx1tJDJPWSMVwbhnM1kBGh2mSUoitaOQZeC1G9wItQPXc9f1e8U2Y4tXTiQt2pat dJEQ== 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 d9si16151796ejw.65.2019.11.29.23.41.38; Fri, 29 Nov 2019 23:42:01 -0800 (PST) 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 S1725944AbfK3HkK (ORCPT + 99 others); Sat, 30 Nov 2019 02:40:10 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:55950 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725298AbfK3HkK (ORCPT ); Sat, 30 Nov 2019 02:40:10 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 171D3264E0EC660DB655; Sat, 30 Nov 2019 15:40:04 +0800 (CST) Received: from linux-XCyijm.huawei.com (10.175.104.212) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Sat, 30 Nov 2019 15:39:54 +0800 From: Heyi Guo To: CC: , Heyi Guo , "Thomas Gleixner" , Jason Cooper , "Marc Zyngier" Subject: [PATCH] irq/gic-its: gicv4: set VPENDING table as inner-shareable Date: Sat, 30 Nov 2019 15:38:49 +0800 Message-ID: <20191130073849.38378-1-guoheyi@huawei.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.104.212] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is no special reason to set virtual LPI pending table as non-shareable. If we choose to hard code the shareability without probing, inner-shareable will be a better choice, for all the other ITS/GICR tables prefer to be inner-shareable. What's more, on Hisilicon hip08 it will trigger some kind of bus warning when mixing use of different shareabilities. Signed-off-by: Heyi Guo Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier --- drivers/irqchip/irq-gic-v3-its.c | 2 +- include/linux/irqchip/arm-gic-v3.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index 787e8eec9a7f..d31e863bc9ef 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -2831,7 +2831,7 @@ static void its_vpe_schedule(struct its_vpe *vpe) val = virt_to_phys(page_address(vpe->vpt_page)) & GENMASK_ULL(51, 16); val |= GICR_VPENDBASER_RaWaWb; - val |= GICR_VPENDBASER_NonShareable; + val |= GICR_VPENDBASER_InnerShareable; /* * There is no good way of finding out if the pending table is * empty as we can race against the doorbell interrupt very diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h index 5cc10cf7cb3e..a184f875e451 100644 --- a/include/linux/irqchip/arm-gic-v3.h +++ b/include/linux/irqchip/arm-gic-v3.h @@ -289,6 +289,9 @@ #define GICR_VPENDBASER_NonShareable \ GIC_BASER_SHAREABILITY(GICR_VPENDBASER, NonShareable) +#define GICR_VPENDBASER_InnerShareable \ + GIC_BASER_SHAREABILITY(GICR_VPENDBASER, InnerShareable) + #define GICR_VPENDBASER_nCnB GIC_BASER_CACHEABILITY(GICR_VPENDBASER, INNER, nCnB) #define GICR_VPENDBASER_nC GIC_BASER_CACHEABILITY(GICR_VPENDBASER, INNER, nC) #define GICR_VPENDBASER_RaWt GIC_BASER_CACHEABILITY(GICR_VPENDBASER, INNER, RaWt) -- 2.19.1