Re: [PATCH 1/9] accel/habanalbs/gaudi2: reduce interrupt count to 128

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 19/06/2024 9:34, Ofir Bitton wrote:
> Some systems allow a maximum number of 128 MSI-X interrupts.
> Hence we reduce the interrupt count to 128 instead of 512.
>
> Signed-off-by: Ofir Bitton <obitton@xxxxxxxxx>
> Reviewed-by: Ofir Bitton <obitton@xxxxxxxxx>

Reviewed-by: Tomer Tayar <ttayar@xxxxxxxxx>

> ---
>   drivers/accel/habanalabs/gaudi2/gaudi2P.h        | 8 ++++----
>   drivers/accel/habanalabs/include/gaudi2/gaudi2.h | 4 ++--
>   2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/accel/habanalabs/gaudi2/gaudi2P.h b/drivers/accel/habanalabs/gaudi2/gaudi2P.h
> index eee41387b269..05117272cac7 100644
> --- a/drivers/accel/habanalabs/gaudi2/gaudi2P.h
> +++ b/drivers/accel/habanalabs/gaudi2/gaudi2P.h
> @@ -384,7 +384,7 @@ enum gaudi2_edma_id {
>   /* User interrupt count is aligned with HW CQ count.
>    * We have 64 CQ's per dcore, CQ0 in dcore 0 is reserved for legacy mode
>    */
> -#define GAUDI2_NUM_USER_INTERRUPTS 255
> +#define GAUDI2_NUM_USER_INTERRUPTS 64
>   #define GAUDI2_NUM_RESERVED_INTERRUPTS 1
>   #define GAUDI2_TOTAL_USER_INTERRUPTS (GAUDI2_NUM_USER_INTERRUPTS + GAUDI2_NUM_RESERVED_INTERRUPTS)
>   
> @@ -416,11 +416,11 @@ enum gaudi2_irq_num {
>   	GAUDI2_IRQ_NUM_NIC_PORT_LAST = (GAUDI2_IRQ_NUM_NIC_PORT_FIRST + NIC_NUMBER_OF_PORTS - 1),
>   	GAUDI2_IRQ_NUM_TPC_ASSERT,
>   	GAUDI2_IRQ_NUM_EQ_ERROR,
> +	GAUDI2_IRQ_NUM_USER_FIRST,
> +	GAUDI2_IRQ_NUM_USER_LAST = (GAUDI2_IRQ_NUM_USER_FIRST + GAUDI2_NUM_USER_INTERRUPTS - 1),
>   	GAUDI2_IRQ_NUM_RESERVED_FIRST,
> -	GAUDI2_IRQ_NUM_RESERVED_LAST = (GAUDI2_MSIX_ENTRIES - GAUDI2_TOTAL_USER_INTERRUPTS - 1),
> +	GAUDI2_IRQ_NUM_RESERVED_LAST = (GAUDI2_MSIX_ENTRIES - GAUDI2_NUM_RESERVED_INTERRUPTS - 1),
>   	GAUDI2_IRQ_NUM_UNEXPECTED_ERROR = RESERVED_MSIX_UNEXPECTED_USER_ERROR_INTERRUPT,
> -	GAUDI2_IRQ_NUM_USER_FIRST = GAUDI2_IRQ_NUM_UNEXPECTED_ERROR + 1,
> -	GAUDI2_IRQ_NUM_USER_LAST = (GAUDI2_IRQ_NUM_USER_FIRST + GAUDI2_NUM_USER_INTERRUPTS - 1),
>   	GAUDI2_IRQ_NUM_LAST = (GAUDI2_MSIX_ENTRIES - 1)
>   };
>   
> diff --git a/drivers/accel/habanalabs/include/gaudi2/gaudi2.h b/drivers/accel/habanalabs/include/gaudi2/gaudi2.h
> index 0231d6c55b4a..753d46a2836b 100644
> --- a/drivers/accel/habanalabs/include/gaudi2/gaudi2.h
> +++ b/drivers/accel/habanalabs/include/gaudi2/gaudi2.h
> @@ -63,9 +63,9 @@
>   #define RESERVED_VA_RANGE_FOR_ARC_ON_HOST_HPAGE_START	0xFFF0F80000000000ull
>   #define RESERVED_VA_RANGE_FOR_ARC_ON_HOST_HPAGE_END	0xFFF0FFFFFFFFFFFFull
>   
> -#define RESERVED_MSIX_UNEXPECTED_USER_ERROR_INTERRUPT	256
> +#define RESERVED_MSIX_UNEXPECTED_USER_ERROR_INTERRUPT	127
>   
> -#define GAUDI2_MSIX_ENTRIES	512
> +#define GAUDI2_MSIX_ENTRIES	128
>   
>   #define QMAN_PQ_ENTRY_SIZE	16			/* Bytes */
>   






[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux