From: Greg KH <gregkh@linuxfoundation.org>
To: Oded Gabbay <ogabbay@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 12/12] habanalabs: enable gaudi2 code in driver
Date: Tue, 28 Jun 2022 08:29:07 +0200 [thread overview]
Message-ID: <Yrqfs3xUWwqHcbeR@kroah.com> (raw)
In-Reply-To: <20220627202620.961350-13-ogabbay@kernel.org>
On Mon, Jun 27, 2022 at 11:26:20PM +0300, Oded Gabbay wrote:
> Enable the Gaudi2 ASIC code in the pci probe callback of the driver so
> the driver will handle Gaudi2 ASICs.
>
> Add the PCI ID to the PCI table and add the ASIC enum value to all
> relevant places.
>
> Fixup the device parameters initialization for Gaudi2.
>
> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
> ---
> drivers/misc/habanalabs/common/device.c | 8 +++
> drivers/misc/habanalabs/common/habanalabs.h | 13 ++--
> .../misc/habanalabs/common/habanalabs_drv.c | 67 +++++++++++++++----
> drivers/misc/habanalabs/common/sysfs.c | 6 ++
> 4 files changed, 77 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/misc/habanalabs/common/device.c b/drivers/misc/habanalabs/common/device.c
> index 38cf2f1659ee..a4656eac495e 100644
> --- a/drivers/misc/habanalabs/common/device.c
> +++ b/drivers/misc/habanalabs/common/device.c
> @@ -645,6 +645,14 @@ static int device_early_init(struct hl_device *hdev)
> gaudi_set_asic_funcs(hdev);
> strscpy(hdev->asic_name, "GAUDI SEC", sizeof(hdev->asic_name));
> break;
> + case ASIC_GAUDI2:
> + gaudi2_set_asic_funcs(hdev);
> + strscpy(hdev->asic_name, "GAUDI2", sizeof(hdev->asic_name));
> + break;
> + case ASIC_GAUDI2_SEC:
> + gaudi2_set_asic_funcs(hdev);
> + strscpy(hdev->asic_name, "GAUDI2 SEC", sizeof(hdev->asic_name));
> + break;
> default:
> dev_err(hdev->dev, "Unrecognized ASIC type %d\n",
> hdev->asic_type);
> diff --git a/drivers/misc/habanalabs/common/habanalabs.h b/drivers/misc/habanalabs/common/habanalabs.h
> index 4537845658f8..587b1c537115 100644
> --- a/drivers/misc/habanalabs/common/habanalabs.h
> +++ b/drivers/misc/habanalabs/common/habanalabs.h
> @@ -3033,7 +3033,6 @@ struct hl_reset_info {
> * @disabled: is device disabled.
> * @late_init_done: is late init stage was done during initialization.
> * @hwmon_initialized: is H/W monitor sensors was initialized.
> - * @heartbeat: is heartbeat sanity check towards CPU-CP enabled.
You remove this field, but you still keep it in the structure, you just
move it later down to the bottom for some reason:
> * @reset_on_lockup: true if a reset should be done in case of stuck CS, false
> * otherwise.
> * @dram_default_page_mapping: is DRAM default page mapping enabled.
> @@ -3066,6 +3065,10 @@ struct hl_reset_info {
> * @is_compute_ctx_active: Whether there is an active compute context executing.
> * @compute_ctx_in_release: true if the current compute context is being released.
> * @supports_mmu_prefetch: true if prefetch is supported, otherwise false.
> + * @reset_upon_device_release: reset the device when the user closes the file descriptor of the
> + * device.
> + * @skip_iatu_for_unsecured_device: skip the device PCI controller initialization when working
> + * with device that runs f/w that is not secured.
> */
> struct hl_device {
> struct pci_dev *pdev;
> @@ -3175,7 +3178,6 @@ struct hl_device {
> u8 disabled;
> u8 late_init_done;
> u8 hwmon_initialized;
> - u8 heartbeat;
> u8 reset_on_lockup;
> u8 dram_default_page_mapping;
> u8 memory_scrub;
> @@ -3199,6 +3201,8 @@ struct hl_device {
> u8 is_compute_ctx_active;
> u8 compute_ctx_in_release;
> u8 supports_mmu_prefetch;
> + u8 reset_upon_device_release;
> + u8 skip_iatu_for_unsecured_device;
>
> /* Parameters for bring-up */
> u64 nic_ports_mask;
> @@ -3212,11 +3216,9 @@ struct hl_device {
> u8 dram_scrambler_enable;
> u8 hard_reset_on_fw_events;
> u8 bmc_enable;
> - u8 rl_enable;
> u8 reset_on_preboot_fail;
> - u8 reset_upon_device_release;
> - u8 skip_iatu_for_unsecured_device;
> u8 reset_if_device_not_idle;
> + u8 heartbeat;
> };
Did you mean to do that?
thanks,
greg k-h
next prev parent reply other threads:[~2022-06-28 6:29 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-27 20:26 [PATCH 00/12] Adding Gaudi2 ASIC support to habanalabs driver Oded Gabbay
2022-06-27 20:26 ` [PATCH 01/12] habanalabs/gaudi2: add asic registers header files Oded Gabbay
2022-06-28 6:28 ` Greg KH
2022-06-28 6:52 ` Oded Gabbay
2022-06-27 20:26 ` [PATCH 02/12] uapi: habanalabs: add gaudi2 defines Oded Gabbay
2022-06-28 6:33 ` Greg KH
2022-06-28 8:17 ` Oded Gabbay
2022-06-27 20:26 ` [PATCH 03/12] habanalabs: add gaudi2 asic-specific code Oded Gabbay
2022-06-27 20:26 ` [PATCH 04/12] habanalabs: add unsupported functions Oded Gabbay
2022-06-28 6:34 ` Greg KH
2022-06-28 8:20 ` Oded Gabbay
2022-06-28 6:34 ` Greg KH
2022-06-28 8:21 ` Oded Gabbay
2022-06-28 9:12 ` Greg KH
2022-06-28 9:13 ` Oded Gabbay
2022-06-27 20:26 ` [PATCH 05/12] habanalabs: initialize new asic properties Oded Gabbay
2022-06-27 20:26 ` [PATCH 06/12] habanalabs: add generic security module Oded Gabbay
2022-06-27 20:26 ` [PATCH 07/12] habanalabs/gaudi2: add gaudi2 " Oded Gabbay
2022-06-27 20:26 ` [PATCH 08/12] habanalabs/gaudi2: add gaudi2 profiler module Oded Gabbay
2022-06-27 20:26 ` [PATCH 09/12] habanalabs: add gaudi2 wait-for-CS support Oded Gabbay
2022-06-27 20:26 ` [PATCH 10/12] habanalabs: add gaudi2 MMU support Oded Gabbay
2022-06-27 20:26 ` [PATCH 11/12] habanalabs/gaudi2: add tpm attestation info uapi Oded Gabbay
2022-06-28 6:36 ` Greg KH
2022-06-28 8:51 ` Oded Gabbay
2022-06-28 9:12 ` Greg KH
2022-06-28 9:22 ` Oded Gabbay
2022-07-19 8:27 ` Oded Gabbay
2022-07-19 11:35 ` Greg KH
2022-06-27 20:26 ` [PATCH 12/12] habanalabs: enable gaudi2 code in driver Oded Gabbay
2022-06-28 6:29 ` Greg KH [this message]
2022-06-28 7:05 ` Oded Gabbay
2022-06-28 7:13 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yrqfs3xUWwqHcbeR@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ogabbay@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.