Changeset 99c2c69e in mainline for kernel/arch/ia64/src/ddi/ddi.c


Ignore:
Timestamp:
2013-09-13T00:36:30Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
67fbd5e
Parents:
7f84430 (diff), 11d41be5 (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:

mainline changes

File:
1 edited

Legend:

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

    r7f84430 r99c2c69e  
    11/*
    22 * Copyright (c) 2006 Jakub Jermar
    3  * Copyright (c) 2008 Jakub vana
     3 * Copyright (c) 2008 Jakub Vana
    44 * All rights reserved.
    55 *
     
    5656{
    5757        if (!task->arch.iomap) {
    58                 uint8_t *map;
    59 
    6058                task->arch.iomap = malloc(sizeof(bitmap_t), 0);
    61                 map = malloc(BITS2BYTES(IO_MEMMAP_PAGES), 0);
    62                 if(!map)
     59                if (task->arch.iomap == NULL)
    6360                        return ENOMEM;
    64                 bitmap_initialize(task->arch.iomap, map, IO_MEMMAP_PAGES);
     61               
     62                void *store = malloc(bitmap_size(IO_MEMMAP_PAGES), 0);
     63                if (store == NULL)
     64                        return ENOMEM;
     65               
     66                bitmap_initialize(task->arch.iomap, IO_MEMMAP_PAGES, store);
    6567                bitmap_clear_range(task->arch.iomap, 0, IO_MEMMAP_PAGES);
    6668        }
     
    6971        size = ALIGN_UP(size + ioaddr - 4 * iopage, PORTS_PER_PAGE);
    7072        bitmap_set_range(task->arch.iomap, iopage, size / 4);
    71 
     73       
    7274        return 0;
    7375}
Note: See TracChangeset for help on using the changeset viewer.