Re: [PATCH] checkpatch: Add __ro_after_init to known $Attribute

2018-08-27 Thread Kees Cook
On Mon, Aug 27, 2018 at 10:33 PM, Joe Perches  wrote:
> __ro_after_init is a specific __attribute__ that checkpatch
> does currently not understand.
>
> Add it to the known $Attribute types so that code that uses
> variables declared with __ro_after_init are not thought to
> be a modifier type.
>
> This appears as a defect in checkpatch output of code like:
>
> static bool trust_cpu __ro_after_init = IS_ENABLED(CONFIG_RANDOM_TRUST_CPU);
> [...]
>if (trust_cpu && arch_init) {
>
> where checkpatch reports:
>
> ERROR: space prohibited after that '&&' (ctx:WxW)
> if (trust_cpu && arch_init) {
>

Thanks for tracking this down!

> Reported-by: Kees Cook 
> Signed-off-by: Joe Perches 

Tested-by: Kees Cook 

-Kees

> ---
>  scripts/checkpatch.pl | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 5219280bf7ff..23cde9d90278 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -380,6 +380,7 @@ our $Attribute  = qr{
> __noclone|
> __deprecated|
> __read_mostly|
> +   __ro_after_init|
> __kprobes|
> $InitAttribute|
> cacheline_aligned|



-- 
Kees Cook
Pixel Security


Re: [PATCH] checkpatch: Add __ro_after_init to known $Attribute

2018-08-27 Thread Kees Cook
On Mon, Aug 27, 2018 at 10:33 PM, Joe Perches  wrote:
> __ro_after_init is a specific __attribute__ that checkpatch
> does currently not understand.
>
> Add it to the known $Attribute types so that code that uses
> variables declared with __ro_after_init are not thought to
> be a modifier type.
>
> This appears as a defect in checkpatch output of code like:
>
> static bool trust_cpu __ro_after_init = IS_ENABLED(CONFIG_RANDOM_TRUST_CPU);
> [...]
>if (trust_cpu && arch_init) {
>
> where checkpatch reports:
>
> ERROR: space prohibited after that '&&' (ctx:WxW)
> if (trust_cpu && arch_init) {
>

Thanks for tracking this down!

> Reported-by: Kees Cook 
> Signed-off-by: Joe Perches 

Tested-by: Kees Cook 

-Kees

> ---
>  scripts/checkpatch.pl | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 5219280bf7ff..23cde9d90278 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -380,6 +380,7 @@ our $Attribute  = qr{
> __noclone|
> __deprecated|
> __read_mostly|
> +   __ro_after_init|
> __kprobes|
> $InitAttribute|
> cacheline_aligned|



-- 
Kees Cook
Pixel Security


[PATCH] Input: Support for Xbox1 PDP Camo series gamepad

2018-08-27 Thread Ramses Ramírez
The "Xbox One PDP Wired Controller - Camo series" has a different
product-id than the regular PDP controller and the PDP stealth series,
but it uses the same initialization sequence. This patch adds the
product-id of the camo series to the structures that handle the other
PDP Xbox One controllers.

Signed-off-by: Ramses Ramírez 
---
 drivers/input/joystick/xpad.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index cd620e009bad..d4b9db487b16 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -231,6 +231,7 @@ static const struct xpad_device {
{ 0x0e6f, 0x0246, "Rock Candy Gamepad for Xbox One 2015", 0, 
XTYPE_XBOXONE },
{ 0x0e6f, 0x02ab, "PDP Controller for Xbox One", 0, XTYPE_XBOXONE },
{ 0x0e6f, 0x02a4, "PDP Wired Controller for Xbox One - Stealth Series", 
0, XTYPE_XBOXONE },
+   { 0x0e6f, 0x02a6, "PDP Wired Controller for Xbox One - Camo Series", 0, 
XTYPE_XBOXONE },
{ 0x0e6f, 0x0301, "Logic3 Controller", 0, XTYPE_XBOX360 },
{ 0x0e6f, 0x0346, "Rock Candy Gamepad for Xbox One 2016", 0, 
XTYPE_XBOXONE },
{ 0x0e6f, 0x0401, "Logic3 Controller", 0, XTYPE_XBOX360 },
@@ -530,6 +531,8 @@ static const struct xboxone_init_packet 
xboxone_init_packets[] = {
XBOXONE_INIT_PKT(0x0e6f, 0x02ab, xboxone_pdp_init2),
XBOXONE_INIT_PKT(0x0e6f, 0x02a4, xboxone_pdp_init1),
XBOXONE_INIT_PKT(0x0e6f, 0x02a4, xboxone_pdp_init2),
+   XBOXONE_INIT_PKT(0x0e6f, 0x02a6, xboxone_pdp_init1),
+   XBOXONE_INIT_PKT(0x0e6f, 0x02a6, xboxone_pdp_init2),
XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init),
XBOXONE_INIT_PKT(0x24c6, 0x542a, xboxone_rumblebegin_init),
XBOXONE_INIT_PKT(0x24c6, 0x543a, xboxone_rumblebegin_init),
-- 
2.17.1



[PATCH] Input: Support for Xbox1 PDP Camo series gamepad

2018-08-27 Thread Ramses Ramírez
The "Xbox One PDP Wired Controller - Camo series" has a different
product-id than the regular PDP controller and the PDP stealth series,
but it uses the same initialization sequence. This patch adds the
product-id of the camo series to the structures that handle the other
PDP Xbox One controllers.

Signed-off-by: Ramses Ramírez 
---
 drivers/input/joystick/xpad.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index cd620e009bad..d4b9db487b16 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -231,6 +231,7 @@ static const struct xpad_device {
{ 0x0e6f, 0x0246, "Rock Candy Gamepad for Xbox One 2015", 0, 
XTYPE_XBOXONE },
{ 0x0e6f, 0x02ab, "PDP Controller for Xbox One", 0, XTYPE_XBOXONE },
{ 0x0e6f, 0x02a4, "PDP Wired Controller for Xbox One - Stealth Series", 
0, XTYPE_XBOXONE },
+   { 0x0e6f, 0x02a6, "PDP Wired Controller for Xbox One - Camo Series", 0, 
XTYPE_XBOXONE },
{ 0x0e6f, 0x0301, "Logic3 Controller", 0, XTYPE_XBOX360 },
{ 0x0e6f, 0x0346, "Rock Candy Gamepad for Xbox One 2016", 0, 
XTYPE_XBOXONE },
{ 0x0e6f, 0x0401, "Logic3 Controller", 0, XTYPE_XBOX360 },
@@ -530,6 +531,8 @@ static const struct xboxone_init_packet 
xboxone_init_packets[] = {
XBOXONE_INIT_PKT(0x0e6f, 0x02ab, xboxone_pdp_init2),
XBOXONE_INIT_PKT(0x0e6f, 0x02a4, xboxone_pdp_init1),
XBOXONE_INIT_PKT(0x0e6f, 0x02a4, xboxone_pdp_init2),
+   XBOXONE_INIT_PKT(0x0e6f, 0x02a6, xboxone_pdp_init1),
+   XBOXONE_INIT_PKT(0x0e6f, 0x02a6, xboxone_pdp_init2),
XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init),
XBOXONE_INIT_PKT(0x24c6, 0x542a, xboxone_rumblebegin_init),
XBOXONE_INIT_PKT(0x24c6, 0x543a, xboxone_rumblebegin_init),
-- 
2.17.1



[PATCH] arm64: dts: msm8996: Transition smp2p and smd to mailbox

2018-08-27 Thread Bjorn Andersson
The smd and smp2p drivers now support accessing the APCS GLOBAL IPC
register through the mailbox framework, so migrate the msm8996 dts to
use this and remove the syscon based APCS node.

Signed-off-by: Bjorn Andersson 
---
 arch/arm64/boot/dts/qcom/msm8996.dtsi | 13 -
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi 
b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index cd3865e7a270..21057f957468 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -409,11 +409,6 @@
interrupts = ;
};
 
-   apcs: syscon@982 {
-   compatible = "syscon";
-   reg = <0x982 0x1000>;
-   };
-
apcs_glb: mailbox@982 {
compatible = "qcom,msm8996-apcs-hmss-global";
reg = <0x982 0x1000>;
@@ -1140,7 +1135,7 @@
interrupts = ;
 
label = "lpass";
-   qcom,ipc = < 16 8>;
+   mboxes = <_glb 8>;
qcom,smd-edge = <1>;
qcom,remote-pid = <2>;
};
@@ -1152,7 +1147,7 @@
 
interrupts = <0 158 IRQ_TYPE_EDGE_RISING>;
 
-   qcom,ipc = < 16 10>;
+   mboxes = <_glb 10>;
 
qcom,local-pid = <0>;
qcom,remote-pid = <2>;
@@ -1176,7 +1171,7 @@
 
interrupts = ;
 
-   qcom,ipc = < 16 14>;
+   mboxes = <_glb 14>;
 
qcom,local-pid = <0>;
qcom,remote-pid = <1>;
@@ -1200,7 +1195,7 @@
 
interrupts = ;
 
-   qcom,ipc = < 16 26>;
+   mboxes = <_glb 26>;
 
qcom,local-pid = <0>;
qcom,remote-pid = <3>;
-- 
2.18.0



[PATCH] arm64: dts: msm8996: Transition smp2p and smd to mailbox

2018-08-27 Thread Bjorn Andersson
The smd and smp2p drivers now support accessing the APCS GLOBAL IPC
register through the mailbox framework, so migrate the msm8996 dts to
use this and remove the syscon based APCS node.

Signed-off-by: Bjorn Andersson 
---
 arch/arm64/boot/dts/qcom/msm8996.dtsi | 13 -
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi 
b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index cd3865e7a270..21057f957468 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -409,11 +409,6 @@
interrupts = ;
};
 
-   apcs: syscon@982 {
-   compatible = "syscon";
-   reg = <0x982 0x1000>;
-   };
-
apcs_glb: mailbox@982 {
compatible = "qcom,msm8996-apcs-hmss-global";
reg = <0x982 0x1000>;
@@ -1140,7 +1135,7 @@
interrupts = ;
 
label = "lpass";
-   qcom,ipc = < 16 8>;
+   mboxes = <_glb 8>;
qcom,smd-edge = <1>;
qcom,remote-pid = <2>;
};
@@ -1152,7 +1147,7 @@
 
interrupts = <0 158 IRQ_TYPE_EDGE_RISING>;
 
-   qcom,ipc = < 16 10>;
+   mboxes = <_glb 10>;
 
qcom,local-pid = <0>;
qcom,remote-pid = <2>;
@@ -1176,7 +1171,7 @@
 
interrupts = ;
 
-   qcom,ipc = < 16 14>;
+   mboxes = <_glb 14>;
 
qcom,local-pid = <0>;
qcom,remote-pid = <1>;
@@ -1200,7 +1195,7 @@
 
interrupts = ;
 
-   qcom,ipc = < 16 26>;
+   mboxes = <_glb 26>;
 
qcom,local-pid = <0>;
qcom,remote-pid = <3>;
-- 
2.18.0



[PATCH] checkpatch: Add __ro_after_init to known $Attribute

2018-08-27 Thread Joe Perches
__ro_after_init is a specific __attribute__ that checkpatch
does currently not understand.

Add it to the known $Attribute types so that code that uses
variables declared with __ro_after_init are not thought to
be a modifier type.

This appears as a defect in checkpatch output of code like:

static bool trust_cpu __ro_after_init = IS_ENABLED(CONFIG_RANDOM_TRUST_CPU);
[...]
   if (trust_cpu && arch_init) {

where checkpatch reports:

ERROR: space prohibited after that '&&' (ctx:WxW)
if (trust_cpu && arch_init) {

Reported-by: Kees Cook 
Signed-off-by: Joe Perches 
---
 scripts/checkpatch.pl | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 5219280bf7ff..23cde9d90278 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -380,6 +380,7 @@ our $Attribute  = qr{
__noclone|
__deprecated|
__read_mostly|
+   __ro_after_init|
__kprobes|
$InitAttribute|
cacheline_aligned|


[PATCH] checkpatch: Add __ro_after_init to known $Attribute

2018-08-27 Thread Joe Perches
__ro_after_init is a specific __attribute__ that checkpatch
does currently not understand.

Add it to the known $Attribute types so that code that uses
variables declared with __ro_after_init are not thought to
be a modifier type.

This appears as a defect in checkpatch output of code like:

static bool trust_cpu __ro_after_init = IS_ENABLED(CONFIG_RANDOM_TRUST_CPU);
[...]
   if (trust_cpu && arch_init) {

where checkpatch reports:

ERROR: space prohibited after that '&&' (ctx:WxW)
if (trust_cpu && arch_init) {

Reported-by: Kees Cook 
Signed-off-by: Joe Perches 
---
 scripts/checkpatch.pl | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 5219280bf7ff..23cde9d90278 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -380,6 +380,7 @@ our $Attribute  = qr{
__noclone|
__deprecated|
__read_mostly|
+   __ro_after_init|
__kprobes|
$InitAttribute|
cacheline_aligned|


How to debug outliers in `wb_wait_for_completion()` in `ksys_sync()`?

2018-08-27 Thread Paul Menzel

Dear Linux folks,


Using `sleepgraph.py` [1][2] to profile the suspend to RAM (STR) times, 
shows that `ksys_enter` takes a noticeable amount of time.


13 ms on a TUXEDO Book BU1406 with the NVMe device *SAMSUNG 
MZVKW512HMJP-0*, which is quite good, and over a 60 ms on ASRock 
E350M1 with an SSD SanDisk device.


Adding `devicefilter: ksys_sync` to `config/suspend-callgraph.cfg`, and 
running `sudo ./sleepgraph.py -config config/suspend-callgraph.cfg`, the 
attached HTML output shows, that `iterate_supers` takes 6 to 7 ms twice.


•   `iterate_supers` (6.316 ms @ 388.944557)
•   `iterate_supers` (0.201 ms @ 388.950873)
•   `iterate_supers` (7.421 ms @ 388.951074)

Normally, `sync_inodes_one_sb` only takes microseconds, but once in both 
cases it takes several milliseconds.


•   sync_inodes_one_sb (0.001 ms @ 388.944660)
•   sync_inodes_one_sb (5.978 ms @ 388.944665)
•   sync_inodes_one_sb (0.001 ms @ 388.950645)

Please find an excerpt from the call graph from ftrace below, and note 
the time increase between 388.944751 and 388.950636.



  388.944700 |   0) sleepgr-11355  |   |  
wb_wait_for_completion() {
  388.944701 |   0) sleepgr-11355  |   |_cond_resched() 
{
  388.944701 |   0) sleepgr-11355  |   0.064 us|  rcu_all_qs();
  388.944702 |   0) sleepgr-11355  |   0.664 us|} /* 
_cond_resched */
  388.944702 |   0) sleepgr-11355  |   0.067 us|
init_wait_entry();
  388.944703 |   0) sleepgr-11355  |   |
prepare_to_wait_event() {
  388.944703 |   0) sleepgr-11355  |   0.080 us|  
_raw_spin_lock_irqsave();
  388.944704 |   0) sleepgr-11355  |   0.073 us|  
_raw_spin_unlock_irqrestore();
  388.944704 |   0) sleepgr-11355  |   1.388 us|} /* 
prepare_to_wait_event */
  388.944705 |   0) sleepgr-11355  |   |schedule() {
  388.944705 |   0) sleepgr-11355  |   0.085 us|  
rcu_note_context_switch();
  388.944706 |   0) sleepgr-11355  |   0.064 us|  
_raw_spin_lock();
  388.944707 |   0) sleepgr-11355  |   0.093 us|  
update_rq_clock();
  388.944708 |   0) sleepgr-11355  |   |  
deactivate_task() {
  388.944708 |   0) sleepgr-11355  |   |
dequeue_task_fair() {
  388.944708 |   0) sleepgr-11355  |   |  
dequeue_entity() {
  388.944709 |   0) sleepgr-11355  |   |
update_curr() {
  388.944709 |   0) sleepgr-11355  |   0.095 us|  
update_min_vruntime();
  388.944710 |   0) sleepgr-11355  |   0.126 us|  
cpuacct_charge();
  388.944710 |   0) sleepgr-11355  |   |  
__cgroup_account_cputime() {
  388.944711 |   0) sleepgr-11355  |   0.055 us|
cgroup_rstat_updated();
  388.944711 |   0) sleepgr-11355  |   0.675 us|  } /* 
__cgroup_account_cputime */
  388.944712 |   0) sleepgr-11355  |   2.779 us|} /* 
update_curr */
  388.944712 |   0) sleepgr-11355  |   0.121 us|
__update_load_avg_se();
  388.944713 |   0) sleepgr-11355  |   0.118 us|
__update_load_avg_cfs_rq();
  388.944713 |   0) sleepgr-11355  |   0.056 us|
clear_buddies();
  388.944714 |   0) sleepgr-11355  |   0.066 us|
account_entity_dequeue();
  388.944714 |   0) sleepgr-11355  |   0.050 us|
update_cfs_group();
  388.944715 |   0) sleepgr-11355  |   6.127 us|  } /* 
dequeue_entity */
  388.944715 |   0) sleepgr-11355  |   |  
dequeue_entity() {
  388.944715 |   0) sleepgr-11355  |   |
update_curr() {
  388.944716 |   0) sleepgr-11355  |   0.097 us|  
__calc_delta();
  388.944716 |   0) sleepgr-11355  |   0.071 us|  
update_min_vruntime();
  388.944717 |   0) sleepgr-11355  |   1.473 us|} /* 
update_curr */
  388.944717 |   0) sleepgr-11355  |   0.142 us|
__update_load_avg_se();
  388.944718 |   0) sleepgr-11355  |   0.100 us|
__update_load_avg_cfs_rq();
  388.944719 |   0) sleepgr-11355  |   0.069 us|
clear_buddies();
  388.944719 |   0) sleepgr-11355  |   0.098 us|
account_entity_dequeue();
  388.944720 |   0) sleepgr-11355  |   |
update_cfs_group() {
  388.944720 |   0) sleepgr-11355  |   0.110 us|  
reweight_entity();
  388.944721 |   0) sleepgr-11355  |   0.847 us|} /* 
update_cfs_group */
  388.944721 |   0) sleepgr-11355  |   6.197 us|  } /* 
dequeue_entity */
  388.944722 |   0) sleepgr-11355  

How to debug outliers in `wb_wait_for_completion()` in `ksys_sync()`?

2018-08-27 Thread Paul Menzel

Dear Linux folks,


Using `sleepgraph.py` [1][2] to profile the suspend to RAM (STR) times, 
shows that `ksys_enter` takes a noticeable amount of time.


13 ms on a TUXEDO Book BU1406 with the NVMe device *SAMSUNG 
MZVKW512HMJP-0*, which is quite good, and over a 60 ms on ASRock 
E350M1 with an SSD SanDisk device.


Adding `devicefilter: ksys_sync` to `config/suspend-callgraph.cfg`, and 
running `sudo ./sleepgraph.py -config config/suspend-callgraph.cfg`, the 
attached HTML output shows, that `iterate_supers` takes 6 to 7 ms twice.


•   `iterate_supers` (6.316 ms @ 388.944557)
•   `iterate_supers` (0.201 ms @ 388.950873)
•   `iterate_supers` (7.421 ms @ 388.951074)

Normally, `sync_inodes_one_sb` only takes microseconds, but once in both 
cases it takes several milliseconds.


•   sync_inodes_one_sb (0.001 ms @ 388.944660)
•   sync_inodes_one_sb (5.978 ms @ 388.944665)
•   sync_inodes_one_sb (0.001 ms @ 388.950645)

Please find an excerpt from the call graph from ftrace below, and note 
the time increase between 388.944751 and 388.950636.



  388.944700 |   0) sleepgr-11355  |   |  
wb_wait_for_completion() {
  388.944701 |   0) sleepgr-11355  |   |_cond_resched() 
{
  388.944701 |   0) sleepgr-11355  |   0.064 us|  rcu_all_qs();
  388.944702 |   0) sleepgr-11355  |   0.664 us|} /* 
_cond_resched */
  388.944702 |   0) sleepgr-11355  |   0.067 us|
init_wait_entry();
  388.944703 |   0) sleepgr-11355  |   |
prepare_to_wait_event() {
  388.944703 |   0) sleepgr-11355  |   0.080 us|  
_raw_spin_lock_irqsave();
  388.944704 |   0) sleepgr-11355  |   0.073 us|  
_raw_spin_unlock_irqrestore();
  388.944704 |   0) sleepgr-11355  |   1.388 us|} /* 
prepare_to_wait_event */
  388.944705 |   0) sleepgr-11355  |   |schedule() {
  388.944705 |   0) sleepgr-11355  |   0.085 us|  
rcu_note_context_switch();
  388.944706 |   0) sleepgr-11355  |   0.064 us|  
_raw_spin_lock();
  388.944707 |   0) sleepgr-11355  |   0.093 us|  
update_rq_clock();
  388.944708 |   0) sleepgr-11355  |   |  
deactivate_task() {
  388.944708 |   0) sleepgr-11355  |   |
dequeue_task_fair() {
  388.944708 |   0) sleepgr-11355  |   |  
dequeue_entity() {
  388.944709 |   0) sleepgr-11355  |   |
update_curr() {
  388.944709 |   0) sleepgr-11355  |   0.095 us|  
update_min_vruntime();
  388.944710 |   0) sleepgr-11355  |   0.126 us|  
cpuacct_charge();
  388.944710 |   0) sleepgr-11355  |   |  
__cgroup_account_cputime() {
  388.944711 |   0) sleepgr-11355  |   0.055 us|
cgroup_rstat_updated();
  388.944711 |   0) sleepgr-11355  |   0.675 us|  } /* 
__cgroup_account_cputime */
  388.944712 |   0) sleepgr-11355  |   2.779 us|} /* 
update_curr */
  388.944712 |   0) sleepgr-11355  |   0.121 us|
__update_load_avg_se();
  388.944713 |   0) sleepgr-11355  |   0.118 us|
__update_load_avg_cfs_rq();
  388.944713 |   0) sleepgr-11355  |   0.056 us|
clear_buddies();
  388.944714 |   0) sleepgr-11355  |   0.066 us|
account_entity_dequeue();
  388.944714 |   0) sleepgr-11355  |   0.050 us|
update_cfs_group();
  388.944715 |   0) sleepgr-11355  |   6.127 us|  } /* 
dequeue_entity */
  388.944715 |   0) sleepgr-11355  |   |  
dequeue_entity() {
  388.944715 |   0) sleepgr-11355  |   |
update_curr() {
  388.944716 |   0) sleepgr-11355  |   0.097 us|  
__calc_delta();
  388.944716 |   0) sleepgr-11355  |   0.071 us|  
update_min_vruntime();
  388.944717 |   0) sleepgr-11355  |   1.473 us|} /* 
update_curr */
  388.944717 |   0) sleepgr-11355  |   0.142 us|
__update_load_avg_se();
  388.944718 |   0) sleepgr-11355  |   0.100 us|
__update_load_avg_cfs_rq();
  388.944719 |   0) sleepgr-11355  |   0.069 us|
clear_buddies();
  388.944719 |   0) sleepgr-11355  |   0.098 us|
account_entity_dequeue();
  388.944720 |   0) sleepgr-11355  |   |
update_cfs_group() {
  388.944720 |   0) sleepgr-11355  |   0.110 us|  
reweight_entity();
  388.944721 |   0) sleepgr-11355  |   0.847 us|} /* 
update_cfs_group */
  388.944721 |   0) sleepgr-11355  |   6.197 us|  } /* 
dequeue_entity */
  388.944722 |   0) sleepgr-11355  

Re: [PATCH] dmaengine: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Vinod
On 27-08-18, 20:52, Rob Herring wrote:
> In preparation to remove the node name pointer from struct device_node,
> convert printf users to use the %pOFn format specifier.
> 
> Cc: Dan Williams 
> Cc: Vinod Koul 
> Cc: dmaeng...@vger.kernel.org

Applied after dropping CC list. thanks

-- 
~Vinod


Re: [PATCH] dmaengine: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Vinod
On 27-08-18, 20:52, Rob Herring wrote:
> In preparation to remove the node name pointer from struct device_node,
> convert printf users to use the %pOFn format specifier.
> 
> Cc: Dan Williams 
> Cc: Vinod Koul 
> Cc: dmaeng...@vger.kernel.org

Applied after dropping CC list. thanks

-- 
~Vinod


Re: [PATCH 4.4 0/5] 4.4.153-stable review

2018-08-27 Thread Greg Kroah-Hartman
On Mon, Aug 27, 2018 at 02:29:08PM -0600, Shuah Khan wrote:
> On 08/26/2018 12:42 AM, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 4.4.153 release.
> > There are 5 patches in this series, all will be posted as a response
> > to this one.  If anyone has any issues with these being applied, please
> > let me know.
> > 
> > Responses should be made by Tue Aug 28 06:40:50 UTC 2018.
> > Anything received after that time might be too late.
> > 
> > The whole patch series can be found in one patch at:
> > 
> > https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.153-rc1.gz
> > or in the git tree and branch at:
> > 
> > git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git 
> > linux-4.4.y
> > and the diffstat can be found below.
> > 
> > thanks,
> > 
> > greg k-h
> > 
> 
> Compiled and booted on my test system. No dmesg regressions.

Thanks for testing both of these and letting me know.

greg k-h


Re: [PATCH 4.4 0/5] 4.4.153-stable review

2018-08-27 Thread Greg Kroah-Hartman
On Mon, Aug 27, 2018 at 02:29:08PM -0600, Shuah Khan wrote:
> On 08/26/2018 12:42 AM, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 4.4.153 release.
> > There are 5 patches in this series, all will be posted as a response
> > to this one.  If anyone has any issues with these being applied, please
> > let me know.
> > 
> > Responses should be made by Tue Aug 28 06:40:50 UTC 2018.
> > Anything received after that time might be too late.
> > 
> > The whole patch series can be found in one patch at:
> > 
> > https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.153-rc1.gz
> > or in the git tree and branch at:
> > 
> > git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git 
> > linux-4.4.y
> > and the diffstat can be found below.
> > 
> > thanks,
> > 
> > greg k-h
> > 
> 
> Compiled and booted on my test system. No dmesg regressions.

Thanks for testing both of these and letting me know.

greg k-h


Re: [PATCH] x86/irqflags: mark native_restore_fl extern inline

2018-08-27 Thread Greg Kroah-Hartman
On Mon, Aug 27, 2018 at 02:40:09PM -0700, Nick Desaulniers wrote:
> Fixes commit 208cbb325589 ("x86/irqflags: Provide a declaration for
> native_save_fl")
> 
> This should have been marked extern inline in order to pick up the out
> of line definition in arch/x86/kernel/irqflags.S.
> 
> Cc: sta...@vger.kernel.org # 4.18, 4.14, 4.9, 4.4
> Reported-by: Ben Hutchings 
> Signed-off-by: Nick Desaulniers 
> ---
>  arch/x86/include/asm/irqflags.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/include/asm/irqflags.h b/arch/x86/include/asm/irqflags.h
> index c14f2a74b2be..15450a675031 100644
> --- a/arch/x86/include/asm/irqflags.h
> +++ b/arch/x86/include/asm/irqflags.h
> @@ -33,7 +33,8 @@ extern inline unsigned long native_save_fl(void)
>   return flags;
>  }
>  
> -static inline void native_restore_fl(unsigned long flags)
> +extern inline void native_restore_fl(unsigned long flags);
> +extern inline void native_restore_fl(unsigned long flags)

This looks odd to me, but my coffee hasn't kicked in yet this morning.
Why do you need both lines here?  Shouldn't the actual function be
sufficient?  If not, a comment explaining this would be nice.

thanks,

greg k-h


Re: [PATCH] x86/irqflags: mark native_restore_fl extern inline

2018-08-27 Thread Greg Kroah-Hartman
On Mon, Aug 27, 2018 at 02:40:09PM -0700, Nick Desaulniers wrote:
> Fixes commit 208cbb325589 ("x86/irqflags: Provide a declaration for
> native_save_fl")
> 
> This should have been marked extern inline in order to pick up the out
> of line definition in arch/x86/kernel/irqflags.S.
> 
> Cc: sta...@vger.kernel.org # 4.18, 4.14, 4.9, 4.4
> Reported-by: Ben Hutchings 
> Signed-off-by: Nick Desaulniers 
> ---
>  arch/x86/include/asm/irqflags.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/include/asm/irqflags.h b/arch/x86/include/asm/irqflags.h
> index c14f2a74b2be..15450a675031 100644
> --- a/arch/x86/include/asm/irqflags.h
> +++ b/arch/x86/include/asm/irqflags.h
> @@ -33,7 +33,8 @@ extern inline unsigned long native_save_fl(void)
>   return flags;
>  }
>  
> -static inline void native_restore_fl(unsigned long flags)
> +extern inline void native_restore_fl(unsigned long flags);
> +extern inline void native_restore_fl(unsigned long flags)

This looks odd to me, but my coffee hasn't kicked in yet this morning.
Why do you need both lines here?  Shouldn't the actual function be
sufficient?  If not, a comment explaining this would be nice.

thanks,

greg k-h


[PATCH] arm64: defconfig: Enable Qualcomm QRTR

2018-08-27 Thread Bjorn Andersson
The QRTR packet family is used for a wide range of communication between
services in Qualcomm platforms. Examples of services using this
transport for communication are remoteproc management, modem control,
positioning, power management and WiFi.

Signed-off-by: Bjorn Andersson 
---
 arch/arm64/configs/defconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index f67e8d5e93ad..c508462d4c49 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -149,6 +149,9 @@ CONFIG_BRIDGE_VLAN_FILTERING=y
 CONFIG_VLAN_8021Q=m
 CONFIG_VLAN_8021Q_GVRP=y
 CONFIG_VLAN_8021Q_MVRP=y
+CONFIG_QRTR=m
+CONFIG_QRTR_SMD=m
+CONFIG_QRTR_TUN=m
 CONFIG_BPF_JIT=y
 CONFIG_BT=m
 CONFIG_BT_HIDP=m
-- 
2.18.0



[PATCH] arm64: defconfig: Enable Qualcomm QRTR

2018-08-27 Thread Bjorn Andersson
The QRTR packet family is used for a wide range of communication between
services in Qualcomm platforms. Examples of services using this
transport for communication are remoteproc management, modem control,
positioning, power management and WiFi.

Signed-off-by: Bjorn Andersson 
---
 arch/arm64/configs/defconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index f67e8d5e93ad..c508462d4c49 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -149,6 +149,9 @@ CONFIG_BRIDGE_VLAN_FILTERING=y
 CONFIG_VLAN_8021Q=m
 CONFIG_VLAN_8021Q_GVRP=y
 CONFIG_VLAN_8021Q_MVRP=y
+CONFIG_QRTR=m
+CONFIG_QRTR_SMD=m
+CONFIG_QRTR_TUN=m
 CONFIG_BPF_JIT=y
 CONFIG_BT=m
 CONFIG_BT_HIDP=m
-- 
2.18.0



Re: checkpatch.pl bug? (was Re: [PATCH] random: Make CPU trust a boot parameter)

2018-08-27 Thread Joe Perches
On Mon, 2018-08-27 at 14:55 -0700, Kees Cook wrote:
> On Mon, Aug 27, 2018 at 2:51 PM, Kees Cook  wrote:
> > Instead of forcing a distro or other system builder to choose
> > at build time whether the CPU is trusted for CRNG seeding via
> > CONFIG_RANDOM_TRUST_CPU, provide a boot-time parameter for end users to
> > control the choice. The CONFIG will set the default state instead.
[]
> > diff --git a/drivers/char/random.c b/drivers/char/random.c
[]
> > @@ -779,6 +779,13 @@ static struct crng_state **crng_node_pool 
> > __read_mostly;
> > 
> >  static void invalidate_batched_entropy(void);
> > 
> > +static bool trust_cpu __ro_after_init = 
> > IS_ENABLED(CONFIG_RANDOM_TRUST_CPU);
> > +static int __init parse_trust_cpu(char *arg)
> > +{
> > +   return kstrtobool(arg, _cpu);
> > +}
> > +early_param("random.trust_cpu", parse_trust_cpu);
> > +
> >  static void crng_initialize(struct crng_state *crng)
> >  {
> > int i;
> > @@ -799,12 +806,10 @@ static void crng_initialize(struct crng_state *crng)
> > }
> > crng->state[i] ^= rv;
> > }
> > -#ifdef CONFIG_RANDOM_TRUST_CPU
> > -   if (arch_init) {
> > +   if (trust_cpu && arch_init) {
> 
> checkpatch.pl complains:
> 
> ERROR: space prohibited after that '&&' (ctx:WxW)
> #79: FILE: drivers/char/random.c:809:
> +   if (trust_cpu && arch_init) {
>   ^
> 
> I can't figure out what is going on here. Using "||" doesn't trigger
> the issue; it seems related to the earlier "_cpu" use in the
> patch, but I can't figure out what checkpatch was trying to do with
> this...

It's the __ro_after_init after the declaration of
static bool trust_cpu that confuses checkpatch.

I'll see what can be done for that.


Re: checkpatch.pl bug? (was Re: [PATCH] random: Make CPU trust a boot parameter)

2018-08-27 Thread Joe Perches
On Mon, 2018-08-27 at 14:55 -0700, Kees Cook wrote:
> On Mon, Aug 27, 2018 at 2:51 PM, Kees Cook  wrote:
> > Instead of forcing a distro or other system builder to choose
> > at build time whether the CPU is trusted for CRNG seeding via
> > CONFIG_RANDOM_TRUST_CPU, provide a boot-time parameter for end users to
> > control the choice. The CONFIG will set the default state instead.
[]
> > diff --git a/drivers/char/random.c b/drivers/char/random.c
[]
> > @@ -779,6 +779,13 @@ static struct crng_state **crng_node_pool 
> > __read_mostly;
> > 
> >  static void invalidate_batched_entropy(void);
> > 
> > +static bool trust_cpu __ro_after_init = 
> > IS_ENABLED(CONFIG_RANDOM_TRUST_CPU);
> > +static int __init parse_trust_cpu(char *arg)
> > +{
> > +   return kstrtobool(arg, _cpu);
> > +}
> > +early_param("random.trust_cpu", parse_trust_cpu);
> > +
> >  static void crng_initialize(struct crng_state *crng)
> >  {
> > int i;
> > @@ -799,12 +806,10 @@ static void crng_initialize(struct crng_state *crng)
> > }
> > crng->state[i] ^= rv;
> > }
> > -#ifdef CONFIG_RANDOM_TRUST_CPU
> > -   if (arch_init) {
> > +   if (trust_cpu && arch_init) {
> 
> checkpatch.pl complains:
> 
> ERROR: space prohibited after that '&&' (ctx:WxW)
> #79: FILE: drivers/char/random.c:809:
> +   if (trust_cpu && arch_init) {
>   ^
> 
> I can't figure out what is going on here. Using "||" doesn't trigger
> the issue; it seems related to the earlier "_cpu" use in the
> patch, but I can't figure out what checkpatch was trying to do with
> this...

It's the __ro_after_init after the declaration of
static bool trust_cpu that confuses checkpatch.

I'll see what can be done for that.


[PATCH] remoteproc: qcom: Rename Hexagon v5 PAS driver

2018-08-27 Thread Bjorn Andersson
The Hexagon v5 ADSP driver is used for more than only the ADSP and
there's an upcoming non-PAS ADSP PIL for SDM845, so rename the driver to
qcom_q6v5_pas in order to better suite this.

Cc: Rohit kumar 
Signed-off-by: Bjorn Andersson 
---
 drivers/remoteproc/Kconfig| 22 +--
 drivers/remoteproc/Makefile   |  2 +-
 .../{qcom_adsp_pil.c => qcom_q6v5_pas.c}  |  4 ++--
 3 files changed, 14 insertions(+), 14 deletions(-)
 rename drivers/remoteproc/{qcom_adsp_pil.c => qcom_q6v5_pas.c} (98%)

diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig
index 052d4dd347f9..c98c0b2a2237 100644
--- a/drivers/remoteproc/Kconfig
+++ b/drivers/remoteproc/Kconfig
@@ -84,8 +84,16 @@ config KEYSTONE_REMOTEPROC
  It's safe to say N here if you're not interested in the Keystone
  DSPs or just want to use a bare minimum kernel.
 
-config QCOM_ADSP_PIL
-   tristate "Qualcomm ADSP Peripheral Image Loader"
+config QCOM_RPROC_COMMON
+   tristate
+
+config QCOM_Q6V5_COMMON
+   tristate
+   depends on ARCH_QCOM
+   depends on QCOM_SMEM
+
+config QCOM_Q6V5_PAS
+   tristate "Qualcomm Hexagon v5 Peripheral Authentication Service support"
depends on OF && ARCH_QCOM
depends on QCOM_SMEM
depends on RPMSG_QCOM_SMD || (COMPILE_TEST && RPMSG_QCOM_SMD=n)
@@ -98,15 +106,7 @@ config QCOM_ADSP_PIL
select QCOM_SCM
help
  Say y here to support the TrustZone based Peripherial Image Loader
- for the Qualcomm ADSP remote processors.
-
-config QCOM_RPROC_COMMON
-   tristate
-
-config QCOM_Q6V5_COMMON
-   tristate
-   depends on ARCH_QCOM
-   depends on QCOM_SMEM
+ for the Qualcomm Hexagon v5 based remote processors.
 
 config QCOM_Q6V5_PIL
tristate "Qualcomm Hexagon V5 Peripherial Image Loader"
diff --git a/drivers/remoteproc/Makefile b/drivers/remoteproc/Makefile
index 03332fa7e2ee..eb86c8ba5a87 100644
--- a/drivers/remoteproc/Makefile
+++ b/drivers/remoteproc/Makefile
@@ -14,9 +14,9 @@ obj-$(CONFIG_OMAP_REMOTEPROC) += omap_remoteproc.o
 obj-$(CONFIG_WKUP_M3_RPROC)+= wkup_m3_rproc.o
 obj-$(CONFIG_DA8XX_REMOTEPROC) += da8xx_remoteproc.o
 obj-$(CONFIG_KEYSTONE_REMOTEPROC)  += keystone_remoteproc.o
-obj-$(CONFIG_QCOM_ADSP_PIL)+= qcom_adsp_pil.o
 obj-$(CONFIG_QCOM_RPROC_COMMON)+= qcom_common.o
 obj-$(CONFIG_QCOM_Q6V5_COMMON) += qcom_q6v5.o
+obj-$(CONFIG_QCOM_Q6V5_PAS)+= qcom_q6v5_pas.o
 obj-$(CONFIG_QCOM_Q6V5_PIL)+= qcom_q6v5_pil.o
 obj-$(CONFIG_QCOM_Q6V5_WCSS)   += qcom_q6v5_wcss.o
 obj-$(CONFIG_QCOM_SYSMON)  += qcom_sysmon.o
diff --git a/drivers/remoteproc/qcom_adsp_pil.c 
b/drivers/remoteproc/qcom_q6v5_pas.c
similarity index 98%
rename from drivers/remoteproc/qcom_adsp_pil.c
rename to drivers/remoteproc/qcom_q6v5_pas.c
index d4339a6da616..2478ef3cd519 100644
--- a/drivers/remoteproc/qcom_adsp_pil.c
+++ b/drivers/remoteproc/qcom_q6v5_pas.c
@@ -364,11 +364,11 @@ static struct platform_driver adsp_driver = {
.probe = adsp_probe,
.remove = adsp_remove,
.driver = {
-   .name = "qcom_adsp_pil",
+   .name = "qcom_q6v5_pas",
.of_match_table = adsp_of_match,
},
 };
 
 module_platform_driver(adsp_driver);
-MODULE_DESCRIPTION("Qualcomm MSM8974/MSM8996 ADSP Peripherial Image Loader");
+MODULE_DESCRIPTION("Qualcomm Hexagon v5 Peripheral Authentication Service 
driver");
 MODULE_LICENSE("GPL v2");
-- 
2.18.0



[PATCH] remoteproc: qcom: Rename Hexagon v5 PAS driver

2018-08-27 Thread Bjorn Andersson
The Hexagon v5 ADSP driver is used for more than only the ADSP and
there's an upcoming non-PAS ADSP PIL for SDM845, so rename the driver to
qcom_q6v5_pas in order to better suite this.

Cc: Rohit kumar 
Signed-off-by: Bjorn Andersson 
---
 drivers/remoteproc/Kconfig| 22 +--
 drivers/remoteproc/Makefile   |  2 +-
 .../{qcom_adsp_pil.c => qcom_q6v5_pas.c}  |  4 ++--
 3 files changed, 14 insertions(+), 14 deletions(-)
 rename drivers/remoteproc/{qcom_adsp_pil.c => qcom_q6v5_pas.c} (98%)

diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig
index 052d4dd347f9..c98c0b2a2237 100644
--- a/drivers/remoteproc/Kconfig
+++ b/drivers/remoteproc/Kconfig
@@ -84,8 +84,16 @@ config KEYSTONE_REMOTEPROC
  It's safe to say N here if you're not interested in the Keystone
  DSPs or just want to use a bare minimum kernel.
 
-config QCOM_ADSP_PIL
-   tristate "Qualcomm ADSP Peripheral Image Loader"
+config QCOM_RPROC_COMMON
+   tristate
+
+config QCOM_Q6V5_COMMON
+   tristate
+   depends on ARCH_QCOM
+   depends on QCOM_SMEM
+
+config QCOM_Q6V5_PAS
+   tristate "Qualcomm Hexagon v5 Peripheral Authentication Service support"
depends on OF && ARCH_QCOM
depends on QCOM_SMEM
depends on RPMSG_QCOM_SMD || (COMPILE_TEST && RPMSG_QCOM_SMD=n)
@@ -98,15 +106,7 @@ config QCOM_ADSP_PIL
select QCOM_SCM
help
  Say y here to support the TrustZone based Peripherial Image Loader
- for the Qualcomm ADSP remote processors.
-
-config QCOM_RPROC_COMMON
-   tristate
-
-config QCOM_Q6V5_COMMON
-   tristate
-   depends on ARCH_QCOM
-   depends on QCOM_SMEM
+ for the Qualcomm Hexagon v5 based remote processors.
 
 config QCOM_Q6V5_PIL
tristate "Qualcomm Hexagon V5 Peripherial Image Loader"
diff --git a/drivers/remoteproc/Makefile b/drivers/remoteproc/Makefile
index 03332fa7e2ee..eb86c8ba5a87 100644
--- a/drivers/remoteproc/Makefile
+++ b/drivers/remoteproc/Makefile
@@ -14,9 +14,9 @@ obj-$(CONFIG_OMAP_REMOTEPROC) += omap_remoteproc.o
 obj-$(CONFIG_WKUP_M3_RPROC)+= wkup_m3_rproc.o
 obj-$(CONFIG_DA8XX_REMOTEPROC) += da8xx_remoteproc.o
 obj-$(CONFIG_KEYSTONE_REMOTEPROC)  += keystone_remoteproc.o
-obj-$(CONFIG_QCOM_ADSP_PIL)+= qcom_adsp_pil.o
 obj-$(CONFIG_QCOM_RPROC_COMMON)+= qcom_common.o
 obj-$(CONFIG_QCOM_Q6V5_COMMON) += qcom_q6v5.o
+obj-$(CONFIG_QCOM_Q6V5_PAS)+= qcom_q6v5_pas.o
 obj-$(CONFIG_QCOM_Q6V5_PIL)+= qcom_q6v5_pil.o
 obj-$(CONFIG_QCOM_Q6V5_WCSS)   += qcom_q6v5_wcss.o
 obj-$(CONFIG_QCOM_SYSMON)  += qcom_sysmon.o
diff --git a/drivers/remoteproc/qcom_adsp_pil.c 
b/drivers/remoteproc/qcom_q6v5_pas.c
similarity index 98%
rename from drivers/remoteproc/qcom_adsp_pil.c
rename to drivers/remoteproc/qcom_q6v5_pas.c
index d4339a6da616..2478ef3cd519 100644
--- a/drivers/remoteproc/qcom_adsp_pil.c
+++ b/drivers/remoteproc/qcom_q6v5_pas.c
@@ -364,11 +364,11 @@ static struct platform_driver adsp_driver = {
.probe = adsp_probe,
.remove = adsp_remove,
.driver = {
-   .name = "qcom_adsp_pil",
+   .name = "qcom_q6v5_pas",
.of_match_table = adsp_of_match,
},
 };
 
 module_platform_driver(adsp_driver);
-MODULE_DESCRIPTION("Qualcomm MSM8974/MSM8996 ADSP Peripherial Image Loader");
+MODULE_DESCRIPTION("Qualcomm Hexagon v5 Peripheral Authentication Service 
driver");
 MODULE_LICENSE("GPL v2");
-- 
2.18.0



[PATCH] soc: qcom: rmtfs-mem: Validate that scm is available

2018-08-27 Thread Bjorn Andersson
The scm device must be present in order for the rmtfs driver to
configure memory permissions for the rmtfs memory region, so check that
it is probed before continuing.

Cc: sta...@vger.kernel.org
Fixes: fa65f8045137 ("soc: qcom: rmtfs-mem: Add support for assigning memory to 
remote")
Signed-off-by: Bjorn Andersson 
---
 drivers/soc/qcom/rmtfs_mem.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/drivers/soc/qcom/rmtfs_mem.c b/drivers/soc/qcom/rmtfs_mem.c
index 8a3678c2e83c..97bb5989aa21 100644
--- a/drivers/soc/qcom/rmtfs_mem.c
+++ b/drivers/soc/qcom/rmtfs_mem.c
@@ -212,6 +212,11 @@ static int qcom_rmtfs_mem_probe(struct platform_device 
*pdev)
dev_err(>dev, "failed to parse qcom,vmid\n");
goto remove_cdev;
} else if (!ret) {
+   if (!qcom_scm_is_available()) {
+   ret = -EPROBE_DEFER;
+   goto remove_cdev;
+   }
+
perms[0].vmid = QCOM_SCM_VMID_HLOS;
perms[0].perm = QCOM_SCM_PERM_RW;
perms[1].vmid = vmid;
-- 
2.18.0



[PATCH] soc: qcom: rmtfs-mem: Validate that scm is available

2018-08-27 Thread Bjorn Andersson
The scm device must be present in order for the rmtfs driver to
configure memory permissions for the rmtfs memory region, so check that
it is probed before continuing.

Cc: sta...@vger.kernel.org
Fixes: fa65f8045137 ("soc: qcom: rmtfs-mem: Add support for assigning memory to 
remote")
Signed-off-by: Bjorn Andersson 
---
 drivers/soc/qcom/rmtfs_mem.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/drivers/soc/qcom/rmtfs_mem.c b/drivers/soc/qcom/rmtfs_mem.c
index 8a3678c2e83c..97bb5989aa21 100644
--- a/drivers/soc/qcom/rmtfs_mem.c
+++ b/drivers/soc/qcom/rmtfs_mem.c
@@ -212,6 +212,11 @@ static int qcom_rmtfs_mem_probe(struct platform_device 
*pdev)
dev_err(>dev, "failed to parse qcom,vmid\n");
goto remove_cdev;
} else if (!ret) {
+   if (!qcom_scm_is_available()) {
+   ret = -EPROBE_DEFER;
+   goto remove_cdev;
+   }
+
perms[0].vmid = QCOM_SCM_VMID_HLOS;
perms[0].perm = QCOM_SCM_PERM_RW;
perms[1].vmid = vmid;
-- 
2.18.0



[PATCH] lib/genalloc.c: Fix trivial typo

2018-08-27 Thread Nikolas Nyby
This fixes a typo in the gen_pool_best_fit docs.

Signed-off-by: Nikolas Nyby 
---
 lib/genalloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/genalloc.c b/lib/genalloc.c
index ca06adc4f445..d8f534db5562 100644
--- a/lib/genalloc.c
+++ b/lib/genalloc.c
@@ -611,7 +611,7 @@ EXPORT_SYMBOL(gen_pool_first_fit_order_align);
 
 /**
  * gen_pool_best_fit - find the best fitting region of memory
- * macthing the size requirement (no alignment constraint)
+ * matching the size requirement (no alignment constraint)
  * @map: The address to base the search on
  * @size: The bitmap size in bits
  * @start: The bitnumber to start searching at
-- 
2.18.0



[PATCH] lib/genalloc.c: Fix trivial typo

2018-08-27 Thread Nikolas Nyby
This fixes a typo in the gen_pool_best_fit docs.

Signed-off-by: Nikolas Nyby 
---
 lib/genalloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/genalloc.c b/lib/genalloc.c
index ca06adc4f445..d8f534db5562 100644
--- a/lib/genalloc.c
+++ b/lib/genalloc.c
@@ -611,7 +611,7 @@ EXPORT_SYMBOL(gen_pool_first_fit_order_align);
 
 /**
  * gen_pool_best_fit - find the best fitting region of memory
- * macthing the size requirement (no alignment constraint)
+ * matching the size requirement (no alignment constraint)
  * @map: The address to base the search on
  * @size: The bitmap size in bits
  * @start: The bitnumber to start searching at
-- 
2.18.0



[PATCH] irqchip/gic-v3-its: cap lpi_id_bits to reduce memory footprint

2018-08-27 Thread Jia He
In commit fe8e93504ce8 ("irqchip/gic-v3-its: Use full range of LPIs"),
it removes the cap for lpi_id_bits. But it will cause more pointless
memory footprint.

There is a WARN_ON when my QDF2400 server boots up (pagesize is 4k)
begin===
[0.00] GICv3: GIC: Using split EOI/Deactivate mode
[0.00] GICv3: Distributor has no Range Selector support
[0.00] GICv3: VLPI support, no direct LPI support
[0.00] ACPI: SRAT not present
[0.00] ITS [mem 0xff7efe-0xff7eff]
[0.00] ITS@0x00ff7efe: Using ITS number 0
[0.00] GIC: enabling workaround for ITS: QDF2400 erratum 0065
[0.00] ITS@0x00ff7efe: allocated 524288 Devices
@179f00 (indirect, esz 8, psz 64K, shr 1)
[0.00] ITS@0x00ff7efe: allocated 8192 Interrupt
Collections @179f93 (flat, esz 8, psz 64K, shr 1)
[0.00] ITS@0x00ff7efe: allocated 65536 Virtual CPUs
@179f98 (flat, esz 8, psz 64K, shr 1)
[0.00] WARNING: CPU: 0 PID: 0 at mm/page_alloc.c:4066
__alloc_pages_nodemask+0x2d8/0x1188
[0.00] Modules linked in:
[0.00] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.18.0+ #66
[0.00] pstate: 2085 (nzCv daIf -PAN -UAO)
[0.00] pc : __alloc_pages_nodemask+0x2d8/0x1188
[0.00] lr : __alloc_pages_nodemask+0x134/0x1188
[0.00] sp : 091b3a30
[0.00] x29: 091b3a30 x28: 
[0.00] x27: 0a045000 x26: 
[0.00] x25:  x24: 091c1000
[0.00] x23: 091b3b98 x22: 000c
[0.00] x21: 082dc130 x20: 0001
[0.00] x19:  x18: 003f
[0.00] x17:  x16: 
[0.00] x15:  x14: 202c74616c662820
[0.00] x13: 09c5f9e0 x12: 0077
[0.00] x11: 0078 x10: 97110f47
[0.00] x9 :  x8 : 009fff3f
[0.00] x7 : 002b x6 : 000c
[0.00] x5 : 0001 x4 : 
[0.00] x3 : 08fd1000 x2 : 08fd1000
[0.00] x1 : 091c1000 x0 : 
[0.00] Call trace:
[0.00]  __alloc_pages_nodemask+0x2d8/0x1188
[0.00]  alloc_pages_current+0x8c/0xd8
[0.00]  its_allocate_prop_table+0x5c/0xb8
[0.00]  its_init+0x220/0x3c0
[0.00]  gic_init_bases+0x250/0x380
[0.00]  gic_acpi_init+0x16c/0x2a4
[0.00]  acpi_match_madt+0x50/0x88
[0.00]  acpi_table_parse_entries_array+0x180/0x204
[0.00]  acpi_table_parse_entries+0x60/0x84
[0.00]  acpi_table_parse_madt+0x40/0x4c
[0.00]  __acpi_probe_device_table+0x94/0xe8
[0.00]  irqchip_init+0x38/0x40
[0.00]  init_IRQ+0x70/0x9c
[0.00]  start_kernel+0x310/0x4c0
[0.00] irq event stamp: 0
[0.00] hardirqs last  enabled at (0): [<>]
(null)
[0.00] hardirqs last disabled at (0): [<>]
(null)
[0.00] softirqs last  enabled at (0): [<>]
(null)
[0.00] softirqs last disabled at (0): [<>]
(null)
[0.00] ---[ end trace 943781056d97862b ]---
end

In its_alloc_lpi_tables, lpi_id_bits is 24 in QDF2400. Then
its_allocate_prop_table will try to allocate 16M(order 12 if
pagesize=4k). Thus it causes the WARN_ON.

As said by Marc,
Capping lpi_id_bits at 16 (which is what we had before) is plenty,
will save a some memory, and gives some margin before we need to push
it up again.

This patch re-caps the lpi_id_bits.

Fixes: fe8e93504ce8 ("irqchip/gic-v3-its: Use full range of LPIs")
Signed-off-by: Jia He 
Suggested-by: Marc Zyngier 
---
 drivers/irqchip/irq-gic-v3-its.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 316a575..c2df341 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -1439,6 +1439,7 @@ static int its_irq_set_vcpu_affinity(struct irq_data *d, 
void *vcpu_info)
  * The consequence of the above is that allocation is cost is low, but
  * freeing is expensive. We assumes that freeing rarely occurs.
  */
+#define ITS_MAX_LPI_NRBITS 16 /* 64K LPIs */
 
 static DEFINE_MUTEX(lpi_range_lock);
 static LIST_HEAD(lpi_range_list);
@@ -1625,7 +1626,8 @@ static int __init its_alloc_lpi_tables(void)
 {
phys_addr_t paddr;
 
-   lpi_id_bits = GICD_TYPER_ID_BITS(gic_rdists->gicd_typer);
+   lpi_id_bits = min_t(u32, GICD_TYPER_ID_BITS(gic_rdists->gicd_typer),
+   ITS_MAX_LPI_NRBITS);
gic_rdists->prop_page = its_allocate_prop_table(GFP_NOWAIT);
if (!gic_rdists->prop_page) {
pr_err("Failed to allocate PROPBASE\n");
-- 
1.8.3.1



[PATCH] irqchip/gic-v3-its: cap lpi_id_bits to reduce memory footprint

2018-08-27 Thread Jia He
In commit fe8e93504ce8 ("irqchip/gic-v3-its: Use full range of LPIs"),
it removes the cap for lpi_id_bits. But it will cause more pointless
memory footprint.

There is a WARN_ON when my QDF2400 server boots up (pagesize is 4k)
begin===
[0.00] GICv3: GIC: Using split EOI/Deactivate mode
[0.00] GICv3: Distributor has no Range Selector support
[0.00] GICv3: VLPI support, no direct LPI support
[0.00] ACPI: SRAT not present
[0.00] ITS [mem 0xff7efe-0xff7eff]
[0.00] ITS@0x00ff7efe: Using ITS number 0
[0.00] GIC: enabling workaround for ITS: QDF2400 erratum 0065
[0.00] ITS@0x00ff7efe: allocated 524288 Devices
@179f00 (indirect, esz 8, psz 64K, shr 1)
[0.00] ITS@0x00ff7efe: allocated 8192 Interrupt
Collections @179f93 (flat, esz 8, psz 64K, shr 1)
[0.00] ITS@0x00ff7efe: allocated 65536 Virtual CPUs
@179f98 (flat, esz 8, psz 64K, shr 1)
[0.00] WARNING: CPU: 0 PID: 0 at mm/page_alloc.c:4066
__alloc_pages_nodemask+0x2d8/0x1188
[0.00] Modules linked in:
[0.00] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.18.0+ #66
[0.00] pstate: 2085 (nzCv daIf -PAN -UAO)
[0.00] pc : __alloc_pages_nodemask+0x2d8/0x1188
[0.00] lr : __alloc_pages_nodemask+0x134/0x1188
[0.00] sp : 091b3a30
[0.00] x29: 091b3a30 x28: 
[0.00] x27: 0a045000 x26: 
[0.00] x25:  x24: 091c1000
[0.00] x23: 091b3b98 x22: 000c
[0.00] x21: 082dc130 x20: 0001
[0.00] x19:  x18: 003f
[0.00] x17:  x16: 
[0.00] x15:  x14: 202c74616c662820
[0.00] x13: 09c5f9e0 x12: 0077
[0.00] x11: 0078 x10: 97110f47
[0.00] x9 :  x8 : 009fff3f
[0.00] x7 : 002b x6 : 000c
[0.00] x5 : 0001 x4 : 
[0.00] x3 : 08fd1000 x2 : 08fd1000
[0.00] x1 : 091c1000 x0 : 
[0.00] Call trace:
[0.00]  __alloc_pages_nodemask+0x2d8/0x1188
[0.00]  alloc_pages_current+0x8c/0xd8
[0.00]  its_allocate_prop_table+0x5c/0xb8
[0.00]  its_init+0x220/0x3c0
[0.00]  gic_init_bases+0x250/0x380
[0.00]  gic_acpi_init+0x16c/0x2a4
[0.00]  acpi_match_madt+0x50/0x88
[0.00]  acpi_table_parse_entries_array+0x180/0x204
[0.00]  acpi_table_parse_entries+0x60/0x84
[0.00]  acpi_table_parse_madt+0x40/0x4c
[0.00]  __acpi_probe_device_table+0x94/0xe8
[0.00]  irqchip_init+0x38/0x40
[0.00]  init_IRQ+0x70/0x9c
[0.00]  start_kernel+0x310/0x4c0
[0.00] irq event stamp: 0
[0.00] hardirqs last  enabled at (0): [<>]
(null)
[0.00] hardirqs last disabled at (0): [<>]
(null)
[0.00] softirqs last  enabled at (0): [<>]
(null)
[0.00] softirqs last disabled at (0): [<>]
(null)
[0.00] ---[ end trace 943781056d97862b ]---
end

In its_alloc_lpi_tables, lpi_id_bits is 24 in QDF2400. Then
its_allocate_prop_table will try to allocate 16M(order 12 if
pagesize=4k). Thus it causes the WARN_ON.

As said by Marc,
Capping lpi_id_bits at 16 (which is what we had before) is plenty,
will save a some memory, and gives some margin before we need to push
it up again.

This patch re-caps the lpi_id_bits.

Fixes: fe8e93504ce8 ("irqchip/gic-v3-its: Use full range of LPIs")
Signed-off-by: Jia He 
Suggested-by: Marc Zyngier 
---
 drivers/irqchip/irq-gic-v3-its.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 316a575..c2df341 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -1439,6 +1439,7 @@ static int its_irq_set_vcpu_affinity(struct irq_data *d, 
void *vcpu_info)
  * The consequence of the above is that allocation is cost is low, but
  * freeing is expensive. We assumes that freeing rarely occurs.
  */
+#define ITS_MAX_LPI_NRBITS 16 /* 64K LPIs */
 
 static DEFINE_MUTEX(lpi_range_lock);
 static LIST_HEAD(lpi_range_list);
@@ -1625,7 +1626,8 @@ static int __init its_alloc_lpi_tables(void)
 {
phys_addr_t paddr;
 
-   lpi_id_bits = GICD_TYPER_ID_BITS(gic_rdists->gicd_typer);
+   lpi_id_bits = min_t(u32, GICD_TYPER_ID_BITS(gic_rdists->gicd_typer),
+   ITS_MAX_LPI_NRBITS);
gic_rdists->prop_page = its_allocate_prop_table(GFP_NOWAIT);
if (!gic_rdists->prop_page) {
pr_err("Failed to allocate PROPBASE\n");
-- 
1.8.3.1



Re: [PATCH] sysctl: do not allow a 64bit value write in a 32bit knob

2018-08-27 Thread kbuild test robot
Hi Aristeu,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.19-rc1 next-20180827]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Aristeu-Rozanski/sysctl-do-not-allow-a-64bit-value-write-in-a-32bit-knob/20180828-043801
config: microblaze-mmu_defconfig (attached as .config)
compiler: microblaze-linux-gcc (GCC) 8.1.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.1.0 make.cross ARCH=microblaze 

All warnings (new ones prefixed by >>):

   kernel/sysctl.c: In function 'do_proc_dointvec_minmax_conv':
>> kernel/sysctl.c:2558:14: warning: right shift count >= width of type 
>> [-Wshift-count-overflow]
  *lvalp >> (sizeof(int) * 8))
 ^~

vim +2558 kernel/sysctl.c

  2548  
  2549  static int do_proc_dointvec_minmax_conv(bool *negp, unsigned long 
*lvalp,
  2550  int *valp,
  2551  int write, void *data)
  2552  {
  2553  struct do_proc_dointvec_minmax_conv_param *param = data;
  2554  if (write) {
  2555  int val = *negp ? -*lvalp : *lvalp;
  2556  if ((param->min && *param->min > val) ||
  2557  (param->max && *param->max < val) ||
> 2558  *lvalp >> (sizeof(int) * 8))
  2559  return -EINVAL;
  2560  *valp = val;
  2561  } else {
  2562  int val = *valp;
  2563  if (val < 0) {
  2564  *negp = true;
  2565  *lvalp = -(unsigned long)val;
  2566  } else {
  2567  *negp = false;
  2568  *lvalp = (unsigned long)val;
  2569  }
  2570  }
  2571  return 0;
  2572  }
  2573  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH] sysctl: do not allow a 64bit value write in a 32bit knob

2018-08-27 Thread kbuild test robot
Hi Aristeu,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.19-rc1 next-20180827]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Aristeu-Rozanski/sysctl-do-not-allow-a-64bit-value-write-in-a-32bit-knob/20180828-043801
config: microblaze-mmu_defconfig (attached as .config)
compiler: microblaze-linux-gcc (GCC) 8.1.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.1.0 make.cross ARCH=microblaze 

All warnings (new ones prefixed by >>):

   kernel/sysctl.c: In function 'do_proc_dointvec_minmax_conv':
>> kernel/sysctl.c:2558:14: warning: right shift count >= width of type 
>> [-Wshift-count-overflow]
  *lvalp >> (sizeof(int) * 8))
 ^~

vim +2558 kernel/sysctl.c

  2548  
  2549  static int do_proc_dointvec_minmax_conv(bool *negp, unsigned long 
*lvalp,
  2550  int *valp,
  2551  int write, void *data)
  2552  {
  2553  struct do_proc_dointvec_minmax_conv_param *param = data;
  2554  if (write) {
  2555  int val = *negp ? -*lvalp : *lvalp;
  2556  if ((param->min && *param->min > val) ||
  2557  (param->max && *param->max < val) ||
> 2558  *lvalp >> (sizeof(int) * 8))
  2559  return -EINVAL;
  2560  *valp = val;
  2561  } else {
  2562  int val = *valp;
  2563  if (val < 0) {
  2564  *negp = true;
  2565  *lvalp = -(unsigned long)val;
  2566  } else {
  2567  *negp = false;
  2568  *lvalp = (unsigned long)val;
  2569  }
  2570  }
  2571  return 0;
  2572  }
  2573  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: mmotm 2018-08-23-17-26 uploaded

2018-08-27 Thread Jia He
Hi Andrew
FYI,I watched a lockdep warning based on your mmotm master branch[1]

[6.692731] [ cut here ]
[6.696391] DEBUG_LOCKS_WARN_ON(!current->hardirqs_enabled)
[6.696404] WARNING: CPU: 3 PID: 320 at kernel/locking/lockdep.c:3845
check_flags.part.38+0x9c/0x16c
[6.711082] Modules linked in:
[6.714101] CPU: 3 PID: 320 Comm: modprobe Not tainted 4.18.0-rc4-mm1+ #56
[6.720956] Hardware name: WIWYNN HXT REP-1 System H001-1-0/HXT REP-1
CRB, BIOS 0ACJA530 03/20/2018
[6.730332] pstate: 60400085 (nZCv daIf +PAN -UAO)
[6.735106] pc : check_flags.part.38+0x9c/0x16c
[6.739619] lr : check_flags.part.38+0x9c/0x16c
[6.744133] sp : 80178536fbf0
[6.747432] x29: 80178536fbf0 x28: 8017905a1b00
[6.752727] x27: 0002 x26: 
[6.758022] x25: 08abeb14 x24: 
[6.763317] x23: 0001 x22: 0001
[6.768612] x21: 0001 x20: 
[6.773908] x19: 0a041000 x18: 
[6.779202] x17:  x16: 
[6.784498] x15:  x14: 
[6.789793] x13: 08d6b190 x12: 752ce9eb60de3f00
[6.795088] x11: 80178536f7f0 x10: 80178536f7f0
[6.800383] x9 : ffd0 x8 : 
[6.805678] x7 : 0816fe48 x6 : 801794ba62b8
[6.810973] x5 :  x4 : 
[6.816269] x3 :  x2 : 091ed988
[6.821564] x1 : 752ce9eb60de3f00 x0 : 752ce9eb60de3f00
[6.826859] Call trace:
[6.829290]  check_flags.part.38+0x9c/0x16c
[6.833457]  lock_acquire+0x12c/0x280
[6.837104]  down_read_trylock+0x78/0x98
[6.841011]  do_page_fault+0x150/0x480
[6.844742]  do_translation_fault+0x74/0x80
[6.848909]  do_mem_abort+0x60/0x108
[6.852467]  el0_da+0x24/0x28
[6.855418] irq event stamp: 250
[6.858633] hardirqs last  enabled at (249): []
mem_cgroup_commit_charge+0x9c/0x13c
[6.867833] hardirqs last disabled at (250): []
el0_svc_handler+0xc4/0x16c
[6.876252] softirqs last  enabled at (242): []
__do_softirq+0x2f8/0x554
[6.884501] softirqs last disabled at (229): []
irq_exit+0x180/0x194
[6.892399] ---[ end trace b45768f94a7b7d9f ]---
[6.896998] possible reason: unannotated irqs-on.
[6.901685] irq event stamp: 250
[6.904898] hardirqs last  enabled at (249): []
mem_cgroup_commit_charge+0x9c/0x13c
[6.914100] hardirqs last disabled at (250): []
el0_svc_handler+0xc4/0x16c
[6.922519] softirqs last  enabled at (242): []
__do_softirq+0x2f8/0x554
[6.930766] softirqs last disabled at (229): []
irq_exit+0x180/0x194
[7.023827] Initialise system trusted keyrings
[7.027414] workingset: timestamp_bits=45 max_order=25 bucket_order=0

I thought the root cause might be at [2] which seems not in your branch yet.

[1] http://git.cmpxchg.org/cgit.cgi/linux-mmotm.git
[2]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=efd112

---
Cheers,
Jia

On 8/24/2018 8:27 AM, a...@linux-foundation.org Wrote:
> The mm-of-the-moment snapshot 2018-08-23-17-26 has been uploaded to
> 
>http://www.ozlabs.org/~akpm/mmotm/
> 
> mmotm-readme.txt says
> 
> README for mm-of-the-moment:
> 
> http://www.ozlabs.org/~akpm/mmotm/
> 
> This is a snapshot of my -mm patch queue.  Uploaded at random hopefully
> more than once a week.
> 
> You will need quilt to apply these patches to the latest Linus release (4.x
> or 4.x-rcY).  The series file is in broken-out.tar.gz and is duplicated in
> http://ozlabs.org/~akpm/mmotm/series
> 
> The file broken-out.tar.gz contains two datestamp files: .DATE and
> .DATE--mm-dd-hh-mm-ss.  Both contain the string -mm-dd-hh-mm-ss,
> followed by the base kernel version against which this patch series is to
> be applied.
> 
> This tree is partially included in linux-next.  To see which patches are
> included in linux-next, consult the `series' file.  Only the patches
> within the #NEXT_PATCHES_START/#NEXT_PATCHES_END markers are included in
> linux-next.
> 
> A git tree which contains the memory management portion of this tree is
> maintained at git://git.kernel.org/pub/scm/linux/kernel/git/mhocko/mm.git
> by Michal Hocko.  It contains the patches which are between the
> "#NEXT_PATCHES_START mm" and "#NEXT_PATCHES_END" markers, from the series
> file, http://www.ozlabs.org/~akpm/mmotm/series.
> 
> 
> A full copy of the full kernel tree with the linux-next and mmotm patches
> already applied is available through git within an hour of the mmotm
> release.  Individual mmotm releases are tagged.  The master branch always
> points to the latest release, so it's constantly rebasing.
> 
> http://git.cmpxchg.org/cgit.cgi/linux-mmotm.git/
> 
> To develop on top of mmotm git:
> 
>   $ git remote add mmotm 
> git://git.kernel.org/pub/scm/linux/kernel/git/mhocko/mm.git
>   $ git remote update mmotm
>   $ git checkout -b 

Re: mmotm 2018-08-23-17-26 uploaded

2018-08-27 Thread Jia He
Hi Andrew
FYI,I watched a lockdep warning based on your mmotm master branch[1]

[6.692731] [ cut here ]
[6.696391] DEBUG_LOCKS_WARN_ON(!current->hardirqs_enabled)
[6.696404] WARNING: CPU: 3 PID: 320 at kernel/locking/lockdep.c:3845
check_flags.part.38+0x9c/0x16c
[6.711082] Modules linked in:
[6.714101] CPU: 3 PID: 320 Comm: modprobe Not tainted 4.18.0-rc4-mm1+ #56
[6.720956] Hardware name: WIWYNN HXT REP-1 System H001-1-0/HXT REP-1
CRB, BIOS 0ACJA530 03/20/2018
[6.730332] pstate: 60400085 (nZCv daIf +PAN -UAO)
[6.735106] pc : check_flags.part.38+0x9c/0x16c
[6.739619] lr : check_flags.part.38+0x9c/0x16c
[6.744133] sp : 80178536fbf0
[6.747432] x29: 80178536fbf0 x28: 8017905a1b00
[6.752727] x27: 0002 x26: 
[6.758022] x25: 08abeb14 x24: 
[6.763317] x23: 0001 x22: 0001
[6.768612] x21: 0001 x20: 
[6.773908] x19: 0a041000 x18: 
[6.779202] x17:  x16: 
[6.784498] x15:  x14: 
[6.789793] x13: 08d6b190 x12: 752ce9eb60de3f00
[6.795088] x11: 80178536f7f0 x10: 80178536f7f0
[6.800383] x9 : ffd0 x8 : 
[6.805678] x7 : 0816fe48 x6 : 801794ba62b8
[6.810973] x5 :  x4 : 
[6.816269] x3 :  x2 : 091ed988
[6.821564] x1 : 752ce9eb60de3f00 x0 : 752ce9eb60de3f00
[6.826859] Call trace:
[6.829290]  check_flags.part.38+0x9c/0x16c
[6.833457]  lock_acquire+0x12c/0x280
[6.837104]  down_read_trylock+0x78/0x98
[6.841011]  do_page_fault+0x150/0x480
[6.844742]  do_translation_fault+0x74/0x80
[6.848909]  do_mem_abort+0x60/0x108
[6.852467]  el0_da+0x24/0x28
[6.855418] irq event stamp: 250
[6.858633] hardirqs last  enabled at (249): []
mem_cgroup_commit_charge+0x9c/0x13c
[6.867833] hardirqs last disabled at (250): []
el0_svc_handler+0xc4/0x16c
[6.876252] softirqs last  enabled at (242): []
__do_softirq+0x2f8/0x554
[6.884501] softirqs last disabled at (229): []
irq_exit+0x180/0x194
[6.892399] ---[ end trace b45768f94a7b7d9f ]---
[6.896998] possible reason: unannotated irqs-on.
[6.901685] irq event stamp: 250
[6.904898] hardirqs last  enabled at (249): []
mem_cgroup_commit_charge+0x9c/0x13c
[6.914100] hardirqs last disabled at (250): []
el0_svc_handler+0xc4/0x16c
[6.922519] softirqs last  enabled at (242): []
__do_softirq+0x2f8/0x554
[6.930766] softirqs last disabled at (229): []
irq_exit+0x180/0x194
[7.023827] Initialise system trusted keyrings
[7.027414] workingset: timestamp_bits=45 max_order=25 bucket_order=0

I thought the root cause might be at [2] which seems not in your branch yet.

[1] http://git.cmpxchg.org/cgit.cgi/linux-mmotm.git
[2]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=efd112

---
Cheers,
Jia

On 8/24/2018 8:27 AM, a...@linux-foundation.org Wrote:
> The mm-of-the-moment snapshot 2018-08-23-17-26 has been uploaded to
> 
>http://www.ozlabs.org/~akpm/mmotm/
> 
> mmotm-readme.txt says
> 
> README for mm-of-the-moment:
> 
> http://www.ozlabs.org/~akpm/mmotm/
> 
> This is a snapshot of my -mm patch queue.  Uploaded at random hopefully
> more than once a week.
> 
> You will need quilt to apply these patches to the latest Linus release (4.x
> or 4.x-rcY).  The series file is in broken-out.tar.gz and is duplicated in
> http://ozlabs.org/~akpm/mmotm/series
> 
> The file broken-out.tar.gz contains two datestamp files: .DATE and
> .DATE--mm-dd-hh-mm-ss.  Both contain the string -mm-dd-hh-mm-ss,
> followed by the base kernel version against which this patch series is to
> be applied.
> 
> This tree is partially included in linux-next.  To see which patches are
> included in linux-next, consult the `series' file.  Only the patches
> within the #NEXT_PATCHES_START/#NEXT_PATCHES_END markers are included in
> linux-next.
> 
> A git tree which contains the memory management portion of this tree is
> maintained at git://git.kernel.org/pub/scm/linux/kernel/git/mhocko/mm.git
> by Michal Hocko.  It contains the patches which are between the
> "#NEXT_PATCHES_START mm" and "#NEXT_PATCHES_END" markers, from the series
> file, http://www.ozlabs.org/~akpm/mmotm/series.
> 
> 
> A full copy of the full kernel tree with the linux-next and mmotm patches
> already applied is available through git within an hour of the mmotm
> release.  Individual mmotm releases are tagged.  The master branch always
> points to the latest release, so it's constantly rebasing.
> 
> http://git.cmpxchg.org/cgit.cgi/linux-mmotm.git/
> 
> To develop on top of mmotm git:
> 
>   $ git remote add mmotm 
> git://git.kernel.org/pub/scm/linux/kernel/git/mhocko/mm.git
>   $ git remote update mmotm
>   $ git checkout -b 

[PATCH] component: fix loop condition to call unbind() if bind() fails

2018-08-27 Thread bgoswami
From: Banajit Goswami 

During component_bind_all(), if bind() fails for any
particular component associated with a master, unbind()
should be called for all previous components in that
master's match array, whose bind() might have completed
successfully. As per the current logic, if bind() fails
for the component at position 'n' in the master's match
array, it would start calling unbind() from component in
'n'th position itself and work backwards, and will always
skip calling unbind() for component in 0th position in the
master's match array.
Fix this by updating the loop condition, and the logic to
refer to the components in master's match array, so that
unbind() is called for all components starting from 'n-1'st
position in the array, until (and including) component in
0th position.

Signed-off-by: Banajit Goswami 
---
 drivers/base/component.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/base/component.c b/drivers/base/component.c
index 8946dfe..e8d676f 100644
--- a/drivers/base/component.c
+++ b/drivers/base/component.c
@@ -536,9 +536,9 @@ int component_bind_all(struct device *master_dev, void 
*data)
}
 
if (ret != 0) {
-   for (; i--; )
-   if (!master->match->compare[i].duplicate) {
-   c = master->match->compare[i].component;
+   for (; i > 0; i--)
+   if (!master->match->compare[i - 1].duplicate) {
+   c = master->match->compare[i - 1].component;
component_unbind(c, master, data);
}
}
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project



[PATCH] component: fix loop condition to call unbind() if bind() fails

2018-08-27 Thread bgoswami
From: Banajit Goswami 

During component_bind_all(), if bind() fails for any
particular component associated with a master, unbind()
should be called for all previous components in that
master's match array, whose bind() might have completed
successfully. As per the current logic, if bind() fails
for the component at position 'n' in the master's match
array, it would start calling unbind() from component in
'n'th position itself and work backwards, and will always
skip calling unbind() for component in 0th position in the
master's match array.
Fix this by updating the loop condition, and the logic to
refer to the components in master's match array, so that
unbind() is called for all components starting from 'n-1'st
position in the array, until (and including) component in
0th position.

Signed-off-by: Banajit Goswami 
---
 drivers/base/component.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/base/component.c b/drivers/base/component.c
index 8946dfe..e8d676f 100644
--- a/drivers/base/component.c
+++ b/drivers/base/component.c
@@ -536,9 +536,9 @@ int component_bind_all(struct device *master_dev, void 
*data)
}
 
if (ret != 0) {
-   for (; i--; )
-   if (!master->match->compare[i].duplicate) {
-   c = master->match->compare[i].component;
+   for (; i > 0; i--)
+   if (!master->match->compare[i - 1].duplicate) {
+   c = master->match->compare[i - 1].component;
component_unbind(c, master, data);
}
}
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project



[PATCH] perf trace beautify: Beautify flags of mount(2) and umount(2).

2018-08-27 Thread Benjamin Peterson
Example output of perf trace -e mount,umount2:

  6243.930 ( 0.052 ms): mount/30976 mount(dev_name: 0x55dc541bb920, dir_name: 
0x55dc541bc960, type: 0x55dc541b9c40, flags: BIND) = 0
  7851.821 (26.015 ms): umount/30983 umount2(name: 0x558daa82cf50, flags: 
MNT_FORCE) = 0

Signed-off-by: Benjamin Peterson 
---
 tools/perf/builtin-trace.c|  5 ++
 tools/perf/trace/beauty/mount_flags.c | 79 +++
 2 files changed, 84 insertions(+)
 create mode 100644 tools/perf/trace/beauty/mount_flags.c

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 22ab8e67c760..3cffb25d1928 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -603,6 +603,7 @@ static size_t syscall_arg__scnprintf_getrandom_flags(char 
*bf, size_t size,
 #include "trace/beauty/futex_val3.c"
 #include "trace/beauty/mmap.c"
 #include "trace/beauty/mode_t.c"
+#include "trace/beauty/mount_flags.c"
 #include "trace/beauty/msg_flags.c"
 #include "trace/beauty/open_flags.c"
 #include "trace/beauty/perf_event_open.c"
@@ -722,6 +723,8 @@ static struct syscall_fmt {
  .arg = { [0] = { .scnprintf = SCA_HEX,/* addr */ },
   [2] = { .scnprintf = SCA_MMAP_PROT,  /* prot */ },
   [3] = { .scnprintf = SCA_MMAP_FLAGS, /* flags */ }, }, },
+   { .name = "mount",
+ .arg = { [3] = { .scnprintf = SCA_MOUNT_FLAGS, /* flags */ }, }, },
{ .name = "mprotect",
  .arg = { [0] = { .scnprintf = SCA_HEX,/* start */ },
   [2] = { .scnprintf = SCA_MMAP_PROT,  /* prot */ }, }, },
@@ -830,6 +833,8 @@ static struct syscall_fmt {
  .arg = { [2] = { .scnprintf = SCA_SIGNUM, /* sig */ }, }, },
{ .name = "tkill",
  .arg = { [1] = { .scnprintf = SCA_SIGNUM, /* sig */ }, }, },
+   { .name = "umount2", .alias = "umount",
+ .arg = { [1] = { .scnprintf = SCA_UMOUNT_FLAGS, /* flags */ }, }, },
{ .name = "uname", .alias = "newuname", },
{ .name = "unlinkat",
  .arg = { [0] = { .scnprintf = SCA_FDAT, /* dfd */ }, }, },
diff --git a/tools/perf/trace/beauty/mount_flags.c 
b/tools/perf/trace/beauty/mount_flags.c
new file mode 100644
index ..86790b82c869
--- /dev/null
+++ b/tools/perf/trace/beauty/mount_flags.c
@@ -0,0 +1,79 @@
+// SPDX-License-Identifier: GPL-2.0
+#include 
+
+static size_t syscall_arg__scnprintf_mount_flags(char *bf, size_t size, struct 
syscall_arg *arg)
+{
+   size_t printed = 0;
+   int flags = arg->val;
+
+   if ((flags & MS_MGC_MSK) == MS_MGC_VAL)
+   flags &= ~MS_MGC_MSK;
+
+#defineP_FLAG(n) \
+   if (flags & MS_##n) { \
+   printed += scnprintf(bf + printed, size - printed, "%s%s", 
printed ? "|" : "", #n); \
+   flags &= ~MS_##n; \
+   }
+
+   P_FLAG(RDONLY);
+   P_FLAG(NOSUID);
+   P_FLAG(NODEV);
+   P_FLAG(NOEXEC);
+   P_FLAG(SYNCHRONOUS);
+   P_FLAG(REMOUNT);
+   P_FLAG(MANDLOCK);
+   P_FLAG(DIRSYNC);
+   P_FLAG(NOATIME);
+   P_FLAG(NODIRATIME);
+   P_FLAG(BIND);
+   P_FLAG(MOVE);
+   P_FLAG(REC);
+   P_FLAG(SILENT);
+   P_FLAG(POSIXACL);
+   P_FLAG(UNBINDABLE);
+   P_FLAG(PRIVATE);
+   P_FLAG(SLAVE);
+   P_FLAG(SHARED);
+   P_FLAG(RELATIME);
+   P_FLAG(KERNMOUNT);
+   P_FLAG(I_VERSION);
+   P_FLAG(STRICTATIME);
+   P_FLAG(LAZYTIME);
+   P_FLAG(ACTIVE);
+   P_FLAG(NOUSER);
+
+#undef P_FLAG
+
+   if (flags)
+   printed += scnprintf(bf + printed, size - printed, "%s%#x", 
printed ? "|" : "", flags);
+
+   return printed;
+}
+
+#define SCA_MOUNT_FLAGS syscall_arg__scnprintf_mount_flags
+
+static size_t syscall_arg__scnprintf_umount_flags(char *bf, size_t size, 
struct syscall_arg *arg)
+{
+   size_t printed = 0;
+   int flags = arg->val;
+
+#defineP_FLAG(n) \
+   if (flags & n) { \
+   printed += scnprintf(bf + printed, size - printed, "%s%s", 
printed ? "|" : "", #n); \
+   flags &= ~n; \
+   }
+
+   P_FLAG(MNT_FORCE);
+   P_FLAG(MNT_DETACH);
+   P_FLAG(MNT_EXPIRE);
+   P_FLAG(UMOUNT_NOFOLLOW);
+
+#undef P_FLAG
+
+   if (flags)
+   printed += scnprintf(bf + printed, size - printed, "%s%#x", 
printed ? "|" : "", flags);
+
+   return printed;
+}
+
+#define SCA_UMOUNT_FLAGS syscall_arg__scnprintf_umount_flags
-- 
2.17.1



[PATCH] perf trace beautify: Beautify flags of mount(2) and umount(2).

2018-08-27 Thread Benjamin Peterson
Example output of perf trace -e mount,umount2:

  6243.930 ( 0.052 ms): mount/30976 mount(dev_name: 0x55dc541bb920, dir_name: 
0x55dc541bc960, type: 0x55dc541b9c40, flags: BIND) = 0
  7851.821 (26.015 ms): umount/30983 umount2(name: 0x558daa82cf50, flags: 
MNT_FORCE) = 0

Signed-off-by: Benjamin Peterson 
---
 tools/perf/builtin-trace.c|  5 ++
 tools/perf/trace/beauty/mount_flags.c | 79 +++
 2 files changed, 84 insertions(+)
 create mode 100644 tools/perf/trace/beauty/mount_flags.c

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 22ab8e67c760..3cffb25d1928 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -603,6 +603,7 @@ static size_t syscall_arg__scnprintf_getrandom_flags(char 
*bf, size_t size,
 #include "trace/beauty/futex_val3.c"
 #include "trace/beauty/mmap.c"
 #include "trace/beauty/mode_t.c"
+#include "trace/beauty/mount_flags.c"
 #include "trace/beauty/msg_flags.c"
 #include "trace/beauty/open_flags.c"
 #include "trace/beauty/perf_event_open.c"
@@ -722,6 +723,8 @@ static struct syscall_fmt {
  .arg = { [0] = { .scnprintf = SCA_HEX,/* addr */ },
   [2] = { .scnprintf = SCA_MMAP_PROT,  /* prot */ },
   [3] = { .scnprintf = SCA_MMAP_FLAGS, /* flags */ }, }, },
+   { .name = "mount",
+ .arg = { [3] = { .scnprintf = SCA_MOUNT_FLAGS, /* flags */ }, }, },
{ .name = "mprotect",
  .arg = { [0] = { .scnprintf = SCA_HEX,/* start */ },
   [2] = { .scnprintf = SCA_MMAP_PROT,  /* prot */ }, }, },
@@ -830,6 +833,8 @@ static struct syscall_fmt {
  .arg = { [2] = { .scnprintf = SCA_SIGNUM, /* sig */ }, }, },
{ .name = "tkill",
  .arg = { [1] = { .scnprintf = SCA_SIGNUM, /* sig */ }, }, },
+   { .name = "umount2", .alias = "umount",
+ .arg = { [1] = { .scnprintf = SCA_UMOUNT_FLAGS, /* flags */ }, }, },
{ .name = "uname", .alias = "newuname", },
{ .name = "unlinkat",
  .arg = { [0] = { .scnprintf = SCA_FDAT, /* dfd */ }, }, },
diff --git a/tools/perf/trace/beauty/mount_flags.c 
b/tools/perf/trace/beauty/mount_flags.c
new file mode 100644
index ..86790b82c869
--- /dev/null
+++ b/tools/perf/trace/beauty/mount_flags.c
@@ -0,0 +1,79 @@
+// SPDX-License-Identifier: GPL-2.0
+#include 
+
+static size_t syscall_arg__scnprintf_mount_flags(char *bf, size_t size, struct 
syscall_arg *arg)
+{
+   size_t printed = 0;
+   int flags = arg->val;
+
+   if ((flags & MS_MGC_MSK) == MS_MGC_VAL)
+   flags &= ~MS_MGC_MSK;
+
+#defineP_FLAG(n) \
+   if (flags & MS_##n) { \
+   printed += scnprintf(bf + printed, size - printed, "%s%s", 
printed ? "|" : "", #n); \
+   flags &= ~MS_##n; \
+   }
+
+   P_FLAG(RDONLY);
+   P_FLAG(NOSUID);
+   P_FLAG(NODEV);
+   P_FLAG(NOEXEC);
+   P_FLAG(SYNCHRONOUS);
+   P_FLAG(REMOUNT);
+   P_FLAG(MANDLOCK);
+   P_FLAG(DIRSYNC);
+   P_FLAG(NOATIME);
+   P_FLAG(NODIRATIME);
+   P_FLAG(BIND);
+   P_FLAG(MOVE);
+   P_FLAG(REC);
+   P_FLAG(SILENT);
+   P_FLAG(POSIXACL);
+   P_FLAG(UNBINDABLE);
+   P_FLAG(PRIVATE);
+   P_FLAG(SLAVE);
+   P_FLAG(SHARED);
+   P_FLAG(RELATIME);
+   P_FLAG(KERNMOUNT);
+   P_FLAG(I_VERSION);
+   P_FLAG(STRICTATIME);
+   P_FLAG(LAZYTIME);
+   P_FLAG(ACTIVE);
+   P_FLAG(NOUSER);
+
+#undef P_FLAG
+
+   if (flags)
+   printed += scnprintf(bf + printed, size - printed, "%s%#x", 
printed ? "|" : "", flags);
+
+   return printed;
+}
+
+#define SCA_MOUNT_FLAGS syscall_arg__scnprintf_mount_flags
+
+static size_t syscall_arg__scnprintf_umount_flags(char *bf, size_t size, 
struct syscall_arg *arg)
+{
+   size_t printed = 0;
+   int flags = arg->val;
+
+#defineP_FLAG(n) \
+   if (flags & n) { \
+   printed += scnprintf(bf + printed, size - printed, "%s%s", 
printed ? "|" : "", #n); \
+   flags &= ~n; \
+   }
+
+   P_FLAG(MNT_FORCE);
+   P_FLAG(MNT_DETACH);
+   P_FLAG(MNT_EXPIRE);
+   P_FLAG(UMOUNT_NOFOLLOW);
+
+#undef P_FLAG
+
+   if (flags)
+   printed += scnprintf(bf + printed, size - printed, "%s%#x", 
printed ? "|" : "", flags);
+
+   return printed;
+}
+
+#define SCA_UMOUNT_FLAGS syscall_arg__scnprintf_umount_flags
-- 
2.17.1



Re: [RFC PATCH 5/6] arm64: dts: ti: Add Support for AM654 SoC

2018-08-27 Thread Kishon Vijay Abraham I
Hi,

On Tuesday 28 August 2018 06:52 AM, Nishanth Menon wrote:
> On 15:55-20180827, Tony Lindgren wrote:
>> * Kishon Vijay Abraham I  [180827 03:06]:
>>> Hi Tony,
>>>
>>> On Monday 20 August 2018 08:01 PM, Tony Lindgren wrote:
>>>> * Kishon Vijay Abraham I  [180808 06:35]:
>>>>> On Tuesday 05 June 2018 07:35 PM, Rob Herring wrote:
>>>>>> Really need 64-bit addresses and sizes? Use ranges to limit the
>>>>>> address space if possible.
>>>>>
>>>>> We now have address-cells as <1>,
>>>>> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/arch/arm64/boot/dts/ti/k3-am65.dtsi#n49
>>>>>
>>>>> However each PCIe instance has 2 data regions and one of the regions
>>>>> (PCIE0_CORE_CORE_DAT_SLV_PCIE_DAT1/PCIE1_CORE_CORE_DAT_SLV_PCIE_DAT1 
>>>>> specified
>>>>> in the "MAIN Domain Memory Map" table of TRM 
>>>>> http://www.ti.com/lit/pdf/spruid7)
>>>>> is above the 32bit region and requires 2 cells to specify the start 
>>>>> address.
>>>>> This region is used to access MEM_SPACE of PCIe endpoint when operating 
>>>>> in root
>>>>> complex mode and access memory of PCI root complex when operating in 
>>>>> endpoint mode.
>>>>>
>>>>> In order to describe this, should we change the address-cells back to <2> 
>>>>> or do
>>>>> you suggest any other alternatives?
>>>>
>>>> It's probably best to have the top level cbass interconnect use
>>>> #size-cells = <2> and then have it's child interconnects have
>>>> #size-cells = <1> if they don't need ranges above 4GB.
>>>
>>> PCIe has a region starting at 0x40_ and size 4GB. We need 2 address
>>> cells and 2 size cells to describe this no?
>>
>> Yes.
>>
>>>> BTW, what's the difference between all these three similar PCIE
>>>> ranges?
>>>>
>>>> PCIE0_CORE_CORE_DAT_SLV_PCIE_CORE 0x000550 0x000560 1 MB
>>>> PCIE1_CORE_CORE_DAT_SLV_PCIE_CORE 0x000560 0x000570 1 MB
>>>
>>> This is the register space for the two instances of PCIe controller.
>>>>
>>>> PCIE0_CORE_CORE_DAT_SLV_PCIE_DAT0 0x001000 0x001800 128 MB
>>>> PCIE1_CORE_CORE_DAT_SLV_PCIE_DAT0 0x001800 0x002000 128 MB
>>>>
>>>> PCIE0_CORE_CORE_DAT_SLV_PCIE_DAT1 0x40 0x41 4 GB
>>>> PCIE1_CORE_CORE_DAT_SLV_PCIE_DAT1 0x41 0x42 4 GB
>>>
>>> The above are regions which can be used by CPU/DMA to access the PCIe 
>>> address
>>> space. The mapping from the above regions to the PCIe address space will be
>>> programmed in the PCIe controller.
>>
>> OK so not just somethng for dma-ranges but also accessible by
>> the CPU.
>>
> 
> Kishon, Sekhar:
> 
> Can you guys post patches based on v4.19-rc1 for fixing this? I do have
> a bunch of dts nodes to build as well for v4.20, once Tony / Rob acks the
> changes.

Sure, I'll post that today.

Thanks
Kishon


Re: [RFC PATCH 5/6] arm64: dts: ti: Add Support for AM654 SoC

2018-08-27 Thread Kishon Vijay Abraham I
Hi,

On Tuesday 28 August 2018 06:52 AM, Nishanth Menon wrote:
> On 15:55-20180827, Tony Lindgren wrote:
>> * Kishon Vijay Abraham I  [180827 03:06]:
>>> Hi Tony,
>>>
>>> On Monday 20 August 2018 08:01 PM, Tony Lindgren wrote:
>>>> * Kishon Vijay Abraham I  [180808 06:35]:
>>>>> On Tuesday 05 June 2018 07:35 PM, Rob Herring wrote:
>>>>>> Really need 64-bit addresses and sizes? Use ranges to limit the
>>>>>> address space if possible.
>>>>>
>>>>> We now have address-cells as <1>,
>>>>> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/arch/arm64/boot/dts/ti/k3-am65.dtsi#n49
>>>>>
>>>>> However each PCIe instance has 2 data regions and one of the regions
>>>>> (PCIE0_CORE_CORE_DAT_SLV_PCIE_DAT1/PCIE1_CORE_CORE_DAT_SLV_PCIE_DAT1 
>>>>> specified
>>>>> in the "MAIN Domain Memory Map" table of TRM 
>>>>> http://www.ti.com/lit/pdf/spruid7)
>>>>> is above the 32bit region and requires 2 cells to specify the start 
>>>>> address.
>>>>> This region is used to access MEM_SPACE of PCIe endpoint when operating 
>>>>> in root
>>>>> complex mode and access memory of PCI root complex when operating in 
>>>>> endpoint mode.
>>>>>
>>>>> In order to describe this, should we change the address-cells back to <2> 
>>>>> or do
>>>>> you suggest any other alternatives?
>>>>
>>>> It's probably best to have the top level cbass interconnect use
>>>> #size-cells = <2> and then have it's child interconnects have
>>>> #size-cells = <1> if they don't need ranges above 4GB.
>>>
>>> PCIe has a region starting at 0x40_ and size 4GB. We need 2 address
>>> cells and 2 size cells to describe this no?
>>
>> Yes.
>>
>>>> BTW, what's the difference between all these three similar PCIE
>>>> ranges?
>>>>
>>>> PCIE0_CORE_CORE_DAT_SLV_PCIE_CORE 0x000550 0x000560 1 MB
>>>> PCIE1_CORE_CORE_DAT_SLV_PCIE_CORE 0x000560 0x000570 1 MB
>>>
>>> This is the register space for the two instances of PCIe controller.
>>>>
>>>> PCIE0_CORE_CORE_DAT_SLV_PCIE_DAT0 0x001000 0x001800 128 MB
>>>> PCIE1_CORE_CORE_DAT_SLV_PCIE_DAT0 0x001800 0x002000 128 MB
>>>>
>>>> PCIE0_CORE_CORE_DAT_SLV_PCIE_DAT1 0x40 0x41 4 GB
>>>> PCIE1_CORE_CORE_DAT_SLV_PCIE_DAT1 0x41 0x42 4 GB
>>>
>>> The above are regions which can be used by CPU/DMA to access the PCIe 
>>> address
>>> space. The mapping from the above regions to the PCIe address space will be
>>> programmed in the PCIe controller.
>>
>> OK so not just somethng for dma-ranges but also accessible by
>> the CPU.
>>
> 
> Kishon, Sekhar:
> 
> Can you guys post patches based on v4.19-rc1 for fixing this? I do have
> a bunch of dts nodes to build as well for v4.20, once Tony / Rob acks the
> changes.

Sure, I'll post that today.

Thanks
Kishon


Re: [PATCH 2/2] clk: meson-g12a: Add AO Clock controller driver

2018-08-27 Thread Jian Hu

Hi: Jerome

On 2018/8/27 21:07, Jerome Brunet wrote:

On Fri, 2018-08-24 at 21:34 +0800, Jian Hu wrote:




I am confued about aoclk81's parent clocks.

I can not get the example of axg audio clock driver, Could you provide
the link? Had it merged into clk-meson.git?


Yes and mainline as well : drivers/clk/meson/axg-audio.c

Basically this driver is creating bypass input clocks (audio_pclk, mst_in[0-9],
etc...) .

This allows to collect input clocks from DT (like any consumer should) will
keeping constant in the controller clock tree.


From what I've seen of your controller drivers, the EE controller should have

one input, the AO should have 3.



.


I still can not get the example meaning in axg audio driver.

In 26 page of A113D_Datasheet V0.7 20170725-Baylibre.pdf,We can see the 
aoclk81 has two parents. clk81 and ao_slow_clk. I can not get 3 parents.


 clk81|\
   ---| \aoclk81
src0 |\   |  |---
-| \ ao_slow_clk  |  |
 |  |-| /
-| /  |/
 src1|/


src0 is from xtal, if can generate 32k clock, but it is never used.
src1 is from gpio clock, It is never used. If necessary, the ao_slow_clk 
maybe described.


So why aoclk81 has 3 parents?


Re: [PATCH 2/2] clk: meson-g12a: Add AO Clock controller driver

2018-08-27 Thread Jian Hu

Hi: Jerome

On 2018/8/27 21:07, Jerome Brunet wrote:

On Fri, 2018-08-24 at 21:34 +0800, Jian Hu wrote:




I am confued about aoclk81's parent clocks.

I can not get the example of axg audio clock driver, Could you provide
the link? Had it merged into clk-meson.git?


Yes and mainline as well : drivers/clk/meson/axg-audio.c

Basically this driver is creating bypass input clocks (audio_pclk, mst_in[0-9],
etc...) .

This allows to collect input clocks from DT (like any consumer should) will
keeping constant in the controller clock tree.


From what I've seen of your controller drivers, the EE controller should have

one input, the AO should have 3.



.


I still can not get the example meaning in axg audio driver.

In 26 page of A113D_Datasheet V0.7 20170725-Baylibre.pdf,We can see the 
aoclk81 has two parents. clk81 and ao_slow_clk. I can not get 3 parents.


 clk81|\
   ---| \aoclk81
src0 |\   |  |---
-| \ ao_slow_clk  |  |
 |  |-| /
-| /  |/
 src1|/


src0 is from xtal, if can generate 32k clock, but it is never used.
src1 is from gpio clock, It is never used. If necessary, the ao_slow_clk 
maybe described.


So why aoclk81 has 3 parents?


Finanzielle Hilfe (Darlehen)

2018-08-27 Thread Citi Bank




--
Schönen Tag Dame / Herr,
  
   Brauchen Sie finanzielle Hilfe (Darlehen)?
Ob es sich um Privat- oder Firmenkredite handelt, sprechen Sie mit uns 
bei CITI BANK (TÜRKEI), wir werden Ihre finanziellen Probleme lösen.


Unser Zinssatz beträgt 1,3%. Bitte bewerben Sie sich jetzt und füllen 
Sie die untenstehenden Bewerbungsdetails aus:


Vollständiger Name:_
Darlehensbetrag:___
Darlehensdauer:___
Der Grund für den Kredit:
Telefon:__

Wir warten auf Ihre Bewerbung, damit Ihre Kreditanfrage bearbeitet 
werden kann.


Freundliche Grüße


Finanzielle Hilfe (Darlehen)

2018-08-27 Thread Citi Bank




--
Schönen Tag Dame / Herr,
  
   Brauchen Sie finanzielle Hilfe (Darlehen)?
Ob es sich um Privat- oder Firmenkredite handelt, sprechen Sie mit uns 
bei CITI BANK (TÜRKEI), wir werden Ihre finanziellen Probleme lösen.


Unser Zinssatz beträgt 1,3%. Bitte bewerben Sie sich jetzt und füllen 
Sie die untenstehenden Bewerbungsdetails aus:


Vollständiger Name:_
Darlehensbetrag:___
Darlehensdauer:___
Der Grund für den Kredit:
Telefon:__

Wir warten auf Ihre Bewerbung, damit Ihre Kreditanfrage bearbeitet 
werden kann.


Freundliche Grüße


Re: [PATCH v2 1/5] drivers: pinctrl: qcom: add wakeup capability to GPIO

2018-08-27 Thread Bjorn Andersson
On Mon 27 Aug 18:46 PDT 2018, Lina Iyer wrote:
> On Mon, Aug 27 2018 at 18:26 -0600, Bjorn Andersson wrote:
> > On Mon 27 Aug 09:56 PDT 2018, Lina Iyer wrote:
[..]
> > > Thanks, I will look into Hans's RFCv2. But what would help me would be
> > > to avoid creating the IRQ for the GPIO itself (I have the latent IRQ),
> > > if I could just return that instead in gpio_to_irq(), it might be
> > > easier. I understand ->to_irq() is supposed to be a translate function
> > > only, I can avoid the dance of enabling and diabling the PDC IRQ on
> > > suspend and resume.
> > > 
> > 
> > I did implement gpio_to_irq() like this in the PMIC gpio/mpp drivers and
> > we've since concluded that we need to move this to some hierarchical
> > interrupt controller, because people like Linus expect to be able to say
> > 
> >  interrupts = <_controller 1 IRQ_TYPE_EDGE_RISING>
> > 
> > which is something used all over the place with the TLMM driver today.
> 
> Does it have to be _controller, can it be another interrupt controller?
> 
> Say,
>   interrupts-extended = < 1 IRQ_TYPE_EDGE_RISING>;
> 

It would require that the GPIO interrupt number space of the PDC matches
the pin numbering of the TLMM, to be somewhat maintainable.

And it would still require DT-writers to know that if the implementation
of a compatible, that references a TLMM IRQ, wants to mark the IRQ wake
capable it needs to reference the PDC instead...while still having a
pinmux/pinconf setting for the TLMM.

And for gpio_to_irq() we would need to do the mapping that you suggest,
so the TLMM still needs to have all these references to the PDC.


So I think it would be nice if we could avoid this scenario, but I don't
have any good ideas of how to do this right now...

Regards,
Bjorn


Re: [PATCH v2 1/5] drivers: pinctrl: qcom: add wakeup capability to GPIO

2018-08-27 Thread Bjorn Andersson
On Mon 27 Aug 18:46 PDT 2018, Lina Iyer wrote:
> On Mon, Aug 27 2018 at 18:26 -0600, Bjorn Andersson wrote:
> > On Mon 27 Aug 09:56 PDT 2018, Lina Iyer wrote:
[..]
> > > Thanks, I will look into Hans's RFCv2. But what would help me would be
> > > to avoid creating the IRQ for the GPIO itself (I have the latent IRQ),
> > > if I could just return that instead in gpio_to_irq(), it might be
> > > easier. I understand ->to_irq() is supposed to be a translate function
> > > only, I can avoid the dance of enabling and diabling the PDC IRQ on
> > > suspend and resume.
> > > 
> > 
> > I did implement gpio_to_irq() like this in the PMIC gpio/mpp drivers and
> > we've since concluded that we need to move this to some hierarchical
> > interrupt controller, because people like Linus expect to be able to say
> > 
> >  interrupts = <_controller 1 IRQ_TYPE_EDGE_RISING>
> > 
> > which is something used all over the place with the TLMM driver today.
> 
> Does it have to be _controller, can it be another interrupt controller?
> 
> Say,
>   interrupts-extended = < 1 IRQ_TYPE_EDGE_RISING>;
> 

It would require that the GPIO interrupt number space of the PDC matches
the pin numbering of the TLMM, to be somewhat maintainable.

And it would still require DT-writers to know that if the implementation
of a compatible, that references a TLMM IRQ, wants to mark the IRQ wake
capable it needs to reference the PDC instead...while still having a
pinmux/pinconf setting for the TLMM.

And for gpio_to_irq() we would need to do the mapping that you suggest,
so the TLMM still needs to have all these references to the PDC.


So I think it would be nice if we could avoid this scenario, but I don't
have any good ideas of how to do this right now...

Regards,
Bjorn


Re: [PATCH 2/2] iio: adc: sc27xx: Add ADC scale calibration

2018-08-27 Thread Baolin Wang
Hi Jonathan,

On 25 August 2018 at 16:43, Jonathan Cameron  wrote:
> On Fri, 24 Aug 2018 17:53:16 +0800
> Baolin Wang  wrote:
>
>> This patch adds support to read calibration values from the eFuse
>> controller to calibrate the ADC channel scales, which can make ADC
>> sample data more accurate.
>>
>> Signed-off-by: Baolin Wang 
> This looks good to me.  I'll leave it for now though given open questions
> on patch 1 and to allow others time to comment on this if they wish -
> particularly as it includes a binding addition.

Thanks for your reviewing. But after more testing, we found one issue
when reading calibration data from efuse, which is not always 4 bytes
(sizeof(u32)). So I will change to use nvmem_cell_read() instead of
nvmem_cell_read_u32() in next version.

-- 
Baolin Wang
Best Regards


Re: [PATCH 2/2] iio: adc: sc27xx: Add ADC scale calibration

2018-08-27 Thread Baolin Wang
Hi Jonathan,

On 25 August 2018 at 16:43, Jonathan Cameron  wrote:
> On Fri, 24 Aug 2018 17:53:16 +0800
> Baolin Wang  wrote:
>
>> This patch adds support to read calibration values from the eFuse
>> controller to calibrate the ADC channel scales, which can make ADC
>> sample data more accurate.
>>
>> Signed-off-by: Baolin Wang 
> This looks good to me.  I'll leave it for now though given open questions
> on patch 1 and to allow others time to comment on this if they wish -
> particularly as it includes a binding addition.

Thanks for your reviewing. But after more testing, we found one issue
when reading calibration data from efuse, which is not always 4 bytes
(sizeof(u32)). So I will change to use nvmem_cell_read() instead of
nvmem_cell_read_u32() in next version.

-- 
Baolin Wang
Best Regards


Re: [PATCH 1/2] iio: adc: sc27xx: Add raw data support

2018-08-27 Thread Baolin Wang
Hi Jonathan,

On 25 August 2018 at 16:38, Jonathan Cameron  wrote:
> On Fri, 24 Aug 2018 17:53:15 +0800
> Baolin Wang  wrote:
>
>> The headset device will use channel 20 of ADC controller to detect events,
>> but it needs the raw ADC data to do conversion according to its own formula.
>>
>> Thus we should configure the channel mask separately and configure channel
>> 20 as IIO_CHAN_INFO_RAW, as well as adding raw data read support.
>
> So is this a general thing, i.e. that channel is 'meant' to be used for the
> headset, or just a one off for a particular board?
> If it is a general thing, than I'm fine with this (unlikely we'll break any
> other users), but if not we need to find a nicer way to do it.

Yes, it is a general thing. Now channel 20 is always used for the headset.

> I am a little unclear on how a channel would provide the voltage on it's pin
> but that could be wrong when used for a different purpose?
> If it's just a matter of unusual loading characteristics then perhaps that
> is valid, but I'd like to understand this a little.

On our platform, the headset will use this voltage value reading from
ADC to check the headset events: headset buttons, headset plugin and
so on.

>>
>> Signed-off-by: Baolin Wang 
>> ---
>>  drivers/iio/adc/sc27xx_adc.c |   80 
>> --
>>  1 file changed, 45 insertions(+), 35 deletions(-)
>>
>> diff --git a/drivers/iio/adc/sc27xx_adc.c b/drivers/iio/adc/sc27xx_adc.c
>> index 2b60efe..153c311 100644
>> --- a/drivers/iio/adc/sc27xx_adc.c
>> +++ b/drivers/iio/adc/sc27xx_adc.c
>> @@ -273,6 +273,17 @@ static int sc27xx_adc_read_raw(struct iio_dev 
>> *indio_dev,
>>   int ret, tmp;
>>
>>   switch (mask) {
>> + case IIO_CHAN_INFO_RAW:
>> + mutex_lock(_dev->mlock);
>> + ret = sc27xx_adc_read(data, chan->channel, scale, );
>> + mutex_unlock(_dev->mlock);
>> +
>> + if (ret)
>> + return ret;
>> +
>> + *val = tmp;
>> + return IIO_VAL_INT;
>> +
>>   case IIO_CHAN_INFO_PROCESSED:
>>   mutex_lock(_dev->mlock);
>>   ret = sc27xx_adc_read_processed(data, chan->channel, scale,
>> @@ -315,48 +326,47 @@ static int sc27xx_adc_write_raw(struct iio_dev 
>> *indio_dev,
>>   .write_raw = _adc_write_raw,
>>  };
>>
>> -#define SC27XX_ADC_CHANNEL(index) {  \
>> +#define SC27XX_ADC_CHANNEL(index, mask) {\
>>   .type = IIO_VOLTAGE,\
>>   .channel = index,   \
>> - .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED) |\
>> -   BIT(IIO_CHAN_INFO_SCALE), \
>> + .info_mask_separate = mask | BIT(IIO_CHAN_INFO_SCALE),  \
>>   .datasheet_name = "CH##index",  \
>>   .indexed = 1,   \
>>  }
>>
>>  static const struct iio_chan_spec sc27xx_channels[] = {
>> - SC27XX_ADC_CHANNEL(0),
>> - SC27XX_ADC_CHANNEL(1),
>> - SC27XX_ADC_CHANNEL(2),
>> - SC27XX_ADC_CHANNEL(3),
>> - SC27XX_ADC_CHANNEL(4),
>> - SC27XX_ADC_CHANNEL(5),
>> - SC27XX_ADC_CHANNEL(6),
>> - SC27XX_ADC_CHANNEL(7),
>> - SC27XX_ADC_CHANNEL(8),
>> - SC27XX_ADC_CHANNEL(9),
>> - SC27XX_ADC_CHANNEL(10),
>> - SC27XX_ADC_CHANNEL(11),
>> - SC27XX_ADC_CHANNEL(12),
>> - SC27XX_ADC_CHANNEL(13),
>> - SC27XX_ADC_CHANNEL(14),
>> - SC27XX_ADC_CHANNEL(15),
>> - SC27XX_ADC_CHANNEL(16),
>> - SC27XX_ADC_CHANNEL(17),
>> - SC27XX_ADC_CHANNEL(18),
>> - SC27XX_ADC_CHANNEL(19),
>> - SC27XX_ADC_CHANNEL(20),
>> - SC27XX_ADC_CHANNEL(21),
>> - SC27XX_ADC_CHANNEL(22),
>> - SC27XX_ADC_CHANNEL(23),
>> - SC27XX_ADC_CHANNEL(24),
>> - SC27XX_ADC_CHANNEL(25),
>> - SC27XX_ADC_CHANNEL(26),
>> - SC27XX_ADC_CHANNEL(27),
>> - SC27XX_ADC_CHANNEL(28),
>> - SC27XX_ADC_CHANNEL(29),
>> - SC27XX_ADC_CHANNEL(30),
>> - SC27XX_ADC_CHANNEL(31),
>> + SC27XX_ADC_CHANNEL(0, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(1, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(2, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(3, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(4, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(5, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(6, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(7, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(8, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(9, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(10, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(11, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(12, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(13, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(14, BIT(IIO_CHAN_INFO_PROCESSED)),
>> 

Re: [PATCH 1/2] iio: adc: sc27xx: Add raw data support

2018-08-27 Thread Baolin Wang
Hi Jonathan,

On 25 August 2018 at 16:38, Jonathan Cameron  wrote:
> On Fri, 24 Aug 2018 17:53:15 +0800
> Baolin Wang  wrote:
>
>> The headset device will use channel 20 of ADC controller to detect events,
>> but it needs the raw ADC data to do conversion according to its own formula.
>>
>> Thus we should configure the channel mask separately and configure channel
>> 20 as IIO_CHAN_INFO_RAW, as well as adding raw data read support.
>
> So is this a general thing, i.e. that channel is 'meant' to be used for the
> headset, or just a one off for a particular board?
> If it is a general thing, than I'm fine with this (unlikely we'll break any
> other users), but if not we need to find a nicer way to do it.

Yes, it is a general thing. Now channel 20 is always used for the headset.

> I am a little unclear on how a channel would provide the voltage on it's pin
> but that could be wrong when used for a different purpose?
> If it's just a matter of unusual loading characteristics then perhaps that
> is valid, but I'd like to understand this a little.

On our platform, the headset will use this voltage value reading from
ADC to check the headset events: headset buttons, headset plugin and
so on.

>>
>> Signed-off-by: Baolin Wang 
>> ---
>>  drivers/iio/adc/sc27xx_adc.c |   80 
>> --
>>  1 file changed, 45 insertions(+), 35 deletions(-)
>>
>> diff --git a/drivers/iio/adc/sc27xx_adc.c b/drivers/iio/adc/sc27xx_adc.c
>> index 2b60efe..153c311 100644
>> --- a/drivers/iio/adc/sc27xx_adc.c
>> +++ b/drivers/iio/adc/sc27xx_adc.c
>> @@ -273,6 +273,17 @@ static int sc27xx_adc_read_raw(struct iio_dev 
>> *indio_dev,
>>   int ret, tmp;
>>
>>   switch (mask) {
>> + case IIO_CHAN_INFO_RAW:
>> + mutex_lock(_dev->mlock);
>> + ret = sc27xx_adc_read(data, chan->channel, scale, );
>> + mutex_unlock(_dev->mlock);
>> +
>> + if (ret)
>> + return ret;
>> +
>> + *val = tmp;
>> + return IIO_VAL_INT;
>> +
>>   case IIO_CHAN_INFO_PROCESSED:
>>   mutex_lock(_dev->mlock);
>>   ret = sc27xx_adc_read_processed(data, chan->channel, scale,
>> @@ -315,48 +326,47 @@ static int sc27xx_adc_write_raw(struct iio_dev 
>> *indio_dev,
>>   .write_raw = _adc_write_raw,
>>  };
>>
>> -#define SC27XX_ADC_CHANNEL(index) {  \
>> +#define SC27XX_ADC_CHANNEL(index, mask) {\
>>   .type = IIO_VOLTAGE,\
>>   .channel = index,   \
>> - .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED) |\
>> -   BIT(IIO_CHAN_INFO_SCALE), \
>> + .info_mask_separate = mask | BIT(IIO_CHAN_INFO_SCALE),  \
>>   .datasheet_name = "CH##index",  \
>>   .indexed = 1,   \
>>  }
>>
>>  static const struct iio_chan_spec sc27xx_channels[] = {
>> - SC27XX_ADC_CHANNEL(0),
>> - SC27XX_ADC_CHANNEL(1),
>> - SC27XX_ADC_CHANNEL(2),
>> - SC27XX_ADC_CHANNEL(3),
>> - SC27XX_ADC_CHANNEL(4),
>> - SC27XX_ADC_CHANNEL(5),
>> - SC27XX_ADC_CHANNEL(6),
>> - SC27XX_ADC_CHANNEL(7),
>> - SC27XX_ADC_CHANNEL(8),
>> - SC27XX_ADC_CHANNEL(9),
>> - SC27XX_ADC_CHANNEL(10),
>> - SC27XX_ADC_CHANNEL(11),
>> - SC27XX_ADC_CHANNEL(12),
>> - SC27XX_ADC_CHANNEL(13),
>> - SC27XX_ADC_CHANNEL(14),
>> - SC27XX_ADC_CHANNEL(15),
>> - SC27XX_ADC_CHANNEL(16),
>> - SC27XX_ADC_CHANNEL(17),
>> - SC27XX_ADC_CHANNEL(18),
>> - SC27XX_ADC_CHANNEL(19),
>> - SC27XX_ADC_CHANNEL(20),
>> - SC27XX_ADC_CHANNEL(21),
>> - SC27XX_ADC_CHANNEL(22),
>> - SC27XX_ADC_CHANNEL(23),
>> - SC27XX_ADC_CHANNEL(24),
>> - SC27XX_ADC_CHANNEL(25),
>> - SC27XX_ADC_CHANNEL(26),
>> - SC27XX_ADC_CHANNEL(27),
>> - SC27XX_ADC_CHANNEL(28),
>> - SC27XX_ADC_CHANNEL(29),
>> - SC27XX_ADC_CHANNEL(30),
>> - SC27XX_ADC_CHANNEL(31),
>> + SC27XX_ADC_CHANNEL(0, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(1, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(2, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(3, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(4, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(5, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(6, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(7, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(8, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(9, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(10, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(11, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(12, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(13, BIT(IIO_CHAN_INFO_PROCESSED)),
>> + SC27XX_ADC_CHANNEL(14, BIT(IIO_CHAN_INFO_PROCESSED)),
>> 

Re: [PATCH] rpmsg: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Bjorn Andersson
On Mon 27 Aug 18:52 PDT 2018, Rob Herring wrote:

> In preparation to remove the node name pointer from struct device_node,
> convert printf users to use the %pOFn format specifier.
> 
> Cc: Ohad Ben-Cohen 
> Cc: Bjorn Andersson 
> Cc: linux-remotep...@vger.kernel.org
> Signed-off-by: Rob Herring 

Applied

Thanks,
Bjorn

> ---
>  drivers/rpmsg/qcom_glink_smem.c | 2 +-
>  drivers/rpmsg/qcom_smd.c| 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/rpmsg/qcom_glink_smem.c b/drivers/rpmsg/qcom_glink_smem.c
> index 2b5cf2790954..ab23da3d7131 100644
> --- a/drivers/rpmsg/qcom_glink_smem.c
> +++ b/drivers/rpmsg/qcom_glink_smem.c
> @@ -205,7 +205,7 @@ struct qcom_glink *qcom_glink_smem_register(struct device 
> *parent,
>   dev->parent = parent;
>   dev->of_node = node;
>   dev->release = qcom_glink_smem_release;
> - dev_set_name(dev, "%s:%s", node->parent->name, node->name);
> + dev_set_name(dev, "%pOFn:%pOFn", node->parent, node);
>   ret = device_register(dev);
>   if (ret) {
>   pr_err("failed to register glink edge\n");
> diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c
> index 8da83a4ebadc..0dae7c9f4a8f 100644
> --- a/drivers/rpmsg/qcom_smd.c
> +++ b/drivers/rpmsg/qcom_smd.c
> @@ -1454,7 +1454,7 @@ struct qcom_smd_edge *qcom_smd_register_edge(struct 
> device *parent,
>   edge->dev.release = qcom_smd_edge_release;
>   edge->dev.of_node = node;
>   edge->dev.groups = qcom_smd_edge_groups;
> - dev_set_name(>dev, "%s:%s", dev_name(parent), node->name);
> + dev_set_name(>dev, "%s:%pOFn", dev_name(parent), node);
>   ret = device_register(>dev);
>   if (ret) {
>   pr_err("failed to register smd edge\n");
> -- 
> 2.17.1
> 


Re: [PATCH] rpmsg: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Bjorn Andersson
On Mon 27 Aug 18:52 PDT 2018, Rob Herring wrote:

> In preparation to remove the node name pointer from struct device_node,
> convert printf users to use the %pOFn format specifier.
> 
> Cc: Ohad Ben-Cohen 
> Cc: Bjorn Andersson 
> Cc: linux-remotep...@vger.kernel.org
> Signed-off-by: Rob Herring 

Applied

Thanks,
Bjorn

> ---
>  drivers/rpmsg/qcom_glink_smem.c | 2 +-
>  drivers/rpmsg/qcom_smd.c| 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/rpmsg/qcom_glink_smem.c b/drivers/rpmsg/qcom_glink_smem.c
> index 2b5cf2790954..ab23da3d7131 100644
> --- a/drivers/rpmsg/qcom_glink_smem.c
> +++ b/drivers/rpmsg/qcom_glink_smem.c
> @@ -205,7 +205,7 @@ struct qcom_glink *qcom_glink_smem_register(struct device 
> *parent,
>   dev->parent = parent;
>   dev->of_node = node;
>   dev->release = qcom_glink_smem_release;
> - dev_set_name(dev, "%s:%s", node->parent->name, node->name);
> + dev_set_name(dev, "%pOFn:%pOFn", node->parent, node);
>   ret = device_register(dev);
>   if (ret) {
>   pr_err("failed to register glink edge\n");
> diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c
> index 8da83a4ebadc..0dae7c9f4a8f 100644
> --- a/drivers/rpmsg/qcom_smd.c
> +++ b/drivers/rpmsg/qcom_smd.c
> @@ -1454,7 +1454,7 @@ struct qcom_smd_edge *qcom_smd_register_edge(struct 
> device *parent,
>   edge->dev.release = qcom_smd_edge_release;
>   edge->dev.of_node = node;
>   edge->dev.groups = qcom_smd_edge_groups;
> - dev_set_name(>dev, "%s:%s", dev_name(parent), node->name);
> + dev_set_name(>dev, "%s:%pOFn", dev_name(parent), node);
>   ret = device_register(>dev);
>   if (ret) {
>   pr_err("failed to register smd edge\n");
> -- 
> 2.17.1
> 


Re: [PATCH v2 2/6] reset: qcom: PDC Global (Power Domain Controller) reset controller

2018-08-27 Thread Bjorn Andersson
On Mon 27 Aug 17:22 PDT 2018, Matthias Kaehlcke wrote:
> On Fri, Aug 24, 2018 at 06:48:56PM +0530, Sibi Sankar wrote:
> > diff --git a/drivers/reset/reset-qcom-pdc.c b/drivers/reset/reset-qcom-pdc.c
[..]
> > +struct qcom_pdc_desc {
> > +   const struct regmap_config *config;
> > +   const struct qcom_pdc_reset_map *resets;
> > +   size_t num_resets;
> > +};
> 
> Not sure if this structure adds much value or just a layer of
> indirection:
> 
> - .config is only accessed in _probe(), sdm845_pdc_regmap_config could
>   be used directly
> - .resets is used in _(de)assert(), sdm845_pdc_resets could be used
>   directly
> - .num_resets is only accessed in _probe(),
>   ARRAY_SIZE(sdm845_pdc_resets) could be used instead
> 
> It probably makes sense if it is planned to support reset controllers
> of other SoCs with this driver.
> 

I like this suggestion, once we need the configurability we can add the
type for it. It also shows that only .resets would need to be referenced
by qcom_pdc_reset_data.

> > +struct qcom_pdc_reset_data {
> > +   struct reset_controller_dev rcdev;
> > +   struct regmap *regmap;
> > +   const struct qcom_pdc_desc *desc;
> > +};
[..]
> > +static int qcom_pdc_reset_probe(struct platform_device *pdev)
> > +{
[..]
> > +   data->regmap = devm_regmap_init_mmio(dev, base, desc->config);
> > +   if (IS_ERR(data->regmap)) {
> > +   dev_err(dev, "Unable to get pdc-global regmap");
> 
> Add missing '\n'
> 
> Say 'pdc-reset' instead of 'pdc-global'? (see also my other comment
> below).
> 

This regmap is created out of the single anonymous "reg", so I think the
error should be reduced to "Unable to initialize regmap\n".

[..]
> > +static const struct of_device_id qcom_pdc_reset_of_match[] = {
> > +   { .compatible = "qcom,sdm845-pdc-global", .data = _pdc_desc },
> 
> Should this be 'qcom,sdm845-pdc-reset' which is more specific than
> 'global' and in line with the name and purpose of the driver?
> Obviously this would require to adjust the bindings doc too.
> 

No, the binding describes the hardware block named "PDC Global",
currently implemented as a reset controller. The reason for doing this
is so that we one day can expose additional interfaces in a backwards
compatible fashion.

Regards,
Bjorn


Re: [PATCH v2 2/6] reset: qcom: PDC Global (Power Domain Controller) reset controller

2018-08-27 Thread Bjorn Andersson
On Mon 27 Aug 17:22 PDT 2018, Matthias Kaehlcke wrote:
> On Fri, Aug 24, 2018 at 06:48:56PM +0530, Sibi Sankar wrote:
> > diff --git a/drivers/reset/reset-qcom-pdc.c b/drivers/reset/reset-qcom-pdc.c
[..]
> > +struct qcom_pdc_desc {
> > +   const struct regmap_config *config;
> > +   const struct qcom_pdc_reset_map *resets;
> > +   size_t num_resets;
> > +};
> 
> Not sure if this structure adds much value or just a layer of
> indirection:
> 
> - .config is only accessed in _probe(), sdm845_pdc_regmap_config could
>   be used directly
> - .resets is used in _(de)assert(), sdm845_pdc_resets could be used
>   directly
> - .num_resets is only accessed in _probe(),
>   ARRAY_SIZE(sdm845_pdc_resets) could be used instead
> 
> It probably makes sense if it is planned to support reset controllers
> of other SoCs with this driver.
> 

I like this suggestion, once we need the configurability we can add the
type for it. It also shows that only .resets would need to be referenced
by qcom_pdc_reset_data.

> > +struct qcom_pdc_reset_data {
> > +   struct reset_controller_dev rcdev;
> > +   struct regmap *regmap;
> > +   const struct qcom_pdc_desc *desc;
> > +};
[..]
> > +static int qcom_pdc_reset_probe(struct platform_device *pdev)
> > +{
[..]
> > +   data->regmap = devm_regmap_init_mmio(dev, base, desc->config);
> > +   if (IS_ERR(data->regmap)) {
> > +   dev_err(dev, "Unable to get pdc-global regmap");
> 
> Add missing '\n'
> 
> Say 'pdc-reset' instead of 'pdc-global'? (see also my other comment
> below).
> 

This regmap is created out of the single anonymous "reg", so I think the
error should be reduced to "Unable to initialize regmap\n".

[..]
> > +static const struct of_device_id qcom_pdc_reset_of_match[] = {
> > +   { .compatible = "qcom,sdm845-pdc-global", .data = _pdc_desc },
> 
> Should this be 'qcom,sdm845-pdc-reset' which is more specific than
> 'global' and in line with the name and purpose of the driver?
> Obviously this would require to adjust the bindings doc too.
> 

No, the binding describes the hardware block named "PDC Global",
currently implemented as a reset controller. The reason for doing this
is so that we one day can expose additional interfaces in a backwards
compatible fashion.

Regards,
Bjorn


Re: [PATCH v2 4/4] userfaultfd: selftest: Cope if shmem doesn't support zeropage

2018-08-27 Thread Thiago Jung Bauermann


Hello Mike,

Mike Rapoport  writes:

> Hi,
>
> On Fri, Aug 03, 2018 at 07:00:46PM -0300, Thiago Jung Bauermann wrote:
>> If userfaultfd runs on a system that doesn't support UFFDIO_ZEROPAGE for
>> shared memory, it currently ends with error code 1 which indicates test
>> failure:
>>
>>   # ./userfaultfd shmem 10 10
>>   nr_pages: 160, nr_pages_per_cpu: 80
>>   bounces: 9, mode: rnd poll, unexpected missing ioctl for anon memory
>>   # echo $?
>>   1
>>
>> Change userfaultfd_zeropage_test() to return KSFT_SKIP to indicate that
>> the test is being skipped.
>
> I took a deeper look at what userfaultfd_zeropage_test() does and,
> apparently, I've mislead you. The test checks if the range has
> UFFDIO_ZEROPAGE and verifies that it works if yes; otherwise the test
> verifies that EINVAL is returned.
>
> Can you please check if the patch below works in your environment?
>
> From 7a34c84c0461b5073742275638c44b6535d19166 Mon Sep 17 00:00:00 2001
> From: Mike Rapoport 
> Date: Tue, 7 Aug 2018 09:44:19 +0300
> Subject: [PATCH] userfaultfd: selftest: make supported range ioctl
>  verification more robust
>
> When userfaultfd tests runs on older kernel that does not support
> UFFDIO_ZEROPAGE for shared memory it fails at the ioctl verification.
>
> Split out the verification that supported ioctls are superset of the
> expected ioctls and relax the checks for UFFDIO_ZEROPAGE for shared memory
> areas.
>
> Signed-off-by: Mike Rapoport 
> ---
>  tools/testing/selftests/vm/userfaultfd.c | 63 
> +---
>  1 file changed, 34 insertions(+), 29 deletions(-)

I'm sorry to take this long to respond, I was only able to get back to
this today.

Your patch does solve my problem. Thank you very much!

It has a trivial conflict in the second hunk with patch 3 in my series.
Should I repost the series with your patch in place of patch 4?

--
Thiago Jung Bauermann
IBM Linux Technology Center



Re: [PATCH v2 4/4] userfaultfd: selftest: Cope if shmem doesn't support zeropage

2018-08-27 Thread Thiago Jung Bauermann


Hello Mike,

Mike Rapoport  writes:

> Hi,
>
> On Fri, Aug 03, 2018 at 07:00:46PM -0300, Thiago Jung Bauermann wrote:
>> If userfaultfd runs on a system that doesn't support UFFDIO_ZEROPAGE for
>> shared memory, it currently ends with error code 1 which indicates test
>> failure:
>>
>>   # ./userfaultfd shmem 10 10
>>   nr_pages: 160, nr_pages_per_cpu: 80
>>   bounces: 9, mode: rnd poll, unexpected missing ioctl for anon memory
>>   # echo $?
>>   1
>>
>> Change userfaultfd_zeropage_test() to return KSFT_SKIP to indicate that
>> the test is being skipped.
>
> I took a deeper look at what userfaultfd_zeropage_test() does and,
> apparently, I've mislead you. The test checks if the range has
> UFFDIO_ZEROPAGE and verifies that it works if yes; otherwise the test
> verifies that EINVAL is returned.
>
> Can you please check if the patch below works in your environment?
>
> From 7a34c84c0461b5073742275638c44b6535d19166 Mon Sep 17 00:00:00 2001
> From: Mike Rapoport 
> Date: Tue, 7 Aug 2018 09:44:19 +0300
> Subject: [PATCH] userfaultfd: selftest: make supported range ioctl
>  verification more robust
>
> When userfaultfd tests runs on older kernel that does not support
> UFFDIO_ZEROPAGE for shared memory it fails at the ioctl verification.
>
> Split out the verification that supported ioctls are superset of the
> expected ioctls and relax the checks for UFFDIO_ZEROPAGE for shared memory
> areas.
>
> Signed-off-by: Mike Rapoport 
> ---
>  tools/testing/selftests/vm/userfaultfd.c | 63 
> +---
>  1 file changed, 34 insertions(+), 29 deletions(-)

I'm sorry to take this long to respond, I was only able to get back to
this today.

Your patch does solve my problem. Thank you very much!

It has a trivial conflict in the second hunk with patch 3 in my series.
Should I repost the series with your patch in place of patch 4?

--
Thiago Jung Bauermann
IBM Linux Technology Center



Re: linux-next: new maintainer/tree for the libata tree?

2018-08-27 Thread Stephen Rothwell
Hi Jens,

On Mon, 27 Aug 2018 19:30:09 -0600 Jens Axboe  wrote:
>
> On 8/27/18 7:28 PM, Stephen Rothwell wrote:
> > 
> > On Mon, 27 Aug 2018 19:15:23 -0600 Jens Axboe  wrote:  
> >>
> >> On 8/27/18 3:20 PM, Stephen Rothwell wrote:  
> >>>
> >>> I noticed the maintaership change - so what shuld I sues for linux-next,
> >>> now?
> >>>
> >>> I currently have
> >>>
> >>> git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git#for-next
> >>
> >> I'll merge into my for-next branch on the block tree, I'm don't plan on
> >> doing separate trees for this, just separate branches. And everything I
> >> queue up for the next version will end up in my for-next branch.  
> > 
> > So I'll just drop the libata tree from linux-next, then?  
> 
> Yeah, that should be all that's needed.

Done.

-- 
Cheers,
Stephen Rothwell


pgpy4ULh5zJky.pgp
Description: OpenPGP digital signature


Re: linux-next: new maintainer/tree for the libata tree?

2018-08-27 Thread Stephen Rothwell
Hi Jens,

On Mon, 27 Aug 2018 19:30:09 -0600 Jens Axboe  wrote:
>
> On 8/27/18 7:28 PM, Stephen Rothwell wrote:
> > 
> > On Mon, 27 Aug 2018 19:15:23 -0600 Jens Axboe  wrote:  
> >>
> >> On 8/27/18 3:20 PM, Stephen Rothwell wrote:  
> >>>
> >>> I noticed the maintaership change - so what shuld I sues for linux-next,
> >>> now?
> >>>
> >>> I currently have
> >>>
> >>> git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git#for-next
> >>
> >> I'll merge into my for-next branch on the block tree, I'm don't plan on
> >> doing separate trees for this, just separate branches. And everything I
> >> queue up for the next version will end up in my for-next branch.  
> > 
> > So I'll just drop the libata tree from linux-next, then?  
> 
> Yeah, that should be all that's needed.

Done.

-- 
Cheers,
Stephen Rothwell


pgpy4ULh5zJky.pgp
Description: OpenPGP digital signature


Re: [ANNOUNCE] 4.14.63-rt40

2018-08-27 Thread Steven Rostedt
On Fri, 24 Aug 2018 12:17:51 -0400
Steven Rostedt  wrote:

> On Fri, 24 Aug 2018 18:14:43 +0200
> Bernhard Landauer  wrote:
> 
> > Hello everyone,
> > 
> > for some reason I am not able to build 4.14.63-rt40 for Manjarolinux.
> > Even after removing all our custom patches build fails at
> > 
> >   LD [M]  drivers/gpu/drm/drm.o
> >   AR  drivers/gpu/built-in.o
> > make: *** [Makefile:1035: drivers] Error 2
> > 
> > My config can be found here for information:
> > https://gitlab.manjaro.org/packages/community/realtime-kernels/linux414-rt/raw/master/config.rt
> > 
> > Thank you for any advice!
> >  
> 
> Thanks for the report, I'll take a look.
> 

This appears to fix it:

-- Steve

diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index cedf225d4182..7df4cced6ac0 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -35,6 +35,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 


Re: [ANNOUNCE] 4.14.63-rt40

2018-08-27 Thread Steven Rostedt
On Fri, 24 Aug 2018 12:17:51 -0400
Steven Rostedt  wrote:

> On Fri, 24 Aug 2018 18:14:43 +0200
> Bernhard Landauer  wrote:
> 
> > Hello everyone,
> > 
> > for some reason I am not able to build 4.14.63-rt40 for Manjarolinux.
> > Even after removing all our custom patches build fails at
> > 
> >   LD [M]  drivers/gpu/drm/drm.o
> >   AR  drivers/gpu/built-in.o
> > make: *** [Makefile:1035: drivers] Error 2
> > 
> > My config can be found here for information:
> > https://gitlab.manjaro.org/packages/community/realtime-kernels/linux414-rt/raw/master/config.rt
> > 
> > Thank you for any advice!
> >  
> 
> Thanks for the report, I'll take a look.
> 

This appears to fix it:

-- Steve

diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index cedf225d4182..7df4cced6ac0 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -35,6 +35,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 


Re: [RESEND PATCH v2 0/2] Add support for ZSTD-compressed kernel

2018-08-27 Thread Nick Terrell
On Aug 17, 2018, at 1:07 PM, Adam Borowski  wrote:
> On Fri, Aug 17, 2018 at 12:22:44PM -0700, Andi Kleen wrote:
>> On Fri, Aug 17, 2018 at 07:57:46PM +0200, Adam Borowski wrote:
 The "favourite compressor" seems to roughly change every year, so if
 we keep adding new ones things will get more and more convoluted.
>>> 
>>> The above patchset drops just bzip2.  It is the only one that's strictly
>>> beaten in every way (ratio, time, memory usage), there are also no other
>> 
>> Does time include build time? I've been reverting back to gzip recently
>> because I care very much about that.
> 
> Too lazy to benchmark a kernel image (IIRC Nick Terrell posted that a while
> ago), here's copypasta of a random 16824672 byte executable, in userspace,
> with default level setting:
> 
>   compdecomp  size
> xz8.038s  0.356s  4320292
> bz2   2.265s  0.730s  5234516
> zst   0.274s  0.102s  5657626
> gz0.880s  0.152s  6515505
> Z 0.499s  0.133s  8932459
> lzo   0.100s  0.095s  9198874
> 
> As you can see, zstd's compression time is drastically better than gzip,
> while ratio is better.  The default level is very low (-3 on -1..-22 scale)
> but you can crank it up for stronger compression.
> 
> The defaults fit your use case.
> 
>>> uses of bzip2 anywhere in the kernel so we'd get to drop its code
>>> completely: 900 lines of Linus' happiness.
>> 
>> Great!
>> 
>>> Other candidates are lzo and bare lzma (you want lz4, zstd or xz instead),
>>> but those are used elsewhere thus there's hardly any gain.  If you want them
>>> gone, please say so -- I'll include their droppage.
>> 
>> Yes would be good to remove the kernel image support for those too
>> just to simplify the config process, even if it doesn't save much code.
> 
> There's one caveat: fast choices are quite new:
> * lz4 userspace tools are not even in current Debian stable (just unstable)
> * uncompressed kernel got in only this merge window
> * zstd has userspace tools in Debian stable but is not merged into the
>  kernel yet
> (other dists are probably similar)
> 
> Thus, it might be a good idea to keep lzo for a while longer.
> 
> Bare lzma can probably go -- xz filters are nice for binaries of archs it
> knows (disabled otherwise), and lack of header requires hacks to find out
> the payload's size.

Personally, I'd be very happy to see LZMA go. It is a custom implementation
that doesn't use the lib/xz/ library. When I was implementing decompress_zstd.c
I fuzzed all of the kernel decompressors, and unlzma() will crash on invalid 
input.
There is no reason, other than not breaking compatibility, to use LZMA over XZ.

> So it's up to you guys: do you want me to drop lzo and/or lzma?
> We can also drop them just for vmlinuz but not initrd.
> 
> 
> Meow!
> -- 
> ⢀⣴⠾⠻⢶⣦⠀ What Would Jesus Do, MUD/MMORPG edition:
> ⣾⠁⢰⠒⠀⣿⡁ • multiplay with an admin char to benefit your mortal [Mt3:16-17]
> ⢿⡄⠘⠷⠚⠋⠀ • abuse item cloning bugs [Mt14:17-20, Mt15:34-37]
> ⠈⠳⣄ • use glitches to walk on water [Mt14:25-26]



Re: [RESEND PATCH v2 0/2] Add support for ZSTD-compressed kernel

2018-08-27 Thread Nick Terrell
On Aug 17, 2018, at 1:07 PM, Adam Borowski  wrote:
> On Fri, Aug 17, 2018 at 12:22:44PM -0700, Andi Kleen wrote:
>> On Fri, Aug 17, 2018 at 07:57:46PM +0200, Adam Borowski wrote:
 The "favourite compressor" seems to roughly change every year, so if
 we keep adding new ones things will get more and more convoluted.
>>> 
>>> The above patchset drops just bzip2.  It is the only one that's strictly
>>> beaten in every way (ratio, time, memory usage), there are also no other
>> 
>> Does time include build time? I've been reverting back to gzip recently
>> because I care very much about that.
> 
> Too lazy to benchmark a kernel image (IIRC Nick Terrell posted that a while
> ago), here's copypasta of a random 16824672 byte executable, in userspace,
> with default level setting:
> 
>   compdecomp  size
> xz8.038s  0.356s  4320292
> bz2   2.265s  0.730s  5234516
> zst   0.274s  0.102s  5657626
> gz0.880s  0.152s  6515505
> Z 0.499s  0.133s  8932459
> lzo   0.100s  0.095s  9198874
> 
> As you can see, zstd's compression time is drastically better than gzip,
> while ratio is better.  The default level is very low (-3 on -1..-22 scale)
> but you can crank it up for stronger compression.
> 
> The defaults fit your use case.
> 
>>> uses of bzip2 anywhere in the kernel so we'd get to drop its code
>>> completely: 900 lines of Linus' happiness.
>> 
>> Great!
>> 
>>> Other candidates are lzo and bare lzma (you want lz4, zstd or xz instead),
>>> but those are used elsewhere thus there's hardly any gain.  If you want them
>>> gone, please say so -- I'll include their droppage.
>> 
>> Yes would be good to remove the kernel image support for those too
>> just to simplify the config process, even if it doesn't save much code.
> 
> There's one caveat: fast choices are quite new:
> * lz4 userspace tools are not even in current Debian stable (just unstable)
> * uncompressed kernel got in only this merge window
> * zstd has userspace tools in Debian stable but is not merged into the
>  kernel yet
> (other dists are probably similar)
> 
> Thus, it might be a good idea to keep lzo for a while longer.
> 
> Bare lzma can probably go -- xz filters are nice for binaries of archs it
> knows (disabled otherwise), and lack of header requires hacks to find out
> the payload's size.

Personally, I'd be very happy to see LZMA go. It is a custom implementation
that doesn't use the lib/xz/ library. When I was implementing decompress_zstd.c
I fuzzed all of the kernel decompressors, and unlzma() will crash on invalid 
input.
There is no reason, other than not breaking compatibility, to use LZMA over XZ.

> So it's up to you guys: do you want me to drop lzo and/or lzma?
> We can also drop them just for vmlinuz but not initrd.
> 
> 
> Meow!
> -- 
> ⢀⣴⠾⠻⢶⣦⠀ What Would Jesus Do, MUD/MMORPG edition:
> ⣾⠁⢰⠒⠀⣿⡁ • multiplay with an admin char to benefit your mortal [Mt3:16-17]
> ⢿⡄⠘⠷⠚⠋⠀ • abuse item cloning bugs [Mt14:17-20, Mt15:34-37]
> ⠈⠳⣄ • use glitches to walk on water [Mt14:25-26]



RE: [PATCH 2/2] soc: imx: gpcv2: make pgc driver more generic for other i.MX platforms

2018-08-27 Thread Anson Huang
Hi, Andrey

Anson Huang
Best Regards!


> -Original Message-
> From: Andrey Smirnov 
> Sent: Tuesday, August 28, 2018 7:04 AM
> To: Anson Huang 
> Cc: Shawn Guo ; Sascha Hauer
> ; Sascha Hauer ; Fabio
> Estevam ; linux-arm-kernel
> ; linux-kernel
> ; dl-linux-imx 
> Subject: Re: [PATCH 2/2] soc: imx: gpcv2: make pgc driver more generic for
> other i.MX platforms
> 
> On Mon, Aug 27, 2018 at 3:51 PM Andrey Smirnov
>  wrote:
> >
> > On Sun, Aug 5, 2018 at 11:45 PM Anson Huang 
> wrote:
> > >
> > > i.MX8MQ and i.MX8MM share same gpc module with i.MX7D, they can
> > > reuse gpcv2 pgc driver for power domain control, this patch renames
> > > all functions and structure definitions started with "imx7" to
> > > "imx", and check machine type to pass platform specific power domain
> > > data for power domain driver, thus make
> > > gpcv2 pgc driver more generic for i.MX platforms.
> > >
> >
> > Just for the sake of
> 
> Oops, forgot to type out the question I had about i.MX8MQ GPC in general. I've
> noticed that vendor tree for i.MX8MQ has a separate driver for GPC that relies
> on code in ARM Trusted Firmware binary blob to do the actual switching. Do
> you by any chances know the relation between this code and the driver I
> describe? Are they mutually exclusive or complimentary (I assume the former)?
> Will the ATF-based driver be eventually deprecated?
 
Yes, our internal NXP tree currently put all GPC registers operation in ARM 
Trusted Firmware, and
Linux kernel has a gpc-psci.c which is a virtual GPC driver to call SMC and 
trap into ARM Trusted Firmware
whenever it wants to read/write GPC registers. But for upstream, we plan to 
reuse i.MX7D's
GPC driver for power domain control, since the GPC registers for power domain 
control are
independent with other low power mode's control registers, it is NOT necessary 
to introduce
another virtual GPC driver to call ARM Trusted Firmware for power domain 
control.

So yes, ATF-based gpc driver for power domain control will be deprecated when 
we upstream the ATF for
i.MX8MQ series SoCs. We prefer to reuse the i.MX7D's GPC driver in upstream 
Linux kernel. If you are OK
with this, I will send out a V2 patch set to address your comments, thanks.

Anson.

> 
> Thanks,
> Andrey Smirnov
> 
> >
> >
> > > Signed-off-by: Anson Huang 
> > > ---
> > >  drivers/soc/imx/gpcv2.c | 68
> > > +
> > >  1 file changed, 40 insertions(+), 28 deletions(-)
> > >
> > > diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c index
> > > 0e31465..0e33cb5 100644
> > > --- a/drivers/soc/imx/gpcv2.c
> > > +++ b/drivers/soc/imx/gpcv2.c
> > > @@ -53,7 +53,7 @@
> > >
> > >  #define GPC_PGC_CTRL_PCR   BIT(0)
> > >
> > > -struct imx7_pgc_domain {
> > > +struct imx_pgc_domain {
> > > struct generic_pm_domain genpd;
> > > struct regmap *regmap;
> > > struct regulator *regulator; @@ -69,11 +69,11 @@ struct
> > > imx7_pgc_domain {
> > > struct device *dev;
> > >  };
> > >
> > > -static int imx7_gpc_pu_pgc_sw_pxx_req(struct generic_pm_domain
> > > *genpd,
> > > +static int imx_gpc_pu_pgc_sw_pxx_req(struct generic_pm_domain
> > > +*genpd,
> > >   bool on)  {
> > > -   struct imx7_pgc_domain *domain = container_of(genpd,
> > > - struct
> imx7_pgc_domain,
> > > +   struct imx_pgc_domain *domain = container_of(genpd,
> > > + struct
> > > + imx_pgc_domain,
> > >   genpd);
> > > unsigned int offset = on ?
> > > GPC_PU_PGC_SW_PUP_REQ :
> GPC_PU_PGC_SW_PDN_REQ; @@
> > > -150,17 +150,17 @@ static int imx7_gpc_pu_pgc_sw_pxx_req(struct
> generic_pm_domain *genpd,
> > > return ret;
> > >  }
> > >
> > > -static int imx7_gpc_pu_pgc_sw_pup_req(struct generic_pm_domain
> > > *genpd)
> > > +static int imx_gpc_pu_pgc_sw_pup_req(struct generic_pm_domain
> > > +*genpd)
> > >  {
> > > -   return imx7_gpc_pu_pgc_sw_pxx_req(genpd, true);
> > > +   return imx_gpc_pu_pgc_sw_pxx_req(genpd, true);
> > >  }
> > >
> > > -static int imx7_gpc_pu_pgc_sw_pdn_req(struct generic_pm_domain
> > > *genpd)
> > > +static int imx_gpc_pu_pgc_sw_pdn_req(struct generic_pm_domain
> > > +*genpd)
> > >  {
> > > -   return imx7_gpc_pu_pgc_sw_pxx_req(genpd, false);
> > > +   return imx_gpc_pu_pgc_sw_pxx_req(genpd, false);
> > >  }
> > >
> > > -static const struct imx7_pgc_domain imx7_pgc_domains[] = {
> > > +static const struct imx_pgc_domain imx7_pgc_domains[] = {
> > > [IMX7_POWER_DOMAIN_MIPI_PHY] = {
> > > .genpd = {
> > > .name  = "mipi-phy",
> > > @@ -198,9 +198,9 @@ static const struct imx7_pgc_domain
> imx7_pgc_domains[] = {
> > > },
> > >  };
> > >
> > > -static int imx7_pgc_domain_probe(struct platform_device *pdev)
> > > +static int 

RE: [PATCH 2/2] soc: imx: gpcv2: make pgc driver more generic for other i.MX platforms

2018-08-27 Thread Anson Huang
Hi, Andrey

Anson Huang
Best Regards!


> -Original Message-
> From: Andrey Smirnov 
> Sent: Tuesday, August 28, 2018 7:04 AM
> To: Anson Huang 
> Cc: Shawn Guo ; Sascha Hauer
> ; Sascha Hauer ; Fabio
> Estevam ; linux-arm-kernel
> ; linux-kernel
> ; dl-linux-imx 
> Subject: Re: [PATCH 2/2] soc: imx: gpcv2: make pgc driver more generic for
> other i.MX platforms
> 
> On Mon, Aug 27, 2018 at 3:51 PM Andrey Smirnov
>  wrote:
> >
> > On Sun, Aug 5, 2018 at 11:45 PM Anson Huang 
> wrote:
> > >
> > > i.MX8MQ and i.MX8MM share same gpc module with i.MX7D, they can
> > > reuse gpcv2 pgc driver for power domain control, this patch renames
> > > all functions and structure definitions started with "imx7" to
> > > "imx", and check machine type to pass platform specific power domain
> > > data for power domain driver, thus make
> > > gpcv2 pgc driver more generic for i.MX platforms.
> > >
> >
> > Just for the sake of
> 
> Oops, forgot to type out the question I had about i.MX8MQ GPC in general. I've
> noticed that vendor tree for i.MX8MQ has a separate driver for GPC that relies
> on code in ARM Trusted Firmware binary blob to do the actual switching. Do
> you by any chances know the relation between this code and the driver I
> describe? Are they mutually exclusive or complimentary (I assume the former)?
> Will the ATF-based driver be eventually deprecated?
 
Yes, our internal NXP tree currently put all GPC registers operation in ARM 
Trusted Firmware, and
Linux kernel has a gpc-psci.c which is a virtual GPC driver to call SMC and 
trap into ARM Trusted Firmware
whenever it wants to read/write GPC registers. But for upstream, we plan to 
reuse i.MX7D's
GPC driver for power domain control, since the GPC registers for power domain 
control are
independent with other low power mode's control registers, it is NOT necessary 
to introduce
another virtual GPC driver to call ARM Trusted Firmware for power domain 
control.

So yes, ATF-based gpc driver for power domain control will be deprecated when 
we upstream the ATF for
i.MX8MQ series SoCs. We prefer to reuse the i.MX7D's GPC driver in upstream 
Linux kernel. If you are OK
with this, I will send out a V2 patch set to address your comments, thanks.

Anson.

> 
> Thanks,
> Andrey Smirnov
> 
> >
> >
> > > Signed-off-by: Anson Huang 
> > > ---
> > >  drivers/soc/imx/gpcv2.c | 68
> > > +
> > >  1 file changed, 40 insertions(+), 28 deletions(-)
> > >
> > > diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c index
> > > 0e31465..0e33cb5 100644
> > > --- a/drivers/soc/imx/gpcv2.c
> > > +++ b/drivers/soc/imx/gpcv2.c
> > > @@ -53,7 +53,7 @@
> > >
> > >  #define GPC_PGC_CTRL_PCR   BIT(0)
> > >
> > > -struct imx7_pgc_domain {
> > > +struct imx_pgc_domain {
> > > struct generic_pm_domain genpd;
> > > struct regmap *regmap;
> > > struct regulator *regulator; @@ -69,11 +69,11 @@ struct
> > > imx7_pgc_domain {
> > > struct device *dev;
> > >  };
> > >
> > > -static int imx7_gpc_pu_pgc_sw_pxx_req(struct generic_pm_domain
> > > *genpd,
> > > +static int imx_gpc_pu_pgc_sw_pxx_req(struct generic_pm_domain
> > > +*genpd,
> > >   bool on)  {
> > > -   struct imx7_pgc_domain *domain = container_of(genpd,
> > > - struct
> imx7_pgc_domain,
> > > +   struct imx_pgc_domain *domain = container_of(genpd,
> > > + struct
> > > + imx_pgc_domain,
> > >   genpd);
> > > unsigned int offset = on ?
> > > GPC_PU_PGC_SW_PUP_REQ :
> GPC_PU_PGC_SW_PDN_REQ; @@
> > > -150,17 +150,17 @@ static int imx7_gpc_pu_pgc_sw_pxx_req(struct
> generic_pm_domain *genpd,
> > > return ret;
> > >  }
> > >
> > > -static int imx7_gpc_pu_pgc_sw_pup_req(struct generic_pm_domain
> > > *genpd)
> > > +static int imx_gpc_pu_pgc_sw_pup_req(struct generic_pm_domain
> > > +*genpd)
> > >  {
> > > -   return imx7_gpc_pu_pgc_sw_pxx_req(genpd, true);
> > > +   return imx_gpc_pu_pgc_sw_pxx_req(genpd, true);
> > >  }
> > >
> > > -static int imx7_gpc_pu_pgc_sw_pdn_req(struct generic_pm_domain
> > > *genpd)
> > > +static int imx_gpc_pu_pgc_sw_pdn_req(struct generic_pm_domain
> > > +*genpd)
> > >  {
> > > -   return imx7_gpc_pu_pgc_sw_pxx_req(genpd, false);
> > > +   return imx_gpc_pu_pgc_sw_pxx_req(genpd, false);
> > >  }
> > >
> > > -static const struct imx7_pgc_domain imx7_pgc_domains[] = {
> > > +static const struct imx_pgc_domain imx7_pgc_domains[] = {
> > > [IMX7_POWER_DOMAIN_MIPI_PHY] = {
> > > .genpd = {
> > > .name  = "mipi-phy",
> > > @@ -198,9 +198,9 @@ static const struct imx7_pgc_domain
> imx7_pgc_domains[] = {
> > > },
> > >  };
> > >
> > > -static int imx7_pgc_domain_probe(struct platform_device *pdev)
> > > +static int 

Re: Fix 80d20d35af1e ("nohz: Fix local_timer_softirq_pending()") may have revealed another problem

2018-08-27 Thread Frederic Weisbecker
On Fri, Aug 24, 2018 at 07:06:32PM +0200, Heiner Kallweit wrote:
> On 24.08.2018 16:30, Frederic Weisbecker wrote:
> >> Can you try the one I posted in this thread:
> >>
> >>  
> >> https://lkml.kernel.org/r/alpine.deb.2.21.1808240851420.1...@nanos.tec.linutronix.de
> >>
> >> Also below for reference.
> >>
> >> Thanks,
> >>
> >>tglx
> >>
> >> 8<
> >> diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
> >> index 5b33e2f5c0ed..6aab9d54a331 100644
> >> --- a/kernel/time/tick-sched.c
> >> +++ b/kernel/time/tick-sched.c
> >> @@ -888,7 +888,7 @@ static bool can_stop_idle_tick(int cpu, struct 
> >> tick_sched *ts)
> >>if (unlikely(local_softirq_pending() && cpu_online(cpu))) {
> >>static int ratelimit;
> >>  
> >> -  if (ratelimit < 10 &&
> >> +  if (ratelimit < 10 && !in_softirq() &&
> >>(local_softirq_pending() & SOFTIRQ_STOP_IDLE_MASK)) {
> >>pr_warn("NOHZ: local_softirq_pending %02x\n",
> >>(unsigned int) local_softirq_pending());
> > 
> > I fear it may not work in his case because it happens in -next and we don't 
> > stop
> > the idle tick from IRQ tail anymore. So we shouldn't be interrupting a 
> > softirq
> > in this path. Still it's worth trying, I may well be missing something.
> > 
> > Thanks.
> > 
> I tested it and Frederic is right, it doesn't help. Can it be somehow related 
> to
> the cpu being brought down during suspend? Because I get the warning only 
> during
> suspend when the cpu is inactive already (but still online).

It's hard to tell, I haven't been able to reproduce on suspend to disk/mem.

Does this script eventually trigger it after some time?

#!/bin/bash

do_hotplug()
{
for i in $(seq 1 $2)
do
echo $1 > /sys/devices/system/cpu/cpu$i/online
done
}

LAST_CPU=$(($(nproc)-1))

while true
do
do_hotplug 0 $LAST_CPU
do_hotplug 1 $LAST_CPU
done


Re: Fix 80d20d35af1e ("nohz: Fix local_timer_softirq_pending()") may have revealed another problem

2018-08-27 Thread Frederic Weisbecker
On Fri, Aug 24, 2018 at 07:06:32PM +0200, Heiner Kallweit wrote:
> On 24.08.2018 16:30, Frederic Weisbecker wrote:
> >> Can you try the one I posted in this thread:
> >>
> >>  
> >> https://lkml.kernel.org/r/alpine.deb.2.21.1808240851420.1...@nanos.tec.linutronix.de
> >>
> >> Also below for reference.
> >>
> >> Thanks,
> >>
> >>tglx
> >>
> >> 8<
> >> diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
> >> index 5b33e2f5c0ed..6aab9d54a331 100644
> >> --- a/kernel/time/tick-sched.c
> >> +++ b/kernel/time/tick-sched.c
> >> @@ -888,7 +888,7 @@ static bool can_stop_idle_tick(int cpu, struct 
> >> tick_sched *ts)
> >>if (unlikely(local_softirq_pending() && cpu_online(cpu))) {
> >>static int ratelimit;
> >>  
> >> -  if (ratelimit < 10 &&
> >> +  if (ratelimit < 10 && !in_softirq() &&
> >>(local_softirq_pending() & SOFTIRQ_STOP_IDLE_MASK)) {
> >>pr_warn("NOHZ: local_softirq_pending %02x\n",
> >>(unsigned int) local_softirq_pending());
> > 
> > I fear it may not work in his case because it happens in -next and we don't 
> > stop
> > the idle tick from IRQ tail anymore. So we shouldn't be interrupting a 
> > softirq
> > in this path. Still it's worth trying, I may well be missing something.
> > 
> > Thanks.
> > 
> I tested it and Frederic is right, it doesn't help. Can it be somehow related 
> to
> the cpu being brought down during suspend? Because I get the warning only 
> during
> suspend when the cpu is inactive already (but still online).

It's hard to tell, I haven't been able to reproduce on suspend to disk/mem.

Does this script eventually trigger it after some time?

#!/bin/bash

do_hotplug()
{
for i in $(seq 1 $2)
do
echo $1 > /sys/devices/system/cpu/cpu$i/online
done
}

LAST_CPU=$(($(nproc)-1))

while true
do
do_hotplug 0 $LAST_CPU
do_hotplug 1 $LAST_CPU
done


Re: [PATCH] x86/nmi: Fix some races in NMI uaccess

2018-08-27 Thread Andy Lutomirski
On Mon, Aug 27, 2018 at 6:31 PM, Rik van Riel  wrote:
> On Mon, 2018-08-27 at 16:04 -0700, Andy Lutomirski wrote:
>
>> +++ b/arch/x86/mm/tlb.c
>> @@ -345,6 +345,9 @@ void switch_mm_irqs_off(struct mm_struct *prev,
>> struct mm_struct *next,
>>*/
>>   trace_tlb_flush_rcuidle(TLB_FLUSH_ON_TASK_SWITCH,
>> TLB_FLUSH_ALL);
>>   } else {
>> + /* Let NMI code know that CR3 may not match
>> expectations. */
>
> I don't get it. This is in the "ASID is up to date, do not
> need a TLB flush" path.
>
> In what case do we have a TLB that is fully up to date, but
> a CR3 that does not match expectations?
>
> Doesn't the CR3 check in nmi_uaccess_ok already catch the
> window of time where the CR3 has already been switched over
> to that of the next task?
>
> What is special about this path wrt nmi_uaccess_ok that is
> not also true for the need_flush branch right above it?
>
> What am I missing?

Nothing.  My patch is buggy.  ETOLITTLESLEEP.

I could drop this part of the patch entirely.  Or I could drop the
loaded_mm->pgd == __va(read_cr3_pa() check and instead make sure that
loaded_mm is NULL at any point at which loaded_mm might not match CR3.
The latter will be faster in any (hypothetical) virtualization
environment where CR3 reads trap.  I don't know if we have any such
cases where perf works and we care about performance, though.

--Andy


Re: [PATCH] x86/nmi: Fix some races in NMI uaccess

2018-08-27 Thread Andy Lutomirski
On Mon, Aug 27, 2018 at 6:31 PM, Rik van Riel  wrote:
> On Mon, 2018-08-27 at 16:04 -0700, Andy Lutomirski wrote:
>
>> +++ b/arch/x86/mm/tlb.c
>> @@ -345,6 +345,9 @@ void switch_mm_irqs_off(struct mm_struct *prev,
>> struct mm_struct *next,
>>*/
>>   trace_tlb_flush_rcuidle(TLB_FLUSH_ON_TASK_SWITCH,
>> TLB_FLUSH_ALL);
>>   } else {
>> + /* Let NMI code know that CR3 may not match
>> expectations. */
>
> I don't get it. This is in the "ASID is up to date, do not
> need a TLB flush" path.
>
> In what case do we have a TLB that is fully up to date, but
> a CR3 that does not match expectations?
>
> Doesn't the CR3 check in nmi_uaccess_ok already catch the
> window of time where the CR3 has already been switched over
> to that of the next task?
>
> What is special about this path wrt nmi_uaccess_ok that is
> not also true for the need_flush branch right above it?
>
> What am I missing?

Nothing.  My patch is buggy.  ETOLITTLESLEEP.

I could drop this part of the patch entirely.  Or I could drop the
loaded_mm->pgd == __va(read_cr3_pa() check and instead make sure that
loaded_mm is NULL at any point at which loaded_mm might not match CR3.
The latter will be faster in any (hypothetical) virtualization
environment where CR3 reads trap.  I don't know if we have any such
cases where perf works and we care about performance, though.

--Andy


Re: [PATCH] devfreq: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Chanwoo Choi
Dear Rob,

On 2018년 08월 28일 10:52, Rob Herring wrote:
> In preparation to remove the node name pointer from struct device_node,
> convert printf users to use the %pOFn format specifier.
> 
> Cc: Chanwoo Choi 
> Cc: MyungJoo Ham 
> Cc: Kyungmin Park 
> Cc: Kukjin Kim 
> Cc: Krzysztof Kozlowski 
> Cc: linux...@vger.kernel.org
> Cc: linux-arm-ker...@lists.infradead.org
> Cc: linux-samsung-...@vger.kernel.org
> Signed-off-by: Rob Herring 
> ---
>  drivers/devfreq/event/exynos-ppmu.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/devfreq/event/exynos-ppmu.c 
> b/drivers/devfreq/event/exynos-ppmu.c
> index a9c64f0d3284..c61de0bdf053 100644
> --- a/drivers/devfreq/event/exynos-ppmu.c
> +++ b/drivers/devfreq/event/exynos-ppmu.c
> @@ -535,8 +535,8 @@ static int of_get_devfreq_events(struct device_node *np,
>  
>   if (i == ARRAY_SIZE(ppmu_events)) {
>   dev_warn(dev,
> - "don't know how to configure events : %s\n",
> - node->name);
> + "don't know how to configure events : %pOFn\n",
> + node);
>   continue;
>   }
>  
> 

Acked-by: Chanwoo Choi 

-- 
Best Regards,
Chanwoo Choi
Samsung Electronics


Re: [PATCH] devfreq: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Chanwoo Choi
Dear Rob,

On 2018년 08월 28일 10:52, Rob Herring wrote:
> In preparation to remove the node name pointer from struct device_node,
> convert printf users to use the %pOFn format specifier.
> 
> Cc: Chanwoo Choi 
> Cc: MyungJoo Ham 
> Cc: Kyungmin Park 
> Cc: Kukjin Kim 
> Cc: Krzysztof Kozlowski 
> Cc: linux...@vger.kernel.org
> Cc: linux-arm-ker...@lists.infradead.org
> Cc: linux-samsung-...@vger.kernel.org
> Signed-off-by: Rob Herring 
> ---
>  drivers/devfreq/event/exynos-ppmu.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/devfreq/event/exynos-ppmu.c 
> b/drivers/devfreq/event/exynos-ppmu.c
> index a9c64f0d3284..c61de0bdf053 100644
> --- a/drivers/devfreq/event/exynos-ppmu.c
> +++ b/drivers/devfreq/event/exynos-ppmu.c
> @@ -535,8 +535,8 @@ static int of_get_devfreq_events(struct device_node *np,
>  
>   if (i == ARRAY_SIZE(ppmu_events)) {
>   dev_warn(dev,
> - "don't know how to configure events : %s\n",
> - node->name);
> + "don't know how to configure events : %pOFn\n",
> + node);
>   continue;
>   }
>  
> 

Acked-by: Chanwoo Choi 

-- 
Best Regards,
Chanwoo Choi
Samsung Electronics


[PATCH] iio: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Jonathan Cameron 
Cc: Hartmut Knaack 
Cc: Lars-Peter Clausen 
Cc: linux-...@vger.kernel.org
Signed-off-by: Rob Herring 
---
 drivers/iio/adc/qcom-pm8xxx-xoadc.c |  4 ++--
 drivers/iio/adc/rcar-gyroadc.c  | 12 ++--
 drivers/iio/frequency/adf4350.c |  2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/iio/adc/qcom-pm8xxx-xoadc.c 
b/drivers/iio/adc/qcom-pm8xxx-xoadc.c
index b093ecddf1a8..c30c002f1fef 100644
--- a/drivers/iio/adc/qcom-pm8xxx-xoadc.c
+++ b/drivers/iio/adc/qcom-pm8xxx-xoadc.c
@@ -708,8 +708,8 @@ static int pm8xxx_of_xlate(struct iio_dev *indio_dev,
 * mux.
 */
if (iiospec->args_count != 2) {
-   dev_err(_dev->dev, "wrong number of arguments for %s need 
2 got %d\n",
-   iiospec->np->name,
+   dev_err(_dev->dev, "wrong number of arguments for %pOFn 
need 2 got %d\n",
+   iiospec->np,
iiospec->args_count);
return -EINVAL;
}
diff --git a/drivers/iio/adc/rcar-gyroadc.c b/drivers/iio/adc/rcar-gyroadc.c
index dcb50172186f..4e982b51bcda 100644
--- a/drivers/iio/adc/rcar-gyroadc.c
+++ b/drivers/iio/adc/rcar-gyroadc.c
@@ -343,8 +343,8 @@ static int rcar_gyroadc_parse_subdevs(struct iio_dev 
*indio_dev)
for_each_child_of_node(np, child) {
of_id = of_match_node(rcar_gyroadc_child_match, child);
if (!of_id) {
-   dev_err(dev, "Ignoring unsupported ADC \"%s\".",
-   child->name);
+   dev_err(dev, "Ignoring unsupported ADC \"%pOFn\".",
+   child);
continue;
}
 
@@ -381,16 +381,16 @@ static int rcar_gyroadc_parse_subdevs(struct iio_dev 
*indio_dev)
ret = of_property_read_u32(child, "reg", );
if (ret) {
dev_err(dev,
-   "Failed to get child reg property of 
ADC \"%s\".\n",
-   child->name);
+   "Failed to get child reg property of 
ADC \"%pOFn\".\n",
+   child);
return ret;
}
 
/* Channel number is too high. */
if (reg >= num_channels) {
dev_err(dev,
-   "Only %i channels supported with %s, 
but reg = <%i>.\n",
-   num_channels, child->name, reg);
+   "Only %i channels supported with %pOFn, 
but reg = <%i>.\n",
+   num_channels, child, reg);
return ret;
}
}
diff --git a/drivers/iio/frequency/adf4350.c b/drivers/iio/frequency/adf4350.c
index 6d768431d90e..f4748ff243f7 100644
--- a/drivers/iio/frequency/adf4350.c
+++ b/drivers/iio/frequency/adf4350.c
@@ -388,7 +388,7 @@ static struct adf4350_platform_data 
*adf4350_parse_dt(struct device *dev)
if (!pdata)
return NULL;
 
-   strncpy(>name[0], np->name, SPI_NAME_SIZE - 1);
+   snprintf(>name[0], SPI_NAME_SIZE - 1, "%pOFn", np);
 
tmp = 1;
of_property_read_u32(np, "adi,channel-spacing", );
-- 
2.17.1



[PATCH] iio: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Jonathan Cameron 
Cc: Hartmut Knaack 
Cc: Lars-Peter Clausen 
Cc: linux-...@vger.kernel.org
Signed-off-by: Rob Herring 
---
 drivers/iio/adc/qcom-pm8xxx-xoadc.c |  4 ++--
 drivers/iio/adc/rcar-gyroadc.c  | 12 ++--
 drivers/iio/frequency/adf4350.c |  2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/iio/adc/qcom-pm8xxx-xoadc.c 
b/drivers/iio/adc/qcom-pm8xxx-xoadc.c
index b093ecddf1a8..c30c002f1fef 100644
--- a/drivers/iio/adc/qcom-pm8xxx-xoadc.c
+++ b/drivers/iio/adc/qcom-pm8xxx-xoadc.c
@@ -708,8 +708,8 @@ static int pm8xxx_of_xlate(struct iio_dev *indio_dev,
 * mux.
 */
if (iiospec->args_count != 2) {
-   dev_err(_dev->dev, "wrong number of arguments for %s need 
2 got %d\n",
-   iiospec->np->name,
+   dev_err(_dev->dev, "wrong number of arguments for %pOFn 
need 2 got %d\n",
+   iiospec->np,
iiospec->args_count);
return -EINVAL;
}
diff --git a/drivers/iio/adc/rcar-gyroadc.c b/drivers/iio/adc/rcar-gyroadc.c
index dcb50172186f..4e982b51bcda 100644
--- a/drivers/iio/adc/rcar-gyroadc.c
+++ b/drivers/iio/adc/rcar-gyroadc.c
@@ -343,8 +343,8 @@ static int rcar_gyroadc_parse_subdevs(struct iio_dev 
*indio_dev)
for_each_child_of_node(np, child) {
of_id = of_match_node(rcar_gyroadc_child_match, child);
if (!of_id) {
-   dev_err(dev, "Ignoring unsupported ADC \"%s\".",
-   child->name);
+   dev_err(dev, "Ignoring unsupported ADC \"%pOFn\".",
+   child);
continue;
}
 
@@ -381,16 +381,16 @@ static int rcar_gyroadc_parse_subdevs(struct iio_dev 
*indio_dev)
ret = of_property_read_u32(child, "reg", );
if (ret) {
dev_err(dev,
-   "Failed to get child reg property of 
ADC \"%s\".\n",
-   child->name);
+   "Failed to get child reg property of 
ADC \"%pOFn\".\n",
+   child);
return ret;
}
 
/* Channel number is too high. */
if (reg >= num_channels) {
dev_err(dev,
-   "Only %i channels supported with %s, 
but reg = <%i>.\n",
-   num_channels, child->name, reg);
+   "Only %i channels supported with %pOFn, 
but reg = <%i>.\n",
+   num_channels, child, reg);
return ret;
}
}
diff --git a/drivers/iio/frequency/adf4350.c b/drivers/iio/frequency/adf4350.c
index 6d768431d90e..f4748ff243f7 100644
--- a/drivers/iio/frequency/adf4350.c
+++ b/drivers/iio/frequency/adf4350.c
@@ -388,7 +388,7 @@ static struct adf4350_platform_data 
*adf4350_parse_dt(struct device *dev)
if (!pdata)
return NULL;
 
-   strncpy(>name[0], np->name, SPI_NAME_SIZE - 1);
+   snprintf(>name[0], SPI_NAME_SIZE - 1, "%pOFn", np);
 
tmp = 1;
of_property_read_u32(np, "adi,channel-spacing", );
-- 
2.17.1



RE: [PATCH] pinctrl: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread A.s. Dong
> -Original Message-
> From: Rob Herring [mailto:r...@kernel.org]
> Sent: Tuesday, August 28, 2018 9:53 AM
> To: linux-kernel@vger.kernel.org
> Cc: Linus Walleij ; A.s. Dong
> ; Fabio Estevam ; Shawn
> Guo ; Stefan Agner ; Pengutronix
> Kernel Team ; Sean Wang
> ; Matthias Brugger ;
> Carlo Caione ; Kevin Hilman ;
> Jason Cooper ; Andrew Lunn ;
> Gregory Clement ; Sebastian Hesselbarth
> ; Jean-Christophe Plagniol-Villard
> ; Nicolas Ferre ;
> Alexandre Belloni ; Heiko Stuebner
> ; Tony Lindgren ; Haojian Zhuang
> ; Patrice Chotard ;
> Barry Song ; Maxime Coquelin
> ; Alexandre Torgue
> ; Maxime Ripard ;
> Chen-Yu Tsai ; linux-g...@vger.kernel.org;
> linux-media...@lists.infradead.org; linux-arm-ker...@lists.infradead.org;
> linux-amlo...@lists.infradead.org; linux-rockc...@lists.infradead.org;
> linux-o...@vger.kernel.org
> Subject: [PATCH] pinctrl: Convert to using %pOFn instead of device_node.name
> 
> In preparation to remove the node name pointer from struct device_node,
> convert printf users to use the %pOFn format specifier.
> 
> Cc: Linus Walleij 
> Cc: Dong Aisheng 
> Cc: Fabio Estevam 
> Cc: Shawn Guo 
> Cc: Stefan Agner 
> Cc: Pengutronix Kernel Team 
> Cc: Sean Wang 
> Cc: Matthias Brugger 
> Cc: Carlo Caione 
> Cc: Kevin Hilman 
> Cc: Jason Cooper 
> Cc: Andrew Lunn 
> Cc: Gregory Clement 
> Cc: Sebastian Hesselbarth 
> Cc: Jean-Christophe Plagniol-Villard 
> Cc: Nicolas Ferre 
> Cc: Alexandre Belloni 
> Cc: Heiko Stuebner 
> Cc: Tony Lindgren 
> Cc: Haojian Zhuang 
> Cc: Patrice Chotard 
> Cc: Barry Song 
> Cc: Maxime Coquelin 
> Cc: Alexandre Torgue 
> Cc: Maxime Ripard 
> Cc: Chen-Yu Tsai 
> Cc: linux-g...@vger.kernel.org
> Cc: linux-media...@lists.infradead.org
> Cc: linux-arm-ker...@lists.infradead.org
> Cc: linux-amlo...@lists.infradead.org
> Cc: linux-rockc...@lists.infradead.org
> Cc: linux-o...@vger.kernel.org
> Signed-off-by: Rob Herring 
> ---
>  drivers/pinctrl/berlin/berlin.c   |  6 ++--
>  drivers/pinctrl/freescale/pinctrl-imx.c   |  7 ++--
>  drivers/pinctrl/freescale/pinctrl-imx1-core.c | 12 +++

For i.MX,
Acked-by: Dong Aisheng 

Regards
Dong Aisheng


RE: [PATCH] pinctrl: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread A.s. Dong
> -Original Message-
> From: Rob Herring [mailto:r...@kernel.org]
> Sent: Tuesday, August 28, 2018 9:53 AM
> To: linux-kernel@vger.kernel.org
> Cc: Linus Walleij ; A.s. Dong
> ; Fabio Estevam ; Shawn
> Guo ; Stefan Agner ; Pengutronix
> Kernel Team ; Sean Wang
> ; Matthias Brugger ;
> Carlo Caione ; Kevin Hilman ;
> Jason Cooper ; Andrew Lunn ;
> Gregory Clement ; Sebastian Hesselbarth
> ; Jean-Christophe Plagniol-Villard
> ; Nicolas Ferre ;
> Alexandre Belloni ; Heiko Stuebner
> ; Tony Lindgren ; Haojian Zhuang
> ; Patrice Chotard ;
> Barry Song ; Maxime Coquelin
> ; Alexandre Torgue
> ; Maxime Ripard ;
> Chen-Yu Tsai ; linux-g...@vger.kernel.org;
> linux-media...@lists.infradead.org; linux-arm-ker...@lists.infradead.org;
> linux-amlo...@lists.infradead.org; linux-rockc...@lists.infradead.org;
> linux-o...@vger.kernel.org
> Subject: [PATCH] pinctrl: Convert to using %pOFn instead of device_node.name
> 
> In preparation to remove the node name pointer from struct device_node,
> convert printf users to use the %pOFn format specifier.
> 
> Cc: Linus Walleij 
> Cc: Dong Aisheng 
> Cc: Fabio Estevam 
> Cc: Shawn Guo 
> Cc: Stefan Agner 
> Cc: Pengutronix Kernel Team 
> Cc: Sean Wang 
> Cc: Matthias Brugger 
> Cc: Carlo Caione 
> Cc: Kevin Hilman 
> Cc: Jason Cooper 
> Cc: Andrew Lunn 
> Cc: Gregory Clement 
> Cc: Sebastian Hesselbarth 
> Cc: Jean-Christophe Plagniol-Villard 
> Cc: Nicolas Ferre 
> Cc: Alexandre Belloni 
> Cc: Heiko Stuebner 
> Cc: Tony Lindgren 
> Cc: Haojian Zhuang 
> Cc: Patrice Chotard 
> Cc: Barry Song 
> Cc: Maxime Coquelin 
> Cc: Alexandre Torgue 
> Cc: Maxime Ripard 
> Cc: Chen-Yu Tsai 
> Cc: linux-g...@vger.kernel.org
> Cc: linux-media...@lists.infradead.org
> Cc: linux-arm-ker...@lists.infradead.org
> Cc: linux-amlo...@lists.infradead.org
> Cc: linux-rockc...@lists.infradead.org
> Cc: linux-o...@vger.kernel.org
> Signed-off-by: Rob Herring 
> ---
>  drivers/pinctrl/berlin/berlin.c   |  6 ++--
>  drivers/pinctrl/freescale/pinctrl-imx.c   |  7 ++--
>  drivers/pinctrl/freescale/pinctrl-imx1-core.c | 12 +++

For i.MX,
Acked-by: Dong Aisheng 

Regards
Dong Aisheng


[PATCH] leds: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Sakari Ailus 
Cc: Jacek Anaszewski 
Cc: Pavel Machek 
Cc: linux-l...@vger.kernel.org
Signed-off-by: Rob Herring 
---
 drivers/leds/leds-as3645a.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/leds/leds-as3645a.c b/drivers/leds/leds-as3645a.c
index f883616d9e60..98a69b1a43f9 100644
--- a/drivers/leds/leds-as3645a.c
+++ b/drivers/leds/leds-as3645a.c
@@ -529,7 +529,7 @@ static int as3645a_parse_node(struct as3645a *flash,
strlcpy(names->flash, name, sizeof(names->flash));
else
snprintf(names->flash, sizeof(names->flash),
-"%s:flash", node->name);
+"%pOFn:flash", node);
 
rval = of_property_read_u32(flash->flash_node, "flash-timeout-us",
>flash_timeout_us);
@@ -573,7 +573,7 @@ static int as3645a_parse_node(struct as3645a *flash,
strlcpy(names->indicator, name, sizeof(names->indicator));
else
snprintf(names->indicator, sizeof(names->indicator),
-"%s:indicator", node->name);
+"%pOFn:indicator", node);
 
rval = of_property_read_u32(flash->indicator_node, "led-max-microamp",
>indicator_max_ua);
-- 
2.17.1



[PATCH] leds: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Sakari Ailus 
Cc: Jacek Anaszewski 
Cc: Pavel Machek 
Cc: linux-l...@vger.kernel.org
Signed-off-by: Rob Herring 
---
 drivers/leds/leds-as3645a.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/leds/leds-as3645a.c b/drivers/leds/leds-as3645a.c
index f883616d9e60..98a69b1a43f9 100644
--- a/drivers/leds/leds-as3645a.c
+++ b/drivers/leds/leds-as3645a.c
@@ -529,7 +529,7 @@ static int as3645a_parse_node(struct as3645a *flash,
strlcpy(names->flash, name, sizeof(names->flash));
else
snprintf(names->flash, sizeof(names->flash),
-"%s:flash", node->name);
+"%pOFn:flash", node);
 
rval = of_property_read_u32(flash->flash_node, "flash-timeout-us",
>flash_timeout_us);
@@ -573,7 +573,7 @@ static int as3645a_parse_node(struct as3645a *flash,
strlcpy(names->indicator, name, sizeof(names->indicator));
else
snprintf(names->indicator, sizeof(names->indicator),
-"%s:indicator", node->name);
+"%pOFn:indicator", node);
 
rval = of_property_read_u32(flash->indicator_node, "led-max-microamp",
>indicator_max_ua);
-- 
2.17.1



[PATCH] irqchip: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Thomas Gleixner 
Cc: Jason Cooper 
Cc: Marc Zyngier 
Cc: linux-arm-ker...@lists.infradead.org
Signed-off-by: Rob Herring 
---
 drivers/irqchip/irq-gic-v3.c  |  4 ++--
 drivers/irqchip/irq-mscc-ocelot.c |  6 +++---
 drivers/irqchip/irq-orion.c   | 22 +++---
 drivers/irqchip/irq-stm32-exti.c  |  6 +++---
 drivers/irqchip/irq-tango.c   | 10 +-
 drivers/irqchip/irq-tb10x.c   | 18 +-
 6 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index d5912f1ec884..fcb6227ff5ac 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -1183,8 +1183,8 @@ static void __init gic_populate_ppi_partitions(struct 
device_node *gic_node)
 
part->partition_id = of_node_to_fwnode(child_part);
 
-   pr_info("GIC: PPI partition %s[%d] { ",
-   child_part->name, part_idx);
+   pr_info("GIC: PPI partition %pOFn[%d] { ",
+   child_part, part_idx);
 
n = of_property_count_elems_of_size(child_part, "affinity",
sizeof(u32));
diff --git a/drivers/irqchip/irq-mscc-ocelot.c 
b/drivers/irqchip/irq-mscc-ocelot.c
index b63e40c00a02..88143c0b700c 100644
--- a/drivers/irqchip/irq-mscc-ocelot.c
+++ b/drivers/irqchip/irq-mscc-ocelot.c
@@ -72,7 +72,7 @@ static int __init ocelot_irq_init(struct device_node *node,
domain = irq_domain_add_linear(node, OCELOT_NR_IRQ,
   _generic_chip_ops, NULL);
if (!domain) {
-   pr_err("%s: unable to add irq domain\n", node->name);
+   pr_err("%pOFn: unable to add irq domain\n", node);
return -ENOMEM;
}
 
@@ -80,14 +80,14 @@ static int __init ocelot_irq_init(struct device_node *node,
 "icpu", handle_level_irq,
 0, 0, 0);
if (ret) {
-   pr_err("%s: unable to alloc irq domain gc\n", node->name);
+   pr_err("%pOFn: unable to alloc irq domain gc\n", node);
goto err_domain_remove;
}
 
gc = irq_get_domain_generic_chip(domain, 0);
gc->reg_base = of_iomap(node, 0);
if (!gc->reg_base) {
-   pr_err("%s: unable to map resource\n", node->name);
+   pr_err("%pOFn: unable to map resource\n", node);
ret = -ENOMEM;
goto err_gc_free;
}
diff --git a/drivers/irqchip/irq-orion.c b/drivers/irqchip/irq-orion.c
index be4c5a8c9659..c4b5ffb61954 100644
--- a/drivers/irqchip/irq-orion.c
+++ b/drivers/irqchip/irq-orion.c
@@ -64,14 +64,14 @@ static int __init orion_irq_init(struct device_node *np,
num_chips * ORION_IRQS_PER_CHIP,
_generic_chip_ops, NULL);
if (!orion_irq_domain)
-   panic("%s: unable to add irq domain\n", np->name);
+   panic("%pOFn: unable to add irq domain\n", np);
 
ret = irq_alloc_domain_generic_chips(orion_irq_domain,
-   ORION_IRQS_PER_CHIP, 1, np->name,
+   ORION_IRQS_PER_CHIP, 1, np->full_name,
handle_level_irq, clr, 0,
IRQ_GC_INIT_MASK_CACHE);
if (ret)
-   panic("%s: unable to alloc irq domain gc\n", np->name);
+   panic("%pOFn: unable to alloc irq domain gc\n", np);
 
for (n = 0, base = 0; n < num_chips; n++, base += ORION_IRQS_PER_CHIP) {
struct irq_chip_generic *gc =
@@ -80,12 +80,12 @@ static int __init orion_irq_init(struct device_node *np,
of_address_to_resource(np, n, );
 
if (!request_mem_region(r.start, resource_size(), np->name))
-   panic("%s: unable to request mem region %d",
- np->name, n);
+   panic("%pOFn: unable to request mem region %d",
+ np, n);
 
gc->reg_base = ioremap(r.start, resource_size());
if (!gc->reg_base)
-   panic("%s: unable to map resource %d", np->name, n);
+   panic("%pOFn: unable to map resource %d", np, n);
 
gc->chip_types[0].regs.mask = ORION_IRQ_MASK;
gc->chip_types[0].chip.irq_mask = irq_gc_mask_clr_bit;
@@ -150,20 +150,20 @@ static int __init orion_bridge_irq_init(struct 
device_node *np,
domain = irq_domain_add_linear(np, nrirqs,
   _generic_chip_ops, NULL);
if (!domain) {
-   pr_err("%s: unable to add irq domain\n", np->name);
+   pr_err("%pOFn: unable 

[PATCH] irqchip: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Thomas Gleixner 
Cc: Jason Cooper 
Cc: Marc Zyngier 
Cc: linux-arm-ker...@lists.infradead.org
Signed-off-by: Rob Herring 
---
 drivers/irqchip/irq-gic-v3.c  |  4 ++--
 drivers/irqchip/irq-mscc-ocelot.c |  6 +++---
 drivers/irqchip/irq-orion.c   | 22 +++---
 drivers/irqchip/irq-stm32-exti.c  |  6 +++---
 drivers/irqchip/irq-tango.c   | 10 +-
 drivers/irqchip/irq-tb10x.c   | 18 +-
 6 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index d5912f1ec884..fcb6227ff5ac 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -1183,8 +1183,8 @@ static void __init gic_populate_ppi_partitions(struct 
device_node *gic_node)
 
part->partition_id = of_node_to_fwnode(child_part);
 
-   pr_info("GIC: PPI partition %s[%d] { ",
-   child_part->name, part_idx);
+   pr_info("GIC: PPI partition %pOFn[%d] { ",
+   child_part, part_idx);
 
n = of_property_count_elems_of_size(child_part, "affinity",
sizeof(u32));
diff --git a/drivers/irqchip/irq-mscc-ocelot.c 
b/drivers/irqchip/irq-mscc-ocelot.c
index b63e40c00a02..88143c0b700c 100644
--- a/drivers/irqchip/irq-mscc-ocelot.c
+++ b/drivers/irqchip/irq-mscc-ocelot.c
@@ -72,7 +72,7 @@ static int __init ocelot_irq_init(struct device_node *node,
domain = irq_domain_add_linear(node, OCELOT_NR_IRQ,
   _generic_chip_ops, NULL);
if (!domain) {
-   pr_err("%s: unable to add irq domain\n", node->name);
+   pr_err("%pOFn: unable to add irq domain\n", node);
return -ENOMEM;
}
 
@@ -80,14 +80,14 @@ static int __init ocelot_irq_init(struct device_node *node,
 "icpu", handle_level_irq,
 0, 0, 0);
if (ret) {
-   pr_err("%s: unable to alloc irq domain gc\n", node->name);
+   pr_err("%pOFn: unable to alloc irq domain gc\n", node);
goto err_domain_remove;
}
 
gc = irq_get_domain_generic_chip(domain, 0);
gc->reg_base = of_iomap(node, 0);
if (!gc->reg_base) {
-   pr_err("%s: unable to map resource\n", node->name);
+   pr_err("%pOFn: unable to map resource\n", node);
ret = -ENOMEM;
goto err_gc_free;
}
diff --git a/drivers/irqchip/irq-orion.c b/drivers/irqchip/irq-orion.c
index be4c5a8c9659..c4b5ffb61954 100644
--- a/drivers/irqchip/irq-orion.c
+++ b/drivers/irqchip/irq-orion.c
@@ -64,14 +64,14 @@ static int __init orion_irq_init(struct device_node *np,
num_chips * ORION_IRQS_PER_CHIP,
_generic_chip_ops, NULL);
if (!orion_irq_domain)
-   panic("%s: unable to add irq domain\n", np->name);
+   panic("%pOFn: unable to add irq domain\n", np);
 
ret = irq_alloc_domain_generic_chips(orion_irq_domain,
-   ORION_IRQS_PER_CHIP, 1, np->name,
+   ORION_IRQS_PER_CHIP, 1, np->full_name,
handle_level_irq, clr, 0,
IRQ_GC_INIT_MASK_CACHE);
if (ret)
-   panic("%s: unable to alloc irq domain gc\n", np->name);
+   panic("%pOFn: unable to alloc irq domain gc\n", np);
 
for (n = 0, base = 0; n < num_chips; n++, base += ORION_IRQS_PER_CHIP) {
struct irq_chip_generic *gc =
@@ -80,12 +80,12 @@ static int __init orion_irq_init(struct device_node *np,
of_address_to_resource(np, n, );
 
if (!request_mem_region(r.start, resource_size(), np->name))
-   panic("%s: unable to request mem region %d",
- np->name, n);
+   panic("%pOFn: unable to request mem region %d",
+ np, n);
 
gc->reg_base = ioremap(r.start, resource_size());
if (!gc->reg_base)
-   panic("%s: unable to map resource %d", np->name, n);
+   panic("%pOFn: unable to map resource %d", np, n);
 
gc->chip_types[0].regs.mask = ORION_IRQ_MASK;
gc->chip_types[0].chip.irq_mask = irq_gc_mask_clr_bit;
@@ -150,20 +150,20 @@ static int __init orion_bridge_irq_init(struct 
device_node *np,
domain = irq_domain_add_linear(np, nrirqs,
   _generic_chip_ops, NULL);
if (!domain) {
-   pr_err("%s: unable to add irq domain\n", np->name);
+   pr_err("%pOFn: unable 

[PATCH] mmc: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Adrian Hunter 
Cc: Hu Ziji 
Cc: Ulf Hansson 
Cc: linux-...@vger.kernel.org
Signed-off-by: Rob Herring 
---
 drivers/mmc/host/sdhci-xenon-phy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/sdhci-xenon-phy.c 
b/drivers/mmc/host/sdhci-xenon-phy.c
index c335052d0c02..5956e90380e8 100644
--- a/drivers/mmc/host/sdhci-xenon-phy.c
+++ b/drivers/mmc/host/sdhci-xenon-phy.c
@@ -660,8 +660,8 @@ static int get_dt_pad_ctrl_data(struct sdhci_host *host,
return 0;
 
if (of_address_to_resource(np, 1, )) {
-   dev_err(mmc_dev(host->mmc), "Unable to find SoC PAD ctrl 
register address for %s\n",
-   np->name);
+   dev_err(mmc_dev(host->mmc), "Unable to find SoC PAD ctrl 
register address for %pOFn\n",
+   np);
return -EINVAL;
}
 
-- 
2.17.1



[PATCH] mfd: max77620: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Lee Jones 
Signed-off-by: Rob Herring 
---
 drivers/mfd/max77620.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/max77620.c b/drivers/mfd/max77620.c
index b1700b5fa640..d8217366ed36 100644
--- a/drivers/mfd/max77620.c
+++ b/drivers/mfd/max77620.c
@@ -285,7 +285,7 @@ static int max77620_config_fps(struct max77620_chip *chip,
}
 
if (fps_id == MAX77620_FPS_COUNT) {
-   dev_err(dev, "FPS node name %s is not valid\n", fps_np->name);
+   dev_err(dev, "FPS node name %pOFn is not valid\n", fps_np);
return -EINVAL;
}
 
-- 
2.17.1



[PATCH] misc: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Frederic Barrat 
Cc: Andrew Donnellan 
Cc: Arnd Bergmann 
Cc: Greg Kroah-Hartman 
Cc: linuxppc-...@lists.ozlabs.org
Signed-off-by: Rob Herring 
---
 drivers/misc/cxl/flash.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/cxl/flash.c b/drivers/misc/cxl/flash.c
index 43917898fb9a..4d6836f19489 100644
--- a/drivers/misc/cxl/flash.c
+++ b/drivers/misc/cxl/flash.c
@@ -92,8 +92,8 @@ static int update_property(struct device_node *dn, const char 
*name,
 
val = (u32 *)new_prop->value;
rc = cxl_update_properties(dn, new_prop);
-   pr_devel("%s: update property (%s, length: %i, value: %#x)\n",
- dn->name, name, vd, be32_to_cpu(*val));
+   pr_devel("%pOFn: update property (%s, length: %i, value: %#x)\n",
+ dn, name, vd, be32_to_cpu(*val));
 
if (rc) {
kfree(new_prop->name);
-- 
2.17.1



[PATCH] mmc: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Adrian Hunter 
Cc: Hu Ziji 
Cc: Ulf Hansson 
Cc: linux-...@vger.kernel.org
Signed-off-by: Rob Herring 
---
 drivers/mmc/host/sdhci-xenon-phy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/sdhci-xenon-phy.c 
b/drivers/mmc/host/sdhci-xenon-phy.c
index c335052d0c02..5956e90380e8 100644
--- a/drivers/mmc/host/sdhci-xenon-phy.c
+++ b/drivers/mmc/host/sdhci-xenon-phy.c
@@ -660,8 +660,8 @@ static int get_dt_pad_ctrl_data(struct sdhci_host *host,
return 0;
 
if (of_address_to_resource(np, 1, )) {
-   dev_err(mmc_dev(host->mmc), "Unable to find SoC PAD ctrl 
register address for %s\n",
-   np->name);
+   dev_err(mmc_dev(host->mmc), "Unable to find SoC PAD ctrl 
register address for %pOFn\n",
+   np);
return -EINVAL;
}
 
-- 
2.17.1



[PATCH] mfd: max77620: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Lee Jones 
Signed-off-by: Rob Herring 
---
 drivers/mfd/max77620.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/max77620.c b/drivers/mfd/max77620.c
index b1700b5fa640..d8217366ed36 100644
--- a/drivers/mfd/max77620.c
+++ b/drivers/mfd/max77620.c
@@ -285,7 +285,7 @@ static int max77620_config_fps(struct max77620_chip *chip,
}
 
if (fps_id == MAX77620_FPS_COUNT) {
-   dev_err(dev, "FPS node name %s is not valid\n", fps_np->name);
+   dev_err(dev, "FPS node name %pOFn is not valid\n", fps_np);
return -EINVAL;
}
 
-- 
2.17.1



[PATCH] misc: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Frederic Barrat 
Cc: Andrew Donnellan 
Cc: Arnd Bergmann 
Cc: Greg Kroah-Hartman 
Cc: linuxppc-...@lists.ozlabs.org
Signed-off-by: Rob Herring 
---
 drivers/misc/cxl/flash.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/cxl/flash.c b/drivers/misc/cxl/flash.c
index 43917898fb9a..4d6836f19489 100644
--- a/drivers/misc/cxl/flash.c
+++ b/drivers/misc/cxl/flash.c
@@ -92,8 +92,8 @@ static int update_property(struct device_node *dn, const char 
*name,
 
val = (u32 *)new_prop->value;
rc = cxl_update_properties(dn, new_prop);
-   pr_devel("%s: update property (%s, length: %i, value: %#x)\n",
- dn->name, name, vd, be32_to_cpu(*val));
+   pr_devel("%pOFn: update property (%s, length: %i, value: %#x)\n",
+ dn, name, vd, be32_to_cpu(*val));
 
if (rc) {
kfree(new_prop->name);
-- 
2.17.1



[PATCH] memory: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Roger Quadros 
Cc: Tony Lindgren 
Cc: Kukjin Kim 
Cc: Krzysztof Kozlowski 
Cc: Thierry Reding 
Cc: Jonathan Hunter 
Cc: linux-o...@vger.kernel.org
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-samsung-...@vger.kernel.org
Cc: linux-te...@vger.kernel.org
Signed-off-by: Rob Herring 
---
 drivers/memory/omap-gpmc.c   | 18 +++---
 drivers/memory/samsung/exynos-srom.c |  4 ++--
 drivers/memory/tegra/mc.c|  6 +++---
 drivers/memory/tegra/tegra124-emc.c  | 12 ++--
 4 files changed, 18 insertions(+), 22 deletions(-)

diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index c215287e80cf..8abb9e94916a 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -2145,8 +2145,8 @@ static int gpmc_probe_generic_child(struct 
platform_device *pdev,
gpmc_s.device_width = GPMC_DEVWIDTH_16BIT;
break;
default:
-   dev_err(>dev, "%s: invalid 'nand-bus-width'\n",
-   child->name);
+   dev_err(>dev, "%pOFn: invalid 'nand-bus-width'\n",
+   child);
ret = -EINVAL;
goto err;
}
@@ -2186,8 +2186,8 @@ static int gpmc_probe_generic_child(struct 
platform_device *pdev,
 
ret = gpmc_cs_set_timings(cs, _t, _s);
if (ret) {
-   dev_err(>dev, "failed to set gpmc timings for: %s\n",
-   child->name);
+   dev_err(>dev, "failed to set gpmc timings for: %pOFn\n",
+   child);
goto err_cs;
}
 
@@ -2215,7 +2215,7 @@ static int gpmc_probe_generic_child(struct 
platform_device *pdev,
 
 err_child_fail:
 
-   dev_err(>dev, "failed to create gpmc child %s\n", child->name);
+   dev_err(>dev, "failed to create gpmc child %pOFn\n", child);
ret = -ENODEV;
 
 err_cs:
@@ -2265,14 +2265,10 @@ static void gpmc_probe_dt_children(struct 
platform_device *pdev)
struct device_node *child;
 
for_each_available_child_of_node(pdev->dev.of_node, child) {
-
-   if (!child->name)
-   continue;
-
ret = gpmc_probe_generic_child(pdev, child);
if (ret) {
-   dev_err(>dev, "failed to probe DT child '%s': 
%d\n",
-   child->name, ret);
+   dev_err(>dev, "failed to probe DT child '%pOFn': 
%d\n",
+   child, ret);
}
}
 }
diff --git a/drivers/memory/samsung/exynos-srom.c 
b/drivers/memory/samsung/exynos-srom.c
index 7edd7fb540f2..c27c6105c66d 100644
--- a/drivers/memory/samsung/exynos-srom.c
+++ b/drivers/memory/samsung/exynos-srom.c
@@ -139,8 +139,8 @@ static int exynos_srom_probe(struct platform_device *pdev)
for_each_child_of_node(np, child) {
if (exynos_srom_configure_bank(srom, child)) {
dev_err(dev,
-   "Could not decode bank configuration for %s\n",
-   child->name);
+   "Could not decode bank configuration for 
%pOFn\n",
+   child);
bad_bank_config = true;
}
}
diff --git a/drivers/memory/tegra/mc.c b/drivers/memory/tegra/mc.c
index bd25faf6d13d..24afc36833bf 100644
--- a/drivers/memory/tegra/mc.c
+++ b/drivers/memory/tegra/mc.c
@@ -345,7 +345,7 @@ static int load_one_timing(struct tegra_mc *mc,
err = of_property_read_u32(node, "clock-frequency", );
if (err) {
dev_err(mc->dev,
-   "timing %s: failed to read rate\n", node->name);
+   "timing %pOFn: failed to read rate\n", node);
return err;
}
 
@@ -360,8 +360,8 @@ static int load_one_timing(struct tegra_mc *mc,
 mc->soc->num_emem_regs);
if (err) {
dev_err(mc->dev,
-   "timing %s: failed to read EMEM configuration\n",
-   node->name);
+   "timing %pOFn: failed to read EMEM configuration\n",
+   node);
return err;
}
 
diff --git a/drivers/memory/tegra/tegra124-emc.c 
b/drivers/memory/tegra/tegra124-emc.c
index 392dc8dd481f..eedb7d48e2ea 100644
--- a/drivers/memory/tegra/tegra124-emc.c
+++ b/drivers/memory/tegra/tegra124-emc.c
@@ -888,8 +888,8 @@ static int load_one_timing_from_dt(struct tegra_emc *emc,
 
err = of_property_read_u32(node, "clock-frequency", );
if (err) {
-   dev_err(emc->dev, "timing %s: failed to read rate: %d\n",
-   node->name, err);
+   

[PATCH] memory: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Roger Quadros 
Cc: Tony Lindgren 
Cc: Kukjin Kim 
Cc: Krzysztof Kozlowski 
Cc: Thierry Reding 
Cc: Jonathan Hunter 
Cc: linux-o...@vger.kernel.org
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-samsung-...@vger.kernel.org
Cc: linux-te...@vger.kernel.org
Signed-off-by: Rob Herring 
---
 drivers/memory/omap-gpmc.c   | 18 +++---
 drivers/memory/samsung/exynos-srom.c |  4 ++--
 drivers/memory/tegra/mc.c|  6 +++---
 drivers/memory/tegra/tegra124-emc.c  | 12 ++--
 4 files changed, 18 insertions(+), 22 deletions(-)

diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index c215287e80cf..8abb9e94916a 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -2145,8 +2145,8 @@ static int gpmc_probe_generic_child(struct 
platform_device *pdev,
gpmc_s.device_width = GPMC_DEVWIDTH_16BIT;
break;
default:
-   dev_err(>dev, "%s: invalid 'nand-bus-width'\n",
-   child->name);
+   dev_err(>dev, "%pOFn: invalid 'nand-bus-width'\n",
+   child);
ret = -EINVAL;
goto err;
}
@@ -2186,8 +2186,8 @@ static int gpmc_probe_generic_child(struct 
platform_device *pdev,
 
ret = gpmc_cs_set_timings(cs, _t, _s);
if (ret) {
-   dev_err(>dev, "failed to set gpmc timings for: %s\n",
-   child->name);
+   dev_err(>dev, "failed to set gpmc timings for: %pOFn\n",
+   child);
goto err_cs;
}
 
@@ -2215,7 +2215,7 @@ static int gpmc_probe_generic_child(struct 
platform_device *pdev,
 
 err_child_fail:
 
-   dev_err(>dev, "failed to create gpmc child %s\n", child->name);
+   dev_err(>dev, "failed to create gpmc child %pOFn\n", child);
ret = -ENODEV;
 
 err_cs:
@@ -2265,14 +2265,10 @@ static void gpmc_probe_dt_children(struct 
platform_device *pdev)
struct device_node *child;
 
for_each_available_child_of_node(pdev->dev.of_node, child) {
-
-   if (!child->name)
-   continue;
-
ret = gpmc_probe_generic_child(pdev, child);
if (ret) {
-   dev_err(>dev, "failed to probe DT child '%s': 
%d\n",
-   child->name, ret);
+   dev_err(>dev, "failed to probe DT child '%pOFn': 
%d\n",
+   child, ret);
}
}
 }
diff --git a/drivers/memory/samsung/exynos-srom.c 
b/drivers/memory/samsung/exynos-srom.c
index 7edd7fb540f2..c27c6105c66d 100644
--- a/drivers/memory/samsung/exynos-srom.c
+++ b/drivers/memory/samsung/exynos-srom.c
@@ -139,8 +139,8 @@ static int exynos_srom_probe(struct platform_device *pdev)
for_each_child_of_node(np, child) {
if (exynos_srom_configure_bank(srom, child)) {
dev_err(dev,
-   "Could not decode bank configuration for %s\n",
-   child->name);
+   "Could not decode bank configuration for 
%pOFn\n",
+   child);
bad_bank_config = true;
}
}
diff --git a/drivers/memory/tegra/mc.c b/drivers/memory/tegra/mc.c
index bd25faf6d13d..24afc36833bf 100644
--- a/drivers/memory/tegra/mc.c
+++ b/drivers/memory/tegra/mc.c
@@ -345,7 +345,7 @@ static int load_one_timing(struct tegra_mc *mc,
err = of_property_read_u32(node, "clock-frequency", );
if (err) {
dev_err(mc->dev,
-   "timing %s: failed to read rate\n", node->name);
+   "timing %pOFn: failed to read rate\n", node);
return err;
}
 
@@ -360,8 +360,8 @@ static int load_one_timing(struct tegra_mc *mc,
 mc->soc->num_emem_regs);
if (err) {
dev_err(mc->dev,
-   "timing %s: failed to read EMEM configuration\n",
-   node->name);
+   "timing %pOFn: failed to read EMEM configuration\n",
+   node);
return err;
}
 
diff --git a/drivers/memory/tegra/tegra124-emc.c 
b/drivers/memory/tegra/tegra124-emc.c
index 392dc8dd481f..eedb7d48e2ea 100644
--- a/drivers/memory/tegra/tegra124-emc.c
+++ b/drivers/memory/tegra/tegra124-emc.c
@@ -888,8 +888,8 @@ static int load_one_timing_from_dt(struct tegra_emc *emc,
 
err = of_property_read_u32(node, "clock-frequency", );
if (err) {
-   dev_err(emc->dev, "timing %s: failed to read rate: %d\n",
-   node->name, err);
+   

[PATCH] regulator: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Liam Girdwood 
Cc: Mark Brown 
Cc: Sangbeom Kim 
Cc: Krzysztof Kozlowski 
Cc: Bartlomiej Zolnierkiewicz 
Cc: linux-samsung-...@vger.kernel.org
Signed-off-by: Rob Herring 
---
 drivers/regulator/max8997-regulator.c  |  4 +-
 drivers/regulator/mc13xxx-regulator-core.c |  2 +-
 drivers/regulator/of_regulator.c   | 44 +++---
 drivers/regulator/qcom-rpmh-regulator.c| 14 +++
 drivers/regulator/s5m8767.c| 12 +++---
 5 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/drivers/regulator/max8997-regulator.c 
b/drivers/regulator/max8997-regulator.c
index ad0c806b0737..3bf5ddfaaea8 100644
--- a/drivers/regulator/max8997-regulator.c
+++ b/drivers/regulator/max8997-regulator.c
@@ -929,8 +929,8 @@ static int max8997_pmic_dt_parse_pdata(struct 
platform_device *pdev,
break;
 
if (i == ARRAY_SIZE(regulators)) {
-   dev_warn(>dev, "don't know how to configure 
regulator %s\n",
-reg_np->name);
+   dev_warn(>dev, "don't know how to configure 
regulator %pOFn\n",
+reg_np);
continue;
}
 
diff --git a/drivers/regulator/mc13xxx-regulator-core.c 
b/drivers/regulator/mc13xxx-regulator-core.c
index da4fb9824757..65eb1e0350cf 100644
--- a/drivers/regulator/mc13xxx-regulator-core.c
+++ b/drivers/regulator/mc13xxx-regulator-core.c
@@ -203,7 +203,7 @@ struct mc13xxx_regulator_init_data 
*mc13xxx_parse_regulators_dt(
 
if (!found)
dev_warn(>dev,
-"Unknown regulator: %s\n", child->name);
+"Unknown regulator: %pOFn\n", child);
}
of_node_put(parent);
 
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index 638f17d4c848..92a516b959a7 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -95,8 +95,8 @@ static void of_get_regulation_constraints(struct device_node 
*np,
if (!ret)
constraints->settling_time_up = pval;
if (constraints->settling_time_up && constraints->settling_time) {
-   pr_warn("%s: ambiguous configuration for settling time, 
ignoring 'regulator-settling-time-up-us'\n",
-   np->name);
+   pr_warn("%pOFn: ambiguous configuration for settling time, 
ignoring 'regulator-settling-time-up-us'\n",
+   np);
constraints->settling_time_up = 0;
}
 
@@ -105,8 +105,8 @@ static void of_get_regulation_constraints(struct 
device_node *np,
if (!ret)
constraints->settling_time_down = pval;
if (constraints->settling_time_down && constraints->settling_time) {
-   pr_warn("%s: ambiguous configuration for settling time, 
ignoring 'regulator-settling-time-down-us'\n",
-   np->name);
+   pr_warn("%pOFn: ambiguous configuration for settling time, 
ignoring 'regulator-settling-time-down-us'\n",
+   np);
constraints->settling_time_down = 0;
}
 
@@ -127,12 +127,12 @@ static void of_get_regulation_constraints(struct 
device_node *np,
if (desc && desc->of_map_mode) {
mode = desc->of_map_mode(pval);
if (mode == REGULATOR_MODE_INVALID)
-   pr_err("%s: invalid mode %u\n", np->name, pval);
+   pr_err("%pOFn: invalid mode %u\n", np, pval);
else
constraints->initial_mode = mode;
} else {
-   pr_warn("%s: mapping for mode %d not defined\n",
-   np->name, pval);
+   pr_warn("%pOFn: mapping for mode %d not defined\n",
+   np, pval);
}
}
 
@@ -144,14 +144,14 @@ static void of_get_regulation_constraints(struct 
device_node *np,
ret = of_property_read_u32_index(np,
"regulator-allowed-modes", i, );
if (ret) {
-   pr_err("%s: couldn't read allowed modes 
index %d, ret=%d\n",
-   np->name, i, ret);
+   pr_err("%pOFn: couldn't read allowed 
modes index %d, ret=%d\n",
+   np, i, ret);
break;
}
mode = desc->of_map_mode(pval);
if (mode == REGULATOR_MODE_INVALID)
- 

[PATCH] regulator: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Liam Girdwood 
Cc: Mark Brown 
Cc: Sangbeom Kim 
Cc: Krzysztof Kozlowski 
Cc: Bartlomiej Zolnierkiewicz 
Cc: linux-samsung-...@vger.kernel.org
Signed-off-by: Rob Herring 
---
 drivers/regulator/max8997-regulator.c  |  4 +-
 drivers/regulator/mc13xxx-regulator-core.c |  2 +-
 drivers/regulator/of_regulator.c   | 44 +++---
 drivers/regulator/qcom-rpmh-regulator.c| 14 +++
 drivers/regulator/s5m8767.c| 12 +++---
 5 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/drivers/regulator/max8997-regulator.c 
b/drivers/regulator/max8997-regulator.c
index ad0c806b0737..3bf5ddfaaea8 100644
--- a/drivers/regulator/max8997-regulator.c
+++ b/drivers/regulator/max8997-regulator.c
@@ -929,8 +929,8 @@ static int max8997_pmic_dt_parse_pdata(struct 
platform_device *pdev,
break;
 
if (i == ARRAY_SIZE(regulators)) {
-   dev_warn(>dev, "don't know how to configure 
regulator %s\n",
-reg_np->name);
+   dev_warn(>dev, "don't know how to configure 
regulator %pOFn\n",
+reg_np);
continue;
}
 
diff --git a/drivers/regulator/mc13xxx-regulator-core.c 
b/drivers/regulator/mc13xxx-regulator-core.c
index da4fb9824757..65eb1e0350cf 100644
--- a/drivers/regulator/mc13xxx-regulator-core.c
+++ b/drivers/regulator/mc13xxx-regulator-core.c
@@ -203,7 +203,7 @@ struct mc13xxx_regulator_init_data 
*mc13xxx_parse_regulators_dt(
 
if (!found)
dev_warn(>dev,
-"Unknown regulator: %s\n", child->name);
+"Unknown regulator: %pOFn\n", child);
}
of_node_put(parent);
 
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index 638f17d4c848..92a516b959a7 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -95,8 +95,8 @@ static void of_get_regulation_constraints(struct device_node 
*np,
if (!ret)
constraints->settling_time_up = pval;
if (constraints->settling_time_up && constraints->settling_time) {
-   pr_warn("%s: ambiguous configuration for settling time, 
ignoring 'regulator-settling-time-up-us'\n",
-   np->name);
+   pr_warn("%pOFn: ambiguous configuration for settling time, 
ignoring 'regulator-settling-time-up-us'\n",
+   np);
constraints->settling_time_up = 0;
}
 
@@ -105,8 +105,8 @@ static void of_get_regulation_constraints(struct 
device_node *np,
if (!ret)
constraints->settling_time_down = pval;
if (constraints->settling_time_down && constraints->settling_time) {
-   pr_warn("%s: ambiguous configuration for settling time, 
ignoring 'regulator-settling-time-down-us'\n",
-   np->name);
+   pr_warn("%pOFn: ambiguous configuration for settling time, 
ignoring 'regulator-settling-time-down-us'\n",
+   np);
constraints->settling_time_down = 0;
}
 
@@ -127,12 +127,12 @@ static void of_get_regulation_constraints(struct 
device_node *np,
if (desc && desc->of_map_mode) {
mode = desc->of_map_mode(pval);
if (mode == REGULATOR_MODE_INVALID)
-   pr_err("%s: invalid mode %u\n", np->name, pval);
+   pr_err("%pOFn: invalid mode %u\n", np, pval);
else
constraints->initial_mode = mode;
} else {
-   pr_warn("%s: mapping for mode %d not defined\n",
-   np->name, pval);
+   pr_warn("%pOFn: mapping for mode %d not defined\n",
+   np, pval);
}
}
 
@@ -144,14 +144,14 @@ static void of_get_regulation_constraints(struct 
device_node *np,
ret = of_property_read_u32_index(np,
"regulator-allowed-modes", i, );
if (ret) {
-   pr_err("%s: couldn't read allowed modes 
index %d, ret=%d\n",
-   np->name, i, ret);
+   pr_err("%pOFn: couldn't read allowed 
modes index %d, ret=%d\n",
+   np, i, ret);
break;
}
mode = desc->of_map_mode(pval);
if (mode == REGULATOR_MODE_INVALID)
- 

[PATCH] rpmsg: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Ohad Ben-Cohen 
Cc: Bjorn Andersson 
Cc: linux-remotep...@vger.kernel.org
Signed-off-by: Rob Herring 
---
 drivers/rpmsg/qcom_glink_smem.c | 2 +-
 drivers/rpmsg/qcom_smd.c| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/rpmsg/qcom_glink_smem.c b/drivers/rpmsg/qcom_glink_smem.c
index 2b5cf2790954..ab23da3d7131 100644
--- a/drivers/rpmsg/qcom_glink_smem.c
+++ b/drivers/rpmsg/qcom_glink_smem.c
@@ -205,7 +205,7 @@ struct qcom_glink *qcom_glink_smem_register(struct device 
*parent,
dev->parent = parent;
dev->of_node = node;
dev->release = qcom_glink_smem_release;
-   dev_set_name(dev, "%s:%s", node->parent->name, node->name);
+   dev_set_name(dev, "%pOFn:%pOFn", node->parent, node);
ret = device_register(dev);
if (ret) {
pr_err("failed to register glink edge\n");
diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c
index 8da83a4ebadc..0dae7c9f4a8f 100644
--- a/drivers/rpmsg/qcom_smd.c
+++ b/drivers/rpmsg/qcom_smd.c
@@ -1454,7 +1454,7 @@ struct qcom_smd_edge *qcom_smd_register_edge(struct 
device *parent,
edge->dev.release = qcom_smd_edge_release;
edge->dev.of_node = node;
edge->dev.groups = qcom_smd_edge_groups;
-   dev_set_name(>dev, "%s:%s", dev_name(parent), node->name);
+   dev_set_name(>dev, "%s:%pOFn", dev_name(parent), node);
ret = device_register(>dev);
if (ret) {
pr_err("failed to register smd edge\n");
-- 
2.17.1



[PATCH] pinctrl: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Linus Walleij 
Cc: Dong Aisheng 
Cc: Fabio Estevam 
Cc: Shawn Guo 
Cc: Stefan Agner 
Cc: Pengutronix Kernel Team 
Cc: Sean Wang 
Cc: Matthias Brugger 
Cc: Carlo Caione 
Cc: Kevin Hilman 
Cc: Jason Cooper 
Cc: Andrew Lunn 
Cc: Gregory Clement 
Cc: Sebastian Hesselbarth 
Cc: Jean-Christophe Plagniol-Villard 
Cc: Nicolas Ferre 
Cc: Alexandre Belloni 
Cc: Heiko Stuebner 
Cc: Tony Lindgren 
Cc: Haojian Zhuang 
Cc: Patrice Chotard 
Cc: Barry Song 
Cc: Maxime Coquelin 
Cc: Alexandre Torgue 
Cc: Maxime Ripard 
Cc: Chen-Yu Tsai 
Cc: linux-g...@vger.kernel.org
Cc: linux-media...@lists.infradead.org
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-amlo...@lists.infradead.org
Cc: linux-rockc...@lists.infradead.org
Cc: linux-o...@vger.kernel.org
Signed-off-by: Rob Herring 
---
 drivers/pinctrl/berlin/berlin.c   |  6 ++--
 drivers/pinctrl/freescale/pinctrl-imx.c   |  7 ++--
 drivers/pinctrl/freescale/pinctrl-imx1-core.c | 12 +++
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c |  4 +--
 drivers/pinctrl/meson/pinctrl-meson.c |  2 +-
 drivers/pinctrl/mvebu/pinctrl-mvebu.c |  4 +--
 drivers/pinctrl/nomadik/pinctrl-nomadik.c |  6 ++--
 drivers/pinctrl/pinctrl-at91.c|  8 ++---
 drivers/pinctrl/pinctrl-lantiq.c  |  8 ++---
 drivers/pinctrl/pinctrl-rockchip.c|  8 ++---
 drivers/pinctrl/pinctrl-rza1.c|  8 ++---
 drivers/pinctrl/pinctrl-single.c  | 32 +--
 drivers/pinctrl/pinctrl-st.c  |  6 ++--
 drivers/pinctrl/sirf/pinctrl-atlas7.c |  4 +--
 drivers/pinctrl/stm32/pinctrl-stm32.c |  4 +--
 drivers/pinctrl/sunxi/pinctrl-sunxi.c |  8 ++---
 drivers/pinctrl/ti/pinctrl-ti-iodelay.c   |  8 ++---
 17 files changed, 66 insertions(+), 69 deletions(-)

diff --git a/drivers/pinctrl/berlin/berlin.c b/drivers/pinctrl/berlin/berlin.c
index b5903fffb3d0..b17a03cf87be 100644
--- a/drivers/pinctrl/berlin/berlin.c
+++ b/drivers/pinctrl/berlin/berlin.c
@@ -64,16 +64,14 @@ static int berlin_pinctrl_dt_node_to_map(struct pinctrl_dev 
*pctrl_dev,
ret = of_property_read_string(node, "function", _name);
if (ret) {
dev_err(pctrl->dev,
-   "missing function property in node %s\n",
-   node->name);
+   "missing function property in node %pOFn\n", node);
return -EINVAL;
}
 
ngroups = of_property_count_strings(node, "groups");
if (ngroups < 0) {
dev_err(pctrl->dev,
-   "missing groups property in node %s\n",
-   node->name);
+   "missing groups property in node %pOFn\n", node);
return -EINVAL;
}
 
diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c 
b/drivers/pinctrl/freescale/pinctrl-imx.c
index b04edc22dad7..4e8cf0e357c6 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx.c
@@ -69,8 +69,7 @@ static int imx_dt_node_to_map(struct pinctrl_dev *pctldev,
 */
grp = imx_pinctrl_find_group_by_name(pctldev, np->name);
if (!grp) {
-   dev_err(ipctl->dev, "unable to find group for node %s\n",
-   np->name);
+   dev_err(ipctl->dev, "unable to find group for node %pOFn\n", 
np);
return -EINVAL;
}
 
@@ -434,7 +433,7 @@ static int imx_pinctrl_parse_groups(struct device_node *np,
int i;
u32 config;
 
-   dev_dbg(ipctl->dev, "group(%d): %s\n", index, np->name);
+   dev_dbg(ipctl->dev, "group(%d): %pOFn\n", index, np);
 
if (info->flags & SHARE_MUX_CONF_REG)
pin_size = FSL_PIN_SHARE_SIZE;
@@ -544,7 +543,7 @@ static int imx_pinctrl_parse_functions(struct device_node 
*np,
struct group_desc *grp;
u32 i = 0;
 
-   dev_dbg(pctl->dev, "parse function(%d): %s\n", index, np->name);
+   dev_dbg(pctl->dev, "parse function(%d): %pOFn\n", index, np);
 
func = pinmux_generic_get_function(pctl, index);
if (!func)
diff --git a/drivers/pinctrl/freescale/pinctrl-imx1-core.c 
b/drivers/pinctrl/freescale/pinctrl-imx1-core.c
index deb7870b3d1a..7e29e3fecdb2 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx1-core.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx1-core.c
@@ -233,8 +233,8 @@ static int imx1_dt_node_to_map(struct pinctrl_dev *pctldev,
 */
grp = imx1_pinctrl_find_group_by_name(info, np->name);
if (!grp) {
-   dev_err(info->dev, "unable to find group for node %s\n",
-   np->name);
+   dev_err(info->dev, "unable to find group for node %pOFn\n",
+   np);
return -EINVAL;
}
 
@@ -466,7 +466,7 @@ static int 

[PATCH] net: ethernet: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: "David S. Miller" 
Cc: Yisen Zhuang 
Cc: Salil Mehta 
Cc: Sebastian Hesselbarth 
Cc: Felix Fietkau 
Cc: John Crispin 
Cc: Sean Wang 
Cc: Nelson Chang 
Cc: Matthias Brugger 
Cc: Wingman Kwok 
Cc: Murali Karicheri 
Cc: net...@vger.kernel.org

Signed-off-by: Rob Herring 
---
 drivers/net/ethernet/freescale/fsl_pq_mdio.c  |  4 +-
 .../net/ethernet/hisilicon/hns/hns_dsaf_mac.c |  8 ++--
 drivers/net/ethernet/marvell/mv643xx_eth.c|  6 +--
 drivers/net/ethernet/mediatek/mtk_eth_soc.c   |  2 +-
 drivers/net/ethernet/sun/sunhme.c |  2 +-
 drivers/net/ethernet/ti/netcp_core.c  | 22 --
 drivers/net/ethernet/ti/netcp_ethss.c | 42 +--
 7 files changed, 40 insertions(+), 46 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fsl_pq_mdio.c 
b/drivers/net/ethernet/freescale/fsl_pq_mdio.c
index ac2c3f6a12bc..82722d05fedb 100644
--- a/drivers/net/ethernet/freescale/fsl_pq_mdio.c
+++ b/drivers/net/ethernet/freescale/fsl_pq_mdio.c
@@ -446,8 +446,8 @@ static int fsl_pq_mdio_probe(struct platform_device *pdev)
goto error;
}
 
-   snprintf(new_bus->id, MII_BUS_ID_SIZE, "%s@%llx", np->name,
-   (unsigned long long)res.start);
+   snprintf(new_bus->id, MII_BUS_ID_SIZE, "%pOFn@%llx", np,
+(unsigned long long)res.start);
 
priv->map = of_iomap(np, 0);
if (!priv->map) {
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c 
b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c
index 1c2326bd76e2..6521d8d53745 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c
@@ -807,8 +807,8 @@ static int hns_mac_get_info(struct hns_mac_cb *mac_cb)
 */
put_device(_cb->phy_dev->mdio.dev);
 
-   dev_dbg(mac_cb->dev, "mac%d phy_node: %s\n",
-   mac_cb->mac_id, np->name);
+   dev_dbg(mac_cb->dev, "mac%d phy_node: %pOFn\n",
+   mac_cb->mac_id, np);
}
of_node_put(np);
 
@@ -825,8 +825,8 @@ static int hns_mac_get_info(struct hns_mac_cb *mac_cb)
 * if the phy_dev is found
 */
put_device(_cb->phy_dev->mdio.dev);
-   dev_dbg(mac_cb->dev, "mac%d phy_node: %s\n",
-   mac_cb->mac_id, np->name);
+   dev_dbg(mac_cb->dev, "mac%d phy_node: %pOFn\n",
+   mac_cb->mac_id, np);
}
of_node_put(np);
 
diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c 
b/drivers/net/ethernet/marvell/mv643xx_eth.c
index 62f204f32316..1e9bcbdc6a90 100644
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
@@ -2733,17 +2733,17 @@ static int mv643xx_eth_shared_of_add_port(struct 
platform_device *pdev,
 
memset(, 0, sizeof(res));
if (of_irq_to_resource(pnp, 0, ) <= 0) {
-   dev_err(>dev, "missing interrupt on %s\n", pnp->name);
+   dev_err(>dev, "missing interrupt on %pOFn\n", pnp);
return -EINVAL;
}
 
if (of_property_read_u32(pnp, "reg", _number)) {
-   dev_err(>dev, "missing reg property on %s\n", pnp->name);
+   dev_err(>dev, "missing reg property on %pOFn\n", pnp);
return -EINVAL;
}
 
if (ppd.port_number >= 3) {
-   dev_err(>dev, "invalid reg property on %s\n", pnp->name);
+   dev_err(>dev, "invalid reg property on %pOFn\n", pnp);
return -EINVAL;
}
 
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c 
b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index 6e6abdc399de..b44bcfd85b05 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -405,7 +405,7 @@ static int mtk_mdio_init(struct mtk_eth *eth)
eth->mii_bus->priv = eth;
eth->mii_bus->parent = eth->dev;
 
-   snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%s", mii_np->name);
+   snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%pOFn", mii_np);
ret = of_mdiobus_register(eth->mii_bus, mii_np);
 
 err_put_node:
diff --git a/drivers/net/ethernet/sun/sunhme.c 
b/drivers/net/ethernet/sun/sunhme.c
index 06da2f59fcbf..863fd602fd33 100644
--- a/drivers/net/ethernet/sun/sunhme.c
+++ b/drivers/net/ethernet/sun/sunhme.c
@@ -2999,7 +2999,7 @@ static int happy_meal_pci_probe(struct pci_dev *pdev,
/* Now make sure pci_dev cookie is there. */
 #ifdef CONFIG_SPARC
dp = pci_device_to_OF_node(pdev);
-   strcpy(prom_name, dp->name);
+   snprintf(prom_name, sizeof(prom_name), "%pOFn", dp);
 #else
if 

[PATCH] rpmsg: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Ohad Ben-Cohen 
Cc: Bjorn Andersson 
Cc: linux-remotep...@vger.kernel.org
Signed-off-by: Rob Herring 
---
 drivers/rpmsg/qcom_glink_smem.c | 2 +-
 drivers/rpmsg/qcom_smd.c| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/rpmsg/qcom_glink_smem.c b/drivers/rpmsg/qcom_glink_smem.c
index 2b5cf2790954..ab23da3d7131 100644
--- a/drivers/rpmsg/qcom_glink_smem.c
+++ b/drivers/rpmsg/qcom_glink_smem.c
@@ -205,7 +205,7 @@ struct qcom_glink *qcom_glink_smem_register(struct device 
*parent,
dev->parent = parent;
dev->of_node = node;
dev->release = qcom_glink_smem_release;
-   dev_set_name(dev, "%s:%s", node->parent->name, node->name);
+   dev_set_name(dev, "%pOFn:%pOFn", node->parent, node);
ret = device_register(dev);
if (ret) {
pr_err("failed to register glink edge\n");
diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c
index 8da83a4ebadc..0dae7c9f4a8f 100644
--- a/drivers/rpmsg/qcom_smd.c
+++ b/drivers/rpmsg/qcom_smd.c
@@ -1454,7 +1454,7 @@ struct qcom_smd_edge *qcom_smd_register_edge(struct 
device *parent,
edge->dev.release = qcom_smd_edge_release;
edge->dev.of_node = node;
edge->dev.groups = qcom_smd_edge_groups;
-   dev_set_name(>dev, "%s:%s", dev_name(parent), node->name);
+   dev_set_name(>dev, "%s:%pOFn", dev_name(parent), node);
ret = device_register(>dev);
if (ret) {
pr_err("failed to register smd edge\n");
-- 
2.17.1



[PATCH] pinctrl: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Linus Walleij 
Cc: Dong Aisheng 
Cc: Fabio Estevam 
Cc: Shawn Guo 
Cc: Stefan Agner 
Cc: Pengutronix Kernel Team 
Cc: Sean Wang 
Cc: Matthias Brugger 
Cc: Carlo Caione 
Cc: Kevin Hilman 
Cc: Jason Cooper 
Cc: Andrew Lunn 
Cc: Gregory Clement 
Cc: Sebastian Hesselbarth 
Cc: Jean-Christophe Plagniol-Villard 
Cc: Nicolas Ferre 
Cc: Alexandre Belloni 
Cc: Heiko Stuebner 
Cc: Tony Lindgren 
Cc: Haojian Zhuang 
Cc: Patrice Chotard 
Cc: Barry Song 
Cc: Maxime Coquelin 
Cc: Alexandre Torgue 
Cc: Maxime Ripard 
Cc: Chen-Yu Tsai 
Cc: linux-g...@vger.kernel.org
Cc: linux-media...@lists.infradead.org
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-amlo...@lists.infradead.org
Cc: linux-rockc...@lists.infradead.org
Cc: linux-o...@vger.kernel.org
Signed-off-by: Rob Herring 
---
 drivers/pinctrl/berlin/berlin.c   |  6 ++--
 drivers/pinctrl/freescale/pinctrl-imx.c   |  7 ++--
 drivers/pinctrl/freescale/pinctrl-imx1-core.c | 12 +++
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c |  4 +--
 drivers/pinctrl/meson/pinctrl-meson.c |  2 +-
 drivers/pinctrl/mvebu/pinctrl-mvebu.c |  4 +--
 drivers/pinctrl/nomadik/pinctrl-nomadik.c |  6 ++--
 drivers/pinctrl/pinctrl-at91.c|  8 ++---
 drivers/pinctrl/pinctrl-lantiq.c  |  8 ++---
 drivers/pinctrl/pinctrl-rockchip.c|  8 ++---
 drivers/pinctrl/pinctrl-rza1.c|  8 ++---
 drivers/pinctrl/pinctrl-single.c  | 32 +--
 drivers/pinctrl/pinctrl-st.c  |  6 ++--
 drivers/pinctrl/sirf/pinctrl-atlas7.c |  4 +--
 drivers/pinctrl/stm32/pinctrl-stm32.c |  4 +--
 drivers/pinctrl/sunxi/pinctrl-sunxi.c |  8 ++---
 drivers/pinctrl/ti/pinctrl-ti-iodelay.c   |  8 ++---
 17 files changed, 66 insertions(+), 69 deletions(-)

diff --git a/drivers/pinctrl/berlin/berlin.c b/drivers/pinctrl/berlin/berlin.c
index b5903fffb3d0..b17a03cf87be 100644
--- a/drivers/pinctrl/berlin/berlin.c
+++ b/drivers/pinctrl/berlin/berlin.c
@@ -64,16 +64,14 @@ static int berlin_pinctrl_dt_node_to_map(struct pinctrl_dev 
*pctrl_dev,
ret = of_property_read_string(node, "function", _name);
if (ret) {
dev_err(pctrl->dev,
-   "missing function property in node %s\n",
-   node->name);
+   "missing function property in node %pOFn\n", node);
return -EINVAL;
}
 
ngroups = of_property_count_strings(node, "groups");
if (ngroups < 0) {
dev_err(pctrl->dev,
-   "missing groups property in node %s\n",
-   node->name);
+   "missing groups property in node %pOFn\n", node);
return -EINVAL;
}
 
diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c 
b/drivers/pinctrl/freescale/pinctrl-imx.c
index b04edc22dad7..4e8cf0e357c6 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx.c
@@ -69,8 +69,7 @@ static int imx_dt_node_to_map(struct pinctrl_dev *pctldev,
 */
grp = imx_pinctrl_find_group_by_name(pctldev, np->name);
if (!grp) {
-   dev_err(ipctl->dev, "unable to find group for node %s\n",
-   np->name);
+   dev_err(ipctl->dev, "unable to find group for node %pOFn\n", 
np);
return -EINVAL;
}
 
@@ -434,7 +433,7 @@ static int imx_pinctrl_parse_groups(struct device_node *np,
int i;
u32 config;
 
-   dev_dbg(ipctl->dev, "group(%d): %s\n", index, np->name);
+   dev_dbg(ipctl->dev, "group(%d): %pOFn\n", index, np);
 
if (info->flags & SHARE_MUX_CONF_REG)
pin_size = FSL_PIN_SHARE_SIZE;
@@ -544,7 +543,7 @@ static int imx_pinctrl_parse_functions(struct device_node 
*np,
struct group_desc *grp;
u32 i = 0;
 
-   dev_dbg(pctl->dev, "parse function(%d): %s\n", index, np->name);
+   dev_dbg(pctl->dev, "parse function(%d): %pOFn\n", index, np);
 
func = pinmux_generic_get_function(pctl, index);
if (!func)
diff --git a/drivers/pinctrl/freescale/pinctrl-imx1-core.c 
b/drivers/pinctrl/freescale/pinctrl-imx1-core.c
index deb7870b3d1a..7e29e3fecdb2 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx1-core.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx1-core.c
@@ -233,8 +233,8 @@ static int imx1_dt_node_to_map(struct pinctrl_dev *pctldev,
 */
grp = imx1_pinctrl_find_group_by_name(info, np->name);
if (!grp) {
-   dev_err(info->dev, "unable to find group for node %s\n",
-   np->name);
+   dev_err(info->dev, "unable to find group for node %pOFn\n",
+   np);
return -EINVAL;
}
 
@@ -466,7 +466,7 @@ static int 

[PATCH] net: ethernet: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: "David S. Miller" 
Cc: Yisen Zhuang 
Cc: Salil Mehta 
Cc: Sebastian Hesselbarth 
Cc: Felix Fietkau 
Cc: John Crispin 
Cc: Sean Wang 
Cc: Nelson Chang 
Cc: Matthias Brugger 
Cc: Wingman Kwok 
Cc: Murali Karicheri 
Cc: net...@vger.kernel.org

Signed-off-by: Rob Herring 
---
 drivers/net/ethernet/freescale/fsl_pq_mdio.c  |  4 +-
 .../net/ethernet/hisilicon/hns/hns_dsaf_mac.c |  8 ++--
 drivers/net/ethernet/marvell/mv643xx_eth.c|  6 +--
 drivers/net/ethernet/mediatek/mtk_eth_soc.c   |  2 +-
 drivers/net/ethernet/sun/sunhme.c |  2 +-
 drivers/net/ethernet/ti/netcp_core.c  | 22 --
 drivers/net/ethernet/ti/netcp_ethss.c | 42 +--
 7 files changed, 40 insertions(+), 46 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fsl_pq_mdio.c 
b/drivers/net/ethernet/freescale/fsl_pq_mdio.c
index ac2c3f6a12bc..82722d05fedb 100644
--- a/drivers/net/ethernet/freescale/fsl_pq_mdio.c
+++ b/drivers/net/ethernet/freescale/fsl_pq_mdio.c
@@ -446,8 +446,8 @@ static int fsl_pq_mdio_probe(struct platform_device *pdev)
goto error;
}
 
-   snprintf(new_bus->id, MII_BUS_ID_SIZE, "%s@%llx", np->name,
-   (unsigned long long)res.start);
+   snprintf(new_bus->id, MII_BUS_ID_SIZE, "%pOFn@%llx", np,
+(unsigned long long)res.start);
 
priv->map = of_iomap(np, 0);
if (!priv->map) {
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c 
b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c
index 1c2326bd76e2..6521d8d53745 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c
@@ -807,8 +807,8 @@ static int hns_mac_get_info(struct hns_mac_cb *mac_cb)
 */
put_device(_cb->phy_dev->mdio.dev);
 
-   dev_dbg(mac_cb->dev, "mac%d phy_node: %s\n",
-   mac_cb->mac_id, np->name);
+   dev_dbg(mac_cb->dev, "mac%d phy_node: %pOFn\n",
+   mac_cb->mac_id, np);
}
of_node_put(np);
 
@@ -825,8 +825,8 @@ static int hns_mac_get_info(struct hns_mac_cb *mac_cb)
 * if the phy_dev is found
 */
put_device(_cb->phy_dev->mdio.dev);
-   dev_dbg(mac_cb->dev, "mac%d phy_node: %s\n",
-   mac_cb->mac_id, np->name);
+   dev_dbg(mac_cb->dev, "mac%d phy_node: %pOFn\n",
+   mac_cb->mac_id, np);
}
of_node_put(np);
 
diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c 
b/drivers/net/ethernet/marvell/mv643xx_eth.c
index 62f204f32316..1e9bcbdc6a90 100644
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
@@ -2733,17 +2733,17 @@ static int mv643xx_eth_shared_of_add_port(struct 
platform_device *pdev,
 
memset(, 0, sizeof(res));
if (of_irq_to_resource(pnp, 0, ) <= 0) {
-   dev_err(>dev, "missing interrupt on %s\n", pnp->name);
+   dev_err(>dev, "missing interrupt on %pOFn\n", pnp);
return -EINVAL;
}
 
if (of_property_read_u32(pnp, "reg", _number)) {
-   dev_err(>dev, "missing reg property on %s\n", pnp->name);
+   dev_err(>dev, "missing reg property on %pOFn\n", pnp);
return -EINVAL;
}
 
if (ppd.port_number >= 3) {
-   dev_err(>dev, "invalid reg property on %s\n", pnp->name);
+   dev_err(>dev, "invalid reg property on %pOFn\n", pnp);
return -EINVAL;
}
 
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c 
b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index 6e6abdc399de..b44bcfd85b05 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -405,7 +405,7 @@ static int mtk_mdio_init(struct mtk_eth *eth)
eth->mii_bus->priv = eth;
eth->mii_bus->parent = eth->dev;
 
-   snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%s", mii_np->name);
+   snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%pOFn", mii_np);
ret = of_mdiobus_register(eth->mii_bus, mii_np);
 
 err_put_node:
diff --git a/drivers/net/ethernet/sun/sunhme.c 
b/drivers/net/ethernet/sun/sunhme.c
index 06da2f59fcbf..863fd602fd33 100644
--- a/drivers/net/ethernet/sun/sunhme.c
+++ b/drivers/net/ethernet/sun/sunhme.c
@@ -2999,7 +2999,7 @@ static int happy_meal_pci_probe(struct pci_dev *pdev,
/* Now make sure pci_dev cookie is there. */
 #ifdef CONFIG_SPARC
dp = pci_device_to_OF_node(pdev);
-   strcpy(prom_name, dp->name);
+   snprintf(prom_name, sizeof(prom_name), "%pOFn", dp);
 #else
if 

[PATCH] perf: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Will Deacon 
Cc: Mark Rutland 
Cc: linux-arm-ker...@lists.infradead.org
Signed-off-by: Rob Herring 
---
 drivers/perf/arm_pmu_platform.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/perf/arm_pmu_platform.c b/drivers/perf/arm_pmu_platform.c
index 96075cecb0ae..933bd8410fc2 100644
--- a/drivers/perf/arm_pmu_platform.c
+++ b/drivers/perf/arm_pmu_platform.c
@@ -77,14 +77,14 @@ static int pmu_parse_irq_affinity(struct device_node *node, 
int i)
 
dn = of_parse_phandle(node, "interrupt-affinity", i);
if (!dn) {
-   pr_warn("failed to parse interrupt-affinity[%d] for %s\n",
-   i, node->name);
+   pr_warn("failed to parse interrupt-affinity[%d] for %pOFn\n",
+   i, node);
return -EINVAL;
}
 
cpu = of_cpu_node_to_id(dn);
if (cpu < 0) {
-   pr_warn("failed to find logical CPU for %s\n", dn->name);
+   pr_warn("failed to find logical CPU for %pOFn\n", dn);
cpu = nr_cpu_ids;
}
 
-- 
2.17.1



[PATCH] perf: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Will Deacon 
Cc: Mark Rutland 
Cc: linux-arm-ker...@lists.infradead.org
Signed-off-by: Rob Herring 
---
 drivers/perf/arm_pmu_platform.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/perf/arm_pmu_platform.c b/drivers/perf/arm_pmu_platform.c
index 96075cecb0ae..933bd8410fc2 100644
--- a/drivers/perf/arm_pmu_platform.c
+++ b/drivers/perf/arm_pmu_platform.c
@@ -77,14 +77,14 @@ static int pmu_parse_irq_affinity(struct device_node *node, 
int i)
 
dn = of_parse_phandle(node, "interrupt-affinity", i);
if (!dn) {
-   pr_warn("failed to parse interrupt-affinity[%d] for %s\n",
-   i, node->name);
+   pr_warn("failed to parse interrupt-affinity[%d] for %pOFn\n",
+   i, node);
return -EINVAL;
}
 
cpu = of_cpu_node_to_id(dn);
if (cpu < 0) {
-   pr_warn("failed to find logical CPU for %s\n", dn->name);
+   pr_warn("failed to find logical CPU for %pOFn\n", dn);
cpu = nr_cpu_ids;
}
 
-- 
2.17.1



[PATCH] thermal: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Zhang Rui 
Cc: Eduardo Valentin 
Cc: Daniel Lezcano 
Cc: linux...@vger.kernel.org
Signed-off-by: Rob Herring 
---
 drivers/thermal/of-thermal.c| 10 +-
 drivers/thermal/qoriq_thermal.c |  4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c
index 977a8307fbb1..e201ae1c382f 100644
--- a/drivers/thermal/of-thermal.c
+++ b/drivers/thermal/of-thermal.c
@@ -483,8 +483,8 @@ thermal_zone_of_sensor_register(struct device *dev, int 
sensor_id, void *data,
if (sensor_specs.args_count >= 1) {
id = sensor_specs.args[0];
WARN(sensor_specs.args_count > 1,
-"%s: too many cells in sensor specifier %d\n",
-sensor_specs.np->name, sensor_specs.args_count);
+"%pOFn: too many cells in sensor specifier %d\n",
+sensor_specs.np, sensor_specs.args_count);
} else {
id = 0;
}
@@ -960,8 +960,8 @@ int __init of_parse_thermal_zones(void)
 
tz = thermal_of_build_thermal_zone(child);
if (IS_ERR(tz)) {
-   pr_err("failed to build thermal zone %s: %ld\n",
-  child->name,
+   pr_err("failed to build thermal zone %pOFn: %ld\n",
+  child,
   PTR_ERR(tz));
continue;
}
@@ -995,7 +995,7 @@ int __init of_parse_thermal_zones(void)
tz->passive_delay,
tz->polling_delay);
if (IS_ERR(zone)) {
-   pr_err("Failed to build %s zone %ld\n", child->name,
+   pr_err("Failed to build %pOFn zone %ld\n", child,
   PTR_ERR(zone));
kfree(tzp);
kfree(ops);
diff --git a/drivers/thermal/qoriq_thermal.c b/drivers/thermal/qoriq_thermal.c
index c866cc165960..1fa132fc316b 100644
--- a/drivers/thermal/qoriq_thermal.c
+++ b/drivers/thermal/qoriq_thermal.c
@@ -129,8 +129,8 @@ static int qoriq_tmu_get_sensor_id(void)
if (sensor_specs.args_count >= 1) {
id = sensor_specs.args[0];
WARN(sensor_specs.args_count > 1,
-   "%s: too many cells in sensor specifier %d\n",
-   sensor_specs.np->name, sensor_specs.args_count);
+   "%pOFn: too many cells in sensor specifier 
%d\n",
+   sensor_specs.np, sensor_specs.args_count);
} else {
id = 0;
}
-- 
2.17.1



[PATCH] uio: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Greg Kroah-Hartman 
Signed-off-by: Rob Herring 
---
 drivers/uio/uio_fsl_elbc_gpcm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/uio/uio_fsl_elbc_gpcm.c b/drivers/uio/uio_fsl_elbc_gpcm.c
index bbc17effae5e..9cc37fe07d35 100644
--- a/drivers/uio/uio_fsl_elbc_gpcm.c
+++ b/drivers/uio/uio_fsl_elbc_gpcm.c
@@ -382,8 +382,7 @@ static int uio_fsl_elbc_gpcm_probe(struct platform_device 
*pdev)
}
 
/* set all UIO data */
-   if (node->name)
-   info->mem[0].name = kstrdup(node->name, GFP_KERNEL);
+   info->mem[0].name = kasprintf(GFP_KERNEL, "%pOFn", node);
info->mem[0].addr = res.start;
info->mem[0].size = resource_size();
info->mem[0].memtype = UIO_MEM_PHYS;
-- 
2.17.1



[PATCH] mailbox: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Jassi Brar 
Signed-off-by: Rob Herring 
---
 drivers/mailbox/ti-msgmgr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mailbox/ti-msgmgr.c b/drivers/mailbox/ti-msgmgr.c
index 5bceafbf6699..713d701b6568 100644
--- a/drivers/mailbox/ti-msgmgr.c
+++ b/drivers/mailbox/ti-msgmgr.c
@@ -560,8 +560,8 @@ static struct mbox_chan *ti_msgmgr_of_xlate(struct 
mbox_controller *mbox,
}
 
 err:
-   dev_err(inst->dev, "Queue ID %d, Proxy ID %d is wrong on %s\n",
-   req_qid, req_pid, p->np->name);
+   dev_err(inst->dev, "Queue ID %d, Proxy ID %d is wrong on %pOFn\n",
+   req_qid, req_pid, p->np);
return ERR_PTR(-ENOENT);
 }
 
-- 
2.17.1



[PATCH] thermal: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Zhang Rui 
Cc: Eduardo Valentin 
Cc: Daniel Lezcano 
Cc: linux...@vger.kernel.org
Signed-off-by: Rob Herring 
---
 drivers/thermal/of-thermal.c| 10 +-
 drivers/thermal/qoriq_thermal.c |  4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c
index 977a8307fbb1..e201ae1c382f 100644
--- a/drivers/thermal/of-thermal.c
+++ b/drivers/thermal/of-thermal.c
@@ -483,8 +483,8 @@ thermal_zone_of_sensor_register(struct device *dev, int 
sensor_id, void *data,
if (sensor_specs.args_count >= 1) {
id = sensor_specs.args[0];
WARN(sensor_specs.args_count > 1,
-"%s: too many cells in sensor specifier %d\n",
-sensor_specs.np->name, sensor_specs.args_count);
+"%pOFn: too many cells in sensor specifier %d\n",
+sensor_specs.np, sensor_specs.args_count);
} else {
id = 0;
}
@@ -960,8 +960,8 @@ int __init of_parse_thermal_zones(void)
 
tz = thermal_of_build_thermal_zone(child);
if (IS_ERR(tz)) {
-   pr_err("failed to build thermal zone %s: %ld\n",
-  child->name,
+   pr_err("failed to build thermal zone %pOFn: %ld\n",
+  child,
   PTR_ERR(tz));
continue;
}
@@ -995,7 +995,7 @@ int __init of_parse_thermal_zones(void)
tz->passive_delay,
tz->polling_delay);
if (IS_ERR(zone)) {
-   pr_err("Failed to build %s zone %ld\n", child->name,
+   pr_err("Failed to build %pOFn zone %ld\n", child,
   PTR_ERR(zone));
kfree(tzp);
kfree(ops);
diff --git a/drivers/thermal/qoriq_thermal.c b/drivers/thermal/qoriq_thermal.c
index c866cc165960..1fa132fc316b 100644
--- a/drivers/thermal/qoriq_thermal.c
+++ b/drivers/thermal/qoriq_thermal.c
@@ -129,8 +129,8 @@ static int qoriq_tmu_get_sensor_id(void)
if (sensor_specs.args_count >= 1) {
id = sensor_specs.args[0];
WARN(sensor_specs.args_count > 1,
-   "%s: too many cells in sensor specifier %d\n",
-   sensor_specs.np->name, sensor_specs.args_count);
+   "%pOFn: too many cells in sensor specifier 
%d\n",
+   sensor_specs.np, sensor_specs.args_count);
} else {
id = 0;
}
-- 
2.17.1



[PATCH] uio: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Greg Kroah-Hartman 
Signed-off-by: Rob Herring 
---
 drivers/uio/uio_fsl_elbc_gpcm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/uio/uio_fsl_elbc_gpcm.c b/drivers/uio/uio_fsl_elbc_gpcm.c
index bbc17effae5e..9cc37fe07d35 100644
--- a/drivers/uio/uio_fsl_elbc_gpcm.c
+++ b/drivers/uio/uio_fsl_elbc_gpcm.c
@@ -382,8 +382,7 @@ static int uio_fsl_elbc_gpcm_probe(struct platform_device 
*pdev)
}
 
/* set all UIO data */
-   if (node->name)
-   info->mem[0].name = kstrdup(node->name, GFP_KERNEL);
+   info->mem[0].name = kasprintf(GFP_KERNEL, "%pOFn", node);
info->mem[0].addr = res.start;
info->mem[0].size = resource_size();
info->mem[0].memtype = UIO_MEM_PHYS;
-- 
2.17.1



[PATCH] mailbox: Convert to using %pOFn instead of device_node.name

2018-08-27 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Jassi Brar 
Signed-off-by: Rob Herring 
---
 drivers/mailbox/ti-msgmgr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mailbox/ti-msgmgr.c b/drivers/mailbox/ti-msgmgr.c
index 5bceafbf6699..713d701b6568 100644
--- a/drivers/mailbox/ti-msgmgr.c
+++ b/drivers/mailbox/ti-msgmgr.c
@@ -560,8 +560,8 @@ static struct mbox_chan *ti_msgmgr_of_xlate(struct 
mbox_controller *mbox,
}
 
 err:
-   dev_err(inst->dev, "Queue ID %d, Proxy ID %d is wrong on %s\n",
-   req_qid, req_pid, p->np->name);
+   dev_err(inst->dev, "Queue ID %d, Proxy ID %d is wrong on %pOFn\n",
+   req_qid, req_pid, p->np);
return ERR_PTR(-ENOENT);
 }
 
-- 
2.17.1



  1   2   3   4   5   6   7   8   9   10   >