GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / arch / mn10300 / kernel / profile-low.S
blob94ffac12d02dff2f5a9d7496f6176b7c47ccbbbb
1 ###############################################################################
3 # Fast profiling interrupt handler
5 # Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
6 # Written by David Howells (dhowells@redhat.com)
8 # This program is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU General Public Licence
10 # as published by the Free Software Foundation; either version
11 # 2 of the Licence, or (at your option) any later version.
13 ###############################################################################
14 #include <linux/sys.h>
15 #include <linux/linkage.h>
16 #include <asm/segment.h>
17 #include <asm/smp.h>
18 #include <asm/intctl-regs.h>
19 #include <asm/timer-regs.h>
21 #define pi break
23         .balign 4
24 counter:
25         .long   -1
27 ###############################################################################
29 # Profiling interrupt entry point
30 # - intended to run at interrupt priority 1
32 ###############################################################################
33 ENTRY(profile_handler)
34         movm    [d2,d3,a2],(sp)
36         # ignore userspace
37         mov     (12,sp),d2
38         and     EPSW_nSL,d2
39         bne     out
41         # do nothing if there's no buffer
42         mov     (prof_buffer),a2
43         and     a2,a2
44         beq     out
45         or      0x20000000,a2
47         # calculate relative position in text segment
48         mov     (16,sp),d2
49         sub     _stext,d2
50         mov     (prof_shift),d3
51         lsr     d3,d2
52         mov     (prof_len),d3
53         cmp     d3,d2
54         bcc     outside_text
56         # increment the appropriate profile bucket
57 do_inc:
58         asl2    d2
59         mov     (a2,d2),d3
60         inc     d3
61         mov     d3,(a2,d2)
62 out:
63         mov     GxICR_DETECT,d2
64         movbu   d2,(TM11ICR)            # ACK the interrupt
65         movbu   (TM11ICR),d2
66         movm    (sp),[d2,d3,a2]
67         rti
69 outside_text:
70         sub     1,d3
71         mov     d3,d2
72         bra     do_inc