source: trunk/target/linux/generic/patches-2.6.38/208-mips_oprofile_fix.patch @ 26297

Last change on this file since 26297 was 26297, checked in by nbd, 6 years ago

kernel: remove wrong chunks from the 2.6.37 and 2.6.38 version of the mips oprofile fix

File size: 900 bytes
  • arch/mips/oprofile/op_model_mipsxx.c

    a b static void reset_counters(void *arg) 
    298298        } 
    299299} 
    300300 
     301static irqreturn_t mipsxx_perfcount_int(int irq, void *dev_id) 
     302{ 
     303        return mipsxx_perfcount_handler(); 
     304} 
     305 
    301306static int __init mipsxx_init(void) 
    302307{ 
    303308        int counters; 
    static int __init mipsxx_init(void) 
    374379        save_perf_irq = perf_irq; 
    375380        perf_irq = mipsxx_perfcount_handler; 
    376381 
     382        if (cp0_perfcount_irq >= 0) 
     383                return request_irq(cp0_perfcount_irq, mipsxx_perfcount_int, 
     384                        IRQF_SHARED, "Perfcounter", save_perf_irq); 
     385 
    377386        return 0; 
    378387} 
    379388 
    static void mipsxx_exit(void) 
    381390{ 
    382391        int counters = op_model_mipsxx_ops.num_counters; 
    383392 
     393        if (cp0_perfcount_irq >= 0) 
     394                free_irq(cp0_perfcount_irq, save_perf_irq); 
     395 
    384396        counters = counters_per_cpu_to_total(counters); 
    385397        on_each_cpu(reset_counters, (void *)(long)counters, 1); 
    386398 
Note: See TracBrowser for help on using the repository browser.