From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC14A32D7FA for ; Tue, 21 Apr 2026 08:33:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776760433; cv=none; b=J10OX1NJ5wqaEEHAf+SsSz3Fsnc/ixr+1XVm2j7gmySJJppe0aSci5cX18zmh3Y8h4ozWhUVOI7NaEfaRqG38mfypoBGF5+m3DTp+OE/DctCMOgKXcNwoKzJUwChNQouHul+ad1sJIuyhyMg46hkTWDT59ansekSnMKVhI8q1Xc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776760433; c=relaxed/simple; bh=/VZ5kriGWaiBxu3SgCheS5BJ8WdBrbRkGNaCxaPDoeg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YEGgMk2yP5hKB4reVE6dYR2wtVjlRLz2ECd8fg9f0MCVZ1W41pyNRCGzbbFI5hF9GArOdP0qOLNFkMVFulHc/im5Jq+qttde+fRAiSPw2DdTfMS6CtESXvz9d/nFP6/0Lg+W1qroNFxHj98Q6u8I4puS3bj68TN94v6iy9OsID8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=fjE/lyvR; arc=none smtp.client-ip=209.85.221.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="fjE/lyvR" Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-4411e1eba51so588183f8f.3 for ; Tue, 21 Apr 2026 01:33:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1776760430; x=1777365230; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=eRvr1BPib4X2D3T0QNvR+79b+TxBNI5uhJQokMSK6Z0=; b=fjE/lyvRyYx6eAXp/7muWGFkZmZaZIwZK33ubfLW1N86HFOoQSay3O2hRnHsfPJDIT sKAn1pw4wRLU5XcI+KZ8r+HpcN/mqtWPgweWuyYiET4HZWvsseqmOfFoGRAulAOS1eH8 dyCOcJXphFQrLsV/ATMfdChT3KkqvL7R80TRPvWf4zcOhtplIKRjPoVgrcxwzYq2e0MQ MEz1pPDLxbNeldxSMJL2wKOEYlQtwcPwt37CHUqq9FaMoTdy9xGsKxEeIhhz+iR6vOCp cSdXQEj4jDv8JR98mayPhTb7TLAHlJeKAjMV/GW58RN5T0vRQTpjynn979drMgjMnHSQ 6pRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776760430; x=1777365230; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eRvr1BPib4X2D3T0QNvR+79b+TxBNI5uhJQokMSK6Z0=; b=V34ncXywAfzjmuz4svTc/m2hEvUyPQS5SAHEFBE6XQRG25jdQW59lL3fdRuJCUbLoG 5YlYeg66BNP9zWi5iD1QMkyZ0UH2U+4WRz7lGervI/2LbOU13J9StYzQrK8TfQIbGEcC 7zm0GZO4llTX6BXeIc4PPbgaE32IqI8aOo+20tLspcz4gKSyFAKhoyxNJP6RzMWHdo/s ffSF9Kt2SHzacYTGN3EMk6nZGJQ3jL40CH4ibhrtXiPRKNbtQfOpacEOU8d8WTl4SE0v wu1g7bSJ3N/tIKgRcoQfJ8JdwQE3PMpBh2xH8afKw73maxT0j2ITN3oRpA0IPvs7fJVT aYBQ== X-Forwarded-Encrypted: i=1; AFNElJ/rRIqb2boseWEK4/rV6xTAs7qnBspck993pYHhG+BkJSdIb/RBph6bdu+ZohCKYED2TGYDdW2NTOCns90=@vger.kernel.org X-Gm-Message-State: AOJu0YyHJh7PYNJHn3X4Ay7rTNAdmFejRmc3rpuuavWBj07BKgRY7MBS as6V9uRaWjF3MYx8QzQjDRNpTmYbh+SDFpCeR2+ANQ3tXn7ZHiJdVfY7UbTJEj0dPIw= X-Gm-Gg: AeBDievOZv3xUzLceq38yKMZMFPBQbuaexjkdg356R63et9lhwJ4aGbphNjtMfy7JW7 0i3nrwAEaCvHlxStUW2NyAb7xYO6n7avRs4h7+1CjZ3blwOn82KC33qLCqdvi/piWlOOD6GAsO9 BPBMJAH6IBNmFb8cHPhJ37h/Gxb1H+ovFcmRgtuxAd85scl//gxLAXUmMHtUdxJ2iQbq2vysk1W Tyf0OCB1sKV6RSb7+IGKKCHC018IdAkjpyNPHQQB8U59MRWrvs/IP1GPO63JXy5LWvIwvpMoboS JZXoA7oQCkDHghxRDJZZWQG7aHV4m/VlROG8HKAHELIyjc6zEcK/HB3OyTtUPoNng2JWPZZPiAk pLNT5D5bDZnYwRnhRNbeSZ02XIHToENlpFxsGQRwsHnqA7YedV2mobbV54+LdgDZkXJsNC08ABK NOEkzuN1TfObfdLheES0dVfrUsPN+KsUxd8KtrE/3OLmgBMZQIfmw= X-Received: by 2002:a05:6000:24ca:b0:43e:a70d:7632 with SMTP id ffacd0b85a97d-43fe3e0b463mr26551326f8f.25.1776760430040; Tue, 21 Apr 2026 01:33:50 -0700 (PDT) Received: from pathway.suse.cz (nat2.prg.suse.com. [195.250.132.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43fe4e3a18csm40281158f8f.20.2026.04.21.01.33.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Apr 2026 01:33:49 -0700 (PDT) Date: Tue, 21 Apr 2026 10:33:47 +0200 From: Petr Mladek To: "Bird, Tim" Cc: Thomas Gleixner , "rostedt@goodmis.org" , "john.ogness@linutronix.de" , "senozhatsky@chromium.org" , "francesco@valla.it" , "geert@linux-m68k.org" , "shashankbalaji02@gmail.com" , "linux-embedded@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Brian Masney Subject: Re: [PATCH v4 1/1] printk: fix zero-valued printk timestamps in early boot Message-ID: References: <20260410203741.997410-1-tim.bird@sony.com> <20260410203741.997410-2-tim.bird@sony.com> <87qzohdv6i.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Mon 2026-04-20 22:18:29, Bird, Tim wrote: > > From: Petr Mladek > > 2. The early timestamps provided by the bogo cycles > > are not synchronized with timestamps from > > the proper time keeping. > > > > Would it help to print a disclaimer, similar to, > > for example, trace_printk() first use? > > Something like: > > > > [ 0.002912] ********************************************************** > > [ 0.002917] **** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE > > [ 0.002921] ** > > [ 0.002935] ** Using BOGO early timestamps > > [ 0.002939] ** > > [ 0.002943] ** They are not properly calibrated and might use a source > > [ 0.002949] ** with an unstable frequency. > > [ 0.002953] ** > > [ 0.002957] ** They are not comparable with timestamps after > > [ 0.002961] ** the timekeeping is initialized. > > [ 0.002966] ** > > [ 0.002968] **** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE > > [ 0.002971] ******************************************************* > > That's a bit long, but I think a warning like this is useful. Yeah, feel free to make it shorter. I just wanted to explain what is going on and what is the effect. > > [ 0.002975] Booting Linux on physical CPU 0x0000000000 [0x410fd083] > > [ 0.002998] Linux version 7.0.0-rc6-v8+ (tbird@timdesk) (aarch64-linux-gnu-gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0, GNU ld (GNU > > Binutils for Ubuntu) 2.42) #20 SMP PREEMPT Fri Apr 10 11:57:48 MDT 2026 > > [ 0.003002] KASLR enabled > > [ 0.003338] random: crng init done > > [ 0.003866] Machine model: Raspberry Pi 4 Model B Rev 1.5 > > [ 0.004495] efi: UEFI not found. > > ... > > [ 0.183552] Root IRQ handler: gic_handle_irq > > [ 0.183561] GIC: Using split EOI/Deactivate mode > > [ 0.183699] rcu: srcu_init: Setting srcu_struct sizes based on contention. > > [ 0.183958] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xc743ce346, max_idle_ns: 440795203123 ns > > [ 0.183952] arch_timer: cp15 timer running at 54.00MHz (phys). > > [ 0.183957] ********************************************************** > > [ 0.183962] **** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE > > [ 0.183967] ** > > [ 0.183971] ** End of BOGO early timestamps > > [ 0.183976] ** > > [ 0.183982] **** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE > > [ 0.183989] ********************************************************** > > I actually worked on a notice like this, to bridge/explain the transition (for humans). But it turned > out that different platforms initialized their clocks differently enough that it would have > required putting the notice in different places, which would have required architecture-specific > #ifdefs in generic code (so I didn't do it). I think that we could print both notices from the printk() code: + 1st one before the very first message + 2nd one before the first message with a proper timestamp from the local_clock(). Best Regards, Petr