Skip to content

Commit

Permalink
[S390] qdio: make sure qdr is aligned to page size
Browse files Browse the repository at this point in the history
kzalloc does not guarantee the required alignment of qdr to page size,
use get_zeroed_page instead.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
  • Loading branch information
Jan Glauber authored and Martin Schwidefsky committed Aug 1, 2008
1 parent 7e9238f commit 3b8e300
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/s390/cio/qdio_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1355,7 +1355,7 @@ int qdio_allocate(struct qdio_initialize *init_data)
goto out_rel;

/* qdr is used in ccw1.cda which is u32 */
irq_ptr->qdr = kzalloc(sizeof(struct qdr), GFP_KERNEL | GFP_DMA);
irq_ptr->qdr = (struct qdr *) get_zeroed_page(GFP_KERNEL | GFP_DMA);
if (!irq_ptr->qdr)
goto out_rel;
WARN_ON((unsigned long)irq_ptr->qdr & 0xfff);
Expand Down
2 changes: 1 addition & 1 deletion drivers/s390/cio/qdio_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ void qdio_release_memory(struct qdio_irq *irq_ptr)
kmem_cache_free(qdio_q_cache, q);
}
}
kfree(irq_ptr->qdr);
free_page((unsigned long) irq_ptr->qdr);
free_page(irq_ptr->chsc_page);
free_page((unsigned long) irq_ptr);
}
Expand Down

0 comments on commit 3b8e300

Please sign in to comment.