1. 20 Jan, 2015 5 commits
    • Dave Airlie's avatar
      Merge tag 'drm-amdkfd-fixes-2015-01-13' of... · 67cf2d39
      Dave Airlie authored
      Merge tag 'drm-amdkfd-fixes-2015-01-13' of git://people.freedesktop.org/~gabbayo/linux into drm-fixes
      
      - Remove the interrupt SW ring buffer impl. as it is not used by any module
        in amdkfd.
      
      - Fix a sparse warning
      
      * tag 'drm-amdkfd-fixes-2015-01-13' of git://people.freedesktop.org/~gabbayo/linux:
        drm/amdkfd: Fix sparse warning (different address space)
        drm/amdkfd: Drop interrupt SW ring buffer
      67cf2d39
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2015-01-15' of git://anongit.freedesktop.org/drm-intel into drm-fixes · 9e4fc22a
      Dave Airlie authored
      misc i915 fixes
      
      * tag 'drm-intel-fixes-2015-01-15' of git://anongit.freedesktop.org/drm-intel:
        drm/i915: Fix mutex->owner inspection race under DEBUG_MUTEXES
        drm/i915: Ban Haswell from using RCS flips
        drm/i915: vlv: sanitize RPS interrupt mask during GPU idling
        drm/i915: fix HW lockup due to missing RPS IRQ workaround on GEN6
        drm/i915: gen9: fix RPS interrupt routing to CPU vs. GT
      9e4fc22a
    • Rui Wang's avatar
      drm: fb helper should avoid sleeping in panic context · 9aa609e1
      Rui Wang authored
      There are still some places in the fb helper that need to avoid
      sleeping in panic context. Here's an example:
      
      [   65.615496] bad: scheduling from the idle thread!
      [   65.620747] CPU: 92 PID: 0 Comm: swapper/92 Tainted: G   M        E  3.18.0-rc4-7-default+ #20
      
      [   65.630364] Hardware name: Intel Corporation BRICKLAND/BRICKLAND, BIOS
      BRHSXSD1.86B.0056.R01.1409242327 09/24/2014
      [   65.641923]  ffff88087f693d80 ffff88087f689878 ffffffff81566db9 0000000000000000
      [   65.650226]  ffff88087f693d80 ffff88087f689898 ffffffff810871ff ffff88046eb3e0d0
      [   65.658527]  ffff88087f693d80 ffff88087f6898c8 ffffffff8107c1fa 000000017f6898b8
      [   65.666830] Call Trace:
      [   65.669557]  <#MC>  [<ffffffff81566db9>] dump_stack+0x46/0x58
      [   65.675994]  [<ffffffff810871ff>] dequeue_task_idle+0x2f/0x40
      [   65.682412]  [<ffffffff8107c1fa>] dequeue_task+0x5a/0x80
      [   65.688345]  [<ffffffff810804f3>] deactivate_task+0x23/0x30
      [   65.694569]  [<ffffffff81569050>] __schedule+0x580/0x7f0
      [   65.700502]  [<ffffffff81569739>] schedule_preempt_disabled+0x29/0x70
      [   65.707696]  [<ffffffff8156abb6>] __ww_mutex_lock_slowpath+0xb8/0x162
      [   65.714891]  [<ffffffff8156acb3>] __ww_mutex_lock+0x53/0x85
      [   65.721125]  [<ffffffffa00b3a5d>] drm_modeset_lock+0x3d/0x110 [drm]
      [   65.728132]  [<ffffffffa00b3c2a>] __drm_modeset_lock_all+0x8a/0x120 [drm]
      [   65.735721]  [<ffffffffa00b3cd0>] drm_modeset_lock_all+0x10/0x30 [drm]
      [   65.743015]  [<ffffffffa01af8bf>] drm_fb_helper_pan_display+0x2f/0xf0 [drm_kms_helper]
      [   65.751857]  [<ffffffff8132bd21>] fb_pan_display+0xd1/0x1a0
      [   65.758081]  [<ffffffff81326010>] bit_update_start+0x20/0x50
      [   65.764400]  [<ffffffff813259f2>] fbcon_switch+0x3a2/0x550
      [   65.770528]  [<ffffffff813a01c9>] redraw_screen+0x189/0x240
      [   65.776750]  [<ffffffff81322f8a>] fbcon_blank+0x20a/0x2d0
      [   65.782778]  [<ffffffff8137d359>] ? erst_writer+0x209/0x330
      [   65.789002]  [<ffffffff810ba2f3>] ? internal_add_timer+0x63/0x80
      [   65.795710]  [<ffffffff810bc137>] ? mod_timer+0x127/0x1e0
      [   65.801740]  [<ffffffff813a0cd8>] do_unblank_screen+0xa8/0x1d0
      [   65.808255]  [<ffffffff813a0e10>] unblank_screen+0x10/0x20
      [   65.814381]  [<ffffffff812ca0d9>] bust_spinlocks+0x19/0x40
      [   65.820508]  [<ffffffff81561ca7>] panic+0x106/0x1f5
      [   65.825955]  [<ffffffff8102336c>] mce_panic+0x2ac/0x2e0
      [   65.831789]  [<ffffffff812c796a>] ? delay_tsc+0x4a/0x80
      [   65.837625]  [<ffffffff81024e1f>] do_machine_check+0xbaf/0xbf0
      [   65.844138]  [<ffffffff813365d7>] ? intel_idle+0xc7/0x150
      [   65.850166]  [<ffffffff8156f03f>] machine_check+0x1f/0x30
      [   65.856195]  [<ffffffff813365d7>] ? intel_idle+0xc7/0x150
      [   65.862222]  <<EOE>>  [<ffffffff814283d5>] cpuidle_enter_state+0x55/0x170
      [   65.869823]  [<ffffffff814285a7>] cpuidle_enter+0x17/0x20
      [   65.875852]  [<ffffffff81097b08>] cpu_startup_entry+0x2d8/0x370
      [   65.882467]  [<ffffffff8102fe29>] start_secondary+0x159/0x180
      
      There's __drm_modeset_lock_all() which Daniel Vetter introduced for this
      purpose. We can leverage that without reinventing anything. This patch
      works with the latest kernel.
      Reviewed-by: default avatarRob Clark <robdclark@gmail.com>
      Tested-by: default avatarTony Luck <tony.luck@intel.com>
      Signed-off-by: default avatarRui Wang <rui.y.wang@intel.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      9aa609e1
    • Dave Airlie's avatar
      Merge branch 'exynos-drm-fixes' of... · e902027a
      Dave Airlie authored
      Merge branch 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes
      
      This pull request includes below fixups,
      
      - Remove duplicated machine checking.
        . It seems that this code was added when you merged 'v3.18-rc7' into
          drm-next. commit id : e8115e79
      - Fix hdmiphy reset.
        . Exynos hdmi has two interfaces to control hdmyphy, one is I2C, other
          is APB bus - memory mapped I/O. So this patch makes hdmiphy reset
          to be done according to interfaces, I2C or APB bus.
      - And add some exception codes.
      
      * 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
        drm/exynos: fix warning of vblank reference count
        drm/exynos: remove unnecessary runtime pm operations
        drm/exynos: fix reset codes for memory mapped hdmi phy
        drm/exynos: remove the redundant machine checking code
      e902027a
    • Dave Airlie's avatar
      Merge branch 'drm-fixes-3.19' of git://people.freedesktop.org/~agd5f/linux into drm-fixes · b46ce98d
      Dave Airlie authored
      Some radeon fixes for 3.19:
          - GPUVM stability fixes
          - SI dpm quirks
          - Regression fixes
      
      * 'drm-fixes-3.19' of git://people.freedesktop.org/~agd5f/linux:
        drm/radeon: use rv515_ring_start on r5xx
        drm/radeon: add si dpm quirk list
        drm/radeon: don't print error on -ERESTARTSYS
        drm/radeon: add a dpm quirk list
        drm/radeon: fix VM flush on CIK (v3)
        drm/radeon: fix VM flush on SI (v3)
        drm/radeon: fix VM flush on cayman/aruba (v3)
      b46ce98d
  2. 18 Jan, 2015 7 commits
    • Joonyoung Shim's avatar
      drm/exynos: fix warning of vblank reference count · 7c4c5584
      Joonyoung Shim authored
      Prevented re-enabling the vblank interrupt by drm_vblank_off and
      drm_vblank_get from mixer_wait_for_vblank returns error after
      drm_vblank_off. We get below warnings without this error handling
      because vblank reference count is mismatched by above sequence.
      
      setting mode 1920x1080-60Hz@XR24 on connectors 16, crtc 13
      [   19.900793] ------------[ cut here ]------------
      [   19.903959] WARNING: CPU: 0 PID: 0 at drivers/gpu/drm/drm_irq.c:1072 exynos_drm_crtc_finish_pageflip+0xac/0xdc()
      [   19.914076] Modules linked in:
      [   19.917116] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.19.0-rc4-00040-g3d729789-dirty #46
      [   19.925342] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
      [   19.931437] [<c0014430>] (unwind_backtrace) from [<c001158c>] (show_stack+0x10/0x14)
      [   19.939131] [<c001158c>] (show_stack) from [<c04cdd50>] (dump_stack+0x84/0xc4)
      [   19.946329] [<c04cdd50>] (dump_stack) from [<c00226f4>] (warn_slowpath_common+0x80/0xb0)
      [   19.954382] [<c00226f4>] (warn_slowpath_common) from [<c00227c0>] (warn_slowpath_null+0x1c/0x24)
      [   19.963132] [<c00227c0>] (warn_slowpath_null) from [<c02c20cc>] (exynos_drm_crtc_finish_pageflip+0xac/0xdc)
      [   19.972841] [<c02c20cc>] (exynos_drm_crtc_finish_pageflip) from [<c02cb7ec>] (mixer_irq_handler+0xdc/0x104)
      [   19.982546] [<c02cb7ec>] (mixer_irq_handler) from [<c005c904>] (handle_irq_event_percpu+0x78/0x134)
      [   19.991555] [<c005c904>] (handle_irq_event_percpu) from [<c005c9fc>] (handle_irq_event+0x3c/0x5c)
      [   20.000395] [<c005c9fc>] (handle_irq_event) from [<c005f384>] (handle_fasteoi_irq+0xe0/0x1ac)
      [   20.008885] [<c005f384>] (handle_fasteoi_irq) from [<c005bf88>] (generic_handle_irq+0x2c/0x3c)
      [   20.017463] [<c005bf88>] (generic_handle_irq) from [<c005c254>] (__handle_domain_irq+0x7c/0xec)
      [   20.026128] [<c005c254>] (__handle_domain_irq) from [<c0008698>] (gic_handle_irq+0x30/0x68)
      [   20.034449] [<c0008698>] (gic_handle_irq) from [<c00120c0>] (__irq_svc+0x40/0x74)
      [   20.041893] Exception stack(0xc06fff68 to 0xc06fffb0)
      [   20.046923] ff60:                   00000000 00000000 000052f6 c001b460 c06fe000 c07064e8
      [   20.055070] ff80: c04d743c c07392a2 c0739440 c06da340 ef7fca80 00000000 01000000 c06fffb0
      [   20.063212] ffa0: c000f24c c000f250 60000013 ffffffff
      [   20.068245] [<c00120c0>] (__irq_svc) from [<c000f250>] (arch_cpu_idle+0x38/0x3c)
      [   20.075611] [<c000f250>] (arch_cpu_idle) from [<c0050948>] (cpu_startup_entry+0x108/0x16c)
      [   20.083846] [<c0050948>] (cpu_startup_entry) from [<c06aec5c>] (start_kernel+0x3a0/0x3ac)
      [   20.091980] ---[ end trace 2c76ee0500489d1b ]---
      Signed-off-by: default avatarJoonyoung Shim <jy0922.shim@samsung.com>
      Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
      7c4c5584
    • Joonyoung Shim's avatar
      drm/exynos: remove unnecessary runtime pm operations · bd508666
      Joonyoung Shim authored
      In booting, we can see a below message.
      
      [    3.241728] exynos-mixer 14450000.mixer: Unbalanced pm_runtime_enable!
      
      Already pm_runtime_enable is called by probe function. Remove
      pm_runtime_enable/disable from mixer_bind and mixer_unbind.
      Signed-off-by: default avatarJoonyoung Shim <jy0922.shim@samsung.com>
      Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
      bd508666
    • Joonyoung Shim's avatar
      drm/exynos: fix reset codes for memory mapped hdmi phy · 265134a0
      Joonyoung Shim authored
      This fixes reset codes to support memory mapped hdmi phy as well as hdmi
      phy dedicated i2c lines.
      Signed-off-by: default avatarJoonyoung Shim <jy0922.shim@samsung.com>
      Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
      265134a0
    • Linus Torvalds's avatar
      Linux 3.19-rc5 · ec6f34e5
      Linus Torvalds authored
      ec6f34e5
    • Linus Torvalds's avatar
      Merge tag 'armsoc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · d0ac5d8e
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "We've been sitting on our fixes branch for a while, so this batch is
        unfortunately on the large side.
      
        A lot of these are tweaks and fixes to device trees, fixing various
        bugs around clocks, reg ranges, etc.  There's also a few defconfig
        updates (which are on the late side, no more of those).
      
        All in all the diffstat is bigger than ideal at this time, but nothing
        in here seems particularly risky"
      
      * tag 'armsoc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (31 commits)
        reset: sunxi: fix spinlock initialization
        ARM: dts: disable CCI on exynos5420 based arndale-octa
        drivers: bus: check cci device tree node status
        ARM: rockchip: disable jtag/sdmmc autoswitching on rk3288
        ARM: nomadik: fix up leftover device tree pins
        ARM: at91: board-dt-sama5: add phy_fixup to override NAND_Tree
        ARM: at91/dt: sam9263: Add missing clocks to lcdc node
        ARM: at91: sama5d3: dt: correct the sound route
        ARM: at91/dt: sama5d4: fix the timer reg length
        ARM: exynos_defconfig: Enable LM90 driver
        ARM: exynos_defconfig: Enable options for display panel support
        arm: dts: Use pmu_system_controller phandle for dp phy
        ARM: shmobile: sh73a0 legacy: Set .control_parent for all irqpin instances
        ARM: dts: berlin: correct BG2Q's SM GPIO location.
        ARM: dts: berlin: add broken-cd and set bus width for eMMC in Marvell DMP DT
        ARM: dts: berlin: fix io clk and add missing core clk for BG2Q sdhci2 host
        ARM: dts: Revert disabling of smc91x for n900
        ARM: dts: imx51-babbage: Fix ULPI PHY reset modelling
        ARM: dts: dra7-evm: fix qspi device tree partition size
        ARM: omap2plus_defconfig: use CONFIG_CPUFREQ_DT
        ...
      d0ac5d8e
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mike.turquette/linux · 12ba8571
      Linus Torvalds authored
      Pull clock driver fixes from Mike Turquette:
       "Small number of fixes for clock drivers and a single null pointer
        dereference fix in the framework core code.
      
        The driver fixes vary from fixing section mismatch warnings to
        preventing machines from hanging (and preventing developers from
        crying)"
      
      * tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mike.turquette/linux:
        clk: fix possible null pointer dereference
        Revert "clk: ppc-corenet: Fix Section mismatch warning"
        clk: rockchip: fix deadlock possibility in cpuclk
        clk: berlin: bg2q: remove non-exist "smemc" gate clock
        clk: at91: keep slow clk enabled to prevent system hang
        clk: rockchip: fix rk3288 cpuclk core dividers
        clk: rockchip: fix rk3066 pll lock bit location
        clk: rockchip: Fix clock gate for rk3188 hclk_emem_peri
        clk: rockchip: add CLK_IGNORE_UNUSED flag to fix rk3066/rk3188 USB Host
      12ba8571
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 901b2082
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "This is one fix for a Multiqueue sleeping in invalid context problem
        and a MAINTAINER file update for Qlogic"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: ->queue_rq can't sleep
        MAINTAINERS: Update maintainer list for qla4xxx
      901b2082
  3. 17 Jan, 2015 18 commits
  4. 16 Jan, 2015 10 commits
    • Louis Langholtz's avatar
      kernel: avoid overflow in cmp_range · fc7f0dd3
      Louis Langholtz authored
      Avoid overflow possibility.
      
      [ The overflow is purely theoretical, since this is used for memory
        ranges that aren't even close to using the full 64 bits, but this is
        the right thing to do regardless.  - Linus ]
      Signed-off-by: default avatarLouis Langholtz <lou_langholtz@me.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Peter Anvin <hpa@linux.intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fc7f0dd3
    • Sukadev Bhattiprolu's avatar
      perf tools powerpc: Use dwfl_report_elf() instead of offline. · 6bcf9c1f
      Sukadev Bhattiprolu authored
      dwfl_report_offline() works only when libraries are prelinked.
      
      Replace dwfl_report_offline() with dwfl_report_elf() so we correctly
      extract debug info even from libraries that are not prelinked.
      Reported-by: default avatarJiri Olsa <jolsa@redhat.com>
      Signed-off-by: default avatarSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Tested-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Link: http://lkml.kernel.org/r/20150114221045.GA17703@us.ibm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6bcf9c1f
    • Namhyung Kim's avatar
      perf tools: Fix segfault for symbol annotation on TUI · 813ccd15
      Namhyung Kim authored
      Currently the symbol structure is allocated with symbol_conf.priv_size
      to carry sideband information like annotation, map browser on TUI and
      sort-by-name tree node.  So retrieving these information from symbol
      needs to care about the details of such placement.
      
      However the annotation code just assumes that the symbol is placed after
      the struct annotation.  But actually there's other info between them.
      So accessing those struct will lead to an undefined behavior (usually a
      crash) after they write their info to the same location.
      
      To reproduce the problem, please follow the steps below:
      
        1. run perf report (TUI of course) with -v option
        2. open map browser (by pressing right arrow key for any entry)
        3. search any function (by pressing '/' key and input whatever..)
        4. return to the hist browser (by pressing 'q' or left arrow key)
        5. open annotation window for the same entry (by pressing 'a' key)
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1421234288-22758-1-git-send-email-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      813ccd15
    • Wang Nan's avatar
      perf test: Fix dwarf unwind using libunwind. · b93b0967
      Wang Nan authored
      Perf tool fails to unwind user stack if the event raises in a shared
      object. This patch improves tests/dwarf-unwind.c to demonstrate the
      problem by utilizing commonly used glibc function "bsearch". If perf is
      not statically linked, the testcase will try to unwind a mixed call
      trace.
      
      By debugging libunwind I found that there is a bug in unwind-libunwind:
      it always passes 0 as segbase to libunwind, cause libunwind unable to
      locate debug_frame entry fir first level ip address (I add some more
      debugging output into libunwind to make things clear):
      
                     >_Uarm_dwarf_find_debug_frame: start_ip = 10be98, end_ip = 10c2a4
                     >_Uarm_dwarf_find_debug_frame: found debug_frame table `/lib/libc-2.18.so': segbase=0x0, len=7, gp=0x0, table_data=0x449388
                     >_Uarm_dwarf_search_unwind_table: call lookup:ip = b6cd3bcc, segbase = 0, rel_ip = b6cd3bcc
                     >lookup: e->start_ip_offset = bcf18 (rel_ip = b6cd3bcc)
                     >lookup: e->start_ip_offset = 6d314 (rel_ip = b6cd3bcc)
                     >lookup: e->start_ip_offset = 33d0c (rel_ip = b6cd3bcc)
                      ...
                     >lookup: e->start_ip_offset = 15d0c (rel_ip = b6cd3bcc)
                     >lookup: e->start_ip_offset = 15c40 (rel_ip = b6cd3bcc)
       >_Uarm_dwarf_search_unwind_table: IP b6cd3bcc inside range b6c12000-b6d4c000, but no explicit unwind info found
                      >put_rs_cache: unmasking signals/interrupts and releasing lock
                     >_Uarm_dwarf_step: returning -10
       >_Uarm_step: dwarf_step()=-10
      
      This patch passes map->start as segbase to dwarf_find_debug_frame(), so
      di will be initialized correctly.
      
      In addition, dso and executable are different when setting segbase. This
      patch first check whether the elf is executable, and pass segbase only
      for shared object.
      Signed-off-by: default avatarWang Nan <wangnan0@huawei.com>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Li Zefan <lizefan@huawei.com>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1421203007-75799-1-git-send-email-wangnan0@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b93b0967
    • Vineet Gupta's avatar
      perf tools: Avoid build splat for syscall numbers with uclibc · ea1fe3a8
      Vineet Gupta authored
      This is due to duplicated unistd inclusion (via uClibc headers + kernel headers)
      Also seen on ARM uClibc based tools
      
         ------- ARC build ---------->8-------------
      
        CC       util/evlist.o
      In file included from
      ~/arc/k.org/arch/arc/include/uapi/asm/unistd.h:25:0,
                       from util/../perf-sys.h:10,
                       from util/../perf.h:15,
                       from util/event.h:7,
                       from util/event.c:3:
      ~/arc/k.org/include/uapi/asm-generic/unistd.h:906:0:
      warning: "__NR_fcntl64" redefined [enabled by default]
       #define __NR_fcntl64 __NR3264_fcntl
       ^
      In file included from
      ~/arc/gnu/INSTALL_1412-arc-2014.12-rc1/arc-snps-linux-uclibc/sysroot/usr/include/sys/syscall.h:24:0,
                       from util/../perf-sys.h:6,
         ----------------->8-------------------
      
         ------- ARM build ---------->8-------------
      
        CC FPIC  plugin_scsi.o
      In file included from util/../perf-sys.h:9:0,
                       from util/../perf.h:15,
                       from util/cache.h:7,
                       from perf.c:12:
      ~/arc/k.org/arch/arm/include/uapi/asm/unistd.h:28:0:
      warning: "__NR_restart_syscall" redefined [enabled by default]
      In file included from
      ~/buildroot/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/sys/syscall.h:25:0,
                       from util/../perf-sys.h:6,
                       from util/../perf.h:15,
                       from util/cache.h:7,
                       from perf.c:12:
      ~/buildroot/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/bits/sysnum.h:17:0:
      note: this is the location of the previous definition
         ----------------->8-------------------
      Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
      Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1421156604-30603-4-git-send-email-vgupta@synopsys.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ea1fe3a8
    • Vineet Gupta's avatar
      perf tools: Elide strlcpy warning with uclibc · a83d869f
      Vineet Gupta authored
         ----------------->8------------------
        CC       bench/sched-pipe.o
      In file included from builtin-annotate.c:13:0:
      util/cache.h:76:15: warning: redundant redeclaration of 'strlcpy'
      [-Wredundant-decls]
       extern size_t strlcpy(char *dest, const char *src, size_t size);
                     ^
      In file included from util/util.h:55:0,
                       from builtin.h:4,
                       from builtin-annotate.c:8:
      ~/vineetg/arc/gnu/INSTALL_1412-arc-2014.12-rc1/arc-snps-linux-uclibc/sysroot/usr/include/string.h:396:15:
      note: previous declaration of 'strlcpy' was here
       extern size_t strlcpy(char *__restrict dst, const char *__restrict src,
         ----------------->8------------------
      Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
      Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1421156604-30603-3-git-send-email-vgupta@synopsys.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a83d869f
    • Alexey Brodkin's avatar
      perf tools: Fix statfs.f_type data type mismatch build error with uclibc · db1806ed
      Alexey Brodkin authored
      ARC Linux uses the no legacy syscalls abi and corresponding uClibc headers
      statfs defines f_type to be U32 which causes perf build breakage
      
      http://git.uclibc.org/uClibc/tree/libc/sysdeps/linux/common-generic/bits/statfs.h
      
        ----------->8---------------
          CC       fs/fs.o
        fs/fs.c: In function 'fs__valid_mount':
        fs/fs.c:82:24: error: comparison between signed and unsigned integer
        expressions [-Werror=sign-compare]
          else if (st_fs.f_type != magic)
                                ^
        cc1: all warnings being treated as errors
        ----------->8---------------
      Signed-off-by: default avatarAlexey Brodkin <abrodkin@synopsys.com>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Cody P Schafer <dev@codyps.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
      Link: http://lkml.kernel.org/r/1420888254-17504-2-git-send-email-vgupta@synopsys.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      db1806ed
    • Arnaldo Carvalho de Melo's avatar
      tools: Remove bitops/hweight usage of bits in tools/perf · 25cd480e
      Arnaldo Carvalho de Melo authored
      We need to use lib/hweight.c for that, just like we do for lib/rbtree.c,
      so tools need to link hweight.o. For now do it directly, but we need to
      have a tools/lib/lk.a or .so that collects these goodies...
      Reported-by: default avatarJan Beulich <JBeulich@suse.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-a1e91dx3apzqw5kbdt7ut21s@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      25cd480e
    • Namhyung Kim's avatar
      perf machine: Fix __machine__findnew_thread() error path · 260d819e
      Namhyung Kim authored
      When thread__init_map_groups() fails, a new thread should be removed
      from the rbtree since it's gonna be freed.  Also update last match cache
      only if the function succeeded.
      Reported-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1420763892-15535-1-git-send-email-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      260d819e
    • Namhyung Kim's avatar
      perf tools: Fix building error in x86_64 when dwarf unwind is on · c6e5e9fb
      Namhyung Kim authored
      When build with 'make ARCH=x86' and dwarf unwind is on, there is a
      compiling error:
      
         CC       /home/wn/perf/arch/x86/util/unwind-libdw.o
         CC       /home/wn/perf/arch/x86/tests/regs_load.o
       arch/x86/tests/regs_load.S: Assembler messages:
       arch/x86/tests/regs_load.S:65: Error: operand type mismatch for `push'
       arch/x86/tests/regs_load.S:72: Error: operand type mismatch for `pop'
       make[1]: *** [/home/wn/perf/arch/x86/tests/regs_load.o] Error 1
       make[1]: INTERNAL: Exiting with 25 jobserver tokens available; should be 24!
       make: *** [all] Error 2
       ...
      
      Which is caused by incorrectly undefine macro HAVE_ARCH_X86_64_SUPPORT.
      'config/Makefile.arch' tests __x86_64__ only when 'ARCH=x86_64'.
      However, when building x86_64 kernel, ARCH=x86 is valid and commonly
      used. Build systems, such as yocto, uses x86_64 compiler with 'ARCH=x86'
      to build x86_64 perf, which causes mismatching.
      
      As __LP64__ is defined for x86_64 as well, we can consolidate the
      __x86_64__ check to the __LP64__ check and get rid of the IS_X86_64
      IMHO.
      
      (This patch is made by Namhyung Kim when replying my v1 patch:
      
      https://lkml.org/lkml/2015/1/7/17
      
      I modified the code to remove dependency on RAW_ARCH:
      
      https://lkml.org/lkml/2015/1/7/865
      
      Namhyung Kim didn't provide his SOB in his original email. I add
      mine only for my modification.)
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarWang Nan <wangnan0@huawei.com>
      Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Li Zefan <lizefan@huawei.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lkml.kernel.org/r/1421029255-23039-1-git-send-email-wangnan0@huawei.com
      [ Namhyung provided his S-o-B on a followup to this patch thread on lkml ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c6e5e9fb