]> Git Repo - linux.git/log
linux.git
11 years agoALSA: lx6464es: Fix pointer cast compile warnings
Takashi Iwai [Wed, 6 Nov 2013 16:54:55 +0000 (17:54 +0100)]
ALSA: lx6464es: Fix pointer cast compile warnings

The warnings are really harmless but annoying.  Since they are only
about debug prints, and it's at most 32bit DMA, let's just cast to
unsigned long.

  sound/pci/lx6464es/lx6464es.c:457:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  sound/pci/lx6464es/lx_core.c:1195:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

Signed-off-by: Takashi Iwai <[email protected]>
11 years agoALSA: cmi8328: Fix compile warnings without CONFIG_PM
Takashi Iwai [Wed, 6 Nov 2013 16:54:02 +0000 (17:54 +0100)]
ALSA: cmi8328: Fix compile warnings without CONFIG_PM

Just add an ifdef CONFIG_PM to shut up the warnings:

  sound/isa/cmi8328.c:129:13: warning: ‘snd_cmi8328_cfg_save’ defined but not used [-Wunused-function]
  sound/isa/cmi8328.c:136:13: warning: ‘snd_cmi8328_cfg_restore’ defined but not used [-Wunused-function]

Signed-off-by: Takashi Iwai <[email protected]>
11 years agoMIPS: remove duplicate define
Michael Opdenacker [Wed, 23 Oct 2013 10:37:44 +0000 (12:37 +0200)]
MIPS: remove duplicate define

This patch removes a duplicate define from
arch/mips/boot/ecoff.h

Signed-off-by: Michael Opdenacker <[email protected]>
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/6081/
Signed-off-by: Ralf Baechle <[email protected]>
11 years agos390/scm_blk: fix endless loop for requests != REQ_TYPE_FS
Steffen Maier [Tue, 5 Nov 2013 11:59:46 +0000 (12:59 +0100)]
s390/scm_blk: fix endless loop for requests != REQ_TYPE_FS

The while loop only peeks at the top request in the queue but does
not yet consume it. Since we only handle fs requests, we need to
dequeue and complete all other request command types with error
just in case we would ever receive such an unforeseen request.

Signed-off-by: Steffen Maier <[email protected]>
Signed-off-by: Sebastian Ott <[email protected]>
Signed-off-by: Martin Schwidefsky <[email protected]>
11 years agoarm64: locks: Remove CONFIG_GENERIC_LOCKBREAK
Catalin Marinas [Wed, 6 Nov 2013 11:42:41 +0000 (11:42 +0000)]
arm64: locks: Remove CONFIG_GENERIC_LOCKBREAK

Commit 52ea2a560a9d (arm64: locks: introduce ticket-based spinlock
implementation) introduces the arch_spin_is_contended() function making
CONFIG_GENERIC_LOCKBREAK unnecessary.

Signed-off-by: Catalin Marinas <[email protected]>
Acked-by: Will Deacon <[email protected]>
11 years agosched: Remove unnecessary iteration over sched domains to update nr_busy_cpus
Preeti U Murthy [Wed, 30 Oct 2013 03:12:52 +0000 (08:42 +0530)]
sched: Remove unnecessary iteration over sched domains to update nr_busy_cpus

nr_busy_cpus parameter is used by nohz_kick_needed() to find out the
number of busy cpus in a sched domain which has SD_SHARE_PKG_RESOURCES
flag set.  Therefore instead of updating nr_busy_cpus at every level
of sched domain, since it is irrelevant, we can update this parameter
only at the parent domain of the sd which has this flag set. Introduce
a per-cpu parameter sd_busy which represents this parent domain.

In nohz_kick_needed() we directly query the nr_busy_cpus parameter
associated with the groups of sd_busy.

By associating sd_busy with the highest domain which has
SD_SHARE_PKG_RESOURCES flag set, we cover all lower level domains
which could have this flag set and trigger nohz_idle_balancing if any
of the levels have more than one busy cpu.

sd_busy is irrelevant for asymmetric load balancing. However sd_asym
has been introduced to represent the highest sched domain which has
SD_ASYM_PACKING flag set so that it can be queried directly when
required.

While we are at it, we might as well change the nohz_idle parameter to
be updated at the sd_busy domain level alone and not the base domain
level of a CPU.  This will unify the concept of busy cpus at just one
level of sched domain where it is currently used.

Signed-off-by: Preeti U Murthy<[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
11 years agosched: Fix asymmetric scheduling for POWER7
Vaidyanathan Srinivasan [Wed, 30 Oct 2013 03:12:42 +0000 (08:42 +0530)]
sched: Fix asymmetric scheduling for POWER7

Asymmetric scheduling within a core is a scheduler loadbalancing
feature that is triggered when SD_ASYM_PACKING flag is set.  The goal
for the load balancer is to move tasks to lower order idle SMT threads
within a core on a POWER7 system.

In nohz_kick_needed(), we intend to check if our sched domain (core)
is completely busy or we have idle cpu.

The following check for SD_ASYM_PACKING:

    (cpumask_first_and(nohz.idle_cpus_mask, sched_domain_span(sd)) < cpu)

already covers the case of checking if the domain has an idle cpu,
because cpumask_first_and() will not yield any set bits if this domain
has no idle cpu.

Hence, nr_busy check against group weight can be removed.

Reported-by: Michael Neuling <[email protected]>
Signed-off-by: Vaidyanathan Srinivasan <[email protected]>
Signed-off-by: Preeti U Murthy <[email protected]>
Tested-by: Michael Neuling <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
11 years agoperf/x86/intel: Add Ivy Bridge-EP uncore IRP box support
Yan, Zheng [Thu, 31 Oct 2013 05:36:55 +0000 (13:36 +0800)]
perf/x86/intel: Add Ivy Bridge-EP uncore IRP box support

Unlike other uncore boxes, IRP boxes live in PCI buses with no UBOX
device. For PCI bus without UBOX device, we find the next bus that
has UBOX device and use its 'bus to socket' mapping.

Besides the counter/control registers in IRP boxes are not properly
aligned.

Signed-off-by: Yan, Zheng <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: [email protected]
Cc: "Yan Zheng" <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
11 years agoperf/x86/intel/uncore: Add filter support for IvyBridge-EP QPI boxes
Yan, Zheng [Thu, 31 Oct 2013 05:36:54 +0000 (13:36 +0800)]
perf/x86/intel/uncore: Add filter support for IvyBridge-EP QPI boxes

The encoding for filter registers of IvyBridge-EP uncore QPI boxes is
completely the same as SandyBridge-EP.

Signed-off-by: Yan, Zheng <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: [email protected]
Cc: "Yan Zheng" <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
11 years agoperf: Factor out strncpy() in perf_event_mmap_event()
Oleg Nesterov [Thu, 17 Oct 2013 18:24:17 +0000 (20:24 +0200)]
perf: Factor out strncpy() in perf_event_mmap_event()

While this is really minor, but strncpy() does the unnecessary
zero-padding till the end of tmp[16] and it is called every time
we are going to use the string literal.

Turn these strncpy()'s into the single strlcpy() under the new
label, saves 72 bytes.

Signed-off-by: Oleg Nesterov <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
11 years agotools/perf: Add required memory barriers
Peter Zijlstra [Wed, 30 Oct 2013 10:42:46 +0000 (11:42 +0100)]
tools/perf: Add required memory barriers

To match patch bf378d341e48 ("perf: Fix perf ring buffer memory
ordering") change userspace to also adhere to the ordering outlined.

Signed-off-by: Peter Zijlstra <[email protected]>
Cc: Michael Neuling <[email protected]>
Cc: "Paul E. McKenney" <[email protected]>
Cc: [email protected]
Cc: Vince Weaver <[email protected]>
Cc: Victor Kaplansky <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Anton Blanchard <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Cc: Michael Ellerman <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
11 years agoperf: Fix arch_perf_out_copy_user default
Peter Zijlstra [Wed, 30 Oct 2013 20:16:22 +0000 (21:16 +0100)]
perf: Fix arch_perf_out_copy_user default

The arch_perf_output_copy_user() default of
__copy_from_user_inatomic() returns bytes not copied, while all other
argument functions given DEFINE_OUTPUT_COPY() return bytes copied.

Since copy_from_user_nmi() is the odd duck out by returning bytes
copied where all other *copy_{to,from}* functions return bytes not
copied, change it over and ammend DEFINE_OUTPUT_COPY() to expect bytes
not copied.

Oddly enough DEFINE_OUTPUT_COPY() already returned bytes not copied
while expecting its worker functions to return bytes copied.

Signed-off-by: Peter Zijlstra <[email protected]>
Acked-by: [email protected]
Cc: Frederic Weisbecker <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
11 years agoperf: Update a stale comment
Peter Zijlstra [Thu, 31 Oct 2013 16:41:23 +0000 (17:41 +0100)]
perf: Update a stale comment

Signed-off-by: Peter Zijlstra <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Michael Neuling <[email protected]>
Cc: "Paul E. McKenney" <[email protected]>
Cc: [email protected]
Cc: Vince Weaver <[email protected]>
Cc: Victor Kaplansky <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Anton Blanchard <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
11 years agoperf: Optimize perf_output_begin() -- address calculation
Peter Zijlstra [Thu, 31 Oct 2013 16:36:25 +0000 (17:36 +0100)]
perf: Optimize perf_output_begin() -- address calculation

Rewrite the handle address calculation code to be clearer.

Saves 8 bytes on x86_64-defconfig.

Signed-off-by: Peter Zijlstra <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Michael Neuling <[email protected]>
Cc: "Paul E. McKenney" <[email protected]>
Cc: [email protected]
Cc: Vince Weaver <[email protected]>
Cc: Victor Kaplansky <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Anton Blanchard <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
11 years agoperf: Optimize perf_output_begin() -- lost_event case
Peter Zijlstra [Thu, 31 Oct 2013 16:29:29 +0000 (17:29 +0100)]
perf: Optimize perf_output_begin() -- lost_event case

Avoid touching the lost_event and sample_data cachelines twince. Its
not like we end up doing less work, but it might help to keep all
accesses to these cachelines in one place.

Due to code shuffle, this looses 4 bytes on x86_64-defconfig.

Signed-off-by: Peter Zijlstra <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Michael Neuling <[email protected]>
Cc: "Paul E. McKenney" <[email protected]>
Cc: [email protected]
Cc: Vince Weaver <[email protected]>
Cc: Victor Kaplansky <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Anton Blanchard <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
11 years agoperf: Optimize perf_output_begin()
Peter Zijlstra [Thu, 31 Oct 2013 16:25:38 +0000 (17:25 +0100)]
perf: Optimize perf_output_begin()

There's no point in re-doing the memory-barrier when we fail the
cmpxchg(). Also placing it after the space reservation loop makes it
clearer it only separates the userpage->tail read from the data
stores.

Signed-off-by: Peter Zijlstra <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Michael Neuling <[email protected]>
Cc: "Paul E. McKenney" <[email protected]>
Cc: [email protected]
Cc: Vince Weaver <[email protected]>
Cc: Victor Kaplansky <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Anton Blanchard <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
11 years agoperf: Add unlikely() to the ring-buffer code
Peter Zijlstra [Thu, 31 Oct 2013 16:20:25 +0000 (17:20 +0100)]
perf: Add unlikely() to the ring-buffer code

Add unlikely() annotations to 'slow' paths:

When having a sampling event but no output buffer; you have bigger
issues -- also the bail is still faster than actually doing the work.

When having a sampling event but a control page only buffer, you have
bigger issues -- again the bail is still faster than actually doing
work.

Optimize for the case where you're not loosing events -- again, not
doing the work is still faster but make sure that when you have to
actually do work its as fast as possible.

The typical watermark is 1/2 the buffer size, so most events will not
take this path.

Shrinks perf_output_begin() by 16 bytes on x86_64-defconfig.

Signed-off-by: Peter Zijlstra <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Michael Neuling <[email protected]>
Cc: "Paul E. McKenney" <[email protected]>
Cc: [email protected]
Cc: Vince Weaver <[email protected]>
Cc: Victor Kaplansky <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Anton Blanchard <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
11 years agoperf: Simplify the ring-buffer code
Peter Zijlstra [Thu, 31 Oct 2013 09:19:59 +0000 (10:19 +0100)]
perf: Simplify the ring-buffer code

By using CIRC_SPACE() we can obviate the need for perf_output_space().

Shrinks the size of perf_output_begin() by 17 bytes on
x86_64-defconfig.

Signed-off-by: Peter Zijlstra <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Michael Neuling <[email protected]>
Cc: "Paul E. McKenney" <[email protected]>
Cc: [email protected]
Cc: Vince Weaver <[email protected]>
Cc: Victor Kaplansky <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Anton Blanchard <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
11 years agoALSA: HDA - Limit mic boost and add mute LED for an HP machine
David Henningsson [Wed, 6 Nov 2013 10:20:01 +0000 (11:20 +0100)]
ALSA: HDA - Limit mic boost and add mute LED for an HP machine

This machine has a mute LED as well as a noisy internal mic. Hence it needs
quirks for both limiting the mic boost as well as enabling the LED.

BugLink: https://bugs.launchpad.net/bugs/1248476
Signed-off-by: David Henningsson <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
11 years agoASoC: rcar: remove un-needed select from Kconfig
Kuninori Morimoto [Wed, 6 Nov 2013 08:06:45 +0000 (00:06 -0800)]
ASoC: rcar: remove un-needed select from Kconfig

config RCAR_CLK_ADG is not exist

Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
11 years agometag: handle low level kicks directly
James Hogan [Tue, 5 Nov 2013 14:42:03 +0000 (14:42 +0000)]
metag: handle low level kicks directly

Kick interrupts trigger the LWK (low level kick) signal, usually handled
by the __TBIDoStdLWK() function which is the only handler inherited from
the bootloader. The LWK signal is converted either to a SWK (plain
software kick) or a SWS (software kick with an attached message).

Linux has kick_handler() to handle SWK and call registered kick handlers
(IPIs and inter-thread comms), but SWS is as far as I'm aware unused
with Linux.

Therefore remove that abstraction and have Linux handle LWK directly.
This will reduce kick latency slightly, and reduce our dependence on the
bootloader, which makes it easier to directly boot a kernel in QEMU
(particularly for SMP).

Signed-off-by: James Hogan <[email protected]>
11 years agoASoC: wm9713: Use WARN_ON() instead of BUG_ON()
Takashi Iwai [Tue, 5 Nov 2013 17:39:59 +0000 (18:39 +0100)]
ASoC: wm9713: Use WARN_ON() instead of BUG_ON()

Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
11 years agoASoC: wm8904: Use WARN_ON() instead of BUG_ON()
Takashi Iwai [Tue, 5 Nov 2013 17:39:58 +0000 (18:39 +0100)]
ASoC: wm8904: Use WARN_ON() instead of BUG_ON()

Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
11 years agoASoC: wm8900: Use WARN_ON() instead of BUG_ON()
Takashi Iwai [Tue, 5 Nov 2013 17:39:57 +0000 (18:39 +0100)]
ASoC: wm8900: Use WARN_ON() instead of BUG_ON()

Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
11 years agoASoC: wm8776: Use WARN_ON() instead of BUG_ON()
Takashi Iwai [Tue, 5 Nov 2013 17:39:56 +0000 (18:39 +0100)]
ASoC: wm8776: Use WARN_ON() instead of BUG_ON()

Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
11 years agoASoC: wm5100: Use WARN_ON() instead of BUG_ON()
Takashi Iwai [Tue, 5 Nov 2013 17:39:55 +0000 (18:39 +0100)]
ASoC: wm5100: Use WARN_ON() instead of BUG_ON()

Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
11 years agoASoC: wm8580: Use WARN() instead of BUG_ON()
Takashi Iwai [Tue, 5 Nov 2013 17:39:54 +0000 (18:39 +0100)]
ASoC: wm8580: Use WARN() instead of BUG_ON()

Use WARN() instead.

Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
11 years agoASoC: wm2000: Use WARN_ON() instead of BUG_ON()
Takashi Iwai [Tue, 5 Nov 2013 17:39:53 +0000 (18:39 +0100)]
ASoC: wm2000: Use WARN_ON() instead of BUG_ON()

Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
11 years agoASoC: wm0010: Use WARN_ON() instead of BUG_ON()
Takashi Iwai [Tue, 5 Nov 2013 17:39:52 +0000 (18:39 +0100)]
ASoC: wm0010: Use WARN_ON() instead of BUG_ON()

Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
11 years agoASoC: tpa6130a2: Use WARN_ON() instead of BUG_ON()
Takashi Iwai [Tue, 5 Nov 2013 17:39:51 +0000 (18:39 +0100)]
ASoC: tpa6130a2: Use WARN_ON() instead of BUG_ON()

Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
11 years agoASoC: max98095: Use WARN_ON() instead of BUG_ON()
Takashi Iwai [Tue, 5 Nov 2013 17:39:50 +0000 (18:39 +0100)]
ASoC: max98095: Use WARN_ON() instead of BUG_ON()

Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
11 years agoASoC: max98088: Use WARN_ON() instead of BUG_ON()
Takashi Iwai [Tue, 5 Nov 2013 17:39:49 +0000 (18:39 +0100)]
ASoC: max98088: Use WARN_ON() instead of BUG_ON()

Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
11 years agoASoC: blackfin: Use WARN_ON() instead of BUG_ON()
Takashi Iwai [Tue, 5 Nov 2013 17:39:48 +0000 (18:39 +0100)]
ASoC: blackfin: Use WARN_ON() instead of BUG_ON()

Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
11 years agoarm64: KVM: vgic: byteswap GICv2 access on world switch if BE
Marc Zyngier [Tue, 5 Nov 2013 18:29:46 +0000 (18:29 +0000)]
arm64: KVM: vgic: byteswap GICv2 access on world switch if BE

Ensure that accesses to the GICH_* registers are byteswapped
when the kernel is compiled as big-endian.

Signed-off-by: Marc Zyngier <[email protected]>
Signed-off-by: Catalin Marinas <[email protected]>
11 years agoarm64: KVM: initialize HYP mode following the kernel endianness
Marc Zyngier [Tue, 5 Nov 2013 18:29:45 +0000 (18:29 +0000)]
arm64: KVM: initialize HYP mode following the kernel endianness

Force SCTLR_EL2.EE to 1 if the kernel is compiled as BE.

Signed-off-by: Marc Zyngier <[email protected]>
Signed-off-by: Catalin Marinas <[email protected]>
11 years agoALSA: hda - Make sure mute LEDs stay on during runtime suspend (Realtek)
David Henningsson [Wed, 6 Nov 2013 09:50:44 +0000 (10:50 +0100)]
ALSA: hda - Make sure mute LEDs stay on during runtime suspend (Realtek)

Some HP machines with Realtek codecs have mute LEDs connected to VREF pins.
However when these go into runtime suspend, the pin powers down and its
pin control is disabled, thus disabling the LED too.

This patch fixes that issue by making sure that the pin stays in D0 with
correct pin control.

Cc: [email protected]
BugLink: https://bugs.launchpad.net/bugs/1248465
Tested-by: Franz Hsieh <[email protected]>
Signed-off-by: David Henningsson <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
11 years agogpio: gpio-mxs: Remove unneeded dt checks
Fabio Estevam [Tue, 5 Nov 2013 19:21:22 +0000 (17:21 -0200)]
gpio: gpio-mxs: Remove unneeded dt checks

mxs is a devicetree only platform, so there is no need to check whether we
are in dt or platform data case.

Signed-off-by: Fabio Estevam <[email protected]>
Acked-by: Shawn Guo <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
11 years agoASoC: fsl: imx-pcm-fiq: remove bogus period delta calculation
Oskar Schirmer [Tue, 5 Nov 2013 12:13:54 +0000 (12:13 +0000)]
ASoC: fsl: imx-pcm-fiq: remove bogus period delta calculation

Originally snd_hrtimer_callback() used iprtd->period_time for
some jiffies based estimation to determine the right moment
to call snd_pcm_period_elapsed(). As timer drifts may well be a
problem, this was changed in commit b4e82b5b785670b6 to be based
on buffer transmission progress, using iprtd->offset and
runtime->buffer_size to calculate the amount of data since last
period had elapsed.

Unfortunately, iprtd->offset counts in bytes, while
runtime->buffer_size counts frames, so adding these to find some
delta is like comparing apples and oranges, and eventually results
in negative delta values every now and then. This is no big harm,
because it simply causes snd_pcm_period_elapsed() being called
more often than necessary, as negative delta is taken for a
large unsigned value by implicit conversion rule.
Nonetheless, the calculation is broken, so one would replace
the runtime->buffer_size by its equivalent in bytes.

But then, there are chances snd_pcm_period_elapsed() is called
late, because calculating the moment for the elapsed period
into delta is based against the iprtd->last_offset, which is not
necessarily the first byte of the period in question, but some
random byte which the FIQ handler left us with in r8/r9 by
accident. Again, negative impact is low, as there are plenty of
periods already prefilled with data, and snd_pcm_period_elapsed()
will probably be called latest when the following period is
reached. However, the calculation is conceptually broken, and we
are best off removing the clever stuff altogether.

snd_pcm_period_elapsed() is now simply called once everytime
snd_hrtimer_callback() is run, which may not be most accurate,
but at least this way we are quite sure we dont miss an end of
period. There is not much extra effort wasted by superfluous
calls to snd_pcm_period_elapsed(), as the timer frequency
closely matches the period size anyway.

Signed-off-by: Oskar Schirmer <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
11 years agogpio: pl061: don't depend on CONFIG_ARM
Rob Herring [Wed, 6 Nov 2013 03:27:02 +0000 (21:27 -0600)]
gpio: pl061: don't depend on CONFIG_ARM

The pl061 driver has no real dependency on ARM, so remove the kconfig
dependency.

Signed-off-by: Rob Herring <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: [email protected]
Signed-off-by: Linus Walleij <[email protected]>
11 years agopinctrl: imx50: add pinctrl support code for the IMX50 SoC
Greg Ungerer [Tue, 5 Nov 2013 13:11:51 +0000 (23:11 +1000)]
pinctrl: imx50: add pinctrl support code for the IMX50 SoC

Add code to support the specific pin arrangements of the Freescale IMX50 SoC.

Signed-off-by: Greg Ungerer <[email protected]>
Acked-by: Shawn Guo <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
11 years agomicroblaze: Remove unused NO_MMU Kconfig parameter
Michael Opdenacker [Mon, 4 Nov 2013 08:30:18 +0000 (09:30 +0100)]
microblaze: Remove unused NO_MMU Kconfig parameter

This removes the NO_MMU Kconfig parameter,
which was no longer used anywhere in the source code
and Makefiles.

This also updates a comment refering to this parameter.

Signed-off-by: Michael Opdenacker <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
11 years agoALSA: pxa2xx: Replace BUG() with snd_BUG()
Takashi Iwai [Tue, 5 Nov 2013 14:33:40 +0000 (15:33 +0100)]
ALSA: pxa2xx: Replace BUG() with snd_BUG()

BUG() used in the driver is just to spit the stack trace on buggy
points, not really needed to stop the whole operation.  For that
purpose, it'd be more convenient to use snd_BUG() instead.

Signed-off-by: Takashi Iwai <[email protected]>
11 years agoALSA: mips/ad1843: Use WARN_ON() instead of BUG_ON()
Takashi Iwai [Tue, 5 Nov 2013 14:03:05 +0000 (15:03 +0100)]
ALSA: mips/ad1843: Use WARN_ON() instead of BUG_ON()

BUG_ON() is rather useless for debugging as it leads to panic().
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <[email protected]>
11 years agoALSA: sparc/cs4231: Use WARN_ON() instead of BUG_ON()
Takashi Iwai [Tue, 5 Nov 2013 14:02:42 +0000 (15:02 +0100)]
ALSA: sparc/cs4231: Use WARN_ON() instead of BUG_ON()

BUG_ON() is rather useless for debugging as it leads to panic().
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <[email protected]>
11 years agoALSA: ps3: Use WARN_ON() instead of BUG_ON()
Takashi Iwai [Tue, 5 Nov 2013 14:01:47 +0000 (15:01 +0100)]
ALSA: ps3: Use WARN_ON() instead of BUG_ON()

BUG_ON() is rather useless for debugging as it leads to panic().
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <[email protected]>
11 years agoALSA: ctxfi: Use WARN_ON() instead of BUG_ON()
Takashi Iwai [Tue, 5 Nov 2013 14:00:02 +0000 (15:00 +0100)]
ALSA: ctxfi: Use WARN_ON() instead of BUG_ON()

BUG_ON() is rather useless for debugging as it leads to panic().
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <[email protected]>
11 years agox86/cpu: Increase max CPU count to 8192
Josh Boyer [Tue, 5 Nov 2013 14:38:16 +0000 (09:38 -0500)]
x86/cpu: Increase max CPU count to 8192

The MAXSMP option is intended to enable silly large numbers of
CPUs for testing purposes.  The current value of 4096 isn't very
silly any longer as there are actual SGI machines that approach
6096 CPUs when taking HT into account.

Increase the value to a nice round 8192 to account for this and
allow for short term future increases.

Signed-off-by: Josh Boyer <[email protected]>
Cc: [email protected]
Cc: Russ Anderson <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Andrew Morton <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
[ Tweaked it so that MAXSMP simply sets the maximum of the normal range. ]
Signed-off-by: Ingo Molnar <[email protected]>
11 years agox86/cpu: Allow higher NR_CPUS values
Josh Boyer [Tue, 5 Nov 2013 14:37:29 +0000 (09:37 -0500)]
x86/cpu: Allow higher NR_CPUS values

The current range for SMP configs is 2 - 512 CPUs, or a full
4096 in the case of MAXSMP.  There are machines that have 1024
CPUs in them today and configuring a kernel for that means you
are forced to set MAXSMP.  This adds additional unnecessary
overhead.  While that overhead might be considered tiny for
large machines, it isn't necessarily so if you are building a
kernel that runs across a wide variety of machines.

To cover the range of more common machines today, we allow
NR_CPUS to be up to 4096 when CPUMASK_OFFSTACK is enabled.

Signed-off-by: Josh Boyer <[email protected]>
Cc: [email protected]
Cc: Russ Anderson <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Andrew Morton <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
11 years agoALSA: intel8x0: Fix chmap application
Takashi Iwai [Wed, 6 Nov 2013 07:09:35 +0000 (08:09 +0100)]
ALSA: intel8x0: Fix chmap application

The playback chmap for multi-channel stream hasn't been properly added
to intel8x0 devices due to the wrong condition.

Reported-by: Raymond Yau <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
11 years agox86/cpu: Always print SMP information in /proc/cpuinfo
HATAYAMA Daisuke [Mon, 4 Nov 2013 17:15:48 +0000 (02:15 +0900)]
x86/cpu: Always print SMP information in /proc/cpuinfo

Currently show_cpuinfo_core() displays cpu core information only if
the number of threads per a whole cores is 2 or larger.

However, this condition doesn't care about the number of
sockets. For example, this condition doesn't hold on systems
with two logical cpus consisting of two sockets and a single
core on each socket - yet the topology information would be
interesting to see in that case as well.

I don't know whether or not there are processors in real world
by which such configurations are possible, but at least on
vitual machine environments, such configuration can occur,
typically when no explicit SMP information is provided in
advance.

For example, on qemu/KVM, SMP information is specified via -smp
command-line option, more specifically, its syntax is:

  -smp n[,cores=cores][,threads=threads][,sockets=sockets][,maxcpus=maxcpus]

If this is not specified, qemu tells configuration with
n-sockets, 1-core and 1-thread to the guest machine, on which
guest, MP information is not displayed in /proc/cpuinfo.

I saw this situation on VMWare guest environment, too.

To fix this issue, this patch simply removes the condition
because this information is useful even if there's only 1
thread.

Signed-off-by: HATAYAMA Daisuke <[email protected]>
Cc: Vivek Goyal <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
11 years agoALSA: hda - Apply GPIO setup for MacBooks with CS4208
Takashi Iwai [Tue, 5 Nov 2013 09:31:07 +0000 (10:31 +0100)]
ALSA: hda - Apply GPIO setup for MacBooks with CS4208

Apply the existing GPIO0 fixup as default for MacBooks with CS4208
codec.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=64401
Cc: <[email protected]> [v3.12+]
Signed-off-by: Takashi Iwai <[email protected]>
11 years agosched: Move completion code from core.c to completion.c
Peter Zijlstra [Fri, 4 Oct 2013 20:06:53 +0000 (22:06 +0200)]
sched: Move completion code from core.c to completion.c

Completions already have their own header file: linux/completion.h
Move the implementation out of kernel/sched/core.c and into its own
file: kernel/sched/completion.c.

Signed-off-by: Peter Zijlstra <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Andrew Morton <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
11 years agosched: Move wait code from core.c to wait.c
Peter Zijlstra [Fri, 4 Oct 2013 15:24:35 +0000 (17:24 +0200)]
sched: Move wait code from core.c to wait.c

For some reason only the wait part of the wait api lives in
kernel/sched/wait.c and the wake part still lives in kernel/sched/core.c;
ammend this.

Signed-off-by: Peter Zijlstra <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Andrew Morton <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
11 years agosched: Move wait.c into kernel/sched/
Peter Zijlstra [Thu, 31 Oct 2013 17:07:08 +0000 (18:07 +0100)]
sched: Move wait.c into kernel/sched/

Suggested-by: Ingo Molnar <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Andrew Morton <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
11 years agoMerge tag 'v3.12' into x86/cpu, to refresh the branch before queueing up more changes
Ingo Molnar [Wed, 6 Nov 2013 05:50:21 +0000 (06:50 +0100)]
Merge tag 'v3.12' into x86/cpu, to refresh the branch before queueing up more changes

Signed-off-by: Ingo Molnar <[email protected]>
11 years agoMerge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git...
Ingo Molnar [Wed, 6 Nov 2013 05:28:23 +0000 (06:28 +0100)]
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:

  * Check maximum frequency rate for record/top, emitting better error
    messages, from Jiri Olsa.

  * Disable live kvm command if timerfd is not supported, from David Ahern.

  * Add usage to 'perf list', from David Ahern.

  * Fix detection of non-core features, from David Ahern.

  * Consolidate __hists__add_*entry(), cleanup from Namhyung Kim.

Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
11 years agoARC: [SMP] Fix build failures for large NR_CPUS
Vineet Gupta [Fri, 1 Nov 2013 05:16:40 +0000 (10:46 +0530)]
ARC: [SMP] Fix build failures for large NR_CPUS

ST.as only takes S9 (255) for offset. This was going out of range when
accessing a task_struct field with 4k NR_CPUS (due to 128b of coumaks
itself in there).

Workaround by using an intermediate register to do the address scaling.

There is some duplication of fix for ctx_sw.c and ctx_sw_asm.S however
given that C version will go away soon I'm not bothering to factor out
the common code.

Reported-by: Noam Camus <[email protected]>
Signed-off-by: Vineet Gupta <[email protected]>
11 years agoARC: [SMP] enlarge possible NR_CPUS
Noam Camus [Mon, 3 Jun 2013 12:19:59 +0000 (15:19 +0300)]
ARC: [SMP] enlarge possible NR_CPUS

Signed-off-by: Noam Camus <[email protected]>
Signed-off-by: Vineet Gupta <[email protected]>
11 years agoARC: [SMP] TLB flush
Vineet Gupta [Sun, 27 Oct 2013 09:19:02 +0000 (14:49 +0530)]
ARC: [SMP] TLB flush

- Add mm_cpumask setting (aggregating only, unlike some other arches)
  used to restrict the TLB flush cross-calling

- cross-calling versions of TLB flush routines (thanks to Noam)

Signed-off-by: Noam Camus <[email protected]>
Signed-off-by: Vineet Gupta <[email protected]>
11 years agoARC: [SMP] ASID allocation
Vineet Gupta [Fri, 23 Aug 2013 13:46:34 +0000 (19:16 +0530)]
ARC: [SMP] ASID allocation

-Track a Per CPU ASID counter
-mm-per-cpu ASID (multiple threads, or mm migrated around)

Signed-off-by: Vineet Gupta <[email protected]>
11 years agoarc: export symbol for pm_power_off in reset.c
Chen Gang [Mon, 28 Oct 2013 03:49:47 +0000 (11:49 +0800)]
arc: export symbol for pm_power_off in reset.c

Need export symbol for it, or can not pass compiling, the related error
with allmodconfig:

    MODPOST 2994 modules
  ERROR: "pm_power_off" [drivers/mfd/retu-mfd.ko] undefined!
  ERROR: "pm_power_off" [drivers/char/ipmi/ipmi_poweroff.ko] undefined!

Signed-off-by: Chen Gang <[email protected]>
Signed-off-by: Vineet Gupta <[email protected]>
11 years agoarc: export symbol for save_stack_trace() in stacktrace.c
Chen Gang [Mon, 28 Oct 2013 03:00:38 +0000 (11:00 +0800)]
arc: export symbol for save_stack_trace() in stacktrace.c

Need export its symbol just like other architectures done, or can not
pass compiling with allmodconfig, the related error:

    MODPOST 2994 modules
  ERROR: "save_stack_trace" [kernel/backtracetest.ko] undefined!
  ERROR: "save_stack_trace" [drivers/md/persistent-data/dm-persistent-data.ko] undefined!

Signed-off-by: Chen Gang <[email protected]>
Signed-off-by: Vineet Gupta <[email protected]>
11 years agoarc: remove '__init' for get_hw_config_num_irq()
Chen Gang [Wed, 23 Oct 2013 03:02:51 +0000 (11:02 +0800)]
arc: remove '__init' for get_hw_config_num_irq()

get_hw_config_num_irq() may be called by normal iss_model_init_smp()
which is a function pointer for 'init_smp' which may be called by
first_lines_of_secondary() which also need be normal too.

The related warning (with allmodconfig):

    MODPOST vmlinux.o
  WARNING: vmlinux.o(.text+0x5814): Section mismatch in reference from the function iss_model_init_smp() to the function .init.text:get_hw_config_num_irq()
  The function iss_model_init_smp() references
  the function __init get_hw_config_num_irq().
  This is often because iss_model_init_smp lacks a __init
  annotation or the annotation of get_hw_config_num_irq is wrong.

Signed-off-by: Chen Gang <[email protected]>
11 years agoarc: remove '__init' for first_lines_of_secondary()
Chen Gang [Wed, 23 Oct 2013 02:16:38 +0000 (10:16 +0800)]
arc: remove '__init' for first_lines_of_secondary()

first_lines_of_secondary() is a '__init' function, but it may be called
by __cpu_up() by _cpu_up() by cpu_up() which is a normal export symbol
function. So recommend to remove '__init'.

The related warning (with allmodconfig):

    MODPOST vmlinux.o
  WARNING: vmlinux.o(.text+0x315c): Section mismatch in reference from the function __cpu_up() to the function .init.text:first_lines_of_secondary()
  The function __cpu_up() references
  the function __init first_lines_of_secondary().
  This is often because __cpu_up lacks a __init
  annotation or the annotation of first_lines_of_secondary is wrong.

Signed-off-by: Chen Gang <[email protected]>
11 years agoarc: remove '__init' for setup_processor() and arc_init_IRQ()
Chen Gang [Wed, 23 Oct 2013 02:12:05 +0000 (10:12 +0800)]
arc: remove '__init' for setup_processor() and arc_init_IRQ()

They haven't '__init' in definition, but has '__init' in declaration.
And normal function start_kernel_secondary() may call setup_processor()
which will call arc_init_IRQ().

So need remove '__init' for both of them. The related warning (with
allmodconfig):

    MODPOST vmlinux.o
  WARNING: vmlinux.o(.text+0x3084): Section mismatch in reference from the function start_kernel_secondary() to the function .init.text:setup_processor()
  The function start_kernel_secondary() references
  the function __init setup_processor().
  This is often because start_kernel_secondary lacks a __init
  annotation or the annotation of setup_processor is wrong.

Signed-off-by: Chen Gang <[email protected]>
11 years agoarc: kgdb: add default implementation for kgdb_roundup_cpus()
Chen Gang [Thu, 24 Oct 2013 03:50:09 +0000 (11:50 +0800)]
arc: kgdb: add default implementation for kgdb_roundup_cpus()

arc supports kgdb, but need update -- add function kgdb_roundup_cpus(),
or can not pass compiling. At present, add the simple generic one just
like other architectures(e.g. tile, mips ...).

The related error (with allmodconfig):

  kernel/built-in.o: In function `kgdb_cpu_enter':
  kernel/debug/debug_core.c:580: undefined reference to `kgdb_roundup_cpus'

Signed-off-by: Chen Gang <[email protected]>
Signed-off-by: Vineet Gupta <[email protected]>
11 years agoARC: Fix bogus gcc warning and micro-optimise TLB iteration loop
Vineet Gupta [Fri, 27 Sep 2013 12:50:06 +0000 (18:20 +0530)]
ARC: Fix bogus gcc warning and micro-optimise TLB iteration loop

------------------>8----------------------
arch/arc/mm/tlb.c: In function ‘do_tlb_overlap_fault’:
arch/arc/mm/tlb.c:688:13: warning: array subscript is above array bounds
[-Warray-bounds]
         (pd0[n] & PAGE_MASK)) {
             ^
------------------>8----------------------

While at it, remove the usless last iteration of outer loop when reading
a TLB SET for duplicate entries.

Suggested-by: Mischa Jonker <[email protected]>
Signed-off-by: Vineet Gupta <[email protected]>
11 years agoARC: Add support for irqflags tracing and lockdep
Vineet Gupta [Fri, 6 Sep 2013 08:48:17 +0000 (14:18 +0530)]
ARC: Add support for irqflags tracing and lockdep

Lockdep required a small fix to stacktrace API which was incorrectly
unwindign out of __switch_to for the current call frame.

Signed-off-by: Vineet Gupta <[email protected]>
11 years agoARC: Reset the value of Interrupt Priority Register
Vineet Gupta [Thu, 12 Sep 2013 08:23:06 +0000 (13:53 +0530)]
ARC: Reset the value of Interrupt Priority Register

In case bootloader has changed the priority of one/more IRQ lines

Reported-by: Noam Camus <[email protected]>
Signed-off-by: Vineet Gupta <[email protected]>
11 years agoARC: Reduce #ifdef'ery for unaligned access emulation
Vineet Gupta [Wed, 18 Sep 2013 12:38:01 +0000 (18:08 +0530)]
ARC: Reduce #ifdef'ery for unaligned access emulation

Emulation not enabled is treated as if the fixup failed, so no need for
special #ifdef checks.

Signed-off-by: Vineet Gupta <[email protected]>
11 years agoARC: Change calling convention of do_page_fault()
Vineet Gupta [Wed, 18 Sep 2013 10:55:40 +0000 (16:25 +0530)]
ARC: Change calling convention of do_page_fault()

switch the args (address, pt_regs) to match with all the other "C"
exception handlers.

This removes the awkwardness in EV_ProtV for page fault vs. unaligned
access.

Signed-off-by: Vineet Gupta <[email protected]>
11 years agoARC: cacheflush optim - PTAG can be loop invariant if V-P is const
Vineet Gupta [Thu, 5 Sep 2013 09:15:51 +0000 (14:45 +0530)]
ARC: cacheflush optim - PTAG can be loop invariant if V-P is const

Line op needs vaddr (indexing) and paddr (tag match). For page sized
flushes (V-P const), each line op will need a different index, but the
tag bits wil remain constant, hence paddr can be setup once outside the
loop.

This improves select LMBench numbers for Aliasing dcache where we have
more "preventive" cache flushing.

Processor, Processes - times in microseconds - smaller is better
------------------------------------------------------------------------------
Host                 OS  Mhz null null      open slct sig  sig  fork exec sh
                             call  I/O stat clos TCP  inst hndl proc proc proc
--------- ------------- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
3.11-rc7- Linux 3.11.0-   80 4.66 8.88 69.7 112. 268. 8.60 28.0 3489 13.K 27.K # Non alias ARC700
3.11-rc7- Linux 3.11.0-   80 4.64 8.51 68.6 98.5 271. 8.58 28.1 4160 15.K 32.K # Aliasing
3.11-rc7- Linux 3.11.0-   80 4.64 8.51 69.8 99.4 270. 8.73 27.5 3880 15.K 31.K # PTAG loop Inv

Signed-off-by: Vineet Gupta <[email protected]>
11 years agoARC: cacheflush refactor #3: Unify the {d,i}cache flush leaf helpers
Vineet Gupta [Thu, 5 Sep 2013 08:13:03 +0000 (13:43 +0530)]
ARC: cacheflush refactor #3: Unify the {d,i}cache flush leaf helpers

With Line length being constant now, we can fold the 2 helpers into 1.
This allows applying any optimizations (forthcoming) to single place.

Signed-off-by: Vineet Gupta <[email protected]>
11 years agoARC: cacheflush refactor #2: I and D caches lines to have same size
Vineet Gupta [Thu, 5 Sep 2013 07:47:49 +0000 (13:17 +0530)]
ARC: cacheflush refactor #2: I and D caches lines to have same size

Having them be different seems an obscure configuration.

Signed-off-by: Vineet Gupta <[email protected]>
11 years agoARC: cacheflush refactor #1: push aux reg ascertaining into leaf routine
Vineet Gupta [Thu, 5 Sep 2013 07:33:35 +0000 (13:03 +0530)]
ARC: cacheflush refactor #1: push aux reg ascertaining into leaf routine

ARC dcache supports 3 ops - Inv, Flush, Flush-n-Inv.
The programming model however provides 2 commands FLUSH, INV.
INV will either discard or flush-n-discard (based on DT_CTRL bit)

The leaf helper __dc_line_loop() used to take the AUX register
(corresponding to the 2 commands). Now we push that to within the
helper, paving way for code consolidations to follow.

Signed-off-by: Vineet Gupta <[email protected]>
11 years agoARC: use __weak instead of __attribute__((weak))
Vineet Gupta [Thu, 31 Oct 2013 08:23:54 +0000 (13:53 +0530)]
ARC: use __weak instead of __attribute__((weak))

Signed-off-by: Vineet Gupta <[email protected]>
11 years agoARC: Annotate some functions as static
Vineet Gupta [Wed, 4 Sep 2013 10:43:35 +0000 (16:13 +0530)]
ARC: Annotate some functions as static

Signed-off-by: Vineet Gupta <[email protected]>
11 years agoarc: Replace __get_cpu_var uses
Christoph Lameter [Wed, 28 Aug 2013 19:48:15 +0000 (19:48 +0000)]
arc: Replace __get_cpu_var uses

__get_cpu_var() is used for multiple purposes in the kernel source. One of them is
address calculation via the form &__get_cpu_var(x). This calculates the address for
the instance of the percpu variable of the current processor based on an offset.

Other use cases are for storing and retrieving data from the current processors percpu area.
__get_cpu_var() can be used as an lvalue when writing data or on the right side of an assignment.

__get_cpu_var() is defined as :

#define __get_cpu_var(var) (*this_cpu_ptr(&(var)))

__get_cpu_var() always only does an address determination. However, store and retrieve operations
could use a segment prefix (or global register on other platforms) to avoid the address calculation.

this_cpu_write() and this_cpu_read() can directly take an offset into a percpu area and use
optimized assembly code to read and write per cpu variables.

This patch converts __get_cpu_var into either an explicit address calculation using this_cpu_ptr()
or into a use of this_cpu operations that use the offset. Thereby address calcualtions are avoided
and less registers are used when code is generated.

At the end of the patchset all uses of __get_cpu_var have been removed so the macro is removed too.

The patchset includes passes over all arches as well. Once these operations are used throughout then
specialized macros can be defined in non -x86 arches as well in order to optimize per cpu access by
f.e. using a global register that may be set to the per cpu base.

Transformations done to __get_cpu_var()

1. Determine the address of the percpu instance of the current processor.

DEFINE_PER_CPU(int, y);
int *x = &__get_cpu_var(y);

    Converts to

int *x = this_cpu_ptr(&y);

2. Same as #1 but this time an array structure is involved.

DEFINE_PER_CPU(int, y[20]);
int *x = __get_cpu_var(y);

    Converts to

int *x = this_cpu_ptr(y);

3. Retrieve the content of the current processors instance of a per cpu variable.

DEFINE_PER_CPU(int, u);
int x = __get_cpu_var(y)

   Converts to

int x = __this_cpu_read(y);

4. Retrieve the content of a percpu struct

DEFINE_PER_CPU(struct mystruct, y);
struct mystruct x = __get_cpu_var(y);

   Converts to

memcpy(this_cpu_ptr(&x), y, sizeof(x));

5. Assignment to a per cpu variable

DEFINE_PER_CPU(int, y)
__get_cpu_var(y) = x;

   Converts to

this_cpu_write(y, x);

6. Increment/Decrement etc of a per cpu variable

DEFINE_PER_CPU(int, y);
__get_cpu_var(y)++

   Converts to

this_cpu_inc(y)

Acked-by: Vineet Gupta <[email protected]>
Signed-off-by: Christoph Lameter <[email protected]>
11 years agopowerpc: Fix fatal SLB miss when restoring PPR
Benjamin Herrenschmidt [Tue, 5 Nov 2013 05:33:22 +0000 (16:33 +1100)]
powerpc: Fix fatal SLB miss when restoring PPR

When restoring the PPR value, we incorrectly access the thread structure
at a time where MSR:RI is clear, which means we cannot recover from nested
faults. However the thread structure isn't covered by the "bolted" SLB
entries and thus accessing can fault.

This fixes it by splitting the code so that the PPR value is loaded into
a GPR before MSR:RI is cleared.

Signed-off-by: Benjamin Herrenschmidt <[email protected]>
11 years agopowerpc/powernv: Reserve the correct PE number
Gavin Shan [Mon, 4 Nov 2013 08:32:47 +0000 (16:32 +0800)]
powerpc/powernv: Reserve the correct PE number

We're assigning PE numbers after the completion of PCI probe. During
the PCI probe, we had PE#0 as the super container to encompass all
PCI devices. However, that's inappropriate since PELTM has ascending
order of priority on search on P7IOC. So we need PE#127 takes the
role that PE#0 has previously. For PHB3, we still have PE#0 as the
reserved PE.

The patch supposes that the underly firmware has built the RID to
PE# mapping after resetting IODA tables: all PELTM entries except
last one has invalid mapping on P7IOC, but all RTEs have binding
to PE#0. The reserved PE# is being exported by firmware by device
tree.

Signed-off-by: Gavin Shan <[email protected]>
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
11 years agopowerpc/powernv: Add PE to its own PELTV
Gavin Shan [Mon, 4 Nov 2013 08:32:46 +0000 (16:32 +0800)]
powerpc/powernv: Add PE to its own PELTV

We need add PE to its own PELTV. Otherwise, the errors originated
from the PE might contribute to other PEs. In the result, we can't
clear up the error successfully even we're checking and clearing
errors during access to PCI config space.

Cc: [email protected]
Reported-by: [email protected]
Signed-off-by: Gavin Shan <[email protected]>
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
11 years agopowerpc/powernv: Add support for indirect XSCOM via debugfs
Benjamin Herrenschmidt [Thu, 10 Oct 2013 08:19:15 +0000 (19:19 +1100)]
powerpc/powernv: Add support for indirect XSCOM via debugfs

Indirect XSCOM addresses normally have the top bit set (of the 64-bit
address). This doesn't work via the normal debugfs interface, so we use
a different encoding, which we need to convert before calling OPAL.

Signed-off-by: Benjamin Herrenschmidt <[email protected]>
11 years agopowerpc/scom: Improve debugfs interface
Benjamin Herrenschmidt [Mon, 4 Nov 2013 02:20:35 +0000 (13:20 +1100)]
powerpc/scom: Improve debugfs interface

The current debugfs interface to scom is essentially unused
and racy. It uses two different files "address" and "data"
to perform accesses which is at best impractical for anything
but manual use by a developer.

This replaces it with an "access" file which represent the entire
scom address space which can be lseek/read/writen too.

This file only supports accesses that are 8 bytes aligned and
multiple of 8 bytes in size. The offset is logically the SCOM
address multiplied by 8.

Since nothing in userspace exploits that file at the moment, the ABI
change is a no-brainer.

Signed-off-by: Benjamin Herrenschmidt <[email protected]>
11 years agopowerpc/scom: Enable 64-bit addresses
Benjamin Herrenschmidt [Thu, 10 Oct 2013 08:18:02 +0000 (19:18 +1100)]
powerpc/scom: Enable 64-bit addresses

On P8, XSCOM addresses has a special "indirect" form that
requires more than 32-bits, so let's use u64 everywhere in
the code instead of u32.

Signed-off-by: Benjamin Herrenschmidt <[email protected]>
11 years agoperf tools: Finish the removal of 'self' arguments
Arnaldo Carvalho de Melo [Tue, 5 Nov 2013 18:32:36 +0000 (15:32 -0300)]
perf tools: Finish the removal of 'self' arguments

They convey no information, perhaps I was bitten by some snake at some
point, complete the detox by naming the last of those arguments more
sensibly.

Cc: Adrian Hunter <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
11 years agoperf tools: Check maximum frequency rate for record/top
Jiri Olsa [Tue, 5 Nov 2013 14:14:47 +0000 (15:14 +0100)]
perf tools: Check maximum frequency rate for record/top

Adding the check for maximum allowed frequency rate defined in following
file:

  /proc/sys/kernel/perf_event_max_sample_rate

When we cross the maximum value we fail and display detailed error
message with advise.

  $ perf record -F 3000 ls
  Maximum frequency rate (2000) reached.
  Please use -F freq option with lower value or consider
  tweaking /proc/sys/kernel/perf_event_max_sample_rate.

In case user does not specify the frequency and the default value cross
the maximum, we display warning and set the frequency value to the
current maximum.

  $ perf record ls
  Lowering default frequency rate to 2000.
  Please consider tweaking /proc/sys/kernel/perf_event_max_sample_rate.

Same messages are used for 'perf top'.

Signed-off-by: Jiri Olsa <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Corey Ashford <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
11 years agoperf fs: Add procfs support
Jiri Olsa [Tue, 5 Nov 2013 14:14:46 +0000 (15:14 +0100)]
perf fs: Add procfs support

Adding procfs support into fs class.

The interface function:
  const char *procfs__mountpoint(void);

provides existing mountpoint path for procfs.

Signed-off-by: Jiri Olsa <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Corey Ashford <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
[ Fixup namespace ]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
11 years agoperf fs: Rename NAME_find_mountpoint() to NAME__mountpoint()
Arnaldo Carvalho de Melo [Tue, 5 Nov 2013 17:48:50 +0000 (14:48 -0300)]
perf fs: Rename NAME_find_mountpoint() to NAME__mountpoint()

Shorten it, "finding" it is an implementation detail, what callers want
is the pathname, not to ask for it to _always_ do the lookup.

And the existing implementation already caches it, i.e. it doesn't
"finds" it on every call.

Cc: Adrian Hunter <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
11 years agoarm64: compat: Clear the IT state independent of the 32-bit ARM or Thumb-2 mode
T.J. Purtell [Tue, 5 Nov 2013 17:07:18 +0000 (17:07 +0000)]
arm64: compat: Clear the IT state independent of the 32-bit ARM or Thumb-2 mode

The ARM architecture reference specifies that the IT state bits in the
PSR must be all zeros in ARM mode or behavior is unspecified. If an ARM
function is registered as a signal handler, and that signal is delivered
inside a block of instructions following an IT instruction, some of the
instructions at the beginning of the signal handler may be skipped if
the IT state bits of the Program Status Register are not cleared by the
kernel.

Signed-off-by: T.J. Purtell <[email protected]>
[[email protected]: code comment and commit log updated]
Signed-off-by: Catalin Marinas <[email protected]>
11 years agoperf tools: Factor sysfs code into generic fs object
Jiri Olsa [Tue, 5 Nov 2013 14:14:45 +0000 (15:14 +0100)]
perf tools: Factor sysfs code into generic fs object

Moving sysfs code into generic fs object and preparing it to carry
procfs support.

This should be merged with tools/lib/lk/debugfs.c at some point in the
future.

Signed-off-by: Jiri Olsa <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Corey Ashford <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
[ Added fs__ namespace qualifier to some more functions ]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
11 years agoperf list: Add usage
David Ahern [Wed, 30 Oct 2013 16:28:29 +0000 (10:28 -0600)]
perf list: Add usage

Currently 'perf list' is not very helpful if you forget the syntax:

  $ perf list -h

  List of pre-defined events (to be used in -e):

After:
  $ perf list -h

   usage: perf list [hw|sw|cache|tracepoint|pmu|event_glob]

Signed-off-by: David Ahern <[email protected]>
Acked-by: Ingo Molnar <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
11 years agoperf list: Remove a level of indentation
David Ahern [Wed, 30 Oct 2013 16:15:06 +0000 (10:15 -0600)]
perf list: Remove a level of indentation

With a return after the if check an indentation level can be removed.
Indentation shift only; no functional changes.

Signed-off-by: David Ahern <[email protected]>
Acked-by: Ingo Molnar <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
11 years agoarm64: Use 42-bit address space with 64K pages
Catalin Marinas [Wed, 23 Oct 2013 15:50:07 +0000 (16:50 +0100)]
arm64: Use 42-bit address space with 64K pages

This patch expands the VA_BITS to 42 when the 64K page configuration is
enabled allowing 2TB kernel linear mapping. Linux still uses 2 levels of
page tables in this configuration with pgd now being a full page.

Signed-off-by: Catalin Marinas <[email protected]>
Acked-by: Will Deacon <[email protected]>
Acked-by: Marc Zyngier <[email protected]>
11 years agoALSA: hda - Name Haswell HDMI controllers better
Takashi Iwai [Tue, 5 Nov 2013 16:54:05 +0000 (17:54 +0100)]
ALSA: hda - Name Haswell HDMI controllers better

"HDA Intel MID" is no correct name for Haswell HDMI controllers.
Give them a better name, "HDA Intel HDMI".

Signed-off-by: Takashi Iwai <[email protected]>
11 years agoALSA: hda - Force buffer alignment for Haswell HDMI controllers
Takashi Iwai [Tue, 5 Nov 2013 16:34:46 +0000 (17:34 +0100)]
ALSA: hda - Force buffer alignment for Haswell HDMI controllers

Haswell HDMI audio controllers seem to get stuck when unaligned buffer
size is used.  Let's enable the buffer alignment for the corresponding
entries.

Since AZX_DCAPS_INTEL_PCH contains AZX_DCAPS_BUFSIZE that disables the
buffer alignment forcibly, define AZX_DCAPS_INTEL_HASWELL and put the
necessary AZX_DCAPS bits there.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=60769
Reported-by: Alexander E. Patrakov <[email protected]>
Cc: <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
11 years agotools/perf/build: Fix detection of non-core features
David Ahern [Tue, 29 Oct 2013 16:43:15 +0000 (10:43 -0600)]
tools/perf/build: Fix detection of non-core features

feature_check needs to be invoked through call, and LDFLAGS may not be
set so quotes are needed.

Thanks to Jiri for spotting the quotes around LDFLAGS; that one was
driving me nuts with the upcoming timerfd feature detection.

Signed-off-by: David Ahern <[email protected]>
Reviewed-by: Jiri Olsa <[email protected]>
Tested-by: Jiri Olsa <[email protected]>
Acked-by: Ingo Molnar <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
[ Fixed conflict with 8a0c4c2843d3 ("perf tools: Fix libunwind build and feature detection for 32-bit build") ]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
11 years agoperf kvm: Disable live command if timerfd is not supported
David Ahern [Tue, 29 Oct 2013 16:43:16 +0000 (10:43 -0600)]
perf kvm: Disable live command if timerfd is not supported

If the OS does not have timerfd support (e.g., older OS'es like RHEL5)
disable perf kvm stat live.

Signed-off-by: David Ahern <[email protected]>
Reviewed-by: Jiri Olsa <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
11 years agoALSA: atmel: remove dependency on <mach/gpio.h>
Linus Walleij [Tue, 5 Nov 2013 09:29:49 +0000 (10:29 +0100)]
ALSA: atmel: remove dependency on <mach/gpio.h>

This include is completely unused since the AT91 sound driver
actually uses gpiolib properly.

Signed-off-by: Linus Walleij <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
11 years agoALSA: hda - Enable Thinkpad mute/micmute LEDs for Realtek
David Henningsson [Tue, 5 Nov 2013 12:11:37 +0000 (13:11 +0100)]
ALSA: hda - Enable Thinkpad mute/micmute LEDs for Realtek

Same as we already have for Conexant. Right now it's only enabled
for one machine.

Tested-by: Hui Wang <[email protected]>
Signed-off-by: David Henningsson <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
11 years agoarm64: module: ensure instruction is little-endian before manipulation
Will Deacon [Tue, 5 Nov 2013 10:16:52 +0000 (10:16 +0000)]
arm64: module: ensure instruction is little-endian before manipulation

Relocations that require an instruction immediate to be re-encoded must
ensure that the instruction pattern is represented in a little-endian
format for the manipulation code to work correctly.

This patch converts the loaded instruction into native-endianess prior
to encoding and then converts back to little-endian byteorder before
updating memory.

Signed-off-by: Will Deacon <[email protected]>
Tested-by: Matthew Leach <[email protected]>
Signed-off-by: Catalin Marinas <[email protected]>
This page took 0.119543 seconds and 4 git commands to generate.