1. 11 Mar, 2016 11 commits
    • Max Filippov's avatar
      xtensa: support hardware breakpoints/watchpoints · c91e02bd
      Max Filippov authored
      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: default avatarMax Filippov <jcmvbkbc@gmail.com>
      c91e02bd
    • Max Filippov's avatar
      xtensa: use context structure for debug exceptions · 6ec7026a
      Max Filippov authored
      With implementation of data breakpoints debug exceptions raised when
      PS.EXCM is set need to be handled, e.g. window overflow code can write
      to watched userspace address. Currently debug exception handler uses
      EXCSAVE and DEPC SRs to save temporary registers, but DEPC may not be
      available when PS.EXCM is set and more space will be needed to save
      additional state.
      Reorganize debug context: create per-CPU structure debug_table instance
      and store its address in the EXCSAVE<debug level> instead of
      debug_exception function address. Expand this structure when more save
      space is needed.
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      6ec7026a
    • Max Filippov's avatar
      xtensa: remove remaining non-functional KGDB bits · 816aa588
      Max Filippov authored
      KGDB is not supported on xtensa, but there are bits of related code
      under arch/xtensa/kernel. Remove these bits.
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      816aa588
    • Max Filippov's avatar
      xtensa: clear all DBREAKC registers on start · 7de7ac78
      Max Filippov authored
      There are XCHAL_NUM_DBREAK registers, clear them all.
      This also fixes cryptic assembler error message with binutils 2.25 when
      XCHAL_NUM_DBREAK is 0:
      
        as: out of memory allocating 18446744073709551575 bytes after a total
        of 495616 bytes
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      7de7ac78
    • Max Filippov's avatar
      xtensa: xtfpga: fix earlycon endianness · 56b9f9d6
      Max Filippov authored
      Serial port is attached to XTFPGA boards as native endian device, now
      that earlycon parameter parser understands mmio32native put it into
      earlycon kernel parameter. This makes early console functional on both
      little- and big-endian CPUs with identical kernel command lines.
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      56b9f9d6
    • Max Filippov's avatar
      xtensa: xtfpga: fix i2c controller register width and endianness · bce299ca
      Max Filippov authored
      I2C controller is attached to XTFPGA boards as native endian device, mark
      it as such in DTS.
      Set register width in DTS to 4, this way it works both for little- and
      big-endian CPUs.
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      bce299ca
    • Max Filippov's avatar
      xtensa: xtfpga: fix ethernet controller endianness · d99434e1
      Max Filippov authored
      Ethernet controller is attached to XTFPGA boards as native endian device,
      mark it as such in DTS and pass correct endianness in platform data.
      This makes network functional on big-endian CPUs.
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      d99434e1
    • Max Filippov's avatar
      xtensa: xtfpga: fix serial port register width and endianness · abfbd895
      Max Filippov authored
      Serial port is attached to XTFPGA boards as native endian device, mark
      it as such in DTS and pass correct endianness in platform data.
      Set register width in DTS to 4, this way it matches the platform data
      and works correctly on big-endian CPUs.
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      abfbd895
    • Max Filippov's avatar
      xtensa: define CONFIG_CPU_{BIG,LITTLE}_ENDIAN · 4611bf7e
      Max Filippov authored
      Query compiler for the CPU endianness and add corresponding definition
      to KBUILD_CPPFLAGS. This allows using 'native-endian' property in DTS.
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      4611bf7e
    • Max Filippov's avatar
      xtensa: fix preemption in {clear,copy}_user_highpage · a67cc9aa
      Max Filippov authored
      Disabling pagefault makes little sense there, preemption disabling is
      what was meant.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      a67cc9aa
    • Max Filippov's avatar
      xtensa: ISS: don't hang if stdin EOF is reached · 362014c8
      Max Filippov authored
      Simulator stdin may be connected to a file, when its end is reached
      kernel hangs in infinite loop inside rs_poll, because simc_poll always
      signals that descriptor 0 is readable and simc_read always returns 0.
      Check simc_read return value and exit loop if it's not positive. Also
      don't rewind polling timer if it's zero.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      362014c8
  2. 21 Jan, 2016 2 commits
  3. 11 Jan, 2016 3 commits
  4. 10 Jan, 2016 1 commit
  5. 09 Jan, 2016 4 commits
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · eac6f76a
      Linus Torvalds authored
      Pull SCSI fix from James Bottomley:
       "A single fix for machines with pages > 4k (PPC mostly).
      
        There's a bug in our optimal transfer size code where we don't account
        for pages > 4k and can set the transfer size to be less than the page
        size causing nasty failures"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        sd: Reject optimal transfer length smaller than page size
      eac6f76a
    • Linus Torvalds's avatar
      Merge tag 'pci-v4.4-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · c0cb1393
      Linus Torvalds authored
      Pull PCI fixlet from Bjorn Helgaas:
       "This marks the TI DRA7xx host bridge driver as broken.  Apparently it
        has never worked without some additional out-of-tree code, so I'm
        going to mark it broken now and remove it completely next cycle unless
        it's fixed"
      
      * tag 'pci-v4.4-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI: dra7xx: Mark driver as broken
      c0cb1393
    • Michal Hocko's avatar
      vmstat: allocate vmstat_wq before it is used · 751e5f5c
      Michal Hocko authored
      kernel test robot has reported the following crash:
      
        BUG: unable to handle kernel NULL pointer dereference at 00000100
        IP: [<c1074df6>] __queue_work+0x26/0x390
        *pdpt = 0000000000000000 *pde = f000ff53f000ff53 *pde = f000ff53f000ff53
        Oops: 0000 [#1] PREEMPT PREEMPT SMP SMP
        CPU: 0 PID: 24 Comm: kworker/0:1 Not tainted 4.4.0-rc4-00139-g373ccbe5 #1
        Workqueue: events vmstat_shepherd
        task: cb684600 ti: cb7ba000 task.ti: cb7ba000
        EIP: 0060:[<c1074df6>] EFLAGS: 00010046 CPU: 0
        EIP is at __queue_work+0x26/0x390
        EAX: 00000046 EBX: cbb37800 ECX: cbb37800 EDX: 00000000
        ESI: 00000000 EDI: 00000000 EBP: cb7bbe68 ESP: cb7bbe38
         DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
        CR0: 8005003b CR2: 00000100 CR3: 01fd5000 CR4: 000006b0
        Stack:
        Call Trace:
          __queue_delayed_work+0xa1/0x160
          queue_delayed_work_on+0x36/0x60
          vmstat_shepherd+0xad/0xf0
          process_one_work+0x1aa/0x4c0
          worker_thread+0x41/0x440
          kthread+0xb0/0xd0
          ret_from_kernel_thread+0x21/0x40
      
      The reason is that start_shepherd_timer schedules the shepherd work item
      which uses vmstat_wq (vmstat_shepherd) before setup_vmstat allocates
      that workqueue so if the further initialization takes more than HZ we
      might end up scheduling on a NULL vmstat_wq.  This is really unlikely
      but not impossible.
      
      Fixes: 373ccbe5 ("mm, vmstat: allow WQ concurrency to discover memory reclaim doesn't make any progress")
      Reported-by: default avatarkernel test robot <ying.huang@linux.intel.com>
      Signed-off-by: default avatarMichal Hocko <mhocko@suse.com>
      Tested-by: default avatarTetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
      Cc: stable@vger.kernel.org
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      751e5f5c
    • Linus Torvalds's avatar
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 44d8a7d5
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "This is the final small set of ARM SoC bug fixes for linux-4.4, almost
        all regressions:
      
        OMAP:
         - data corruption on the Nokia N900 flash
      
        Allwinner:
         - Two defconfig change to get USB working again
      
        ARM Versatile:
         - Interrupt numbers gone bad after an older bug fix
      
        Nomadik:
         - Crashes from incorrect L2 cache settings
      
        VIA vt8500:
         - SD/MMC support on WM8650 never worked"
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        dts: vt8500: Add SDHC node to DTS file for WM8650
        ARM: Fix broken USB support in multi_v7_defconfig for sunxi devices
        ARM: versatile: fix MMC/SD interrupt assignment
        ARM: nomadik: set latencies to 8 cycles
        ARM: OMAP2+: Fix onenand rate detection to avoid filesystem corruption
        ARM: Fix broken USB support in sunxi_defconfig
      44d8a7d5
  6. 08 Jan, 2016 15 commits
  7. 07 Jan, 2016 4 commits