From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F7BA347533 for ; Mon, 22 Jun 2026 18:57:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782154676; cv=none; b=QXibco/fYnChkKhsn9L5ojS/wsem3qb3kqlgF1rho3a3i+t7Q1GSM8aCn/nsnR8ta1z5EazSQ6t68mjPKpRWZI2MCBTGatJJOF9dIMCej6HF/azPqxgWiKOoxoNlhz0cFWQuDDxllWzP0Ap3h3srxuPfG39YzQobXOAXaH+Noig= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782154676; c=relaxed/simple; bh=Eci/a/8tHg4tTZJiIfDpEB3IqM/YUJ/xXRXY7o2DXVc=; h=Mime-Version:Content-Type:Date:Message-Id:To:Cc:Subject:From: References:In-Reply-To; b=nzxwnNP1BzBQUWOuLoor0JIpdenTbwITkmXsCyxPh9hX+uNSlj4Lbo75F2WAaCiiVTtZXPdb0nsKeb1z1aSCrpvwc6DPYbxXR4lJbA1E8nJ4rqIoyziPxOQxCc7s7DFCGf0rJvgpNvU3Ykbs0W9+D3Bt9tPQb251xBsSsuDmH+c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=TKjSs/8X; arc=none smtp.client-ip=209.85.221.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="TKjSs/8X" Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-4629051c946so145509f8f.1 for ; Mon, 22 Jun 2026 11:57:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1782154673; x=1782759473; darn=vger.kernel.org; h=in-reply-to:references:from:subject:cc:to:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=brZs3+MH5gJMBhPZfGjHt4FXO3H2ccunenuS6LTLrkg=; b=TKjSs/8X4fyrzk4Qode7dCVl4Uyszpotigbr10WpOgJXCgOc2yJIf5k1acFWwlFmC0 O1yPxyS6uBOkUVkQEroT6g48T86oTWGzzmjjeZNtYITGQlzgsqjaUUzP0QWEGWzrEBd9 qn1FjtWm9AYz7GgrHhvAFytG5cf4cF2WPWuRgguXd2qXuwmtDN2FEPffgfFG/9SkAHLF 4Ka2x/rxGYxu9PcTAXiWTnhUHfomyQA2G0kOjytt5+L3KqfpXicTtjJr2aw5LUIP3pLs 8OnVRg8Tmlm+yIvK/iRvqqCQuTRMur3oinc3h5K9XsQlk0DjeI3fTiHqMAdVM3DHTmq/ TS3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782154673; x=1782759473; h=in-reply-to:references:from:subject:cc:to:message-id:date :content-transfer-encoding:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=brZs3+MH5gJMBhPZfGjHt4FXO3H2ccunenuS6LTLrkg=; b=gO1/M+lIMA0olUDPsGYdBYK2KfyDfT0aAIg76YiSvIAlEXhvsq7Iv8twCEis1C7dez 5k7UUvNFOxv051ah64YM9K7koJnyMseqC5PKFB8UdeMFYIi2oUehMqTMsx0sguQChmJi 6NMD5x+0/juDOFphmn5LYa46eSv7h96TjK3iZn4O2fJ916VWPLCZfuumQTZw9lVkb70i 7FP5TPE4HUGboU3A8XGnAzOSZAco/rktTQjsOrFxgSIJhWNHhvLwpOhU+Hg94PdQWmA7 EbFTqv6NRxULgf81ITZJ0GbIFq34TRu0s+VnZGrWRAPO0hAyfbqOhYV+kSxYToKu/Osa 8e7w== X-Forwarded-Encrypted: i=1; AHgh+Roh1fA/EMi8FADKVqTKaGYsXDJa2UhYiyEz2TZrDtCiSFnJfwKnaH9+EzUFq7IqOKa2pc1oJpRIQ28LGQA=@vger.kernel.org X-Gm-Message-State: AOJu0YwzmcseP/taIGKo9SJgcr/Aef8yioWoGRa4kv+RNCYQ/t3YjD1f BuU2FI/zK8AHiBlB6fo043aS7lHYbFttQliw0QT3cmwQYNAnmcM/RMMCeYi9fZ2GZSQ= X-Gm-Gg: AfdE7clQocQrstYfM9yY413vBu891l9u+08POwQZqKbU1I0gSs5Xp+U7pyWDCd5uTel vZA8iaHT2KWdCCNOdA5+dIkZLvIjte+3TyKCqjxzubX96C4FqOGnCEM0/HmRXrz2AbGslj1MvGu eBUMh2SlkHh5XVJ9GCuwCar0zl5z12Ahk788rN4wr1hSQcFqFIwdvS+8ESaYciDhRn6uimaSwM3 QoQe4inRwdd57A8z/vnN9Ah2zaMAcRwKJF4m6qqczKKi8xurhjmUEk1HThDXJJJih+00EwHmLFS 7iZfo6QBGlSYcwIFSbPX/Badz/1lEN1qCaL0ZglUjs9NYzCMPHKGInGovXxN8x+PuIdnsU9nByY Gkpcrde7zN5JFUbeNHRavzp/e74HNHSclIfVP+oWxnDTwsF7wXtXfCFcbRui1XnU8rTco4LLI3w 1U0Egp4m69Q1T9qGANsWk+/X4TSdGk4vMDjQn1i/Cktev5uZmlqsQE8SOW0ScpOczE2y+Yqhy5Y lSDOHs+YZlg X-Received: by 2002:a05:6000:220b:b0:46a:6474:839e with SMTP id ffacd0b85a97d-46a7e9f3eb8mr1087064f8f.4.1782154673472; Mon, 22 Jun 2026 11:57:53 -0700 (PDT) Received: from localhost ([2.122.8.179]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-466648c5413sm29609719f8f.11.2026.06.22.11.57.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jun 2026 11:57:52 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 22 Jun 2026 19:57:52 +0100 Message-Id: To: "Peter Griffin" Cc: "Krzysztof Kozlowski" , "Alim Akhtar" , "Sam Protsenko" , , , , , "Sashiko" Subject: Re: [PATCH 3/3] soc: samsung: exynos-pmu: fix error paths in cpuhotplug/idle states setup From: "Alexey Klimov" X-Mailer: aerc 0.21.0 References: <20260605-exynos-pmu-cpuhp-idle-fixes-v1-0-0cd05c81a82d@linaro.org> <20260605-exynos-pmu-cpuhp-idle-fixes-v1-3-0cd05c81a82d@linaro.org> In-Reply-To: Hi Peter, On Thu Jun 11, 2026 at 8:07 AM BST, Peter Griffin wrote: > Hi Alexey, > > On Wed, 10 Jun 2026 at 16:07, Alexey Klimov wr= ote: >> >> On Wed Jun 10, 2026 at 2:34 PM BST, Peter Griffin wrote: >> > Hi Alexey, >> >> Hi Peter, >> >> > Thanks for your patch! >> > >> > On Fri, 5 Jun 2026 at 21:19, Alexey Klimov = wrote: >> >> >> >> The setup_cpuhp_and_cpuidle() initialisation sequence currently ignor= es >> >> the return values of cpuhp_setup_state(), cpu_pm_register_notifier(),= and >> >> register_reboot_notifier(). If any of these registrations fail during >> >> probe() routine, the driver returns 0, leaving the driver partially >> >> configured. >> > >> > I originally made the failure non-fatal because the system still boots >> > without the notifiers registered (and all other Arm64 Exynos SoCs >> > upstream don't register notifiers and AFAICT have broken cpu hotplug >> > and cpu idle). >> > >> > In hindsight, that seems like a mistake. I think your patch to fully >> > unwind everything in case of failure makes more sense. See small >> > comment below about destroy_cpuhp_and_cpuidle() >> >> Wait, setup_cpuhp_and_cpuidle() should be non-fatal and shouldn't >> return any errors? > > I suggest you re-read my above comment above ^^ Could you please clarify what specifically addresses my question about notifiers? Looking further into this, it seems that, for instance, if one of the hotplug states fails to register then tracking of pmu_context->in_cpuhp becomes broken. If reboot notifier silently fails to be registered, then it is unclear how this from gs101_cpu_pmu_offline() supposed to work: /* Ignore CPU_PM_ENTER event in reboot or suspend sequence. */ if (pmu_context->sys_insuspend || pmu_context->sys_inreboot) { raw_spin_unlock(&pmu_context->cpupm_lock); return NOTIFY_OK; } If c2 idles are used during reboot/shutdown then they fail or what? I am not saying that patch is correct and some rework is needed but I don't get why we should completely ignore errors from hotplug states registration and should not check registration of notifiers. At least warning should be shown to user that pm functionality might be unreliable. Best regards, Alexey.