diff mbox

[RFC,2/4] Set kernel_irqchip_type for other ARM boards which use GIC

Message ID b8be8e422d29a0c52e4d8577759b97a355997003.1432291291.git.p.fedin@samsung.com
State New
Headers show

Commit Message

Pavel Fedin May 22, 2015, 10:58 a.m. UTC
Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
---
 hw/arm/exynos4_boards.c | 1 +
 hw/arm/realview.c       | 1 +
 hw/arm/vexpress.c       | 1 +
 3 files changed, 3 insertions(+)

Comments

Eric Auger May 25, 2015, 2:07 p.m. UTC | #1
On 05/22/2015 12:58 PM, Pavel Fedin wrote:
missing commit msg.
> Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
> ---
>  hw/arm/exynos4_boards.c | 1 +
>  hw/arm/realview.c       | 1 +
>  hw/arm/vexpress.c       | 1 +
>  3 files changed, 3 insertions(+)
> 
> diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c
> index d644db1..d4136bc 100644
> --- a/hw/arm/exynos4_boards.c
> +++ b/hw/arm/exynos4_boards.c
> @@ -104,6 +104,7 @@ static Exynos4210State *exynos4_boards_init_common(MachineState *machine,
>                  exynos4_machines[board_type].max_cpus);
>      }
>  
> +    machine->kernel_irqchip_type = KVM_DEV_TYPE_ARM_VGIC_V2;
Are you sure this machine is able to use in-kernel GICv2?
>      exynos4_board_binfo.ram_size = exynos4_board_ram_size[board_type];
>      exynos4_board_binfo.board_id = exynos4_board_id[board_type];
>      exynos4_board_binfo.smp_bootreg_addr =
> diff --git a/hw/arm/realview.c b/hw/arm/realview.c
> index ef2788d..f670d9f 100644
> --- a/hw/arm/realview.c
> +++ b/hw/arm/realview.c
> @@ -74,6 +74,7 @@ static void realview_init(MachineState *machine,
>      ram_addr_t ram_size = machine->ram_size;
>      hwaddr periphbase = 0;
>  
> +    machine->kernel_irqchip_type = KVM_DEV_TYPE_ARM_VGIC_V2;
same as above
>      switch (board_type) {
>      case BOARD_EB:
>          break;
> diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c
> index 8f1a5ea..b0a29f1 100644
> --- a/hw/arm/vexpress.c
> +++ b/hw/arm/vexpress.c
> @@ -556,6 +556,7 @@ static void vexpress_common_init(MachineState *machine)
>      const hwaddr *map = daughterboard->motherboard_map;
>      int i;
>  
> +    machine->kernel_irqchip_type = KVM_DEV_TYPE_ARM_VGIC_V2;
only hw/cpu/a15mpcore.c seems to be able to instantiate "kvm-arm-gic"

>      daughterboard->init(vms, machine->ram_size, machine->cpu_model, pic);
>  
>      /*
>
Pavel Fedin May 25, 2015, 2:43 p.m. UTC | #2
Hello!

> > +++ b/hw/arm/exynos4_boards.c
> > @@ -104,6 +104,7 @@ static Exynos4210State
> *exynos4_boards_init_common(MachineState *machine,
> >                  exynos4_machines[board_type].max_cpus);
> >      }
> >
> > +    machine->kernel_irqchip_type = KVM_DEV_TYPE_ARM_VGIC_V2;
> Are you sure this machine is able to use in-kernel GICv2?

 I'm not. I just scanned all machine sources for "GIC" string and added this wherever it
was found. Actually it is harmless. If the machine cannot use in-kernel VGIC, it will just
not use it.
 Ok, i will know this for the future. Actually i would like to wait for Shlomo's patch
integration, because otherwise i violate the main rule "the patchset should apply to
current master", and i believe it's not good to specify that "this patches applies on top
of YYY one".

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
Christoffer Dall July 1, 2015, 10:11 a.m. UTC | #3
Missing commit text completely?

On Fri, May 22, 2015 at 01:58:42PM +0300, Pavel Fedin wrote:
> Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
> ---
>  hw/arm/exynos4_boards.c | 1 +
>  hw/arm/realview.c       | 1 +
>  hw/arm/vexpress.c       | 1 +
>  3 files changed, 3 insertions(+)
> 
> diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c
> index d644db1..d4136bc 100644
> --- a/hw/arm/exynos4_boards.c
> +++ b/hw/arm/exynos4_boards.c
> @@ -104,6 +104,7 @@ static Exynos4210State *exynos4_boards_init_common(MachineState *machine,
>                  exynos4_machines[board_type].max_cpus);
>      }
>  
> +    machine->kernel_irqchip_type = KVM_DEV_TYPE_ARM_VGIC_V2;
>      exynos4_board_binfo.ram_size = exynos4_board_ram_size[board_type];
>      exynos4_board_binfo.board_id = exynos4_board_id[board_type];
>      exynos4_board_binfo.smp_bootreg_addr =
> diff --git a/hw/arm/realview.c b/hw/arm/realview.c
> index ef2788d..f670d9f 100644
> --- a/hw/arm/realview.c
> +++ b/hw/arm/realview.c
> @@ -74,6 +74,7 @@ static void realview_init(MachineState *machine,
>      ram_addr_t ram_size = machine->ram_size;
>      hwaddr periphbase = 0;
>  
> +    machine->kernel_irqchip_type = KVM_DEV_TYPE_ARM_VGIC_V2;
>      switch (board_type) {
>      case BOARD_EB:
>          break;
> diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c
> index 8f1a5ea..b0a29f1 100644
> --- a/hw/arm/vexpress.c
> +++ b/hw/arm/vexpress.c
> @@ -556,6 +556,7 @@ static void vexpress_common_init(MachineState *machine)
>      const hwaddr *map = daughterboard->motherboard_map;
>      int i;
>  
> +    machine->kernel_irqchip_type = KVM_DEV_TYPE_ARM_VGIC_V2;
>      daughterboard->init(vms, machine->ram_size, machine->cpu_model, pic);
>  
>      /*
> -- 
> 1.9.5.msysgit.0
> 
>
diff mbox

Patch

diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c
index d644db1..d4136bc 100644
--- a/hw/arm/exynos4_boards.c
+++ b/hw/arm/exynos4_boards.c
@@ -104,6 +104,7 @@  static Exynos4210State *exynos4_boards_init_common(MachineState *machine,
                 exynos4_machines[board_type].max_cpus);
     }
 
+    machine->kernel_irqchip_type = KVM_DEV_TYPE_ARM_VGIC_V2;
     exynos4_board_binfo.ram_size = exynos4_board_ram_size[board_type];
     exynos4_board_binfo.board_id = exynos4_board_id[board_type];
     exynos4_board_binfo.smp_bootreg_addr =
diff --git a/hw/arm/realview.c b/hw/arm/realview.c
index ef2788d..f670d9f 100644
--- a/hw/arm/realview.c
+++ b/hw/arm/realview.c
@@ -74,6 +74,7 @@  static void realview_init(MachineState *machine,
     ram_addr_t ram_size = machine->ram_size;
     hwaddr periphbase = 0;
 
+    machine->kernel_irqchip_type = KVM_DEV_TYPE_ARM_VGIC_V2;
     switch (board_type) {
     case BOARD_EB:
         break;
diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c
index 8f1a5ea..b0a29f1 100644
--- a/hw/arm/vexpress.c
+++ b/hw/arm/vexpress.c
@@ -556,6 +556,7 @@  static void vexpress_common_init(MachineState *machine)
     const hwaddr *map = daughterboard->motherboard_map;
     int i;
 
+    machine->kernel_irqchip_type = KVM_DEV_TYPE_ARM_VGIC_V2;
     daughterboard->init(vms, machine->ram_size, machine->cpu_model, pic);
 
     /*