1. 08 Jan, 2014 4 commits
  2. 20 Dec, 2013 4 commits
    • Frank Haverkamp's avatar
      GenWQE: Accidently casting to u32 where u64 is required · a45a0258
      Frank Haverkamp authored
      Fix a casting to u32 where u64 would be appropriate.
      The bad casting made the driver unusable.
      Signed-off-by: default avatarFrank Haverkamp <haver@linux.vnet.ibm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a45a0258
    • Aaro Koskinen's avatar
      uio: fix devm_request_irq usage · 632fefaf
      Aaro Koskinen authored
      Commit e6789cd3 (uio: Simplify uio error
      path by using devres functions) converted uio to use devm_request_irq().
      This introduced a change in behaviour since the IRQ is associated with
      the parent device instead of the created UIO device. The IRQ will remain
      active after uio_unregister_device() is called, and some drivers will
      crash because of this. The patch fixes this.
      Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@nsn.com>
      Cc: stable <stable@vger.kernel.org> # 3.13
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      632fefaf
    • Frank Haverkamp's avatar
      GenWQE: Replace dynamic_hex_dump with print_hex_dump_debug · 65861ab4
      Frank Haverkamp authored
      As requested by Greg, replacing the hexdump function from dynamic_debug.h
      with one defined in printk.h. I hope I picked the right one.
      Signed-off-by: default avatarFrank Haverkamp <haver@linux.vnet.ibm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      65861ab4
    • Frank Haverkamp's avatar
      GenWQE: Fix endian issues detected by sparse · 58d66ce7
      Frank Haverkamp authored
      Fengguang Wu used CF=-D__CHECK_ENDIAN__ to check the GenWQE driver for
      endian issues. Sparse found a couple of those. Most of them were caused
      by not correctly handling __be64/32 and __u64/32. Those I was able to
      fix with appropriate castings.
      
      One more serious issue was the ATS entry in struct genwqe_ddcb_cmd.
      The kernel expected it in big-endian, but the type was defined __u64.
      I decided that it is better to keep the interface consistent using
      host endian byte-odering instead of having a mixture. With this change
      the kernel likes to see host endian byte order for the ATS entry. That
      would have been an interface change, if someone would have used the
      driver already. Since this is not the case, I hope it is ok to fix it
      now.
      
      For the genqwe_readq/writeq/readl/writel functions I enforced the casts.
      
      It still complains, as far as I can see, about some copy_to/from_user()
      usages:
      
        CHECK   char-misc/drivers/misc/genwqe/card_dev.c
      char-misc/arch/x86/include/asm/uaccess.h:625:18: warning: incorrect type in argument 1 (different modifiers)
      char-misc/arch/x86/include/asm/uaccess.h:625:18:    expected void *<noident>
      char-misc/arch/x86/include/asm/uaccess.h:625:18:    got void const *from
      char-misc/arch/x86/include/asm/uaccess.h:625:18: warning: incorrect type in argument 1 (different modifiers)
      char-misc/arch/x86/include/asm/uaccess.h:625:18:    expected void *<noident>
      char-misc/arch/x86/include/asm/uaccess.h:625:18:    got void const *from
      char-misc/arch/x86/include/asm/uaccess.h:625:18: warning: incorrect type in argument 1 (different modifiers)
      char-misc/arch/x86/include/asm/uaccess.h:625:18:    expected void *<noident>
      char-misc/arch/x86/include/asm/uaccess.h:625:18:    got void const *from
      char-misc/arch/x86/include/asm/uaccess.h:625:18: warning: incorrect type in argument 1 (different modifiers)
      char-misc/arch/x86/include/asm/uaccess.h:625:18:    expected void *<noident>
      char-misc/arch/x86/include/asm/uaccess.h:625:18:    got void const *from
        CC [M]  drivers/misc/genwqe/card_dev.o
        CHECK   char-misc/drivers/misc/genwqe/card_ddcb.c
      char-misc/arch/x86/include/asm/uaccess.h:625:18: warning: incorrect type in argument 1 (different modifiers)
      char-misc/arch/x86/include/asm/uaccess.h:625:18:    expected void *<noident>
      char-misc/arch/x86/include/asm/uaccess.h:625:18:    got void const *from
      char-misc/arch/x86/include/asm/uaccess.h:625:18: warning: incorrect type in argument 1 (different modifiers)
      char-misc/arch/x86/include/asm/uaccess.h:625:18:    expected void *<noident>
      char-misc/arch/x86/include/asm/uaccess.h:625:18:    got void const *from
        CC [M]  drivers/misc/genwqe/card_ddcb.o
        LD [M]  drivers/misc/genwqe/genwqe_card.o
      
      I appreciate some help from you to figure out what is causig those, and
      making a proposal how to fix them.
      
      I included the missing header file to fix the
      implicit-function-declaration warning when using dynamic_hex_dump.
      Signed-off-by: default avatarFrank Haverkamp <haver@linux.vnet.ibm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      58d66ce7
  3. 19 Dec, 2013 28 commits
  4. 17 Dec, 2013 1 commit
  5. 15 Dec, 2013 3 commits
    • Linus Torvalds's avatar
      Linux 3.13-rc4 · 319e2e3f
      Linus Torvalds authored
      319e2e3f
    • Matias Bjorling's avatar
      null_blk: mem garbage on NUMA systems during init · 57053d8c
      Matias Bjorling authored
      For NUMA systems, initializing the blk-mq layer and using per node hctx.
      We initialize submit queues to 1, while blk-mq nr_hw_queues is
      initialized to the number of NUMA nodes.
      
      This makes the null_init_hctx function overwrite memory outside of what
      it allocated.  In my case it lead to writing garbage into struct
      request_queue's mq_map.
      Signed-off-by: default avatarMatias Bjorling <m@bjorling.me>
      Cc: Jens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      57053d8c
    • Sergey Senozhatsky's avatar
      radeon_pm: fix oops in hwmon_attributes_visible() and radeon_hwmon_show_temp_thresh() · e4158f1b
      Sergey Senozhatsky authored
      Since commit ec39f64b ("drm/radeon/dpm: Convert to use
      devm_hwmon_register_with_groups") radeon_hwmon_init() is using
      hwmon_device_register_with_groups(), which sets `rdev' as a device
      private driver_data, while hwmon_attributes_visible() and
      radeon_hwmon_show_temp_thresh() are still waiting for `drm_device'.
      
      Fix them by using dev_get_drvdata(), in order to avoid this oops:
      
        BUG: unable to handle kernel paging request at 0000000000001e28
        IP: [<ffffffffa02ae8b4>] hwmon_attributes_visible+0x18/0x3d [radeon]
        PGD 15057e067 PUD 151a8e067 PMD 0
        Oops: 0000 [#1] PREEMPT SMP
        Call Trace:
          internal_create_group+0x114/0x1d9
          sysfs_create_group+0xe/0x10
          sysfs_create_groups+0x22/0x5f
          device_add+0x34f/0x501
          device_register+0x15/0x18
          hwmon_device_register_with_groups+0xb5/0xed
          radeon_hwmon_init+0x56/0x7c [radeon]
          radeon_pm_init+0x134/0x7e5 [radeon]
          radeon_modeset_init+0x75f/0x8ed [radeon]
          radeon_driver_load_kms+0xc6/0x187 [radeon]
          drm_dev_register+0xf9/0x1b4 [drm]
          drm_get_pci_dev+0x98/0x129 [drm]
          radeon_pci_probe+0xa3/0xac [radeon]
          pci_device_probe+0x6e/0xcf
          driver_probe_device+0x98/0x1c4
          __driver_attach+0x5c/0x7e
          bus_for_each_dev+0x7b/0x85
          driver_attach+0x19/0x1b
          bus_add_driver+0x104/0x1ce
          driver_register+0x89/0xc5
          __pci_register_driver+0x58/0x5b
          drm_pci_init+0x86/0xea [drm]
          radeon_init+0x97/0x1000 [radeon]
          do_one_initcall+0x7f/0x117
          load_module+0x1583/0x1bb4
          SyS_init_module+0xa0/0xaf
      Signed-off-by: default avatarSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Alexander Deucher <Alexander.Deucher@amd.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e4158f1b