Re: [PATCH RFC] Documentation: RCU: Clarify comment about fanout

2018-09-22 Thread Joel Fernandes
On Fri, Sep 21, 2018 at 9:14 PM Paul E. McKenney wrote: > > On Fri, Sep 21, 2018 at 06:31:53PM -0400, Joel Fernandes (Google) wrote: > > RCU Data-Structures document describes a trick to test RCU with small > > number of CPUs but with a larger tree. It wasn't immediately clear how > > the document

Re: [PATCH v3 1/2] dt-bindings: hwmon: Add ina3221 documentation

2018-09-22 Thread Guenter Roeck
Hi, On 09/21/2018 03:32 PM, Nicolin Chen wrote: Texas Instruments INA3221 is a triple-channel shunt and bus voltage monitor. This patch adds a DT binding doc for it. Signed-off-by: Nicolin Chen --- Changelog v2->v3: * Added a simple subject in the line 1 * Fixed the shunt resistor value in

Re: [PATCH v3 2/2] hwmon: ina3221: Read channel input source info from DT

2018-09-22 Thread Guenter Roeck
Hi, On 09/21/2018 03:32 PM, Nicolin Chen wrote: From: Nicolin Chen An ina3221 chip has three input ports. Each port is used to measure the voltage and current of its input source. The DT binding now has defined bindings for their input sources, so the driver should read these information and

Re: [PATCH RFC] Documentation: RCU: Clarify comment about fanout

2018-09-22 Thread Paul E. McKenney
On Sat, Sep 22, 2018 at 04:10:51AM -0400, Joel Fernandes wrote: > On Fri, Sep 21, 2018 at 9:14 PM Paul E. McKenney > wrote: > > > > On Fri, Sep 21, 2018 at 06:31:53PM -0400, Joel Fernandes (Google) wrote: > > > RCU Data-Structures document describes a trick to test RCU with small > > > number of

Re: [PATCH v3 1/2] dt-bindings: hwmon: Add ina3221 documentation

2018-09-22 Thread Nicolin Chen
> >+2) child nodes > >+ The names of child nodes should indicate input source names > >+ > >+ Required properties: > >+ - input-id: Must be 1, 2 or 3 > >+ > >+ Optional properties: > >+ - shunt-resistor: Shunt resistor value in micro-Ohm > >+ - status: Should be "disabled" if no input source

Re: [PATCH v3 2/2] hwmon: ina3221: Read channel input source info from DT

2018-09-22 Thread Nicolin Chen
> >This patch adds a new structure of input source specific > >information including input source label, shunt resistor > >value and its connection status. It exposes these labels > >via sysfs and also disables those channels where there's > >no input source being connected. > > > > I see you have

Re: [PATCH RFC] Documentation: RCU: Clarify comment about fanout

2018-09-22 Thread Joel Fernandes
On Sat, Sep 22, 2018 at 9:46 AM Paul E. McKenney wrote: [...] > > I have a few more as well, I'll send them out soon. > > I do have on my list to update this document based on the changes in > -rcu, which among other things eliminate the rcu_dynticks structure > and make it so there is only one r

[PATCH RFC 1/3] rcu: tree: Remove unused externs

2018-09-22 Thread Joel Fernandes (Google)
These aren't used anymore. Remove them. Signed-off-by: Joel Fernandes (Google) --- kernel/rcu/tree.h | 11 --- 1 file changed, 11 deletions(-) diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h index 703e19ff532d..57a937ac51c2 100644 --- a/kernel/rcu/tree.h +++ b/kernel/rcu/tree.h @@ -3

[PATCH RFC 2/3] rcu: tree: Fix comment about gp_seq_needed

2018-09-22 Thread Joel Fernandes (Google)
rcu_state does not have a gp_seq_needed field. This comment therefore is confusing or incorrect. Fix it. Signed-off-by: Joel Fernandes (Google) --- kernel/rcu/tree.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h index 57a937ac51c2..

[PATCH RFC 3/3] Documentation: RCU: Fix rcu_preempt_state reference in stallwarn

2018-09-22 Thread Joel Fernandes (Google)
rcu_preempt_state doesn't exist anymore. Update stallwarn documentation accordingly. Signed-off-by: Joel Fernandes (Google) --- Documentation/RCU/stallwarn.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Documentation/RCU/stallwarn.txt b/Documentation/RCU/stallwarn.t

Re: [PATCH v3 1/2] dt-bindings: hwmon: Add ina3221 documentation

2018-09-22 Thread Guenter Roeck
On 09/22/2018 11:03 AM, Nicolin Chen wrote: +2) child nodes + The names of child nodes should indicate input source names + + Required properties: + - input-id: Must be 1, 2 or 3 + + Optional properties: + - shunt-resistor: Shunt resistor value in micro-Ohm + - status: Should be "disabled"

Re: [PATCH v3 2/2] hwmon: ina3221: Read channel input source info from DT

2018-09-22 Thread Guenter Roeck
On 09/22/2018 11:46 AM, Nicolin Chen wrote: This patch adds a new structure of input source specific information including input source label, shunt resistor value and its connection status. It exposes these labels via sysfs and also disables those channels where there's no input source being con

Re: [PATCH RFC 1/3] rcu: tree: Remove unused externs

2018-09-22 Thread Paul E. McKenney
On Sat, Sep 22, 2018 at 07:41:25PM -0400, Joel Fernandes (Google) wrote: > These aren't used anymore. Remove them. > > Signed-off-by: Joel Fernandes (Google) Good catch, queued and pushed with subject/commit-log edits, thank you! Thanx, Pa

Re: [PATCH RFC 2/3] rcu: tree: Fix comment about gp_seq_needed

2018-09-22 Thread Paul E. McKenney
On Sat, Sep 22, 2018 at 07:41:26PM -0400, Joel Fernandes (Google) wrote: > rcu_state does not have a gp_seq_needed field. This comment therefore is > confusing or incorrect. Fix it. > > Signed-off-by: Joel Fernandes (Google) Good eyes, queued and pushed with edits, thank you! (Yes, I do have a

Re: [PATCH RFC 3/3] Documentation: RCU: Fix rcu_preempt_state reference in stallwarn

2018-09-22 Thread Paul E. McKenney
On Sat, Sep 22, 2018 at 07:41:27PM -0400, Joel Fernandes (Google) wrote: > rcu_preempt_state doesn't exist anymore. Update stallwarn documentation > accordingly. > > Signed-off-by: Joel Fernandes (Google) Good eyes, queued and pushed with edits, including fixing a grammar nit in my original. ;-

Re: [PATCH v3 2/2] hwmon: ina3221: Read channel input source info from DT

2018-09-22 Thread Nicolin Chen
On Sat, Sep 22, 2018 at 04:59:55PM -0700, Guenter Roeck wrote: > > > > + /* Disable channels if their inputs are disconnected */ > > > > + for (i = 0, mask = 0; i < INA3221_NUM_CHANNELS; i++) { > > > > + if (ina->inputs[i].disconnected) > > > > + mas

Re: [PATCH RFC] Documentation: RCU: Clarify comment about fanout

2018-09-22 Thread Paul E. McKenney
On Sat, Sep 22, 2018 at 07:38:05PM -0400, Joel Fernandes wrote: > On Sat, Sep 22, 2018 at 9:46 AM Paul E. McKenney > wrote: > [...] > > > I have a few more as well, I'll send them out soon. > > > > I do have on my list to update this document based on the changes in > > -rcu, which among other th

Re: [PATCH v3 2/2] hwmon: ina3221: Read channel input source info from DT

2018-09-22 Thread Nicolin Chen
On Sat, Sep 22, 2018 at 05:38:41PM -0700, Nicolin Chen wrote: > On Sat, Sep 22, 2018 at 04:59:55PM -0700, Guenter Roeck wrote: > > > > > > + /* Disable channels if their inputs are disconnected */ > > > > > + for (i = 0, mask = 0; i < INA3221_NUM_CHANNELS; i++) { > > > > > + if

Re: [PATCH v3 2/2] hwmon: ina3221: Read channel input source info from DT

2018-09-22 Thread Guenter Roeck
On 09/22/2018 05:38 PM, Nicolin Chen wrote: On Sat, Sep 22, 2018 at 04:59:55PM -0700, Guenter Roeck wrote: + /* Disable channels if their inputs are disconnected */ + for (i = 0, mask = 0; i < INA3221_NUM_CHANNELS; i++) { + if (ina->inputs[i].disconnected) +

Re: [PATCH v1 0/6] mm: online/offline_pages called w.o. mem_hotplug_lock

2018-09-22 Thread Balbir Singh
On Wed, Sep 19, 2018 at 09:35:07AM +0200, David Hildenbrand wrote: > Am 19.09.18 um 03:22 schrieb Balbir Singh: > > On Tue, Sep 18, 2018 at 01:48:16PM +0200, David Hildenbrand wrote: > >> Reading through the code and studying how mem_hotplug_lock is to be used, > >> I noticed that there are two pla

Re: [PATCH v3 2/2] hwmon: ina3221: Read channel input source info from DT

2018-09-22 Thread Nicolin Chen
On Sat, Sep 22, 2018 at 07:07:02PM -0700, Guenter Roeck wrote: > On 09/22/2018 05:38 PM, Nicolin Chen wrote: > >On Sat, Sep 22, 2018 at 04:59:55PM -0700, Guenter Roeck wrote: > > > >+/* Disable channels if their inputs are disconnected */ > >+for (i = 0, mask = 0; i < INA322

Re: [PATCH v3 2/2] hwmon: ina3221: Read channel input source info from DT

2018-09-22 Thread Nicolin Chen
On Sat, Sep 22, 2018 at 08:33:00PM -0700, Nicolin Chen wrote: > On Sat, Sep 22, 2018 at 07:07:02PM -0700, Guenter Roeck wrote: > > On 09/22/2018 05:38 PM, Nicolin Chen wrote: > > >On Sat, Sep 22, 2018 at 04:59:55PM -0700, Guenter Roeck wrote: > > > > > >+ /* Disable channels if their input

[PATCH v4 0/2] Add an initial DT binding doc for ina3221

2018-09-22 Thread Nicolin Chen
This series adds a initial DT binding doc for ina3221. It defines a child node to describe the input source of each ina3221 channel. Then it changes the driver to handle the information properly. Changelog v3->v4: * Fixed one place in child DT node bindings (PATCH-1) * Changed the driver accordi

[PATCH v4 1/2] dt-bindings: hwmon: Add ina3221 documentation

2018-09-22 Thread Nicolin Chen
Texas Instruments INA3221 is a triple-channel shunt and bus voltage monitor. This patch adds a DT binding doc for it. Signed-off-by: Nicolin Chen --- Changelog v3->v4: * Removed the attempt of putting labels in the node names * Added a new optional label property in the child node * Updated ex

[PATCH v4 2/2] hwmon: ina3221: Read channel input source info from DT

2018-09-22 Thread Nicolin Chen
An ina3221 chip has three input ports. Each port is used to measure the voltage and current of its input source. The DT binding now has defined bindings for their input sources, so the driver should read these information and handle accordingly. This patch adds a new structure of input source spe

Re: [PATCH v4 2/2] hwmon: ina3221: Read channel input source info from DT

2018-09-22 Thread Guenter Roeck
On 09/22/2018 09:11 PM, Nicolin Chen wrote: An ina3221 chip has three input ports. Each port is used to measure the voltage and current of its input source. The DT binding now has defined bindings for their input sources, so the driver should read these information and handle accordingly. This

Re: [PATCH v4 1/2] dt-bindings: hwmon: Add ina3221 documentation

2018-09-22 Thread Guenter Roeck
On 09/22/2018 09:11 PM, Nicolin Chen wrote: Texas Instruments INA3221 is a triple-channel shunt and bus voltage monitor. This patch adds a DT binding doc for it. Signed-off-by: Nicolin Chen --- Changelog v3->v4: * Removed the attempt of putting labels in the node names * Added a new optiona

Re: [PATCH v4 2/2] hwmon: ina3221: Read channel input source info from DT

2018-09-22 Thread Nicolin Chen
Thank you for the quick response! On Sat, Sep 22, 2018 at 10:11:26PM -0700, Guenter Roeck wrote: > >+static umode_t ina3221_attr_is_visible(struct kobject *kobj, > >+ struct attribute *attr, int n) > >+{ > >+const int max_attrs = ARRAY_SIZE(ina3221_attrs) - 1;

Re: [PATCH v3 2/2] hwmon: ina3221: Read channel input source info from DT

2018-09-22 Thread Guenter Roeck
On 09/22/2018 08:33 PM, Nicolin Chen wrote: No. If the chip was configured by the BIOS/ROMMON, it is supposed to be that way. We can not just override that. For this driver, it does soft reset in the probe() so we're sure that all channels are enabled at the moment of calling this regmap_updat

Re: [PATCH v4 1/2] dt-bindings: hwmon: Add ina3221 documentation

2018-09-22 Thread Nicolin Chen
On Sat, Sep 22, 2018 at 10:19:42PM -0700, Guenter Roeck wrote: > >+2) child nodes > >+ Required properties: > >+ - input-id: Must be 1, 2 or 3 > >+ > >+ Optional properties: > >+ - input-label: Name of the input source > >+ - shunt-resistor: Shunt resistor value in micro-Ohm > >+ - status: Sh

Re: [PATCH v4 1/2] dt-bindings: hwmon: Add ina3221 documentation

2018-09-22 Thread Guenter Roeck
On 09/22/2018 10:31 PM, Nicolin Chen wrote: On Sat, Sep 22, 2018 at 10:19:42PM -0700, Guenter Roeck wrote: +2) child nodes + Required properties: + - input-id: Must be 1, 2 or 3 + + Optional properties: + - input-label: Name of the input source + - shunt-resistor: Shunt resistor value in mi

Re: [PATCH v4 1/2] dt-bindings: hwmon: Add ina3221 documentation

2018-09-22 Thread Nicolin Chen
On Sat, Sep 22, 2018 at 10:45:49PM -0700, Guenter Roeck wrote: > On 09/22/2018 10:31 PM, Nicolin Chen wrote: > > On Sat, Sep 22, 2018 at 10:19:42PM -0700, Guenter Roeck wrote: > > > > +2) child nodes > > > > + Required properties: > > > > + - input-id: Must be 1, 2 or 3 > > > > + > > > > + Optio

Re: [PATCH v4 1/2] dt-bindings: hwmon: Add ina3221 documentation

2018-09-22 Thread Guenter Roeck
On 09/22/2018 11:01 PM, Nicolin Chen wrote: On Sat, Sep 22, 2018 at 10:45:49PM -0700, Guenter Roeck wrote: On 09/22/2018 10:31 PM, Nicolin Chen wrote: On Sat, Sep 22, 2018 at 10:19:42PM -0700, Guenter Roeck wrote: +2) child nodes + Required properties: + - input-id: Must be 1, 2 or 3 + + Op