From patchwork Mon Apr 17 18:15:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 84395 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2322728vqo; Mon, 17 Apr 2023 11:30:09 -0700 (PDT) X-Google-Smtp-Source: AKy350YIpN5+IR39G8uqC6QsOJnIXfMmQadchEXuw836JTtyVdjITNzi4pQOnOhW6wQCvK/iOXD+ X-Received: by 2002:a17:903:230e:b0:1a0:7584:f468 with SMTP id d14-20020a170903230e00b001a07584f468mr14498629plh.0.1681756209232; Mon, 17 Apr 2023 11:30:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681756209; cv=none; d=google.com; s=arc-20160816; b=MImRSw3gqueWb9dq+iOZ+53pN6dIOnv8ZQTD31gDvvMPbZrqFMfAYgiZ/2YEyVPSJH 2pONUjqxXJp4kQ6e8jZ8zA/EF/bzsRQsMvM4b0Iaowt5aRxPUI8Vp/M0OOfIlc+9nv40 PsowVb56S2/3Gog97MI1MIcwqDDh9LNrsY/sOm++/mw4eS42AdZze4+zV7TU10nYlxCX VAR2Bq8wuNZ4C/g7wVG3xljP5H+eqUyUxJAq/3BhNL6EVh8R+MSr2vbwpqMy3nCggG4R zJj2zw3PFyDUijtemHR20YSt252BY8HoTKBqeh8YvYqQFH9nqoEHsI5tGLqtDmiEnBct m5fg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nu17-20020a17090b1b1100b00246bdd45f1csi5245977pjb.33.2023.04.17.11.29.54; Mon, 17 Apr 2023 11:30:09 -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 S230023AbjDQSP5 (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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763449199005810965?= X-GMAIL-MSGID: =?utf-8?q?1763449199005810965?= 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(-)