- 30 11月, 2020 15 次提交
-
-
由 Tal Cohen 提交于
In the future there will be situations where queues can accept either kernel allocated CBs or user allocated CBs, depending on different states. Therefore, instead of using a boolean variable of kernel/user allocated CB, we need to use a bitmask to indicate that, which will allow to combine the two options. Add a flag to the uapi so the user will be able to indicate whether the CB was allocated by kernel or by user. Of course the driver validates that. Signed-off-by: NTal Cohen <talcohen@habana.ai> Reviewed-by: NOded Gabbay <ogabbay@kernel.org> Signed-off-by: NOded Gabbay <ogabbay@kernel.org>
-
由 Oded Gabbay 提交于
Initialize the QMANs that are responsible to submit doorbells to the NIC engines. Add support for stopping and disabling them, and reset them as part of the hard-reset procedure of GAUDI. This will allow the user to submit work to the NICs. Add support for receiving events on QMAN errors from the firmware. However, the nic_ports_mask is still initialized to 0. That means this code won't initialize the QMANs just yet. That will be in a later patch. Signed-off-by: NOmer Shpigelman <oshpigelman@habana.ai> Reviewed-by: NOded Gabbay <ogabbay@kernel.org> Signed-off-by: NOded Gabbay <ogabbay@kernel.org>
-
由 Oded Gabbay 提交于
Configure the security properties of the NIC IP. This is to prevent the user process from doing something with the NIC that he shouldn't do. e.g. crash the server, steal data, etc. Signed-off-by: NOmer Shpigelman <oshpigelman@habana.ai> Reviewed-by: NOded Gabbay <ogabbay@kernel.org> Signed-off-by: NOded Gabbay <ogabbay@kernel.org>
-
由 Oded Gabbay 提交于
Add new structures and messages that the driver use to interact with the firmware to receive information and events (errors) about GAUDI's NIC. Signed-off-by: NOmer Shpigelman <oshpigelman@habana.ai> Reviewed-by: NOded Gabbay <ogabbay@kernel.org> Signed-off-by: NOded Gabbay <ogabbay@kernel.org>
-
由 Oded Gabbay 提交于
Add auto-generated header files that describe the NIC QMANs registers used by the driver. Signed-off-by: NOmer Shpigelman <oshpigelman@habana.ai> Reviewed-by: NOded Gabbay <ogabbay@kernel.org> Signed-off-by: NOded Gabbay <ogabbay@kernel.org>
-
由 Oded Gabbay 提交于
We already check if queue index is smaller than max queues a few lines above this check so no need to check this again. Signed-off-by: NOded Gabbay <ogabbay@kernel.org>
-
由 Ofir Bitton 提交于
Refactor sync stream implementation by reducing function length for better readability. Signed-off-by: NOfir Bitton <obitton@habana.ai> Reviewed-by: NOded Gabbay <ogabbay@kernel.org> Signed-off-by: NOded Gabbay <ogabbay@kernel.org>
-
由 Ofir Bitton 提交于
Support advanced monitor functionality to monitor more than a single SOB. In addition expand all CB generation functions with buffer offset in order to put in them multiple packets that are generated by different functions. Signed-off-by: NOfir Bitton <obitton@habana.ai> Reviewed-by: NOded Gabbay <ogabbay@kernel.org> Signed-off-by: NOded Gabbay <ogabbay@kernel.org>
-
由 Ofir Bitton 提交于
Refactor sync stream implementation by adding more structures for better readability. In addition reducing allocated resources. Signed-off-by: NOfir Bitton <obitton@habana.ai> Reviewed-by: NOded Gabbay <ogabbay@kernel.org> Signed-off-by: NOded Gabbay <ogabbay@kernel.org>
-
由 Oded Gabbay 提交于
In case we are running without MMU enabled (debug mode), no need to initialize the VM module in the driver. Signed-off-by: NOded Gabbay <ogabbay@kernel.org>
-
由 Oded Gabbay 提交于
No need to print when the driver starts to initialize the H/W. Drivers should be silent when everything is OK. Signed-off-by: NOded Gabbay <ogabbay@kernel.org>
-
由 Oded Gabbay 提交于
The driver now loads the firmware in two stages. For debugging purposes we need to support situations where only the first stage firmware is loaded. Therefore, use a bitmask to determine which F/W is loaded Signed-off-by: NOded Gabbay <ogabbay@kernel.org>
-
由 Oded Gabbay 提交于
F/W can be loaded but device CPU queues disabled. In that case, HWMON should be disabled. This is only relevant when debugging Signed-off-by: NOded Gabbay <ogabbay@kernel.org>
-
由 Ofir Bitton 提交于
Currently mmu_prepare is located at context switch. Since we support a single context, no reason to reconfigure the MMU registers every context switch. Signed-off-by: NOfir Bitton <obitton@habana.ai> Reviewed-by: NOded Gabbay <ogabbay@kernel.org> Signed-off-by: NOded Gabbay <ogabbay@kernel.org>
-
由 Oded Gabbay 提交于
In case we will have multiple contexts/processes, we can't just increment aggregated counters. We need to make them atomic as they can be incremented by multiple processes Signed-off-by: NOded Gabbay <ogabbay@kernel.org>
-
- 24 11月, 2020 1 次提交
-
-
由 Oded Gabbay 提交于
There is missing statement and missing "break;" in the ECC handling code in gaudi.c This will cause a wrong behavior upon certain ECC interrupts. Signed-off-by: NOded Gabbay <ogabbay@kernel.org>
-
- 14 11月, 2020 1 次提交
-
-
由 Jonathan Neuschäfer 提交于
To save the interested reader some time, add examples of AT25 part numbers that correspond to EEPROMs rather than flashes. Signed-off-by: NJonathan Neuschäfer <j.neuschaefer@gmx.net> Link: https://lore.kernel.org/r/20201107133337.1066271-1-j.neuschaefer@gmx.netSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 10 11月, 2020 3 次提交
-
-
由 Kai Ye 提交于
The spelling of "Hisilicon" is modified. Reviewed-by: NZhou Wang <wangzhou1@hisilicon.com> Reviewed-by: NJonathan Cameron <Jonathan.Cameron@Huawei.com> Acked-by: NZhangfei Gao <zhangfei.gao@linaro.org> Signed-off-by: NKai Ye <yekai13@huawei.com> Link: https://lore.kernel.org/r/1604309965-21752-3-git-send-email-yekai13@huawei.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kai Ye 提交于
Delete some redundant code. Reviewed-by: NZhou Wang <wangzhou1@hisilicon.com> Reviewed-by: NJonathan Cameron <Jonathan.Cameron@Huawei.com> Acked-by: NZhangfei Gao <zhangfei.gao@linaro.org> Signed-off-by: NKai Ye <yekai13@huawei.com> Link: https://lore.kernel.org/r/1604309965-21752-2-git-send-email-yekai13@huawei.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Mauro Carvalho Chehab 提交于
A function has a different name between their prototype and its kernel-doc markup. Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/56b4cc6308fe6b6133b95c7d9116ed6fbaaabe9f.1603469755.git.mchehab+huawei@kernel.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 04 11月, 2020 3 次提交
-
-
由 Oded Gabbay 提交于
This interrupt cause is not relevant because of how the user use the QMAN arbitration mechanism. We must mask it as the log explodes with it. Signed-off-by: NOded Gabbay <ogabbay@kernel.org>
-
由 Ofir Bitton 提交于
We must relocate the coresight mmu configuration to the coresight flow to make it work in case the first submission is to configure the profiler. Signed-off-by: NOfir Bitton <obitton@habana.ai> Reviewed-by: NOded Gabbay <ogabbay@kernel.org> Signed-off-by: NOded Gabbay <ogabbay@kernel.org>
-
由 Arnd Bergmann 提交于
All throughout the driver, normal kernel pointers are stored as 'u64' struct members, which is kind of silly and requires casting through a uintptr_t to void* every time they are used. There is one line that missed the intermediate uintptr_t case, which leads to a compiler warning: drivers/misc/habanalabs/common/command_buffer.c: In function 'hl_cb_mmap': drivers/misc/habanalabs/common/command_buffer.c:512:44: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 512 | rc = hdev->asic_funcs->cb_mmap(hdev, vma, (void *) cb->kernel_address, Rather than adding one more cast, just fix the type and remove all the other casts. Fixes: 0db57535 ("habanalabs: make use of dma_mmap_coherent") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NOded Gabbay <oded.gabbay@gmail.com> Signed-off-by: NOded Gabbay <ogabbay@kernel.org>
-
- 03 11月, 2020 9 次提交
-
-
由 Alexander Usyskin 提交于
A receive callback is queued while the client is still connected but can still be called after the client was disconnected. Upon disconnect cl->me_cl is set to NULL, hence we need to check that ME client is not-NULL in mei_cl_mtu to avoid null dereference. Cc: <stable@vger.kernel.org> Signed-off-by: NAlexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: NTomas Winkler <tomas.winkler@intel.com> Link: https://lore.kernel.org/r/20201029095444.957924-2-tomas.winkler@intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Alexander Usyskin 提交于
If the initialization procedure for receive or receive callback registration on the client bus has failed the caller can't re-run it. Deinitilize the callback pointers and cancel the work to allow the caller to retry. Signed-off-by: NAlexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: NTomas Winkler <tomas.winkler@intel.com> Link: https://lore.kernel.org/r/20201029095444.957924-4-tomas.winkler@intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Alexander Usyskin 提交于
Avoid queuing reads and registering rx callbacks in case the client is not connected, to prevent null dereferencing and memory leaks. Signed-off-by: NAlexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: NTomas Winkler <tomas.winkler@intel.com> Link: https://lore.kernel.org/r/20201029095444.957924-3-tomas.winkler@intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Lee Jones 提交于
Fixes the following W=1 kernel build warning(s): drivers/misc/ocxl/config.c:81: warning: Function parameter or member 'dev' not described in 'get_function_0' drivers/misc/ocxl/config.c:81: warning: Excess function parameter 'device' description in 'get_function_0' Cc: Frederic Barrat <fbarrat@linux.ibm.com> Cc: Andrew Donnellan <ajd@linux.ibm.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linuxppc-dev@lists.ozlabs.org Acked-by: NFrederic Barrat <fbarrat@linux.ibm.com> Acked-by: NAndrew Donnellan <ajd@linux.ibm.com> Signed-off-by: NLee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20201102142001.560490-2-lee.jones@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Lee Jones 提交于
Currently the 'c2dev' device data is not initialised when it's allocated. There maybe an issue when using strncpy() to populate the 'name' attribute since a NUL terminator may not be provided in all use-cases. To prevent such a failing, let's ensure the 'c2dev' device data area is fully zeroed out on allocation. Cc: Rodolfo Giometti <giometti@enneenne.com> Cc: "Eurotech S.p.A" <info@eurotech.it> Cc: David Laight <David.Laight@aculab.com> Reported-by: NGeert Uytterhoeven <geert+renesas@glider.be> Acked-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NLee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20201102142001.560490-1-lee.jones@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Harshal Chaudhari 提交于
if (_IOC_TYPE(cmd) != PP_IOCTL) return -ENOTTY; Invalid ioctl command check normally performs by “default” case. if (_IOC_DIR(cmd) != _IOC_NONE) { argp = (void __user *)arg; if (!argp) return -EINVAL; } And for checking ioctl arguments, copy_from_user()/copy_to_user() checks are enough. Reviewed-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NHarshal Chaudhari <harshalchau04@gmail.com> Link: https://lore.kernel.org/r/20201101170949.18616-1-harshalchau04@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Gustavo Pimentel 提交于
The first condition of the if statement can never be true, because bar variable is an enum variable type defined between 0 and 5, and also bar variable acquires the value from arg function parameter which is an unsigned long variable. The constant 5 was replaced the the equivalent enum type, in this case BAR_5. Signed-off-by: NGustavo Pimentel <gustavo.pimentel@synopsys.com> Link: https://lore.kernel.org/r/142cbbc215bed4243a219ea17b46f4256ceccb22.1603315690.git.gustavo.pimentel@synopsys.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Tom Rix 提交于
A semicolon is not needed after a switch statement. Signed-off-by: NTom Rix <trix@redhat.com> Link: https://lore.kernel.org/r/20201031152456.2146104-1-trix@redhat.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Tom Rix 提交于
A break is not needed if it is preceded by a return Signed-off-by: NTom Rix <trix@redhat.com> Link: https://lore.kernel.org/r/20201019191808.9891-1-trix@redhat.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 31 10月, 2020 1 次提交
-
-
由 Gustavo A. R. Silva 提交于
There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9/process/deprecated.html#zero-length-and-one-element-arraysSigned-off-by: NGustavo A. R. Silva <gustavoars@kernel.org>
-
- 29 10月, 2020 3 次提交
-
-
由 Harshal Chaudhari 提交于
Driver has a trivial helper function to convert the pointer argument and then call the native ioctl handler. But now we have a generic implementation for that, so we can use it. Signed-off-by: NHarshal Chaudhari <harshalchau04@gmail.com> Link: https://lore.kernel.org/r/20201026155801.16053-1-harshalchau04@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Sudip Mukherjee 提交于
Coccinelle suggested using PTR_ERR_OR_ZERO() and looking at the code, we can use PTR_ERR_OR_ZERO() instead of checking IS_ERR() and then doing 'return 0'. Tested-by: NLukas Bulwahn <lukas.bulwahn@gmail.com> Signed-off-by: NSudip Mukherjee <sudipm.mukherjee@gmail.com> Link: https://lore.kernel.org/r/20201026180026.3350-1-sudipm.mukherjee@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Sudeep Dutt 提交于
This patch removes the MIC drivers from the kernel tree since the corresponding devices have been discontinued. Removing the dma and char-misc changes in one patch and merging via the char-misc tree is best to avoid any potential build breakage. Cc: Nikhil Rao <nikhil.rao@intel.com> Reviewed-by: NAshutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: NSudeep Dutt <sudeep.dutt@intel.com> Acked-By: NVinod Koul <vkoul@kernel.org> Reviewed-by: NSherry Sun <sherry.sun@nxp.com> Link: https://lore.kernel.org/r/8c1443136563de34699d2c084df478181c205db4.1603854416.git.sudeep.dutt@intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 08 10月, 2020 1 次提交
-
-
由 Mauro Carvalho Chehab 提交于
The dependency should be just USB_ROLE_SWITCH, instead of CONFIG_USB_ROLE_SWITCH. Fixes: 2827d98b ("misc: Kconfig: add a new dependency for HISI_HIKEY_USB") Reported-by: NNathan Chancellor <natechancellor@gmail.com> Reviewed-by: NNathan Chancellor <natechancellor@gmail.com> Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/0b6dff854c4bb412c2c11f17803e84d61385415f.1602138248.git.mchehab+huawei@kernel.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 07 10月, 2020 3 次提交
-
-
由 Mauro Carvalho Chehab 提交于
As warned by Randy: on x86_64: CONFIG_USB_ROLE_SWITCH=m and HISI_HIKEY_USB=y. ld: drivers/misc/hisi_hikey_usb.o: in function `hisi_hikey_usb_remove': hisi_hikey_usb.c:(.text+0x61): undefined reference to `usb_role_switch_unregister' ld: hisi_hikey_usb.c:(.text+0xa4): undefined reference to `usb_role_switch_put' ld: drivers/misc/hisi_hikey_usb.o: in function `hub_usb_role_switch_set': hisi_hikey_usb.c:(.text+0xd3): undefined reference to `usb_role_switch_get_drvdata' ld: drivers/misc/hisi_hikey_usb.o: in function `relay_set_role_switch': hisi_hikey_usb.c:(.text+0x54d): undefined reference to `usb_role_switch_set_role' ld: drivers/misc/hisi_hikey_usb.o: in function `hisi_hikey_usb_probe': hisi_hikey_usb.c:(.text+0x8a5): undefined reference to `usb_role_switch_get' ld: hisi_hikey_usb.c:(.text+0xa08): undefined reference to `usb_role_switch_register' ld: hisi_hikey_usb.c:(.text+0xa6e): undefined reference to `usb_role_switch_put' Make it dependent on CONFIG_USB_ROLE_SWITCH. Reported-by: NRandy Dunlap <rdunlap@infradead.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/0e49432d0db9ee8429a9923a1d995935b6b83552.1602047370.git.mchehab+huawei@kernel.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Mike Travis 提交于
Add Copyrights to those files that have been updated for UV5 changes. Signed-off-by: NMike Travis <mike.travis@hpe.com> Signed-off-by: NBorislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/20201005203929.148656-14-mike.travis@hpe.com
-
由 Mike Travis 提交于
Update UV MMRs in uv_mmrs.h for UV5 based on Verilog output from the UV Hub hardware design files. This is the next UV architecture with a new class (UVY) being defined for 52 bit physical address masks. Uses a bitmask for UV arch identification so a single test can cover multiple versions. Includes other adjustments to match the uv_mmrs.h file to keep from encountering compile errors. New UV5 functionality is added in the patches that follow. [ Fix W=1 build warnings. ] Reported-by: Nkernel test robot <lkp@intel.com> Signed-off-by: NMike Travis <mike.travis@hpe.com> Signed-off-by: NBorislav Petkov <bp@suse.de> Reviewed-by: NSteve Wahl <steve.wahl@hpe.com> Link: https://lkml.kernel.org/r/20201005203929.148656-5-mike.travis@hpe.com
-