panic: aatpic_assign_cpu: bad cookie [Was: Build machine OK; laptop panics @r269515]

Roger Pau Monné royger at FreeBSD.org
Thu Aug 7 11:32:56 UTC 2014


On 06/08/14 23:07, David Wolfskill wrote:
> On Wed, Aug 06, 2014 at 10:48:32PM +0200, Trond Endrestøl wrote:
>> ...
>> Reverting r269510 did the trick, i.e.:
>>
>> cd /usr/src && svn up && svn diff -r 269510:269509 | patch
>>
>> My i386 head VM is running smoothly with r269641M, with M meaning only 
>> the above reversal.
>> ...
> 
> Works for me, as well -- thanks!
> 
> FreeBSD 11.0-CURRENT #1333  r269622M/269622:1100028: Wed Aug  6 14:01:30 PDT 2014
> 
> (I'll be providing more details to royger@ et al. in a moment.)

I think I've found the issue, but since I'm not able to reproduce it,
could someone try the following patch? (without r269510 reverted).

Thanks, Roger.

-------------- next part --------------
>From 91264290520a6a6eee6cd35d05a65e2dd0e61dc8 Mon Sep 17 00:00:00 2001
From: Roger Pau Monne <roger.pau at citrix.com>
Date: Thu, 7 Aug 2014 12:05:10 +0200
Subject: [PATCH] atpic: make sure atpic_init is called after IO APIC
 initialization

After r269510 the IO APIC and ATPIC initialization is done at the same
order, which means atpic_init can be called before the IO APIC has
been initalized. In that case the ATPIC will take over the interrupt
sources, preventing the IO APIC from registering them.

Reported by: David Wolfskill <david at catwhisker.org>
Sponsored by: Citrix Systems R&D
---
 sys/x86/isa/atpic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sys/x86/isa/atpic.c b/sys/x86/isa/atpic.c
index 6ce6d1a..e3fdb34 100644
--- a/sys/x86/isa/atpic.c
+++ b/sys/x86/isa/atpic.c
@@ -524,7 +524,7 @@ atpic_init(void *dummy __unused)
 		intr_register_source(&ai->at_intsrc);
 	}
 }
-SYSINIT(atpic_init, SI_SUB_INTR, SI_ORDER_SECOND + 1, atpic_init, NULL);
+SYSINIT(atpic_init, SI_SUB_INTR, SI_ORDER_FOURTH, atpic_init, NULL);
 
 void
 atpic_handle_intr(u_int vector, struct trapframe *frame)
-- 
1.7.7.5 (Apple Git-26)



More information about the freebsd-current mailing list