linux-2.6-microblaze.git
8 years agoMerge remote-tracking branch 'spi/topic/dma' into spi-next
Mark Brown [Mon, 31 Aug 2015 13:45:28 +0000 (14:45 +0100)]
Merge remote-tracking branch 'spi/topic/dma' into spi-next

8 years agoMerge remote-tracking branch 'spi/topic/core' into spi-next
Mark Brown [Mon, 31 Aug 2015 13:45:27 +0000 (14:45 +0100)]
Merge remote-tracking branch 'spi/topic/core' into spi-next

8 years agoMerge remote-tracking branches 'spi/fix/bcm2835', 'spi/fix/bitbang', 'spi/fix/img...
Mark Brown [Mon, 31 Aug 2015 13:45:23 +0000 (14:45 +0100)]
Merge remote-tracking branches 'spi/fix/bcm2835', 'spi/fix/bitbang', 'spi/fix/img-spfi', 'spi/fix/omap2-mcspi', 'spi/fix/orion' and 'spi/fix/xilinx' into spi-linus

8 years agospi: sh-msiof: Fix FIFO size to 64 word from 256 word
Koji Matsuoka [Sun, 14 Jun 2015 17:25:05 +0000 (02:25 +0900)]
spi: sh-msiof: Fix FIFO size to 64 word from 256 word

The upper limit of Tx/Rx FIFO size is 64 word by the
specification of H/W. This patch corrects to 64 word from 256 word.

Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com>
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
8 years agoMerge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git...
Ingo Molnar [Mon, 31 Aug 2015 08:25:46 +0000 (10:25 +0200)]
Merge tag 'perf-core-for-mingo' of git://git./linux/kernel/git/acme/linux into perf/core

Pull perf/core improvement and fixes from Arnaldo Carvalho de Melo:

User visible changes:

  - Add new compaction-times python script. (Tony Jones)

  - Make the --[no-]-demangle/--[no-]-demangle-kernel command line
    options available in 'perf script' too. (Mark Drayton)

  - Allow for negative numbers in libtraceevent's print format,
    fixing up misformatting in some tracepoints. (Steven Rostedt)

Infrastructure changes:

  - perf_env/perf_evlist changes to allow accessing the data
    structure with the environment where some perf data was
    collected in functions not necessarily related to perf.data
    file processing. (Kan Liang)

  - Cleanups for the tracepoint definition location paths routines. (Jiri Olsa)

  - Introduce sysfs/filename__sprintf_build_id, removing code
    duplication. (Masami Hiramatsu)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
8 years agoMerge branch 'perf/urgent' into perf/core, to pick up fixes
Ingo Molnar [Mon, 31 Aug 2015 08:25:26 +0000 (10:25 +0200)]
Merge branch 'perf/urgent' into perf/core, to pick up fixes

Signed-off-by: Ingo Molnar <mingo@kernel.org>
8 years agoMerge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git...
Ingo Molnar [Mon, 31 Aug 2015 08:24:24 +0000 (10:24 +0200)]
Merge tag 'perf-urgent-for-mingo' of git://git./linux/kernel/git/acme/linux into perf/urgent

Pull perf/urgent fix from Arnaldo Carvalho de Melo:

  - Use index, not CPU id, to find core/pkg id in 'perf stat' (Kan Liang)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
8 years agoalpha: select CONFIG_ARCH_USE_CMPXCHG_LOCKREF.
Matt Turner [Tue, 4 Aug 2015 21:35:05 +0000 (14:35 -0700)]
alpha: select CONFIG_ARCH_USE_CMPXCHG_LOCKREF.

On Alpha we have spinlocks that are 32b in size and an efficient
cmpxchg64 implementation, so we qualify to make use of cmpxchg backed
lockrefs. Select the ARCH_USE_CMPXCHG_LOCKREF Kconfig symbol and provide
a trivial implementation of arch_spin_value_unlocked to satisfy the
lockref code.

Using Linus' simple testcase from
http://article.gmane.org/gmane.linux.file-systems/77466 on a dual CPU
ES47 system I see around an 8% gain:

    N       Min       Max    Median       Avg      Stddev
x  30   6194580   6295654   6272504   6272514   17694.232
+  30   6731164   6786334   6767982   6764274   13738.863
Difference at 95.0% confidence
        491760 +/- 8188.17
        7.83992% +/- 0.130541%
        (Student's t, pooled s = 15840.5)

Signed-off-by: Matt Turner <mattst88@gmail.com>
8 years agoLinux 4.2
Linus Torvalds [Sun, 30 Aug 2015 18:34:09 +0000 (11:34 -0700)]
Linux 4.2

8 years agoMerge remote-tracking branch 'regulator/topic/tps6586x' into regulator-next
Mark Brown [Sun, 30 Aug 2015 13:40:29 +0000 (14:40 +0100)]
Merge remote-tracking branch 'regulator/topic/tps6586x' into regulator-next

8 years agoMerge remote-tracking branches 'regulator/topic/qcom-smd', 'regulator/topic/qcom...
Mark Brown [Sun, 30 Aug 2015 13:40:11 +0000 (14:40 +0100)]
Merge remote-tracking branches 'regulator/topic/qcom-smd', 'regulator/topic/qcom-spmi', 'regulator/topic/rk808', 'regulator/topic/stub' and 'regulator/topic/tol' into regulator-next

8 years agoMerge remote-tracking branches 'regulator/topic/mt6311', 'regulator/topic/ocp', ...
Mark Brown [Sun, 30 Aug 2015 13:39:48 +0000 (14:39 +0100)]
Merge remote-tracking branches 'regulator/topic/mt6311', 'regulator/topic/ocp', 'regulator/topic/owner', 'regulator/topic/pfuze100' and 'regulator/topic/pwm' into regulator-next

8 years agoMerge remote-tracking branches 'regulator/topic/lp872x', 'regulator/topic/ltc3589...
Mark Brown [Sun, 30 Aug 2015 13:39:34 +0000 (14:39 +0100)]
Merge remote-tracking branches 'regulator/topic/lp872x', 'regulator/topic/ltc3589', 'regulator/topic/max77693' and 'regulator/topic/max8973' into regulator-next

8 years agoMerge remote-tracking branches 'regulator/topic/da9210', 'regulator/topic/da9211...
Mark Brown [Sun, 30 Aug 2015 13:39:14 +0000 (14:39 +0100)]
Merge remote-tracking branches 'regulator/topic/da9210', 'regulator/topic/da9211', 'regulator/topic/fan53555', 'regulator/topic/isl9305' and 'regulator/topic/list' into regulator-next

8 years agoMerge remote-tracking branches 'regulator/topic/88pm800', 'regulator/topic/ad5398...
Mark Brown [Sun, 30 Aug 2015 13:38:50 +0000 (14:38 +0100)]
Merge remote-tracking branches 'regulator/topic/88pm800', 'regulator/topic/ad5398', 'regulator/topic/axp20x' and 'regulator/topic/da9062' into regulator-next

8 years agoMerge remote-tracking branch 'regulator/topic/core' into regulator-next
Mark Brown [Sun, 30 Aug 2015 13:38:46 +0000 (14:38 +0100)]
Merge remote-tracking branch 'regulator/topic/core' into regulator-next

8 years agoMerge remote-tracking branch 'regulator/fix/pbias' into regulator-linus
Mark Brown [Sun, 30 Aug 2015 13:38:37 +0000 (14:38 +0100)]
Merge remote-tracking branch 'regulator/fix/pbias' into regulator-linus

8 years agoregulator: mt6311: fix platform_no_drv_owner.cocci warnings
kbuild test robot [Sun, 30 Aug 2015 12:20:42 +0000 (20:20 +0800)]
regulator: mt6311: fix platform_no_drv_owner.cocci warnings

drivers/regulator/mt6311-regulator.c:169:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoregulator: ltc3589: Remove unnecessary MODULE_ALIAS()
Javier Martinez Canillas [Sat, 29 Aug 2015 11:56:11 +0000 (13:56 +0200)]
regulator: ltc3589: Remove unnecessary MODULE_ALIAS()

The driver has a I2C device id table that is used to create the modaliases
and already contains a "ltc3589" device id. So the modalias is unnecessary.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoregulator: ad5398: Remove unnecessary MODULE_ALIAS()
Javier Martinez Canillas [Sat, 29 Aug 2015 11:56:10 +0000 (13:56 +0200)]
regulator: ad5398: Remove unnecessary MODULE_ALIAS()

The driver has a I2C device id table that is used to create the modaliases
and also "ad5398-regulator" is not a supported I2C id, so it's never used.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agospi: fsl-(e)spi: Fix checking return value of devm_ioremap_resource
Axel Lin [Sun, 30 Aug 2015 10:35:51 +0000 (18:35 +0800)]
spi: fsl-(e)spi: Fix checking return value of devm_ioremap_resource

devm_ioremap_resource() returns ERR_PTR on error.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoMerge tag 'v4.2' into for_next
Chris Zankel [Sat, 29 Aug 2015 23:55:58 +0000 (23:55 +0000)]
Merge tag 'v4.2' into for_next

Linux 4.2

8 years agothermal: power_allocator: allocate with kcalloc what you free with kfree
Javi Merino [Tue, 25 Aug 2015 18:22:35 +0000 (19:22 +0100)]
thermal: power_allocator: allocate with kcalloc what you free with kfree

Commit cf736ea6f902 ("thermal: power_allocator: do not use devm*
interfaces") forgot to change a devm_kcalloc() to just kcalloc(), but
it's corresponding devm_kfree() was changed to kfree().  Allocate with
kcalloc() to match the kfree().

Fixes: cf736ea6f902 ("thermal: power_allocator: do not use devm* interfaces")
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
8 years agoregulator: pfuze100: Remove unnecessary MODULE_ALIAS()
Javier Martinez Canillas [Sat, 29 Aug 2015 00:35:13 +0000 (02:35 +0200)]
regulator: pfuze100: Remove unnecessary MODULE_ALIAS()

The driver has a I2C device id table that is used to create the modaliases
and also "pfuze100-regulator" is not a supported I2C id, so is never used.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoPM / Domains: Fix typo in description of genpd_dev_pm_detach()
Jon Hunter [Thu, 27 Aug 2015 09:17:00 +0000 (10:17 +0100)]
PM / Domains: Fix typo in description of genpd_dev_pm_detach()

The function genpd_dev_pm_detach() detaches a device from a PM domain,
however, in the description, the "dev" argument for the function is
described as the device to "attach" instead of "detach". Correct this.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
8 years agoPM / Domains: Remove unusable governor dummies
Geert Uytterhoeven [Tue, 18 Aug 2015 11:38:02 +0000 (13:38 +0200)]
PM / Domains: Remove unusable governor dummies

The governor dummies for the !CONFIG_PM_GENERIC_DOMAINS case are
unusable, as a governors is always referred to by taking its address,
which you can't do with a literal NULL pointer.

I.e.

pm_genpd_init(genpd, &simple_qos_governor, false);

fails to compile with:

error: lvalue required as unary '&' operand

Hence just remove the governor dummies.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
8 years agoPM / Domains: Make pm_genpd_init() available to modules
Rajendra Nayak [Thu, 13 Aug 2015 06:21:57 +0000 (11:51 +0530)]
PM / Domains: Make pm_genpd_init() available to modules

Export symbol pm_genpd_init so it can be used in loadable
kernel modules

Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
8 years agoPM / domains: Align column headers and data in pm_genpd_summary output
Geert Uytterhoeven [Tue, 11 Aug 2015 12:50:49 +0000 (14:50 +0200)]
PM / domains: Align column headers and data in pm_genpd_summary output

"domain": header is indented by 4, data by 0 spaces => 0 spaces
"/device": header is indented by 11, data by 4 spaces => 4 spaces
"slaves": header is indented by 47, data by 49 spaces => 48 spaces

Ruler:
    1234567890123456789012345678901234567890123456789012345678901234567890

Before:

domain                      status         slaves
       /device                                      runtime status
    ----------------------------------------------------------------------
    a3sp                            on               a2us
/devices/platform/e60b0000.i2c                      suspended

After:

    domain                          status          slaves
/device                                             runtime status
    ----------------------------------------------------------------------
    a3sp                            on              a2us
/devices/platform/e60b0000.i2c                      suspended

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
8 years agopowercap / RAPL: disable the 2nd power limit properly
Seiichi Ikarashi [Wed, 19 Aug 2015 05:26:03 +0000 (14:26 +0900)]
powercap / RAPL: disable the 2nd power limit properly

Let rapl_unregister_powercap() disable the second power limit
only if it exists.
Intel64 SDM Vol.3 14.9 says that the package domain has it
but neither the power plane domain nor the DRAM domain has it.

Signed-off-by: Seiichi Ikarashi <s.ikarashi@jp.fujitsu.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
8 years agotools: cpupower: Fix error when running cpupower monitor
Shreyas B. Prabhu [Mon, 3 Aug 2015 06:16:00 +0000 (11:46 +0530)]
tools: cpupower: Fix error when running cpupower monitor

get_cpu_topology() tries to get topology info from all cpus by reading
files in the topology sysfs dir. If a cpu is offlined, since it doesn't
have topology dir, this function fails and returns -1. This causes
functions relying on get_cpu_topology() to fail. For example-

$ cpupower monitor
Cannot read number of available processors

Fix this by skipping fetching topology info for offline cpus.

Signed-off-by: Shreyas B. Prabhu <shreyas@linux.vnet.ibm.com>
Reported-by: Pavaman Subramaniyam <pavsubra@linux.vnet.ibm.com>
Acked-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
8 years agoMerge branches 'pci/enumeration' and 'pci/misc' into next
Bjorn Helgaas [Fri, 28 Aug 2015 20:53:08 +0000 (15:53 -0500)]
Merge branches 'pci/enumeration' and 'pci/misc' into next

* pci/enumeration:
  PCI: Set MPS to match upstream bridge
  PCI: Move MPS configuration check to pci_configure_device()
  PCI: Drop references acquired by of_parse_phandle()
  PCI/MSI: Remove unused pcibios_msi_controller() hook
  ARM/PCI: Remove msi_controller from struct pci_sys_data
  ARM/PCI, designware, xilinx: Use pci_scan_root_bus_msi()
  PCI: Add pci_scan_root_bus_msi()
  ARM/PCI: Replace panic with WARN messages on failures
  PCI: generic: Add arm64 support
  PCI: Build setup-irq.o for arm64
  PCI: generic: Remove dependency on ARM-specific struct hw_pci
  ARM/PCI: Set MPS before pci_bus_add_devices()

* pci/misc:
  PCI: Disable async suspend/resume for JMicron multi-function SATA/AHCI

8 years agoMerge branch 'for-4.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj...
Linus Torvalds [Fri, 28 Aug 2015 19:02:51 +0000 (12:02 -0700)]
Merge branch 'for-4.2-fixes' of git://git./linux/kernel/git/tj/libata

Pull libata fixlet from Tejun Heo:
 "Simple blacklist entry addition"

* 'for-4.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
  Add factory recertified Crucial M500s to blacklist

8 years agoHID: wacom: wacom_setup_numbered_buttons is local to wacom_wac
Jiri Kosina [Fri, 28 Aug 2015 18:46:42 +0000 (20:46 +0200)]
HID: wacom: wacom_setup_numbered_buttons is local to wacom_wac

wacom_setup_numbered_buttons() is not used outside of wacom_wac.c,
make it static.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: wacom: Add support for Express Key Remote.
Aaron Skomra [Thu, 20 Aug 2015 23:05:17 +0000 (16:05 -0700)]
HID: wacom: Add support for Express Key Remote.

This device is pad (buttons) only, there is no stylus or touch. Up to
five remotes can pair with the device's associated USB dongle.

Signed-off-by: Aaron Skomra <aaron.skomra@wacom.com>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoHID: wacom: Set button bits based on a new numbered_buttons
Aaron Skomra [Thu, 20 Aug 2015 23:05:16 +0000 (16:05 -0700)]
HID: wacom: Set button bits based on a new numbered_buttons

Prior to this commit, numbered button bit setting was done separately
for each device type in wacom_setup_pad_capabilities(). Here we add a
numbered_buttons property to the wacom_features struct and extract the
repeated bit setting code to a new function:
wacom_settup_numbered_buttons().

Signed-off-by: Aaron Skomra <aaron.skomra@wacom.com>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
8 years agoMerge tag 'sound-fix-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
Linus Torvalds [Fri, 28 Aug 2015 18:42:00 +0000 (11:42 -0700)]
Merge tag 'sound-fix-4.2' of git://git./linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Here are stable fixes that have been gathered since rc8: fixes for
  HD-audio widget power control regressions since 4.1, a NULL fix for
  HD-audio HDMI, a noise fix for Conexant codecs and a quirk addition
  for USB-Audio DSD"

* tag 'sound-fix-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Fix path power activation
  ALSA: hda - Check all inputs for is_active_nid_for_any()
  ALSA: hda: fix possible NULL dereference
  ALSA: hda - Shutdown CX20722 on reboot/free to avoid spurious noises
  ALSA: usb: Add native DSD support for Gustard DAC-X20U

8 years agoperf evlist: Add backpointer for perf_env to evlist
Kan Liang [Fri, 28 Aug 2015 09:48:05 +0000 (05:48 -0400)]
perf evlist: Add backpointer for perf_env to evlist

Add backpointer to perf_env in evlist, so we can easily access env when
processing something where we have a evsel or evlist.

Suggested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Kan Liang <kan.liang@intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1440755289-30939-5-git-send-email-kan.liang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
8 years agoperf tools: Rename perf_session_env to perf_env
Kan Liang [Fri, 28 Aug 2015 09:48:04 +0000 (05:48 -0400)]
perf tools: Rename perf_session_env to perf_env

As it is not necessarily tied to a perf.data file and needs using in
places where a perf_session is not required.

Suggested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Kan Liang <kan.liang@intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1440755289-30939-4-git-send-email-kan.liang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
8 years agoperf tools: Do not change lib/api/fs/debugfs directly
Jiri Olsa [Wed, 26 Aug 2015 13:46:45 +0000 (15:46 +0200)]
perf tools: Do not change lib/api/fs/debugfs directly

The tracing_events_path is the variable we want to change via
--debugfs-dir option, not the debugfs_mountpoint.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Raphael Beamonte <raphael.beamonte@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1440596813-12844-4-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
8 years agoperf tools: Add tracing_path and remove unneeded functions
Jiri Olsa [Wed, 26 Aug 2015 13:46:44 +0000 (15:46 +0200)]
perf tools: Add tracing_path and remove unneeded functions

There's no need for find_tracing_dir, because perf already searches for
debugfs/tracefs mount on start and populate tracing_events_path.

Adding tracing_path to carry tracing dir string to be used in
get_tracing_file instead of calling find_tracing_dir.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Raphael Beamonte <raphael.beamonte@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1440596813-12844-3-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
8 years agoperf buildid: Introduce sysfs/filename__sprintf_build_id
Masami Hiramatsu [Sat, 15 Aug 2015 11:42:59 +0000 (20:42 +0900)]
perf buildid: Introduce sysfs/filename__sprintf_build_id

Introduce sysfs/filename__sprintf_build_id for consolidating similar
code.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
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/20150815114259.13642.34685.stgit@localhost.localdomain
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
8 years agoperf evsel: Add a backpointer to the evlist a evsel is in
Arnaldo Carvalho de Melo [Thu, 27 Aug 2015 12:07:40 +0000 (08:07 -0400)]
perf evsel: Add a backpointer to the evlist a evsel is in

So that functions that deal primarily with an evsel to access
information that concerns the whole evlist it is in.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1440677263-21954-5-git-send-email-kan.liang@intel.com
Signed-off-by: Kan Liang <kan.liang@intel.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
8 years agoperf trace: Add header with copyright and background info
Arnaldo Carvalho de Melo [Fri, 28 Aug 2015 15:02:37 +0000 (12:02 -0300)]
perf trace: Add header with copyright and background info

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-5yqtfs728r1j1u8zmg8ufxwm@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
8 years agoperf scripts python: Add new compaction-times script
Tony Jones [Mon, 17 Aug 2015 19:48:52 +0000 (12:48 -0700)]
perf scripts python: Add new compaction-times script

This patch creates a new script (compaction-times) to report time
spent in mm compaction. It is possible to report times in nanoseconds
(default) or microseconds (-u).

The option -p will break down results by process id, -pv will further
decompose by each compaction entry/exit.

For each compaction entry/exit what is reported is controlled by the
options:

  -t   report only timing
  -m   report migration stats
  -ms  report migration scanner stats
  -fs  report free scanner stats

The default is to report all.

Entries may be further filtered by pid, pid-range or comm (regex).

The script is useful when analysing workloads that compact memory. The
most common example will be THP allocations on systems with a lot of
uptime that has fragmented memory.

This is an example of using the script to analyse a thpscale from
mmtests which deliberately fragments memory and allocates THP in 4
separate threads

  # Recording step, one of the following;
  $ perf record -e 'compaction:mm_compaction_*' ./workload
  # or:
  $ perf script record compaction-times

  # Reporting: basic
  total: 2444505743ns migration: moved=357738 failed=39275
  free_scanner: scanned=2705578 isolated=387875
  migration_scanner: scanned=414426 isolated=397013

  # Reporting: Per task stall times
  $ perf script report compaction-times -- -t -p
  total: 2444505743ns
  6384[thpscale]: 740800017ns
  6385[thpscale]: 274119512ns
  6386[thpscale]: 832961337ns
  6383[thpscale]: 596624877ns

  # Reporting: Per-compaction attempts for task 6385
  $ perf script report compaction-times -- -m -pv 6385
  total: 274119512ns migration: moved=14893 failed=24285
  6385[thpscale]: 274119512ns migration: moved=14893 failed=24285
  6385[thpscale].1: 3033277ns migration: moved=511 failed=1
  6385[thpscale].2: 9592094ns migration: moved=1524 failed=12
  6385[thpscale].3: 2495587ns migration: moved=512 failed=0
  6385[thpscale].4: 2561766ns migration: moved=512 failed=0
  6385[thpscale].5: 2523521ns migration: moved=512 failed=0
  ..... output continues ...

Changes since v1:
- report stats for isolate_migratepages and isolate_freepages
  (Vlastimil Babka)
- refactor code to achieve above
- add help text
- output to stdout/stderr explicitly

Signed-off-by: Tony Jones <tonyj@suse.com>
Cc: Mel Gorman <mgorman@suse.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Link: http://lkml.kernel.org/r/1439840932-8933-1-git-send-email-tonyj@suse.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
8 years agoregulator: core: use debug level print in regulator_check_drms
Archit Taneja [Fri, 28 Aug 2015 10:52:18 +0000 (16:22 +0530)]
regulator: core: use debug level print in regulator_check_drms

When calling regulator_set_load, regulator_check_drms prints and returns
an error if the regulator device's flag REGULATOR_CHANGE_DRMS isn't set.
drms_uA_update, however, bails out without reporting an error.

Replace the error print with a debug level print so that we don't get
such prints when the underlying regulator doesn't support DRMS.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agospi: Add DT bindings documentation for Netlogic XLP SPI controller
Kamlakant Patel [Thu, 27 Aug 2015 12:19:29 +0000 (17:49 +0530)]
spi: Add DT bindings documentation for Netlogic XLP SPI controller

Add DT bindings documentation for SPI controller driver used by
Netlogic XLP MIPS64 SoCs.

Signed-off-by: Kamlakant Patel <kamlakant.patel@broadcom.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agospi/xlp: SPI controller driver for Netlogic XLP SoCs
Kamlakant Patel [Thu, 27 Aug 2015 12:19:28 +0000 (17:49 +0530)]
spi/xlp: SPI controller driver for Netlogic XLP SoCs

Add SPI Master controller driver for the SPI interface on XLP8XX,
XLP3XX, XLP2XX, XLP9XX and XLP5XX family of Netlogic XLP MIPS64 processors.

Signed-off-by: Kamlakant Patel <kamlakant.patel@broadcom.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agospi: fsl-espi: add runtime PM
Heiner Kallweit [Wed, 26 Aug 2015 19:21:55 +0000 (21:21 +0200)]
spi: fsl-espi: add runtime PM

Add runtime PM and use autosuspend instead of suspending the
SPI controller after each transfer.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agospi: fsl-(e)spi: simplify cleanup code
Heiner Kallweit [Wed, 26 Aug 2015 19:21:53 +0000 (21:21 +0200)]
spi: fsl-(e)spi: simplify cleanup code

Now that most cleanup is done automatically the remove functions
can be significantly simplified.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agospi: fsl-(e)spi: migrate to using devm_ functions to simplify cleanup
Heiner Kallweit [Wed, 26 Aug 2015 19:21:50 +0000 (21:21 +0200)]
spi: fsl-(e)spi: migrate to using devm_ functions to simplify cleanup

Migrate fsl-espi and fsl-spi to using the managed devm_ functions
for resource handling. This simplifies the cleanup.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoperf stat: Get correct cpu id for print_aggr
Kan Liang [Thu, 2 Jul 2015 07:08:43 +0000 (03:08 -0400)]
perf stat: Get correct cpu id for print_aggr

print_aggr() fails to print per-core/per-socket statistics after commit
582ec0829b3d ("perf stat: Fix per-socket output bug for uncore events")
if events have differnt cpus. Because in print_aggr(), aggr_get_id needs
index (not cpu id) to find core/pkg id. Also, evsel cpu maps should be
used to get aggregated id.

Here is an example:

Counting events cycles,uncore_imc_0/cas_count_read/. (Uncore event has
cpumask 0,18)

  $ perf stat -e cycles,uncore_imc_0/cas_count_read/ -C0,18 --per-core sleep 2

Without this patch, it failes to get CPU 18 result.

   Performance counter stats for 'CPU(s) 0,18':

  S0-C0           1            7526851      cycles
  S0-C0           1               1.05 MiB  uncore_imc_0/cas_count_read/
  S1-C0           0      <not counted>      cycles
  S1-C0           0      <not counted> MiB  uncore_imc_0/cas_count_read/

With this patch, it can get both CPU0 and CPU18 result.

   Performance counter stats for 'CPU(s) 0,18':

  S0-C0           1            6327768      cycles
  S0-C0           1               0.47 MiB  uncore_imc_0/cas_count_read/
  S1-C0           1             330228      cycles
  S1-C0           1               0.29 MiB  uncore_imc_0/cas_count_read/

Signed-off-by: Kan Liang <kan.liang@intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Stephane Eranian <eranian@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Fixes: 582ec0829b3d ("perf stat: Fix per-socket output bug for uncore events")
Link: http://lkml.kernel.org/r/1435820925-51091-1-git-send-email-kan.liang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
8 years agotools lib traceeveent: Allow for negative numbers in print format
Steven Rostedt [Thu, 27 Aug 2015 13:46:01 +0000 (09:46 -0400)]
tools lib traceeveent: Allow for negative numbers in print format

It was reported that "%-8s" does not parse well when used in the printk
format. The '-' is what is throwing it off. Allow that to be included.

Reporter note:

Example before:

  transhuge-stres-10730 [004]  5897.713989: mm_compaction_finished: node=0
  zone=>-<8s order=-2119871790 ret=

Example after:

  transhuge-stres-4235  [000]   453.149280: mm_compaction_finished: node=0
  zone=ffffffff81815d7a order=9 ret=

(I will send patches to fix the string handling in the tracepoints so
it's on par with in-kernel printing via trace_pipe:)

  transhuge-stres-10921 [007] ...1  6307.140205: mm_compaction_finished: node=0
  zone=Normal   order=9 ret=partial

Reported-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Tested-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/20150827094601.46518bcc@gandalf.local.home
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
8 years agoperf script: Add --[no-]-demangle/--[no-]-demangle-kernel
Mark Drayton [Wed, 26 Aug 2015 19:18:15 +0000 (12:18 -0700)]
perf script: Add --[no-]-demangle/--[no-]-demangle-kernel

Sometimes when post-processing output from `perf script` one does not
want to demangle C++ symbol names. Add an option to allow this.

Also add --[no-]demangle-kernel to be consistent with top/report/probe.

Signed-off-by: Mark Drayton <mbd@fb.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/r/1440616695-32340-1-git-send-email-scientist@fb.com
Signed-off-by: Yannick Brosseau <scientist@fb.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
8 years agoPM / OPP: Drop unlikely before IS_ERR(_OR_NULL)
Viresh Kumar [Wed, 12 Aug 2015 10:29:39 +0000 (15:59 +0530)]
PM / OPP: Drop unlikely before IS_ERR(_OR_NULL)

IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there
is no need to do that again from its callers. Drop it.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
8 years agoPM / OPP: Fix static checker warning (broken 64bit big endian systems)
Viresh Kumar [Mon, 17 Aug 2015 13:50:20 +0000 (19:20 +0530)]
PM / OPP: Fix static checker warning (broken 64bit big endian systems)

Dan Carpenter reported (generated with static checker):

drivers/base/power/opp.c:949 _opp_add_static_v2()
warn: passing casted pointer '&new_opp->clock_latency_ns' to
'of_property_read_u32()' 64 vs 32.

This code will break on 64 bit, big endian machines.

Fix this by reading the value in a u32 type variable first and then
assigning it to the unsigned long variable.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Suggested-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
8 years agocpuidle/coupled: Remove redundant 'dev' argument of cpuidle_state_is_coupled()
Xunlei Pang [Tue, 4 Aug 2015 05:48:56 +0000 (13:48 +0800)]
cpuidle/coupled: Remove redundant 'dev' argument of cpuidle_state_is_coupled()

For cpuidle_state_is_coupled(), 'dev' is not used, so remove it.

Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
8 years agocpuidle/coupled: Remove cpuidle_device::safe_state_index
Xunlei Pang [Tue, 4 Aug 2015 05:48:55 +0000 (13:48 +0800)]
cpuidle/coupled: Remove cpuidle_device::safe_state_index

cpuidle_device::safe_state_index need to be initialized before
use, it should be the same as cpuidle_driver::safe_state_index.

We tackled this issue by removing the safe_state_index from the
cpuidle_device structure and use the one in the cpuidle_driver
structure instead.

Suggested-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
8 years agoDocumentation, add kernel-parameters.txt entry for dis_ucode_ldr
Prarit Bhargava [Tue, 25 Aug 2015 17:34:53 +0000 (13:34 -0400)]
Documentation, add kernel-parameters.txt entry for dis_ucode_ldr

dis_ucode_ldr was introduced in 65cef13 ("x86, microcode: Add a disable
chicken bit") and will disable microcode loading on x86.  This kernel
parameter is buried in the code and should be added to the Documentation.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
8 years agoleds: Export OF module alias information in missing drivers
Javier Martinez Canillas [Tue, 25 Aug 2015 06:31:16 +0000 (08:31 +0200)]
leds: Export OF module alias information in missing drivers

The I2C core always reports the MODALIAS uevent as "i2c:<modalias>"
regardless of the mechanism that was used to register the device
(i.e: OF or board code) and the table that is used later to match
the driver with the device (i.e: I2C id table or OF match table).

So drivers needs to export the I2C id table and this be built into
the module or udev won't have the necessary information to autoload
the needed driver module when the device is added.

But this means that OF-only drivers needs to have both OF and I2C id
tables that have to be kept in sync and also the dev node compatible
manufacturer prefix is stripped when reporting the MODALIAS. Which can
lead to issues if two vendors use the same I2C device name for example.

To avoid the above, the I2C core behavior may be changed in the future
to not require an SPI device table for OF-only drivers and report the
OF module alias. So, it's better to also export the OF table even when
is unused now to prevent breaking module loading when the core changes.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
8 years agoleds:lp55xx: use the private data instead of updating I2C device platform data
Milo Kim [Mon, 24 Aug 2015 07:09:55 +0000 (16:09 +0900)]
leds:lp55xx: use the private data instead of updating I2C device platform data

Currently, lp55xx_of_populate_pdata() allocates lp55xx_platform_data if
it's null. And it parses the DT and copies values into the
'client->dev.platform_data'. This may have architectural issue.
Platform data is configurable through the DT or I2C board info inside the
platform area. However, lp55xx common driver changes this configuration
when it is loaded. So 'client->dev.platform_data' is not null anymore.
Eventually, the driver initialization is not identical when it's unloaded
and loaded again.
The lp55xx common driver should use the private data, 'lp55xx_chip->pdata'
instead of changing the original platform data.

So, lp55xx_of_populate_pdata() is modified as follows.
* Do not update 'dev->platform_data'. Return the pointer of new allocated
   lp55xx_platform_data. Then the driver points it to private data,
   'lp55xx_chip->pdata'.
* Each lp55xx driver checks the pointer and handles an error case.

Then, original platform data configuration will be kept regardless of
loading or unloading the driver.
The driver allocates the memory and copies them from the DT if it's NULL.
After the driver is loaded again, 'client->dev.platform_data' is same as
initial load, so the driver is initialized identically.

Cc: Toshi Kikuchi <toshik@chromium.org>
Cc: linux-leds@vger.kernel.org
Signed-off-by: Milo Kim <milo.kim@ti.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
8 years agoleds: syscon: Correct check for syscon_node_to_regmap() errors
Bjorn Andersson [Tue, 18 Aug 2015 19:25:26 +0000 (12:25 -0700)]
leds: syscon: Correct check for syscon_node_to_regmap() errors

syscon_node_to_regmap() returns a regmap or an ERR_PTR().

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
8 years agoleds: leds-fsg: Use devm_led_classdev_register
Vaishali Thakkar [Tue, 18 Aug 2015 14:20:16 +0000 (19:50 +0530)]
leds: leds-fsg: Use devm_led_classdev_register

Use resource-managed function devm_led_classdev_register instead
of led_classdev_register to make the error-path simpler.

To be compatible with the change, various gotos are replaced with
direct returns and unneeded labels are dropped. Also, remove
fsg_led_remove as it is now redundant.

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
8 years agoMAINTAINERS: Change LED subsystem git tree URL
Jacek Anaszewski [Thu, 20 Aug 2015 06:59:35 +0000 (08:59 +0200)]
MAINTAINERS: Change LED subsystem git tree URL

This patch removes Bryan Wu from the list of LED subsystem
maintainers and replaces related git tree URL with the one
maintained by Jacek Anaszewski.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Acked-by: Bryan Wu <cooloney@gmail.com>
8 years agoleds/led-class: Add missing put_device()
Ricardo Ribalda Delgado [Fri, 31 Jul 2015 11:36:21 +0000 (13:36 +0200)]
leds/led-class: Add missing put_device()

Devices found by class_find_device must be freed with put_device().
Otherwise the reference count will not work properly.

Fixes: a96aa64cb572 ("leds/led-class: Handle LEDs with the same name")
Reported-by: Alan Tull <delicious.quinoa@gmail.com>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
8 years agoARM: Kirkwood: add modes-map property to ns2-leds nodes
Vincent Donnefort [Thu, 2 Jul 2015 17:56:41 +0000 (19:56 +0200)]
ARM: Kirkwood: add modes-map property to ns2-leds nodes

Since the LED modes mapping is no longer hardcoded inside the leds-ns2
driver, then it must be provided through the modes-map property in the
ns2-leds nodes.

Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
8 years agoleds: tlc591xx: Remove redundant I2C_FUNC_SMBUS_BYTE_DATA functionality check
Axel Lin [Sun, 26 Jul 2015 04:05:16 +0000 (12:05 +0800)]
leds: tlc591xx: Remove redundant I2C_FUNC_SMBUS_BYTE_DATA functionality check

This checking is done by regmap_get_i2c_bus() which is called in
devm_regmap_init_i2c().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
8 years agoleds: leds-ns2: depends on MACH_ARMADA_370
Simon Guinot [Thu, 2 Jul 2015 17:56:43 +0000 (19:56 +0200)]
leds: leds-ns2: depends on MACH_ARMADA_370

The leds-ns2 driver is also used by the n090401 board (Seagate NAS
4-Bay), which is based on the Marvell Armada-370 SoC.

Then this patch allows to select the leds-ns2 driver if MACH_ARMADA_370
is enabled. Additionally, this also updates the Kconfig help message.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
8 years agoleds: leds-ns2: handle can_sleep GPIOs
Simon Guinot [Thu, 2 Jul 2015 17:56:42 +0000 (19:56 +0200)]
leds: leds-ns2: handle can_sleep GPIOs

On the board n090401 (Seagate NAS 4-Bay), some of the LEDs are handled
by the leds-ns2 driver. This LEDs are connected to an I2C GPIO expander
(PCA95554PW) which means that GPIO access may sleep. This patch makes
leds-ns2 compatible with such GPIOs by using the *_cansleep() variant of
the GPIO functions. As a drawback this functions can't be used safely in
a timer context (with the timer LED trigger for example). To fix this
issue, a workqueue mechanism (copied from the leds-gpio driver) is used.

Note that this patch also updates slightly the ns2_led_sata_store
function. The LED state is now retrieved from cached values instead of
reading the GPIOs previously. This prevents ns2_led_sata_store from
working with a stale LED state (which may happen when a delayed work
is pending).

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
8 years agoleds: leds-ns2: move LED modes mapping outside of the driver
Vincent Donnefort [Thu, 2 Jul 2015 17:56:40 +0000 (19:56 +0200)]
leds: leds-ns2: move LED modes mapping outside of the driver

On the board n090401 (Seagate NAS 4-Bay), the LED mode mapping (GPIO
values to LED mode) is different from the one used on other boards
supported by the leds-ns2 driver.

With this patch the hardcoded mapping is removed from leds-ns2. Now,
it must be defined either in the platform data (if an old-fashion board
setup file is used) or in the DT node. In order to allow the later, this
patch also introduces a modes-map property for the leds-ns2 DT binding.

Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
8 years agoleds: lp8860: Constify reg_default tables
Axel Lin [Wed, 8 Jul 2015 02:43:26 +0000 (10:43 +0800)]
leds: lp8860: Constify reg_default tables

These reg_default tables are not modified after initialized, so make them
const.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
8 years agoleds: Drop owner assignment from i2c_driver
Krzysztof Kozlowski [Fri, 10 Jul 2015 06:00:52 +0000 (15:00 +0900)]
leds: Drop owner assignment from i2c_driver

i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
8 years agoleds: Allow compile test of LEDS_AAT1290 and LEDS_KTD2692 if !GPIOLIB
Geert Uytterhoeven [Mon, 6 Jul 2015 13:42:34 +0000 (15:42 +0200)]
leds: Allow compile test of LEDS_AAT1290 and LEDS_KTD2692 if !GPIOLIB

The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is
not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer
functionality only, can still be compiled if GPIOLIB is not enabled.

If COMPILE_TEST is enabled, relax the dependency on GPIOLIB for the
recently introduced symbols LEDS_AAT1290 and LEDS_KTD2692.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
8 years agoleds: Allow compile test of GPIO consumers if !GPIOLIB
Geert Uytterhoeven [Tue, 5 May 2015 16:32:25 +0000 (18:32 +0200)]
leds: Allow compile test of GPIO consumers if !GPIOLIB

The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is
not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer
functionality only, can still be compiled if GPIOLIB is not enabled.

Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where
appropriate.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: linux-leds@vger.kernel.org
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
8 years agoDT: leds: Improve description of flash LEDs related properties
Jacek Anaszewski [Fri, 10 Apr 2015 08:36:56 +0000 (10:36 +0200)]
DT: leds: Improve description of flash LEDs related properties

1. Since max-microamp property has had no users so far, then rename
   it to more descriptive led-max-microamp.
2. Since flash-timeout-us property has had no users so far, then rename
   it to more accurate flash-max-timeout-us.
3. Describe led-max-microamp property as mandatory for specific board
   configurations.
4. Make flash-max-microamp and flash-max-timeout-us properties mandatory
   for devices with configurable flash current and flash timeout settings
   respectively.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: devicetree@vger.kernel.org
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
8 years agox86/irq: Do not dereference irq descriptor before checking it
Thomas Gleixner [Fri, 28 Aug 2015 08:30:15 +0000 (10:30 +0200)]
x86/irq: Do not dereference irq descriptor before checking it

Having the IS_NULL_OR_ERR() check after dereferencing the pointer is
not really working well.

Move the dereference after the check.

Fixes: a782a7e46bb5 'x86/irq: Store irq descriptor in vector array'
Reported-and-tested-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
8 years agox86/mm/mtrr: Remove kernel internal MTRR interfaces: unexport mtrr_add() and mtrr_del()
Luis R. Rodriguez [Mon, 24 Aug 2015 19:13:33 +0000 (12:13 -0700)]
x86/mm/mtrr: Remove kernel internal MTRR interfaces: unexport mtrr_add() and mtrr_del()

The effort to replace mtrr_add() with architecture agnostic
arch_phys_wc_add() is complete, this will ensure write-combining
implementations (PAT on x86) is taken advantage instead of using
MTRR. With the effort done now, hide direct MTRR access for
drivers.

The legacy user-space /proc/mtrr ABI is not affected.

Update x86 documentation on MTRR to reflect the completion of
the phasing out of direct access to MTRR, also add a note on
platform firmware code use of MTRRs based on the obituary
discussion of MTRRs on Linux [0].

  [0] http://lkml.kernel.org/r/1438991330.3109.196.camel@hp.com

Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Cc: <syrjala@sci.fi>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Andy Walls <awalls@md.metrocast.net>
Cc: Antonino Daplas <adaplas@gmail.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Davidlohr Bueso <dbueso@suse.de>
Cc: Doug Ledford <dledford@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Suresh Siddha <sbsiddha@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Toshi Kani <toshi.kani@hp.com>
Cc: Ville Syrjälä <syrjala@sci.fi>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: airlied@linux.ie
Cc: benh@kernel.crashing.org
Cc: bhelgaas@google.com
Cc: dan.j.williams@intel.com
Cc: konrad.wilk@oracle.com
Cc: linux-fbdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-media@vger.kernel.org
Cc: mst@redhat.com
Cc: netdev@vger.kernel.org
Cc: vinod.koul@intel.com
Cc: xen-devel@lists.xensource.com
Link: http://lkml.kernel.org/r/1440443613-13696-12-git-send-email-mcgrof@do-not-panic.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
8 years agoMerge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git...
Ingo Molnar [Fri, 28 Aug 2015 06:22:02 +0000 (08:22 +0200)]
Merge tag 'perf-core-for-mingo' of git://git./linux/kernel/git/acme/linux into perf/core

Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:

User visible changes:

  - Add support for using several Intel PT features (CYC, MTC packets), the
    relevant documentation was updated: tools/perf/Documentation/intel-pt.txt,
    briefly describing those packets, its purposes, how to configure them in
    the event config terms and relevant external documentation for further
    reading. (Adrian Hunter)

  - Introduce support for probing at an absolute address, for user and kernel
    'perf probe's, useful when one have the symbol maps on a developer machine
    but not on an embedded system. (Wang Nan)

  - Fix 'perf probe' list results when a symbol can't be found or the
    address is zero and when an offset is provided without a function (Wang Nan)

  - Do not print '0x (null)' in uprobes when offset is zero (Wang Nan)

  - Clear the progress bar at the end of a ordered_events flush, fixing
    an UI artifact when, after ordering the events the screen doesn't get
    completely redraw, for instance, when an error window covers just the
    center of the screen and waits for user input. (Arnaldo Carvalho de Melo)

  - Fix 'annotate' segfault by resetting the dso find_symbol cache when removing
    symbols. (Arnaldo Carvalho de Melo)

Infrastructure changes:

  - Allow duplicate objects in the object list, just like it is possible to have
    things like this, in the kernel:

      drivers/Makefile:obj-$(CONFIG_PCI)        += usb/
      drivers/Makefile:obj-$(CONFIG_USB_GADGET) += usb/

    (Jiri Olsa)

  - Fix Intel PT 'instructions' sample period. (Adrian Hunter)

  - Prevent segfault when reading probe point with absolute address. (Wang Nan)

Build fixes:

  - Fix tarball build broken by pt/bts. (Adrian Hunter)

  - Remove export.h from MANIFEST, fixing the perf tarball make target. (Jiri Olsa)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
8 years agos390/io: Add pci_iomap_wc() and pci_iomap_wc_range()
Luis R. Rodriguez [Wed, 26 Aug 2015 23:34:10 +0000 (16:34 -0700)]
s390/io: Add pci_iomap_wc() and pci_iomap_wc_range()

The following commit:

  1b3d4200c1e0 ("PCI: Add pci_iomap_wc() variants")

Introduced pci_iomap_wc() variants but broke the s390 build,
because s390 requires its own implementation of pcio_iomap*()
calls.

The reason for that is that:

  "BAR spaces are not disjunctive on s390 so we need the bar
   parameter of pci_iomap to find the corresponding device
   and create the mapping cookie"

so it has its own lookup/lock solution and it does not include
asm-generic/pci_iomap.h.

Since it currenty maps ioremap_wc() to ioremap_nocache() and
that's the architecture default we can easily just map the wc
calls to the default calls as well.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Borislav Petkov <bp@suse.de>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Cc: Frank Blaschka <frank.blaschka@de.ibm.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thierry Reding <treding@nvidia.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Toshi Kani <toshi.kani@hp.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-fbdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-s390@vger.kernel.org
Cc: linux390@de.ibm.com
Link: http://lkml.kernel.org/r/1440632050-23648-1-git-send-email-mcgrof@do-not-panic.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
8 years agox86/asm: Drop repeated macro of X86_EFLAGS_AC definition
Huang Rui [Thu, 27 Aug 2015 10:04:04 +0000 (18:04 +0800)]
x86/asm: Drop repeated macro of X86_EFLAGS_AC definition

We just need one macro of X86_EFLAGS_AC_BIT and X86_EFLAGS_AC.

Signed-off-by: Huang Rui <ray.huang@amd.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@suse.de>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Li <tony.li@amd.com>
Cc: Tony Luck <tony.luck@intel.com>
Link: http://lkml.kernel.org/r/1440669844-21535-1-git-send-email-ray.huang@amd.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
8 years agoPM / OPP: Free resources and properly return error on failure
Viresh Kumar [Wed, 12 Aug 2015 11:00:18 +0000 (16:30 +0530)]
PM / OPP: Free resources and properly return error on failure

_of_init_opp_table_v2() isn't freeing up resources on some errors and
the error values returned are also not correct always.

This fixes following problems:
- Return -ENOENT, if no entries are found in the table.
- Use IS_ERR() to properly check return value of _find_device_opp().
- Return error value with PTR_ERR() in above case.
- Free table if _find_device_opp() fails.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
8 years agoMerge tag 'powerpc-4.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
Linus Torvalds [Fri, 28 Aug 2015 00:59:17 +0000 (17:59 -0700)]
Merge tag 'powerpc-4.2-4' of git://git./linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:
 "Fix MSI/MSI-X on pseries from Guilherme"

* tag 'powerpc-4.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/PCI: Disable MSI/MSI-X interrupts at PCI probe time in OF case
  PCI: Make pci_msi_setup_pci_dev() non-static for use by arch code

8 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Fri, 28 Aug 2015 00:52:38 +0000 (17:52 -0700)]
Merge git://git./linux/kernel/git/davem/net

Pull networking fixes from David Miller:
 "Some straggler bug fixes here:

   1) Netlink_sendmsg() doesn't check iterator type properly in mmap
      case, from Ken-ichirou MATSUZAWA.

   2) Don't sleep in atomic context in bcmgenet driver, from Florian
      Fainelli.

   3) The pfkey_broadcast() code patch can't actually ever use anything
      other than GFP_ATOMIC.  And the cases that right now pass
      GFP_KERNEL or similar will currently trigger an RCU splat.  Just
      use GFP_ATOMIC unconditionally.  From David Ahern.

   4) Fix FD bit timings handling in pcan_usb driver, from Marc
      Kleine-Budde.

   5) Cache dst leaked in ip6_gre tunnel removal, fix from Huaibin Wang.

   6) Traversal into drivers/net/ethernet/renesas should be triggered by
      CONFIG_NET_VENDOR_RENESAS, not a particular driver's config
      option.  From Kazuya Mizuguchi.

   7) Fix regression in handling of igmp_join errors in vxlan, from
      Marcelo Ricardo Leitner.

   8) Make phy_{read,write}_mmd_indirect() properly take the mdio_lock
      mutex when programming the registers.  From Russell King.

   9) Fix non-forced handling in u32_destroy(), from WANG Cong.

  10) Test the EVENT_NO_RUNTIME_PM flag before it is cleared in
      usbnet_stop(), from Eugene Shatokhin.

  11) In sfc driver, don't fetch statistics firmware isn't capable of,
      from Bert Kenward.

  12) Verify ASCONF address parameter location in SCTP, from Xin Long"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
  sctp: donot reset the overall_error_count in SHUTDOWN_RECEIVE state
  sctp: asconf's process should verify address parameter is in the beginning
  sfc: only use vadaptor stats if firmware is capable
  net: phy: fixed: propagate fixed link values to struct
  usbnet: Get EVENT_NO_RUNTIME_PM bit before it is cleared
  drivers: net: xgene: fix: Oops in linkwatch_fire_event
  cls_u32: complete the check for non-forced case in u32_destroy()
  net: fec: use reinit_completion() in mdio accessor functions
  net: phy: add locking to phy_read_mmd_indirect()/phy_write_mmd_indirect()
  vxlan: re-ignore EADDRINUSE from igmp_join
  net: compile renesas directory if NET_VENDOR_RENESAS is configured
  ip6_gre: release cached dst on tunnel removal
  phylib: Make PHYs children of their MDIO bus, not the bus' parent.
  can: pcan_usb: don't provide CAN FD bittimings by non-FD adapters
  net: Fix RCU splat in af_key
  net: bcmgenet: fix uncleaned dma flags
  net: bcmgenet: Avoid sleeping in bcmgenet_timeout
  netlink: mmap: fix tx type check

8 years agoMerge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdim...
Linus Torvalds [Fri, 28 Aug 2015 00:46:06 +0000 (17:46 -0700)]
Merge branch 'libnvdimm-fixes' of git://git./linux/kernel/git/nvdimm/nvdimm

Pull nvdimm fixlet from Dan Williams:
 "This is a libnvdimm ABI fixup.

  I pushed back on this change quite hard given the late date, that it
  appears to be purely cosmetic, sysfs is not necessarily meant to be a
  user friendly UI, and the kernel interprets the reversed polarity of
  the ACPI_NFIT_MEM_ARMED flag correctly.  When this flag is set, the
  energy source of an NVDIMM is not armed and any new writes to the DIMM
  may not be preserved.

  However, Bob Moore warned me that it is important to get these things
  named correctly wherever they appear otherwise we run the risk of a
  less than cautious firmware engineer implementing the polarity the
  wrong way.  Once a mistake like that escapes into production platforms
  the flag becomes useless and we need to move to a new bit position.

  Bob has agreed to take a change through ACPICA to rename
  ACPI_NFIT_MEM_ARMED to ACPI_NFIT_MEM_NOT_ARMED, and the patch below
  from Toshi brings the sysfs representation of these flags in line with
  their respective polarities.

  Please pull for 4.2 as this is the first kernel to expose the ACPI
  NFIT sysfs representation, and this is likely a kernel that firmware
  developers will be using for checking out their NVDIMM enabling"

* 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
  nfit: Clarify memory device state flags strings

8 years agosctp: donot reset the overall_error_count in SHUTDOWN_RECEIVE state
lucien [Wed, 26 Aug 2015 20:52:20 +0000 (04:52 +0800)]
sctp: donot reset the overall_error_count in SHUTDOWN_RECEIVE state

Commit f8d960524328 ("sctp: Enforce retransmission limit during shutdown")
fixed a problem with excessive retransmissions in the SHUTDOWN_PENDING by not
resetting the association overall_error_count.  This allowed the association
to better enforce assoc.max_retrans limit.

However, the same issue still exists when the association is in SHUTDOWN_RECEIVED
state.  In this state, HB-ACKs will continue to reset the overall_error_count
for the association would extend the lifetime of association unnecessarily.

This patch solves this by resetting the overall_error_count whenever the current
state is small then SCTP_STATE_SHUTDOWN_PENDING.  As a small side-effect, we
end up also handling SCTP_STATE_SHUTDOWN_ACK_SENT and SCTP_STATE_SHUTDOWN_SENT
states, but they are not really impacted because we disable Heartbeats in those
states.

Fixes: Commit f8d960524328 ("sctp: Enforce retransmission limit during shutdown")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agomtd: mtd_oobtest: Fix the address offset with vary_offset case
Roger Quadros [Wed, 8 Jul 2015 11:50:19 +0000 (14:50 +0300)]
mtd: mtd_oobtest: Fix the address offset with vary_offset case

When vary_offset is set (e.g. test case 3), the offset is not always
zero so memcmpshow() will show the wrong offset in the print message.
To fix this we introduce a new function memcmpshowoffset() which takes
offset as a parameter and displays the right offset and use it in
the case where offset is non zero.

The old memcmpshow() functionality is preserved by converting it into
a macro with offset preset to 0.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
8 years agosctp: asconf's process should verify address parameter is in the beginning
lucien [Thu, 27 Aug 2015 08:26:34 +0000 (16:26 +0800)]
sctp: asconf's process should verify address parameter is in the beginning

in sctp_process_asconf(), we get address parameter from the beginning of
the addip params. but we never check if it's really there. if the addr
param is not there, it still can pass sctp_verify_asconf(), then to be
handled by sctp_process_asconf(), it will not be safe.

so add a code in sctp_verify_asconf() to check the address parameter is in
the beginning, or return false to send abort.

note that this can also detect multiple address parameters, and reject it.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Marcelo Ricardo Leitner <mleitner@redhat.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agospi: mediatek: fix SPI_CMD_PAUSE_IE macro error
Leilk Liu [Thu, 27 Aug 2015 13:09:04 +0000 (21:09 +0800)]
spi: mediatek: fix SPI_CMD_PAUSE_IE macro error

enable pause interrupt should use SPI_CMD_PAUSE_IE MACRO,
so fix it.

Signed-off-by: Leilk Liu <leilk.liu@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoclk: s5pv210: add missing call to samsung_clk_of_add_provider()
Marek Szyprowski [Wed, 12 Aug 2015 08:58:22 +0000 (10:58 +0200)]
clk: s5pv210: add missing call to samsung_clk_of_add_provider()

Commit d5e136a21b2028fb1f45143ea7112d5869bfc6c7 ("clk: samsung: Register
clk provider only after registering its all clocks", merged to v3.17-rc1)
modified a way that driver registers registers to core framework. This
change has not been applied to s5pv210 clocks driver, which has been
merged in parallel to that commit. This patch adds a missing call to
samsung_clk_of_add_provider(), so the driver is operational again.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
CC: stable@vger.kernel.org # v3.17+
Acked-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
8 years agonfit: Clarify memory device state flags strings
Toshi Kani [Wed, 26 Aug 2015 16:20:23 +0000 (10:20 -0600)]
nfit: Clarify memory device state flags strings

ACPI 6.0 NFIT Memory Device State Flags in Table 5-129 defines
NVDIMM status as follows.  These bits indicate multiple info,
such as failures, pending event, and capability.

  Bit [0] set to 1 to indicate that the previous SAVE to the
  Memory Device failed.
  Bit [1] set to 1 to indicate that the last RESTORE from the
  Memory Device failed.
  Bit [2] set to 1 to indicate that platform flush of data to
  Memory Device failed. As a result, the restored data content
  may be inconsistent even if SAVE and RESTORE do not indicate
  failure.
  Bit [3] set to 1 to indicate that the Memory Device is observed
  to be not armed prior to OSPM hand off. A Memory Device is
  considered armed if it is able to accept persistent writes.
  Bit [4] set to 1 to indicate that the Memory Device observed
  SMART and health events prior to OSPM handoff.

/sys/bus/nd/devices/nmemX/nfit/flags shows this flags info.
The output strings associated with the bits are "save", "restore",
"smart", etc., which can be confusing as they may be interpreted
as positive status, i.e. save succeeded.

Change also the dev_info() message in acpi_nfit_register_dimms()
to be consistent with the sysfs flags strings.

Reported-by: Robert Elliott <elliott@hp.com>
Signed-off-by: Toshi Kani <toshi.kani@hp.com>
[ross: rename 'not_arm' to 'not_armed']
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
[djbw: defer adding bit5, HEALTH_ENABLED, for now]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
8 years agosfc: only use vadaptor stats if firmware is capable
Bert Kenward [Wed, 26 Aug 2015 15:39:03 +0000 (16:39 +0100)]
sfc: only use vadaptor stats if firmware is capable

Some of the stats handling code differs based on SR-IOV support,
and SRIOV support is only available if full-featured firmware is
used.
Do not use vadaptor stats if firmware mode is not set to
full-featured.

Signed-off-by: Shradha Shah <sshah@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agonet: phy: fixed: propagate fixed link values to struct
Madalin Bucur [Wed, 26 Aug 2015 14:58:47 +0000 (17:58 +0300)]
net: phy: fixed: propagate fixed link values to struct

The fixed link values parsed from the device tree are stored in
the struct fixed_phy member status. The struct phy_device members
speed, duplex were not updated.

Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8 years agoMerge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Linus Torvalds [Thu, 27 Aug 2015 18:12:41 +0000 (11:12 -0700)]
Merge tag 'arm64-fixes' of git://git./linux/kernel/git/arm64/linux

Pull amr64 kvm fix from Will Deacon:
 "We've uncovered a nasty bug in the arm64 KVM code which allows a badly
  behaved 32-bit guest to bring down the host.  The fix is simple (it's
  what I believe we call a "brown paper bag" bug) and I don't think it
  makes sense to sit on this, particularly as Russell ended up
  triggering this rather than just somebody noticing a potential problem
  by inspection.

  Usually arm64 KVM changes would go via Paolo's tree, but he's on
  holiday at the moment and the deal is that anything urgent gets
  shuffled via the arch trees, so here it is.

  Summary:

  Fix arm64 KVM issue when injecting an abort into a 32-bit guest, which
  would lead to an illegal exception return at EL2 and a subsequent host
  crash"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: KVM: Fix host crash when injecting a fault into a 32bit guest

8 years agoACPI / LPSS: Ignore 10ms delay for Braswell
Srinidhi Kasagar [Thu, 27 Aug 2015 16:00:55 +0000 (21:30 +0530)]
ACPI / LPSS: Ignore 10ms delay for Braswell

LPSS devices in Braswell does not need the default 10ms
d3_delay imposed by PCI specification. Removing this
unnecessary delay significantly reduces the resume time
approximately upto 200ms on this platform.

Signed-off-by: Srinidhi Kasagar <srinidhi.kasagar@intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
8 years agoarm64: KVM: Fix host crash when injecting a fault into a 32bit guest
Marc Zyngier [Thu, 27 Aug 2015 15:10:01 +0000 (16:10 +0100)]
arm64: KVM: Fix host crash when injecting a fault into a 32bit guest

When injecting a fault into a misbehaving 32bit guest, it seems
rather idiotic to also inject a 64bit fault that is only going
to corrupt the guest state. This leads to a situation where we
perform an illegal exception return at EL2 causing the host
to crash instead of killing the guest.

Just fix the stupid bug that has been there from day 1.

Cc: <stable@vger.kernel.org>
Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
8 years agohwmon: (fam15h_power) Add ratio of Tsample to the PTSC period
Huang Rui [Thu, 27 Aug 2015 08:07:38 +0000 (16:07 +0800)]
hwmon: (fam15h_power) Add ratio of Tsample to the PTSC period

This patch adds a member (cpu_pwr_sample_ratio) of fam15h_power_data,
that represents the ratio of compute unit power accumulator sample
period to the PTSC counter period.

Tsample: compute unit power accumulator sample period
Tref: the performance timestamp counter period
PTSC: performance timestamp counter

Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
8 years agohwmon: (fam15h_power) Add documentation for new processors support
Huang Rui [Thu, 27 Aug 2015 08:07:37 +0000 (16:07 +0800)]
hwmon: (fam15h_power) Add documentation for new processors support

This patch updates description of fam15h_power driver, its scope is
extended to family 16h processsors.

Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
8 years agohwmon: (fam15h_power) Update running_avg_capture bit field to 28
Huang Rui [Thu, 27 Aug 2015 08:07:35 +0000 (16:07 +0800)]
hwmon: (fam15h_power) Update running_avg_capture bit field to 28

On Carrizo and later platforms, running_avg_capture bit field is
extended to 4:31 (28 bits) from 4:25.

Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
8 years agohwmon: (fam15h_power) Rename fam15h_power_is_internal_node0 function
Huang Rui [Thu, 27 Aug 2015 08:07:33 +0000 (16:07 +0800)]
hwmon: (fam15h_power) Rename fam15h_power_is_internal_node0 function

We rename fam15h_power_is_internal_node0() function to
should_load_on_this_node(), because it may not be node0 from KV and
on, and they are single-node processors.

Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
8 years agohwmon: (fam15h_power) Add support for AMD Carrizo
Huang Rui [Thu, 27 Aug 2015 08:07:32 +0000 (16:07 +0800)]
hwmon: (fam15h_power) Add support for AMD Carrizo

AMD Carrizo(Fam15h, M60h) processors can report power1_crit
(ProcessorPwrWatts) and power1_input (CurrPwrWatts) values.
And this patch adds support for CZ.

Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
8 years agoARCv2: entry: Fix reserved handler
Vineet Gupta [Thu, 27 Aug 2015 10:55:07 +0000 (16:25 +0530)]
ARCv2: entry: Fix reserved handler

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>