Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp755976ybz; Wed, 15 Apr 2020 18:15:47 -0700 (PDT) X-Google-Smtp-Source: APiQypIZQ/aQ73wZf/NSJwbd8Fzp5BqRYZqZXRWqKPDb1J8BZlJkO/MTHD1yUEZgf8GDoIwWNiLz X-Received: by 2002:a50:9ea3:: with SMTP id a32mr7457817edf.18.1586999747568; Wed, 15 Apr 2020 18:15:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586999747; cv=none; d=google.com; s=arc-20160816; b=ZbuOcMuW67gshh0RFfsFy+CCBxVeaYdi2lQnlQl4QOL/7/v4SUp/FMjkN3mBFFiKp5 h+jMVnuqg4Ksi6IIVHYcdgi7nfxk8cINHa3eYKzOM9lnsZbaMH+1bMy7ivmmvmZziSvE YXsHxXPGClJS5akiRmbRorqdGFpuEhPhafO4JATlLNmCM9Tf6/ic+DPbNVsc6GJ8Wq+E 3gzGzcwqedyU60PYMFDMw1OgPqfrDA3yXydpN6lUPXliUIZ7CN/tV4+tFKc9oHO330r0 qv6lLCXwFVKD9K3zOBI3sKFZWNWlVjZ4+U8kdTu5IUGwtptTygNWOaq9SbJGmJFLnc4a 11gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=F4xy1ePNo4/sZnGsQ3y2Wap+w9rXMc+z0VuLe1xlqjQ=; b=xKE2gO4xUuKSUYMIYJa0BBPHceHgOl6WIHja8vZzbaqlxgCUUWBI/LXY0uykO0WrUm suIDmquUvY+6724/Zcz6ghhzisSrbz9cW1tCtI9/MxEe2pZB6AMKS3GO5VopZHEAzNs9 95dssCxKuYNC10pk+LhwwanDbe3UvKj+tNV5VJe2BPR6ABXU5/+m8N5l3NFi2OkcJ9rS yg3TyliPSVwIGFczPsj7AWD14D6ykUWFpSs3BFZ10tugwHfPfGluhYcdD1K/A6Ei/Ghf +18Zfv7GPeVS2qCpAPcijsy2yOSQEzobsSgY1dBbByXHAcAsYizeguXkQ3Wlam1SDBq9 zVSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=jbf+wIu4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qq2si9048221ejb.426.2020.04.15.18.15.24; Wed, 15 Apr 2020 18:15:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=jbf+wIu4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388434AbgDOXM2 (ORCPT + 99 others); Wed, 15 Apr 2020 19:12:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388104AbgDOXMS (ORCPT ); Wed, 15 Apr 2020 19:12:18 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F75DC061A0C; Wed, 15 Apr 2020 16:12:18 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id t40so520573pjb.3; Wed, 15 Apr 2020 16:12:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=F4xy1ePNo4/sZnGsQ3y2Wap+w9rXMc+z0VuLe1xlqjQ=; b=jbf+wIu44k/DfZ3pl3RN+n8kY8thZUYIw2Ipq5qKiQqOd/un49pRkXwqToVPR3gfGM 5lzD4YNJtHJ0TGIWKmkezhGKrohuQUNdMiKAzjgH4WQ0s5uhMDPh+7VtzTnU6ZF7LMYL AArC6zrxH/IvRd+ZEHod9VC+ODN/CPXgaHPQj7INdhHFYuBjxAOOaGhNwOV7dUpyS2qz vvderTdPOUm401Bji072y+qFP0V/DdRRmegOHp2CObNYas3awA3FjgTC3n2QM+RjU7d1 sW2K1ZtsER7ExRKQfhhSylNPe65vHzYtoQLWVx1cmcLnuRLqHO/Y05+1qQq5GFHPRxgI KZGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=F4xy1ePNo4/sZnGsQ3y2Wap+w9rXMc+z0VuLe1xlqjQ=; b=PvyF6y/dspDli9XoY7OG2U8WnzLKkEif4JD1HoB3JL0EwAX7OzntC/DGGTTXdBZPnN QXk65JIRkdyDxzHPAw2+4CzwDXyEIKar11ytXNQq5IYMZTdfZj7v0Rc4am6kgLV0JtTx PP5S4Umn6o3F+k5oRvs+ufTJeHqkVMLGFUPwOySu7IczEjLm26JoJKL+rvovGcyBwiUC AjtFnBFcfkjAihSiCgGeQZ7An+l8cjyKvesCBL57dnV68RS2eyfg3tc0IjucNotVegr9 pLboSRkzXqv99VD5qacB5dxTEfBifKJFOdSKQrEcZcvrqnhsinemz56SPAPessokG0Gp lLdg== X-Gm-Message-State: AGi0PuYCJESJ9xEBWtJLLnlFLvTE/p5GImPcP4I+AVa22gxKR0+Z98j0 hs5YFqqGAowLqatSchLdozY= X-Received: by 2002:a17:902:7289:: with SMTP id d9mr6991775pll.49.1586992337834; Wed, 15 Apr 2020 16:12:17 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id l71sm9190804pge.3.2020.04.15.16.12.16 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Apr 2020 16:12:17 -0700 (PDT) Date: Wed, 15 Apr 2020 16:12:15 -0700 From: Guenter Roeck To: Julius Werner Cc: Xingyu Chen , Evan Benn , LKML , Andy Shevchenko , Anson Huang , Bjorn Andersson , Catalin Marinas , "David S. Miller" , Greg Kroah-Hartman , Jonathan Cameron , Leonard Crestez , Manivannan Sadhasivam , Marcin Juszkiewicz , Mark Rutland , Matthias Brugger , Mauro Carvalho Chehab , Olof Johansson , Rob Herring , Rob Herring , Shawn Guo , Valentin Schneider , Vinod Koul , Will Deacon , Wim Van Sebroeck , devicetree@vger.kernel.org, "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , "moderated list:ARM/Mediatek SoC support" , LINUX-WATCHDOG , Jianxin Pan , Yonghui Yu , "open list:ARM/Amlogic Meson..." Subject: Re: [PATCH v2 0/2] Add a watchdog driver that uses ARM Secure Monitor Calls. Message-ID: <20200415231215.GA182398@roeck-us.net> References: <20200403052900.258855-1-evanbenn@chromium.org> <890948ef-7276-fdae-d270-eb30eff3eab2@amlogic.com> <243e107c-35c1-2d14-5285-c9e13744963c@amlogic.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 15, 2020 at 03:29:29PM -0700, Julius Werner wrote: > > In addition, It looks more reasonable to use the "msec" as the unit of > > timeout parameter for the ATF fw interface with SMCWD_SET_TIMEOUT: > > > > - The fw interface will compatible with the uboot generic watchdog > > interface at [0], and there is no need to convert timeout from msec > > to sec. > > I think we're trying hard to keep this compatible to a Trusted > Firmware counterpart that we have already shipped, so we would prefer > to keep it at seconds if possible. That's what the Linux watchdog core > uses as well after all, so it just seems natural. I don't really see > how what U-Boot does would have anything to do with this. > > > - Some vendor's watchdog may be not support the "wdt_trigger_reset" > > reset operation, but they can use the method below to reset the system > > by the watchdog right now. > > > > watchdog_set_time(1); //1ms > > watchdog_enable(); > > They can still do that but they should do that on the Trusted Firmware > side. Emulating a missing reset functionality should be handled by the > hardware abstraction layer (in this case Trusted Firmware), not at the > Linux API level. So Linux would still send a PSCI_SYSTEM_RESET SMC, > but then Trusted Firmware can choose to implement that by setting the > watchdog to the smallest possible timeout (which it can because it's > accessing it directly, not through this SMC interface) and letting it > expire. I agree. Using a watchdog to implement reset functionality is always a means of last resort and should be avoided if possible. Guenter