anchor.diff:                      (irq-attachment-exclusive-p (first (irq-attachments irq))))
              (debug-print-line "Cannot attach to IRQ " irq " - in exclusive use")
              (return-from irq-attach nil))))
  -  (let ((attachment (make-irq-attachment :irq irq
  -                                         :device device
  -                                         :handler handler
  -                                         :exclusive-p exclusive)))
  -    (push-wired attachment (irq-attachments irq))
  -    ;; Unmask the IRQ if this is the first attachment.
  -    (when (endp (rest (irq-attachments irq)))
  -      (platform-unmask-irq (irq-platform-number irq)))
  +  (let* ((attachment (make-irq-attachment :irq irq
  +                                          :device device
  +                                          :handler handler
  +                                          :exclusive-p exclusive))
  +         (cons (sys.int::cons-in-area attachment nil :wired)))
  +    (safe-without-interrupts (irq cons)
  +      (with-place-spinlock ((irq-lock irq))
  +        (setf (cdr cons) (irq-attachments irq)
  +              (irq-attachments irq) cons)
  +        ;; Unmask the IRQ if this is the first attachment.
  +        (when (endp (rest (irq-attachments irq)))
  +          (platform-unmask-irq (irq-platform-number irq)))))
       attachment))
   
   (defun irq-eoi (attachment)
  -  (when (not (irq-attachment-pending-eoi attachment))
  -    (debug-print-line "Multiple EOI calls for attachment " attachment))
  -  (setf (irq-attachment-pending-eoi attachment) nil)
  -  ;; Unmask the IRQ if all attachments have EOI'd.
  -  (let ((irq (irq-attachment-irq attachment)))
  -    (when (dolist (a (irq-attachments irq) t)
  -            (when (irq-attachment-pending-eoi a)
  -              (return nil)))
  -      (platform-unmask-irq (irq-platform-number irq))))
  +  (safe-without-interrupts (attachment)
  +    (let ((irq (irq-attachment-irq attachment)))
  +      (with-place-spinlock ((irq-lock irq))
  +        (when (not (irq-attachment-pending-eoi attachment))
  +          (debug-print-line "Multiple EOI calls for attachment " attachment))
  +        (setf (irq-attachment-pending-eoi attachment) nil)
  +        ;; Unmask the IRQ if all attachments have EOI'd.
  +        (when (dolist (a (irq-attachments irq) t)
  +                (when (irq-attachment-pending-eoi a)
  +                  (return nil)))
  +          (platform-unmask-irq (irq-platform-number irq))))))
     (values))
   
   ;;; Simple IRQ handler.
  
positive.code:   (values))
  
  (defun simple-irq-mask (simple-irq)
    ;; FIXME: CAS this slot, or use some locking.
    (case (simple-irq-state simple-irq)
      (:masked-eoi-pending
       (setf (simple-irq-state simple-irq) :masked)
       (setf (event-state (simple-irq-event simple-irq)) nil)
       (irq-eoi (simple-irq-attachment simple-irq)))
      (:masked)
      (:unmasked
       (setf (simple-irq-state simple-irq) :masked)))
    (values))
  
  (defun simple-irq-unmask (simple-irq)
    ;; FIXME: CAS this slot, or use some locking.
    (let ((prev (simple-irq-state simple-irq)))
      (setf (simple-irq-state simple-irq) :unmasked)
      (when (eql prev :masked-eoi-pending)
        (setf (event-state (simple-irq-event simple-irq)) nil)
        (irq-eoi (simple-irq-attachment simple-irq))))
    (values))
  
  (defun simple-irq-pending-p (simple-irq)
  
negative.code:              (:area :wired))
    platform-number
    attachments
    (count 0)
    (lock (place-spinlock-initializer)))
  
  (defstruct (irq-attachment
               (:area :wired))
  