1. 09 May, 2013 16 commits
    • Max Filippov's avatar
      xtensa: ISS: fix timer_lock usage in rs_open · efefbcc5
      Max Filippov authored
      This fixes the following lockdep splat:
      
      [   66.460000] =================================
      [   66.460000] [ INFO: inconsistent lock state ]
      [   66.460000] 3.9.0-rc5-00161-ga48dd49 #4 Not tainted
      [   66.460000] ---------------------------------
      [   66.460000] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
      [   66.460000] swapper/1 [HC0[0]:SC1[1]:HE1:SE0] takes:
      [   66.460000]  (timer_lock){+.?...}, at: [<d0006cde>] rs_poll+0x12/0xdc
      [   66.460000] {SOFTIRQ-ON-W} state was registered at:
      [   66.460000]   [<d00421f0>] lock_acquire+0xec/0x13c
      [   66.460000]   [<d01ea036>] _raw_spin_lock+0x3a/0x84
      [   66.460000]   [<d0006c8c>] rs_open+0x18/0x58
      [   66.460000]   [<d0139ea2>] tty_open+0x262/0x3cc
      [   66.460000]   [<d00942e0>] chrdev_open+0x8c/0xe0
      [   66.460000]   [<d00907b2>] do_dentry_open$isra$16+0x10e/0x190
      [   66.460000]   [<d0091141>] finish_open+0x39/0x48
      [   66.460000]   [<d009a0b4>] do_last$isra$34+0x6c4/0x824
      [   66.460000]   [<d009a27a>] path_openat+0x66/0x310
      [   66.460000]   [<d009a53a>] do_filp_open+0x16/0x44
      [   66.460000]   [<d0091445>] do_sys_open+0xd5/0x13c
      [   66.460000]   [<d00914be>] sys_open+0x12/0x18
      [   66.460000]   [<d0413ffc>] kernel_init_freeable+0xe4/0x12c
      [   66.460000]   [<d01e2a9c>] kernel_init+0xc/0x9c
      [   66.460000]   [<d00044fc>] ret_from_kernel_thread+0x8/0xc
      [   66.460000] irq event stamp: 132542
      [   66.460000] hardirqs last  enabled at (132542): [<d01ea2ec>] _raw_spin_unlock_irq+0x30/0x44
      [   66.460000] hardirqs last disabled at (132541): [<d01ea11e>] _raw_spin_lock_irq+0xe/0x8c
      [   66.460000] softirqs last  enabled at (132234): [<d0017d32>] __do_softirq+0x216/0x2a4
      [   66.460000] softirqs last disabled at (132539): [<d0018024>] irq_exit+0x38/0x40
      [   66.460000]
      [   66.460000] other info that might help us debug this:
      [   66.460000]  Possible unsafe locking scenario:
      [   66.460000]
      [   66.460000]        CPU0
      [   66.460000]        ----
      [   66.460000]   lock(timer_lock);
      [   66.460000]   <Interrupt>
      [   66.460000]     lock(timer_lock);
      [   66.460000]
      [   66.460000]  *** DEADLOCK ***
      [   66.460000]
      [   66.460000] 1 lock held by swapper/1:
      [   66.460000]  #0:  (((&serial_timer))){+.-...}, at: [<d001c65c>] call_timer_fn+0x0/0x1f0
      [   66.460000]
      Stack: d7c2fac0 00000018 00000004 00000001 d7c2faa0 00000004 00000006 d7c2fa90
             9003e87c d7c2fae0 d7c30000 d025a87c 00000001 0000000f 00000000 d7c2fac0
             9004005d d7c2fb10 d7c30000 d7c30338 00000001 00000001 00000000 d7c30338
      [   66.460000] Call Trace:
      [   66.460000]  [<d01e4f93>] print_usage_bug$part$26+0x1c3/0x1c8
      [   66.460000]  [<d003e87c>] mark_lock+0x2b4/0x440
      [   66.460000]  [<d004005d>] __lock_acquire+0x54d/0x16c4
      [   66.460000]  [<d00421f0>] lock_acquire+0xec/0x13c
      [   66.460000]  [<d01ea036>] _raw_spin_lock+0x3a/0x84
      [   66.460000]  [<d0006cde>] rs_poll+0x12/0xdc
      [   66.460000]  [<d001c71a>] call_timer_fn+0xbe/0x1f0
      [   66.460000]  [<d001cd90>] run_timer_softirq+0x198/0x1f4
      [   66.460000]  [<d0017c30>] __do_softirq+0x114/0x2a4
      [   66.460000]  [<d0018024>] irq_exit+0x38/0x40
      [   66.460000]  [<d00046c0>] do_IRQ+0x44/0x48
      [   66.460000]  [<d0005c58>] do_interrupt+0x4c/0x54
      [   66.460000]  [<d0003c80>] common_exception_return+0x0/0x5c
      [   66.460000]  [<d006682c>] free_pcppages_bulk+0x254/0x308
      [   66.460000]
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      efefbcc5
    • Max Filippov's avatar
      xtensa: disable IRQs while IRQ handler is running · 895666a9
      Max Filippov authored
      IRQ handlers are expected to run with IRQs disabled.
      See e.g. http://lwn.net/Articles/380931/ for a longer story.
      
      This was overlooked in the commit
        2d1c645c xtensa: dispatch medium-priority interrupts
      Revert to old behavior and simplify interrupt entry and exit code.
      Interrupt handler still honours IRQ priority.
      
      do_notify_resume/schedule must be called with interrupts enabled, enable
      interrupts if we return from user exception.
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      895666a9
    • Max Filippov's avatar
      xtensa: enable lockdep support · 8f371c75
      Max Filippov authored
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      8f371c75
    • Max Filippov's avatar
      xtensa: fix arch_irqs_disabled_flags implementation · 031d0112
      Max Filippov authored
      IRQs are disabled when PS.EXCM is set or PS.INTLEVEL is equal to or
      higher than LOCKLEVEL.
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      031d0112
    • Max Filippov's avatar
      xtensa: add irq flags trace support · c92931b2
      Max Filippov authored
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      c92931b2
    • Max Filippov's avatar
      xtensa: provide custom CALLER_ADDR* implementations · 3ae908c9
      Max Filippov authored
      Definition of CALLER_ADDR* through __builtin_return_address makes
      compiler insert calls to __xtensa_libgcc_window_spill, which in turn
      makes fast_syscall_spill_registers syscall that clobbers registers when
      called from the kernel mode, leading to invalid opcode exceptions on
      return to userspace.
      
      Provide definition for CALLER_ADDR0 as MAKE_PC_FROM_RA(a0, a1) and in
      case CONFIG_FRAME_POINTER is enabled extract CALLER_ADDR{1-3} from
      stack.
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      3ae908c9
    • Max Filippov's avatar
      xtensa: add stacktrace support · 3e4196a5
      Max Filippov authored
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      3e4196a5
    • Max Filippov's avatar
      xtensa: clean up stpill_registers · 4e96274e
      Max Filippov authored
      - remove unused asm parameters;
      - fix EXCM bit setting in the PS SR during _spill_registers call.
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      4e96274e
    • Max Filippov's avatar
      xtensa: don't use a7 in simcalls · f4b93ba9
      Max Filippov authored
      To support FRAME_POINTER avoid using a7 in __simc (none of the existing
      simcalls needs it). Replace calls to __simc with more specific
      simc_read, simc_write and simc_lseek calls.
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      f4b93ba9
    • Max Filippov's avatar
      0f7f9310
    • Max Filippov's avatar
      xtensa: provide default platform_pcibios_init implementation · b06c14e5
      Max Filippov authored
      This fixes the following build error:
      
        arch/xtensa/kernel/built-in.o:(.init.literal+0xe8): undefined reference
      	to `platform_pcibios_init'
        arch/xtensa/kernel/built-in.o: In function `setup_arch':
        (.init.text+0x20e): undefined reference to `platform_pcibios_init'
      
      and allows platform to omit definition of platform_pcibios_init if it's
      empty.
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      b06c14e5
    • Paul Bolle's avatar
      xtensa: remove KCORE_ELF again · 5e44fd01
      Paul Bolle authored
      The Kconfig symbol KCORE_ELF was removed in v2.6.0, but reappeared in two
      architectures. It is useless. Remove it again.
      Signed-off-by: default avatarPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      5e44fd01
    • Max Filippov's avatar
      xtensa: document MMUv3 setup sequence · 93e294ac
      Max Filippov authored
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      93e294ac
    • Max Filippov's avatar
      xtensa: add MMU v3 support · e85e335f
      Max Filippov authored
      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: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      e85e335f
    • Max Filippov's avatar
      xtensa: fix ibreakenable register update · d83ff0bb
      Max Filippov authored
      Only set the register when there is at least one ibreak register,
      otherwise the build fails:
      	arch/xtensa/kernel/head.S:105: Error: invalid register 'ibreakenable'
      	for 'wsr' instruction
      	arch/xtensa/platforms/iss/setup.c:67: Error: invalid register
      	'ibreakenable' for 'wsr' instruction
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      d83ff0bb
    • Max Filippov's avatar
      xtensa: fix oprofile building as module · 74f5bf02
      Max Filippov authored
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      74f5bf02
  2. 29 Apr, 2013 1 commit
  3. 27 Apr, 2013 4 commits
  4. 26 Apr, 2013 5 commits
  5. 25 Apr, 2013 8 commits
    • H. Peter Anvin's avatar
      Merge tag 'efi-urgent' into x86/urgent · 697dfd88
      H. Peter Anvin authored
       * The EFI variable anti-bricking algorithm merged in -rc8 broke booting
         on some Apple machines because they implement EFI spec 1.10, which
         doesn't provide a QueryVariableInfo() runtime function and the logic
         used to check for the existence of that function was insufficient.
         Fix from Josh Boyer.
      
       * The anti-bricking algorithm also introduced a compiler warning on
         32-bit. Fix from Borislav Petkov.
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      697dfd88
    • John David Anglin's avatar
      parisc: use spin_lock_irqsave/spin_unlock_irqrestore for PTE updates · bda079d3
      John David Anglin authored
      User applications running on SMP kernels have long suffered from instability
      and random segmentation faults.  This patch improves the situation although
      there is more work to be done.
      
      One of the problems is the various routines in pgtable.h that update page table
      entries use different locking mechanisms, or no lock at all (set_pte_at).  This
      change modifies the routines to all use the same lock pa_dbit_lock.  This lock
      is used for dirty bit updates in the interruption code. The patch also purges
      the TLB entries associated with the PTE to ensure that inconsistent values are
      not used after the page table entry is updated.  The UP and SMP code are now
      identical.
      
      The change also includes a minor update to the purge_tlb_entries function in
      cache.c to improve its efficiency.
      Signed-off-by: default avatarJohn David Anglin <dave.anglin@bell.net>
      Cc: Helge Deller <deller@gmx.de>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      bda079d3
    • Helge Deller's avatar
      parisc: disable -mlong-calls compiler option for kernel modules · cf71130d
      Helge Deller authored
      CONFIG_MLONGCALLS was introduced in commit
      ec758f98 to overcome linker issues when linking
      huge linux kernels, e.g. with many modules linked in.
      
      But in the kernel module loader there is no support yet for the new relocation
      types, which is why modules built with -mlong-calls can't be loaded.
      Furthermore, for modules long calls are not really necessary, since we already
      use stub sections which resolve long distance calls.
      
      So, let's just disable this compiler option when compiling kernel modules.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      cf71130d
    • Will Deacon's avatar
      parisc: uaccess: fix compiler warnings caused by __put_user casting · 0f28b628
      Will Deacon authored
      When targetting 32-bit processors, __put_user emits a pair of stw
      instructions for the 8-byte case. If the type of __val is a pointer, the
      marshalling code casts it to the wider integer type of u64, resulting
      in the following compiler warnings:
      
        kernel/signal.c: In function 'copy_siginfo_to_user':
        kernel/signal.c:2752:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
        kernel/signal.c:2752:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
        [...]
      
      This patch fixes the warnings by removing the marshalling code and using
      the correct output modifiers in the __put_{user,kernel}_asm64 macros
      so that GCC will allocate the right registers without the need to
      extract the two words explicitly.
      
      Cc: Helge Deller <deller@gmx.de>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      0f28b628
    • John David Anglin's avatar
      parisc: Change kunmap macro to static inline function · 87be2f88
      John David Anglin authored
      Change kunmap macro to static inline function to fix build error
      compiling drivers/base/dma-buf.c.
      
      Without the change, the following error can occur:
      
         CC      drivers/base/dma-buf.o
      drivers/base/dma-buf.c: In function 'dma_buf_kunmap':
      drivers/base/dma-buf.c:427:46:
      error: macro "kunmap" passed 3 arguments, but takes just 1
      
      I believe parisc is the only arch to implement kunmap using a macro.
      Signed-off-by: default avatarJohn David Anglin <dave.anglin@bell.net>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Helge Deller <deller@gmx.de>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      87be2f88
    • John David Anglin's avatar
      parisc: Provide __ucmpdi2 to resolve undefined references in 32 bit builds. · ca0ad83d
      John David Anglin authored
      The Debian experimental linux source package (3.8.5-1) build fails
      with the following errors:
      ...
      MODPOST 2016 modules
      ERROR: "__ucmpdi2" [fs/btrfs/btrfs.ko] undefined!
      ERROR: "__ucmpdi2" [drivers/md/dm-verity.ko] undefined!
      
      The attached patch resolves this problem.  It is based on the s390
      implementation of ucmpdi2.c.
      Signed-off-by: default avatarJohn David Anglin <dave.anglin@bell.net>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      ca0ad83d
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · 0fbd0676
      Linus Torvalds authored
      Pull sparc fix from David Miller:
       "Brown paper bag fix for sparc64"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        sparc64: Fix missing put_cpu_var() in tlb_batch_add_one() when not batching.
      0fbd0676
    • Linus Torvalds's avatar
      Merge tag 'gpio-v3.9-lastminute' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · 3c71d03a
      Linus Torvalds authored
      Pull gpi fix from Linus Walleij:
       "This is a last minute revert for the GPIO tree, as Mike Dunn noticed
        breakage on some older PXA machines due to moving PXA GPIO initcalls
        to the module_init initlevel"
      
      * tag 'gpio-v3.9-lastminute' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
        Revert "gpio: pxa: set initcall level to module init"
      3c71d03a
  6. 24 Apr, 2013 4 commits
  7. 22 Apr, 2013 2 commits