03 Mar, 2015

1 commit

  • …t/evalenti/linux-soc-thermal

    Pull thermal management fixes from Eduardo Valentin:
    "Specifics:

    - Several fixes in tmon tool.

    - Fixes in intel int340x for _ART and _TRT tables.

    - Add id for Avoton SoC into powerclamp driver.

    - Fixes in RCAR thermal driver to remove race conditions and fix fail
    path

    - Fixes in TI thermal driver: removal of unnecessary code and build
    fix if !CONFIG_PM_SLEEP

    - Cleanups in exynos thermal driver

    - Add stubs for include/linux/thermal.h. Now drivers using thermal
    calls but that also work without CONFIG_THERMAL will be able to
    compile for systems that don't care about thermal.

    Note: I am sending this pull on Rui's behalf while he fixes issues in
    his Linux box"

    * 'fixes-for-4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal:
    thermal: int340x_thermal: Ignore missing _ART, _TRT tables
    thermal/intel_powerclamp: add id for Avoton SoC
    tools/thermal: tmon: silence 'set but not used' warnings
    tools/thermal: tmon: use pkg-config to determine library dependencies
    tools/thermal: tmon: support cross-compiling
    tools/thermal: tmon: add .gitignore
    tools/thermal: tmon: fixup tui windowing calculations
    tools/thermal: tmon: tui: don't hard-code dialog window size assumptions
    tools/thermal: tmon: add min/max macros
    tools/thermal: tmon: add --target-temp parameter
    thermal: exynos: Clean-up code to use oneline entry for exynos compatible table
    thermal: rcar: Make error and remove paths symmetrical with init
    thermal: rcar: Fix race condition between init and interrupt
    thermal: Introduce dummy functions when thermal is not defined
    ti-soc-thermal: Delete an unnecessary check before the function call "cpufreq_cooling_unregister"
    thermal: ti-soc-thermal: bandgap: Fix build warning if !CONFIG_PM_SLEEP

    Linus Torvalds
     

02 Mar, 2015

1 commit

  • Pull perf fixes from Ingo Molnar:
    "Two kprobes fixes and a handful of tooling fixes"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf tools: Make sparc64 arch point to sparc
    perf symbols: Define EM_AARCH64 for older OSes
    perf top: Fix SIGBUS on sparc64
    perf tools: Fix probing for PERF_FLAG_FD_CLOEXEC flag
    perf tools: Fix pthread_attr_setaffinity_np build error
    perf tools: Define _GNU_SOURCE on pthread_attr_setaffinity_np feature check
    perf bench: Fix order of arguments to memcpy_alloc_mem
    kprobes/x86: Check for invalid ftrace location in __recover_probed_insn()
    kprobes/x86: Use 5-byte NOP when the code might be modified by ftrace

    Linus Torvalds
     

28 Feb, 2015

8 commits

  • gcc complains about the 'cols' variable being unused. This is
    unavoidable, given the ncurses getmaxyx() macro-based API, which wants
    to assign to a variable directly, even when we're not going to use it.

    Warning:

    gcc -O1 -Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wimplicit-int -fstack-protector -D VERSION=\"1.0\" -c -o tui.o tui.c
    tui.c: In function ‘show_dialogue’:
    tui.c:288:12: warning: variable ‘cols’ set but not used [-Wunused-but-set-variable]
    int rows, cols;
    ^

    So, add a hack to get rid of that warning.

    Signed-off-by: Brian Norris
    Acked-by: Jacob Pan
    Reviewed-by: Florian Fainelli
    Signed-off-by: Zhang Rui

    Brian Norris
     
  • Some distros (e.g., Arch Linux) don't package the tinfo library
    separately from ncurses, so don't unconditionally include it. Instead,
    use pkg-config.

    The $(STATIC) ugliness is to handle the reported build case from commit
    6b533269fb25 ("tools/thermal: tmon: fix compilation errors when building
    statically"), where a developer wants to be able to build with:

    make LDFLAGS=-static

    which requires an additional pkg-config flag.

    Finally, support a lowest common denominator fallback (-lpanel
    -lncurses) for build systems that don't have pkg-config entries for
    ncurses.

    Signed-off-by: Brian Norris
    Acked-by: Jacob Pan
    Reviewed-by: Florian Fainelli
    Signed-off-by: Zhang Rui

    Brian Norris
     
  • We might want to prepare CFLAGS outside of this Makefile, so don't
    overwrite its initial value.

    Then, support $(CROSS_COMPILE), so we can use a cross-compile toolchain.

    Signed-off-by: Brian Norris
    Acked-by: Jacob Pan
    Reviewed-by: Florian Fainelli
    Signed-off-by: Zhang Rui

    Brian Norris
     
  • Signed-off-by: Brian Norris
    Acked-by: Jacob Pan
    Reviewed-by: Florian Fainelli
    Signed-off-by: Zhang Rui

    Brian Norris
     
  • The number of rows in the dialog vary according to the number of cooling
    devices. However, some of the windowing computations were assuming a
    fixed number of rows. This computation is OK when we have between 4 and
    9 cooling devices (and they wrap to the next column), but with fewer
    devices, we end up printing off the end of the window.

    This unifies the row computation into a single function and uses that
    throughout the TUI code. This also accounts for increasing the number of
    rows when there are more than 9 total cooling devices.

    Signed-off-by: Brian Norris
    Acked-by: Jacob Pan
    Reviewed-by: Florian Fainelli
    Signed-off-by: Zhang Rui

    Brian Norris
     
  • We can use the ncurses API to get the number of rows.

    Signed-off-by: Brian Norris
    Acked-by: Jacob Pan
    Reviewed-by: Florian Fainelli
    Signed-off-by: Zhang Rui

    Brian Norris
     
  • Signed-off-by: Brian Norris
    Acked-by: Jacob Pan
    Reviewed-by: Florian Fainelli
    Signed-off-by: Zhang Rui

    Brian Norris
     
  • If we launch in daemon mode (--daemon), we don't have the ncurses UI,
    but we might want to set the target temperature still. For example,
    someone might stick the following in their boot script:

    tmon --control intel_powerclamp --target-temp 90 --log --daemon

    This would turn on CPU idle injection when we're around 90 degrees
    celsius, and would log temperature and throttling info to
    /var/tmp/tmon.log.

    Signed-off-by: Brian Norris
    Acked-by: Jacob Pan
    Reviewed-by: Florian Fainelli
    Signed-off-by: Zhang Rui

    Brian Norris
     

26 Feb, 2015

4 commits

  • The recent build changes cause perf to not compile for sparc64 since the
    arch/sparc64/Build file does not exist:

    /home/dahern/kernels/linux.git/tools/build/Makefile.build:40: arch/sparc64/Build: No such file or directory

    Fix by converting the sparc64 RAW_ARCH to sparc ARCH -- similar to what
    is done for x86_64.

    Signed-off-by: David Ahern
    Cc: Jiri Olsa
    Link: http://lkml.kernel.org/r/1424306222-96843-1-git-send-email-david.ahern@oracle.com
    Signed-off-by: Arnaldo Carvalho de Melo

    David Ahern
     
  • 4886f2ca19f6f added an arm-64 check, but the EM_AARCH64 macro is not
    defined in older releases (e.g., RHEL6). Define if it is not defined.

    Signed-off-by: David Ahern
    Cc: Victor Kamensky
    Link: http://lkml.kernel.org/r/1424306017-96797-1-git-send-email-david.ahern@oracle.com
    Signed-off-by: Arnaldo Carvalho de Melo

    David Ahern
     
  • perf-top is terminating due to SIGBUS on sparc64. git bisect points to:

    commit 82396986032915c1572bfb74b224fcc2e4e8ba7c
    Author: Arnaldo Carvalho de Melo
    Date: Mon Sep 8 13:26:35 2014 -0300

    perf evlist: Refcount mmaps

    We need to know how many fds are using a perf mmap via
    PERF_EVENT_IOC_SET_OUTPUT, so that we can know when to ditch an mmap,
    refcount it.

    This commit added 'int refcnt' to struct perf_mmap and the addition makes the
    event_copy element no longer 8-byte aligned.

    Fix by adding __attribute__((aligned(8))) to the event_copy struct
    member.

    Signed-off-by: David Ahern
    Link: http://lkml.kernel.org/r/1424304198-92028-1-git-send-email-david.ahern@oracle.com
    [ Switched from 'int pad;' to using __attribute__, David tested/acked that ]
    Signed-off-by: Arnaldo Carvalho de Melo

    David Ahern
     
  • Commit f6edb53c4993ffe92ce521fb449d1c146cea6ec2 converted the probe to
    a CPU wide event first (pid == -1). For kernels that do not support
    the PERF_FLAG_FD_CLOEXEC flag the probe fails with EINVAL. Since this
    errno is not handled pid is not reset to 0 and the subsequent use of
    pid = -1 as an argument brings in an additional failure path if
    perf_event_paranoid > 0:

    $ perf record -- sleep 1
    perf_event_open(..., 0) failed unexpectedly with error 13 (Permission denied)
    [ perf record: Woken up 1 times to write data ]
    [ perf record: Captured and wrote 0.007 MB /tmp/perf.data (11 samples) ]

    Also, ensure the fd of the confirmation check is closed and comment why
    pid = -1 is used.

    Needs to go to 3.18 stable tree as well.

    Signed-off-by: Adrian Hunter
    Based-on-patch-by: David Ahern
    Acked-by: David Ahern
    Cc: David Ahern
    Link: http://lkml.kernel.org/r/54EC610C.8000403@intel.com
    Cc: stable@vger.kernel.org # v3.18+
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     

25 Feb, 2015

2 commits

  • Feature detection for pthread_attr_setaffinity_np was failing, producing
    this error:

    In file included from bench/futex-hash.c:17:0:
    bench/futex.h:73:19: error: conflicting types for ‘pthread_attr_setaffinity_np’
    static inline int pthread_attr_setaffinity_np(pthread_attr_t *attr,
    ^
    In file included from bench/futex.h:72:0,
    from bench/futex-hash.c:17:
    /usr/include/pthread.h:407:12: note: previous declaration of ‘pthread_attr_setaffinity_np’ was here
    extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr,
    ^
    make[3]: *** [bench/futex-hash.o] Error 1
    make[2]: *** [bench] Error 2
    make[2]: *** Waiting for unfinished jobs....

    This was because compiling test-pthread-attr-setaffinity-np.c
    failed due to the function arguments:

    test-pthread-attr-setaffinity-np.c: In function ‘main’:
    test-pthread-attr-setaffinity-np.c:11:2: warning: null argument where non-null required (argument 3) [-Wnonnull]
    ret = pthread_attr_setaffinity_np(&thread_attr, 0, NULL);
    ^
    So fix the arguments.

    Signed-off-by: Adrian Hunter
    Tested-by: Stephane Eranian
    Cc: Jiri Olsa
    Link: http://lkml.kernel.org/r/1424774766-24194-1-git-send-email-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Adrian Hunter
     
  • The man page for pthread_attr_set_affinity_np states that _GNU_SOURCE
    must be defined before pthread.h is included in order to get the proper
    function declaration. Define this in the Makefile.

    Without this defined, the feature check fails on a Fedora system with
    gcc5 and then the perf build later fails with conflicting prototypes for
    the function.

    Signed-off-by: Josh Boyer
    Cc: Jiri Olsa
    Cc: Peter Zijlstra
    Cc: Vineet Gupta
    Link: http://lkml.kernel.org/r/20150211162404.GA15522@hansolo.redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Josh Boyer
     

23 Feb, 2015

1 commit

  • This was causing the destination instead of the source to be filled. As
    a result, the source was typically all mapped to one zero page, and
    hence very cacheable.

    Signed-off-by: Bruce Merry
    Acked-by: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20150115092022.GA11292@kryton
    Signed-off-by: Arnaldo Carvalho de Melo

    Bruce Merry
     

19 Feb, 2015

1 commit

  • Pull virtio updates from Rusty Russell:
    "OK, this has the big virtio 1.0 implementation, as specified by OASIS.

    On top of tht is the major rework of lguest, to use PCI and virtio
    1.0, to double-check the implementation.

    Then comes the inevitable fixes and cleanups from that work"

    * tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: (80 commits)
    virtio: don't set VIRTIO_CONFIG_S_DRIVER_OK twice.
    virtio_net: unconditionally define struct virtio_net_hdr_v1.
    tools/lguest: don't use legacy definitions for net device in example launcher.
    virtio: Don't expose legacy net features when VIRTIO_NET_NO_LEGACY defined.
    tools/lguest: use common error macros in the example launcher.
    tools/lguest: give virtqueues names for better error messages
    tools/lguest: more documentation and checking of virtio 1.0 compliance.
    lguest: don't look in console features to find emerg_wr.
    tools/lguest: don't start devices until DRIVER_OK status set.
    tools/lguest: handle indirect partway through chain.
    tools/lguest: insert driver references from the 1.0 spec (4.1 Virtio Over PCI)
    tools/lguest: insert device references from the 1.0 spec (4.1 Virtio Over PCI)
    tools/lguest: rename virtio_pci_cfg_cap field to match spec.
    tools/lguest: fix features_accepted logic in example launcher.
    tools/lguest: handle device reset correctly in example launcher.
    virtual: Documentation: simplify and generalize paravirt_ops.txt
    lguest: remove NOTIFY call and eventfd facility.
    lguest: remove NOTIFY facility from demonstration launcher.
    lguest: use the PCI console device's emerg_wr for early boot messages.
    lguest: always put console in PCI slot #1.
    ...

    Linus Torvalds
     

16 Feb, 2015

2 commits

  • Pull char / misc patches from Greg KH:
    "Here's the big char/misc driver update for 3.20-rc1.

    Lots of little things in here, all described in the changelog.
    Nothing major or unusual, except maybe the binder selinux stuff, which
    was all acked by the proper selinux people and they thought it best to
    come through this tree.

    All of this has been in linux-next with no reported issues for a while"

    * tag 'char-misc-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (90 commits)
    coresight: fix function etm_writel_cp14() parameter order
    coresight-etm: remove check for unknown Kconfig macro
    coresight: fixing CPU hwid lookup in device tree
    coresight: remove the unnecessary function coresight_is_bit_set()
    coresight: fix the debug AMBA bus name
    coresight: remove the extra spaces
    coresight: fix the link between orphan connection and newly added device
    coresight: remove the unnecessary replicator property
    coresight: fix the replicator subtype value
    pdfdocs: Fix 'make pdfdocs' failure for 'uio-howto.tmpl'
    mcb: Fix error path of mcb_pci_probe
    virtio/console: verify device has config space
    ti-st: clean up data types (fix harmless memory corruption)
    mei: me: release hw from reset only during the reset flow
    mei: mask interrupt set bit on clean reset bit
    extcon: max77693: Constify struct regmap_config
    extcon: adc-jack: Release IIO channel on driver remove
    extcon: Remove duplicated include from extcon-class.c
    Drivers: hv: vmbus: hv_process_timer_expiration() can be static
    Drivers: hv: vmbus: serialize Offer and Rescind offer
    ...

    Linus Torvalds
     
  • Pull USB patches from Greg KH:
    "Here's the big pull request for the USB driver tree for 3.20-rc1.

    Nothing major happening here, just lots of gadget driver updates, new
    device ids, and a bunch of cleanups.

    All of these have been in linux-next for a while with no reported
    issues"

    * tag 'usb-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (299 commits)
    usb: musb: fix device hotplug behind hub
    usb: dwc2: Fix a bug in reading the endpoint directions from reg.
    staging: emxx_udc: fix the build error
    usb: Retry port status check on resume to work around RH bugs
    Revert "usb: Reset USB-3 devices on USB-3 link bounce"
    uhci-hub: use HUB_CHAR_*
    usb: kconfig: replace PPC_OF with PPC
    ehci-pci: disable for Intel MID platforms (update)
    usb: gadget: Kconfig: use bool instead of boolean
    usb: musb: blackfin: remove incorrect __exit_p()
    USB: fix use-after-free bug in usb_hcd_unlink_urb()
    ehci-pci: disable for Intel MID platforms
    usb: host: pci_quirks: joing string literals
    USB: add flag for HCDs that can't receive wakeup requests (isp1760-hcd)
    USB: usbfs: allow URBs to be reaped after disconnection
    cdc-acm: kill unnecessary messages
    cdc-acm: add sanity checks
    usb: phy: phy-generic: Fix USB PHY gpio reset
    usb: dwc2: fix USB core dependencies
    usb: renesas_usbhs: fix NULL pointer dereference in dma_release_channel()
    ...

    Linus Torvalds
     

14 Feb, 2015

2 commits

  • Pull more ACPI and power management updates from Rafael Wysocki:
    "These are two reverts related to system suspend breakage by one of a
    recent commits, a fix for a recently introduced bug in devfreq and a
    bunch of other things that didn't make it into my previous pull
    request, but otherwise are ready to go.

    Specifics:

    - Revert two ACPI EC driver commits, one that broke system suspend on
    Acer Aspire S5 and one that depends on it (Rafael J Wysocki).

    - Fix a typo leading to an incorrect check in the exynos-ppmu devfreq
    driver (Dan Carpenter).

    - Add support for one more Broadwell CPU model to intel_idle (Len Brown).

    - Fix an obscure problem with state transitions related to interrupts
    in the speedstep-smi cpufreq driver (Mikulas Patocka).

    - Remove some unnecessary messages related to the "out of memory"
    condition from the core PM code (Quentin Lambert).

    - Update turbostat parameters and documentation, add support for one
    more Broadwell CPU model to it and modify it to skip printing
    disabled package C-states (Len Brown)"

    * tag 'pm+acpi-3.20-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    PM / devfreq: event: testing the wrong variable
    cpufreq: speedstep-smi: enable interrupts when waiting
    PM / OPP / clk: Remove unnecessary OOM message
    Revert "ACPI / EC: Add query flushing support"
    Revert "ACPI / EC: Add GPE reference counting debugging messages"
    tools/power turbostat: support additional Broadwell model
    intel_idle: support additional Broadwell model
    tools/power turbostat: update parameters, documentation
    tools/power turbostat: Skip printing disabled package C-states

    Linus Torvalds
     
  • * pm-cpufreq:
    cpufreq: speedstep-smi: enable interrupts when waiting

    * pm-cpuidle:
    intel_idle: support additional Broadwell model

    * pm-devfreq:
    PM / devfreq: event: testing the wrong variable

    * pm-opp:
    PM / OPP / clk: Remove unnecessary OOM message

    * pm-tools:
    tools/power turbostat: support additional Broadwell model
    tools/power turbostat: update parameters, documentation
    tools/power turbostat: Skip printing disabled package C-states

    Rafael J. Wysocki
     

13 Feb, 2015

12 commits


12 Feb, 2015

4 commits

  • Merge second set of updates from Andrew Morton:
    "More of MM"

    * emailed patches from Andrew Morton : (83 commits)
    mm/nommu.c: fix arithmetic overflow in __vm_enough_memory()
    mm/mmap.c: fix arithmetic overflow in __vm_enough_memory()
    vmstat: Reduce time interval to stat update on idle cpu
    mm/page_owner.c: remove unnecessary stack_trace field
    Documentation/filesystems/proc.txt: describe /proc//map_files
    mm: incorporate read-only pages into transparent huge pages
    vmstat: do not use deferrable delayed work for vmstat_update
    mm: more aggressive page stealing for UNMOVABLE allocations
    mm: always steal split buddies in fallback allocations
    mm: when stealing freepages, also take pages created by splitting buddy page
    mincore: apply page table walker on do_mincore()
    mm: /proc/pid/clear_refs: avoid split_huge_page()
    mm: pagewalk: fix misbehavior of walk_page_range for vma(VM_PFNMAP)
    mempolicy: apply page table walker on queue_pages_range()
    arch/powerpc/mm/subpage-prot.c: use walk->vma and walk_page_vma()
    memcg: cleanup preparation for page table walk
    numa_maps: remove numa_maps->vma
    numa_maps: fix typo in gather_hugetbl_stats
    pagemap: use walk->vma instead of calling find_vma()
    clear_refs: remove clear_refs_private->vma and introduce clear_refs_test_walk()
    ...

    Linus Torvalds
     
  • Pull powerpc updates from Michael Ellerman:

    - Update of all defconfigs

    - Addition of a bunch of config options to modernise our defconfigs

    - Some PS3 updates from Geoff

    - Optimised memcmp for 64 bit from Anton

    - Fix for kprobes that allows 'perf probe' to work from Naveen

    - Several cxl updates from Ian & Ryan

    - Expanded support for the '24x7' PMU from Cody & Sukadev

    - Freescale updates from Scott:
    "Highlights include 8xx optimizations, some more work on datapath
    device tree content, e300 machine check support, t1040 corenet
    error reporting, and various cleanups and fixes"

    * tag 'powerpc-3.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux: (102 commits)
    cxl: Add missing return statement after handling AFU errror
    cxl: Fail AFU initialisation if an invalid configuration record is found
    cxl: Export optional AFU configuration record in sysfs
    powerpc/mm: Warn on flushing tlb page in kernel context
    powerpc/powernv: Add OPAL soft-poweroff routine
    powerpc/perf/hv-24x7: Document sysfs event description entries
    powerpc/perf/hv-gpci: add the remaining gpci requests
    powerpc/perf/{hv-gpci, hv-common}: generate requests with counters annotated
    powerpc/perf/hv-24x7: parse catalog and populate sysfs with events
    perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helper
    perf: add PMU_EVENT_ATTR_STRING() helper
    perf: provide sysfs_show for struct perf_pmu_events_attr
    powerpc/kernel: Avoid initializing device-tree pointer twice
    powerpc: Remove old compile time disabled syscall tracing code
    powerpc/kernel: Make syscall_exit a local label
    cxl: Fix device_node reference counting
    powerpc/mm: bail out early when flushing TLB page
    powerpc: defconfigs: add MTD_SPI_NOR (new dependency for M25P80)
    perf/powerpc: reset event hw state when adding it to the PMU
    powerpc/qe: Use strlcpy()
    ...

    Linus Torvalds
     
  • Pull additional turbostat updates for v3.20 from Len Brown.

    * 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
    tools/power turbostat: support additional Broadwell model
    tools/power turbostat: update parameters, documentation
    tools/power turbostat: Skip printing disabled package C-states

    Rafael J. Wysocki
     
  • Add KPF_ZERO_PAGE flag for zero_page, so that userspace processes can
    detect zero_page in /proc/kpageflags, and then do memory analysis more
    accurately.

    Signed-off-by: Yalin Wang
    Acked-by: Kirill A. Shutemov
    Cc: Konstantin Khlebnikov
    Cc: Naoya Horiguchi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wang, Yalin
     

11 Feb, 2015

2 commits