All of lore.kernel.org
 help / color / mirror / Atom feed
From: mbrugger@suse.com (Matthias Brugger)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/6] staging: fsl-mc: Use platform_msi_* infrastructure
Date: Wed, 13 Apr 2016 13:23:24 +0200	[thread overview]
Message-ID: <570E2C2C.6090900@suse.com> (raw)
In-Reply-To: <570E25DD.9070106@arm.com>



On 13/04/16 12:56, Marc Zyngier wrote:
> On 13/04/16 11:30, Matthias Brugger wrote:
>> From: Matthias Brugger <matthias.bgg@gmail.com>
>>
>> The fsl-mc driver can't be build as a module because it uses msi_*
>> functions directly. Port the driver to use the platform_msi_*
>> infrastructure instead, to allow it to be build as a module.
>>
>> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
>> ---
>>   .../staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c |   5 +-
>>   drivers/staging/fsl-mc/bus/mc-allocator.c          |   9 +-
>>   drivers/staging/fsl-mc/bus/mc-msi.c                | 169 +--------------------
>>   drivers/staging/fsl-mc/include/mc-sys.h            |   3 +
>>   4 files changed, 14 insertions(+), 172 deletions(-)
>>
>> diff --git a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c
>> index 720e2b0..0eecb7e 100644
>> --- a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c
>> +++ b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c
>> @@ -25,7 +25,6 @@ static struct irq_chip its_msi_irq_chip = {
>>   	.irq_mask = irq_chip_mask_parent,
>>   	.irq_unmask = irq_chip_unmask_parent,
>>   	.irq_eoi = irq_chip_eoi_parent,
>> -	.irq_set_affinity = msi_domain_set_affinity
>>   };
>>
>>   static int its_fsl_mc_msi_prepare(struct irq_domain *msi_domain,
>> @@ -86,7 +85,7 @@ int __init its_fsl_mc_msi_init(void)
>>   			continue;
>>   		}
>>
>> -		mc_msi_domain = fsl_mc_msi_create_irq_domain(
>> +		mc_msi_domain = platform_msi_create_irq_domain(
>>   						 of_node_to_fwnode(np),
>>   						 &its_fsl_mc_msi_domain_info,
>>   						 parent);
>
> What? We are already creating a platform MSI domain for the ITS. How is
> that going to work? If you want to convert this set of drivers to
> platform ITS, fine. But you can't randomly hack in the ITS code and pray
> for things not to fall apart.
>

 From what I see, the difference between irq-gic-v3-its-fsl-mc-msi and 
the irq-gic-v3-its-platform-msi is the way ITS specific DeviceID is 
created in msi_prepare.

German, is there a reason why you use the ICID read from the DPRC as dev_id?

Regards,
Matthias

WARNING: multiple messages have this Message-ID (diff)
From: Matthias Brugger <mbrugger-IBi9RG/b67k@public.gmane.org>
To: Marc Zyngier <marc.zyngier-5wv7dgnIgG8@public.gmane.org>,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	German.Rivera-KZfg59tc24xl57MIdRCFDg@public.gmane.org,
	jiang.liu-VuQAYsv1563Yd54FQh9/CA@public.gmane.org,
	tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org
Cc: treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
	stuart.yoder-3arQi8VN3Tc@public.gmane.org,
	jroedel-l3A5Bk7waGM@public.gmane.org,
	agraf-l3A5Bk7waGM@public.gmane.org,
	bp-l3A5Bk7waGM@public.gmane.org,
	matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	bhaktipriya96-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 4/6] staging: fsl-mc: Use platform_msi_* infrastructure
Date: Wed, 13 Apr 2016 13:23:24 +0200	[thread overview]
Message-ID: <570E2C2C.6090900@suse.com> (raw)
In-Reply-To: <570E25DD.9070106-5wv7dgnIgG8@public.gmane.org>



On 13/04/16 12:56, Marc Zyngier wrote:
> On 13/04/16 11:30, Matthias Brugger wrote:
>> From: Matthias Brugger <matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>
>> The fsl-mc driver can't be build as a module because it uses msi_*
>> functions directly. Port the driver to use the platform_msi_*
>> infrastructure instead, to allow it to be build as a module.
>>
>> Signed-off-by: Matthias Brugger <mbrugger-IBi9RG/b67k@public.gmane.org>
>> ---
>>   .../staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c |   5 +-
>>   drivers/staging/fsl-mc/bus/mc-allocator.c          |   9 +-
>>   drivers/staging/fsl-mc/bus/mc-msi.c                | 169 +--------------------
>>   drivers/staging/fsl-mc/include/mc-sys.h            |   3 +
>>   4 files changed, 14 insertions(+), 172 deletions(-)
>>
>> diff --git a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c
>> index 720e2b0..0eecb7e 100644
>> --- a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c
>> +++ b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c
>> @@ -25,7 +25,6 @@ static struct irq_chip its_msi_irq_chip = {
>>   	.irq_mask = irq_chip_mask_parent,
>>   	.irq_unmask = irq_chip_unmask_parent,
>>   	.irq_eoi = irq_chip_eoi_parent,
>> -	.irq_set_affinity = msi_domain_set_affinity
>>   };
>>
>>   static int its_fsl_mc_msi_prepare(struct irq_domain *msi_domain,
>> @@ -86,7 +85,7 @@ int __init its_fsl_mc_msi_init(void)
>>   			continue;
>>   		}
>>
>> -		mc_msi_domain = fsl_mc_msi_create_irq_domain(
>> +		mc_msi_domain = platform_msi_create_irq_domain(
>>   						 of_node_to_fwnode(np),
>>   						 &its_fsl_mc_msi_domain_info,
>>   						 parent);
>
> What? We are already creating a platform MSI domain for the ITS. How is
> that going to work? If you want to convert this set of drivers to
> platform ITS, fine. But you can't randomly hack in the ITS code and pray
> for things not to fall apart.
>

 From what I see, the difference between irq-gic-v3-its-fsl-mc-msi and 
the irq-gic-v3-its-platform-msi is the way ITS specific DeviceID is 
created in msi_prepare.

German, is there a reason why you use the ICID read from the DPRC as dev_id?

Regards,
Matthias
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Matthias Brugger <mbrugger@suse.com>
To: Marc Zyngier <marc.zyngier@arm.com>,
	gregkh@linuxfoundation.org, robh+dt@kernel.org,
	frowand.list@gmail.com, grant.likely@linaro.org,
	German.Rivera@freescale.com, jiang.liu@linux.intel.com,
	tglx@linutronix.de
Cc: treding@nvidia.com, stuart.yoder@nxp.com, jroedel@suse.de,
	agraf@suse.de, bp@suse.de, matthias.bgg@gmail.com,
	bhaktipriya96@gmail.com, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, devel@driverdev.osuosl.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 4/6] staging: fsl-mc: Use platform_msi_* infrastructure
Date: Wed, 13 Apr 2016 13:23:24 +0200	[thread overview]
Message-ID: <570E2C2C.6090900@suse.com> (raw)
In-Reply-To: <570E25DD.9070106@arm.com>



On 13/04/16 12:56, Marc Zyngier wrote:
> On 13/04/16 11:30, Matthias Brugger wrote:
>> From: Matthias Brugger <matthias.bgg@gmail.com>
>>
>> The fsl-mc driver can't be build as a module because it uses msi_*
>> functions directly. Port the driver to use the platform_msi_*
>> infrastructure instead, to allow it to be build as a module.
>>
>> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
>> ---
>>   .../staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c |   5 +-
>>   drivers/staging/fsl-mc/bus/mc-allocator.c          |   9 +-
>>   drivers/staging/fsl-mc/bus/mc-msi.c                | 169 +--------------------
>>   drivers/staging/fsl-mc/include/mc-sys.h            |   3 +
>>   4 files changed, 14 insertions(+), 172 deletions(-)
>>
>> diff --git a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c
>> index 720e2b0..0eecb7e 100644
>> --- a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c
>> +++ b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c
>> @@ -25,7 +25,6 @@ static struct irq_chip its_msi_irq_chip = {
>>   	.irq_mask = irq_chip_mask_parent,
>>   	.irq_unmask = irq_chip_unmask_parent,
>>   	.irq_eoi = irq_chip_eoi_parent,
>> -	.irq_set_affinity = msi_domain_set_affinity
>>   };
>>
>>   static int its_fsl_mc_msi_prepare(struct irq_domain *msi_domain,
>> @@ -86,7 +85,7 @@ int __init its_fsl_mc_msi_init(void)
>>   			continue;
>>   		}
>>
>> -		mc_msi_domain = fsl_mc_msi_create_irq_domain(
>> +		mc_msi_domain = platform_msi_create_irq_domain(
>>   						 of_node_to_fwnode(np),
>>   						 &its_fsl_mc_msi_domain_info,
>>   						 parent);
>
> What? We are already creating a platform MSI domain for the ITS. How is
> that going to work? If you want to convert this set of drivers to
> platform ITS, fine. But you can't randomly hack in the ITS code and pray
> for things not to fall apart.
>

 From what I see, the difference between irq-gic-v3-its-fsl-mc-msi and 
the irq-gic-v3-its-platform-msi is the way ITS specific DeviceID is 
created in msi_prepare.

German, is there a reason why you use the ICID read from the DPRC as dev_id?

Regards,
Matthias

  reply	other threads:[~2016-04-13 11:23 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-13 10:30 staging: fsl-mc: Convert to use platform_msi infrastrucutre Matthias Brugger
2016-04-13 10:30 ` Matthias Brugger
2016-04-13 10:30 ` Matthias Brugger
2016-04-13 10:30 ` [PATCH 1/6] of/irq: Export of_msi_get_domain Matthias Brugger
2016-04-13 10:30   ` Matthias Brugger
2016-04-13 10:30   ` Matthias Brugger
2016-04-13 12:32   ` Rob Herring
2016-04-13 12:32     ` Rob Herring
2016-04-13 12:32     ` Rob Herring
2016-04-13 10:30 ` [PATCH 2/6] base: Export platform_msi_create_irq_domain Matthias Brugger
2016-04-13 10:30   ` Matthias Brugger
2016-04-13 10:30 ` [PATCH 3/6] genirq/msi: Export msi_get_domain_info Matthias Brugger
2016-04-13 10:30   ` Matthias Brugger
2016-04-13 10:30   ` Matthias Brugger
2016-04-13 10:30 ` [PATCH 4/6] staging: fsl-mc: Use platform_msi_* infrastructure Matthias Brugger
2016-04-13 10:30   ` Matthias Brugger
2016-04-13 10:56   ` Marc Zyngier
2016-04-13 10:56     ` Marc Zyngier
2016-04-13 10:56     ` Marc Zyngier
2016-04-13 11:23     ` Matthias Brugger [this message]
2016-04-13 11:23       ` Matthias Brugger
2016-04-13 11:23       ` Matthias Brugger
2016-04-13 12:08       ` Marc Zyngier
2016-04-13 12:08         ` Marc Zyngier
2016-04-13 12:08         ` Marc Zyngier
2016-04-13 14:57       ` Stuart Yoder
2016-04-13 14:57         ` Stuart Yoder
2016-04-13 14:57         ` Stuart Yoder
2016-04-13 10:30 ` [PATCH 5/6] staging: fsl-mc: Clean up of irq_chip callbacks Matthias Brugger
2016-04-13 10:30   ` Matthias Brugger
2016-04-13 10:30 ` [PATCH 6/6] Revert "staging: fsl-mc: Do not allow building as a module" Matthias Brugger
2016-04-13 10:30   ` Matthias Brugger
2016-04-13 10:30   ` Matthias Brugger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=570E2C2C.6090900@suse.com \
    --to=mbrugger@suse.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.