public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: David Mosberger <davidm@hpl.hp.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] rwlock and atomic_sub on ia64
Date: Wed, 15 Aug 2001 18:37:58 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590698805082@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590698805063@msgid-missing>

>>>>> On Tue, 14 Aug 2001 16:00:39 -0500, Noah Romer <nromer@lsil.com> said:

  Noah> David Mosberger wrote:

  Jes> I'll leave the question about rwsem's to David ;)

  >>  We're using the generic implementation on ia64.

Oops, Noah was actually talking about the rwlocks, not about rwsem.
For rwlocks, we have our own implementation.

  Noah> Yes, but how do I get to it? I finally found the ia64
  Noah> implementation of write_lock and read_lock for SMP systems
  Noah> (which is what I'm compiling on).(1) However, when I try to
  Noah> compile the driver I get a

  Noah>    warning: implicit declaration of function `rwlock_init'

  Noah> message. I have <linux/spinlock.h> included, and that's been
  Noah> enough up until now. Is there someother include file I need
  Noah> under the ia64 arch?

No, that seems to be a genuine omission.  rwlock_init() was added in
the 2.4.0 test series and I seem to have missed that.  There aren't
too many drivers that use it.  Anyhow, the fix is trivial.  Something
along the lines of:

--- include/asm-ia64/spinlock.h~	Tue Aug 14 00:06:43 2001
+++ include/asm-ia64/spinlock.h	Wed Aug 15 11:31:24 2001
@@ -108,6 +108,8 @@
 } rwlock_t;
 #define RW_LOCK_UNLOCKED (rwlock_t) { 0, 0 }
 
+#define rwlock_init(x) do { *(x) = RW_LOCK_UNLOCKED; } while(0)
+
 #define read_lock(rw)								\
 do {										\
 	int tmp = 0;								\

should do the trick.

	--david


  parent reply	other threads:[~2001-08-15 18:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-13 13:55 [Linux-ia64] rwlock and atomic_sub on ia64 Noah Romer
2001-08-13 17:02 ` Jes Sorensen
2001-08-13 20:40 ` Noah Romer
2001-08-13 20:48 ` Jes Sorensen
2001-08-13 20:54 ` Noah Romer
2001-08-13 20:55 ` David Mosberger
2001-08-14 21:00 ` Noah Romer
2001-08-15 18:37 ` David Mosberger [this message]
2001-08-15 20:30 ` Noah Romer
2001-08-15 22:29 ` KOCHI Takayoshi
2001-08-16  0:25 ` David Mosberger

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=marc-linux-ia64-105590698805082@msgid-missing \
    --to=davidm@hpl.hp.com \
    --cc=linux-ia64@vger.kernel.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