Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2868223rdb; Fri, 22 Sep 2023 10:25:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGf02P/L/rQR7SlPa8HaSbIsRuBL6YU4ZuMoOjBxmklcOi/lVmVtwK2p40JxdyNiVFz7U75 X-Received: by 2002:a17:903:11cd:b0:1bd:e5e7:4845 with SMTP id q13-20020a17090311cd00b001bde5e74845mr114492plh.26.1695403540372; Fri, 22 Sep 2023 10:25:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695403540; cv=none; d=google.com; s=arc-20160816; b=WAaIFe/DEE7gwe4YndmMoFkJv3n+UCPY4imOu6HGQJhr1MKJ+Q+Umrp4OKBw6EIHeB iWkZmh+ZQADoprcJtjbitPhxE/jc8RuSgML0ksfsjfbu1JIZGzKTYXTCnqifpYPzFwiz j3Kenh0eHsmPD1AJu/pDzFJo+/WBbAzXK0Es8DoLfCMhPKHvulhDFZ7pnu+lk/gwrmB3 iIGx0bD7PTLOay/w09fI0N5sVCG16zmKjmeKyFiFhbttAH64ij76rolexb/N/ylFL3yf kLI8ltsaVfYR6kbZ6+xgPD5lPjetTl+2ONmfCKA6G63HdxMCHWL+PSPZdLAXcnh2wk7+ bBTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:sender:dkim-signature; bh=UANZyGmjU/rf/hK8ONbL0wqx5cYEjVcGLbn13RAx4hk=; fh=zcK07zLIs0lSf2ebqhdLfs3BbUeboYrix1Hx8tc6D5g=; b=aMPpliuk2sfz952iZVTvHg4FRhb5GZ8q8W4zy0iisU+gY0LSUhie/4pwP2nf8x/jp4 QeenWfMMiS1MW5rtl0J/NU4l9qRmJ3zsAgOv8GWdqoEDWegsrQ5jr0lKWrNpiyZjYaSn DVKKQ8jFOkaTey8Kqlx25aqVPdQYKTHyiUJth8qwON6OX7mmLoy4mSznmiBXWt7zZ23Y gTQdymchPNs85eUR8C4qkZbz69lmb5ui+mC2QSgxVVOlKu8Kevb+Bu9gBPYmQ1DJduTX HQsxgd63HRLUCgHmd/ilrK2DSztKtRvBlq0nQRIhMeXpVrQT9XAbO0FZNDbmYxtFFHFf Ulkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="EkUs6/Rq"; 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 Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id ks16-20020a170903085000b001c3d864d6b5si4045811plb.292.2023.09.22.10.25.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 10:25:40 -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=@gmail.com header.s=20230601 header.b="EkUs6/Rq"; 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 Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 0159083B6309; Thu, 21 Sep 2023 21:25:04 -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 S229931AbjIVEYz (ORCPT + 99 others); Fri, 22 Sep 2023 00:24:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229611AbjIVEYy (ORCPT ); Fri, 22 Sep 2023 00:24:54 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6855A8F; Thu, 21 Sep 2023 21:24:43 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1bf55a81eeaso14400905ad.0; Thu, 21 Sep 2023 21:24:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695356683; x=1695961483; 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 :sender:from:to:cc:subject:date:message-id:reply-to; bh=UANZyGmjU/rf/hK8ONbL0wqx5cYEjVcGLbn13RAx4hk=; b=EkUs6/RqjqU38xsdKSANVcT6mrEL355Bd3PTIZzqnee/awhfWHIJbDFeIFP2zHbB6K iuTu2yaonkwVYdiyQDxhZJaziiK9r1i8qQTZi7hDNpz6g0yX6fK+hv6Qj1FAeIaKt3lr saixZ4wCPFVOkMtQYwLFXzOxrt21QtFCT/t1S6nCpr0hMe9w9Q/dH5W1ENgr62yrd0R5 j8/KbWdKiRcH+ZzAcUs5weMYv6gHIZ0MGAancGssaf1VVbPT1iMABxfbY7DXfUv7G/cG tDLH6TRNqaXElCAogs/nNm9iujMQ7nes7zrMv0noGi+8duBddlM62uVHBIYPilsaPceb W50w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695356683; x=1695961483; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UANZyGmjU/rf/hK8ONbL0wqx5cYEjVcGLbn13RAx4hk=; b=XyoLTxU1W7KmjAjtsC8tnBMML5oNiVkZ6CZWVfymyAF+CMwRvRp3tj/lyri5n8DGk5 x5F3WiMdKCnCiVvBg9vUSuwgs+wrgfOsAjb+Pu0UPxmJPxEzUA6RkIH4NmGw+aWm/42H yIh0xgpwtqd9Naq8LIdOf3RxdLTtg2bN/HvXIw9uvaT5eimNUa57QfKR9jeT+OSWslFK 9bcr/yfv8WYXo4EBimY5RBzmMGvX+5bT7HIk4I9CeGFKsheCXrLhxCz4ygWjo8nDV9tp wPwa7QZVss0/69Z5UuEZP0xGhVbBG03h2fw4XKnI34pWe6lb/rKeUYXClqKB5cELqjLC pYZg== X-Gm-Message-State: AOJu0YxVqMyV04pOE4W4o5Q7r/MrwcemkGmHS/C1yvXlCPbMEUAIQGLx mi1Xgw4hjSSsgnm8BEY+VHg= X-Received: by 2002:a17:90a:dc0f:b0:274:84f3:d73a with SMTP id i15-20020a17090adc0f00b0027484f3d73amr7685324pjv.28.1695356682746; Thu, 21 Sep 2023 21:24:42 -0700 (PDT) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id t4-20020a17090ae50400b0026f39c90111sm2290286pjy.20.2023.09.21.21.24.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Sep 2023 21:24:42 -0700 (PDT) Sender: Guenter Roeck Message-ID: <85ddf493-934f-75c4-7a3a-728289c1ee09@roeck-us.net> Date: Thu, 21 Sep 2023 21:24:40 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH] watchdog: aspeed: Add sysfs attributes for reset mask bits Content-Language: en-US To: Andrew Jeffery , Zev Weiss , Wim Van Sebroeck , 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, =?UTF-8?Q?Thomas_Wei=c3=9fschuh?= , Eddie James , Ivan Mikhaylov References: <20230922013542.29136-2-zev@bewilderbeest.net> <91be26169ebbddf3c05cd19626478246cb72a72a.camel@codeconstruct.com.au> From: Guenter Roeck In-Reply-To: <91be26169ebbddf3c05cd19626478246cb72a72a.camel@codeconstruct.com.au> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS 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:25:04 -0700 (PDT) On 9/21/23 21:16, Andrew Jeffery wrote: > 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. >> >> 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. >> >> Signed-off-by: Zev Weiss >> --- >> >> I'm porting OpenBMC to a platform that requires that the LPC controller remain >> un-reset by a BMC reboot. With this patch userspace can control the reset >> mask of the Aspeed watchdog timer, with a few bits remaining unexposed so as >> to prevent some almost-certainly undesirable situations. If there are other >> bits that people feel shouldn't be exposed (or conversely if someone feels >> 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. > Same sentiment here. Guenter