01 Jun, 2007

1 commit

  • Chuck reports that the recent fix from Andi to oprofile
    6c977aad03a18019015035958c65b6729cd0574c introduces a double free. Each
    cpu's cpu_msrs is setup to point to cpu 0's, which causes free_msrs to free
    cpu 0's pointers for_each_possible_cpu. Rather than copy the pointers, do
    a deep copy instead.

    [acme@redhat.com: allocate_msrs() was using for_each_online_cpu()]
    Signed-off-by: Chris Wright
    Cc: Andi Kleen
    Cc: Alan Cox
    Cc: Dave Jones
    Cc: Chuck Ebbert
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Wright
     

22 May, 2007

1 commit

  • Only try to allocate MSRs once instead of for every CPU.

    This assumes the MSRs are the same on all CPUs which is currently
    true. P4-HT is a special case for different SMT threads, but the code
    always saves/restores all MSRs so it works identical.

    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     

09 May, 2007

1 commit

  • This patch moves the die notifier handling to common code. Previous
    various architectures had exactly the same code for it. Note that the new
    code is compiled unconditionally, this should be understood as an appel to
    the other architecture maintainer to implement support for it aswell (aka
    sprinkling a notify_die or two in the proper place)

    arm had a notifiy_die that did something totally different, I renamed it to
    arm_notify_die as part of the patch and made it static to the file it's
    declared and used at. avr32 used to pass slightly less information through
    this interface and I brought it into line with the other architectures.

    [akpm@linux-foundation.org: build fix]
    [akpm@linux-foundation.org: fix vmalloc_sync_all bustage]
    [bryan.wu@analog.com: fix vmalloc_sync_all in nommu]
    Signed-off-by: Christoph Hellwig
    Cc:
    Cc: Russell King
    Signed-off-by: Bryan Wu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     

03 May, 2007

1 commit


18 Feb, 2007

1 commit


13 Feb, 2007

1 commit


30 Sep, 2006

1 commit


26 Sep, 2006

4 commits


17 Sep, 2006

1 commit


11 Jul, 2006

1 commit

  • Add it for P4 model 6 - reported to work and have a similar PMU to
    earlier P4s.

    Add an p4force=1 module override parameter for future use.

    We had a discussion about that earlier - it's a trade off between the
    PMU staying compatible or not. I think the force parameter is a
    reasonable compromise.

    Cc: oprofile-list@lists.sf.net
    Cc: Asit Mallick
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     

27 Jun, 2006

3 commits

  • * x86-64: (83 commits)
    [PATCH] x86_64: x86_64 stack usage debugging
    [PATCH] x86_64: (resend) x86_64 stack overflow debugging
    [PATCH] x86_64: msi_apic.c build fix
    [PATCH] x86_64: i386/x86-64 Add nmi watchdog support for new Intel CPUs
    [PATCH] x86_64: Avoid broadcasting NMI IPIs
    [PATCH] x86_64: fix apic error on bootup
    [PATCH] x86_64: enlarge window for stack growth
    [PATCH] x86_64: Minor string functions optimizations
    [PATCH] x86_64: Move export symbols to their C functions
    [PATCH] x86_64: Standardize i386/x86_64 handling of NMI_VECTOR
    [PATCH] x86_64: Fix modular pc speaker
    [PATCH] x86_64: remove sys32_ni_syscall()
    [PATCH] x86_64: Do not use -ffunction-sections for modules
    [PATCH] x86_64: Add cpu_relax to apic_wait_icr_idle
    [PATCH] x86_64: adjust kstack_depth_to_print default
    [PATCH] i386/x86-64: adjust /proc/interrupts column headings
    [PATCH] x86_64: Fix race in cpu_local_* on preemptible kernels
    [PATCH] x86_64: Fix fast check in safe_smp_processor_id
    [PATCH] x86_64: x86_64 setup.c - printing cmp related boottime information
    [PATCH] i386/x86-64/ia64: Move polling flag into thread_info_status
    ...

    Manual resolve of trivial conflict in arch/i386/kernel/Makefile

    Linus Torvalds
     
  • Misc header cleanup for nmi watchdog.

    Signed-off-by: Don Zickus
    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Don Zickus
     
  • nmi_create_files() in arch/i386/oprofile/nmi_int.c depends on
    model->num_counters (number of performance counters) being less than 10.
    While this is currently the case, it's too clever by half.

    Other archs aren't quite as clever: they assume 100. I suggest to
    normalize them all to 1000.

    Cc: Philippe Elie
    Cc: John Levon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Markus Armbruster
     

16 May, 2006

1 commit

  • Add support to oprofile for the Intel Core Solo and Core Duo processors.
    See also the patch to add support to oprofile-0.9.1-8.1.1 at
    http://www.kvack.org/~bcrl/patches/oprofile/oprofile-core-0.9.1.diff .

    Signed-off-by: Benjamin LaHaise
    Cc: Philippe Elie
    Cc: John Levon
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Benjamin LaHaise
     

29 Mar, 2006

1 commit


23 Mar, 2006

1 commit

  • When we stop allocating percpu memory for not-possible CPUs we must not touch
    the percpu data for not-possible CPUs at all. The correct way of doing this
    is to test cpu_possible() or to use for_each_cpu().

    This patch is a kernel-wide sweep of all instances of NR_CPUS. I found very
    few instances of this bug, if any. But the patch converts lots of open-coded
    test to use the preferred helper macros.

    Cc: Mikael Starvik
    Cc: David Howells
    Acked-by: Kyle McMartin
    Cc: Anton Blanchard
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: William Lee Irwin III
    Cc: Andi Kleen
    Cc: Christian Zankel
    Cc: Philippe Elie
    Cc: Nathan Scott
    Cc: Jens Axboe
    Cc: Eric Dumazet
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

15 Feb, 2006

1 commit

  • Fix x86 oprofile regression introduced by:
    commit c34d1b4d165c67b966bca4aba026443d7ff161eb
    [PATCH] mm: kill check_user_page_readable

    That commit reorganized tests for the userspace stack walking moving all
    those tests into dump_backtrace(), however, dump_backtrace() was used for
    both userspace and kernel stalk walking. The result is typically no
    recorded callgraph information for kernel samples.

    Revive the original function as dump_kernel_backtrace() and rename the
    other to dump_user_backtrace() to avoid future confusion.

    Signed-off-by: Gerald Britton
    Apology-from: Hugh Dickins
    Signed-off-by: Linus Torvalds

    Gerald Britton
     

04 Feb, 2006

1 commit

  • Fix the problem in kernel 2.6.15.1 (and early versions) that OProfile on
    x86_64 does not correctly collect the stack traces for kernel functions.

    The original code in valid_kernel_stack() in arch/i386/oprofile/backtrace.c
    assumes that the frame pointer (headaddr) should be greater than stack
    (i.e., regs).

    This assumption is wrong for x86_64 because NMIs in x86_64 use a seperate
    stack different from the kernel stack. Therefore, the variable stack now
    points to some location on the NMI stack, which turns out to be at a higher
    address than the frame pointer (headaddr) on the kernel stack. The correct
    comparison here should be between headaddr and regs->rsp for x86_64.

    Signed-off-by: Tong Li
    Cc: John Levon
    Cc: Philippe Elie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tong Li
     

07 Nov, 2005

1 commit

  • Andrew Morton suggested to move kprobes from kernel hacking menu, since
    kernel hacking menu is in-appropriate for the Kprobes. This patch moves
    Kprobes and Oprofile under instrumentation menu.

    (akpm: it's not a natural fit, but things like djprobes and the s390 guys'
    statistics library need a home)

    Signed-of-by: Prasanna S Panchamukhi
    Cc: Philippe Elie
    Cc: John Levon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Prasanna S Panchamukhi
     

30 Oct, 2005

1 commit

  • check_user_page_readable is a problematic variant of follow_page. It's used
    only by oprofile's i386 and arm backtrace code, at interrupt time, to
    establish whether a userspace stackframe is currently readable.

    This is problematic, because we want to push the page_table_lock down inside
    follow_page, and later split it; whereas oprofile is doing a spin_trylock on
    it (in the i386 case, forgotten in the arm case), and needs that to pin
    perhaps two pages spanned by the stackframe (which might be covered by
    different locks when we split).

    I think oprofile is going about this in the wrong way: it doesn't need to know
    the area is readable (neither i386 nor arm uses read protection of user
    pages), it doesn't need to pin the memory, it should simply
    __copy_from_user_inatomic, and see if that succeeds or not. Sorry, but I've
    not got around to devising the sparse __user annotations for this.

    Then we can eliminate check_user_page_readable, and return to a single
    follow_page without the __follow_page variants.

    Signed-off-by: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     

27 Sep, 2005

1 commit

  • Most of these guys are simply not needed (pulled by other stuff
    via asm-i386/hardirq.h). One that is not entirely useless is hilarious -
    arch/i386/oprofile/nmi_timer_int.c includes linux/irq.h... as a way to
    get linux/errno.h

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     

08 Sep, 2005

1 commit

  • The i386 OProfile code has a function named nmi_exit(), which collides with
    the nmi_exit() macro in linux/hardirq.h. At the moment, we get away with
    it, because hardirq.h isn't included in the oprofile code. I hit this as a
    bug when working with a patch which (indirectly) adds a #include of
    hardirq.h to oprofile.

    Regardless, the name collision is probably not a good idea, so this patch
    fixes it, renaming the oprofile function to op_nmi_exit(). It also renames
    the nmi_init() and nmi_timer_init() functions similarly, for consistency.

    Signed-off-by: David Gibson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Gibson
     

24 Jun, 2005

1 commit

  • Rename user_mode to user_mode_vm and add a user_mode macro similar to the
    x86-64 one.

    This is useful for Xen because the linux xen kernel does not runs on the same
    priviledge that a vanilla linux kernel, and with this we just need to redefine
    user_mode().

    Signed-off-by: Vincent Hanquez
    Cc: Ian Pratt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vincent Hanquez
     

01 May, 2005

1 commit


17 Apr, 2005

2 commits

  • I thought I'm done with fixing u32 vs. pm_message_t ... unfortunately
    that turned out not to be the case as Russel King pointed out. Here are
    fixes for Documentation and common code (mainly system devices).

    Signed-off-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Machek
     
  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds