Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3983463imm; Mon, 17 Sep 2018 06:28:05 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZCitYAERVvkzaqDxcg474rx91j5ubEOOdVrFa9O2ndkKNjFEBB7k5FvoGh+nqU9fD8bMQY X-Received: by 2002:a17:902:8a97:: with SMTP id p23-v6mr24636293plo.21.1537190885878; Mon, 17 Sep 2018 06:28:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537190885; cv=none; d=google.com; s=arc-20160816; b=XFdJx6Mt/Bbxu7rWTQYvsmJsGWWtk11Ps5ELqAXl2wX4Ol180Ts5fwUAC3F7a8ZhrG JnlqgScVZ/cbIbQ/lrrpoMoPFloqmo4ZPUEzEglpEtNTu222//+zclipaqKkbZCWFdQM kb5zIxocYtmSIlSOemplslasc/jYG4daTPNPGpQkWQkxSyj75p1hJXagMvgKTJ6eTljY hHGXcCfO+hE+A18DQob/wEmz5zRoj3HDBXE9oAOqvCJ0DghsDk+/uRZCWQy1opODD7De yQWO2h9y+ZwPTAgOswqeeFqbUfqTX7+YfiQq4qcBUzy3tP2qniRTFGZBzShQ7YrnEfs2 JItw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:organization:user-agent :references:in-reply-to:subject:cc:to:from:message-id:date; bh=ae7GaktFilHFB44TweQmho1cJJ+DD1hAEKlSuiPnbz4=; b=TBbRTUtDC2Ptk353bmwf4m7K6mIj5DmO4sIBMLAjCZT/O6dUnpNU6sCcpC13q6cl4a +AGyV6+nn8+nB0DXvRgPWCy866nsomWb7ufLxCqchgRYmb3IG3HRsSMvgFdnuK5f0esO O8PXUke5yFkkxYVLZXHw8+Eu1+2PZd5s+oy5zRwlVH9wOv5wIOt2Fcmh4PrfWpJUq8kD YUoBAEVDefnmHhyVgx29jK+QIlGN1aXjRoOHuRzythN6vp7KM1yoXyNXUqRLOs35Drvd B4gRuF6zL87kOqoans3cptN5XD//VxPm/jI0KO0XjdROkZEOsGSZ6B95kGzAA7SPe2GE qIEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k6-v6si14241147pgb.446.2018.09.17.06.27.50; Mon, 17 Sep 2018 06:28:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728431AbeIQSyw (ORCPT + 99 others); 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.