Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2549124rwb; Fri, 20 Jan 2023 04:32:34 -0800 (PST) X-Google-Smtp-Source: AMrXdXv1IuRJsBA91EPz1mkOKOnaCwE23rexyeoDlTCsvTGzgpks4f6oyzZx/ZK0Kgd+GPmU1qyr X-Received: by 2002:a50:fe95:0:b0:46c:aa8b:da5c with SMTP id d21-20020a50fe95000000b0046caa8bda5cmr14299049edt.33.1674217954047; Fri, 20 Jan 2023 04:32:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674217954; cv=none; d=google.com; s=arc-20160816; b=YCW3ltSnhiFqy95IRqv6yHC60kEYXDhJ2RfPuGL8joMdZ60GPlzIv3F3fMQeSnly3A yt8l/aHwHyQsCPHx02tAyFPuHpSioDvoG+E5pgKZMoDL7RzHGi5qedHOHWvABnSx6Y38 VpobrRp4aYLjKAal/9ZjzR1p2acBoMqoMp3hug67ZwNDvi7PhugiCjSgzkhb2Al8tFUy x2MV7nxUp5ATAlxmr032rq45ygJBcx6PvB9j7vLO3liurZO8zGS9uG/uCtpEoBHmB6td vZhqcYnGPcFnj1mMnvLRPbj1xkOsebGYe47TDzbWr4YCJG0OdSyXPl3TpO7pieedNcmI vCiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=LLxgzjhjZaf7ixniF7InLVUuP/WzjYdVpLIM7YMdQxY=; b=YRiUlaIsHd+UAv3YH2p5cLriEVwjg9v1zIwTR4v3BifwELKAiF9sc6jXktVdi5hiy0 ajHGd7edCpiVkrnaGWE95k1CeHz5mlDjNHiHvXJ6xrTp9Myba8lRNfm0ywLXfswB1BoR 9A1TOODs9OWdkekNJ1F6oFS3/7ls/kEza2KplrmqTPNz6rOE8PrjygeoPlxYGmyrFQxV zdU4Td8EvTE2ARFmMJscR8KNjHukXk59zia1uAGLRMEhiob7bToumKibH598q7exC9/T zpM0xKh3MYr85iXes8/NlqRXEIj/KBAczHIXfX+NhaD2A/JpMLnkVQ9hFtnQosiJ/m0Z WkiQ== 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r15-20020a05640251cf00b0049e2f51f81asi15095189edd.621.2023.01.20.04.32.21; Fri, 20 Jan 2023 04:32:34 -0800 (PST) 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229954AbjATMTh (ORCPT + 49 others); Fri, 20 Jan 2023 07:19:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229524AbjATMTg (ORCPT ); Fri, 20 Jan 2023 07:19:36 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 30C238B303 for ; Fri, 20 Jan 2023 04:19:35 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8363C14BF; Fri, 20 Jan 2023 04:20:16 -0800 (PST) Received: from usa.arm.com (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D379E3F71A; Fri, 20 Jan 2023 04:19:33 -0800 (PST) From: Sudeep Holla To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org Cc: Sudeep Holla , "Rafael J. Wysocki" , Yong-Xuan Wang , ALKML , linux-riscv@lists.infradead.org, Pierre Gondois Subject: [GIT PULL] cacheinfo/arch_topology: Updates for v6.3 Date: Fri, 20 Jan 2023 12:18:56 +0000 Message-Id: <20230120121856.1407369-1-sudeep.holla@arm.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham 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 Hi Greg, Please pull ! It has been tested on RISC-V which is the main users outside of arm64. The ACPI the RISC-V parts are acked-by the respective maintainers. All the changes are in the -next for sometime and no issues reported at this time. Regards, Sudeep -->8 The following changes since commit 1b929c02afd37871d5afb9d498426f83432e71c2: Linux 6.2-rc1 (2022-12-25 13:41:39 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git tags/archtopo-cacheinfo-updates-6.3 for you to fetch changes up to 198102c9103fc78d8478495971947af77edb05c1: cacheinfo: Fix shared_cpu_map to handle shared caches at different levels (2023-01-18 09:58:40 +0000) ---------------------------------------------------------------- cacheinfo and arch_topology updates for v6.3 The main change is to build the cache topology information for all the CPUs from the primary CPU. Currently the cacheinfo for secondary CPUs is created during the early boot on the respective CPU itself. Preemption and interrupts are disabled at this stage. On PREEMPT_RT kernels, allocating memory and even parsing the PPTT table for ACPI based systems triggers a: 'BUG: sleeping function called from invalid context' To prevent this bug, the cacheinfo is now allocated from the primary CPU when preemption and interrupts are enabled and before booting secondary CPUs. The cache levels/leaves are computed from DT/ACPI PPTT information only, without relying on any architecture specific mechanism if done so early. The other minor change included here is to handle shared caches at different levels when not all the CPUs on the system have the same cache hierarchy. ---------------------------------------------------------------- Pierre Gondois (6): cacheinfo: Use RISC-V's init_cache_level() as generic OF implementation cacheinfo: Return error code in init_of_cache_level() cacheinfo: Check 'cache-unified' property to count cache leaves ACPI: PPTT: Remove acpi_find_cache_levels() ACPI: PPTT: Update acpi_find_last_cache_level() to acpi_get_cache_info() arch_topology: Build cacheinfo from primary CPU Yong-Xuan Wang (1): cacheinfo: Fix shared_cpu_map to handle shared caches at different levels arch/arm64/kernel/cacheinfo.c | 11 +-- arch/riscv/kernel/cacheinfo.c | 42 ----------- drivers/acpi/pptt.c | 93 ++++++++++++++---------- drivers/base/arch_topology.c | 12 +++- drivers/base/cacheinfo.c | 161 +++++++++++++++++++++++++++++++++++------- include/linux/cacheinfo.h | 11 ++- 6 files changed, 213 insertions(+), 117 deletions(-)