1. 21 Jan, 2016 13 commits
    • Peter Zijlstra's avatar
      perf: Add more assertions · c97f4736
      Peter Zijlstra authored
      Try to trigger warnings before races do damage.
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      c97f4736
    • Peter Zijlstra's avatar
      perf: Collapse and fix event_function_call() users · fae3fde6
      Peter Zijlstra authored
      There is one common bug left in all the event_function_call() users,
      between loading ctx->task and getting to the remote_function(),
      ctx->task can already have been changed.
      
      Therefore we need to double check and retry if ctx->task != current.
      
      Insert another trampoline specific to event_function_call() that
      checks for this and further validates state. This also allows getting
      rid of the active/inactive functions.
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      fae3fde6
    • Peter Zijlstra's avatar
      perf: Specialize perf_event_exit_task() · 32132a3d
      Peter Zijlstra authored
      The perf_remove_from_context() usage in __perf_event_exit_task() is
      different from the other usages in that this site has already
      detached and scheduled out the task context.
      
      This will stand in the way of stronger assertions checking the (task)
      context scheduling invariants.
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      32132a3d
    • Peter Zijlstra's avatar
      perf: Fix task context scheduling · 39a43640
      Peter Zijlstra authored
      There is a very nasty problem wrt disabling the perf task scheduling
      hooks.
      
      Currently we {set,clear} ctx->is_active on every
      __perf_event_task_sched_{in,out}, _however_ this means that if we
      disable these calls we'll have task contexts with ->is_active set that
      are not active and 'active' task contexts without ->is_active set.
      
      This can result in event_function_call() looping on the ctx->is_active
      condition basically indefinitely.
      
      Resolve this by changing things such that contexts without events do
      not set ->is_active like we used to. From this invariant it trivially
      follows that if there are no (task) events, every task ctx is inactive
      and disabling the context switch hooks is harmless.
      
      This leaves two places that need attention (and already had
      accumulated weird and wonderful hacks to work around, without
      recognising this actual problem).
      
      Namely:
      
       - perf_install_in_context() will need to deal with installing events
         in an inactive context, meaning it cannot rely on ctx-is_active for
         its IPIs.
      
       - perf_remove_from_context() will have to mark a context as inactive
         when it removes the last event.
      
      For specific detail, see the patch/comments.
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      39a43640
    • Peter Zijlstra's avatar
      perf: Make ctx->is_active and cpuctx->task_ctx consistent · 63e30d3e
      Peter Zijlstra authored
      For no apparent reason and to great confusion the rules for
      ctx->is_active and cpuctx->task_ctx are different. This means that its
      not always possible to find all active (task) contexts.
      
      Fix this such that if ctx->is_active gets set, we also set (or verify)
      cpuctx->task_ctx.
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      63e30d3e
    • Peter Zijlstra's avatar
      perf: Optimize perf_sched_events() usage · 25432ae9
      Peter Zijlstra authored
      It doesn't make sense to take up-to _4_ references on
      perf_sched_events() per event, avoid doing this.
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      25432ae9
    • Peter Zijlstra's avatar
      perf: Simplify/fix perf_event_enable() event scheduling · aee7dbc4
      Peter Zijlstra authored
      Like perf_enable_on_exec(), perf_event_enable() event scheduling has problems
      respecting the context hierarchy when trying to schedule events (for
      example, it will try and add a pinned event without first removing
      existing flexible events).
      
      So simplify it by using the new ctx_resched() call which will DTRT.
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      aee7dbc4
    • Peter Zijlstra's avatar
      perf: Use task_ctx_sched_out() · 8833d0e2
      Peter Zijlstra authored
      We have a function that does exactly what we want here, use it. This
      reduces the amount of cpuctx->task_ctx muckery.
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      8833d0e2
    • Peter Zijlstra's avatar
      perf: Fix perf_enable_on_exec() event scheduling · 3e349507
      Peter Zijlstra authored
      There are two problems with the current perf_enable_on_exec() event
      scheduling:
      
        - the newly enabled events will be immediately scheduled
          irrespective of their ctx event list order.
      
        - there's a hole in the ctx->lock between scheduling the events
          out and putting them back on.
      
      Esp. the latter issue is a real problem because a hole in event
      scheduling leaves the thing in an observable inconsistent state,
      confusing things.
      
      Fix both issues by first doing the enable iteration and at the end,
      when there are newly enabled events, reschedule the ctx in one go.
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      3e349507
    • Peter Zijlstra's avatar
      perf: Remove stale comment · 5947f657
      Peter Zijlstra authored
      The comment here is horribly out of date, remove it.
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      5947f657
    • Peter Zijlstra's avatar
      perf: Fix cgroup scheduling in perf_enable_on_exec() · 70a01657
      Peter Zijlstra authored
      There is a comment that states that perf_event_context_sched_in() will
      also switch in the cgroup events, I cannot find it does so. Therefore
      all the resulting logic goes out the window too.
      
      Clean that up.
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      70a01657
    • Peter Zijlstra's avatar
      perf: Fix cgroup event scheduling · 7e41d177
      Peter Zijlstra authored
      There appears to be a problem in __perf_event_task_sched_in() wrt
      cgroup event scheduling.
      
      The normal event scheduling order is:
      
      	CPU pinned
      	Task pinned
      	CPU flexible
      	Task flexible
      
      And since perf_cgroup_sched*() only schedules the cpu context, we must
      call this _before_ adding the task events.
      
      Note: double check what happens on the ctx switch optimization where
      the task ctx isn't scheduled.
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      7e41d177
    • Peter Zijlstra's avatar
      perf: Add lockdep assertions · c994d613
      Peter Zijlstra authored
      Make various bugs easier to see.
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      c994d613
  2. 19 Jan, 2016 1 commit
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo' of... · f5540ecb
      Ingo Molnar authored
      Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
      
      Pull perf tools improvements and fixes from Arnaldo Carvalho de Melo:
      
      User visible bug fixes:
      
        - Fix reading of build-id from vDSO (Ben Hutchings)
      
        - Fix processing samples for guests, noticed with 'perf kvm',
          but noticeable as well via other tools, such as 'perf top'
          (Ravi Bangoria)
      
      Build infrastructure:
      
        - Add feature-dump target and FEATURES_DUMP make variable, to
          allow reusing the feature detection results among multiple
          tools/ living codebases, such as perf and lib/bpf (Jiri Olsa)
      
        - 'make -C tools/perf build-test' improvements, making it more
          paralelizable and allowing building it outside of the source
          tree, using O= (Wang Nan)
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      f5540ecb
  3. 15 Jan, 2016 8 commits
  4. 14 Jan, 2016 18 commits
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 10a0c0f0
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "Misc changes:
         - fix lguest bug
         - fix /proc/meminfo output on certain configs
         - fix pvclock bug
         - fix reboot on certain iMacs by adding new reboot quirk
         - fix bootup crash
         - fix FPU boot line option parsing
         - add more x86 self-tests
         - small cleanups, documentation improvements, etc"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/cpu/amd: Remove an unneeded condition in srat_detect_node()
        x86/vdso/pvclock: Protect STABLE check with the seqcount
        x86/mm: Improve switch_mm() barrier comments
        selftests/x86: Test __kernel_sigreturn and __kernel_rt_sigreturn
        x86/reboot/quirks: Add iMac10,1 to pci_reboot_dmi_table[]
        lguest: Map switcher text R/O
        x86/boot: Hide local labels in verify_cpu()
        x86/fpu: Disable AVX when eagerfpu is off
        x86/fpu: Disable MPX when eagerfpu is off
        x86/fpu: Disable XGETBV1 when no XSAVE
        x86/fpu: Fix early FPU command-line parsing
        x86/mm: Use PAGE_ALIGNED instead of IS_ALIGNED
        selftests/x86: Disable the ldt_gdt_64 test for now
        x86/mm/pat: Make split_page_count() check for empty levels to fix /proc/meminfo output
        x86/boot: Double BOOT_HEAP_SIZE to 64KB
        x86/mm: Add barriers and document switch_mm()-vs-flush synchronization
      10a0c0f0
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · dcd1bfd5
      Linus Torvalds authored
      Pull timer fixes from Ingo Molnar:
       "Three clocksource driver fixes"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        clocksource/drivers/vt8500: Increase the minimum delta
        clocksource/drivers/fsl_ftm_timer: Fix CLKSRC_MMIO dependency
        clocksource/drivers: Fix dependencies for !HAS_IOMEM archs
      dcd1bfd5
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 747a9b0a
      Linus Torvalds authored
      Pull perf fixes from Ingo Molnar:
       "Tooling fixes, the biggest patch is one that decouples the kernel's
        list.h from tooling list.h"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits)
        perf tools: Fallback to srcdir/Documentation/tips.txt
        perf ui/tui: Print helpline message as is
        perf tools: Set and pass DOCDIR to builtin-report.c
        perf tools: Add file_only config option to strlist
        perf tools: Add more usage tips
        perf record: Add --buildid-all option
        tools subcmd: Add missing NORETURN define for parse-options.h
        tools: Fix formatting of the "make -C tools" help message
        tools: Make list.h self-sufficient
        perf tools: Fix mmap2 event allocation in synthesize code
        perf stat: Fix recort_usage typo
        perf test: Reset err after using it hold errcode in hist testcases
        perf test: Fix false TEST_OK result for 'perf test hist'
        tools build: Add BPF feature check to test-all
        perf bpf: Fix build breakage due to libbpf
        tools: Move Makefile.arch from perf/config to tools/scripts
        perf tools: Fix PowerPC native building
        perf tools: Fix phony build target for build-test
        perf tools: Add -lutil in python lib list for broken python-config
        perf tools: Add missing sources to perf's MANIFEST
        ...
      747a9b0a
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 32250e4a
      Linus Torvalds authored
      Pull i2c updates from Wolfram Sang:
       "Quite some driver updates:
         - piix4 can now handle multiplexed adapters
         - brcmstb, xlr, eg20t, designware drivers support more SoCs
         - emev2 gained i2c slave support
         - img-scb and rcar got bigger refactoring to remove issues
         - lots of common driver updates
      
        i2c core changes:
         - new quirk flag when an adapter does not support clock stretching,
           so clients can be configured to avoid that if possible
         - added a helper function to retrieve timing parameters from firmware
           (with rcar being the first user)
         - "multi-master" DT binding added so drivers can adapt to this
           setting (like disabling PM to keep arbitration working)
         - RuntimePM for the logical adapter device is now always enabled by
           the core to ensure propagation from childs to the parent (the HW
           device)
         - new macro builtin_i2c_driver to reduce boilerplate"
      
      * 'i2c/for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (70 commits)
        i2c: create builtin_i2c_driver to avoid registration boilerplate
        i2c: imx: fix i2c resource leak with dma transfer
        dt-bindings: i2c: eeprom: add another EEPROM device
        dt-bindings: move I2C eeprom descriptions to the proper file
        i2c: designware: Do not require clock when SSCN and FFCN are provided
        DT: i2c: trivial-devices: Add Epson RX8010 and MPL3115
        i2c: s3c2410: remove superfluous runtime PM calls
        i2c: always enable RuntimePM for the adapter device
        i2c: designware: retry transfer on transient failure
        i2c: ibm_iic: rename i2c_timings struct due to clash with generic version
        i2c: designware: Add support for AMD Seattle I2C
        i2c: imx: Remove unneeded comments
        i2c: st: use to_platform_device()
        i2c: designware: use to_pci_dev()
        i2c: brcmstb: Adding support for CM and DSL SoCs
        i2c: mediatek: fix i2c multi transfer issue in high speed mode
        i2c: imx: improve code readability
        i2c: imx: Improve message log when DMA is not used
        i2c: imx: add runtime pm support to improve the performance
        i2c: imx: init bus recovery info before adding i2c adapter
        ...
      32250e4a
    • Linus Torvalds's avatar
      Merge tag 'devicetree-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 5339f9d4
      Linus Torvalds authored
      Pull DeviceTree updates from Rob Herring:
      
       - Rework and export the changeset API to make it available to users
         other than DT overlays
      
       - ARM secure devices binding
      
       - OCTEON USB binding
      
       - Clean-up of various SRAM binding docs
      
       - Various other binding doc updates
      
      * tag 'devicetree-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (21 commits)
        drivers/of: Export OF changeset functions
        Fix documentation for adp1653 DT
        ARM: psci: Fix indentation in DT bindings
        of/platform: export of_default_bus_match_table
        of/unittest: Show broken behaviour in the platform bus
        of: fix declaration of of_io_request_and_map
        of/address: replace printk(KERN_ERR ...) with pr_err(...)
        of/irq: optimize device node matching loop in of_irq_init()
        dt-bindings: tda998x: Document the required 'port' node.
        net/macb: bindings doc: Merge cdns-emac to macb
        dt-bindings: Misc fix for the ATH79 DDR controllers
        dt-bindings: Misc fix for the ATH79 MISC interrupt controllers
        Documentation: dt: Add bindings for Secure-only devices
        dt-bindings: ARM: add arm,cortex-a72 compatible string
        ASoC: Atmel: ClassD: add GCK's parent clock in DT binding
        DT: add Olimex to vendor prefixes
        Documentation: fsl-quadspi: Add fsl,ls1021-qspi compatible string
        Documentation/devicetree: document OCTEON USB bindings
        usb: misc: usb3503: Describe better how to bind clock to the hub
        dt-bindings: Consolidate SRAM bindings from all vendors
        ...
      5339f9d4
    • Linus Torvalds's avatar
      Merge tag 'mfd-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd · cf8d7e38
      Linus Torvalds authored
      Pull MFD updates from Lee Jones:
       "New Device Support:
         - Add support for s2mps15; sec-core
         - Add support for Lewisburg; lpc_ich
         - Add support for cs47l24 and wm1831; arizona
      
        New Functionality:
         - Allow user to select syscon register width; syscon
      
        Fix-ups:
         - Lots of Checkpatch fixes
         - Rename -pmic/-regulator; s2mps11
         - Build driver components into a single module; wm8994-*
         - Better handing of IRQ during suspend/resume; as3722
         - Constify things; da903x
         - Remove unused code; ab8500-core
         - Improve error handing; qcom_rpm
         - Simplify code: wm831x-otp, sta2x11-mfd
         - Improve locking; cros_ec_spi
         - Fix incorrect DT binding filename reference; arizona, palmas,
           snps-dwapb-gpio, wm8994
      
        Bug Fixes:
         - Fix broken SYSFS 'show ID' call; wm831x-otp
         - Protect reads from non-existent registers; qcom-spmi-pmic
         - Repair build warnings; as3722
         - Fix IRQ request ordering; arizona-irq
         - Ensure return value is boolean; ucb1x00-core, tps65010, tc6393xb,
           htc-egpio, dm355evm_msp, asic3"
      
      * tag 'mfd-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (58 commits)
        mfd: davinci_voicecodec: Remove pointless 'out of memory' error message
        mfd: da9052-irq: Fix trivial 'space before comma' error
        mfd: da9052-i2c: Fix tabbing/whitespace issue
        mfd: da903x: Fix white space and split string issues
        mfd: cs5535-mfd: Add missing line spacing and make local array static
        mfd: cros_ec_spi: Repair comparison ordering issue
        mfd: cros_ec_i2c: Fix trivial 'tabs before spaces' whitespace issue.
        mfd: asic3: Fix a plethora of Checkpatch errors and warnings
        mfd: as3711: Repair OOM and 'line over 80 chars' formatting warnings
        mfd: arizona-i2c: Add blank line formatting after declaration
        mfd: arizona-core: msleep() is unreliable for anything <20ms use usleep_range() instead
        mfd: adp5520: Some trivial 'no space before tab' fixes
        mfd: ab8500-sysctrl: Fix Constify, printk => pr_info and formatting issues
        mfd: ab8500-gpadc: Squash a whole bunch of Checkpatch warnings and one error
        mfd: ab8500-debugfs: Clean-up non-conforming commenting and print formatting
        mfd: ab8500-core: Fix many warnings reported by Checkpatch
        mfd: ab2100-otp: Remove pointless 'out of memory' error message
        mfd: ab3100-core.c: Fix multiple warnings reported by Checkpatch
        mfd: aat2870-core: Remove unnecessary 'out of memory' message
        mfd: 88pm860x-core: Fix commenting and declaration spacing
        ...
      cf8d7e38
    • Linus Torvalds's avatar
      Merge tag 'for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply · 5c43019f
      Linus Torvalds authored
      Pull power supply and reset updates from Sebastian Reichel:
       "I have mostly fixes in the power-supply tree for the 4.5 kernel.  I
        should mention, that the top-most commit has not been in next, but
        it's a fix changing only a single register offset.
      
        Summary:
      
         - uncouple CONFIG_POWER_RESET from CONFIG_POWER_SUPPLY
      
         - misc fixes"
      
      * tag 'for-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply:
        power: bq27xxx_battery: Fix bq27541 AveragePower register address
        power: test_power: correctly handle empty writes
        power: generic-adc-battery: use to_delayed_work
        power: isp1704_charger: Fix isp1704_write() definition
        power: bq27xxx: fix register numbers of bq27500
        power: bq27xxx: fix reading for bq27000 and bq27010
        power: Fix unmet dependency on POWER_SUPPLY by POWER_RESET by uncoupling them
        power: bq27xxx_battery: Reorganize I2C into a module
        power: bq27xxx: don't fill system log by missing battery
        power: max8903_charger: set IRQF_ONESHOT if no primary handler is specified
        power/reset: at91-reset: add missing of_node_put
        power: ds2782_battery: constify ds278x_battery_ops structure
        power: bq2415x_charger: Delete unnecessary checks before the function call "of_node_put"
      5c43019f
    • Linus Torvalds's avatar
      Merge tag 'hsi-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi · c25949d4
      Linus Torvalds authored
      Pull HSI updates from Sebastian Reichel:
       "Misc fixes"
      
      * tag 'hsi-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi:
        HSI: omap_ssi_port: fix handling of_get_named_gpio result
        HSI: omap_ssi: fix handling ida_simple_get result
        HSI: Remove struct hsi_client private fields from kernel-doc
      c25949d4
    • Linus Torvalds's avatar
      Merge tag 'backlight-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight · b14bf630
      Linus Torvalds authored
      Pull backlight updates from Lee Jones:
        Fix-ups:
         - Take heed of GPIO default-on requests; gpio_backlight
         - Enable DT probing; tps65217_bl
      
        Bug Fixes:
         - Free resources in error path; pwm_bl
         - Fix uninitialised variable warning; adp8860_bl, adp8870_bl
         - Protect unconditional DT look-ups from non-DT platforms; pwm_bl
         - Fix backlight flicker; pwm_bl
      
      * tag 'backlight-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
        backlight: pwm_bl: Free PWM requested by legacy API on error path
        backlight: adp8860: Fix another uninitialized variable use
        backlight: gpio-backlight: Use default-on on GPIO request
        backlight: pwm_bl: Fix broken PWM backlight for non-dt platforms
        backlight: tps65217_bl: Add MODULE_DEVICE_TABLE
        backlight: pwm_bl: Avoid backlight flicker when probed from DT
        backlight: adp88x0: Fix uninitialized variable use
      b14bf630
    • Dan Carpenter's avatar
      x86/cpu/amd: Remove an unneeded condition in srat_detect_node() · 7030a7e9
      Dan Carpenter authored
      Originally we calculated ht_nodeid as "ht_nodeid = apicid -
      boot_cpu_id;" so presumably it could be negative.
      
      But after commit:
      
        01aaea1a ('x86: introduce initial apicid')
      
      we use c->initial_apicid which is an unsigned short and thus always >= 0.
      
      It causes a static checker warning to test for impossible
      conditions so let's remove it.
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Hector Marco-Gisbert <hecmargi@upv.es>
      Cc: Huang Rui <ray.huang@amd.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Yinghai Lu <yhlu.kernel@gmail.com>
      Link: http://lkml.kernel.org/r/20160113123940.GE19993@mwandaSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      7030a7e9
    • Lee Jones's avatar
      mfd: davinci_voicecodec: Remove pointless 'out of memory' error message · 9fb41166
      Lee Jones authored
      WARNING: Possible unnecessary 'out of memory' message
      +       if (!davinci_vc) {
      +               dev_dbg(&pdev->dev,
      
      total: 0 errors, 1 warnings, 154 lines checked
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      9fb41166
    • Lee Jones's avatar
      mfd: da9052-irq: Fix trivial 'space before comma' error · 997eea46
      Lee Jones authored
      ERROR: space prohibited before that ',' (ctx:WxW)
      +       da9052_free_irq(da9052, DA9052_IRQ_ADC_EOM , da9052);
      
      total: 1 errors, 0 warnings, 290 lines checked
      
      Cc: Support Opensource <support.opensource@diasemi.com>
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      997eea46
    • Lee Jones's avatar
      mfd: da9052-i2c: Fix tabbing/whitespace issue · 5b7b2ac1
      Lee Jones authored
      WARNING: suspect code indent for conditional statements (8, 24)
      +       if (!i2c_safe_reg(reg))
      +                       return regmap_read(da9052->regmap,
      
      total: 0 errors, 1 warnings, 226 lines checked
      
      Cc: Support Opensource <support.opensource@diasemi.com>
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      5b7b2ac1
    • Lee Jones's avatar
      mfd: da903x: Fix white space and split string issues · 8b277578
      Lee Jones authored
      While we're at it, let's also match the MODULE_LICENSE with the header.
      
      WARNING: please, no space before tabs
      + * ^IMike Rapoport <mike@compulab.co.il>$
      
      WARNING: please, no space before tabs
      + * ^IEric Miao <eric.miao@marvell.com>$
      
      WARNING: quoted string split across lines
      +MODULE_AUTHOR("Eric Miao <eric.miao@marvell.com>"
      +             "Mike Rapoport <mike@compulab.co.il>");
      
      total: 0 errors, 3 warnings, 574 lines checked
      
      Cc: Support Opensource <support.opensource@diasemi.com>
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      8b277578
    • Lee Jones's avatar
      mfd: cs5535-mfd: Add missing line spacing and make local array static · 740c1989
      Lee Jones authored
      WARNING: Missing a blank line after declarations
      +       struct resource *res;
      +       res = platform_get_resource(pdev, IORESOURCE_IO, 0);
      
      WARNING: char * array declaration might be better as static const
      +       const char *acpi_clones[] = { "olpc-xo1-pm-acpi", "olpc-xo1-sci-acpi" };
      
      total: 0 errors, 2 warnings, 192 lines checked
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      740c1989
    • Lee Jones's avatar
      mfd: cros_ec_spi: Repair comparison ordering issue · 8827a642
      Lee Jones authored
      WARNING: Comparisons should place the constant on the right side of the test
      +       BUG_ON(EC_MSG_PREAMBLE_COUNT > ec_dev->din_size);
      
      WARNING: Comparisons should place the constant on the right side of the test
      +       BUG_ON(EC_MSG_PREAMBLE_COUNT > ec_dev->din_size);
      
      total: 0 errors, 2 warnings, 731 lines checked
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      8827a642
    • Lee Jones's avatar
      mfd: cros_ec_i2c: Fix trivial 'tabs before spaces' whitespace issue. · 2756db6c
      Lee Jones authored
      ERROR: code indent should use tabs where possible
      + ^Iec_dev = devm_kzalloc(dev, sizeof(*ec_dev), GFP_KERNEL);$
      
      WARNING: please, no space before tabs
      + ^Iec_dev = devm_kzalloc(dev, sizeof(*ec_dev), GFP_KERNEL);$
      
      WARNING: please, no spaces at the start of a line
      + ^Iec_dev = devm_kzalloc(dev, sizeof(*ec_dev), GFP_KERNEL);$
      
      total: 1 errors, 2 warnings, 366 lines checked
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      2756db6c
    • Lee Jones's avatar
      mfd: asic3: Fix a plethora of Checkpatch errors and warnings · d43c4290
      Lee Jones authored
      ERROR: Macros with complex values should be enclosed in parentheses
      +#define INIT_CDEX(_name, _rate)        \
      +       [ASIC3_CLOCK_##_name] = {               \
      +               .cdex = CLOCK_CDEX_##_name,     \
      +               .rate = _rate,                  \
      +       }
      
      WARNING: line over 80 characters
      +                                                           ASIC3_GPIO_INT_STATUS);
      
      WARNING: void function return statements are not generally useful
      +       return;
      +}
      
      WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
      +       msleep(1);
      
      WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
      +       msleep(1);
      
      WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
      +       msleep(1);
      
      WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
      +       msleep(1);
      
      WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
      +       msleep(1);
      
      WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
      +       msleep(1);
      
      WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
      +               msleep(1);
      WARNING: line over 80 characters
      +               asic->tmio_cnf = ioremap((ASIC3_SD_CONFIG_BASE >> asic->bus_shift) +
      
      WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then p
      r_err(...  to printk(KERN_ERR ...
      +               printk(KERN_ERR "kzalloc failed\n");
      
      WARNING: Possible unnecessary 'out of memory' message
      +       if (asic == NULL) {
      +               printk(KERN_ERR "kzalloc failed\n");
      
      WARNING: Missing a blank line after declarations
      +       int retval = 0;
      +       retval = platform_driver_probe(&asic3_device_driver, asic3_probe);
      
      total: 1 errors, 13 warnings, 1081 lines checked
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      d43c4290