summaryrefslogtreecommitdiffstats
path: root/arm-dma-amba_pl08x-avoid-64bit-division.patch
diff options
context:
space:
mode:
authorKyle McMartin <kyle@redhat.com>2013-07-29 11:57:43 -0400
committerKyle McMartin <kyle@redhat.com>2013-07-29 11:57:43 -0400
commit8260f13a38b832845e905dc43fde93ab2d396c21 (patch)
tree578fc21f0ee141e38c0e2d06f91d156e22c26593 /arm-dma-amba_pl08x-avoid-64bit-division.patch
parentd71372b35cf23e8522fe8945585d334e633db996 (diff)
downloadkernel-8260f13a38b832845e905dc43fde93ab2d396c21.tar.gz
kernel-8260f13a38b832845e905dc43fde93ab2d396c21.tar.xz
kernel-8260f13a38b832845e905dc43fde93ab2d396c21.zip
drivers/dma/abma-pl08x.c: avoid a 64-bit division callout to libgcc
Diffstat (limited to 'arm-dma-amba_pl08x-avoid-64bit-division.patch')
-rw-r--r--arm-dma-amba_pl08x-avoid-64bit-division.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/arm-dma-amba_pl08x-avoid-64bit-division.patch b/arm-dma-amba_pl08x-avoid-64bit-division.patch
new file mode 100644
index 000000000..7556e2328
--- /dev/null
+++ b/arm-dma-amba_pl08x-avoid-64bit-division.patch
@@ -0,0 +1,33 @@
+diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
+index 06fe45c..4ce4ac1 100644
+--- a/drivers/dma/amba-pl08x.c
++++ b/drivers/dma/amba-pl08x.c
+@@ -886,8 +886,8 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
+ return 0;
+ }
+
+- if ((bd.srcbus.addr % bd.srcbus.buswidth) ||
+- (bd.dstbus.addr % bd.dstbus.buswidth)) {
++ if ((((u8)(bd.srcbus.addr & 0xff)) % bd.srcbus.buswidth) ||
++ (((u8)(bd.dstbus.addr & 0xff)) % bd.dstbus.buswidth)) {
+ dev_err(&pl08x->adev->dev,
+ "%s src & dst address must be aligned to src"
+ " & dst width if peripheral is flow controller",
+@@ -908,7 +908,7 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
+ */
+ if (bd.remainder < mbus->buswidth)
+ early_bytes = bd.remainder;
+- else if ((mbus->addr) % (mbus->buswidth)) {
++ else if (((u8)(mbus->addr & 0xff)) % (mbus->buswidth)) {
+ early_bytes = mbus->buswidth - (mbus->addr) %
+ (mbus->buswidth);
+ if ((bd.remainder - early_bytes) < mbus->buswidth)
+@@ -928,7 +928,7 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
+ * Master now aligned
+ * - if slave is not then we must set its width down
+ */
+- if (sbus->addr % sbus->buswidth) {
++ if (((u8)(sbus->addr & 0xff)) % sbus->buswidth) {
+ dev_dbg(&pl08x->adev->dev,
+ "%s set down bus width to one byte\n",
+ __func__);