From patchwork Mon Oct 14 09:56:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 176138 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp4287117ill; Mon, 14 Oct 2019 02:59:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqwrRImOnypnCxKG7MykL6RaXkyhv55ROxuEFWtsZ1YUqwmkSsyq+X7AWFzDeiRHdG3OaB4f X-Received: by 2002:aa7:d888:: with SMTP id u8mr26461433edq.144.1571047197691; Mon, 14 Oct 2019 02:59:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571047197; cv=none; d=google.com; s=arc-20160816; b=JoI2ojR8yNTZSKI5Pgml1Wy8iwHFQ4iLPl7Km3a2RprzEYAtqCsyMEIo/y0NlELdU9 JjG7K66PBQG33QzmctIlsQCtHAZ3CBFkL19tr/T1YE7ZQY70h4cn43A/ywWc2fRIrVdt TrbrqlaPz4nCuGNbWn8ULLlT0euSxcCpsx+oASkxk9rTeEcpQydHTA0KFV1iJcl0Lz5R g2tsUCPwY3P6ZDUEPiqGW0+KQw7WymG/Pd3M/HnYWLSp8bXAhwp+zfJ/K5RVES5TDpT0 BOxi/ecoeeVngyF4WfKKL5FOf+F1FRLH+jRNLiB97urdJP8WW3UNz72xWY9mAwr9E9Hi dvag== 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=itWfEDFvBNRC/ls1Lvxd0gZ0jzKzA1okUT6J9DLtdLk=; b=Dzz/PNGzjpJCDCn2lJ020y9PV2PY+z3RzkG5wKBIP6eSC2M2v8UH2PoXnJuT+FJ6yP NVS0MG6F0t5zpJcpN6EGiPeKM5yfL7YcHvMO8t+AB8Is/3S+q1CKuXAl5RsNNlHgIn66 OS1UMFT8qMxMoRK6Z91TfHuGgHcH3mVCZxUrMyVab48XJ3WoRTJ7zx/hfulYJz5bCMKZ 1a5X8KxjIUl/eO8BTAOTA9QoeXvi/D9HfmFeQQnpUU0Ou+ljgbuxRthgXyVJTr3wBwsj ZHTMCtaOib7I3qivyRZns+2/US9GJecqV2g/D7slhz0ruKiIETlU8EuhyZNDp5vv57d3 xnuw== 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 27si10771830edz.186.2019.10.14.02.59.57; Mon, 14 Oct 2019 02:59:57 -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 S1731267AbfJNJ74 (ORCPT + 10 others); Mon, 14 Oct 2019 05:59:56 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:3748 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731107AbfJNJ7x (ORCPT ); Mon, 14 Oct 2019 05:59:53 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 0A314F38F338664DE634; Mon, 14 Oct 2019 17:59:51 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.439.0; Mon, 14 Oct 2019 17:59:42 +0800 From: John Garry To: CC: , , , , , , , , , , , , , , , , John Garry Subject: [PATCH for-stable-4.19 0/3] ACPI, arm64: Backport for ACPI PPTT 6.3 thread flag Date: Mon, 14 Oct 2019 17:56:23 +0800 Message-ID: <1571046986-231263-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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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: https://lkml.org/lkml/2019/10/10/724 Erik Schmauss (1): ACPICA: ACPI 6.3: PPTT add additional fields in Processor Structure Flags 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/acpi/actbl2.h | 7 +++-- include/linux/acpi.h | 5 ++++ 4 files changed, 77 insertions(+), 6 deletions(-) -- 2.17.1