lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7966fc16-6805-44d4-b24c-1281475e7ca9@habana.ai>
Date: Wed, 19 Jun 2024 07:04:13 +0000
From: Tomer Tayar <ttayar@...ana.ai>
To: Ofir Bitton <obitton@...ana.ai>,
        "dri-devel@...ts.freedesktop.org"
	<dri-devel@...ts.freedesktop.org>,
        "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/9] accel/habanalbs/gaudi2: reduce interrupt count to 128

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@...ana.ai>
> Reviewed-by: Ofir Bitton <obitton@...ana.ai>

Reviewed-by: Tomer Tayar <ttayar@...ana.ai>

> ---
>   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 */
>   


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ