From patchwork Mon Oct 14 11:56:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 176201 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp4411452ill; Mon, 14 Oct 2019 04:59:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqyeieHO+llfzFLPuasF33J+KpSpIbzPA7pEXMzEhSc/8IwKaFjRYE2GRiuYcs6ceG7qGy1P X-Received: by 2002:aa7:c301:: with SMTP id l1mr27582897edq.281.1571054348487; Mon, 14 Oct 2019 04:59:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571054348; cv=none; d=google.com; s=arc-20160816; b=muj0WL0YEGD9gH/tMXrkB7rACS7fWzlo0wz6nKvUTKS7/DdDe7t0byBzYex1LPEwi9 j6l+1jdrICnFZq+dJICr/AHjnLf0zddCqqeGt4r/ORaxucFQjAhu1itVbaTLkJUFzOQB 5pKFiKPX6p9lwuxA0uzKFZiMSaodcbtmfD2f253rfU5cOumfzYjR9laYyDpPl/ePlK5V 2mCMW8DuWnlKCzu8VUPDMVFl3m3OEoIpS0bMTU1So2BhGW2eiVBmoc75cSjK23o+uo/H EXDc6egpBsID/4uOccGlIjCE6EoR1LCojEeCfaIX68mQrSBmXJiwoNhGlOzBaG3RhFKG LmTw== 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=14pdMnbPkPd/sTEJMYozl1Z7odRuXJeSNt85D8ywrM8=; b=Z/NjQteauRojRMIGe7jN2/dleXU1ZdK+ofxD3nDTB1zNCeqUZciWA1y24oxC0alHrY 1XNTxfAan2lr8iOXtU7pU+KfrBRAUa4okQG4gVPGIQ1MLVJNH3OieXOWh0F1wXZfk4rP 76e27StrV/AiEtXMJUBW0/2X9OWqE8ewRq1V+8eTK7QvoQ4fm+h7VKZq1tlQ2rNtz562 nDrYsMDRUg1skJqfvjvmNuX8x5Ztxdbo/XyNuWa3D/D0tF77fGXQBpEETQT4RDiEdpRe W2rkiqG1jc2+xvzq77vtF+DgGd/pF7Dum+tiS1yhLEln+bUxLKMkwnMdpJU+p6pvHsrq qwhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-acpi-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 g21si10532934ejk.23.2019.10.14.04.59.08; Mon, 14 Oct 2019 04:59:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-acpi-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-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731463AbfJNL7H (ORCPT + 7 others); Mon, 14 Oct 2019 07:59:07 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:37270 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730846AbfJNL7H (ORCPT ); Mon, 14 Oct 2019 07:59:07 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 646B9771B8439148885A; Mon, 14 Oct 2019 19:59:05 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.439.0; Mon, 14 Oct 2019 19:58:59 +0800 From: John Garry To: CC: , , , , , , , , , , , , , , John Garry Subject: [PATCH for-stable-5.3 0/3] ACPI, arm64: Backport for ACPI PPTT 6.3 thread flag Date: Mon, 14 Oct 2019 19:56:00 +0800 Message-ID: <1571054162-71090-1-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 X-Originating-IP: [10.67.212.75] X-CFilter-Loop: Reflected Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org This series is a backport of the ACPI PPTT 6.3 thread flag feature for supporting arm64 systems. The background is that some arm64 implementations are broken, in that they incorrectly advertise that a CPU is mutli-threaded, when it is not - the HiSilicon Taishanv110 rev 2, aka tsv110, being an example. This leads to the system topology being incorrect. The reason being that arm64 topology code uses a combination of ACPI PPTT (Processor Properties Topology Table) and the system MPIDR (Multiprocessor Affinity Register) MT bit to determine the topology. Until ACPI 6.3, the PPTT did not have any method to determine whether a CPU was multi-threaded, so only the MT bit is used - hence the broken topology for some systems. In ACPI 6.3, a PPTT thread flag was introduced, which - when supported - would be used by the kernel to determine really if a CPU is multi-threaded or not, so that we don't get incorrect topology. RFC originally sent for 4.19: https://lkml.org/lkml/2019/10/10/724 Jeremy Linton (2): ACPI/PPTT: Add support for ACPI 6.3 thread flag arm64: topology: Use PPTT to determine if PE is a thread arch/arm64/kernel/topology.c | 19 ++++++++++--- drivers/acpi/pptt.c | 52 ++++++++++++++++++++++++++++++++++++ include/linux/acpi.h | 5 ++++ 3 files changed, 72 insertions(+), 4 deletions(-) -- 2.17.1