Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp992798ybb; Fri, 3 Apr 2020 16:00:29 -0700 (PDT) X-Google-Smtp-Source: APiQypJ4CyU21rqfJoWH1wOG0pD8n60EsnfUc0a+haC6S48SDDN+OMQD2kXhTXtxQF9mWoK72tLS X-Received: by 2002:aca:fd48:: with SMTP id b69mr4849037oii.126.1585954829466; Fri, 03 Apr 2020 16:00:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585954829; cv=none; d=google.com; s=arc-20160816; b=I9mc3GCw6XfZzfE85hMgcDZyczNsiq3e/ZlVQKCdrt/5mQ1oYpK/aOa9LhanXhG8Tw f4ABkhoyPSow3sj39V38z6Lksy5omz2QBGXo90TipWkRJGKHglYqB8Ggz+0u7sxRz5Xr VyCBT1oR/Cp+WQ7kNRihncU85Zxr2IKeYYvwXazVN12oLMPYeLgmtXDI85sbu0qe+RQO oTlFbncY5L8EZa06S6X/HEKZbl7oBdkazWISuolOBLSzrpM0FrdWAcn8aWx8fJaE4n+s DZ20fLnMB8/KbKpX6Yrf6glImsk21IJv0+g3rKdKvQ8d+XMLIHA6WnXhO7/+FoA4ICcK SH1w== 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=AqKl27V7RFNmyor6QW5xd8i8kAV8SFQrhYdOkxkJcC8=; b=Qiay+NiouI4A2Dhdryi4qAnr06RDNklGmF2zB80OiZjaS/LNvLDy6jhbJP0hvNVho2 plI1TnCXDj5WvB1+6f8uk/s3NgttXfwSQ56aDlqkJpqOuq6bt4I4DPcZQ9vb+7dOt+PR Hl17pG9hSj9joblCsHYk+YXHrc48UsNvWTw5xkpyk6Cbz8DwwEDa2sKoPdDuEXFRcjCs vH/QRk/yNYyShn6Xb2dGZ1Ukk4VlILtv7jXVHwojE2/IiQvLoXVvemHj+cOXH5PgBRr9 7BR9vZtyVPwFOnvqRECRNAUON2vFh4/TpV3vTC8zglahSY5Xufg/8HkO5/lF3holDgCF YY5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=WPiy5e7K; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id c8si5231411otk.67.2020.04.03.16.00.02; Fri, 03 Apr 2020 16:00:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=WPiy5e7K; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728254AbgDCW4y (ORCPT + 99 others); Fri, 3 Apr 2020 18:56:54 -0400 Received: from mail-il1-f194.google.com ([209.85.166.194]:36080 "EHLO mail-il1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727829AbgDCW4x (ORCPT ); Fri, 3 Apr 2020 18:56:53 -0400 Received: by mail-il1-f194.google.com with SMTP id p13so9012078ilp.3 for ; Fri, 03 Apr 2020 15:56:53 -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=AqKl27V7RFNmyor6QW5xd8i8kAV8SFQrhYdOkxkJcC8=; b=WPiy5e7K8C3QPMOUC92RgkkaI6mdprM/z4x2IEncYmEy/d6KK7jUOHmCmetCMsnqVc kBUsXiMJ5CPk89GqAtdkTRa9LsdaBYEp/cpn3fJHtLs0/2nM49F6CjWMe6UupK/IYTAT rhxUvgs+Xgt7OFNKBYmzA2qIcnYwH6wRp3tqs= 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=AqKl27V7RFNmyor6QW5xd8i8kAV8SFQrhYdOkxkJcC8=; b=mENnJYCWTBHnRo81nKkoLT6jiJKwma8hr/GethTlleyWjN3ud9EqzvhxuDs3J3Flr2 PjjkXw/4yFJpK8LfzrmujvHo6rNmNYjFZDoPtkANo3RiEWu5KPhBK1AgyPizi3+8NADd QNjsa5yCkNDkQ62u+MnLsMVIO61NoHOJy1j/MFoF3IGoVSnL6erSuGGR7GYgyR/Hn55w ZIIuNGVNBPR4OUDf3ebJsigS8xAmYkK6XpH3VfEYdUa+cIBOp3svGD23Q/tBiOinyDdM JZO/Y1o1lZU2BmMGLt/+ceYZjdSDkQV4K0A1VWpNVlRkursaTZNHJqiWiefRrxLMhbxi jY0g== X-Gm-Message-State: AGi0PuaqDyrLqN5utFQxUwbMpdB+jnXZfDby79wVPac8sgmc1+riR6im rdJNpEoLA1fBgI9lhZpTXrKXUMIxIjZUkCJj/wu2oQ== X-Received: by 2002:a92:cb49:: with SMTP id f9mr10827666ilq.193.1585954612585; Fri, 03 Apr 2020 15:56:52 -0700 (PDT) MIME-Version: 1.0 References: <20200403052900.258855-1-evanbenn@chromium.org> <20200403162742.v2.2.Ia92bb4d4ce84bcefeba1d00aaa1c1e919b6164ef@changeid> In-Reply-To: <20200403162742.v2.2.Ia92bb4d4ce84bcefeba1d00aaa1c1e919b6164ef@changeid> From: Julius Werner Date: Fri, 3 Apr 2020 15:56:40 -0700 Message-ID: Subject: Re: [PATCH v2 2/2] watchdog: Add new arm_smd_wdt watchdog driver To: Evan Benn Cc: LKML , Xingyu Chen , 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 , Matthias Brugger , Mauro Carvalho Chehab , Olof Johansson , Rob Herring , Shawn Guo , Valentin Schneider , Vinod Koul , Will Deacon , Wim Van Sebroeck , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , "moderated list:ARM/Mediatek SoC support" , LINUX-WATCHDOG 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 > + wdd->info = &smcwd_info; > + /* get_timeleft is optional */ > + if (smcwd_call(SMCWD_GET_TIMELEFT, 0, NULL)) How is this supposed to work? A firmware that implements this call would return the time left here which may not be 0 (maybe the watchdog was already primed by the bootloader or whatever), so smcwd_call() would interpret it as an error. I think the cleanest solution would be to stick to the same return codes in a0 and use a1 to report the time left when a0 is PSCI_SUCCESS. This is more consistent with SMCWD_INIT too.