hw/openrisc: use right OMPIC size variable
PATCH 1/1 hw/openrisc: use right OMPIC size variable
This appears to be a copy and paste error. The UART size was used instead of the much smaller OMPIC size.
--- hw/openrisc/openrisc_sim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/openrisc/openrisc_sim.c +1 -1
@@ -410,7 +410,7 @@ static void openrisc_sim_init(MachineState *machine)if (smp_cpus >1 ) {openrisc_sim_ompic_init (state, or1ksim_memmap[OR1KSIM_OMPIC ].base, - or1ksim_memmap[OR1KSIM_UART ].size, + or1ksim_memmap[OR1KSIM_OMPIC ].size, smp_cpus, cpus,OR1KSIM_OMPIC_IRQ ); }
Signature · 1 line
2.35.1
PATCH 1/1 hw/openrisc: use right OMPIC size variable
Quoted 7 lines · Jason A. Donenfeld
This appears to be a copy and paste error. The UART size was used instead of the much smaller OMPIC size.
Signed-off-by Jason A. Donenfeld<[email protected]>--- hw/openrisc/openrisc_sim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
r~
PATCH 1/1 hw/openrisc: use right OMPIC size variable
Quoted 10 lines · Richard Henderson
Quoted 7 lines · Jason A. Donenfeld
This appears to be a copy and paste error. The UART size was used instead of the much smaller OMPIC size.
Signed-off-by Jason A. Donenfeld<[email protected]>--- hw/openrisc/openrisc_sim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Reviewed-by Richard Henderson <[email protected]>
Thanks,
I will queue this one.
PATCH 1/1 hw/openrisc: use right OMPIC size variable
Quoted 10 lines · Stafford Horne
Quoted 9 lines · Richard Henderson
Quoted 7 lines · Jason A. Donenfeld
This appears to be a copy and paste error. The UART size was used instead of the much smaller OMPIC size.
Signed-off-by Jason A. Donenfeld<[email protected]>--- hw/openrisc/openrisc_sim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 6 lines
Quoted 1 line
Reviewed-by Richard Henderson <[email protected]>Thanks,
I will queue this one.
Please take a look at the v2 I posted instead.
PATCH v2 1/1 hw/openrisc: use right OMPIC size variable
In reply to Jason A. DonenfeldThis appears to be a copy and paste error. The UART size was used instead of the much smaller OMPIC size. But actually that smaller OMPIC size is wrong too and doesn't allow the IPI to work in Linux. So set it to the old value.
--- hw/openrisc/openrisc_sim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/openrisc/openrisc_sim.c +2 -2
@@ -78,7 +78,7 @@ static const struct MemmapEntry { [OR1KSIM_DRAM] = { 0x00000000, 0 }, [OR1KSIM_UART] = { 0x90000000, 0x100 }, [OR1KSIM_ETHOC] = { 0x92000000, 0x800 }, - [OR1KSIM_OMPIC] = { 0x98000000, 16 }, + [OR1KSIM_OMPIC] = { 0x98000000, 0x100 }, }; static struct openrisc_boot_info {
@@ -410,7 +410,7 @@ static void openrisc_sim_init(MachineState *machine)if (smp_cpus >1 ) {openrisc_sim_ompic_init (state, or1ksim_memmap[OR1KSIM_OMPIC ].base, - or1ksim_memmap[OR1KSIM_UART ].size, + or1ksim_memmap[OR1KSIM_OMPIC ].size, smp_cpus, cpus,OR1KSIM_OMPIC_IRQ ); }
Signature · 1 line
2.35.1
PATCH v2 1/1 hw/openrisc: use right OMPIC size variable
Quoted 15 lines · Jason A. Donenfeld
This appears to be a copy and paste error. The UART size was used instead of the much smaller OMPIC size. But actually that smaller OMPIC size is wrong too and doesn't allow the IPI to work in Linux. So set it to the old value.
Signed-off-by Jason A. Donenfeld <[email protected]>--- hw/openrisc/openrisc_sim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/openrisc/openrisc_sim.c +0
-0
hw/openrisc/openrisc_sim.c static const struct MemmapEntry { · line 81
Quoted 5 lines
hw/openrisc/openrisc_sim.c +1
-1@@ -78,7 +78,7 @@ static const struct MemmapEntry { [OR1KSIM_DRAM] = { 0x00000000, 0 }, [OR1KSIM_UART] = { 0x90000000, 0x100 }, [OR1KSIM_ETHOC] = { 0x92000000, 0x800 }, - [OR1KSIM_OMPIC] = { 0x98000000, 16 }, + [OR1KSIM_OMPIC] = { 0x98000000, 0x100 },
Right, I missed this as part of my series. OMPIC will allocate 2 32-bit registers per CPU. I documented this here:
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/irqchip/irq-ompic.c
I think what we will want here is something like:
[OR1KSIM_OMPIC] = { 0x98000000, 8 * OR1KSIM_CPUS_MAX },
Quoted 15 lines
hw/openrisc/openrisc_sim.c +1
-1}; static struct openrisc_boot_info {@@ -410,7 +410,7 @@ static void openrisc_sim_init(MachineState *machine)if (smp_cpus >1 ) {openrisc_sim_ompic_init (state, or1ksim_memmap[OR1KSIM_OMPIC ].base, - or1ksim_memmap[OR1KSIM_UART ].size, + or1ksim_memmap[OR1KSIM_OMPIC ].size, smp_cpus, cpus,OR1KSIM_OMPIC_IRQ ); }Signature · 1 line
2.35.1
PATCH v2 1/1 hw/openrisc: use right OMPIC size variable
Quoted 26 lines · Stafford Horne
Quoted 15 lines · Jason A. Donenfeld
This appears to be a copy and paste error. The UART size was used instead of the much smaller OMPIC size. But actually that smaller OMPIC size is wrong too and doesn't allow the IPI to work in Linux. So set it to the old value.
Signed-off-by Jason A. Donenfeld <[email protected]>--- hw/openrisc/openrisc_sim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/openrisc/openrisc_sim.c +0
-0hw/openrisc/openrisc_sim.c static const struct MemmapEntry { · line 81
Quoted 5 lines
hw/openrisc/openrisc_sim.c +1
-1@@ -78,7 +78,7 @@ static const struct MemmapEntry { [OR1KSIM_DRAM] = { 0x00000000, 0 }, [OR1KSIM_UART] = { 0x90000000, 0x100 }, [OR1KSIM_ETHOC] = { 0x92000000, 0x800 }, - [OR1KSIM_OMPIC] = { 0x98000000, 16 }, + [OR1KSIM_OMPIC] = { 0x98000000, 0x100 },Right, I missed this as part of my series. OMPIC will allocate 2 32-bit registers per CPU. I documented this here:
Quoted 5 lines
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/irqchip/irq-ompic.c
I think what we will want here is something like:
[
OR1KSIM_OMPIC] = {0x98000000, 8 *OR1KSIM_CPUS_MAX},
Do you want a v3 or are you going to fix it up yourself?
Jason
PATCH v2 1/1 hw/openrisc: use right OMPIC size variable
Quoted 27 lines · Jason A. Donenfeld
Quoted 26 lines · Stafford Horne
Quoted 15 lines · Jason A. Donenfeld
This appears to be a copy and paste error. The UART size was used instead of the much smaller OMPIC size. But actually that smaller OMPIC size is wrong too and doesn't allow the IPI to work in Linux. So set it to the old value.
Signed-off-by Jason A. Donenfeld <[email protected]>--- hw/openrisc/openrisc_sim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/openrisc/openrisc_sim.c +0
-0hw/openrisc/openrisc_sim.c static const struct MemmapEntry { · line 81
Quoted 5 lines
hw/openrisc/openrisc_sim.c +1
-1@@ -78,7 +78,7 @@ static const struct MemmapEntry { [OR1KSIM_DRAM] = { 0x00000000, 0 }, [OR1KSIM_UART] = { 0x90000000, 0x100 }, [OR1KSIM_ETHOC] = { 0x92000000, 0x800 }, - [OR1KSIM_OMPIC] = { 0x98000000, 16 }, + [OR1KSIM_OMPIC] = { 0x98000000, 0x100 },Right, I missed this as part of my series. OMPIC will allocate 2 32-bit registers per CPU. I documented this here:
Quoted 7 lines
Quoted 5 lines
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/irqchip/irq-ompic.c
I think what we will want here is something like:
[
OR1KSIM_OMPIC] = {0x98000000, 8 *OR1KSIM_CPUS_MAX},Do you want a v3 or are you going to fix it up yourself?
I'll fix it up.
-Stafford