From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 B9FD21C07CB for ; Fri, 20 Dec 2024 10:28:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734690522; cv=none; b=TX1FikX5oB2YSfdhMjnzvXS6BFNc+p3rdmrBAZ8r3P4W3W4tgMzX306lfttC6yU3bdF4PT9PsqsJP55cxz8fzJFi2fcy+PSf+4opimd3bFIVMyYcf1NTnacIwIrpCeWRm5FklR2LQc3/YBp0LMCZgKdLBdHUFKqenIqKrRryjEc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734690522; c=relaxed/simple; bh=5QWr8KiK0fqKJ2BcZIva5mJXwGTB/TaTgOD7YAkLkD8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=iZLIeMtjFUMETZTb7hUsbNJeB3cTUrpHG/7Ilukjgzxo2fc07B3ncw7PZWjrwNml2V/387IS32HPTjOfCRdlr0gQIyyaJ0ZGuPa+jPN1lN3ah2oxCeYaeKlgcYU46ue4CZEnp/HulvcXtTz/hoqK31K6qeqXegfluBtEcJfDcGA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=gmjlEI1/; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="gmjlEI1/" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4BK7LqW7028658 for ; Fri, 20 Dec 2024 10:28:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= B0LK1w8USgsUPXw9o6UhgF0/OBJgHQXzHotizFN7BT0=; b=gmjlEI1/IWZYvFCS s2TrItx7xzF4NNTQ0SUQ1wQ/ICLkdu/xm/bxSapsBQD71mfrEcndIp7m4uIVh/4b 1fVL4GhNLbB3x6Kbryt3Rdj88zz8yX+wfNE3LbkiEqEt1kjqX0tAS1xj0ux6dEWl DeUUDBJH5smvKi6iBsGfHNoq+5G5L6vGnKCWGam03vdkVNNWI+6mWMV2hI1sV9YI xsGRzmhKvYXsSwWQJjp8gT/zI26VDx5HCwGa9ZkO0HRttABgXHyiuw0EmwnnBKL3 4/8E/UOQ4AgG0gDl8eFtN/Zu4SZDvVQjgvQMSz1QjAGGN4n3UceCg3R+g+7mkMZK Fx4jLA== Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 43n44hrh7k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 20 Dec 2024 10:28:39 +0000 (GMT) Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-467922cf961so4407981cf.0 for ; Fri, 20 Dec 2024 02:28:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734690519; x=1735295319; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=B0LK1w8USgsUPXw9o6UhgF0/OBJgHQXzHotizFN7BT0=; b=fDo5wpCd/4zVMyAgd6ERgBIlW7WkBRoddgj3x2HIIHsbbP35nSMNvcBCVsbFQPqg0x a14e0rBV++fg3YequkosR4B5FePo7ihC7EPAOeZjkVHc/Y7IlW0F1bBl3q6kfKzwrKkN 37mBIfUgqwlpYHnWmBUgfP21sj5Y99LkSkFARqWReaPZ6IhOiGM4xvgUwVHP8v1d9J7O R5bVNZ+kkZpm33LT0dXcq3NxSO5Twnh96mGuIEIcFI6EzjPAjXDwtWe7GtEMf19NA4kR IlCFgfJFCBNJ/ZkrTfT+AV4s95sq7dStqRQJebadVTybClUsNBlGiHtNrc+Torp9FII+ 2dSw== X-Forwarded-Encrypted: i=1; AJvYcCUyHWv5c0b+W1TN6N46zVOo0+nXzti5OPDqyVJ18YknKFv0keJs3irOS/IyiXq6NYc8adCY+UQv3ZctBSI=@vger.kernel.org X-Gm-Message-State: AOJu0YxvF8yP0A01afdH3m+sNRfC/jSlMGEfRWO7wv7M0tH2mtOmKGvK zpXf4chrzwkxYLmJuQIbxvfCvpKqQLmXkflfvvcywrAPv07Pu3WlOYQ26jn9GAvcReF/pJFXUyI vpxoPED8rBV/ysV5OaJ29e+R5BUoowJ/qfPTP54RAG6aNC21JCWVUz//Qm56X7Xg= X-Gm-Gg: ASbGncsk3EuqkOjHjyz6Fi3vL1NWvJuE6+x1Bl9xVvQYAfPi0rHd0fAHPExIpkYwrMz X7XPGniOR/yhXYHsQbusP0f6G1pleAIf+nqzbbuW4qMliQELzfU4vPDZLEKA2j0ZDdaCBneykZd z3ZKR2zwcJFfoYAlChzpHxU48MbKNRgd57MLS8cpljIJvjvpOVVOokTTHIwHif58LfjAbQ9NHf+ Vno2EuEyEzoKGpmkWfMZbe7oEInUZtGttUmFS7PhyOPs862I48KY0F/NNVjXbcl5WHhrvNiGDqA e6cYcxt+umgCnaHEwbHMSln64Ecm7h5uFYw= X-Received: by 2002:ac8:5f93:0:b0:467:5eaf:7d22 with SMTP id d75a77b69052e-46a4a9785cdmr14547661cf.10.1734690519004; Fri, 20 Dec 2024 02:28:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IFEnO9AJSDDgOGm3ytySndEK+tdE7dRdZ3crkt+on5jmDGWI0kAK+1MGayLMPEHLC1GlL8+sQ== X-Received: by 2002:ac8:5f93:0:b0:467:5eaf:7d22 with SMTP id d75a77b69052e-46a4a9785cdmr14547501cf.10.1734690518633; Fri, 20 Dec 2024 02:28:38 -0800 (PST) Received: from [192.168.65.90] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0eae4345sm160775866b.84.2024.12.20.02.28.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 Dec 2024 02:28:38 -0800 (PST) Message-ID: <6220744e-8e62-475f-a1a3-3b7c2c888b3b@oss.qualcomm.com> Date: Fri, 20 Dec 2024 11:28:36 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] clk: qcom: dispcc-sm6350: Add missing parent_map for a clock To: Luca Weiss , Bjorn Andersson , Michael Turquette , Stephen Boyd , AngeloGioacchino Del Regno , Konrad Dybcio Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <20241220-sm6350-parent_map-v1-0-64f3d04cb2eb@fairphone.com> <20241220-sm6350-parent_map-v1-2-64f3d04cb2eb@fairphone.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20241220-sm6350-parent_map-v1-2-64f3d04cb2eb@fairphone.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: RIoJD4xECPN1upXeLvcdarO6ATdeYV9o X-Proofpoint-ORIG-GUID: RIoJD4xECPN1upXeLvcdarO6ATdeYV9o X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 mlxscore=0 mlxlogscore=999 phishscore=0 malwarescore=0 impostorscore=0 bulkscore=0 adultscore=0 suspectscore=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2412200086 On 20.12.2024 10:03 AM, Luca Weiss wrote: > If a clk_rcg2 has a parent, it should also have parent_map defined, > otherwise we'll get a NULL pointer dereference when calling clk_set_rate > like the following: > > [ 3.388105] Call trace: > [ 3.390664] qcom_find_src_index+0x3c/0x70 (P) > [ 3.395301] qcom_find_src_index+0x1c/0x70 (L) > [ 3.399934] _freq_tbl_determine_rate+0x48/0x100 > [ 3.404753] clk_rcg2_determine_rate+0x1c/0x28 > [ 3.409387] clk_core_determine_round_nolock+0x58/0xe4 > [ 3.421414] clk_core_round_rate_nolock+0x48/0xfc > [ 3.432974] clk_core_round_rate_nolock+0xd0/0xfc > [ 3.444483] clk_core_set_rate_nolock+0x8c/0x300 > [ 3.455886] clk_set_rate+0x38/0x14c > > Add the parent_map property for the clock where it's missing and also > un-inline the parent_data as well to keep the matching parent_map and > parent_data together. > > Fixes: 837519775f1d ("clk: qcom: Add display clock controller driver for SM6350") > Cc: > Signed-off-by: Luca Weiss > --- Reviewed-by: Konrad Dybcio Konrad