zhenwei pi
487709fa1b
misc: pvpanic: introduce device capability
...
According to pvpanic spec:
https://git.qemu.org/?p=qemu.git;a=blob_plain;f=docs/specs/pvpanic.txt
The guest should determine pvpanic capability by RDPT, so initialize
capability during device probing. There is no need to register panic
notifier callback function if no events supported.
Before sending event to host side, check capability firstly.
Suggested by Greg KH, use sysfs to expose capability to user space,
also add new sysfs attribute in document.
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com >
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com >
Link: https://lore.kernel.org/r/20210110115358.79100-2-pizhenwei@bytedance.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-27 14:28:17 +01:00
Andy Shevchenko
8ba59e9dee
misc: pti: Remove driver for deprecated platform
...
Intel Moorestown and Medfield are quite old Intel Atom based
32-bit platforms, which were in limited use in some Android phones,
tablets and consumer electronics more than eight years ago.
There are no bugs or problems ever reported outside from Intel
for breaking any of that platforms for years. It seems no real
users exists who run more or less fresh kernel on it. The commit
05f4434bc1 ("ASoC: Intel: remove mfld_machine") also in align
with this theory.
Due to above and to reduce a burden of supporting outdated drivers
we remove the support of outdated platforms completely.
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Acked-by: Linus Walleij <linus.walleij@linaro.org >
Acked-by: Arnd Bergmann <arnd@arndb.de >
Acked-by: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20210122114358.39299-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-27 13:35:01 +01:00
Tom Rix
c41e21dca8
sgi-xp: remove h from printk format specifier
...
This change fixes the checkpatch warning described in this commit
commit cbacb5ab0a ("docs: printk-formats: Stop encouraging use of
unnecessary %h[xudi] and %hh[xudi]")
Standard integer promotion is already done and %hx and %hhx is useless
so do not encourage the use of %hh[xudi] or %h[xudi].
Reviewed-By: Steve Wahl <steve.wahl@hpe.com >
Signed-off-by: Tom Rix <trix@redhat.com >
Link: https://lore.kernel.org/r/20210123160003.1777766-1-trix@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-26 19:36:02 +01:00
Jorgen Hansen
7eecea89e4
VMCI: Enforce queuepair max size for IOCTL_VMCI_QUEUEPAIR_ALLOC
...
When create the VMCI queue pair tracking data structures on the host
side, the IOCTL for creating the VMCI queue pair didn't validate
the queue pair size parameters. This change adds checks for this.
This avoids a memory allocation issue in qp_host_alloc_queue, as
reported by nslusarek@gmx.net . The check in qp_host_alloc_queue
has also been updated to enforce the maximum queue pair size
as defined by VMCI_MAX_GUEST_QP_MEMORY.
The fix has been verified using sample code supplied by
nslusarek@gmx.net .
Reported-by: nslusarek@gmx.net
Reviewed-by: Vishnu Dasa <vdasa@vmware.com >
Signed-off-by: Jorgen Hansen <jhansen@vmware.com >
Link: https://lore.kernel.org/r/1611160420-30573-1-git-send-email-jhansen@vmware.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-26 19:18:50 +01:00
Jorgen Hansen
5a16c53540
VMCI: Use set_page_dirty_lock() when unregistering guest memory
...
When the VMCI host support releases guest memory in the case where
the VM was killed, the pinned guest pages aren't locked. Use
set_page_dirty_lock() instead of set_page_dirty().
Testing done: Killed VM while having an active VMCI based vSocket
connection and observed warning from ext4. With this fix, no
warning was observed. Ran various vSocket tests without issues.
Fixes: 06164d2b72 ("VMCI: queue pairs implementation.")
Reviewed-by: Vishnu Dasa <vdasa@vmware.com >
Signed-off-by: Jorgen Hansen <jhansen@vmware.com >
Link: https://lore.kernel.org/r/1611160360-30299-1-git-send-email-jhansen@vmware.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-26 19:18:46 +01:00
Jorgen Hansen
e8266c4c33
VMCI: Stop log spew when qp allocation isn't possible
...
VMCI queue pair allocation is disabled, if a VM is in FT mode. In
these cases, VMware Tools may still once in a while attempt to
create a vSocket stream connection, resulting in multiple
warnings in the kernel logs. Therefore downgrade the error log to
a debug log.
Reviewed-by: Vishnu Dasa <vdasa@vmware.com >
Signed-off-by: Jorgen Hansen <jhansen@vmware.com >
Link: https://lore.kernel.org/r/1611160340-30158-1-git-send-email-jhansen@vmware.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-26 19:18:39 +01:00
mateng
fc716ffb9a
misc/vmw_vmci: fix typo
...
change 'addres' to 'address'
Signed-off-by: mateng <mateng@yulong.com >
Link: https://lore.kernel.org/r/20210126084010.1941-1-ayowoe@163.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-26 19:18:01 +01:00
Scott Branden
91ca10d6fa
misc: bcm-vk: add ttyVK support
...
Add ttyVK support to driver to allow console access to VK card from host.
Device node will be in the follow form /dev/bcm-vk.x_ttyVKy where:
x is the instance of the VK card
y is the tty device number on the VK card
Acked-by: Olof Johansson <olof@lixom.net >
Signed-off-by: Scott Branden <scott.branden@broadcom.com >
Link: https://lore.kernel.org/r/20210120175827.14820-14-scott.branden@broadcom.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-25 18:44:45 +01:00
Scott Branden
483050c047
misc: bcm-vk: add mmap function for exposing BAR2
...
Add mmap function that allows host application to open up BAR2 memory
for remote spooling out messages from the VK logger.
Co-developed-by: Desmond Yan <desmond.yan@broadcom.com >
Acked-by: Olof Johansson <olof@lixom.net >
Signed-off-by: Desmond Yan <desmond.yan@broadcom.com >
Signed-off-by: Scott Branden <scott.branden@broadcom.com >
Link: https://lore.kernel.org/r/20210120175827.14820-12-scott.branden@broadcom.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-25 18:44:45 +01:00
Scott Branden
d63d658f74
misc: bcm-vk: reset_pid support
...
Add reset support via ioctl.
Kill user processes that are open when VK card is reset.
If a particular PID has issued the reset request do not kill that process
as it issued the ioctl.
Co-developed-by: Desmond Yan <desmond.yan@broadcom.com >
Acked-by: Olof Johansson <olof@lixom.net >
Signed-off-by: Desmond Yan <desmond.yan@broadcom.com >
Signed-off-by: Scott Branden <scott.branden@broadcom.com >
Link: https://lore.kernel.org/r/20210120175827.14820-11-scott.branden@broadcom.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-25 18:44:45 +01:00
Scott Branden
111d746bb4
misc: bcm-vk: add VK messaging support
...
Add message support in order to be able to communicate
to VK card via message queues.
This info is used for debug purposes via collection of logs via direct
read of BAR space and by sysfs access (in a follow on commit).
Co-developed-by: Desmond Yan <desmond.yan@broadcom.com >
Acked-by: Olof Johansson <olof@lixom.net >
Signed-off-by: Desmond Yan <desmond.yan@broadcom.com >
Signed-off-by: Scott Branden <scott.branden@broadcom.com >
Link: https://lore.kernel.org/r/20210120175827.14820-10-scott.branden@broadcom.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-25 18:44:44 +01:00
Scott Branden
ff428d052b
misc: bcm-vk: add get_card_info, peerlog_info, and proc_mon_info
...
Add support to get card_info (details about card),
peerlog_info (to get details of peerlog on card),
and proc_mon_info (process monitoring on card).
This info is used for collection of logs via direct
read of BAR space and by sysfs access (in a follow on commit).
Co-developed-by: Desmond Yan <desmond.yan@broadcom.com >
Acked-by: Olof Johansson <olof@lixom.net >
Signed-off-by: Desmond Yan <desmond.yan@broadcom.com >
Signed-off-by: Scott Branden <scott.branden@broadcom.com >
Link: https://lore.kernel.org/r/20210120175827.14820-9-scott.branden@broadcom.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-25 18:44:44 +01:00
Scott Branden
7367e0ad77
misc: bcm-vk: add ioctl load_image
...
Add ioctl support to issue load_image operation to VK card.
Co-developed-by: Desmond Yan <desmond.yan@broadcom.com >
Co-developed-by: James Hu <james.hu@broadcom.com >
Acked-by: Olof Johansson <olof@lixom.net >
Signed-off-by: Desmond Yan <desmond.yan@broadcom.com >
Signed-off-by: James Hu <james.hu@broadcom.com >
Signed-off-by: Scott Branden <scott.branden@broadcom.com >
Link: https://lore.kernel.org/r/20210120175827.14820-8-scott.branden@broadcom.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-25 18:44:44 +01:00
Scott Branden
22c30607d1
misc: bcm-vk: add open/release
...
Add open/release to replace private data with context for other methods
to use. Reason for the context is because it is allowed for multiple
sessions to open sysfs. For each file open, when upper layer queries the
response, only those that are tied to a specified open should be returned.
Co-developed-by: Desmond Yan <desmond.yan@broadcom.com >
Acked-by: Olof Johansson <olof@lixom.net >
Signed-off-by: Desmond Yan <desmond.yan@broadcom.com >
Signed-off-by: Scott Branden <scott.branden@broadcom.com >
Link: https://lore.kernel.org/r/20210120175827.14820-7-scott.branden@broadcom.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-25 18:44:44 +01:00
Scott Branden
af22527e82
misc: bcm-vk: add triggers when host panic or reboots to notify card
...
Pass down an interrupt to card in case of panic or reboot so
that card can take appropriate action to perform a clean reset.
Uses kernel notifier block either directly (register on panic list),
or implicitly (add shutdown method for PCI device).
Co-developed-by: Desmond Yan <desmond.yan@broadcom.com >
Acked-by: Olof Johansson <olof@lixom.net >
Signed-off-by: Desmond Yan <desmond.yan@broadcom.com >
Signed-off-by: Scott Branden <scott.branden@broadcom.com >
Link: https://lore.kernel.org/r/20210120175827.14820-6-scott.branden@broadcom.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-25 18:44:44 +01:00
Scott Branden
bfc53e01d2
misc: bcm-vk: add misc device to Broadcom VK driver
...
Add misc device base support to create and remove devnode.
Additional misc functions for open/read/write/release/ioctl/sysfs, etc
will be added in follow on commits to allow for individual review.
Co-developed-by: Desmond Yan <desmond.yan@broadcom.com >
Acked-by: Olof Johansson <olof@lixom.net >
Signed-off-by: Desmond Yan <desmond.yan@broadcom.com >
Signed-off-by: Scott Branden <scott.branden@broadcom.com >
Link: https://lore.kernel.org/r/20210120175827.14820-5-scott.branden@broadcom.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-25 18:44:44 +01:00
Scott Branden
064ffc7c39
misc: bcm-vk: add autoload support
...
Add support to load and boot images on card automatically.
The kernel module parameter auto_load can be passed in as false to disable
such support on probe.
As well, nr_scratch_pages can be specified to allocate more or less scratch
memory on init as needed for desired card operation.
Co-developed-by: Desmond Yan <desmond.yan@broadcom.com >
Co-developed-by: James Hu <james.hu@broadcom.com >
Acked-by: Olof Johansson <olof@lixom.net >
Signed-off-by: Desmond Yan <desmond.yan@broadcom.com >
Signed-off-by: James Hu <james.hu@broadcom.com >
Signed-off-by: Scott Branden <scott.branden@broadcom.com >
Link: https://lore.kernel.org/r/20210120175827.14820-4-scott.branden@broadcom.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-25 18:44:44 +01:00
Scott Branden
522f692686
misc: bcm-vk: add Broadcom VK driver
...
Add initial version of Broadcom VK driver to enumerate PCI device IDs
of Valkyrie and Viper device IDs.
VK based cards provide real-time high performance, high throughput,
low latency offload compute engine operations.
They are used for multiple parallel offload tasks as:
audio, video and image processing and crypto operations.
Further commits add additional features to driver beyond probe/remove.
Acked-by: Olof Johansson <olof@lixom.net >
Signed-off-by: Scott Branden <scott.branden@broadcom.com >
Link: https://lore.kernel.org/r/20210120175827.14820-3-scott.branden@broadcom.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-25 18:44:44 +01:00
Greg Kroah-Hartman
66afbe4d63
Merge 5.11-rc5 into char-misc-next
...
We need the fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-25 11:13:59 +01:00
Ricky Wu
31b081066e
misc: rtsx: init value of aspm_enabled
...
make sure ASPM state sync with pcr->aspm_enabled
init value pcr->aspm_enabled
Cc: stable@vger.kernel.org
Signed-off-by: Ricky Wu <ricky_wu@realtek.com >
Link: https://lore.kernel.org/r/20210122081906.19100-1-ricky_wu@realtek.com
Fixes: d928061c31 ("misc: rtsx: modify en/disable aspm function")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-22 11:04:53 +01:00
Oded Gabbay
2dc4a6d791
habanalabs: disable FW events on device removal
...
When device is removed, we need to make sure the F/W won't send us
any more events because during the remove process we disable the
interrupts.
Signed-off-by: Oded Gabbay <ogabbay@kernel.org >
2021-01-21 20:30:22 +02:00
Oded Gabbay
f8abaf379b
habanalabs: fix backward compatibility of idle check
...
Need to take the lower 32 bits of the driver's 64-bit idle mask and put
it in the legacy 32-bit variable that the userspace reads to know the
idle mask.
Signed-off-by: Oded Gabbay <ogabbay@kernel.org >
2021-01-21 20:30:22 +02:00
Ofir Bitton
9354f1b421
habanalabs: zero pci counters packet before submit to FW
...
Driver does not zero some pci counters packets before sending
to FW. This causes an out of sync PI/CI between driver and FW.
Signed-off-by: Ofir Bitton <obitton@habana.ai >
Reviewed-by: Oded Gabbay <ogabbay@kernel.org >
Signed-off-by: Oded Gabbay <ogabbay@kernel.org >
2021-01-21 20:30:22 +02:00
Aswath Govindraju
f6f1f8e6e3
misc: eeprom_93xx46: Add quirk to support Microchip 93LC46B eeprom
...
A dummy zero bit is sent preceding the data during a read transfer by the
Microchip 93LC46B eeprom (section 2.7 of[1]). This results in right shift
of data during a read. In order to ignore this bit a quirk can be added to
send an extra zero bit after the read address.
Add a quirk to ignore the zero bit sent before data by adding a zero bit
after the read address.
[1] - https://www.mouser.com/datasheet/2/268/20001749K-277859.pdf
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com >
Link: https://lore.kernel.org/r/20210105105817.17644-3-a-govindraju@ti.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-20 18:52:12 +01:00
Sami Tolvanen
01dd633e7a
drivers/misc/lkdtm: disable LTO for rodata.o
...
Disable LTO for rodata.o to allow objcopy to be used to
manipulate sections.
Signed-off-by: Sami Tolvanen <samitolvanen@google.com >
Acked-by: Kees Cook <keescook@chromium.org >
Signed-off-by: Kees Cook <keescook@chromium.org >
Link: https://lore.kernel.org/r/20201211184633.3213045-14-samitolvanen@google.com
2021-01-14 08:21:09 -08:00
Aswath Govindraju
4540b9fbd8
misc: eeprom_93xx46: Add module alias to avoid breaking support for non device tree users
...
Module alias "spi:93xx46" is used by non device tree users like
drivers/misc/eeprom/digsy_mtc_eeprom.c and removing it will
break support for them.
Fix this by adding back the module alias "spi:93xx46".
Fixes: 13613a2246 ("misc: eeprom_93xx46: Fix module alias to enable module autoprobe")
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com >
Link: https://lore.kernel.org/r/20210113051253.15061-1-a-govindraju@ti.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-13 17:18:52 +01:00
Anshuman Gupta
6581cc9e5d
misc/mei/hdcp: Fix AUTH_STREAM_REQ cmd buffer len
...
Fix the size of WIRED_REPEATER_AUTH_STREAM_REQ cmd buffer size.
It is based upon the actual number of MST streams and size
of wired_cmd_repeater_auth_stream_req_in.
Excluding the size of hdcp_cmd_header.
v2:
- hdcp_cmd_header size annotation nitpick. [Tomas]
Cc: Tomas Winkler <tomas.winkler@intel.com >
Cc: Ramalingam C <ramalingam.c@intel.com >
Acked-by: Tomas Winkler <tomas.winkler@intel.com >
Reviewed-by: Uma Shankar <uma.shankar@intel.com >
Reviewed-by: Ramalingam C <ramalingam.c@intel.com >
Tested-by: Karthik B S <karthik.b.s@intel.com >
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210111081120.28417-13-anshuman.gupta@intel.com
2021-01-13 08:29:32 +05:30
Daniel Vetter
d88a0c169b
misc/habana: Use FOLL_LONGTERM for userptr
...
These are persistent, not just for the duration of a dma operation.
Reviewed-by: Oded Gabbay <ogabbay@kernel.org >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Cc: Jason Gunthorpe <jgg@ziepe.ca >
Cc: Andrew Morton <akpm@linux-foundation.org >
Cc: John Hubbard <jhubbard@nvidia.com >
Cc: Jérôme Glisse <jglisse@redhat.com >
Cc: Jan Kara <jack@suse.cz >
Cc: Dan Williams <dan.j.williams@intel.com >
Cc: linux-mm@kvack.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-media@vger.kernel.org
Cc: Oded Gabbay <oded.gabbay@gmail.com >
Cc: Omer Shpigelman <oshpigelman@habana.ai >
Cc: Ofir Bitton <obitton@habana.ai >
Cc: Tomer Tayar <ttayar@habana.ai >
Cc: Moti Haimovski <mhaimovski@habana.ai >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Cc: Pawel Piskorski <ppiskorski@habana.ai >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20201127164131.2244124-5-daniel.vetter@ffwll.ch
2021-01-12 14:15:09 +01:00
Daniel Vetter
d4cb19250a
misc/habana: Stop using frame_vector helpers
...
All we need are a pages array, pin_user_pages_fast can give us that
directly. Plus this avoids the entire raw pfn side of get_vaddr_frames.
Note that pin_user_pages_fast is a safe replacement despite the
seeming lack of checking for vma->vm_flasg & (VM_IO | VM_PFNMAP). Such
ptes are marked with pte_mkspecial (which pup_fast rejects in the
fastpath), and only architectures supporting that support the
pin_user_pages_fast fastpath.
Reviewed-by: John Hubbard <jhubbard@nvidia.com >
Reviewed-by: Oded Gabbay <ogabbay@kernel.org >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Cc: Christoph Hellwig <hch@infradead.org >
Cc: Jason Gunthorpe <jgg@ziepe.ca >
Cc: Andrew Morton <akpm@linux-foundation.org >
Cc: John Hubbard <jhubbard@nvidia.com >
Cc: Jérôme Glisse <jglisse@redhat.com >
Cc: Jan Kara <jack@suse.cz >
Cc: Dan Williams <dan.j.williams@intel.com >
Cc: linux-mm@kvack.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-media@vger.kernel.org
Cc: Oded Gabbay <oded.gabbay@gmail.com >
Cc: Omer Shpigelman <oshpigelman@habana.ai >
Cc: Ofir Bitton <obitton@habana.ai >
Cc: Tomer Tayar <ttayar@habana.ai >
Cc: Moti Haimovski <mhaimovski@habana.ai >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Cc: Pawel Piskorski <ppiskorski@habana.ai >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20201127164131.2244124-4-daniel.vetter@ffwll.ch
2021-01-12 14:14:53 +01:00
Oded Gabbay
9488307a55
habanalabs: prevent soft lockup during unmap
...
When using Deep learning framework such as tensorflow or pytorch, there
are tens of thousands of host memory mappings. When the user frees
all those mappings at the same time, the process of unmapping and
unpinning them can take a long time, which may cause a soft lockup
bug.
To prevent this, we need to free the core to do other things during
the unmapping process. For now, we chose to do it every 32K unmappings
(each unmap is a single 4K page).
Signed-off-by: Oded Gabbay <ogabbay@kernel.org >
2021-01-12 15:00:10 +02:00
Oded Gabbay
aa6df6533b
habanalabs: fix reset process in case of failures
...
There are some points in the reset process where if the code fails
for some reason, and the system admin tries to initiate the reset
process again we will get a kernel panic.
This is because there aren't any protections in different fini
functions that are called during the reset process.
The protections that are added in this patch make sure that if the fini
functions are called multiple times, without calling init functions
between them, there won't be double release of already released
resources.
Signed-off-by: Oded Gabbay <ogabbay@kernel.org >
2021-01-12 14:59:52 +02:00
Oded Gabbay
a9d4ef6434
habanalabs: fix dma_addr passed to dma_mmap_coherent
...
When doing dma_alloc_coherent in the driver, we add a certain hard-coded
offset to the DMA address before returning to the callee function. This
offset is needed when our device use this DMA address to perform
outbound transactions to the host.
However, if we want to map the DMA'able memory to the user via
dma_mmap_coherent(), we need to pass the original dma address, without
this offset. Otherwise, we will get erronouos mapping.
Signed-off-by: Oded Gabbay <ogabbay@kernel.org >
2021-01-12 14:59:36 +02:00
Greg Kroah-Hartman
591afd6e5a
Merge 5.11-rc3 into char-misc-next
...
We need the char/misc fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-11 08:09:25 +01:00
Andy Shevchenko
afded6d83a
misc: pvpanic: Check devm_ioport_map() for NULL
...
Inconveniently devm_ioport_map() and devm_ioremap_resource()
return errors differently, i.e. former uses simply NULL pointer,
while the latter an error pointer.
Due to this, we have to check each of them separately.
Fixes: f104060813 ("misc: pvpanic: Combine ACPI and platform drivers")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20201228184313.57610-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-07 20:28:01 +01:00
Aswath Govindraju
47771f1715
misc: eeprom_93xx46: Enable module autoprobe for microchip 93LC46B eeprom
...
Add module alias to enable autoprobe for microchip 93LC46B eeprom by using
/sys/class/.../spi1.0/modalias content.
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com >
Link: https://lore.kernel.org/r/20210107163957.28664-3-a-govindraju@ti.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-07 20:25:11 +01:00
Aswath Govindraju
13613a2246
misc: eeprom_93xx46: Fix module alias to enable module autoprobe
...
Fix module autoprobe by correcting module alias to match the string from
/sys/class/.../spi1.0/modalias content.
Fixes: 06b4501e88 ("misc/eeprom: add driver for microwire 93xx46 EEPROMs")
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com >
Link: https://lore.kernel.org/r/20210107163957.28664-2-a-govindraju@ti.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-07 20:25:11 +01:00
Ricky Wu
38d98d73be
misc: rtsx: remove unused function
...
removed unused function 'rtsx_pci_disable_aspm'
Signed-off-by: Ricky Wu <ricky_wu@realtek.com >
Link: https://lore.kernel.org/r/20201230063953.10972-1-ricky_wu@realtek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-05 14:40:35 +01:00
Alexandre Belloni
157576d552
misc: remove atmel_tclib
...
There is no driver depending on atmel_tclib anymore. Remove this driver.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Link: https://lore.kernel.org/r/20201228204413.2677762-1-alexandre.belloni@bootlin.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-05 14:40:28 +01:00
Zheng Yongjun
22a9e57fcc
misc: ocxl: use DEFINE_MUTEX() for mutex lock
...
mutex lock can be initialized automatically with DEFINE_MUTEX()
rather than explicitly calling mutex_init().
Acked-by: Frederic Barrat <fbarrat@linux.ibm.com >
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com >
Link: https://lore.kernel.org/r/20201224132446.31286-1-zhengyongjun3@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-05 14:40:10 +01:00
Dinghao Liu
b000700d6d
habanalabs: Fix memleak in hl_device_reset
...
When kzalloc() fails, we should execute hl_mmu_fini()
to release the MMU module. It's the same when
hl_ctx_init() fails.
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn >
Reviewed-by: Oded Gabbay <ogabbay@kernel.org >
Signed-off-by: Oded Gabbay <ogabbay@kernel.org >
2020-12-29 23:23:12 +02:00
Oded Gabbay
097c62b6f0
habanalabs: fix order of status check
...
When the device is in reset or needs to be reset, the disabled property
is don't-care.
Signed-off-by: Oded Gabbay <ogabbay@kernel.org >
2020-12-28 08:47:39 +02:00
Oded Gabbay
fcaebc7354
habanalabs: register to pci shutdown callback
...
We need to make sure our device is idle when rebooting a virtual
machine. This is done in the driver level.
The firmware will later handle FLR but we want to be extra safe and
stop the devices until the FLR is handled.
Signed-off-by: Oded Gabbay <ogabbay@kernel.org >
2020-12-28 08:47:39 +02:00
Alon Mizrahi
a3fd283063
habanalabs: add validation cs counter, fix misplaced counters
...
Up until now validation errors were counted in the parsing field
of the cs_counters struct, so we added a new counter and increased
it when needed.
In addition, there were some locations where only one of the counters
was updated (ctx or aggregate) so add the second one to be updated
as well.
Signed-off-by: Alon Mizrahi <amizrahi@habana.ai >
Reviewed-by: Oded Gabbay <ogabbay@kernel.org >
Signed-off-by: Oded Gabbay <ogabbay@kernel.org >
2020-12-28 08:47:39 +02:00
Oded Gabbay
98e8781f00
habanalabs/gaudi: retry loading TPC f/w on -EINTR
...
If loading the firmware file for the TPC f/w was interrupted, try
to do it again, up to 5 times.
Signed-off-by: Oded Gabbay <ogabbay@kernel.org >
2020-12-28 08:47:39 +02:00
Oded Gabbay
377182a3cc
habanalabs: adjust pci controller init to new firmware
...
When the firmware security is enabled, the pcie_aux_dbi_reg_addr
register in the PCI controller is blocked. Therefore, ignore
the result of writing to this register and assume it worked. Also
remove the prints on errors in the internal ELBI write function.
If the security is enabled, the firmware is responsible for setting
this register correctly so we won't have any problem.
If the security is disabled, the write will work (unless something
is totally broken at the PCI level and then the whole sequence
will fail).
In addition, remove a write to register pcie_aux_dbi_reg_addr+4,
which was never actually needed.
Moreover, PCIE_DBI registers are blocked to access from host when
firmware security is enabled. Use a different register to flush the
writes.
Signed-off-by: Oded Gabbay <ogabbay@kernel.org >
2020-12-28 08:47:39 +02:00
Oded Gabbay
90ffe170a3
habanalabs: update comment in hl_boot_if.h
...
Hard-reset flag is updated in many stages of the boot sequence of the
firmware.
Signed-off-by: Oded Gabbay <ogabbay@kernel.org >
2020-12-28 08:47:38 +02:00
Oded Gabbay
13d0ee10b5
habanalabs/gaudi: enhance reset message
...
Print the initiator who performs the hard-reset for easier debugging.
Signed-off-by: Oded Gabbay <ogabbay@kernel.org >
2020-12-28 08:47:38 +02:00
Ofir Bitton
6bbb77b9e6
habanalabs: full FW hard reset support
...
Driver must fetch FW hard reset capability at every FW boot stage:
preboot, CPU boot, CPU application.
If hard reset is triggered, driver will take into consideration
only the last capability received.
Signed-off-by: Ofir Bitton <obitton@habana.ai >
Reviewed-by: Oded Gabbay <ogabbay@kernel.org >
Signed-off-by: Oded Gabbay <ogabbay@kernel.org >
2020-12-28 08:47:38 +02:00
Oded Gabbay
0024c09485
habanalabs/gaudi: disable CGM at HW initialization
...
In case the clock gating was enabled in preboot we need to disable it
at the H/W initialization stage before touching the MME/TPC registers.
Otherwise, the ASIC can get stuck. If the security is enabled in
the firmware level, the CGM is always disabled and the driver can't
enable it.
Signed-off-by: Oded Gabbay <ogabbay@kernel.org >
2020-12-28 08:47:38 +02:00
Tomer Tayar
7a585dfc32
habanalabs: Revise comment to align with mirror list name
...
hw_queues_mirror was renamed to cs_mirror, so revise accordingly a
comment that refers to this list.
Signed-off-by: Tomer Tayar <ttayar@habana.ai >
Reviewed-by: Oded Gabbay <ogabbay@kernel.org >
Signed-off-by: Oded Gabbay <ogabbay@kernel.org >
2020-12-28 08:47:38 +02:00