1. 11 3月, 2016 2 次提交
    • M
      xtensa: support hardware breakpoints/watchpoints · c91e02bd
      Max Filippov 提交于
      Use perf framework to manage hardware instruction and data breakpoints.
      Add two new ptrace calls: PTRACE_GETHBPREGS and PTRACE_SETHBPREGS to
      query and set instruction and data breakpoints.
      Address bit 0 choose instruction (0) or data (1) break register, bits
      31..1 are the register number.
      Both calls transfer two 32-bit words: address (0) and control (1).
      Instruction breakpoint contorl word is 0 to clear breakpoint, 1 to set.
      Data breakpoint control word bit 31 is 'trigger on store', bit 30 is
      'trigger on load, bits 29..0 are length. Length 0 is used to clear a
      breakpoint. To set a breakpoint length must be a power of 2 in the range
      1..64 and the address must be length-aligned.
      
      Introduce new thread_info flag: TIF_DB_DISABLED. Set it if debug
      exception is raised by the kernel code accessing watched userspace
      address and disable corresponding data breakpoint. On exit to userspace
      check that flag and, if set, restore all data breakpoints.
      
      Handle debug exceptions raised with PS.EXCM set. This may happen when
      window overflow/underflow handler or fast exception handler hits data
      breakpoint, in which case save and disable all data breakpoints,
      single-step faulting instruction and restore data breakpoints.
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      c91e02bd
    • M
      xtensa: remove remaining non-functional KGDB bits · 816aa588
      Max Filippov 提交于
      KGDB is not supported on xtensa, but there are bits of related code
      under arch/xtensa/kernel. Remove these bits.
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      816aa588
  2. 03 11月, 2015 1 次提交
    • M
      xtensa: fix secondary core boot in SMP · ab45fb14
      Max Filippov 提交于
      There are multiple factors adding to the issue in different
      configurations:
      
      - commit 17290231 ("xtensa: add fixup for double exception raised
        in window overflow") added function window_overflow_restore_a0_fixup to
        double exception vector overlapping reset vector location of secondary
        processor cores.
      - on MMUv2 cores RESET_VECTOR1_VADDR may point to uncached kernel memory
        making code overlapping depend on cache type and size, so that without
        cache or with WT cache reset vector code overwrites double exception
        code, making issue even harder to detect.
      - on MMUv3 cores RESET_VECTOR1_VADDR may point to unmapped area, as
        MMUv3 cores change virtual address map to match MMUv2 layout, but
        reset vector virtual address is given for the original MMUv3 mapping.
      - physical memory region of the secondary reset vector is not reserved
        in the physical memory map, and thus may be allocated and overwritten
        at arbitrary moment.
      
      Fix it as follows:
      
      - move window_overflow_restore_a0_fixup code to .text section.
      - define RESET_VECTOR1_VADDR so that it points to reset vector in the
        cacheable MMUv2 map for cores with MMU.
      - reserve reset vector region in the physical memory map. Drop separate
        literal section and build mxhead.S with text section literals.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      ab45fb14
  3. 20 8月, 2015 1 次提交
    • M
      xtensa: improve vmlinux.lds.S sed post-processing · 895fb315
      Max Filippov 提交于
      Current sed script makes assumptions about the structure of rules that
      group .text sections in the vmlinux linker script. These assumptions
      get broken occasionally, e.g.: 779c88c9 "ARM: 8321/1: asm-generic:
      introduce.text.fixup input section", or 9bebe9e5 "kbuild: Fix
      .text.unlikely placement".
      
      Rewrite sed rules so that they don't depend on number/arrangement of text
      sections in *(...) blocks.
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      895fb315
  4. 17 8月, 2015 1 次提交
    • M
      xtensa: implement counting and sampling perf events · 9bd46da4
      Max Filippov 提交于
      Xtensa Performance Monitor Module has up to 8 32 bit wide performance
      counters. Each counter may be enabled independently and can count any
      single type of hardware performance events. Event counting may be enabled
      and disabled globally (per PMM).
      Each counter has status register with bits indicating if the counter has
      been overflown and may be programmed to raise profiling IRQ on overflow.
      This IRQ is used to rewind counters and allow for counting more than 2^32
      samples for counting events and to report samples for sampling events.
      
      For more details see Tensilica Debug User's Guide, chapter 8
      "Performance monitor module".
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      9bd46da4
  5. 10 4月, 2015 1 次提交
    • G
      xtensa: Fix fix linker script transformation for .text / .text.fixup · 834a316e
      Guenter Roeck 提交于
      Commit 779c88c9 ("ARM: 8321/1: asm-generic: introduce .text.fixup
      input section") introduced a new .text.fixup section which is merged
      with .text at link time. This causes xtensa builds to fail with lots
      of error messages similar to the following.
      
      lib/lib.a(kobject.o): In function `kobject_create':
      (.text+0x498): dangerous relocation: l32r: literal placed after use:
      				     (.literal+0x150)
      
      Linker script transformation needs to be updated to detect and handle
      the new section.
      
      Fixes: 779c88c9 ("ARM: 8321/1: asm-generic: introduce .text.fixup
      		     input section")
      Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NChris Zankel <chris@zankel.net>
      834a316e
  6. 15 1月, 2014 1 次提交
  7. 08 7月, 2013 1 次提交
  8. 09 5月, 2013 2 次提交
    • M
      xtensa: add stacktrace support · 3e4196a5
      Max Filippov 提交于
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: NChris Zankel <chris@zankel.net>
      3e4196a5
    • M
      xtensa: add MMU v3 support · e85e335f
      Max Filippov 提交于
      MMUv3 comes out of reset with identity vaddr -> paddr mapping in the TLB
      way 6:
      
      Way 6 (512 MB)
              Vaddr       Paddr       ASID  Attr RWX Cache
              ----------  ----------  ----  ---- --- -------
              0x00000000  0x00000000  0x01  0x03 RWX Bypass
              0x20000000  0x20000000  0x01  0x03 RWX Bypass
              0x40000000  0x40000000  0x01  0x03 RWX Bypass
              0x60000000  0x60000000  0x01  0x03 RWX Bypass
              0x80000000  0x80000000  0x01  0x03 RWX Bypass
              0xa0000000  0xa0000000  0x01  0x03 RWX Bypass
              0xc0000000  0xc0000000  0x01  0x03 RWX Bypass
              0xe0000000  0xe0000000  0x01  0x03 RWX Bypass
      
      This patch adds remapping code at the reset vector or at the kernel
      _start (depending on CONFIG_INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX) that
      reconfigures MMUv3 as MMUv2:
      
      Way 5 (128 MB)
              Vaddr       Paddr       ASID  Attr RWX Cache
              ----------  ----------  ----  ---- --- -------
              0xd0000000  0x00000000  0x01  0x07 RWX WB
              0xd8000000  0x00000000  0x01  0x03 RWX Bypass
      Way 6 (256 MB)
              Vaddr       Paddr       ASID  Attr RWX Cache
              ----------  ----------  ----  ---- --- -------
              0xe0000000  0xf0000000  0x01  0x07 RWX WB
              0xf0000000  0xf0000000  0x01  0x03 RWX Bypass
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: NChris Zankel <chris@zankel.net>
      e85e335f
  9. 19 12月, 2012 1 次提交
  10. 04 10月, 2012 2 次提交
  11. 05 5月, 2012 1 次提交
  12. 02 5月, 2010 1 次提交
    • C
      xtensa: Fix linker script patch-up · ed5010ea
      Chris Zankel 提交于
      The Xtensa architecture requires to patch the generated linker script
      to insert precede certain sections with a .literal section. Ammend the
      sed script to fix-up only sequences that start with a '*':
      '*(.init.text)' -> '*(.init.literal .init.text)'
      Signed-off-by: NChris Zankel <chris@zankel.net>
      ed5010ea
  13. 20 9月, 2009 1 次提交
    • S
      arm, cris, mips, sparc, powerpc, um, xtensa: fix build with bash 4.0 · 51b563fc
      Sam Ravnborg 提交于
      Albin Tonnerre <albin.tonnerre@free-electrons.com> reported:
      
          Bash 4 filters out variables which contain a dot in them.
          This happends to be the case of CPPFLAGS_vmlinux.lds.
          This is rather unfortunate, as it now causes
          build failures when using SHELL=/bin/bash to compile,
          or when bash happens to be used by make (eg when it's /bin/sh)
      
      Remove the common definition of CPPFLAGS_vmlinux.lds by
      pushing relevant stuff to either Makefile.build or the
      arch specific kernel/Makefile where we build the linker script.
      
      This is also nice cleanup as we move the information out where
      it is used.
      
      Notes for the different architectures touched:
      
      arm - we use an already exported symbol
      cris - we use a config symbol aleady available
             [Not build tested]
      mips - the jiffies complexity has moved to vmlinux.lds.S where we need it.
             Added a few variables to CPPFLAGS - they are only used by
             the linker script.
             [Not build tested]
      powerpc - removed assignment that is not needed
                [not build tested]
      sparc - simplified it using $(BITS)
      um - introduced a few new exported variables to deal with this
      xtensa - added options to CPP invocation
               [not build tested]
      
      Cc: Albin Tonnerre <albin.tonnerre@free-electrons.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Chris Zankel <chris@zankel.net>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      51b563fc
  14. 12 5月, 2009 1 次提交
    • C
      xtensa: Fix linker script to include .literal sections · 78f3cdfa
      Chris Zankel 提交于
      Fix resembles implementation from Marc Gauthier and Piet Denaly:
      
      In the Xtensa architecture, assembly generates literals which must always
      precede the code (the L32R instruction that loads them only uses negative
      PC-relative offsets).  For any *.text section, literals are placed in a
      corresponding *.literal section.  The linker script (vmlinux.lds) must
      place these in the correct order.  It must also combine them, when the
      *.text section can be larger than L32R's 256 kB range.
      
      For example, this doesn't work:  *(.literal) *(.text) because L32R
      instructions at the end of .text can't reach the literals.
      
      The linker can solve this if they are combined in parentheses, like this:
             *(.literal .text)
      because it is now allowed mix literals in .text to bring them in range.
      
      None of this is done by standard vmlinux.lds.h macros such as TEXT_TEXT
      and INIT_TEXT.  To avoid replicating the logic of that header file, we
      instead post-process the generated linker script to convert *(xxx.text)
      to *(xxx.literal xxx.text) for the following text sections:
             .text .ref.text .*init.text .*exit.text .text.*
      using a sed script.  To do this we must override the default rule for
      vmlinux.lds (see scripts/Makefile.build and the top-level Makefile)
      to insert this extra step.
      Signed-off-by: NMarc Gauthier <marc@tensilica.com>
      Signed-off-by: NPete Delaney <piet@tensilica.com>
      Signed-off-by: NChris Zankel <chris@zankel.net>
      78f3cdfa
  15. 17 4月, 2008 1 次提交
  16. 28 8月, 2007 2 次提交
  17. 14 12月, 2006 1 次提交
  18. 24 6月, 2005 1 次提交