From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89C22C54FCF for ; Wed, 25 Mar 2020 15:04:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6BB4E20409 for ; Wed, 25 Mar 2020 15:04:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727784AbgCYPE4 (ORCPT ); Wed, 25 Mar 2020 11:04:56 -0400 Received: from elvis.franken.de ([193.175.24.41]:34323 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727406AbgCYPEz (ORCPT ); Wed, 25 Mar 2020 11:04:55 -0400 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1jH7aH-0001QL-00; Wed, 25 Mar 2020 16:04:45 +0100 Received: by alpha.franken.de (Postfix, from userid 1000) id 79EECC0BFC; Wed, 25 Mar 2020 16:04:37 +0100 (CET) Date: Wed, 25 Mar 2020 16:04:37 +0100 From: Thomas Bogendoerfer To: Jiaxun Yang Cc: Marc Zyngier , linux-mips@vger.kernel.org, Huacai Chen , Thomas Gleixner , Jason Cooper , Rob Herring , Mark Rutland , Mauro Carvalho Chehab , "David S. Miller" , Greg Kroah-Hartman , Jonathan Cameron , Andy Shevchenko , Allison Randal , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v8 06/11] irqchip: mips-cpu: Convert to simple domain Message-ID: <20200325150437.GA14217@alpha.franken.de> References: <20200325035537.156911-1-jiaxun.yang@flygoat.com> <20200325035537.156911-7-jiaxun.yang@flygoat.com> <20200325123742.GA9911@alpha.franken.de> <5eb9ce9ea665ee32da40779f00fc9b37@kernel.org> <4BB367D3-B8AD-47B6-ACC2-30752137BC1B@flygoat.com> <39CF835E-D1D9-4B52-ABDC-BDB17B650936@flygoat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <39CF835E-D1D9-4B52-ABDC-BDB17B650936@flygoat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 25, 2020 at 10:31:21PM +0800, Jiaxun Yang wrote: > > > 于 2020年3月25日 GMT+08:00 下午10:15:16, Marc Zyngier 写到: > >On 2020-03-25 13:59, Jiaxun Yang wrote: > > > >[...] > > > >>>> So probably we can use legacy domain when MIPS IRQ BASE is in the > >>>> range of legacy IRQ > >>>> and switch to simple domain when it's not in that range? > >>> > >>> No, see below. > >>> > >>>> Here in Loongson systems IRQ 0-15 is occupied by I8259 so I did > >this > >>>> hack. > >>> > >>> Well, if you have to consider which Linux IRQ gets assigned, > >>> then your platform is definitely not ready for non-legacy > >>> irqdomains. Just stick to legacy for now until you have removed > >>> all the code that knows the hwirq mapping. > >> > >> Thanks. > >> > >> So I have to allocate irq_desc here in driver manually? > > > >No, you are probably better off just dropping this patch, as MIPS > >doesn't seem to be ready for a wholesale switch to virtual interrupts. > > It can't work without this patch. > > Legacy domain require IRQ number within 0-15 > however it's already occupied by i8259 or "HTPIC" driver. what's the problem here ? AFAIK there could be more than one legacy domain, at least that's what at least IP22/SNI in MIPS world are doing. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]