From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 18 Jun 2013 16:00:23 +0200 (CEST) Received: from multi.imgtec.com ([194.200.65.239]:41595 "EHLO multi.imgtec.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S6824104Ab3FROAVmK59d (ORCPT ); Tue, 18 Jun 2013 16:00:21 +0200 From: Markos Chandras To: CC: Markos Chandras , , Wim Van Sebroeck Subject: [PATCH v2 5/7] drivers: watchdog: sb_wdog: Fix 32bit linking problems Date: Tue, 18 Jun 2013 15:00:06 +0100 Message-ID: <1371564006-31805-1-git-send-email-markos.chandras@imgtec.com> X-Mailer: git-send-email 1.8.2.1 MIME-Version: 1.0 Content-Type: text/plain X-SEF-Processed: 7_3_0_01192__2013_06_18_15_00_14 Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 36972 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: markos.chandras@imgtec.com Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips Fixes the following linking problem: drivers/watchdog/sb_wdog.c:211: undefined reference to `__udivdi3' Signed-off-by: Markos Chandras Acked-by: Steven J. Hill Cc: sibyte-users@bitmover.com Cc: Wim Van Sebroeck --- This patch is for the upstream-sfr/mips-for-linux-next tree --- drivers/watchdog/sb_wdog.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/watchdog/sb_wdog.c b/drivers/watchdog/sb_wdog.c index 25c7a3f..35b96738 100644 --- a/drivers/watchdog/sb_wdog.c +++ b/drivers/watchdog/sb_wdog.c @@ -170,6 +170,7 @@ static long sbwdog_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { int ret = -ENOTTY; + u64 tmp_user_dog; unsigned long time; void __user *argp = (void __user *)arg; int __user *p = argp; @@ -208,7 +209,9 @@ static long sbwdog_ioctl(struct file *file, unsigned int cmd, * get the remaining count from the ... count register * which is 1*8 before the config register */ - ret = put_user(__raw_readq(user_dog - 8) / 1000000, p); + tmp_user_dog = __raw_readq(user_dog - 8); + do_div(tmp_user_dog, 1000000); + ret = put_user(tmp_user_dog, p); break; } return ret; -- 1.8.2.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from multi.imgtec.com ([194.200.65.239]:41595 "EHLO multi.imgtec.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S6824104Ab3FROAVmK59d (ORCPT ); Tue, 18 Jun 2013 16:00:21 +0200 From: Markos Chandras Subject: [PATCH v2 5/7] drivers: watchdog: sb_wdog: Fix 32bit linking problems Date: Tue, 18 Jun 2013 15:00:06 +0100 Message-ID: <1371564006-31805-1-git-send-email-markos.chandras@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain Return-Path: Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-subscribe: List-owner: List-post: List-archive: To: linux-mips@linux-mips.org Cc: Markos Chandras , sibyte-users@bitmover.com, Wim Van Sebroeck Message-ID: <20130618140006.LWD3bXjl-fD8t2wqdV0W9kBgH3qVMeld4nC1qr0ZEGI@z> Fixes the following linking problem: drivers/watchdog/sb_wdog.c:211: undefined reference to `__udivdi3' Signed-off-by: Markos Chandras Acked-by: Steven J. Hill Cc: sibyte-users@bitmover.com Cc: Wim Van Sebroeck --- This patch is for the upstream-sfr/mips-for-linux-next tree --- drivers/watchdog/sb_wdog.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/watchdog/sb_wdog.c b/drivers/watchdog/sb_wdog.c index 25c7a3f..35b96738 100644 --- a/drivers/watchdog/sb_wdog.c +++ b/drivers/watchdog/sb_wdog.c @@ -170,6 +170,7 @@ static long sbwdog_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { int ret = -ENOTTY; + u64 tmp_user_dog; unsigned long time; void __user *argp = (void __user *)arg; int __user *p = argp; @@ -208,7 +209,9 @@ static long sbwdog_ioctl(struct file *file, unsigned int cmd, * get the remaining count from the ... count register * which is 1*8 before the config register */ - ret = put_user(__raw_readq(user_dog - 8) / 1000000, p); + tmp_user_dog = __raw_readq(user_dog - 8); + do_div(tmp_user_dog, 1000000); + ret = put_user(tmp_user_dog, p); break; } return ret; -- 1.8.2.1