From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.168.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796041792; b=IIgLprfHpbxxS6MvpYJ5A2jjWlwQGf5oMImnDb0JmKEd5zcJ/hWNVY1mxbjcrhi9xSQ3 eV4xgb/JASwAYRimnHHqVxRA+SW8cEcjm3QselPi7rW6CP6nVx6Nuk57kQSpy3CcE9k3f E8z0PsyccnANzcW2S5VpKNw29iMab7XmUz4Jz77WdzOW8uwolva6e4WKML8k20vYfee6p ppSUQeyAbmV7PELtR9Qeu1co3PzVXk6WuIrYVN471aYtOb90pLnNBT6b8rC3tAe3LmYb5 2pHgeMGGiPGk+8peS/trrh8HcB/zJvQ2o2ITzEz3YKzeus5Wzg+CyM5WagjQfQQO8Fw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796041792; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:X-Received:Received:Message-ID: Date:MIME-Version:User-Agent:Subject:To:Cc:References: Content-Language:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:X-Proofpoint-Spam-Info:X-Authority-Analysis: X-Proofpoint-ORIG-GUID:X-Proofpoint-GUID: X-Proofpoint-Spam-Details-Enc:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=a104owN33FSJigvdIY9sL5NCO7pvpOJzg+0k4OzKY04=; b=VlsCKoOst6RHKwomgxCmkihdTijI7wxuAFSRxjfcUKSzqjbXFKYfaLB0ZL4ND2EXwsgg YN7QgTH97WTNwnY6YUEpnYJqTkJbrRjF2P0/3YtZmJF+Z2y1P8e3PjAw57e50hlISlBbi PnrUHFEbir26fPSvAxcucrcuWYBhqngD971/j+Add/VblmQt6uUzXlBVaowS4jmE38gnM ZTpkUbZwFxAoLBuCw6Bt2jmhbIYdWmMeE9fzp3wyizmfz+tU+MMXiRPKMrCgnVWzsQ0EY MQbAx2wUhmllSOjJDbQLDAZiCmBhTsOhAwdTCMVSz4x3TkpmOEzYSxBmt7JdmvyKhLw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=iEVIc+N6; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=OTcirGW6; arc=none smtp.remote-ip=205.220.168.131 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C2CC606A68F for ; Mon, 30 Nov 2026 12:29:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9C2CC606A68F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none 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.a=rsa-sha256 header.s=qcppdkim1 header.b=iEVIc+N6; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=OTcirGW6 Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6AU9UsSY1721303 for ; Mon, 30 Nov 2026 12:29:51 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= a104owN33FSJigvdIY9sL5NCO7pvpOJzg+0k4OzKY04=; b=iEVIc+N6hPG4GjvB CR7grvdtSHje1JzptDFNPdPCOipo9oD5MXf5u5xFXyxzS8rBayAUFOwE4RT8t50F Y3quGShRODPPn6GebIpIovoSAxz6v4mEEvyGKZr8yQYlmAl9TarXl4U5t/MHD3VZ i3OW1d424f41dFzmhFDvJ4uzupOavt2jUd6vYoG0h4Dy81m3esaX1RqERLoOriNg J6QMzU/oFLA+xGUROTHxF1mKBWlJa+ulwh+qn6rg/L/5jv0Yd0py100kzr8X0ihP pRRPxb2RqnT2Zc0u4ABu7EtQXWGfwV54GUiMwgkPc+zTb/bkxdZp/QMPJQnFH6E8 ++TGtQ== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4j94wfs5tb-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 30 Nov 2026 12:29:50 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-3b4255fe98dso2281460a91.3 for ; Mon, 30 Nov 2026 04:29:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796041790; x=1796646590; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=a104owN33FSJigvdIY9sL5NCO7pvpOJzg+0k4OzKY04=; b=OTcirGW6ilfs37aJGrhluvB6fGShlZJIB1lXhOwG2gWpPBsUcOIAQqvOAbRZli7RZx qSPQKxRGtctwgXth3XpQrAgkxFj/BVHXMoxUaenGA1hsp2aM5BZ/Y+apJxVaKn/KMyxQ n4dbTGBTIYjv/yX8hIC7k1pUWh0mwZYqAmrjPdBWa75C0G60BCytDHao3FPpT6arxwC+ UTQ9phIZwiP5lnfCKj8J8PvodiZqVf/4+kT848DvYSmjFRNCZod7ffb1Q9ECsCwbA3ZO OpJA1yyYBAYIqDe/X3tVyDwOojUkryzYtw6mQN5dpzKji+6UDkFX4E7wB+c9Sw1Tk7Iv ZQiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796041790; x=1796646590; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=a104owN33FSJigvdIY9sL5NCO7pvpOJzg+0k4OzKY04=; b=0L/MLDJWpercV+TFQ7codIUdgvzCn6xbqpCWHVr8yuSA4UjaVxjs/2jJQFPlWGWqsw bBh/IjjWKMZ5wgYKQr4+bRuUS3tHrJS/TFMSYJEE2SsF7XmR0xgnxXV7KergsRgaolRK od0p88JR5W31izy3lAmsO/qV/nU26j0h6XijU9LOE6miAXLTxzvo0V2zaPyNJfBN5JkY BKMOEDHBnkVqfZLdEZUXCSPC7Efl3Qr7zFEEg69PYzybwHPSAjV8HOIsi8iqURqNXiZs OynhSxuSrQHV/r7+iAxJOBrSya6x2galAW9GvWapXUusz9Phr+qwSzxX0nVuZG/nA1d2 SXhA== X-Forwarded-Encrypted: i=1; AL+hErGKDuZTm26FUYVreLyCrJVocVwupKMyY9k1DyF3+/+QqWT+qTZRuJH4VvWUeI/8EoJP1OhLt+SBNxpHWbs=@vger.kernel.org X-Gm-Message-State: APuU4Z9sDzPPr5Di1I7WPHTOEcM+E0GpPOgmLNwZ3JATEU+2KufhcGRX 78Zdu0v3AOzMLtkC5DUE3aqiCz/nsALtgnkQkdoLlw6jpX8MttNjCSSxyfCxC5lJ1SZyOJD3ZTN rrVB4kOjCC0bNhnet4FX5dr+tnO7WQ2Rud486dOwFTCst+/7Hqo+SxAfvDhwhLmgE8rs= X-Gm-Gg: AZFdTZdbi9em+3o1rb4TEJ1ywvX1DDddwZHh/hA3SC3ju1QL7r9LO0aE+85WivuMa3a OLFAPHz4CReLAlBl0cjp8lxMvjEm0AKq/nEdSPmBy/Q5utY1yQXSWDgNCg5pvXNJ1NMlhIGxpb5 ktl3Iz0PYra5dDGa2B1mncEN0JAL/oSmP6JKJ/Pt7sPMntlnanPHF8oY2OZwrj5XX/nmsCw9OIv EqCo9SKEqoHbRrKqsZ2DL+g660Y5gxtG8EoPW7gR0PrSs5i52rk3PVPxPHKFJpoT5Bz3M/QLtwa VkcmfgHvP0aVv9QtgoGQOi7WxYKJnNSgpinIbKTFDMBadBQ1e/UurIXataFYCXcJoAQ1yypdSxd yAxkMPYoIA2ciwu2AfNclO1ZKNTCtr9gPKaEDphzcNYauP6ghiADKPv3m53iIF9Qmjb/StIFmvt 6Eci9G X-Received: by 2002:a17:90b:48c9:b0:3b5:4208:81f5 with SMTP id 98e67ed59e1d1-3b542088567mr15390725a91.3.1796041789833; Mon, 30 Nov 2026 04:29:49 -0800 (PST) X-Received: by 2002:a17:90b:48c9:b0:3b5:4208:81f5 with SMTP id 98e67ed59e1d1-3b542088567mr15390688a91.3.1796041789350; Mon, 30 Nov 2026 04:29:49 -0800 (PST) Received: from [10.217.216.194] ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b41ad92c07sm53237682a91.13.2026.11.30.04.29.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Nov 2026 04:29:48 -0800 (PST) Message-ID: <1fd73960-577d-4a79-9666-05175997237e@oss.qualcomm.com> Date: Mon, 30 Nov 2026 17:59:40 +0530 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 2/5] arm64: ras: Add Device Tree frontend To: Rob Herring Cc: Krzysztof Kozlowski , Conor Dooley , Ruidong Tian , Tony Luck , Borislav Petkov , Bjorn Andersson , Konrad Dybcio , Abel Vesa , Richard Cochran , Catalin Marinas , Will Deacon , Lorenzo Pieralisi , "Rafael J. Wysocki" , Len Brown , Robin Murphy , Peter Zijlstra , James Morse , Sudeep Holla , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-edac@vger.kernel.org, Avaneesh Dwivedi References: <20261118-aest-devicetree-support-v4-0-936587251e8f@oss.qualcomm.com> <20261118-aest-devicetree-support-v4-2-936587251e8f@oss.qualcomm.com> <20261118192543.GA261024-robh@kernel.org> Content-Language: en-US From: Umang Chheda In-Reply-To: <20261118192543.GA261024-robh@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Info: AW1haW4tMjYxMTMwMDA0OSBTYWx0ZWRfX1Tfir/8FPyLp J9E1NBjW2vvAVCsrIpRDQ3OQBgpl3Ye8nUpmqHEtm/nJ6gahpPTH2tBT8mx6KimlD8a1HBu6VJF N6B5ETjT3/33lZ33CJbn+F4WpnM12fw= X-Authority-Analysis: v=2.4 cv=BZ1NQbt2 c=1 sm=1 tr=0 ts=6b0d6c3e cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=zJRp6_cAMcgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=EUspDBNiAAAA:8 a=-iMsp4SClMSE_NrrK3kA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=rl5im9kqc5Lf4LNbBjHf:22 X-Proofpoint-ORIG-GUID: dqXEaUcycPpYP7Hv8y3qfiuKEu_BiVfy X-Proofpoint-GUID: dqXEaUcycPpYP7Hv8y3qfiuKEu_BiVfy X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTMwMDA0OSBTYWx0ZWRfX537tOLLl++oG 7t9WJmC21eTLrZ8wvwF59DF2GJ78KJY9TfagSqRnRteAwHhCN53nPIzyOBSHhbxazp/YBsqxibt S4t67Vs5QztoLzgRRWAAPp19Ul1DmuB/nTMiaQjeqhX3N8+BKyL/dyzrrx55SgfrSK7OtQ4pABG S7OzmpXZbE+DjV9D8zHmanuvNdYBGIIlP5MMRC4z5FeavPbMHC9hf1srcGscw2Cst77XvcXYu5L Mt0JMXnCPJpIMJ7b1ZzEGW6WR6SUsMDAF2sdtYY0/EMs2HHiuGImSoGu2Gh/eXNje/LevoxlKVD zJRYxCSyWA+cCMA3827/VlO7RUNgt7V42qSIm5r87CJbJLPs1/jb09hmtdDyGYmW6NhcUG7yahc D0HS6FeNIcizZPzTMwZecPKfqSFwNaOgHlPiXAaj5kJzUKTEhjc5TZPtF5pu0dtlG4/Jc03wYc8 n40nyZsyu7LhvvWMTOA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-11-30_03,2026-11-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 priorityscore=1501 suspectscore=0 phishscore=0 bulkscore=0 malwarescore=0 impostorscore=0 clxscore=1015 spamscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2611300049 Hello Rob, On 11/19/2026 12:55 AM, Rob Herring wrote: > On Wed, Nov 18, 2026 at 12:48:21AM +0530, Umang Chheda wrote: >> Add a Device Tree frontend for the ARM64 RAS driver, allowing it >> to be used on platforms without ACPI firmware. >> >> The error sources defined in DT are registered as arm64_ras platform >> devices at boot. The frontend produces the same software fwnode properties >> as the ACPI path, so the core driver probes DT and ACPI nodes identically >> without any firmware-specific knowledge. >> >> Signed-off-by: Umang Chheda > > [...] > >> + ret = platform_device_add(pdev); >> + if (ret) >> + goto err_put; >> + >> + pr_debug("registered RAS node %pOF as arm64_ras.%d\n", np, pdev->id); >> + return 0; >> + >> +err_put: >> + platform_device_put(pdev); >> + return ret; >> +} >> + >> +static int __init ras_of_init(void) >> +{ >> + const struct of_device_id *match; >> + struct device_node *np; >> + int index = 0, ret; >> + >> + if (!acpi_disabled) >> + return 0; >> + >> + for_each_matching_node_and_match(np, ras_of_match, &match) { >> + u8 node_type = *(const unsigned long *)match->data; >> + >> + ret = ras_of_init_one_node(np, node_type, index++); > > Why are you rolling your own platform device creation? The DT > infrastructure will create devices for you. And likely you are getting 2 > devices for every node because you are not setting flags on the nodes to > prevent that. But setting the flag is not the right thing. Moving all > this code to driver probe is the right thing. That probably means some > refactoring have a common probe function that the DT and ACPI probe > functions can call (assuming there can't just be one common probe). Thanks for the review. The intent was to reuse the existing ACPI flow, but I agree this is not the right DT approach. I'll rework this to use normal DT device population and refactor the common initialization logic so it can be shared between the ACPI and DT paths.   > > Rob Thanks, Umang