- 05 9月, 2019 2 次提交
-
-
由 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 38 次提交
-
-
由 Thomas Bogendoerfer 提交于
Add a 1-Wire slave driver to support DS250x EPROM deivces. This slave driver attaches the devices to the NVMEM subsystem for an easy in-kernel usage. Signed-off-by: NThomas Bogendoerfer <tbogendoerfer@suse.de> Link: https://lore.kernel.org/r/20190831082623.15627-3-tbogendoerfer@suse.deSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Thomas Bogendoerfer 提交于
Starting with SGI Origin machines nearly every new SGI ASIC contains an 1-Wire master. They are used for attaching One-Wire prom devices, which contain information about part numbers, revision numbers, serial number etc. and MAC addresses for ethernet interfaces. This patch adds a master driver to support this IP block. It also adds an extra field dev_id to struct w1_bus_master, which could be in used in slave drivers for creating unique device names. Signed-off-by: NThomas Bogendoerfer <tbogendoerfer@suse.de> Link: https://lore.kernel.org/r/20190831082623.15627-2-tbogendoerfer@suse.deSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Adam Zerella 提交于
As suggested in https://kernelnewbies.org/KernelJanitors/Todo this patch replaces the outdated macro of DPRINTK for dev_dbg() To: Dominik Brodowski <linux@dominikbrodowski.net> To: Thomas Gleixner <tglx@linutronix.de> To: Adam Zerella <adam.zerella@gmail.com> To: linux-kernel@vger.kernel.org Signed-off-by: NAdam Zerella <adam.zerella@gmail.com> Link: https://lore.kernel.org/r/20190825053513.13990-1-adam.zerella@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Daniel Mack 提交于
When probed via DT, the uio_pdrv_genirq driver currently uses the name of the node and exposes that as name of the UIO device to userspace. This doesn't work for systems where multiple nodes with the same name (but different unit addresses) are present, or for systems where the node names are auto-generated by a third-party tool. This patch adds the possibility to read the UIO name from the optional "linux,uio-name" property. Signed-off-by: NDaniel Mack <daniel@zonque.org> Link: https://lore.kernel.org/r/20190815212807.25058-1-daniel@zonque.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Rishi Gupta 提交于
The printk functions are invoked without specifying required log level when printing error messages. This commit replaces all direct uses of printk with their corresponding pr_err/info/debug variant. Signed-off-by: NRishi Gupta <gupt21@gmail.com> Link: https://lore.kernel.org/r/1566113671-8743-1-git-send-email-gupt21@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 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>
-
由 Richard Gong 提交于
The Intel Remote System Update (RSU) driver exposes interfaces access through the Intel Service Layer to user space via sysfs interface. The RSU interfaces report and control some of the optional RSU features on Intel Stratix 10 SoC. The RSU feature provides a way for customers to update the boot configuration of a Intel Stratix 10 SoC device with significantly reduced risk of corrupting the bitstream storage and bricking the system. Signed-off-by: NRichard Gong <richard.gong@intel.com> Reviewed-by: NAlan Tull <atull@kernel.org> Link: https://lore.kernel.org/r/1567516701-26026-3-git-send-email-richard.gong@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Richard Gong 提交于
Extend Intel Stratix10 service layer driver to support new RSU notify and MAX_RETRY with watchdog event. RSU is used to provide our customers with protection against loading bad bitstream onto their devices when those devices are booting from flash RSU notifies provides users with an API to notify the firmware of the state of hard processor system. To deal with watchdog event, RSU provides a way for user to retry the current running image several times before giving up and starting normal RSU failover flow. Signed-off-by: NRichard Gong <richard.gong@intel.com> Reviewed-by: NAlan Tull <atull@kernel.org> Link: https://lore.kernel.org/r/1567516701-26026-2-git-send-email-richard.gong@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Hung-Te Lin 提交于
The VPD implementation from Chromium Vital Product Data project used to parse data from untrusted input without checking if the meta data is invalid or corrupted. For example, the size from decoded content may be negative value, or larger than whole input buffer. Such invalid data may cause buffer overflow. To fix that, the size parameters passed to vpd_decode functions should be changed to unsigned integer (u32) type, and the parsing of entry header should be refactored so every size field is correctly verified before starting to decode. Fixes: ad2ac9d5 ("firmware: Google VPD: import lib_vpd source files") Signed-off-by: NHung-Te Lin <hungte@chromium.org> Cc: stable <stable@vger.kernel.org> Reviewed-by: NGuenter Roeck <linux@roeck-us.net> Reviewed-by: NStephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/20190830022402.214442-1-hungte@chromium.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Tetsuo Handa 提交于
syzbot found that a thread can stall for minutes inside read_mem() or write_mem() after that thread was killed by SIGKILL [1]. Reading from iomem areas of /dev/mem can be slow, depending on the hardware. While reading 2GB at one read() is legal, delaying termination of killed thread for minutes is bad. Thus, allow reading/writing /dev/mem and /dev/kmem to be preemptible and killable. [ 1335.912419][T20577] read_mem: sz=4096 count=2134565632 [ 1335.943194][T20577] read_mem: sz=4096 count=2134561536 [ 1335.978280][T20577] read_mem: sz=4096 count=2134557440 [ 1336.011147][T20577] read_mem: sz=4096 count=2134553344 [ 1336.041897][T20577] read_mem: sz=4096 count=2134549248 Theoretically, reading/writing /dev/mem and /dev/kmem can become "interruptible". But this patch chose "killable". Future patch will make them "interruptible" so that we can revert to "killable" if some program regressed. [1] https://syzkaller.appspot.com/bug?id=a0e3436829698d5824231251fad9d8e998f94f5eSigned-off-by: NTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: stable <stable@vger.kernel.org> Reported-by: Nsyzbot <syzbot+8ab2d0f39fb79fe6ca40@syzkaller.appspotmail.com> Link: https://lore.kernel.org/r/1566825205-10703-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jpSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Hridya Valsaraju 提交于
Currently /sys/kernel/debug/binder/proc contains the debug data for every binder_proc instance. This patch makes this information also available in a binderfs instance mounted with a mount option "stats=global" in addition to debugfs. The patch does not affect the presence of the file in debugfs. If a binderfs instance is mounted at path /dev/binderfs, this file would be present at /dev/binderfs/binder_logs/proc. This change provides an alternate way to access this file when debugfs is not mounted. Acked-by: NChristian Brauner <christian.brauner@ubuntu.com> Signed-off-by: NHridya Valsaraju <hridya@google.com> Link: https://lore.kernel.org/r/20190903161655.107408-5-hridya@google.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Hridya Valsaraju 提交于
Currently, the binder transaction log files 'transaction_log' and 'failed_transaction_log' live in debugfs at the following locations: /sys/kernel/debug/binder/failed_transaction_log /sys/kernel/debug/binder/transaction_log This patch makes these files also available in a binderfs instance mounted with the mount option "stats=global". It does not affect the presence of these files in debugfs. If a binderfs instance is mounted at path /dev/binderfs, the location of these files will be as follows: /dev/binderfs/binder_logs/failed_transaction_log /dev/binderfs/binder_logs/transaction_log This change provides an alternate option to access these files when debugfs is not mounted. Acked-by: NChristian Brauner <christian.brauner@ubuntu.com> Signed-off-by: NHridya Valsaraju <hridya@google.com> Link: https://lore.kernel.org/r/20190903161655.107408-4-hridya@google.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Hridya Valsaraju 提交于
The following binder stat files currently live in debugfs. /sys/kernel/debug/binder/state /sys/kernel/debug/binder/stats /sys/kernel/debug/binder/transactions This patch makes these files available in a binderfs instance mounted with the mount option 'stats=global'. For example, if a binderfs instance is mounted at path /dev/binderfs, the above files will be available at the following locations: /dev/binderfs/binder_logs/state /dev/binderfs/binder_logs/stats /dev/binderfs/binder_logs/transactions This provides a way to access them even when debugfs is not mounted. Acked-by: NChristian Brauner <christian.brauner@ubuntu.com> Signed-off-by: NHridya Valsaraju <hridya@google.com> Acked-by: NChristian Brauner <christian.brauner@ubuntu.com> Link: https://lore.kernel.org/r/20190903161655.107408-3-hridya@google.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Hridya Valsaraju 提交于
Currently, all binder state and statistics live in debugfs. We need this information even when debugfs is not mounted. This patch adds the mount option 'stats' to enable a binderfs instance to have binder debug information present in the same. 'stats=global' will enable the global binder statistics. In the future, 'stats=local' will enable binder statistics local to the binderfs instance. The two modes 'global' and 'local' will be mutually exclusive. 'stats=global' option is only available for a binderfs instance mounted in the initial user namespace. An attempt to use the option to mount a binderfs instance in another user namespace will return an EPERM error. Signed-off-by: NHridya Valsaraju <hridya@google.com> Acked-by: NChristian Brauner <christian.brauner@ubuntu.com> Link: https://lore.kernel.org/r/20190903161655.107408-2-hridya@google.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Hridya Valsaraju 提交于
Currently, since each binderfs instance needs its own private binder devices, every time a binderfs instance is mounted, all the default binder devices need to be created via the BINDER_CTL_ADD IOCTL. This patch aims to add a solution to automatically create the default binder devices for each binderfs instance that gets mounted. To achieve this goal, when CONFIG_ANDROID_BINDERFS is set, the default binder devices specified by CONFIG_ANDROID_BINDER_DEVICES are created in each binderfs instance instead of global devices being created by the binder driver. Co-developed-by: NChristian Brauner <christian.brauner@ubuntu.com> Signed-off-by: NChristian Brauner <christian.brauner@ubuntu.com> Signed-off-by: NHridya Valsaraju <hridya@google.com> Reviewed-by: NJoel Fernandes (Google) <joel@joelfernandes.org> Link: https://lore.kernel.org/r/20190808222727.132744-2-hridya@google.com Link: https://lore.kernel.org/r/20190904110704.8606-2-christian.brauner@ubuntu.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Hridya Valsaraju 提交于
Length of a binderfs device name cannot exceed BINDERFS_MAX_NAME. This patch adds a check in binderfs_init() to ensure the same for the default binder devices that will be created in every binderfs instance. Co-developed-by: NChristian Brauner <christian.brauner@ubuntu.com> Signed-off-by: NChristian Brauner <christian.brauner@ubuntu.com> Signed-off-by: NHridya Valsaraju <hridya@google.com> Reviewed-by: NJoel Fernandes (Google) <joel@joelfernandes.org> Link: https://lore.kernel.org/r/20190808222727.132744-3-hridya@google.com Link: https://lore.kernel.org/r/20190904110704.8606-3-christian.brauner@ubuntu.comSigned-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>
-
由 Wu Hao 提交于
This patch adds support for global error reporting for FPGA Management Engine (FME), it introduces sysfs interfaces to report different error detected by the hardware, and allow user to clear errors or inject error for testing purpose. Signed-off-by: NLuwei Kang <luwei.kang@intel.com> Signed-off-by: NAnanda Ravuri <ananda.ravuri@intel.com> Signed-off-by: NXu Yilun <yilun.xu@intel.com> Signed-off-by: NWu Hao <hao.wu@intel.com> Acked-by: NAlan Tull <atull@kernel.org> Signed-off-by: NMoritz Fischer <mdf@kernel.org>
-
由 Wu Hao 提交于
STP (SignalTap) is one of the private features under the port for debugging. This patch adds private feature driver support for it to allow userspace applications to mmap related mmio region and provide STP service. Signed-off-by: NXu Yilun <yilun.xu@intel.com> Signed-off-by: NWu Hao <hao.wu@intel.com> Acked-by: NMoritz Fischer <mdf@kernel.org> Acked-by: NAlan Tull <atull@kernel.org> Signed-off-by: NMoritz Fischer <mdf@kernel.org>
-
由 Wu Hao 提交于
Error reporting is one important private feature, it reports error detected on port and accelerated function unit (AFU). It introduces several sysfs interfaces to allow userspace to check and clear errors detected by hardware. Signed-off-by: NXu Yilun <yilun.xu@intel.com> Signed-off-by: NWu Hao <hao.wu@intel.com> Acked-by: NAlan Tull <atull@kernel.org> Signed-off-by: NMoritz Fischer <mdf@kernel.org>
-
由 Wu Hao 提交于
As these two functions are used by other private features within the same driver module but different driver files. e.g. in error reporting private feature, it requires to clear errors when port is in reset. Signed-off-by: NXu Yilun <yilun.xu@intel.com> Signed-off-by: NWu Hao <hao.wu@intel.com> Acked-by: NMoritz Fischer <mdf@kernel.org> Acked-by: NAlan Tull <atull@kernel.org> Signed-off-by: NMoritz Fischer <mdf@kernel.org>
-
由 Wu Hao 提交于
This patch introduces userclock sysfs interfaces for AFU, user could use these interfaces for clock setting to AFU. Please note that, this is only working for port header feature with revision 0, for later revisions, userclock setting is moved to a separated private feature, so one revision sysfs interface is exposed to userspace application for this purpose too. Signed-off-by: NAnanda Ravuri <ananda.ravuri@intel.com> Signed-off-by: NRuss Weight <russell.h.weight@intel.com> Signed-off-by: NXu Yilun <yilun.xu@intel.com> Signed-off-by: NWu Hao <hao.wu@intel.com> Acked-by: NAlan Tull <atull@kernel.org> Signed-off-by: NMoritz Fischer <mdf@kernel.org>
-
由 Wu Hao 提交于
This patch takes advantage of driver core which helps to create and remove sysfs attribute files, so there is no need to register sysfs entries manually in dfl-afu platform river code. Signed-off-by: NWu Hao <hao.wu@intel.com> Acked-by: NMoritz Fischer <mdf@kernel.org> Signed-off-by: NMoritz Fischer <mdf@kernel.org>
-
由 Wu Hao 提交于
This patch takes advantage of driver core which helps to create and remove sysfs attribute files, so there is no need to register sysfs entries manually in dfl-fme platform river code. Signed-off-by: NWu Hao <hao.wu@intel.com> Acked-by: NMoritz Fischer <mdf@kernel.org> Signed-off-by: NMoritz Fischer <mdf@kernel.org>
-
由 Wu Hao 提交于
This patch makes init callback of sub features optional. With this change, people don't need to prepare any empty init callback. Signed-off-by: NWu Hao <hao.wu@intel.com> Acked-by: NMoritz Fischer <mdf@kernel.org> Signed-off-by: NMoritz Fischer <mdf@kernel.org>
-
由 Mathieu Poirier 提交于
This patch adds barrier packets in the trace stream when the offset in the data buffer needs to be moved forward. Otherwise the decoder isn't aware of the break in the stream and can't synchronise itself with the trace data. Signed-off-by: NMathieu Poirier <mathieu.poirier@linaro.org> Tested-by: NYabin Cui <yabinc@google.com> Reviewed-by: NLeo Yan <leo.yan@linaro.org> Link: https://lore.kernel.org/r/20190829202842.580-18-mathieu.poirier@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Mathieu Poirier 提交于
If less space is available in the perf ring buffer than the ETR buffer, barrier packets inserted in the trace stream by tmc_sync_etr_buf() are skipped over when the head of the buffer is moved forward, resulting in traces that can't be decoded. This patch decouples the process of syncing ETR buffers and the addition of barrier packets in order to perform the latter once the offset in the trace buffer has been properly computed. Signed-off-by: NMathieu Poirier <mathieu.poirier@linaro.org> Reviewed-by: NLeo Yan <leo.yan@linaro.org> Link: https://lore.kernel.org/r/20190829202842.580-17-mathieu.poirier@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Mathieu Poirier 提交于
Make the computation of a memory mask representing the width of the memory bus into a function so that it can be re-used by the ETR driver. Signed-off-by: NMathieu Poirier <mathieu.poirier@linaro.org> Reviewed-by: NLeo Yan <leo.yan@linaro.org> Link: https://lore.kernel.org/r/20190829202842.580-16-mathieu.poirier@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Yabin Cui 提交于
When tracing etm data of multiple threads on multiple cpus through perf interface, each cpu has a unique etr_perf_buffer while sharing the same etr device. There is no guarantee that the last cpu starts etm tracing also stops last. This makes perf_data check fail. Fix it by checking etr_buf instead of etr_perf_buffer. Also move the code setting and clearing perf_buf to more suitable places. Fixes: 3147da92 ("coresight: tmc-etr: Allocate and free ETR memory buffers for CPU-wide scenarios") Signed-off-by: NYabin Cui <yabinc@google.com> Signed-off-by: NMathieu Poirier <mathieu.poirier@linaro.org> Link: https://lore.kernel.org/r/20190829202842.580-15-mathieu.poirier@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Yabin Cui 提交于
TMC etr always copies all available data to perf aux buffer, which may exceed the available space in perf aux buffer. It isn't suitable for not-snapshot mode, because: 1) It may overwrite previously written data. 2) It may make the perf_event_mmap_page->aux_head report having more or less data than the reality. So change to only copy the latest data fitting the available space in perf aux buffer. Signed-off-by: NYabin Cui <yabinc@google.com> Signed-off-by: NMathieu Poirier <mathieu.poirier@linaro.org> Link: https://lore.kernel.org/r/20190829202842.580-14-mathieu.poirier@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Andrew Murray 提交于
To improve clarity, let's update the comment for etm4_os_unlock to use the name of the register as per the ETM architecture specification. The existing comment is also misleading as it suggests any value written to TRCOSLAR unlocks the trace registers, however it must be '0' - let's also correct this. Signed-off-by: NAndrew Murray <andrew.murray@arm.com> Reviewed-by: NSuzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: NMathieu Poirier <mathieu.poirier@linaro.org> Link: https://lore.kernel.org/r/20190829202842.580-13-mathieu.poirier@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Andrew Murray 提交于
Given that the user-exposed module parameter for 'boot_enable' matches the variable that it sets, let's use module_param instead of module_param_named. Let's also use octal permissions (checkpatch recommends this) and provide a module parameter description. Signed-off-by: NAndrew Murray <andrew.murray@arm.com> Reviewed-by: NSuzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: NMathieu Poirier <mathieu.poirier@linaro.org> Link: https://lore.kernel.org/r/20190829202842.580-12-mathieu.poirier@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Andrew Murray 提交于
Synchronization is recommended before disabling the trace registers to prevent any start or stop points being speculative at the point of disabling the unit (section 7.3.77 of ARM IHI 0064D). Synchronization is also recommended after programming the trace registers to ensure all updates are committed prior to normal code resuming (section 4.3.7 of ARM IHI 0064D). Let's ensure these syncronization points are present in the code and clearly commented. Note that we could rely on the barriers in CS_LOCK and coresight_disclaim_device_unlocked or the context switch to user space - however coresight may be of use in the kernel. On armv8 the mb macro is defined as dsb(sy) - Given that the etm4x is only used on armv8 let's directly use dsb(sy) instead of mb(). This removes some ambiguity and makes it easier to correlate the code with the TRM. Signed-off-by: NAndrew Murray <andrew.murray@arm.com> Reviewed-by: NSuzuki K Poulose <suzuki.poulose@arm.com> [Fixed capital letter for "use" in title] Signed-off-by: NMathieu Poirier <mathieu.poirier@linaro.org> Link: https://lore.kernel.org/r/20190829202842.580-11-mathieu.poirier@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Andrew Murray 提交于
In addition to unlocking the OS lock, etm4_os_unlock will also set the os_unlock flag. Therefore let's avoid unnecessarily setting os_unlock flag outside of this function. Signed-off-by: NAndrew Murray <andrew.murray@arm.com> Reviewed-by: NSuzuki K Poulose <suzuki.poulose@arm.com> [Fixed capital letter for "remove" in the title] Signed-off-by: NMathieu Poirier <mathieu.poirier@linaro.org> Link: https://lore.kernel.org/r/20190829202842.580-10-mathieu.poirier@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-