Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1424582pxf; Fri, 26 Mar 2021 07:36:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMZ+PvDVrabbDi/tm4/qcFc9CCBgebo3wvlcTV0g/Pv+3r6ss47W6e9kc3nEe/4Hb/pd7p X-Received: by 2002:a17:906:f891:: with SMTP id lg17mr15808172ejb.69.1616769393757; Fri, 26 Mar 2021 07:36:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616769393; cv=none; d=google.com; s=arc-20160816; b=KtBwx0TMOevozLv+Zpbq3kZq9rjP1B16ZrNoF5jbwxTRUB7yNptOgq+7j4iuDMElco y7og5D1ajC0Obx1Pw347qoqp3zOE3ff0LO2iA8aCKi5tq4yMVkixtt+JIFjqfwuflrC9 vQypwhS9pFFjmHKT8H3NXHRz8DjsiI8r5yv/tfwUYGbLDN4wn9RJENNCJr31+Nnbc9oB Cfa/J8VBQQj/ztX8L+MUFLWtLZ5eEV6l0KLhFBOMgMgI4s+9gbDCR9iP0cc6mDFnDQCz PpriR4j6xfmjpttDoSEfD1ukZMAFHxEtKemtZuOAJqDXpeOhqjLr/tSvcOhAe+CiVD2U xEhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=keOTnlyQGLGUJyP7rAe2VpFFJleGxPf7DP2x5sNOd1o=; b=uzaEA1oXtzipmuMcNFCmJEksTVmEBzC7VgREj8EczoRgpnnvjMvkHJkYwXmM7vmhYm 3JjGqcrXcQt7MJiRqnoVBPFOwkR7JnFHGktGgqb9Ju+ROsHRgK56D8OCoEwGkmn7liF8 dZ+ID5/Je02Ykm7cwVwXzFg7rqQkD1eLnUcBMl/MfVzX8zC+WbpVoOqL2ZSLojxVOpnD zjB59mYoAqVCQcetgMIuUqP4/fWgvIZOK3M5namqNYXFYEthZ8lqlP7IFckTIPOvX7wF skilmHO3mckETiOGQh6dTd87hqSuUw0uU9F4IyOPG4pCFnKI1D6nFyqbHqmY+kM4cZCr ueiQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pg21si7377813ejb.168.2021.03.26.07.36.10; Fri, 26 Mar 2021 07:36:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230239AbhCZOfP (ORCPT + 99 others); Fri, 26 Mar 2021 10:35:15 -0400 Received: from mx3.molgen.mpg.de ([141.14.17.11]:53575 "EHLO mx1.molgen.mpg.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229779AbhCZOew (ORCPT ); Fri, 26 Mar 2021 10:34:52 -0400 Received: from [192.168.0.2] (ip5f5ae918.dynamic.kabel-deutschland.de [95.90.233.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id 6C805206479D4; Fri, 26 Mar 2021 15:34:43 +0100 (CET) Subject: Re: Marvell: hw perfevents: unable to count PMU IRQs To: Robin Murphy , Will Deacon , Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, LKML , Vadym Kochan , Oleksandr Mazur , Robert Marko References: From: Paul Menzel Message-ID: <6ca582cc-56ab-f481-d9e0-4e2b0b0d833e@molgen.mpg.de> Date: Fri, 26 Mar 2021 15:34:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dear Robin, Thank you for the quick reply. Am 26.03.21 um 13:29 schrieb Robin Murphy: > On 2021-03-25 21:39, Paul Menzel wrote: >> On the Marvell Prestera switch, Linux 5.10.4 prints the error (with an >> additional info level message) below. >> >>      [    0.000000] Linux version 5.10.4 (robimarko@onlbuilder9) (aarch64-linux-gnu-gcc (Debian 6.3.0-18) 6.3.0 20170516, GNU ld (GNU Binutils for Debian) 2.28) #1 SMP PREEMPT Thu Mar 11 10:22:09 UTC 2021 >>      […] >>      [    1.996658] hw perfevents: unable to count PMU IRQs >>      [    2.001825] hw perfevents: /ap806/config-space@f0000000/pmu: failed to register PMU devices! […] >> Please find the output of `dmesg` attached. >> >> How can the IRQs be counted? > > Well, that message simply means we got an error back from > platform_irq_count(), which in turn implies that > platform_get_irq_optional() failed. Most likely we got -EPROBE_DEFER > back from of_irq_get() because the relevant interrupt controller wasn't > ready by that point - especially since that's the o9nly error code that > platform_irq_cont() will actually pass. It looks like that should end up > getting propagated all the way out appropriately, so the PMU driver > should defer and be able to probe OK once the mvebu-pic driver has > turned up to provide its IRQ. We could of course do a better job of not > shouting error messages for a non-fatal condition.... Yes, that would be great. > As for why the PMU doesn't eventually show up, my best guess would be > either an issue with the mvebu-pic driver itself probing, and/or perhaps > something in fw_devlink going awry - inspecting sysfs should shed a bit > more light on those. I just noticed, I missed [ 3.298670] hw perfevents: enabled with armv8_cortex_a72 PMU driver, 7 counters available a good second. So the interrupt controller indeed seems to take longer to be ready. I guess, I’d need to boot with `initcall_debug` to find out the callers of the PMU functions. Kind regards, Paul