Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4754473iog; Wed, 22 Jun 2022 05:20:47 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vdJXGYLQamYLYj7YL8aYi/MeoNy/JDPUd+kmV5tRZL1FM7+epnLB0qMBLPzQ5lXzeNNEoa X-Received: by 2002:aa7:cd17:0:b0:435:bd7e:2efb with SMTP id b23-20020aa7cd17000000b00435bd7e2efbmr628207edw.180.1655900447706; Wed, 22 Jun 2022 05:20:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655900447; cv=none; d=google.com; s=arc-20160816; b=oLbakjhYKvRX93JIzFIvgwIAFOC6eR8J50/Nvk7gSJEPGioojC6nI4Rv45f8k5lk9g r9G2aGHCvJ9CGK6quz0UYofIbIS9YGVUM8FEDhFTDM1zkVly67HhfSM/fxwFbN6xB+v8 RsSZVlw6kq7ac3MrbDXWYwQCyvanbjnu2H7wmLOqwe1Ohy8JK3VutO0x996vsBSheC5k PXY5K1/MD+PstEmzmzxZB48hddioWKGyuSUFhCk4cwqq+bc9IVkXj3QSbFxscyG+pZm3 hT/3m9uFrMns6hl1H7geQoJL037rpQGtYTe0+w+6zxCSeL0EhAF/t021hOL12zCi047L A1Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=9G0m5h5tEL+v3rqcpmcGX0SX814uyxHrxPQmImDaRts=; b=ZudCpaoSwSauvgwFwy286Y6n7SZxd+lr7DLQaPsZO79tw+T2tD/B7vNgx1W5J/HXCY 8ZRj+GJ7WAZ13JYUJkdvK0kFSkKEdWYzLnun1qhSYwf9FBysIZTxIXRkOj5TmF2+UvPf kKVSr8Z68S4Va5GC7qTsoIq93Zcc7Rvn0/R0Qch9zF1MbkDXD4uZm8BKR0+jFAkYXMmr 65jvEvxoOGcIZahsCSiCcsyaOEQfcQSy/zYhu5v1EJ2LdLGQOyRz3i6+DYD2l3G/lZLH vfpoA8aQ/eaEMey67UfXD3bw8B4yckzugZkr0PvSfIxO8Mt2Lz/u9P06Bpk6DAuOBFrX sT2Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i21-20020a0564020f1500b00435802cc2acsi2925239eda.616.2022.06.22.05.20.20; Wed, 22 Jun 2022 05:20:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357740AbiFVLrV (ORCPT + 99 others); Wed, 22 Jun 2022 07:47:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355742AbiFVLrT (ORCPT ); Wed, 22 Jun 2022 07:47:19 -0400 Received: from mail-yb1-f182.google.com (mail-yb1-f182.google.com [209.85.219.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8B7335256; Wed, 22 Jun 2022 04:47:17 -0700 (PDT) Received: by mail-yb1-f182.google.com with SMTP id u9so19580412ybq.3; Wed, 22 Jun 2022 04:47:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9G0m5h5tEL+v3rqcpmcGX0SX814uyxHrxPQmImDaRts=; b=WlJaD6vtA5MtJAwFtitGUPSzlmlJ1BS4V1u78iX5kPv5q0zLykM8eKVAKoem25tJAf syBh8O2kcXNVXNwY+51Dbe2vLwlhoXZOlvhlEgyrenNNyHMzRxWHT1bSxxnfYTze7x4q yMVh0iRZEwtiCbN/VqoOrfuyN15GDA4ikTGEngffnCnJQ+sQR3DwMrwTCOULf3BIVXb8 cIu+w270nhKwbE+wqq0YxfEycDbM+FCj8nCAG10dVQvs8yhHVzu1kSg6EaZEuzJgyQqe 403scAfyM1n0juBOKJxoH49wIgaD8AlCrNHBbFJJF35DTo+3I/QAUXHioMVw/73mQFdM tfmg== X-Gm-Message-State: AJIora+vJXC0s1gBExVVWDx7oN9Qob775TrroKPH1kOkBk94RQxG6UEz osJQiO/RVBs1X2h7L+aZ6o51ui0ShKZg92MfiTM= X-Received: by 2002:a25:d841:0:b0:668:ab2f:7b01 with SMTP id p62-20020a25d841000000b00668ab2f7b01mr3256535ybg.482.1655898437141; Wed, 22 Jun 2022 04:47:17 -0700 (PDT) MIME-Version: 1.0 References: <20220621192034.3332546-1-sudeep.holla@arm.com> <20220621192034.3332546-2-sudeep.holla@arm.com> In-Reply-To: <20220621192034.3332546-2-sudeep.holla@arm.com> From: "Rafael J. Wysocki" Date: Wed, 22 Jun 2022 13:47:06 +0200 Message-ID: Subject: Re: [PATCH v4 01/20] ACPI: PPTT: Use table offset as fw_token instead of virtual address To: Sudeep Holla Cc: Linux Kernel Mailing List , Greg KH , Atish Patra , Atish Patra , Vincent Guittot , Dietmar Eggemann , Qing Wang , Rob Herring , "Rafael J . Wysocki" , Ionela Voinescu , Pierre Gondois , Linux ARM , linux-riscv , ACPI Devel Maling List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 21, 2022 at 9:20 PM Sudeep Holla wrote: > > There is need to use the cache sharing information quite early during > the boot before the secondary cores are up and running. The permanent > memory map for all the ACPI tables(via acpi_permanent_mmap) is turned > on in acpi_early_init() which is quite late for the above requirement. > > As a result there is possibility that the ACPI PPTT gets mapped to > different virtual addresses. In such scenarios, using virtual address as > fw_token before the acpi_permanent_mmap is enabled results in different > fw_token for the same cache entity and hence wrong cache sharing > information will be deduced based on the same. > > Instead of using virtual address, just use the table offset as the > unique firmware token for the caches. The same offset is used as > ACPI identifiers if the firmware has not set a valid one for other > entries in the ACPI PPTT. > > Cc: linux-acpi@vger.kernel.org > Signed-off-by: Sudeep Holla > --- > drivers/acpi/pptt.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > Hi Rafael, > > If you are happy with this change, can you provide Ack, so that it can be > merged together with other changes ? No objections: Acked-by: Rafael J. Wysocki > diff --git a/drivers/acpi/pptt.c b/drivers/acpi/pptt.c > index 701f61c01359..763f021d45e6 100644 > --- a/drivers/acpi/pptt.c > +++ b/drivers/acpi/pptt.c > @@ -437,7 +437,8 @@ static void cache_setup_acpi_cpu(struct acpi_table_header *table, > pr_debug("found = %p %p\n", found_cache, cpu_node); > if (found_cache) > update_cache_properties(this_leaf, found_cache, > - cpu_node, table->revision); > + ACPI_TO_POINTER(ACPI_PTR_DIFF(cpu_node, table)), > + table->revision); > > index++; > } > -- > 2.36.1 >