1. 23 Sep, 2008 4 commits
    • Thomas Gleixner's avatar
      clockevents: check broadcast device not tick device · 30274569
      Thomas Gleixner authored
      Impact: Possible hang on CPU online observed on AMD C1E machines.
      
      The broadcast setup code looks at the mode of the tick device to
      determine whether it needs to be shut down or setup. This is wrong
      when the broadcast mode is set to one shot already. This can happen
      when a CPU is brought online as it goes through the periodic setup
      first.
      
      The problem went unnoticed as sane systems do not call into that code
      before the switch to one shot for the clock event device happens.
      The AMD C1E idle routine switches over immediately and thereby shuts
      down the just setup device before the first interrupt happens.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      30274569
    • Thomas Gleixner's avatar
      clockevents: prevent stale tick_next_period for onlining CPUs · 49d670fb
      Thomas Gleixner authored
      Impact: possible hang on CPU onlining in timer one shot mode.
      
      The tick_next_period variable is only used during boot on nohz/highres
      enabled systems, but for CPU onlining it needs to be maintained when
      the per cpu clock events device operates in one shot mode.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      49d670fb
    • Thomas Gleixner's avatar
      x86: prevent stale state of c1e_mask across CPU offline/online · 4faac97d
      Thomas Gleixner authored
      Impact: hang which happens across CPU offline/online on AMD C1E systems.
      
      When a CPU goes offline then the corresponding bit in the broadcast
      mask is cleared. For AMD C1E enabled CPUs we do not reenable the
      broadcast when the CPU comes online again as we do not clear the
      corresponding bit in the c1e_mask, which keeps track which CPUs
      have been switched to broadcast already. So on those !$@#& machines
      we never switch back to broadcasting after a CPU offline/online cycle.
      
      Clear the bit when the CPU plays dead.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      4faac97d
    • Thomas Gleixner's avatar
      clockevents: prevent cpu online to interfere with nohz · 6441402b
      Thomas Gleixner authored
      Impact: rare hang which can be triggered on CPU online.
      
      tick_do_timer_cpu keeps track of the CPU which updates jiffies
      via do_timer. The value -1 is used to signal, that currently no
      CPU is doing this. There are two cases, where the variable can 
      have this state:
      
       boot:
          necessary for systems where the boot cpu id can be != 0
      
       nohz long idle sleep:
          When the CPU which did the jiffies update last goes into
          a long idle sleep it drops the update jiffies duty so
          another CPU which is not idle can pick it up and keep
          jiffies going.
      
      Using the same value for both situations is wrong, as the CPU online
      code can see the -1 state when the timer of the newly onlined CPU is
      setup. The setup for a newly onlined CPU goes through periodic mode
      and can pick up the do_timer duty without being aware of the nohz /
      highres mode of the already running system.
      
      Use two separate states and make them constants to avoid magic
      numbers confusion. 
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      6441402b
  2. 21 Sep, 2008 11 commits
  3. 20 Sep, 2008 10 commits
  4. 19 Sep, 2008 15 commits