+ powerpc-cputimeh-build-fix.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     powerpc: cputime.h build fix

has been added to the -mm tree.  Its filename is

     powerpc-cputimeh-build-fix.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: powerpc: cputime.h build fix
From: David Woodhouse <dwmw2@xxxxxxxxxxxxx>

Fix the powerpc CONFIG_VIRT_CPU_ACCOUNTING=y build.

[akpm: by inlining the whole world]

Signed-off-by: David Woodhouse <dwmw2@xxxxxxxxxxxxx>
Cc: Dave Jones <davej@xxxxxxxxxxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 include/asm-powerpc/cputime.h |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+)

diff -puN include/asm-powerpc/cputime.h~powerpc-cputimeh-build-fix include/asm-powerpc/cputime.h
--- a/include/asm-powerpc/cputime.h~powerpc-cputimeh-build-fix
+++ a/include/asm-powerpc/cputime.h
@@ -43,6 +43,7 @@ typedef u64 cputime64_t;
 
 #define cputime64_zero			((cputime64_t)0)
 #define cputime64_add(__a, __b)		((__a) + (__b))
+#define cputime64_sub(__a, __b)		((__a) - (__b))
 #define cputime_to_cputime64(__ct)	(__ct)
 
 #ifdef __KERNEL__
@@ -64,6 +65,23 @@ static inline cputime_t jiffies_to_cputi
 
 	/* have to be a little careful about overflow */
 	ct = jif % HZ;
+	sec = jif / HZ;
+	if (ct) {
+		ct *= tb_ticks_per_sec;
+		do_div(ct, HZ);
+	}
+	if (sec)
+		ct += (cputime_t) sec * tb_ticks_per_sec;
+	return ct;
+}
+
+static inline cputime64_t jiffies64_to_cputime64(const u64 jif)
+{
+	cputime_t ct;
+	u64 sec;
+
+	/* have to be a little careful about overflow */
+	ct = jif % HZ;
 	sec = jif / HZ;
 	if (ct) {
 		ct *= tb_ticks_per_sec;
_

Patches currently in -mm which might be from dwmw2@xxxxxxxxxxxxx are

origin.patch
git-gfs2.patch
git-hdrcleanup-vs-git-klibc-on-ia64.patch
git-hdrcleanup-vs-git-klibc-on-ia64-2.patch
powerpc-cputimeh-build-fix.patch
x86_64-support-tif_restore_sigmask.patch
x86_64-pselect-ppoll-support.patch
debug-shared-irqs.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux