From patchwork Wed Oct 25 14:28:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 158131 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp2642243vqx; Wed, 25 Oct 2023 07:29:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEwIXufTo/QPGtOsV4PCBZuVxtfcVN/nT9ZcD2O0F5F6MACi76UmQtIqma3Kzziu7r+gU00 X-Received: by 2002:a05:6830:1d9c:b0:6bc:b8d9:476e with SMTP id y28-20020a0568301d9c00b006bcb8d9476emr17203444oti.16.1698244161151; Wed, 25 Oct 2023 07:29:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698244161; cv=none; d=google.com; s=arc-20160816; b=RilTNhO3t3I9b2j4qoKwhrJBvALhD/schEYCuTb7VZ/3NwU2oiRyn8Do6f4MeoUMcC 9/rdu5cM7tlaxmBW9f9tMYPgTyEsxl2sHTKvsTrzNypRr8mVPU9215GheDOjvvzQNxHZ YEp4r/AMLgVIuEzKpMVFp0U7wKnRFLDXCrjnuIaxY48dDqnjWfO5Al3XKR0KJfF5xs6/ RKjijLTuwGNy6Rm5X2tUvTeho9PwpCDUlX8dTc1Vci/sZN4PalRIgyur7I4bIZUvw1bo RIBArm5PwHJAwZ+BkJsxaDMuxaGHiSnti7y4RP62pFP3WF6H/NwSpGbuS/wIUNFQUctT 9xqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SYhetJOGeGWONv0pBZCT4Mywf3EBvVtv+lOqGOUogJM=; fh=qkZZs+fq4kWnNaZamxh682g1U3Eb94GdM1bHrPc3LjU=; b=yxXnjow6aaHk0O8c//ZteAlGLVYQS0++Bqekgcej/KoDBEGJelBx/TWKODdf/k5SCk wE26y891wottHMi8PVr1hO0ToY1K53aBD3h+jokCHZFzh3e68/KCIm3luOsb7t6iiOTj kyG2M9/KD2MZNP8POiCfAiqnCwSBl4dwCFvaV42aREZjAtXeY/ng+Y3+DcHXBWynKcC5 E51lPMcyMppp0woCEOGcYZIVCg3Ua8oZSW2F5A4O4iQPP3c+XZtsiVs1Tc3pBh5VCVX6 /DAEsVVfgIiHuyqtY8bVKR+M3he579mFqXe7T2R+k/eaygixeENupZA7wP4A96WMK9Sq eNZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=mCzYS6nD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id p83-20020a815b56000000b005a85a91b98fsi11059671ywb.53.2023.10.25.07.29.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 07:29:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=mCzYS6nD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 7493280C3A17; Wed, 25 Oct 2023 07:29:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344932AbjJYO2t (ORCPT + 26 others); Wed, 25 Oct 2023 10:28:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344931AbjJYO2o (ORCPT ); Wed, 25 Oct 2023 10:28:44 -0400 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D1C819D for ; Wed, 25 Oct 2023 07:28:42 -0700 (PDT) Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-6bd96cfb99cso4772858b3a.2 for ; Wed, 25 Oct 2023 07:28:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1698244121; x=1698848921; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SYhetJOGeGWONv0pBZCT4Mywf3EBvVtv+lOqGOUogJM=; b=mCzYS6nDySUvdJr17CiMC67ONyFIfKc1V5K91Ov1W62LK4H8TQYXMePBuad7GtJg8b Zz4XbiMb/+jWfcwqiBFhPNuzIH5F2ycKnO5Tv/xhu1nSCPyZj/nPuOPOvnX4AuNyHAZ0 eJiGEY7Q43B+GIPYD+a4Dqt+4i6bHsGxxVuEFOydjy83bPdJYB30sXDpatFNNduYBO2k 5T+b3v4/kJEHvPLFDB6BbB7SkZNDpxvomge/NhqDA8vjrEdMvZNspz3DWef8XHqRyo7v mA+5B7tJ9fsPUrdVeJj02nAvYPRJfna8ZMv6jChb355PLdMf77ET6Ebg7dqV67dMbcPk jxcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698244121; x=1698848921; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SYhetJOGeGWONv0pBZCT4Mywf3EBvVtv+lOqGOUogJM=; b=T2ockJrsBGlYacOQzoUAZw+Iu3IYsRiVdjImO8tR5obNkQgDd+jBizXQIgGyhk33jy m+pA+ZBcVUEbGTuPwfZ+Ol9JJ2N0U89z1I8lffOlUdM5jSDjDp4+Mccgk6y8FvIukQe/ bmZuTogfhUoCX4rj6qrwl9239J15omn5eqhlMQDo7S4dHw+s1sGGPjImh9CoskMqt0BY S2yJ+MM/VsaQwpvDRZ7iIZpAM7AsAJg/L3FGCbjLRuKHpMAuaFDPunpEddoowXA4IbjL QwAQa7UkLfq9z3LwzINRzKUVeOEHyIniyq7Mriu7YiMm8SJtqk/5m8OTAPJtq5rnr62g fDGw== X-Gm-Message-State: AOJu0Yzf7P9u47D9hLFDP9pK4MMZb+5ufQ3cpqH+mK6gN9v3wWrl+68i WNvwjRNVpSfJ658GETINQZJxag== X-Received: by 2002:a05:6a00:985:b0:68e:417c:ed5c with SMTP id u5-20020a056a00098500b0068e417ced5cmr14915842pfg.32.1698244121321; Wed, 25 Oct 2023 07:28:41 -0700 (PDT) Received: from anup-ubuntu-vm.localdomain ([103.97.165.210]) by smtp.gmail.com with ESMTPSA id g2-20020aa796a2000000b0068ff6d21563sm9817411pfk.148.2023.10.25.07.28.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 07:28:40 -0700 (PDT) From: Anup Patel To: Palmer Dabbelt , Paul Walmsley , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Frank Rowand Cc: Conor Dooley , Marc Zyngier , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , Atish Patra , Andrew Jones , Sunil V L , Saravana Kannan , Anup Patel , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Anup Patel , Atish Patra Subject: [PATCH 1/3] RISC-V: Don't fail in riscv_of_parent_hartid() for disabled HARTs Date: Wed, 25 Oct 2023 19:58:18 +0530 Message-Id: <20231025142820.390238-2-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231025142820.390238-1-apatel@ventanamicro.com> References: <20231025142820.390238-1-apatel@ventanamicro.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 25 Oct 2023 07:29:17 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780738069631776463 X-GMAIL-MSGID: 1780738069631776463 The riscv_of_processor_hartid() used by riscv_of_parent_hartid() fails for HARTs disabled in the DT. This results in the following warning thrown by the RISC-V INTC driver for the E-core on SiFive boards: [ 0.000000] riscv-intc: unable to find hart id for /cpus/cpu@0/interrupt-controller The riscv_of_parent_hartid() is only expected to read the hartid from the DT so we should directly call of_get_cpu_hwid() instead of calling riscv_of_processor_hartid(). Fixes: ad635e723e17 ("riscv: cpu: Add 64bit hartid support on RV64") Signed-off-by: Anup Patel Reviewed-by: Atish Patra --- arch/riscv/kernel/cpu.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/riscv/kernel/cpu.c b/arch/riscv/kernel/cpu.c index c17dacb1141c..157ace8b262c 100644 --- a/arch/riscv/kernel/cpu.c +++ b/arch/riscv/kernel/cpu.c @@ -125,13 +125,14 @@ int __init riscv_early_of_processor_hartid(struct device_node *node, unsigned lo */ int riscv_of_parent_hartid(struct device_node *node, unsigned long *hartid) { - int rc; - for (; node; node = node->parent) { if (of_device_is_compatible(node, "riscv")) { - rc = riscv_of_processor_hartid(node, hartid); - if (!rc) - return 0; + *hartid = (unsigned long)of_get_cpu_hwid(node, 0); + if (*hartid == ~0UL) { + pr_warn("Found CPU without hart ID\n"); + return -ENODEV; + } + return 0; } } From patchwork Wed Oct 25 14:28:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 158132 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp2642254vqx; Wed, 25 Oct 2023 07:29:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEbHWACBZeRVAIXkmJxrhZ7usBvqPFOlzdJZhr784v4EgkcSgulptAjGl6fM2gOJww4MMeC X-Received: by 2002:a0d:ccd3:0:b0:5a8:7cb2:15d0 with SMTP id o202-20020a0dccd3000000b005a87cb215d0mr15863400ywd.11.1698244162241; Wed, 25 Oct 2023 07:29:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698244162; cv=none; d=google.com; s=arc-20160816; b=QOOz8px4wYX+XCoAwH1maMFJKUbJb9N1lLIpvxFoEPQdHSSuZXln22s6Olm7HZyWqF +CeSIoCYlKwHHkG7rURjkHgMkut0AHp1Tpt6fyfXmSXTOXeN1K8xs33faVI3O0kzjDpa kyI2R1mABxx8TmDrnYDPO8i85s87RhYtF5TxkHViRRn0S+wgWcE+avkPLlsdNbdfAdTG +q5qjgaVb3YKa/qXFj/7eQ/QydeKkpePQBZbr2Hc0i6adYK+7IE2BlPkONnX75Te8T1H oqt4ZntbvydCUchuOR5WC5SdaZLKSqYqa4LFhNLDPW2KRWYhEr8NFuGd2X4ZxI6TVW7W JTZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7KBK3NZC+n7aQ9gEOFAwoNpYjPv+cjuqYwdG+XSaoH8=; fh=XUSdTfqn8Y6vOAWeOIKpr9SYWmvv3aWcNBx6J0LE9AE=; b=nkPqiXLlC+voWBzeqYmJeEgEDm+MFmZQr/TH7a/s2frv0gsYe7aWsmnk8LVEUe1zjv 94g0CxXG/sFhUyn9dnDO8EVyNesI2DBY7cPShLevvXKdMYuTHgP/qGo9f2ta++0CpJ5x zPb+NyLuGJIYWPUv7O6FKPJE4+YYfU9RYCcPRBxdywl6bBWswmjibc2UW3wRrgSeMz+t f4QrfBDZCNP0NqsikjH5uPtwP1lRxyUm3sQZRceHiI7p301MR7nnA7eMNsUDwAOgT+jE 4tzyi2VGZdbtdOhaKBuL9i4sllbXbfHH8CKzNzb0UpN0SckmANC7Qx+aui2naGoH7P39 CRZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=BavMbCpp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id n4-20020a0de404000000b005a7a9083005si10932137ywe.244.2023.10.25.07.29.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 07:29:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=BavMbCpp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 173688145961; Wed, 25 Oct 2023 07:29:20 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344931AbjJYO3M (ORCPT + 26 others); Wed, 25 Oct 2023 10:29:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344943AbjJYO2u (ORCPT ); Wed, 25 Oct 2023 10:28:50 -0400 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F51A99 for ; Wed, 25 Oct 2023 07:28:48 -0700 (PDT) Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-6be0277c05bso4686986b3a.0 for ; Wed, 25 Oct 2023 07:28:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1698244128; x=1698848928; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7KBK3NZC+n7aQ9gEOFAwoNpYjPv+cjuqYwdG+XSaoH8=; b=BavMbCpphcFIUwz1RVi2TDeIwmJeuAt3HhJZH3vBAq877YqpibcGcwpWFsGDJBQQGI gp3odMjce4EgaoPYz4DWfexUHOewu9FWRSHHFAMJeinPl/L55LCFRK8oY47fmeIBpPGN bCFdWVaSnE4pldMYk0H1DlZB7s1aBApXdAHC6vYcL5Ww5dP+FiNl2IdwJVsOmekDkpOO lXszh6cM//cRWcTI5olxcQCKqS6UWAd+LVNi23ys8DVrOL5Hfz+kBSL1DJPOUVY1JsFO g9ap90ecc3J9Z5lOe4US5CiNgdyki/Z1sQ6k8bSpvtVu2+EzND/SJXXcPR9bdZeq/8me D+Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698244128; x=1698848928; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7KBK3NZC+n7aQ9gEOFAwoNpYjPv+cjuqYwdG+XSaoH8=; b=e+BJrFAVjxefQz6ZEIKHMPaCAOLxmZzhEscTJY+Ckvn6ZN1L36FUTczYHAUz+7ec7K 7NaWA4ujLKktWGQ7ROC9Gwv2QkDfZlcPEq5tS45RdQkl2paSykS+IinE8YrxyHlZCMmx dQY6ee4QQgvXB9RsNfGV329FMXnrtqn+heNBNmFvwGrxYd27Zasd2Zx6jxbwF/JwlxeY GrbkqkO3VziQM6PMTbeNNluW1k0ae1F9gYmRbhl4nfJGAWk4kQzvmAH1L2hIZRRp0fj6 lt34RqczftYjS1mvrmnpz6g9PMC2pT9rPaKZLAYCs6jPyx4mJu4eImsJ3N90FnJ0AtjA vmvQ== X-Gm-Message-State: AOJu0YxIHhjLImLykWBEhZVKL2KrjEsjTZqBG0HWHJrEBR9hUJLB30zn 9xz1TLRREW0DiIgecT7YAUUpSw== X-Received: by 2002:a05:6a00:2308:b0:6be:367a:2a71 with SMTP id h8-20020a056a00230800b006be367a2a71mr15594745pfh.16.1698244127853; Wed, 25 Oct 2023 07:28:47 -0700 (PDT) Received: from anup-ubuntu-vm.localdomain ([103.97.165.210]) by smtp.gmail.com with ESMTPSA id g2-20020aa796a2000000b0068ff6d21563sm9817411pfk.148.2023.10.25.07.28.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 07:28:47 -0700 (PDT) From: Anup Patel To: Palmer Dabbelt , Paul Walmsley , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Frank Rowand Cc: Conor Dooley , Marc Zyngier , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , Atish Patra , Andrew Jones , Sunil V L , Saravana Kannan , Anup Patel , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Anup Patel , Rob Herring Subject: [PATCH 2/3] of: property: Add fw_devlink support for msi-parent Date: Wed, 25 Oct 2023 19:58:19 +0530 Message-Id: <20231025142820.390238-3-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231025142820.390238-1-apatel@ventanamicro.com> References: <20231025142820.390238-1-apatel@ventanamicro.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 25 Oct 2023 07:29:20 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780738070714196504 X-GMAIL-MSGID: 1780738070714196504 This allows fw_devlink to create device links between consumers of a MSI and the supplier of the MSI. Signed-off-by: Anup Patel Acked-by: Rob Herring Reviewed-by: Saravana Kannan --- drivers/of/property.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/of/property.c b/drivers/of/property.c index cf8dacf3e3b8..afdaefbd03f6 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -1267,6 +1267,7 @@ DEFINE_SIMPLE_PROP(resets, "resets", "#reset-cells") DEFINE_SIMPLE_PROP(leds, "leds", NULL) DEFINE_SIMPLE_PROP(backlight, "backlight", NULL) DEFINE_SIMPLE_PROP(panel, "panel", NULL) +DEFINE_SIMPLE_PROP(msi_parent, "msi-parent", "#msi-cells") DEFINE_SUFFIX_PROP(regulators, "-supply", NULL) DEFINE_SUFFIX_PROP(gpio, "-gpio", "#gpio-cells") @@ -1356,6 +1357,7 @@ static const struct supplier_bindings of_supplier_bindings[] = { { .parse_prop = parse_leds, }, { .parse_prop = parse_backlight, }, { .parse_prop = parse_panel, }, + { .parse_prop = parse_msi_parent, }, { .parse_prop = parse_gpio_compat, }, { .parse_prop = parse_interrupts, }, { .parse_prop = parse_regulators, }, From patchwork Wed Oct 25 14:28:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 158137 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:dd58:0:b0:402:e146:ef86 with SMTP id s24csp2685902vqs; Wed, 25 Oct 2023 07:40:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEYu9mv6kVF7JS9h3SfSJumk6jgwtiwdciMFP66Of6Pq/WGoZA5wxTQ9vFEL02Ee9AqDKey X-Received: by 2002:a05:6902:1083:b0:d8b:1407:f61d with SMTP id v3-20020a056902108300b00d8b1407f61dmr17917928ybu.26.1698244802359; Wed, 25 Oct 2023 07:40:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698244802; cv=none; d=google.com; s=arc-20160816; b=S3eGicAonSgyuWxhq2fgCkchyQemlQgScg8s2oOFcrWCYZJ8KGsyz59pAZ5Of9mLOW MhQiZZLKI6ELLnAC6gNCJwfpZQeQnx95e/7WEE2nuH5R/1+N4wwvO3bHQIoDnlOUFhaj 3riop0OIx0nr8XgQ6W/1FyU5pw2oDFIioONTBXYwImk/1EQKQt7mfs/K6v7whV7NrKHs xFW/JxtcFc8WH1LNLXeRF92lYPgz3xz7KW8Hv0LieiuUwytg5l2wZjT7XF5ek/Wp1JJ2 bYHMA6qv+sMScb0x4RjPJ2ncbf65F3evYq+f6IRxRe8Tgt7DykDGQTUBiswXjK/jr10e a7BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VOj9ECaB96rIjjnLWcT6tpDdCA0D2GI5mFoVxJymrv0=; fh=ZDsBf11hDoA28/AylO427SzXIFHeM0sXYh63RJOeiJw=; b=1F5JRRmoY2h1ynB482W4SPxP5I34C7AZV1AxOnDbhMxpXbSL6fZ4i5D1+QqzcLdwaL qb8fZ79NiTlJ2IT2YLrmS9ECDNdAfiq02SFykO//VSmMxNsCUBeaynxtR5u+S2zNzJVe T53O/JZlKNTAB9NWAZXyHGw6KHTSH7Gmjox+hFoNT7/heWJaTJuDHWo1DCSeb2zDykoT n52SdDFAHeSfT4d9rg7BNX83yJfTJCCcZMGxbkrvCEespQUX0WTFfBcAYNHtAHz5Y2Za BmUq/1IiGbq4mZqlt7odGtqFtf3HR3WwaMMmoD8RR+wX13l1s21Sn5XcB27DgrxzhScL 8x0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=IbFrlO1q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id cj22-20020a056902189600b00d9a3d01fb16si14168465ybb.68.2023.10.25.07.40.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 07:40:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=IbFrlO1q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id AB393810671C; Wed, 25 Oct 2023 07:39:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343756AbjJYOjy (ORCPT + 26 others); Wed, 25 Oct 2023 10:39:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345034AbjJYO26 (ORCPT ); Wed, 25 Oct 2023 10:28:58 -0400 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD5691BB for ; Wed, 25 Oct 2023 07:28:54 -0700 (PDT) Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-6b5cac99cfdso4905615b3a.2 for ; Wed, 25 Oct 2023 07:28:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1698244134; x=1698848934; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VOj9ECaB96rIjjnLWcT6tpDdCA0D2GI5mFoVxJymrv0=; b=IbFrlO1q1IRLg9KJdY4YdwXCNPZ6p9LFwh5ho84gZfYYXJVhcQK98W4YAvYYT98A4N L77j2bBCG6id+d8xwPOeRpU2JLRF8y469rV16O1SC5j9V8shgLg3TygD6BRHxUvO30p0 jVlCKGDyIH8LLZrPfwKB4ox9B/hHHCH2xV3VgmtGiM4q/Tv6MKlmn919QTG0EY3Cufrq FwXoqge0GuOiUFihcWSeEb440nfIbvNEEsAfjPMqQRyjxf9O6HNVdPDP3Vcd+Fue+tI/ jljLRYsJswYcG1IZjqW7w0xkbUhNyQYvqWOhOt724YIeTLy5uoepN8o429wAB1gDm24Z X8nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698244134; x=1698848934; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VOj9ECaB96rIjjnLWcT6tpDdCA0D2GI5mFoVxJymrv0=; b=JHnrQLxMsOCeZssG277/4UqGj8lVoM5paVUTcoT3GRRh6Q6OSe+T5hdJH0WpOvrZfM u8Lix2jA+cWq3IpUynOxJZxPZkva4U+mZLAxR5tbr45H0eQMt9GGzBxj5CXOjLDddFV5 DwSfM/QzgoBESnojecy7dGuGPXQtvNEjt4vh7//BWOWI0Sbe2dgFoWWCRlaJbRpxuFUp U3EiSe8XdzdT/0oU5cz0X1WlK3F/hEf/KJGSqq+PUbXwd5dhvlbtQALxCSH/kgR5Mfwo xMRFEOX2zCYGB392Kk+Jr7LFgC5uvk3m3MROzLGjmUOgESlzpF2UoJDwCc12iwsWYv7L bcNQ== X-Gm-Message-State: AOJu0Yyl5O1a36UQSE2YjRsJKO3mFYI3vqf2gjmvDjiKiPJyu6rfj3kj veSW8bnJj7Ckl9cC6CqkbMcJiQ== X-Received: by 2002:a05:6a00:990:b0:690:c887:8cd8 with SMTP id u16-20020a056a00099000b00690c8878cd8mr14948358pfg.32.1698244133835; Wed, 25 Oct 2023 07:28:53 -0700 (PDT) Received: from anup-ubuntu-vm.localdomain ([103.97.165.210]) by smtp.gmail.com with ESMTPSA id g2-20020aa796a2000000b0068ff6d21563sm9817411pfk.148.2023.10.25.07.28.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 07:28:53 -0700 (PDT) From: Anup Patel To: Palmer Dabbelt , Paul Walmsley , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Frank Rowand Cc: Conor Dooley , Marc Zyngier , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , Atish Patra , Andrew Jones , Sunil V L , Saravana Kannan , Anup Patel , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Anup Patel Subject: [PATCH 3/3] irqchip/sifive-plic: Fix syscore registration for multi-socket systems Date: Wed, 25 Oct 2023 19:58:20 +0530 Message-Id: <20231025142820.390238-4-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231025142820.390238-1-apatel@ventanamicro.com> References: <20231025142820.390238-1-apatel@ventanamicro.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 25 Oct 2023 07:39:58 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780738742043339475 X-GMAIL-MSGID: 1780738742043339475 On multi-socket systems, we will have a separate PLIC in each socket so we should register syscore operation only once for multi-socket systems. Fixes: e80f0b6a2cf3 ("irqchip/irq-sifive-plic: Add syscore callbacks for hibernation") Signed-off-by: Anup Patel --- drivers/irqchip/irq-sifive-plic.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/irqchip/irq-sifive-plic.c b/drivers/irqchip/irq-sifive-plic.c index e1484905b7bd..5b7bc4fd9517 100644 --- a/drivers/irqchip/irq-sifive-plic.c +++ b/drivers/irqchip/irq-sifive-plic.c @@ -532,17 +532,18 @@ static int __init __plic_init(struct device_node *node, } /* - * We can have multiple PLIC instances so setup cpuhp state only - * when context handler for current/boot CPU is present. + * We can have multiple PLIC instances so setup cpuhp state + * and register syscore operations only when context handler + * for current/boot CPU is present. */ handler = this_cpu_ptr(&plic_handlers); if (handler->present && !plic_cpuhp_setup_done) { cpuhp_setup_state(CPUHP_AP_IRQ_SIFIVE_PLIC_STARTING, "irqchip/sifive/plic:starting", plic_starting_cpu, plic_dying_cpu); + register_syscore_ops(&plic_irq_syscore_ops); plic_cpuhp_setup_done = true; } - register_syscore_ops(&plic_irq_syscore_ops); pr_info("%pOFP: mapped %d interrupts with %d handlers for" " %d contexts.\n", node, nr_irqs, nr_handlers, nr_contexts);