1. 29 3月, 2012 2 次提交
  2. 13 3月, 2012 1 次提交
    • P
      sched: Cleanup cpu_active madness · 5fbd036b
      Peter Zijlstra 提交于
      Stepan found:
      
      CPU0		CPUn
      
      _cpu_up()
        __cpu_up()
      
      		boostrap()
      		  notify_cpu_starting()
      		  set_cpu_online()
      		  while (!cpu_active())
      		    cpu_relax()
      
      <PREEMPT-out>
      
      smp_call_function(.wait=1)
        /* we find cpu_online() is true */
        arch_send_call_function_ipi_mask()
      
        /* wait-forever-more */
      
      <PREEMPT-in>
      		  local_irq_enable()
      
        cpu_notify(CPU_ONLINE)
          sched_cpu_active()
            set_cpu_active()
      
      Now the purpose of cpu_active is mostly with bringing down a cpu, where
      we mark it !active to avoid the load-balancer from moving tasks to it
      while we tear down the cpu. This is required because we only update the
      sched_domain tree after we brought the cpu-down. And this is needed so
      that some tasks can still run while we bring it down, we just don't want
      new tasks to appear.
      
      On cpu-up however the sched_domain tree doesn't yet include the new cpu,
      so its invisible to the load-balancer, regardless of the active state.
      So instead of setting the active state after we boot the new cpu (and
      consequently having to wait for it before enabling interrupts) set the
      cpu active before we set it online and avoid the whole mess.
      Reported-by: NStepan Moskovchenko <stepanm@codeaurora.org>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1323965362.18942.71.camel@twinsSigned-off-by: NIngo Molnar <mingo@elte.hu>
      5fbd036b
  3. 07 3月, 2012 5 次提交
  4. 06 3月, 2012 1 次提交
  5. 05 3月, 2012 1 次提交
  6. 01 3月, 2012 1 次提交
  7. 22 2月, 2012 1 次提交
    • E
      ARM/audit: include audit header and fix audit arch · 5180bb39
      Eric Paris 提交于
      Both bugs being fixed were introduced in:
      29ef73b7
      
      Include linux/audit.h to fix below build errors:
      
        CC      arch/arm/kernel/ptrace.o
      arch/arm/kernel/ptrace.c: In function 'syscall_trace':
      arch/arm/kernel/ptrace.c:919: error: implicit declaration of function 'audit_syscall_exit'
      arch/arm/kernel/ptrace.c:921: error: implicit declaration of function 'audit_syscall_entry'
      arch/arm/kernel/ptrace.c:921: error: 'AUDIT_ARCH_ARMEB' undeclared (first use in this function)
      arch/arm/kernel/ptrace.c:921: error: (Each undeclared identifier is reported only once
      arch/arm/kernel/ptrace.c:921: error: for each function it appears in.)
      make[1]: *** [arch/arm/kernel/ptrace.o] Error 1
      make: *** [arch/arm/kernel] Error 2
      
      This part of the patch is:
      Reported-by: NAxel Lin <axel.lin@gmail.com>
      Reported-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
      (They both provided patches to fix it)
      
      This patch also (at the request of the list) fixes the fact that
      ARM has both LE and BE versions however the audit code was called as if
      it was always BE.  If audit userspace were to try to interpret the bits
      it got from a LE system it would obviously do so incorrectly.  Fix this
      by using the right arch flag on the right system.
      
      This part of the patch is:
      Reported-by: NRussell King - ARM Linux <linux@arm.linux.org.uk>
      Signed-off-by: NEric Paris <eparis@redhat.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      5180bb39
  8. 21 2月, 2012 1 次提交
    • S
      ARM: 7336/1: smp_twd: Don't register CPUFREQ notifiers if local timers are not initialised · 910ba598
      Santosh Shilimkar 提交于
      Current ARM local timer code registers CPUFREQ notifiers even in case
      the twd_timer_setup() isn't called. That seems to be wrong and
      would eventually lead to kernel crash on the CPU frequency transitions
      on the SOCs where the local timer doesn't exist or broken because of
      hardware BUG. Fix it by testing twd_evt and *__this_cpu_ptr(twd_evt).
      
      The issue was observed with v3.3-rc3 and building an OMAP2+ kernel
      on OMAP3 SOC which doesn't have TWD.
      
      Below is the dump for reference :
      
       Unable to handle kernel paging request at virtual address 007e900
       pgd = cdc20000
       [007e9000] *pgd=00000000
       Internal error: Oops: 5 [#1] SMP
       Modules linked in:
       CPU: 0    Not tainted  (3.3.0-rc3-pm+debug+initramfs #9)
       PC is at twd_update_frequency+0x34/0x48
       LR is at twd_update_frequency+0x10/0x48
       pc : [<c001382c>]    lr : [<c0013808>]    psr: 60000093
       sp : ce311dd8  ip : 00000000  fp : 00000000
       r10: 00000000  r9 : 00000001  r8 : ce310000
       r7 : c0440458  r6 : c00137f8  r5 : 00000000  r4 : c0947a74
       r3 : 00000000  r2 : 007e9000  r1 : 00000000  r0 : 00000000
       Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment usr
       Control: 10c5387d  Table: 8dc20019  DAC: 00000015
       Process sh (pid: 599, stack limit = 0xce3102f8)
       Stack: (0xce311dd8 to 0xce312000)
       1dc0:                                                       6000c
       1de0: 00000001 00000002 00000000 00000000 00000000 00000000 00000
       1e00: ffffffff c093d8f0 00000000 ce311ebc 00000001 00000001 ce310
       1e20: c001386c c0437c4c c0e95b60 c0e95ba8 00000001 c0e95bf8 ffff4
       1e40: 00000000 00000000 c005ef74 ce310000 c0435cf0 ce311ebc 00000
       1e60: ce352b40 0007a120 c08d5108 c08ba040 c08ba040 c005f030 00000
       1e80: c08bc554 c032fe2c 0007a120 c08d4b64 ce352b40 c08d8618 ffff8
       1ea0: c08ba040 c033364c ce311ecc c0433b50 00000002 ffffffea c0330
       1ec0: 0007a120 0007a120 22222201 00000000 22222222 00000000 ce357
       1ee0: ce3d6000 cdc2aed8 ce352ba0 c0470164 00000002 c032f47c 00034
       1f00: c0331cac ce352b40 00000007 c032f6d0 ce352bbc 0003d090 c0930
       1f20: c093d8bc c03306a4 00000007 ce311f80 00000007 cdc2aec0 ce358
       1f40: ce8d20c0 00000007 b6fe5000 ce311f80 00000007 ce310000 0000c
       1f60: c000de74 ce987400 ce8d20c0 b6fe5000 00000000 00000000 0000c
       1f80: 00000000 00000000 001fbac8 00000000 00000007 001fbac8 00004
       1fa0: c000df04 c000dd60 00000007 001fbac8 00000001 b6fe5000 00000
       1fc0: 00000007 001fbac8 00000007 00000004 b6fe5000 00000000 00202
       1fe0: 00000000 beb565f8 00101ffc 00008e8c 60000010 00000001 00000
       [<c001382c>] (twd_update_frequency+0x34/0x48) from [<c008ac4c>] )
       [<c008ac4c>] (smp_call_function_single+0x17c/0x1c8) from [<c0013)
       [<c0013890>] (twd_cpufreq_transition+0x24/0x30) from [<c0437c4c>)
       [<c0437c4c>] (notifier_call_chain+0x44/0x84) from [<c005efe4>] ()
       [<c005efe4>] (__srcu_notifier_call_chain+0x70/0xa4) from [<c005f)
       [<c005f030>] (srcu_notifier_call_chain+0x18/0x20) from [<c032fe2)
       [<c032fe2c>] (cpufreq_notify_transition+0xc8/0x1b0) from [<c0333)
       [<c033364c>] (omap_target+0x1b4/0x28c) from [<c032f47c>] (__cpuf)
       [<c032f47c>] (__cpufreq_driver_target+0x50/0x64) from [<c0331d24)
       [<c0331d24>] (cpufreq_set+0x78/0x98) from [<c032f6d0>] (store_sc)
       [<c032f6d0>] (store_scaling_setspeed+0x5c/0x74) from [<c03306a4>)
       [<c03306a4>] (store+0x58/0x74) from [<c014d868>] (sysfs_write_fi)
       [<c014d868>] (sysfs_write_file+0x80/0xb4) from [<c00f2c2c>] (vfs)
       [<c00f2c2c>] (vfs_write+0xa8/0x138) from [<c00f2e9c>] (sys_write)
       [<c00f2e9c>] (sys_write+0x40/0x6c) from [<c000dd60>] (ret_fast_s)
       Code: e594300c e792210c e1a01000 e5840004 (e7930002)
       ---[ end trace 5da3b5167c1ecdda ]---
      Reported-by: NKevin Hilman <khilman@ti.com>
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Tested-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      910ba598
  9. 10 2月, 2012 2 次提交
  10. 03 2月, 2012 5 次提交
  11. 25 1月, 2012 1 次提交
  12. 23 1月, 2012 4 次提交
  13. 20 1月, 2012 3 次提交
  14. 18 1月, 2012 1 次提交
    • N
      Kernel: Audit Support For The ARM Platform · 29ef73b7
      Nathaniel Husted 提交于
      This patch provides functionality to audit system call events on the
      ARM platform. The implementation was based off the structure of the
      MIPS platform and information in this
      (http://lists.fedoraproject.org/pipermail/arm/2009-October/000382.html)
      mailing list thread. The required audit_syscall_exit and
      audit_syscall_entry checks were added to ptrace using the standard
      registers for system call values (r0 through r3). A thread information
      flag was added for auditing (TIF_SYSCALL_AUDIT) and a meta-flag was
      added (_TIF_SYSCALL_WORK) to simplify modifications to the syscall
      entry/exit. Now, if either the TRACE flag is set or the AUDIT flag is
      set, the syscall_trace function will be executed. The prober changes
      were made to Kconfig to allow CONFIG_AUDITSYSCALL to be enabled.
      
      Due to platform availability limitations, this patch was only tested
      on the Android platform running the modified "android-goldfish-2.6.29"
      kernel. A test compile was performed using Code Sourcery's
      cross-compilation toolset and the current linux-3.0 stable kernel. The
      changes compile without error. I'm hoping, due to the simple modifications,
      the patch is "obviously correct".
      Signed-off-by: NNathaniel Husted <nhusted@gmail.com>
      Signed-off-by: NEric Paris <eparis@redhat.com>
      29ef73b7
  15. 13 1月, 2012 1 次提交
  16. 07 1月, 2012 2 次提交
  17. 05 1月, 2012 1 次提交
  18. 24 12月, 2011 3 次提交
  19. 22 12月, 2011 1 次提交
  20. 19 12月, 2011 1 次提交
  21. 16 12月, 2011 1 次提交
  22. 13 12月, 2011 1 次提交