* grub-core/bus/pci.c (grub_memalign_dma32): Always allocate in 64-byte
blocks.
This commit is contained in:
parent
153a4b552d
commit
c8ecc840d7
2 changed files with 11 additions and 1 deletions
|
@ -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>
|
2011-05-16 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/bus/usb/usbhub.c (attach_root_port): Wait 10ms
|
* grub-core/bus/usb/usbhub.c (attach_root_port): Wait 10ms
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include <grub/dl.h>
|
#include <grub/dl.h>
|
||||||
#include <grub/pci.h>
|
#include <grub/pci.h>
|
||||||
#include <grub/mm.h>
|
#include <grub/mm.h>
|
||||||
|
#include <grub/misc.h>
|
||||||
#include <grub/mm_private.h>
|
#include <grub/mm_private.h>
|
||||||
#include <grub/cache.h>
|
#include <grub/cache.h>
|
||||||
|
|
||||||
|
@ -30,7 +31,11 @@ GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
struct grub_pci_dma_chunk *
|
struct grub_pci_dma_chunk *
|
||||||
grub_memalign_dma32 (grub_size_t align, grub_size_t size)
|
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)
|
if (!ret)
|
||||||
return 0;
|
return 0;
|
||||||
grub_arch_sync_dma_caches (ret, size);
|
grub_arch_sync_dma_caches (ret, size);
|
||||||
|
|
Loading…
Reference in a new issue