Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3520400imw; Thu, 7 Jul 2022 03:14:33 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vS7ym9CsQiB2+3nrbouZJIIXR57MZmvcDoQtb9o7faXOknDTBEmZnYxsMQPWig6P9IPNLv X-Received: by 2002:a17:90b:1c0d:b0:1ed:1133:8713 with SMTP id oc13-20020a17090b1c0d00b001ed11338713mr4264887pjb.124.1657188872966; Thu, 07 Jul 2022 03:14:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657188872; cv=none; d=google.com; s=arc-20160816; b=LcXk8ofhxwhrHbeL1m1347WDgcNe8bjPLvHCWVnClbU25VI6dh+5HiFRfHA8HI7bKc GARmJTKkY/ILU9ciuvRXQ+B7u8JjBVC6AX34k0MSPOKNCNsI22rSK399YcvhC5DJ+xnb m2Qs+yUZZ3iOVaQQUPUbtIh49Qj9/SEsRZPHey/1jduda7yv01ASY6VUPI64Zr5O19oa 2PHvygRiUsrTbXokp3/rocjYtI4Tl0GkjXs4QxrqaxCVemM50lbKShS/2IqEhVcXcmDa nMmkSJp33ff4c3bcVpneedUqjzCgLiBx3Ze92eBX5Iqq+zaZ7t4P6Ng9TZihho5NJ8Zf bUWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Upn2XYNak3z9JQrvfB6FNJocHxECDhh1C9htE9eFJPU=; b=K4yjsj2gCIdGM0uZuiBC1B8ld+q13C2PtBV/f7vweIJJmfZdZxnXBlg5P9TeIruqpI f7W2YepNfOB4h2mrSM15lY4AQ9/9r3sp5HhIfcvSmB7xAdv4nRYiwA2BFzgB2Q4GT61C oQaa5bNHa4w93LJL17mwsNESHc2DLA2JQcpOWXp09/jC3pVZBl4zWtG/Xk8t5qHox1Nw gl5zObIClstd237XC4Ud0Srqq0bMByZc3jFoMBUDJCaPIcsBsJmvltpj7dOIecvXRnYR tJS+swiRjtnEkenqIloGjH+VmcOvMvEBaTypmZmB57fr6lD6j3JWThKQl0BPtxx8eqy/ osBw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u24-20020a63df18000000b00408e1a5cc00si54266030pgg.397.2022.07.07.03.14.15; Thu, 07 Jul 2022 03:14:32 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235171AbiGGKLr (ORCPT + 99 others); Thu, 7 Jul 2022 06:11:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235246AbiGGKLl (ORCPT ); Thu, 7 Jul 2022 06:11:41 -0400 Received: from elvis.franken.de (elvis.franken.de [193.175.24.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D6F0450706; Thu, 7 Jul 2022 03:11:39 -0700 (PDT) Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1o9OTx-0007T4-02; Thu, 07 Jul 2022 12:11:37 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id 74EE3C02B6; Thu, 7 Jul 2022 12:06:30 +0200 (CEST) Date: Thu, 7 Jul 2022 12:06:30 +0200 From: Thomas Bogendoerfer To: Martin Blumenstingl Cc: Marc Zyngier , Sander Vanheule , Aleksander Jan Bajkowski , Hauke Mehrtens , git@birger-koblitz.de, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] MIPS: smp-mt: enable all hardware interrupts on second VPE Message-ID: <20220707100630.GC9894@alpha.franken.de> References: <20220702190705.5319-1-olek2@wp.pl> <3c9a032edd0fb9b9608ad3ca08d6e3cc38f21464.camel@svanheule.net> <87fsjen2kl.wl-maz@kernel.org> <20220706081901.GA10797@alpha.franken.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_NONE,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 On Wed, Jul 06, 2022 at 11:56:47AM +0200, Martin Blumenstingl wrote: > Without this patch all interrupts are fine on VPE 0 and with SMP disabled. I fully understand the problem. But not everybody uses this interrupt setup, so changing generic code will have effects there too. > - why can MIPS CPU interrupt 6 and 7 be enabled unconditionally while > 2-5 cannot be enabled unconditionally? 7 is timer interrupt and is usually wired for 34K cpus and 6 is performance counter hopefully handled as well. And I agree that this still isn't the best approach here > - seeing that there's also a mips_gic_present() check in the opposite > case of what Aleksander's patch modifies: does this indicate that > unmasking CPU interrupt lines for VPE 1 is not handled by the MIPS CPU > interrupt controller driver at all at this point (and if so: do you > have any suggestions how to properly fix this)? I haven't checked how GIC is integrated. Iirc it does something similair to Lantiq's irq controller and hides all CPU internal interrupts behind it. So I see two solutions for your problem. 1. Add "mti,cpu-interrupt-controller" to the DT and wire it up 2. Create your own struct plat_smp_ops using vsmp_smp_ops as a template and overload .boot_secondary Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]