Changeset b80f920 in rtems


Ignore:
Timestamp:
Apr 15, 2014, 11:36:35 AM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
33d0666
Parents:
487b94e7
git-author:
Sebastian Huber <sebastian.huber@…> (04/15/14 11:36:35)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/16/14 07:07:33)
Message:

bsp/qoriq: SMP support for IRQ support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/qoriq/irq/irq.c

    r487b94e7 rb80f920  
    88
    99/*
    10  * Copyright (c) 2010, 2012 embedded brains GmbH.  All rights reserved.
     10 * Copyright (c) 2010-2014 embedded brains GmbH.  All rights reserved.
    1111 *
    1212 *  embedded brains GmbH
    13  *  Obere Lagerstr. 30
     13 *  Dornierstr. 4
    1414 *  82178 Puchheim
    1515 *  Germany
     
    4747
    4848#define SPURIOUS 0xffff
     49
     50static rtems_interrupt_lock lock =
     51 RTEMS_INTERRUPT_LOCK_INITIALIZER("QorIQ IRQ");
    4952
    5053static const uint16_t vpr_and_dr_offsets [] = {
     
    169172
    170173                if (QORIQ_PIC_PRIORITY_IS_VALID(new_priority)) {
    171                         rtems_interrupt_level level;
    172 
    173                         rtems_interrupt_disable(level);
     174                        rtems_interrupt_lock_context lock_context;
     175
     176                        rtems_interrupt_lock_acquire(&lock, &lock_context);
    174177                        old_vpr = *vpr;
    175178                        *vpr = VPR_PRIORITY_SET(old_vpr, (uint32_t) new_priority);
    176                         rtems_interrupt_enable(level);
     179                        rtems_interrupt_lock_release(&lock, &lock_context);
    177180                } else if (new_priority < 0) {
    178181                        old_vpr = *vpr;
     
    221224                int offs = vpr_and_dr_offsets [vector] << 2;
    222225                volatile uint32_t *vpr = (volatile uint32_t *) &qoriq.pic + offs;
    223                 rtems_interrupt_level level;
    224 
    225                 rtems_interrupt_disable(level);
     226                rtems_interrupt_lock_context lock_context;
     227
     228                rtems_interrupt_lock_acquire(&lock, &lock_context);
    226229                *vpr = (*vpr & ~VPR_MSK) | msk;
    227                 rtems_interrupt_enable(level);
     230                rtems_interrupt_lock_release(&lock, &lock_context);
    228231        }
    229232
Note: See TracChangeset for help on using the changeset viewer.