Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2505696rdb; Thu, 21 Sep 2023 23:54:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGU9+4BzhfrtRt6v+tIPNZWffuvjhflTeRwPAMjCos5B1+V8KxW4gSamNKDd1plIdFTENz6 X-Received: by 2002:a05:6a20:8416:b0:135:110c:c6e1 with SMTP id c22-20020a056a20841600b00135110cc6e1mr8871406pzd.7.1695365675018; Thu, 21 Sep 2023 23:54:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695365675; cv=none; d=google.com; s=arc-20160816; b=GjccYsnv4d37O53l9LWNDDonuwmlf61kcbBGl008Od5ylzPzaYzgli2756Zc6nWKQF SARU1uJkwVihrMS/I9pMwR79pL/eFQCtQ7DQWP2ah6sW0rR00q6SieClLqWugQAOWnfQ cbhgkXX+Jq7FK2oj36HT9YSylFsPMczs8zt5SQAdLnMHWNlxgoT3lkkdxme6Hr4+9S2N YbttClA4fJIIhPzfMos9z3vYbjSN5S09trm+J9/FoO0yVQzntsNAsJA3rMlMZ5G7T95y ZoG2ovYH0Bvnh+f64C5H16NhxIPlAg5X/mxuWQ7UrOd2hYJ/unyS1Xwtc0p3F3ObsHAC IrGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=Qb0gRj6pnqlTclpvVQaaCBr09PUiG9zueH5w8ndfnhk=; fh=QaN8Q9kroeL60Iat0lqboBh929HTE3bL0wLMGzQ+9wI=; b=c4EwK6UG+qjwAts5nQt+Gy8wstCqHf+NDhgdF4lZaWq+N0H5vAvMCj3YCxZJNiBJkY nu2WWevtYs265tcXZTtPsXNs5xjGm9xQug5gRVJo7oQ+M9Nbh14a69uhdgvRnw2Gg5eu KlwMQwbnanP/UqcWI1XhfwCbBeoNNNNNEHejx718xKPmWYLf3kiJcTKP5fdjzN3vC6vY 9XhQ/mylBwl+1+pmocFIZcIv3hjsR0sOhGdEB2AEXjIUjZhhgoHPB4S/AI8ZdIfjacXS pKhLB1VmRnEcbu2mdtGGqFjGJ+hP+SfTq7rwIROXuw3PyvEKOk2gHrJp4aIAyA5OC/PT 0lSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeconstruct.com.au header.s=2022a header.b="Hg/jnYst"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=codeconstruct.com.au Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id f20-20020a637554000000b00578b785d46csi3288605pgn.193.2023.09.21.23.54.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 23:54:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@codeconstruct.com.au header.s=2022a header.b="Hg/jnYst"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=codeconstruct.com.au Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 4DE988086801; Thu, 21 Sep 2023 21:26:28 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230080AbjIVE01 (ORCPT + 99 others); Fri, 22 Sep 2023 00:26:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229542AbjIVE00 (ORCPT ); Fri, 22 Sep 2023 00:26:26 -0400 X-Greylist: delayed 554 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 21 Sep 2023 21:26:18 PDT Received: from codeconstruct.com.au (pi.codeconstruct.com.au [203.29.241.158]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0C56F1; Thu, 21 Sep 2023 21:26:18 -0700 (PDT) Received: from [192.168.68.112] (ppp14-2-88-115.adl-apt-pir-bras31.tpg.internode.on.net [14.2.88.115]) by mail.codeconstruct.com.au (Postfix) with ESMTPSA id 12076201B9; Fri, 22 Sep 2023 12:16:51 +0800 (AWST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeconstruct.com.au; s=2022a; t=1695356217; bh=Qb0gRj6pnqlTclpvVQaaCBr09PUiG9zueH5w8ndfnhk=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=Hg/jnYstvcPUnQYL7gXd43PHO+Cy5vuOCBxTd3C/au0t02Z1QLZB+yiTYoG2IkuU4 9JIDRFmpJFTDDJbnKB0iO9xFWyWSq2WHirAma7WtkuA+6Io3MT/IbRHkmuvyvxScR8 RO4T/44rfsOv7adGIcwkYeFZmfdGTSn2rUJxOW4AfDTlVOuqIkS8/AGFFaahnfUUb9 /gyrPVeacfZahfQjrvco1R1ztvzSD/4kyBAmsl+mm2+rCoeRnFn+8oTiRoGR0uCI6C 7gD5p0XannjiyPhnwVJCE0TLzPQ2GT466QgZZRhzuyo5WTV31Z5g8RZc7inBxDDLJ9 H7/7om750V2PQ== Message-ID: <91be26169ebbddf3c05cd19626478246cb72a72a.camel@codeconstruct.com.au> Subject: Re: [PATCH] watchdog: aspeed: Add sysfs attributes for reset mask bits From: Andrew Jeffery To: Zev Weiss , Wim Van Sebroeck , Guenter Roeck , Joel Stanley , Andrew Jeffery Cc: linux-watchdog@vger.kernel.org, linux-aspeed@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org, Thomas =?ISO-8859-1?Q?Wei=DFschuh?= , Eddie James , Ivan Mikhaylov Date: Fri, 22 Sep 2023 13:46:50 +0930 In-Reply-To: <20230922013542.29136-2-zev@bewilderbeest.net> References: <20230922013542.29136-2-zev@bewilderbeest.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4-2 MIME-Version: 1.0 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,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Thu, 21 Sep 2023 21:26:28 -0700 (PDT) On Thu, 2023-09-21 at 18:35 -0700, Zev Weiss wrote: > The AST2500 and AST2600 watchdog timers provide the ability to control > which devices are reset by the watchdog timer via a reset mask > resgister. Previously the driver ignored that register, leaving > whatever configuration it found at boot and offering no way of > altering its settings. Add a 'reset_ctrl' sysfs subdirectory with a > file per bit so that userspace can determine which devices the reset > is applied to. >=20 > Note that not all bits in the hardware register are exposed -- in > particular, the ARM CPU and SOC/misc reset bits are left hidden since > clearing them can render the system unable to reboot. >=20 > Signed-off-by: Zev Weiss > --- >=20 > I'm porting OpenBMC to a platform that requires that the LPC controller r= emain > un-reset by a BMC reboot. With this patch userspace can control the rese= t > mask of the Aspeed watchdog timer, with a few bits remaining unexposed so= as > to prevent some almost-certainly undesirable situations. If there are ot= her > bits that people feel shouldn't be exposed (or conversely if someone feel= s > strongly that the "dangerous" bits _should_ be exposed) I can adjust > accordingly. Is there a reason this has to be managed by userspace? It sounds a lot like a property of platform design, in which case exposing this feature in the devicetree might be a better approach. Andrew