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 3F30030E822 for ; Mon, 17 Nov 2025 05:40:40 +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=1763358041; cv=none; b=oalKNwPWGhkTethpLb0jbx44edu3hSULjQybKI5OoB0X3zEuHFyZfqYF7pYI94/5QdblzN7b7z3EL8OsDZYwaqBGtCX7MPEddrjgbEmA6VN2s2t2OXxkBgn8RqcLRLS0Tf4paDS37c2NvFmweUANeCk4LZ4Y0wBF6cOJr+iNokI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763358041; c=relaxed/simple; bh=5CgktAeVU5b5o5Gv7ZUcWMPYpmWApRwqLma2om/YaYw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=nYOnMtM5am0AEtTbMkGJBG4E/kgYDq9LFPZW2+UL60OAXhY2syErOLIuamuEwSUb5DpoGO8kxEH3wY0g7PCgyrj51gI9bGjkyQYfX+31tKXtu8t/BUwbzVkGx5BqZ5ou07C4rtRwQSLiCR/jURzfkDQs0hHvbsAmlC+rWO9hkbA= 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=oOGjgc8K; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=AJjLPwv1; 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="oOGjgc8K"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="AJjLPwv1" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5AH4o6L12838181 for ; Mon, 17 Nov 2025 05:40:39 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= JwGLuFJyAq4A3H7EurGW9xTM5A4YqSMPozkgARyIVrc=; b=oOGjgc8Kq3rXZrJz CHfOvo5ezyaumC6LHqLq6qG53skD305fTxyljllaYLKjd9zUU0mlHDrLI1Jzesmh PTqn7SklfyMxBo0v2NoITpYpS1plQOsFjMBvToMazYei7gn25mT/zXRQX6IQ544x kL01vGc9x+2xLqLrltX078g1TBbZXcDCv5xJPQoPUX+JgfFVKBiiXB4eWQUobhHR IGommN1T4uXSI6JDBBO+O+WjJrW3trd4sdfFyQ3kr+Qj0QlEviHvlnb5EpFmEB6F KcqRmYyNf3FG6G9a4iJT/PNGJV36zbW3zYTzy6hOAhLh7+n/UDEl81qLKjWb94rS a4Yeaw== Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4aejmyuenf-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 17 Nov 2025 05:40:38 +0000 (GMT) Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-2955555f73dso41217515ad.0 for ; Sun, 16 Nov 2025 21:40:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1763358038; x=1763962838; 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=JwGLuFJyAq4A3H7EurGW9xTM5A4YqSMPozkgARyIVrc=; b=AJjLPwv1/e9LtTpSlupw7gtmaAEcHGTyRj8A+E1CtmgfXMxOqxLyQDaqs72i8USQ3f dp8PDnUGXq7/7iv+3szCBI4rY+r/WrvINN7+cNWpXlfdNa7rclx5GBegNa3xd8jb6yJA irMqQAQ/T5116rZKZvAJgEhhLkd8oEg4TsBhTlVnOgRcF/HuyW2DG8wcX+R2qblqHAUX r49KlHlWYuGH1rj/e4w4ensodSuBjH0eREH+hTSXoZUJUgEcJ1rR2NB9mPjRTUPGUQPH lcfZCRU0SeDW28QB6yKxu5XtY0qp8Bqz7+rpq5cVhLYZfMQGB85oGDHoqfOocoHhp40F dSnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763358038; x=1763962838; 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=JwGLuFJyAq4A3H7EurGW9xTM5A4YqSMPozkgARyIVrc=; b=IB1Q4Axp5kZnKrZHdJupMhfDzlp/hTv2tkvt75zM272DyT6dS9lCdKjU9QXgedSMUi 8Dqb+bNAFx53wgiUvsTpHraKBeG9AB6wJnWTxu9fa9Rmc77rWNiDohcJ/ePM4AJQ2Sp+ 5HWyjTO0w7qmWZM6dKCCekoai644pCJ+aUCfpu43/Mk59L4Wvl5wKtH+NEcnI3X4AIVH lhU+1hH8xqNwT4lChskWN+I0BGsvHVTWcFoGVNEbU9ZsfRHpN/9c929CLlhxlpoLOqaQ XU7hf3bAAgIP+z3vZhXZ5dl+40/mJpltu8oOH9HS1glgSosRRkRB3QKWHYjQzS5v1mPG yx1Q== X-Forwarded-Encrypted: i=1; AJvYcCWWRQl+o8ySRRHfUXkEgdYI2BrPIobGAEHrt9q3Kt70DxAoOh8Nnnz6mRMOxu2SKOmLQeIkIS/IkqJeZNY=@vger.kernel.org X-Gm-Message-State: AOJu0Yxy2vUZgSZKyn4RAoAwGRbZAOn++UkelDktBh7FYDUojLoum6Xl db1vjFvQrjov1JrBXBNwqfGK9DBbOEFxb3QWVPZ4skKxZNKutN5Sdq3tMHJNpXRULVql8Hvz8VI Y3Oo9uhnSwk0LwCZzAPKovopwJa0It6TC3c7n3FlkjWlxgkVBWpz4x6I2muHFVPRL5Xw= X-Gm-Gg: ASbGncvjumBDsZYko2EtnNya89esrYaDSHhhVuOlIERWvT0j87SpXqS9YNJ8inVYwF2 7RwLFbwDJ31cbKxv+Rb6UMc3e82ZanJSuU+Sswozzqg4QexEwq388BuphBjkuIKjSwxyyRJ5gWc /4/uR+ttHUbM4OPF2N6yA1rBZH8m1e/sU/fE1P5e2QGPUVOXi3nuiyuruoFUvCJFKSqY01bglcn pR97SFgWLRAt58eAmZpYuZsQYm/+jZ0bRUmPK2gzSMRWQopGJsv6fCI/oSxpiaNuuBiAPHU5KV7 munml3lmME5NWHC0eKORWPE1wQc6qoRhbIkqdCkYVBvGrt0fiTMMmESs283urycZfF9NbVOczBl Hrw8H0EzBAKGg9izq5mIb2fH6+esPpS/e X-Received: by 2002:a17:902:ebcd:b0:294:f70d:5e33 with SMTP id d9443c01a7336-2986a6ba476mr125253405ad.12.1763358038116; Sun, 16 Nov 2025 21:40:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IEmA6o+kbOYh/BaAqHLrJj6Wk8KzmDvDjZ9KxgpwKs+YO/pyMn5IK4SjYWx/utHO71biwVziQ== X-Received: by 2002:a17:902:ebcd:b0:294:f70d:5e33 with SMTP id d9443c01a7336-2986a6ba476mr125253145ad.12.1763358037616; Sun, 16 Nov 2025 21:40:37 -0800 (PST) Received: from [10.219.57.23] ([202.46.23.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2985c245f8asm125541655ad.37.2025.11.16.21.40.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 16 Nov 2025 21:40:37 -0800 (PST) Message-ID: <17217b83-12ba-e3f2-da78-f423275da4ad@oss.qualcomm.com> Date: Mon, 17 Nov 2025 11:10:33 +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: Dmitry Baryshkov Cc: Sebastian Reichel , Bartosz Golaszewski , Bjorn Andersson , 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-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTE3MDA0NiBTYWx0ZWRfX0OTsCHjBs3KZ T2GWIfGt2/cK6cb7inX3svq6zLzTmV1YHTFCfnKGbM63ExJ0N0e94zMLGAlI1dggDOapCcWpQQ2 +tHgigRGwg40Ufn2mzF2TQkhmJGkagGrZ4fSk+GXhKxKqPdJRSfamH5lVmj5ZQtIHaxsm28U81Q sFoYRWwRou8zZdYoCGFCiob4zKfoQ2TcRZFqCTs5Eden6/D5RcEkb66GdZmqcb10KOBumSIKdxV iSrHCt4zSw9Sc/5GPgaCTDJ8oI+X8piK+9xLfP7+Jb+b3KJ9J2vATiSiEZQub5MAdjmQVFIs4U5 6oOVu0LT38jQZ+N6Xs4Iv7+aYYjM9tdMeb/1VRjyF4Z3B1mY5+bwWsB1obZzQT5wHaWh0yD4AE5 v7IuEo5eLgWAnEt8OI8HTjscYxn0aA== X-Authority-Analysis: v=2.4 cv=BPK+bVQG c=1 sm=1 tr=0 ts=691ab557 cx=c_pps a=IZJwPbhc+fLeJZngyXXI0A==:117 a=j4ogTh8yFefVWWEFDRgCtg==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=QX4gbG5DAAAA:8 a=EUspDBNiAAAA:8 a=VwQbUJbxAAAA:8 a=NpYxkmfexd4ejymn4sUA:9 a=QEXdDO2ut3YA:10 a=uG9DUKGECoFWVXl0Dc02:22 a=AbAUZ8qAyYyZVLSsDulk:22 X-Proofpoint-ORIG-GUID: SMLXCmKcJjYhvI9GE3fk7hEhJJa7Ix-6 X-Proofpoint-GUID: SMLXCmKcJjYhvI9GE3fk7hEhJJa7Ix-6 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-17_02,2025-11-13_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 adultscore=0 suspectscore=0 phishscore=0 malwarescore=0 impostorscore=0 bulkscore=0 lowpriorityscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511170046 On 11/16/2025 11:14 PM, 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? yes thats correct. Its just added for completeness of the documentation. > >> + >> + 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? If we are adding a sysfs interface, wouldn't it be logical > to also add another sysfs file, setting the argument? Some of such utilities are already in use and they pass command as an "*arg" to the reboot SYSCALL. reboot-mode is currently tied to the reboot SYSCALL - "*arg" being processed as command. We can open a sysfs for setting the argument - That will be a design change for reboot-mode and then we need to also decide that if the command being passes will override the sysfs? thanks, Shivendra