From patchwork Mon Jan 29 07:59:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sia Jee Heng X-Patchwork-Id: 13535138 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D1147C47422 for ; Mon, 29 Jan 2024 08:00:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=2Z3VxOiJRRzd84Zzut/FjStezpSlLhEKfmkqPu+xEzw=; b=Hfn5KlNcd0gEhA 1VPdFQ79dfpzAhMAFicD39N4s8Ze8a2iOcpanCpzcyuwX3HrhQbhdDCOAOn2jwDxtdF+Pu/CJmeGQ xIgGmU00JeAd2AJYrdpEOz8eojyuiWioZrs2bIiO09oYUzzEA7C7Tb2fabxoZ4LyqG8jmmj4aA1D/ 7lpV1+5KVLEvLgR0Jw9hOj2umeLgnSXHiXAknwjzLIGb73SVdAQzWFi62CXqBC55qdbEn3kH4cFM7 pfry9YRZVHW+lX0CSGASM51exxPn4kCR5hJ1k7jSIeIotteunYh/DUS2sF3Eeki9OEn7DwgAocV6L UNrC61IEWxcEr9V+Z8hw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rUMZ3-0000000Bh8O-3DH8; Mon, 29 Jan 2024 08:00:21 +0000 Received: from mail-bjschn02on20606.outbound.protection.partner.outlook.cn ([2406:e500:4440:2::606] helo=CHN02-BJS-obe.outbound.protection.partner.outlook.cn) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rUMZ0-0000000Bh6j-1pX7 for linux-riscv@lists.infradead.org; Mon, 29 Jan 2024 08:00:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CtydzpydC67w2+2b5kxo5cI85x8GABKqG00pUkg3upyTjEoXqwrtFOul4mcF4CqcTphv16qbi6wGWwigc+ELsRGbeX4FY8UztaubQuQRJ3RSqan6DCniawal6EPeKF2s9gH93D1CMrHYqy4Ok56ga4jDP8wqwfb43fspjozJsfhvrDyTqG0jQlzgTUJDXwXibp5Qoq24lP7qGNISjFwwK3yEZzjHI+e7JoTqQFpztsvYSLt71779qSoZKAzPABUuk3+SCdhqDoV+2LJAZEYK6D3Mva7JE9pIRGHTTgXxouMqk4P669X5UfcygMf+zwmGU7LETFUBGj/2a1zKzt72ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=H5Kysgtyxp4+qbmp7//2aa4z76FOF5vjIwdzS1aoCd0=; b=EM4kZGRtXliYp0mk/i6wBUaBzECT1Ad4946jTIQJdJc6iwcGwwMFEbbjYsby9LsQBrBNz0fmE2ruVKKEBe6ci29HZGEgaAQYvx/RCUujcElv7Ezttc/pS1MEnIzNs9mUsFECoOMsIEVd1GJpcmp/Gife09KvIMS21wTmcBdfMuWvOrTNdacei4rTfX3HtqmM7IFcx7Nr9tu/FS9Wqk8BMdypzhBEDAo0XsKg8vgh3vbrbxUVaoLRJEOfinSkxg53V1LUACbikAXQCXo0CKdOh/H4BOIwVMWuyvUXDkiYetBE5MQZ3dztiNfJaGh/RCbvL6DiUON/aMXKoBXMOmW9wQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=starfivetech.com; dmarc=pass action=none header.from=starfivetech.com; dkim=pass header.d=starfivetech.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=starfivetech.com; Received: from BJSPR01MB0561.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:f::16) by BJSPR01MB0545.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.31; Mon, 29 Jan 2024 08:00:11 +0000 Received: from BJSPR01MB0561.CHNPR01.prod.partner.outlook.cn ([fe80::3862:65b4:c857:c4a6]) by BJSPR01MB0561.CHNPR01.prod.partner.outlook.cn ([fe80::3862:65b4:c857:c4a6%4]) with mapi id 15.20.7228.029; Mon, 29 Jan 2024 08:00:11 +0000 From: Sia Jee Heng To: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Cc: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, sudeep.holla@arm.com, jeeheng.sia@starfivetech.com, robh@kernel.org, conor.dooley@microchip.com, suagrfillet@gmail.com Subject: [RFC v1 0/2] riscv: Cache Population Code Refactoring for ACPI and DT Support Date: Sun, 28 Jan 2024 23:59:55 -0800 Message-Id: <20240129075957.116033-1-jeeheng.sia@starfivetech.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: NT0PR01CA0031.CHNPR01.prod.partner.outlook.cn (2406:e500:c510:c::14) To BJSPR01MB0561.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:f::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BJSPR01MB0561:EE_|BJSPR01MB0545:EE_ X-MS-Office365-Filtering-Correlation-Id: 0f1cc644-a72c-4827-0668-08dc20a05176 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: A5aCdvHbj2WkGva4BV1eDzuD3IoFxUCY1IQPBUwBt3yT/O4rycaKy+wEaMpCmMSzws+PUMBv2dfZ9ZayxFPR8HyG38MUed1zwbYA3LqGltWhndrfS/3HNBt9cm0oWvyzm6KgBAwHDWpcYddspaotRU6W/QMANEoI7T+Q/gvuBxki8V5H5C5zm4CRKP+2EpUOwOC2o53YBYXVi8YDOpSShmhJnYhMdBSL9ryLGvf7MzcfgroTnud6uzJd8b24zUMNeDenojE53uKsI8J+OC1ITeWaZ2qUhmydOH2sqGBFZO2/+elXAiQwlgwK4avbionD75tP1Udg94YOywKO/M8dzbYolSrQOP4Km56TJO9BmpV94Xl3oFeTcXRHfiBoLgkLiq3h7XT6P44Wolt0Gfwvm5Qu9zFE5z9m6e5pIPxJ0gqyZZRj80Q2r/tAcOqHqJBfkqz+GlEu0Ba0djRwYWDYSIqGo1YowZzP/EMMY7YEDvSC64oqWPjXcvRmhrf5YjLfYC/aYwwscaqmrNUVnRA9dXRrbe+9xxoylv8D7D1hdqstBjSX2GNu4VcyeXL2mwp+ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BJSPR01MB0561.CHNPR01.prod.partner.outlook.cn;PTR:;CAT:NONE;SFS:(13230031)(366004)(136003)(346002)(396003)(39830400003)(230922051799003)(186009)(1800799012)(64100799003)(451199024)(38350700005)(41320700001)(2616005)(2906002)(4744005)(52116002)(5660300002)(6666004)(66946007)(66556008)(4326008)(26005)(1076003)(66476007)(8676002)(8936002)(38100700002)(83380400001)(508600001)(41300700001)(40180700001)(86362001)(40160700002)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-M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taYxt9UTBoBWHOtwdWcBhn4eBZVXkrH4loohekqJjJbI9QGz0QDdPfoaFIZbvnjeuTbLFHPgV7NOO8mYjFTHHiqnc2Xn8FmY9pxjgyoGTJCPe4vWyRt6TGmXZPDVz06/2xKB8iajgh+nrPmNx5nN4gGXp/qA+cIj+UWdVqDECMGb4ykyCjM/FBs0EgTqFH/SXTm/tECFEIGAy/Tg414J8eOzT3rpoI1u4Cv7VtCluL+KEFHsW+81WjgwLlnEJymtJ4pi0hgfo7BCsSLnU8F6Qr6D7wqEcRL+8v0Y+1q9t4V16tCPL99G5za13Dk3/hssYIhErVfY3Xqkn0XcDHF/oEIzMlfDD0vOhjzZID1Ox3WqpFpudrhgFB5SoW9USRlGncznXqT2fYeAqGOf+/asIBg52O1iFIucasPpNgZi/QW4xuhjKvXIB2y3yJqhQVzT0e6WD87KnwNXy6IYB9d18JqzHqqUN9PjxSrGPB2jmYbjAMYe/P0YfqQBtA/nc2As5qjwZywAD9iOOPpQalMympEKr/Zrn5w== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0f1cc644-a72c-4827-0668-08dc20a05176 X-MS-Exchange-CrossTenant-AuthSource: BJSPR01MB0561.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2024 08:00:11.6550 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 06fe3fa3-1221-43d3-861b-5a4ee687a85c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dS+ffQ+K/xUshACSmXdgyfYandCVnYlOMFOF8j6jXSFDH4z2VU46D4YpvlYAyfKULmXeC/qMF9Wx2Io50a7aoWyLJzdjmFRh8zwrpxLLLHs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BJSPR01MB0545 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240129_000018_500137_54469987 X-CRM114-Status: UNSURE ( 4.14 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org This series of patches refactors the cache population function to seamlessly accommodate both DT and ACPI-based platforms. Additionally, to streamline the code, the unused parameter in the ci_leaf_init() function has been removed. Sia Jee Heng (2): riscv: cacheinfo: Remove unused parameter riscv: cacheinfo: Refactor populate_cache_leaves() arch/riscv/kernel/cacheinfo.c | 50 ++++++++++++++--------------------- 1 file changed, 20 insertions(+), 30 deletions(-) base-commit: 41bccc98fb7931d63d03f326a746ac4d429c1dd3