[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [PATCH 2/2] ioapic: Implement polarity
From: |
Jan Kiszka |
Subject: |
Re: [Qemu-trivial] [PATCH 2/2] ioapic: Implement polarity |
Date: |
Tue, 07 Jun 2011 17:55:10 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
On 2011-05-15 13:07, Jan Kiszka wrote:
> From: Jan Kiszka <address@hidden>
>
> If the polarity bit is set in a redirection table entry, the input level
> simply has to inverted as it is low active in this case.
Ping for this and
http://thread.gmane.org/gmane.comp.emulators.qemu/102459. Maybe even
trivial, so CC'ing.
Jan
>
> Signed-off-by: Jan Kiszka <address@hidden>
> ---
> hw/ioapic.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/hw/ioapic.c b/hw/ioapic.c
> index 5916387..61991d7 100644
> --- a/hw/ioapic.c
> +++ b/hw/ioapic.c
> @@ -148,6 +148,9 @@ static void ioapic_set_irq(void *opaque, int vector, int
> level)
> uint32_t mask = 1 << vector;
> uint64_t entry = s->ioredtbl[vector];
>
> + if (entry & (1 << IOAPIC_LVT_POLARITY_SHIFT)) {
> + level = !level;
> + }
> if (((entry >> IOAPIC_LVT_TRIGGER_MODE_SHIFT) & 1) ==
> IOAPIC_TRIGGER_LEVEL) {
> /* level triggered */
>
>
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
- Re: [Qemu-trivial] [PATCH 2/2] ioapic: Implement polarity,
Jan Kiszka <=