Re: [PATCH] ARC: build: Turn off -Wmaybe-uninitialized for ARC gcc 4.8

2016-03-19 Thread Vineet Gupta
On Friday 18 March 2016 05:43 PM, Arnd Bergmann wrote:
> I think it's dangerous to use -O3 in one architecture when nothing else
> uses it. If you don't have a strong reason to use -O3, maybe just drop that
> use the default -O2 -Wmaybe-uninitialized like everyone else does.

I know what u mean. In fact top level makefile change has bitten us atleast 
once.
However ARC gcc tends to generate better code (likely others do too) at -O3 and
increased inlining etc reflects in several benchmarks. Maybe its due to the
micro-architecture and smaller hardware call return stack - I'm not sure. So I'm
ready to pay that maintenance price. And it has been like this for 5+ years and 
I
fear that switching to -O2 might unravel something unwarranted for.

OTOH, I'd rather prefer -O3 for all arches but that ain't gonna happen for 
obvious
reasons :-)

> On a related note, I have submitted a patch that turns 
> CONFIG_CC_OPTIMIZE_FOR_SIZE
> into a choice statement, so we actually get the -Wmaybe-uninitialized warnings
> in an allyesconfig or allmodconfig build. It would be trivial to extend that
> to give the choice between -Os, -O2 and -O3, and then pick -O3 in a defconfig,
> over the -O2 default.

Is it posted already. I couldn't find it with quick googling.

Thx,
-Vineet

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


Re: [PATCH v2] ARC: axs10x - add Ethernet PHY description in .dts

2016-03-19 Thread Vineet Gupta
On Thursday 17 March 2016 05:08 PM, Alexey Brodkin wrote:
> Hi Sergei,
>
> On Thu, 2016-03-17 at 13:58 +0300, Sergei Shtylyov wrote:
>> On 3/17/2016 12:41 PM, Alexey Brodkin wrote:
>>
>>> Following commit broke DW GMAC functionality on AXS10x boards:
>>> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e34d65696d2ef13dc32f2a162556c86c461ed763
>> Note that scripts/checkpatch.pl now enforces certain format for citing 
>> commits: commit <12-digit SHA1> ("").
> Frankly I haven't run that patch through checkpatch due to patch
> simplicity.
>
> But I'll try to not do any assumptions from now on and will try to
> use checkpatch for each and every thing I send :)
>
> Thanks for spotting all his!
>
> -Alexey

Sergei, do you mind providing a Ack/Reviewed-by on the patch below

>
>From 67216d835d8c2a5748ba1631c8bfc19da4fb87fa Mon Sep 17 00:00:00 2001
From: Alexey Brodkin 
Date: Thu, 17 Mar 2016 12:41:52 +0300
Subject: [PATCH] ARC: axs10x - add Ethernet PHY description in .dts

Commit e34d65696d2e ("stmmac: create of compatible mdio bus for stmmac
driver") broke DW GMAC functionality on ARC AXS10x boards:

That's what happens on eth0 up:
  --->8
| libphy: PHY stmmac-0: not found
| eth0: Could not attach to PHY
| stmmac_open: Cannot attach to PHY (error: -19)
  --->8

Simplest solution is to add PHY description in board's .dts.
And so we do here.

Signed-off-by: Alexey Brodkin 
Cc: Rob Herring 
Cc: Phil Reid 
Cc: David S. Miller 
Cc: linux-ker...@vger.kernel.org
Cc: net...@vger.kernel.org
Cc: sta...@vger.kernel.org # 4.5
Cc: Sergei Shtylyov 
Signed-off-by: Vineet Gupta 
---
 arch/arc/boot/dts/axs10x_mb.dtsi | 8 
 1 file changed, 8 insertions(+)

diff --git a/arch/arc/boot/dts/axs10x_mb.dtsi b/arch/arc/boot/dts/axs10x_mb.dtsi
index 44a578c10732..ab5d5701e11d 100644
--- a/arch/arc/boot/dts/axs10x_mb.dtsi
+++ b/arch/arc/boot/dts/axs10x_mb.dtsi
@@ -47,6 +47,14 @@
 clocks = <&apbclk>;
 clock-names = "stmmaceth";
 max-speed = <100>;
+mdio0 {
+#address-cells = <1>;
+#size-cells = <0>;
+compatible = "snps,dwmac-mdio";
+phy1: ethernet-phy@1 {
+reg = <1>;
+};
+};
 };
 
 ehci@0x4 {
-- 
2.5.0


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


kisskb: FAILED linus/axs103_smp_defconfig/arcv2 Sat Mar 19, 19:22

2016-03-19 Thread noreply
FAILED linus/axs103_smp_defconfig/arcv2 Sat Mar 19, 19:22

http://kisskb.ellerman.id.au/kisskb/buildresult/12640067/

Commit:   Merge branch 'for-4.6' of 
git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
  6b5f04b6cf8ebab9a65d9c0026c650bb2538fd0f
Compiler: arc-buildroot-linux-uclibc-gcc (Buildroot 2015.08.1) 4.8.4

Possible errors
---

include/linux/compiler.h:485:2: error: expected identifier or '(' before 'do'
include/linux/compiler.h:491:4: error: expected identifier or '(' before 'while'
make[3]: *** [arch/arc/mm/tlb.o] Error 1
include/linux/compiler.h:485:2: error: expected identifier or '(' before 'do'
include/linux/compiler.h:491:4: error: expected identifier or '(' before 'while'
make[3]: *** [arch/arc/kernel/setup.o] Error 1
make[2]: *** [arch/arc/mm] Error 2
include/linux/compiler.h:485:2: error: expected identifier or '(' before 'do'
include/linux/compiler.h:491:4: error: expected identifier or '(' before 'while'
include/linux/compiler.h:485:2: error: expected identifier or '(' before 'do'
include/linux/compiler.h:491:4: error: expected identifier or '(' before 'while'
make[2]: *** [kernel/exit.o] Error 1
make[2]: *** [kernel/fork.o] Error 1
include/linux/compiler.h:485:2: error: expected identifier or '(' before 'do'
include/linux/compiler.h:491:4: error: expected identifier or '(' before 'while'
include/linux/compiler.h:485:2: error: expected identifier or '(' before 'do'
include/linux/compiler.h:491:4: error: expected identifier or '(' before 'while'
make[2]: *** [kernel/module.o] Error 1
make[3]: *** [kernel/sched/core.o] Error 1
include/linux/compiler.h:485:2: error: expected identifier or '(' before 'do'
include/linux/compiler.h:491:4: error: expected identifier or '(' before 'while'
make[2]: *** [mm/page_alloc.o] Error 1
make[2]: *** [arch/arc/kernel] Error 2
make[1]: *** [arch/arc] Error 2
include/linux/compiler.h:485:2: error: expected identifier or '(' before 'do'
include/linux/compiler.h:491:4: error: expected identifier or '(' before 'while'
make[2]: *** [mm/vmscan.o] Error 1
include/linux/compiler.h:485:2: error: expected identifier or '(' before 'do'
include/linux/compiler.h:491:4: error: expected identifier or '(' before 'while'
make[2]: *** [fs/exec.o] Error 1
make[1]: *** [mm] Error 2
make[2]: *** [kernel/sched] Error 2
make[1]: *** [fs] Error 2
make[1]: *** [kernel] Error 2
make: *** [sub-make] Error 2

Possible warnings (16)
--

drivers/pci/pcie/Kconfig:62:warning: choice value used outside its choice group
drivers/pci/pcie/Kconfig:68:warning: choice value used outside its choice group
drivers/pci/pcie/Kconfig:75:warning: choice value used outside its choice group
drivers/pci/pcie/Kconfig:62:warning: choice value used outside its choice group
drivers/pci/pcie/Kconfig:68:warning: choice value used outside its choice group
drivers/pci/pcie/Kconfig:75:warning: choice value used outside its choice group
kernel/sched/core.c:3079:1: warning: control reaches end of non-void function 
[-Wreturn-type]
kernel/sysctl.c:1949:12: warning: 'p' may be used uninitialized in this 
function [-Wmaybe-uninitialized]
kernel/sysctl.c:1949:12: warning: 'p' may be used uninitialized in this 
function [-Wmaybe-uninitialized]
kernel/time/posix-cpu-timers.c:787:21: warning: 'now' may be used uninitialized 
in this function [-Wmaybe-uninitialized]
kernel/time/posix-cpu-timers.c:95:8: warning: 'now' may be used uninitialized 
in this function [-Wmaybe-uninitialized]
kernel/time/posix-cpu-timers.c:665:17: warning: 'val' may be used uninitialized 
in this function [-Wmaybe-uninitialized]
kernel/time/posix-cpu-timers.c:1238:13: warning: 'now' may be used 
uninitialized in this function [-Wmaybe-uninitialized]
ipc/shm.c:1252:2: warning: 'ret' may be used uninitialized in this function 
[-Wmaybe-uninitialized]
fs/namei.c:1720:2: warning: 'seq' may be used uninitialized in this function 
[-Wmaybe-uninitialized]
fs/namei.c:1720:2: warning: 'seq' may be used uninitialized in this function 
[-Wmaybe-uninitialized]


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


Re: [PATCH 1/4 v3] drm: Add support of ARC PGU display controller

2016-03-19 Thread Alexey Brodkin
Hi Daniel,

On Fri, 2016-03-18 at 09:02 +0100, Daniel Vetter wrote:
> On Thu, Mar 17, 2016 at 08:27:10PM +, Alexey Brodkin wrote:
> > 
> > Hi Daniel,
> > 
> > On Tue, 2016-03-15 at 16:59 +0100, Daniel Vetter wrote:
> > > 
> > > On Tue, Mar 15, 2016 at 03:24:46PM +, Alexey Brodkin wrote:
> > > > 
> > > > On Tue, 2016-03-15 at 09:10 +0100, Daniel Vetter wrote:
> > > > > 
> > > > > On Mon, Mar 14, 2016 at 11:15:59AM +, Alexey Brodkin wrote:
> > > > > > 
> > > > > > On Mon, 2016-03-14 at 08:00 +0100, Daniel Vetter wrote:
> > > > > > > 
> > > > > > > On Fri, Mar 11, 2016 at 06:42:36PM +0300, Alexey Brodkin wrote:
> > > > > > > > 
> > > > > > > >  
> > > > > > > > +static struct drm_driver arcpgu_drm_driver = {
> > > > > > > > +   .driver_features = DRIVER_MODESET | DRIVER_GEM | 
> > > > > > > > DRIVER_PRIME |
> > > > > > > > +      DRIVER_ATOMIC,
> > > > > > > > +   .preclose = arcpgu_preclose,
> > > > > > > > +   .lastclose = arcpgu_lastclose,
> > > > > > > > +   .name = "drm-arcpgu",
> > > > > > > > +   .desc = "ARC PGU Controller",
> > > > > > > > +   .date = "20160219",
> > > > > > > > +   .major = 1,
> > > > > > > > +   .minor = 0,
> > > > > > > > +   .patchlevel = 0,
> > > > > > > > +   .fops = &arcpgu_drm_ops,
> > > > > > > > +   .load = arcpgu_load,
> > > > > > > > +   .unload = arcpgu_unload,
> > > > > > > Load and unload hooks are deprecated (it's a classic midlayer 
> > > > > > > mistake).
> > > > > > > Please use drm_dev_alloc/register pairs directly instead, and put 
> > > > > > > your
> > > > > > > device setup code in-between. Similar for unloading. There's a 
> > > > > > > bunch of
> > > > > > > example drivers converted already.
> > > > > > Ok I took "atmel-hlcdc" as example.
> > > > > > And that's interesting.
> > > > > > 
> > > > > > If I put my arcpgu_load() in between drm_dev_alloc() and
> > > > > > drm_dev_register() then I'm getting this on the driver probe:
> > > > > > -->8---
> > > > > > [drm] Initialized drm 1.1.0 20060810
> > > > > > arcpgu e0017000.pgu: arc_pgu ID: 0xabbabaab
> > > > > > [ cut here ]
> > > > > > WARNING: CPU: 0 PID: 1 at lib/kobject.c:244 
> > > > > > kobject_add_internal+0x17c/0x498()
> > > > > > kobject_add_internal failed for card0-HDMI-A-1 (error: -2 parent: 
> > > > > > card0)
> > > > > > Modules linked in:
> > > > > > CPU: 0 PID: 1 Comm: swapper Not tainted 
> > > > > > 4.5.0-rc3-01062-ga447822-dirty #17
> > > > > > 
> > > > > > Stack Trace:
> > > > > >   arc_unwind_core.constprop.1+0xa4/0x110
> > > > > >   warn_slowpath_fmt+0x6e/0xfc
> > > > > >   kobject_add_internal+0x17c/0x498
> > > > > >   kobject_add+0x98/0xe4
> > > > > >   device_add+0xc6/0x734
> > > > > >   device_create_with_groups+0x12a/0x144
> > > > > >   drm_sysfs_connector_add+0x54/0xe8
> > > > > >   arcpgu_drm_hdmi_init+0xd4/0x17c
> > > > > >   arcpgu_probe+0x138/0x24c
> > > > > >   platform_drv_probe+0x2e/0x6c
> > > > > >   really_probe+0x212/0x35c
> > > > > >   __driver_attach+0x90/0x94
> > > > > >   bus_for_each_dev+0x46/0x80
> > > > > >   bus_add_driver+0x14e/0x1b4
> > > > > >   driver_register+0x64/0x108
> > > > > >   do_one_initcall+0x86/0x194
> > > > > >   kernel_init_freeable+0xf0/0x188
> > > > > > ---[ end trace c67166ad43ddcce2 ]---
> > > > > > [drm:drm_sysfs_connector_add] adding "HDMI-A-1" to sysfs
> > > > > > [drm:drm_sysfs_connector_add] *ERROR* failed to register connector 
> > > > > > device: -2
> > > > > > arcpgu e0017000.pgu: failed to regiter DRM connector and helper 
> > > > > > funcs
> > > > > > arcpgu: probe of e0017000.pgu failed with error -2
> > > > > > -->8---
> > > > > > 
> > > > > > But if I move arcpgu_load() after drm_dev_register() then everything
> > > > > > starts properly and I may see HDMI screen works perfectly fine.
> > > > > > 
> > > > > > Any thoughts?
> > > > > Oops, yeah missed that detail. If you look at atmel it has a loop to
> > > > > register all the drm connectors _after_ calling drm_dev_register().
> > > > > Totally forgot about that. Can you pls
> > > > > - Extract a new drm_connector_register_all() function
> > > > >   (atmel_hlcdc_dc_connector_plug_all seems to be the best template),
> > > > >   including kerneldoc.
> > > > > - Adjust kerneldoc of drm_dev_register() to mention
> > > > >   drm_connector_register_all() and that ordering constraint.
> > > > > - Roll that helper out to all the drivers that currently hand-roll it 
> > > > > (one
> > > > >   patch per driver).
> > > > > 
> > > > > I know a bit of work but imo not too much, and by doing some small
> > > > > refactoring every time someone stumbles over a drm pitfall we keep the
> > > > > subsystem clean&easy to understand. You're up for this? Would be a 
> > > > > prep
> > > > > series, I'll happily review it to get it merged fast. Just a few 
> > > > > weeks ago
> > > 

Re: [PATCH v2] ARC: axs10x - add Ethernet PHY description in .dts

2016-03-19 Thread Sergei Shtylyov

Hello.

On 3/17/2016 2:41 PM, Vineet Gupta wrote:


Following commit broke DW GMAC functionality on AXS10x boards:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e34d65696d2ef13dc32f2a162556c86c461ed763

 Note that scripts/checkpatch.pl now enforces certain format for citing
commits: commit <12-digit SHA1> ("").



Frankly I haven't run that patch through checkpatch due to patch
simplicity.

But I'll try to not do any assumptions from now on and will try to
use checkpatch for each and every thing I send :)

Thanks for spotting all his!



   Sorry for not reporting everything on the 1st review.


-Alexey


Sergei, do you mind providing a Ack/Reviewed-by on the patch below

>

Reviewed-by: Sergei Shtylyov 

   The patch here is white space damaged however: tabs were converted to 
spaces. :-(


MBR, Sergei


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


Re: [PATCH 1/4 v3] drm: Add support of ARC PGU display controller

2016-03-19 Thread Alexey Brodkin
Hi Daniel,

On Tue, 2016-03-15 at 16:59 +0100, Daniel Vetter wrote:
> On Tue, Mar 15, 2016 at 03:24:46PM +, Alexey Brodkin wrote:
> > On Tue, 2016-03-15 at 09:10 +0100, Daniel Vetter wrote:
> > > On Mon, Mar 14, 2016 at 11:15:59AM +, Alexey Brodkin wrote:
> > > > On Mon, 2016-03-14 at 08:00 +0100, Daniel Vetter wrote:
> > > > > On Fri, Mar 11, 2016 at 06:42:36PM +0300, Alexey Brodkin wrote:
> > > > > > 
> > > > > > +static struct drm_driver arcpgu_drm_driver = {
> > > > > > +   .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME |
> > > > > > +      DRIVER_ATOMIC,
> > > > > > +   .preclose = arcpgu_preclose,
> > > > > > +   .lastclose = arcpgu_lastclose,
> > > > > > +   .name = "drm-arcpgu",
> > > > > > +   .desc = "ARC PGU Controller",
> > > > > > +   .date = "20160219",
> > > > > > +   .major = 1,
> > > > > > +   .minor = 0,
> > > > > > +   .patchlevel = 0,
> > > > > > +   .fops = &arcpgu_drm_ops,
> > > > > > +   .load = arcpgu_load,
> > > > > > +   .unload = arcpgu_unload,
> > > > > Load and unload hooks are deprecated (it's a classic midlayer 
> > > > > mistake).
> > > > > Please use drm_dev_alloc/register pairs directly instead, and put your
> > > > > device setup code in-between. Similar for unloading. There's a bunch 
> > > > > of
> > > > > example drivers converted already.
> > > > Ok I took "atmel-hlcdc" as example.
> > > > And that's interesting.
> > > > 
> > > > If I put my arcpgu_load() in between drm_dev_alloc() and
> > > > drm_dev_register() then I'm getting this on the driver probe:
> > > > -->8---
> > > > [drm] Initialized drm 1.1.0 20060810
> > > > arcpgu e0017000.pgu: arc_pgu ID: 0xabbabaab
> > > > [ cut here ]
> > > > WARNING: CPU: 0 PID: 1 at lib/kobject.c:244 
> > > > kobject_add_internal+0x17c/0x498()
> > > > kobject_add_internal failed for card0-HDMI-A-1 (error: -2 parent: card0)
> > > > Modules linked in:
> > > > CPU: 0 PID: 1 Comm: swapper Not tainted 4.5.0-rc3-01062-ga447822-dirty 
> > > > #17
> > > > 
> > > > Stack Trace:
> > > >   arc_unwind_core.constprop.1+0xa4/0x110
> > > >   warn_slowpath_fmt+0x6e/0xfc
> > > >   kobject_add_internal+0x17c/0x498
> > > >   kobject_add+0x98/0xe4
> > > >   device_add+0xc6/0x734
> > > >   device_create_with_groups+0x12a/0x144
> > > >   drm_sysfs_connector_add+0x54/0xe8
> > > >   arcpgu_drm_hdmi_init+0xd4/0x17c
> > > >   arcpgu_probe+0x138/0x24c
> > > >   platform_drv_probe+0x2e/0x6c
> > > >   really_probe+0x212/0x35c
> > > >   __driver_attach+0x90/0x94
> > > >   bus_for_each_dev+0x46/0x80
> > > >   bus_add_driver+0x14e/0x1b4
> > > >   driver_register+0x64/0x108
> > > >   do_one_initcall+0x86/0x194
> > > >   kernel_init_freeable+0xf0/0x188
> > > > ---[ end trace c67166ad43ddcce2 ]---
> > > > [drm:drm_sysfs_connector_add] adding "HDMI-A-1" to sysfs
> > > > [drm:drm_sysfs_connector_add] *ERROR* failed to register connector 
> > > > device: -2
> > > > arcpgu e0017000.pgu: failed to regiter DRM connector and helper funcs
> > > > arcpgu: probe of e0017000.pgu failed with error -2
> > > > -->8---
> > > > 
> > > > But if I move arcpgu_load() after drm_dev_register() then everything
> > > > starts properly and I may see HDMI screen works perfectly fine.
> > > > 
> > > > Any thoughts?
> > > Oops, yeah missed that detail. If you look at atmel it has a loop to
> > > register all the drm connectors _after_ calling drm_dev_register().
> > > Totally forgot about that. Can you pls
> > > - Extract a new drm_connector_register_all() function
> > >   (atmel_hlcdc_dc_connector_plug_all seems to be the best template),
> > >   including kerneldoc.
> > > - Adjust kerneldoc of drm_dev_register() to mention
> > >   drm_connector_register_all() and that ordering constraint.
> > > - Roll that helper out to all the drivers that currently hand-roll it (one
> > >   patch per driver).
> > > 
> > > I know a bit of work but imo not too much, and by doing some small
> > > refactoring every time someone stumbles over a drm pitfall we keep the
> > > subsystem clean&easy to understand. You're up for this? Would be a prep
> > > series, I'll happily review it to get it merged fast. Just a few weeks ago
> > > I merged 20+ patches to make ->mode_fixup hooks optional and remove dummy
> > > ones all over the subsystem, in other words: You'll have my full attention
> > > ;-)
> > Sure, I'm ready to pay that price :)
> > Stay tuned and patches will follow.
> Awesome, looking forward to your patches.

Sorry it took longer for me to finally put my hands on that work but anyways.

I'm looking now at how drivers use existing drm_connector_unplug_all() and
their implementation of what would be drm_connector_plug_all() and see
in some implementations people wraps both helpers with
mutex_{lock|unlock}(&dev->mode_config.mutex). But not everybody does this.

So essentially my questions are:
 [1] If it's necessary to get hold 

Re: [PATCH v2] ARC: axs10x - add Ethernet PHY description in .dts

2016-03-19 Thread Sergei Shtylyov

On 3/17/2016 12:41 PM, Alexey Brodkin wrote:


Following commit broke DW GMAC functionality on AXS10x boards:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e34d65696d2ef13dc32f2a162556c86c461ed763


   Note that scripts/checkpatch.pl now enforces certain format for citing 
commits: commit <12-digit SHA1> ("").


[...]

MBR, Sergei


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


[PATCH] ARC: build: Turn off -Wmaybe-uninitialized for ARC gcc 4.8

2016-03-19 Thread Vineet Gupta
linux-next has been reporting gazillion warnings for ARC build and
I finally decided to take a bite:

http://kisskb.ellerman.id.au/kisskb/buildresult/12638735/

Most of the them are due to -Wmaybe-uninitialized

| ../kernel/sysctl.c: In function '__do_proc_doulongvec_minmax':
| ../kernel/sysctl.c:1928:12: warning: 'p' may be used uninitialized in this 
function [-Wmaybe-uninitialized]
|   ret = tmp - *buf;
|^
| ../kernel/sysctl.c:2342:29: note: 'p' was declared here
|  char *kbuf = NULL, *p;
| ^
| ...
| ...

Cursory look at code seemed fine and a definite gcc false positive in say
kernel/sysctl.c

Mystery was why only for ARC (and not with ARM linaro toolchain based
off same gcc 4.8). Turns out that -O3 (default for ARC) triggers these
and if I enable -O3 for ARM kernel build, I see the same splat.

I doubt if gcc folks are going to fix warnings in gcc 4.8 (specially when this
was the much advertised front page feature @
https://gcc.gnu.org/gcc-4.8/porting_to.html

Better to to silent these for ARC, atleast for gcc 4.8 when we know that
these warnings are likely benign.

When we switch to later gcc, these will come back on and at that time we
could fixing gcc and/or relevant kernel code.

Cc: Claudiu Zissulescu 
Cc: Arnd Bergmann 
Cc: Michal Marek 
Cc: Geert Uytterhoeven 
Cc: linux-kbu...@vger.kernel.org
Cc: linux-ker...@vger.kernel.org
Signed-off-by: Vineet Gupta 
---
 arch/arc/Makefile | 5 +
 1 file changed, 5 insertions(+)

diff --git a/arch/arc/Makefile b/arch/arc/Makefile
index fed12f39d8ce..aeb101e8e674 100644
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -48,9 +48,14 @@ endif
 upto_gcc44:=  $(call cc-ifversion, -le, 0404, y)
 atleast_gcc44 :=  $(call cc-ifversion, -ge, 0404, y)
 atleast_gcc48 :=  $(call cc-ifversion, -ge, 0408, y)
+is_gcc48  :=  $(call cc-ifversion, -eq, 0408, y)
 
 cflags-$(atleast_gcc44)+= -fsection-anchors
 
+# gcc 4.8 spits out false positives for default -O3
+# disable these for 4.8 and revisit when we upgrade to newer ver
+cflags-$(is_gcc48) += $(call 
cc-disable-warning,maybe-uninitialized,)
+
 cflags-$(CONFIG_ARC_HAS_LLSC)  += -mlock
 cflags-$(CONFIG_ARC_HAS_SWAPE) += -mswape
 
-- 
2.5.0


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


Re: [PATCH] ARC: build: Turn off -Wmaybe-uninitialized for ARC gcc 4.8

2016-03-19 Thread Arnd Bergmann
On Friday 18 March 2016 15:50:11 Vineet Gupta wrote:
> Sure, but I prefer this to be only for gcc 4.8 as this warning seems to be
> healthy in small doses  At least it keeps the door open for future discussion
> with gcc guys !

FWIW, testing on ARM with gcc-6.0 -O3, I also get tons of maybe-uninitialized
warnings. It's unlikely that this is architecture specific or fixed in newer
compiler versions.

> The following nested construct actually works - does that look OK to you ?
> 
> ARCH_CFLAGS += -O3 $(call cc-ifversion, -lt, 0408, $(call 
> cc-disable-warning,maybe-uninitialized,))

Yes, that seems ok.

I don't really understand why -O3 is needed though, maybe it's better to
assume that it won't be needed in future gcc versions and do

ARCH_CFLAGS += $(call cc-ifversion, -lt, 0408, -O3 $(call 
cc-disable-warning,maybe-uninitialized,))

Arnd

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


Re: [PATCH v2] ARC: axs10x - add Ethernet PHY description in .dts

2016-03-19 Thread Vineet Gupta
On Thursday 17 March 2016 04:28 PM, Sergei Shtylyov wrote:
> On 3/17/2016 12:41 PM, Alexey Brodkin wrote:
>
>> > Following commit broke DW GMAC functionality on AXS10x boards:
>> > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e34d65696d2ef13dc32f2a162556c86c461ed763
> Note that scripts/checkpatch.pl now enforces certain format for citing 
> commits: commit <12-digit SHA1> ("").
>
> [...]
>
> MBR, Sergei

Indeed - I've fixed this up and added to arc for-curr !

-Vineet

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


kisskb: OK linux-next/axs103_smp_defconfig/arcv2 Fri Mar 18, 17:34

2016-03-19 Thread noreply
OK linux-next/axs103_smp_defconfig/arcv2 Fri Mar 18, 17:34

http://kisskb.ellerman.id.au/kisskb/buildresult/12638735/

Commit:   Add linux-next specific files for 20160318
  5e3497cca281616e7930b74a0076b7324dcc2057
Compiler: arc-buildroot-linux-uclibc-gcc (Buildroot 2015.08.1) 4.8.4

Possible errors
---

 harderr = icmp_err_convert[code].fatal;

Possible warnings (119)
--

drivers/pci/pcie/Kconfig:62:warning: choice value used outside its choice group
drivers/pci/pcie/Kconfig:68:warning: choice value used outside its choice group
drivers/pci/pcie/Kconfig:75:warning: choice value used outside its choice group
drivers/pci/pcie/Kconfig:62:warning: choice value used outside its choice group
drivers/pci/pcie/Kconfig:68:warning: choice value used outside its choice group
drivers/pci/pcie/Kconfig:75:warning: choice value used outside its choice group
:1310:2: warning: #warning syscall preadv2 not implemented [-Wcpp]
:1313:2: warning: #warning syscall pwritev2 not implemented [-Wcpp]
Warning (unit_address_vs_reg): Node /cpu_card has a reg or ranges property, but 
no unit name
Warning (unit_address_vs_reg): Node /cpu_card/archs-intc@cpu has a unit name, 
but no reg property
Warning (unit_address_vs_reg): Node /memory has a reg or ranges property, but 
no unit name
Warning (unit_address_vs_reg): Node /axs10x_mb has a reg or ranges property, 
but no unit name
kernel/sched/core.c:3080:1: warning: control reaches end of non-void function 
[-Wreturn-type]
kernel/sysctl.c:1949:12: warning: 'p' may be used uninitialized in this 
function [-Wmaybe-uninitialized]
kernel/sysctl.c:1949:12: warning: 'p' may be used uninitialized in this 
function [-Wmaybe-uninitialized]
ipc/shm.c:1252:2: warning: 'ret' may be used uninitialized in this function 
[-Wmaybe-uninitialized]
kernel/time/posix-cpu-timers.c:787:21: warning: 'now' may be used uninitialized 
in this function [-Wmaybe-uninitialized]
kernel/time/posix-cpu-timers.c:95:8: warning: 'now' may be used uninitialized 
in this function [-Wmaybe-uninitialized]
kernel/time/posix-cpu-timers.c:665:17: warning: 'val' may be used uninitialized 
in this function [-Wmaybe-uninitialized]
kernel/time/posix-cpu-timers.c:1238:13: warning: 'now' may be used 
uninitialized in this function [-Wmaybe-uninitialized]
fs/namei.c:1713:2: warning: 'seq' may be used uninitialized in this function 
[-Wmaybe-uninitialized]
fs/namei.c:1713:2: warning: 'seq' may be used uninitialized in this function 
[-Wmaybe-uninitialized]
arch/arc/include/asm/elf.h:58:29: warning: integer overflow in expression 
[-Woverflow]
fs/ext4/ext4_jbd2.h:409:1: warning: control reaches end of non-void function 
[-Wreturn-type]
include/linux/rbtree.h:83:28: warning: 'rb_parent' may be used uninitialized in 
this function [-Wmaybe-uninitialized]
include/linux/rbtree.h:86:11: warning: 'rb_link' may be used uninitialized in 
this function [-Wmaybe-uninitialized]
mm/mmap.c:558:17: warning: 'prev' may be used uninitialized in this function 
[-Wmaybe-uninitialized]
lib/cpumask.c:179:1: warning: control reaches end of non-void function 
[-Wreturn-type]
fs/ext4/ext4_jbd2.h:409:1: warning: control reaches end of non-void function 
[-Wreturn-type]
include/linux/kernel.h:735:17: warning: comparison of distinct pointer types 
lacks a cast [enabled by default]
net/core/datagram.c:99:5: warning: 'last' may be used uninitialized in this 
function [-Wmaybe-uninitialized]
net/core/datagram.c:99:5: warning: 'last' may be used uninitialized in this 
function [-Wmaybe-uninitialized]
fs/ext4/ext4_jbd2.h:409:1: warning: control reaches end of non-void function 
[-Wreturn-type]
drivers/usb/core/hub.c:2767:16: warning: 'portchange' may be used uninitialized 
in this function [-Wmaybe-uninitialized]
drivers/usb/core/hub.c:2740:20: warning: 'portstatus' may be used uninitialized 
in this function [-Wmaybe-uninitialized]
net/core/ethtool.c:295:1: warning: control reaches end of non-void function 
[-Wreturn-type]
fs/ext4/inode.c:561:5: warning: 'retval' may be used uninitialized in this 
function [-Wmaybe-uninitialized]
include/linux/buffer_head.h:363:2: warning: 'blocknr' may be used uninitialized 
in this function [-Wmaybe-uninitialized]
fs/ext4/inode.c:561:5: warning: 'retval' may be used uninitialized in this 
function [-Wmaybe-uninitialized]
drivers/usb/storage/transport.c:473:40: warning: 'partial' may be used 
uninitialized in this function [-Wmaybe-uninitialized]
fs/ext4/inode.c:561:5: warning: 'retval' may be used uninitialized in this 
function [-Wmaybe-uninitialized]
drivers/usb/storage/transport.c:499:15: warning: 'partial' may be used 
uninitialized in this function [-Wmaybe-uninitialized]
fs/ext4/inode.c:561:5: warning: 'retval' may be used uninitialized in this 
function [-Wmaybe-uninitialized]
include/linux/buffer_head.h:370:2: warning: 'blocknr' may be used uninitialized 
in this function [-Wmaybe-uninitialized]
block/cfq-iosched.c:3793:1: warning: control reaches end of non-void function 
[-Wretu

[PATCH v3] ARC: [dts] Introduce Timer bindings

2016-03-19 Thread Vineet Gupta
ARC Timers have historically been probed directly.
As precursor to start probing Timers thru DT introduce these bindings
Note that to keep series bisectable, these bindings are not yet used in
code.

Cc: Daniel Lezcano 
Cc: Rob Herring 
Cc: devicet...@vger.kernel.org
Signed-off-by: Vineet Gupta 
---
v3:
 - Renamed Node name to avoid new warnings when unit address used w/o regs [Rob]
v2:
 - http://lists.infradead.org/pipermail/linux-snps-arc/2016-March/000653.html
 - snps,arc-timer[0-1] folded into single snps-arc-timer[Rob]
 - Node name in DT example fixed:   [Rob]
 "timer1: timer_clksrc {" -> timer@1 {
 - Introduced 64bit RTC in skeleton_hs.dtsi [Vineet]
v1:
 - http://lists.infradead.org/pipermail/linux-snps-arc/2016-February/000447.html
---
 .../devicetree/bindings/timer/snps,arc-timer.txt   | 32 ++
 .../devicetree/bindings/timer/snps,archs-gfrc.txt  | 14 ++
 .../devicetree/bindings/timer/snps,archs-rtc.txt   | 14 ++
 arch/arc/boot/dts/abilis_tb10x.dtsi| 14 ++
 arch/arc/boot/dts/skeleton.dtsi| 14 ++
 arch/arc/boot/dts/skeleton_hs.dtsi | 20 ++
 arch/arc/boot/dts/skeleton_hs_idu.dtsi | 14 ++
 7 files changed, 122 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/timer/snps,arc-timer.txt
 create mode 100644 Documentation/devicetree/bindings/timer/snps,archs-gfrc.txt
 create mode 100644 Documentation/devicetree/bindings/timer/snps,archs-rtc.txt

diff --git a/Documentation/devicetree/bindings/timer/snps,arc-timer.txt 
b/Documentation/devicetree/bindings/timer/snps,arc-timer.txt
new file mode 100644
index ..29ba64432ad7
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/snps,arc-timer.txt
@@ -0,0 +1,32 @@
+Synopsys ARC Local Timer with Interrupt Capabilities
+- Found on all ARC CPUs (ARC700/ARCHS)
+- Can be optionally programmed to interrupt on Limit
+- Two idential copies TIMER0 and TIMER1 exist in ARC cores and historically
+  TIMER0 used as clockevent provider (true for all ARC cores)
+  TIMER1 used for clocksource (mandatory for ARC700, optional for ARC HS)
+
+Required properties:
+
+- compatible : should be "snps,arc-timer"
+- interrupts : single Interrupt going into parent intc
+  (16 for ARCHS cores, 3 for ARC700 cores)
+- clocks : phandle to the source clock
+
+Optional properties:
+
+- interrupt-parent : phandle to parent intc
+
+Example:
+
+   timer0 {
+   compatible = "snps,arc-timer";
+   interrupts = <3>;
+   interrupt-parent = <&core_intc>;
+   clocks = <&core_clk>;
+   };
+
+
+   timer1 {
+   compatible = "snps,arc-timer";
+   clocks = <&core_clk>;
+   };
diff --git a/Documentation/devicetree/bindings/timer/snps,archs-gfrc.txt 
b/Documentation/devicetree/bindings/timer/snps,archs-gfrc.txt
new file mode 100644
index ..b6cd1b3922de
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/snps,archs-gfrc.txt
@@ -0,0 +1,14 @@
+Synopsys ARC Free Running 64-bit Global Timer for ARC HS CPUs
+- clocksource provider for SMP SoC
+
+Required properties:
+
+- compatible : should be "snps,archs-gfrc"
+- clocks : phandle to the source clock
+
+Example:
+
+   gfrc {
+   compatible = "snps,archs-gfrc";
+   clocks = <&core_clk>;
+   };
diff --git a/Documentation/devicetree/bindings/timer/snps,archs-rtc.txt 
b/Documentation/devicetree/bindings/timer/snps,archs-rtc.txt
new file mode 100644
index ..47bd7a702f3f
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/snps,archs-rtc.txt
@@ -0,0 +1,14 @@
+Synopsys ARC Free Running 64-bit Local Timer for ARC HS CPUs
+- clocksource provider for UP SoC
+
+Required properties:
+
+- compatible : should be "snps,archs-rtc"
+- clocks : phandle to the source clock
+
+Example:
+
+   rtc {
+   compatible = "snps,arc-rtc";
+   clocks = <&core_clk>;
+   };
diff --git a/arch/arc/boot/dts/abilis_tb10x.dtsi 
b/arch/arc/boot/dts/abilis_tb10x.dtsi
index cfb5052239a1..663671f22680 100644
--- a/arch/arc/boot/dts/abilis_tb10x.dtsi
+++ b/arch/arc/boot/dts/abilis_tb10x.dtsi
@@ -35,6 +35,20 @@
};
};
 
+   /* TIMER0 with interrupt for clockevent */
+   timer0 {
+   compatible = "snps,arc-timer";
+   interrupts = <3>;
+   interrupt-parent = <&intc>;
+   clocks = <&cpu_clk>;
+   };
+
+   /* TIMER1 for free running clocksource */
+   timer1 {
+   compatible = "snps,arc-timer";
+   clocks = <&cpu_clk>;
+   };
+
soc100 {
#address-cells  = <1>;
#size-cells = <1>;
diff --git a/arch/arc/boot/dts/skeleton.dtsi b/arch/arc/boot/dts/skeleton.dtsi
index 296d371a335c..3a10cc633e2b 100644
--- a/arch/arc/boot/dts

Re: [PATCH] ARC: build: Turn off -Wmaybe-uninitialized for ARC gcc 4.8

2016-03-19 Thread Arnd Bergmann
On Friday 18 March 2016 14:16:23 Vineet Gupta wrote:
> diff --git a/arch/arc/Makefile b/arch/arc/Makefile
> index fed12f39d8ce..aeb101e8e674 100644
> --- a/arch/arc/Makefile
> +++ b/arch/arc/Makefile
> @@ -48,9 +48,14 @@ endif
>  upto_gcc44:=  $(call cc-ifversion, -le, 0404, y)
>  atleast_gcc44 :=  $(call cc-ifversion, -ge, 0404, y)
>  atleast_gcc48 :=  $(call cc-ifversion, -ge, 0408, y)
> +is_gcc48  :=  $(call cc-ifversion, -eq, 0408, y)
>  
>  cflags-$(atleast_gcc44)+= -fsection-anchors
>  
> +# gcc 4.8 spits out false positives for default -O3
> +# disable these for 4.8 and revisit when we upgrade to newer ver
> +cflags-$(is_gcc48) += $(call 
> cc-disable-warning,maybe-uninitialized,)
> +
>  cflags-$(CONFIG_ARC_HAS_LLSC)  += -mlock
>  cflags-$(CONFIG_ARC_HAS_SWAPE) += -mswape

Is this any better with gcc-4.9 or gcc-5? Maybe it's better to add the flag to
the line that adds -O3 for consistency. We do the same thing for -Os in the
global Makefile, as that triggers a similar load of warnings.

Arnd

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


[PATCH v2] ARC: axs10x - add Ethernet PHY description in .dts

2016-03-19 Thread Alexey Brodkin
Following commit broke DW GMAC functionality on AXS10x boards:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e34d65696d2ef13dc32f2a162556c86c461ed763

That's what happens on eth0 up:
--->8
libphy: PHY stmmac-0: not found
eth0: Could not attach to PHY
stmmac_open: Cannot attach to PHY (error: -19)
--->8

Simplest solution is to add PHY description in board's .dts.
And so we do here.

Signed-off-by: Alexey Brodkin 
Cc: Rob Herring 
Cc: Phil Reid 
Cc: David S. Miller 
Cc: linux-ker...@vger.kernel.org
Cc: net...@vger.kernel.org
Cc: sta...@vger.kernel.org # 4.5.x
Cc: Sergei Shtylyov 
---

Changes v1 -> v2:
 * PHY node name changed to match real PHY number being used (Sergei)

 arch/arc/boot/dts/axs10x_mb.dtsi | 8 
 1 file changed, 8 insertions(+)

diff --git a/arch/arc/boot/dts/axs10x_mb.dtsi b/arch/arc/boot/dts/axs10x_mb.dtsi
index 44a578c..ab5d570 100644
--- a/arch/arc/boot/dts/axs10x_mb.dtsi
+++ b/arch/arc/boot/dts/axs10x_mb.dtsi
@@ -47,6 +47,14 @@
clocks = <&apbclk>;
clock-names = "stmmaceth";
max-speed = <100>;
+   mdio0 {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   compatible = "snps,dwmac-mdio";
+   phy1: ethernet-phy@1 {
+   reg = <1>;
+   };
+   };
};
 
ehci@0x4 {
-- 
2.5.0


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


Re: [PATCH v2 2/9] ARC: [dts] Introduce Timer bindings

2016-03-19 Thread Rob Herring
On Tue, Mar 08, 2016 at 05:56:05PM +0530, Vineet Gupta wrote:
> ARC Timers have historically been probed directly.
> As precursor to start probing Timers thru DT introduce these bindings
> Note that to keep series bisectable, these bindings are not yet used in
> code.
> 
> Cc: Daniel Lezcano 
> Cc: Rob Herring 
> Cc: devicet...@vger.kernel.org
> Signed-off-by: Vineet Gupta 
> ---
> Changes v1 -> v2
>  - snps,arc-timer[0-1] folded into single snps-arc-timer  [Rob]
>  - Node name in DT example fixed: [Rob]
>  "timer1: timer_clksrc {" -> timer@1 {
>  - Introduced 64bit RTC in skeleton_hs.dtsi   [Vineet]
> 
> v1:
>  - 
> http://lists.infradead.org/pipermail/linux-snps-arc/2016-February/000447.html
> 
> Signed-off-by: Vineet Gupta 
> ---
>  .../devicetree/bindings/timer/snps,arc-timer.txt   | 26 
> ++
>  .../devicetree/bindings/timer/snps,archs-gfrc.txt  | 14 
>  .../devicetree/bindings/timer/snps,archs-rtc.txt   | 14 
>  arch/arc/boot/dts/abilis_tb10x.dtsi| 14 
>  arch/arc/boot/dts/skeleton.dtsi| 14 
>  arch/arc/boot/dts/skeleton_hs.dtsi | 20 +
>  arch/arc/boot/dts/skeleton_hs_idu.dtsi | 14 
>  7 files changed, 116 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/timer/snps,arc-timer.txt
>  create mode 100644 
> Documentation/devicetree/bindings/timer/snps,archs-gfrc.txt
>  create mode 100644 Documentation/devicetree/bindings/timer/snps,archs-rtc.txt
> 
> diff --git a/Documentation/devicetree/bindings/timer/snps,arc-timer.txt 
> b/Documentation/devicetree/bindings/timer/snps,arc-timer.txt
> new file mode 100644
> index ..9e02be24e805
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/timer/snps,arc-timer.txt
> @@ -0,0 +1,26 @@
> +Synopsys ARC Local Timer with Interrupt Capabilities
> +- Found on all ARC CPUs (ARC700/ARCHS)
> +- Can be optionally programmed to interrupt on Limit
> +- Two idential copies TIMER0 and TIMER1 exist in ARC cores and historically
> +  TIMER0 used as clockevent provider (true for all ARC cores)
> +  TIMER1 used for clocksource (mandatory for ARC700, optional for ARC HS)
> +
> +Required properties:
> +
> +- compatible : should be "snps,arc-timer"
> +- interrupts : single Interrupt going into parent intc
> +(16 for ARCHS cores, 3 for ARC700 cores)
> +- clocks : phandle to the source clock
> +
> +Optional properties:
> +
> +- interrupt-parent : phandle to parent intc
> +
> +Example:
> +
> + timer@0 {

Use of unit addresses without reg property is going to start generating 
warnings. I would just use "timer0" in this case.

> + compatible = "snps,arc-timer0";

s/timer0/timer/

> + interrupts = <3>;
> + interrupt-parent = <&core_intc>;
> + clocks = <&core_clk>;
> + };
> diff --git a/Documentation/devicetree/bindings/timer/snps,archs-gfrc.txt 
> b/Documentation/devicetree/bindings/timer/snps,archs-gfrc.txt
> new file mode 100644
> index ..aaab100f54e7
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/timer/snps,archs-gfrc.txt
> @@ -0,0 +1,14 @@
> +Synopsys ARC Free Running 64-bit Global Timer for ARC HS CPUs
> +- clocksource provider for SMP SoC
> +
> +Required properties:
> +
> +- compatible : should be "snps,archs-gfrc"
> +- clocks : phandle to the source clock
> +
> +Example:
> +
> + timer@1 {
> + compatible = "snps,archs-gfrc";
> + clocks = <&core_clk>;
> + };
> diff --git a/Documentation/devicetree/bindings/timer/snps,archs-rtc.txt 
> b/Documentation/devicetree/bindings/timer/snps,archs-rtc.txt
> new file mode 100644
> index ..13f756fa1d6d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/timer/snps,archs-rtc.txt
> @@ -0,0 +1,14 @@
> +Synopsys ARC Free Running 64-bit Local Timer for ARC HS CPUs
> +- clocksource provider for UP SoC
> +
> +Required properties:
> +
> +- compatible : should be "snps,archs-rtc"
> +- clocks : phandle to the source clock
> +
> +Example:
> +
> + timer@1 {

rtc {

And then similar updates in the dts files.

> + compatible = "snps,arc-rtc";
> + clocks = <&core_clk>;
> + };

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


Re: [PATCH v2] ARC: axs10x - add Ethernet PHY description in .dts

2016-03-19 Thread Vineet Gupta
On Thursday 17 March 2016 05:29 PM, Sergei Shtylyov wrote:
> Hello.
>
> On 3/17/2016 2:41 PM, Vineet Gupta wrote:
>
>  Following commit broke DW GMAC functionality on AXS10x boards:
>  http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e34d65696d2ef13dc32f2a162556c86c461ed763
 >>>  Note that scripts/checkpatch.pl now enforces certain format for 
 >>> citing
 >>> commits: commit <12-digit SHA1> ("").
>>> >> Frankly I haven't run that patch through checkpatch due to patch
>>> >> simplicity.
>>> >>
>>> >> But I'll try to not do any assumptions from now on and will try to
>>> >> use checkpatch for each and every thing I send :)
>>> >>
>>> >> Thanks for spotting all his!
>>> >>
> Sorry for not reporting everything on the 1st review.
>
>>> >> -Alexey
>> >
>> > Sergei, do you mind providing a Ack/Reviewed-by on the patch below
>  >
>
> Reviewed-by: Sergei Shtylyov 

Thx.

> The patch here is white space damaged however: tabs were converted to 
> spaces. :-(
>
> MBR, Sergei


That was just because of copy-paste into mailer before switching to plain-text.
Don't ask - corporate email !
I added it just to give u an idea of what fixup i did.

Tx,
-Vineet

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


Re: [PATCH v3] ARC: [dts] Introduce Timer bindings

2016-03-19 Thread Rob Herring
On Fri, Mar 18, 2016 at 10:56:29AM +0530, Vineet Gupta wrote:
> ARC Timers have historically been probed directly.
> As precursor to start probing Timers thru DT introduce these bindings
> Note that to keep series bisectable, these bindings are not yet used in
> code.
> 
> Cc: Daniel Lezcano 
> Cc: Rob Herring 
> Cc: devicet...@vger.kernel.org
> Signed-off-by: Vineet Gupta 
> ---
> v3:
>  - Renamed Node name to avoid new warnings when unit address used w/o regs 
> [Rob]
> v2:
>  - http://lists.infradead.org/pipermail/linux-snps-arc/2016-March/000653.html
>  - snps,arc-timer[0-1] folded into single snps-arc-timer  [Rob]
>  - Node name in DT example fixed: [Rob]
>  "timer1: timer_clksrc {" -> timer@1 {
>  - Introduced 64bit RTC in skeleton_hs.dtsi   [Vineet]
> v1:
>  - 
> http://lists.infradead.org/pipermail/linux-snps-arc/2016-February/000447.html
> ---
>  .../devicetree/bindings/timer/snps,arc-timer.txt   | 32 
> ++
>  .../devicetree/bindings/timer/snps,archs-gfrc.txt  | 14 ++
>  .../devicetree/bindings/timer/snps,archs-rtc.txt   | 14 ++
>  arch/arc/boot/dts/abilis_tb10x.dtsi| 14 ++
>  arch/arc/boot/dts/skeleton.dtsi| 14 ++
>  arch/arc/boot/dts/skeleton_hs.dtsi | 20 ++
>  arch/arc/boot/dts/skeleton_hs_idu.dtsi | 14 ++
>  7 files changed, 122 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/timer/snps,arc-timer.txt
>  create mode 100644 
> Documentation/devicetree/bindings/timer/snps,archs-gfrc.txt
>  create mode 100644 Documentation/devicetree/bindings/timer/snps,archs-rtc.txt

Acked-by: Rob Herring 

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


Re: [PATCH v2] ARC: axs10x - add Ethernet PHY description in .dts

2016-03-19 Thread Alexey Brodkin
Hi Sergei,

On Thu, 2016-03-17 at 14:59 +0300, Sergei Shtylyov wrote:
> Hello.
> 
> On 3/17/2016 2:41 PM, Vineet Gupta wrote:
> 
> > 
> > > 
> > > > 
> > > > > 
> > > > > Following commit broke DW GMAC functionality on AXS10x boards:
> > > > > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e34d65696d2ef13dc32f2a162556c86c461e
> > > > > d763
> > > >  Note that scripts/checkpatch.pl now enforces certain format for 
> > > > citing
> > > > commits: commit <12-digit SHA1> ("").
> > 
> > > 
> > > Frankly I haven't run that patch through checkpatch due to patch
> > > simplicity.
> > > 
> > > But I'll try to not do any assumptions from now on and will try to
> > > use checkpatch for each and every thing I send :)
> > > 
> > > Thanks for spotting all his!
> > > 
> Sorry for not reporting everything on the 1st review.
> 
> > 
> > > 
> > > -Alexey
> > Sergei, do you mind providing a Ack/Reviewed-by on the patch below
>  >
> 
> Reviewed-by: Sergei Shtylyov 
> 
> The patch here is white space damaged however: tabs were converted to 
> spaces. :-(

Well, I'm not really sure why that substitution happened because my local patch
is indeed with tabs.

That's an output of checkpatch:
>8
./scripts/checkpatch.pl 
0001-ARC-axs10x-add-Ethernet-PHY-description-in-.dts.patch 
[1]+  Donegedit 
0001-ARC-axs10x-add-Ethernet-PHY-description-in-.dts.patch
WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per 
line)
#7: 
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e34d65696d2ef13dc32f2a162556c86c461ed763

ERROR: Please use git commit description style 'commit <12+ chars of sha1> 
("")' - ie: 'commit e34d65696d2e
("stmmac: create of compatible mdio bus for stmmac driver")'
#7: 
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e34d65696d2ef13dc32f2a162556c86c461ed763

total: 1 errors, 1 warnings, 14 lines checked

0001-ARC-axs10x-add-Ethernet-PHY-description-in-.dts.patch has style problems, 
please review.
>8

If there were spaces we would see tons of:
>8
ERROR: code indent should use tabs where possible
#43: FILE: arch/arc/boot/dts/axs10x_mb.dtsi:50:
+mdio0 {$
>8
which I didn't see.

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

Re: [PATCH] ARC: build: Turn off -Wmaybe-uninitialized for ARC gcc 4.8

2016-03-19 Thread Vineet Gupta
On Friday 18 March 2016 03:59 PM, Arnd Bergmann wrote:
> On Friday 18 March 2016 15:50:11 Vineet Gupta wrote:
>> Sure, but I prefer this to be only for gcc 4.8 as this warning seems to be
>> healthy in small doses  At least it keeps the door open for future discussion
>> with gcc guys !
> 
> FWIW, testing on ARM with gcc-6.0 -O3, I also get tons of maybe-uninitialized
> warnings. It's unlikely that this is architecture specific or fixed in newer
> compiler versions.

So we disable this for good just like -Os.
What a shame - seemed like a reasonable safety net for programming errors.

>> The following nested construct actually works - does that look OK to you ?
>>
>> ARCH_CFLAGS += -O3 $(call cc-ifversion, -lt, 0408, $(call 
>> cc-disable-warning,maybe-uninitialized,))
> 
> Yes, that seems ok.

There was typo actually -lt needed to be -eq

> I don't really understand why -O3 is needed though, maybe it's better to
> assume that it won't be needed in future gcc versions and do

Not sure what you mean, -O3 for triggering the warnings or -O3 in ARC makefile 
at all.
Assuming it's latter, this is how its been forever and was added consciously as
performance seemed better with -O3 than the default -O2.


> 
> ARCH_CFLAGS += $(call cc-ifversion, -lt, 0408, -O3 $(call 
> cc-disable-warning,maybe-uninitialized,))
> 
>   Arnd
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


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


kisskb: OK linux-next/axs101_defconfig/arcompact Thu Mar 17, 01:00

2016-03-19 Thread noreply
OK linux-next/axs101_defconfig/arcompact Thu Mar 17, 01:00

http://kisskb.ellerman.id.au/kisskb/buildresult/12636410/

Commit:   Add linux-next specific files for 20160316
  8559bac87dcf580b62d5cc751f5ab62d01832744
Compiler: arc-buildroot-linux-uclibc-gcc (Buildroot 2015.08.1) 4.8.4

Possible errors
---

 harderr = icmp_err_convert[code].fatal;

Possible warnings (145)
--

drivers/pci/pcie/Kconfig:62:warning: choice value used outside its choice group
drivers/pci/pcie/Kconfig:68:warning: choice value used outside its choice group
drivers/pci/pcie/Kconfig:75:warning: choice value used outside its choice group
drivers/pci/pcie/Kconfig:62:warning: choice value used outside its choice group
drivers/pci/pcie/Kconfig:68:warning: choice value used outside its choice group
drivers/pci/pcie/Kconfig:75:warning: choice value used outside its choice group
:1310:2: warning: #warning syscall preadv2 not implemented [-Wcpp]
:1313:2: warning: #warning syscall pwritev2 not implemented [-Wcpp]
Warning (unit_address_vs_reg): Node /cpu_card has a reg or ranges property, but 
no unit name
Warning (unit_address_vs_reg): Node /cpu_card/arc700-intc@cpu has a unit name, 
but no reg property
Warning (unit_address_vs_reg): Node /memory has a reg or ranges property, but 
no unit name
Warning (unit_address_vs_reg): Node /axs10x_mb has a reg or ranges property, 
but no unit name
arch/arc/include/asm/tlbflush.h:29:0: warning: "flush_pmd_tlb_range" redefined 
[enabled by default]
arch/arc/include/asm/tlbflush.h:29:0: warning: "flush_pmd_tlb_range" redefined 
[enabled by default]
arch/arc/include/asm/tlbflush.h:29:0: warning: "flush_pmd_tlb_range" redefined 
[enabled by default]
arch/arc/include/asm/tlbflush.h:29:0: warning: "flush_pmd_tlb_range" redefined 
[enabled by default]
arch/arc/include/asm/tlbflush.h:29:0: warning: "flush_pmd_tlb_range" redefined 
[enabled by default]
arch/arc/include/asm/tlbflush.h:29:0: warning: "flush_pmd_tlb_range" redefined 
[enabled by default]
kernel/sched/core.c:3080:1: warning: control reaches end of non-void function 
[-Wreturn-type]
arch/arc/include/asm/tlbflush.h:29:0: warning: "flush_pmd_tlb_range" redefined 
[enabled by default]
kernel/sysctl.c:1949:12: warning: 'p' may be used uninitialized in this 
function [-Wmaybe-uninitialized]
kernel/sysctl.c:1949:12: warning: 'p' may be used uninitialized in this 
function [-Wmaybe-uninitialized]
arch/arc/include/asm/tlbflush.h:29:0: warning: "flush_pmd_tlb_range" redefined 
[enabled by default]
arch/arc/include/asm/tlbflush.h:29:0: warning: "flush_pmd_tlb_range" redefined 
[enabled by default]
arch/arc/include/asm/tlbflush.h:29:0: warning: "flush_pmd_tlb_range" redefined 
[enabled by default]
arch/arc/include/asm/tlbflush.h:29:0: warning: "flush_pmd_tlb_range" redefined 
[enabled by default]
arch/arc/include/asm/tlbflush.h:29:0: warning: "flush_pmd_tlb_range" redefined 
[enabled by default]
ipc/shm.c:1252:2: warning: 'ret' may be used uninitialized in this function 
[-Wmaybe-uninitialized]
arch/arc/include/asm/tlbflush.h:29:0: warning: "flush_pmd_tlb_range" redefined 
[enabled by default]
arch/arc/include/asm/tlbflush.h:29:0: warning: "flush_pmd_tlb_range" redefined 
[enabled by default]
arch/arc/include/asm/tlbflush.h:29:0: warning: "flush_pmd_tlb_range" redefined 
[enabled by default]
arch/arc/include/asm/tlbflush.h:29:0: warning: "flush_pmd_tlb_range" redefined 
[enabled by default]
arch/arc/include/asm/tlbflush.h:29:0: warning: "flush_pmd_tlb_range" redefined 
[enabled by default]
arch/arc/include/asm/tlbflush.h:29:0: warning: "flush_pmd_tlb_range" redefined 
[enabled by default]
arch/arc/include/asm/tlbflush.h:29:0: warning: "flush_pmd_tlb_range" redefined 
[enabled by default]
arch/arc/include/asm/tlbflush.h:29:0: warning: "flush_pmd_tlb_range" redefined 
[enabled by default]
arch/arc/include/asm/tlbflush.h:29:0: warning: "flush_pmd_tlb_range" redefined 
[enabled by default]
arch/arc/include/asm/tlbflush.h:29:0: warning: "flush_pmd_tlb_range" redefined 
[enabled by default]
arch/arc/include/asm/tlbflush.h:29:0: warning: "flush_pmd_tlb_range" redefined 
[enabled by default]
include/linux/kernel.h:735:17: warning: comparison of distinct pointer types 
lacks a cast [enabled by default]
include/linux/rbtree.h:83:28: warning: 'rb_parent' may be used uninitialized in 
this function [-Wmaybe-uninitialized]
include/linux/rbtree.h:86:11: warning: 'rb_link' may be used uninitialized in 
this function [-Wmaybe-uninitialized]
mm/mmap.c:558:17: warning: 'prev' may be used uninitialized in this function 
[-Wmaybe-uninitialized]
arch/arc/include/asm/tlbflush.h:29:0: warning: "flush_pmd_tlb_range" redefined 
[enabled by default]
fs/namei.c:1713:2: warning: 'seq' may be used uninitialized in this function 
[-Wmaybe-uninitialized]
kernel/time/posix-cpu-timers.c:787:21: warning: 'now' may be used uninitialized 
in this function [-Wmaybe-uninitialized]
kernel/time/posix-cpu-timers.c:95:8: warning: 'now' may be used uninitialized