Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp515095ybl; Fri, 31 Jan 2020 03:09:06 -0800 (PST) X-Google-Smtp-Source: APXvYqwmKYhD2FCMC9ueWxXVfdN9R0AbbDC6LkEldejeSTvvTWrhjvqB3aUmZWCzhemvpZsLEZFi X-Received: by 2002:a05:6830:18ec:: with SMTP id d12mr1142663otf.152.1580468946768; Fri, 31 Jan 2020 03:09:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580468946; cv=none; d=google.com; s=arc-20160816; b=m/RKBh3fMc/vWhpeVfMjPC4nWrkwuV/vtWG0aV6N36dd2dah5OdxiLSlBqyfLzR5wY b3N+wl2B0DRR1B+uWSm8JFm7xM1xxBXwrES+S2InFEKVwWsPAqwO9i2vmwAjo5zg2ZIH 3vfTVbzM8YPN+cEu8pKLaPd3x5FaTdPaDG+L3AUP6jIyw3EzkAQ2kYb62jeBttR4CVmL fKyu3dQYJkySqf982eG3fYMO9HkV2KrtNV1Be062+X1n3vLUB+kT60LyZliuXaodAB1W BtutvBbkn/8Z9eioeuJHvwu6Di6kt9l2YRiRoUKpe01Xnwpd6HXre5qVjJiDlf9I60en OuHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=woYCCYhW+qhCNI3VmDEnCJt/cA/yUnL5P9XSAeh/QdQ=; b=CdKkhWSU7rkzOARHdPOrpaETElyRE2Uh9qoofRb/tUESpVbOUMWr2wnmf1PYtvsHK/ BoxscCkNIc1ymMl2nWracw7eL7SrErTwAY9+8OwGHfLVX5nxaS3PnOP6d0feLZUf5kIB pVfMbeGeAWPLaeqpjPTJGi0IeP2VAe6VJsD9Yh/wtdHBgnU+49LTiLOoROBSpTsQr8hM 5xG05xrp/sGBbczrbPaOoUoO0BzHc+EFUrT5oAnmNXjkZxGTGy0sWHuaJqCp6E1TFjI3 0y767mujU3meTfP6wqfDIshSg4uoiQLVqL/PESnmjsgVz9SBqzwLqR4mB/0R9EV15Av5 5szQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aNaAMJZW; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i19si3972443oik.272.2020.01.31.03.08.54; Fri, 31 Jan 2020 03:09:06 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=aNaAMJZW; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728414AbgAaLG4 (ORCPT + 99 others); Fri, 31 Jan 2020 06:06:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:49124 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728342AbgAaLGz (ORCPT ); Fri, 31 Jan 2020 06:06:55 -0500 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AD79020707; Fri, 31 Jan 2020 11:06:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580468814; bh=rhOWBY9a8XVKosz1BHZiYYX/9QEa7aR9m1m6Yhc5uPQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=aNaAMJZWTRFZ512RsXZ2YSxJeHik233WIht4ZLh84FI5nvkblDEn2W3g+hd6737ig 2K6BCGZNYmty0Ke7DvqlZdjfxNrDxgZtAjcOm2M9QOkdxYVjEWaHP5dfgEvuVchCVG M90O43IJ6pAgrjeejY/zc87QXaqGrUFFGCvpQS1o= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ixU8S-002LRZ-U0; Fri, 31 Jan 2020 11:06:53 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 31 Jan 2020 11:06:52 +0000 From: Marc Zyngier To: Makarand Pawagi Cc: Lorenzo Pieralisi , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, linux@armlinux.org.uk, jon@solid-run.com, Cristi Sovaiala , Laurentiu Tudor , Ioana Ciornei , Varun Sethi , Calvin Johnson , Pankaj Bansal , guohanjun@huawei.com, sudeep.holla@arm.com, rjw@rjwysocki.net, lenb@kernel.org, stuyoder@gmail.com, tglx@linutronix.de, jason@lakedaemon.net, shameerali.kolothum.thodi@huawei.com, will@kernel.org, robin.murphy@arm.com, nleeder@codeaurora.org, Andy Wang , Paul Yang Subject: Re: [EXT] Re: [PATCH] bus: fsl-mc: Add ACPI support for fsl-mc In-Reply-To: References: <1580198925-50411-1-git-send-email-makarand.pawagi@nxp.com> <20200128110916.GA491@e121166-lin.cambridge.arm.com> Message-ID: <12531d6c569c7e14dffe8e288d9f4a0b@kernel.org> X-Sender: maz@kernel.org User-Agent: Roundcube Webmail/1.3.8 X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: makarand.pawagi@nxp.com, lorenzo.pieralisi@arm.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, linux@armlinux.org.uk, jon@solid-run.com, cristian.sovaiala@nxp.com, laurentiu.tudor@nxp.com, ioana.ciornei@nxp.com, V.Sethi@nxp.com, calvin.johnson@nxp.com, pankaj.bansal@nxp.com, guohanjun@huawei.com, sudeep.holla@arm.com, rjw@rjwysocki.net, lenb@kernel.org, stuyoder@gmail.com, tglx@linutronix.de, jason@lakedaemon.net, shameerali.kolothum.thodi@huawei.com, will@kernel.org, robin.murphy@arm.com, nleeder@codeaurora.org, Andy.Wang@arm.com, Paul.Yang@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-01-31 10:35, Makarand Pawagi wrote: >> -----Original Message----- >> From: Lorenzo Pieralisi >> Sent: Tuesday, January 28, 2020 4:39 PM >> To: Makarand Pawagi >> Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org; linux-arm- >> kernel@lists.infradead.org; linux-acpi@vger.kernel.org; >> linux@armlinux.org.uk; >> jon@solid-run.com; Cristi Sovaiala ; >> Laurentiu >> Tudor ; Ioana Ciornei >> ; >> Varun Sethi ; Calvin Johnson >> ; >> Pankaj Bansal ; guohanjun@huawei.com; >> sudeep.holla@arm.com; rjw@rjwysocki.net; lenb@kernel.org; >> stuyoder@gmail.com; tglx@linutronix.de; jason@lakedaemon.net; >> maz@kernel.org; shameerali.kolothum.thodi@huawei.com; will@kernel.org; >> robin.murphy@arm.com; nleeder@codeaurora.org >> Subject: [EXT] Re: [PATCH] bus: fsl-mc: Add ACPI support for fsl-mc >> >> Caution: EXT Email >> >> On Tue, Jan 28, 2020 at 01:38:45PM +0530, Makarand Pawagi wrote: >> > ACPI support is added in the fsl-mc driver. Driver will parse MC DSDT >> > table to extract memory and other resorces. >> > >> > Interrupt (GIC ITS) information will be extracted from MADT table by >> > drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c. >> > >> > IORT table will be parsed to configure DMA. >> > >> > Signed-off-by: Makarand Pawagi >> > --- >> > drivers/acpi/arm64/iort.c | 53 +++++++++++++++++++++ >> > drivers/bus/fsl-mc/dprc-driver.c | 3 +- >> > drivers/bus/fsl-mc/fsl-mc-bus.c | 48 +++++++++++++------ >> > drivers/bus/fsl-mc/fsl-mc-msi.c | 10 +++- >> > drivers/bus/fsl-mc/fsl-mc-private.h | 4 +- >> > drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c | 71 >> ++++++++++++++++++++++++++++- >> > include/linux/acpi_iort.h | 5 ++ >> > 7 files changed, 174 insertions(+), 20 deletions(-) >> > >> > diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c >> > index 33f7198..beb9cd5 100644 >> > --- a/drivers/acpi/arm64/iort.c >> > +++ b/drivers/acpi/arm64/iort.c >> > @@ -15,6 +15,7 @@ >> > #include >> > #include >> > #include >> > +#include >> > #include >> > #include >> > >> > @@ -622,6 +623,29 @@ static int iort_dev_find_its_id(struct device >> > *dev, u32 req_id, } >> > >> > /** >> > + * iort_get_fsl_mc_device_domain() - Find MSI domain related to a >> > +device >> > + * @dev: The device. >> > + * @mc_icid: ICID for the fsl_mc device. >> > + * >> > + * Returns: the MSI domain for this device, NULL otherwise */ struct >> > +irq_domain *iort_get_fsl_mc_device_domain(struct device *dev, >> > + u32 mc_icid) { >> > + struct fwnode_handle *handle; >> > + int its_id; >> > + >> > + if (iort_dev_find_its_id(dev, mc_icid, 0, &its_id)) >> > + return NULL; >> > + >> > + handle = iort_find_domain_token(its_id); >> > + if (!handle) >> > + return NULL; >> > + >> > + return irq_find_matching_fwnode(handle, DOMAIN_BUS_FSL_MC_MSI); >> > +} >> >> NAK >> >> I am not willing to take platform specific code in the generic IORT >> layer. >> >> ACPI on ARM64 works on platforms that comply with SBSA/SBBR >> guidelines: >> >> >> https://developer.arm.com/architectures/platform-design/server-systems >> >> Deviating from those requires butchering ACPI specifications (ie IORT) >> and >> related kernel code which goes totally against what ACPI is meant for >> on ARM64 >> systems, so there is no upstream pathway for this code I am afraid. >> > Reason of adding this platform specific function in the generic IORT > layer is > That iort_get_device_domain() only deals with PCI bus > (DOMAIN_BUS_PCI_MSI). > > fsl-mc objects when probed, need to find irq_domain which is associated > with > the fsl-mc bus (DOMAIN_BUS_FSL_MC_MSI). It will not be possible to do > that > if we do not add this function because there are no other suitable APIs > exported > by IORT layer to do the job. I think we all understood the patch. What both Lorenzo and myself are saying is that we do not want non-PCI support in IORT. You have decided to have exotic hardware, and sidestep all the standardization efforts. This is your right. But you can't have your cake and eat it. Thanks, M. -- Jazz is not dead. It just smells funny...