1. 28 11月, 2017 1 次提交
    • T
      ARM: OMAP2+: Fix SRAM virt to phys translation for save_secure_ram_context · d09220a8
      Tony Lindgren 提交于
      With the CMA changes from Joonsoo Kim <iamjoonsoo.kim@lge.com>, it
      was noticed that n900 stopped booting. After investigating it turned
      out that n900 save_secure_ram_context does some whacky virtual to
      physical address translation for the SRAM data address.
      
      As we now only have minimal parts of omap3 idle code copied to SRAM,
      running save_secure_ram_context() in SRAM is not needed. It only gets
      called on PM init. And it seems there's no need to ever call this from
      SRAM idle code.
      
      So let's just keep save_secure_ram_context() in DDR, and pass it the
      physical address of the parameters. We can do everything else in
      omap-secure.c like we already do for other secure code.
      
      And since we don't have any documentation, I still have no clue what
      the values for 0, 1 and 1 for the parameters might be. If somebody has
      figured it out, please do send a patch to add some comments.
      Debugged-by: NJoonsoo Kim <iamjoonsoo.kim@lge.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      d09220a8
  2. 14 8月, 2017 1 次提交
    • R
      ARM: align .data section · 1abd3502
      Russell King 提交于
      Robert Jarzmik reports that his PXA25x system fails to boot with 4.12,
      failing at __flush_whole_cache in arch/arm/mm/proc-xscale.S:215:
      
         0xc0019e20 <+0>:     ldr     r1, [pc, #788]
         0xc0019e24 <+4>:     ldr     r0, [r1]	<== here
      
      with r1 containing 0xc06f82cd, which is the address of "clean_addr".
      Examination of the System.map shows:
      
      c06f22c8 D user_pmd_table
      c06f22cc d __warned.19178
      c06f22cd d clean_addr
      
      indicating that a .data.unlikely section has appeared just before the
      .data section from proc-xscale.S.  According to objdump -h, it appears
      that our assembly files default their .data alignment to 2**0, which
      is bad news if the preceding .data section size is not power-of-2
      aligned at link time.
      
      Add the appropriate .align directives to all assembly files in arch/arm
      that are missing them where we require an appropriate alignment.
      Reported-by: NRobert Jarzmik <robert.jarzmik@free.fr>
      Tested-by: NRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      1abd3502
  3. 23 1月, 2016 4 次提交
    • T
      ARM: OMAP2+: Fix l2_inv_api_params for rodata · 0a0b1327
      Tony Lindgren 提交于
      We don't want to write to .text, so let's move l2_inv_api_params
      to .data and access it via a pointer.
      
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Laura Abbott <labbott@redhat.com>
      Cc: Nishanth Menon <nm@ti.com>
      Cc: Richard Woodruff <r-woodruff2@ti.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Tero Kristo <t-kristo@ti.com>
      Acked-by: NNicolas Pitre <nico@linaro.org>
      Cc: stable@vger.kernel.org # v4.0+
      Fixes: 1e6b4811 ("ARM: mm: allow non-text sections to be
      non-executable")
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      0a0b1327
    • T
      ARM: OMAP2+: Fix save_secure_ram_context for rodata · a5311d4d
      Tony Lindgren 提交于
      We don't want to write to .text and we can move save_secure_ram_context
      into .data as it all gets copied into SRAM anyways.
      
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Laura Abbott <labbott@redhat.com>
      Cc: Nishanth Menon <nm@ti.com>
      Cc: Richard Woodruff <r-woodruff2@ti.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Acked-by: NNicolas Pitre <nico@linaro.org>
      Cc: stable@vger.kernel.org # v4.0+
      Fixes: 1e6b4811 ("ARM: mm: allow non-text sections to be
      non-executable")
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      a5311d4d
    • T
      ARM: OMAP2+: Fix l2dis_3630 for rodata · eeaf9646
      Tony Lindgren 提交于
      We don't want to write to .text section. Let's move l2dis_3630
      to .data and access it via a pointer.
      
      For calculating the offset, let's optimize out the add and do it
      in ldr/str as suggested by Nicolas Pitre <nicolas.pitre@linaro.org>.
      
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Laura Abbott <labbott@redhat.com>
      Cc: Nishanth Menon <nm@ti.com>
      Cc: Richard Woodruff <r-woodruff2@ti.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Tero Kristo <t-kristo@ti.com>
      Cc: stable@vger.kernel.org # v4.0+
      Acked-by: NNicolas Pitre <nico@linaro.org>
      Cc: stable@vger.kernel.org # v4.0+
      Fixes: 1e6b4811 ("ARM: mm: allow non-text sections to be
      non-executable")
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      eeaf9646
    • T
      ARM: OMAP2+: Fix wait_dll_lock_timed for rodata · d9db5910
      Tony Lindgren 提交于
      We don't want to be writing to .text so it can be set rodata.
      Fix error "Unable to handle kernel paging request at virtual address
      c012396c" in wait_dll_lock_timed if CONFIG_DEBUG_RODATA is selected.
      
      As these counters are for debugging only and unused, we can just
      remove them.
      
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Laura Abbott <labbott@redhat.com>
      Cc: Nishanth Menon <nm@ti.com>
      Cc: Richard Woodruff <r-woodruff2@ti.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Tero Kristo <t-kristo@ti.com>
      Acked-by: NNicolas Pitre <nico@linaro.org>
      Cc: stable@vger.kernel.org # v4.0+
      Fixes: 1e6b4811 ("ARM: mm: allow non-text sections to be
      non-executable")
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      d9db5910
  4. 28 5月, 2015 1 次提交
    • T
      ARM: OMAP3: Fix booting with thumb2 kernel · d8a50941
      Tony Lindgren 提交于
      We get a NULL pointer dereference on omap3 for thumb2 compiled kernels:
      
      Internal error: Oops: 80000005 [#1] SMP THUMB2
      ...
      [<c046497b>] (_raw_spin_unlock_irqrestore) from [<c0024375>]
      (omap3_enter_idle_bm+0xc5/0x178)
      [<c0024375>] (omap3_enter_idle_bm) from [<c0374e63>]
      (cpuidle_enter_state+0x77/0x27c)
      [<c0374e63>] (cpuidle_enter_state) from [<c00627f1>]
      (cpu_startup_entry+0x155/0x23c)
      [<c00627f1>] (cpu_startup_entry) from [<c06b9a47>]
      (start_kernel+0x32f/0x338)
      [<c06b9a47>] (start_kernel) from [<8000807f>] (0x8000807f)
      
      The power management related assembly on omaps needs to interact with
      ARM mode bootrom code, so we need to keep most of the related assembly
      in ARM mode.
      
      Turns out this error is because of missing ENDPROC for assembly code
      as suggested by Stephen Boyd <sboyd@codeaurora.org>. Let's fix the
      problem by adding ENDPROC in two places to sleep34xx.S.
      
      Let's also remove the now duplicate custom code for mode switching.
      This has been unnecessary since commit 6ebbf2ce ("ARM: convert
      all "mov.* pc, reg" to "bx reg" for ARMv6+").
      
      And let's also remove the comments about local variables, they are
      now just confusing after the ENDPROC.
      
      The reason why ENDPROC makes a difference is it sets .type and then
      the compiler knows what to do with the thumb bit as explained at:
      
      https://wiki.ubuntu.com/ARM/Thumb2PortingHowtoReported-by: NKevin Hilman <khilman@kernel.org>
      Tested-by: NKevin Hilman <khilman@linaro.org>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      d8a50941
  5. 01 11月, 2012 1 次提交
  6. 21 10月, 2012 2 次提交
  7. 18 10月, 2012 1 次提交
  8. 13 9月, 2012 2 次提交
    • T
      ARM: OMAP2+ Move SoC specific headers to be local to mach-omap2 · c49f34bc
      Tony Lindgren 提交于
      These can now be moved to be local headers in mach-omap2.
      
      Note that this patch removes arch/arm/plat-omap/devices.c as it
      will get removed anyways with Paul Walmsley's patch
      "ARM: OMAP: split OMAP1, OMAP2+ RNG device registration".
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      c49f34bc
    • T
      ARM: OMAP: Split plat/hardware.h, use local soc.h for omap2+ · dbc04161
      Tony Lindgren 提交于
      As the plat and mach includes need to disappear for single zImage work,
      we need to remove plat/hardware.h.
      
      Do this by splitting plat/hardware.h into omap1 and omap2+ specific files.
      
      The old plat/hardware.h already has omap1 only defines, so it gets moved
      to mach/hardware.h for omap1. For omap2+, we use the local soc.h
      that for now just includes the related SoC headers to keep this patch more
      readable.
      
      Note that the local soc.h still includes plat/cpu.h that can be dealt
      with in later patches. Let's also include plat/serial.h from common.h for
      all the board-*.c files. This allows making the include files local later
      on without patching these files again.
      
      Note that only minimal changes are done in this patch for the
      drivers/watchdog/omap_wdt.c driver to keep things compiling. Further
      patches are needed to eventually remove cpu_is_omap usage in the drivers.
      
      Also only minimal changes are done to sound/soc/omap/* to remove the
      unneeded includes and to define OMAP44XX_MCPDM_L3_BASE locally so there's
      no need to include omap44xx.h.
      
      While at it, also sort some of the includes in the standard way.
      
      Cc: linux-watchdog@vger.kernel.org
      Cc: alsa-devel@alsa-project.org
      Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
      Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
      Cc: Liam Girdwood <lrg@ti.com>
      Acked-by: NWim Van Sebroeck <wim@iguana.be>
      Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      dbc04161
  9. 25 2月, 2012 2 次提交
  10. 30 6月, 2011 2 次提交
    • R
      ARM: pm: omap3: move saving of the auxiliary control registers to C · cbe26349
      Russell King 提交于
      Move the saving of the auxiliary control registers into C; there's
      no need for this to be in assembly code.  This results in less
      assembly code to deal with in OMAP.
      
      Kevin tested full-chip retention and off on 3430/n900, 3530/Overo and
      3630/Zoom3.
      Tested-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      cbe26349
    • J
      ARM: pm: omap3: run the ASM sleep code from DDR · 46e130d2
      Jean Pihet 提交于
      Most of the ASM sleep code (in arch/arm/mach-omap2/sleep34xx.S)
      is copied to internal SRAM at boot and after wake-up from CORE OFF
      mode.  However only a small part of the code really needs to run from
      internal SRAM.
      
      This fix lets most of the ASM idle code run from the DDR in order to
      minimize the SRAM usage and the overhead in the code copy.
      
      The only pieces of code that are mandatory in SRAM are:
      - the i443 erratum WA,
      - the i581 erratum WA,
      - the security extension code.
      
      SRAM usage:
      - original code:
        . 560 bytes for omap3_sram_configure_core_dpll (used by DVFS),
        . 852 bytes for omap_sram_idle (used by suspend/resume in RETention),
        . 124 bytes for es3_sdrc_fix (used by suspend/resume in OFF mode on ES3.x),
        . 108 bytes for save_secure_ram_context (used on HS parts only).
      
      With this fix the usage for suspend/resume in RETention goes down 288
      bytes, so the gain in SRAM usage for suspend/resume is 564 bytes.
      
      Also fixed the SRAM initialization sequence to avoid an unnecessary
      copy to SRAM at boot time and for readability.
      
      Tested on Beagleboard (ES2.x) in idle with full RET and OFF modes.
      
      Kevin Hilman tested retention and off on 3430/n900, 3530/Overo and
      3630/Zoom3
      Signed-off-by: NJean Pihet <j-pihet@ti.com>
      Reviewed-by: NKevin Hilman <khilman@ti.com>
      Tested-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      46e130d2
  11. 24 6月, 2011 4 次提交
  12. 11 3月, 2011 5 次提交
  13. 10 3月, 2011 2 次提交
  14. 04 2月, 2011 1 次提交
  15. 22 12月, 2010 11 次提交