1. 28 2月, 2019 16 次提交
  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 17 次提交