1. 11 11月, 2016 5 次提交
    • A
      fpga: fpga-region: device tree control for FPGA · 0fa20cdf
      Alan Tull 提交于
      FPGA Regions support programming FPGA under control of the Device
      Tree.
      Signed-off-by: NAlan Tull <atull@opensource.altera.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0fa20cdf
    • A
      fpga: add fpga bridge framework · 21aeda95
      Alan Tull 提交于
      This framework adds API functions for enabling/
      disabling FPGA bridges under kernel control.
      
      This allows the Linux kernel to disable FPGA bridges
      during FPGA reprogramming and to enable FPGA bridges
      when FPGA reprogramming is done.  This framework is
      be manufacturer-agnostic, allowing it to be used in
      interfaces that use the FPGA Manager Framework to
      reprogram FPGA's.
      
      The functions are:
      * of_fpga_bridge_get
      * fpga_bridge_put
         Get/put an exclusive reference to a FPGA bridge.
      
      * fpga_bridge_enable
      * fpga_bridge_disable
         Enable/Disable traffic through a bridge.
      
      * fpga_bridge_register
      * fpga_bridge_unregister
         Register/unregister a device-specific low level FPGA
         Bridge driver.
      
      Get an exclusive reference to a bridge and add it to a list:
      * fpga_bridge_get_to_list
      
      To enable/disable/put a set of bridges that are on a list:
      * fpga_bridges_enable
      * fpga_bridges_disable
      * fpga_bridges_put
      Signed-off-by: NAlan Tull <atull@opensource.altera.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      21aeda95
    • A
      fpga-mgr: add fpga image information struct · 1df2865f
      Alan Tull 提交于
      This patch adds a minor change in the FPGA Manager API
      to hold information that is specific to an FPGA image
      file.  This change is expected to bring little, if any,
      pain.  The socfpga and zynq drivers are fixed up in
      this patch.
      
      An FPGA image file will have particulars that affect how the
      image is programmed to the FPGA.  One example is that
      current 'flags' currently has one bit which shows whether the
      FPGA image was built for full reconfiguration or partial
      reconfiguration.  Another example is timeout values for
      enabling or disabling the bridges in the FPGA.  As the
      complexity of the FPGA design increases, the bridges in the
      FPGA may take longer times to enable or disable.
      
      This patch adds a new 'struct fpga_image_info', moves the
      current 'u32 flags' to it.  Two other image-specific u32's
      are added for the bridge enable/disable timeouts.  The FPGA
      Manager API functions are changed, replacing the 'u32 flag'
      parameter with a pointer to struct fpga_image_info.
      Subsequent patches fix the existing low level FPGA manager
      drivers.
      Signed-off-by: NAlan Tull <atull@opensource.altera.com>
      Acked-by: NMoritz Fischer <moritz.fischer@ettus.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1df2865f
    • A
      fpga: add method to get fpga manager from device · 9dce0287
      Alan Tull 提交于
      The intent is to provide a non-DT method of getting
      ahold of a FPGA manager to do some FPGA programming.
      
      This patch refactors of_fpga_mgr_get() to reuse most of it
      while adding a new method fpga_mgr_get() for getting a
      pointer to a fpga manager struct, given the device.
      Signed-off-by: NAlan Tull <atull@opensource.altera.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9dce0287
    • A
      of/overlay: add of overlay notifications · 39a842e2
      Alan Tull 提交于
      This patch add of overlay notifications.
      
      When DT overlays are being added, some drivers/subsystems
      need to see device tree overlays before the changes go into
      the live tree.
      
      This is distinct from reconfig notifiers that are
      post-apply or post-remove and which issue very granular
      notifications without providing access to the context
      of a whole overlay.
      
      The following 4 notificatons are issued:
        OF_OVERLAY_PRE_APPLY
        OF_OVERLAY_POST_APPLY
        OF_OVERLAY_PRE_REMOVE
        OF_OVERLAY_POST_REMOVE
      
      In the case of pre-apply notification, if the notifier
      returns error, the overlay will be rejected.
      
      This patch exports two functions for registering/unregistering
      notifications:
        of_overlay_notifier_register(struct notifier_block *nb)
        of_overlay_notifier_unregister(struct notifier_block *nb)
      
      The of_mutex is held during these notifications. The
      notification data includes pointers to the overlay target
      and the overlay:
      
      struct of_overlay_notify_data {
             struct device_node *overlay;
             struct device_node *target;
      };
      Signed-off-by: NAlan Tull <atull@opensource.altera.com>
      Acked-by: NRob Herring <robh@kernel.org>
      Acked-by: NMoritz Fischer <moritz.fischer@ettus.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      39a842e2
  2. 10 11月, 2016 10 次提交
  3. 09 11月, 2016 1 次提交
  4. 07 11月, 2016 10 次提交
  5. 31 10月, 2016 3 次提交
  6. 29 10月, 2016 3 次提交
  7. 28 10月, 2016 8 次提交
    • B
      ubi: fastmap: Fix add_vol() return value test in ubi_attach_fastmap() · 40b6e61a
      Boris Brezillon 提交于
      Commit e96a8a3b ("UBI: Fastmap: Do not add vol if it already
      exists") introduced a bug by changing the possible error codes returned
      by add_vol():
      - this function no longer returns NULL in case of allocation failure
        but return ERR_PTR(-ENOMEM)
      - when a duplicate entry in the volume RB tree is found it returns
        ERR_PTR(-EEXIST) instead of ERR_PTR(-EINVAL)
      
      Fix the tests done on add_vol() return val to match this new behavior.
      
      Fixes: e96a8a3b ("UBI: Fastmap: Do not add vol if it already exists")
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      Acked-by: NSheng Yong <shengyong1@huawei.com>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      40b6e61a
    • J
      VMCI: Doorbell create and destroy fixes · eb94cd68
      Jorgen Hansen 提交于
      This change consists of two changes:
      
      1) If vmci_doorbell_create is called when neither guest nor
         host personality as been initialized, vmci_get_context_id
         will return VMCI_INVALID_ID. In that case, we should fail
         the create call.
      2) In doorbell destroy, we assume that vmci_guest_code_active()
         has the same return value on create and destroy. That may not
         be the case, so we may end up with the wrong refcount.
         Instead, destroy should check explicitly whether the doorbell
         is in the index table as an indicator of whether the guest
         code was active at create time.
      Reviewed-by: NAdit Ranadive <aditr@vmware.com>
      Signed-off-by: NJorgen Hansen <jhansen@vmware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      eb94cd68
    • G
      GenWQE: Fix bad page access during abort of resource allocation · a7a7aeef
      Gerald Schaefer 提交于
      When interrupting an application which was allocating DMAable
      memory, it was possible, that the DMA memory was deallocated
      twice, leading to the error symptoms below.
      
      Thanks to Gerald, who analyzed the problem and provided this
      patch.
      
      I agree with his analysis of the problem: ddcb_cmd_fixups() ->
      genwqe_alloc_sync_sgl() (fails in f/lpage, but sgl->sgl != NULL
      and f/lpage maybe also != NULL) -> ddcb_cmd_cleanup() ->
      genwqe_free_sync_sgl() (double free, because sgl->sgl != NULL and
      f/lpage maybe also != NULL)
      
      In this scenario we would have exactly the kind of double free that
      would explain the WARNING / Bad page state, and as expected it is
      caused by broken error handling (cleanup).
      
      Using the Ubuntu git source, tag Ubuntu-4.4.0-33.52, he was able to reproduce
      the "Bad page state" issue, and with the patch on top he could not reproduce
      it any more.
      
      ------------[ cut here ]------------
      WARNING: at /build/linux-o03cxz/linux-4.4.0/arch/s390/include/asm/pci_dma.h:141
      Modules linked in: qeth_l2 ghash_s390 prng aes_s390 des_s390 des_generic sha512_s390 sha256_s390 sha1_s390 sha_common genwqe_card qeth crc_itu_t qdio ccwgroup vmur dm_multipath dasd_eckd_mod dasd_mod
      CPU: 2 PID: 3293 Comm: genwqe_gunzip Not tainted 4.4.0-33-generic #52-Ubuntu
      task: 0000000032c7e270 ti: 00000000324e4000 task.ti: 00000000324e4000
      Krnl PSW : 0404c00180000000 0000000000156346 (dma_update_cpu_trans+0x9e/0xa8)
                 R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 EA:3
      Krnl GPRS: 00000000324e7bcd 0000000000c3c34a 0000000027628298 000000003215b400
                 0000000000000400 0000000000001fff 0000000000000400 0000000116853000
                 07000000324e7b1e 0000000000000001 0000000000000001 0000000000000001
                 0000000000001000 0000000116854000 0000000000156402 00000000324e7a38
      Krnl Code: 000000000015633a: 95001000           cli     0(%r1),0
                 000000000015633e: a774ffc3           brc     7,1562c4
                #0000000000156342: a7f40001           brc     15,156344
                >0000000000156346: 92011000           mvi     0(%r1),1
                 000000000015634a: a7f4ffbd           brc     15,1562c4
                 000000000015634e: 0707               bcr     0,%r7
                 0000000000156350: c00400000000       brcl    0,156350
                 0000000000156356: eb7ff0500024       stmg    %r7,%r15,80(%r15)
      Call Trace:
      ([<00000000001563e0>] dma_update_trans+0x90/0x228)
       [<00000000001565dc>] s390_dma_unmap_pages+0x64/0x160
       [<00000000001567c2>] s390_dma_free+0x62/0x98
       [<000003ff801310ce>] __genwqe_free_consistent+0x56/0x70 [genwqe_card]
       [<000003ff801316d0>] genwqe_free_sync_sgl+0xf8/0x160 [genwqe_card]
       [<000003ff8012bd6e>] ddcb_cmd_cleanup+0x86/0xa8 [genwqe_card]
       [<000003ff8012c1c0>] do_execute_ddcb+0x110/0x348 [genwqe_card]
       [<000003ff8012c914>] genwqe_ioctl+0x51c/0xc20 [genwqe_card]
       [<000000000032513a>] do_vfs_ioctl+0x3b2/0x518
       [<0000000000325344>] SyS_ioctl+0xa4/0xb8
       [<00000000007b86c6>] system_call+0xd6/0x264
       [<000003ff9e8e520a>] 0x3ff9e8e520a
      Last Breaking-Event-Address:
       [<0000000000156342>] dma_update_cpu_trans+0x9a/0xa8
      ---[ end trace 35996336235145c8 ]---
      BUG: Bad page state in process jbd2/dasdb1-8  pfn:3215b
      page:000003d100c856c0 count:-1 mapcount:0 mapping:          (null) index:0x0
      flags: 0x3fffc0000000000()
      page dumped because: nonzero _count
      Signed-off-by: NGerald Schaefer <gerald.schaefer@de.ibm.com>
      Signed-off-by: NFrank Haverkamp <haver@linux.vnet.ibm.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a7a7aeef
    • M
      vme: vme_get_size potentially returning incorrect value on failure · 6ad37567
      Martyn Welch 提交于
      The function vme_get_size returns the size of the window to the caller,
      however it doesn't check the return value of the call to vme_master_get.
      
      Return 0 on failure rather than anything else.
      Suggested-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NMartyn Welch <martyn.welch@collabora.co.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6ad37567
    • D
      Move CONFIG_DEVKMEM default to n · e334cd69
      Dave Young 提交于
      Kconfig comment suggests setting it as "n" if in doubt thus move the
      default value to 'n'.
      Signed-off-by: NDave Young <dyoung@redhat.com>
      Suggested-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e334cd69
    • T
      mei: bus: remove rx callback context · 1e4edb3f
      Tomas Winkler 提交于
      The callback context is redunant as all the information can be
      retrived from the device struture of its private data.
      Signed-off-by: NTomas Winkler <tomas.winkler@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1e4edb3f
    • T
      nfc: mei_phy: get phy from the driver data · 972cedf6
      Tomas Winkler 提交于
      In order to remove rather redundant context from the callback
      signature we the get nfc mei_phy from the driver's data.
      Signed-off-by: NTomas Winkler <tomas.winkler@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      972cedf6
    • T
      nfc: mei: use module_mei_cl_driver macro · 094dbffe
      Tomas Winkler 提交于
      Replace boilerplate driver registration with module_mei_cl_driver
      macro in pn544 and microread devices.
      Signed-off-by: NTomas Winkler <tomas.winkler@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      094dbffe