Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp4363043rwe; Mon, 17 Apr 2023 11:25:45 -0700 (PDT) X-Google-Smtp-Source: AKy350ZcRGCNCDdOoMdbyhkMk7D856I5u2WROiEgtlZG3vPRx51vUApEuJ7cYvG23ojtkvmL05sM X-Received: by 2002:a17:902:8c8f:b0:19a:bbd0:c5cc with SMTP id t15-20020a1709028c8f00b0019abbd0c5ccmr12193094plo.60.1681755945621; Mon, 17 Apr 2023 11:25:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681755945; cv=none; d=google.com; s=arc-20160816; b=XxskHfXw911InJmVz1Kn29OYMXPPebCuR7QamaTqj8BIXxS6ayn+9Q44B9Xkzd4mlu XMYOm/8K+d1Yehn032hiU8GRcgQEyCB31/WioNy2Vehem0C3GWpuB0+XxdLMUHU5+Q/q TiC5e8LDwWN0DVK1oqbvACooaLk9kCdSV8tpHw+pkpbkn1SA4j93WvtJZlGI0HQxt1kf IKS8siu1CRSYs7TQ/1p8ctRFppEZELhxHfYbmKaiHIcpCFbpxlv07IXBIcsoIXQP+ftS QqPayVhZrr9lWzhbH5QRi12wAj9G5CQ4MY9nUJTNk/jEr8Nwny8xUev/FywqZdOLWF2e q9gQ== 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=0KbuYXGTrQzLLzE27y2tJl8ThTyUHRhouvWLy21h6zc=; b=HJKHpNYBDtVdYjR/xrckN81pJyYbpnoF9qq4CiI9vbHoUa8UxgBw2/7+JSBqbBy+3G w7wgh4XYBakDnV6opwAS7LlRNZoLMW1zvpw7sTfSqQZc/4dHxy3eoiBBDG8hL6fzEudu ov9Vs35N7la0LRNUJfBc3jv0GnOs00kFUAk1AJlHTBs9Ozo9dmVi8PILenf8QF6Cf2Tm TlIOe9jPfAMlx/y3Y5vbIYEHOYDFPHT2Cs/i7FPJvmJg7ayzm0AV9Jo83V/Q4r//ABJq CHoY8rRIPJopTMpIyTlVhdIRIBTdclF2r0dublJaK2wr0C0HGsu7nHODG3EmdVDbEdTb a2Bg== 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 a11-20020a170902eccb00b001a0ae87878dsi13202801plh.388.2023.04.17.11.25.29; Mon, 17 Apr 2023 11:25:45 -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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230006AbjDQSP5 (ORCPT + 99 others); Mon, 17 Apr 2023 14:15:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229985AbjDQSPy (ORCPT ); Mon, 17 Apr 2023 14:15:54 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5910110D for ; Mon, 17 Apr 2023 11:15:52 -0700 (PDT) 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 8083F4B3; Mon, 17 Apr 2023 11:16:35 -0700 (PDT) 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 CD3BA3F5A1; Mon, 17 Apr 2023 11:15:50 -0700 (PDT) From: Sudeep Holla To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org Cc: Sudeep Holla , Pierre Gondois , ALKML , linux-riscv@lists.infradead.org, Radu Rendec Subject: [GIT PULL] cacheinfo/arch_topology: Updates for v6.4 Date: Mon, 17 Apr 2023 19:15:40 +0100 Message-Id: <20230417181540.1926349-1-sudeep.holla@arm.com> X-Mailer: git-send-email 2.40.0 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,T_SCC_BODY_TEXT_LINE 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, Couple of the patches are fixes but I wanted them to be in the next for some time to get better testing. Few others are addressing issues in RT kernel. Please pull ! Regards, Sudeep -->8 The following changes since commit fe15c26ee26efa11741a7b632e9f23b01aca4cc6: Linux 6.3-rc1 (2023-03-05 14:52:03 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git tags/cacheinfo-updates-6.4 for you to fetch changes up to ef9f643a9f8b62bcbcc51f0e0af8599adc2e17ed: cacheinfo: Add use_arch[|_cache]_info field/function (2023-04-14 10:13:39 +0100) ---------------------------------------------------------------- cacheinfo and arch_topology updates for v6.4 The cache information can be extracted from either a Device Tree(DT), the PPTT ACPI table, or arch registers (clidr_el1 for arm64). When the DT is used but no cache properties are advertised, the current code doesn't correctly fallback to using arch information. The changes fixes the same and also assuse the that L1 data/instruction caches are private and L2/higher caches are shared when the cache information is missing in DT/ACPI and is derived form clidr_el1/arch registers. Currently the cacheinfo is built from the primary CPU prior to secondary CPUs boot, if the DT/ACPI description contains cache information. However, if not present, it still reverts to the old behavior, which allocates the cacheinfo memory on each secondary CPUs which causes RT kernels to triggers a "BUG: sleeping function called from invalid context". The changes here attempts to enable automatic detection for RT kernels when no DT/ACPI cache information is available, by pre-allocating cacheinfo memory on the primary CPU. ---------------------------------------------------------------- Pierre Gondois (4): cacheinfo: Check sib_leaf in cache_leaves_are_shared() cacheinfo: Check cache properties are present in DT arch_topology: Remove early cacheinfo error message if -ENOENT cacheinfo: Add use_arch[|_cache]_info field/function Radu Rendec (3): cacheinfo: Add arch specific early level initializer cacheinfo: Add arm64 early level initializer implementation cacheinfo: Allow early level detection when DT/ACPI info is missing/broken arch/arm64/kernel/cacheinfo.c | 25 ++++++++- drivers/base/arch_topology.c | 11 ++-- drivers/base/cacheinfo.c | 124 +++++++++++++++++++++++++++++++++--------- include/linux/cacheinfo.h | 8 +++ 4 files changed, 133 insertions(+), 35 deletions(-)