All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Barkowski <michaelbarkowski@ruggedcom.com>
To: Timur Tabi <timur@freescale.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] qe_lib: Set gpio data before changing the direction to output
Date: Tue, 18 Aug 2009 17:23:32 -0400	[thread overview]
Message-ID: <4A8B1BD4.3000908@ruggedcom.com> (raw)
In-Reply-To: <4A8B183D.2030202@freescale.com>

Timur Tabi wrote:
> Michael Barkowski wrote:
> 
>> diff --git a/arch/powerpc/sysdev/qe_lib/gpio.c b/arch/powerpc/sysdev/qe_lib/gpio.c
>> index 3485288..e7bf136 100644
>> --- a/arch/powerpc/sysdev/qe_lib/gpio.c
>> +++ b/arch/powerpc/sysdev/qe_lib/gpio.c
>> @@ -107,12 +107,11 @@ static int qe_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
>>  
>>  	spin_lock_irqsave(&qe_gc->lock, flags);
>>  
>> +	qe_gpio_set(gc, gpio, val);
> 
> qe_gpio_set already calls spin_lock_irqsave(), so you'll have nested spinlocks, which will lock up on SMP.
> 
> Let me guess, you didn't test this on a dual-core system?

That is correct.  See v2 and please test, YMMV, etc

-- 
Michael Barkowski

      parent reply	other threads:[~2009-08-18 21:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-18 20:59 [PATCH] qe_lib: Set gpio data before changing the direction to output Michael Barkowski
     [not found] ` <20090818210805.GA1725@oksana.dev.rtsoft.ru>
2009-08-18 21:20   ` [PATCH v2] " Michael Barkowski
2009-08-18 21:33     ` Anton Vorontsov
2009-08-18 22:33       ` Timur Tabi
2009-08-18 22:56         ` Anton Vorontsov
2009-08-19 13:30           ` Michael Barkowski
2009-08-19 13:32             ` Anton Vorontsov
2009-08-25 14:44     ` Kumar Gala
     [not found] ` <4A8B183D.2030202@freescale.com>
2009-08-18 21:23   ` Michael Barkowski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A8B1BD4.3000908@ruggedcom.com \
    --to=michaelbarkowski@ruggedcom.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=timur@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.