From: roman@hodek.net (Roman Hodek)
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: lanttor.guo@freescale.com, linux-m68k@vger.kernel.org,
uclinux-dev@uclinux.org
Subject: Re: Interrupt issue on m68k platform and some fix
Date: Thu, 2 Jul 2009 22:25:32 +0200 (CEST) [thread overview]
Message-ID: <20090702202532.DFD1A7BF89@ridcully.hodek.net> (raw)
In-Reply-To: <m38wj7tpxk.fsf@hase.home> (message from Andreas Schwab on Thu, 02 Jul 2009 11:05:59 +0200)
> > So this code sets value 1 to the second byte of preempt_count field.
>
> No. Byte would be addqb.
Yep ;) But that's also not what's intended, I think.
Lanttor says he wants to add HARDIRQ_OFFSET:
> HARDIRQ_OFFSET equals (1 << HARDIRQ_SHIT) , and HARDIRQ_SHIFT value is
> 16, so I think this code equals
and 1<<16 == 0x00010000, so correct would be
addl #0x00010000,%curptr@(TASK_INFO+TINFO_PREEMPT)
And this can be optimized to add 1 to the high word:
addqw #1,%curptr@(TASK_INFO+TINFO_PREEMPT+2)
As 1 is small enough, you can use an addq statement, and the offset to
the memory location is 2.
The originally proposed "addlq #1, %curptr@(TASK_INFO+TINFO_PREEMPT+1)"
is misaligned and would case an exception. And "addlb #1,
%curptr@(TASK_INFO+TINFO_PREEMPT+1)" wouldn't yield the correct value
as long if the byte overflows ;)
> addqb instruction is not supported on coldfire platform.
Really? The addq instructions are contained in all kind of code, I
guess...
Roman
PS: Hi Andreas! It's quite some years ago, isn't it? ;)
next prev parent reply other threads:[~2009-07-02 20:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-02 4:07 Interrupt issue on m68k platform and some fix Lanttor
2009-07-02 8:24 ` Andreas Schwab
2009-07-02 8:58 ` Lanttor
2009-07-02 9:05 ` Andreas Schwab
2009-07-02 10:06 ` Lanttor
2009-07-02 20:25 ` Roman Hodek [this message]
2009-07-03 3:18 ` Lanttor
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=20090702202532.DFD1A7BF89@ridcully.hodek.net \
--to=roman@hodek.net \
--cc=lanttor.guo@freescale.com \
--cc=linux-m68k@vger.kernel.org \
--cc=schwab@linux-m68k.org \
--cc=uclinux-dev@uclinux.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