]> Git Repo - linux.git/log
linux.git
9 years agomfd: wm5102: Ensure we always boot the device fully
Charles Keepax [Mon, 11 May 2015 12:58:03 +0000 (13:58 +0100)]
mfd: wm5102: Ensure we always boot the device fully

The wm5102 uses a custom boot sequence and the standard boot sequence is
disabled. However, the standard boot sequence must be run at least once
after a cold boot (caused by either a hard reset or removal of AVDD).
Unfortunately the register WRITE_SEQUENCER_CTRL_3 is not affected by the
hardware reset. This means if the device has been previously booted but
the AVDD supply has never been removed, arizona_dev_init will reset the
chip but the boot sequence will not run, which can cause numerous
problems. The solution is to manually clear this register and then boot
the chip again, which is what this patch does.

Signed-off-by: Charles Keepax <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
9 years agomfd: arizona: Factor out hard reset into helper functions
Charles Keepax [Mon, 11 May 2015 12:58:02 +0000 (13:58 +0100)]
mfd: arizona: Factor out hard reset into helper functions

This patch adds functions for enabling and disabling the physical reset
line. This will be helpful in future refactoring.

Signed-off-by: Charles Keepax <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
9 years agomfd: arizona: Use devres to manage reset GPIO
Charles Keepax [Mon, 11 May 2015 12:58:01 +0000 (13:58 +0100)]
mfd: arizona: Use devres to manage reset GPIO

This also handily fixes a leak of the GPIO in arizona_dev_exit.

Signed-off-by: Charles Keepax <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
9 years agoMAINTAINERS: Add Arnd Bergmann as Syscon reviewer
Lee Jones [Tue, 12 May 2015 13:13:58 +0000 (14:13 +0100)]
MAINTAINERS: Add Arnd Bergmann as Syscon reviewer

The System Configuration (syscon) driver is an important one, which
effects many ARM-SoC based platforms.  I'm adding Arnd as a primary
reviewer as he is highly competent in this area and has a keen
interest in ARM-SoC.

Acked-by: Arnd Bergmann <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
9 years agoMAINTAINERS: Extend Samsung MFD drivers entry and add Krzysztof Kozlowski
Krzysztof Kozlowski [Wed, 6 May 2015 05:19:36 +0000 (14:19 +0900)]
MAINTAINERS: Extend Samsung MFD drivers entry and add Krzysztof Kozlowski

Extend the entry for Samsung MFD drivers for PMIC devices (Power
Management Integrated Circuit) with bindings documentation, clock
(clk-s2mps11.c) and RTC drivers (rtc-s5m.c).

These PMIC devices are used on many Exynos-based boards like Arndale
Octa (S2MPS11), Gear 2 (S2MPS14).

Add Krzysztof Kozlowski as a supporter for reviewing them.
I am not the author of these drivers. However I have recently
contributed to most of them and I have access to datasheets and hardware.

Cc: Sangbeom Kim <[email protected]>
CC: Mike Turquette <[email protected]>
CC: Stephen Boyd <[email protected]>
CC: Alessandro Zummo <[email protected]>
CC: Alexandre Belloni <[email protected]>
CC: Liam Girdwood <[email protected]>
CC: Mark Brown <[email protected]>
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
9 years agomfd: Allow compile test of GPIO consumers if !GPIOLIB
Geert Uytterhoeven [Tue, 5 May 2015 16:32:27 +0000 (18:32 +0200)]
mfd: 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 <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
9 years agomfd: max77686: Remove unused struct max77686_opmode_data
Javier Martinez Canillas [Wed, 6 May 2015 17:07:16 +0000 (19:07 +0200)]
mfd: max77686: Remove unused struct max77686_opmode_data

The defined struct max77686_opmode_data isn't used neither by
the max77686 mfd driver nor the drivers for its sub-devices.

Signed-off-by: Javier Martinez Canillas <[email protected]>
Reviewed-by: Chanwoo Choi <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
9 years agomfd: twl4030-power: Fix pmic for boards that need AC charger disabled
Tony Lindgren [Mon, 27 Apr 2015 17:18:14 +0000 (10:18 -0700)]
mfd: twl4030-power: Fix pmic for boards that need AC charger disabled

I noticed the PMIC configuration on 37xx-evm won't actually shut down
the voltages during off-idle. Turns out 37xx-evm needs the AC charger
state transitions disabled like we are doing for SDP and LDP in the
legacy booting case.

Let's fix this for device tree based booting by setting up the quirk
flag based on the compatible flag. And let's also use the existing
define for STARTON_CHG.

Note that SDP and EVM do not have the PMIC clken wired to gate the
the oscillator while LDP has.

Signed-off-by: Tony Lindgren <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
9 years agomfd: documentation: dt: max77686: Fix typo
Fabio Estevam [Mon, 20 Apr 2015 19:17:37 +0000 (16:17 -0300)]
mfd: documentation: dt: max77686: Fix typo

Fix typo in 'Multifunction'.

Signed-off-by: Fabio Estevam <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
9 years agomfd: arizona: Remove redundant register sync
Charles Keepax [Wed, 22 Apr 2015 13:34:48 +0000 (14:34 +0100)]
mfd: arizona: Remove redundant register sync

This soft reset used to be located after the register patch had been
applied, but has since moved to before the patch is applied. At the new
location there is no requirement to do a register sync as no register
writes will have happened yet.

Signed-off-by: Charles Keepax <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
9 years agomfd: documentation: dt: Add documentation for the mfd Maxim max77693
Jacek Anaszewski [Tue, 28 Apr 2015 07:18:42 +0000 (09:18 +0200)]
mfd: documentation: dt: Add documentation for the mfd Maxim max77693

This patch adds device tree binding documentation for
the flash cell of the Maxim max77693 multifunctional device.

Signed-off-by: Jacek Anaszewski <[email protected]>
Signed-off-by: Andrzej Hajda <[email protected]>
Acked-by: Kyungmin Park <[email protected]>
Acked-by: Sakari Ailus <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
9 years agomfd: Constify regmap and irq configuration data
Krzysztof Kozlowski [Mon, 27 Apr 2015 12:54:13 +0000 (21:54 +0900)]
mfd: Constify regmap and irq configuration data

Constify in various drivers configuration data which is not modified:
 - regmap_irq_chip,
 - individual regmap_irq's in array,
 - regmap_config,
 - irq_domain_ops,

Signed-off-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
9 years agoMerge branches 'ib-mfd-watchdog-rtc-4.2', 'ib-mfd-regulator-4.2' and 'ib-mfd-i2c...
Lee Jones [Mon, 22 Jun 2015 11:24:25 +0000 (12:24 +0100)]
Merge branches 'ib-mfd-watchdog-rtc-4.2', 'ib-mfd-regulator-4.2' and 'ib-mfd-i2c-input-chrome-4.2' into ibs-for-mfd-merged

9 years agomfd: cros_ec: Staticise some newly introduced structures
Lee Jones [Mon, 15 Jun 2015 13:39:39 +0000 (21:39 +0800)]
mfd: cros_ec: Staticise some newly introduced structures

Signed-off-by: Lee Jones <[email protected]>
9 years agoMerge remote-tracking branches 'regulator/topic/of', 'regulator/topic/pwm', 'regulato...
Mark Brown [Mon, 22 Jun 2015 10:19:56 +0000 (11:19 +0100)]
Merge remote-tracking branches 'regulator/topic/of', 'regulator/topic/pwm', 'regulator/topic/qcom' and 'regulator/topic/soft-start' into regulator-next

9 years agoMerge remote-tracking branches 'regulator/topic/lp8755', 'regulator/topic/max14577...
Mark Brown [Mon, 22 Jun 2015 10:19:55 +0000 (11:19 +0100)]
Merge remote-tracking branches 'regulator/topic/lp8755', 'regulator/topic/max14577', 'regulator/topic/max77693', 'regulator/topic/max77843' and 'regulator/topic/max8973' into regulator-next

9 years agoMerge remote-tracking branches 'regulator/topic/da9063', 'regulator/topic/doc', ...
Mark Brown [Mon, 22 Jun 2015 10:19:52 +0000 (11:19 +0100)]
Merge remote-tracking branches 'regulator/topic/da9063', 'regulator/topic/doc', 'regulator/topic/fan53555', 'regulator/topic/gpio' and 'regulator/topic/ilim' into regulator-next

9 years agoMerge remote-tracking branches 'regulator/topic/88pm8607', 'regulator/topic/arizona...
Mark Brown [Mon, 22 Jun 2015 10:19:51 +0000 (11:19 +0100)]
Merge remote-tracking branches 'regulator/topic/88pm8607', 'regulator/topic/arizona', 'regulator/topic/cleanup' and 'regulator/topic/da9062' into regulator-next

9 years agoMerge remote-tracking branch 'regulator/topic/core' into regulator-next
Mark Brown [Mon, 22 Jun 2015 10:19:51 +0000 (11:19 +0100)]
Merge remote-tracking branch 'regulator/topic/core' into regulator-next

9 years agoMerge remote-tracking branches 'regulator/fix/doc', 'regulator/fix/max77686' and...
Mark Brown [Mon, 22 Jun 2015 10:19:49 +0000 (11:19 +0100)]
Merge remote-tracking branches 'regulator/fix/doc', 'regulator/fix/max77686' and 'regulator/fix/wm831x' into regulator-linus

9 years agoMerge remote-tracking branch 'regulator/fix/core' into regulator-linus
Mark Brown [Mon, 22 Jun 2015 10:19:48 +0000 (11:19 +0100)]
Merge remote-tracking branch 'regulator/fix/core' into regulator-linus

9 years agocrypto: marvell/cesa - remove COMPILE_TEST dependency
Boris Brezillon [Mon, 22 Jun 2015 07:22:14 +0000 (09:22 +0200)]
crypto: marvell/cesa - remove COMPILE_TEST dependency

The CESA driver calls phys_to_virt() which is not available on all
architectures.
Remove the depency on COMPILE_TEST to prevent building this driver on
non ARM architectures.

Signed-off-by: Boris Brezillon <[email protected]>
Reported-by: Paul Gortmaker <[email protected]>
Suggested-by: Herbert Xu <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
9 years agocrypto: algif_aead - Temporarily disable all AEAD algorithms
Herbert Xu [Mon, 22 Jun 2015 02:31:40 +0000 (10:31 +0800)]
crypto: algif_aead - Temporarily disable all AEAD algorithms

As the AEAD conversion is still ongoing, we do not yet wish to
export legacy AEAD implementations to user-space, as their calling
convention will change.

This patch actually disables all AEAD algorithms because some of
them (e.g., cryptd) will need to be modified to propagate this flag.

Subsequent patches will reenable them on an individual basis.

Signed-off-by: Herbert Xu <[email protected]>
9 years agocrypto: af_alg - Forbid the use internal algorithms
Herbert Xu [Mon, 22 Jun 2015 02:14:19 +0000 (10:14 +0800)]
crypto: af_alg - Forbid the use internal algorithms

The bit CRYPTO_ALG_INTERNAL was added to stop af_alg from accessing
internal algorithms.  However, af_alg itself was never modified to
actually stop that bit from being used by the user.  Therefore the
user could always override it by specifying the relevant bit in the
type and/or mask.

This patch silently discards the bit in both type and mask.

Signed-off-by: Herbert Xu <[email protected]>
9 years agocrypto: echainiv - Only hold RNG during initialisation
Herbert Xu [Sun, 21 Jun 2015 11:11:50 +0000 (19:11 +0800)]
crypto: echainiv - Only hold RNG during initialisation

This patch changes the RNG allocation so that we only hold a
reference to the RNG during initialisation.

Signed-off-by: Herbert Xu <[email protected]>
9 years agocrypto: seqiv - Add compatibility support without RNG
Herbert Xu [Sun, 21 Jun 2015 11:11:49 +0000 (19:11 +0800)]
crypto: seqiv - Add compatibility support without RNG

When seqiv is used in compatibility mode, this patch allows it
to function even when an RNG Is not available.  It also changes
the RNG allocation for the new explicit seqiv interface so that
we only hold a reference to the RNG during initialisation.

Signed-off-by: Herbert Xu <[email protected]>
9 years agocrypto: eseqiv - Offer normal cipher functionality without RNG
Herbert Xu [Sun, 21 Jun 2015 11:11:47 +0000 (19:11 +0800)]
crypto: eseqiv - Offer normal cipher functionality without RNG

The RNG may not be available during early boot, e.g., the relevant
modules may not be included in the initramfs.  As the RNG Is only
needed for IPsec, we should not let this prevent use of ciphers
without IV generators, e.g., for disk encryption.

This patch postpones the RNG allocation to the init function so
that one failure during early boot does not make the RNG unavailable
for all subsequent users of the same cipher.

More importantly, it lets the cipher live even if RNG allocation
fails.  Of course we no longer offer IV generation and which will
fail with an error if invoked.  But all other cipher capabilities
will function as usual.

Signed-off-by: Herbert Xu <[email protected]>
9 years agocrypto: chainiv - Offer normal cipher functionality without RNG
Herbert Xu [Sun, 21 Jun 2015 11:11:46 +0000 (19:11 +0800)]
crypto: chainiv - Offer normal cipher functionality without RNG

The RNG may not be available during early boot, e.g., the relevant
modules may not be included in the initramfs.  As the RNG Is only
needed for IPsec, we should not let this prevent use of ciphers
without IV generators, e.g., for disk encryption.

This patch postpones the RNG allocation to the init function so
that one failure during early boot does not make the RNG unavailable
for all subsequent users of the same cipher.

More importantly, it lets the cipher live even if RNG allocation
fails.  Of course we no longer offer IV generation and which will
fail with an error if invoked.  But all other cipher capabilities
will function as usual.

Signed-off-by: Herbert Xu <[email protected]>
9 years agocrypto: user - Add CRYPTO_MSG_DELRNG
Herbert Xu [Sun, 21 Jun 2015 11:11:45 +0000 (19:11 +0800)]
crypto: user - Add CRYPTO_MSG_DELRNG

This patch adds a new crypto_user command that allows the admin to
delete the crypto system RNG.  Note that this can only be done if
the RNG is currently not in use.  The next time it is used a new
system RNG will be allocated.

Signed-off-by: Herbert Xu <[email protected]>
9 years agocrypto: user - Move cryptouser.h to uapi
Herbert Xu [Sun, 21 Jun 2015 11:11:44 +0000 (19:11 +0800)]
crypto: user - Move cryptouser.h to uapi

The header file cryptouser.h only contains information that is
exported to user-space.

Signed-off-by: Herbert Xu <[email protected]>
9 years agocrypto: rng - Do not free default RNG when it becomes unused
Herbert Xu [Sun, 21 Jun 2015 11:11:43 +0000 (19:11 +0800)]
crypto: rng - Do not free default RNG when it becomes unused

Currently we free the default RNG when its use count hits zero.
This was OK when the IV generators would latch onto the RNG at
instance creation time and keep it until the instance is torn
down.

Now that IV generators only keep the RNG reference during init
time this scheme causes the default RNG to come and go at a high
frequencey.  This is highly undesirable as we want to keep a single
RNG in use unless the admin wants it to be removed.

This patch changes the scheme so that the system RNG once allocated
is never removed unless a specifically requested.

Signed-off-by: Herbert Xu <[email protected]>
9 years agocrypto: skcipher - Allow givencrypt to be NULL
Herbert Xu [Sun, 21 Jun 2015 11:11:41 +0000 (19:11 +0800)]
crypto: skcipher - Allow givencrypt to be NULL

Currently for skcipher IV generators they must provide givencrypt
as that is the whole point.  We are currently replacing skcipher
IV generators with explicit IV generators.  In order to maintain
backwards compatibility, we need to allow the IV generators to
still function as a normal skcipher when the RNG Is not present
(e.g., in the initramfs during boot).  IOW everything but givencrypt
and givdecrypt will still work but those two will fail.

Therefore this patch assigns a default givencrypt that simply
returns an error should it be NULL.

Signed-off-by: Herbert Xu <[email protected]>
9 years agoMerge branches 'x86/apic', 'x86/asm', 'x86/mm' and 'x86/platform' into x86/core,...
Ingo Molnar [Mon, 22 Jun 2015 07:15:03 +0000 (09:15 +0200)]
Merge branches 'x86/apic', 'x86/asm', 'x86/mm' and 'x86/platform' into x86/core, to merge last updates

Signed-off-by: Ingo Molnar <[email protected]>
9 years agohwmon: add driver for Microchip TC74
Maciej S. Szmigiero [Sun, 21 Jun 2015 13:54:44 +0000 (15:54 +0200)]
hwmon: add driver for Microchip TC74

Add hwmon driver for the Microchip TC74.

The TC74 is a single-input 8-bit I2C temperature sensor,
with +-2 degrees centigrade accuracy.

Signed-off-by: Maciej Szmigiero <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
9 years agoLinux 4.1 v4.1
Linus Torvalds [Mon, 22 Jun 2015 05:05:43 +0000 (22:05 -0700)]
Linux 4.1

9 years agoclocksource: Increase dependencies of timer-stm32 to limit build wreckage
Paul Gortmaker [Sat, 20 Jun 2015 23:02:32 +0000 (19:02 -0400)]
clocksource: Increase dependencies of timer-stm32 to limit build wreckage

This driver leaks out into arch/parisc builds that don't have
CONFIG_GENERIC_CLOCKEVENTS, leading to the following (truncated)
wreckage:

  CC      drivers/clocksource/timer-stm32.o
drivers/clocksource/timer-stm32.c:38:28: error: field 'evtdev' has incomplete type
drivers/clocksource/timer-stm32.c:44:19: warning: 'enum clock_event_mode' declared inside parameter list
drivers/clocksource/timer-stm32.c:44:19: warning: its scope is only this definition or declaration, which is probably not what you want
drivers/clocksource/timer-stm32.c:43:62: error: parameter 1 ('mode') has incomplete type
drivers/clocksource/timer-stm32.c:43:13: error: function declaration isn't a prototype
drivers/clocksource/timer-stm32.c: In function 'stm32_clock_event_set_mode':
drivers/clocksource/timer-stm32.c:47:3: error: type defaults to 'int' in declaration of '__mptr'
drivers/clocksource/timer-stm32.c:47:3: warning: initialization from incompatible pointer type
drivers/clocksource/timer-stm32.c:51:7: error: 'CLOCK_EVT_MODE_PERIODIC' undeclared (first use in this function)
drivers/clocksource/timer-stm32.c:51:7: note: each undeclared identifier is reported only once for each function it appears in
drivers/clocksource/timer-stm32.c:56:7: error: 'CLOCK_EVT_MODE_ONESHOT' undeclared (first use in this function)

Tighten up the dependencies to limit where it gets built by copying
the style of the Kconfig line for CLKSRC_EFM32 a few lines above.

Signed-off-by: Paul Gortmaker <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Chanwoo Choi <[email protected]>
Cc: Maxime Coquelin <[email protected]>
Cc: Daniel Lezcano <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
9 years agox86/hpet: Use proper hpet device number for MSI allocation
Thomas Gleixner [Sun, 21 Jun 2015 14:21:50 +0000 (16:21 +0200)]
x86/hpet: Use proper hpet device number for MSI allocation

hpet_assign_irq() is called with hpet_device->num as "hardware
interrupt number", but hpet_device->num is initialized after the
interrupt has been assigned, so it's always 0. As a consequence only
the first MSI allocation succeeds, the following ones fail because the
"hardware interrupt number" already exists.

Move the initialization of dev->num and other fields before the call
to hpet_assign_irq(), which is the ordering before the offending
commit which introduced that regression.

Fixes: "3cb96f0c9733 x86/hpet: Enhance HPET IRQ to support hierarchical irqdomains"
Reported-by: Sergey Senozhatsky <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1506211635010.4107@nanos
Cc: Jiang Liu <[email protected]>
Cc: Borislav Petkov <[email protected]>
9 years agocrypto: sahara - propagate the error on clk_disable_unprepare() failure
Fabio Estevam [Sat, 20 Jun 2015 18:30:22 +0000 (15:30 -0300)]
crypto: sahara - propagate the error on clk_disable_unprepare() failure

clk_prepare_enable() may fail, so we should better check its return value
and propagate it in the case of error.

Signed-off-by: Fabio Estevam <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
9 years agocrypto: rsa - fix invalid select for AKCIPHER
Tadeusz Struk [Fri, 19 Jun 2015 17:27:39 +0000 (10:27 -0700)]
crypto: rsa - fix invalid select for AKCIPHER

Should be CRYPTO_AKCIPHER instead of AKCIPHER

Reported-by: Andreas Ruprecht <[email protected]>
Signed-off-by: Tadeusz Struk <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
9 years agocrypto: picoxcell - Update to the current clk API
Michael van der Westhuizen [Fri, 19 Jun 2015 13:55:51 +0000 (15:55 +0200)]
crypto: picoxcell - Update to the current clk API

The picoXcell hardware crypto accelerator driver was using an
older version of the clk framework, and not (un)preparing the
clock before enabling/disabling it.  This change uses the handy
clk_prepare_enable function to interact with the current clk
framework correctly.

Signed-off-by: Michael van der Westhuizen <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
9 years agocrypto: nx - Check for bogus firmware properties
Herbert Xu [Fri, 19 Jun 2015 04:07:54 +0000 (12:07 +0800)]
crypto: nx - Check for bogus firmware properties

The nx driver reads two crucial paramters from the firmware for
each crypto algorithm, the maximum SG list length and byte limit.
Unfortunately those two parameters may be bogus, or worse they
may be absent altogether.  When this happens the algorithms will
still register successfully but will fail when used or tested.

This patch adds checks to report any firmware entries which are
found to be bogus, and avoid registering algorithms which have
bogus parameters.  A warning is also printed when an algorithm
is not registered because of this as there may have been no firmware
entries for it at all.

Reported-by: Ondrej MoriÅ¡ <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
9 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Linus Torvalds [Sun, 21 Jun 2015 00:26:01 +0000 (17:26 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending

Pull scsi target fixes from Nicholas Bellinger:
 "Apologies for the late pull request.

  Here are the outstanding target-pending fixes for v4.1 code.

  The series contains three patches from Sagi + Co that address a few
  iser-target issues that have been uncovered during recent testing at
  Mellanox.

  Patch #1 has a v3.16+ stable tag, and #2-3 have v3.10+ stable tags"

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  iser-target: Fix possible use-after-free
  iser-target: release stale iser connections
  iser-target: Fix variable-length response error completion

9 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Sat, 20 Jun 2015 20:54:22 +0000 (13:54 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "A smattering of fixes,

  mgag200:
      don't accept modes that aren't aligned properly as hw can't do it

  i915:
      two regression fixes

  radeon:
      one query to allow userspace fixes
      one oops fixer for older hw with new options enabled"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/radeon: don't probe MST on hw we don't support it on
  drm/radeon: Add RADEON_INFO_VA_UNMAP_WORKING query
  drm/mgag200: Reject non-character-cell-aligned mode widths
  Revert "drm/i915: Don't skip request retirement if the active list is empty"
  drm/i915: Always reset vma->ggtt_view.pages cache on unbinding

9 years agoMerge branch 'irq/for-x86' into irq/core
Thomas Gleixner [Sat, 20 Jun 2015 17:14:31 +0000 (19:14 +0200)]
Merge branch 'irq/for-x86' into irq/core

Get the infrastructure patches which are required for x86/apic into core

9 years agogenirq: Remove bogus restriction in irq_move_mask_irq()
Thomas Gleixner [Sat, 20 Jun 2015 10:05:40 +0000 (12:05 +0200)]
genirq: Remove bogus restriction in irq_move_mask_irq()

If an interrupt is marked with the no balancing flag, we still allow
setting the affinity for such an interrupt from the kernel itself, but
for interrupts which move the affinity from interrupt context via
irq_move_mask_irq() this runs into a check for the no balancing flag,
which in turn ends up with an endless storm of stack dumps because the
move pending flag is not reset.

Allow the move for interrupts which have the no balancing flag set and
clear the move pending bit before checking for interrupts with the per
cpu flag set.

Reported-by: Sergey Senozhatsky <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Jiang Liu <[email protected]>
Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1506201002570.4107@nanos
Signed-off-by: Thomas Gleixner <[email protected]>
9 years agox86/hpet: Check for irq==0 when allocating hpet MSI interrupts
Jiang Liu [Sat, 20 Jun 2015 09:50:50 +0000 (11:50 +0200)]
x86/hpet: Check for irq==0 when allocating hpet MSI interrupts

irq == 0 is not a valid irq for a irqdomain MSI allocation, but hpet
code checks only for negative return values.

Reported-by: Sergey Senozhatsky <[email protected]>
Cc: Borislav Petkov <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
9 years agosnic: driver for Cisco SCSI HBA
Narsimhulu Musini [Fri, 29 May 2015 08:04:01 +0000 (01:04 -0700)]
snic: driver for Cisco SCSI HBA

Cisco has developed a new PCI HBA interface called sNIC, which stands for
SCSI NIC. This is a new storage feature supported on specialized network
adapter. The new PCI function provides a uniform host interface and abstracts
backend storage.

[jejb: fix up checkpatch errors]
Signed-off-by: Narsimhulu Musini <[email protected]>
Signed-off-by: Sesidhar Baddela <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
9 years agoMerge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git...
Ingo Molnar [Fri, 19 Jun 2015 23:11:11 +0000 (01:11 +0200)]
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core

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

User visible changes:

  - Replace CTRL+z with 'f' as hotkey for enable/disable events (Arnaldo Carvalho de Melo)

  - Do not exit when 'f' is pressed in 'report' mode (Arnaldo Carvalho de Melo)

  - Tell the user how to unfreeze events after pressing 'f' in 'perf top' (Arnaldo Carvalho de Melo)

  - React to unassigned hotkey pressing in 'top/report' (Arnaldo Carvalho de Melo)

  - Display total number of samples with --show-total-period in 'annotate' (Martin LiÅ¡ka)

  - Add timeout to make procfs mmap processing more robust (Kan Liang)

  - Fix sort__sym_cmp to also compare end of symbol (Yannick Brosseau)

Infrastructure changes:

  - Ensure thread-stack is flushed (Adrian Hunter)

Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
9 years agoMerge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git...
Ingo Molnar [Fri, 19 Jun 2015 23:07:02 +0000 (01:07 +0200)]
Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent

Pull perf/urgent fix from Arnaldo Carvalho de Melo:

  - Fix build breakage if prefix= is specified, this introduced
    a regression for a build idiom used by the Debian "linux-tools"
    package, that does:

       MAKE_PERF := $(MAKE) prefix=/usr V=1 ARCH=$(KERNEL_ARCH_PERF) ...

    Fix it. (Lukas Wunner)

Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
9 years agoperf tools: Configurable per thread proc map processing time out
Kan Liang [Wed, 17 Jun 2015 13:51:11 +0000 (09:51 -0400)]
perf tools: Configurable per thread proc map processing time out

The time out to limit the individual proc map processing was hard code
to 500ms. This patch introduce a new option --proc-map-timeout to make
the time limit configurable.

Signed-off-by: Kan Liang <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Ying Huang <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
9 years agoperf tools: Add time out to force stop proc map processing
Kan Liang [Wed, 17 Jun 2015 13:51:10 +0000 (09:51 -0400)]
perf tools: Add time out to force stop proc map processing

System wide sampling like 'perf top' or 'perf record -a' read all
threads /proc/xxx/maps before sampling. If there are any threads which
generating a keeping growing huge maps, perf will do infinite loop
during synthesizing. Nothing will be sampled.

This patch fixes this issue by adding per-thread timeout to force stop
this kind of endless proc map processing.

PERF_RECORD_MISC_PROC_MAP_PARSE_TIME_OUT is introduced to indicate that
the mmap record are truncated by time out. User will get warning
notification when truncated mmap records are detected.

Reported-by: Ying Huang <[email protected]>
Signed-off-by: Kan Liang <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Ying Huang <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
9 years agoperf report: Fix sort__sym_cmp to also compare end of symbol
Yannick Brosseau [Wed, 17 Jun 2015 23:41:10 +0000 (16:41 -0700)]
perf report: Fix sort__sym_cmp to also compare end of symbol

When using a map file from a JIT, due to memory reuse, we can obtain
multiple symbols with the same start address but a different length.

The symbols__find does check for the end so not doing it in
sort__sym_cmp was causing the hist_entry in the annotate part of a
report to match to the wrong entry, causing a fatal error.

Signed-off-by: Yannick Brosseau <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
9 years agoperf hists browser: React to unassigned hotkey pressing
Arnaldo Carvalho de Melo [Fri, 19 Jun 2015 20:49:29 +0000 (17:49 -0300)]
perf hists browser: React to unassigned hotkey pressing

When that happens we were just ignoring the key press, now this
message is presented in the bottom line (the help line):

  "Press '?' for help on key bindings"

Cc: Adrian Hunter <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Don Zickus <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
9 years agoperf top: Tell the user how to unfreeze events after pressing 'f'
Arnaldo Carvalho de Melo [Fri, 19 Jun 2015 20:35:25 +0000 (17:35 -0300)]
perf top: Tell the user how to unfreeze events after pressing 'f'

When the user presses 'f' to disable events the visual cues are, well,
the percentages not changing and the number of events freezing.

Be more explicit by changing the help line at the bottom of the screen
to show the following messages when 'f' is pressed:

  "Press 'f' again to re-enable the events"

And then, when 'f' is pressed again:

  "Press 'f' to disable the events or 'h'

Suggested-by: Ingo Molnar <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Don Zickus <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
9 years agoperf hists browser: Honour the help line provided by builtin-{top,report}.c
Arnaldo Carvalho de Melo [Fri, 19 Jun 2015 20:30:20 +0000 (17:30 -0300)]
perf hists browser: Honour the help line provided by builtin-{top,report}.c

The hists_browser was replacing whatever helpline provided by 'top' or
'report' with a static "Press '?' for help on key bindings", fix it.

Now the message passed by top appears at the bottom of the screen:

"For a higher level overview, try: perf top --sort comm,dso"

As well the message that will be added when the user presses 'f' to
disable the events, something along the lines of "press f again to
re-enable...".

Cc: Adrian Hunter <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Don Zickus <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
9 years agoperf hists browser: Do not exit when 'f' is pressed in 'report' mode
Arnaldo Carvalho de Melo [Fri, 19 Jun 2015 19:59:43 +0000 (16:59 -0300)]
perf hists browser: Do not exit when 'f' is pressed in 'report' mode

The 'f' hotkey is only used when in 'top', dynamic mode, to
enable/disable events, currently not making sense in the 'report',
static mode, where we can't go from showing the histogram entries
created from a perf.data file to adding more events after recreating the
evlist created from the perf.data file, albeit possible, this is not
implemented right now.

Cc: Adrian Hunter <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Don Zickus <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
9 years agoperf top: Replace CTRL+z with 'f' as hotkey for enable/disable events
Arnaldo Carvalho de Melo [Fri, 19 Jun 2015 19:56:04 +0000 (16:56 -0300)]
perf top: Replace CTRL+z with 'f' as hotkey for enable/disable events

I.e. 'freeze'/'unfreeze', this is because CTRL+z has a well known
action, i.e. suspend the app, perf needs to follow that convention, that
will be done on a separate patch, tho.

Cc: Adrian Hunter <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Don Zickus <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
9 years agoperf tools: Fix build breakage if prefix= is specified
Lukas Wunner [Thu, 18 Jun 2015 11:00:32 +0000 (13:00 +0200)]
perf tools: Fix build breakage if prefix= is specified

Invoking Makefile.perf with prefix= breaks the build since Makefile.perf
hands that variable down to Makefile.build where it overrides

    prefix       := $(subst ./,,$(OUTPUT)$(dir)/)

leading to errors like this:

    No rule to make target '/usrabspath.o', needed by '/usrlibperf-in.o'

Signed-off-by: Lukas Wunner <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Cc: David Ahern <[email protected]>
Fixes: c819e2cf2eb6f65d3208d195d7a0edef6108d5
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
9 years agoperf annotate: Rename source_line_percent to source_line_samples
Arnaldo Carvalho de Melo [Fri, 19 Jun 2015 19:36:12 +0000 (16:36 -0300)]
perf annotate: Rename source_line_percent to source_line_samples

To better reflect the purpose of this struct, that is to hold
info about samples, its total number and is percentage.

Cc: Martin Liska <[email protected]>
Cc: Jiri Olsa <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
9 years agoperf annotate: Display total number of samples with --show-total-period
Martin Liška [Fri, 19 Jun 2015 19:10:43 +0000 (16:10 -0300)]
perf annotate: Display total number of samples with --show-total-period

To compare two records on an instruction base, with --show-total-period
option provided, display total number of samples that belong to a line
in assembly language.

New hot key 't' is introduced for 'perf annotate' TUI.

Signed-off-by: Martin Liska <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
9 years agoperf tools: Ensure thread-stack is flushed
Adrian Hunter [Fri, 29 May 2015 13:33:30 +0000 (16:33 +0300)]
perf tools: Ensure thread-stack is flushed

The thread-stack represents a thread's current stack.  When a thread
exits there can still be many functions on the stack e.g. exit() can be
called many levels deep, so all the callers will never return.  To get
that information output, the thread-stack must be flushed.

Previously it was assumed the thread-stack would be flushed when the
struct thread was deleted.  With thread ref-counting it is no longer
clear when that will be, if ever. So instead explicitly flush all the
thread-stacks at the end of a session.

Signed-off-by: Adrian Hunter <[email protected]>
Cc: Jiri Olsa <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
9 years agoMerge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 19 Jun 2015 17:36:50 +0000 (07:36 -1000)]
Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux

Pull clk fixes from Michael Turquette:
 "Very late clk regression fixes for the ARM-based AT91 platform.

  These went unnoticed by me until recently, hence the late pull
  request"

* tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
  clk: at91: fix h32mx prototype inclusion in pmc header
  clk: at91: trivial: typo in peripheral clock description
  clk: at91: fix PERIPHERAL_MAX_SHIFT definition
  clk: at91: pll: fix input range validity check

9 years agoMerge tag 'sound-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Fri, 19 Jun 2015 17:34:14 +0000 (07:34 -1000)]
Merge tag 'sound-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Nothing looks scary, just a few usual HD-audio regression fixes and
  fixup, in addition to a minor Kconfig dependency fix for the old MIPS
  drivers"

* tag 'sound-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Fix unused label skip_i915
  ALSA: hda - Fix noisy outputs on Dell XPS13 (2015 model)
  ALSA: mips: let SND_SGI_O2 select SND_PCM
  ALSA: hda - Fix audio crackles on Dell Latitude E7x40
  ALSA: hda - adding a DAC/pin preference map for a HP Envy TS machine

9 years agoregulator: qcom_spmi: Fix calculating number of voltages
Axel Lin [Thu, 18 Jun 2015 00:50:39 +0000 (08:50 +0800)]
regulator: qcom_spmi: Fix calculating number of voltages

n /= range->step_uV + 1; is equivalent to n /= (range->step_uV + 1);
which is wrong. Fix it.

Signed-off-by: Axel Lin <[email protected]>
Acked-by: Stephen Boyd <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
9 years agoarm64: use private ratelimit state along with show_unhandled_signals
Vladimir Murzin [Fri, 19 Jun 2015 14:28:03 +0000 (15:28 +0100)]
arm64: use private ratelimit state along with show_unhandled_signals

printk_ratelimit() shares the ratelimiting state with other callers what
may lead to scenarios where at the time we want to print out debug
information we already limited, so nothing appears in the dmesg - this
makes exception-trace quite poor helper in debugging.

Additionally, we have imbalance with some messages limited with global
ratelimit state and other messages limited with their private state
defined via pr_*_ratelimited().

To address this inconsistency show_unhandled_signals_ratelimited()
macro is introduced and caller sites are converted to use it.

Signed-off-by: Vladimir Murzin <[email protected]>
Signed-off-by: Catalin Marinas <[email protected]>
9 years agoarm64: show unhandled SP/PC alignment faults
Vladimir Murzin [Fri, 19 Jun 2015 14:28:16 +0000 (15:28 +0100)]
arm64: show unhandled SP/PC alignment faults

Report unhandled SP/PC alignment faults if the show_unhandled_signals
variable is set (via /proc/sys/debug/exception-trace).

Signed-off-by: Vladimir Murzin <[email protected]>
Signed-off-by: Catalin Marinas <[email protected]>
9 years agoMerge branches 'arm/rockchip', 'arm/exynos', 'arm/smmu', 'x86/vt-d', 'x86/amd', ...
Joerg Roedel [Fri, 19 Jun 2015 15:17:47 +0000 (17:17 +0200)]
Merge branches 'arm/rockchip', 'arm/exynos', 'arm/smmu', 'x86/vt-d', 'x86/amd', 'default-domains' and 'core' into next

9 years agoiommu/amd: Handle large pages correctly in free_pagetable
Joerg Roedel [Thu, 18 Jun 2015 08:48:34 +0000 (10:48 +0200)]
iommu/amd: Handle large pages correctly in free_pagetable

Make sure that we are skipping over large PTEs while walking
the page-table tree.

Cc: [email protected]
Fixes: 5c34c403b723 ("iommu/amd: Fix memory leak in free_pagetable")
Signed-off-by: Joerg Roedel <[email protected]>
9 years agoKVM: x86/vPMU: reorder PMU functions
Wei Huang [Fri, 19 Jun 2015 13:51:47 +0000 (15:51 +0200)]
KVM: x86/vPMU: reorder PMU functions

Keep called functions closer to their callers, and init/destroy
functions next to each other.

Signed-off-by: Paolo Bonzini <[email protected]>
9 years agoKVM: x86/vPMU: whitespace and stylistic adjustments in PMU code
Wei Huang [Fri, 19 Jun 2015 12:15:28 +0000 (14:15 +0200)]
KVM: x86/vPMU: whitespace and stylistic adjustments in PMU code

Signed-off-by: Wei Huang <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
9 years agoKVM: x86/vPMU: use the new macros to go between PMC, PMU and VCPU
Wei Huang [Fri, 19 Jun 2015 12:00:33 +0000 (14:00 +0200)]
KVM: x86/vPMU: use the new macros to go between PMC, PMU and VCPU

Signed-off-by: Wei Huang <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
9 years agoKVM: x86/vPMU: introduce pmu.h header
Wei Huang [Fri, 19 Jun 2015 11:54:23 +0000 (13:54 +0200)]
KVM: x86/vPMU: introduce pmu.h header

This will be used for private function used by AMD- and Intel-specific
PMU implementations.

Signed-off-by: Wei Huang <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
9 years agoKVM: x86/vPMU: rename a few PMU functions
Wei Huang [Fri, 19 Jun 2015 11:44:45 +0000 (13:44 +0200)]
KVM: x86/vPMU: rename a few PMU functions

Before introducing a pmu.h header for them, make the naming more
consistent.

Signed-off-by: Paolo Bonzini <[email protected]>
9 years agoKVM: MTRR: do not map huge page for non-consistent range
Xiao Guangrong [Mon, 15 Jun 2015 08:55:35 +0000 (16:55 +0800)]
KVM: MTRR: do not map huge page for non-consistent range

Based on Intel's SDM, mapping huge page which do not have consistent
memory cache for each 4k page will cause undefined behavior

In order to avoiding this kind of undefined behavior, we force to use
4k pages under this case

Signed-off-by: Xiao Guangrong <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
9 years agoKVM: MTRR: simplify kvm_mtrr_get_guest_memory_type
Xiao Guangrong [Mon, 15 Jun 2015 08:55:34 +0000 (16:55 +0800)]
KVM: MTRR: simplify kvm_mtrr_get_guest_memory_type

mtrr_for_each_mem_type() is ready now, use it to simplify
kvm_mtrr_get_guest_memory_type()

Signed-off-by: Xiao Guangrong <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
9 years agoKVM: MTRR: introduce mtrr_for_each_mem_type
Xiao Guangrong [Mon, 15 Jun 2015 08:55:33 +0000 (16:55 +0800)]
KVM: MTRR: introduce mtrr_for_each_mem_type

It walks all MTRRs and gets all the memory cache type setting for the
specified range also it checks if the range is fully covered by MTRRs

Signed-off-by: Xiao Guangrong <[email protected]>
[Adjust for range_size->range_shift change. - Paolo]
Signed-off-by: Paolo Bonzini <[email protected]>
9 years agoKVM: MTRR: introduce fixed_mtrr_addr_* functions
Xiao Guangrong [Mon, 15 Jun 2015 08:55:32 +0000 (16:55 +0800)]
KVM: MTRR: introduce fixed_mtrr_addr_* functions

Two functions are introduced:
- fixed_mtrr_addr_to_seg() translates the address to the fixed
  MTRR segment

- fixed_mtrr_addr_seg_to_range_index() translates the address to
  the index of kvm_mtrr.fixed_ranges[]

They will be used in the later patch

Signed-off-by: Xiao Guangrong <[email protected]>
[Adjust for range_size->range_shift change. - Paolo]
Signed-off-by: Paolo Bonzini <[email protected]>
9 years agoKVM: MTRR: sort variable MTRRs
Xiao Guangrong [Mon, 15 Jun 2015 08:55:31 +0000 (16:55 +0800)]
KVM: MTRR: sort variable MTRRs

Sort all valid variable MTRRs based on its base address, it will help us to
check a range to see if it's fully contained in variable MTRRs

Signed-off-by: Xiao Guangrong <[email protected]>
[Fix list insertion sort, simplify var_mtrr_range_is_valid to just
 test the V bit. - Paolo]
Signed-off-by: Paolo Bonzini <[email protected]>
9 years agoKVM: MTRR: introduce var_mtrr_range
Xiao Guangrong [Mon, 15 Jun 2015 08:55:30 +0000 (16:55 +0800)]
KVM: MTRR: introduce var_mtrr_range

It gets the range for the specified variable MTRR

Signed-off-by: Xiao Guangrong <[email protected]>
[Simplify boolean operations. - Paolo]
Signed-off-by: Paolo Bonzini <[email protected]>
9 years agoKVM: MTRR: introduce fixed_mtrr_segment table
Xiao Guangrong [Mon, 15 Jun 2015 08:55:29 +0000 (16:55 +0800)]
KVM: MTRR: introduce fixed_mtrr_segment table

This table summarizes the information of fixed MTRRs and introduce some APIs
to abstract its operation which helps us to clean up the code and will be
used in later patches

Signed-off-by: Xiao Guangrong <[email protected]>
[Change range_size to range_shift, in order to avoid udivdi3 errors.
 - Paolo]
Signed-off-by: Paolo Bonzini <[email protected]>
9 years agoKVM: MTRR: improve kvm_mtrr_get_guest_memory_type
Xiao Guangrong [Mon, 15 Jun 2015 08:55:28 +0000 (16:55 +0800)]
KVM: MTRR: improve kvm_mtrr_get_guest_memory_type

 - kvm_mtrr_get_guest_memory_type() only checks one page in MTRRs so
   that it's unnecessary to check to see if the range is partially
   covered in MTRR

 - optimize the check of overlap memory type and add some comments
   to explain the precedence

Signed-off-by: Xiao Guangrong <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
9 years agoKVM: MTRR: do not split 64 bits MSR content
Xiao Guangrong [Mon, 15 Jun 2015 08:55:27 +0000 (16:55 +0800)]
KVM: MTRR: do not split 64 bits MSR content

Variable MTRR MSRs are 64 bits which are directly accessed with full length,
no reason to split them to two 32 bits

Signed-off-by: Xiao Guangrong <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
9 years agoKVM: MTRR: clean up mtrr default type
Xiao Guangrong [Mon, 15 Jun 2015 08:55:26 +0000 (16:55 +0800)]
KVM: MTRR: clean up mtrr default type

Drop kvm_mtrr->enable, omit the decode/code workload and get rid of
all the hard code

Signed-off-by: Xiao Guangrong <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
9 years agoKVM: MTRR: exactly define the size of variable MTRRs
Xiao Guangrong [Mon, 15 Jun 2015 08:55:25 +0000 (16:55 +0800)]
KVM: MTRR: exactly define the size of variable MTRRs

Only KVM_NR_VAR_MTRR variable MTRRs are available in KVM guest

Signed-off-by: Xiao Guangrong <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
9 years agoKVM: MTRR: remove mtrr_state.have_fixed
Xiao Guangrong [Mon, 15 Jun 2015 08:55:24 +0000 (16:55 +0800)]
KVM: MTRR: remove mtrr_state.have_fixed

vMTRR does not depend on any host MTRR feature and fixed MTRRs have always
been implemented, so drop this field

Signed-off-by: Xiao Guangrong <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
9 years agoKVM: MTRR: handle MSR_MTRRcap in kvm_mtrr_get_msr
Xiao Guangrong [Mon, 15 Jun 2015 08:55:23 +0000 (16:55 +0800)]
KVM: MTRR: handle MSR_MTRRcap in kvm_mtrr_get_msr

MSR_MTRRcap is a MTRR msr so move the handler to the common place, also
add some comments to make the hard code more readable

Signed-off-by: Xiao Guangrong <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
9 years agoKVM: x86: move MTRR related code to a separate file
Xiao Guangrong [Mon, 15 Jun 2015 08:55:22 +0000 (16:55 +0800)]
KVM: x86: move MTRR related code to a separate file

MTRR code locates in x86.c and mmu.c so that move them to a separate file to
make the organization more clearer and it will be the place where we fully
implement vMTRR

Signed-off-by: Xiao Guangrong <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
9 years agoKVM: x86: fix CR0.CD virtualization
Xiao Guangrong [Mon, 15 Jun 2015 08:55:21 +0000 (16:55 +0800)]
KVM: x86: fix CR0.CD virtualization

Currently, CR0.CD is not checked when we virtualize memory cache type for
noncoherent_dma guests, this patch fixes it by :

- setting UC for all memory if CR0.CD = 1
- zapping all the last sptes in MMU if CR0.CD is changed

Signed-off-by: Xiao Guangrong <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
9 years agoKVM: nSVM: Check for NRIPS support before updating control field
Bandan Das [Thu, 11 Jun 2015 06:05:33 +0000 (02:05 -0400)]
KVM: nSVM: Check for NRIPS support before updating control field

If hardware doesn't support DecodeAssist - a feature that provides
more information about the intercept in the VMCB, KVM decodes the
instruction and then updates the next_rip vmcb control field.
However, NRIP support itself depends on cpuid Fn8000_000A_EDX[NRIPS].
Since skip_emulated_instruction() doesn't verify nrip support
before accepting control.next_rip as valid, avoid writing this
field if support isn't present.

Signed-off-by: Bandan Das <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
9 years agoKVM: fix checkpatch.pl errors in kvm/coalesced_mmio.h
Kevin Mulvey [Tue, 16 Jun 2015 11:34:00 +0000 (07:34 -0400)]
KVM: fix checkpatch.pl errors in kvm/coalesced_mmio.h

Tabs rather than spaces

Signed-off-by: Kevin Mulvey <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
9 years agoKVM: fix checkpatch.pl errors in kvm/async_pf.h
Kevin Mulvey [Tue, 16 Jun 2015 11:33:59 +0000 (07:33 -0400)]
KVM: fix checkpatch.pl errors in kvm/async_pf.h

fix brace spacing

Signed-off-by: Kevin Mulvey <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
9 years agokvm: irqchip: Break up high order allocations of kvm_irq_routing_table
Joerg Roedel [Fri, 8 May 2015 12:31:44 +0000 (14:31 +0200)]
kvm: irqchip: Break up high order allocations of kvm_irq_routing_table

The allocation size of the kvm_irq_routing_table depends on
the number of irq routing entries because they are all
allocated with one kzalloc call.

When the irq routing table gets bigger this requires high
order allocations which fail from time to time:

qemu-kvm: page allocation failure: order:4, mode:0xd0

This patch fixes this issue by breaking up the allocation of
the table and its entries into individual kzalloc calls.
These could all be satisfied with order-0 allocations, which
are less likely to fail.

The downside of this change is the lower performance, because
of more calls to kzalloc. But given how often kvm_set_irq_routing
is called in the lifetime of a guest, it doesn't really
matter much.

Signed-off-by: Joerg Roedel <[email protected]>
[Avoid sparse warning through rcu_access_pointer. - Paolo]
Signed-off-by: Paolo Bonzini <[email protected]>
9 years agoMerge tag 'kvm-arm-for-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm...
Paolo Bonzini [Fri, 19 Jun 2015 15:15:24 +0000 (17:15 +0200)]
Merge tag 'kvm-arm-for-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD

KVM/ARM changes for v4.2:

- Proper guest time accounting
- FP access fix for 32bit
- The usual pile of GIC fixes
- PSCI fixes
- Random cleanups

9 years agoMerge branch 'ccf/atmel-fixes-for-4.1' of https://github.com/bbrezillon/linux-at91...
Michael Turquette [Fri, 19 Jun 2015 14:37:14 +0000 (07:37 -0700)]
Merge branch 'ccf/atmel-fixes-for-4.1' of https://github.com/bbrezillon/linux-at91 into clk-fixes

9 years agocrypto: marvell/cesa - add DT bindings documentation
Boris BREZILLON [Thu, 18 Jun 2015 13:46:30 +0000 (15:46 +0200)]
crypto: marvell/cesa - add DT bindings documentation

Add DT bindings documentation for the new marvell-cesa driver.

Signed-off-by: Boris Brezillon <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
9 years agocrypto: marvell/cesa - add support for Kirkwood and Dove SoCs
Arnaud Ebalard [Thu, 18 Jun 2015 13:46:29 +0000 (15:46 +0200)]
crypto: marvell/cesa - add support for Kirkwood and Dove SoCs

Add the Kirkwood and Dove SoC descriptions, and control the allhwsupport
module parameter to avoid probing the CESA IP when the old CESA driver is
enabled (unless it is explicitly requested to do so).

Signed-off-by: Arnaud Ebalard <[email protected]>
Signed-off-by: Boris Brezillon <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
9 years agocrypto: marvell/cesa - add support for Orion SoCs
Boris BREZILLON [Thu, 18 Jun 2015 13:46:28 +0000 (15:46 +0200)]
crypto: marvell/cesa - add support for Orion SoCs

Add the Orion SoC description, and select this implementation by default
to support non-DT probing: Orion is the only platform where non-DT boards
are declaring the CESA block.

Control the allhwsupport module parameter to avoid probing the CESA IP when
the old CESA driver is enabled (unless it is explicitly requested to do
so).

Signed-off-by: Boris Brezillon <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
9 years agocrypto: marvell/cesa - add allhwsupport module parameter
Boris BREZILLON [Thu, 18 Jun 2015 13:46:27 +0000 (15:46 +0200)]
crypto: marvell/cesa - add allhwsupport module parameter

The old and new marvell CESA drivers both support Orion and Kirkwood SoCs.
Add a module parameter to choose whether these SoCs should be attached to
the new or the old driver.

The default policy is to keep attaching those IPs to the old driver if it
is enabled, until we decide the new CESA driver is stable/secure enough.

Signed-off-by: Boris Brezillon <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
9 years agocrypto: marvell/cesa - add support for all armada SoCs
Boris BREZILLON [Thu, 18 Jun 2015 13:46:26 +0000 (15:46 +0200)]
crypto: marvell/cesa - add support for all armada SoCs

Add CESA IP description for all the missing armada SoCs (XP, 375 and 38x).

Signed-off-by: Boris Brezillon <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
9 years agocrypto: marvell/cesa - add SHA256 support
Arnaud Ebalard [Thu, 18 Jun 2015 13:46:25 +0000 (15:46 +0200)]
crypto: marvell/cesa - add SHA256 support

Add support for SHA256 operations.

Signed-off-by: Arnaud Ebalard <[email protected]>
Signed-off-by: Boris Brezillon <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
This page took 0.110085 seconds and 4 git commands to generate.