Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2386014rdg; Mon, 16 Oct 2023 02:52:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEdiXmeFkkszX7JWcfaQBpcUSBgF55leQJKcLdTnT5SS6Jh1JFbBHZHVdS5FR8x8VpWxLQ+ X-Received: by 2002:a17:90a:db0f:b0:27d:b9d:bd6f with SMTP id g15-20020a17090adb0f00b0027d0b9dbd6fmr11295515pjv.45.1697449923172; Mon, 16 Oct 2023 02:52:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697449923; cv=none; d=google.com; s=arc-20160816; b=ZNsBufOdPqNu9ajUzhPCTRDJzSkZXN3NWtN5pK3DBbiUZx5JyucNbMdzEKqXlZb861 46IbOzIy5kCNV0VyDa/B6v9UrkoQVqZoNvdx6P3OR5iILLkVMlN0JK2yMRqeFo2Xon0C oR4wQ90sjq1I3Kyt3OS8Oa9wSgFyW3kvcjk2BYxqKc/STPjcIESh9ofyIcmgODD6ZoQS PPzE6fz7SGph+nMrmzwmZevSmu9M6sLCSBLjLDdULbtI8HAtoQa51GRMqVMsKiN7OFAR H9ijmAP8DDpxNvO3VXh6N5vF8dbBAQsdLwz7TLyVrJtsVKsTkmd5cxoVhFvP+4lxu7BY tQwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=ZR8Xw0VKdm5ZQEx6TOBC00k7PmZ+VxoOGHDSFsEhUTg=; fh=2Lq/IMKJboLh3wBXbtdsp/BuyUlYbdqGriV0VGUcl/M=; b=yM4d/K+8GlvB4AmA8TSuA2bDyBFYBdQ5IMH+/6mbwili4a4n1orb1FsCwBUHjo/rGP DMHZPrxFHcIfFUuXr1owowgjSgmzj9+mVMc/f+ZOZkkmyEbN1gBqCOGeKIUFZ1lWWAFB b5J6c7b1z9XLopiZhD09x3eF7gVQjom2vNrluRJkWv7L4XI93DIiUiVpF21Rw1YgvZtk XsYpFsl5ODJXSuoU3qSXOmfeQmtTcZvIRwHBBma87J5zN+6+jsnBDdAOXKa6v/fqZa+s b2p1kxoR3ZdRB0TfEPKTAUWhCnWE83prSW5wUJKnZeq52z/rnrc20Lm0I/aKBKM0GDlZ M9ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=UQQ1UDKq; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id k21-20020a635615000000b0056513361b4fsi9953517pgb.741.2023.10.16.02.52.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 02:52:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=UQQ1UDKq; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id A0C33804C6D6; Mon, 16 Oct 2023 02:52:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230343AbjJPJvr (ORCPT + 99 others); Mon, 16 Oct 2023 05:51:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbjJPJvq (ORCPT ); Mon, 16 Oct 2023 05:51:46 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87A569C; Mon, 16 Oct 2023 02:51:44 -0700 (PDT) Date: Mon, 16 Oct 2023 09:51:42 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1697449903; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZR8Xw0VKdm5ZQEx6TOBC00k7PmZ+VxoOGHDSFsEhUTg=; b=UQQ1UDKq1BLou1Kv4sRfDPM7j1vFBNWor8254w+F4C1YkYwITSxVPsBsCQL1oP60KQvBR4 vtcTnea49tG63rd4aF9E5iKtppQJtNwU+HEjcNdgv6hlMhAQQrp8gv9Nkdfu+qf/nSPnkm ZFuhAfOvWgRPVHjZaSEkUSZEkvfHvZW7jnqUZu3hUvWYnfrwnHFD9cQfoctsemXk9Thb9E C4qAUGwe1LON50q0jdQZSF9ZxervWRZIVF604CThQDjDjWyTHdzz0VqixQCOR3yI6H9Ze1 7lSuZcqiekIw9OAJ8tZyg1dsMvhIYbdwlGUdFhX8LgXvhuVhIM3Rf8i8DRTddw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1697449903; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZR8Xw0VKdm5ZQEx6TOBC00k7PmZ+VxoOGHDSFsEhUTg=; b=nfeHsiOHPviRCjMr4jdvphs9o1idBB3MqukMmqRWLSauSjZ8TNsTqP5lJW2qxRCNNP2sP0 PYu2lt2G/+ceFeBg== From: "tip-bot2 for Sandipan Das" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/core] perf/x86/amd/uncore: Pass through error code for initialization failures, instead of -ENODEV Cc: Dan Carpenter , Sandipan Das , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20231016060743.332051-1-sandipan.das@amd.com> References: <20231016060743.332051-1-sandipan.das@amd.com> MIME-Version: 1.0 Message-ID: <169744990239.3135.3791356843221893982.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 16 Oct 2023 02:52:00 -0700 (PDT) The following commit has been merged into the perf/core branch of tip: Commit-ID: 744940f1921c8feb90e3c4bcc1e153fdd6e10fe2 Gitweb: https://git.kernel.org/tip/744940f1921c8feb90e3c4bcc1e153fdd6e10fe2 Author: Sandipan Das AuthorDate: Mon, 16 Oct 2023 11:37:43 +05:30 Committer: Ingo Molnar CommitterDate: Mon, 16 Oct 2023 11:42:01 +02:00 perf/x86/amd/uncore: Pass through error code for initialization failures, instead of -ENODEV Pass through the appropriate error code when the registration of hotplug callbacks fail during initialization, instead of returning a blanket -ENODEV. [ mingo: Updated the changelog. ] Reported-by: Dan Carpenter Signed-off-by: Sandipan Das Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20231016060743.332051-1-sandipan.das@amd.com --- arch/x86/events/amd/uncore.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/arch/x86/events/amd/uncore.c b/arch/x86/events/amd/uncore.c index a389828..4429eac 100644 --- a/arch/x86/events/amd/uncore.c +++ b/arch/x86/events/amd/uncore.c @@ -1040,20 +1040,25 @@ static int __init amd_uncore_init(void) /* * Install callbacks. Core will call them for each online cpu. */ - if (cpuhp_setup_state(CPUHP_PERF_X86_AMD_UNCORE_PREP, - "perf/x86/amd/uncore:prepare", - NULL, amd_uncore_cpu_dead)) + ret = cpuhp_setup_state(CPUHP_PERF_X86_AMD_UNCORE_PREP, + "perf/x86/amd/uncore:prepare", + NULL, amd_uncore_cpu_dead); + if (ret) goto fail; - if (cpuhp_setup_state(CPUHP_AP_PERF_X86_AMD_UNCORE_STARTING, - "perf/x86/amd/uncore:starting", - amd_uncore_cpu_starting, NULL)) + ret = cpuhp_setup_state(CPUHP_AP_PERF_X86_AMD_UNCORE_STARTING, + "perf/x86/amd/uncore:starting", + amd_uncore_cpu_starting, NULL); + if (ret) goto fail_prep; - if (cpuhp_setup_state(CPUHP_AP_PERF_X86_AMD_UNCORE_ONLINE, - "perf/x86/amd/uncore:online", - amd_uncore_cpu_online, - amd_uncore_cpu_down_prepare)) + + ret = cpuhp_setup_state(CPUHP_AP_PERF_X86_AMD_UNCORE_ONLINE, + "perf/x86/amd/uncore:online", + amd_uncore_cpu_online, + amd_uncore_cpu_down_prepare); + if (ret) goto fail_start; + return 0; fail_start: