#include <dspbridge/uuidutil.h>
#include <dspbridge/nldr.h>
-#include <linux/gcd.h>
+#include <linux/lcm.h>
/* Name of section containing dynamic load mem */
#define DYNMEMSECT ".dspbridge_mem"
enum nldr_phase phase);
static bool find_in_persistent_lib_array(struct nldr_nodeobject *nldr_node_obj,
struct dbll_library_obj *lib);
-static u32 find_lcm(u32 a, u32 b);
/*
* ======== nldr_allocate ========
(size + nldr_obj->us_dsp_word_size -
1) / nldr_obj->us_dsp_word_size;
/* Modify memory 'align' to account for DSP cache line size */
- align = find_lcm(GEM_CACHE_LINE_SIZE, align);
+ align = lcm(GEM_CACHE_LINE_SIZE, align);
dev_dbg(bridge, "%s: memory align to 0x%x\n", __func__, align);
if (segmnt_id != -1) {
rmm_addr_obj->segid = segmnt_id;
return false;
}
-/*
- * ================ Find LCM (Least Common Multiplier ===
- */
-static u32 find_lcm(u32 a, u32 b)
-{
- u32 ret;
-
- ret = a * b / gcd(a, b);
-
- return ret;
-}
-
#ifdef CONFIG_TIDSPBRIDGE_BACKTRACE
/**
* nldr_find_addr() - Find the closest symbol to the given address based on