Re: [PATCH] Tweak re-routing of PCI interrupts

From: John Baldwin (jhb_at_FreeBSD.org)
Date: 06/06/03

  • Next message: Tinderbox: "[-CURRENT tinderbox] failure on i386/pc98"
    Date: Fri, 06 Jun 2003 15:04:43 -0400 (EDT)
    To: "M. Warner Losh" <imp@bsdimp.com>
    
    

    On 06-Jun-2003 M. Warner Losh wrote:
    > In message: <XFMail.20030606141331.jhb@FreeBSD.org>
    > John Baldwin <jhb@FreeBSD.org> writes:
    >: I have a small tweak to the PCI code that re-routes PCI interrupts.
    >: Basically, it does two things, 1) make the comment less ia64-specific
    >: and 2) if the interrupt route returns an invalid IRQ (i.e. 255), then
    >: we don't change the intline. In other words, if we can't route the
    >: interrupt, we just assume that the firmware knows more than we do and
    >: go with the value it stuck in the register. 1) is a no-brainer, but
    >: I wonder what people think about 2). Patch below:
    >
    > I think #2 isn't so good. #1 is a no-brainer :-)
    >
    >: #if ...
    > ...
    >: + irq = PCIB_ROUTE_INTERRUPT(pcib, dev, cfg->intpin);
    >: + if (PCI_INTERRUPT_VALID(irq))
    >: + cfg->intline = irq;
    >: + else
    >: #endif
    >: + irq = cfg->intline;
    >: + resource_list_add(rl, SYS_RES_IRQ, 0, irq, irq, 1);
    >: }
    >: }
    >
    > The part I don't like is that if we can't route an interrupt, we
    > assume that the interrupt that was written there before is good and
    > routed. This strikes me as an unwise assumption.

    I don't strongly disagree. Hence my request for comments. I've been
    of both minds on this one and just want to see what the consensus is.

    > Also, we haven't
    > recorded our info in the underlying pci register. Don't know if that
    > will matter for other OSes that are booted after we are.

    Don't think it matters as far as reboots, but I do think that this
    code should write the updated intpin to the actual config register.

    -- 
    John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
    "Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/
    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
    

  • Next message: Tinderbox: "[-CURRENT tinderbox] failure on i386/pc98"

    Relevant Pages

    • pc card on watchguard firebox II
      ... I see many people have installed monowall ... pci_cfgintr: can't route an interrupt to 0:16 INTA ... save][CSC serial isa irq] ...
      (freebsd-hackers)
    • pc cards on watchguard firebox II
      ... I see many people have installed monowall ... pci_cfgintr: can't route an interrupt to 0:16 INTA ... save][CSC serial isa irq] ...
      (freebsd-questions)
    • Re: [PATCH] Tweak re-routing of PCI interrupts
      ... I have a small tweak to the PCI code that re-routes PCI interrupts. ... The part I don't like is that if we can't route an interrupt, ... recorded our info in the underlying pci register. ...
      (freebsd-current)
    • Re: [PATCH] Tweak re-routing of PCI interrupts
      ... we don't change the intline. ... if we can't route the ... we just assume that the firmware knows more than we do and ... > The part I don't like is that if we can't route an interrupt, ...
      (freebsd-current)
    • Re: [PATCH] Tweak re-routing of PCI interrupts
      ... :>: I have a small tweak to the PCI code that re-routes PCI interrupts. ... if we can't route the ... :> The part I don't like is that if we can't route an interrupt, ... Pre PCIBIOS machines you are SOL. ...
      (freebsd-current)