From patchwork Mon Jun 29 16:53:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fu Wei Fu X-Patchwork-Id: 50438 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 35524218E4 for ; Mon, 29 Jun 2015 16:53:25 +0000 (UTC) Received: by laar3 with SMTP id r3sf47570176laa.1 for ; Mon, 29 Jun 2015 09:53:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mime-version:in-reply-to:references :date:message-id:subject:from:to:cc:content-type:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe; bh=7/QWoqSZOBtAvTQz3wwHMoooyCtYWQq8WZI6BHfT6zk=; b=LyUuaQQL1Al98NavbD0FF67swCAKkCY/J+35PT/ydwJK2STiUJ/q4lEFyo7d8BOcAY wZzk1kcOh3HzNP3+7ZLt8WFEJ2gvCQi8+/yuY5R9Q/OQMtjJSHIQ7IYDy1504JEuTL5C 9fPqeoxfSRDPaIIhwPi4MZx2hXsuGvyrdxsjyGx3jZyvjLFK4ITOok5QMjSpUpKcXDWE bblbkKHhi5SdlfAEo+Qspe030tMVl/pOubiC4orXZ2WTSEP10RFs79KeB19+w4RFAJDP +IV2shoPxqZP5KPhzUgHKJ3WhoKfeaGKT4bjJcvIHWjKg1nQKIB8XpWD0fLgcQ9UB6mb oDfg== X-Gm-Message-State: ALoCoQlKRVpsikR379rNubM/mhrrWhcEa5DtE5Ox6XWtaI4pWkd4+QB3iCyBqJgP60mVO2SxzEpO X-Received: by 10.180.97.9 with SMTP id dw9mr9163392wib.2.1435596804193; Mon, 29 Jun 2015 09:53:24 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.8.1 with SMTP id n1ls661604laa.87.gmail; Mon, 29 Jun 2015 09:53:23 -0700 (PDT) X-Received: by 10.152.37.67 with SMTP id w3mr15112047laj.123.1435596803960; Mon, 29 Jun 2015 09:53:23 -0700 (PDT) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com. [209.85.215.49]) by mx.google.com with ESMTPS id cn6si35516004lbb.126.2015.06.29.09.53.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Jun 2015 09:53:23 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by lagc2 with SMTP id c2so17360059lag.3 for ; Mon, 29 Jun 2015 09:53:23 -0700 (PDT) X-Received: by 10.152.4.163 with SMTP id l3mr15356791lal.35.1435596803656; Mon, 29 Jun 2015 09:53:23 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp1834998lbb; Mon, 29 Jun 2015 09:53:22 -0700 (PDT) X-Received: by 10.68.88.33 with SMTP id bd1mr7040691pbb.124.1435596801354; Mon, 29 Jun 2015 09:53:21 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k1si65342680pdr.179.2015.06.29.09.53.20; Mon, 29 Jun 2015 09:53:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752102AbbF2QxT (ORCPT + 8 others); Mon, 29 Jun 2015 12:53:19 -0400 Received: from mail-ob0-f175.google.com ([209.85.214.175]:33424 "EHLO mail-ob0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751100AbbF2QxR (ORCPT ); Mon, 29 Jun 2015 12:53:17 -0400 Received: by obpn3 with SMTP id n3so108701905obp.0 for ; Mon, 29 Jun 2015 09:53:17 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.202.210.148 with SMTP id j142mr14240807oig.68.1435596797128; Mon, 29 Jun 2015 09:53:17 -0700 (PDT) Received: by 10.202.3.198 with HTTP; Mon, 29 Jun 2015 09:53:16 -0700 (PDT) In-Reply-To: <1435068994-13526-1-git-send-email-fu.wei@linaro.org> References: <=fu.wei@linaro.org> <1435068994-13526-1-git-send-email-fu.wei@linaro.org> Date: Tue, 30 Jun 2015 00:53:16 +0800 Message-ID: Subject: Re: [PATCH v6 0/8] Watchdog: introduce ARM SBSA watchdog driver From: Fu Wei To: Suravee Suthikulpanit , Linaro ACPI Mailman List , linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Cc: Wei Fu , G Gregory , Al Stone , Hanjun Guo , Timur Tabi , Ashwin Chaugule , Arnd Bergmann , Guenter Roeck , Vipul Gandhi , Wim Van Sebroeck , Jon Masters , Leo Duran , Jon Corbet , Mark Rutland , Catalin Marinas , Will Deacon , rjw@rjwysocki.net, dyoung@redhat.com, panand@redhat.com, Fu Wei Sender: devicetree-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: devicetree@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: fu.wei@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Hi Guenter, Any suggestion on this v6 patchset, for now , I only got : (1) delete WCV output: any question or anything I can improve for this patchset? Great thanks for your help. On 23 June 2015 at 22:16, wrote: > From: Fu Wei > > This patchset: > (1)Introduce Documentation/devicetree/bindings/watchdog/sbsa-gwdt.txt > for FDT info of SBSA Generic Watchdog, and give two examples of > adding SBSA Generic Watchdog device node into the dts files: > foundation-v8.dts and amd-seattle-soc.dtsi. > > (2)Introduce "pretimeout" into the watchdog framework, and update > Documentation/watchdog/watchdog-kernel-api.txt to introduce: > (1)the new elements in the watchdog_device and watchdog_ops struct; > (2)the new API "watchdog_init_timeouts". > > (3)Introduce ARM SBSA watchdog driver: > a.Use linux kernel watchdog framework; > b.Work with FDT on ARM64; > c.Use "pretimeout" in watchdog framework; > d.Support getting timeout and pretimeout from parameter and FDT > at the driver init stage. > e.In the first timeout, do panic to save system context; > f.In the second stage, user can still feed the dog without > cleaning WS0. By this feature, we can avoid the panic infinite > loops, while backing up a large system context in a server. > g.In the second stage, can trigger WS1 by setting pretimeout = 0 > if necessary. > > (4)Introduce ACPI GTDT parser: drivers/acpi/gtdt.c > Parse SBSA Generic Watchdog Structure in GTDT table of ACPI, > and create a platform device with that information. > This platform device can be used by This Watchdog driver. > drivers/clocksource/arm_arch_timer.c is simplified by this GTDT support. > > This patchset has been tested with watchdog daemon > (ACPI/FDT, module/build-in) on the following platforms: > (1)ARM Foundation v8 model > > Changelog: > v6: Improve the dtb example files: reduce the register frame size to 4K. > Improve pretimeout support: > (1) improve watchdog_init_timeouts function > (2) rename watchdog_check_min_max_timeouts back to the original name > (1) improve watchdog_timeout_invalid/watchdog_pretimeout_invalid > Add the new features in the sbsa_gwdt driver: > (1) In the second stage, user can feed the dog without cleaning WS0. > (2) In the second stage, user can trigger WS1 by setting pretimeout = 0. > (3) expand the max value of pretimeout, in case 10 second is not enough > for a kdump kernel reboot in panic. > > v5: Improve pretimeout support: > (1)fix typo in documentation and comments. > (2)fix the timeout limits validation bug. > Simplify sbsa_gwdt driver: > (1)integrate all the registers access functions into caller. > > v4: Refactor GTDT support code: remove it from arch/arm64/kernel/acpi.c, > put it into drivers/acpi/gtdt.c file. > Integrate the GTDT code of drivers/clocksource/arm_arch_timer.c into > drivers/acpi/gtdt.c. > Improve pretimeout support, fix "pretimeout == 0" problem. > Simplify sbsa_gwdt driver: > (1)timeout/pretimeout limits setup; > (2)keepalive function; > (3)delete "clk == 0" check; > (4)delete WS0 status bit check in interrupt routine; > (5)sbsa_gwdt_set_wcv function. > > v3: Delete "export arch_timer_get_rate" patch. > Driver back to use arch_timer_get_cntfrq. > Improve watchdog_init_timeouts function and update relevant documentation. > Improve watchdog_timeout_invalid and watchdog_pretimeout_invalid. > Improve foundation-v8.dts: delete the unnecessary tag of device node. > Remove "ARM64 || COMPILE_TEST" from Kconfig. > Add comments in arch/arm64/kernel/acpi.c > Fix typoes and incorrect comments. > > v2: Improve watchdog-kernel-api.txt documentation for pretimeout support. > Export "arch_timer_get_rate" in arm_arch_timer.c. > Add watchdog_init_timeouts API for pretimeout support in framework. > Improve suspend and resume foundation in driver > Improve timeout/pretimeout values init code in driver. > Delete unnecessary items of the sbsa_gwdt struct and #define. > Delete all unnecessary debug info in driver. > Fix 64bit division bug. > Use the arch_timer interface to get watchdog clock rate. > Add MODULE_DEVICE_TABLE for platform device id. > Fix typoes. > > v1: The first version upstream patchset to linux mailing list. > > Fu Wei (8): > Documentation: add sbsa-gwdt.txt documentation > ARM64: add SBSA Generic Watchdog device node in foundation-v8.dts > ARM64: add SBSA Generic Watchdog device node in amd-seattle-soc.dtsi > Watchdog: introdouce "pretimeout" into framework > Watchdog: introduce ARM SBSA watchdog driver > ACPI: add GTDT table parse driver into ACPI driver > Watchdog: enable ACPI GTDT support for ARM SBSA watchdog driver > clocksource: simplify ACPI code in arm_arch_timer.c > > .../devicetree/bindings/watchdog/sbsa-gwdt.txt | 36 ++ > Documentation/watchdog/watchdog-kernel-api.txt | 47 ++- > arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi | 11 + > arch/arm64/boot/dts/arm/foundation-v8.dts | 10 + > arch/arm64/kernel/time.c | 4 +- > drivers/acpi/Kconfig | 9 + > drivers/acpi/Makefile | 1 + > drivers/acpi/gtdt.c | 180 ++++++++ > drivers/clocksource/Kconfig | 1 + > drivers/clocksource/arm_arch_timer.c | 60 +-- > drivers/watchdog/Kconfig | 15 + > drivers/watchdog/Makefile | 1 + > drivers/watchdog/sbsa_gwdt.c | 455 +++++++++++++++++++++ > drivers/watchdog/watchdog_core.c | 98 +++-- > drivers/watchdog/watchdog_dev.c | 53 +++ > include/clocksource/arm_arch_timer.h | 8 + > include/linux/acpi.h | 5 + > include/linux/clocksource.h | 4 +- > include/linux/watchdog.h | 39 +- > 19 files changed, 947 insertions(+), 90 deletions(-) > create mode 100644 Documentation/devicetree/bindings/watchdog/sbsa-gwdt.txt > create mode 100644 drivers/acpi/gtdt.c > create mode 100644 drivers/watchdog/sbsa_gwdt.c > > -- > 1.9.1 > diff --git a/drivers/watchdog/sbsa_gwdt.c b/drivers/watchdog/sbsa_gwdt.c index 2de5899..c42883b 100644 --- a/drivers/watchdog/sbsa_gwdt.c +++ b/drivers/watchdog/sbsa_gwdt.c @@ -344,8 +342,7 @@ static int sbsa_gwdt_probe(struct platform_device *pdev) status = readl_relaxed(gwdt->control_base + SBSA_GWDT_WCS); if (status & SBSA_GWDT_WCS_WS1) { - dev_warn(dev, "System reset by WDT(WCV: %llx)\n", - sbsa_gwdt_get_wcv(wdd)); + dev_warn(dev, "System reset by WDT.\n"); wdd->bootstatus |= WDIOF_CARDRESET; } else if (status == (SBSA_GWDT_WCS_WS0 | SBSA_GWDT_WCS_EN)) { gwdt->ws0_mode = true;