Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3312602pxp; Mon, 14 Mar 2022 16:18:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlwzH71Dw3is2BELnzlgc248Hr1FqYdUVcrtuFHzwQZ/WoKO7KhPxbGpYBXHXn/I1Qttc8 X-Received: by 2002:a17:903:11c6:b0:151:a247:31eb with SMTP id q6-20020a17090311c600b00151a24731ebmr25965174plh.91.1647299921436; Mon, 14 Mar 2022 16:18:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647299921; cv=none; d=google.com; s=arc-20160816; b=aufik1xwUTAM8OaKIpsteWzA9BSg98+1ld5kAFoUIcFUEXjZpjeHhxmrwv2S0pH9h4 ndLedI4vKfeEP/rLJahs2s8hpqhfGZZ5ZLGmUr33uQkSWboXnDQo/OkIJ5SAfW0RiGXm HttdNyz1VNw07PVUEg89YlNa9eaKHmbX6HaRGdAtD0rRhiEy3nTqfE1o0ey/xrkECK7i x05esvs/+oN5A1F+9b8UVgJ26uzollE4mErl7PsC+2e/BOA0PkIGRWlCDHCL8mBQNEGW MVEJhRfNoAdTXylxwUISLdsrwOSBN1jMASc+VAHr9HS/d/vgmUHtwF7Il41LDOJV9VS8 KZUw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pw8wI3a/Lkt4vdfSG6cUfRtu4F1lSoWQ1d2V7yHBuck=; b=WlWTuGaS0yQBr4Ue44sGm7P3Nx2LaUzPRlzu3qY7axkggET1znDAcYv05ON46ZLgKN evdzlGSX+SF9CvM43R4+ubUI1mw3kNNlHGJHdd71LurAeGX5aVmwIwChInpjkuIg8TFG NQrinCi1EPX2U/SHReekW2RMJAaaGUivYWBdjTGzR9EBvXbmE8qf5fKzVFL+ZvfimOsz CQEnVOBXPAUdjioplWe9IYE9DhYUBznH8idrvacL1eBb7oGjisUQ4Kav4ri86lxDIhHp /zEw4hEdy5a5+FLFZGmCFApJMGq3fV158DQk1cddaDNYmlSlFnytYb6UbB9qDOaCXya9 DEEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NQEjOQl0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c15-20020a170903234f00b00151a8776b5bsi19325214plh.214.2022.03.14.16.18.28; Mon, 14 Mar 2022 16:18:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NQEjOQl0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245546AbiCNMdM (ORCPT + 99 others); Mon, 14 Mar 2022 08:33:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243942AbiCNMVZ (ORCPT ); Mon, 14 Mar 2022 08:21:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A23CB13D1B; Mon, 14 Mar 2022 05:19:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 36D2F60C70; Mon, 14 Mar 2022 12:19:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3AFD1C340E9; Mon, 14 Mar 2022 12:19:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647260346; bh=lzXN0yqho0btcDFNZrpwcXbRMY5b7bhdoQTFdHr3z+U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NQEjOQl0rxcvfWjprHAqoZd5cxN1hSl349hwOXciQjU04W8MV7ZupABFwD3MU0rhF FRN1ZI7ZlJmJHw9H6PwPmJ7Xaq9yShQ4gkn2AXjsMyLZtitOXDjYiq6ac5hnywV6Qa BBlnYOueF1uUg9YkLee74ioWLBey9mu+k98jxVLA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Niklas Cassel , Palmer Dabbelt Subject: [PATCH 5.16 121/121] riscv: dts: k210: fix broken IRQs on hart1 Date: Mon, 14 Mar 2022 12:55:04 +0100 Message-Id: <20220314112747.489207050@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220314112744.120491875@linuxfoundation.org> References: <20220314112744.120491875@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 From: Niklas Cassel commit 74583f1b92cb3bbba1a3741cea237545c56f506c upstream. Commit 67d96729a9e7 ("riscv: Update Canaan Kendryte K210 device tree") incorrectly removed two entries from the PLIC interrupt-controller node's interrupts-extended property. The PLIC driver cannot know the mapping between hart contexts and hart ids, so this information has to be provided by device tree, as specified by the PLIC device tree binding. The PLIC driver uses the interrupts-extended property, and initializes the hart context registers in the exact same order as provided by the interrupts-extended property. In other words, if we don't specify the S-mode interrupts, the PLIC driver will simply initialize the hart0 S-mode hart context with the hart1 M-mode configuration. It is therefore essential to specify the S-mode IRQs even though the system itself will only ever be running in M-mode. Re-add the S-mode interrupts, so that we get working IRQs on hart1 again. Cc: Fixes: 67d96729a9e7 ("riscv: Update Canaan Kendryte K210 device tree") Signed-off-by: Niklas Cassel Signed-off-by: Palmer Dabbelt Signed-off-by: Greg Kroah-Hartman --- arch/riscv/boot/dts/canaan/k210.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/arch/riscv/boot/dts/canaan/k210.dtsi +++ b/arch/riscv/boot/dts/canaan/k210.dtsi @@ -113,7 +113,8 @@ compatible = "canaan,k210-plic", "sifive,plic-1.0.0"; reg = <0xC000000 0x4000000>; interrupt-controller; - interrupts-extended = <&cpu0_intc 11 &cpu1_intc 11>; + interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>, + <&cpu1_intc 11>, <&cpu1_intc 9>; riscv,ndev = <65>; };