GitHub/moto-9609/android_kernel_motorola_exynos9610.git
10 years agoMIPS: BCM47XX: Slightly clean memory detection
Rafał Miłecki [Sat, 19 Apr 2014 10:49:46 +0000 (12:49 +0200)]
MIPS: BCM47XX: Slightly clean memory detection

Patch was tested on devices with 64 MiB and 256 MiB of RAM.
It documents every part nicely and drops this hacky part of code:
max = off | ((128 << 20) - 1);

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Patchwork: https://patchwork.linux-mips.org/patch/6808/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: octeon: Add interface mode detection for Octeon II
Alex Smith [Thu, 29 May 2014 10:10:01 +0000 (11:10 +0100)]
MIPS: octeon: Add interface mode detection for Octeon II

Add interface mode detection for Octeon II. This is necessary to detect
the interface modes correctly on the UBNT E200 board. Code is taken
from the UBNT GPL source release, with some alterations: SRIO, ILK and
RXAUI interface modes are removed and instead return disabled as these
modes are not currently supported.

Signed-off-by: Alex Smith <alex.smith@imgtec.com>
Tested-by: David Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7039/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMerge branch 'wip-mips-pm' of https://github.com/paulburton/linux into mips-for-linux...
Ralf Baechle [Wed, 28 May 2014 17:00:14 +0000 (19:00 +0200)]
Merge branch 'wip-mips-pm' of https://github.com/paulburton/linux into mips-for-linux-next

10 years agoMIPS: Malta: CPS SMP by default
Paul Burton [Tue, 15 Apr 2014 11:24:23 +0000 (12:24 +0100)]
MIPS: Malta: CPS SMP by default

The CONFIG_MIPS_CPS SMP implementation should be able to handle all
cases the CONFIG_MIPS_CMP implementation does, but without requiring
bootloader assistance. It is also required in order to make use of
features such as hotplug & cpuidle core power gating. Enable it by
default for Malta configs that previously enabled the now deprecated
CONFIG_MIPS_CMP, and disable the latter. The local version suffix "cmp"
is removed rather than replaced with "cps" since there are other ways to
tell that the CPS SMP implementation is in use (the "VPE topology" line
in the boot log being one).

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
10 years agocpuidle: cpuidle-cps: add MIPS CPS cpuidle driver
Paul Burton [Mon, 14 Apr 2014 15:25:29 +0000 (16:25 +0100)]
cpuidle: cpuidle-cps: add MIPS CPS cpuidle driver

This patch adds a cpuidle driver for systems based around the MIPS
Coherent Processing System (CPS) architecture. It supports four idle
states:

  - The standard MIPS wait instruction.

  - The non-coherent wait, clock gated & power gated states exposed by
    the recently added pm-cps layer.

The pm-cps layer is used to enter all the deep idle states. Since cores
in the clock or power gated states cannot service interrupts, the
gic_send_ipi_single function is modified to send a power up command for
the appropriate core to the CPC in cases where the target CPU has marked
itself potentially incoherent.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
10 years agocpuidle: declare cpuidle_dev in cpuidle.h
Paul Burton [Wed, 8 Jan 2014 11:23:35 +0000 (11:23 +0000)]
cpuidle: declare cpuidle_dev in cpuidle.h

Declaring this allows drivers which need to initialise each struct
cpuidle_device at initialisation time to make use of the structures
already defined in cpuidle.c, rather than having to wastefully define
their own.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
10 years agoMIPS: include cpuidle Kconfig menu
Paul Burton [Mon, 14 Apr 2014 15:24:22 +0000 (16:24 +0100)]
MIPS: include cpuidle Kconfig menu

This patch simply includes the cpuidle Kconfig entries in preparation
for cpuidle drivers used on MIPS systems.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
10 years agoMIPS: cpuidle wait instruction state
Paul Burton [Mon, 14 Apr 2014 15:16:41 +0000 (16:16 +0100)]
MIPS: cpuidle wait instruction state

Defines a macro intended to allow trivial use of the regular MIPS wait
instruction from cpuidle drivers, which may simply invoke the macro
within their array of states.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
10 years agoMIPS: smp-cps: duplicate core0 CCA on secondary cores
Paul Burton [Wed, 16 Apr 2014 10:10:57 +0000 (11:10 +0100)]
MIPS: smp-cps: duplicate core0 CCA on secondary cores

Rather than hardcoding CCA=0x5 for secondary cores, re-use the CCA from
the boot CPU. This allows overrides of the CCA using the cca= kernel
parameter to take effect on all CPUs for consistency.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
10 years agoMIPS: smp-cps: set a coherent default CCA
Paul Burton [Mon, 14 Apr 2014 14:58:45 +0000 (15:58 +0100)]
MIPS: smp-cps: set a coherent default CCA

This patch sets a default CCA suited for use with multi-core SMP on all
current MIPS CPS based systems. It may still be overriden by the cca=
argument on the kernel command line.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
10 years agoMIPS: smp-cps: prevent multi-core SMP with unsuitable CCA
Paul Burton [Mon, 14 Apr 2014 14:21:25 +0000 (15:21 +0100)]
MIPS: smp-cps: prevent multi-core SMP with unsuitable CCA

If the user or bootloader sets the CCA to a value which is not suited
for multi-core SMP (ie. anything non-coherent) then limit the system to
using only a single core and warn the user.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
10 years agoMIPS: smp-cps: hotplug support
Paul Burton [Mon, 14 Apr 2014 13:13:57 +0000 (14:13 +0100)]
MIPS: smp-cps: hotplug support

This patch adds support for offlining CPUs via hotplug when using the
CONFIG_MIPS_CPS SMP implementation. When a CPU is offlined one of 2
things will happen:

  - If the CPU is part of a core which implements the MT ASE and there
    is at least one other VPE online within that core then the VPE will
    be halted by settings its TCHalt bit.

  - Otherwise if supported the core will be powered down via the CPC.

  - Otherwise the CPU will hang by executing an infinite loop.

Bringing CPUs back online is then a process of either clearing the
appropriate VPEs TCHalt bit or powering up the appropriate core via the
CPC. Throughout the process the struct core_boot_config vpe_mask field
must be maintained such that mips_cps_boot_vpes will start & stop the
correct VPEs.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
10 years agoMIPS: pm-cps: add PM state entry code for CPS systems
Paul Burton [Mon, 14 Apr 2014 10:00:56 +0000 (11:00 +0100)]
MIPS: pm-cps: add PM state entry code for CPS systems

This patch adds code to generate entry & exit code for various low power
states available on systems based around the MIPS Coherent Processing
System architecture (ie. those with a Coherence Manager, Global
Interrupt Controller & for >=CM2 a Cluster Power Controller). States
supported are:

  - Non-coherent wait. This state first leaves the coherent domain and
    then executes a regular MIPS wait instruction. Power savings are
    found from the elimination of coherency interventions between the
    core and any other coherent requestors in the system.

  - Clock gated. This state leaves the coherent domain and then gates
    the clock input to the core. This removes all dynamic power from the
    core but leaves the core at the mercy of another to restart its
    clock. Register state is preserved, but the core can not service
    interrupts whilst its clock is gated.

  - Power gated. This deepest state removes all power input to the core.
    All register state is lost and the core will restart execution from
    its BEV when another core powers it back up. Because register state
    is lost this state requires cooperation with the CONFIG_MIPS_CPS SMP
    implementation in order for the core to exit the state successfully.

The code will detect which states are available on the current system
during boot & generate the entry/exit code for those states. This will
be used by cpuidle & hotplug implementations.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
10 years agoMIPS: smp-cps: use CPC core-other locking
Paul Burton [Fri, 7 Mar 2014 10:42:52 +0000 (10:42 +0000)]
MIPS: smp-cps: use CPC core-other locking

The core which the CPC core-other region relates to is based upon the
core-local core-other addressing register. As its name suggests this
register is shared between all VPEs within a core, and if there is a
possibility that multiple VPEs within a core will attempt to access
another core simultaneously then locking is required. This wasn't
previously a problem with the only user being cpu0 during boot, but will
be an issue once hotplug is implemented & may race with other users such
as cpuidle.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
10 years agoMIPS: smp-cps: flush cache after patching mips_cps_core_entry
Paul Burton [Mon, 14 Apr 2014 11:21:49 +0000 (12:21 +0100)]
MIPS: smp-cps: flush cache after patching mips_cps_core_entry

The start of mips_cps_core_entry is patched in order to provide the code
with the address of the CM register region at a point where it will be
running non-coherent with the rest of the system. However the cache
wasn't being flushed after that patching which could in principle lead
to secondary cores using an invalid CM base address.

The patching is moved to cps_prepare_cpus since local_flush_icache_range
has not been initialised at the point cps_smp_setup is called.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
10 years agoMIPS: smp-cps: function to determine whether CPS SMP is in use
Paul Burton [Fri, 14 Mar 2014 16:06:16 +0000 (16:06 +0000)]
MIPS: smp-cps: function to determine whether CPS SMP is in use

The core power down state for cpuidle will require that the CPS SMP
implementation is in use. This patch provides a mips_cps_smp_in_use
function which determines whether or not the CPS SMP implementation is
currently in use.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
10 years agoMIPS: smp-cps: rework core/VPE initialisation
Paul Burton [Mon, 14 Apr 2014 11:04:27 +0000 (12:04 +0100)]
MIPS: smp-cps: rework core/VPE initialisation

When hotplug and/or a powered down idle state are supported cases will
arise where a non-zero VPE must be brought online without VPE 0, and it
where multiple VPEs must be onlined simultaneously. This patch prepares
for that by:

  - Splitting struct boot_config into core & VPE boot config structures,
    allocated one per core or VPE respectively. This allows for multiple
    VPEs to be onlined simultaneously without clobbering each others
    configuration.

  - Indicating which VPEs should be online within a core at any given
    time using a bitmap. This allows multiple VPEs to be brought online
    simultaneously and also indicates to VPE 0 whether it should halt
    after starting any non-zero VPEs that should be online within the
    core. For example if all VPEs within a core are offlined via hotplug
    and the user onlines the second VPE within that core:

      1) The core will be powered up.

      2) VPE 0 will run from the BEV (ie. mips_cps_core_entry) to
         initialise the core.

      3) VPE 0 will start VPE 1 because its bit is set in the cores
         bitmap.

      4) VPE 0 will halt itself because its bit is clear in the cores
         bitmap.

  - Moving the core & VPE initialisation to assembly code which does not
    make any use of the stack. This is because if a non-zero VPE is to
    be brought online in a powered down core then when VPE 0 of that
    core runs it may not have a valid stack, and even if it did then
    it's messy to run through parts of generic kernel code on VPE 0
    before starting the correct VPE.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
10 years agoMIPS: uasm: add MT ASE yield instruction
Paul Burton [Tue, 4 Mar 2014 15:12:36 +0000 (15:12 +0000)]
MIPS: uasm: add MT ASE yield instruction

This patch allows use of the MT ASE yield instruction from uasm. It will
be used by a subsequent patch.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
10 years agoMIPS: uasm: add wait instruction
Paul Burton [Tue, 24 Dec 2013 03:50:35 +0000 (03:50 +0000)]
MIPS: uasm: add wait instruction

This patch allows use of the wait instruction from uasm. It will be used
by a subsequent patch.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
10 years agoMIPS: uasm: add sync instruction
Paul Burton [Tue, 24 Dec 2013 03:49:45 +0000 (03:49 +0000)]
MIPS: uasm: add sync instruction

This patch allows use of the sync instruction from uasm. It will be used
by a subsequent patch.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
10 years agoMIPS: uasm: add jalr instruction
Paul Burton [Sun, 16 Mar 2014 12:58:05 +0000 (12:58 +0000)]
MIPS: uasm: add jalr instruction

This patch allows use of the jalr instruction from uasm. It will be used
by a subsequent patch.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
10 years agoMIPS: uasm: add a label variant of beq
Paul Burton [Tue, 24 Dec 2013 03:51:39 +0000 (03:51 +0000)]
MIPS: uasm: add a label variant of beq

This patch allows for use of the beq instruction with labels from uasm,
much as bne & others already do. It will be used by a subsequent patch.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
10 years agoMIPS: inst.h: define microMIPS wait op
Paul Burton [Thu, 9 Jan 2014 15:30:37 +0000 (15:30 +0000)]
MIPS: inst.h: define microMIPS wait op

The opcode for the wait instruction within POOL32AXf was missing. This
patch adds it for use by a subsequent patch.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
10 years agoMIPS: inst.h: define microMIPS sync op
Paul Burton [Thu, 9 Jan 2014 15:27:32 +0000 (15:27 +0000)]
MIPS: inst.h: define microMIPS sync op

The opcode for the sync instruction within POOL32AXf was missing. This
patch adds it for use by a subsequent patch.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
10 years agoMIPS: inst.h: define MT yield op
Paul Burton [Tue, 4 Mar 2014 15:11:12 +0000 (15:11 +0000)]
MIPS: inst.h: define MT yield op

The opcode for the MT ASE yield instruction within the spec3 group was
missing. This patch adds it for use by a subsequent patch.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
10 years agoMIPS: inst.h: define COP0 wait op
Paul Burton [Tue, 24 Dec 2013 03:44:28 +0000 (03:44 +0000)]
MIPS: inst.h: define COP0 wait op

The func field for the wait instruction was missing from inst.h - this
patch adds it.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
10 years agoMIPS: MT: define write_c0_tchalt macro
Paul Burton [Sun, 16 Mar 2014 16:21:34 +0000 (16:21 +0000)]
MIPS: MT: define write_c0_tchalt macro

Define a macro to write to the current TCs TCHalt register. This will be
used by a subsequent patch.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
10 years agoMIPS: add kmap_noncoherent to wire a cached non-coherent TLB entry
Paul Burton [Mon, 3 Mar 2014 12:08:40 +0000 (12:08 +0000)]
MIPS: add kmap_noncoherent to wire a cached non-coherent TLB entry

This is identical to kmap_coherent apart from the cache coherency
attribute used for the TLB entry, so kmap_coherent is abstracted to
kmap_prot which is then called for both kmap_coherent &
kmap_noncoherent. This will be used by a subsequent patch.

Suggested-by: Leonid Yegoshin <leonid.yegoshin@imgtec.com>
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
10 years agoMIPS: SNI: Remove USE_GENERIC_EARLY_PRINTK_8250
Thomas Bogendoerfer [Mon, 7 Apr 2014 22:22:26 +0000 (00:22 +0200)]
MIPS: SNI: Remove USE_GENERIC_EARLY_PRINTK_8250

SNI RM code has its own EARLY_PRINTK support no need for some generic 8250
stuff.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6715/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: Alchemy: Default to noncoherent IO on Au1200 AB
Manuel Lauss [Thu, 10 Apr 2014 20:57:59 +0000 (22:57 +0200)]
MIPS: Alchemy: Default to noncoherent IO on Au1200 AB

CONFIG_DMA_COHERENT is no longer set; default to noncoherent io on
Au1200 revision AB to make USB work.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Cc: Linux-MIPS <linux-mips@linux-mips.org>
Patchwork: https://patchwork.linux-mips.org/patch/6745/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: Octeon: Add PCIe2 support in arch_setup_msi_irq()
Eunbong Song [Fri, 11 Apr 2014 08:32:54 +0000 (08:32 +0000)]
MIPS: Octeon: Add PCIe2 support in arch_setup_msi_irq()

In arch_setup_msi_irq(), there is no case for PCIe2. So board which have PCIe2 functionality
fails to boot with "Kernel panic - not syncing: arch_setup_msi_irq: Invalid octeon_dma_bar_type"
message. This patch solve this problem.

Signed-off-by: Eunbong Song <eunb.song@samsung.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/6747/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: defconfigs: add MTD_SPI_NOR (new dependency for M25P80)
Brian Norris [Thu, 1 May 2014 06:26:45 +0000 (23:26 -0700)]
MIPS: defconfigs: add MTD_SPI_NOR (new dependency for M25P80)

These defconfigs contain the CONFIG_M25P80 symbol, which is now
dependent on the MTD_SPI_NOR symbol. Add CONFIG_MTD_SPI_NOR to satisfy
the new dependency.

At the same time, drop the now-nonexistent CONFIG_MTD_CHAR symbol.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: Huang Shijie <b32955@freescale.com>
Cc: Marek Vasut <marex@denx.de>
Cc: linux-mtd@lists.infradead.org
Patchwork: https://patchwork.linux-mips.org/patch/6878/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: Add __SANE_USERSPACE_TYPES__ to asm/types.h for LL64
Aaro Koskinen [Tue, 6 May 2014 12:55:43 +0000 (15:55 +0300)]
MIPS: Add __SANE_USERSPACE_TYPES__ to asm/types.h for LL64

Allow 64-bit userspace programs to use ll64 types. The define name
comes from commit 2c9c6ce0199a4d252e20c531cfdc9d24e39235c0 (powerpc:
Add __SANE_USERSPACE_TYPES__ to asm/types.h for LL64).

The patch allows to compile perf on MIPS64 and eliminates the following
warnings:

tests/attr.c:74:4: error: format '%llu' expects argument of type 'long
long unsigned int', but argument 6 has type '__u64' [-Werror=format=]

Signed-off-by: Aaro Koskinen <aaro.koskinen@nsn.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/6890/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: Lemote 2F: cs5536: mfgpt: depend on !highres
Sebastian Andrzej Siewior [Tue, 13 May 2014 15:07:05 +0000 (17:07 +0200)]
MIPS: Lemote 2F: cs5536: mfgpt: depend on !highres

This timer does not support oneshot mode and as such the system remains
in periodic mode and won't support high res timers.
This patch adds a note about this in Kconfig and lets it depend on
!highres so users which want to use high timers don' stuck with this
timer.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-mips@linux-mips.org
Cc: Hua Yan <yanh@lemote.com>
Cc: Huacai Chen <chenhc@lemote.com>
Cc: Alex Smith <alex.smith@imgtec.com>
Cc: Hongliang Tao <taohl@lemote.com>
Cc: Wu Zhangjin <wuzhangjin@gmail.com>
Patchwork: https://patchwork.linux-mips.org/patch/6935/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: SMP: Remove plat_smp_ops cpus_done method.
Ralf Baechle [Tue, 27 May 2014 08:56:23 +0000 (10:56 +0200)]
MIPS: SMP: Remove plat_smp_ops cpus_done method.

Nothing was using the method and there isn't any need for this hook.  This
leaves smp_cpus_done() empty for the moment.

As suggested by Paul Bolle <pebolle@tiscali.nl>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: DTS: Fix missing device_type="memory" property in memory nodes
Leif Lindholm [Mon, 26 May 2014 13:42:49 +0000 (14:42 +0100)]
MIPS: DTS: Fix missing device_type="memory" property in memory nodes

A few platforms lack a 'device_type = "memory"' for their memory
nodes, relying on an old ppc quirk in order to discover its memory.
Add the missing data so that all parsing code can find memory nodes
correctly.

Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Acked-by: John Crispin <blogic@openwrt.org>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Cc: linux-mips@linux-mips.org
Cc: devicetree@vger.kernel.org
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: <stable@vger.kernel.org>
Cc: gaurav.minocha@alumni.ubc.ca
Patchwork: https://patchwork.linux-mips.org/patch/6989/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: SEAD3: Introduce the use of the managed version of kzalloc
Himangi Saraogi [Tue, 20 May 2014 18:09:42 +0000 (23:39 +0530)]
MIPS: SEAD3: Introduce the use of the managed version of kzalloc

This patch moves data allocated using kzalloc to managed data allocated
using devm_kzalloc and cleans now unnecessary kfrees in probe and remove
functions. Also, the now unnecessary labels out_mem and out are done
away with. The error handling code is moved under if and return 0 is now
at the end of the function.

The following Coccinelle semantic patch was used for making the change:

@platform@
identifier p, probefn, removefn;
@@
struct platform_driver p = {
  .probe = probefn,
  .remove = removefn,
};

@prb@
identifier platform.probefn, pdev;
expression e, e1, e2;
@@
probefn(struct platform_device *pdev, ...) {
  <+...
- e = kzalloc(e1, e2)
+ e = devm_kzalloc(&pdev->dev, e1, e2)
  ...
?-kfree(e);
  ...+>
}

@rem depends on prb@
identifier platform.removefn;
expression e;
@@
removefn(...) {
  <...
- kfree(e);
  ...>
}

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Tested-by: Markos Chandras <markos.chandras@imgtec.com>
Reviewed-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/6977/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: malta: Remove 'maybe_unused' attribute from ememsize{, _str}
Markos Chandras [Fri, 23 May 2014 12:31:32 +0000 (13:31 +0100)]
MIPS: malta: Remove 'maybe_unused' attribute from ememsize{, _str}

First introduced in e6ca4e5bf11466b5e9423a1e4ea51a8216c4b9b6
"MIPS: malta: malta-memory: Add support for the 'ememsize' variable"
but it is not needed since both variables are visible to the compiler.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: <stable@vger.kernel.org> # v3.15+
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6985/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: Kconfig: Make MIPS_MT_SMP a regular Kconfig symbol
Markos Chandras [Tue, 8 Apr 2014 10:59:10 +0000 (11:59 +0100)]
MIPS: Kconfig: Make MIPS_MT_SMP a regular Kconfig symbol

Following the removal of SMTC, MIPS_MT_SMP is the only available
MT/SMP option so make it a regular Kconfig symbol.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: Markos Chandras <markos.chandras@imgtec.com>
Patchwork: https://patchwork.linux-mips.org/patch/6720/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: MT: Remove SMTC support
Ralf Baechle [Fri, 23 May 2014 14:29:44 +0000 (16:29 +0200)]
MIPS: MT: Remove SMTC support

Nobody is maintaining SMTC anymore and there also seems to be no userbase.
Which is a pity - the SMTC technology primarily developed by Kevin D.
Kissell <kevink@paralogos.com> is an ingenious demonstration for the MT
ASE's power and elegance.

Based on Markos Chandras <Markos.Chandras@imgtec.com> patch
https://patchwork.linux-mips.org/patch/6719/ which while very similar did
no longer apply cleanly when I tried to merge it plus some additional
post-SMTC cleanup - SMTC was a feature as tricky to remove as it was to
merge once upon a time.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: Fix a typo error in AUDIT_ARCH definition
Huacai Chen [Wed, 21 May 2014 02:49:19 +0000 (10:49 +0800)]
MIPS: Fix a typo error in AUDIT_ARCH definition

Missing a "|" in AUDIT_ARCH_MIPSEL64N32 macro definition.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Reviewed-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: John Crispin <john@phrozen.org>
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: linux-mips@linux-mips.org
Cc: Fuxin Zhang <zhangfx@lemote.com>
Cc: Zhangjin Wu <wuzhangjin@gmail.com>
Patchwork: https://patchwork.linux-mips.org/patch/6978/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: RM9000: Remove the now unused CPU_RM9000 definition.
Ralf Baechle [Thu, 22 May 2014 15:22:41 +0000 (17:22 +0200)]
MIPS: RM9000: Remove the now unused CPU_RM9000 definition.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: RM9000: Remove support for probing the CPU core.
Ralf Baechle [Thu, 22 May 2014 15:21:13 +0000 (17:21 +0200)]
MIPS: RM9000: Remove support for probing the CPU core.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: RM9000: Remove support for idle loop.
Ralf Baechle [Thu, 22 May 2014 15:19:20 +0000 (17:19 +0200)]
MIPS: RM9000: Remove support for idle loop.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: Ralink: Remove surviving RM9000 bits.
Ralf Baechle [Thu, 22 May 2014 15:13:59 +0000 (17:13 +0200)]
MIPS: Ralink: Remove surviving RM9000 bits.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: Remove code protected by CONFIG_SYS_HAS_CPU_RM9000.
Ralf Baechle [Thu, 22 May 2014 15:06:03 +0000 (17:06 +0200)]
MIPS: Remove code protected by CONFIG_SYS_HAS_CPU_RM9000.

RM9000 support was removed a while ago but this bit crept back in through
commit 69f24d17 [MIPS: Optimize current_cpu_type() for better code.] which
had been developed before but merged after RM9000 support was removed.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Reported-by: Paul Bolle <pebolle@tiscali.nl>
10 years agoMIPS: BCM1480: Remove checks for CONFIG_SIBYTE_BCM1480_PROF
Paul Bolle [Thu, 22 May 2014 09:24:19 +0000 (11:24 +0200)]
MIPS: BCM1480: Remove checks for CONFIG_SIBYTE_BCM1480_PROF

There are two checks for CONFIG_SIBYTE_BCM1480_PROF in the tree since
v2.6.15. The related Kconfig symbol has never been added to the tree. So
these checks have always evaluated to false. Besides, one of these
checks guards a call of sbprof_cpu_intr(). But that function is not
defined. Remove all this.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/6981/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: MSP71xx: Remove checks for two macros
Paul Bolle [Thu, 22 May 2014 09:34:51 +0000 (11:34 +0200)]
MIPS: MSP71xx: Remove checks for two macros

Since v2.6.39 there are checks for CONFIG_MSP_HAS_DUAL_USB and checks
for CONFIG_MSP_HAS_TSMAC in the code. The related Kconfig symbols have
never been added. These checks have evaluated to false for three years
now. Remove them and the code they have been hiding.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-mips@linux-mips.org
Cc: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/6982/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: Octeon: Remove checks for CONFIG_CAVIUM_GDB
Paul Bolle [Tue, 20 May 2014 16:16:14 +0000 (18:16 +0200)]
MIPS: Octeon: Remove checks for CONFIG_CAVIUM_GDB

Three checks for CONFIG_CAVIUM_GDB were added in v2.6.29. But the
Kconfig symbol CAVIUM_GDB was never added to the tree. Remove these
checks.

Also remove the last reference to octeon_get_boot_debug_flag(). There is
no definition of that function anyway.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Tested-by: Andreas Herrmann <andreas.herrmann@caviumnetworks.com>)
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/6976/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: PNX833x: Remove checks for CONFIG_I2C_PNX0105
Paul Bolle [Tue, 20 May 2014 11:42:03 +0000 (13:42 +0200)]
MIPS: PNX833x: Remove checks for CONFIG_I2C_PNX0105

Checks for CONFIG_I2C_PNX0105 were added in v2.6.28. But the related
Kconfig symbol has not been added to the tree. Remove these checks.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/6958/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: Remove CONFIG_PMCTWILED completely
Paul Bolle [Tue, 20 May 2014 11:34:36 +0000 (13:34 +0200)]
MIPS: Remove CONFIG_PMCTWILED completely

Commit 8b284dbc2200 ("MIPS: PNX Removing dead CONFIG_PMCTWILED") missed
one reference to CONFIG_PMCTWILED in the code. It also missed one
related reference to pmctwiled_setup(). Remove these references now.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/6957/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: Remove check for CONFIG_CAVIUM_REPORT_SINGLE_BIT_ECC
Paul Bolle [Tue, 20 May 2014 10:50:55 +0000 (12:50 +0200)]
MIPS: Remove check for CONFIG_CAVIUM_REPORT_SINGLE_BIT_ECC

A check for CONFIG_CAVIUM_REPORT_SINGLE_BIT_ECC was added in v2.6.29,
but without the related Kconfig symbol. Remove this check.

Also remove the test for an "ecc_verbose" kernel parameter. It is
undocumented and has no effect anyway.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/6955/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: c-r4k: Call R4600_HIT_CACHEOP_WAR_IMPL only for 32 byte cache lines.
Ralf Baechle [Thu, 22 May 2014 07:55:02 +0000 (09:55 +0200)]
MIPS: c-r4k: Call R4600_HIT_CACHEOP_WAR_IMPL only for 32 byte cache lines.

R4600_HIT_CACHEOP_WAR_IMPL is only needed on R4600 v1.6 and the R4600 has
data cache lines that are always 32 bytes so the call is pointless in
r4k_blast_dcache_page_dc64.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Reduce microMIPS bloat.
Ralf Baechle [Wed, 30 Apr 2014 09:09:44 +0000 (11:09 +0200)]
MIPS: math-emu: Reduce microMIPS bloat.

Move microMIPS32_to_MIPS32() to a separate file which only gets built
for mipsMIPS configurations; for other configurations the optimizer
eleminates calls to microMIPS32_to_MIPS32().

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Switch to using the MIPS rounding modes.
Ralf Baechle [Wed, 30 Apr 2014 09:21:55 +0000 (11:21 +0200)]
MIPS: math-emu: Switch to using the MIPS rounding modes.

Previously math-emu was using the IEEE-754 constants internally.  These
were differing by having the constants for rounding to +/- infinity
switched, so a conversion was necessary.  This would be entirely
avoidable if the MIPS constants were used throughout, so get rid of
the bloat.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Nuke alternative names for IEEE-754 rounding modes.
Ralf Baechle [Tue, 29 Apr 2014 23:17:19 +0000 (01:17 +0200)]
MIPS: math-emu: Nuke alternative names for IEEE-754 rounding modes.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: Sort out mm_isBranchInstr.
Ralf Baechle [Tue, 29 Apr 2014 13:21:24 +0000 (15:21 +0200)]
MIPS: Sort out mm_isBranchInstr.

mm_isBranchInstr() did reside in the math emu code even though it logically
is separate and also is used outside the math emu code.  In addition GCC 4.9.0
leaves the following unnnecessarily bloated function body for a non-microMIPS
configuration:

<mm_isBranchInstr>:
    105c:       afa50004        sw      a1,4(sp)
    1060:       afa60008        sw      a2,8(sp)
    1064:       afa7000c        sw      a3,12(sp)
    1068:       03e00008        jr      ra
    106c:       00001021        move    v0,zero

which stores arguments that are never going to be used on the stack frame.

Move mm_isBranchInstr() from cp1emu.c to branch.c, then split mm_isBranchInstr()
into a __mm_isBranchInstr() core and a mm_isBranchInstr() wrapper inline function
which only invokes __mm_isBranchInstr() on microMIPS configurations.

This shaves off 112 bytes off the kernel and improves code flow a bit.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: Disable MIPS16/microMIPS crap for platforms not supporting these ASEs.
Ralf Baechle [Mon, 28 Apr 2014 23:49:24 +0000 (01:49 +0200)]
MIPS: Disable MIPS16/microMIPS crap for platforms not supporting these ASEs.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Inline fpu_emulator_init_fpu()
Ralf Baechle [Mon, 28 Apr 2014 20:34:01 +0000 (22:34 +0200)]
MIPS: math-emu: Inline fpu_emulator_init_fpu()

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Cleanup coding style.
Ralf Baechle [Fri, 25 Apr 2014 23:49:14 +0000 (01:49 +0200)]
MIPS: math-emu: Cleanup coding style.

 o Only define variables in the outermost block
 o One empty line at most
 o Format comments as per CodingStyle
 o Update FSF address in licensing term comment
 o Spell FPU and MIPS in all capitals.
 o Remove ####-type of lines in comments.
 o Try to make things a bit most consistent between sp_*.c / dp_*.c files.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Cleanup definition of structs describe sp/dp floats.
Ralf Baechle [Fri, 25 Apr 2014 13:48:40 +0000 (15:48 +0200)]
MIPS: math-emu: Cleanup definition of structs describe sp/dp floats.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Rename get_rounding() functions.
Ralf Baechle [Fri, 25 Apr 2014 08:54:06 +0000 (10:54 +0200)]
MIPS: math-emu: Rename get_rounding() functions.

There are two version of get_rounding(), one for single precision, one
for double precision.  Add a ieee754sp_ rsp. ieee754dp_ prefix for
clarity.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Get rid of the useless parts of exception handling.
Ralf Baechle [Fri, 25 Apr 2014 01:19:57 +0000 (03:19 +0200)]
MIPS: math-emu: Get rid of the useless parts of exception handling.

All it really did was throw a printk for no obvious reason.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Move various objects into an ar library.
Ralf Baechle [Thu, 24 Apr 2014 23:52:46 +0000 (01:52 +0200)]
MIPS: math-emu: Move various objects into an ar library.

ieee754d.o contains only debug code and dp_sqrt.o and sp_sqrt.o contain
code which for MIPS I/II/III systems we don't want to link.  Again the
savings can be considerable for some systems:

$ mips-linux-size --totals ieee754d.o dp_sqrt.o sp_sqrt.o
   text    data     bss     dec     hex filename
   1624       0       0    1624     658 ieee754d.o
   2016       0       0    2016     7e0 dp_sqrt.o
    736       0       0     736     2e0 sp_sqrt.o
   4376       0       0    4376    1118 (TOTALS)

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Inline ieee754sp_issnan and ieee754dp_issnan.
Ralf Baechle [Thu, 24 Apr 2014 22:40:42 +0000 (00:40 +0200)]
MIPS: math-emu: Inline ieee754sp_issnan and ieee754dp_issnan.

Shaves another 16 bytes off but more importantly avoids function calls.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Remove unused code.
Ralf Baechle [Thu, 24 Apr 2014 22:29:50 +0000 (00:29 +0200)]
MIPS: math-emu: Remove unused code.

Shrinks the FPU emulator by 4528 bytes.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Remove unused ieee754sp_bestnan() and ieee754dp_bestnan().
Ralf Baechle [Tue, 22 Apr 2014 15:11:01 +0000 (17:11 +0200)]
MIPS: math-emu: Remove unused ieee754sp_bestnan() and ieee754dp_bestnan().

Both are unused since lmo commit fdffbafbb38723618626c70ffdc6ff9175cdffa2
[Lots of FPU bug fixes from Kjeld Borch Egevang.]

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Inline ieee754dp_finite and ieee754dp_finite().
Ralf Baechle [Tue, 22 Apr 2014 14:52:01 +0000 (16:52 +0200)]
MIPS: math-emu: Inline ieee754dp_finite and ieee754dp_finite().

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Eleminate duplicate definitions of identical macros.
Ralf Baechle [Tue, 22 Apr 2014 14:33:07 +0000 (16:33 +0200)]
MIPS: math-emu: Eleminate duplicate definitions of identical macros.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Use SPSIGN() rather than DPSIGN() in ieee754sp_sub().
Ralf Baechle [Tue, 22 Apr 2014 14:02:03 +0000 (16:02 +0200)]
MIPS: math-emu: Use SPSIGN() rather than DPSIGN() in ieee754sp_sub().

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Replace DP_MBITS with DP_FBITS and SP_MBITS with SP_FBITS.
Ralf Baechle [Tue, 22 Apr 2014 13:51:55 +0000 (15:51 +0200)]
MIPS: math-emu: Replace DP_MBITS with DP_FBITS and SP_MBITS with SP_FBITS.

Both were defined as 23 rsp. 52 though the mentissa is actually a bit more
than the fraction.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Call ieee754di_xcpt, not ieee754si_xcpt in ieee754dp_cmp.
Ralf Baechle [Tue, 22 Apr 2014 11:31:24 +0000 (13:31 +0200)]
MIPS: math-emu: Call ieee754di_xcpt, not ieee754si_xcpt in ieee754dp_cmp.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Cleanup stdarg usage including apparently bogus comment.
Ralf Baechle [Sat, 19 Apr 2014 23:20:08 +0000 (01:20 +0200)]
MIPS: math-emu: Cleanup stdarg usage including apparently bogus comment.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Remove #if 1 and dead code from its #else branch.
Ralf Baechle [Sat, 19 Apr 2014 21:01:34 +0000 (23:01 +0200)]
MIPS: math-emu: Remove #if 1 and dead code from its #else branch.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Cleanup ieee754si_indef() / ieee754di_indef().
Ralf Baechle [Sat, 19 Apr 2014 12:20:54 +0000 (14:20 +0200)]
MIPS: math-emu: Cleanup ieee754si_indef() / ieee754di_indef().

LONG_LONG_MAX is a symbol defined in <limits.h> which may not be available
so better rely on something provided by a kernel header.  While at it,
turn these function-like macros into inline functions.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Convert debug printks to pr_debug getting.
Ralf Baechle [Sat, 19 Apr 2014 12:03:37 +0000 (14:03 +0200)]
MIPS: math-emu: Convert debug printks to pr_debug getting.

And another bunch of #ifdefs bite the dust.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Get rid of unuable extended precision support.
Ralf Baechle [Sat, 19 Apr 2014 11:18:08 +0000 (13:18 +0200)]
MIPS: math-emu: Get rid of unuable extended precision support.

No usable functionality and nothig does ever define IEEE854_XP anyway.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: IP22: This platform may come with either MIPS III or MIPS IV CPUs.
Ralf Baechle [Fri, 25 Apr 2014 13:52:18 +0000 (15:52 +0200)]
MIPS: IP22: This platform may come with either MIPS III or MIPS IV CPUs.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Remove most ifdefery.
Ralf Baechle [Sat, 19 Apr 2014 11:11:37 +0000 (13:11 +0200)]
MIPS: math-emu: Remove most ifdefery.

Most of these tests should be runtime tests.  This also finally means
that on a MIPS III systems MIPS IV opcodes are going to result in an
exception as they're supposed to.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Turn macros into functions where possible.
Ralf Baechle [Fri, 18 Apr 2014 22:36:32 +0000 (00:36 +0200)]
MIPS: math-emu: Turn macros into functions where possible.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Harden ieee754int.h against multiple inclusion.
Ralf Baechle [Fri, 18 Apr 2014 22:15:40 +0000 (00:15 +0200)]
MIPS: math-emu: Harden ieee754int.h against multiple inclusion.

The header file had no include guards; this only happened to work because
the file only contains macro definitions and protypes.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Reformat code according to coding style.
Ralf Baechle [Wed, 16 Apr 2014 09:00:12 +0000 (11:00 +0200)]
MIPS: math-emu: Reformat code according to coding style.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Move all debug fs code to a separate file.
Ralf Baechle [Wed, 16 Apr 2014 00:46:11 +0000 (02:46 +0200)]
MIPS: math-emu: Move all debug fs code to a separate file.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Remove fine example of cargo cult programming.
Ralf Baechle [Wed, 16 Apr 2014 00:24:08 +0000 (02:24 +0200)]
MIPS: math-emu: Remove fine example of cargo cult programming.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Header file weeding.
Ralf Baechle [Wed, 16 Apr 2014 00:09:53 +0000 (02:09 +0200)]
MIPS: math-emu: Header file weeding.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: branch: Make inclusion of <asm/branch.h> safe.
Ralf Baechle [Wed, 16 Apr 2014 00:09:04 +0000 (02:09 +0200)]
MIPS: branch: Make inclusion of <asm/branch.h> safe.

It was relying on other headers having been included before.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Use helpers to manipulate CAUSEF_BD flag.
Ralf Baechle [Tue, 15 Apr 2014 23:59:03 +0000 (01:59 +0200)]
MIPS: math-emu: Use helpers to manipulate CAUSEF_BD flag.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: branch: New helpers to modify branch delay slot flag in struct pt_regs
Ralf Baechle [Tue, 15 Apr 2014 23:52:32 +0000 (01:52 +0200)]
MIPS: branch: New helpers to modify branch delay slot flag in struct pt_regs

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Get rid of typedefs.
Ralf Baechle [Tue, 15 Apr 2014 23:31:11 +0000 (01:31 +0200)]
MIPS: math-emu: Get rid of typedefs.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Use English spelling of `constant' rather than Danish.
Ralf Baechle [Tue, 15 Apr 2014 23:16:02 +0000 (01:16 +0200)]
MIPS: math-emu: Use English spelling of `constant' rather than Danish.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Mark exception handling functions as __cold.
Ralf Baechle [Tue, 15 Apr 2014 22:47:59 +0000 (00:47 +0200)]
MIPS: math-emu: Mark exception handling functions as __cold.

Optimizes the code flow and shaves of half a percent of the math-emu
code size.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: math-emu: Use __BITFIELD_FIELD to eleminate redundant definitions.
Ralf Baechle [Tue, 15 Apr 2014 22:40:02 +0000 (00:40 +0200)]
MIPS: math-emu: Use __BITFIELD_FIELD to eleminate redundant definitions.

Union _ieee754sp was even duplicated even though there are no endian
dependencies in it all.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: Move definition of __BITFIELD_FIELD to sharable header.
Ralf Baechle [Tue, 15 Apr 2014 22:39:02 +0000 (00:39 +0200)]
MIPS: Move definition of __BITFIELD_FIELD to sharable header.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMerge tag 'sound-3.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
Linus Torvalds [Tue, 20 May 2014 07:50:38 +0000 (16:50 +0900)]
Merge tag 'sound-3.15-rc6' of git://git./linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Unfortunately this update became bigger than previous pull requests,
  which is almost a pattern in rc5-6.  But, the only obvious big changes
  are for the new Intel DSP ASoC drivers, so the impact must be fairly
  limited.

  Other than that, usual small fixes in various fields: HD-audio, ASoC
  core and ASoC fsl and codec drivers"

* tag 'sound-3.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (26 commits)
  ALSA: sb_mixer: missing return statement
  ASoC: wm8962: Update register CLASS_D_CONTROL_1 to be non-volatile
  ASoC: Intel: Fix Baytrail SST DSP firmware loading
  ALSA: hda - mask buggy stream DMA0 for Broadwell display controller
  ALSA: hda - Add new GPU codec ID to snd-hda
  ASoC: fsl_esai: Set PCRC and PRRC registers at the end of hw_params()
  ASoC: fsl_esai: Only bypass sck_div for EXTAL source
  ASoC: fsl_esai: Fix incorrect condition within ratio range check for FP
  ASoC: dapm: Fix SUSPEND -> OFF bias sequence
  ASoC: dapm: Skip CODEC<->CODEC links in connect_dai_link_widgets()
  ASoC: pcm: Fix incorrect condition check for case SNDRV_PCM_TRIGGER_SUSPEND
  ALSA: hda - add headset mic detect quirks for three Dell laptops
  ASoC: Update Cirrus Logic CODEC maintainers.
  ASoC: Intel: Fix block offset calculations.
  ASoC: Intel: Fix check for pdata usage before dereference.
  ASoC: Intel: Fix stream position pointer.
  ASoC: Intel: Fix allow hw_params to be called more than once.
  ASoC: Intel: Fix Audio DSP usage when IOMMU is enabled.
  ASoC: Intel: Fix Haswell/Broadwell DSP page table creation.
  ASoC: Intel: Fix allocated block list usage when adding blocks.
  ...

10 years agoMerge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Linus Torvalds [Tue, 20 May 2014 07:47:33 +0000 (16:47 +0900)]
Merge branch 'upstream' of git://git.linux-mips.org/ralf/upstream-linus

Pull MIPS fixes from Ralf Baechle:
 "MIPS fixes for various loose ends:

   - Fix workarounds for R4000 erratum.
   - Patch up DEC, Siemens-Nixdorf and Loongson hardware support.
   - Wire up renameat2 syscall.
   - Delete unused file - it was causing false warnings from maintenance
     scripts.
   - Revert a patch because it's functionality is now implemented twice
     which causes superfluous /proc/cpuinfo output.
   - Fix a microMIPS regression"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  MIPS: mm: Fix broken microMIPS kernel regression.
  MIPS: Add new AUDIT_ARCH token for the N32 ABI on MIPS64
  MIPS: Wire up renameat2 syscall.
  MIPS: inst.h: Rename BITFIELD_FIELD to __BITFIELD_FIELD.
  MIPS: Remove file missed when removing rm9k support a while ago.
  MIPS/loongson2_cpufreq: Fix CPU clock rate setting
  MIPS: Loongson: No need to select GENERIC_HARDIRQS_NO__DO_IRQ
  MIPS: csum_partial.S CPU_DADDI_WORKAROUNDS bug fix
  MIPS: __strncpy_from_user_asm CPU_DADDI_WORKAROUNDS bug fix
  MIPS: __delay CPU_DADDI_WORKAROUNDS bug fix
  MIPS: DEC/SNI: O32 wrapper stack switching fixes
  MIPS: DEC: Bus error handler <asm/cpu-type.h> fixes
  MAINTAINERS: TURBOchannel: Update entry
  Revert "MIPS: MT: proc: Add support for printing VPE and TC ids"

10 years agoMerge branch 'parisc-3.15-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller...
Linus Torvalds [Tue, 20 May 2014 05:35:28 +0000 (14:35 +0900)]
Merge branch 'parisc-3.15-4' of git://git./linux/kernel/git/deller/parisc-linux

Pull parisc fixes from Helge Deller:
 "There are two patches in here:

  The first patch greatly improves latency and corrects the memory
  ordering in our light-weight atomic locking syscall.

  The second patch ratelimits printing of userspace segfaults in the
  same way as it's done on other platforms.  This fixes a possible DOS
  on parisc since it prevents the syslog to grow too fast.  For example,
  when the debian acl2 package was built on our debian buildd servers,
  this package produced lots of gigabytes in syslog in very short time
  and thus filled our harddisks, which then turned the server nearly
  completely unaccessible and unresponsive"

* 'parisc-3.15-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: Improve LWS-CAS performance
  parisc: ratelimit userspace segfault printing

10 years agoMerge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Linus Torvalds [Tue, 20 May 2014 05:33:48 +0000 (14:33 +0900)]
Merge tag 'arm64-fixes' of git://git./linux/kernel/git/arm64/linux

Pull two arm64 fixes from Catalin Marinas:
 - arm64 migrate_irqs() fix following commit ffde1de64012 (irqchip: Gic:
   Support forced affinity setting)
 - fix arm64 pud_huge() to return 0 when only 2 levels page tables are
   used (__PAGETABLE_PMD_FOLDED defined and pmd_huge already covers
   block entries at the first level), otherwise KVM gets confused

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: fix pud_huge() for 2-level pagetables
  arm64: use cpu_online_mask when using forced irq_set_affinity

10 years agoMerge tag 'metag-for-v3.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan...
Linus Torvalds [Tue, 20 May 2014 05:30:34 +0000 (14:30 +0900)]
Merge tag 'metag-for-v3.15-2' of git://git./linux/kernel/git/jhogan/metag

Pull Metag architecture and related fixes from James Hogan:
 "Mostly fixes for metag and parisc relating to upgrowing stacks.

   - Fix missing compiler barriers in metag memory barriers.
   - Fix BUG_ON on metag when RLIMIT_STACK hard limit is increased
     beyond safe value.
   - Make maximum stack size configurable.  This reduces the default
     user stack size back to 80MB (especially on parisc after their
     removal of _STK_LIM_MAX override).  This only affects metag and
     parisc.
   - Remove metag _STK_LIM_MAX override to match other arches and follow
     parisc, now that it is safe to do so (due to the BUG_ON fix
     mentioned above).
   - Finally now that both metag and parisc _STK_LIM_MAX overrides have
     been removed, it makes sense to remove _STK_LIM_MAX altogether"

* tag 'metag-for-v3.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag:
  asm-generic: remove _STK_LIM_MAX
  metag: Remove _STK_LIM_MAX override
  parisc,metag: Do not hardcode maximum userspace stack size
  metag: Reduce maximum stack size to 256MB
  metag: fix memory barriers

10 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Tue, 20 May 2014 05:28:33 +0000 (14:28 +0900)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm/intel fixes from Dave Airlie:
 "Just some intel fixes.

  I have some radeon ones but I need to get some patches dropped from
  the pull req"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/i915: Increase WM memory latency values on SNB
  drm/i915: restore backlight precision when converting from ACPI
  drm/i915: Use the first mode if there is no preferred mode in the EDID
  drm/i915/dp: force eDP lane count to max available lanes on BDW
  drm/i915/vlv: reset VLV media force wake request register
  drm/i915/SDVO: For sysfs link put directory and target in correct order
  drm/i915: use lane count and link rate from VBT as minimums for eDP
  drm/i915: clean up VBT eDP link param decoding
  drm/i915: consider the source max DP lane count too

10 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 20 May 2014 05:21:11 +0000 (14:21 +0900)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86 fixes from Peter Anvin.

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86-64, modify_ldt: Make support for 16-bit segments a runtime option
  x86, mm, hugetlb: Add missing TLB page invalidation for hugetlb_cow()
  x86, rdrand: When nordrand is specified, disable RDSEED as well