From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7AAB23FC5A0 for ; Mon, 15 Jun 2026 14:48:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781534896; cv=none; b=hmfBPaomYKuuBHto2i4s6PdWblQoC2ItplOSaspYeGo+oghQAM6TiTTEc9PEgfQ4Pb5+4yw8IoyrFXIkN2vE0dfSSfa7pdXLGW/NDq2MX/O7JkZJxrafZwPGIpc0sqozCz8hQdnztj2r3zUtHHyX6UDTRvnAK/ZCX1Sq2d1Yv2k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781534896; c=relaxed/simple; bh=YlzTVkLgMbpd2FCLrWB4gEgTde5PLvSJdXVzWSc/UuQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Gu0jodAXTdGEwLl7cwwldSgHwyKC7wLM7b4AgYY0mNBZap0d1hbg/c8JngiaZMC2YIkg55l5PLIarDSB4zMd3sfuAMQXZJlpLNd/UOO5QZTdSIfVxbCSxOsyhsJwWuadLzc+L6UI3XTM7g47jjc+7KuldzRzVtO7GcKnI2lU1WU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Tk61+q3N; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=nphXWQeZ; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Tk61+q3N"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="nphXWQeZ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1781534894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LYUiP1zUOQ/ECnZLKF5f92a9iphW3H0XPbp5bN6qB9c=; b=Tk61+q3NV5iVeppjaS2U4eKcwUwNeTXZPacs3Avls//HFRgvbEdVxvEUIn2zzcT6s7ogwH T5rmCvmznw2LQNI+r//suC05Q7A20WyGkDAChDGSgF0HUNO4rA4AMBytSojb0GvagnKjb/ Jbzgau4VBnvoUGLcx8QErcSVWbaWthQ= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-47-IZvV8xeONdm1UofDqhpp7Q-1; Mon, 15 Jun 2026 10:48:13 -0400 X-MC-Unique: IZvV8xeONdm1UofDqhpp7Q-1 X-Mimecast-MFC-AGG-ID: IZvV8xeONdm1UofDqhpp7Q_1781534893 Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-8ccdcd8dd3dso74467776d6.3 for ; Mon, 15 Jun 2026 07:48:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1781534892; x=1782139692; darn=vger.kernel.org; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=LYUiP1zUOQ/ECnZLKF5f92a9iphW3H0XPbp5bN6qB9c=; b=nphXWQeZEpLoRYrX0e5YD+2i8ZGlvrQSDPXe9b8xIpfqANRY+m+nm7XyqtUtQw0Nae T1z/tnVWBMkYNFx/Uxy3jl8iD+rqEiiWczzqU0KGawTwtWk6yc8n4ZM4hlajwiF0u75B JKENZOtF2hKFa0ZeefoUJcH1z8Haa891Loyq75ni4kK0/iBr11wCa+nPfhfoupHOX3Lr 2q4aEaIOLEjQ/w4rqk+9KF+cP1kBGN+TZxGKu5vQriTRMSP0iXifGe12eSKlJCqVCNgI hSkYKW/gkhnLONVzJEAXmOcVuU9zoj9uI3nTohK8/hcYJCzEv2j1Q41Lep/ZiviE1Pny YeJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781534892; x=1782139692; h=user-agent:in-reply-to:content-transfer-encoding :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=LYUiP1zUOQ/ECnZLKF5f92a9iphW3H0XPbp5bN6qB9c=; b=NZ8nje116/qGdxLgI71NkhpzoVz74mBkUM3anGjzzMR8vZqOcHmSHLg2JV0RyhO8XL Xyk+8XX/yIyBj7Z4jgVhyEQKYa/8h6/TnzTHWVhwuhkfSQbgECp9q3Ve5UfCw1cK/g/A YWQ+zuxiTI2QOs2gqLjvhz5c0n7Yaa3dd7eSFE07xp1ZW8H1UeQMjkdzm6vbI+KJAgPl mOGLLAfLbSxdGD3UiQJJ4rjB8fj9+iJ6DhPu3aXlEs4G3xkx6oi+3msVpymaEz9SEFvY Q/bw7b3yF+oU1mtNoi1ex90imGT632i0CjtANRgm7cAGj0pfz+f/FMRA/iXbEXJ8iWkH Fmzw== X-Forwarded-Encrypted: i=1; AFNElJ+bVfB8lVPrzvAFBS0c3qoiJRSWWEI1013LuubsYKosKVEFHkag4dCfP4X+EoLPYadnJ9n85JNXpG7C4c0=@vger.kernel.org X-Gm-Message-State: AOJu0YyjsTZ6EW7VCiCCyNF/Af6zNZi5aJycu3MfvQWhV8ayFZQhC/oO r+B04cZ5mcervll8kltwZWNyjO5kCYbqEPNfZ+dj+sWWwhGezVLg7EYNNkyr10Xsmvx5dvDArMb 2RfHzYmcg9p++SttNAdZuHSY89/GwNp2AcwgwSHlzESeVVM2VINtC7kBjrISJwdhUdg== X-Gm-Gg: Acq92OEYU8A75tTw5GOMz3tSsCGCML8WjsgES4VHJWXoqQOMyihT8qWD5XelVx43lz/ bD4gn3b/kN9hQnnbvcpeqia1r0eojMoIuYqoxA3zZ/qmepQXEY5nlkzNUP7/aS0Lej19DOG8kVX 6GDuUCiSeFWQu1NhtGYZ0pZiDPLMtxPmiPqFcMaLJOEBRUzBRfszAZtK9hG9TfiQy10DaJS7UqR 5pPfDr5hvUznVdV0ReEK/4ngLridAX3/NRoIlISwEtfd5F7vNmXdul6VTypHmctLoKJh2abZJrk Dy0ShCpZROgRGHH996GeIBZA8cQUgx7g9cSO0r8k+BTigvVsWi7rI/VdIBt5CtN3Wulw9zGsNDJ bXJDvbHM5J0WK+c5ATaK8Aqsy/PCYYnQoymI+KB6wfKttcKN9zemMABQ4 X-Received: by 2002:a05:6214:c2d:b0:8cc:10ff:cebc with SMTP id 6a1803df08f44-8d32c012972mr6347096d6.7.1781534892437; Mon, 15 Jun 2026 07:48:12 -0700 (PDT) X-Received: by 2002:a05:6214:c2d:b0:8cc:10ff:cebc with SMTP id 6a1803df08f44-8d32c012972mr6346636d6.7.1781534891945; Mon, 15 Jun 2026 07:48:11 -0700 (PDT) Received: from redhat.com (c-73-183-52-120.hsd1.pa.comcast.net. [73.183.52.120]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8d9f4557634sm259586d6.30.2026.06.15.07.48.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 07:48:11 -0700 (PDT) Date: Mon, 15 Jun 2026 10:48:09 -0400 From: Brian Masney To: Konrad Dybcio Cc: Dmitry Baryshkov , Val Packett , Saravana Kannan , Abel Vesa , Maxime Ripard , Michael Turquette , Stephen Boyd , Russell King , Bjorn Andersson , Hans de Goede , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH 2/4] clk: qcom: common: introduce qcom_cc_sync_state() Message-ID: References: <20260603-clk-sync-state-v1-0-457120eed200@redhat.com> <20260603-clk-sync-state-v1-2-457120eed200@redhat.com> <2f6dbc37-7ee5-4cef-b39e-455494fb31fd@packett.cool> <68a86037-bba0-4cab-8a1f-b0be78f259db@oss.qualcomm.com> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <68a86037-bba0-4cab-8a1f-b0be78f259db@oss.qualcomm.com> User-Agent: Mutt/2.3.1 (2026-03-20) Hi Konrad / Dmitry, On Mon, Jun 15, 2026 at 04:33:17PM +0200, Konrad Dybcio wrote: > On 6/15/26 4:24 PM, Brian Masney wrote: > > On Sun, Jun 07, 2026 at 01:30:03PM +0300, Dmitry Baryshkov wrote: > >> On Sun, Jun 07, 2026 at 01:43:06AM -0300, Val Packett wrote: > >>> > >>> On 6/6/26 8:15 AM, Dmitry Baryshkov wrote: > >>>> On Wed, Jun 03, 2026 at 10:21:47AM -0400, Brian Masney wrote: > >>>>> Several qcom clk providers currently have a sync_state helper set to > >>>>> icc_sync_state(). With an upcoming change to the clk framework, if > >>>>> sync_state is not defined for the device, then the clk framework sets it > >>>>> to clk_sync_state(). > >>>>> [..] > >>>>> @@ -464,5 +466,12 @@ int qcom_cc_probe_by_index(struct platform_device *pdev, int index, > >>>>> } > >>>>> EXPORT_SYMBOL_GPL(qcom_cc_probe_by_index); > >>>>> +void qcom_cc_sync_state(struct device *dev) > >>>>> +{ > >>>>> + icc_sync_state(dev); > >>>> Only if desc->icc_hws != 0, otherwise it will mess the interconnect > >>>> internals. You might need to set drvdata to desc. > >>> > >>> Hmm… > >>> > >>> Currently icc_sync_state does not seem to use the dev argument at all. > >>> > >>> How would something get messed up, now or whenever icc_sync_state changes? > >>> o.0 > >> > >> Yes :-( > > > > Sorry about the delayed response since I was out of town all last week. > > Just to be clear, the missing check for 'desc->icc_hws != 0' is a bug that > > existed prior to my change, and I should label it as such with a Fixes > > tag when I post my next version? > > Up until this change, having icc_hws > 0 but lacking icc_sync_state > (or the reverse) would be be considered programmer error icc_hws > 0 but lacking icc_sync_state (or the reverse) makes sense as a programmer error. However... > Starting with patch 4, this gets assigned unconditionally, so there's > no prior bug to be fixed I don't see where that situation happens here. All of the places where icc_sync_state() was previously called, the new code now calls qcom_cc_sync_state() -> icc_sync_state(). (There is qcom_msm8996_cbf_icc_sync_state() that needs to be modified.) In patch 4 of this series, it sets up a framework level sync_state() callback with dev_set_drv_sync_state(). If a sync_state already exists, then that call will fail with -EBUSY, and it will leave the existing sync_state() intact. So it's not calling sync_state twice. I will clarify that on the comment. Brian