lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1428565685.2536.4.camel@synopsys.com>
Date:	Thu, 9 Apr 2015 07:48:06 +0000
From:	Alexey Brodkin <Alexey.Brodkin@...opsys.com>
To:	"linus.walleij@...aro.org" <linus.walleij@...aro.org>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Vineet.Gupta1@...opsys.com" <Vineet.Gupta1@...opsys.com>,
	"andriy.shevchenko@...ux.intel.com" 
	<andriy.shevchenko@...ux.intel.com>,
	"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
	"arnd@...db.de" <arnd@...db.de>
Subject: Re: [PATCH] gpio: dwapb: enable for ARC

On Wed, 2015-04-08 at 17:03 +0200, Linus Walleij wrote:
> On Tue, Mar 31, 2015 at 10:30 AM, Alexey Brodkin
> <Alexey.Brodkin@...opsys.com> wrote:
> 
> > From: Vineet Gupta <vgupta@...opsys.com>
> >
> > Synopsys SDP platform uses DW GPIO controller in design with
> > ARC cores. So adding ARC to architectures that may select this
> > GPIO controller.
> >
> > Even though support for Synopsys SDP is yet to be submitted we'll need
> > this tiny option enabled at least for properly working interrupts (DW
> > GPIO controller is used as interrupt controller).
> >
> > Signed-off-by: Vineet Gupta <vgupta@...opsys.com>
> > Signed-off-by: Alexey Brodkin <abrodkin@...opsys.com>
> > Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> > Cc: Linus Walleij <linus.walleij@...aro.org>
> 
> Patch applied.
> 
> But ...
> 
> > -       depends on ((ARM || ARM64) && OF_GPIO) || X86_INTEL_QUARK
> > +       depends on ((ARC || ARM || ARM64) && OF_GPIO) || X86_INTEL_QUARK
> 
> This is getting a bit silly. What stops us from actually just enabling
> it for any architecture?

Agree. That looks like nonsense now.
Origin of arch-limitation is
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/gpio/Kconfig?id=1972c97db5b0c125918f662cd084c7d5370674c0

--->8---
gpio: dwapb: fix compile errors
Whereas the DWAPB driver does not really depend on the ARM
architecture, it uses [readl|writel]_relaxed() not found on
arch such as Blackfin, so restrict this to ARM until there is
another architecture that can make use of it.

It is also using the of_node of the gpiochip, so fix this
too by requiring OF_GPIO.

All error/warnings:

make.cross ARCH=blackfin
drivers/gpio/gpio-dwapb.c: In function 'dwapb_irq_handler':
drivers/gpio/gpio-dwapb.c:91:2: error: implicit declaration of function
'readl_relaxed' [-Werror=implicit-function-declaration]
drivers/gpio/gpio-dwapb.c: In function 'dwapb_configure_irqs':
drivers/gpio/gpio-dwapb.c:212:32: error: 'struct gpio_chip' has no
member named 'of_node'
drivers/gpio/gpio-dwapb.c:221:16: error: 'struct gpio_chip' has no
member named 'of_node'
drivers/gpio/gpio-dwapb.c: In function 'dwapb_gpio_add_port':
drivers/gpio/gpio-dwapb.c:331:14: error: 'struct gpio_chip' has no
member named 'of_node'
cc1: some warnings being treated as errors
--->8---

Probably better fix is to make dwgpio depend on !BLACKFIN because we
know it won't be built for it. If there're other arches that don't
define [readl|writel]_relaxed() we may add them as well.

-Alexey
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ