1. 03 10月, 2013 13 次提交
  2. 01 10月, 2013 9 次提交
  3. 30 9月, 2013 5 次提交
  4. 28 9月, 2013 4 次提交
  5. 27 9月, 2013 6 次提交
    • F
      arm: Fix build error with context tracking calls · 0c06a5d4
      Frederic Weisbecker 提交于
      ad65782f (context_tracking: Optimize main APIs off case
      with static key) converted context tracking main APIs to inline
      function and left ARM asm callers behind.
      
      This can be easily fixed by making ARM calling the post static
      keys context tracking function. We just need to replicate the
      static key checks there. We'll remove these later when ARM will
      support the context tracking static keys.
      Reported-by: NGuenter Roeck <linux@roeck-us.net>
      Reported-by: NRussell King <linux@arm.linux.org.uk>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Tested-by: NKevin Hilman <khilman@linaro.org>
      Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
      Cc: Anil Kumar <anilk4.v@gmail.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Benoit Cousson <b-cousson@ti.com>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Kevin Hilman <khilman@linaro.org>
      0c06a5d4
    • U
      ARC: Use clockevents_config_and_register over clockevents_register_device · 55c2e262
      Uwe Kleine-König 提交于
      clockevents_config_and_register is more clever and correct than doing it
      by hand; so use it.
      
      [vgupta: fixed build failure due to missing ; in patch]
      Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      55c2e262
    • V
      ARC: Workaround spinlock livelock in SMP SystemC simulation · 6c00350b
      Vineet Gupta 提交于
      Some ARC SMP systems lack native atomic R-M-W (LLOCK/SCOND) insns and
      can only use atomic EX insn (reg with mem) to build higher level R-M-W
      primitives. This includes a SystemC based SMP simulation model.
      
      So rwlocks need to use a protecting spinlock for atomic cmp-n-exchange
      operation to update reader(s)/writer count.
      
      The spinlock operation itself looks as follows:
      
      	mov reg, 1		; 1=locked, 0=unlocked
      retry:
      	EX reg, [lock]		; load existing, store 1, atomically
      	BREQ reg, 1, rety	; if already locked, retry
      
      In single-threaded simulation, SystemC alternates between the 2 cores
      with "N" insn each based scheduling. Additionally for insn with global
      side effect, such as EX writing to shared mem, a core switch is
      enforced too.
      
      Given that, 2 cores doing a repeated EX on same location, Linux often
      got into a livelock e.g. when both cores were fiddling with tasklist
      lock (gdbserver / hackbench) for read/write respectively as the
      sequence diagram below shows:
      
                 core1                                   core2
               --------                                --------
      1. spin lock [EX r=0, w=1] - LOCKED
      2. rwlock(Read)            - LOCKED
      3. spin unlock  [ST 0]     - UNLOCKED
                                               spin lock [EX r=0,w=1] - LOCKED
                            -- resched core 1----
      
      5. spin lock [EX r=1] - ALREADY-LOCKED
      
                            -- resched core 2----
      6.                                       rwlock(Write) - READER-LOCKED
      7.                                       spin unlock [ST 0]
      8.                                       rwlock failed, retry again
      
      9.                                       spin lock  [EX r=0, w=1]
                            -- resched core 1----
      
      10  spinlock locked in #9, retry #5
      11. spin lock [EX gets 1]
                            -- resched core 2----
      ...
      ...
      
      The fix was to unlock using the EX insn too (step 7), to trigger another
      SystemC scheduling pass which would let core1 proceed, eliding the
      livelock.
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      6c00350b
    • V
      ARC: Fix 32-bit wrap around in access_ok() · 0752adfd
      Vineet Gupta 提交于
      Anton reported
      
       | LTP tests syscalls/process_vm_readv01 and process_vm_writev01 fail
       | similarly in one testcase test_iov_invalid -> lvec->iov_base.
       | Testcase expects errno EFAULT and return code -1,
       | but it gets return code 1 and ERRNO is 0 what means success.
      
      Essentially test case was passing a pointer of -1 which access_ok()
      was not catching. It was doing [@addr + @sz <= TASK_SIZE] which would
      pass for @addr == -1
      
      Fixed that by rewriting as [@addr <= TASK_SIZE - @sz]
      Reported-by: NAnton Kolesov <Anton.Kolesov@synopsys.com>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      0752adfd
    • M
      ARC: Handle zero-overhead-loop in unaligned access handler · c11eb222
      Mischa Jonker 提交于
      If a load or store is the last instruction in a zero-overhead-loop, and
      it's misaligned, the loop would execute only once.
      
      This fixes that problem.
      Signed-off-by: NMischa Jonker <mjonker@synopsys.com>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      c11eb222
    • S
      x86/microcode/AMD: Fix patch level reporting for family 15h · accd1e82
      Suravee Suthikulpanit 提交于
      On AMD family 14h, applying microcode patch on the a core (core0)
      would also affect the other core (core1) in the same compute
      unit. The driver would skip applying the patch on core1, but it
      still need to update kernel structures to reflect the proper
      patch level.
      
      The current logic is not updating the struct
      ucode_cpu_info.cpu_sig.rev of the skipped core. This causes the
      /sys/devices/system/cpu/cpu1/microcode/version to report
      incorrect patch level as shown below:
      
        $ grep . cpu?/microcode/version
        cpu0/microcode/version:0x600063d
        cpu1/microcode/version:0x6000626
        cpu2/microcode/version:0x600063d
        cpu3/microcode/version:0x6000626
        cpu4/microcode/version:0x600063d
      Signed-off-by: NSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
      Acked-by: NBorislav Petkov <bp@suse.de>
      Cc: <bp@alien8.de>
      Cc: <jacob.w.shin@gmail.com>
      Cc: <herrmann.der.user@googlemail.com>
      Link: http://lkml.kernel.org/r/1285806432-1995-1-git-send-email-suravee.suthikulpanit@amd.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      accd1e82
  6. 26 9月, 2013 3 次提交