Re: Interrupt issue on m68k platform and some fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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? ;)
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux