* [Patch v3 24/36] powerpc, irq: Use access helper irq_data_get_affinity_mask()
[not found] <1433145945-789-1-git-send-email-jiang.liu@linux.intel.com>
@ 2015-06-01 8:05 ` Jiang Liu
2015-06-01 8:05 ` [Patch v3 33/36] genirq: Use helper function to access irq_data->msi_desc Jiang Liu
1 sibling, 0 replies; 5+ messages in thread
From: Jiang Liu @ 2015-06-01 8:05 UTC (permalink / raw)
To: Thomas Gleixner, Bjorn Helgaas, Benjamin Herrenschmidt,
Ingo Molnar, H. Peter Anvin, Randy Dunlap, Yinghai Lu,
Borislav Petkov, Paul Mackerras, Michael Ellerman,
Anton Blanchard, Mahesh Salgaonkar, Christoph Lameter, Tejun Heo
Cc: Jiang Liu, Konrad Rzeszutek Wilk, Tony Luck, x86, linux-kernel,
linux-pci, linux-acpi, linuxppc-dev
Use access helper irq_data_get_affinity_mask() to hide implementation
details of struct irq_desc.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
---
arch/powerpc/kernel/irq.c | 2 +-
arch/powerpc/sysdev/xics/ics-opal.c | 2 +-
arch/powerpc/sysdev/xics/ics-rtas.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 45096033d37b..290559df1e8b 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -441,7 +441,7 @@ void migrate_irqs(void)
chip = irq_data_get_irq_chip(data);
- cpumask_and(mask, data->affinity, map);
+ cpumask_and(mask, irq_data_get_affinity_mask(data), map);
if (cpumask_any(mask) >= nr_cpu_ids) {
pr_warn("Breaking affinity for irq %i\n", irq);
cpumask_copy(mask, map);
diff --git a/arch/powerpc/sysdev/xics/ics-opal.c b/arch/powerpc/sysdev/xics/ics-opal.c
index 68c7e5cc98e0..3996393c254d 100644
--- a/arch/powerpc/sysdev/xics/ics-opal.c
+++ b/arch/powerpc/sysdev/xics/ics-opal.c
@@ -54,7 +54,7 @@ static void ics_opal_unmask_irq(struct irq_data *d)
if (hw_irq == XICS_IPI || hw_irq == XICS_IRQ_SPURIOUS)
return;
- server = xics_get_irq_server(d->irq, d->affinity, 0);
+ server = xics_get_irq_server(d->irq, irq_data_get_affinity_mask(d), 0);
server = ics_opal_mangle_server(server);
rc = opal_set_xive(hw_irq, server, DEFAULT_PRIORITY);
diff --git a/arch/powerpc/sysdev/xics/ics-rtas.c b/arch/powerpc/sysdev/xics/ics-rtas.c
index 0af97deb83f3..e2665a9dfc0f 100644
--- a/arch/powerpc/sysdev/xics/ics-rtas.c
+++ b/arch/powerpc/sysdev/xics/ics-rtas.c
@@ -47,7 +47,7 @@ static void ics_rtas_unmask_irq(struct irq_data *d)
if (hw_irq == XICS_IPI || hw_irq == XICS_IRQ_SPURIOUS)
return;
- server = xics_get_irq_server(d->irq, d->affinity, 0);
+ server = xics_get_irq_server(d->irq, irq_data_get_affinity_mask(d), 0);
call_status = rtas_call(ibm_set_xive, 3, 1, NULL, hw_irq, server,
DEFAULT_PRIORITY);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Patch v3 33/36] genirq: Use helper function to access irq_data->msi_desc
[not found] <1433145945-789-1-git-send-email-jiang.liu@linux.intel.com>
2015-06-01 8:05 ` [Patch v3 24/36] powerpc, irq: Use access helper irq_data_get_affinity_mask() Jiang Liu
@ 2015-06-01 8:05 ` Jiang Liu
2015-06-02 3:45 ` [v3, " Michael Ellerman
1 sibling, 1 reply; 5+ messages in thread
From: Jiang Liu @ 2015-06-01 8:05 UTC (permalink / raw)
To: Thomas Gleixner, Bjorn Helgaas, Benjamin Herrenschmidt,
Ingo Molnar, H. Peter Anvin, Randy Dunlap, Yinghai Lu,
Borislav Petkov, Tony Luck, Fenghua Yu, Paul Mackerras,
Michael Ellerman, Chris Metcalf, Jiang Liu, Rusty Russell,
Tejun Heo, Joe Perches
Cc: Konrad Rzeszutek Wilk, x86, linux-kernel, linux-pci, linux-acpi,
linux-ia64, linuxppc-dev
Use irq_data access helper to access irq_data->msi_desc, so we could
move msi_desc from struct irq_data into struct irq_common_data later.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
---
arch/ia64/kernel/msi_ia64.c | 2 +-
arch/ia64/sn/kernel/msi_sn.c | 2 +-
arch/powerpc/sysdev/xics/ics-opal.c | 2 +-
arch/powerpc/sysdev/xics/ics-rtas.c | 2 +-
arch/tile/kernel/pci_gx.c | 2 +-
drivers/pci/msi.c | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/ia64/kernel/msi_ia64.c b/arch/ia64/kernel/msi_ia64.c
index 6c50d332b7d7..af4eaec0f7c3 100644
--- a/arch/ia64/kernel/msi_ia64.c
+++ b/arch/ia64/kernel/msi_ia64.c
@@ -23,7 +23,7 @@ static int ia64_set_msi_irq_affinity(struct irq_data *idata,
if (irq_prepare_move(irq, cpu))
return -1;
- __get_cached_msi_msg(idata->msi_desc, &msg);
+ __get_cached_msi_msg(irq_data_get_msi_desc(idata), &msg);
addr = msg.address_lo;
addr &= MSI_ADDR_DEST_ID_MASK;
diff --git a/arch/ia64/sn/kernel/msi_sn.c b/arch/ia64/sn/kernel/msi_sn.c
index 42b5a13af142..fb25065b22c6 100644
--- a/arch/ia64/sn/kernel/msi_sn.c
+++ b/arch/ia64/sn/kernel/msi_sn.c
@@ -175,7 +175,7 @@ static int sn_set_msi_irq_affinity(struct irq_data *data,
* Release XIO resources for the old MSI PCI address
*/
- __get_cached_msi_msg(data->msi_desc, &msg);
+ __get_cached_msi_msg(irq_data_get_msi_desc(data), &msg);
sn_pdev = (struct pcidev_info *)sn_irq_info->irq_pciioinfo;
pdev = sn_pdev->pdi_linux_pcidev;
provider = SN_PCIDEV_BUSPROVIDER(pdev);
diff --git a/arch/powerpc/sysdev/xics/ics-opal.c b/arch/powerpc/sysdev/xics/ics-opal.c
index 3996393c254d..27c936c080a6 100644
--- a/arch/powerpc/sysdev/xics/ics-opal.c
+++ b/arch/powerpc/sysdev/xics/ics-opal.c
@@ -72,7 +72,7 @@ static unsigned int ics_opal_startup(struct irq_data *d)
* card, using the MSI mask bits. Firmware doesn't appear to unmask
* at that level, so we do it here by hand.
*/
- if (d->msi_desc)
+ if (irq_data_get_msi_desc(d))
pci_msi_unmask_irq(d);
#endif
diff --git a/arch/powerpc/sysdev/xics/ics-rtas.c b/arch/powerpc/sysdev/xics/ics-rtas.c
index e2665a9dfc0f..3854dd41558d 100644
--- a/arch/powerpc/sysdev/xics/ics-rtas.c
+++ b/arch/powerpc/sysdev/xics/ics-rtas.c
@@ -75,7 +75,7 @@ static unsigned int ics_rtas_startup(struct irq_data *d)
* card, using the MSI mask bits. Firmware doesn't appear to unmask
* at that level, so we do it here by hand.
*/
- if (d->msi_desc)
+ if (irq_data_get_msi_desc(d))
pci_msi_unmask_irq(d);
#endif
/* unmask it */
diff --git a/arch/tile/kernel/pci_gx.c b/arch/tile/kernel/pci_gx.c
index b1df847d0686..65b701b3b5ed 100644
--- a/arch/tile/kernel/pci_gx.c
+++ b/arch/tile/kernel/pci_gx.c
@@ -1442,7 +1442,7 @@ static struct pci_ops tile_cfg_ops = {
/* MSI support starts here. */
static unsigned int tilegx_msi_startup(struct irq_data *d)
{
- if (d->msi_desc)
+ if (irq_data_get_msi_desc(d))
pci_msi_unmask_irq(d);
return 0;
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index be6034cf5c21..c2f0da733d3a 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -1178,7 +1178,7 @@ EXPORT_SYMBOL(pci_enable_msix_range);
*/
void pci_msi_domain_write_msg(struct irq_data *irq_data, struct msi_msg *msg)
{
- struct msi_desc *desc = irq_data->msi_desc;
+ struct msi_desc *desc = irq_data_get_msi_desc(irq_data);
/*
* For MSI-X desc->irq is always equal to irq_data->irq. For
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [v3, 33/36] genirq: Use helper function to access irq_data->msi_desc
2015-06-01 8:05 ` [Patch v3 33/36] genirq: Use helper function to access irq_data->msi_desc Jiang Liu
@ 2015-06-02 3:45 ` Michael Ellerman
2015-06-02 5:46 ` Jiang Liu
2015-06-03 16:53 ` [v3,33/36] " Thomas Gleixner
0 siblings, 2 replies; 5+ messages in thread
From: Michael Ellerman @ 2015-06-02 3:45 UTC (permalink / raw)
To: Jiang Liu, Thomas Gleixner, Bjorn Helgaas, Benjamin Herrenschmidt,
Ingo Molnar, H. Peter Anvin, Randy Dunlap, Yinghai Lu,
Borislav Petkov, Tony Luck, Fenghua Yu, Paul Mackerras,
Chris Metcalf, Jiang Liu, Rusty Russell, Tejun Heo, Joe Perches
Cc: linux-ia64, Konrad Rzeszutek Wilk, linux-pci, x86, linux-kernel,
linux-acpi, linuxppc-dev
On Mon, 2015-01-06 at 08:05:42 UTC, Jiang Liu wrote:
> Use irq_data access helper to access irq_data->msi_desc, so we could
> move msi_desc from struct irq_data into struct irq_common_data later.
>
> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
> ---
> arch/powerpc/sysdev/xics/ics-opal.c | 2 +-
> arch/powerpc/sysdev/xics/ics-rtas.c | 2 +-
>
> diff --git a/arch/powerpc/sysdev/xics/ics-opal.c b/arch/powerpc/sysdev/xics/ics-opal.c
> index 3996393c254d..27c936c080a6 100644
> --- a/arch/powerpc/sysdev/xics/ics-opal.c
> +++ b/arch/powerpc/sysdev/xics/ics-opal.c
> @@ -72,7 +72,7 @@ static unsigned int ics_opal_startup(struct irq_data *d)
> * card, using the MSI mask bits. Firmware doesn't appear to unmask
> * at that level, so we do it here by hand.
> */
> - if (d->msi_desc)
> + if (irq_data_get_msi_desc(d))
> pci_msi_unmask_irq(d);
> #endif
>
> diff --git a/arch/powerpc/sysdev/xics/ics-rtas.c b/arch/powerpc/sysdev/xics/ics-rtas.c
> index e2665a9dfc0f..3854dd41558d 100644
> --- a/arch/powerpc/sysdev/xics/ics-rtas.c
> +++ b/arch/powerpc/sysdev/xics/ics-rtas.c
> @@ -75,7 +75,7 @@ static unsigned int ics_rtas_startup(struct irq_data *d)
> * card, using the MSI mask bits. Firmware doesn't appear to unmask
> * at that level, so we do it here by hand.
> */
> - if (d->msi_desc)
> + if (irq_data_get_msi_desc(d))
> pci_msi_unmask_irq(d);
> #endif
> /* unmask it */
These look OK.
Though I would point out we already have 16 irq_foo_get_bar() accessors?!
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
cheers
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [v3, 33/36] genirq: Use helper function to access irq_data->msi_desc
2015-06-02 3:45 ` [v3, " Michael Ellerman
@ 2015-06-02 5:46 ` Jiang Liu
2015-06-03 16:53 ` [v3,33/36] " Thomas Gleixner
1 sibling, 0 replies; 5+ messages in thread
From: Jiang Liu @ 2015-06-02 5:46 UTC (permalink / raw)
To: Michael Ellerman, Thomas Gleixner, Bjorn Helgaas,
Benjamin Herrenschmidt, Ingo Molnar, H. Peter Anvin, Randy Dunlap,
Yinghai Lu, Borislav Petkov, Tony Luck, Fenghua Yu,
Paul Mackerras, Chris Metcalf, Rusty Russell, Tejun Heo,
Joe Perches
Cc: linux-ia64, Konrad Rzeszutek Wilk, linux-pci, x86, linux-kernel,
linux-acpi, linuxppc-dev
On 2015/6/2 11:45, Michael Ellerman wrote:
> On Mon, 2015-01-06 at 08:05:42 UTC, Jiang Liu wrote:
>> Use irq_data access helper to access irq_data->msi_desc, so we could
>> move msi_desc from struct irq_data into struct irq_common_data later.
>>
>> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
>> ---
>> arch/powerpc/sysdev/xics/ics-opal.c | 2 +-
>> arch/powerpc/sysdev/xics/ics-rtas.c | 2 +-
>>
>> diff --git a/arch/powerpc/sysdev/xics/ics-opal.c b/arch/powerpc/sysdev/xics/ics-opal.c
>> index 3996393c254d..27c936c080a6 100644
>> --- a/arch/powerpc/sysdev/xics/ics-opal.c
>> +++ b/arch/powerpc/sysdev/xics/ics-opal.c
>> @@ -72,7 +72,7 @@ static unsigned int ics_opal_startup(struct irq_data *d)
>> * card, using the MSI mask bits. Firmware doesn't appear to unmask
>> * at that level, so we do it here by hand.
>> */
>> - if (d->msi_desc)
>> + if (irq_data_get_msi_desc(d))
>> pci_msi_unmask_irq(d);
>> #endif
>>
>> diff --git a/arch/powerpc/sysdev/xics/ics-rtas.c b/arch/powerpc/sysdev/xics/ics-rtas.c
>> index e2665a9dfc0f..3854dd41558d 100644
>> --- a/arch/powerpc/sysdev/xics/ics-rtas.c
>> +++ b/arch/powerpc/sysdev/xics/ics-rtas.c
>> @@ -75,7 +75,7 @@ static unsigned int ics_rtas_startup(struct irq_data *d)
>> * card, using the MSI mask bits. Firmware doesn't appear to unmask
>> * at that level, so we do it here by hand.
>> */
>> - if (d->msi_desc)
>> + if (irq_data_get_msi_desc(d))
>> pci_msi_unmask_irq(d);
>> #endif
>> /* unmask it */
>
> These look OK.
>
> Though I would point out we already have 16 irq_foo_get_bar() accessors?!
Hi Michael,
Thanks for review. We are trying to solve some issues introduced
by hierarchy irqdomain/irqchip by splitting irq_data into a common part
(irq_common_data) and per-chip part(irq_data). These accessors are used
to ease the transition and hide implementation details.
Thanks!
Gerry
>
> Acked-by: Michael Ellerman <mpe@ellerman.id.au>
>
> cheers
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [v3,33/36] genirq: Use helper function to access irq_data->msi_desc
2015-06-02 3:45 ` [v3, " Michael Ellerman
2015-06-02 5:46 ` Jiang Liu
@ 2015-06-03 16:53 ` Thomas Gleixner
1 sibling, 0 replies; 5+ messages in thread
From: Thomas Gleixner @ 2015-06-03 16:53 UTC (permalink / raw)
To: Michael Ellerman
Cc: Jiang Liu, Bjorn Helgaas, Benjamin Herrenschmidt, Ingo Molnar,
H. Peter Anvin, Randy Dunlap, Yinghai Lu, Borislav Petkov,
Tony Luck, Fenghua Yu, Paul Mackerras, Chris Metcalf, Jiang Liu,
Rusty Russell, Tejun Heo, Joe Perches, linux-ia64,
Konrad Rzeszutek Wilk, linux-pci, x86, linux-kernel, linux-acpi,
linuxppc-dev
On Tue, 2 Jun 2015, Michael Ellerman wrote:
> Though I would point out we already have 16 irq_foo_get_bar() accessors?!
Say thanks to the people who mindlessly fiddled in the core managed
fields of irqdesc and irqdata. The hard to track down wreckage they
caused me to enforce accessors.
The new accessors are to help migrating members of irq_data to a new
data structure without breaking the world and some more.
Thanks,
tglx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-06-03 16:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1433145945-789-1-git-send-email-jiang.liu@linux.intel.com>
2015-06-01 8:05 ` [Patch v3 24/36] powerpc, irq: Use access helper irq_data_get_affinity_mask() Jiang Liu
2015-06-01 8:05 ` [Patch v3 33/36] genirq: Use helper function to access irq_data->msi_desc Jiang Liu
2015-06-02 3:45 ` [v3, " Michael Ellerman
2015-06-02 5:46 ` Jiang Liu
2015-06-03 16:53 ` [v3,33/36] " Thomas Gleixner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).