From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (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 D9B7C1A6806 for ; Thu, 11 Jun 2026 08:48:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781167692; cv=none; b=Cr/V9otoMFRizeBtEDN3bUoYA027tidFoFRQnIYUyEGPLJRxw89ZQGqwyNiqqj0IZCmsYVZ2CeCsE4T9kP7Nz6HyIzj9/3MfodL1cUNw5g0TTZRTAQ6KXq6G7EytkPEytWnR1F95nb9so0NEXyV7aJ/WWsUDziymNOP8DTq4DrA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781167692; c=relaxed/simple; bh=9AUwQ3mAjaUzASkscEHhxUr9r89icZFTLgtNq1oEY04=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hs0J5UMx4s6t7QFlpqZDm6u+/KFgLz2RbJfb5gI+YKvvlwSMwuRLezdOBFa7Cg7tqvQu5N4DxY9Wf/yC1V/HRbyLgYifgYLBSffDmRcpjbYajHI5lsAfW+4uEBbSGt4c9+LmgIFPPy26wvMp/BX7rVUGildXWx7jamqrHQhIOA8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=xt+a+wwd; arc=none smtp.client-ip=209.85.221.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="xt+a+wwd" Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-45ef616daf6so7191700f8f.3 for ; Thu, 11 Jun 2026 01:48:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1781167689; x=1781772489; 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=OArZmZCBEmYP7y3bIIzOW7qMmS8JsL1mct+2P0vjlgA=; b=xt+a+wwdcdMJduVdfi1s+DoYVu354HGj5gRtMjg1xba1mrCC2mE9ELHU64OmfHGZBn sflAjdb/4GXMNwYKRtIP3DJIpcgoKbeKm9h8bWVISTbxZapeGcPLsGecGwCG5W2mppvb 83u8C7k+J4tF8mZacOzY/pZ7Y+Yjb2R1DxN7c/JIescbyRDLeQ+ex/8l73+cc0lP026w TzosDI+2N6Cf0YXnnAsvotiqJklKnJHvZD468/4JI8IsLxTXlvBhLT3jjQu8RhWRbV4E Jb1Xc1VaMSLVUJXATWbvYnCRbwSzI4ZXze5Ik41fq02TepkjAtelPuDcvQYfDtrkBOtP U60Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781167689; x=1781772489; 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=OArZmZCBEmYP7y3bIIzOW7qMmS8JsL1mct+2P0vjlgA=; b=RCTsMUYnLLKLSpGalbgciI0kPDkn6ptSpefjKvr1GBD9OTnQpPbPTsNMqHVWp4FNdR K/8sBUgEINFe7XMlZ4P35mlAxTb7VG7DZVf+sgvxKU6kBcAB4/sQBK86BQGy3+YxyhO/ fFEqoo4l8X5TtS1RhGqpPjaso92Uy02JlFnOw2x7lIhNgyZOZrvkAtDMkQrelYkf6HME bLDdPDPPuEMZvnVpYLe71dOhKucVCNvZDJUhesY0b4wipzlasQdpwtkHaJAgLeUfgmkd 0JTRsn0sOsM+zHKIMZCp+4wIaivBwyjQ1TG8PogP6wy6BY0x8MLnqI76qhzB3HRpwHtK JxRA== X-Forwarded-Encrypted: i=1; AFNElJ+CRDBLDAmdfBYQ3j8g/QgxwYuPFye13/4ar8zotUWJZYVScyikP80DiJRQ6V4oklkw/Gs1NkyS2pOPe/0=@vger.kernel.org X-Gm-Message-State: AOJu0YwmdehemxJucitC6cIThDfAQWbh62Wlx1h+yDo4W20JlMybcdlp SUSC9oc07ES5FIb9Odw6hVI3aP3D2JFEsaCrlnH6XQ60BzjoMQNeGSigcGsVrylJl5zvxWGmL+C X87Mwm+g= X-Gm-Gg: Acq92OE8Scz0LOB/C9LiTCKEYYYISqACfRZQNgKX+m2iG+/RQ/Lu1xOzMG5l+M8inqq H34mb9nj3Nb5SeeasGk++oxJCzmlVibsdpbNjYXx4UHl+2lgezfLamkurjvHYu97g07H6zXVWgz REOtcVcqLus8vMZzQtLxTZGvhSV0Lu+yJg1T+9jy5bUYEVCb7RA0zHl4BEqpH9O//uFMQWCKHFv Z19kLKfC5prQ89YFrceO8shdAh8Ydw8WeJfP7LzKqFaUdvY2tOyoRz30XK7YhjHuA/Ctux66uOQ gFvl8MWKJr9qIbpPw1GJgx/VDGFulOZONmqJ/gjHgucEeqCimHKDTn3HQETAGsYdqkZ5FNIzM6s 4H4ZguS/z6XbHuKcIrZN+H+3N/1jCRMlkD+8I55C8TGBiLNUQvenlIKitEN5i2UA0MV7XuhiE5q oQ66aC+B+LbkY/SEUAAbd/NQLjWSlnKQWS0MxNpEXMYu84gA== X-Received: by 2002:a5d:5989:0:b0:460:1f32:628d with SMTP id ffacd0b85a97d-46067598f37mr2701664f8f.11.1781167689135; Thu, 11 Jun 2026 01:48:09 -0700 (PDT) Received: from linaro.org ([2a02:2454:ff23:4410:7bb1:6476:9114:cf39]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4601f2dc577sm80809393f8f.3.2026.06.11.01.48.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2026 01:48:08 -0700 (PDT) Date: Thu, 11 Jun 2026 10:47:58 +0200 From: Stephan Gerhold To: Marc Zyngier Cc: Mark Rutland , Daniel Lezcano , Thomas Gleixner , Sudeep Holla , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Jack Matthews Subject: Re: [PATCH 0/2] clocksource/drivers/arm_arch_timer_mmio: Restore support for early init Message-ID: References: <20260610-arm-arch-timer-mmio-early-v1-0-ac17218ec8b4@linaro.org> <87se6t8q3s.wl-maz@kernel.org> 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: <87se6t8q3s.wl-maz@kernel.org> On Thu, Jun 11, 2026 at 08:59:19AM +0100, Marc Zyngier wrote: > On Wed, 10 Jun 2026 18:53:09 +0100, > Stephan Gerhold wrote: > > > > Jack reported a regression for some single-core Qualcomm platforms (e.g. > > MDM9625, MDM9607) that no longer boot because no timers can be found during > > early boot [1]. > > Again, this is *not* a regression. These machines were *never* > supported upstream. > Sorry, I'll reword this next time. MDM9607 does have all required drivers and compatibles upstream already and is just missing the actual DT so it does feel somewhat supported to me, but I'm fine treating this as a feature extension without stable backporting etc. > > These platforms rely on an obscure timer setup where the > > global Arm MMIO timer (arm,armv7-timer-mem) is used as the only available > > timer for the CPU. This setup used to work fine until commit 0f67b56d84b4 > > ("clocksource/drivers/arm_arch_timer_mmio: Switch over to standalone > > driver") when the early timer initialization using TIMER_OF_DECLARE() was > > removed when moving to the standalone MMIO driver. > > > > There doesn't seem to be any other usable CPU timer on those platforms, so > > this series restores the early timer support using TIMER_OF_DECLARE() > > inside the new standalone arm_arch_timer_mmio driver. This is pretty ugly, > > but I could not think of a better solution so far. I tried to keep the > > ugliness for the two probe paths as limited as possible. :-) > > > > If someone has a better idea how to solve this, I would be happy to try it. > > I would suggest finding out what is the latest point in the init > sequence where the timer can be probed without preventing boot. > It doesn't get far without having any timer: [ 0.000000] timer_probe: no matching timers found [ 0.000000] entering initcall level: console [ 0.000000] calling con_init+0x0/0x354 @ 0 [ 0.000000] Console: colour dummy device 80x30 [ 0.000000] initcall con_init+0x0/0x354 returned 0 after 0 usecs [ 0.000000] sched_clock: 32 bits at 300 Hz, resolution 3333333ns, wraps every 7158278824300949ns [ 0.000000] Calibrating delay loop... If you look at start_kernel() in init/main.c it's basically time_init() that would normally probe the TIMER_OF_DECLARE() timers and calibrate_delay() that needs some timer to finish. There is also random_init() that comes directly after time_init(), which already wants to have access to timestamp counters. I don't see any other suitable place to hook into. :-/ I also don't see any other timer we could use, at least for MDM9625. It's a single-core Cortex-A5 and the downstream kernel defines only the arm,armv7-timer-mem, which seems to be used for everything... (The situation for MDM9607 is a bit different, but not any less messy, unfortunately.) Thanks, Stephan