"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "hw/pci/pci.c" between
qemu-6.0.0-rc1.tar.xz and qemu-6.0.0-rc2.tar.xz

About: QEMU is a generic machine/processor emulator and virtualizer. Release candidate.

pci.c  (qemu-6.0.0-rc1.tar.xz):pci.c  (qemu-6.0.0-rc2.tar.xz)
skipping to change at line 1452 skipping to change at line 1452
/***********************************************************/ /***********************************************************/
/* generic PCI irq support */ /* generic PCI irq support */
/* 0 <= irq_num <= 3. level must be 0 or 1 */ /* 0 <= irq_num <= 3. level must be 0 or 1 */
static void pci_irq_handler(void *opaque, int irq_num, int level) static void pci_irq_handler(void *opaque, int irq_num, int level)
{ {
PCIDevice *pci_dev = opaque; PCIDevice *pci_dev = opaque;
int change; int change;
assert(0 <= irq_num && irq_num < PCI_NUM_PINS);
assert(level == 0 || level == 1);
change = level - pci_irq_state(pci_dev, irq_num); change = level - pci_irq_state(pci_dev, irq_num);
if (!change) if (!change)
return; return;
pci_set_irq_state(pci_dev, irq_num, level); pci_set_irq_state(pci_dev, irq_num, level);
pci_update_irq_status(pci_dev); pci_update_irq_status(pci_dev);
if (pci_irq_disabled(pci_dev)) if (pci_irq_disabled(pci_dev))
return; return;
pci_change_irq_level(pci_dev, irq_num, change); pci_change_irq_level(pci_dev, irq_num, change);
} }
static inline int pci_intx(PCIDevice *pci_dev) static inline int pci_intx(PCIDevice *pci_dev)
{ {
return pci_get_byte(pci_dev->config + PCI_INTERRUPT_PIN) - 1; return pci_get_byte(pci_dev->config + PCI_INTERRUPT_PIN) - 1;
} }
qemu_irq pci_allocate_irq(PCIDevice *pci_dev) qemu_irq pci_allocate_irq(PCIDevice *pci_dev)
{ {
int intx = pci_intx(pci_dev); int intx = pci_intx(pci_dev);
assert(0 <= intx && intx < PCI_NUM_PINS);
return qemu_allocate_irq(pci_irq_handler, pci_dev, intx); return qemu_allocate_irq(pci_irq_handler, pci_dev, intx);
} }
void pci_set_irq(PCIDevice *pci_dev, int level) void pci_set_irq(PCIDevice *pci_dev, int level)
{ {
int intx = pci_intx(pci_dev); int intx = pci_intx(pci_dev);
pci_irq_handler(pci_dev, intx, level); pci_irq_handler(pci_dev, intx, level);
} }
 End of changes. 2 change blocks. 
0 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)