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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 27 Mar 2015 09:45:58 +0100
From:	Linus Walleij <linus.walleij@...aro.org>
To:	David Cohen <david.a.cohen@...ux.intel.com>
Cc:	Alexandre Courbot <gnurou@...il.com>,
	"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC] gpio: add set_active_low() function to gpio_chip

On Wed, Mar 18, 2015 at 9:16 PM, David Cohen
<david.a.cohen@...ux.intel.com> wrote:

> +++ b/drivers/gpio/gpiolib-sysfs.c
> @@ -289,11 +289,15 @@ static DEVICE_ATTR(edge, 0644, gpio_edge_show, gpio_edge_store);
>  static int sysfs_set_active_low(struct gpio_desc *desc, struct device *dev,
>                                 int value)
>  {
> +       struct gpio_chip        *chip = desc->chip;
>         int                     status = 0;
>
>         if (!!test_bit(FLAG_ACTIVE_LOW, &desc->flags) == !!value)
>                 return 0;
>
> +       if (chip->set_active_low)
> +               chip->set_active_low(chip, gpio_chip_hwgpio(desc), value);
> +
>         if (value)
>                 set_bit(FLAG_ACTIVE_LOW, &desc->flags);

Since the only user seems to be this abominable sysfs, and since that is
definitely not on the hotpath due to context switching, this cannot possibly
gain any performance benefits.

Unless we can come up with a use case where this actually improves
performance we should just let software handle this instead.

I like to have all hardware features implemented usually, so I'm a bit
torn. But this one lacks a plausible use case. It looks like some hardware
engineers attempt to be helpful to software developers.

Any takers?

Yours,
Linus Walleij
--
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