diff options
| author | Mikulas Patocka <mpatocka@redhat.com> | 2013-07-10 18:41:17 -0400 |
|---|---|---|
| committer | Alasdair G Kergon <agk@redhat.com> | 2013-07-10 18:41:17 -0400 |
| commit | 43aeaa29573924df76f44eda2bbd94ca36e407b5 (patch) | |
| tree | 9f05d2afbd800c44c4bed6e51b4524ac06a4ad62 | |
| parent | 553d8fe029a561d5921fba495206e64eefea42cb (diff) | |
dm cache: fix arm link errors with inline
Use __always_inline to avoid a link failure with gcc 4.6 on ARM.
gcc 4.7 is OK.
It creates a function block_div.part.8, it references __udivdi3 and
__umoddi3 and it is never called. The references to __udivdi3 and
__umoddi3 cause a link failure.
Reported-by: Rob Herring <robherring2@gmail.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| -rw-r--r-- | drivers/md/dm-cache-target.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c index df44b60e66f2..0df3ec085ebb 100644 --- a/drivers/md/dm-cache-target.c +++ b/drivers/md/dm-cache-target.c | |||
| @@ -425,6 +425,10 @@ static bool block_size_is_power_of_two(struct cache *cache) | |||
| 425 | return cache->sectors_per_block_shift >= 0; | 425 | return cache->sectors_per_block_shift >= 0; |
| 426 | } | 426 | } |
| 427 | 427 | ||
| 428 | /* gcc on ARM generates spurious references to __udivdi3 and __umoddi3 */ | ||
| 429 | #if defined(CONFIG_ARM) && __GNUC__ == 4 && __GNUC_MINOR__ <= 6 | ||
| 430 | __always_inline | ||
| 431 | #endif | ||
| 428 | static dm_block_t block_div(dm_block_t b, uint32_t n) | 432 | static dm_block_t block_div(dm_block_t b, uint32_t n) |
| 429 | { | 433 | { |
| 430 | do_div(b, n); | 434 | do_div(b, n); |
