From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 BCF52606A31C for ; Mon, 30 Nov 2026 13:44:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=3TaD5Ngq; 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=IrLOZL3y DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=a104owN33FSJigvdIY9sL5NCO7pvpOJzg+0k4OzKY04=; b=3TaD5NgqyhGiPd bqDnpXDXCGzNTxrVaeFQKKA1LkTu7/5WL/j5wYHhDM/Pi3ezsgV0szFd9SBGi3Gmou12b7Q6CNdTW 4SIYZlVyIUAg8IfHJEllVBDbqwsvmpMm1nJNewDax9jUHMGfxzS1P0aOgZAQciUxpLBjlrVUKFHlQ jPCA2NGNOFVysJZhnidLOrNg5vk+VuRktW75IzYb1L5luLmLw/gDPLc0JwK4YjjJB2+0r9Qa2yTzk oYFpu2esHSbzyBte72nviuS7ruCc5WMI0Rx3V4P7qztG9kU8e9ax33fz062PeuwsXPVrnn2/EXuLU CweupDv/ddb1Ez9CQCKA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xY0W2-00000004V3P-2wLf; Mon, 30 Nov 2026 12:29:54 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xY0Vz-00000004V23-1Kvb for linux-arm-kernel@lists.infradead.org; Mon, 30 Nov 2026 12:29:53 +0000 Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6AUA3icN1431384 for ; Mon, 30 Nov 2026 12:29:50 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-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4j972drhku-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-f72.google.com with SMTP id 98e67ed59e1d1-3b410059690so2070170a91.0 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=lists.infradead.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=IrLOZL3yhyeWgCpCiCYlrDTdjidB8+kJjQyWVwG3EGKWkBzkLNRlauZP+Fia0QJlEt 5uO/Y6n2XRpzDv9fknxJhrafER+nhfESY8u/jpJmG2XPEceLtRzlhVPXxc4+1XgDGZdw AVBHB6/3mKzSox0oE9MRj00OqMmtkAzKO9ZtThFTVCP6KndnY1maHEb2CwIE9RNBMM5g 9gnxi3t9bTumzb1ZQyAe68Olq8ZaGwpsci50XEM+3QE86bcZ+pzMWOJtAmqeBvFiNhNt M5CHFWep+sfc9A7O1fucAStXHzUkXnalLLmiKAB34ppSPZmaGmZs2d4rcyJTPrKzUzsg jg5A== 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=OrVhm5l4e2t+fRXqSTutx6Mi2rROOqRUwtAsAJqGIQarruT0uXSJCT9MOCOtjl3i6R Uf9Qhr/+/xdyEOFV1AbRh3XwJDDgJne4u+wbhVJMBlT8V2VcWjHhicwVr68g/lt49Zh/ yECyCQ5TzUUfLh/sLzMNViGU6A7mO5QzZGHyxdPJsOtTDCY/0UPWYw5dJxhrP0v88SxX Ur7T+8fbZU09+i5WlBp5SMQLImt0n6h2ZOZZZCbsDip0DGDpD8uIZoZkaiwN9ULX7t4d xrMQ1m22xB5DBhMbkd5kvGY9HVOrQokqvAFGq7MC7MrTCRy+3iJAzM9F6D2GobtINFkl yrjg== X-Forwarded-Encrypted: i=1; AL+hErEtpLgdfhEtvpIa8KmMf5XURKLnTcH0DKmNOc4yU48RaREhsfo9chz2WY7MmUENeDPFkPahiefkOrVG4yrG6wxq@lists.infradead.org X-Gm-Message-State: APuU4Z/fcLXoVUrO68dK9M+vI0yKF4+MsEXM7szFHEjmR+z9zY3aI1O2 SZCQWZS3bW7gVcKJSlBgJw1r6972Ia1cHkT8593ySnGvDFwRXlm/PjEuL++7QoXnaMmuifvlO6U jumzvWfhjCQ4w8Vat/Otb3HwBxrWiIlHI3t8nKHE/6ccnBqzXeWYfSLMYsm2rSsCj19TqzJP+w9 p94A== X-Gm-Gg: AZFdTZebPgAfNhOLv7NOAJRzyRMKZz3sh0nKTTi9YWXyWBesjhoRlVimAQ/DDSz7I9A /IvXhsv9j7/c7n+XyIlhULzl0nKteirtyfdXK9KsvDTdbscK/gHhKk69OyIxGaYxOcWllUCdcKP MTPy4bNC43DRyTaTdNH5ka2o8KKYFkCxBeNfIuANduVwMT6NFkJPr5NzcDYeLVeuMZ7Ozo+RpTk k6X3/P935wB9nW5rgUnrN/tUAEF2RDznJaYnByrFf1YHLZMn8VcVfv5UAgumNGw4aEdaueb8kKg dXtgDj4voDgvMpfU8n8Hf7sKsXdWDGwAy19dxo3m7Buax968dJ8MiR6XcUHRERugUGM4eE3QgJQ nK95bIsZRpgR7VuavOKChW0H4k4BO8w86+ZzpTgPXC10d5iHNIo3i/GoE+dmpxVAFi72jP/zPOs 1w4FRW X-Received: by 2002:a17:90b:48c9:b0:3b5:4208:81f5 with SMTP id 98e67ed59e1d1-3b542088567mr15390727a91.3.1796041789837; 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-Archived-By: 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-ORIG-GUID: yjofn4blkDgubB__3YK-VgUwE1A-Y2jB X-Proofpoint-GUID: yjofn4blkDgubB__3YK-VgUwE1A-Y2jB X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTMwMDA0OSBTYWx0ZWRfXxV9Mne7Dbgl5 hcHJAwy3QRym8XQ+98hiMVdfMhPyorm/2ZdunOqDup0cwt1u/y4tfgAF/3zmS7HBJX8diOcJxVM 18St3zdjroMkVXfaSGJ7ywxGdTJi/bM39icdByAi4lwUi8m7r3l7t8l4Vg+Tj70rWD6p5x+xuWY dBDu9HjJjIMjndYLUrucWX/miAhI4+TeF//XLRUiwkIsNoZdCmH+fCiGUOBtOI8FbKRn2w7iRVw 3ZTbDFLhPHo0x0DigiSvSIz0WA9R7ClbuZmyocKewEA9nOBpdchQTMRQ2mGUwi66Yx7+6xwAAvu ftUBoRiNMCi91lscE3Sr62prx4tzgHBWK3mLQ5lViqhpE2eoOw2lzWK1BYp9FGOBA6grqFMLfrm qr4C4Lu3Ut2JOtc0zy28or77dvvasVydUOjXq7t0n9+YSQOe2K6eFxSQahVUqFG3riRIUgMhlEY uvxRNGRkKgXhug6F6wA== X-Proofpoint-Spam-Info: AW1haW4tMjYxMTMwMDA0OSBTYWx0ZWRfX3lmzS6Beiyly /9sAM6Uf3Xv7msE3clmqyq0aNGAFr6sOnVMxdzbNbcshCV2YBznzFLORP8/HIpxLvENzvDalVTM nVEaZwG0NSd+UOkuRSdE3F5Xew/gga0= X-Authority-Analysis: v=2.4 cv=V5joQuni c=1 sm=1 tr=0 ts=6b0d6c3e cx=c_pps a=RP+M6JBNLl+fLTcSJhASfg==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=zJRp6_cAMcgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=EUspDBNiAAAA:8 a=-iMsp4SClMSE_NrrK3kA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=iS9zxrgQBfv6-_F4QbHw:22 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 impostorscore=0 spamscore=0 lowpriorityscore=0 phishscore=0 clxscore=1015 malwarescore=0 bulkscore=0 suspectscore=0 priorityscore=1501 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2611300049 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261130_042951_362329_F482CB9A X-CRM114-Status: GOOD ( 23.53 ) X-Spam-Score: -2.8 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-12.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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