From: Jochen Friedrich <jochen@scram.de>
To: Vitaly Bordug <vitb@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [RFC/PATCH] powerpc: Move CPM command handling into the cpm drivers
Date: Sat, 24 Nov 2007 18:53:34 +0100 [thread overview]
Message-ID: <4748651E.2020806@scram.de> (raw)
In-Reply-To: <20071123005121.4d38d877@kernel.crashing.org>
Hi Vitaly,
>>> + printk(KERN_ERR "%s(): Not able to issue CPM command\n",
>>> + __FUNCTION__);
>>> + return -EIO;
>>>
>> Do these need to be protected with a spin lock?
>>
> Even that might be not enough - we may have simultaneous call of this func in non-smp case...
> I was thinking of some kind of refcount, so one that is going to issue CPM command, must do say pq_cpmp_get()
> and another driver won't be able to mangle with cpcr while it's not done with previous request.
>
> Yet I am not telling it was better the way it used to be - this approach looks okay but needs some efforts to defend against
> deadlocks while we are at it
Wouldn't spin_lock_irqsave() prevent a deadlock?
Thanks,
Jochen
next prev parent reply other threads:[~2007-11-24 17:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-22 17:24 [RFC/PATCH] powerpc: Move CPM command handling into the cpm drivers Jochen Friedrich
2007-11-22 18:36 ` Grant Likely
2007-11-22 21:51 ` Vitaly Bordug
2007-11-24 17:53 ` Jochen Friedrich [this message]
2007-11-24 21:47 ` Vitaly Bordug
2007-11-26 16:24 ` Scott Wood
2007-11-26 21:22 ` Vitaly Bordug
2007-11-26 21:41 ` Scott Wood
2007-11-27 8:08 ` Vitaly Bordug
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=4748651E.2020806@scram.de \
--to=jochen@scram.de \
--cc=linuxppc-dev@ozlabs.org \
--cc=vitb@kernel.crashing.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).