Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751976AbaK1Saz (ORCPT ); Fri, 28 Nov 2014 13:30:55 -0500 Received: from mail-wg0-f48.google.com ([74.125.82.48]:50043 "EHLO mail-wg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751300AbaK1SYU (ORCPT ); Fri, 28 Nov 2014 13:24:20 -0500 From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Tony Luck , Peter Zijlstra , Heiko Carstens , Benjamin Herrenschmidt , Thomas Gleixner , Oleg Nesterov , Paul Mackerras , Wu Fengguang , Ingo Molnar , Rik van Riel , Martin Schwidefsky Subject: [RFC PATCH 06/30] s390: Introduce cputime64_to_nsecs() Date: Fri, 28 Nov 2014 19:23:36 +0100 Message-Id: <1417199040-21044-7-git-send-email-fweisbec@gmail.com> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1417199040-21044-1-git-send-email-fweisbec@gmail.com> References: <1417199040-21044-1-git-send-email-fweisbec@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This will be needed for the conversion of kernel stat to nsecs. Cc: Benjamin Herrenschmidt Cc: Heiko Carstens Cc: Ingo Molnar Cc: Martin Schwidefsky Cc: Oleg Nesterov Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Tony Luck Cc: Wu Fengguang Signed-off-by: Frederic Weisbecker --- arch/s390/include/asm/cputime.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/s390/include/asm/cputime.h b/arch/s390/include/asm/cputime.h index 820b38a..75ba96f 100644 --- a/arch/s390/include/asm/cputime.h +++ b/arch/s390/include/asm/cputime.h @@ -59,6 +59,11 @@ static inline cputime64_t jiffies64_to_cputime64(const u64 jif) return (__force cputime64_t)(jif * (CPUTIME_PER_SEC / HZ)); } +static inline u64 cputime64_to_nsecs(cputime64_t cputime) +{ + return (__force u64)cputime * CPUTIME_PER_USEC * NSEC_PER_USEC; +} + /* * Convert cputime to microseconds and back. */ -- 2.1.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/