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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 3BAB0ECE560 for ; Mon, 17 Sep 2018 13:27:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EC56A2098A for ; Mon, 17 Sep 2018 13:27:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EC56A2098A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728442AbeIQSyw (ORCPT ); Mon, 17 Sep 2018 14:54:52 -0400 Received: from foss.arm.com ([217.140.101.70]:58992 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727746AbeIQSyw (ORCPT ); Mon, 17 Sep 2018 14:54:52 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5A8707A9; Mon, 17 Sep 2018 06:27:32 -0700 (PDT) Received: from big-swifty.misterjones.org (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0BBFD3F557; Mon, 17 Sep 2018 06:27:32 -0700 (PDT) Date: Mon, 17 Sep 2018 14:27:31 +0100 Message-ID: <86tvmoz22k.wl-marc.zyngier@arm.com> From: Marc Zyngier To: Guo Ren Cc: , , , , , Subject: Re: [PATCH V5 1/3] irqchip: add C-SKY irqchip drivers In-Reply-To: <20180917020928.GA22452@guoren-Inspiron-7460> References: <86in35mfas.wl-marc.zyngier@arm.com> <20180917020928.GA22452@guoren-Inspiron-7460> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/25.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: ARM Ltd MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 17 Sep 2018 03:09:29 +0100, Guo Ren wrote: [...] > > > + > > > + irq_set_default_host(root_domain); > > > > Please drop this. There is no reason to use this on any modern, DT > > based architecture. > Please let me keep this and in my arch/csky/kernel/smp.c: > > void __init setup_smp_ipi(void) > { > ... > irq_create_mapping(NULL, IPI_IRQ); This looks quite wrong. Reading the code at https://lkml.org/lkml/2018/9/12/674, it really looks like you're assuming that IPI_IRQ will be mapped to a Linux IRQ with the same number. Nothing could be farther from the truth. The Linux IRQ is returned as the result of irq_create_mapping, which you're ignoring. You'd be better off creating this mapping from the irqchip code, and expose the resulting Linux IRQ to oyu SMP code by any mean of your choice (such as moving the send_ipi_message into the irqchip code as well). > > I need irq_set_default_host to pass the domain and this api is used by > a lot of drivers: > > $ grep irq_set_default_host drivers/irqchip -r | wc -l > 16 These are all legacy calls, and predates DT conversion. In a number of cases, these calls could be removed. > In future we could find a better solution. I respectfully disagree. There is strictly no reason to merge a new architecture relying on deprecated features, specially as the code appears to be buggy. Now is the right time to fix it. Thanks, M. -- Jazz is not dead, it just smell funny.