Changeset 7075fb11 in rtems


Ignore:
Timestamp:
Apr 7, 2017, 6:30:46 AM (3 years ago)
Author:
Daniel Hellstrom <daniel@…>
Branches:
master
Children:
ae203e0d
Parents:
61788e76
git-author:
Daniel Hellstrom <daniel@…> (04/07/17 06:30:46)
git-committer:
Daniel Hellstrom <daniel@…> (05/02/17 10:34:45)
Message:

drvmgr: ability to configure IRQ affinity

Location:
cpukit/libdrvmgr
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libdrvmgr/drvmgr.h

    r61788e76 r7075fb11  
    1515#include <stdint.h>
    1616#include <rtems/score/basedefs.h>
     17#include <rtems/score/smpimpl.h>
    1718
    1819#ifdef __cplusplus
     
    138139        int     (*int_mask)(struct drvmgr_dev *, int index);
    139140        int     (*int_unmask)(struct drvmgr_dev *, int index);
     141#ifdef RTEMS_SMP
     142        int     (*int_set_affinity)(struct drvmgr_dev *, int index,
     143                                    Processor_mask cpus);
     144#endif
    140145
    141146        /* Get Parameters */
     
    629634        int index);
    630635
     636/*! Force masking/disable an interrupt on the interrupt controller, this is not normally performed
     637 *  since this will stop all other (shared) ISRs to be disabled until _unmask() is called.
     638 *
     639 *  \param dev        Device to mask interrupt for.
     640 *  \param index      Index is used to identify the IRQ number if hardware has multiple IRQ sources.
     641 *                    Normally Index is set to 0 to indicated the first and only IRQ source.
     642 *                    A negative index is interpreted as a absolute bus IRQ number.
     643 */
     644#ifdef RTEMS_SMP
     645extern int drvmgr_interrupt_set_affinity(
     646        struct drvmgr_dev *dev,
     647        int index,
     648        Processor_mask cpus);
     649#endif
     650
    631651/*! drvmgr_translate() translation options */
    632652enum drvmgr_tr_opts {
  • cpukit/libdrvmgr/drvmgr_drvinf.c

    r61788e76 r7075fb11  
    139139}
    140140
     141#ifdef RTEMS_SMP
     142int drvmgr_interrupt_set_affinity(
     143        struct drvmgr_dev *dev,
     144        int index,
     145        Processor_mask cpus)
     146{
     147        if (!dev || !dev->parent || !dev->parent->ops->int_set_affinity)
     148                return -1;
     149
     150        return dev->parent->ops->int_set_affinity(dev, index, cpus);
     151}
     152#endif
     153
    141154int drvmgr_on_rootbus(struct drvmgr_dev *dev)
    142155{
Note: See TracChangeset for help on using the changeset viewer.