* grub-core/bus/pci.c (grub_memalign_dma32): Always allocate in 64-byte

blocks.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-05-16 08:51:55 +02:00
parent 153a4b552d
commit c8ecc840d7
2 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2011-05-16 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/bus/pci.c (grub_memalign_dma32): Always allocate in 64-byte
blocks.
2011-05-16 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/bus/usb/usbhub.c (attach_root_port): Wait 10ms

View file

@ -20,6 +20,7 @@
#include <grub/dl.h>
#include <grub/pci.h>
#include <grub/mm.h>
#include <grub/misc.h>
#include <grub/mm_private.h>
#include <grub/cache.h>
@ -30,7 +31,11 @@ GRUB_MOD_LICENSE ("GPLv3+");
struct grub_pci_dma_chunk *
grub_memalign_dma32 (grub_size_t align, grub_size_t size)
{
void *ret = grub_memalign (align, size);
void *ret;
if (align < 64)
align = 64;
size = ALIGN_UP (size, align);
ret = grub_memalign (align, size);
if (!ret)
return 0;
grub_arch_sync_dma_caches (ret, size);