From: Dan Malek <dan@embeddededge.com>
To: Hans Feldt <Hans.Feldt@uab.ericsson.se>
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: 8260 CPM commands, need better resource ctrl?
Date: Tue, 22 Oct 2002 13:40:35 -0400 [thread overview]
Message-ID: <3DB58D93.50008@embeddededge.com> (raw)
In-Reply-To: 3DB57883.4040109@uab.ericsson.se
Hans Feldt wrote:
> Isn't there a need for a central place to handle CPM commands?
You could make it an inline function or macro, but I'm not sure
it's worth it. All CPM drivers must have knowledge of how they
may affect others and take care to ensure incorrect operation
doesn't occur. In this case, there isn't a consistent use of
sending CPM commands, as you mentioned in your message. There are
different contexts in which drivers send these commands. It
doesn't make sense for a driver to continue without waiting for
the command to complete, so there isn't any need to wait for this
prior to sending a command.
> m8260_cpm_cmd(...)
> disable ints
> bounded wait until FLG is clear
> if not clear => ???
> write to CPCR
> enable ints
A more proper order of operation would be:
disable ints
write CPCR
bounded wait until FLG is clear
enable ints
return status
In some cases, it could be argued for a performance benefit to actually
perform other operations while waiting for the CPM command to finish.
> ....Disabling irqs in the
> atm driver around CPCR handling seems to fix that problem.
Then....that's what you should do. It isn't always appropriate to
generally disable/enable interrupts in a common function because of
the driver context when the CPCR is accessed. We also have to be
careful about making a generic and abstract CPM interface, since the
overhead of such functions would have a negative affect in an area
where we are sensitive to performance.
Thanks.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2002-10-22 17:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-22 16:10 8260 CPM commands, need better resource ctrl? Hans Feldt
2002-10-22 17:40 ` Dan Malek [this message]
2002-10-23 13:06 ` Pete McCormick
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=3DB58D93.50008@embeddededge.com \
--to=dan@embeddededge.com \
--cc=Hans.Feldt@uab.ericsson.se \
--cc=linuxppc-embedded@lists.linuxppc.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).