Skip to contentSkip to conversation

: printk, Add monotonic and real printk timestamps

PATCH In review Prarit Bhargava 3 participants 5 messages Apr 22, 2016 – Apr 25, 2016

Subsystems (29)
lore
Share & tools
lore
#0 lore raw

v7 cover : printk, Add monotonic and real printk timestamps

This patchset adds monotonic and real printk timestamps. The first patch changes CONFIG_PRINT_TIME from a bool to an int to allow for the additional timestamps that are added in patch 2.

Changes from v6: Petr Mladek pointed out that the current patch causes problems for dmesg (and potentially other utilities). I will post the patch here

http://marc.info/?l=linux-kernel&m=146124485215811&w=2

to fix dmesg once this feature is positively reviewed.

Prarit Bhargava (2):
lib, switch CONFIG_PRINTK_TIME to int printk, allow different timestamps for printk.time

 Documentation/kernel-parameters.txt                |    6 +-
 arch/arm/configs/axm55xx_defconfig                 |    2 +-
 arch/arm/configs/bcm2835_defconfig                 |    2 +-
 arch/arm/configs/bcm_defconfig                     |    2 +-
 arch/arm/configs/colibri_pxa270_defconfig          |    2 +-
 arch/arm/configs/colibri_pxa300_defconfig          |    2 +-
 arch/arm/configs/dove_defconfig                    |    2 +-
 arch/arm/configs/efm32_defconfig                   |    2 +-
 arch/arm/configs/exynos_defconfig                  |    2 +-
 arch/arm/configs/ezx_defconfig                     |    2 +-
 arch/arm/configs/h5000_defconfig                   |    2 +-
 arch/arm/configs/hisi_defconfig                    |    2 +-
 arch/arm/configs/imote2_defconfig                  |    2 +-
 arch/arm/configs/imx_v6_v7_defconfig               |    2 +-
 arch/arm/configs/keystone_defconfig                |    2 +-
 arch/arm/configs/lpc18xx_defconfig                 |    2 +-
 arch/arm/configs/magician_defconfig                |    2 +-
 arch/arm/configs/mmp2_defconfig                    |    2 +-
 arch/arm/configs/moxart_defconfig                  |    2 +-
 arch/arm/configs/multi_v7_defconfig                |    2 +-
 arch/arm/configs/mvebu_v7_defconfig                |    2 +-
 arch/arm/configs/mxs_defconfig                     |    2 +-
 arch/arm/configs/omap2plus_defconfig               |    2 +-
 arch/arm/configs/pxa168_defconfig                  |    2 +-
 arch/arm/configs/pxa3xx_defconfig                  |    2 +-
 arch/arm/configs/pxa910_defconfig                  |    2 +-
 arch/arm/configs/pxa_defconfig                     |    2 +-
 arch/arm/configs/qcom_defconfig                    |    2 +-
 arch/arm/configs/raumfeld_defconfig                |    2 +-
 arch/arm/configs/shmobile_defconfig                |    2 +-
 arch/arm/configs/socfpga_defconfig                 |    2 +-
 arch/arm/configs/stm32_defconfig                   |    2 +-
 arch/arm/configs/sunxi_defconfig                   |    2 +-
 arch/arm/configs/tegra_defconfig                   |    2 +-
 arch/arm/configs/u300_defconfig                    |    2 +-
 arch/arm/configs/u8500_defconfig                   |    2 +-
 arch/arm/configs/vt8500_v6_v7_defconfig            |    2 +-
 arch/arm/configs/xcep_defconfig                    |    2 +-
 arch/arm/configs/zx_defconfig                      |    2 +-
 arch/arm64/configs/defconfig                       |    2 +-
 arch/mips/configs/bcm47xx_defconfig                |    2 +-
 arch/mips/configs/bmips_be_defconfig               |    2 +-
 arch/mips/configs/bmips_stb_defconfig              |    2 +-
 arch/mips/configs/ci20_defconfig                   |    2 +-
 arch/mips/configs/lemote2f_defconfig               |    2 +-
 arch/mips/configs/loongson3_defconfig              |    2 +-
 arch/mips/configs/nlm_xlp_defconfig                |    2 +-
 arch/mips/configs/nlm_xlr_defconfig                |    2 +-
 arch/mips/configs/pistachio_defconfig              |    2 +-
 arch/mips/configs/qi_lb60_defconfig                |    2 +-
 arch/mips/configs/rt305x_defconfig                 |    2 +-
 arch/mips/configs/xway_defconfig                   |    2 +-
 arch/parisc/configs/generic-64bit_defconfig        |    2 +-
 arch/powerpc/configs/40x/virtex_defconfig          |    2 +-
 arch/powerpc/configs/44x/virtex5_defconfig         |    2 +-
 arch/powerpc/configs/44x/warp_defconfig            |    2 +-
 arch/powerpc/configs/52xx/cm5200_defconfig         |    2 +-
 arch/powerpc/configs/52xx/lite5200b_defconfig      |    2 +-
 arch/powerpc/configs/52xx/motionpro_defconfig      |    2 +-
 arch/powerpc/configs/52xx/tqm5200_defconfig        |    2 +-
 arch/powerpc/configs/gamecube_defconfig            |    2 +-
 arch/powerpc/configs/mpc5200_defconfig             |    2 +-
 arch/powerpc/configs/pasemi_defconfig              |    2 +-
 arch/powerpc/configs/wii_defconfig                 |    2 +-
 arch/s390/configs/default_defconfig                |    2 +-
 arch/s390/configs/gcov_defconfig                   |    2 +-
 arch/s390/configs/performance_defconfig            |    2 +-
 arch/s390/configs/zfcpdump_defconfig               |    2 +-
 arch/sh/configs/edosk7760_defconfig                |    2 +-
 arch/sh/configs/sdk7786_defconfig                  |    2 +-
 arch/sh/configs/se7722_defconfig                   |    2 +-
 arch/sh/configs/sh7785lcr_32bit_defconfig          |    2 +-
 arch/sh/configs/urquell_defconfig                  |    2 +-
 arch/sparc/configs/sparc64_defconfig               |    2 +-
 arch/x86/configs/i386_defconfig                    |    2 +-
 arch/x86/configs/x86_64_defconfig                  |    2 +-
 arch/xtensa/configs/audio_kc705_defconfig          |    2 +-
 arch/xtensa/configs/generic_kc705_defconfig        |    2 +-
 arch/xtensa/configs/nommu_kc705_defconfig          |    2 +-
 arch/xtensa/configs/smp_lx200_defconfig            |    2 +-
 include/linux/timekeeping.h                        |    1 +
 kernel/printk/printk.c                             |   76 ++++++++++++++++++--
 kernel/time/timekeeping.c                          |   13 ++++
 lib/Kconfig.debug                                  |    8 ++-
 .../selftests/rcutorture/configs/lock/CFcommon     |    2 +-
 .../selftests/rcutorture/configs/rcu/CFcommon      |    2 +-
 86 files changed, 177 insertions(+), 89 deletions(-)
Signature · 1 line
1.7.9.3
#1 lore raw

PATCH v7 1/2 lib, switch CONFIG_PRINTK_TIME to int

CONFIG_PRINTK_TIME is a bool and in order to add timestamp options for the monotonic and real time clock it must be expanded to an int.

Cc Petr Mladek <[email protected]>
Cc John Stultz <[email protected]>
Cc Xunlei Pang <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Baolin Wang <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Petr Mladek <[email protected]>
Cc Tejun Heo <[email protected]>
Cc Peter Hurley <[email protected]>
Cc Vasily Averin <[email protected]>
Cc Joe Perches <[email protected]>
---
 Documentation/kernel-parameters.txt                |    2 +-
 arch/arm/configs/axm55xx_defconfig                 |    2 +-
 arch/arm/configs/bcm2835_defconfig                 |    2 +-
 arch/arm/configs/bcm_defconfig                     |    2 +-
 arch/arm/configs/colibri_pxa270_defconfig          |    2 +-
 arch/arm/configs/colibri_pxa300_defconfig          |    2 +-
 arch/arm/configs/dove_defconfig                    |    2 +-
 arch/arm/configs/efm32_defconfig                   |    2 +-
 arch/arm/configs/exynos_defconfig                  |    2 +-
 arch/arm/configs/ezx_defconfig                     |    2 +-
 arch/arm/configs/h5000_defconfig                   |    2 +-
 arch/arm/configs/hisi_defconfig                    |    2 +-
 arch/arm/configs/imote2_defconfig                  |    2 +-
 arch/arm/configs/imx_v6_v7_defconfig               |    2 +-
 arch/arm/configs/keystone_defconfig                |    2 +-
 arch/arm/configs/lpc18xx_defconfig                 |    2 +-
 arch/arm/configs/magician_defconfig                |    2 +-
 arch/arm/configs/mmp2_defconfig                    |    2 +-
 arch/arm/configs/moxart_defconfig                  |    2 +-
 arch/arm/configs/multi_v7_defconfig                |    2 +-
 arch/arm/configs/mvebu_v7_defconfig                |    2 +-
 arch/arm/configs/mxs_defconfig                     |    2 +-
 arch/arm/configs/omap2plus_defconfig               |    2 +-
 arch/arm/configs/pxa168_defconfig                  |    2 +-
 arch/arm/configs/pxa3xx_defconfig                  |    2 +-
 arch/arm/configs/pxa910_defconfig                  |    2 +-
 arch/arm/configs/pxa_defconfig                     |    2 +-
 arch/arm/configs/qcom_defconfig                    |    2 +-
 arch/arm/configs/raumfeld_defconfig                |    2 +-
 arch/arm/configs/shmobile_defconfig                |    2 +-
 arch/arm/configs/socfpga_defconfig                 |    2 +-
 arch/arm/configs/stm32_defconfig                   |    2 +-
 arch/arm/configs/sunxi_defconfig                   |    2 +-
 arch/arm/configs/tegra_defconfig                   |    2 +-
 arch/arm/configs/u300_defconfig                    |    2 +-
 arch/arm/configs/u8500_defconfig                   |    2 +-
 arch/arm/configs/vt8500_v6_v7_defconfig            |    2 +-
 arch/arm/configs/xcep_defconfig                    |    2 +-
 arch/arm/configs/zx_defconfig                      |    2 +-
 arch/arm64/configs/defconfig                       |    2 +-
 arch/mips/configs/bcm47xx_defconfig                |    2 +-
 arch/mips/configs/bmips_be_defconfig               |    2 +-
 arch/mips/configs/bmips_stb_defconfig              |    2 +-
 arch/mips/configs/ci20_defconfig                   |    2 +-
 arch/mips/configs/lemote2f_defconfig               |    2 +-
 arch/mips/configs/loongson3_defconfig              |    2 +-
 arch/mips/configs/nlm_xlp_defconfig                |    2 +-
 arch/mips/configs/nlm_xlr_defconfig                |    2 +-
 arch/mips/configs/pistachio_defconfig              |    2 +-
 arch/mips/configs/qi_lb60_defconfig                |    2 +-
 arch/mips/configs/rt305x_defconfig                 |    2 +-
 arch/mips/configs/xway_defconfig                   |    2 +-
 arch/parisc/configs/generic-64bit_defconfig        |    2 +-
 arch/powerpc/configs/40x/virtex_defconfig          |    2 +-
 arch/powerpc/configs/44x/virtex5_defconfig         |    2 +-
 arch/powerpc/configs/44x/warp_defconfig            |    2 +-
 arch/powerpc/configs/52xx/cm5200_defconfig         |    2 +-
 arch/powerpc/configs/52xx/lite5200b_defconfig      |    2 +-
 arch/powerpc/configs/52xx/motionpro_defconfig      |    2 +-
 arch/powerpc/configs/52xx/tqm5200_defconfig        |    2 +-
 arch/powerpc/configs/gamecube_defconfig            |    2 +-
 arch/powerpc/configs/mpc5200_defconfig             |    2 +-
 arch/powerpc/configs/pasemi_defconfig              |    2 +-
 arch/powerpc/configs/wii_defconfig                 |    2 +-
 arch/s390/configs/default_defconfig                |    2 +-
 arch/s390/configs/gcov_defconfig                   |    2 +-
 arch/s390/configs/performance_defconfig            |    2 +-
 arch/s390/configs/zfcpdump_defconfig               |    2 +-
 arch/sh/configs/edosk7760_defconfig                |    2 +-
 arch/sh/configs/sdk7786_defconfig                  |    2 +-
 arch/sh/configs/se7722_defconfig                   |    2 +-
 arch/sh/configs/sh7785lcr_32bit_defconfig          |    2 +-
 arch/sh/configs/urquell_defconfig                  |    2 +-
 arch/sparc/configs/sparc64_defconfig               |    2 +-
 arch/x86/configs/i386_defconfig                    |    2 +-
 arch/x86/configs/x86_64_defconfig                  |    2 +-
 arch/xtensa/configs/audio_kc705_defconfig          |    2 +-
 arch/xtensa/configs/generic_kc705_defconfig        |    2 +-
 arch/xtensa/configs/nommu_kc705_defconfig          |    2 +-
 arch/xtensa/configs/smp_lx200_defconfig            |    2 +-
 kernel/printk/printk.c                             |   41 +++++++++++++++++++-
 lib/Kconfig.debug                                  |    7 +++-
 .../selftests/rcutorture/configs/lock/CFcommon     |    2 +-
 .../selftests/rcutorture/configs/rcu/CFcommon      |    2 +-
 84 files changed, 126 insertions(+), 86 deletions(-)
Documentation/kernel-parameters.txt +1 -1
index 0b3de80..79c3e28 100644
@@ -3112,7 +3112,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 			default: disabled
 
 	printk.time=	Show timing data prefixed to each printk message line
-			Format: <bool>  (1/Y/y=enable, 0/N/n=disable)
+			Format: <string>  (1/Y/y=enable, 0/N/n=disable)
 
 	processor.max_cstate=	[HW,ACPI]
 			Limit processor to maximum C-state
arch/arm/configs/axm55xx_defconfig +1 -1
index d3260d7..55eba35 100644
@@ -232,7 +232,7 @@ CONFIG_NFS_FSCACHE=y
 CONFIG_SUNRPC_DEBUG=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_FS=y
 CONFIG_MAGIC_SYSRQ=y
arch/arm/configs/bcm2835_defconfig +1 -1
index 1ef69fc..b96aeb5 100644
@@ -127,7 +127,7 @@ CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ASCII=y
 CONFIG_NLS_ISO8859_1=y
 CONFIG_NLS_UTF8=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_BOOT_PRINTK_DELAY=y
 CONFIG_DYNAMIC_DEBUG=y
 CONFIG_DEBUG_INFO=y
arch/arm/configs/bcm_defconfig +1 -1
index 7117662..19710f4 100644
@@ -121,7 +121,7 @@ CONFIG_CONFIGFS_FS=y
 # CONFIG_MISC_FILESYSTEMS is not set
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_FS=y
 CONFIG_MAGIC_SYSRQ=y
arch/arm/configs/colibri_pxa270_defconfig +1 -1
index 0b9211b..99b7062 100644
@@ -156,7 +156,7 @@ CONFIG_NLS_ASCII=y
 CONFIG_NLS_ISO8859_1=m
 CONFIG_NLS_ISO8859_15=m
 CONFIG_NLS_UTF8=m
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_FS=y
 CONFIG_DEBUG_KERNEL=y
arch/arm/configs/colibri_pxa300_defconfig +1 -1
index be02fe2..3a0b92b 100644
@@ -58,7 +58,7 @@ CONFIG_INOTIFY=y
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
 CONFIG_ROOT_NFS=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_KERNEL=y
 CONFIG_DEBUG_INFO=y
 # CONFIG_RCU_CPU_STALL_DETECTOR is not set
arch/arm/configs/dove_defconfig +1 -1
index 701677f..d952d3d 100644
@@ -119,7 +119,7 @@ CONFIG_NLS_CODEPAGE_850=y
 CONFIG_NLS_ISO8859_1=y
 CONFIG_NLS_ISO8859_2=y
 CONFIG_NLS_UTF8=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_FS=y
 # CONFIG_SCHED_DEBUG is not set
arch/arm/configs/efm32_defconfig +1 -1
index c0dac0f0f..306d156 100644
@@ -93,7 +93,7 @@ CONFIG_EXT2_FS=y
 CONFIG_ROMFS_FS=y
 CONFIG_ROMFS_BACKED_BY_MTD=y
 # CONFIG_NETWORK_FILESYSTEMS is not set
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 # CONFIG_ENABLE_WARN_DEPRECATED is not set
 # CONFIG_ENABLE_MUST_CHECK is not set
arch/arm/configs/exynos_defconfig +1 -1
index 6ffd7e7..be9345d 100644
@@ -229,7 +229,7 @@ CONFIG_ROOT_NFS=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ASCII=y
 CONFIG_NLS_ISO8859_1=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_FS=y
 CONFIG_MAGIC_SYSRQ=y
arch/arm/configs/ezx_defconfig +1 -1
index ea316c4..c4bdecd 100644
@@ -379,7 +379,7 @@ CONFIG_NLS_ISO8859_15=m
 CONFIG_NLS_KOI8_R=m
 CONFIG_NLS_KOI8_U=m
 CONFIG_NLS_UTF8=m
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_FS=y
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_SCHED_DEBUG is not set
arch/arm/configs/h5000_defconfig +1 -1
index 37903e3..e3507cb 100644
@@ -66,7 +66,7 @@ CONFIG_TMPFS=y
 CONFIG_JFFS2_FS=y
 CONFIG_JFFS2_COMPRESSION_OPTIONS=y
 # CONFIG_NETWORK_FILESYSTEMS is not set
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_SCHED_DEBUG is not set
 # CONFIG_DEBUG_BUGVERBOSE is not set
arch/arm/configs/hisi_defconfig +1 -1
index b2e340b..4dc0a4a 100644
@@ -82,7 +82,7 @@ CONFIG_NFS_FS=y
 CONFIG_NFS_V3_ACL=y
 CONFIG_NFS_V4=y
 CONFIG_ROOT_NFS=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_FS=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
arch/arm/configs/imote2_defconfig +1 -1
index 18e59fe..672010d 100644
@@ -350,7 +350,7 @@ CONFIG_NLS_ISO8859_15=m
 CONFIG_NLS_KOI8_R=m
 CONFIG_NLS_KOI8_U=m
 CONFIG_NLS_UTF8=m
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_FS=y
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_SCHED_DEBUG is not set
arch/arm/configs/imx_v6_v7_defconfig +1 -1
index 978c5de..80ec5f4 100644
@@ -360,7 +360,7 @@ CONFIG_NLS_ASCII=y
 CONFIG_NLS_ISO8859_1=y
 CONFIG_NLS_ISO8859_15=m
 CONFIG_NLS_UTF8=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_FS=y
 CONFIG_MAGIC_SYSRQ=y
 # CONFIG_SCHED_DEBUG is not set
arch/arm/configs/keystone_defconfig +1 -1
index 5bcc9cf..d402c59 100644
@@ -195,7 +195,7 @@ CONFIG_NFSD_V3=y
 CONFIG_NFSD_V3_ACL=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_SHIRQ=y
 CONFIG_DEBUG_USER=y
arch/arm/configs/lpc18xx_defconfig +1 -1
index 2ae00b0..c25ff23 100644
@@ -159,7 +159,7 @@ CONFIG_EXT2_FS=y
 # CONFIG_INOTIFY_USER is not set
 CONFIG_JFFS2_FS=y
 # CONFIG_NETWORK_FILESYSTEMS is not set
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 # CONFIG_ENABLE_WARN_DEPRECATED is not set
 # CONFIG_ENABLE_MUST_CHECK is not set
arch/arm/configs/magician_defconfig +1 -1
index a5b4920..accbf10 100644
@@ -167,7 +167,7 @@ CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_CODEPAGE_1251=m
 CONFIG_NLS_ISO8859_1=y
 CONFIG_NLS_UTF8=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_SCHED_DEBUG is not set
 CONFIG_TIMER_STATS=y
arch/arm/configs/mmp2_defconfig +1 -1
index f1cb95e..0385e4a 100644
@@ -81,7 +81,7 @@ CONFIG_NFS_V3=y
 CONFIG_NFS_V3_ACL=y
 CONFIG_NFS_V4=y
 CONFIG_ROOT_NFS=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_FS=y
 CONFIG_DEBUG_KERNEL=y
arch/arm/configs/moxart_defconfig +1 -1
index a3cb76c..32fab5a 100644
@@ -124,7 +124,7 @@ CONFIG_EXT3_FS=y
 CONFIG_TMPFS=y
 CONFIG_CONFIGFS_FS=y
 CONFIG_JFFS2_FS=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 # CONFIG_ENABLE_WARN_DEPRECATED is not set
 # CONFIG_ENABLE_MUST_CHECK is not set
arch/arm/configs/multi_v7_defconfig +1 -1
index 2823490..f9361a2 100644
@@ -822,7 +822,7 @@ CONFIG_ROOT_NFS=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
 CONFIG_NLS_UTF8=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_FS=y
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_LOCKUP_DETECTOR=y
arch/arm/configs/mvebu_v7_defconfig +1 -1
index dc5797a..fdd7a29 100644
@@ -147,7 +147,7 @@ CONFIG_NLS_CODEPAGE_850=y
 CONFIG_NLS_ISO8859_1=y
 CONFIG_NLS_ISO8859_2=y
 CONFIG_NLS_UTF8=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_FS=y
 CONFIG_MAGIC_SYSRQ=y
arch/arm/configs/mxs_defconfig +1 -1
index 6e0f751..8a3d2f2 100644
@@ -166,7 +166,7 @@ CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_CODEPAGE_850=y
 CONFIG_NLS_ISO8859_1=y
 CONFIG_NLS_ISO8859_15=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 CONFIG_FRAME_WARN=2048
 CONFIG_UNUSED_SYMBOLS=y
arch/arm/configs/omap2plus_defconfig +1 -1
index 156bc88..112e5a9 100644
@@ -465,7 +465,7 @@ CONFIG_NFS_V4=y
 CONFIG_ROOT_NFS=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_INFO_SPLIT=y
 CONFIG_DEBUG_INFO_DWARF4=y
arch/arm/configs/pxa168_defconfig +1 -1
index 74d7e01..5824b89 100644
@@ -57,7 +57,7 @@ CONFIG_NFS_V3=y
 CONFIG_NFS_V3_ACL=y
 CONFIG_NFS_V4=y
 CONFIG_ROOT_NFS=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_PREEMPT is not set
arch/arm/configs/pxa3xx_defconfig +1 -1
index 5f337d7..e60d656 100644
@@ -117,7 +117,7 @@ CONFIG_NFS_V3_ACL=y
 CONFIG_NFS_V4=y
 CONFIG_ROOT_NFS=y
 CONFIG_NLS=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_KERNEL=y
 CONFIG_DEBUG_SHIRQ=y
arch/arm/configs/pxa910_defconfig +1 -1
index 3bb7771..a2f6f08 100644
@@ -65,7 +65,7 @@ CONFIG_NFS_V3=y
 CONFIG_NFS_V3_ACL=y
 CONFIG_NFS_V4=y
 CONFIG_ROOT_NFS=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_PREEMPT is not set
arch/arm/configs/pxa_defconfig +1 -1
index dc5517e..621c4dc 100644
@@ -734,7 +734,7 @@ CONFIG_NLS_ASCII=m
 CONFIG_NLS_ISO8859_1=m
 CONFIG_NLS_ISO8859_15=m
 CONFIG_NLS_UTF8=m
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DYNAMIC_DEBUG=y
 CONFIG_DEBUG_INFO=y
 CONFIG_FRAME_WARN=0
arch/arm/configs/qcom_defconfig +1 -1
index 7bff7bf..5dfac70 100644
@@ -181,7 +181,7 @@ CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ASCII=y
 CONFIG_NLS_ISO8859_1=y
 CONFIG_NLS_UTF8=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DYNAMIC_DEBUG=y
 CONFIG_DEBUG_INFO=y
 CONFIG_MAGIC_SYSRQ=y
arch/arm/configs/raumfeld_defconfig +1 -1
index 3d833ae..b836f8f 100644
@@ -196,7 +196,7 @@ CONFIG_NLS_ISO8859_15=y
 CONFIG_NLS_KOI8_R=y
 CONFIG_NLS_KOI8_U=y
 CONFIG_NLS_UTF8=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_KERNEL=y
 CONFIG_DEBUG_INFO=y
 # CONFIG_RCU_CPU_STALL_DETECTOR is not set
arch/arm/configs/shmobile_defconfig +1 -1
index b7b714c..b3e18a2 100644
@@ -207,7 +207,7 @@ CONFIG_NFS_V4_1=y
 CONFIG_ROOT_NFS=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 # CONFIG_ENABLE_WARN_DEPRECATED is not set
 # CONFIG_ENABLE_MUST_CHECK is not set
 # CONFIG_ARM_UNWIND is not set
arch/arm/configs/socfpga_defconfig +1 -1
index 753f1a5..e277dc6 100644
@@ -101,7 +101,7 @@ CONFIG_NFS_FS=y
 CONFIG_ROOT_NFS=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_DETECT_HUNG_TASK=y
arch/arm/configs/stm32_defconfig +1 -1
index 1e5ec2a..44b6b03 100644
@@ -61,7 +61,7 @@ CONFIG_STM32_DMA=y
 # CONFIG_DNOTIFY is not set
 # CONFIG_INOTIFY_USER is not set
 CONFIG_NLS=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 # CONFIG_ENABLE_WARN_DEPRECATED is not set
 # CONFIG_ENABLE_MUST_CHECK is not set
arch/arm/configs/sunxi_defconfig +1 -1
index 81a1b92..e20ae39 100644
@@ -146,6 +146,6 @@ CONFIG_NFS_V4=y
 CONFIG_ROOT_NFS=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_FS=y
 CONFIG_CRYPTO_DEV_SUN4I_SS=y
arch/arm/configs/tegra_defconfig +1 -1
index 3a36244..95eaa46 100644
@@ -285,7 +285,7 @@ CONFIG_NFS_V4=y
 CONFIG_ROOT_NFS=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_FS=y
 CONFIG_MAGIC_SYSRQ=y
arch/arm/configs/u300_defconfig +1 -1
index aaa95ab..7746006 100644
@@ -63,7 +63,7 @@ CONFIG_VFAT_FS=y
 CONFIG_TMPFS=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_FS=y
 # CONFIG_SCHED_DEBUG is not set
arch/arm/configs/u8500_defconfig +1 -1
index a691d59..d2a3a67 100644
@@ -129,7 +129,7 @@ CONFIG_NFS_FS=y
 CONFIG_ROOT_NFS=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_FS=y
 CONFIG_MAGIC_SYSRQ=y
arch/arm/configs/vt8500_v6_v7_defconfig +1 -1
index 1bfaa7b..d5a2cc8 100644
@@ -84,6 +84,6 @@ CONFIG_NFS_FS=y
 CONFIG_NFS_V3_ACL=y
 CONFIG_NFS_V4=y
 CONFIG_ROOT_NFS=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_KERNEL=y
 CONFIG_LOCKUP_DETECTOR=y
arch/arm/configs/xcep_defconfig +1 -1
index 721832f..5c8435d 100644
@@ -85,7 +85,7 @@ CONFIG_NFS_V3=y
 CONFIG_NLS=m
 CONFIG_NLS_DEFAULT="utf8"
 CONFIG_NLS_UTF8=m
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_STRIP_ASM_SYMS=y
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_SCHED_DEBUG is not set
arch/arm/configs/zx_defconfig +1 -1
index ab683fb..e955730 100644
@@ -98,7 +98,7 @@ CONFIG_TMPFS_POSIX_ACL=y
 CONFIG_NLS_CODEPAGE_936=y
 CONFIG_NLS_ISO8859_1=y
 CONFIG_NLS_UTF8=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_KERNEL=y
 CONFIG_DEBUG_INFO=y
arch/arm64/configs/defconfig +1 -1
index a44ef99..b44e940 100644
@@ -286,7 +286,7 @@ CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
 CONFIG_VIRTUALIZATION=y
 CONFIG_KVM=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_FS=y
 CONFIG_MAGIC_SYSRQ=y
arch/mips/configs/bcm47xx_defconfig +1 -1
index 0db4eb3..f19fb76 100644
@@ -75,7 +75,7 @@ CONFIG_USB_HCD_BCMA=y
 CONFIG_USB_HCD_SSB=y
 CONFIG_LEDS_TRIGGER_TIMER=y
 CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_INFO_REDUCED=y
 CONFIG_STRIP_ASM_SYMS=y
arch/mips/configs/bmips_be_defconfig +1 -1
index 24dcb90..d065143 100644
@@ -33,7 +33,7 @@ CONFIG_DEVTMPFS=y
 CONFIG_DEVTMPFS_MOUNT=y
 # CONFIG_STANDALONE is not set
 # CONFIG_PREVENT_FIRMWARE_BUILD is not set
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_BRCMSTB_GISB_ARB=y
 CONFIG_MTD=y
 CONFIG_MTD_CFI=y
arch/mips/configs/bmips_stb_defconfig +1 -1
index 4eb5d6e..0800662 100644
@@ -34,7 +34,7 @@ CONFIG_DEVTMPFS=y
 CONFIG_DEVTMPFS_MOUNT=y
 # CONFIG_STANDALONE is not set
 # CONFIG_PREVENT_FIRMWARE_BUILD is not set
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_BRCMSTB_GISB_ARB=y
 CONFIG_MTD=y
 CONFIG_MTD_CFI=y
arch/mips/configs/ci20_defconfig +1 -1
index 43e0ba2..bf164fe 100644
@@ -148,7 +148,7 @@ CONFIG_NLS_ISO8859_15=y
 CONFIG_NLS_KOI8_R=y
 CONFIG_NLS_KOI8_U=y
 CONFIG_NLS_UTF8=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 CONFIG_STRIP_ASM_SYMS=y
 CONFIG_DEBUG_FS=y
arch/mips/configs/lemote2f_defconfig +1 -1
index d1f198b..6030606 100644
@@ -405,7 +405,7 @@ CONFIG_NLS_ISO8859_15=m
 CONFIG_NLS_KOI8_R=m
 CONFIG_NLS_KOI8_U=m
 CONFIG_NLS_UTF8=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_FRAME_WARN=1024
 CONFIG_STRIP_ASM_SYMS=y
 CONFIG_DEBUG_FS=y
arch/mips/configs/loongson3_defconfig +1 -1
index f8bf915c..e66df9f 100644
@@ -330,7 +330,7 @@ CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_CODEPAGE_936=y
 CONFIG_NLS_ASCII=y
 CONFIG_NLS_UTF8=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_FRAME_WARN=1024
 CONFIG_STRIP_ASM_SYMS=y
 CONFIG_MAGIC_SYSRQ=y
arch/mips/configs/nlm_xlp_defconfig +1 -1
index b3d1d37..efd6877 100644
@@ -554,7 +554,7 @@ CONFIG_NLS_ISO8859_14=m
 CONFIG_NLS_ISO8859_15=m
 CONFIG_NLS_KOI8_R=m
 CONFIG_NLS_KOI8_U=m
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 # CONFIG_ENABLE_WARN_DEPRECATED is not set
 # CONFIG_ENABLE_MUST_CHECK is not set
 CONFIG_FRAME_WARN=1024
arch/mips/configs/nlm_xlr_defconfig +1 -1
index 3d8016d..c913c70 100644
@@ -514,7 +514,7 @@ CONFIG_NLS_ISO8859_14=m
 CONFIG_NLS_ISO8859_15=m
 CONFIG_NLS_KOI8_R=m
 CONFIG_NLS_KOI8_U=m
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 # CONFIG_ENABLE_WARN_DEPRECATED is not set
 # CONFIG_ENABLE_MUST_CHECK is not set
 CONFIG_UNUSED_SYMBOLS=y
arch/mips/configs/pistachio_defconfig +1 -1
index 8b74291..022907e 100644
@@ -299,7 +299,7 @@ CONFIG_NLS_DEFAULT="utf8"
 CONFIG_NLS_CODEPAGE_437=m
 CONFIG_NLS_ASCII=m
 CONFIG_NLS_ISO8859_1=m
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0
arch/mips/configs/qi_lb60_defconfig +1 -1
index d7bb8cc..e9dd20a 100644
@@ -172,7 +172,7 @@ CONFIG_NLS_ISO8859_15=y
 CONFIG_NLS_KOI8_R=y
 CONFIG_NLS_KOI8_U=y
 CONFIG_NLS_UTF8=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 CONFIG_STRIP_ASM_SYMS=y
 CONFIG_READABLE_ASM=y
arch/mips/configs/rt305x_defconfig +1 -1
index d14ae2f..005754c 100644
@@ -145,7 +145,7 @@ CONFIG_JFFS2_COMPRESSION_OPTIONS=y
 CONFIG_SQUASHFS=y
 # CONFIG_SQUASHFS_ZLIB is not set
 CONFIG_SQUASHFS_XZ=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 # CONFIG_ENABLE_MUST_CHECK is not set
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_STRIP_ASM_SYMS=y
arch/mips/configs/xway_defconfig +1 -1
index 8987846..c293c78 100644
@@ -143,7 +143,7 @@ CONFIG_JFFS2_COMPRESSION_OPTIONS=y
 CONFIG_SQUASHFS=y
 # CONFIG_SQUASHFS_ZLIB is not set
 CONFIG_SQUASHFS_XZ=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 # CONFIG_ENABLE_MUST_CHECK is not set
 CONFIG_STRIP_ASM_SYMS=y
 CONFIG_DEBUG_FS=y
arch/parisc/configs/generic-64bit_defconfig +1 -1
index e945c08..df76193 100644
@@ -279,7 +279,7 @@ CONFIG_NLS_ASCII=m
 CONFIG_NLS_ISO8859_1=m
 CONFIG_NLS_ISO8859_2=m
 CONFIG_NLS_UTF8=m
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_STRIP_ASM_SYMS=y
 CONFIG_UNUSED_SYMBOLS=y
 CONFIG_DEBUG_FS=y
arch/powerpc/configs/40x/virtex_defconfig +1 -1
index bcb0c4d..bb076ef 100644
@@ -72,7 +72,7 @@ CONFIG_CRC_CCITT=y
 CONFIG_FONTS=y
 CONFIG_FONT_8x8=y
 CONFIG_FONT_8x16=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_CRYPTO_ANSI_CPRNG is not set
arch/powerpc/configs/44x/virtex5_defconfig +1 -1
index 53d0300..f5cf657 100644
@@ -71,7 +71,7 @@ CONFIG_CRC_CCITT=y
 CONFIG_FONTS=y
 CONFIG_FONT_8x8=y
 CONFIG_FONT_8x16=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_CRYPTO_ANSI_CPRNG is not set
arch/powerpc/configs/44x/warp_defconfig +1 -1
index ee43437..e925959 100644
@@ -93,7 +93,7 @@ CONFIG_NLS_ISO8859_15=y
 CONFIG_NLS_UTF8=y
 CONFIG_CRC_CCITT=y
 CONFIG_CRC_T10DIF=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_FS=y
 CONFIG_MAGIC_SYSRQ=y
arch/powerpc/configs/52xx/cm5200_defconfig +1 -1
index 19fad0e..3cc0a427 100644
@@ -74,7 +74,7 @@ CONFIG_NFS_V4=y
 CONFIG_ROOT_NFS=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DETECT_HUNG_TASK=y
 # CONFIG_DEBUG_BUGVERBOSE is not set
 CONFIG_CRYPTO_ECB=y
arch/powerpc/configs/52xx/lite5200b_defconfig +1 -1
index 5f40ba9..5a24f60 100644
@@ -60,7 +60,7 @@ CONFIG_TMPFS=y
 CONFIG_NFS_FS=y
 CONFIG_NFS_V4=y
 CONFIG_ROOT_NFS=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 CONFIG_DETECT_HUNG_TASK=y
 # CONFIG_DEBUG_BUGVERBOSE is not set
arch/powerpc/configs/52xx/motionpro_defconfig +1 -1
index 909e185..e7ef6c8 100644
@@ -86,7 +86,7 @@ CONFIG_NFS_V4=y
 CONFIG_ROOT_NFS=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 CONFIG_DETECT_HUNG_TASK=y
 # CONFIG_DEBUG_BUGVERBOSE is not set
arch/powerpc/configs/52xx/tqm5200_defconfig +1 -1
index efab838..5a91b50 100644
@@ -88,7 +88,7 @@ CONFIG_NFS_V4=y
 CONFIG_ROOT_NFS=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 CONFIG_DETECT_HUNG_TASK=y
 # CONFIG_DEBUG_BUGVERBOSE is not set
arch/powerpc/configs/gamecube_defconfig +1 -1
index 6c6c60f..d4dbe36 100644
@@ -92,7 +92,7 @@ CONFIG_CIFS=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
 CONFIG_CRC_CCITT=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_SPINLOCK=y
 CONFIG_DEBUG_MUTEXES=y
 CONFIG_LATENCYTOP=y
arch/powerpc/configs/mpc5200_defconfig +1 -1
index 9fd041b..4b7dc33 100644
@@ -128,7 +128,7 @@ CONFIG_NFS_V4=y
 CONFIG_ROOT_NFS=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_KERNEL=y
 CONFIG_DETECT_HUNG_TASK=y
arch/powerpc/configs/pasemi_defconfig +1 -1
index 8f94782..b025444 100644
@@ -171,7 +171,7 @@ CONFIG_NFSD_V4=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
 CONFIG_CRC_CCITT=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_FS=y
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_KERNEL=y
arch/powerpc/configs/wii_defconfig +1 -1
index 34eaf52..2d9ee18 100644
@@ -113,7 +113,7 @@ CONFIG_CIFS=m
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
 CONFIG_CRC_CCITT=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_SPINLOCK=y
 CONFIG_DEBUG_MUTEXES=y
arch/s390/configs/default_defconfig +1 -1
index 0ac42cc..5e3e73e 100644
@@ -534,7 +534,7 @@ CONFIG_NLS_ISO8859_1=m
 CONFIG_NLS_ISO8859_15=m
 CONFIG_NLS_UTF8=m
 CONFIG_DLM=m
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DYNAMIC_DEBUG=y
 CONFIG_DEBUG_INFO=y
 CONFIG_FRAME_WARN=1024
arch/s390/configs/gcov_defconfig +1 -1
index a31dcd5..aedc828 100644
@@ -528,7 +528,7 @@ CONFIG_NLS_ISO8859_1=m
 CONFIG_NLS_ISO8859_15=m
 CONFIG_NLS_UTF8=m
 CONFIG_DLM=m
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 # CONFIG_ENABLE_MUST_CHECK is not set
 CONFIG_FRAME_WARN=1024
arch/s390/configs/performance_defconfig +1 -1
index 7b73bf3..b5e9dc1 100644
@@ -528,7 +528,7 @@ CONFIG_NLS_ISO8859_1=m
 CONFIG_NLS_ISO8859_15=m
 CONFIG_NLS_UTF8=m
 CONFIG_DLM=m
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 # CONFIG_ENABLE_MUST_CHECK is not set
 CONFIG_FRAME_WARN=1024
arch/s390/configs/zfcpdump_defconfig +1 -1
index 1719843..ef2a9b6 100644
@@ -56,7 +56,7 @@ CONFIG_RAW_DRIVER=y
 # CONFIG_INOTIFY_USER is not set
 CONFIG_CONFIGFS_FS=y
 # CONFIG_MISC_FILESYSTEMS is not set
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_FS=y
 CONFIG_DEBUG_KERNEL=y
arch/sh/configs/edosk7760_defconfig +1 -1
index e1077a0..e588da2 100644
@@ -109,7 +109,7 @@ CONFIG_NLS_ASCII=y
 CONFIG_NLS_ISO8859_1=y
 CONFIG_NLS_ISO8859_15=y
 CONFIG_NLS_UTF8=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 # CONFIG_ENABLE_MUST_CHECK is not set
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_UNUSED_SYMBOLS=y
arch/sh/configs/sdk7786_defconfig +1 -1
index e7e56a4..2e12997 100644
@@ -216,7 +216,7 @@ CONFIG_NLS_ASCII=m
 CONFIG_NLS_ISO8859_1=y
 CONFIG_NLS_ISO8859_15=m
 CONFIG_NLS_UTF8=m
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 # CONFIG_ENABLE_WARN_DEPRECATED is not set
 # CONFIG_ENABLE_MUST_CHECK is not set
 CONFIG_MAGIC_SYSRQ=y
arch/sh/configs/se7722_defconfig +1 -1
index ae998c7..09aac57 100644
@@ -53,7 +53,7 @@ CONFIG_EXT3_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_TMPFS=y
 CONFIG_HUGETLBFS=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 # CONFIG_ENABLE_MUST_CHECK is not set
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_FS=y
arch/sh/configs/sh7785lcr_32bit_defconfig +1 -1
index 9bdcf72..bdb7783 100644
@@ -144,7 +144,7 @@ CONFIG_NFSD_V3=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_CODEPAGE_932=y
 CONFIG_NLS_ISO8859_1=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 # CONFIG_ENABLE_MUST_CHECK is not set
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_KERNEL=y
arch/sh/configs/urquell_defconfig +1 -1
index 1e843db..795afb5 100644
@@ -143,7 +143,7 @@ CONFIG_ROOT_NFS=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_CODEPAGE_932=y
 CONFIG_NLS_ISO8859_1=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 # CONFIG_ENABLE_WARN_DEPRECATED is not set
 # CONFIG_ENABLE_MUST_CHECK is not set
 CONFIG_DEBUG_FS=y
arch/sparc/configs/sparc64_defconfig +1 -1
index 04920ab..d699009 100644
@@ -203,7 +203,7 @@ CONFIG_EXT3_FS_SECURITY=y
 CONFIG_PROC_KCORE=y
 CONFIG_TMPFS=y
 CONFIG_HUGETLBFS=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 # CONFIG_ENABLE_WARN_DEPRECATED is not set
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_KERNEL=y
arch/x86/configs/i386_defconfig +1 -1
index 265901a..a3a7a81 100644
@@ -286,7 +286,7 @@ CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ASCII=y
 CONFIG_NLS_ISO8859_1=y
 CONFIG_NLS_UTF8=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 # CONFIG_ENABLE_WARN_DEPRECATED is not set
 CONFIG_FRAME_WARN=1024
 CONFIG_MAGIC_SYSRQ=y
arch/x86/configs/x86_64_defconfig +1 -1
index 4f404a6..0250dbd 100644
@@ -284,7 +284,7 @@ CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ASCII=y
 CONFIG_NLS_ISO8859_1=y
 CONFIG_NLS_UTF8=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 # CONFIG_ENABLE_WARN_DEPRECATED is not set
 CONFIG_MAGIC_SYSRQ=y
 # CONFIG_UNUSED_SYMBOLS is not set
arch/xtensa/configs/audio_kc705_defconfig +1 -1
index c4904db..bc0e69f 100644
@@ -123,7 +123,7 @@ CONFIG_ROOT_NFS=y
 CONFIG_SUNRPC_DEBUG=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DYNAMIC_DEBUG=y
 CONFIG_DEBUG_INFO=y
 CONFIG_MAGIC_SYSRQ=y
arch/xtensa/configs/generic_kc705_defconfig +1 -1
index f4b7b38..6adabfa 100644
@@ -111,7 +111,7 @@ CONFIG_ROOT_NFS=y
 CONFIG_SUNRPC_DEBUG=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DYNAMIC_DEBUG=y
 CONFIG_DEBUG_INFO=y
 CONFIG_MAGIC_SYSRQ=y
arch/xtensa/configs/nommu_kc705_defconfig +1 -1
index 337d5ba..0727336 100644
@@ -107,7 +107,7 @@ CONFIG_ROOT_NFS=y
 CONFIG_SUNRPC_DEBUG=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DYNAMIC_DEBUG=y
 CONFIG_DEBUG_INFO=y
 # CONFIG_FRAME_POINTER is not set
arch/xtensa/configs/smp_lx200_defconfig +1 -1
index 22eeacb..fb09f54 100644
@@ -115,7 +115,7 @@ CONFIG_ROOT_NFS=y
 CONFIG_SUNRPC_DEBUG=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_DYNAMIC_DEBUG=y
 CONFIG_DEBUG_INFO=y
 CONFIG_MAGIC_SYSRQ=y
kernel/printk/printk.c +39 -2

47 lines not on this page · raw message

lib/Kconfig.debug +5 -2
index 1e9a607..774aa38 100644
@@ -1,7 +1,9 @@
 menu "printk and dmesg options"
 
 config PRINTK_TIME
-	bool "Show timing information on printks"
+	int "Show timing information on printks (0-1)"
+	range 0 1
+	default "0"
 	depends on PRINTK
 	help
 	  Selecting this option causes time stamps of the printk()
@@ -10,7 +12,8 @@ config PRINTK_TIME
 
 	  The timestamp is always recorded internally, and exported
 	  to /dev/kmsg. This flag just specifies if the timestamp should
-	  be included, not that the timestamp is recorded.
+	  be included, not that the timestamp is recorded. 0 disables the
+	  timestamp and 1 uses the local clock.
 
 	  The behavior is also controlled by the kernel command line
 	  parameter printk.time=1. See Documentation/kernel-parameters.txt
tools/testing/selftests/rcutorture/configs/lock/CFcommon +1 -1
index e372dc2..779f984 100644
@@ -1,2 +1,2 @@
 CONFIG_LOCK_TORTURE_TEST=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
tools/testing/selftests/rcutorture/configs/rcu/CFcommon +1 -1
index f824b4c..7461db3 100644
@@ -1,5 +1,5 @@
 CONFIG_RCU_TORTURE_TEST=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 CONFIG_RCU_TORTURE_TEST_SLOW_CLEANUP=y
 CONFIG_RCU_TORTURE_TEST_SLOW_INIT=y
 CONFIG_RCU_TORTURE_TEST_SLOW_PREINIT=y
Signature · 1 line
1.7.9.3
maintainer
#2 lore raw

Re: [PATCH 1/2] lib, switch CONFIG_PRINTK_TIME to int

Quoted 18 lines · Prarit Bhargava

CONFIG_PRINTK_TIME is a bool and in order to add timestamp options for the monotonic and real time clock it must be expanded to an int.

arch/x86/configs/x86_64_defconfig +1 -1
index 4f404a6..0250dbd 100644
@@ -284,7 +284,7 @@ CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ASCII=y
 CONFIG_NLS_ISO8859_1=y
 CONFIG_NLS_UTF8=y
-CONFIG_PRINTK_TIME=y
+CONFIG_PRINTK_TIME=1
 # CONFIG_ENABLE_WARN_DEPRECATED is not set
 CONFIG_MAGIC_SYSRQ=y
 # CONFIG_UNUSED_SYMBOLS is not set
lib/Kconfig.debug +0 -0
index 1e9a607..774aa38 100644

[...]

lib/Kconfig.debug line 6

Quoted 10 lines
lib/Kconfig.debug +3 -1
@@ -1,7 +1,9 @@
 menu "printk and dmesg options"
 
 config PRINTK_TIME
-	bool "Show timing information on printks"
+	int "Show timing information on printks (0-1)"
+	range 0 1
+	default "0"

I get "0" as the default when running "make" with this patch:

$>> make oldconfig
scripts/kconfig/conf --oldconfig Kconfig .config:3463:warning: symbol value 'y' invalid for PRINTK_TIME *
* Restart config...
*
*
* printk and dmesg options
*
Show timing information on printks (0-3) (PRINTK_TIME) [0] (NEW)

                                                       ^^^

And it really writes 0 into .config:

$>> grep PRINTK_TIME .config
CONFIG_PRINTK_TIME=0

It seems that arch/x86/configs/x86_64_defconfig is used only when you call "make defconfig"

Hmm, this might be surprising and annoying for many people. I would suggest to make "1" as the default value and remove the default from all that defconfigs. It is default on almost all systems and it is why people would expect.

Best Regards,
Petr

#3 lore raw

PATCH v7 2/2 printk, allow different timestamps for printk.time

In reply to Prarit Bhargava

Over the past years I've seen many reports of bugs that include time-stamped kernel logs (enabled when CONFIG_PRINTK_TIME=y or print.time=1 is specified as a kernel parameter) that do not align with either external time stamped logs or /var/log/messages. This also makes determining the time of a failure difficult in cases where /var/log/messages is unavailable.

For example,

[root@intel-wildcatpass-06 ~]# date; echo "Hello!" > /dev/kmsg ; date Thu Dec 17 13:58:31 EST 2015
Thu Dec 17 13:58:31 EST 2015

which displays

[83973.768912] Hello!

on the serial console.

Running a script to convert this to the stamped time,

[root@intel-wildcatpass-06 ~]# ./human.sh | tail -1

[Thu Dec 17 13:59:57 2015] Hello!

which is already off by 1 minute and 26 seconds off after ~24 hours of uptime.

This occurs because the time stamp is obtained from a call to local_clock() which (on x86) is a direct call to the hardware. These hardware clock reads are not modified by the standard ntp or ptp protocol, while the other timestamps are, and that results in situations external time sources are further and further offset from the kernel log timestamps.

This patch introduces printk.time=[0-3] allowing a user to specify an adjusted clock to use with printk timestamps. The hardware clock, or the existing functionality, is preserved by default.

Real clock & 32-bit systems: Selecting the real clock printk timestamp may lead to unlikely situations where a timestamp is wrong because the real time offset is read without the protection of a sequence lock in the call to ktime_get_log_ts() in printk_get_ts().

[v2]: use NMI safe timekeeping access functions
[v3]: use tglx's ktime_get_log_ts() suggestion to get monotonic & real clocks [v4]: Fix kernel parameters
[v5]: Modify configs to accept [0-3]
[v6]: Implement Kconfig changes from Petr Mladek, fix CONFIG_PRINTK_TIME=0 and dmesg bug

Cc Cc: Petr Mladek <[email protected]>
Cc John Stultz <[email protected]>
Cc Xunlei Pang <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Baolin Wang <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Petr Mladek <[email protected]>
Cc Tejun Heo <[email protected]>
Cc Peter Hurley <[email protected]>
Cc Vasily Averin <[email protected]>
Cc Joe Perches <[email protected]>
---
 Documentation/kernel-parameters.txt |    6 ++++--
 include/linux/timekeeping.h         |    1 +
 kernel/printk/printk.c              |   35 +++++++++++++++++++++++++++++++++--
 kernel/time/timekeeping.c           |   13 +++++++++++++
 lib/Kconfig.debug                   |    7 ++++---
 5 files changed, 55 insertions(+), 7 deletions(-)
Documentation/kernel-parameters.txt +4 -2
index 79c3e28..95cd7fe 100644
@@ -3111,8 +3111,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 			Format: <bool>  (1/Y/y=enable, 0/N/n=disable)
 			default: disabled
 
-	printk.time=	Show timing data prefixed to each printk message line
-			Format: <string>  (1/Y/y=enable, 0/N/n=disable)
+	printk.time=	Show timestamp prefixed to each printk message line
+			Format: <string>
+				(0/N/n = disable, 1/Y/y = local clock,
+				2 = monotonic clock, 3 = real clock)
 
 	processor.max_cstate=	[HW,ACPI]
 			Limit processor to maximum C-state
include/linux/timekeeping.h +1 -0
index 96f37be..9b57867 100644
@@ -233,6 +233,7 @@ static inline u64 ktime_get_raw_ns(void)
 
 extern u64 ktime_get_mono_fast_ns(void);
 extern u64 ktime_get_raw_fast_ns(void);
+extern u64 ktime_get_log_ts(u64 *offset_real);
 
 /*
  * Timespec interfaces utilizing the ktime based ones
kernel/printk/printk.c +33 -2
index 18dee96..48a8214 100644
@@ -424,6 +424,8 @@ static u32 truncate_msg(u16 *text_len, u16 *trunc_msg_len,
 	return msg_used_size(*text_len + *trunc_msg_len, 0, pad_len);
 }
 
+static u64 printk_get_ts(void);
+
 /* insert record into the buffer, discard old ones, update heads */
 static int log_store(int facility, int level,
 		     enum log_flags flags, u64 ts_nsec,
@@ -472,7 +474,7 @@ static int log_store(int facility, int level,
 	if (ts_nsec > 0)
 		msg->ts_nsec = ts_nsec;
 	else
-		msg->ts_nsec = local_clock();
+		msg->ts_nsec = printk_get_ts();
 	memset(log_dict(msg) + dict_len, 0, pad_len);
 	msg->len = size;
 
@@ -1042,6 +1044,12 @@ static inline void boot_delay_msec(int level)
 
 static int printk_time = CONFIG_PRINTK_TIME;
 
+/*
+ * Real clock & 32-bit systems:  Selecting the real clock printk timestamp may
+ * lead to unlikely situations where a timestamp is wrong because the real time
+ * offset is read without the protection of a sequence lock in the call to
+ * ktime_get_log_ts() in printk_get_ts() below.
+ */
 static int printk_time_param_set(const char *val,
 				 const struct kernel_param *kp)
 {
@@ -1063,6 +1071,14 @@ static int printk_time_param_set(const char *val,
 	case 'y':
 		printk_time = 1;
 		break;
+	/* 2 = monotonic clock */
+	case '2':
+		printk_time = 2;
+		break;
+	/* 3 = real clock */
+	case '3':
+		printk_time = 3;
+		break;
 	default:
 		pr_warn("printk: invalid timestamp value\n");
 		return -EINVAL;
@@ -1080,6 +1096,21 @@ static struct kernel_param_ops printk_time_param_ops = {
 
 module_param_cb(time, &printk_time_param_ops, &printk_time, S_IRUGO);
 
+static u64 printk_get_ts(void)
+{
+	u64 mono, offset_real;
+
+	if (printk_time <= 1)
+		return local_clock();
+
+	mono = ktime_get_log_ts(&offset_real);
+
+	if (printk_time == 2)
+		return mono;
+
+	return mono + offset_real;
+}
+
 static size_t print_time(u64 ts, char *buf)
 {
 	unsigned long rem_nsec;
@@ -1598,7 +1629,7 @@ static bool cont_add(int facility, int level, const char *text, size_t len)
 		cont.facility = facility;
 		cont.level = level;
 		cont.owner = current;
-		cont.ts_nsec = local_clock();
+		cont.ts_nsec = printk_get_ts();
 		cont.flags = 0;
 		cont.cons = 0;
 		cont.flushed = false;
kernel/time/timekeeping.c +13 -0
index 479d25c..feb1995 100644
@@ -43,6 +43,7 @@ static struct {
 
 static DEFINE_RAW_SPINLOCK(timekeeper_lock);
 static struct timekeeper shadow_timekeeper;
+static int timekeeping_active;
 
 /**
  * struct tk_fast - NMI safe timekeeper
@@ -419,6 +420,16 @@ u64 ktime_get_raw_fast_ns(void)
 }
 EXPORT_SYMBOL_GPL(ktime_get_raw_fast_ns);
 
+u64 ktime_get_log_ts(u64 *offset_real)
+{
+	*offset_real = ktime_to_ns(tk_core.timekeeper.offs_real);
+
+	if (timekeeping_active)
+		return ktime_get_mono_fast_ns();
+	else
+		return local_clock();
+}
+
 /* Suspend-time cycles value for halted fast timekeeper. */
 static cycle_t cycles_at_suspend;
 
@@ -1503,6 +1514,8 @@ void __init timekeeping_init(void)
 
 	write_seqcount_end(&tk_core.seq);
 	raw_spin_unlock_irqrestore(&timekeeper_lock, flags);
+
+	timekeeping_active = 1;
 }
 
 /* time in seconds when suspend began for persistent clock */
lib/Kconfig.debug +4 -3
index 774aa38..3197262 100644
@@ -1,8 +1,8 @@
 menu "printk and dmesg options"
 
 config PRINTK_TIME
-	int "Show timing information on printks (0-1)"
-	range 0 1
+	int "Show timing information on printks (0-3)"
+	range 0 3
 	default "0"
 	depends on PRINTK
 	help
@@ -13,7 +13,8 @@ config PRINTK_TIME
 	  The timestamp is always recorded internally, and exported
 	  to /dev/kmsg. This flag just specifies if the timestamp should
 	  be included, not that the timestamp is recorded. 0 disables the
-	  timestamp and 1 uses the local clock.
+	  timestamp and 1 uses the local clock, 2 uses the monotonic clock, and
+	  3 uses real clock.
 
 	  The behavior is also controlled by the kernel command line
 	  parameter printk.time=1. See Documentation/kernel-parameters.txt
Signature · 1 line
1.7.9.3
maintainer
#4 lore raw

Re: [PATCH 2/2] printk, allow different timestamps for printk.time

Quoted 34 lines · On Fri, 22 Apr 2016 08:03:09 -0400 Prarit Bhargava <[email protected]> wrote:

Over the past years I've seen many reports of bugs that include time-stamped kernel logs (enabled when CONFIG_PRINTK_TIME=y or print.time=1 is specified as a kernel parameter) that do not align with either external time stamped logs or /var/log/messages. This also makes determining the time of a failure difficult in cases where /var/log/messages is unavailable.

For example,

[root@intel-wildcatpass-06 ~]# date; echo "Hello!" > /dev/kmsg ; date Thu Dec 17 13:58:31 EST 2015
Thu Dec 17 13:58:31 EST 2015

which displays

[83973.768912] Hello!

on the serial console.

Running a script to convert this to the stamped time,

[root@intel-wildcatpass-06 ~]# ./human.sh | tail -1

[Thu Dec 17 13:59:57 2015] Hello!

which is already off by 1 minute and 26 seconds off after ~24 hours of uptime.

This occurs because the time stamp is obtained from a call to local_clock() which (on x86) is a direct call to the hardware. These hardware clock reads are not modified by the standard ntp or ptp protocol, while the other timestamps are, and that results in situations external time sources are further and further offset from the kernel log timestamps.

Quoted 8 lines

This patch introduces printk.time=[0-3] allowing a user to specify an adjusted clock to use with printk timestamps. The hardware clock, or the existing functionality, is preserved by default.

Real clock & 32-bit systems: Selecting the real clock printk timestamp may lead to unlikely situations where a timestamp is wrong because the real time offset is read without the protection of a sequence lock in the call to ktime_get_log_ts() in printk_get_ts().

Looks OK to me. Timekeeping stuff makes my head spin nowadays but I trust you've sorted out the obvious deadlock/reentrancy/etc issues. I'll toss it in for some testing.

Quoted 15 lines
kernel/printk/printk.c +6 -0
@@ -1042,6 +1044,12 @@ static inline void boot_delay_msec(int level)
 
 static int printk_time = CONFIG_PRINTK_TIME;
 
+/*
+ * Real clock & 32-bit systems:  Selecting the real clock printk timestamp may
+ * lead to unlikely situations where a timestamp is wrong because the real time
+ * offset is read without the protection of a sequence lock in the call to
+ * ktime_get_log_ts() in printk_get_ts() below.
+ */
 static int printk_time_param_set(const char *val,
 				 const struct kernel_param *kp)
 {
@@ -1063,6 +1071,14 @@ static int printk_time_param_set(const char *val,
 	case 'y':

kernel/printk/printk.c static int printk_time_param_set(const char *val, · line 1081

Quoted 10 lines
kernel/printk/printk.c +8 -0
 		printk_time = 1;
 		break;
+	/* 2 = monotonic clock */
+	case '2':
+		printk_time = 2;
+		break;
+	/* 3 = real clock */
+	case '3':
+		printk_time = 3;
+		break;

Maybe it's time to enumerate these values.

Quoted 11 lines
kernel/printk/printk.c +4 -0
 	default:
 		pr_warn("printk: invalid timestamp value\n");
 		return -EINVAL;
@@ -1080,6 +1096,21 @@ static struct kernel_param_ops printk_time_param_ops = {
 
 module_param_cb(time, &printk_time_param_ops, &printk_time, S_IRUGO);
 
+static u64 printk_get_ts(void)
+{
+	u64 mono, offset_real;
+

kernel/printk/printk.c static struct kernel_param_ops printk_time_param_ops = { · line 1112

Quoted 10 lines
kernel/printk/printk.c +10 -0
+	if (printk_time <= 1)
+		return local_clock();
+
+	mono = ktime_get_log_ts(&offset_real);
+
+	if (printk_time == 2)
+		return mono;
+
+	return mono + offset_real;
+}

Because the magic constants set a bad example for any children in the audience.