- 05 9月, 2019 11 次提交
-
-
由 Oded Gabbay 提交于
This patch re-factors the device_setup_cdev() function to make it more generic. It doesn't manipulate members of the driver's internal device structure but instead works only on the arguments that are sent to it. This is in preparation for using this function to create an additional char device per ASIC. Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com> Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Oded Gabbay 提交于
This patch adds a new list to the driver's device structure. The list will keep the file private data structures that the driver creates when a user process opens the device. This change is needed because it is useless to try to count how many FD are open. Instead, track our own private data structure per open file and once it is released, remove it from the list. As long as the list is not empty, it means we have a user that can do something with our device. Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com> Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Oded Gabbay 提交于
This patch renames the "user_ctx" field in the device structure to "compute_ctx". This better reflects the meaning of this context. In addition, we also check in the ctx_fini() that the debug mode should be disabled only if the context being destroyed is the compute context. This has no effect right now as we only have a single process and a single context, but this makes the code more ready for multiple process support. Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com> Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Oded Gabbay 提交于
When the user query the dram usage of a context, show it the dram usage of its context, not the user context that is currently running on the device. This has no effect right now as we only have a single process and a single context, but this makes the code more ready for multiple process support. Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com> Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Oded Gabbay 提交于
This patch calls the kill user process function after we rollback the in-flight CSs. This is because the user process can't be closed while there are open CSs. Therefore, there is no point of sending it a SIGKILL before we do the rollback CS part. Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com> Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Oded Gabbay 提交于
This patch adds a field to the context's structure that will hold a unique handle for the context. This will be needed when the user will create the context. Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com> Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Chuhong Yuan 提交于
Instead of using to_pci_dev + pci_get_drvdata, use dev_get_drvdata to make code simpler. Signed-off-by: NChuhong Yuan <hslester96@gmail.com> Reviewed-by: NOded Gabbay <oded.gabbay@gmail.com> Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
-
由 Oded Gabbay 提交于
The ability of setting power management properties by the system administrator (through sysfs properties) is only relevant for the GOYA ASIC. Therefore, move the relevant sysfs properties to the GOYA sysfs specific file, to make the properties appear in sysfs only for GOYA cards. Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com> Reviewed-by: NOmer Shpigelman <oshpigelman@habana.ai>
-
由 Oded Gabbay 提交于
In the driver timeout functions, we give the simulator a factor of 10 in the timeout. This was necessary when the requested timeout is small but if it was a few seconds, this can result in a very large timeout which is unnecessary. This patch caps the maximum timeout of the simulator to 10 seconds, which is our largest timeout in the code. That is more then enough for anything the simulator is doing. Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com> Reviewed-by: NOmer Shpigelman <oshpigelman@habana.ai>
-
由 Oded Gabbay 提交于
When rejecting CS because of too many in-flight CS, print a debug message about it as it useful to know when the user is debugging (it indicates a back-pressure from the driver as the device is not fast enough to consume the CS) Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com> Reviewed-by: NOmer Shpigelman <oshpigelman@habana.ai>
-
由 Oded Gabbay 提交于
This property has attempted to show the number of open file descriptors on the device. This was a stupid and futile attempt so remove this property completely. Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
-
- 04 9月, 2019 6 次提交
-
-
由 Srinivas Kandagatla 提交于
dma buf scatter list is never freed, free it! Orignally detected by kmemleak: backtrace: [<ffffff80088b7658>] kmemleak_alloc+0x50/0x84 [<ffffff8008373284>] sg_kmalloc+0x38/0x60 [<ffffff8008373144>] __sg_alloc_table+0x60/0x110 [<ffffff800837321c>] sg_alloc_table+0x28/0x58 [<ffffff800837336c>] __sg_alloc_table_from_pages+0xc0/0x1ac [<ffffff800837346c>] sg_alloc_table_from_pages+0x14/0x1c [<ffffff8008097a3c>] __iommu_get_sgtable+0x5c/0x8c [<ffffff800850a1d0>] fastrpc_dma_buf_attach+0x84/0xf8 [<ffffff80085114bc>] dma_buf_attach+0x70/0xc8 [<ffffff8008509efc>] fastrpc_map_create+0xf8/0x1e8 [<ffffff80085086f4>] fastrpc_device_ioctl+0x508/0x900 [<ffffff80082428c8>] compat_SyS_ioctl+0x128/0x200 [<ffffff80080832c4>] el0_svc_naked+0x34/0x38 [<ffffffffffffffff>] 0xffffffffffffffff Reported-by: NMayank Chopra <mak.chopra@codeaurora.org> Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20190829092926.12037-6-srinivas.kandagatla@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Srinivas Kandagatla 提交于
dma buf refcount has to be done by the driver which is going to use the fd. This driver already does refcount on the dmabuf fd if its actively using it but also does an additional refcounting via extra ioctl. This additional refcount can lead to memory leak in cases where the applications fail to call the ioctl to decrement the refcount. So remove this extra refcount in the ioctl More info of dma buf usage at drivers/dma-buf/dma-buf.c Reported-by: NMayank Chopra <mak.chopra@codeaurora.org> Reported-by: NJorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> Tested-by: NJorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20190829092926.12037-5-srinivas.kandagatla@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jorge Ramirez-Ortiz 提交于
Remove unused INIT_MEMLEN_MAX define. Signed-off-by: NJorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> Signed-off-by: NAbhinav Asati <asatiabhi@codeaurora.org> Signed-off-by: NVamsi Singamsetty <vamssi@codeaurora.org> Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20190829092926.12037-4-srinivas.kandagatla@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Bjorn Andersson 提交于
As fastrpc_rpmsg_remove() returns the rpdev of the channel context is no longer a valid object, so ensure to update the channel context to no longer reference the old object and guard in the invoke code path against dereferencing it. Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: NMayank Chopra <mak.chopra@codeaurora.org> Signed-off-by: NAbhinav Asati <asatiabhi@codeaurora.org> Signed-off-by: NVamsi Singamsetty <vamssi@codeaurora.org> Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20190829092926.12037-3-srinivas.kandagatla@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Bjorn Andersson 提交于
The channel context is referenced from the fastrpc user and might as user space holds the file descriptor open outlive the fastrpc device, which is removed when the remote processor is shutting down. Reference count the channel context in order to retain this object until all references has been relinquished. Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: NMayank Chopra <mak.chopra@codeaurora.org> Signed-off-by: NAbhinav Asati <asatiabhi@codeaurora.org> Signed-off-by: NVamsi Singamsetty <vamssi@codeaurora.org> Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20190829092926.12037-2-srinivas.kandagatla@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jean Delvare 提交于
Time has come to get rid of the old eeprom driver. The at24 driver should be used instead. So mark the eeprom driver as deprecated and give users some time to migrate. Then we can remove the legacy eeprom driver completely. Signed-off-by: NJean Delvare <jdelvare@suse.de> Cc: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20190902104838.058725c2@endymionSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 29 8月, 2019 4 次提交
-
-
由 Nadav Amit 提交于
The compaction code already marks pages as offline when it enqueues pages in the ballooned page list, and removes the mapping when the pages are removed from the list. VMware balloon also updates the flags, instead of letting the balloon-compaction logic handle it, which causes the assertion VM_BUG_ON_PAGE(!PageOffline(page)) to fire, when __ClearPageOffline is called the second time. This causes the following crash. [ 487.104520] kernel BUG at include/linux/page-flags.h:749! [ 487.106364] invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC PTI [ 487.107681] CPU: 7 PID: 1106 Comm: kworker/7:3 Not tainted 5.3.0-rc5balloon #227 [ 487.109196] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 12/12/2018 [ 487.111452] Workqueue: events_freezable vmballoon_work [vmw_balloon] [ 487.112779] RIP: 0010:vmballoon_release_page_list+0xaa/0x100 [vmw_balloon] [ 487.114200] Code: fe 48 c1 e7 06 4c 01 c7 8b 47 30 41 89 c1 41 81 e1 00 01 00 f0 41 81 f9 00 00 00 f0 74 d3 48 c7 c6 08 a1 a1 c0 e8 06 0d e7 ea <0f> 0b 44 89 f6 4c 89 c7 e8 49 9c e9 ea 49 8d 75 08 49 8b 45 08 4d [ 487.118033] RSP: 0018:ffffb82f012bbc98 EFLAGS: 00010246 [ 487.119135] RAX: 0000000000000037 RBX: 0000000000000001 RCX: 0000000000000006 [ 487.120601] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff9a85b6bd7620 [ 487.122071] RBP: ffffb82f012bbcc0 R08: 0000000000000001 R09: 0000000000000000 [ 487.123536] R10: 0000000000000000 R11: 0000000000000000 R12: ffffb82f012bbd00 [ 487.125002] R13: ffffe97f4598d9c0 R14: 0000000000000000 R15: ffffb82f012bbd34 [ 487.126463] FS: 0000000000000000(0000) GS:ffff9a85b6bc0000(0000) knlGS:0000000000000000 [ 487.128110] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 487.129316] CR2: 00007ffe6e413ea0 CR3: 0000000230b18001 CR4: 00000000003606e0 [ 487.130812] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 487.132283] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 487.133749] Call Trace: [ 487.134333] vmballoon_deflate+0x22c/0x390 [vmw_balloon] [ 487.135468] vmballoon_work+0x6e7/0x913 [vmw_balloon] [ 487.136711] ? process_one_work+0x21a/0x5e0 [ 487.138581] process_one_work+0x298/0x5e0 [ 487.139926] ? vmballoon_migratepage+0x310/0x310 [vmw_balloon] [ 487.141610] ? process_one_work+0x298/0x5e0 [ 487.143053] worker_thread+0x41/0x400 [ 487.144389] kthread+0x12b/0x150 [ 487.145582] ? process_one_work+0x5e0/0x5e0 [ 487.146937] ? kthread_create_on_node+0x60/0x60 [ 487.148637] ret_from_fork+0x3a/0x50 Fix it by updating the PageOffline indication only when a 2MB page is enqueued and dequeued. The 4KB pages will be handled correctly by the balloon compaction logic. Fixes: 83a8afa7 ("vmw_balloon: Compaction support") Cc: David Hildenbrand <david@redhat.com> Reported-by: NThomas Hellstrom <thellstrom@vmware.com> Signed-off-by: NNadav Amit <namit@vmware.com> Link: https://lore.kernel.org/r/20190820160121.452-1-namit@vmware.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Nadav Amit 提交于
Francois reported that VMware balloon gets stuck after a balloon reset, when the VMCI doorbell is removed. A similar error can occur when the balloon driver is removed with the following splat: [ 1088.622000] INFO: task modprobe:3565 blocked for more than 120 seconds. [ 1088.622035] Tainted: G W 5.2.0 #4 [ 1088.622087] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 1088.622205] modprobe D 0 3565 1450 0x00000000 [ 1088.622210] Call Trace: [ 1088.622246] __schedule+0x2a8/0x690 [ 1088.622248] schedule+0x2d/0x90 [ 1088.622250] schedule_timeout+0x1d3/0x2f0 [ 1088.622252] wait_for_completion+0xba/0x140 [ 1088.622320] ? wake_up_q+0x80/0x80 [ 1088.622370] vmci_resource_remove+0xb9/0xc0 [vmw_vmci] [ 1088.622373] vmci_doorbell_destroy+0x9e/0xd0 [vmw_vmci] [ 1088.622379] vmballoon_vmci_cleanup+0x6e/0xf0 [vmw_balloon] [ 1088.622381] vmballoon_exit+0x18/0xcc8 [vmw_balloon] [ 1088.622394] __x64_sys_delete_module+0x146/0x280 [ 1088.622408] do_syscall_64+0x5a/0x130 [ 1088.622410] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 1088.622415] RIP: 0033:0x7f54f62791b7 [ 1088.622421] Code: Bad RIP value. [ 1088.622421] RSP: 002b:00007fff2a949008 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 [ 1088.622426] RAX: ffffffffffffffda RBX: 000055dff8b55d00 RCX: 00007f54f62791b7 [ 1088.622426] RDX: 0000000000000000 RSI: 0000000000000800 RDI: 000055dff8b55d68 [ 1088.622427] RBP: 000055dff8b55d00 R08: 00007fff2a947fb1 R09: 0000000000000000 [ 1088.622427] R10: 00007f54f62f5cc0 R11: 0000000000000206 R12: 000055dff8b55d68 [ 1088.622428] R13: 0000000000000001 R14: 000055dff8b55d68 R15: 00007fff2a94a3f0 The cause for the bug is that when the "delayed" doorbell is invoked, it takes a reference on the doorbell entry and schedules work that is supposed to run the appropriate code and drop the doorbell entry reference. The code ignores the fact that if the work is already queued, it will not be scheduled to run one more time. As a result one of the references would not be dropped. When the code waits for the reference to get to zero, during balloon reset or module removal, it gets stuck. Fix it. Drop the reference if schedule_work() indicates that the work is already queued. Note that this bug got more apparent (or apparent at all) due to commit ce664331 ("vmw_balloon: VMCI_DOORBELL_SET does not check status"). Fixes: 83e2ec76 ("VMCI: doorbell implementation.") Reported-by: NFrancois Rigault <rigault.francois@gmail.com> Cc: Jorgen Hansen <jhansen@vmware.com> Cc: Adit Ranadive <aditr@vmware.com> Cc: Alexios Zavras <alexios.zavras@intel.com> Cc: Vishnu DASA <vdasa@vmware.com> Cc: stable@vger.kernel.org Signed-off-by: NNadav Amit <namit@vmware.com> Reviewed-by: NVishnu Dasa <vdasa@vmware.com> Link: https://lore.kernel.org/r/20190820202638.49003-1-namit@vmware.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Raul E Rangel 提交于
lkdtm/bugs.c:94:2: error: format '%d' expects argument of type 'int', but argument 2 has type 'long unsigned int' [-Werror=format=] pr_info("Calling function with %d frame size to depth %d ...\n", ^ THREAD_SIZE is defined as a unsigned long, cast CONFIG_FRAME_WARN to unsigned long as well. Fixes: 24cccab4 ("lkdtm/bugs: Adjust recursion test to avoid elision") Cc: stable <stable@vger.kernel.org> Signed-off-by: NRaul E Rangel <rrangel@chromium.org> Acked-by: NKees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20190827173619.170065-1-rrangel@chromium.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Tomas Winkler 提交于
Add Tiger Lake Point device ID for TGP LP. Signed-off-by: NTomas Winkler <tomas.winkler@intel.com> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20190819103210.32748-1-tomas.winkler@intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 23 8月, 2019 5 次提交
-
-
由 Colin Ian King 提交于
There is a spelling mistake in a dev_dbg message, fix it. Signed-off-by: NColin Ian King <colin.king@canonical.com> Reviewed-by: NDragan Cvetic <dragan.cvetic@xilinx.com> Link: https://lore.kernel.org/r/20190819094137.390-1-colin.king@canonical.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Dan Carpenter 提交于
The checking here needs to handle integer overflows because "offset" and "len" come from the user. Fixes: 20ec628e ("misc: xilinx_sdfec: Add ability to configure LDPC") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NMichal Simek <michal.simek@xilinx.com> Reviewed-by: NDragan Cvetic <dragan.cvetic@xilinx.com> Link: https://lore.kernel.org/r/20190821071122.GD26957@mwandaSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Dan Carpenter 提交于
The "psize" value comes from the user so we need to verify that it's non-zero before we check if "n % psize" or it will crash. Fixes: 20ec628e ("misc: xilinx_sdfec: Add ability to configure LDPC") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NMichal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/20190821070953.GC26957@mwandaSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Dan Carpenter 提交于
The copy_from_user() function returns the number of bytes remaining to be copied but we want to return -EFAULT to the user. Fixes: 20ec628e ("misc: xilinx_sdfec: Add ability to configure LDPC") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NMichal Simek <michal.simek@xilinx.com> Reviewed-by: NDragan Cvetic <dragan.cvetic@xilinx.com> Link: https://lore.kernel.org/r/20190822083105.GI3964@kadamSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Dan Carpenter 提交于
These structs have holes in them so we end up disclosing a few bytes of uninitialized stack data. drivers/misc/xilinx_sdfec.c:305 xsdfec_get_status() warn: check that 'status' doesn't leak information (struct has a hole after 'activity') drivers/misc/xilinx_sdfec.c:449 xsdfec_get_turbo() warn: check that 'turbo_params' doesn't leak information (struct has a hole after 'scale') We need to zero out the holes with memset(). Fixes: 6bd6a690 ("misc: xilinx_sdfec: Add stats & status ioctls") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NDragan Cvetic <dragan.cvetic@xilinx.com> Reviewed-by: NMichal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/20190821070606.GA26957@mwandaSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 20 8月, 2019 1 次提交
-
-
由 Kees Cook 提交于
There are three paths through the kernel code exception logging: - BUG (no configurable printk message) - WARN_ON (no configurable printk message) - WARN (configurable printk message) LKDTM was not testing WARN_ON(). This is needed to evaluate the placement of the "cut here" line, which needs special handling in each of the three exceptions (and between architectures that implement instruction exceptions to implement the code exceptions). Signed-off-by: NKees Cook <keescook@chromium.org>
-
- 16 8月, 2019 3 次提交
-
-
由 Fuqian Huang 提交于
xpc_send_activate_IRQ_uv is called from <-xpc_send_activate_IRQ_part_uv <-xpc_indicate_partition_disengaged_uv (xpc_arch_ops.indicate_partition_disengaged) <-xpc_die_deactivate <-xpc_system_die xpc_system_die is registered by atomic_notifier_chain_register, which indicates xpc_system_die may be called in atomic context. So the kmalloc in xpc_send_activate_IRQ_uv may be in atomic context. Use GFP_ATOMIC instead of GFP_KERNEL in kmalloc. Signed-off-by: NFuqian Huang <huangfq.daxian@gmail.com> Link: https://lore.kernel.org/r/20190805125625.24963-1-huangfq.daxian@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Randy Dunlap 提交于
lib/devres.c, which implements devm_ioremap_resource(), is only built when CONFIG_HAS_IOMEM is set/enabled, so XILINX_SDFEC should depend on HAS_IOMEM. Fixes this build error (as seen on UML builds): ERROR: "devm_ioremap_resource" [drivers/misc/xilinx_sdfec.ko] undefined! Fixes: 76d83e1c ("misc: xilinx-sdfec: add core driver") Signed-off-by: NRandy Dunlap <rdunlap@infradead.org> Cc: Derek Kiernan <derek.kiernan@xilinx.com> Cc: Dragan Cvetic <dragan.cvetic@xilinx.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/f9004be5-9925-327b-3ec2-6506e46fe565@infradead.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Nishka Dasgupta 提交于
The static xpc_arch_operations structure xpc_arch_ops_uv is only copied into the structure xpc_arch_ops, after which it is never modified; nor is it used in any other way. Hence it can be declared as a constant to prevent unintended modifications of its fields. Issue found with Coccinelle. Signed-off-by: NNishka Dasgupta <nishkadg.linux@gmail.com> Acked-by: NRobin Holt <robinmholt@gmail.com> Link: https://lore.kernel.org/r/20190808080422.16503-1-nishkadg.linux@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 15 8月, 2019 7 次提交
-
-
由 Matthew Wilcox (Oracle) 提交于
This driver does not use the lookup abilities of the IDR, so convert it to the more space-efficient IDA. Signed-off-by: NMatthew Wilcox (Oracle) <willy@infradead.org> Link: https://lore.kernel.org/r/20190807025050.28367-1-willy@infradead.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Dragan Cvetic 提交于
SD-FEC statistic data are: - count of data interface errors (isr_err_count) - count of Correctable ECC errors (cecc_count) - count of Uncorrectable ECC errors (uecc_count) Add support: 1. clear stats ioctl callback which clears collected statistic data, 2. get stats ioctl callback which reads a collected statistic data, 3. set default configuration ioctl callback, 4. start ioctl callback enables SD-FEC HW, 5. stop ioctl callback disables SD-FEC HW. In a failed state driver enables the following ioctls: - get status - get statistics - clear stats - set default SD-FEC device configuration Tested-by: NSanthosh Dyavanapally <SDYAVANA@xilinx.com> Tested by: Punnaiah Choudary Kalluri <punnaia@xilinx.com> Tested-by: NDerek Kiernan <derek.kiernan@xilinx.com> Tested-by: NDragan Cvetic <dragan.cvetic@xilinx.com> Signed-off-by: NDerek Kiernan <derek.kiernan@xilinx.com> Signed-off-by: NDragan Cvetic <dragan.cvetic@xilinx.com> Link: https://lore.kernel.org/r/1564216438-322406-7-git-send-email-dragan.cvetic@xilinx.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Dragan Cvetic 提交于
Support monitoring and detecting the SD-FEC error events through IRQ and poll file operation. The SD-FEC device can detect one-error or multi-error events. An error triggers an interrupt which creates and run the ONE_SHOT IRQ thread. The ONE_SHOT IRQ thread detects type of error and pass that information to the poll function. The file_operation callback poll(), collects the events and updates the statistics accordingly. The function poll blocks() on waiting queue which can be unblocked by ONE_SHOT IRQ handling thread. Support SD-FEC interrupt set ioctl callback. The SD-FEC can detect two type of errors: coding errors (ECC) and a data interface errors (TLAST). The errors are events which can trigger an IRQ if enabled. The driver can monitor and detect these errors through IRQ. Also the driver updates the statistical data. Tested-by: NDragan Cvetic <dragan.cvetic@xilinx.com> Signed-off-by: NDerek Kiernan <derek.kiernan@xilinx.com> Signed-off-by: NDragan Cvetic <dragan.cvetic@xilinx.com> Link: https://lore.kernel.org/r/1564216438-322406-6-git-send-email-dragan.cvetic@xilinx.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Dragan Cvetic 提交于
- Add capability to get SD-FEC config data using ioctl XSDFEC_GET_CONFIG. - Add capability to set SD-FEC data order using ioctl SDFEC_SET_ORDER. - Add capability to set SD-FEC bypass option using ioctl XSDFEC_SET_BYPASS. - Add capability to set SD-FEC active state using ioctl XSDFEC_IS_ACTIVE. Tested-by: NDragan Cvetic <dragan.cvetic@xilinx.com> Signed-off-by: NDerek Kiernan <derek.kiernan@xilinx.com> Signed-off-by: NDragan Cvetic <dragan.cvetic@xilinx.com> Link: https://lore.kernel.org/r/1564216438-322406-5-git-send-email-dragan.cvetic@xilinx.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Dragan Cvetic 提交于
Add the capability to configure LDPC mode via the ioctl XSDFEC_ADD_LDPC_CODE_PARAMS. Tested-by: NDragan Cvetic <dragan.cvetic@xilinx.com> Signed-off-by: NDerek Kiernan <derek.kiernan@xilinx.com> Signed-off-by: NDragan Cvetic <dragan.cvetic@xilinx.com> Link: https://lore.kernel.org/r/1564216438-322406-4-git-send-email-dragan.cvetic@xilinx.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Dragan Cvetic 提交于
Add the capability to configure and retrieve turbo mode via the ioctls XSDFEC_SET_TURBO and XSDFEC_GET_TURBO. Add char device interface per DT node present and support file operations: - open(), - close(), - unlocked_ioctl(), - compat_ioctl(). Tested-by: NDragan Cvetic <dragan.cvetic@xilinx.com> Signed-off-by: NDerek Kiernan <derek.kiernan@xilinx.com> Signed-off-by: NDragan Cvetic <dragan.cvetic@xilinx.com> Link: https://lore.kernel.org/r/1564216438-322406-3-git-send-email-dragan.cvetic@xilinx.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Dragan Cvetic 提交于
Stores configuration based on parameters from the DT node and values from the SD-FEC core plus reads the default state from the SD-FEC core. To obtain values from the core register read, write capabilities have been added plus related register map details. Tested-by: NDragan Cvetic <dragan.cvetic@xilinx.com> Signed-off-by: NDerek Kiernan <derek.kiernan@xilinx.com> Signed-off-by: NDragan Cvetic <dragan.cvetic@xilinx.com> Link: https://lore.kernel.org/r/1564216438-322406-2-git-send-email-dragan.cvetic@xilinx.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 13 8月, 2019 1 次提交
-
-
由 Kees Cook 提交于
This adds a simple test for forward CFI (indirect function calls) with function prototype granularity (as implemented by Clang's CFI). Signed-off-by: NKees Cook <keescook@chromium.org>
-
- 12 8月, 2019 2 次提交
-
-
由 Ben Segal 提交于
When unmasking IRQs inside the ASIC, the driver passes an array of all the IRQ to unmask. The ASIC's CPU is working in LE so when running in a BE host, the driver needs to do the proper endianness swapping when preparing this array. In addition, this patch also fixes the endianness of a couple of kernel log debug messages that print values of packets Signed-off-by: NBen Segal <bpsegal20@gmail.com> Reviewed-by: NOded Gabbay <oded.gabbay@gmail.com> Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
-
由 Oded Gabbay 提交于
The PQs of internal H/W queues (QMANs) can be located in different memory areas for different ASICs. Therefore, when writing PQEs, we need to use the correct function according to the location of the PQ. e.g. if the PQ is located in the device's memory (SRAM or DRAM), we need to use memcpy_toio() so it would work in architectures that have separate address ranges for IO memory. This patch makes the code that writes the PQE to be ASIC-specific so we can handle this properly per ASIC. Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com> Tested-by: NBen Segal <bpsegal20@gmail.com>
-