+ statistics-infrastructure-make-printk_clock-a-generic-kernel-wide-nsec-resolution.patch added to -mm tree

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

 



The patch titled

     statistics infrastructure: convert printk_clock() into timestamp_clock()

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

     statistics-infrastructure-make-printk_clock-a-generic-kernel-wide-nsec-resolution.patch

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

------------------------------------------------------
Subject: statistics infrastructure: convert printk_clock() into timestamp_clock()
From: Martin Peschke <mp3@xxxxxxxxxx>


This patch makes printk_clock() a generic kernel-wide nsec-resolution
timestamp_clock().  It's used both by printk() as well as the statistics
infrastructure to provide unified time stamps to users.

Signed-off-by: Martin Peschke <mp3@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/ia64/kernel/setup.c    |    4 ++--
 arch/ia64/kernel/time.c     |   15 ++++++++-------
 arch/ia64/sn/kernel/setup.c |    6 +++---
 include/linux/time.h        |    3 +++
 kernel/printk.c             |    7 +------
 kernel/time.c               |    5 +++++
 6 files changed, 22 insertions(+), 18 deletions(-)

diff -puN arch/ia64/kernel/setup.c~statistics-infrastructure-make-printk_clock-a-generic-kernel-wide-nsec-resolution arch/ia64/kernel/setup.c
--- devel/arch/ia64/kernel/setup.c~statistics-infrastructure-make-printk_clock-a-generic-kernel-wide-nsec-resolution	2006-05-30 15:21:50.000000000 -0700
+++ devel-akpm/arch/ia64/kernel/setup.c	2006-05-30 15:21:50.000000000 -0700
@@ -71,7 +71,7 @@ unsigned long __per_cpu_offset[NR_CPUS];
 EXPORT_SYMBOL(__per_cpu_offset);
 #endif
 
-extern void ia64_setup_printk_clock(void);
+extern void ia64_setup_timestamp_clock(void);
 
 DEFINE_PER_CPU(struct cpuinfo_ia64, cpu_info);
 DEFINE_PER_CPU(unsigned long, local_per_cpu_offset);
@@ -436,7 +436,7 @@ setup_arch (char **cmdline_p)
 	/* process SAL system table: */
 	ia64_sal_init(__va(efi.sal_systab));
 
-	ia64_setup_printk_clock();
+	ia64_setup_timestamp_clock();
 
 #ifdef CONFIG_SMP
 	cpu_physical_id(0) = hard_smp_processor_id();
diff -puN arch/ia64/kernel/time.c~statistics-infrastructure-make-printk_clock-a-generic-kernel-wide-nsec-resolution arch/ia64/kernel/time.c
--- devel/arch/ia64/kernel/time.c~statistics-infrastructure-make-printk_clock-a-generic-kernel-wide-nsec-resolution	2006-05-30 15:21:50.000000000 -0700
+++ devel-akpm/arch/ia64/kernel/time.c	2006-05-30 15:21:50.000000000 -0700
@@ -279,29 +279,30 @@ udelay (unsigned long usecs)
 }
 EXPORT_SYMBOL(udelay);
 
-static unsigned long long ia64_itc_printk_clock(void)
+static unsigned long long ia64_itc_timestamp_clock(void)
 {
 	if (ia64_get_kr(IA64_KR_PER_CPU_DATA))
 		return sched_clock();
 	return 0;
 }
 
-static unsigned long long ia64_default_printk_clock(void)
+static unsigned long long ia64_default_timestamp_clock(void)
 {
 	return (unsigned long long)(jiffies_64 - INITIAL_JIFFIES) *
 		(1000000000/HZ);
 }
 
-unsigned long long (*ia64_printk_clock)(void) = &ia64_default_printk_clock;
+unsigned long long (*ia64_timestamp_clock)(void) =
+						&ia64_default_timestamp_clock;
 
-unsigned long long printk_clock(void)
+unsigned long long timestamp_clock(void)
 {
-	return ia64_printk_clock();
+	return ia64_timestamp_clock();
 }
 
 void __init
-ia64_setup_printk_clock(void)
+ia64_setup_timestamp_clock(void)
 {
 	if (!(sal_platform_features & IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT))
-		ia64_printk_clock = ia64_itc_printk_clock;
+		ia64_timestamp_clock = ia64_itc_timestamp_clock;
 }
diff -puN arch/ia64/sn/kernel/setup.c~statistics-infrastructure-make-printk_clock-a-generic-kernel-wide-nsec-resolution arch/ia64/sn/kernel/setup.c
--- devel/arch/ia64/sn/kernel/setup.c~statistics-infrastructure-make-printk_clock-a-generic-kernel-wide-nsec-resolution	2006-05-30 15:21:50.000000000 -0700
+++ devel-akpm/arch/ia64/sn/kernel/setup.c	2006-05-30 15:21:50.000000000 -0700
@@ -67,7 +67,7 @@ extern unsigned long last_time_offset;
 extern void (*ia64_mark_idle) (int);
 extern void snidle(int);
 extern unsigned char acpi_kbd_controller_present;
-extern unsigned long long (*ia64_printk_clock)(void);
+extern unsigned long long (*ia64_timestamp_clock)(void);
 
 unsigned long sn_rtc_cycles_per_second;
 EXPORT_SYMBOL(sn_rtc_cycles_per_second);
@@ -364,7 +364,7 @@ sn_scan_pcdp(void)
 
 static unsigned long sn2_rtc_initial;
 
-static unsigned long long ia64_sn2_printk_clock(void)
+static unsigned long long ia64_sn2_timestamp_clock(void)
 {
 	unsigned long rtc_now = rtc_time();
 
@@ -451,7 +451,7 @@ void __init sn_setup(char **cmdline_p)
 
 	platform_intr_list[ACPI_INTERRUPT_CPEI] = IA64_CPE_VECTOR;
 
-	ia64_printk_clock = ia64_sn2_printk_clock;
+	ia64_timestamp_clock = ia64_sn2_timestamp_clock;
 
 	/*
 	 * Old PROMs do not provide an ACPI FADT. Disable legacy keyboard
diff -puN include/linux/time.h~statistics-infrastructure-make-printk_clock-a-generic-kernel-wide-nsec-resolution include/linux/time.h
--- devel/include/linux/time.h~statistics-infrastructure-make-printk_clock-a-generic-kernel-wide-nsec-resolution	2006-05-30 15:21:50.000000000 -0700
+++ devel-akpm/include/linux/time.h	2006-05-30 15:21:50.000000000 -0700
@@ -174,6 +174,9 @@ static inline void timespec_add_ns(struc
 	}
 	a->tv_nsec = ns;
 }
+
+extern unsigned long long timestamp_clock(void);
+
 #endif /* __KERNEL__ */
 
 #define NFDBITS			__NFDBITS
diff -puN kernel/printk.c~statistics-infrastructure-make-printk_clock-a-generic-kernel-wide-nsec-resolution kernel/printk.c
--- devel/kernel/printk.c~statistics-infrastructure-make-printk_clock-a-generic-kernel-wide-nsec-resolution	2006-05-30 15:21:50.000000000 -0700
+++ devel-akpm/kernel/printk.c	2006-05-30 15:21:50.000000000 -0700
@@ -449,11 +449,6 @@ static int __init printk_time_setup(char
 
 __setup("time", printk_time_setup);
 
-__attribute__((weak)) unsigned long long printk_clock(void)
-{
-	return sched_clock();
-}
-
 /* Check if we have any console registered that can be called early in boot. */
 static int have_callable_console(void)
 {
@@ -545,7 +540,7 @@ asmlinkage int vprintk(const char *fmt, 
 			if (printk_time) {
 				char tbuf[TIMESTAMP_SIZE], *tp;
 				printed_len += nsec_to_timestamp(tbuf,
-							printk_clock());
+							timestamp_clock());
 				for (tp = tbuf; *tp; tp++)
 					emit_log_char(*tp);
 				emit_log_char(' ');
diff -puN kernel/time.c~statistics-infrastructure-make-printk_clock-a-generic-kernel-wide-nsec-resolution kernel/time.c
--- devel/kernel/time.c~statistics-infrastructure-make-printk_clock-a-generic-kernel-wide-nsec-resolution	2006-05-30 15:21:50.000000000 -0700
+++ devel-akpm/kernel/time.c	2006-05-30 15:21:50.000000000 -0700
@@ -643,6 +643,11 @@ struct timeval ns_to_timeval(const s64 n
 	return tv;
 }
 
+__attribute__((weak)) unsigned long long timestamp_clock(void)
+{
+	return sched_clock();
+}
+
 #if (BITS_PER_LONG < 64)
 u64 get_jiffies_64(void)
 {
diff -L lib/statistic.c -puN /dev/null /dev/null
_

Patches currently in -mm which might be from mp3@xxxxxxxxxx are

statistics-infrastructure-prerequisite-list.patch
statistics-infrastructure-prerequisite-parser.patch
statistics-infrastructure-prerequisite-timestamp.patch
statistics-infrastructure-make-printk_clock-a-generic-kernel-wide-nsec-resolution.patch
statistics-infrastructure-documentation.patch
statistics-infrastructure.patch
statistics-infrastructure-update-1.patch
statistics-infrastructure-exploitation-zfcp.patch
statistics-infrastructure-update-3.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