Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Ryan Bradetich <rbrad@beavis.ybsoft.com>
To: Paul Bame <bame@fc.hp.com>
Cc: parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] [PATCH] PDC cleanup and encapsulation
Date: Thu, 29 Mar 2001 15:05:26 -0700	[thread overview]
Message-ID: <20010329150526.A5458@beavis.ybsoft.com> (raw)
In-Reply-To: <E14igX4-0004a3-00@noam.fc.hp.com>; from bame@fc.hp.com on Thu, Mar 29, 2001 at 10:48:26AM -0700

On Thu, Mar 29, 2001 at 10:48:26AM -0700, Paul Bame wrote:
> 
> I wonder if it makes sense to pass the lock to mem_pdc_call and let
> it do the lock/unlock rather than doing that in every caller to
> mem_pdc_call.
> 
> 	-P

This could be a possible option.  I chose not to do something similar
to do this for two reasons:

	1. The PDC call can determine the lock level (ie. spin_lock_irq()
           or spin_lock_irqsave()) depending upon if the PDC call can
           be made in interrupt context.

	2. Since pdc_result and pdc_result2 are globals, I used the
	   spin_lock to protect these variables.  That is why the
	   convert_to_wide() calls, etc are contained within the 
	   spin lock.

Maybe I was being paranoid about the locking, and your approach makes
more sense.  I was more interested in protecting data then holding
the lock for the minimum time so my approach might be draconian.  I
do not understand all the locking issues, but I'd be willing to
modify the code to put the lock in the mem_pdc_call if others agree.

Thanks,

- Ryan

  reply	other threads:[~2001-03-29 22:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-29  8:18 [parisc-linux] [PATCH] PDC cleanup and encapsulation Ryan Bradetich
2001-03-29 17:48 ` Paul Bame
2001-03-29 22:05   ` Ryan Bradetich [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-04-04  0:03 Ryan Bradetich
2001-04-04 16:57 ` Bjorn Helgaas
2001-04-04 17:20   ` Matthew Wilcox
2001-04-04 23:04     ` Bjorn Helgaas
2001-04-05  0:01       ` Matthew Wilcox
2001-04-09 21:47       ` Grant Grundler
2001-04-05  2:14   ` Ryan Bradetich

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=20010329150526.A5458@beavis.ybsoft.com \
    --to=rbrad@beavis.ybsoft.com \
    --cc=bame@fc.hp.com \
    --cc=parisc-linux@lists.parisc-linux.org \
    --cc=rbradetich@uswest.net \
    /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