Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp753404ybz; Wed, 15 Apr 2020 18:12:41 -0700 (PDT) X-Google-Smtp-Source: APiQypIm+tp4/iLCvNDIA2vYwsjELbpWXaz3xTqCEtSyzmXR2TjKvpEIqtMyTgR3axzoSJy0eR3g X-Received: by 2002:a17:906:1ba1:: with SMTP id r1mr7712382ejg.297.1586999561430; Wed, 15 Apr 2020 18:12:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586999561; cv=none; d=google.com; s=arc-20160816; b=iUvb6SCQ3bfAODmWIy5pOHyt4NV6N2ys36JfZ2DXMcf+W466WGYXo5L6m5GLHku/n6 yfK4xhASrpHZOShgqlRGaMZL2zj/lASXZFHMmZWIV3+gLTcxk1zJULj/XSWVgPv3m/pN GI5U5d/YyalzLUq86/IjkVtXcFocP2kaIqajsEOSrcWv0b0436oCeDRQb8O4SMKnFM6B wSgOf7fn/E6wGoEFzSnX8Ew+HL2vkO3ux4wfUuTB+GdhkxNsuoLw9SMzC+JYilpGQPzT M13rRVnrfEpP8L3D85hKms36YGhs6EAa/owjrsAkS406V0+yj7pgxOvtHYfS0O+sTQdV fuaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=PVtGYrIeBI2+9xVgD4LCkJpnGBHTWG+8tKFXeAJgTRU=; b=h2mI9eocjw73QEGHhmgGs84MtbBfVeiFx98JaBYoqpKugTWQA0xzK8PBAyhRyAzyo2 ysN3b7p9B5431DGTN82264EukVkZCbglQtz5LsAWfB3OkNuVf5dWIcybKQCb9aTfZAvP TIoqNdL35cNntFpiMKTfJhgYsAdII5g+IuRCOlQdlFA7WkHFjRM72oM1sU2rWwEBiSRn NA8Ws1T8FlHPlkAXQVF3MGu+Wn4IJ40gQ3AfgTaDnVWdOrE0WPDnP/hUegd8GHe0+4Ej CS6nB6xjuQV6S1fz7VAxv7SRAk2pJATL1Qq4ExHJl9Y8ya0vChBlnhAj0rb86fPLyR7e i/yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gXSGbTR0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rv13si4555261ejb.115.2020.04.15.18.12.16; Wed, 15 Apr 2020 18:12:41 -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=pass header.i=@chromium.org header.s=google header.b=gXSGbTR0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732147AbgDOW3y (ORCPT + 99 others); Wed, 15 Apr 2020 18:29:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1732112AbgDOW3o (ORCPT ); Wed, 15 Apr 2020 18:29:44 -0400 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA982C061A0C for ; Wed, 15 Apr 2020 15:29:42 -0700 (PDT) Received: by mail-io1-xd42.google.com with SMTP id b12so18944666ion.8 for ; Wed, 15 Apr 2020 15:29:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PVtGYrIeBI2+9xVgD4LCkJpnGBHTWG+8tKFXeAJgTRU=; b=gXSGbTR09MscBjxHvvT6Zy0GE7nYGjJ8nQRhWPJMjuaPZPTM411vSTxLoPH1wb/lRH E6Z4jtglLRMXQKommS2CbxodCJi11rjz7cgYPRAWFMxtk1Sc3UXB1U2xuagdbDr83VUY 5gnHcn+7SSgE8W9/iOMJ1SOy7cFoMYxBGg8EM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PVtGYrIeBI2+9xVgD4LCkJpnGBHTWG+8tKFXeAJgTRU=; b=OTT5J0gcG7nulV+bMGxxFbKvcSCiZKaIG1KhE2z456T1mDvZBGvZ/OKXKPC1E+lU6T +5oI4wlgw0f5hUGUHSxjr61Olb0yq4cF9J+g1aJbgp94zZ0Jz03UJZPfBpc0UQHHOPBs BPkXljErjiZrqd7kbpM61z2d5OCJm6/aFqUdP0JwC8TvqTvrfJUNH2cktf1TUA/OzcgC sH8qXgIUC+IMaDrVOThN/rz221q46iRpXyFVKyUfj50cLLFJNGTJfsbbqAv1K2f/NmON 7/dESHrslLRfKkDIybfcDnGWGwJKJ6lI+LcB3DE7is7Pk4m1ibvmB3yMPDYyB9ZxIJHW lX2w== X-Gm-Message-State: AGi0Pua7WXEhjaSocZO/D2kr7wcdEPNNKOxAmglV5OGikWTluOQAIOSF jaPHKgkZ6xG56dM/DfcJfi3NYhv6myHmvwgiTPhmpA== X-Received: by 2002:a05:6602:1302:: with SMTP id h2mr28555486iov.186.1586989781796; Wed, 15 Apr 2020 15:29:41 -0700 (PDT) MIME-Version: 1.0 References: <20200403052900.258855-1-evanbenn@chromium.org> <890948ef-7276-fdae-d270-eb30eff3eab2@amlogic.com> <243e107c-35c1-2d14-5285-c9e13744963c@amlogic.com> In-Reply-To: <243e107c-35c1-2d14-5285-c9e13744963c@amlogic.com> From: Julius Werner Date: Wed, 15 Apr 2020 15:29:29 -0700 Message-ID: Subject: Re: [PATCH v2 0/2] Add a watchdog driver that uses ARM Secure Monitor Calls. To: Xingyu Chen Cc: Evan Benn , LKML , Julius Werner , Andy Shevchenko , Anson Huang , Bjorn Andersson , Catalin Marinas , "David S. Miller" , Greg Kroah-Hartman , Guenter Roeck , 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..." Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 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.