Re: [PATCH] hw/intc: Fix incorrect calculation of core in liointc_read() and liointc_write()

2020-11-04 Thread chen huacai
Hi, Philippe, On Wed, Nov 4, 2020 at 12:17 PM chen huacai wrote: > > Hi, Philippe and Jiaxun, > > On Wed, Nov 4, 2020 at 1:17 AM Philippe Mathieu-Daudé wrote: > > > > On 11/3/20 4:40 PM, Jiaxun Yang wrote: > > > 于 2020年11月3日 GMT+08:00 下午8:28:27, "Philippe Mathieu-Daudé" > > > 写到: > > >> On 11/

Re: [PATCH] hw/intc: Fix incorrect calculation of core in liointc_read() and liointc_write()

2020-11-03 Thread chen huacai
Hi, Philippe and Jiaxun, On Wed, Nov 4, 2020 at 1:17 AM Philippe Mathieu-Daudé wrote: > > On 11/3/20 4:40 PM, Jiaxun Yang wrote: > > 于 2020年11月3日 GMT+08:00 下午8:28:27, "Philippe Mathieu-Daudé" > > 写到: > >> On 11/3/20 10:32 AM, AlexChen wrote: > >>> According to the loongson spec > >>> (http://ww

Re: [PATCH] hw/intc: Fix incorrect calculation of core in liointc_read() and liointc_write()

2020-11-03 Thread Philippe Mathieu-Daudé
On 11/3/20 4:40 PM, Jiaxun Yang wrote: > 于 2020年11月3日 GMT+08:00 下午8:28:27, "Philippe Mathieu-Daudé" > 写到: >> On 11/3/20 10:32 AM, AlexChen wrote: >>> According to the loongson spec >>> (http://www.loongson.cn/uploadfile/cpu/3B1500/Loongson_3B1500_cpu_user_1.pdf) >>> and the macro definition(#defi

Re: [PATCH] hw/intc: Fix incorrect calculation of core in liointc_read() and liointc_write()

2020-11-03 Thread Jiaxun Yang
于 2020年11月3日 GMT+08:00 下午8:28:27, "Philippe Mathieu-Daudé" 写到: >On 11/3/20 10:32 AM, AlexChen wrote: >> According to the loongson spec >> (http://www.loongson.cn/uploadfile/cpu/3B1500/Loongson_3B1500_cpu_user_1.pdf) >> and the macro definition(#define R_PERCORE_ISR(x) (0x40 + 0x8 * x)), we know

Re: [PATCH] hw/intc: Fix incorrect calculation of core in liointc_read() and liointc_write()

2020-11-03 Thread Philippe Mathieu-Daudé
On 11/3/20 3:05 PM, AlexChen wrote: > On 2020/11/3 17:53, Jiaxun Yang wrote: >> >> >> 閸︼拷 2020/11/3 17:32, AlexChen 閸愭瑩浜�: >>> According to the loongson spec >>> (http://www.loongson.cn/uploadfile/cpu/3B1500/Loongson_3B1500_cpu_user_1.pdf) >>> and the macro definition(#define R_PERCORE_ISR(x) (0x40

Re: [PATCH] hw/intc: Fix incorrect calculation of core in liointc_read() and liointc_write()

2020-11-03 Thread AlexChen
On 2020/11/3 17:53, Jiaxun Yang wrote: > > > 在 2020/11/3 17:32, AlexChen 写道: >> According to the loongson spec >> (http://www.loongson.cn/uploadfile/cpu/3B1500/Loongson_3B1500_cpu_user_1.pdf) >> and the macro definition(#define R_PERCORE_ISR(x) (0x40 + 0x8 * x)), we know >> that the ISR size of p

Re: [PATCH] hw/intc: Fix incorrect calculation of core in liointc_read() and liointc_write()

2020-11-03 Thread Philippe Mathieu-Daudé
On 11/3/20 10:32 AM, AlexChen wrote: > According to the loongson spec > (http://www.loongson.cn/uploadfile/cpu/3B1500/Loongson_3B1500_cpu_user_1.pdf) > and the macro definition(#define R_PERCORE_ISR(x) (0x40 + 0x8 * x)), we know > that the ISR size of per CORE is 8, so here we need to divide > (add

Re: [PATCH] hw/intc: Fix incorrect calculation of core in liointc_read() and liointc_write()

2020-11-03 Thread Philippe Mathieu-Daudé
On 11/3/20 10:32 AM, AlexChen wrote: > According to the loongson spec > (http://www.loongson.cn/uploadfile/cpu/3B1500/Loongson_3B1500_cpu_user_1.pdf) > and the macro definition(#define R_PERCORE_ISR(x) (0x40 + 0x8 * x)), we know > that the ISR size of per CORE is 8, so here we need to divide > (add

Re: [PATCH] hw/intc: Fix incorrect calculation of core in liointc_read() and liointc_write()

2020-11-03 Thread Jiaxun Yang
在 2020/11/3 17:32, AlexChen 写道: According to the loongson spec (http://www.loongson.cn/uploadfile/cpu/3B1500/Loongson_3B1500_cpu_user_1.pdf) and the macro definition(#define R_PERCORE_ISR(x) (0x40 + 0x8 * x)), we know that the ISR size of per CORE is 8, so here we need to divide (addr - R_PERC

[PATCH] hw/intc: Fix incorrect calculation of core in liointc_read() and liointc_write()

2020-11-03 Thread AlexChen
According to the loongson spec (http://www.loongson.cn/uploadfile/cpu/3B1500/Loongson_3B1500_cpu_user_1.pdf) and the macro definition(#define R_PERCORE_ISR(x) (0x40 + 0x8 * x)), we know that the ISR size of per CORE is 8, so here we need to divide (addr - R_PERCORE_ISR(0)) by 8, not 4. Reported-by