libs/lbc: remove CHAR_BIT = 16 support

For CEVA platform CHAR_BIT is 16, and will do lots of extra work
when use IPC.
We will not support this platform anymore, so remove all the b2c operations.

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd
2021-12-08 12:20:35 +08:00
committed by Xiang Xiao
parent db6dd623c6
commit 5b369c5cec
18 changed files with 77 additions and 627 deletions
+9 -9
View File
@@ -63,8 +63,8 @@
* REVISIT: We could do better on machines with 16-bit addressing.
*/
# define MM_MIN_SHIFT B2C_SHIFT( 4) /* 16 bytes */
# define MM_MAX_SHIFT B2C_SHIFT(15) /* 32 Kb */
# define MM_MIN_SHIFT ( 4) /* 16 bytes */
# define MM_MAX_SHIFT (15) /* 32 Kb */
#elif defined(CONFIG_HAVE_LONG_LONG)
/* Four byte offsets; Pointers may be 4 or 8 bytes
@@ -72,19 +72,19 @@
*/
# if UINTPTR_MAX <= UINT32_MAX
# define MM_MIN_SHIFT B2C_SHIFT( 4) /* 16 bytes */
# define MM_MIN_SHIFT ( 4) /* 16 bytes */
# elif UINTPTR_MAX <= UINT64_MAX
# define MM_MIN_SHIFT B2C_SHIFT( 5) /* 32 bytes */
# define MM_MIN_SHIFT ( 5) /* 32 bytes */
# endif
# define MM_MAX_SHIFT B2C_SHIFT(22) /* 4 Mb */
# define MM_MAX_SHIFT (22) /* 4 Mb */
#else
/* Four byte offsets; Pointers must be 4 bytes.
* sizeof(struct mm_freenode_s) is 16 bytes.
*/
# define MM_MIN_SHIFT B2C_SHIFT( 4) /* 16 bytes */
# define MM_MAX_SHIFT B2C_SHIFT(22) /* 4 Mb */
# define MM_MIN_SHIFT ( 4) /* 16 bytes */
# define MM_MAX_SHIFT (22) /* 4 Mb */
#endif
/* All other definitions derive from these two */
@@ -137,9 +137,9 @@ struct mm_allocnode_s
/* What is the size of the allocnode? */
#ifdef CONFIG_MM_SMALL
# define SIZEOF_MM_ALLOCNODE B2C(4)
# define SIZEOF_MM_ALLOCNODE (4)
#else
# define SIZEOF_MM_ALLOCNODE B2C(8)
# define SIZEOF_MM_ALLOCNODE (8)
#endif
#define CHECK_ALLOCNODE_SIZE \