mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 20:50:53 +07:00
KVM: x86: simplify pic_ioport_read()
Signed-off-by: David Hildenbrand <david@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
This commit is contained in:
parent
84a5c79e70
commit
b5e7cf52e1
@ -417,19 +417,16 @@ static u32 pic_poll_read(struct kvm_kpic_state *s, u32 addr1)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 pic_ioport_read(void *opaque, u32 addr1)
|
static u32 pic_ioport_read(void *opaque, u32 addr)
|
||||||
{
|
{
|
||||||
struct kvm_kpic_state *s = opaque;
|
struct kvm_kpic_state *s = opaque;
|
||||||
unsigned int addr;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
addr = addr1;
|
|
||||||
addr &= 1;
|
|
||||||
if (s->poll) {
|
if (s->poll) {
|
||||||
ret = pic_poll_read(s, addr1);
|
ret = pic_poll_read(s, addr);
|
||||||
s->poll = 0;
|
s->poll = 0;
|
||||||
} else
|
} else
|
||||||
if (addr == 0)
|
if ((addr & 1) == 0)
|
||||||
if (s->read_reg_select)
|
if (s->read_reg_select)
|
||||||
ret = s->isr;
|
ret = s->isr;
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user