From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37F582848A1 for ; Tue, 18 Nov 2025 16:37:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763483881; cv=none; b=I3Dv9mPM7MZ86HFilKVAv6s1I6GkpTUIIiv8sUFdaQxaym8jo05vBhcOv/LjuJasofj/fDHgFg9HK/m9leEXmNI1TZMyCaj85I3oQbHJGEZqMcy7WqjzNRT6sJKmvrPrS3NvS+EvMkPNgRXgHbmqBfm3upQ+2Y6+ga8hjuJMt74= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763483881; c=relaxed/simple; bh=9z6UDj3Z4u9IkEFmwAObbZQ4q/1Vm9o0OtzGMIAFU50=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=sHkl+M9osO8FB39F+Thde/7dr9EnX++NhuQglu5BI9hTNDNdaa9TVcBBRg+UajUQ+PSj1U6YOpfajxvASDKn9nsOwGfL1iUmYV38n0BwN9xJ0Q4pnR7gCQshHHge7oLr1K0S91WCH7B2g9NDnrZ3SXo6R8BelAS9W9UPaUvNymY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=Ywfue2ZH; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=YGq31A9O; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="Ywfue2ZH"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="YGq31A9O" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5AICB73T2803692 for ; Tue, 18 Nov 2025 16:37:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 278xTvQ9syatu6wSSEkZOerhlZ4K3Pm6rv6SVO8Wcyg=; b=Ywfue2ZHTOykmMzL /mOP0KFOoVZHwxh2O48aDfHQvzYrcnWhM1mIRpWz3IupEDHqPbrUwXhQs3HrsUq+ PZ8HPYmVgpP+LumogGyiOjkU9EPz6+3LwZVeDDzjcp/95JKjuZ62ltTqACz4+QD9 XWCi7pAHOw5fX8y/n+mdjCCUqqnYpKlHqFq3wal7/R0yNTBkeZgMWeTWxJpamLLC Yc5aTKk8uTa3l3RjTntaIbYAeBPGO8Bxe4zEFQ7/zYS2jSg/Z/k7j5M2MiHVtHL4 iz3dE7rMtbuoDWbBWyNyMvd1Fp1cfO44M2D3zwZT+1hq1nxETS2Ac7sJ4KJKjHu0 eSqSfA== Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4agrk20scj-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 18 Nov 2025 16:37:58 +0000 (GMT) Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-2956cdcdc17so68824835ad.3 for ; Tue, 18 Nov 2025 08:37:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1763483878; x=1764088678; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=278xTvQ9syatu6wSSEkZOerhlZ4K3Pm6rv6SVO8Wcyg=; b=YGq31A9Okk2dYKup2Vkw5ukjITjMJZgN7pd4buVwX27HSSk9tMrYcYaY62qWjgvA2o q1ljJ65/mDk+EkMlQjE/5GwqCcDh86dejSW4iloOSDx36LpEZv1G3nC9Vtp18I9y0+2M P4Lpvh+rki5G7SmL+3yyuabgRkqO2RDsz9qmB+E5MBs5aulgwmllZr9ePOL5qfAa97rs r+BNaPe2PV4vDSx1SE1sdTllHSxlZKKy7U88pZvhdWDlzjz0dgZN2RQr6d9/CWu/sUdN gVcTz7NtsDrFf+nDh+03toS3C+Oo6tflEqiYp0kaWjn0GC0lU0atpDQA11gS8KNFgoq5 /RSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763483878; x=1764088678; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=278xTvQ9syatu6wSSEkZOerhlZ4K3Pm6rv6SVO8Wcyg=; b=aN0dtvn6fiXHKnUqriDsM91fq99TDDUvLKsHwQlig+b4zpfb1mG7E3cZVmpcFMQwGp 065+jzxBHD7NIhZ2yjj8BjH6xm3ovCUPbAEr/aS7A6Ix4p2iU2Th4Vux0yozSZ5WBgF7 E6SdzsqYvdlCA5whIMoqPa9bOAjo1mSPukXIvBMaxphdSSzpHLADlf9iP/lXRyy1/2F6 QvEuEMRMNV/6aOdsPKj2vZv0biXG3urinGGZDCb8pJT17sG/3OQ5WfKBK2GKUeLMRbWC +ltllPklKh46PU7/75MGpQH6zbS3EiMLka9J6doHA0ZXQEdve61cjxFEq7ME/0t8l98e dcYg== X-Forwarded-Encrypted: i=1; AJvYcCXi7NKDAiSR2N+MrJnKB5BkSaROJjITP/03pbZ+mH2FFYx2WhB5aJe/Rv3zK2r2dlxiaGxNUBCz22Sjmnc=@vger.kernel.org X-Gm-Message-State: AOJu0YwBqgdlltW9Am7B9HekQjtTE75OqY5RIExAdfAYxKQq7BZZC+bx qLl0v0np35s/DF/B7YrUv3ob86XOSsCbvJZz7ilqfCh76lnmpUPhdpG+Wnu0INBiKO2FwUBhl+U +6RaceC3LAMXJALt/vHsK+BZRWVZ6x1g+D6m5toaO/AeSM7fE9NC/A7SlQ6JYoW2sP7g= X-Gm-Gg: ASbGncsZTZUPEKtqIu051kZZbZt91Ml54FmXUngLsKyVb80IA0Mp1hPQtoLRLUX9Q27 IfgUm9gLQkG4Nxp+Cg/VnpkMfOIlqITPY1U2tzq39h9SYJTwaYGCzkVbFZk0UNDAjbY+RnFQzyB FWeNfted/YSh4WtFYD2PXljsu0z9ZFhMRJlkPqhv7rJcugMbrPYZ9ZwjAytr1bNBa25eE5Oxlvc +EyLeCWK5Fla+1q2rItffiC30DChcq+1y16q25xxh20q7dnIf862pNFD7PGi5E3WFKe+vxYSGfd VcL8AV64Nt5UJve0SgTuIHexUo8EcdVPOVH6g1M60d+I3joUcQQbjSeTtGaSRNIG+RShPxNbjRK pvFn1IQGdJNVjQV9LPsaHIF+mz1lIEQyX X-Received: by 2002:a17:902:ecc7:b0:297:db6a:a82f with SMTP id d9443c01a7336-2986a6d27fcmr203916305ad.24.1763483877548; Tue, 18 Nov 2025 08:37:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IGX+dqalZw5scjIY2OZzWPdI4dUmh/GJzWXJj0tvsX4qtpbMtnfJQvlgdxTs46Rutsfja2jNA== X-Received: by 2002:a17:902:ecc7:b0:297:db6a:a82f with SMTP id d9443c01a7336-2986a6d27fcmr203915945ad.24.1763483877014; Tue, 18 Nov 2025 08:37:57 -0800 (PST) Received: from [10.216.27.76] ([202.46.23.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3456513f0eesm13780137a91.7.2025.11.18.08.37.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Nov 2025 08:37:56 -0800 (PST) Message-ID: <1ddb483e-3c09-ff45-9d36-cf29a40ba55d@oss.qualcomm.com> Date: Tue, 18 Nov 2025 22:07:51 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH 1/2] Documentation: ABI: Add sysfs-class-reboot-mode-reboot_modes Content-Language: en-US To: Bjorn Andersson , Dmitry Baryshkov Cc: Sebastian Reichel , Bartosz Golaszewski , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, Sebastian Reichel References: <20251116-next-15nov_expose_sysfs-v1-0-3b7880e5b40e@oss.qualcomm.com> <20251116-next-15nov_expose_sysfs-v1-1-3b7880e5b40e@oss.qualcomm.com> From: Shivendra Pratap In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Authority-Analysis: v=2.4 cv=a6Q9NESF c=1 sm=1 tr=0 ts=691ca0e6 cx=c_pps a=JL+w9abYAAE89/QcEU+0QA==:117 a=j4ogTh8yFefVWWEFDRgCtg==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=GhQEx97vAAAA:20 a=QX4gbG5DAAAA:8 a=EUspDBNiAAAA:8 a=VwQbUJbxAAAA:8 a=IGWLzMHgmMv8I4HHU2kA:9 a=QEXdDO2ut3YA:10 a=324X-CrmTo6CU4MGRt3R:22 a=AbAUZ8qAyYyZVLSsDulk:22 a=bA3UWDv6hWIuX7UZL3qL:22 a=yULaImgL6KKpOYXvFmjq:22 X-Proofpoint-GUID: ft4Po4ZnMM9-w7ftxQNMIjDb2VdRJGMG X-Proofpoint-ORIG-GUID: ft4Po4ZnMM9-w7ftxQNMIjDb2VdRJGMG X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTE4MDEzNCBTYWx0ZWRfX0WSDGUK3HcbX J3we5ELBi3OlWLAQ+U9hEKYE9bQwljRX0t9cYdPxgmm1AP1nLmgBTW02/rWffR+mYV0Ffo6gOBq yABv3p+MPX+4OBJpx/AlMgj3Szn74UaH1rJQfZwcU1ARxZEIaD79h747NdQN9TdhxDlR+6TRRr0 u55BV4QHZLg++c4lfl5OwR3ywC2mycAH5Fq4x9XivhwTff8eZUFByJnh5RAjCQSV6Xg6HdsSUzg IkYgZz2WhYOxWlmlUgGxkersY7cQaxpEj3vo29WWVjZPQbbwuwoWK1Pu4bQpNENg9YrpfAkdyp7 4gjGVP+3qrlgbmliQOidsXYlvH7MCRqGYfySTkPiSK6WHkmEI7xJvOxwY6GrhCW9ndAku+IikX8 yJ8SuGUWWiRrHqC3+3gVb/x5s6MQ/Q== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-18_02,2025-11-18_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 spamscore=0 bulkscore=0 priorityscore=1501 impostorscore=0 adultscore=0 clxscore=1015 phishscore=0 lowpriorityscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511180134 On 11/18/2025 2:18 AM, Bjorn Andersson wrote: > On Sun, Nov 16, 2025 at 07:44:24PM +0200, Dmitry Baryshkov wrote: >> On Sun, Nov 16, 2025 at 08:49:47PM +0530, Shivendra Pratap wrote: >>> Add ABI documentation for /sys/class/reboot-mode/*/reboot_modes, a >>> read-only sysfs attribute exposing the list of supported reboot-mode >>> arguments. This file is created by reboot-mode framework and provides a >>> user-readable interface to query available reboot-mode arguments. >>> >>> Reviewed-by: Sebastian Reichel >>> Signed-off-by: Shivendra Pratap >>> --- >>> .../testing/sysfs-class-reboot-mode-reboot_modes | 39 ++++++++++++++++++++++ >>> 1 file changed, 39 insertions(+) >>> >>> diff --git a/Documentation/ABI/testing/sysfs-class-reboot-mode-reboot_modes b/Documentation/ABI/testing/sysfs-class-reboot-mode-reboot_modes >>> new file mode 100644 >>> index 0000000000000000000000000000000000000000..28280ffe9bf962ef9d2136ea5d7c6aef77c4bd34 >>> --- /dev/null >>> +++ b/Documentation/ABI/testing/sysfs-class-reboot-mode-reboot_modes >>> @@ -0,0 +1,39 @@ >>> +What: /sys/class/reboot-mode//reboot_modes >>> +Date: November 2025 >>> +KernelVersion: 6.18.0-rc5 >>> +Contact: linux-pm@vger.kernel.org >>> + Description: >>> + This interface exposes the reboot-mode arguments >>> + registered with the reboot-mode framework. It is >>> + a read-only interface and provides a space >>> + separated list of reboot-mode arguments supported >>> + on the current platform. >>> + Example: >>> + recovery fastboot bootloader >>> + >>> + The exact sysfs path may vary depending on the >>> + name of the driver that registers the arguments. >>> + Example: >>> + /sys/class/reboot-mode/nvmem-reboot-mode/reboot_modes >>> + /sys/class/reboot-mode/syscon-reboot-mode/reboot_modes >>> + /sys/class/reboot-mode/qcom-pon/reboot_modes >> >> This part is obvious, isn't it? >> >>> + >>> + The supported arguments can be used by userspace >>> + to invoke device reset using the reboot() system >>> + call, with the "argument" as string to "*arg" >>> + parameter along with LINUX_REBOOT_CMD_RESTART2. >>> + Example: >>> + reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, >>> + LINUX_REBOOT_CMD_RESTART2, "bootloader"); >> >> So, does one need to write a tool for invoking reboot with the corerct >> set of args? > > Here's an implementation of such tool > https://github.com/systemd/systemd/blob/main/src/shared/reboot-util.c#L80 Should i include this link for an example of existing tools or i just add add a line saying that such tools are already available? > > Many other implementations of reboot provides the same. > >> If we are adding a sysfs interface, wouldn't it be logical >> to also add another sysfs file, setting the argument? >> > > The inclusion of the example indicates that we need to expose it in an > accessible form, but I don't think we should, as it's already a > widespread standard interface. > > As such, I don't think the example adds any value, but it would be > valuable to clarify that this is a standard interface. ok. Will remove this example of reboot syscall and add a line to indicate that this is standard interface. thanks, Shivendra