1. 13 8月, 2013 6 次提交
    • J
      ARM: tegra: add LP1 suspend support for Tegra114 · e9f62449
      Joseph Lo 提交于
      The LP1 suspend mode will power off the CPU, clock gated the PLLs and put
      SDRAM to self-refresh mode. Any interrupt can wake up device from LP1. The
      sequence when LP1 suspending:
      
      * tunning off L1 data cache and the MMU
      * storing some EMC registers, DPD (deep power down) status, clk source of
        mselect and SCLK burst policy
      * putting SDRAM into self-refresh
      * switching CPU to CLK_M (12MHz OSC)
      * tunning off PLLM, PLLP, PLLA, PLLC and PLLX
      * switching SCLK to CLK_S (32KHz OSC)
      * shutting off the CPU rail
      
      The sequence of LP1 resuming:
      
      * re-enabling PLLM, PLLP, PLLA, PLLC and PLLX
      * restoring the clk source of mselect and SCLK burst policy
      * setting up CCLK burst policy to PLLX
      * restoring DPD status and some EMC registers
      * resuming SDRAM to normal mode
      * jumping to the "tegra_resume" from PMC_SCRATCH41
      
      Due to the SDRAM will be put into self-refresh mode, the low level
      procedures of LP1 suspending and resuming should be copied to
      TEGRA_IRAM_CODE_AREA (TEGRA_IRAM_BASE + SZ_4K) when suspending. Before
      restoring the CPU context when resuming, the SDRAM needs to be switched
      back to normal mode. And the PLLs need to be re-enabled, SCLK burst policy
      be restored. Then jumping to "tegra_resume" that was expected to be stored
      in PMC_SCRATCH41 to restore CPU context and back to kernel.
      
      Based on the work by: Bo Yan <byan@nvidia.com>
      Signed-off-by: NJoseph Lo <josephl@nvidia.com>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      e9f62449
    • J
      ARM: tegra: add LP1 suspend support for Tegra20 · 731a9274
      Joseph Lo 提交于
      The LP1 suspend mode will power off the CPU, clock gated the PLLs and put
      SDRAM to self-refresh mode. Any interrupt can wake up device from LP1. The
      sequence when LP1 suspending:
      
      * tunning off L1 data cache and the MMU
      * putting SDRAM into self-refresh
      * storing some EMC registers and SCLK burst policy
      * switching CPU to CLK_M (12MHz OSC)
      * switching SCLK to CLK_S (32KHz OSC)
      * tunning off PLLM, PLLP and PLLC
      * shutting off the CPU rail
      
      The sequence of LP1 resuming:
      
      * re-enabling PLLM, PLLP, and PLLC
      * restoring some EMC registers and SCLK burst policy
      * setting up CCLK burst policy to PLLP
      * resuming SDRAM to normal mode
      * jumping to the "tegra_resume" from PMC_SCRATCH41
      
      Due to the SDRAM will be put into self-refresh mode, the low level
      procedures of LP1 suspending and resuming should be copied to
      TEGRA_IRAM_CODE_AREA (TEGRA_IRAM_BASE + SZ_4K) when suspending. Before
      restoring the CPU context when resuming, the SDRAM needs to be switched
      back to normal mode. And the PLLs need to be re-enabled, SCLK burst policy
      be restored, CCLK burst policy be set in PLLP. Then jumping to
      "tegra_resume" that was expected to be stored in PMC_SCRATCH41 to restore
      CPU context and back to kernel.
      
      Based on the work by:
      Colin Cross <ccross@android.com>
      Gary King <gking@nvidia.com>
      Signed-off-by: NJoseph Lo <josephl@nvidia.com>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      731a9274
    • J
      ARM: tegra: add LP1 suspend support for Tegra30 · e7a932b1
      Joseph Lo 提交于
      The LP1 suspend mode will power off the CPU, clock gated the PLLs and put
      SDRAM to self-refresh mode. Any interrupt can wake up device from LP1. The
      sequence when LP1 suspending:
      
      * tunning off L1 data cache and the MMU
      * storing some EMC registers, DPD (deep power down) status, clk source of
        mselect and SCLK burst policy
      * putting SDRAM into self-refresh
      * switching CPU to CLK_M (12MHz OSC)
      * tunning off PLLM, PLLP, PLLA, PLLC and PLLX
      * switching SCLK to CLK_S (32KHz OSC)
      * shutting off the CPU rail
      
      The sequence of LP1 resuming:
      
      * re-enabling PLLM, PLLP, PLLA, PLLC and PLLX
      * restoring the clk source of mselect and SCLK burst policy
      * setting up CCLK burst policy to PLLX
      * restoring DPD status and some EMC registers
      * resuming SDRAM to normal mode
      * jumping to the "tegra_resume" from PMC_SCRATCH41
      
      Due to the SDRAM will be put into self-refresh mode, the low level
      procedures of LP1 suspending and resuming should be copied to
      TEGRA_IRAM_CODE_AREA (TEGRA_IRAM_BASE + SZ_4K) when suspending. Before
      restoring the CPU context when resuming, the SDRAM needs to be switched
      back to normal mode. And the PLLs need to be re-enabled, SCLK burst policy
      be restored, CCLK burst policy be set in PLLX. Then jumping to
      "tegra_resume" that was expected to be stored in PMC_SCRATCH41 to restore
      CPU context and back to kernel.
      
      Based on the work by: Scott Williams <scwilliams@nvidia.com>
      Signed-off-by: NJoseph Lo <josephl@nvidia.com>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      e7a932b1
    • J
      ARM: tegra: add common LP1 suspend support · 95872f42
      Joseph Lo 提交于
      The LP1 suspending mode on Tegra means CPU rail off, devices and PLLs are
      clock gated and SDRAM in self-refresh mode. That means the low level LP1
      suspending and resuming code couldn't be run on DRAM and the CPU must
      switch to the always on clock domain (a.k.a. CLK_M 12MHz oscillator). And
      the system clock (SCLK) would be switched to CLK_S, a 32KHz oscillator.
      The LP1 low level handling code need to be moved to IRAM area first. And
      marking the LP1 mask for indicating the Tegra device is in LP1. The CPU
      power timer needs to be re-calculated based on 32KHz that was originally
      based on PCLK.
      
      When resuming from LP1, the LP1 reset handler will resume PLLs and then
      put DRAM to normal mode. Then jumping to the "tegra_resume" that will
      restore full context before back to kernel. The "tegra_resume" handler
      was expected to be found in PMC_SCRATCH41 register.
      
      This is common LP1 procedures for Tegra, so we do these jobs mainly in
      this patch:
      * moving LP1 low level handling code to IRAM
      * marking LP1 mask
      * copying the physical address of "tegra_resume" to PMC_SCRATCH41
      * re-calculate the CPU power timer based on 32KHz
      Signed-off-by: NJoseph Lo <josephl@nvidia.com>
      [swarren, replaced IRAM_CODE macro with IO_ADDRESS(TEGRA_IRAM_CODE_AREA)]
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      95872f42
    • J
      ARM: tegra: config the polarity of the request of sys clock · 444f9a80
      Joseph Lo 提交于
      When suspending to LP1 mode, the SYSCLK will be clock gated. And different
      board may have different polarity of the request of SYSCLK, this patch
      configure the polarity from the DT for the board.
      Signed-off-by: NJoseph Lo <josephl@nvidia.com>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      444f9a80
    • J
      ARM: tegra: add common resume handling code for LP1 resuming · 5b795d05
      Joseph Lo 提交于
      Add support to the Tegra CPU reset vector to detect whether the CPU is
      resuming from LP1 suspend state. If it is, branch to the LP1-specific
      resume code.
      
      When Tegra enters the LP1 suspend state, the SDRAM controller is placed
      into a self-refresh state. For this reason, we must place the LP1 resume
      code into IRAM, so that it is accessible before SDRAM access has been
      re-enabled.
      Signed-off-by: NJoseph Lo <josephl@nvidia.com>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      5b795d05
  2. 09 8月, 2013 1 次提交
    • S
      ARM: tegra: unify Tegra's Kconfig a bit more · 20984c44
      Stephen Warren 提交于
      Move all common select clauses from ARCH_TEGRA_*_SOC to ARCH_TEGRA to
      eliminate duplication. The USB-related selects all should have been
      common too, but were missing from Tegra114 previously. Move these to
      ARCH_TEGRA too. The latter fixes a build break when only Tegra114
      support was enabled, but not Tegra20 or Tegra30 support.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      20984c44
  3. 20 7月, 2013 12 次提交
  4. 16 7月, 2013 1 次提交
  5. 13 7月, 2013 3 次提交
  6. 12 7月, 2013 3 次提交
  7. 11 7月, 2013 5 次提交
  8. 10 7月, 2013 9 次提交
    • M
      microblaze: Move __NR_syscalls from uapi · 40c2702a
      Michal Simek 提交于
      The reason is that other applications like strace
      think that every __NR_xx is syscall.
      Also __NR_syscalls is not used by user applications/libs.
      Signed-off-by: NMichal Simek <michal.simek@xilinx.com>
      40c2702a
    • J
      ARM: 7778/1: smp_twd: twd_update_frequency need be run on all online CPUs · cbbe6f82
      Jason Liu 提交于
      When the local timer freq changed, the twd_update_frequency function
      should be run all the CPUs include itself, otherwise, the twd freq will
      not get updated and the local timer will not run correcttly.
      
      smp_call_function will run functions on all other CPUs, but not include
      himself, this is not correct,use on_each_cpu instead to fix this issue.
      
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Shawn Guo <shawn.guo@linaro.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: stable@vger.kernel.org
      Acked-by: NLinus Walleij <linus.walleij@linaro.org>
      Acked-by: NShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NJason Liu <r64343@freescale.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      cbbe6f82
    • F
      ARM: 7782/1: Kconfig: Let ARM_ERRATA_364296 not depend on CONFIG_SMP · fd832478
      Fabio Estevam 提交于
      imx_v6_v7_defconfig handles both multi-core and single-core SoCs, and it has CONFIG_SMP=y selected by default.
      
      With such config we cannot select ARM_ERRATA_364296, as it depends on !SMP.
      
      Let ARM_ERRATA_364296 be undependent on CONFIG_SMP, so that we can select this erratum for the ARM1136 SoCs, even if CONFIG_SMP=y is enabled.
      Reviewed-by: NDave Martin <Dave.Martin@arm.com>
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      fd832478
    • H
      parisc: Fix gcc miscompilation in pa_memcpy() · 5b879d78
      Helge Deller 提交于
      When running the LTP testsuite one may hit this kernel BUG() with the
      write06 testcase:
      
      kernel BUG at mm/filemap.c:2023!
      CPU: 1 PID: 8614 Comm: writev01 Not tainted 3.10.0-rc7-64bit-c3000+ #6
      IASQ: 0000000000000000 0000000000000000 IAOQ: 00000000401e6e84 00000000401e6e88
       IIR: 03ffe01f    ISR: 0000000010340000  IOR: 000001fbe0380820
       CPU:        1   CR30: 00000000bef80000 CR31: ffffffffffffffff
       ORIG_R28: 00000000bdc192c0
       IAOQ[0]: iov_iter_advance+0x3c/0xc0
       IAOQ[1]: iov_iter_advance+0x40/0xc0
       RP(r2): generic_file_buffered_write+0x204/0x3f0
      Backtrace:
       [<00000000401e764c>] generic_file_buffered_write+0x204/0x3f0
       [<00000000401eab24>] __generic_file_aio_write+0x244/0x448
       [<00000000401eadc0>] generic_file_aio_write+0x98/0x150
       [<000000004024f460>] do_sync_readv_writev+0xc0/0x130
       [<000000004025037c>] compat_do_readv_writev+0x12c/0x340
       [<00000000402505f8>] compat_writev+0x68/0xa0
       [<0000000040251d88>] compat_SyS_writev+0x98/0xf8
      
      Reason for this crash is a gcc miscompilation in the fault handlers of
      pa_memcpy() which return the fault address instead of the copied bytes.
      Since this seems to be a generic problem with gcc-4.7.x (and below), it's
      better to simplify the fault handlers in pa_memcpy to avoid this problem.
      
      Here is a simple reproducer for the problem:
      
      int main(int argc, char **argv)
      {
      	int fd, nbytes;
      	struct iovec wr_iovec[] = {
      		{ "TEST STRING                     ",32},
      		{ (char*)0x40005000,32} }; // random memory.
      	fd = open(DATA_FILE, O_RDWR | O_CREAT, 0666);
      	nbytes = writev(fd, wr_iovec, 2);
      	printf("return value = %d, errno %d (%s)\n",
      		nbytes, errno, strerror(errno));
      	return 0;
      }
      
      In addition, John David Anglin wrote:
      There is no gcc PR as pa_memcpy is not legitimate C code. There is an
      implicit assumption that certain variables will contain correct values
      when an exception occurs and the code randomly jumps to one of the
      exception blocks.  There is no guarantee of this.  If a PR was filed, it
      would likely be marked as invalid.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Signed-off-by: NJohn David Anglin <dave.anglin@bell.net>
      Cc: <stable@vger.kernel.org> # 3.8+
      Signed-off-by: NHelge Deller <deller@gmx.de>
      5b879d78
    • J
      parisc: Ensure volatile space register %sr1 is not clobbered · e8d8fc21
      John David Anglin 提交于
      I still see the occasional random segv on rp3440.  Looking at one of
      these (a code 15), it appeared the problem must be with the cache
      handling of anonymous pages.  Reviewing this, I noticed that the space
      register %sr1 might be being clobbered when we flush an anonymous page.
      
      Register %sr1 is used for TLB purges in a couple of places.  These
      purges are needed on PA8800 and PA8900 processors to ensure cache
      consistency of flushed cache lines.
      
      The solution here is simply to move the %sr1 load into the TLB lock
      region needed to ensure that one purge executes at a time on SMP
      systems.  This was already the case for one use.  After a few days of
      operation, I haven't had a random segv on my rp3440.
      Signed-off-by: NJohn David Anglin <dave.anglin@bell.net>
      Cc: <stable@vger.kernel.org> # 3.10
      Signed-off-by: NHelge Deller <deller@gmx.de>
      e8d8fc21
    • H
      parisc: optimize mtsp(0,sr) inline assembly · 92b59929
      Helge Deller 提交于
      If the value which should be moved into a space register is zero, we can
      optimize the inline assembly to become "mtsp %r0,%srX".
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Cc: <stable@vger.kernel.org> # 3.10
      92b59929
    • H
      parisc: switch to gzip-compressed vmlinuz kernel · 594174d8
      Helge Deller 提交于
      The latest PA-RISC Boot Loader (palo) allows loading of gzip compressed
      vmlinuz kernels. So let's now switch to build a vmlinuz file when we
      build a palo boot image.
      
      PALO version 1.9 (or higher) is required for this which is available at
      git://git.kernel.org/pub/scm/linux/kernel/git/deller/palo.gitSigned-off-by: NHelge Deller <deller@gmx.de>
      Cc: <stable@vger.kernel.org> # 3.10
      594174d8
    • H
      parisc: more capabilities info in /proc/cpuinfo · 30a9f0b2
      Helge Deller 提交于
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Cc: <stable@vger.kernel.org> # 3.10
      30a9f0b2
    • K
      arm: add support for LZ4-compressed kernel · f9b493ac
      Kyungsik Lee 提交于
      Integrates the LZ4 decompression code to the arm pre-boot code.
      Signed-off-by: NKyungsik Lee <kyungsik.lee@lge.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Florian Fainelli <florian@openwrt.org>
      Cc: Yann Collet <yann.collet.73@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f9b493ac