aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-03-07Merge tag 'powerpc-5.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linuxLinus Torvalds3-11/+33
Pull powerpc updates from Michael Ellerman: "Notable changes: - Enable THREAD_INFO_IN_TASK to move thread_info off the stack. - A big series from Christoph reworking our DMA code to use more of the generic infrastructure, as he said: "This series switches the powerpc port to use the generic swiotlb and noncoherent dma ops, and to use more generic code for the coherent direct mapping, as well as removing a lot of dead code." - Increase our vmalloc space to 512T with the Hash MMU on modern CPUs, allowing us to support machines with larger amounts of total RAM or distance between nodes. - Two series from Christophe, one to optimise TLB miss handlers on 6xx, and another to optimise the way STRICT_KERNEL_RWX is implemented on some 32-bit CPUs. - Support for KCOV coverage instrumentation which means we can run syzkaller and discover even more bugs in our code. And as always many clean-ups, reworks and minor fixes etc. Thanks to: Alan Modra, Alexey Kardashevskiy, Alistair Popple, Andrea Arcangeli, Andrew Donnellan, Aneesh Kumar K.V, Aravinda Prasad, Balbir Singh, Brajeswar Ghosh, Breno Leitao, Christian Lamparter, Christian Zigotzky, Christophe Leroy, Christoph Hellwig, Corentin Labbe, Daniel Axtens, David Gibson, Diana Craciun, Firoz Khan, Gustavo A. R. Silva, Igor Stoppa, Joe Lawrence, Joel Stanley, Jonathan Neuschäfer, Jordan Niethe, Laurent Dufour, Madhavan Srinivasan, Mahesh Salgaonkar, Mark Cave-Ayland, Masahiro Yamada, Mathieu Malaterre, Matteo Croce, Meelis Roos, Michael W. Bringmann, Nathan Chancellor, Nathan Fontenot, Nicholas Piggin, Nick Desaulniers, Nicolai Stange, Oliver O'Halloran, Paul Mackerras, Peter Xu, PrasannaKumar Muralidharan, Qian Cai, Rashmica Gupta, Reza Arbab, Robert P. J. Day, Russell Currey, Sabyasachi Gupta, Sam Bobroff, Sandipan Das, Sergey Senozhatsky, Souptick Joarder, Stewart Smith, Tyrel Datwyler, Vaibhav Jain, YueHaibing" * tag 'powerpc-5.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (200 commits) powerpc/32: Clear on-stack exception marker upon exception return powerpc: Remove export of save_stack_trace_tsk_reliable() powerpc/mm: fix "section_base" set but not used powerpc/mm: Fix "sz" set but not used warning powerpc/mm: Check secondary hash page table powerpc: remove nargs from __SYSCALL powerpc/64s: Fix unrelocated interrupt trampoline address test powerpc/powernv/ioda: Fix locked_vm counting for memory used by IOMMU tables powerpc/fsl: Fix the flush of branch predictor. powerpc/powernv: Make opal log only readable by root powerpc/xmon: Fix opcode being uninitialized in print_insn_powerpc powerpc/powernv: move OPAL call wrapper tracing and interrupt handling to C powerpc/64s: Fix data interrupts vs d-side MCE reentrancy powerpc/64s: Prepare to handle data interrupts vs d-side MCE reentrancy powerpc/64s: system reset interrupt preserve HSRRs powerpc/64s: Fix HV NMI vs HV interrupt recoverability test powerpc/mm/hash: Handle mmap_min_addr correctly in get_unmapped_area topdown search powerpc/hugetlb: Handle mmap_min_addr correctly in get_unmapped_area callback selftests/powerpc: Remove duplicate header powerpc sstep: Add support for modsd, modud instructions ...
2019-03-06Merge tag 'char-misc-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-miscLinus Torvalds166-273/+53862
Pull char/misc driver updates from Greg KH: "Here is the big char/misc driver patch pull request for 5.1-rc1. The largest thing by far is the new habanalabs driver for their AI accelerator chip. For now it is in the drivers/misc directory but will probably move to a new directory soon along with other drivers of this type. Other than that, just the usual set of individual driver updates and fixes. There's an "odd" merge in here from the DRM tree that they asked me to do as the MEI driver is starting to interact with the i915 driver, and it needed some coordination. All of those patches have been properly acked by the relevant subsystem maintainers. All of these have been in linux-next with no reported issues, most for quite some time" * tag 'char-misc-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (219 commits) habanalabs: adjust Kconfig to fix build errors habanalabs: use %px instead of %p in error print habanalabs: use do_div for 64-bit divisions intel_th: gth: Fix an off-by-one in output unassigning habanalabs: fix little-endian<->cpu conversion warnings habanalabs: use NULL to initialize array of pointers habanalabs: fix little-endian<->cpu conversion warnings habanalabs: soft-reset device if context-switch fails habanalabs: print pointer using %p habanalabs: fix memory leak with CBs with unaligned size habanalabs: return correct error code on MMU mapping failure habanalabs: add comments in uapi/misc/habanalabs.h habanalabs: extend QMAN0 job timeout habanalabs: set DMA0 completion to SOB 1007 habanalabs: fix validation of WREG32 to DMA completion habanalabs: fix mmu cache registers init habanalabs: disable CPU access on timeouts habanalabs: add MMU DRAM default page mapping habanalabs: Dissociate RAZWI info from event types misc/habanalabs: adjust Kconfig to fix build errors ...
2019-03-05mm: replace all open encodings for NUMA_NO_NODEAnshuman Khandual1-1/+2
Patch series "Replace all open encodings for NUMA_NO_NODE", v3. All these places for replacement were found by running the following grep patterns on the entire kernel code. Please let me know if this might have missed some instances. This might also have replaced some false positives. I will appreciate suggestions, inputs and review. 1. git grep "nid == -1" 2. git grep "node == -1" 3. git grep "nid = -1" 4. git grep "node = -1" This patch (of 2): At present there are multiple places where invalid node number is encoded as -1. Even though implicitly understood it is always better to have macros in there. Replace these open encodings for an invalid node number with the global macro NUMA_NO_NODE. This helps remove NUMA related assumptions like 'invalid node' from various places redirecting them to a common definition. Link: http://lkml.kernel.org/r/1545127933-10711-2-git-send-email-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> Reviewed-by: David Hildenbrand <david@redhat.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> [ixgbe] Acked-by: Jens Axboe <axboe@kernel.dk> [mtip32xx] Acked-by: Vinod Koul <vkoul@kernel.org> [dmaengine.c] Acked-by: Michael Ellerman <mpe@ellerman.id.au> [powerpc] Acked-by: Doug Ledford <dledford@redhat.com> [drivers/infiniband] Cc: Joseph Qi <jiangqi903@gmail.com> Cc: Hans Verkuil <hverkuil@xs4all.nl> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-03-05vmw_balloon: mark inflated pages PG_offlineDavid Hildenbrand1-0/+32
Mark inflated and never onlined pages PG_offline, to tell the world that the content is stale and should not be dumped. [david@redhat.com: use vmballoon_page_in_frames more widely] Link: http://lkml.kernel.org/r/20181122100627.5189-7-david@redhat.com Link: http://lkml.kernel.org/r/20181119101616.8901-7-david@redhat.com Signed-off-by: David Hildenbrand <david@redhat.com> Acked-by: Nadav Amit <namit@vmware.com> Cc: Xavier Deguillard <xdeguillard@vmware.com> Cc: Nadav Amit <namit@vmware.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Julien Freche <jfreche@vmware.com> Cc: Matthew Wilcox <willy@infradead.org> Cc: Michal Hocko <mhocko@suse.com> Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: Alexander Duyck <alexander.h.duyck@linux.intel.com> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Baoquan He <bhe@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: Christian Hansen <chansen3@cisco.com> Cc: Dave Young <dyoung@redhat.com> Cc: David Rientjes <rientjes@google.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Juergen Gross <jgross@suse.com> Cc: Kairui Song <kasong@redhat.com> Cc: Kazuhito Hagio <k-hagio@ab.jp.nec.com> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: "K. Y. Srinivasan" <kys@microsoft.com> Cc: Len Brown <len.brown@intel.com> Cc: Lianbo Jiang <lijiang@redhat.com> Cc: Michal Hocko <mhocko@kernel.org> Cc: Mike Rapoport <rppt@linux.vnet.ibm.com> Cc: Miles Chen <miles.chen@mediatek.com> Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Cc: Omar Sandoval <osandov@fb.com> Cc: Pankaj gupta <pagupta@redhat.com> Cc: Pavel Machek <pavel@ucw.cz> Cc: Pavel Tatashin <pasha.tatashin@oracle.com> Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> Cc: Stefano Stabellini <sstabellini@kernel.org> Cc: Stephen Hemminger <sthemmin@microsoft.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Vitaly Kuznetsov <vkuznets@redhat.com> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-03-02habanalabs: adjust Kconfig to fix build errorsOded Gabbay1-1/+2
The driver use the HWMON framework to display various sensors information. Therefore, CONFIG_HWMON must be included to prevent build errors. This patch adds "select HWMON" to the driver's Kconfig file to make sure HWMON is built. In addition, to avoid breaking dependencies, it adds dependency on HAS_IOMEM because HWMON is dependent on HAS_IOMEM. Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-02habanalabs: use %px instead of %p in error printOded Gabbay1-1/+1
When parsing the address of an internal command buffer, the driver prints an error if the buffer's address is not in the range of the device's DRAM or SRAM memory address space. Use %px to print the real address that the user gave the driver and not a hashed value, so the user will get a clue regarding the origin of his error. Note that if the print occurs, the pointer that is printed is a user's virtual address and not some kind of physical address. Suggested-by: Joe Perches <joe@perches.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-01habanalabs: use do_div for 64-bit divisionsOded Gabbay1-6/+6
This patch fix compilation error in 32-bit ARM architecture regarding division of 2 64-bit variables. Use the kernel do_div() macro, which is implemented per architecture, for doing these divisions instead of using the / operator. Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-28habanalabs: fix little-endian<->cpu conversion warningsOded Gabbay6-53/+70
Add __cpu_to_le16/32/64 and __le16/32/64_to_cpu where needed according to sparse. Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-28habanalabs: use NULL to initialize array of pointersOded Gabbay1-1/+1
This patch fixes the following sparse warnings: drivers/misc/habanalabs/hwmon.c:20:56: warning: Using plain integer as NULL pointer Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-28habanalabs: fix little-endian<->cpu conversion warningsTomer Tayar1-98/+125
Add __cpu_to_le16/32/64 and __le16/32/64_to_cpu where needed according to sparse. Signed-off-by: Tomer Tayar <ttayar@habana.ai> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-28habanalabs: soft-reset device if context-switch failsOded Gabbay2-8/+10
This patch fix a bug in the driver, where if the TPC or MME remains in non-IDLE even after all the command submissions are done (due to user bug or malicious user), then future command submissions will fail in the context-switch stage and the driver will remain in "stuck" mode. The fix is to do a soft-reset of the device in case the context-switch fails, because the device should be IDLE during context-switch. If it is not IDLE, then something is wrong and we should reset the compute engines. Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-28habanalabs: print pointer using %pOded Gabbay1-3/+2
Don't cast pointer to u64 to print it. Instead, print the pointer using %p. Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-28habanalabs: fix memory leak with CBs with unaligned sizeOded Gabbay1-3/+6
This patch fix a bug when a command buffer with unaligned size (with regard to PAGE_SIZE) was used. The accounting for the unmap operation wasn't done correctly and could result in a memory leak. Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-28habanalabs: return correct error code on MMU mapping failureOmer Shpigelman1-2/+2
This patch fix a bug where EINVAL was returned instead of -EINVAL. Signed-off-by: Omer Shpigelman <oshpigelman@habana.ai> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-28habanalabs: extend QMAN0 job timeoutOmer Shpigelman1-3/+9
This patch fix a bug where the timeout for sending a job on QMAN0 by KMD wasn't enough in palladium environment. Signed-off-by: Omer Shpigelman <oshpigelman@habana.ai> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-28habanalabs: set DMA0 completion to SOB 1007Oded Gabbay2-7/+8
This patch fix a bug where DMA channel 0 completion address wasn't initialized by the driver. The patch sets the address to Sync Object no. 1007 Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-28habanalabs: fix validation of WREG32 to DMA completionOded Gabbay1-1/+1
This patch fix a bug in the validation of WREG32 in DMA queues. The validation was too strict. It allowed the user to set the completion address only for DMA channel 1. The fix allows the user to set the completion address for all 5 DMA channels. Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-28habanalabs: fix mmu cache registers initOded Gabbay1-2/+3
This patch fix an incorrect initialization of the MMU cache registers. The shift operation was done in the wrong direction. Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-28habanalabs: disable CPU access on timeoutsOded Gabbay6-7/+18
This patch provides a workaround for a bug in the F/W where the response time for a request from KMD may take more then 100ms. This could cause the queue between KMD and the F/W to get out of sync. The WA is to: 1. Increase the timeout of ALL requests to 1s. 2. In case a request isn't answered in time, mark the state as "cpu_disabled" and prevent sending further requests from KMD to the F/W. This will eventually lead to a heartbeat failure and hard reset of the device. Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-28habanalabs: add MMU DRAM default page mappingOmer Shpigelman6-168/+361
This patch provides a workaround for a H/W bug in Goya, where access to RAZWI from TPC can cause PCI completion timeout. The WA is to use the device MMU to map any unmapped DRAM memory to a default page in the DRAM. That way, the TPC will never reach RAZWI upon accessing a bad address in the DRAM. When a DRAM page is mapped by the user, its default mapping is overwritten. Once that page is unmapped, the MMU driver will map that page to the default page. To help debugging, the driver will set the default page area to 0x99 on device initialization. Signed-off-by: Omer Shpigelman <oshpigelman@habana.ai> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-28habanalabs: Dissociate RAZWI info from event typesTomer Tayar1-100/+127
This patch provides a workaround for a H/W bug in the RAZWI logger in Goya. The logger doesn't recognize the initiator correctly and as a result, accesses from one initiator are reported that were coming from a different initiator. The WA is to print the error information from the event entries we receive without looking at the RAZWI logger at all. Signed-off-by: Tomer Tayar <ttayar@habana.ai> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-28Merge tag 'topic/mei-hdcp-2019-02-26' of git://anongit.freedesktop.org/drm/drm-intel into char-misc-nextGreg Kroah-Hartman6-0/+1261
Daniel writes: mei-hdcp driver mei driver for the me hdcp client, for use by drm/i915. Including the following prep work: - whitelist hdcp client in mei bus - merge to include char-misc-next - drm/i915 side of the mei_hdcp/i915 component interface - component prep work (including one patch touching i915&snd-hda) * tag 'topic/mei-hdcp-2019-02-26' of git://anongit.freedesktop.org/drm/drm-intel: (23 commits) misc/mei/hdcp: Component framework for I915 Interface misc/mei/hdcp: Closing wired HDCP2.2 Tx Session misc/mei/hdcp: Enabling the HDCP authentication misc/mei/hdcp: Verify M_prime misc/mei/hdcp: Repeater topology verification and ack misc/mei/hdcp: Prepare Session Key misc/mei/hdcp: Verify L_prime misc/mei/hdcp: Initiate Locality check misc/mei/hdcp: Store the HDCP Pairing info misc/mei/hdcp: Verify H_prime misc/mei/hdcp: Verify Receiver Cert and prepare km misc/mei/hdcp: Initiate Wired HDCP2.2 Tx Session misc/mei/hdcp: Define ME FW interface for HDCP2.2 misc/mei/hdcp: Client driver for HDCP application mei: bus: whitelist hdcp client drm/audio: declaration of struct device drm: helper functions for hdcp2 seq_num to from u32 drm/i915: MEI interface definition drm/i915: header for i915 - MEI_HDCP interface drm/i915: enum port definition is moved into i915_drm.h ...
2019-02-27misc/habanalabs: adjust Kconfig to fix build errorsRandy Dunlap1-0/+1
Several places in the habanalabs driver use gen_alloc functions, so select GENERIC_ALLOCATOR to make those functions available. Fixes these build errors: ERROR: "gen_pool_alloc" [drivers/misc/habanalabs/habanalabs.ko] undefined! ERROR: "gen_pool_add_virt" [drivers/misc/habanalabs/habanalabs.ko] undefined! ERROR: "gen_pool_destroy" [drivers/misc/habanalabs/habanalabs.ko] undefined! ERROR: "gen_pool_create" [drivers/misc/habanalabs/habanalabs.ko] undefined! ERROR: "gen_pool_free" [drivers/misc/habanalabs/habanalabs.ko] undefined! Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-27misc: hpilo: Do not claim unsupported hardwareMatt Hsiao1-0/+2
CL2600/CL2800 servers leveraged Proliant hardware but are targeted to a different market segment and come with a different firmware base. Based upon targeted market needs, the servers de-featured certain aspects of iLO. As a result, hpilo driver still claims the hardware but is not functional, so we decided to blacklist it with SSID 0x0289 to reduce confusion to customers. Signed-off-by: Matt Hsiao <matt.hsiao@hpe.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-27misc: hpilo: Exclude unsupported device via blacklistMatt Hsiao1-3/+9
Instead of having explicit if statements excluding devices, use a pci_device_id table of devices to blacklist. HPE will put out minor updates to the iLO using the same device info except for the subsystem device id. hpilo driver takes the approach to claim based upon {Vendor, Device, SubVendor} and it allows old software to work on new hardware without patching. As our primary way to support our customers is via distros, the patching process could take months to go upstream and then backported to multiple releases of multiple distros. This approach worked fairly well as this is only the second time in 10+ years that we need to blacklist an instance. Signed-off-by: Matt Hsiao <matt.hsiao@hpe.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-27misc: mic/scif: mark expected switch fall-throughGustavo A. R. Silva1-1/+1
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/misc/mic/scif/scif_rma.c: In function ‘scif_unregister_window’: drivers/misc/mic/scif/scif_rma.c:665:12: warning: this statement may fall through [-Wimplicit-fallthrough=] send_msg = true; ~~~~~~~~~^~~~~~ drivers/misc/mic/scif/scif_rma.c:668:2: note: here case OP_IN_PROGRESS: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find. This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-27habanalabs: make functions static or declare themOded Gabbay6-45/+54
This patch fixes the below sparse warnings by either making the functions static or by adding a declaration in the relevant header file. In addition, the patch removes goya_mmap completely as it doesn't add any additional benefit. Fixes the following sparse warnings: drivers/misc/habanalabs/habanalabs_drv.c:24:1: warning: symbol 'hl_devs_idr' was not declared. Should it be static? drivers/misc/habanalabs/habanalabs_drv.c:25:1: warning: symbol 'hl_devs_idr_lock' was not declared. Should it be static? drivers/misc/habanalabs/memory.c:1451:5: warning: symbol 'hl_vm_ctx_init_with_ranges' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:396:5: warning: symbol 'goya_send_pci_access_msg' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:417:5: warning: symbol 'goya_pci_bars_map' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:557:6: warning: symbol 'goya_reset_link_through_bridge' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:774:5: warning: symbol 'goya_early_fini' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:857:6: warning: symbol 'goya_late_fini' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:971:5: warning: symbol 'goya_sw_fini' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:1233:5: warning: symbol 'goya_init_cpu_queues' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:2914:5: warning: symbol 'goya_suspend' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:2939:5: warning: symbol 'goya_resume' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:2952:5: warning: symbol 'goya_mmap' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:2957:5: warning: symbol 'goya_cb_mmap' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:2973:6: warning: symbol 'goya_ring_doorbell' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:3063:6: warning: symbol 'goya_flush_pq_write' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:3068:6: warning: symbol 'goya_dma_alloc_coherent' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:3074:6: warning: symbol 'goya_dma_free_coherent' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:3080:6: warning: symbol 'goya_get_int_queue_base' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:3138:5: warning: symbol 'goya_send_job_on_qman0' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:3295:5: warning: symbol 'goya_test_queue' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:3417:6: warning: symbol 'goya_dma_pool_zalloc' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:3426:6: warning: symbol 'goya_dma_pool_free' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:3432:6: warning: symbol 'goya_cpu_accessible_dma_pool_alloc' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:3448:6: warning: symbol 'goya_cpu_accessible_dma_pool_free' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:3458:5: warning: symbol 'goya_dma_map_sg' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:3467:6: warning: symbol 'goya_dma_unmap_sg' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:3473:5: warning: symbol 'goya_get_dma_desc_list_size' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:4210:5: warning: symbol 'goya_parse_cb_no_mmu' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:4261:5: warning: symbol 'goya_parse_cb_no_ext_quque' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:4294:5: warning: symbol 'goya_cs_parser' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:4307:6: warning: symbol 'goya_add_end_of_cb_packets' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:4334:5: warning: symbol 'goya_context_switch' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:4426:6: warning: symbol 'goya_restore_phase_topology' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:4460:5: warning: symbol 'goya_debugfs_read32' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:4510:5: warning: symbol 'goya_debugfs_write32' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:4738:6: warning: symbol 'goya_handle_eqe' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:4836:6: warning: symbol 'goya_get_events_stat' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:5075:5: warning: symbol 'goya_send_heartbeat' was not declared. Should it be static? drivers/misc/habanalabs/goya/goya.c:5253:5: warning: symbol 'goya_get_eeprom_data' was not declared. Should it be static? Reported-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-27habanalabs: allow memory allocations larger than 4GBOded Gabbay2-7/+5
This patch increase the size field in the uapi structure of the Memory IOCTL from 32-bit to 64-bit. This is to allow the user to allocate and/or map memory in chunks that are larger then 4GB. Goya's device memory (DRAM) can be up to 16GB, and for certain topologies, the user may want an allocation that is larger than 4GB. This change doesn't break current user-space because there was a "pad" field in the uapi structure right after the size field. Changing the size field to be 64-bit and removing the pad field maintains compatibility with current user-space. Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26mic: vop: Allow building on more systemsVincent Whitchurch1-2/+1
VOP_BUS does not actually depend on x86-64 or PCI or X86_DEV_DMA_OPS. The dependency on X86_DEV_DMA_OPS has been unnecessary since commit 5657933dbb6e25fe ("treewide: Move dma_ops from struct dev_archdata into struct device"). Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26mic: Rename ioremap pointer to remapVincent Whitchurch7-27/+26
Some architectures (like MIPS) implement ioremap as a macro, and this leads to conflicts with the ioremap function pointer in various mic structures. drivers/misc/mic/vop/vop_vringh.c: In function 'vop_virtio_init_post': drivers/misc/mic/vop/vop_vringh.c:86:13: error: macro "ioremap" passed 3 arguments, but takes just 2 Rename ioremap to remap to fix this. Likewise for iounmap. Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26mic: vop: Cast pointers to unsigned longVincent Whitchurch2-6/+12
Fix these on 32-bit: vop_vringh.c:711:13: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26VMCI: Support upto 64-bit PPNsVishnu DASA6-47/+72
Add support in the VMCI driver to handle upto 64-bit PPNs when the VMCI device exposes the capability for 64-bit PPNs. Reviewed-by: Adit Ranadive <aditr@vmware.com> Reviewed-by: Jorgen Hansen <jhansen@vmware.com> Signed-off-by: Vishnu Dasa <vdasa@vmware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26misc: rtsx: Enable OCP for rts522a rts524a rts525a rts5260RickyWu5-112/+165
this enables and adds OCP function for Realtek A series cardreader chips and fixes some OCP flow in rts5260.c Signed-off-by: RickyWu <ricky_wu@realtek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26habanalabs: use u64 when comparing variables' sum to u32_maxOded Gabbay2-3/+5
This patch fixes two smatch warnings about two if statements that are always true because of the types of the variables used - u32 when comparing the sum to u32_max. The patch changes the types to be u64 so the accumalted sum can be checked if it is larger than u32_max Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26mei: bus: move hw module get/put to probe/releaseAlexander Usyskin1-11/+10
Fix unbalanced module reference counting during internal reset, which prevents the drivers unloading. Tracking mei_me/txe modules on mei client bus via mei_cldev_enable/disable is error prone due to possible internal reset flow, where clients are disconnected underneath. Moving reference counting to probe and release of mei bus client driver solves this issue in simplest way, as each client provides only a single connection to a client bus driver. Cc: <stable@vger.kernel.org> 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>
2019-02-26habanalabs: return error when failing to read/write i2cOded Gabbay1-2/+2
The driver can't read/write from i2c if the device is in reset or disabled. Therefore, return -EBUSY in those cases instead of 0. This change also fixes a smatch warning about uninitialized variable. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-25misc/mei/hdcp: Component framework for I915 InterfaceRamalingam C1-3/+83
Mei hdcp driver is designed as component slave for the I915 component master. v2: Rebased. v3: Notifier chain is adopted for cldev state update [Tomas] v4: Made static dummy functions as inline in mei_hdcp.h API for polling client device status IS_ENABLED used in header, for config status for mei_hdcp. v5: Replacing the notifier with component framework. [Daniel] v6: Rebased on the I915 comp master redesign. v7: mei_hdcp_component_registered is made static [Uma] Need for global static variable mei_cldev is removed. v8: master comp is added to be matched with i915 subcomponent [daniel] v9: only comp_master is set and retrieved as driver_data [Daniel] Reviewed-by Daniel. v10: small corrections at probe [Tomas] v11: bind and unbind logs are made as debug logs [Tomas] cldev_enable failure is handled [Tomas] Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/1550772730-23280-16-git-send-email-ramalingam.c@intel.com
2019-02-25misc/mei/hdcp: Closing wired HDCP2.2 Tx SessionRamalingam C1-1/+54
Request the ME to terminate the HDCP2.2 session for a port. On Success, ME FW will mark the intel port as Deauthenticated and terminate the wired HDCP2.2 Tx session started due to the cmd WIRED_INITIATE_HDCP2_SESSION. v2: Rebased. v3: cldev is passed as first parameter [Tomas] Redundant comments and cast are removed [Tomas] v4: %zd for ssize_t [Alexander] %s/return -1/return -EIO [Alexander] Style and typos fixed [Uma] v5: Extra line is removed. v6: Collected the Rb-ed by. Rebased. v7: Adjust to the new mei interface. Fix for Kdoc. v8: K-Doc addition.[Tomas] v9: renamed func as mei_hdcp_* [Tomas] Inline function is defined for DDI index [Tomas] v10: K-Doc fix. [Tomas] v11: Rebased. Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/1550772730-23280-15-git-send-email-ramalingam.c@intel.com
2019-02-25misc/mei/hdcp: Enabling the HDCP authenticationRamalingam C1-1/+54
Request to ME to configure a port as authenticated. On Success, ME FW will mark the port as authenticated and provides HDCP cipher with the encryption keys. Enabling the Authentication can be requested once all stages of HDCP2.2 authentication is completed by interacting with ME FW. Only after this stage, driver can enable the HDCP encryption for the port, through HW registers. v2: Rebased. v3: cldev is passed as first parameter [Tomas] Redundant comments and cast are removed [Tomas] v4: %zd for ssize_t [Alexander] %s/return -1/return -EIO [Alexander] Style and typos fixed [Uma] v5: Rebased. v6: Collected the Rb-ed by. Rebased. v7: Adjust to the new mei interface. Fix for Kdoc. v8: K-Doc addition. [Tomas] v9: renamed func as mei_hdcp_* [Tomas] Inline function is defined for DDI index [Tomas] v10: K-Doc fix. [Tomas] v11: Rebased. Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/1550772730-23280-14-git-send-email-ramalingam.c@intel.com
2019-02-25misc/mei/hdcp: Verify M_primeRamalingam C1-1/+66
Request to ME to verify the M_Prime received from the HDCP sink. ME FW will calculate the M and compare with M_prime received as part of RepeaterAuth_Stream_Ready, which is HDCP2.2 protocol msg. On successful completion of this stage, downstream propagation of the stream management info is completed. v2: Rebased. v3: cldev is passed as first parameter [Tomas] Redundant comments and cast are removed [Tomas] v4: %zd for ssize_t [Alexander] %s/return -1/return -EIO [Alexander] endianness conversion func is moved to drm_hdcp.h [Uma] v5: Rebased. v6: Collected the Rb-ed by. Rebasing. v7: Adjust to the new mei interface. Fix for Kdoc. v8: K-Doc addition. [Tomas] drm_hdcp2_u32_to_seq_num() is used for u32 to seq_num. v9: renamed func as mei_hdcp_* [Tomas] Inline function is defined for DDI index [Tomas] v10: K-Doc fix. [Tomas] v11: %s/__swab16/cpu_to_be16 [Tomas] Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/1550772730-23280-13-git-send-email-ramalingam.c@intel.com
2019-02-25misc/mei/hdcp: Repeater topology verification and ackRamalingam C1-1/+76
Request ME to verify the downstream topology information received. ME FW will validate the Repeaters receiver id list and downstream topology. On Success ME FW will provide the Least Significant 128bits of VPrime, which forms the repeater ack. v2: Rebased. v3: cldev is passed as first parameter [Tomas] Redundant comments and cast are removed [Tomas] v4: %zd for ssize_t [Alexander] %s/return -1/return -EIO [Alexander] Style and typos fixed [Uma] v5: Rebased. v6: Rebasing. v7: Adjust to the new mei interface. Fix for Kdoc. v8: K-Doc addition. [Tomas] v9: renamed func as mei_hdcp_* [Tomas] Inline function is defined for DDI index [Tomas] v10: K-Doc fix. [Tomas] v11: Rebased. Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/1550772730-23280-12-git-send-email-ramalingam.c@intel.com
2019-02-25misc/mei/hdcp: Prepare Session KeyRamalingam C1-1/+58
Request to ME to prepare the encrypted session key. On Success, ME provides Encrypted session key. Function populates the HDCP2.2 authentication msg SKE_Send_Eks. v2: Rebased. v3: cldev is passed as first parameter [Tomas] Redundant comments and cast are removed [Tomas] v4: %zd for ssize_t [Alexander] %s/return -1/return -EIO [Alexander] Style fixed [Uma] v5: Rebased. v6: Collected the Rb-ed by. Rebasing. v7: Adjust to the new mei interface. Fix for Kdoc. v8: K-Doc addition. [Tomas] v9: renamed func as mei_hdcp_* [Tomas] Inline function is defined for DDI index [Tomas] v10: K-Doc fix. [Tomas] v11: Rebased. Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/1550772730-23280-11-git-send-email-ramalingam.c@intel.com
2019-02-25misc/mei/hdcp: Verify L_primeRamalingam C1-1/+59
Request to ME to verify the LPrime received from HDCP sink. On Success, ME FW will verify the received Lprime by calculating and comparing with L. This represents the completion of Locality Check. v2: Rebased. v3: cldev is passed as first parameter [Tomas] Redundant comments and cast are removed [Tomas] v4: %zd for ssize_t [Alexander] %s/return -1/return -EIO [Alexander] Style fixed [Uma] v5: Rebased. v6: Collected the Rb-ed by. Rebasing. v7: Adjust to the new mei interface. Fix for Kdoc. v8: K-Doc addition. [Tomas] memcpy for const length. v9: renamed func as mei_hdcp_* [Tomas] Inline function is defined for DDI index [Tomas] v10: K-Doc fix. [Tomas] v11: Rebased. Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/1550772730-23280-10-git-send-email-ramalingam.c@intel.com
2019-02-25misc/mei/hdcp: Initiate Locality checkRamalingam C1-1/+56
Requests ME to start the second stage of HDCP2.2 authentication, called Locality Check. On Success, ME FW will provide LC_Init message to send to hdcp sink. v2: Rebased. v3: cldev is passed as first parameter [Tomas] Redundant comments and cast are removed [Tomas] v4: %zd used for ssize_t [Alexander] %s/return -1/return -EIO [Alexander] Style fixed [Uma] v5: Rebased. v6: Collected the Rb-ed by. Rebasing. v7: Adjust to the new mei interface. Fix for Kdoc. v8: K-Doc addition. [Tomas] v9: renamed func as mei_hdcp_* [Tomas] Inline function is defined for DDI index [Tomas] v10: K-Doc fix. [Tomas] v11: Rebased. Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/1550772730-23280-9-git-send-email-ramalingam.c@intel.com
2019-02-25misc/mei/hdcp: Store the HDCP Pairing infoRamalingam C1-1/+59
Provides Pairing info to ME to store. Pairing is a process to fast track the subsequent authentication with the same HDCP sink. On Success, received HDCP pairing info is stored in non-volatile memory of ME. v2: Rebased. v3: cldev is passed as first parameter [Tomas] Redundant comments and cast are removed [Tomas] v4: %zd for ssize_t [Alexander] %s/return -1/return -EIO [Alexander] Style fixed [Uma] v5: Rebased. v6: Collected the Rb-ed by. Rebasing. v7: Adjust to the new mei interface. Fix for Kdoc. v8: K-Doc addition. [Tomas] memcpy for const length. v9: renamed func as mei_hdcp_* [Tomas] Inline function is defined for DDI index [Tomas] v10: K-Doc fix. [Tomas] v11: Rebased. Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/1550772730-23280-8-git-send-email-ramalingam.c@intel.com
2019-02-25misc/mei/hdcp: Verify H_primeRamalingam C1-1/+57
Requests for the verification of AKE_Send_H_prime. ME will calculate the H and comparing it with received H_Prime. The result will be returned as status. Here AKE_Send_H_prime is a HDCP2.2 Authentication msg. v2: Rebased. v3: cldev is passed as first parameter [Tomas] Redundant comments and cast are removed [Tomas] v4: %zd for ssize_t [Alexander] %s/return -1/return -EIO [Alexander] Styles and typos fixed [Uma] v5: Rebased. v6: Collected the Rb-ed by. Rebasing. v7: Adjust to the new mei interface. Fix for Kdoc. v8: K-Doc Addition [Tomas] memcpy for const length. v9: renamed func as mei_hdcp_* [Tomas] Inline function is defined for DDI index [Tomas] v10: K-Doc fix. [Tomas] v11: Rebased. Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/1550772730-23280-7-git-send-email-ramalingam.c@intel.com
2019-02-25misc/mei/hdcp: Verify Receiver Cert and prepare kmRamalingam C1-1/+82
Requests for verification for receiver certification and also the preparation for next AKE auth message with km. On Success ME FW validate the HDCP2.2 receivers certificate and do the revocation check on the receiver ID. AKE_Stored_Km will be prepared if the receiver is already paired, else AKE_No_Stored_Km will be prepared. Here AKE_Stored_Km and AKE_No_Stored_Km are HDCP2.2 protocol msgs. v2: Rebased. v3: cldev is passed as first parameter [Tomas] Redundant comments and cast are removed [Tomas] v4: %zd is used for ssize_t [Alexander] %s/return -1/return -EIO [Alexander] v5: Rebased. v6: Collected the Rb-ed by. Rebasing. v7: Adjust to the new mei interface. Fix for Kdoc. v8: K-Doc Addition. [Tomas] memcpy for const length. v9: renamed func as mei_hdcp_* [Tomas] Inline function is defined for DDI index [Tomas] v10: Fixed the conversion of u8 to bool [Tomas] K-Doc fix [Tomas] v11: Rebased. Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/1550772730-23280-6-git-send-email-ramalingam.c@intel.com
2019-02-25misc/mei/hdcp: Initiate Wired HDCP2.2 Tx SessionRamalingam C2-0/+105
Request ME FW to start the HDCP2.2 session for an intel port. Prepares payloads for command WIRED_INITIATE_HDCP2_SESSION and sends to ME FW. On Success, ME FW will start a HDCP2.2 session for the port and provides the content for HDCP2.2 AKE_Init message. v2: Rebased. v3: cldev is add as a separate parameter [Tomas] Redundant comment and typecast are removed [Tomas] v4: %zd is used for size [Alexander] %s/return -1/return -EIO [Alexander] Spellings in commit msg is fixed [Uma] v5: Rebased. v6: Collected the rb-ed by. Realigning the patches in the series. v7: Adjust to the new mei interface. Fix for kdoc. v8: K-Doc Addition. memcpy for const length. v9: s/mei_hdcp_ddi/mei_fw_ddi s/i915_port/mei_i915_port [Tomas] renamed func as mei_hdcp_* [Tomas] Instead of macro, inline func for ddi index is used. [Tomas] v10: Switch case for the coversion between i915_port to mei_ddi [Tomas] Kernel doc fix. v11: mei_hdcp_ops is defined as const. [Tomas] Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/1550772730-23280-5-git-send-email-ramalingam.c@intel.com
2019-02-25misc/mei/hdcp: Define ME FW interface for HDCP2.2Ramalingam C1-0/+366
Defines the HDCP specific ME FW interfaces such as Request CMDs, payload structure for CMDs and their response status codes. This patch defines payload size(Excluding the Header)for each WIRED HDCP2.2 CMDs. v2: Rebased. v3: Extra comments are removed. v4: %s/\/\*\*/\/\* v5: Extra lines are removed. v6: Remove redundant text from the License header %s/LPRIME_HALF/V_PRIME_HALF %s/uintxx_t/uxx v7: Extra taps removed. v8: k is defined as __be16 [Tomas] Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Acked-by Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/1550772730-23280-4-git-send-email-ramalingam.c@intel.com
2019-02-25misc/mei/hdcp: Client driver for HDCP applicationRamalingam C4-0/+83
ME FW contributes a vital role in HDCP2.2 authentication. HDCP2.2 driver needs to communicate to ME FW for each step of the HDCP2.2 authentication. ME FW prepare and HDCP2.2 authentication parameters and encrypt them as per spec. With such parameter Driver prepares HDCP2.2 auth messages and communicate with HDCP2.2 sink. Similarly HDCP2.2 sink's response is shared with ME FW for decrypt and verification. Once All the steps of HDCP2.2 authentications are complete on driver's request ME FW will configure the port as authenticated and supply the HDCP keys to the Gen HW for encryption. Only after this stage HDCP2.2 driver can start the HDCP2.2 encryption for a port. ME FW is interfaced to kernel through MEI Bus Driver. To obtain the HDCP2.2 services from the ME FW through MEI Bus driver MEI Client Driver is developed. v2: hdcp files are moved to drivers/misc/mei/hdcp/ [Tomas] v3: Squashed the Kbuild support [Tomas] UUID renamed and Module License is modified [Tomas] drv_data is set to null at remove [Tomas] v4: Module name is changed to "MEI HDCP" I915 Selects the MEI_HDCP v5: Remove redundant text from the License header Fix malformed licence Removed the drv_data resetting. v6: K-Doc addition. [Tomas] v7: %s/UUID_LE/GUID_INIT [Tomas] GPL Ver is 2.0 than 2.0+ [Tomas] v8: Added more info into Kconfig addition [Tomas] Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/1550772730-23280-3-git-send-email-ramalingam.c@intel.com