Port-xen archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: get "struct device" out of pics
And here are patches for xen, untested.
Please test if you can.
best regards
Matthias
-------------------------------------------------------------------
-------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
Dr. Sebastian M. Schmidt
-------------------------------------------------------------------
-------------------------------------------------------------------
#
# old_revision [7d27a0c7499d816af7fb364f08ccdb4bfe8366a6]
#
# patch "sys/arch/xen/x86/intr.c"
# from [34588f6d3a915511848eddd4e4db1d917e469a0c]
# to [bdbc91e07e6d5eef56b1921987a2315b9322ff31]
#
# patch "sys/arch/xen/xen/isa_machdep.c"
# from [3792549d1401c50dfb47753e3bc42a280534c97a]
# to [f0e1b5b61bb7176775536c6273593de2b9427421]
#
# patch "sys/arch/xen/xen/pci_intr_machdep.c"
# from [631aa160f5a48cbac88d2b28e8d8e075975e962b]
# to [1953765b4952b18f50836820598784d8568bd5af]
#
# patch "sys/arch/xen/xen/pciide_machdep.c"
# from [943767c94ec770ef6eb1f44290b77be097738a46]
# to [7f00ea5849b978b860497eee01d98eac46a6daa4]
#
============================================================
--- sys/arch/xen/x86/intr.c 34588f6d3a915511848eddd4e4db1d917e469a0c
+++ sys/arch/xen/x86/intr.c bdbc91e07e6d5eef56b1921987a2315b9322ff31
@@ -260,7 +260,7 @@ xen_intr_map(int *pirq, int type)
*/
static int xen_next_irq = 200;
struct ioapic_softc *ioapic = ioapic_find(APIC_IRQ_APIC(*pirq));
- struct pic *pic = (struct pic *)ioapic;
+ struct pic *pic = &ioapic->sc_pic;
int pin = APIC_IRQ_PIN(*pirq);
physdev_op_t op;
@@ -298,11 +298,11 @@ intr_findpic(int num)
intr_findpic(int num)
{
#if NIOAPIC > 0
- struct pic *pic;
+ struct ioapic_softc *pic;
- pic = (struct pic *)ioapic_find_bybase(num);
+ pic = ioapic_find_bybase(num);
if (pic != NULL)
- return pic;
+ return &pic->sc_pic;
#endif
if (num < NUM_LEGACY_IRQS)
return &i8259_pic;
============================================================
--- sys/arch/xen/xen/isa_machdep.c 3792549d1401c50dfb47753e3bc42a280534c97a
+++ sys/arch/xen/xen/isa_machdep.c f0e1b5b61bb7176775536c6273593de2b9427421
@@ -156,7 +156,7 @@ isa_intr_establish(ic, irq, type, level,
char evname[8];
struct xen_intr_handle ih;
#if NIOAPIC > 0
- struct pic *pic = NULL;
+ struct ioapic_softc *pic = NULL;
#endif
ih.pirq = irq;
@@ -166,8 +166,7 @@ isa_intr_establish(ic, irq, type, level,
if (intr_find_mpmapping(mp_isa_bus, irq, &ih) == 0 ||
intr_find_mpmapping(mp_eisa_bus, irq, &ih) == 0) {
if (!APIC_IRQ_ISLEGACY(ih.pirq)) {
- pic = (struct pic *)
- ioapic_find(APIC_IRQ_APIC(ih.pirq));
+ pic = ioapic_find(APIC_IRQ_APIC(ih.pirq));
if (pic == NULL) {
printf("isa_intr_establish: "
"unknown apic %d\n",
@@ -186,7 +185,7 @@ isa_intr_establish(ic, irq, type, level,
#if NIOAPIC > 0
if (pic)
snprintf(evname, sizeof(evname), "%s pin %d",
- pic->pic_name, APIC_IRQ_PIN(ih.pirq));
+ device_xname(&pic->sc_dev), APIC_IRQ_PIN(ih.pirq));
else
#endif
snprintf(evname, sizeof(evname), "irq%d", irq);
============================================================
--- sys/arch/xen/xen/pci_intr_machdep.c 631aa160f5a48cbac88d2b28e8d8e075975e962b
+++ sys/arch/xen/xen/pci_intr_machdep.c 1953765b4952b18f50836820598784d8568bd5af
@@ -170,16 +170,17 @@ const char
{
static char buf[64];
#if NIOAPIC > 0
- struct pic *pic;
+ struct ioapic_softc *pic;
if (ih.pirq & APIC_INT_VIA_APIC) {
- pic = (struct pic *)ioapic_find(APIC_IRQ_APIC(ih.pirq));
+ pic = ioapic_find(APIC_IRQ_APIC(ih.pirq));
if (pic == NULL) {
printf("pci_intr_string: bad ioapic %d\n",
APIC_IRQ_APIC(ih.pirq));
return NULL;
}
snprintf(buf, 64, "%s pin %d, event channel %d",
- pic->pic_name, APIC_IRQ_PIN(ih.pirq), ih.evtch);
+ device_xname(&pic->sc_dev), APIC_IRQ_PIN(ih.pirq),
+ ih.evtch);
return buf;
}
#endif
@@ -213,16 +214,16 @@ pci_intr_establish(pci_chipset_tag_t pci
{
char evname[16];
#if NIOAPIC > 0
- struct pic *pic;
+ struct ioapic_softc *pic;
if (intrh.pirq & APIC_INT_VIA_APIC) {
- pic = (struct pic *)ioapic_find(APIC_IRQ_APIC(intrh.pirq));
+ pic = ioapic_find(APIC_IRQ_APIC(intrh.pirq));
if (pic == NULL) {
printf("pci_intr_establish: bad ioapic %d\n",
APIC_IRQ_APIC(intrh.pirq));
return NULL;
}
snprintf(evname, sizeof(evname), "%s pin %d",
- pic->pic_name, APIC_IRQ_PIN(intrh.pirq));
+ device_xname(&pic->sc_dev), APIC_IRQ_PIN(intrh.pirq));
} else
#endif
snprintf(evname, sizeof(evname), "irq%d", intrh.pirq);
============================================================
--- sys/arch/xen/xen/pciide_machdep.c 943767c94ec770ef6eb1f44290b77be097738a46
+++ sys/arch/xen/xen/pciide_machdep.c 7f00ea5849b978b860497eee01d98eac46a6daa4
@@ -75,7 +75,7 @@ pciide_machdep_compat_intr_establish(dev
char evname[8];
struct xen_intr_handle xenih;
#if NIOAPIC > 0
- struct pic *pic = NULL;
+ struct ioapic_softc *pic = NULL;
#endif
int evtch;
@@ -95,8 +95,7 @@ pciide_machdep_compat_intr_establish(dev
if (intr_find_mpmapping(mp_isa_bus, xenih.pirq, &xenih) == 0 ||
intr_find_mpmapping(mp_eisa_bus, xenih.pirq, &xenih) == 0) {
if (!APIC_IRQ_ISLEGACY(xenih.pirq)) {
- pic = (struct pic *)
- ioapic_find(APIC_IRQ_APIC(xenih.pirq));
+ pic = ioapic_find(APIC_IRQ_APIC(xenih.pirq));
if (pic == NULL) {
printf("pciide_machdep_compat_intr_establish: "
"unknown apic %d\n",
@@ -115,7 +114,7 @@ pciide_machdep_compat_intr_establish(dev
#if NIOAPIC > 0
if (pic)
snprintf(evname, sizeof(evname), "%s pin %d",
- pic->pic_name, APIC_IRQ_PIN(xenih.pirq));
+ device_xname(&pic->sc_dev), APIC_IRQ_PIN(xenih.pirq));
else
#endif
snprintf(evname, sizeof(evname), "irq%d",
@@ -130,7 +129,8 @@ pciide_machdep_compat_intr_establish(dev
device_xname(dev), PCIIDE_CHANNEL_NAME(chan));
#if NIOAPIC > 0
if (pic)
- printf("%s pin %d", pic->pic_name, APIC_IRQ_PIN(xenih.pirq));
+ printf("%s pin %d", device_xname(&pic->sc_dev),
+ APIC_IRQ_PIN(xenih.pirq));
else
#endif
printf("irq %d", ih->pirq);
Home |
Main Index |
Thread Index |
Old Index