Skip to content
  1. Aug 11, 2009
    • Dmitry Torokhov's avatar
      x86, mce: therm_throt - change when we print messages · 0d01f314
      Dmitry Torokhov authored
      
      
      My Latitude d630 seems to be handling thermal events in SMI by
      lowering the max frequency of the CPU till it cools down but
      still leaks the "everything is normal" events.
      
      This spams the console and with high priority printks.
      
      Adjust therm_throt driver to only print messages about the fact
      that temperatire returned back to normal when leaving the
      throttling state.
      
      Also lower the severity of "back to normal" message from
      KERN_CRIT to KERN_INFO.
      
      Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
      Acked-by: default avatarH. Peter Anvin <hpa@zytor.com>
      LKML-Reference: <20090810051513.0558F526EC9@mailhub.coreip.homeip.net>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      0d01f314
    • Shunichi Fuji's avatar
      x86: Add reboot quirk for every 5 series MacBook/Pro · 3e03bbea
      Shunichi Fuji authored
      Reboot does not work on my MacBook Pro 13 inch (MacBookPro5,5)
      too. It seems all unibody MacBook and MacBookPro require
      PCI reboot handling, i guess.
      
      Following model/machine ID list shows unibody MacBook/Pro have
      the 5 series of model number:
      
         http://www.everymac.com/systems/by_capability/macs-by-machine-model-machine-id.html
      
      
      
      Signed-off-by: default avatarShunichi Fuji <palglowr@gmail.com>
      Cc: Ozan Çağlayan <ozan@pardus.org.tr>
      LKML-Reference: <30046e3b0908101134p6487ddbftd8776e4ddef204be@mail.gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      3e03bbea
    • Linus Torvalds's avatar
      x86: Fix serialization in pit_expect_msb() · b6e61eef
      Linus Torvalds authored
      
      
      Wei Chong Tan reported a fast-PIT-calibration corner-case:
      
      | pit_expect_msb() is vulnerable to SMI disturbance corner case
      | in some platforms which causes /proc/cpuinfo to show wrong
      | CPU MHz value when quick_pit_calibrate() jumps to success
      | section.
      
      I think that the real issue isn't even an SMI - but the fact
      that in the very last iteration of the loop, there's no
      serializing instruction _after_ the last 'rdtsc'. So even in
      the absense of SMI's, we do have a situation where the cycle
      counter was read without proper serialization.
      
      The last check should be done outside the outer loop, since
      _inside_ the outer loop, we'll be testing that the PIT has
      the right MSB value has the right value in the next iteration.
      
      So only the _last_ iteration is special, because that's the one
      that will not check the PIT MSB value any more, and because the
      final 'get_cycles()' isn't serialized.
      
      In other words:
      
       - I'd like to move the PIT MSB check to after the last
         iteration, rather than in every iteration
      
       - I think we should comment on the fact that it's also a
         serializing instruction and so 'fences in' the TSC read.
      
      Here's a suggested replacement.
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Reported-by: default avatar"Tan, Wei Chong" <wei.chong.tan@intel.com>
      Tested-by: default avatar"Tan, Wei Chong" <wei.chong.tan@intel.com>
      LKML-Reference: <B28277FD4E0F9247A3D55704C440A140D5D683F3@pgsmsx504.gar.corp.intel.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      b6e61eef
  2. Aug 10, 2009
  3. Aug 09, 2009
    • Frederic Weisbecker's avatar
      perf_counter: Fix/complete ftrace event records sampling · f413cdb8
      Frederic Weisbecker authored
      
      
      This patch implements the kernel side support for ftrace event
      record sampling.
      
      A new counter sampling attribute is added:
      
         PERF_SAMPLE_TP_RECORD
      
      which requests ftrace events record sampling. In this case
      if a PERF_TYPE_TRACEPOINT counter is active and a tracepoint
      fires, we emit the tracepoint binary record to the
      perfcounter event buffer, as a sample.
      
      Result, after setting PERF_SAMPLE_TP_RECORD attribute from perf
      record:
      
       perf record -f -F 1 -a -e workqueue:workqueue_execution
       perf report -D
      
       0x21e18 [0x48]: event: 9
       .
       . ... raw event: size 72 bytes
       .  0000:  09 00 00 00 01 00 48 00 d0 c7 00 81 ff ff ff ff  ......H........
       .  0010:  0a 00 00 00 0a 00 00 00 21 00 00 00 00 00 00 00  ........!......
       .  0020:  2b 00 01 02 0a 00 00 00 0a 00 00 00 65 76 65 6e  +...........eve
       .  0030:  74 73 2f 31 00 00 00 00 00 00 00 00 0a 00 00 00  ts/1...........
       .  0040:  e0 b1 31 81 ff ff ff ff                          .......
      .
      0x21e18 [0x48]: PERF_EVENT_SAMPLE (IP, 1): 10: 0xffffffff8100c7d0 period: 33
      
      The raw ftrace binary record starts at offset 0020.
      
      Translation:
      
       struct trace_entry {
      	type		= 0x2b = 43;
      	flags		= 1;
      	preempt_count	= 2;
      	pid		= 0xa = 10;
      	tgid		= 0xa = 10;
       }
      
       thread_comm = "events/1"
       thread_pid  = 0xa = 10;
       func	    = 0xffffffff8131b1e0 = flush_to_ldisc()
      
      What will come next?
      
       - Userspace support ('perf trace'), 'flight data recorder' mode
         for perf trace, etc.
      
       - The unconditional copy from the profiling callback brings
         some costs however if someone wants no such sampling to
         occur, and needs to be fixed in the future. For that we need
         to have an instant access to the perf counter attribute.
         This is a matter of a flag to add in the struct ftrace_event.
      
       - Take care of the events recursivity! Don't ever try to record
         a lock event for example, it seems some locking is used in
         the profiling fast path and lead to a tracing recursivity.
         That will be fixed using raw spinlock or recursivity
         protection.
      
       - [...]
      
       - Profit! :-)
      
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Pekka Enberg <penberg@cs.helsinki.fi>
      Cc: Gabriel Munteanu <eduard.munteanu@linux360.ro>
      Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      f413cdb8
    • Peter Zijlstra's avatar
      perf_counter, ftrace: Fix perf_counter integration · 3a659305
      Peter Zijlstra authored
      
      
      Adds possible second part to the assign argument of TP_EVENT().
      
        TP_perf_assign(
      	__perf_count(foo);
      	__perf_addr(bar);
        )
      
      Which, when specified make the swcounter increment with @foo instead
      of the usual 1, and report @bar for PERF_SAMPLE_ADDR (data address
      associated with the event) when this triggers a counter overflow.
      
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      3a659305
    • Ingo Molnar's avatar
      Merge branch 'linus' into tracing/urgent · e3560336
      Ingo Molnar authored
      
      
      Merge reason: Merge up to almost-rc6 to pick up latest perfcounters
                    (on which we'll queue up a dependent fix)
      
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e3560336
    • Gleb Natapov's avatar
      KVM: Avoid redelivery of edge interrupt before next edge · b4a2f5e7
      Gleb Natapov authored
      
      
      The check for an edge is broken in current ioapic code. ioapic->irr is
      cleared on each edge interrupt by ioapic_service() and this makes
      old_irr != ioapic->irr condition in kvm_ioapic_set_irq() to be always
      true. The patch fixes the code to properly recognise edge.
      
      Some HW emulation calls set_irq() without level change. If each such
      call is propagated to an OS it may confuse a device driver. This is the
      case with keyboard device emulation and Windows XP x64  installer on SMP VM.
      Each keystroke produce two interrupts (down/up) one interrupt is
      submitted to CPU0 and another to CPU1. This confuses Windows somehow
      and it ignores keystrokes.
      
      Signed-off-by: default avatarGleb Natapov <gleb@redhat.com>
      Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
      b4a2f5e7
    • Roel Kluin's avatar
      x86: fix buffer overflow in efi_init() · fdb8a427
      Roel Kluin authored
      If the vendor name (from c16) can be longer than 100 bytes (or missing a
      terminating null), then the null is written past the end of vendor[].
      
      Found with Parfait, http://research.sun.com/projects/parfait/
      
      
      
      Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      Cc: Huang Ying <ying.huang@intel.com>
      fdb8a427
    • Frans Pop's avatar
      drm/i915: silence vblank warnings · 6cb504c2
      Frans Pop authored
      
      
      these errors are pretty pointless
      
      Reviewed-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      6cb504c2
    • Paul Rolland's avatar
      drm: silence pointless vblank warning. · 8d3457ec
      Paul Rolland authored
      
      
      Some applications/hardware combinations are triggering the message "failed to
      acquire vblank counter" to be issued up to 20 times a second, which makes it
      both useless and dangerous, as this may hide other important messages.
      This changes makes it only appear when people are debugging.
      
      Signed-off-by: default avatarPaul Rolland <rol@as2917.net>
      Reviewed-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Lost-twice-by: default avatarDave Airlie <airlied@redhat.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      8d3457ec
    • Keith Packard's avatar
      drm: When adding probed modes, preserve duplicate mode types · 38d5487d
      Keith Packard authored
      
      
      The code which takes probed modes and adds them to a connector eliminates
      duplicate modes by comparing them using drm_mode_equal. That function
      doesn't consider the type bits, which means that any modes which differ only
      in the type field will be lost.
      
      One of the bits in the mode->type field is the DRM_MODE_TYPE_PREFERRED bit.
      If the mode with that bit is lost, then higher level code will not know
      which mode to select, causing a random mode to be used instead.
      
      This patch simply merges the two mode type bits together; that seems
      reasonable to me, but perhaps only a subset of the bits should be used? None
      of these can be user defined as they all come from looking at just the
      hardware.
      
      Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      38d5487d
    • Stanislaw Gruszka's avatar
      posix_cpu_timers_exit_group(): Do not use thread_group_cputimer() · 17d42c1c
      Stanislaw Gruszka authored
      
      
      When the process exits we don't have to run new cputimer nor
      use running one (as it not accounts when tsk->exit_state != 0)
      to get process CPU times.  As there is only one thread we can
      just use CPU times fields from task and signal structs.
      
      Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Roland McGrath <roland@redhat.com>
      Cc: Vitaly Mayatskikh <vmayatsk@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      17d42c1c
  4. Aug 08, 2009