CHROMIUM: iommu/exynos: Fix allocation to be safer in terms of alignment
authorSonny Rao <sonnyrao@chromium.org>
Wed, 12 Sep 2012 04:27:06 +0000 (21:27 -0700)
committerGerrit <chrome-bot@google.com>
Wed, 12 Sep 2012 16:42:26 +0000 (09:42 -0700)
commita0ddae52c5d6545732cf2029f949a3f7dd732704
tree4f5a2aa6f5acf553c41907b335408c57c323c8ee
parent44ce5977c98691422d8ab031cf580fb237a4ffb9
CHROMIUM: iommu/exynos: Fix allocation to be safer in terms of alignment

The code was expecting kzalloc to align to the size of the allocation
even though that isn't guaranteed, and even had a BUG() to catch when it
happened.  This started triggering with SLUB debugging turned on.  Fix it
by using a slab which returns objects that are properly aligned.

BUG=chrome-os-partner:13948
TEST=boot with slub debugging turn on

Change-Id: Icdf9475233e8c80f090f624a4ca5497011d4aa33
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33053
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Pawel Osciak <posciak@google.com>
Reviewed-by: Prathyush Kalashwaram <prathyush@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
drivers/iommu/exynos-iommu.c