• Jason Wessel's avatar
    perf,hw_breakpoint: Initialize hardware api earlier · 3c502e7a
    Jason Wessel authored
    When using early debugging, the kernel does not initialize the
    hw_breakpoint API early enough and causes the late initialization of
    the kernel debugger to fail. The boot arguments are:
    
        earlyprintk=vga ekgdboc=kbd kgdbwait
    
    Then simply type "go" at the kdb prompt and boot. The kernel will
    later emit the message:
    
        kgdb: Could not allocate hwbreakpoints
    
    And at that point the kernel debugger will cease to work correctly.
    
    The solution is to initialize the hw_breakpoint at the same time that
    all the other perf call backs are initialized instead of using a
    core_initcall() initialization which happens well after the kernel
    debugger can make use of hardware breakpoints.
    Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
    CC: Frederic Weisbecker <fweisbec@gmail.com>
    CC: Ingo Molnar <mingo@elte.hu>
    CC: Peter Zijlstra <a.p.zijlstra@chello.nl>
    LKML-Reference: <4CD3396D.1090308@windriver.com>
    Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
    3c502e7a
hw_breakpoint.c 15.4 KB