Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4fad8098 authored by Sedat Dilek's avatar Sedat Dilek Committed by Mauro Carvalho Chehab
Browse files

i7core_edac: Fix compilation on 32 bits arch



on i386:
	ERROR: "__udivdi3" [drivers/edac/i7core_edac.ko] undefined!\

In both get_sdram_scrub_rate() and set_sdram_scrub_rate()

Reported-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 535e9c78
Loading
Loading
Loading
Loading
+5 −2
Original line number Original line Diff line number Diff line
@@ -37,6 +37,7 @@
#include <linux/smp.h>
#include <linux/smp.h>
#include <asm/mce.h>
#include <asm/mce.h>
#include <asm/processor.h>
#include <asm/processor.h>
#include <asm/div64.h>


#include "edac_core.h"
#include "edac_core.h"


@@ -2102,7 +2103,8 @@ static int set_sdram_scrub_rate(struct mem_ctl_info *mci, u32 new_bw)
		 * program the corresponding register value.
		 * program the corresponding register value.
		 */
		 */
		scrub_interval = (unsigned long long)freq_dclk_mhz *
		scrub_interval = (unsigned long long)freq_dclk_mhz *
			cache_line_size * 1000000 / new_bw;
			cache_line_size * 1000000;
		do_div(scrub_interval, new_bw);


		if (!scrub_interval || scrub_interval > SCRUBINTERVAL_MASK)
		if (!scrub_interval || scrub_interval > SCRUBINTERVAL_MASK)
			return -EINVAL;
			return -EINVAL;
@@ -2153,7 +2155,8 @@ static int get_sdram_scrub_rate(struct mem_ctl_info *mci)


	/* Calculate scrub rate value into byte/sec bandwidth */
	/* Calculate scrub rate value into byte/sec bandwidth */
	scrub_rate =  (unsigned long long)freq_dclk_mhz *
	scrub_rate =  (unsigned long long)freq_dclk_mhz *
		1000000 * cache_line_size / scrubval;
		1000000 * cache_line_size;
	do_div(scrub_rate, scrubval);
	return (int)scrub_rate;
	return (int)scrub_rate;
}
}