1. 28 2月, 2019 4 次提交
    • O
      habanalabs: disable CPU access on timeouts · a28ce422
      Oded Gabbay 提交于
      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: NOded Gabbay <oded.gabbay@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a28ce422
    • O
      habanalabs: add MMU DRAM default page mapping · 27ca384c
      Omer Shpigelman 提交于
      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: NOmer Shpigelman <oshpigelman@habana.ai>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      27ca384c
    • T
      habanalabs: Dissociate RAZWI info from event types · 60b7dcca
      Tomer Tayar 提交于
      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: NTomer Tayar <ttayar@habana.ai>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      60b7dcca
    • G
      Merge tag 'topic/mei-hdcp-2019-02-26' of... · f699f9f9
      Greg Kroah-Hartman 提交于
      Merge tag 'topic/mei-hdcp-2019-02-26' of git://anongit.freedesktop.org/drm/drm-intel into char-misc-next
      
      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
        ...
      f699f9f9
  2. 27 2月, 2019 7 次提交
    • R
      misc/habanalabs: adjust Kconfig to fix build errors · b39e557b
      Randy Dunlap 提交于
      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: NRandy Dunlap <rdunlap@infradead.org>
      Reviewed-by: NOded Gabbay <oded.gabbay@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b39e557b
    • M
      misc: hpilo: Do not claim unsupported hardware · 9b6dba70
      Matt Hsiao 提交于
      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: NMatt Hsiao <matt.hsiao@hpe.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9b6dba70
    • M
      misc: hpilo: Exclude unsupported device via blacklist · bc7de897
      Matt Hsiao 提交于
      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: NMatt Hsiao <matt.hsiao@hpe.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bc7de897
    • G
      virt: vbox: Mark expected switch fall-through · 9d49fff9
      Gustavo A. R. Silva 提交于
      In preparation to enabling -Wimplicit-fallthrough, mark switch
      cases where we are expecting to fall through.
      
      This patch fixes the following warning:
      
      drivers/virt/vboxguest/vboxguest_core.c: In function ‘vbg_core_ioctl’:
      drivers/virt/vboxguest/vboxguest_core.c:1486:10: warning: this statement may fall through [-Wimplicit-fallthrough=]
         f32bit = true;
         ~~~~~~~^~~~~~
      drivers/virt/vboxguest/vboxguest_core.c:1489:2: note: here
        case VBG_IOCTL_HGCM_CALL(0):
        ^~~~
      
      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: NGustavo A. R. Silva <gustavo@embeddedor.com>
      Reviewed-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9d49fff9
    • G
      misc: mic/scif: mark expected switch fall-through · b304da70
      Gustavo A. R. Silva 提交于
      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: NGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b304da70
    • O
      habanalabs: make functions static or declare them · 5e6e0239
      Oded Gabbay 提交于
      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: NYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5e6e0239
    • O
      habanalabs: allow memory allocations larger than 4GB · 230afe74
      Oded Gabbay 提交于
      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: NOded Gabbay <oded.gabbay@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      230afe74
  3. 26 2月, 2019 25 次提交
  4. 23 2月, 2019 4 次提交