diff mbox series

hw/loongarch: Remove unimplemented extioi INT_encode mode

Message ID 20240718072557.724242-1-gaosong@loongson.cn (mailing list archive)
State New, archived
Headers show
Series hw/loongarch: Remove unimplemented extioi INT_encode mode | expand

Commit Message

gaosong July 18, 2024, 7:25 a.m. UTC
Remove extioi INT_encode encode mode, because we don't emulate it.

Signed-off-by: Song Gao <gaosong@loongson.cn>
---
 hw/loongarch/virt.c                | 6 ------
 include/hw/intc/loongarch_extioi.h | 1 -
 2 files changed, 7 deletions(-)

Comments

bibo mao July 18, 2024, 8:20 a.m. UTC | #1
On 2024/7/18 下午3:25, Song Gao wrote:
> Remove extioi INT_encode encode mode, because we don't emulate it.
> 
> Signed-off-by: Song Gao <gaosong@loongson.cn>
> ---
>   hw/loongarch/virt.c                | 6 ------
>   include/hw/intc/loongarch_extioi.h | 1 -
>   2 files changed, 7 deletions(-)
> 
> diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
> index e592b1b6b7..2103a1069f 100644
> --- a/hw/loongarch/virt.c
> +++ b/hw/loongarch/virt.c
> @@ -951,9 +951,6 @@ static MemTxResult virt_iocsr_misc_write(void *opaque, hwaddr addr,
>           if (val & BIT_ULL(IOCSRM_EXTIOI_EN)) {
>               features |= BIT(EXTIOI_ENABLE);
>           }
> -        if (val & BIT_ULL(IOCSRM_EXTIOI_INT_ENCODE)) {
> -            features |= BIT(EXTIOI_ENABLE_INT_ENCODE);
> -        }
I do not think this modification is necessary.

>   
>           address_space_stl(&lvms->as_iocsr,
>                             EXTIOI_VIRT_BASE + EXTIOI_VIRT_CONFIG,
> @@ -1002,9 +999,6 @@ static MemTxResult virt_iocsr_misc_read(void *opaque, hwaddr addr,
>           if (features & BIT(EXTIOI_ENABLE)) {
>               ret |= BIT_ULL(IOCSRM_EXTIOI_EN);
>           }
> -        if (features & BIT(EXTIOI_ENABLE_INT_ENCODE)) {
> -            ret |= BIT_ULL(IOCSRM_EXTIOI_INT_ENCODE);
> -        }
Ditto, I do not think this modification is necessary also.
>           break;
>       default:
>           g_assert_not_reached();
> diff --git a/include/hw/intc/loongarch_extioi.h b/include/hw/intc/loongarch_extioi.h
> index eccc2e0d18..626a37dfa1 100644
> --- a/include/hw/intc/loongarch_extioi.h
> +++ b/include/hw/intc/loongarch_extioi.h
> @@ -50,7 +50,6 @@
>   #define  EXTIOI_HAS_CPU_ENCODE       (3)
>   #define  EXTIOI_VIRT_HAS_FEATURES    (BIT(EXTIOI_HAS_VIRT_EXTENSION)  \
>                                         | BIT(EXTIOI_HAS_ENABLE_OPTION) \
> -                                      | BIT(EXTIOI_HAS_INT_ENCODE)    \
>                                         | BIT(EXTIOI_HAS_CPU_ENCODE))
Only this modification will be ok.

Regards
Bibo Mao
>   #define EXTIOI_VIRT_CONFIG           (0x4)
>   #define  EXTIOI_ENABLE               (1)
>
diff mbox series

Patch

diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index e592b1b6b7..2103a1069f 100644
--- a/hw/loongarch/virt.c
+++ b/hw/loongarch/virt.c
@@ -951,9 +951,6 @@  static MemTxResult virt_iocsr_misc_write(void *opaque, hwaddr addr,
         if (val & BIT_ULL(IOCSRM_EXTIOI_EN)) {
             features |= BIT(EXTIOI_ENABLE);
         }
-        if (val & BIT_ULL(IOCSRM_EXTIOI_INT_ENCODE)) {
-            features |= BIT(EXTIOI_ENABLE_INT_ENCODE);
-        }
 
         address_space_stl(&lvms->as_iocsr,
                           EXTIOI_VIRT_BASE + EXTIOI_VIRT_CONFIG,
@@ -1002,9 +999,6 @@  static MemTxResult virt_iocsr_misc_read(void *opaque, hwaddr addr,
         if (features & BIT(EXTIOI_ENABLE)) {
             ret |= BIT_ULL(IOCSRM_EXTIOI_EN);
         }
-        if (features & BIT(EXTIOI_ENABLE_INT_ENCODE)) {
-            ret |= BIT_ULL(IOCSRM_EXTIOI_INT_ENCODE);
-        }
         break;
     default:
         g_assert_not_reached();
diff --git a/include/hw/intc/loongarch_extioi.h b/include/hw/intc/loongarch_extioi.h
index eccc2e0d18..626a37dfa1 100644
--- a/include/hw/intc/loongarch_extioi.h
+++ b/include/hw/intc/loongarch_extioi.h
@@ -50,7 +50,6 @@ 
 #define  EXTIOI_HAS_CPU_ENCODE       (3)
 #define  EXTIOI_VIRT_HAS_FEATURES    (BIT(EXTIOI_HAS_VIRT_EXTENSION)  \
                                       | BIT(EXTIOI_HAS_ENABLE_OPTION) \
-                                      | BIT(EXTIOI_HAS_INT_ENCODE)    \
                                       | BIT(EXTIOI_HAS_CPU_ENCODE))
 #define EXTIOI_VIRT_CONFIG           (0x4)
 #define  EXTIOI_ENABLE               (1)