From: Timur Tabi <timur@freescale.com>
To: linuxppc-dev <linuxppc-dev@ozlabs.org>
Subject: Do we still need devtree_lock?
Date: Tue, 24 Jun 2008 18:13:40 -0500 [thread overview]
Message-ID: <48617FA4.7070603@freescale.com> (raw)
I'm trying to write a function that gets a list of all aliases
aliases {
serial0 = &serial0;
serial1 = &serial1;
pci0 = &pci0;
pci1 = &pci1;
pci2 = &pci2;
};
That is, I do not know which aliases are in the /aliases node, so I need a
function that works somewhat like of_find_property(), but just returns the Nth
property instead of doing a strcmp.
I can't seem to find one, so I probably need to write one. However, I noticed
that of_find_property() uses a lock:
read_lock(&devtree_lock);
for (pp = np->properties; pp != 0; pp = pp->next) {
if (of_prop_cmp(pp->name, name) == 0) {
if (lenp != 0)
*lenp = pp->length;
break;
}
}
read_unlock(&devtree_lock);
But the comment for devtree_lock says this:
extern rwlock_t devtree_lock; /* temporary while merging */
Since arch/ppc is going away, does this meant that the lock can go away do?
--
Timur Tabi
Linux kernel developer at Freescale
next reply other threads:[~2008-06-24 23:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-24 23:13 Timur Tabi [this message]
2008-06-24 23:25 ` Do we still need devtree_lock? Michael Ellerman
2008-06-25 7:12 ` Stephen Rothwell
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=48617FA4.7070603@freescale.com \
--to=timur@freescale.com \
--cc=linuxppc-dev@ozlabs.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).