Changeset 15d0046 in mainline for kernel/arch/ia64/src/ddi/ddi.c


Ignore:
Timestamp:
2014-09-12T13:22:33Z (10 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9b20126
Parents:
8db09e4 (diff), 105d8d6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia64/src/ddi/ddi.c

    r8db09e4 r15d0046  
    4747 * Interrupts are disabled and task is locked.
    4848 *
    49  * @param task          Task.
    50  * @param ioaddr        Starting I/O space address.
    51  * @param size          Size of the enabled I/O range.
     49 * @param task   Task.
     50 * @param ioaddr Starting I/O space address.
     51 * @param size   Size of the enabled I/O range.
    5252 *
    53  * @return 0 on success or an error code from errno.h.
     53 * @return EOK on success or an error code from errno.h.
    5454 */
    5555int ddi_iospace_enable_arch(task_t *task, uintptr_t ioaddr, size_t size)
     
    7272        bitmap_set_range(task->arch.iomap, iopage, size / 4);
    7373       
    74         return 0;
     74        return EOK;
     75}
     76
     77/** Disable I/O space range for task.
     78 *
     79 * Interrupts are disabled and task is locked.
     80 *
     81 * @param task   Task.
     82 * @param ioaddr Starting I/O space address.
     83 * @param size   Size of the disabled I/O range.
     84 *
     85 * @return EOK on success or an error code from errno.h.
     86 */
     87int ddi_iospace_disable_arch(task_t *task, uintptr_t ioaddr, size_t size)
     88{
     89        if (!task->arch.iomap)
     90                return EINVAL;
     91
     92        uintptr_t iopage = ioaddr / PORTS_PER_PAGE;
     93        size = ALIGN_UP(size + ioaddr - 4 * iopage, PORTS_PER_PAGE);
     94        bitmap_clear_range(task->arch.iomap, iopage, size / 4);
     95       
     96        return EOK;
    7597}
    7698
Note: See TracChangeset for help on using the changeset viewer.