Commit graph

102396 commits

Author SHA1 Message Date
Dmitry Torokhov
b29438f22c nios2: fix error handling of irq_of_parse_and_map
Return value of irq_of_parse_and_map() is unsigned int, with 0
indicating failure, so testing for negative result never works.

Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Ley Foon Tan <lftan@altera.com>
2014-12-08 12:56:08 +08:00
Tobias Klauser
ac8ab8dd95 nios2: Use IS_ENABLED instead of #ifdefs to check config symbols
Make the checking for div/mul/mulx instruction config symbols easier to
read by using IS_ENABLED instead of #ifdefs.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Ley Foon Tan <lftan@altera.com>
2014-12-08 12:56:07 +08:00
Ley Foon Tan
2fc8483fdc nios2: Build infrastructure
This patch adds Makefile and Kconfig files required for building a
nios2 kernel.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08 12:56:06 +08:00
Ley Foon Tan
106174d0d8 nios2: ptrace support
Add ptrace support for nios2.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08 12:56:04 +08:00
Ley Foon Tan
42381bf1f2 nios2: Module support
This patch adds support for loadable modules.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08 12:56:04 +08:00
Ley Foon Tan
b31ebd8055 nios2: Nios2 registers
This file contains constants for the instruction macros, cpu registers,
fields and bits.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08 12:56:03 +08:00
Ley Foon Tan
97da0d62d4 nios2: Miscellaneous header files
This patch introduces a few nios2-specific header files.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08 12:56:03 +08:00
Ley Foon Tan
2612b87959 nios2: Cpuinfo handling
Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08 12:56:02 +08:00
Ley Foon Tan
4182de9e63 nios2: Time keeping
Add time keeping code for nios2.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
2014-12-08 12:56:01 +08:00
Ley Foon Tan
95acd4c7b6 nios2: Device tree support
Add device tree support to arch/nios2.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08 12:56:01 +08:00
Ley Foon Tan
eea9507a69 nios2: Library functions
Add optimised library functions for nios2.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08 12:56:00 +08:00
Ley Foon Tan
b53e906d25 nios2: Signal handling support
This patch adds support for signal handling.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08 12:55:59 +08:00
Ley Foon Tan
1000197d80 nios2: System calls handling
This patch adds support for system calls from userspaces. It uses the
asm-generic/unistd.h definitions with architecture spcific syscall.
The sys_call_table is just an array defined in a C file and it contains
pointers to the syscall functions.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08 12:55:58 +08:00
Ley Foon Tan
19f4c6b5af nios2: ELF definitions
This patch adds definitions for the ELF format

Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08 12:55:58 +08:00
Ley Foon Tan
e23c621f98 nios2: DMA mapping API
This patch adds support for the DMA mapping API.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08 12:55:56 +08:00
Ley Foon Tan
f27ffc751c nios2: Interrupt handling
This patch adds the support for IRQ handling.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
2014-12-08 12:55:55 +08:00
Ley Foon Tan
c983e92fcb nios2: TLB handling
This patch adds the TLB maintenance functions.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08 12:55:54 +08:00
Ley Foon Tan
93c91cb228 nios2: Cache handling
This patch adds functionality required for cache maintenance.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08 12:55:54 +08:00
Ley Foon Tan
71995e4d00 nios2: Process management
This patch adds support for thread creation and context switching.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08 12:55:53 +08:00
Ley Foon Tan
cbd15b3fad nios2: Page table management
This patch adds support for page table management.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08 12:55:53 +08:00
Ley Foon Tan
862674d424 nios2: MMU Fault handling
This patch adds support for the handling of the MMU faults (exception
entry code introduced by a previous patch, kernel/entry.S).

Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08 12:55:52 +08:00
Ley Foon Tan
6b8baec4d6 nios2: I/O Mapping
This patch adds several definitions for I/O accessors and ioremap().

Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08 12:55:52 +08:00
Ley Foon Tan
5ccc6af5e8 nios2: Memory management
This patch contains the initialisation of the memory blocks, MMU
attributes and the memory map.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08 12:55:51 +08:00
Ley Foon Tan
771a0163c0 nios2: Traps exception handling
This patch contains traps exception handling.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08 12:55:50 +08:00
Ley Foon Tan
82ed08dd1b nios2: Exception handling
This patch contains the exception entry code (kernel/entry.S) and
misaligned exception.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08 12:55:50 +08:00
Ley Foon Tan
27d22413e6 nios2: Kernel booting and initialization
This patch adds the kernel booting and the initial setup code.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08 12:55:49 +08:00
Ley Foon Tan
39b505cb79 nios2: Assembly macros and definitions
This patch add assembly macros and definitions used in
the .S files across arch/nios2/ and together with asm-offsets.c.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08 12:55:49 +08:00
Linus Torvalds
beb5af4033 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Thomas Gleixner:
 "Two final fixlets for 3.18:
   - Prevent microcode reload wreckage on 32bit
   - Unbreak cross compilation"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, microcode: Limit the microcode reloading to 64-bit for now
  x86: Use $(OBJDUMP) instead of plain objdump
2014-12-05 10:47:19 -08:00
Sebastian Ott
2cb4a18262 s390: fix machine check handling
Commit eb7e7d76 "s390: Replace __get_cpu_var uses" broke machine check
handling.

We copy machine check information from per-cpu to a stack variable for
local processing. Next we should zap the per-cpu variable, not the
stack variable.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2014-12-01 11:06:55 +01:00
Borislav Petkov
02ecc41abc x86, microcode: Limit the microcode reloading to 64-bit for now
First, there was this: https://bugzilla.kernel.org/show_bug.cgi?id=88001

The problem there was that microcode patches are not being reapplied
after suspend-to-ram. It was important to reapply them, though, because
of for example Haswell's TSX erratum which disabled TSX instructions
with a microcode patch.

A simple fix was fb86b97300 ("x86, microcode: Update BSPs microcode
on resume") but, as it is often the case, simple fixes are too
simple. This one causes 32-bit resume to fail:

https://bugzilla.kernel.org/show_bug.cgi?id=88391

Properly fixing this would require more involved changes for which it
is too late now, right before the merge window. Thus, limit this to
64-bit only temporarily.

Signed-off-by: Borislav Petkov <bp@suse.de>
Link: http://lkml.kernel.org/r/1417353999-32236-1-git-send-email-bp@alien8.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2014-12-01 10:55:08 +01:00
Linus Torvalds
615b994e64 ARM: SoC fixes for 3.18-rc7
Just four simple fixes this week:
 
 - one missing of_node_put() on armv7 based mvebu
 - forcing the USB host into the right mode on Chromebook (exynos5-snow)
 - enabling two important drivers for exynos_defconfig
 - fixing a noncritical bug for tegra that would cause a
   regression with common code patches queued for 3.19
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIVAwUAVHh5G2CrR//JCVInAQKkFxAAukN2SEF7pRWfnnse7WPks+jem5Ye+67g
 WwfZclkSz2RujZRmtCENK1AK4ZI5vmdtu+xBB3OTm/GQZjmkfQNYgfQOMdaVaG7y
 Y2SDSVCzZFSboQtc45oAXZZ/xVAAEevWf/kT9PWyXn6GJ48zLNOtCofrw7RE89lg
 uz7/BTjc/4m0vlwAL6l38EMSin3I5peXBQ4pOGYqts0ADOKhSrW9Zv5kk7wyeDwC
 IWMQIb6p2hZ+KDRpzbA0vpAXESzVcJLLsGQpCuCNCy/2iv8guIMhc/A6nzBQibl2
 GDmXsWUC66+hpp509UxuiYLMFhDpoWmEEuR18g2DHT/9/nxhvxqfOOLwjHHE1bts
 5eN62IGQ/Onosvch+1P5MHe+SJ1hpIhGA/nF/kW6JfzaRzOhlvIhGLTD/bXXXRtB
 rNNRDxp0eymHLTC+zyzIaEYs6ND9mxAIY+l2Cr3st6rlwPMdIuvwwJHRIOPai4N+
 z/h1ouXRuyf8yj6Vyn0UDkNuWNFwSQocs1at4AgDreG5HZ5lMSQBbWu674p/7x9p
 o56HRKIZT0Ou4dsAWJMAsS8WEbdMdTstyj7dZbUijcTTv80BdoZe8jWiNo8O++4E
 P9Zqq+Dn+PKWOn7vbAkvank6rRcrhk5F/E118pEV9Plvdv+/wxMDLnHm+YB0ah17
 7qtVIXv1B/Y=
 =68UY
 -----END PGP SIGNATURE-----

Merge tag 'armsoc-for-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Arnd Bergmann:
 "Not much interesting going on fixes-wise for us this week, as it
  should be for an -rc7.  I'm not expecting Olof to work much over
  Thanksgiving weekend, so I decided to take over again and push these
  out to you.

  Just four simple fixes this week:

   - one missing of_node_put() on armv7 based mvebu
   - forcing the USB host into the right mode on Chromebook
     (exynos5-snow)
   - enabling two important drivers for exynos_defconfig
   - fixing a noncritical bug for tegra that would cause a regression
     with common code patches queued for 3.19"

* tag 'armsoc-for-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: tegra: irq: fix buggy usage of irq_data irq field
  ARM: exynos_defconfig: Enable max77802 rtc and clock drivers
  ARM: dts: Explicitly set dr_mode on exynos5250-snow
  ARM: mvebu: add missing of_node_put() call in coherency.c
2014-11-28 13:34:32 -08:00
Linus Torvalds
e818d5ed2a Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Pull ARM fixes from Russell King:
 "Another round of relatively small ARM fixes.

  Thomas spotted that the strex backoff delay bit was a disable bit, so
  it needed to be clear for this to work.  Vladimir spotted that using a
  restart block for the cache flush operation would return -EINTR, which
  userspace was not expecting.  Dmitry spotted that the auxiliary
  control register accesses for Xscale were not correct"

* 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  ARM: 8226/1: cacheflush: get rid of restarting block
  ARM: 8222/1: mvebu: enable strex backoff delay
  ARM: 8216/1: xscale: correct auxiliary register in suspend/resume
2014-11-28 13:32:47 -08:00
Linus Torvalds
98e8d2e094 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull mips fixes from Ralf Baechle:
 "The hopefully final round of fixes for 3.18:

   - Fix a number of build errors affecting particular configurations.
   - Handle EVA correctly when flushing a signal trampoline and dcache
     lines.
   - Fix printks printing jibberish.
   - Handle 64 bit memory addresses correctly when adding memory chunk
     on 32 bit kernels.
   - Fix a race condition in the hardware tablewalker code"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  MIPS: tlbex: Fix potential HTW race on TLBL/M/S handlers
  MIPS: Fix address type used for early memory detection.
  MIPS: Kconfig: Don't allow both microMIPS and SmartMIPS to be selected.
  MIPS: kernel: cps-vec: Set ISA level to mips32r2 for the MIPS MT ASE
  MIPS: Netlogic: handle modular AHCI builds
  MIPS: Netlogic: handle modular USB case
  MIPS: Loongson: Make platform serial setup always built-in.
  MIPS: fix EVA & non-SMP non-FPU FP context signal handling
  MIPS: cpu-probe: Set the FTLB probability bit on supported cores
  MIPS: BMIPS: Fix ".previous without corresponding .section" warnings
  MIPS: uaccess.h: Fix strnlen_user comment.
  MIPS: r4kcache: Add EVA case for protected_writeback_dcache_line
  MIPS: Fix info about plat_setup in arch_mem_init comment
  MIPS: rtlx: Remove KERN_DEBUG from pr_debug() arguments in rtlx.c
  MIPS: SEAD3: Fix LED device registration.
  MIPS: Fix a copy & paste error in unistd.h
2014-11-27 18:32:49 -08:00
Linus Torvalds
21f122f472 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux
Pull powerpc fixes from Michael Ellerman:
 "Here are five fixes for you to pull please.

  They're all CC'ed to stable except the "Fix PE state format" one which
  went in this release"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux:
  powerpc: 32 bit getcpu VDSO function uses 64 bit instructions
  powerpc/powernv: Replace OPAL_DEASSERT_RESET with EEH_RESET_DEACTIVATE
  powerpc/eeh: Fix PE state format
  powerpc/pseries: Fix endiannes issue in RTAS call from xmon
  powerpc/powernv: Fix the hmi event version check.
2014-11-27 18:23:41 -08:00
Linus Torvalds
ae979430e3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Pull sparc fixlet from David Miller:
 "Aparc fix to add dma_cache_sync(), even if a nop it should be provided
  if dma_{alloc,free}_noncoherent() is provided too"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc: Add NOP dma_cache_sync() implementation.
2014-11-27 18:19:25 -08:00
Leonid Yegoshin
070e76cb3f MIPS: tlbex: Fix potential HTW race on TLBL/M/S handlers
There is a potential race when probing the TLB in TLBL/M/S exception
handlers for a matching entry. Between the time we hit a TLBL/S/M
exception and the time we get to execute the TLBP instruction, the
HTW may have replaced the TLB entry we are interested in hence the TLB
probe may fail. However, in the existing handlers, we never checked the
status of the TLBP (ie check the result in the C0/Index register). We
fix this by adding such a check when the core implements the HTW. If
we couldn't find a matching entry, we return back and try again.

Signed-off-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Cc: <stable@vger.kernel.org> # v3.17+
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8599/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2014-11-27 17:21:56 +01:00
Vladimir Murzin
3f4aa45cee ARM: 8226/1: cacheflush: get rid of restarting block
We cannot restart cacheflush safely if a process provides user-defined
signal handler and signal is pending. In this case -EINTR is returned
and it is expected that process re-invokes syscall. However, there are
a few problems with that:
 * looks like nobody bothers checking return value from cacheflush
 * but if it did, we don't provide the restart address for that, so the
   process has to use the same range again
 * ...and again, what might lead to looping forever

So, remove cacheflush restarting code and terminate cache flushing
as early as fatal signal is pending.

Cc: stable@vger.kernel.org # 3.12+
Reported-by: Chanho Min <chanho.min@lge.com>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-11-27 15:55:35 +00:00
Thomas Petazzoni
995ab5189d ARM: 8222/1: mvebu: enable strex backoff delay
Under extremely rare conditions, in an MPCore node consisting of at
least 3 CPUs, two CPUs trying to perform a STREX to data on the same
shared cache line can enter a livelock situation.

This patch enables the HW mechanism that overcomes the bug. This fixes
the incorrect setup of the STREX backoff delay bit due to a wrong
description in the specification.

Note that enabling the STREX backoff delay mechanism is done by
leaving the bit *cleared*, while the bit was currently being set by
the proc-v7.S code.

[Thomas: adapt to latest mainline, slightly reword the commit log, add
stable markers.]

Fixes: de4901933f ("arm: mm: Add support for PJ4B cpu and init routines")

Cc: <stable@vger.kernel.org> # v3.8+
Signed-off-by: Nadav Haklai <nadavh@marvell.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-11-27 15:55:04 +00:00
Arnd Bergmann
96ba18ffd0 mvebu fixes for v3.18 (round 2)
- mvebu
     - coherency.c needed an of_node_put()
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJUdVscAAoJEP45WPkGe8ZnPpEP/Al0FDmdX+cZVBgqUqCT5I0L
 dIljNZPXtBoORDZ88te9w66ELx3mzdEQOuW5nN5wPKVdlL3l9jchEPWGcr/Vy/hn
 ZA0CoRC+51d43puru5zPHfx3WTn9TvoOnVUhSdsOmaYlduysBXV4AJciEKGNXyzQ
 35qKNM3EHWENbIjh9a3wmIAn94AzKarFoSfTmF2LcpwN0hZcp5VFr9y30Gx6r8nE
 z2AguA7I8Yzms9cJv+adaK5We/wTfHNJECvGNDjIEAZOOqNrOx2diGmOrEMCJdSG
 5q/Kh0zxlbtgrTY/br7Ggym0XFGCouj4/OLeMtbLOCZYFpIubD4ltMItjZuOwgDp
 VW9ApO9k9jJcV/EmT1LEfE6C/Qlt8wfX/g1L5+MMKti315fymyJ4P4jj+F8c8ve9
 qy3fVCOz8f4fSH7yWorVypVNvl1lP7xLWv9vIxOHBtS7mlcYjUrsqDPW63Zg90Jz
 uQR9+F/8YhW7U/wNm2bMZGm+g3EskXgRnKXCnZmuOCWqtkux+u4nVsdAa/lghvMy
 yKemZobnse2G9En82rdA4R2Br552OsI09m9r5ZJYl34qTzSClkvaae9OhOziXtKV
 rpq1aT6SPux3Xux5mLBSS80sTqbaXu6RxCW4apfmrnG8ZrqP8YTNCHR5K4Ewdsy7
 k/XPhl0QiVh6PdBTwJf/
 =e1Lu
 -----END PGP SIGNATURE-----

Merge tag 'mvebu-fixes-3.18-2' of git://git.infradead.org/linux-mvebu into fixes

Pull "mvebu fixes for v3.18 (round 2)" frm Jason Cooper:

 - mvebu
    - coherency.c needed an of_node_put()

* tag 'mvebu-fixes-3.18-2' of git://git.infradead.org/linux-mvebu:
  ARM: mvebu: add missing of_node_put() call in coherency.c

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-11-27 14:29:23 +01:00
Arnd Bergmann
a572c9dd83 Samsung defconfig update for v3.18
- enable max77802 rtc and clock drivers for exynos_defconfig
   : enable the kernel config options to have the drivers for
     max77802 including rtc and 2-ch 32kHz clock outputs
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJUbzu+AAoJEA0Cl+kVi2xqKVsP/iV4UkX2poWBOvU/RQMx9Spb
 JEHyBmfsco/qCfQDE+yMttWfvzLgc1zURFDiZqIvk//jp+LjSDGXWEEPo/WMyXBN
 FUXAijltgzz2aqPiFNWwzbqVHbxnfLBybjasAahmv8rvYyu2LAex+n9k/OKC1F9o
 JwptV3w1GISMWMdE/ed6wsfIhpmshlYax6IYOK4+iJyviexV7xi3qBAeAT9CtR0n
 uEG76+coSWNnSR21RM69SWCf2FzMlNO6YjaTq+6D5Gd45q/CfnUF7XtZgdBC56IJ
 u6WGvHZB7Bh/aPOxJWEpWGKAk6k4FYDzYKo7b64nD+8xHTvgTi28nYsjtKZAJNo0
 9Q/9U5AQKsmE1nPU4NHCEednMUGSYKuKqQvUXOThr/qvSasCzbsoKot3sjOxZ4FA
 4rkj4AwV8f78nfwLH19yPAep6Ba2ldFRTgoYUdm6ZBXqrkl1QbiBzcFMJDJqOdqc
 KjQd7/iwRO+uvwE+4RB94koYTzzqUSsUJTWKFHZZdc2ZzyhfMPTdY3W0r4daf+TH
 Ydm+MHUM9UDXUdYRLtCLqjb9R4+v/KQRHgjMD+db6ISQPpSuiNv8eGAS6wVJLxsb
 UMpW2mYA9JW2bJNlJuP26CkJ/j0rs9BPD/c0CgwFpCvzODvK9LCY1GTUef+w9C3S
 oOCMbrtSNTqupaTsN8DR
 =gg9h
 -----END PGP SIGNATURE-----

Merge tag 'samsung-defconfig-v3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into fixes

Pull "Samsung defconfig update for v3.18" from Kukjin Kim:

- enable max77802 rtc and clock drivers for exynos_defconfig
  : enable the kernel config options to have the drivers for
    max77802 including rtc and 2-ch 32kHz clock outputs

* tag 'samsung-defconfig-v3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: exynos_defconfig: Enable max77802 rtc and clock drivers

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-11-27 14:26:52 +01:00
Arnd Bergmann
d168c852d3 Samsung fixes for v3.18
- explicitly set dr_mode on exynos5250-snow
   this is required when kernel is built with USB gadget support.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJUbzslAAoJEA0Cl+kVi2xq+McP/0pVBRa2lBe+RATj+bn6qzlV
 2GzcpcjaSZviUovrNputE4puwsuz7+DslIWMXvbKQLt7NJfuNrPvnveKhCGFi/nV
 Mn6TpZnMSkWQK0x8wXwq1wgOX0kRTFZFg0YEA3HvmUyLTpe9cx+yOxPgkvG0RdoH
 SY+UOtZv6zy5znD177UEEqB3EfwnaAwJB8uJY0Vv1vAXa4edm3KoTAuuRMvewbZ/
 73I3Qr4saezDSHsu00pv+Rx6rc7C3UIDi9W4AjG1hd5QYbDAMDgdXrxNiWEPI/il
 a4iCsOv2amLewY8YBnEo1Up0U0T+o1KsM4BtyUXrLU0q9y8wv+/vYocpbbSnqbCs
 clErECT51+tTbFvKlROTdsQfl3w0z8K91MXLH0Nh5pBS/5UfQ2e7mmxluJ+t2mW4
 GU4X7GV7zKIdOXxCnTKFttv+O9IWSE/s31sIoCQqnKqWf7ZmsoJ6Et3r4bp0piFP
 +DNhf/e5NQ9a11wHOQPKPJB1Ddv32SZuyaNL9GVlF0QgJA8hFoji8QZFd4P5qJb4
 vynqhARTvV1+fiLkOzkI31fiUpXQtm0HcRAYJC1jIYEUkbaPs9VPgMbJ4wGUFmz3
 6/tXSoE/g/69IIpKUxzB/rXt9oGw1H5QqgqV9mB6xqw3uM9a1suQoL0J1t5Qeb5J
 nKlvoI6yOSmXg188f/PS
 =R/UY
 -----END PGP SIGNATURE-----

Merge tag 'samsung-fixes-v3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into fixes

Pull "Samsung fixes for v3.18" from Kukjin Kim:

- explicitly set dr_mode on exynos5250-snow
  this is required when kernel is built with USB gadget support.

* tag 'samsung-fixes-v3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: dts: Explicitly set dr_mode on exynos5250-snow

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-11-27 14:24:41 +01:00
Marc Zyngier
9a343b9eb8 ARM: tegra: irq: fix buggy usage of irq_data irq field
The crazy gic_arch_extn thing that Tegra uses contains multiple
references to the irq field in struct irq_data, and uses this
to directly poke hardware register.

But irq is the *virtual* irq number, something that has nothing
to do with the actual HW irq (stored in the hwirq field). And once
we put the stacked domain code in action, the whole thing explodes,
as these two values are *very* different:

root@bacon-fat:~# cat /proc/interrupts
            CPU0       CPU1
 16:      25801       2075       GIC  29  twd
 17:          0          0       GIC  73  timer0
112:          0          0      GPIO  58  c8000600.sdhci cd
123:          0          0      GPIO  69  c8000200.sdhci cd
279:       1126          0       GIC 122  serial
281:          0          0       GIC  70  7000c000.i2c
282:          0          0       GIC 116  7000c400.i2c
283:          0          0       GIC 124  7000c500.i2c
284:        300          0       GIC  85  7000d000.i2c
[...]

Just replacing all instances of irq with hwirq fixes the issue.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-11-27 14:01:55 +01:00
Anton Blanchard
152d44a853 powerpc: 32 bit getcpu VDSO function uses 64 bit instructions
I used some 64 bit instructions when adding the 32 bit getcpu VDSO
function. Fix it.

Fixes: 18ad51dd34 ("powerpc: Add VDSO version of getcpu")
Cc: stable@vger.kernel.org
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2014-11-27 09:42:12 +11:00
Gavin Shan
360d88a9e3 powerpc/powernv: Replace OPAL_DEASSERT_RESET with EEH_RESET_DEACTIVATE
The flag passed to ioda_eeh_phb_reset() should be EEH_RESET_DEACTIVATE,
which is translated to OPAL_DEASSERT_RESET or something else by the
EEH backend accordingly.

The patch replaces OPAL_DEASSERT_RESET with EEH_RESET_DEACTIVATE for
ioda_eeh_phb_reset().

Cc: stable@vger.kernel.org
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2014-11-27 09:40:32 +11:00
Gavin Shan
7531473c30 powerpc/eeh: Fix PE state format
Obviously I had wrong format given to the PE state output from
/sys/bus/pci/devices/xxxx/eeh_pe_state with some typoes, which
was introduced by commit 2013add4ce. The patch fixes it up.

Fixes: 2013add4ce ("powerpc/eeh: Show hex prefix for PE state sysfs")
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2014-11-27 09:32:58 +11:00
Laurent Dufour
3b8a3c0109 powerpc/pseries: Fix endiannes issue in RTAS call from xmon
On pseries system (LPAR) xmon failed to enter when running in LE mode,
system is hunging. Inititating xmon will lead to such an output on the
console:

SysRq : Entering xmon
cpu 0x15: Vector: 0  at [c0000003f39ffb10]
    pc: c00000000007ed7c: sysrq_handle_xmon+0x5c/0x70
    lr: c00000000007ed7c: sysrq_handle_xmon+0x5c/0x70
    sp: c0000003f39ffc70
   msr: 8000000000009033
  current = 0xc0000003fafa7180
  paca    = 0xc000000007d75e80	 softe: 0	 irq_happened: 0x01
    pid   = 14617, comm = bash
Bad kernel stack pointer fafb4b0 at eca7cc4
cpu 0x15: Vector: 300 (Data Access) at [c000000007f07d40]
    pc: 000000000eca7cc4
    lr: 000000000eca7c44
    sp: fafb4b0
   msr: 8000000000001000
   dar: 10000000
 dsisr: 42000000
  current = 0xc0000003fafa7180
  paca    = 0xc000000007d75e80	 softe: 0	 irq_happened: 0x01
    pid   = 14617, comm = bash
cpu 0x15: Exception 300 (Data Access) in xmon, returning to main loop
xmon: WARNING: bad recursive fault on cpu 0x15

The root cause is that xmon is calling RTAS to turn off the surveillance
when entering xmon, and RTAS is requiring big endian parameters.

This patch is byte swapping the RTAS arguments when running in LE mode.

Cc: stable@vger.kernel.org
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2014-11-27 09:32:57 +11:00
Mahesh Salgaonkar
6acbc5a1da powerpc/powernv: Fix the hmi event version check.
The current HMI event structure is an ABI and carries a version field to
accommodate future changes without affecting/rearranging current structure
members that are valid for previous versions.

The current version check "if (hmi_evt->version != OpalHMIEvt_V1)"
doesn't accomodate the fact that the version number may change in
future.

If firmware starts returning an HMI event with version > 1, this check
will fail and no HMI information will be printed on older kernels.

This patch fixes this issue.

Cc: stable@vger.kernel.org # 3.17+
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
[mpe: Reword changelog]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2014-11-27 09:32:52 +11:00
David S. Miller
0d1d9092b5 sparc: Add NOP dma_cache_sync() implementation.
This can be a NOP because we forward dma_{alloc,free}_noncoherent to
dma_{alloc,free}_coherent.

Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-26 13:36:41 -08:00
Ard Biesheuvel
d3fccc7ef8 kvm: fix kvm_is_mmio_pfn() and rename to kvm_is_reserved_pfn()
This reverts commit 85c8555ff0 ("KVM: check for !is_zero_pfn() in
kvm_is_mmio_pfn()") and renames the function to kvm_is_reserved_pfn.

The problem being addressed by the patch above was that some ARM code
based the memory mapping attributes of a pfn on the return value of
kvm_is_mmio_pfn(), whose name indeed suggests that such pfns should
be mapped as device memory.

However, kvm_is_mmio_pfn() doesn't do quite what it says on the tin,
and the existing non-ARM users were already using it in a way which
suggests that its name should probably have been 'kvm_is_reserved_pfn'
from the beginning, e.g., whether or not to call get_page/put_page on
it etc. This means that returning false for the zero page is a mistake
and the patch above should be reverted.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-11-26 14:40:45 +01:00
Ard Biesheuvel
bb55e9b131 arm/arm64: kvm: drop inappropriate use of kvm_is_mmio_pfn()
Instead of using kvm_is_mmio_pfn() to decide whether a host region
should be stage 2 mapped with device attributes, add a new static
function kvm_is_device_pfn() that disregards RAM pages with the
reserved bit set, as those should usually not be mapped as device
memory.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-11-26 14:40:45 +01:00