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: <CAAVeFuKGS2j_V8HG-q-=U0Rkz5Dp48xEmwg3h4ShVyh3vHXnyw@mail.gmail.com>
Date:	Thu, 28 Feb 2013 13:57:07 +0900
From:	Alexandre Courbot <gnurou@...il.com>
To:	Grant Likely <grant.likely@...retlab.ca>
Cc:	Linus Walleij <linus.walleij@...aro.org>,
	Ryan Mallon <rmallon@...il.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	"acourbot@...dia.com" <acourbot@...dia.com>
Subject: Re: [PATCH v2 0/4] gpiolib: some fixup patches

On Wed, Feb 27, 2013 at 4:52 PM, Grant Likely <grant.likely@...retlab.ca> wrote:
> While you're working on that, I'd like you to keep the following in
> mind. I'm getting concerned with the level of overhead that the gpio
> access routines are incuring. They're doing a lot of checks right now
> when with GPIOs we want it to be as fast as possible for the case of
> mmio gpios. (i2c and spi gpios are always going to be slow, so I'm not
> so concerned here). gpio_get, gpio_set and gpio_direction all need to
> be fast.
>
> Basically, I think the model should be that if you've got a gpio_desc
> pointer, then you've got a valid gpio.

Yes, that's what I had in mind as well. Since the only way to obtain a
GPIO descriptor is through the gpiod_get() function(s), we can safely
issues descriptors are valid. There should be no gpiod_is_valid()
function.

> A lot of the checks that are
> currently performed in the gpiod_ versions of functions can be moved
> to the gpio_ versions where a lookup has to be performed anyway. For
> example, right now gpiod_direction_output() is 61 lines long. Madness!
>  :-)

There is certainly room to optimize things and avoid redundant tests
in the legacy GPIO API. Will be worth having a look at this once we
have a clean gpiod implementation.

> I've been playing with an idea of pulling in some basic MMIO gpio
> access directly into gpiolib so that when appropriate gpiolib itself
> can have a fast path for doing the register access and shadow register
> management.

Appealing. :)

Alex.
--
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