From patchwork Fri Apr 12 14:37:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 788344 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C285E142623; Fri, 12 Apr 2024 14:38:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712932702; cv=none; b=XutIL53/2isMUDsDOCGzb8hImp6MroJvetjIQoKn5OQMuvsgNWno/Y9tmRcdcJ8hVAgoGmoWJES+QP2Se/9jS8H8qReHduE0i7wnj38pzpIRRIar3sJ1pji9k+aV4Bqw/tMT1LS30iL7nMSq8TRYBEdYSGZbN1LCQQ5gYOzGr1U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712932702; c=relaxed/simple; bh=Y6N87qdluStjjtDyl26RLbGczWjBXCsKIsJelBr7mFI=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Ip4gRcB5p/imJ7A9VfQNAEJLcSP/yqYG6ocKX/3PxkbCiybfZS+qvxEeCajWbEBQInUqyMVW1OM2wiba6XWAHqZmtP2WYND65LIXtxCUe1oSh27VUik5m7qw941+NKukIwd3HruON5s7QNNkDneHyyFOFOLYFs6h4kvTVpR+PO8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4VGJvr2ZTxz67MmR; Fri, 12 Apr 2024 22:33:28 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id B2C66140A87; Fri, 12 Apr 2024 22:38:18 +0800 (CST) Received: from SecurePC-101-06.china.huawei.com (10.122.247.231) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 12 Apr 2024 15:38:18 +0100 From: Jonathan Cameron To: , , , , , , , , Russell King , "Rafael J . Wysocki" , Miguel Luis , James Morse , Salil Mehta , Jean-Philippe Brucker , Catalin Marinas , Will Deacon CC: , , Subject: [PATCH v5 02/18] ACPI: processor: Set the ACPI_COMPANION for the struct cpu instance Date: Fri, 12 Apr 2024 15:37:03 +0100 Message-ID: <20240412143719.11398-3-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240412143719.11398-1-Jonathan.Cameron@huawei.com> References: <20240412143719.11398-1-Jonathan.Cameron@huawei.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: lhrpeml500006.china.huawei.com (7.191.161.198) To lhrpeml500005.china.huawei.com (7.191.163.240) The arm64 specific arch_register_cpu() needs to access the _STA method of the DSDT object so make it available by assigning the appropriate handle to the struct cpu instance. Signed-off-by: Jonathan Cameron --- drivers/acpi/acpi_processor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index 7a0dd35d62c9..93e029403d05 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -235,6 +235,7 @@ static int acpi_processor_get_info(struct acpi_device *device) union acpi_object object = { 0 }; struct acpi_buffer buffer = { sizeof(union acpi_object), &object }; struct acpi_processor *pr = acpi_driver_data(device); + struct cpu *c; int device_declaration = 0; acpi_status status = AE_OK; static int cpu0_initialized; @@ -314,6 +315,8 @@ static int acpi_processor_get_info(struct acpi_device *device) cpufreq_add_device("acpi-cpufreq"); } + c = &per_cpu(cpu_devices, pr->id); + ACPI_COMPANION_SET(&c->dev, device); /* * Extra Processor objects may be enumerated on MP systems with * less than the max # of CPUs. They should be ignored _iff