Re: arch/arc/ allmodconfig

2018-07-23 Thread Leon Romanovsky
On Mon, Jul 23, 2018 at 04:36:57PM +, Vineet Gupta wrote:
> Hi Ofer,
>
> On 07/23/2018 01:34 AM, Ofer Levi(SW) wrote:
> > Hi Vineet, randy
> >
> > Indeed this structure is missing, following is a patch based on 
> > linux-4.17.9.
> > Sorry about that.
> >
> > Thanks
> >
> >
> > diff -uprN linux-4.17.9.org/arch/arc/plat-eznps/include/plat/ctop.h 
> > linux-4.17.9/arch/arc/plat-eznps/include/plat/ctop.h
> > --- linux-4.17.9.org/arch/arc/plat-eznps/include/plat/ctop.h2018-07-22 
> > 16:16:09.0 +0300
> > +++ linux-4.17.9/arch/arc/plat-eznps/include/plat/ctop.h2018-07-23 
> > 11:18:12.179402620 +0300
> > @@ -143,6 +143,15 @@ struct nps_host_reg_gim_p_int_dst {
> >  };
> >
> >  /* AUX registers definition */
> > +struct nps_host_reg_aux_dpc {
> > +   union {
> > +   struct {
> > +   u32 ien:1, men:1, hen:1, reserved:29;
> > +   };
> > +   u32 value;
> > +   };
> > +};
> > +
> >  struct nps_host_reg_aux_udmc {
> > union {
> > struct {
>
> Thx for this change. Can you please send a proper patch with changelog, 
> citing the
> issue as Reported-by etc.
> Also if Mellanox is interested in maintaining the NPS port going fwd, someone 
> (you
> ?) should add their name to MAINTAINERS file under arch/arc/plat-eznps and 
> send
> that patch as well.

Hi Vineet,

Thanks for your feedback, I'll work with Ofer to make it happen.

>
> Thx,
> -Vineet
>
>
> >
> >
> >
> >
> >> -Original Message-
> >> From: Meir Lichtinger
> >> Sent: Friday, July 20, 2018 10:19
> >> To: Vineet Gupta ; Randy Dunlap
> >> ; LKML ; linux-
> >> snps-...@lists.infradead.org; Ofer Levi(SW) 
> >> Cc: Leon Romanovsky 
> >> Subject: RE: arch/arc/ allmodconfig
> >>
> >> Hi Vineet,
> >> Ofer Levi is now the maintainer of arch/arc/plat-eznps
> >>
> >> Ofer,
> >> Please take care of the issue below
> >>
> >> Thanks
> >>
> >>
> >> -Original Message-
> >> From: Vineet Gupta [mailto:vineet.gup...@synopsys.com]
> >> Sent: Thursday, July 19, 2018 19:22
> >> To: Randy Dunlap ; LKML  >> ker...@vger.kernel.org>; Vineet Gupta ;
> >> linux-snps-arc@lists.infradead.org
> >> Cc: Elad Kanfi ; Leon Romanovsky
> >> 
> >> Subject: Re: arch/arc/ allmodconfig
> >>
> >> +CC some folks from Mellanox
> >>
> >> On 07/18/2018 10:37 PM, Randy Dunlap wrote:
> >>> Hi,
> >>>
> >>> When I try to (cross-)build arch/arc/ allmodconfig, I get a syntax error 
> >>> here:
> >>>
> >>> ./arch/arc/plat-eznps/mtm.c: In function 'mtm_enable_core':
> >>> ../arch/arc/plat-eznps/mtm.c:113:30: error: storage size of 'dpc' isn't 
> >>> known
> >>>   struct nps_host_reg_aux_dpc dpc;
> >>>   ^~~
> >>>
> >>> There is no struct nps_host_reg_aux_dpc in the kernel tree.
> >>>
> >>> Can you do something about this, please?
> >> Thx for the report Randy. I'm calling out Mellanox folks to see if they can
> >> provide a fixup, else we will revert the corresponding change.
> >>
> >> @Elad, upstream commit 3f9cd874dcc8705 "ARC: [plat-eznps] avoid toggling
> >> of DPC register" added reference to struct nps_host_reg_aux_dpc but the
> >> definition is missing. Can you please provide a fixup as I have no idea of 
> >> that
> >> platform specific struct.
> >>
> >> @ Leon, reaching our to you, since it seems you removed Elad from
> >> MAINTAINERS file, so I'm not sure if he is still at Mellanox.
> >> The two folks I worked with on EZCHiip Linux port Noam Camus and Gilad
> >> have left Mellanox.
> >> If you or someone from Mellanox are interested in maintaining this 
> >> platform,
> >> please update the arch/arc/plat-eznps section of MAINTAINERS file.
> >>
> >>
> >> Thx,
> >> -Vineet
>

___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc


[PATCH RESEND] ARC: Add Ofer Levi as plat-eznps maintainer

2018-07-24 Thread Leon Romanovsky
From: Leon Romanovsky 

Signed-off-by: Leon Romanovsky 
---
 Resend with proper Vineet's email
---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index c79f306a936a..6be664ed0527 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5444,6 +5444,7 @@ F:drivers/iommu/exynos-iommu.c

 EZchip NPS platform support
 M: Vineet Gupta 
+M: Ofer Levi 
 S: Supported
 F: arch/arc/plat-eznps
 F: arch/arc/boot/dts/eznps.dts
--
2.14.4


___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc


[PATCH RESEND] ARC: [plat-eznps] Add missing struct nps_host_reg_aux_dpc

2018-07-28 Thread Leon Romanovsky
From: Ofer Levi 

Fixing compilation issue caused by missing struct nps_host_reg_aux_dpc
definition.

Fixes: 3f9cd874dcc87 ("ARC: [plat-eznps] avoid toggling of DPC register")
Reported-by: Randy Dunlap 
Signed-off-by: Ofer Levi 
---
 arch/arc/plat-eznps/include/plat/ctop.h |9 +
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/arc/plat-eznps/include/plat/ctop.h 
b/arch/arc/plat-eznps/include/plat/ctop.h
index 0c7d110..bd34b96 100644
--- a/arch/arc/plat-eznps/include/plat/ctop.h
+++ b/arch/arc/plat-eznps/include/plat/ctop.h
@@ -143,6 +143,15 @@ struct nps_host_reg_gim_p_int_dst {
 };

 /* AUX registers definition */
+struct nps_host_reg_aux_dpc {
+   union {
+   struct {
+   u32 ien:1, men:1, hen:1, reserved:29;
+   };
+   u32 value;
+   };
+};
+
 struct nps_host_reg_aux_udmc {
union {
struct {
--
1.7.1


___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc


Re: arch/arc/ allmodconfig

2018-07-28 Thread Leon Romanovsky
On Fri, Jul 27, 2018 at 08:14:31PM +, Vineet Gupta wrote:
> On 07/23/2018 10:02 AM, Leon Romanovsky wrote:
> >>> diff -uprN linux-4.17.9.org/arch/arc/plat-eznps/include/plat/ctop.h 
> >>> linux-4.17.9/arch/arc/plat-eznps/include/plat/ctop.h
> >>> --- linux-4.17.9.org/arch/arc/plat-eznps/include/plat/ctop.h
> >>> 2018-07-22 16:16:09.0 +0300
> >>> +++ linux-4.17.9/arch/arc/plat-eznps/include/plat/ctop.h
> >>> 2018-07-23 11:18:12.179402620 +0300
> >>> @@ -143,6 +143,15 @@ struct nps_host_reg_gim_p_int_dst {
> >>>  };
> >>>
> >>>  /* AUX registers definition */
> >>> +struct nps_host_reg_aux_dpc {
> >>> +   union {
> >>> +   struct {
> >>> +   u32 ien:1, men:1, hen:1, reserved:29;
> >>> +   };
> >>> +   u32 value;
> >>> +   };
> >>> +};
> >>> +
> >>>  struct nps_host_reg_aux_udmc {
> >>> union {
> >>> struct {
> >> Thx for this change. Can you please send a proper patch with changelog, 
> >> citing the
> >> issue as Reported-by etc.
> >> Also if Mellanox is interested in maintaining the NPS port going fwd, 
> >> someone (you
> >> ?) should add their name to MAINTAINERS file under arch/arc/plat-eznps and 
> >> send
> >> that patch as well.
> > Hi Vineet,
> >
> > Thanks for your feedback, I'll work with Ofer to make it happen.
>
> Ping, folks can one of you please send a formal patch for this ?

Vineet,

We sent the fix almost at the same day, but for some reason, the emails
from Ofer didn't arrive to ML.

I resent it,
https://www.mail-archive.com/linux-snps-arc@lists.infradead.org/msg03899.html
https://www.mail-archive.com/linux-snps-arc@lists.infradead.org/msg03864.html

And we will check with IT the reason why Ofer's email didn't work.

Thanks

>
> -Vineet

___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc


Re: [PATCH 3/4 v2] arc: fix data type errors in platform headers

2018-07-29 Thread Leon Romanovsky
On Thu, Jul 26, 2018 at 08:16:35PM -0700, rd_dunlab wrote:
> From: Randy Dunlap 
>
> Add  to fix build errors.
> Both ctop.h and  use u32 types and cause many
> errors.
>
> Examples:
> ../include/soc/nps/common.h:71:4: error: unknown type name 'u32'
> u32 __reserved:20, cluster:4, core:4, thread:4;
> ../include/soc/nps/common.h:76:3: error: unknown type name 'u32'
>u32 value;
> ../include/soc/nps/common.h:124:4: error: unknown type name 'u32'
> u32 base:8, cl_x:4, cl_y:4,
> ../include/soc/nps/common.h:127:3: error: unknown type name 'u32'
>u32 value;
>
> ../arch/arc/plat-eznps/include/plat/ctop.h:83:4: error: unknown type name 
> 'u32'
> u32 gen:1, gdis:1, clk_gate_dis:1, asb:1,
> ../arch/arc/plat-eznps/include/plat/ctop.h:86:3: error: unknown type name 
> 'u32'
>u32 value;
> ../arch/arc/plat-eznps/include/plat/ctop.h:93:4: error: unknown type name 
> 'u32'
> u32 csa:22, dmsid:6, __reserved:3, cs:1;
> ../arch/arc/plat-eznps/include/plat/ctop.h:95:3: error: unknown type name 
> 'u32'
>u32 value;
>
> Signed-off-by: Randy Dunlap 
> Cc: Vineet Gupta 
> Cc: linux-snps-arc@lists.infradead.org
> Cc: Elad Kanfi 
> Cc: Leon Romanovsky 
> Cc: Ofer Levi 
> ---
> v2: no change
>
>  arch/arc/plat-eznps/include/plat/ctop.h |1 +
>  1 file changed, 1 insertion(+)
>
> --- linux-next-20180723.orig/arch/arc/plat-eznps/include/plat/ctop.h
> +++ linux-next-20180723/arch/arc/plat-eznps/include/plat/ctop.h
> @@ -21,6 +21,7 @@
>  #error "Incorrect ctop.h include"
>  #endif
>
> +#include 

I'm not familiar with arch/* code, so maybe my question will sound
naive., but why "asm-generic/types.h" and not "linux/types.h"?

Thanks for fixing build.

>  #include 
>
>  /* core auxiliary registers */
>
>
> --
>

___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc


Re: [PATCH 4/4 v2] arc: fix printk warning in arc/plat-eznps/mtm.c

2018-07-29 Thread Leon Romanovsky
On Thu, Jul 26, 2018 at 08:16:35PM -0700, rd_dunlab wrote:
> From: Randy Dunlap 
>
> Fix printk format warning in arch/arc/plat-eznps/mtm.c:
>
> In file included from ../include/linux/printk.h:7,
>  from ../include/linux/kernel.h:14,
>  from ../include/linux/list.h:9,
>  from ../include/linux/smp.h:12,
>  from ../arch/arc/plat-eznps/mtm.c:17:
> ../arch/arc/plat-eznps/mtm.c: In function 'set_mtm_hs_ctr':
> ../include/linux/kern_levels.h:5:18: warning: format '%d' expects argument of 
> type 'int', but argument 2 has type 'long int' [-Wformat=]
>  #define KERN_SOH "\001"  /* ASCII Start Of Header */
>   ^~
> ../include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
>  #define KERN_ERR KERN_SOH "3" /* error conditions */
>   ^~~~
> ../include/linux/printk.h:308:9: note: in expansion of macro 'KERN_ERR'
>   printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
>  ^~~~
> ../arch/arc/plat-eznps/mtm.c:166:3: note: in expansion of macro 'pr_err'
>pr_err("** Invalid @nps_mtm_hs_ctr [%d] needs to be [%d:%d] (incl)\n",
>^~
> ../arch/arc/plat-eznps/mtm.c:166:40: note: format string is defined here
>pr_err("** Invalid @nps_mtm_hs_ctr [%d] needs to be [%d:%d] (incl)\n",
>~^
>%ld
> The hs_ctr variable can just be int instead of long, so also change
> kstrtol() to kstrtoint() and leave the format string as %d.
>
> Also add 2 header files since they are used in mtm.c and we prefer
> not to depend on accidental/indirect #includes.
>
> Signed-off-by: Randy Dunlap 
> Cc: Vineet Gupta 
> Cc: linux-snps-arc@lists.infradead.org
> Cc: Elad Kanfi 
> Cc: Leon Romanovsky 
> Cc: Ofer Levi 
> ---
> v2: no change
>
>  arch/arc/plat-eznps/mtm.c |6 --
>  1 file changed, 4 insertions(+), 2 deletions(-)
>

Thanks,
Reviewed-by: Leon Romanovsky 

___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc


Re: [PATCH 3/4 v3] arc: fix data type errors in platform headers

2018-07-29 Thread Leon Romanovsky
On Sun, Jul 29, 2018 at 11:10:51AM -0700, Randy Dunlap wrote:
> On 07/29/2018 12:01 AM, Leon Romanovsky wrote:
> > On Thu, Jul 26, 2018 at 08:16:35PM -0700, rd_dunlab wrote:
> >> From: Randy Dunlap 
> >>
> >> Add  to fix build errors.
> >> Both ctop.h and  use u32 types and cause many
> >> errors.
> >>
> >> Examples:
> >> ../include/soc/nps/common.h:71:4: error: unknown type name 'u32'
> >> u32 __reserved:20, cluster:4, core:4, thread:4;
> >> ../include/soc/nps/common.h:76:3: error: unknown type name 'u32'
> >>u32 value;
> >> ../include/soc/nps/common.h:124:4: error: unknown type name 'u32'
> >> u32 base:8, cl_x:4, cl_y:4,
> >> ../include/soc/nps/common.h:127:3: error: unknown type name 'u32'
> >>u32 value;
> >>
> >> ../arch/arc/plat-eznps/include/plat/ctop.h:83:4: error: unknown type name 
> >> 'u32'
> >> u32 gen:1, gdis:1, clk_gate_dis:1, asb:1,
> >> ../arch/arc/plat-eznps/include/plat/ctop.h:86:3: error: unknown type name 
> >> 'u32'
> >>u32 value;
> >> ../arch/arc/plat-eznps/include/plat/ctop.h:93:4: error: unknown type name 
> >> 'u32'
> >>     u32 csa:22, dmsid:6, __reserved:3, cs:1;
> >> ../arch/arc/plat-eznps/include/plat/ctop.h:95:3: error: unknown type name 
> >> 'u32'
> >>u32 value;
> >>
> >> Signed-off-by: Randy Dunlap 
> >> Cc: Vineet Gupta 
> >> Cc: linux-snps-arc@lists.infradead.org
> >> Cc: Elad Kanfi 
> >> Cc: Leon Romanovsky 
> >> Cc: Ofer Levi 
> >> ---
> >> v2: no change
> >>
> >>  arch/arc/plat-eznps/include/plat/ctop.h |1 +
> >>  1 file changed, 1 insertion(+)
> >>
> >> --- linux-next-20180723.orig/arch/arc/plat-eznps/include/plat/ctop.h
> >> +++ linux-next-20180723/arch/arc/plat-eznps/include/plat/ctop.h
> >> @@ -21,6 +21,7 @@
> >>  #error "Incorrect ctop.h include"
> >>  #endif
> >>
> >> +#include 
> >
> > I'm not familiar with arch/* code, so maybe my question will sound
> > naive., but why "asm-generic/types.h" and not "linux/types.h"?
>
> Nope, good question.  That works and should be preferred.
>
> Please use the new patch below.
>
> --
>
> From: Randy Dunlap 
>
> Add  to fix build errors.
> Both ctop.h and  use u32 types and cause many
> errors.
>
> Examples:
> ../include/soc/nps/common.h:71:4: error: unknown type name 'u32'
> u32 __reserved:20, cluster:4, core:4, thread:4;
> ../include/soc/nps/common.h:76:3: error: unknown type name 'u32'
>u32 value;
> ../include/soc/nps/common.h:124:4: error: unknown type name 'u32'
> u32 base:8, cl_x:4, cl_y:4,
> ../include/soc/nps/common.h:127:3: error: unknown type name 'u32'
>u32 value;
>
> ../arch/arc/plat-eznps/include/plat/ctop.h:83:4: error: unknown type name 
> 'u32'
>     u32 gen:1, gdis:1, clk_gate_dis:1, asb:1,
> ../arch/arc/plat-eznps/include/plat/ctop.h:86:3: error: unknown type name 
> 'u32'
>u32 value;
> ../arch/arc/plat-eznps/include/plat/ctop.h:93:4: error: unknown type name 
> 'u32'
> u32 csa:22, dmsid:6, __reserved:3, cs:1;
> ../arch/arc/plat-eznps/include/plat/ctop.h:95:3: error: unknown type name 
> 'u32'
>u32 value;
>
> Signed-off-by: Randy Dunlap 
> Cc: Vineet Gupta 
> Cc: linux-snps-arc@lists.infradead.org
> Cc: Elad Kanfi 
> Cc: Leon Romanovsky 
> Cc: Ofer Levi 
> ---
> v2: no change
> v3: use  instead of 
>
>  arch/arc/plat-eznps/include/plat/ctop.h |1 +
>  1 file changed, 1 insertion(+)
>

Thanks,
Reviewed-by: Leon Romanovsky 

___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc


[PATCH] ARC: build: Try to guess GCC variant of cross compiler

2024-12-03 Thread Leon Romanovsky
From: Leon Romanovsky 

ARC GCC compiler is packaged starting from Fedora 39i and the GCC
variant of cross compile tools has arc-linux-gnu- prefix and not
arc-linux-. This is causing that CROSS_COMPILE variable is left unset.

This change allows builds without need to supply CROSS_COMPILE argument
if distro package is used.

Before this change:
$ make -j 128 ARCH=arc W=1 drivers/infiniband/hw/mlx4/
  gcc: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead
  gcc: error: unrecognized command-line option ‘-mmedium-calls’
  gcc: error: unrecognized command-line option ‘-mlock’
  gcc: error: unrecognized command-line option ‘-munaligned-access’

[1] 
https://packages.fedoraproject.org/pkgs/cross-gcc/gcc-arc-linux-gnu/index.html
Signed-off-by: Leon Romanovsky 
---
 arch/arc/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arc/Makefile b/arch/arc/Makefile
index 2390dd042e36..fb98478ed1ab 100644
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -6,7 +6,7 @@
 KBUILD_DEFCONFIG := haps_hs_smp_defconfig
 
 ifeq ($(CROSS_COMPILE),)
-CROSS_COMPILE := $(call cc-cross-prefix, arc-linux- arceb-linux-)
+CROSS_COMPILE := $(call cc-cross-prefix, arc-linux- arceb-linux- 
arc-linux-gnu-)
 endif
 
 cflags-y   += -fno-common -pipe -fno-builtin -mmedium-calls -D__linux__
-- 
2.47.0


___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc