Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1377875

Re: [PATCH 4/6] staging: fsl-mc: Use platform_msi_* infrastructure

From Marc Zyngier <marc.zyngier@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH 4/6] staging: fsl-mc: Use platform_msi_* infrastructure
Date 2016-04-13 14:10 +0200
Message-ID <rnrMo-116-61@gated-at.bofh.it> (permalink)
References <rnqnf-8j6-5@gated-at.bofh.it> <rnqnf-8j6-11@gated-at.bofh.it> <rnqGB-8ro-5@gated-at.bofh.it> <rnr9E-rU-31@gated-at.bofh.it>
Organization ARM Ltd

Show all headers | View raw


On 13/04/16 12:23, Matthias Brugger wrote:
> 
> 
> 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.

It is not "created". It is extracted from the HW, either by looking at
the RequesterID (PCI), at the DT (platform MSI), or a bus-specific method.

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

Because that's what is presented to the ITS as a DevID. This is a HW
constraint, and you can't just change it.

If you want to use platform MSI for that, you also need to describe the
DevID in the DT (breaking the existing platforms in the process).

	M.
-- 
Jazz is not dead. It just smells funny...

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

staging: fsl-mc: Convert to use platform_msi infrastrucutre Matthias Brugger <mbrugger@suse.com> - 2016-04-13 12:40 +0200
  [PATCH 5/6] staging: fsl-mc: Clean up of irq_chip callbacks Matthias Brugger <mbrugger@suse.com> - 2016-04-13 12:40 +0200
  [PATCH 4/6] staging: fsl-mc: Use platform_msi_* infrastructure Matthias Brugger <mbrugger@suse.com> - 2016-04-13 12:40 +0200
    Re: [PATCH 4/6] staging: fsl-mc: Use platform_msi_* infrastructure Marc Zyngier <marc.zyngier@arm.com> - 2016-04-13 13:00 +0200
      Re: [PATCH 4/6] staging: fsl-mc: Use platform_msi_* infrastructure Matthias Brugger <mbrugger@suse.com> - 2016-04-13 13:30 +0200
        Re: [PATCH 4/6] staging: fsl-mc: Use platform_msi_* infrastructure Marc Zyngier <marc.zyngier@arm.com> - 2016-04-13 14:10 +0200
        RE: [PATCH 4/6] staging: fsl-mc: Use platform_msi_* infrastructure Stuart Yoder <stuart.yoder@nxp.com> - 2016-04-13 17:00 +0200
  [PATCH 1/6] of/irq: Export of_msi_get_domain Matthias Brugger <mbrugger@suse.com> - 2016-04-13 12:40 +0200
    Re: [PATCH 1/6] of/irq: Export of_msi_get_domain Rob Herring <robh+dt@kernel.org> - 2016-04-13 14:40 +0200
  [PATCH 3/6] genirq/msi: Export msi_get_domain_info Matthias Brugger <mbrugger@suse.com> - 2016-04-13 12:40 +0200
  [PATCH 2/6] base: Export platform_msi_create_irq_domain Matthias Brugger <mbrugger@suse.com> - 2016-04-13 12:40 +0200
  [PATCH 6/6] Revert "staging: fsl-mc: Do not allow building as a module" Matthias Brugger <mbrugger@suse.com> - 2016-04-13 13:00 +0200

csiph-web