Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 220025
b: refs/heads/master
c: d100092
h: refs/heads/master
i:
  220023: a471d98
v: v3
  • Loading branch information
Ernesto Ramos authored and Greg Kroah-Hartman committed Oct 5, 2010
1 parent eec73e8 commit dca3c6f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7d1d628344dcc927c1be7363937059a8d6072042
refs/heads/master: d10009211ce12c70f8d9084745cadc413ddec7f2
17 changes: 2 additions & 15 deletions trunk/drivers/staging/tidspbridge/rmgr/nldr.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#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"
Expand Down Expand Up @@ -304,7 +304,6 @@ static void unload_ovly(struct nldr_nodeobject *nldr_node_obj,
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 ========
Expand Down Expand Up @@ -1637,7 +1636,7 @@ static int remote_alloc(void **ref, u16 mem_sect, u32 size,
(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;
Expand Down Expand Up @@ -1880,18 +1879,6 @@ static bool find_in_persistent_lib_array(struct nldr_nodeobject *nldr_node_obj,
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
Expand Down

0 comments on commit dca3c6f

Please sign in to comment.