platform/kernel/linux-rpi.git
9 years agoARCv2: Allow older gcc to cope with new regime of ARCv2/ARCompact support
Vineet Gupta [Sat, 27 Jun 2015 11:26:41 +0000 (16:56 +0530)]
ARCv2: Allow older gcc to cope with new regime of ARCv2/ARCompact support

-no-ll64 is specific to ARCv2 ISA, and is obviously not supported by
older ARC gcc - in this case the one hosted by linux-next sanity build
service.

Ensure that it doesn't get included for ISA_ARCOMPACT

Reported-by: Guenter Roeck <private@roeck-us.net>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARCv2: [vdk] dts files and defconfig for HS38 VDK
Ruud Derwig [Wed, 3 Dec 2014 14:52:41 +0000 (15:52 +0100)]
ARCv2: [vdk] dts files and defconfig for HS38 VDK

 - CONFIG_ARC_UBOOT_SUPPORT to handle arguments passed in r0, r1, r2
 - CONFIG_DEVTMPFS_MOUNT for mouting rootfs since it uses external cpio
   for rootfs

Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Signed-off-by: Ruud Derwig <rderwig@synopsys.com>
[vgupta: folded the Main baord DT files for smp/up into one]
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARCv2: [axs103] Support ARC SDP FPGA platform for HS38x cores
Vineet Gupta [Mon, 9 Mar 2015 09:03:40 +0000 (14:33 +0530)]
ARCv2: [axs103] Support ARC SDP FPGA platform for HS38x cores

Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: [axs101] Prepare for AXS103
Alexey Brodkin [Wed, 1 Apr 2015 13:21:00 +0000 (18:51 +0530)]
ARC: [axs101] Prepare for AXS103

To avoid duplicating the MB DTS file, move the MB intc entry into cpu
card specific file

Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARCv2: [nsim*hs*] Support simulation platforms for HS38x cores
Vineet Gupta [Mon, 9 Mar 2015 09:00:19 +0000 (14:30 +0530)]
ARCv2: [nsim*hs*] Support simulation platforms for HS38x cores

Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARCv2: All bits in place, allow ARCv2 builds
Vineet Gupta [Mon, 9 Mar 2015 08:31:08 +0000 (14:01 +0530)]
ARCv2: All bits in place, allow ARCv2 builds

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARCv2: SLC: Handle explcit flush for DMA ops (w/o IO-coherency)
Vineet Gupta [Fri, 3 Apr 2015 09:37:07 +0000 (12:37 +0300)]
ARCv2: SLC: Handle explcit flush for DMA ops (w/o IO-coherency)

L2 cache on ARCHS processors is called SLC (System Level Cache)
For working DMA (in absence of hardware assisted IO Coherency) we need
to manage SLC explicitly when buffers transition between cpu and
controllers.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARCv2: STAR 9000837815 workaround hardware exclusive transactions livelock
Vineet Gupta [Thu, 11 Dec 2014 10:35:16 +0000 (16:05 +0530)]
ARCv2: STAR 9000837815 workaround hardware exclusive transactions livelock

A quad core SMP build could get into hardware livelock with concurrent
LLOCK/SCOND. Workaround that by adding a PREFETCHW which is serialized by
SCU (System Coherency Unit). It brings the cache line in Exclusive state
and makes others invalidate their lines. This gives enough time for
winner to complete the LLOCK/SCOND, before others can get the line back.

The prefetchw in the ll/sc loop is not nice but this is the only
software workaround for current version of RTL.

Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: Reduce bitops lines of code using macros
Vineet Gupta [Tue, 31 Mar 2015 17:08:21 +0000 (22:38 +0530)]
ARC: Reduce bitops lines of code using macros

No semantical changes !

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARCv2: barriers
Vineet Gupta [Wed, 11 Mar 2015 16:12:37 +0000 (21:42 +0530)]
ARCv2: barriers

ARCv2 based HS38 cores are weakly ordered and thus explicit barriers for
kernel proper.

SMP barrier is provided by DMB instruction which also guarantees local
barrier hence used as backend of smp_*mb() as well as *mb() APIs

Also hookup barriers into MMIO accessors to avoid ordering issues in IO

Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoarch: conditionally define smp_{mb,rmb,wmb}
Vineet Gupta [Wed, 11 Mar 2015 16:12:02 +0000 (21:42 +0530)]
arch: conditionally define smp_{mb,rmb,wmb}

That way arches can define the minimal versions and still #include
asm-generic for defaults (vs. defining defaults in arch code)

See new barrier.h in arc for usage !

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: add smp barriers around atomics per Documentation/atomic_ops.txt
Vineet Gupta [Thu, 20 Nov 2014 10:12:09 +0000 (15:42 +0530)]
ARC: add smp barriers around atomics per Documentation/atomic_ops.txt

 - arch_spin_lock/unlock were lacking the ACQUIRE/RELEASE barriers
   Since ARCv2 only provides load/load, store/store and all/all, we need
   the full barrier

 - LLOCK/SCOND based atomics, bitops, cmpxchg, which return modified
   values were lacking the explicit smp barriers.

 - Non LLOCK/SCOND varaints don't need the explicit barriers since that
   is implicity provided by the spin locks used to implement the
   critical section (the spin lock barriers in turn are also fixed in
   this commit as explained above

Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: stable@vger.kernel.org
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: add compiler barrier to LLSC based cmpxchg
Vineet Gupta [Thu, 13 Nov 2014 10:24:01 +0000 (15:54 +0530)]
ARC: add compiler barrier to LLSC based cmpxchg

When auditing cmpxchg call sites, Chuck noted that gcc was optimizing
away some of the desired LDs.

| do {
| new = old = *ipi_data_ptr;
| new |= 1U << msg;
| } while (cmpxchg(ipi_data_ptr, old, new) != old);

was generating to below

8015cef8: ld         r2,[r4,0]  <-- First LD
8015cefc: bset       r1,r2,r1
|
8015cf00: llock      r3,[r4]  <-- atomic op
8015cf04: brne       r3,r2,8015cf10
8015cf08: scond      r1,[r4]
8015cf0c: bnz        8015cf00
|
8015cf10: brne       r3,r2,8015cf00  <-- Branch doesn't go to orig LD

Although this was fixed by adding a ACCESS_ONCE in this call site, it
seems safer (for now at least) to add compiler barrier to LLSC based
cmpxchg

Reported-by: Chuck Jordan <cjordan@synopsys,com>
Cc: <stable@vger.kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARCv2: SMP: intc: IDU 2nd level intc for dynamic IRQ distribution
Vineet Gupta [Mon, 9 Mar 2015 08:33:10 +0000 (14:03 +0530)]
ARCv2: SMP: intc: IDU 2nd level intc for dynamic IRQ distribution

Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARCv2: SMP: clocksource: Enable Global Real Time counter
Vineet Gupta [Wed, 24 Dec 2014 13:11:55 +0000 (18:41 +0530)]
ARCv2: SMP: clocksource: Enable Global Real Time counter

Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARCv2: SMP: ARConnect debug/robustness
Vineet Gupta [Fri, 7 Nov 2014 05:15:28 +0000 (10:45 +0530)]
ARCv2: SMP: ARConnect debug/robustness

- Handle possible interrupt coalescing from MCIP
- chk if prev IPI ack before sending new

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARCv2: SMP: Support ARConnect (MCIP) for Inter-Core-Interrupts et al
Vineet Gupta [Wed, 10 Sep 2014 13:35:38 +0000 (19:05 +0530)]
ARCv2: SMP: Support ARConnect (MCIP) for Inter-Core-Interrupts et al

Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: make plat_smp_ops weak to allow over-rides
Vineet Gupta [Thu, 4 Jun 2015 12:07:23 +0000 (17:37 +0530)]
ARC: make plat_smp_ops weak to allow over-rides

This allows platforms to provide their own cpu wakeup routines
as well as IPI send / clear backends, while allowing a SMP kernel w/o
any such backend to build/boot

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARCv2: clocksource: Introduce 64bit local RTC counter
Vineet Gupta [Thu, 7 Nov 2013 09:27:16 +0000 (14:57 +0530)]
ARCv2: clocksource: Introduce 64bit local RTC counter

Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARCv2: extable: Enable sorting at build time
Vineet Gupta [Fri, 22 Nov 2013 07:35:58 +0000 (13:05 +0530)]
ARCv2: extable: Enable sorting at build time

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARCv2: Adhere to Zero Delay loop restriction
Vineet Gupta [Mon, 7 Oct 2013 12:40:08 +0000 (18:10 +0530)]
ARCv2: Adhere to Zero Delay loop restriction

Branch insn can't be scheduled as last insn of Zero Overhead loop

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARCv2: optimised string/mem lib routines
Claudiu Zissulescu [Fri, 21 Nov 2014 08:09:25 +0000 (13:39 +0530)]
ARCv2: optimised string/mem lib routines

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARCv2: MMUv4: support aliasing icache config
Vineet Gupta [Thu, 4 Jun 2015 09:09:15 +0000 (14:39 +0530)]
ARCv2: MMUv4: support aliasing icache config

This is also default for AXS103 release

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARCv2: MMUv4: cache programming model changes
Vineet Gupta [Mon, 6 Apr 2015 11:53:57 +0000 (17:23 +0530)]
ARCv2: MMUv4: cache programming model changes

Caveats about cache flush on ARCv2 based cores

- dcache is PIPT so paddr is sufficient for cache maintenance ops (no
  need to setup PTAG reg

- icache is still VIPT but only aliasing configs need PTAG setup

So basically this is departure from MMU-v3 which always need vaddr in
line ops registers (DC_IVDL, DC_FLDL, IC_IVIL) but paddr in DC_PTAG,
IC_PTAG respectively.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARCv2: MMUv4: TLB programming Model changes
Vineet Gupta [Mon, 6 Apr 2015 11:52:39 +0000 (17:22 +0530)]
ARCv2: MMUv4: TLB programming Model changes

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARCv2: STAR 9000814690: Really Re-enable interrupts to avoid deadlocks
Vineet Gupta [Sat, 15 Nov 2014 11:30:08 +0000 (17:00 +0530)]
ARCv2: STAR 9000814690: Really Re-enable interrupts to avoid deadlocks

The issue was, on HS when interrupt is taken, IRQ_ACT is set and that is
NOT cleared unless we do RTIE (or manually clear it). Linux interrupt
handling has top and bottom halves. Latter lead to softirqs (which can
reschedule) AND expect interrupts to be REALLY re-enabled which was NOT
happening for us since we only SETI, dont clear IRQ_ACT

So we can have a state when both cores have taken interrupt (IRQ_ACT set),
get rescheduled, both send IPI and wait in CSD lock which will never be
cleared as cores can't take the pending IPI IRQ due to existing IRQ_ACT
set.

So local_irq_enable() now drops the IRQ_ACT.act bit to re-enable IRQs.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARCv2: STAR 9000808988: signals involving Delay Slot
Vineet Gupta [Tue, 7 Oct 2014 08:42:13 +0000 (14:12 +0530)]
ARCv2: STAR 9000808988: signals involving Delay Slot

Reported by Anton as LTP:munmap01 failing with Illegal Instruction
Exception.

   --------------------->8--------------------------------------
   mmap2(NULL, 24576, PROT_READ|PROT_WRITE, MAP_SHARED, 3, 0) = 0x200d2000
   munmap(0x200d2000, 24576)               = 0
   --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x200d2000}
   ---
   potentially unexpected fatal signal 4.
   Path: /munmap01
   CPU: 0 PID: 61 Comm: munmap01 Not tainted 3.13.0-g5d5c46d9a556 #8
   task: 9f1a8000 ti: 9f154000 task.ti: 9f154000

   [ECR   ]: 0x00020100 => Illegal Insn
   [EFA   ]: 0x0001354c
   [BLINK ]: 0x200515d4
   [ERET  ]: 0x1354c
       @off 0x1354c in [/munmap01]
       VMA: 0x00010000 to 0x00018000
   [STAT32]: 0x800802c0
   ...
   --------------------->8--------------------------------------

The issue was
1. munmap01 accessed unmapped memory (on purpose) with signal handler
   installed for SIGSEGV

2. The faulting instruction happened to be in Delay Slot
   00011864 <main>:
      11908: bl.d       13284 <tst_resm>
      1190c: stb        r16,[r2]

3. kernel sets up the reg file for signal handler and correctly clears
   the DE bit in pt_regs->status32 placeholder

4. However RESTORE_CALLEE_SAVED_USER macro is not adjusted for ARCv2,
   and it over-writes the above with orig/stale value of status32

5. After RTIE, userspace signal handler executes a non branch
   instruction with DE bit set, triggering Illegal Instruction Exception.

Reported-by: Anton Kolesov <akolesov@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARCv2: STAR 9000793984: Handle return from intr to Delay Slot
Vineet Gupta [Mon, 22 Sep 2014 11:21:47 +0000 (16:51 +0530)]
ARCv2: STAR 9000793984: Handle return from intr to Delay Slot

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARCv2: Support for ARCv2 ISA and HS38x cores
Vineet Gupta [Mon, 13 May 2013 13:00:41 +0000 (18:30 +0530)]
ARCv2: Support for ARCv2 ISA and HS38x cores

The notable features are:
    - SMP configurations of upto 4 cores with coherency
    - Optional L2 Cache and IO-Coherency
    - Revised Interrupt Architecture (multiple priorites, reg banks,
        auto stack switch, auto regfile save/restore)
    - MMUv4 (PIPT dcache, Huge Pages)
    - Instructions for
* 64bit load/store: LDD, STD
* Hardware assisted divide/remainder: DIV, REM
* Function prologue/epilogue: ENTER_S, LEAVE_S
* IRQ enable/disable: CLRI, SETI
* pop count: FFS, FLS
* SETcc, BMSKN, XBFU...

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARCv2: [intc] HS38 core interrupt controller
Vineet Gupta [Fri, 6 Mar 2015 08:38:20 +0000 (14:08 +0530)]
ARCv2: [intc] HS38 core interrupt controller

Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: uncached base is hard constant for ARC, don't save it
Vineet Gupta [Thu, 16 Apr 2015 14:19:12 +0000 (19:49 +0530)]
ARC: uncached base is hard constant for ARC, don't save it

ioremap already uses the hard define, just make sure BCR value matches
that

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: intc: split into ARCompact ISA specific, common bits
Vineet Gupta [Thu, 5 Mar 2015 13:43:56 +0000 (19:13 +0530)]
ARC: intc: split into ARCompact ISA specific, common bits

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: Make way for pt_regs != user_regs_struct
Vineet Gupta [Wed, 14 May 2014 14:05:15 +0000 (19:35 +0530)]
ARC: Make way for pt_regs != user_regs_struct

These have been register compatible so far. However ARCv2 mandates
different pt_regs layout (due to h/w auto save). To keep pt_regs same
for both, we start by removing the assumption - used mainly for block
copies between the 2 structs in signal handling and ptrace

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: entry.S: [arcompact] simplify SWITCH_TO_KERNEL_STK
Vineet Gupta [Sat, 28 Mar 2015 16:06:00 +0000 (21:36 +0530)]
ARC: entry.S: [arcompact] simplify SWITCH_TO_KERNEL_STK

Previously this macro was overloaded with stack switching, saving SP at right
slot in pt_regs, saving/setup of r25 and setting SP baseline to where
pt_regs->sp is saved (vs. bottom of pt_regs)

Now it only does SP switch, and leaves SP pointing to bottom of pt_regs.

r25 saving is no longer done here to allow for future reordering of
regfile in pt_regs w/o touching this macro

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: entry.S: use single EXCEPTION_PROLOGUE
Vineet Gupta [Fri, 27 Mar 2015 15:29:34 +0000 (20:59 +0530)]
ARC: entry.S: use single EXCEPTION_PROLOGUE

Returning from pure kernel mode and exception mode use the same code
anyways. Remove one the duplicate blocks

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: entry.S: micro-optimize Trap handler
Vineet Gupta [Fri, 13 Mar 2015 06:20:23 +0000 (11:50 +0530)]
ARC: entry.S: micro-optimize Trap handler

Elide the need to re-read ECR in Trap handler by ensuring that
EXCEPTION_PROLOGUE does that at the very end just before returning
to Trap handler

ARCv2 EXCEPTION_PROLOGUE already did that, so same for ARcompact and the
common trap handler adjusted to use cached ECR

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: entry.S: move some code around for cache locality in return path
Vineet Gupta [Tue, 10 Mar 2015 13:43:07 +0000 (19:13 +0530)]
ARC: entry.S: move some code around for cache locality in return path

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: entry.S: split into ARCompact ISA specific, common bits
Vineet Gupta [Sat, 21 Feb 2015 09:39:32 +0000 (15:09 +0530)]
ARC: entry.S: split into ARCompact ISA specific, common bits

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: entry.S: Ensure that restore_regs is local to compilation unit
Vineet Gupta [Mon, 13 Oct 2014 14:19:00 +0000 (19:49 +0530)]
ARC: entry.S: Ensure that restore_regs is local to compilation unit

This fixes the possible link/relo errors, since restore_regs will be
provided by ISA code, but called from ARC common code.
The .L prefix reassures binutils that it will be in same compilation
unit.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: entry.S: comments cleanup
Vineet Gupta [Fri, 27 Feb 2015 11:15:08 +0000 (16:45 +0530)]
ARC: entry.S: comments cleanup

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: entry.S: Trap handler to use r10 for syscall vs. brkpt decision
Vineet Gupta [Fri, 27 Feb 2015 11:14:38 +0000 (16:44 +0530)]
ARC: entry.S: Trap handler to use r10 for syscall vs. brkpt decision

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: entry.S: FAKE_RET_FROM_EXCPN can always use r9
Vineet Gupta [Fri, 27 Feb 2015 11:13:08 +0000 (16:43 +0530)]
ARC: entry.S: FAKE_RET_FROM_EXCPN can always use r9

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: entry.S: confine EXCEPTION_* macros to one file
Vineet Gupta [Mon, 13 Oct 2014 08:50:39 +0000 (14:20 +0530)]
ARC: entry.S: confine EXCEPTION_* macros to one file

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: entry.S: canonical'ize EXCEPTION_{PROLOGUE,EPILOGUE}
Vineet Gupta [Tue, 14 Oct 2014 06:53:50 +0000 (12:23 +0530)]
ARC: entry.S: canonical'ize EXCEPTION_{PROLOGUE,EPILOGUE}

-EXCEPTION_EPILOGUE introduced
-EXCEPTION_PROLOGUE now also includes reg file saving

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: entry.S: Introduce INTERRUPT_{PROLOGUE,EPILOGUE}
Vineet Gupta [Mon, 13 Oct 2014 12:43:35 +0000 (18:13 +0530)]
ARC: entry.S: Introduce INTERRUPT_{PROLOGUE,EPILOGUE}

-common'ize macros for level 1 and level 2 interrupts

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: entry.S: common'ize scrtach reg freeup in intr + exceptions
Vineet Gupta [Mon, 13 Oct 2014 09:42:25 +0000 (15:12 +0530)]
ARC: entry.S: common'ize scrtach reg freeup in intr + exceptions

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: untangle cache flush loop
Vineet Gupta [Mon, 4 Aug 2014 15:32:31 +0000 (08:32 -0700)]
ARC: untangle cache flush loop

- Remove the ifdef'ery and write distinct versions for each mmu ver even
  if there is some code duplication

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: cacheflush: No need to retain DC_CTRL from __before_dc_op()
Vineet Gupta [Thu, 4 Jun 2015 03:23:47 +0000 (08:53 +0530)]
ARC: cacheflush: No need to retain DC_CTRL from __before_dc_op()

That is because __after_dc_op() already reads it for status check, so it
is better anyways to use that "newer" value.

Also reduces the clutter in callers for passing from/to these routines.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: cacheflush: move some code around, delete old comments
Vineet Gupta [Thu, 4 Jun 2015 10:05:53 +0000 (15:35 +0530)]
ARC: cacheflush: move some code around, delete old comments

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: mm/cache_arc700.c -> mm/cache.c
Vineet Gupta [Thu, 7 May 2015 09:09:36 +0000 (14:39 +0530)]
ARC: mm/cache_arc700.c -> mm/cache.c

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: [axs101] Add missing __init annotations
Vineet Gupta [Sun, 7 Jun 2015 05:47:34 +0000 (11:17 +0530)]
ARC: [axs101] Add missing __init annotations

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: [axs101] STAR 9000799830: Fix SD cards support
Alexey Brodkin [Wed, 15 Apr 2015 12:32:29 +0000 (15:32 +0300)]
ARC: [axs101] STAR 9000799830: Fix SD cards support

As DW Mobile Storage databook says it's required to use "Hold Register"
if card is enumerated in SDR12 or SDR25 modes.
It means we need to act in the same way as in Altera's Socfpga
implementation - set "use hold reg" bit in commad.

Note that for upstream proper solution would be to remove
dw_mci_pltfm_prepare_command() at all and set the bit right in
dw_mci_prepare_command() for all platforms.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: [axs101] Tweak DDR port aperture mappings for performance
Vineet Gupta [Tue, 27 May 2014 13:57:37 +0000 (19:27 +0530)]
ARC: [axs101] Tweak DDR port aperture mappings for performance

Route all MB originated traffic to DDR Port 1 and keep Port 0 for CPU
traffic only

Basic system parameters
--------------------------------------------------------------------------------------
        Host                 OS Description  Mhz  tlb   cache  mem   scal
                                                     pages  line   par   load
                                                          bytes
----------------- ------------- --------------------------------------- ---- ----- ----- ------ ----
axs101-sd-2-new-f Linux 3.13.0+ axs101-sd-2-new-fw-old-img-rerun     739   8    32 1.1100    1
axs101-sd-3-arc-3 Linux 3.13.9+ axs101-sd-3-arc-3.13-tip-regression  735   8    32 1.1000    1
axs101-sd-9-diffe Linux 3.13.11 axs101-sd-9-different-tweak          740   8    32 1.0000    1

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
--------- ------------- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
axs101-sd Linux 3.13.0+  739 0.50 0.88 5.38 14.6 34.1 0.92 5.18 2135 6555 12.K
axs101-sd Linux 3.13.9+  735 0.50 0.90 5.89 19.2 81.4 0.94 4.08 2560 8559 15.K
axs101-sd Linux 3.13.11  740 0.50 0.88 4.45 17.8 34.4 0.94 3.25 2052 6493 12.K
                                                 ^^^^                     ^^^^

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: [axs101] support early 8250 uart
Vineet Gupta [Mon, 2 Feb 2015 13:53:21 +0000 (19:23 +0530)]
ARC: [axs101] support early 8250 uart

Earlycon calculates UART clock as "BASE_BAUD * 16". In case of ARC
"BASE_BAUD" is calculated dynamically in runtime, basically it is an
alias to arc_early_base_baud(), which in turn just does
"arc_base_baud/16".

8250 UART on AXS/SDP board uses 33.3MHz clock source which is set in
"arc_base_baud" with this change.

Additional compatibility string "snps,arc-sdp" is introduced as well
because there're different flavours of AXS boards but they all share the
same motherboard and so it's possible to re-use the same code for
motherbord even if CPU daughterboard changes.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: [axs101] Add support for AXS101 SDP (software development platform)
Alexey Brodkin [Mon, 27 Jan 2014 13:51:34 +0000 (14:51 +0100)]
ARC: [axs101] Add support for AXS101 SDP (software development platform)

The AXS10x platforms consist of a mainboard with peripherals,
on which several daughter cards can be placed. The daughter cards
typically contain a CPU and memory.

Signed-off-by: Mischa Jonker <mjonker@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: mm: document system mem map clearly
Vineet Gupta [Thu, 5 Mar 2015 09:16:20 +0000 (14:46 +0530)]
ARC: mm: document system mem map clearly

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: stack unwinder to bail if PC is not kernel mode
Vineet Gupta [Fri, 10 Apr 2015 08:36:40 +0000 (14:06 +0530)]
ARC: stack unwinder to bail if PC is not kernel mode

Currently, it doesn't invoke the callback but continues to unwind

Also while at it - simplify the code a bit

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: perf: Remove unnecessary local variable
Tobias Klauser [Fri, 24 Apr 2015 08:27:34 +0000 (10:27 +0200)]
ARC: perf: Remove unnecessary local variable

Directly return the result of perf_pmu_register() in
arc_pmu_device_probe() instead of assigning and returning variable ret.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoarc: fix use of uninitialized arc_pmu
Max Filippov [Sat, 13 Jun 2015 23:09:06 +0000 (02:09 +0300)]
arc: fix use of uninitialized arc_pmu

static arc_pmu in the arch/arc/kernel/perf_event.c is not initialized as
it's shadowed by a local variable of the same name in the
arc_pmu_device_probe.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Fixes: 03c94fcf954d "ARC: perf: make @arc_pmu static global"
CC: <stable@vger.kernel.org> # 4.1
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: fix section mismatch with allyesconfig
Vineet Gupta [Wed, 3 Jun 2015 19:24:12 +0000 (00:54 +0530)]
ARC: fix section mismatch with allyesconfig

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: explicit'ify uboot support
Vineet Gupta [Mon, 9 Mar 2015 14:10:09 +0000 (19:40 +0530)]
ARC: explicit'ify uboot support

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: [plat_arcfpga]->[plat_sim]
Vineet Gupta [Fri, 20 Feb 2015 13:42:18 +0000 (19:12 +0530)]
ARC: [plat_arcfpga]->[plat_sim]

* Remove remanants of legacy ARC FPGA platforms (AA4, ML509...)
* Only nsim simulation platform is left, rename platform accordingly
* AA4 DT stuff is compatible with nsim for ARC700 so rename it too

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: [arcfpga] RIP legacy ISS based SMP extension
Vineet Gupta [Mon, 18 May 2015 09:08:21 +0000 (14:38 +0530)]
ARC: [arcfpga] RIP legacy ISS based SMP extension

With ISS long unsupported, no point in having extension based on it

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: compress cpuinfo_arc_mmu (mainly save page size in KB)
Vineet Gupta [Fri, 13 Feb 2015 13:03:47 +0000 (18:33 +0530)]
ARC: compress cpuinfo_arc_mmu (mainly save page size in KB)

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: clocksource cleanups
Vineet Gupta [Sat, 7 Mar 2015 11:29:38 +0000 (16:59 +0530)]
ARC: clocksource cleanups

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: RIP broken 64bit RTSC
Vineet Gupta [Sat, 7 Mar 2015 11:36:09 +0000 (17:06 +0530)]
ARC: RIP broken 64bit RTSC

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: [kbuild] Retire CONFIG_ARC_CPU_REL_4_10
Vineet Gupta [Thu, 7 Nov 2013 09:17:16 +0000 (14:47 +0530)]
ARC: [kbuild] Retire CONFIG_ARC_CPU_REL_4_10

Back when ARC700 4.10 was released, the related kernel features were
tied to this config item so they could be disabled in one shot (i.e.
LLOCK/SCOND, SWAPE, RTSC..)

That having happened a while back, all new ARC customers weill get 4.11+
so those features can be assumed to be present and need not be tied to a
top-level (we still retain the ability to individually disable them).

Further, since ARCv2 also shares some of those feautes, removing it
simplifies things a bit in Kconfig

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: remove the unused platform helpers from dma mapping API
Vineet Gupta [Thu, 16 Apr 2015 15:34:49 +0000 (21:04 +0530)]
ARC: remove the unused platform helpers from dma mapping API

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: switch to simpler CROSS_COMPILE prefix
Vineet Gupta [Mon, 18 May 2015 07:20:02 +0000 (12:50 +0530)]
ARC: switch to simpler CROSS_COMPILE prefix

ARC GNU tools have had support for arc-linux-* driver for some time now.
This is functionally similar to arc-linux-uclibc-* but uclibc prefix
seemed weird at best when trying to compile the kernel itself.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: fold ___flush_dcache_page into __flush_dcache_page
Vineet Gupta [Mon, 18 May 2015 07:16:37 +0000 (12:46 +0530)]
ARC: fold ___flush_dcache_page into __flush_dcache_page

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: fix warning in sched due to thread_saved_pc()
Vineet Gupta [Sat, 25 Apr 2015 05:10:52 +0000 (10:40 +0530)]
ARC: fix warning in sched due to thread_saved_pc()

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoLinux 4.1-rc4
Linus Torvalds [Mon, 18 May 2015 17:13:47 +0000 (10:13 -0700)]
Linux 4.1-rc4

9 years agowatchdog: Fix merge 'conflict'
Peter Zijlstra [Mon, 18 May 2015 09:31:50 +0000 (11:31 +0200)]
watchdog: Fix merge 'conflict'

Two watchdog changes that came through different trees had a non
conflicting conflict, that is, one changed the semantics of a variable
but no actual code conflict happened. So the merge appeared fine, but
the resulting code did not behave as expected.

Commit 195daf665a62 ("watchdog: enable the new user interface of the
watchdog mechanism") changes the semantics of watchdog_user_enabled,
which thereafter is only used by the functions introduced by
b3738d293233 ("watchdog: Add watchdog enable/disable all functions").

There further appears to be a distinct lack of serialization between
setting and using watchdog_enabled, so perhaps we should wrap the
{en,dis}able_all() things in watchdog_proc_mutex.

This patch fixes a s2r failure reported by Michal; which I cannot
readily explain. But this does make the code internally consistent
again.

Reported-and-tested-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agoMerge tag 'for-linus-20150516' of git://git.infradead.org/linux-mtd
Linus Torvalds [Mon, 18 May 2015 17:01:54 +0000 (10:01 -0700)]
Merge tag 'for-linus-20150516' of git://git.infradead.org/linux-mtd

Pull MTD fixes from Brian Norris:
 "Two MTD fixes for 4.1:

   - readtest: the signal-handling code was clobbering the error codes
     we should be handling/reporting in this test, rendering it useless.
     Noticed by Coverity.

   - the common SPI NOR flash DT binding (merged for 4.1-rc1) is being
     revised, so let's change that before 4.1 is minted"

* tag 'for-linus-20150516' of git://git.infradead.org/linux-mtd:
  Documentation: dt: mtd: replace "nor-jedec" binding with "jedec, spi-nor"
  mtd: readtest: don't clobber error reports

9 years agoMerge tag 'usb-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sun, 17 May 2015 04:15:59 +0000 (21:15 -0700)]
Merge tag 'usb-4.1-rc4' of git://git./linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are some USB fixes and new device ids for 4.1-rc4.

  All are pretty minor, and have been in linux-next successfully"

* tag 'usb-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  usb-storage: Add NO_WP_DETECT quirk for Lacie 059f:0651 devices
  Added another USB product ID for ELAN touchscreen quirks.
  xhci: gracefully handle xhci_irq dead device
  xhci: Solve full event ring by increasing TRBS_PER_SEGMENT to 256
  xhci: fix isoc endpoint dequeue from advancing too far on transaction error
  usb: chipidea: debug: avoid out of bound read
  USB: visor: Match I330 phone more precisely
  USB: pl2303: Remove support for Samsung I330
  USB: cp210x: add ID for KCF Technologies PRN device
  usb: gadget: remove incorrect __init/__exit annotations
  usb: phy: isp1301: work around tps65010 dependency
  usb: gadget: serial: fix re-ordering of tx data
  usb: gadget: hid: Fix static variable usage
  usb: gadget: configfs: Fix interfaces array NULL-termination
  usb: gadget: xilinx: fix devm_ioremap_resource() check
  usb: dwc3: dwc3-omap: correct the register macros

9 years agoMerge tag 'tty-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Linus Torvalds [Sun, 17 May 2015 04:10:05 +0000 (21:10 -0700)]
Merge tag 'tty-4.1-rc4' of git://git./linux/kernel/git/gregkh/tty

Pull tty/serial fixes from Greg KH:
 "Here's some TTY and serial driver fixes for reported issues.

  All of these have been in linux-next successfully"

* tag 'tty-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  pty: Fix input race when closing
  tty/n_gsm.c: fix a memory leak when gsmtty is removed
  Revert "serial/amba-pl011: Leave the TX IRQ alone when the UART is not open"
  serial: omap: Fix error handling in probe
  earlycon: Revert log warnings

9 years agoMerge tag 'staging-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sun, 17 May 2015 04:04:56 +0000 (21:04 -0700)]
Merge tag 'staging-4.1-rc4' of git://git./linux/kernel/git/gregkh/staging

Pull staging / IIO driver fixes from Greg KH:
 "Here's some staging and iio driver fixes to resolve a number of
  reported issues.

  All of these have been in linux-next for a while"

* tag 'staging-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (31 commits)
  iio: light: hid-sensor-prox: Fix memory leak in probe()
  iio: adc: cc10001: Add delay before setting START bit
  iio: adc: cc10001: Fix regulator_get_voltage() return value check
  iio: adc: cc10001: Fix incorrect use of power-up/power-down register
  staging: gdm724x: Correction of variable usage after applying ALIGN()
  iio: adc: cc10001: Fix the channel number mapping
  staging: vt6655: lock MACvWriteBSSIDAddress.
  staging: vt6655: CARDbUpdateTSF bss timestamp correct tsf counter value.
  staging: vt6655: vnt_tx_packet Correct TX order of OWNED_BY_NIC
  staging: vt6655: Fix 80211 control and management status reporting.
  staging: vt6655: implement IEEE80211_TX_STAT_NOACK_TRANSMITTED
  staging: vt6655: device_free_tx_buf use only ieee80211_tx_status_irqsafe
  staging: vt6656: use ieee80211_tx_info to select packet type.
  staging: rtl8712: freeing an ERR_PTR
  staging: sm750: remove incorrect __exit annotation
  iio: kfifo: Set update_needed to false only if a buffer was allocated
  iio: mcp320x: Fix occasional incorrect readings
  iio: accel: mma9553: check input value for activity period
  iio: accel: mma9553: add enable channel for activity
  iio: accel: mma9551_core: prevent buffer overrun
  ...

9 years agoMerge tag 'char-misc-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sun, 17 May 2015 03:48:42 +0000 (20:48 -0700)]
Merge tag 'char-misc-4.1-rc4' of git://git./linux/kernel/git/gregkh/char-misc

Pull char/misc fix from Greg KH:
 "Here is one fix, in the extcon subsystem, that resolves a reported
  issue.

  It's been in linux-next for a number of weeks now, sorry for not
  getting it to you sooner"

* tag 'char-misc-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  extcon: usb-gpio: register extcon device before IRQ registration

9 years agoMerge branch 'for-linus-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 16 May 2015 23:33:59 +0000 (16:33 -0700)]
Merge branch 'for-linus-4.1-rc4' of git://git./linux/kernel/git/rw/uml

Pull UML hostfs fix from Richard Weinberger:
 "This contains a single fix for a regression introduced in 4.1-rc1"

* 'for-linus-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
  hostfs: Use correct mask for file mode

9 years agoMerge tag 'upstream-4.1-rc4' of git://git.infradead.org/linux-ubifs
Linus Torvalds [Sat, 16 May 2015 23:28:01 +0000 (16:28 -0700)]
Merge tag 'upstream-4.1-rc4' of git://git.infradead.org/linux-ubifs

Pull UBI bufix from Richard Weinberger:
 "This contains a single bug fix for the UBI block driver"

* tag 'upstream-4.1-rc4' of git://git.infradead.org/linux-ubifs:
  UBI: block: Add missing cache flushes

9 years agoMerge tag 'for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
Linus Torvalds [Sat, 16 May 2015 22:55:31 +0000 (15:55 -0700)]
Merge tag 'for_linus_stable' of git://git./linux/kernel/git/tytso/ext4

Pull ext4 fixes from Ted Ts'o:
 "Fix a number of ext4 bugs; the most serious of which is a bug in the
  lazytime mount optimization code where we could end up updating the
  timestamps to the wrong inode"

* tag 'for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: fix an ext3 collapse range regression in xfstests
  jbd2: fix r_count overflows leading to buffer overflow in journal recovery
  ext4: check for zero length extent explicitly
  ext4: fix NULL pointer dereference when journal restart fails
  ext4: remove unused function prototype from ext4.h
  ext4: don't save the error information if the block device is read-only
  ext4: fix lazytime optimization

9 years agoMerge branch 'for-linus-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mason...
Linus Torvalds [Sat, 16 May 2015 22:50:58 +0000 (15:50 -0700)]
Merge branch 'for-linus-4.1' of git://git./linux/kernel/git/mason/linux-btrfs

Pull btrfs fixes from Chris Mason:
 "The first commit is a fix from Filipe for a very old extent buffer
  reuse race that triggered a BUG_ON.  It hasn't come up often, I looked
  through old logs at FB and we hit it a handful of times over the last
  year.

  The rest are other corners he hit during testing"

* 'for-linus-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: fix race when reusing stale extent buffers that leads to BUG_ON
  Btrfs: fix race between block group creation and their cache writeout
  Btrfs: fix panic when starting bg cache writeout after IO error
  Btrfs: fix crash after inode cache writeback failure

9 years agoMerge branch 'master' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Linus Torvalds [Sat, 16 May 2015 22:46:30 +0000 (15:46 -0700)]
Merge branch 'master' of git://git.linux-mips.org/ralf/upstream-linus

Pull MIPS fixes from Ralf Baechle:
 "Seven small fixes.  The shortlog below is a good description so no
  need to elaborate.

  It has sat in linux-next and survived the usual automated testing by
  Imagination's test farm"

* 'master' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  MIPS: tlb-r4k: Fix PG_ELPA comment
  MIPS: Fix up obsolete cpu_set usage
  MIPS: IP32: Fix build errors in reset code in DS1685 platform hook.
  MIPS: KVM: Fix unused variable build warning
  MIPS: traps: remove extra Tainted: line from __show_regs() output
  MIPS: Fix wrong CHECKFLAGS (sparse builds) with GCC 5.1
  MIPS: Fix a preemption issue with thread's FPU defaults

9 years agoMerge tag 'arc-4.1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc
Linus Torvalds [Sat, 16 May 2015 22:40:07 +0000 (15:40 -0700)]
Merge tag 'arc-4.1-fixes' of git://git./linux/kernel/git/vgupta/arc

Pull ARC fixes from Vineet Gupta.

* tag 'arc-4.1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
  ARC: inline cache flush toggle helpers
  ARC: With earlycon in use, retire EARLY_PRINTK
  ARC: unbork !LLSC build

9 years agoMerge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Sat, 16 May 2015 22:33:25 +0000 (15:33 -0700)]
Merge tag 'fixes-for-linus' of git://git./linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Arnd Bergmann:
 "Nothing frightening this time, just smaller fixes in a number of
  places.

  The other changes contained here are:

   MAINTAINERS file updates:

   - The mach-gemini maintainer is back in action and has a new git tree

   - Krzysztof Kozlowski has volunteered to be a new co-maintainer for
     the samsung platforms

   - updates to the files that belong to Marvell mvebu

  Bug fixes:

   - The largest changes are on omap2, but are only to avoid some
     harmless warnings and to fix reset on omap4

   - a small regression fix on tegra

   - multiple fixes for incorrect IRQ affinity on vexpress

   - the missing system controller on arm64 juno is added

   - one revert of a patch that was accidentally applied twice for
     mach-rockchip

   - two clock related DT fixes for mvebu

   - a workaround for suspend with old DT binaries on new exynos kernels

   - Another fix for suspend on exynos, needs to be backported"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (21 commits)
  MAINTAINERS: Add dts entries for some of the Marvell SoCs
  MAINTAINERS: ARM: EXYNOS: Add Krzysztof Kozlowski as co-maintainer
  ARM: EXYNOS: Use of_machine_is_compatible instead of soc_is_exynos4
  ARM: EXYNOS: Fix failed second suspend on Exynos4
  Revert "ARM: rockchip: fix undefined instruction of reset_ctrl_regs"
  ARM: EXYNOS: Fix dereference of ERR_PTR returned by of_genpd_get_from_provider
  ARM: EXYNOS: Don't try to initialize suspend on old DT
  ARM: dts: Add keep-power-in-suspend to WiFi SDIO node for Peach Boards
  ARM: gemini: fix compiler warning due wrong data type
  ARM: vexpress/tc2: Add interrupt-affinity to the PMU node
  ARM: vexpress/ca9: Add interrupt-affinity to the PMU node
  ARM: vexpress/ca9: Add unified-cache property to l2 cache node
  ARM64: juno: add sp810 support and fix sp804 clock frequency
  ARM: Gemini: Maintainers update
  ARM: OMAP2+: Remove bogus struct clk comparison for timer clock
  ARM: dove: Add clock-names to CuBox Si5351 clk generator
  ARM: AM33xx+: hwmod: re-use omap4 implementations for reset functionality
  ARM: OMAP4+: PRM: add support for passing status register/bit info to reset
  ARM: AM43xx: hwmod: add VPFE hwmod entries
  ARM: mvebu: Fix the main PLL frequency on Armada 375, 38x and 39x SoCs
  ...

9 years agoMerge branch 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
Linus Torvalds [Sat, 16 May 2015 22:27:33 +0000 (15:27 -0700)]
Merge branch 'for-rc' of git://git./linux/kernel/git/rzhang/linux

Pull thermal fixes from Zhang Rui:
 "Specifics:

   - fix an issue in intel_powerclamp driver that idle injection target
     is not accurately maintained on newer Intel CPUs.  Package C8 to
     C10 states are introduced on these CPUs but they were not included
     in the package c-state residency calculation.  From Jacob Pan.

   - fix a problem that package c-state idle injection was missing on
     Broadwell server, by adding its id to intel_powerclamp driver.
     From Jacob Pan.

   - a couple of small fixes and cleanups from Joe Perches, Mathias
     Krause, Dan Carpenter and Anand Moon"

* 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
  tools/thermal: tmon: fixed the 'make install' command
  thermal: rockchip: fix an error code
  thermal/powerclamp: fix missing newer package c-states
  thermal/intel_powerclamp: add id for broadwell server
  thermal/intel_powerclamp: add __init / __exit annotations
  thermal: Use bool function return values of true/false not 1/0

9 years agoMerge tag 'linux-kselftest-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 16 May 2015 22:03:52 +0000 (15:03 -0700)]
Merge tag 'linux-kselftest-4.1-rc4' of git://git./linux/kernel/git/shuah/linux-kselftest

Pull kselftest fixes from Shuah Khan:
 "Urgent fix for Kselftest regression introduced in 4.1-rc1 by the new
  x86 test due to its hard dependency on 32-bit build environment.

  A set of 5 patches fix the make kselftest run and kselftest install"

* tag 'linux-kselftest-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
  selftests, x86: Rework x86 target architecture detection
  selftests, x86: Remove useless run_tests rule
  selftests/x86: install tests
  selftest/x86: have no dependency on all when cross building
  selftest/x86: build both bitnesses

9 years agoMerge branch 'parisc-4.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller...
Linus Torvalds [Fri, 15 May 2015 20:06:06 +0000 (13:06 -0700)]
Merge branch 'parisc-4.1-2' of git://git./linux/kernel/git/deller/parisc-linux

Pull parisc fixes from Helge Deller:
 "One important patch which fixes crashes due to stack randomization on
  architectures where the stack grows upwards (currently parisc and
  metag only).

  This bug went unnoticed on parisc since kernel 3.14 where the flexible
  mmap memory layout support was added by commit 9dabf60dc4ab.  The
  changes in fs/exec.c are inside an #ifdef CONFIG_STACK_GROWSUP section
  and will not affect other platforms.

  The other two patches rename args of the kthread_arg() function and
  fixes a printk output"

* 'parisc-4.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc,metag: Fix crashes due to stack randomization on stack-grows-upwards architectures
  parisc: copy_thread(): rename 'arg' argument to 'kthread_arg'
  parisc: %pf is only for function pointers

9 years agoDocumentation: dt: mtd: replace "nor-jedec" binding with "jedec, spi-nor"
Brian Norris [Thu, 14 May 2015 17:32:53 +0000 (10:32 -0700)]
Documentation: dt: mtd: replace "nor-jedec" binding with "jedec, spi-nor"

In commit 8ff16cf77ce3 ("Documentation: devicetree: m25p80: add "nor-jedec"
binding"), we added a generic "nor-jedec" binding to catch all
mostly-compatible SPI NOR flash which can be detected via the READ ID
opcode (0x9F). This was discussed and reviewed at the time, however
objections have come up since then as part of this discussion:

  http://lkml.kernel.org/g/20150511224646.GJ32500@ld-irv-0074

It seems the parties involved agree that "jedec,spi-nor" does a better
job of capturing the fact that this is SPI-specific, not just any NOR
flash.

This binding was only merged for v4.1-rc1, so it's still OK to change
the naming.

At the same time, let's move the documentation to a better name.

Next up: stop referring to code (drivers/mtd/devices/m25p80.c) from the
documentation.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Rafał Miłecki <zajec5@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Cc: devicetree@vger.kernel.org
Acked-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Mark Rutland <mark.rutland@arm.com>
9 years agoMIPS: tlb-r4k: Fix PG_ELPA comment
James Hogan [Wed, 13 May 2015 10:50:55 +0000 (11:50 +0100)]
MIPS: tlb-r4k: Fix PG_ELPA comment

The ELPA bit in PageGrain is all about large *physical* addresses, so
correct the reference to "large virtual address" in the comment above
where it is set for MIPS64.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: David Daney <ddaney@caviumnetworks.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10038/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
9 years agoMIPS: Fix up obsolete cpu_set usage
Ezequiel Garcia [Tue, 28 Apr 2015 21:34:23 +0000 (18:34 -0300)]
MIPS: Fix up obsolete cpu_set usage

cpu_set was removed (along with a bunch of cpumask helpers) by
commit 2f0f267ea072 ("cpumask: remove deprecated functions.").

Fix this by replacing cpu_set with cpumask_set_cpu. Without this
fix the following error is triggered when CONFIG_MIPS_MT_FPAFF=y.

  arch/mips/kernel/smp-cps.c: In function 'cps_smp_setup':
  arch/mips/kernel/smp-cps.c:95:3: error: implicit declaration of function 'cpu_set' [-Werror=implicit-function-declaration]

Fixes: 90db024f140d ("MIPS: smp-cps: cpu_set FPU mask if FPU present")
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@imgtec.com>
Acked-by: Niklas Cassel <niklass@axis.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9912/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
9 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 15 May 2015 20:01:31 +0000 (13:01 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86 build fix from Ingo Molnar:
 "A bzImage build fix on older distros"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/vdso: Fix 'make bzImage' on older distros

9 years agoMerge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 15 May 2015 19:42:33 +0000 (12:42 -0700)]
Merge branch 'sched-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull scheduler fixes from Ingo Molnar:
 "Two fixes: a suspend/resume related regression fix, and an RT priority
  boosting fix"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched/core: Fix regression in cpuset_cpu_inactive() for suspend
  sched: Handle priority boosted tasks proper in setscheduler()

9 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 15 May 2015 19:38:21 +0000 (12:38 -0700)]
Merge branch 'perf-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull perf fixes from Ingo Molnar:
 "Mostly tooling fixes, but also a lockdep annotation fix, a PMU event
  list fix and a new model addition"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  tools/liblockdep: Fix compilation error
  tools/liblockdep: Fix linker error in case of cross compile
  perf tools: Use getconf to determine number of online CPUs
  tools: Fix tools/vm build
  perf/x86/rapl: Enable Broadwell-U RAPL support
  perf/x86/intel: Fix SLM cache event list
  perf: Annotate inherited event ctx->mutex recursion

9 years agoMerge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 15 May 2015 19:34:05 +0000 (12:34 -0700)]
Merge branch 'irq-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull irq fix from Ingo Molnar:
 "A tegra irqchip driver memory corruption fix"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip: tegra: Set the proper base address in irq chip data

9 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Fri, 15 May 2015 18:44:30 +0000 (11:44 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "Radeon:
     one oops fix, one bug fix, one pci id addition patch

  i915:
     one suspend/resume regression fix.

  All seems quiet enough."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/radeon: don't do mst probing if MST isn't enabled.
  drm/radeon: add new bonaire pci id
  drm/radeon: fix VM_CONTEXT*_PAGE_TABLE_END_ADDR handling
  drm/i915: Avoid GPU hang when coming out of s3 or s4

9 years agoMerge branch 'akpm' (patches from Andrew)
Linus Torvalds [Fri, 15 May 2015 18:17:41 +0000 (11:17 -0700)]
Merge branch 'akpm' (patches from Andrew)

Merge misc fixes from Andrew Morton:
 "8 fixes"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
  mm, numa: really disable NUMA balancing by default on single node machines
  MAINTAINERS: update Jingoo Han's email address
  CMA: page_isolation: check buddy before accessing it
  uidgid: make uid_valid and gid_valid work with !CONFIG_MULTIUSER
  kernfs: do not account ino_ida allocations to memcg
  gfp: add __GFP_NOACCOUNT
  tools/vm: fix page-flags build
  drivers/rtc/rtc-armada38x.c: remove unused local `flags'

9 years agoMerge tag 'samsung-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene...
Arnd Bergmann [Fri, 15 May 2015 15:14:48 +0000 (17:14 +0200)]
Merge tag 'samsung-fixes-2' of git://git./linux/kernel/git/kgene/linux-samsung into fixes

Merge "Samsung 2nd fixes for v4.1" from Kukjin Kim:

- fix second S2R on exynos4412 based Trats2, Odroid U3 boards which
  happened after enabling L2$ and caused by commit 13cfa6c4f7fa ("ARM:
  EXYNOS: Fix CPU idle clock down after CPU off")
  And replace the soc_is_exynosxxx() macro with of_compatible_xxx

- fix dereference of ERR_PTR of of_genpd_get_from_provider()

- fix suspend problem on old DT machines to skip the initialization
  suspend and caused by commit 8b283c025443 ("ARM: exynos4/5: convert
  pmu wakeup to stacked domains")

- add keep-power-in-suspend for Peach Boards to support S2R and has
  been missed in previous pull-request for fixes

* tag 'samsung-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: EXYNOS: Use of_machine_is_compatible instead of soc_is_exynos4
  ARM: EXYNOS: Fix failed second suspend on Exynos4
  ARM: EXYNOS: Fix dereference of ERR_PTR returned by of_genpd_get_from_provider
  ARM: EXYNOS: Don't try to initialize suspend on old DT
  ARM: dts: Add keep-power-in-suspend to WiFi SDIO node for Peach Boards

9 years agoMerge tag 'mvebu-fixes-4.1-2' of git://git.infradead.org/linux-mvebu into fixes
Arnd Bergmann [Fri, 15 May 2015 15:13:06 +0000 (17:13 +0200)]
Merge tag 'mvebu-fixes-4.1-2' of git://git.infradead.org/linux-mvebu into fixes

Merge "mvebu fixes for 4.1 (part 2)" from Gregory CLEMENT:

Fix the main PLL frequency on Armada 375, 38x and 39x SoCs
Add clock-names to CuBox Si5351 clk generator
Add dts entries in the MAINTAINERS file

* tag 'mvebu-fixes-4.1-2' of git://git.infradead.org/linux-mvebu:
  MAINTAINERS: Add dts entries for some of the Marvell SoCs
  ARM: dove: Add clock-names to CuBox Si5351 clk generator
  ARM: mvebu: Fix the main PLL frequency on Armada 375, 38x and 39x SoCs

9 years agoMAINTAINERS: Add dts entries for some of the Marvell SoCs
Gregory CLEMENT [Fri, 15 May 2015 12:25:43 +0000 (14:25 +0200)]
MAINTAINERS: Add dts entries for some of the Marvell SoCs

Since many releases, the modifications of the mvebu and berlin device
tree files are merged through the mvebu subsystem. This patch makes it
official in order to help the contributors using the get_maintainer.pl
to find the accurate peoples.

In the same time, updated the mvebu description which now includes the
kirkwood SoCs and new Armada SoCs.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Acked-by: Andrew Lunn <andrew@lunn.ch>