Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp1099295lqs; Wed, 6 Mar 2024 06:24:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVmPfq4P86yJUMRu7XDCm6TEoGJT3R9FvTyOchSWb2YW7AduGbojxt46+QV/E/5dan2KjLMPtDMXKSX2nCy/LimBNR2Qj0gY0T6xqo3FQ== X-Google-Smtp-Source: AGHT+IH500s2SQumAe1hqEY7zz5IlcpR4GK0bkMct234Lk8j6+pmoxm9iGmm+aWurnwyh60yg2m+ X-Received: by 2002:a17:906:ccc8:b0:a44:1a51:a1fd with SMTP id ot8-20020a170906ccc800b00a441a51a1fdmr9775159ejb.64.1709735097417; Wed, 06 Mar 2024 06:24:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709735097; cv=pass; d=google.com; s=arc-20160816; b=vqBQzr4q7aqjz5PebdYB/s769KR4sxdTqi5v9h+zmuq/W+3JPkJIKxm58BMRqFie95 UE8GF+//iYvFW1oxpFUX8GQHfZ/v0JtTCPY+3IIZX7zCVb6cphy2kaOMY1EFLEKoDOsL a8yEncuef5UEA6mHyWzz51/BiVOBIhXswoxahxaw04nvHQVLzJMYnkTSw0RadBVKCeD9 lsj4+QCcmFkUC/3YQprv5P12lAI1aTUD1HuRAJVYyd2c/nj4spBoaew6uI0ZPZDHSU1L xt3Xw+GDep1tOIMZB83XPO4hfA+Bln34NbXMf+V2NOQEBdHbSztXwCh8TevYsmdZ6xE/ DDxw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=NHmFvRnNMD452asVhlhHNDgJw06OaHqITdfsgJNpHh4=; fh=DLFKpE/9oXnQA2HRD5wDGqVDIPO8XY1WTErTrhJdsiY=; b=MXxefgBp1loE6B3A6XoSBG8fpRI9ToGu7P+O6iYkLt77wW4nLOU/8PCmC8TqnYcOSV 3XQhsHORzZPBbva0wvkvNTwWjUo6bHVe+XMhXbKHmu9HApHNzRJ3Ku1JCh2Tz/xAnuGT /JsEP8lEBXcVKIgoB/KULAQJ/AEBxx1DZuVGKsfTTBg2zTZv7q4LY1bS8oZSssBYkHe4 KSBvciUTrU8B1p95GUhxFyS+Pkjp5GhiaJPVnDrP8TKM0GHWlgSzuP5b6Qvh/gYo0gHG SqHYUQ57cUYyAWelaRhw82KCKX6uSrRNXozwYwqs7gaN00bw95DbWwpAzCAXdPXfurGj 2c8Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="NaiMRe/2"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-94040-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94040-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id m15-20020a1709062acf00b00a4415d8f3b5si5909320eje.492.2024.03.06.06.24.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 06:24:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-94040-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="NaiMRe/2"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-94040-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94040-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 217841F255F6 for ; Wed, 6 Mar 2024 14:24:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CCD6413473F; Wed, 6 Mar 2024 14:24:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NaiMRe/2" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E0BC5133425; Wed, 6 Mar 2024 14:24:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709735049; cv=none; b=lGQu9jE7jNIkU8e7GQitz6eIKA4Kk5PX79ukQRCWMZCTli72WZUHvLQgzrpprZ7zDH65J29DxU4t9IPE2pNcrrIlp7UC6eJFIwig8sbdLRj3zqYwGD8faGSKs5mwIbSukKop3wq3lHhth/XgZtqmnUpEaIFy9bmb7VcAjI6BG98= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709735049; c=relaxed/simple; bh=NHmFvRnNMD452asVhlhHNDgJw06OaHqITdfsgJNpHh4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=e2ZsLwQXyJcoBGTLRv5yDCoBP9WSgUWFN6mvbK06Ln0GLxYxtJbryHxUckR8PBimeV6Z2fIuWd7wLttk/K6TucIzGaehqZDDPc9fFOfB040fe6A5zfDSerQKUjnbC+RqONF8K361V4WzmtNtymMxU9GAt+/nn7HtCwIMlVFMoFE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NaiMRe/2; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20741C43399; Wed, 6 Mar 2024 14:24:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709735048; bh=NHmFvRnNMD452asVhlhHNDgJw06OaHqITdfsgJNpHh4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NaiMRe/2mFh6h1S8urgy9n5GgygPUznUpk9N2V/+cQ8hjqJykFfAzwDLyx9Y0hLzf Oth1C9Esz9x9ZJKtdBkuuAoT5UUo6dCg8ag1wX6Ypa0Z7fY8O+PkUP75hQas9gOxUM 7f5AH2JZ2xkZlKveKRMbN7mLeJ4agEQIao7sH5dtWyX08GxvCz2rt20D1qtlc697g7 ERm2e4/EbBiBnZk3iLBPTsSZXXVjD7fqmjNcGZk6FqVyCuk1hxAYNm/ccE388K+YSO r6w41nF6E+1cdk/YaYMrD0+jdVMC5YC8vJ63ViSejSWqARljgjDomzQmfkuYvmdP4P dZwpKdKDwdMYA== Date: Wed, 6 Mar 2024 15:24:05 +0100 From: Maxime Ripard To: forbidden405@outlook.com Cc: Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] clk: set initial best mux parent to current parent when determining rate Message-ID: <20240306-inescapable-astute-bobcat-20c3e8@houat> References: <20240306-mux-v2-0-92a5fa461fd2@outlook.com> <20240306-mux-v2-1-92a5fa461fd2@outlook.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zf73hvuk44f6kich" Content-Disposition: inline In-Reply-To: <20240306-mux-v2-1-92a5fa461fd2@outlook.com> --zf73hvuk44f6kich Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Wed, Mar 06, 2024 at 12:22:23AM +0800, Yang Xiwen via B4 Relay wrote: > From: Yang Xiwen >=20 > Originally, the initial clock rate is hardcoded to 0, this can lead to > some problem when setting a very small rate with CLK_MUX_ROUND_CLOSEST. >=20 > For example, if the lowest possible rate provided by the mux is 1000Hz, > setting a rate below 500Hz will fail, because no clock can provide a > better rate than the non-existant 0Hz. But it should succeed with 1000Hz > being set. >=20 > Setting the initial best parent to current parent could solve this bug. >=20 > Signed-off-by: Yang Xiwen That patch makes sense to me, but this changes the behaviour of the functio= n. Before, if we couldn't find a good configuration for the rate, we were error'ing out. Now, we keep the current configuration. We should document the new behaviour in the function documentation, and we should probably run that through kernelci to make sure we aren't breaking any platform (and from experience, we probably are). Maxime --zf73hvuk44f6kich Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCZeh8hQAKCRDj7w1vZxhR xYFUAQC64cGB/6QatYSjC3DnlztHH8x/x6LsjJUpD5B/vIbvVAEAmQ+PxbQ+4VTJ iPySZ72xkzqMzdCHaGE2dgv/wYd63gk= =+nPB -----END PGP SIGNATURE----- --zf73hvuk44f6kich--