]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
fs:ext4:write: Add lldiv and do_div to perform 64-32 bits division
authorŁukasz Majewski <l.majewski@samsung.com>
Wed, 5 Dec 2012 08:06:37 +0000 (08:06 +0000)
committerTom Rini <trini@ti.com>
Fri, 7 Dec 2012 15:47:52 +0000 (08:47 -0700)
commit32fc16d7e7a81816ce247b7cd70c94f3210a228b
tree78b4f9231a15b7b441d0978d348e06b15199ade3
parent3fdf7596dff87a79e2b41d07479c608d91d06cb3
fs:ext4:write: Add lldiv and do_div to perform 64-32 bits division

The ext4write code has been using direct calls to 64-32 division
(/ and %).

Officially supported u-boot toolchains (eldk-5.[12].x) generate calls
to __aeabi_uldivmod(), which is niether defined in the toolchain libs
nor u-boot source tree.

Due to that, when the ext4write command has been executed, "undefined
instruction" execption was generated (since the __aeabi_uldivmod()
is not provided).

To fix this error, lldiv() for division and do_div() for modulo have
been used.

Those two functions are recommended for performing 64-32 bit number
division in u-boot.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
fs/ext4/ext4fs.c