lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190607225038.02A5D20868@mail.kernel.org>
Date:   Fri, 07 Jun 2019 15:50:37 -0700
From:   Stephen Boyd <sboyd@...nel.org>
To:     Paul Cercueil <paul@...pouillou.net>
Cc:     Daniel Lezcano <daniel.lezcano@...aro.org>,
        James Hogan <jhogan@...nel.org>,
        Jason Cooper <jason@...edaemon.net>,
        Jonathan Corbet <corbet@....net>,
        Lee Jones <lee.jones@...aro.org>,
        Marc Zyngier <marc.zyngier@....com>,
        Mark Rutland <mark.rutland@....com>,
        Michael Turquette <mturquette@...libre.com>,
        Paul Burton <paul.burton@...s.com>,
        Ralf Baechle <ralf@...ux-mips.org>,
        Rob Herring <robh+dt@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Mathieu Malaterre <malat@...ian.org>,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
        linux-mips@...r.kernel.org, linux-doc@...r.kernel.org,
        linux-clk@...r.kernel.org, od@...c.me
Subject: Re: [PATCH v12 05/13] clk: ingenic: Add driver for the TCU clocks

Quoting Paul Cercueil (2019-06-07 14:59:54)
> Hi Stephen, thanks for the review.
> > Quoting Paul Cercueil (2019-05-21 07:51:33)
> >>  diff --git a/drivers/clk/ingenic/tcu.c b/drivers/clk/ingenic/tcu.c
> >>  new file mode 100644
> >>  index 000000000000..7249225a6994
> >>  --- /dev/null
> >>  +++ b/drivers/clk/ingenic/tcu.c
> >>  @@ -0,0 +1,458 @@
> >>  +// SPDX-License-Identifier: GPL-2.0
> >>  +/*
> >>  + * JZ47xx SoCs TCU clocks driver
> >>  + * Copyright (C) 2019 Paul Cercueil <paul@...pouillou.net>
> >>  + */
> >>  +
> >>  +#include <linux/clk.h>
> >>  +#include <linux/clk-provider.h>
> >>  +#include <linux/clkdev.h>
> >>  +#include <linux/clockchips.h>
> >>  +#include <linux/mfd/ingenic-tcu.h>
> >>  +#include <linux/regmap.h>
> >>  +
> >>  +#include <dt-bindings/clock/ingenic,tcu.h>
> >>  +
> >>  +/* 8 channels max + watchdog + OST */
> >>  +#define TCU_CLK_COUNT  10
> >>  +
> >>  +#define TCU_ERR(...) pr_crit("ingenic-tcu-clk: " __VA_ARGS__)
> > 
> > Why is it pr_crit instead of pr_err()?
> 
> If the TCU timer clocks are not provided for any reason, the system
> will have no timer, and the kernel will hang very early in the init
> process. That's why I chose pr_crit().

HMm. So maybe it should be TCU_CRIT() then? Or just drop the wrapper
macro and define a pr_fmt for this file that has ingenic-tcu-clk: for
it?

> 
> Most of the code here works without a struct device, it wouldn't be 
> easy to
> get it to work with runtime PM.
> 
> I can enable the "tcu" clock in the probe and just gate/ungate it in the
> suspend/resume callbacks, that would work just fine. We don't need 
> anything
> fancy here.

OK. That sounds like a better approach to gate and ungate in
suspend/resume.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ