From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (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 4FED9309EE5 for ; Mon, 10 Nov 2025 13:11:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762780269; cv=none; b=YGIoqHAtQzC6DrbLTi9wGK8yBAm0iJrI1CiZBgSIg+T/RBdLO+IMXeKvbItWf1xCM/P8YUw7ixXTg8sLpvDcEyHxwHUwfzXwpxl8YE1uFiXjgs8Jg4rTdbJ9ieTSgNGLKM3Y50b31EBiB05ihMch7Ow2ynfpcbjwPtXy1Tm4Z48= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762780269; c=relaxed/simple; bh=qJ9dEuHA7QP47k8+mFjKN7aiDkO2eEnpi3eRdL/AdNc=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=X0uMeumUI58wW4jXLjD6HwzDjSvupNffVeooPexooEutOhyAvvKSp/rhBtQiBcjNyQo/LV0ehpFdXUBniyOjdaj4pMCFNekpIf+QqGgCrt2DBNBt1JZ60EhAOCipPPXCeF1nsWJPxwrBUn04jM06zjJBOdh/tCNMpVewa9fJ8os= 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=fXFr9Ov6; arc=none smtp.client-ip=209.85.218.42 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="fXFr9Ov6" Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-b72b495aa81so341802666b.2 for ; Mon, 10 Nov 2025 05:11:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1762780266; x=1763385066; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=qJ9dEuHA7QP47k8+mFjKN7aiDkO2eEnpi3eRdL/AdNc=; b=fXFr9Ov6yHGUbMykoVsX9+G6EUowpm6bxDPuwrjTtRd7U73N19SvQT6/EoWnof5IbF lm2umKVLmET914rzoC7gydt8dwC7FRrsunXkAC51ocb2SFyc+cdoG0LNcQH+bw491Qpe WLSFy7niB4N/Fa5Riq1CSeQ+KT/WABj63UcyMM0v1Jeez1lFwjbEFgWD41+Pi/41Ky8Z bsxEMHJOIQjz4c1Emk3RbSQ/RGAoiOTeySVvjGnMGMMLm1OcMmIHDm5J1Cjxm/xySxBy 4ob6wQtvxCDZ4/RaY/NgFZbrhkLiXZJtCdyI13VPEp9cuEb1f9mEDM/wxXSukP22Pe+4 Dv8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762780266; x=1763385066; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=qJ9dEuHA7QP47k8+mFjKN7aiDkO2eEnpi3eRdL/AdNc=; b=CQxOAKbHCkdx/k5hPvaOl42u2PcTOsNWY5BLmunS+UPAd1JKI855XNdG7x4yvYEQK0 J8cP1nHdJUHvQzzMYBDgZzF8NudustjWABe+Mqp2+/lQJZWiTJ4ms9mzGt2E0DdbcaGS wVoc87ztH8ryZ2AdcYpt+FTA4kB6Eu/K1Psq3m6zlxRCsg/HYqtpQTdnzIWriCMBZLqO 35kOlbN3faA5xSz0bdtQIwD+H524XIq1w3HwGgLSuej4tNonxvtYH+uDHYDFcZaU+dUU 6CEeCFGS10kV6UD1B9/v7y06xrCXfRDJ7dwYHyazgaMktXHEA9n56zaY8yjf9GExWP6s s4gQ== X-Forwarded-Encrypted: i=1; AJvYcCUEdy1SZnKT6WSWBJ/wmbFxhHNvuSZrsWoUlcbR0UG/nfIVKwvQHUB1PqIZYA33X6nl0n0ymTIuzKAKXcY=@vger.kernel.org X-Gm-Message-State: AOJu0YwVsy7SJMEzgpcKkyDT9yjKhDUks1TJLz09Ir0lrJN3NbuBzbUW oWj/MRh9xM5h3iEXvxMpUQKJ0JnLzQjsGIKIzjYdjHsVkswayWmB8tiUDpXbjfGTrueHThMfE97 kYdVaj4toBFi6Svxc9fYLdzAjgsDSK2yG9ulTBkSOBA== X-Gm-Gg: ASbGncvISa9/HkIFkNXuiKrpTpaOMr1t9AVzlyZ6A8C1wlu264kNc23VYD4ANlCFkHn XbR+aqKh+ViSxvgroKMjvquOjc4Z/UXV2EVm3SGNct5Kg4LWdOMHLGmmra4FhA0tjNYfgaostFy lJETpBfnPJ4SvKp3BxwRgkk98wC8Cbsq3OTN35DYnBt82a/GvVAu3YTB2dhdwULp2g3+WOETJfN IzYxrlo3MbQOKrYACZdoszXoSBRzwy+9HR4ohnYIn5tfaFvHi8rVonvmhlMrSi1SQ8iHnAAMjqQ tW2L9msGrgARyzb5 X-Google-Smtp-Source: AGHT+IGPitg7K5XoZgRQkP9FaImCQLO1InXFpXMUt4u6tDzxq2I7G9KRZEGJLJgmks99vhYut7CnjxNMlDxBUQ3PjRE= X-Received: by 2002:a17:907:3f26:b0:b3d:9261:ff1b with SMTP id a640c23a62f3a-b72e029316emr763218866b.5.1762780265467; Mon, 10 Nov 2025 05:11:05 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20251109-arm-psci-system_reset2-vendor-reboots-v17-0-46e085bca4cc@oss.qualcomm.com> <20251109-arm-psci-system_reset2-vendor-reboots-v17-1-46e085bca4cc@oss.qualcomm.com> In-Reply-To: <20251109-arm-psci-system_reset2-vendor-reboots-v17-1-46e085bca4cc@oss.qualcomm.com> From: Bartosz Golaszewski Date: Mon, 10 Nov 2025 14:10:53 +0100 X-Gm-Features: AWmQ_blKnASBsaS7hJ2XpHrQ-4sRSj2u5D16heHa45ya298_aUcuoaggfc-rRk8 Message-ID: Subject: Re: [PATCH v17 01/12] power: reset: reboot-mode: Remove devres based allocations To: Shivendra Pratap Cc: Bjorn Andersson , Sebastian Reichel , Rob Herring , Sudeep Holla , Souvik Chakravarty , Krzysztof Kozlowski , Conor Dooley , Andy Yan , Mark Rutland , Lorenzo Pieralisi , Arnd Bergmann , Konrad Dybcio , cros-qcom-dts-watchers@chromium.org, Vinod Koul , Catalin Marinas , Will Deacon , Florian Fainelli , Moritz Fischer , John Stultz , Matthias Brugger , Krzysztof Kozlowski , Dmitry Baryshkov , Mukesh Ojha , Stephen Boyd , Andre Draszik , Kathiravan Thirumoorthy , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Elliot Berman , Xin Liu , Srinivas Kandagatla Content-Type: text/plain; charset="UTF-8" On Sun, 9 Nov 2025 at 15:38, Shivendra Pratap wrote: > > Devres APIs are intended for use in drivers, and they should be > avoided in shared subsystem code which is being used by multiple > drivers. Avoid using devres based allocations in the reboot-mode > subsystem and manually free the resources. > You're making it sound as if there's some race condition going on. That's not the reason. They should be avoided in subsystem code because you have no guarantee that the function will be called after the driver is attached to the device nor that it will not be referenced after the managed resources were released after a driver detach. It's about life-times not synchronization. Bart