1. 17 6月, 2011 5 次提交
  2. 16 6月, 2011 1 次提交
  3. 12 6月, 2011 1 次提交
  4. 11 6月, 2011 1 次提交
  5. 10 6月, 2011 4 次提交
  6. 09 6月, 2011 9 次提交
  7. 08 6月, 2011 8 次提交
    • T
      x86: cpu-hotplug: Prevent softirq wakeup on wrong CPU · fd8a7de1
      Thomas Gleixner 提交于
      After a newly plugged CPU sets the cpu_online bit it enables
      interrupts and goes idle. The cpu which brought up the new cpu waits
      for the cpu_online bit and when it observes it, it sets the cpu_active
      bit for this cpu. The cpu_active bit is the relevant one for the
      scheduler to consider the cpu as a viable target.
      
      With forced threaded interrupt handlers which imply forced threaded
      softirqs we observed the following race:
      
      cpu 0                         cpu 1
      
      bringup(cpu1);
                                    set_cpu_online(smp_processor_id(), true);
      		              local_irq_enable();
      while (!cpu_online(cpu1));
                                    timer_interrupt()
                                      -> wake_up(softirq_thread_cpu1);
                                           -> enqueue_on(softirq_thread_cpu1, cpu0);
      
                                                                              ^^^^
      
      cpu_notify(CPU_ONLINE, cpu1);
        -> sched_cpu_active(cpu1)
           -> set_cpu_active((cpu1, true);
      
      When an interrupt happens before the cpu_active bit is set by the cpu
      which brought up the newly onlined cpu, then the scheduler refuses to
      enqueue the woken thread which is bound to that newly onlined cpu on
      that newly onlined cpu due to the not yet set cpu_active bit and
      selects a fallback runqueue. Not really an expected and desirable
      behaviour.
      
      So far this has only been observed with forced hard/softirq threading,
      but in theory this could happen without forced threaded hard/softirqs
      as well. It's probably unobservable as it would take a massive
      interrupt storm on the newly onlined cpu which causes the softirq loop
      to wake up the softirq thread and an even longer delay of the cpu
      which waits for the cpu_online bit.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: NPeter Zijlstra <peterz@infradead.org>
      Cc: stable@kernel.org # 2.6.39
      fd8a7de1
    • D
      MN10300: Add missing _sdata declaration · 40182373
      David Howells 提交于
      _sdata needs to be declared in the linker script now as of commit
      a2d063ac ("extable, core_kernel_data(): Make sure all archs define
      _sdata")
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      40182373
    • D
      MN10300: die_if_no_fixup() shouldn't use get_user() as it doesn't call set_fs() · db1c9dfa
      David Howells 提交于
      die_if_no_fixup() shouldn't use get_user() as it doesn't call set_fs() to
      indicate that it wants to probe a kernel address.  Instead it should use
      probe_kernel_read().
      
      This fixes the problem of gdb seeing SIGILL rather than SIGTRAP when hitting
      the KGDB special breakpoint upon SysRq+g being seen.  The problem was that
      die_if_no_fixup() was failing to read the opcode of the instruction that caused
      the exception, and thus not fixing up the exception.
      
      This caused gdb to get a S04 response to the $? request in its remote protocol
      rather than S05 - which would then cause it to continue with $C04 rather than
      $c in an attempt to pass the signal onto the inferior process.  The kernel,
      however, does not support $Cnn, and so objects by returning an E22 response,
      indicating an error.  gdb does not expect this and prints:
      
      	warning: Remote failure reply: E22
      
      and then returns to the gdb command prompt unable to continue.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      db1c9dfa
    • D
      MN10300: Fix one of the kernel debugger cacheflush variants · 2e65d1f6
      David Howells 提交于
      One of the kernel debugger cacheflush variants escaped proper testing.  Two of
      the labels are wrong, being derived from the code that was copied to construct
      the variant.
      
      The first label results in the following assembler message:
      
          AS      arch/mn10300/mm/cache-dbg-flush-by-reg.o
        arch/mn10300/mm/cache-dbg-flush-by-reg.S: Assembler messages:
        arch/mn10300/mm/cache-dbg-flush-by-reg.S:123: Error: symbol `debugger_local_cache_flushinv_no_dcache' is already defined
      
      And the second label results in the following linker message:
      
        arch/mn10300/mm/built-in.o:(.text+0x1d39): undefined reference to `mn10300_local_icache_inv_range_reg_end'
        arch/mn10300/mm/built-in.o:(.text+0x1d39): relocation truncated to fit: R_MN10300_PCREL16 against undefined symbol `mn10300_local_icache_inv_range_reg_end'
      
      To test this file the following configuration pieces must be set:
      
      	CONFIG_AM34=y
      	CONFIG_MN10300_CACHE_WBACK=y
      	CONFIG_MN10300_DEBUGGER_CACHE_FLUSH_BY_REG=y
      	CONFIG_MN10300_CACHE_MANAGE_BY_REG=y
      	CONFIG_AM34_HAS_CACHE_SNOOP=n
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2e65d1f6
    • J
      sparc: Remove unnecessary semicolons · 6cb79b3f
      Joe Perches 提交于
      Semicolons are not necessary after switch/while/for/if braces
      so remove them.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6cb79b3f
    • O
      Add support for allocating irqs for bootbus devices · 9eeb0898
      oftedal 提交于
      Some devices that can generate interrupts are connected directly to the
      CPU through the bootbus on sun4d. This patch allows IRQs to be allocated
      for such devices. The information used for allocating interrupts for
      sbus devices are present at the corresponding SBI node. For bootbus
      devices this information is present in the bootbus node.
      Signed-off-by: NKjetil Oftedal <oftedal@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9eeb0898
    • O
      Do not skip interrupt sources in sun4d interrupt handler and acknowledge interrupts correctly · ea160584
      oftedal 提交于
      During the introduction of genirq on sparc32 bugs were introduced in
      the interrupt handler for sun4d. The interrupts handler checks the status
      of the various sbus interfaces in the system and generates a virtual
      interrupt, based upon the location of the interrupt source. This lookup
      was broken by restructuring the code in such a way that index and shift
      operations were performed prior to comparing this against the values
      read from the interrupt controllers.
      
      This could cause the handler to loop eternally as the interrupt source
      could be skipped before any check was performed. Additionally
      sun4d_encode_irq performs shifting internally, so it should not be performed
      twice.
      
      In sun4d_unmask interrupts were not correctly acknowledged, as the
      corresponding bit it the interrupt mask was not actually cleared.
      Signed-off-by: NKjetil Oftedal <oftedal@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ea160584
    • O
      Restructure sun4d_build_device_irq so that timer interrupts can be allocated · 5fba1708
      oftedal 提交于
      sun4d_build_device_irq was called without a valid platform_device when
      the system timer was initialized on sun4d systems. This caused a NULL
      pointer crash.
      
      Josip Rodin suggested that the current sun4d_build_device_irq should be
      split into two functions. So that the timer initialization could skip
      the slot and sbus interface detection code in sun4d_build_device_irq, as
      this does not make sence due to the timer interrupts not being generated
      from a device located on sbus.
      Signed-off-by: NKjetil Oftedal <oftedal@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5fba1708
  8. 07 6月, 2011 5 次提交
  9. 06 6月, 2011 6 次提交
    • G
      gpio/mxs: Move Freescale mxs gpio driver to drivers/gpio · 7b2fa570
      Grant Likely 提交于
      GPIO drivers are getting moved to drivers/gpio for cleanup and
      consolidation.  This patch moves the mxs driver.  Follow up patches
      will clean it up and make it a fine upstanding example of a gpio
      driver.
      
      v2: Removed header file entirely and put struct definition directly
          into driver.  The struct isn't used anywhere else in the kernel.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Tested-by: NShawn Guo <shawn.guo@linaro.org>
      Acked-by: NSascha Hauer <s.hauer@pengutronix.de>
      7b2fa570
    • J
      x86/amd-iommu: Use only per-device dma_ops · 27c2127a
      Joerg Roedel 提交于
      Unfortunatly there are systems where the AMD IOMMU does not
      cover all devices. This breaks with the current driver as it
      initializes the global dma_ops variable. This patch limits
      the AMD IOMMU to the devices listed in the IVRS table fixing
      DMA for devices not covered by the IOMMU.
      
      Cc: stable@kernel.org
      Signed-off-by: NJoerg Roedel <joerg.roedel@amd.com>
      27c2127a
    • J
      x86/amd-iommu: Fix 3 possible endless loops · 0de66d5b
      Joerg Roedel 提交于
      The driver contains several loops counting on an u16 value
      where the exit-condition is checked against variables that
      can have values up to 0xffff. In this case the loops will
      never exit. This patch fixed 3 such loops.
      
      Cc: stable@kernel.org
      Signed-off-by: NJoerg Roedel <joerg.roedel@amd.com>
      0de66d5b
    • M
      [S390] fix kvm defines for 31 bit compile · 6c61cfe9
      Martin Schwidefsky 提交于
      KVM is not available for 31 bit but the KVM defines cause warnings:
      
      arch/s390/include/asm/pgtable.h: In function 'ptep_test_and_clear_user_dirty':
      arch/s390/include/asm/pgtable.h:817: warning: integer constant is too large for 'unsigned long' type
      arch/s390/include/asm/pgtable.h:818: warning: integer constant is too large for 'unsigned long' type
      arch/s390/include/asm/pgtable.h: In function 'ptep_test_and_clear_user_young':
      arch/s390/include/asm/pgtable.h:837: warning: integer constant is too large for 'unsigned long' type
      arch/s390/include/asm/pgtable.h:838: warning: integer constant is too large for 'unsigned long' type
      
      Add 31 bit versions of the KVM defines to remove the warnings.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      6c61cfe9
    • M
      [S390] use generic RCU page-table freeing code · 36409f63
      Martin Schwidefsky 提交于
      Replace the s390 specific rcu page-table freeing code with the
      generic variant. This requires to duplicate the definition for the
      struct mmu_table_batch as s390 does not use the generic tlb flush
      code.
      
      While we are at it remove the restriction that page table fragments
      can not be reused after a single fragment has been freed with rcu
      and split out allocation and freeing of page tables with pgstes.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      36409f63
    • J
      [S390] qdio: Split SBAL entry flags · 3ec90878
      Jan Glauber 提交于
      The qdio SBAL entry flag is made-up of four different values that are
      independent of one another. Some of the bits are reserved by the
      hardware and should not be changed by qdio. Currently all four values
      are overwritten since the SBAL entry flag is defined as an u32.
      
      Split the SBAL entry flag into four u8's as defined by the hardware
      and don't touch the reserved bits.
      Signed-off-by: NJan Glauber <jang@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      3ec90878