aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-05-13perf tools: Properly set the value of 'old' and 'head' in snapshot modenext-may03+fix-snapshot-v2.1Mathieu Poirier
This patch adds the necessay intelligence to properly compute the value of 'old' and 'head' when operating in snapshot mode. That way we can get the latest information in the AUX buffer and be compatible with the generic AUX ring buffer mechanic. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2019-05-09coresight: perf: Don't set the truncated flag in snapshot modeMathieu Poirier
This patch avoids setting the truncated flag when operating in snapshot mode since the trace buffer is expected to be truncated and discontinuous from one snapshot to another. Moreover when the truncated flag is set the perf core stops enabling the event, waiting for user space to consume the data. In snapshot mode this is clearly not what we want since it results in stale data. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2019-05-09coresight: tmc-etf: Fix snapshot mode update functionMathieu Poirier
When working in snapshot mode function perf_aux_output_begin() does not set the handle->size because the size is expected to be deduced by the placement of the "head" and "old" pointers in user space. As such there is no point in trying to adjust the amount of data to copy to the ring buffer. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Reviewed-by: Leo Yan <leo.yan@linaro.org> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
2019-05-09coresight: tmc-etf: Properly set AUX buffer head in snapshot modeMathieu Poirier
Unify amongst sink drivers how the AUX ring buffer head is communicated to user space. That way the same algorithm in cs_etm_find_snapshot() can be used to determine where the latest data is and how much of it to access. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2019-05-09coresight: tmc-etr: Properly set AUX buffer head in snapshot modeMathieu Poirier
Unify amongst sink drivers how the AUX ring buffer head is communicated to user space. That way the same algorithm in cs_etm_find_snapshot() can be used to determine where the latest data is and how much of it to access. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2019-05-09coresight: etb10: Properly set AUX buffer head in snapshot modeMathieu Poirier
Unify amongst sink drivers how the AUX ring buffer head is communicated to user space. That way the same algorithm in cs_etm_find_snapshot() can be used to determine where the latest data is and how much of it to access. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2019-05-02coresight: funnel: Support static funnelLeo Yan
Since CoreSight hardware topology can use a 'hidden' funnel in the trace data path, this kind funnel doesn't have register for accessing and is used by default from hardware design perspective. Below is an example for related hardware topology: +------+ +------+ | cpu0 |->| ETM |-\ +------+ +------+ \-> +--------+ +-----+ ...... | Funnel |->| ETF |-\ Hidden funnel +------+ +------+ /-> +--------+ +-----+ \ | | cpu3 |->| ETM |-/ \ V +------+ +------+ \-> +--------+ | Funnel |-> ... +------+ +------+ /-> +--------+ | cpu4 |->| ETM |-\ / +------+ +------+ \-> +--------+ +-----+ / ...... | Funnel |->| ETF |-/ +------+ +------+ /-> +--------+ +-----+ | cpu7 |->| ETM |-/ +------+ +------+ The CoreSight funnel driver only supports dynamic funnel with registration register resource, thus it cannot support for the static funnel case and it's impossible to create trace data path for this case. This patch is to extend CoreSight funnel driver to support both for static funnel and dynamic funnel. For the dynamic funnel it reuses the code existed in the driver, for static funnel the driver will support device probe if without providing register resource and the driver skips registers accessing when detect the register base is NULL. Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Cc: Suzuki K Poulose <suzuki.poulose@arm.com> Cc: Wanglai Shi <shiwanglai@hisilicon.com> Suggested-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Leo Yan <leo.yan@linaro.org> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02dt-bindings: arm: coresight: Unify funnel DT bindingLeo Yan
Following the same fashion with replicator DT binding, this patch is to unify the DT binding for funnel to support static and dynamic modes; finally we get the funnel DT binding as below: Before patch: Static funnel, aka. non-configurable funnel: Not supported; Dynamic funnel, aka. configurable funnel: "arm,coresight-funnel", "arm,primecell"; After patch: Static funnel: "arm,coresight-static-funnel"; Dynamic funnel: "arm,coresight-dynamic-funnel", "arm,primecell"; "arm,coresight-funnel", "arm,primecell"; (obsolete) At the end of this patch, it gives an example for static funnel DT binding, and updates the dynamic funnel example. Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Cc: Suzuki K Poulose <suzuki.poulose@arm.com> Cc: Wanglai Shi <shiwanglai@hisilicon.com> Signed-off-by: Leo Yan <leo.yan@linaro.org> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02coresight: replicator: Add new device id for static replicatorLeo Yan
This patch adds a device id for the new static replicator compatible string; it changes the driver name from "coresight-replicator" to "coresight-static-replicator" as well. This patch also gives warning when use the replicator obsolete DT binding. Signed-off-by: Leo Yan <leo.yan@linaro.org> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02dt-bindings: arm: coresight: Add new compatible for static replicatorLeo Yan
CoreSight uses below bindings for replicator: Dynamic replicator, aka. configurable replicator: "arm,coresight-dynamic-replicator", "arm,primecell"; Static replicator, aka. non-configurable replicator: "arm,coresight-replicator"; The compatible string "arm,coresight-replicator" is not an explicit naming to express the replicator is 'static'. To unify the naming convention, this patch introduces a new compatible string "arm,coresight-static-replicator" for the static replicator; the compatible string "arm,coresight-replicator" is kept for backward compatibility, but tag it as obsolete and suggest to use the new compatible string. As result CoreSight replicator have below bindings: Dynamic replicator: "arm,coresight-dynamic-replicator", "arm,primecell"; Static replicator: "arm,coresight-static-replicator"; "arm,coresight-replicator"; (obsolete) Signed-off-by: Leo Yan <leo.yan@linaro.org> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: remove multiple blank linesVinod Koul
Multi-blank lines do not help readability so remove them Checkpatch complains: CHECK: Please don't use multiple blank lines Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: add a blank line between functionsVinod Koul
For improving code readability it helps to have a blank line between function so add when missing. Checkpatch complains: CHECK: Please use a blank line after function/struct/union/enum declarations Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: wrap macro argument in parenthesisVinod Koul
macro argument should be inside a parenthesis to avoid precedence issues checkpatch complains: CHECK: Macro argument 'n' may be better as '(n)' to avoid precedence issues Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: fix more typosVinod Koul
Found few more typos in the code, fix them CHECK: 'and and' may be misspelled - perhaps 'and'? CHECK: 'smaple' may be misspelled - perhaps 'sample'? Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: avoid multiple assignmentsVinod Koul
Modify the code to avoid multiple assignments by assigning to variable after error checks in soundwire bus. CHECK: multiple assignments should be avoided Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: intel: more alignment fixesVinod Koul
Found few more issues reported checkpatch on code alignment so fix those as well in the intel module. Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: more alignment fixesVinod Koul
Found few more issues reported checkpatch on code alignment so fix those as well in the soundwire core. Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: add argument to function definitionVinod Koul
Checkpatch warns that function definition of __sdw_register_driver misses argument, so add it WARNING: function definition argument 'struct module *' should also have an identifier name Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: intel: remove empty line after bracesVinod Koul
Linux code style doesn't expect empty lines after braces and gives warning: CHECK: Blank lines aren't necessary after an open brace '{' Remove the empty line in intel module Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: cadence: remove empty line after bracesVinod Koul
Linux code style doesn't expect empty lines after braces and gives warning: CHECK: Blank lines aren't necessary after an open brace '{' Remove the empty line in cadence lib Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: remove empty line before/after bracesVinod Koul
Linux code style doesn't expect empty lines before or after braces and gives warning: CHECK: Blank lines aren't necessary after an open brace '{' CHECK: Blank lines aren't necessary before a close brace '}' Fix these instances in soundwire core Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: fix SPDX license for header filesVinod Koul
Some more headers had C++ style SDPX line, fix that and change copyright so that it is consistent with rest of the code in subsystem Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: fix kconfig help formatVinod Koul
Move to help format instead of --help-- as that is not recommended and this makes file consistent with other instance Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: add missing newlines in dynamic debug logsPierre-Louis Bossart
For some reason the newlines are not used everywhere. Fix as needed. Reported-by: Joe Perches <joe@perches.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: cadence_master: remove spurious newlinePierre-Louis Bossart
Extra newline does not improve readability. Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: cadence_master: fix boolean comparisonsPierre-Louis Bossart
No need for explicit test against true Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: cadence_master: balance parenthesesPierre-Louis Bossart
While not strictly necessary, balanced parentheses help with code readability. Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: cadence_master: fix alignment issuesPierre-Louis Bossart
Use Linux style Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: intel: fix boolean comparisonPierre-Louis Bossart
No need for explicit test against true Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: intel: protect macro parametersPierre-Louis Bossart
Extra parentheses required here Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: intel: fix alignment issuesPierre-Louis Bossart
Use Linux style Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: intel_init: fix alignment issuesPierre-Louis Bossart
Use Linux style Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: slave: fix alignment issuesPierre-Louis Bossart
Use Linux style Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: stream: fix alignment issuesPierre-Louis Bossart
Use Linux style Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: mipi_disco: fix boolean comparisonsPierre-Louis Bossart
No need for explicit test against true Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: mipi_disco: fix alignment issuesPierre-Louis Bossart
Use Linux style. In some cases parenthesis alignment is modified to keep the code readable. Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: bus_type: fix alignment issuesPierre-Louis Bossart
Use Linux style Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: bus: remove spurious newlinePierre-Louis Bossart
tools complain here and the location of the newline does not improve readability. Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: bus: fix boolean comparisonsPierre-Louis Bossart
no need for an explicit test against false reported by Coccinelle Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: bus: remove useless parenthesesPierre-Louis Bossart
and make the code more readable Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: bus: fix typos in commentsPierre-Louis Bossart
spelling mistakes Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: bus: fix alignment issuesPierre-Louis Bossart
Use Linux style Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: fix alignment issues in header filesPierre-Louis Bossart
use Linux style Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: intel: fix SPDX license for header fileVinod Koul
Some more headers had C++ style SDPX line, fix that and change copyright so that it is consistent with rest of the code in subsystem Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: fix SPDX license for header filesPierre-Louis Bossart
No C++ comments in .h files Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02soundwire: Kconfig: fix help formatPierre-Louis Bossart
Move to the regular help format, --help-- is no longer recommended. Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-29Merge tag 'soundwire-5.2-rc1' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into char-misc-next Vinod writes: soundwire updates for v5.2-rc1 This round saw interest from Intel, Linaro and Cadence in Soundwire. More patches are in pipeline (maybe next cycle) - removal of useless initialzation in core - couple of header and kcalloc inversion fixes on Intel driver * tag 'soundwire-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: intel: fix implicit header use of module.h/export.h soundwire: stream: remove useless initialization of local variable soundwire: remove useless initializations soundwire: intel: fix inversion in devm_kcalloc parameters
2019-04-27Merge tag 'thunderbolt-for-v5.2' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into char-misc-next Mika writes: thunderbolt: Changes for v5.2 merge window This improves software connection manager on older Apple systems with Thunderbolt 1 and 2 controller to support full PCIe daisy chains, Display Port tunneling and P2P networking. There are also fixes for potential NULL pointer dereferences at various places in the driver. * tag 'thunderbolt-for-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: (44 commits) thunderbolt: Make priority unsigned in struct tb_path thunderbolt: Start firmware on Titan Ridge Apple systems thunderbolt: Reword output of tb_dump_hop() thunderbolt: Make rest of the logging to happen at debug level thunderbolt: Make __TB_[SW|PORT]_PRINT take const parameters thunderbolt: Add support for XDomain connections thunderbolt: Make tb_switch_alloc() return ERR_PTR() thunderbolt: Add support for DMA tunnels thunderbolt: Add XDomain UUID exchange support thunderbolt: Run tb_xdp_handle_request() in system workqueue thunderbolt: Do not tear down tunnels when driver is unloaded thunderbolt: Add support for Display Port tunnels thunderbolt: Rework NFC credits handling thunderbolt: Generalize port finding routines to support all port types thunderbolt: Scan only valid NULL adapter ports in hotplug thunderbolt: Add support for full PCIe daisy chains thunderbolt: Discover preboot PCIe paths the boot firmware established thunderbolt: Deactivate all paths before restarting them thunderbolt: Extend tunnel creation to more than 2 adjacent switches thunderbolt: Add helper function to iterate from one port to another ...
2019-04-27w1: fix the resume command APIMariusz Bialonczyk
>From the DS2408 datasheet [1]: "Resume Command function checks the status of the RC flag and, if it is set, directly transfers control to the control functions, similar to a Skip ROM command. The only way to set the RC flag is through successfully executing the Match ROM, Search ROM, Conditional Search ROM, or Overdrive-Match ROM command" The function currently works perfectly fine in a multidrop bus, but when we have only a single slave connected, then only a Skip ROM is used and Match ROM is not called at all. This is leading to problems e.g. with single one DS2408 connected, as the Resume Command is not working properly and the device is responding with failing results after the Resume Command. This commit is fixing this by using a Skip ROM instead in those cases. The bandwidth / performance advantage is exactly the same. Refs: [1] https://datasheets.maximintegrated.com/en/ds/DS2408.pdf Signed-off-by: Mariusz Bialonczyk <manio@skyboo.net> Reviewed-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-27misc: aspeed-p2a-ctrl: fix mixed declarationsPatrick Venture
Fix up mixed declarations and code in aspeed_p2a_mmap. Tested: Verified the build had the error and that this patch resolved it and there were no other warnings or build errors associated with compilation of this driver. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Patrick Venture <venture@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>