linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* evaluation order bug in acpi_pic_sci_set_trigger() ?
@ 2020-11-25 19:59 Alexey Dobriyan
  2020-11-26 14:32 ` Rafael J. Wysocki
  0 siblings, 1 reply; 3+ messages in thread
From: Alexey Dobriyan @ 2020-11-25 19:59 UTC (permalink / raw)
  To: rjw, lenb; +Cc: linux-acpi

acpi_pic_sci_set_trigger() contains the following code:

	/* Real old ELCR mask */
	old = inb(0x4d0) | (inb(0x4d1) << 8);

Operand evalution order is not guaranteed for binary or.
I wonder if this is a bug?

	Alexey

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: evaluation order bug in acpi_pic_sci_set_trigger() ?
  2020-11-25 19:59 evaluation order bug in acpi_pic_sci_set_trigger() ? Alexey Dobriyan
@ 2020-11-26 14:32 ` Rafael J. Wysocki
  2020-11-27 10:01   ` Alexey Dobriyan
  0 siblings, 1 reply; 3+ messages in thread
From: Rafael J. Wysocki @ 2020-11-26 14:32 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: Rafael J. Wysocki, Len Brown, ACPI Devel Maling List

On Wed, Nov 25, 2020 at 8:59 PM Alexey Dobriyan <adobriyan@gmail.com> wrote:
>
> acpi_pic_sci_set_trigger() contains the following code:
>
>         /* Real old ELCR mask */
>         old = inb(0x4d0) | (inb(0x4d1) << 8);
>
> Operand evalution order is not guaranteed for binary or.
> I wonder if this is a bug?

Does the ordering matter in practice?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: evaluation order bug in acpi_pic_sci_set_trigger() ?
  2020-11-26 14:32 ` Rafael J. Wysocki
@ 2020-11-27 10:01   ` Alexey Dobriyan
  0 siblings, 0 replies; 3+ messages in thread
From: Alexey Dobriyan @ 2020-11-27 10:01 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Rafael J. Wysocki, Len Brown, ACPI Devel Maling List

On Thu, Nov 26, 2020 at 03:32:37PM +0100, Rafael J. Wysocki wrote:
> On Wed, Nov 25, 2020 at 8:59 PM Alexey Dobriyan <adobriyan@gmail.com> wrote:
> >
> > acpi_pic_sci_set_trigger() contains the following code:
> >
> >         /* Real old ELCR mask */
> >         old = inb(0x4d0) | (inb(0x4d1) << 8);
> >
> > Operand evalution order is not guaranteed for binary or.
> > I wonder if this is a bug?
> 
> Does the ordering matter in practice?

I have no idea, this is why I'm asking. :-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-27 10:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-25 19:59 evaluation order bug in acpi_pic_sci_set_trigger() ? Alexey Dobriyan
2020-11-26 14:32 ` Rafael J. Wysocki
2020-11-27 10:01   ` Alexey Dobriyan

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).