-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
m32r: add __ucmpdi2 to fix build failure
We are having build failure with m32r and the error message being: ERROR: "__ucmpdi2" [lib/842/842_decompress.ko] undefined! ERROR: "__ucmpdi2" [fs/btrfs/btrfs.ko] undefined! ERROR: "__ucmpdi2" [drivers/scsi/sd_mod.ko] undefined! ERROR: "__ucmpdi2" [drivers/media/i2c/adv7842.ko] undefined! ERROR: "__ucmpdi2" [drivers/md/bcache/bcache.ko] undefined! ERROR: "__ucmpdi2" [drivers/iio/imu/inv_mpu6050/inv-mpu6050.ko] undefined! __ucmpdi2 is introduced to m32r architecture taking example from other architectures like h8300, microblaze, mips. Link: http://lkml.kernel.org/r/1465509213-4280-1-git-send-email-sudipm.mukherjee@gmail.com Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
- Loading branch information
Sudip Mukherjee
authored and
Linus Torvalds
committed
Jul 26, 2016
1 parent
8cde0da
commit a44ce52
Showing
4 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#ifndef __ASM_LIBGCC_H | ||
#define __ASM_LIBGCC_H | ||
|
||
#include <asm/byteorder.h> | ||
|
||
#ifdef __BIG_ENDIAN | ||
struct DWstruct { | ||
int high, low; | ||
}; | ||
#elif defined(__LITTLE_ENDIAN) | ||
struct DWstruct { | ||
int low, high; | ||
}; | ||
#else | ||
#error I feel sick. | ||
#endif | ||
|
||
typedef union { | ||
struct DWstruct s; | ||
long long ll; | ||
} DWunion; | ||
|
||
#endif /* __ASM_LIBGCC_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include "libgcc.h" | ||
|
||
int __ucmpdi2(unsigned long long a, unsigned long long b) | ||
{ | ||
const DWunion au = {.ll = a}; | ||
const DWunion bu = {.ll = b}; | ||
|
||
if ((unsigned int)au.s.high < (unsigned int)bu.s.high) | ||
return 0; | ||
else if ((unsigned int)au.s.high > (unsigned int)bu.s.high) | ||
return 2; | ||
if ((unsigned int)au.s.low < (unsigned int)bu.s.low) | ||
return 0; | ||
else if ((unsigned int)au.s.low > (unsigned int)bu.s.low) | ||
return 2; | ||
return 1; | ||
} |