summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* slimbus: ngd: add stream supportSrinivas Kandagatla2018-07-071-2/+147
| | | | | | | | | This patch adds support to stream support, this involve implementing user specific implementation of Data channel management and channel management SLIMbus messages. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* slimbus: stream: add stream supportSrinivas Kandagatla2018-07-076-1/+720
| | | | | | | | | | | | | | This patch adds support to SLIMbus stream apis for slimbus device. SLIMbus streaming involves adding support to Data Channel Management and channel Reconfiguration Messages to slim core plus few stream apis. >From slim device side the apis are very simple mostly inline with other stream apis. Currently it only supports Isochronous and Push/Pull transport protocols, which are sufficient for audio use cases. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* slimbus: ngd: Add qcom SLIMBus NGD driverSrinivas Kandagatla2018-07-074-0/+1403
| | | | | | | | | | | | | | | | | | This patch adds suppor to Qualcomm SLIMBus Non-Generic Device (NGD) controller driver. This is light-weight SLIMBus controller driver responsible for communicating with slave HW directly over the bus using messaging interface, and communicating with master component residing on ADSP for bandwidth and data-channel management Based on intial work from Karthikeyan Ramasubramanian <kramasub@codeaurora.org> and Sagar Dharia <sdharia@codeaurora.org> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Tested-by: Craig Tatlor <ctatlor97@gmail.com> Reviewed-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* slimbus: ngd: dt-bindings: Add slim ngd dt bindingsSrinivas Kandagatla2018-07-071-0/+84
| | | | | | | | | | | | | | This patch adds bindings for Qualcomm SLIMBus NGD controller. SLIMBus NGD controller is a light-weight driver responsible for communicating with SLIMBus slaves directly over the bus using messaging interface and communicating with master component residing on ADSP for bandwidth and data-channel management Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by: Rob Herring <robh@kernel.org> Tested-by: Craig Tatlor <ctatlor97@gmail.com> Reviewed-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* slimbus: messaging: add slim_alloc/free_txn_tid()Srinivas Kandagatla2018-07-072-22/+54
| | | | | | | | | | | | | This patch adds slim_alloc_txn_tid() and slim_free_txn_tid() api to allow controllers like ngd to allocate tids for user specific commands. This also cleans up the existing code to use single place for tid allocations and free. This patch also make the tid allocation cyclic one, its very useful to track the transactions back during debug. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* slimbus: core: rearrange slim_eaddr structureSrinivas Kandagatla2018-07-071-6/+6
| | | | | | | | Rearrange struct slim_eaddr so that the structure is packed correctly to be able to send in SLIMBus messages. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* slimbus: core: add of_slim_device_get() helperSrinivas Kandagatla2018-07-072-0/+41
| | | | | | | | | | | On SLIMBus controllers like Qcom NGD(non ported device), controller can request logical address once the remote side is powered, having a helper function like this to explicitly enumerate the bus is helpful. Also codec drivers which are taking to interface device would need such a helper too. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* slimbus: qcom: remove redundant depends in KconfigSrinivas Kandagatla2018-07-071-1/+0
| | | | | | | | QCOM SLIMBus controller is already under a 'if SLIMBUS' in Kconfig, having depends on SLIMBUS is totally redundant. Just remove it. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* slimbus: messaging: initialize completion correctlySrinivas Kandagatla2018-07-071-0/+1
| | | | | | | | slim_val_inf can contain random value from stack, make sure the completion is initialized to NULL while filling the msg. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* slimbus: messaging: remove multiple calls to pm_runtime_mark_last_busySrinivas Kandagatla2018-07-071-1/+1
| | | | | | | | | | There seems to be a multiple calls to pm_runtime_mark_last_busy(), which looks like a typo. Fix this by properly adding pm_runtime_put_autosuspend to put controller in auto suspend state. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* slimbus: messaging: pass correct wbufSrinivas Kandagatla2018-07-071-1/+1
| | | | | | | | There seems to be a typo while filling msg for slim_write, wbuf is set to NULL instead of rbuf. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ipack: add error handling for ioremap_nocacheZhouyang Jia2018-07-071-0/+7
| | | | | | | | | | | When ioremap_nocache fails, the lack of error-handling code may cause unexpected results. This patch adds error-handling code after calling ioremap_nocache. Signed-off-by: Zhouyang Jia <jiazhouyang09@gmail.com> Acked-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge tag 'fsi-updates-2018-06-12' of ↵Greg Kroah-Hartman2018-07-0710-87/+1362
|\ | | | | | | | | | | | | | | https://git.kernel.org/pub/scm/linux/kernel/git/benh/linux-fsi into char-misc-next Ben writes: FSI updates and sbefifo driver
| * fsi/sbefifo: Add driver for the SBE FIFOBenjamin Herrenschmidt2018-06-124-0/+1046
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver provides an in-kernel and a user API for accessing the command FIFO of the SBE (Self Boot Engine) of the POWER9 processor, via the FSI bus. It provides an in-kernel interface to submit command and receive responses, along with a helper to locate and analyse the response status block. It's a simple synchronous submit() type API. The user interface uses the write/read interface that an earlier version of this driver already provided, however it has some specific limitations in order to keep the driver simple and avoid using up a lot of kernel memory: - The user should perform a single write() with the command and a single read() to get the response (with a buffer big enough to hold the entire response). - On a write() the command is simply "stored" into a kernel buffer, it is submitted as one operation on the subsequent read(). This allows to have the code write directly from the FIFO into the user buffer and avoid hogging the SBE between the write() and read() syscall as it's critical that the SBE be freed asap to respond to the host. An extra write() will simply replace the previously written command. - A write of a single 4 bytes containing the value 0x52534554 in big endian will trigger a reset request. No read is necessary, the write() call will return when the reset has been acknowledged or times out. - The command is limited to 4K bytes. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Tested-by: Joel Stanley <joel@jms.id.au> ---
| * fsi: scom: Remove PIB reset during probeEddie James2018-06-121-8/+0
| | | | | | | | | | | | | | | | | | | | The PIB reset causes problems for the running P9 chip. The reset shouldn't be performed by this driver. Signed-off-by: Eddie James <eajames@linux.vnet.ibm.com> Reviewed-by: Christopher Bostic <cbostic@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Tested-by: Joel Stanley <joel@jms.id.au>
| * fsi/master-gpio: Replace bit_bit lock with IRQ disable/enableJeremy Kerr2018-06-121-25/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently use a spinlock (bit_lock) around operations that clock bits out of the FSI bus, and a mutex to protect against simultaneous access to the master. This means that bit_lock isn't needed for mutual exlusion, only to prevent timing issues when clocking bits out. To reflect this, this change converts bit_lock to just the local_irq_save/restore operation. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Tested-by: Joel Stanley <joel@jms.id.au>
| * fsi/fsi-master-gpio: More error handling cleanupBenjamin Herrenschmidt2018-06-121-21/+5
| | | | | | | | | | | | | | | | | | Remove calls to the empty and useless fsi_master_gpio_error() function, and report CRC errors as "FSI_ERR_NO_SLAVE" when reading an all 1's response. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Tested-by: Joel Stanley <joel@jms.id.au>
| * fsi/fsi-master-gpio: Implement CRC error recoveryBenjamin Herrenschmidt2018-06-122-18/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The FSI protocol defines two modes of recovery from CRC errors, this implements both: - If the device returns an ECRC (it detected a CRC error in the command), then we simply issue the command again. - If the master detects a CRC error in the response, we send an E_POLL command which requests a resend of the response without actually re-executing the command (which could otherwise have unwanted side effects such as dequeuing a FIFO twice). Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Christopher Bostic <cbostic@linux.vnet.ibm.com> Tested-by: Joel Stanley <joel@jms.id.au> --- Note: This was actually tested by removing some of my fixes, thus causing us to hit occasional CRC errors during high LPC activity.
| * fsi/gpio: Use relative-addressing commandsJeremy Kerr2018-06-121-11/+91
| | | | | | | | | | | | | | | | | | | | | | | | FSI CFAMs support shorter commands that use a relative (or same) address as the last. This change introduces a last_addr to the master state, and uses it for subsequent reads/writes, and performs relative addressing when a subsequent read/write is in range. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Christopher Bostic <cbostic@linux.vnet.ibm.com> Tested-by: Joel Stanley <joel@jms.id.au>
| * fsi/gpio: Include command build in locked sectionJeremy Kerr2018-06-121-7/+18
| | | | | | | | | | | | | | | | | | | | For implementing relative addressing mode, we'll need to build a command that is coherent with CFAM state. To do that, include the build_command_* functions in the locked section of read/write/term. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Tested-by: Joel Stanley <joel@jms.id.au>
| * fsi/fsi-master-gpio: Delay sampling of FSI data inputBenjamin Herrenschmidt2018-06-121-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most SoC GPIO implementations, including the Aspeed one, have synchronizers on the GPIO inputs. This means that the value read from a GPIO is a couple of clocks old, from whatever clock source feeds those synchronizers. In practice, this means that in no-delay mode, we are using a value that can potentially be a bit too old and too close to the clock edge establishing the data on the other side of the link. The voltage converters we use on some systems make this worse and sensitive to things like voltage fluctuations etc... This is, we believe, the cause of occasional CRC errors encountered during heavy activity on the LPC bus. This is fixed by introducing a dummy GPIO read before the actual data read. It slows down SBEFIFO by about 15% (less than any delay primitive) and the end result is so far solid. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Christopher Bostic <cbostic@linux.vnet.ibm.com> Tested-by: Joel Stanley <joel@jms.id.au>
| * fsi/fsi-master-gpio: Reduce dpoll clocksBenjamin Herrenschmidt2018-06-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FSI_GPIO_DPOLL_CLOCKS is the number of clocks before sending a DPOLL command after receiving a BUSY status. It should be at least tSendDelay (16 clocks). According to comments in the code, it needs to also be at least 21 clocks due to HW issues. It's currently 100 clocks which impacts performances negatively in some cases. Reduces it in half to 50 clocks which seems to still be solid. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Christopher Bostic <cbostic@linux.vnet.ibm.com> Tested-by: Joel Stanley <joel@jms.id.au>
| * fsi/fsi-master-gpio: Reduce turnaround clocksBenjamin Herrenschmidt2018-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FSI_GPIO_PRIME_SLAVE_CLOCKS is the number of clocks if the "idle" phase between the end of a response and the beginning of the next one. It corresponds to tSendDelay in the FSI specification. The default value in the slave is 16 clocks. 100 is way overkill and significantly reduces the driver performance. This changes it to 20 (which gives the HW a bit of margin still just in case). Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Christopher Bostic <cbostic@linux.vnet.ibm.com> Tested-by: Joel Stanley <joel@jms.id.au>
| * fsi/fsi-master-gpio: Add "no-gpio-delays" optionBenjamin Herrenschmidt2018-06-124-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for an optional device-tree property that makes the driver skip all the delays around clocking the GPIOs and set it in the device-tree of common POWER9 based OpenPower platforms. This useful on chips like the AST2500 where the GPIO block is running at a fairly low clock frequency (25Mhz typically). In this case, the delays are unnecessary and due to the low precision of the timers, actually quite harmful in terms of performance. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Christopher Bostic <cbostic@linux.vnet.ibm.com> Tested-by: Joel Stanley <joel@jms.id.au>
| * fsi/fsi-master-gpio: Sample input data on different clock phaseBenjamin Herrenschmidt2018-06-121-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently sample the input data right after we toggle the clock low, then high. The slave establishes the data on the rising edge, so this is not ideal. We should sample it on the low phase instead. This currently works because we have an extra delay, but subsequent patches will remove it. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Christopher Bostic <cbostic@linux.vnet.ibm.com> Tested-by: Joel Stanley <joel@jms.id.au>
| * fsi: gpio: Use a mutex to protect transfersJeremy Kerr2018-06-121-22/+64
| | | | | | | | | | | | | | | | | | | | | | Reduce time spent with interrupts disabled by limiting the critical sections to bitbanging FSI symbols. We only need to ensure exclusive use of the bus for an entire transfer, not that the transfer be performed in atomic context. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Tested-by: Joel Stanley <joel@jms.id.au>
| * fsi: gpio: Remove unused 'id' variableAndrew Jeffery2018-06-121-2/+1
| | | | | | | | | | | | Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Tested-by: Joel Stanley <joel@jms.id.au>
| * fsi: gpio: Trace busy countAndrew Jeffery2018-06-122-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | An observation from trace output of the existing FSI tracepoints was that the remote device was sometimes reporting as busy. Add a new tracepoint reporting the busy count in order to get a better grip on how often this is the case. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Acked-by: Eddie James <eajames@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Tested-by: Joel Stanley <joel@jms.id.au>
* | Documentation: fpga: cleanupAlan Tull2018-07-073-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Minor fixes including: * fix some typos * correct use of a/an * rephrase explanation of .state ops function * s/re-use/reuse/ (use only one spelling of 'reuse' in these docs) * s/cpu/CPU/ Signed-off-by: Alan Tull <atull@kernel.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | dt-bindings: vendor-prefixes: fix bad mergeJohan Hovold2018-07-061-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | Remove the vendor-prefix reject file which was accidentally added when merging the gnss sirfstar binding. The wi2wi prefix had already been added by commit a593bff82cae2 ("dt-bindings: define vendor prefix for Wi2Wi, Inc."). Fixes: 176193b7dd6e ("dt-bindings: gnss: add sirfstar binding") Reported-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | misc: sram: enable clock before registering regionsJohan Hovold2018-07-061-6/+7
| | | | | | | | | | | | | | | | | | | | Make sure to enable the clock before registering regions and exporting partitions to user space at which point we must be prepared for I/O. Fixes: ee895ccdf776 ("misc: sram: fix enabled clock leak on error path") Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | misc: sram: fix resource leaks in probe error pathJohan Hovold2018-07-061-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure to disable clocks and deregister any exported partitions before returning on late probe errors. Note that since commit ee895ccdf776 ("misc: sram: fix enabled clock leak on error path"), partitions are deliberately exported before enabling the clock so we stick to that logic here. A follow up patch will address this. Fixes: 2ae2e28852f2 ("misc: sram: add Atmel securam support") Cc: stable <stable@vger.kernel.org> # 4.9 Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: expose fw version to sysfsAlexander Usyskin2018-07-034-8/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | The ME FW version is constantly used by detection and update tools. To improve the reliability and simplify these tools provide a sysfs interface to access version of the platform ME firmware in the following format: <platform>:<major>.<minor>.<milestone>.<build>. There can be up to three such blocks for different FW components. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: add optional timeout to internal bus recvAlexander Usyskin2018-07-033-12/+28
| | | | | | | | | | | | | | | | | | Add optional timeout to internal bus recv function to enable break out of internal flows in case of no answer from FW. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | mei: remove unused MEI_IAMTHIF_STALL_TIMER defineAlexander Usyskin2018-07-031-2/+0
| | | | | | | | | | | | | | | | MEI_IAMTHIF_STALL_TIMER is unused now and can be safely removed. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Drivers: hv: vmbus: Make TLFS #define names architecture neutralMichael Kelley2018-07-034-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Hyper-V feature and hint flags in hyperv-tlfs.h are all defined with the string "X64" in the name. Some of these flags are indeed x86/x64 specific, but others are not. For the ones that are used in architecture independent Hyper-V driver code, or will be used in the upcoming support for Hyper-V for ARM64, this patch removes the "X64" from the name. This patch changes the flags that are currently known to be used on multiple architectures. Hyper-V for ARM64 is still a work-in-progress and the Top Level Functional Spec (TLFS) has not been separated into x86/x64 and ARM64 areas. So additional flags may need to be updated later. This patch only changes symbol names. There are no functional changes. Signed-off-by: Michael Kelley <mikelley@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Tools: hv: vss: fix loop device detectionVitaly Kuznetsov2018-07-031-4/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit ea81fdf0981d ("Tools: hv: vss: Skip freezing filesystems backed by loop") added skip for filesystems backed by loop device. However, it seems the detection of such cases is incomplete. It was found that with 'devicemapper' storage driver docker creates the following chain: NAME MAJ:MIN loop0 7:0 ..docker-8:4-8473394-pool 253:0 ..docker-8:4-8473394-eac... 253:1 so when we're looking at the mounted device we see major '253' and not '7'. Solve the issue by walking /sys/dev/block/*/slaves chain and checking if there's a loop device somewhere. Other than that, don't skip mountpoints silently when stat() fails. In case e.g. SELinux is failing stat we don't want to skip freezing everything without letting user know about the failure. Fixes: ea81fdf0981d ("Tools: hv: vss: Skip freezing filesystems backed by loop") Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | tools: hv: update lsvmbus to be compatible with python3Olaf Hering2018-07-031-6/+6
| | | | | | | | | | | | | | | | | | | | Python3 changed the way how 'print' works. Adjust the code to a syntax that is understood by python2 and python3. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Dexuan Cui <decui@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Drivers: hv: vmbus: Remove x86 MSR refs in arch independent codeMichael Kelley2018-07-032-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In architecture independent code for manipulating Hyper-V synthetic timers and synthetic interrupts, pass in an ordinal number identifying the timer or interrupt, rather than an actual MSR register address. Then in x86/x64 specific code, map the ordinal number to the appropriate MSR. This change facilitates the introduction of an ARM64 version of Hyper-V, which uses the same synthetic timers and interrupts, but a different mechanism for accessing them. Signed-off-by: Michael Kelley <mikelley@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Drivers: hv: vmbus: Fix the offer_in_progress in vmbus_process_offer()Dexuan Cui2018-07-031-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I didn't really hit a real bug, but just happened to spot the bug: we have decreased the counter at the beginning of vmbus_process_offer(), so we mustn't decrease it again. Fixes: 6f3d791f3006 ("Drivers: hv: vmbus: Fix rescind handling issues") Signed-off-by: Dexuan Cui <decui@microsoft.com> Cc: stable@vger.kernel.org Cc: Stephen Hemminger <sthemmin@microsoft.com> Cc: K. Y. Srinivasan <kys@microsoft.com> Cc: Stable <stable@vger.kernel.org> # 4.14 and above Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Drivers: hv: vmbus: Add comments on ring buffer signalingMichael Kelley2018-07-032-19/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | Add comments describing intricacies of Hyper-V ring buffer signaling code. This information is not in Hyper-V public documents, so include here to capture the knowledge for future coders. There are no code changes in this commit. Signed-off-by: Michael Kelley <mikelley@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | x86/hyperv: Add interrupt handler annotationsMichael Kelley2018-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Add standard interrupt handler annotations to hyperv_vector_handler(). This does not fix any observed bug, but avoids potential removal of the code by link time optimization and makes it consistent with hv_stimer0_vector_handler in the same source file. Suggested-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Michael Kelley <mikelley@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | use the new async probing feature for the hyperv driversArjan van de Ven2018-07-037-0/+24
| | | | | | | | | | | | | | | | | | | | Recent kernels support asynchronous probing; most hyperv drivers can be probed async easily so set the required flag for this. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | eeprom: idt_89hpesx: remove redundant variable csrval_lenColin Ian King2018-07-031-3/+1
| | | | | | | | | | | | | | | | | | | | | | Variable csrval_len is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'csrval_len' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | char: pcmcia: remove redundant pointer devColin Ian King2018-07-031-4/+0
| | | | | | | | | | | | | | | | | | | | | | Pointer dev is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable ‘dev’ set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | hpet: remove redundant pointer hpetColin Ian King2018-07-031-2/+0
| | | | | | | | | | | | | | | | | | | | | | Pointer hpet is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'hpet' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | goldfish_pipe: make tasklet goldfish_interrupt_tasklet staticColin Ian King2018-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | Tasklet goldfish_interrupt_tasklet is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: symbol 'goldfish_interrupt_tasklet' was not declared. Should it be static? Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | w1: ds2482: make module parameter extra_config staticColin Ian King2018-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | The variable extra_config is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: warning: symbol 'extra_config' was not declared. Should it be static? Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | misc: rtsx: make several functions staticColin Ian King2018-07-031-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several helper functions are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'rtsx_pm_power_saving' was not declared. Should it be static? symbol 'rtsx_set_l1off_sub_cfg_d0' was not declared. Should it be static? symbol 'rtsx_pm_full_on' was not declared. Should it be static? symbol 'rtsx_comm_set_ltr_latency' was not declared. Should it be static? symbol 'rtsx_pci_process_ocp' was not declared. Should it be static? symbol 'rtsx_pci_process_ocp_interrupt' was not declared. Should it be static? Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | misc: vmci: remove redundant variable is_localColin Ian King2018-07-031-5/+0
| | | | | | | | | | | | | | | | | | | | | | Variable is_local is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'is_local' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>