j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@siriusit.co.uk --- openbios-devel/arch/sparc32/lib.c | 15 --------------- openbios-devel/drivers/iommu.c | 4 ++-- openbios-devel/include/libc/stdlib.h | 1 - 3 files changed, 2 insertions(+), 18 deletions(-)
diff --git a/openbios-devel/arch/sparc32/lib.c b/openbios-devel/arch/sparc32/lib.c index 788d6f5..a5ad8ca 100644 --- a/openbios-devel/arch/sparc32/lib.c +++ b/openbios-devel/arch/sparc32/lib.c @@ -216,21 +216,6 @@ realloc( void *ptr, size_t size ) return p; }
-// XXX should be removed -int -posix_memalign(void **memptr, size_t alignment, size_t size) -{ - void *block; - - block = mem_alloc(&cmem, size, alignment); - - if (!block) - return -1; - - *memptr = block; - return 0; -} - /* * Allocate memory. This is reusable. */ diff --git a/openbios-devel/drivers/iommu.c b/openbios-devel/drivers/iommu.c index 019f8b7..716d01e 100644 --- a/openbios-devel/drivers/iommu.c +++ b/openbios-devel/drivers/iommu.c @@ -53,7 +53,7 @@ dvma_alloc(int size, unsigned int *pphys) int ret;
npages = (size + (PAGE_SIZE-1)) / PAGE_SIZE; - ret = posix_memalign(&va, npages * PAGE_SIZE, PAGE_SIZE); + ret = ofmem_posix_memalign(&va, npages * PAGE_SIZE, PAGE_SIZE); if (ret != 0) return NULL;
@@ -132,7 +132,7 @@ iommu_init(struct iommu *t, uint64_t base) /* Allocate IOMMU page table */ /* Tremendous alignment causes great waste... */ ptsize = (vasize / PAGE_SIZE) * sizeof(int); - ret = posix_memalign((void *)&ptab, ptsize, ptsize); + ret = ofmem_posix_memalign((void *)&ptab, ptsize, ptsize); if (ret != 0) { DPRINTF("Cannot allocate IOMMU table [0x%x]\n", ptsize); for (;;) { } diff --git a/openbios-devel/include/libc/stdlib.h b/openbios-devel/include/libc/stdlib.h index 4059db2..ef08838 100644 --- a/openbios-devel/include/libc/stdlib.h +++ b/openbios-devel/include/libc/stdlib.h @@ -19,7 +19,6 @@ extern void *malloc( int size ); extern void free( void *ptr ); extern void *realloc( void *ptr, size_t size ); -extern int posix_memalign(void **memptr, size_t alignment, size_t size);
/* should perhaps go somewhere else... */ extern void qsort( void *base, size_t nmemb, size_t size, int (*compar)(const void*, const void*));