All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 TRIVIAL 0/2] ARM: Enable GICv2m on 32-bit virt machine
@ 2015-09-04 13:29 Pavel Fedin
  2015-09-04 13:29 ` [PATCH v4 TRIVIAL 1/2] " Pavel Fedin
  2015-09-04 13:29 ` [PATCH v4 TRIVIAL 2/2] ARM: Fix GICv2m build warning on 32 bits Pavel Fedin
  0 siblings, 2 replies; 4+ messages in thread
From: Pavel Fedin @ 2015-09-04 13:29 UTC (permalink / raw)
  To: linux-arm-kernel

qemu implementation of "virt" includes GICv2m. This series allows to use
it also on ARM32 architecture.

v3 => v4:
- Split into two patches as requested by Marc Zyngier
- Use specialized word extraction macros instead of #ifdef

v1 => v2:
Added verbose explanation in commit message

v2 => v3:
Fixed build warning in irq-gic-v2m.c

v1 => v2:
Added verbose explanation in commit message

Pavel Fedin (2):
  ARM: Enable GICv2m on 32-bit virt machine
  ARM: Fix GICv2m build warning on 32 bits

 arch/arm/Kconfig              | 1 +
 arch/arm/include/asm/Kbuild   | 1 +
 drivers/irqchip/irq-gic-v2m.c | 4 ++--
 3 files changed, 4 insertions(+), 2 deletions(-)

-- 
2.4.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v4 TRIVIAL 1/2] ARM: Enable GICv2m on 32-bit virt machine
  2015-09-04 13:29 [PATCH v4 TRIVIAL 0/2] ARM: Enable GICv2m on 32-bit virt machine Pavel Fedin
@ 2015-09-04 13:29 ` Pavel Fedin
  2015-09-04 13:29 ` [PATCH v4 TRIVIAL 2/2] ARM: Fix GICv2m build warning on 32 bits Pavel Fedin
  1 sibling, 0 replies; 4+ messages in thread
From: Pavel Fedin @ 2015-09-04 13:29 UTC (permalink / raw)
  To: linux-arm-kernel

msi.h is added because it is required by linux/msi.h if
CONFIG_GENERIC_MSI_IRQ_DOMAIN is defined. It gets enabled by the following
KConfig dependency chain:
ARM_GIC_V2M => PCI_MSI_IRQ_DOMAIN => GENERIC_MSI_IRQ_DOMAIN

Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
---
 arch/arm/Kconfig            | 1 +
 arch/arm/include/asm/Kbuild | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 45df48b..1091025 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -815,6 +815,7 @@ config ARCH_VIRT
 	bool "Dummy Virtual Machine" if ARCH_MULTI_V7
 	select ARM_AMBA
 	select ARM_GIC
+	select ARM_GIC_V2M if PCI_MSI
 	select ARM_PSCI
 	select HAVE_ARM_ARCH_TIMER
 
diff --git a/arch/arm/include/asm/Kbuild b/arch/arm/include/asm/Kbuild
index 3c4596d..01806f5 100644
--- a/arch/arm/include/asm/Kbuild
+++ b/arch/arm/include/asm/Kbuild
@@ -14,6 +14,7 @@ generic-y += local.h
 generic-y += local64.h
 generic-y += mcs_spinlock.h
 generic-y += msgbuf.h
+generic-y += msi.h
 generic-y += param.h
 generic-y += parport.h
 generic-y += poll.h
-- 
2.4.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v4 TRIVIAL 2/2] ARM: Fix GICv2m build warning on 32 bits
  2015-09-04 13:29 [PATCH v4 TRIVIAL 0/2] ARM: Enable GICv2m on 32-bit virt machine Pavel Fedin
  2015-09-04 13:29 ` [PATCH v4 TRIVIAL 1/2] " Pavel Fedin
@ 2015-09-04 13:29 ` Pavel Fedin
  2015-09-04 17:14   ` Marc Zyngier
  1 sibling, 1 reply; 4+ messages in thread
From: Pavel Fedin @ 2015-09-04 13:29 UTC (permalink / raw)
  To: linux-arm-kernel

After GICv2m was enabled for 32-bit ARM kernel, a warning popped up:

drivers/irqchip/irq-gic-v2m.c: In function ?gicv2m_compose_msi_msg?:
drivers/irqchip/irq-gic-v2m.c:100:2: warning: right shift count >= width
of type [enabled by default]
  msg->address_hi = (u32) (addr >> 32);
  ^

This patch fixes it by using proper macros for splitting up the value.

Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
---
 drivers/irqchip/irq-gic-v2m.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-gic-v2m.c b/drivers/irqchip/irq-gic-v2m.c
index fdf7065..9055b02 100644
--- a/drivers/irqchip/irq-gic-v2m.c
+++ b/drivers/irqchip/irq-gic-v2m.c
@@ -97,8 +97,8 @@ static void gicv2m_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
 	struct v2m_data *v2m = irq_data_get_irq_chip_data(data);
 	phys_addr_t addr = v2m->res.start + V2M_MSI_SETSPI_NS;
 
-	msg->address_hi = (u32) (addr >> 32);
-	msg->address_lo = (u32) (addr);
+	msg->address_hi = upper_32_bits(addr);
+	msg->address_lo = lower_32_bits(addr);
 	msg->data = data->hwirq;
 }
 
-- 
2.4.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v4 TRIVIAL 2/2] ARM: Fix GICv2m build warning on 32 bits
  2015-09-04 13:29 ` [PATCH v4 TRIVIAL 2/2] ARM: Fix GICv2m build warning on 32 bits Pavel Fedin
@ 2015-09-04 17:14   ` Marc Zyngier
  0 siblings, 0 replies; 4+ messages in thread
From: Marc Zyngier @ 2015-09-04 17:14 UTC (permalink / raw)
  To: linux-arm-kernel

On 04/09/15 14:29, Pavel Fedin wrote:
> After GICv2m was enabled for 32-bit ARM kernel, a warning popped up:
> 
> drivers/irqchip/irq-gic-v2m.c: In function ?gicv2m_compose_msi_msg?:
> drivers/irqchip/irq-gic-v2m.c:100:2: warning: right shift count >= width
> of type [enabled by default]
>   msg->address_hi = (u32) (addr >> 32);
>   ^
> 
> This patch fixes it by using proper macros for splitting up the value.
> 
> Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
> ---
>  drivers/irqchip/irq-gic-v2m.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/irqchip/irq-gic-v2m.c b/drivers/irqchip/irq-gic-v2m.c
> index fdf7065..9055b02 100644
> --- a/drivers/irqchip/irq-gic-v2m.c
> +++ b/drivers/irqchip/irq-gic-v2m.c
> @@ -97,8 +97,8 @@ static void gicv2m_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
>  	struct v2m_data *v2m = irq_data_get_irq_chip_data(data);
>  	phys_addr_t addr = v2m->res.start + V2M_MSI_SETSPI_NS;
>  
> -	msg->address_hi = (u32) (addr >> 32);
> -	msg->address_lo = (u32) (addr);
> +	msg->address_hi = upper_32_bits(addr);
> +	msg->address_lo = lower_32_bits(addr);
>  	msg->data = data->hwirq;
>  }
>  
> 

Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>

I'll add that to my queue of GIC fixes.

Thanks,

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-09-04 17:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-04 13:29 [PATCH v4 TRIVIAL 0/2] ARM: Enable GICv2m on 32-bit virt machine Pavel Fedin
2015-09-04 13:29 ` [PATCH v4 TRIVIAL 1/2] " Pavel Fedin
2015-09-04 13:29 ` [PATCH v4 TRIVIAL 2/2] ARM: Fix GICv2m build warning on 32 bits Pavel Fedin
2015-09-04 17:14   ` Marc Zyngier

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.