Changes in uspace/drv/bus/usb/ohci/utils/malloc32.h [d394f1b8:e2718e1] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/utils/malloc32.h
rd394f1b8 re2718e1 41 41 #include <as.h> 42 42 43 /* Generic TDs and EDs require 16byte alignment, 44 * Isochronous TD require 32byte alignment, 45 * buffers do not have to be aligned. 46 */ 47 #define OHCI_ALIGN 32 48 43 49 /** Get physical address translation 44 50 * … … 50 56 uintptr_t result; 51 57 int ret = as_get_physical_mapping(addr, &result); 52 58 53 59 if (ret != EOK) 54 60 return 0; 55 return (result | ((uintptr_t)addr & 0xfff)); 61 62 return result; 56 63 } 57 64 /*----------------------------------------------------------------------------*/ … … 62 69 */ 63 70 static inline void * malloc32(size_t size) 64 { return memalign( size, size); }71 { return memalign(OHCI_ALIGN, size); } 65 72 /*----------------------------------------------------------------------------*/ 66 73 /** Physical mallocator simulator … … 69 76 */ 70 77 static inline void free32(void *addr) 71 { if (addr)free(addr); }78 { free(addr); } 72 79 #endif 73 80 /**
Note:
See TracChangeset
for help on using the changeset viewer.