From mboxrd@z Thu Jan 1 00:00:00 1970 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 76D13C43334 for ; Tue, 19 Jul 2022 14:38:45 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=B5yvwbl00Nn5t8f7ZolE8oHwKK48TVYbGbxzRP4je0o=; b=BgOE/VhzYKHTwj nrvnYBVwgatK5y4OFkihOM/lQI0NCIcLH8adefyUAbOHU1NSWn4tbhWm0cATgMd1/+DEqUjKznXJK FCgfhENkyqhykey+yW0Eyrc2W9izuEsWYTWI4sT7FVxNV8RW2z7wO39LuWyQ1oiQOprTTi3l/09le I9zEJnkf7CdTr26m0FeZsAlIBdTJ69Yz/swhTLjfWSkNjbsHKVtZ0UQdg+0UYjJT0VL40EwWKuJq6 JrCIUoxrfZfkoYJ+jpYVBFH35QOoMuye/na3naC592jDKCSZUtSycAOyZBZTXzmjWRgML1uoiyAEf VrmgkxAtEVkOfIbdBFKg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oDoLu-009iu3-CJ; Tue, 19 Jul 2022 14:37:34 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oDoLp-009ipI-3X for linux-arm-kernel@lists.infradead.org; Tue, 19 Jul 2022 14:37:30 +0000 Received: by mail-wm1-x32f.google.com with SMTP id b6so8557353wmq.5 for ; Tue, 19 Jul 2022 07:37:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=conchuod.ie; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=13i0/0dHDWi3Tz13pQIy2h+YZzYm8zFkGL1fzxGqmuY=; b=Dc9qshxWkOXoVpeRUOWXqvpJrKUxArsmLW0NXjuZv5YDKKFa2Abk13pR9Fw7HOpsC2 hvtQ9aaLQPeb4FWX0Jroj+ryDzDFrO1N9NXIWCjcY0mb5M2qy+WXB//MHr2LQMoMKZAM 1lBh/D3EwLEd8QLtpTcdhfUEpXN2H0LTq/L5Wve+ABzp83zffEGvDZ6IUQ3rYjxwHBFo EBW3biuXNrckDn19gRuWBo+/mVwT5c29SxdI6j4wr6iPHp7mzocV9p50UEuqNiDPYM4Q mc2s1CbVjXq0TQUClYoHsIk3s7XtsEPsXuel2zD/ja6J4aLXc+Ud78OrJL0iz+37gN9S XZtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=13i0/0dHDWi3Tz13pQIy2h+YZzYm8zFkGL1fzxGqmuY=; b=tJf/w0Avk45NhwTB0M+rE+JjS9y3DbqhVCLohz+WYJHGgMvOflkzdkPcyvFAPKout/ P7FwxPATbheu7LY9D0f2QXlAA6Xz7c2o4CcKNNRwmyRET4LVolKY7x88kOBJPfxk1GMD uPGsPQdSYeu2QQeciZYlKl9jQ2CIrxaie0pElnMrPMEbfK61fQXKHNxqOGN1W5784mYP n68HJVuaUERL6hxwrSc0Z4T2Em/m352eRsaL6bSHidnsJIGaYPr57Iu6Vdo/zhf7gxJu Y7yeyqPsHavxUrMTp2lR5MNr0FFDf4TRiJ2yrj01j7rOSgNkHHfC+9WvLOo/yDx1/nOF 0l3w== X-Gm-Message-State: AJIora9tZw7nh9Y51EcUvlDUAgZRa93MO6BN2c5BcrlcugxNOLBTZM8R WNeemxzk2UgNEizelbq3gqaJZg== X-Google-Smtp-Source: AGRyM1tCx3e3TI0EjYZ4gYglOXYON94UkAj86OkaD0BcFK9/cemoKGaTW1p1o37GsZxCjg70+qR1LQ== X-Received: by 2002:a05:600c:190a:b0:3a2:e8cc:57ca with SMTP id j10-20020a05600c190a00b003a2e8cc57camr31823297wmq.118.1658241445315; Tue, 19 Jul 2022 07:37:25 -0700 (PDT) Received: from [192.168.2.90] ([109.76.0.125]) by smtp.gmail.com with ESMTPSA id n3-20020a05600c4f8300b003a32297598csm2893662wmq.43.2022.07.19.07.37.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Jul 2022 07:37:24 -0700 (PDT) Message-ID: <73f9d00c-b64c-7c70-c49f-99d3894fad24@conchuod.ie> Date: Tue, 19 Jul 2022 15:37:22 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v6 09/21] arch_topology: Add support to parse and detect cache attributes Content-Language: en-US To: Geert Uytterhoeven , Sudeep Holla Cc: Linux Kernel Mailing List , Greg Kroah-Hartman , Conor Dooley , valentina.fernandezalanis@microchip.com, Vincent Guittot , Dietmar Eggemann , Qing Wang , Rob Herring , "Rafael J . Wysocki" , Ionela Voinescu , Pierre Gondois , Linux ARM , linux-riscv , Gavin Shan References: <20220704101605.1318280-1-sudeep.holla@arm.com> <20220704101605.1318280-10-sudeep.holla@arm.com> From: Conor Dooley In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220719_073729_200889_A4DB851F X-CRM114-Status: GOOD ( 32.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 19/07/2022 15:22, Geert Uytterhoeven wrote: > Hi Sudeep, > Hey Geert, > On Mon, Jul 4, 2022 at 12:19 PM Sudeep Holla wrote: >> Currently ACPI populates just the minimum information about the last >> level cache from PPTT in order to feed the same to build sched_domains. >> Similar support for DT platforms is not present. >> >> In order to enable the same, the entire cache hierarchy information can >> be built as part of CPU topoplogy parsing both on ACPI and DT platforms. >> >> Note that this change builds the cacheinfo early even on ACPI systems, >> but the current mechanism of building llc_sibling mask remains unchanged. >> >> Tested-by: Ionela Voinescu >> Reviewed-by: Gavin Shan >> Signed-off-by: Sudeep Holla > > Thanks for your patch! > >> --- a/drivers/base/arch_topology.c >> +++ b/drivers/base/arch_topology.c >> @@ -7,6 +7,7 @@ >> */ >> >> #include >> +#include >> #include >> #include >> #include >> @@ -780,15 +781,28 @@ __weak int __init parse_acpi_topology(void) >> #if defined(CONFIG_ARM64) || defined(CONFIG_RISCV) >> void __init init_cpu_topology(void) >> { >> + int ret, cpu; >> + >> reset_cpu_topology(); >> + ret = parse_acpi_topology(); >> + if (!ret) >> + ret = of_have_populated_dt() && parse_dt_topology(); >> >> - /* >> - * Discard anything that was parsed if we hit an error so we >> - * don't use partial information. >> - */ >> - if (parse_acpi_topology()) >> - reset_cpu_topology(); >> - else if (of_have_populated_dt() && parse_dt_topology()) >> + if (ret) { >> + /* >> + * Discard anything that was parsed if we hit an error so we >> + * don't use partial information. >> + */ >> reset_cpu_topology(); >> + return; >> + } >> + >> + for_each_possible_cpu(cpu) { >> + ret = detect_cache_attributes(cpu); >> + if (ret) { >> + pr_info("Early cacheinfo failed, ret = %d\n", ret); > > This is triggered > > Early cacheinfo failed, ret = -12 > > on all my RV64 platforms (K210, PolarFire, StarLight). This should be fixed by Sudeeps most recent patchset, at least it was when I tested it! https://lore.kernel.org/all/20220713133344.1201247-1-sudeep.holla@arm.com/ > -12 = -ENOMEM. > > The boot continues regardless, and the K210 even has enough spare > RAM after boot to run "ls", unlike two weeks ago ;-) > >> + break; >> + } >> + } >> } > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel