diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-24 15:17:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-24 15:17:19 -0400 |
commit | 3fde80e94c2bbffbb13f5faa3340cf438440ebea (patch) | |
tree | 43eeac74dc34596772b9d9883e9208da8ae84184 /arch/m68knommu/kernel | |
parent | ac9f80ad16e6e934b6c1f12f82d27889c0f9abcc (diff) | |
parent | 9b0e74102494971ca37a425c63031fea68bb5b79 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
m68knommu: put ColdFire head code into .text.head section
m68knommu: remove last use of CONFIG_FADS and CONFIG_RPXCLASSIC
m68knommu: remove RPXCLASSIC from the m68k tree
m68knommu: fec: remove FADS
m68knommu: MCF5307 PIT GENERIC_CLOCKEVENTS support
m68knommu: add read_barrier_depends() and irqs_disabled_flags()
m68knommu: add byteswap assembly opcode for ISA A+
m68knommu: add ffs and __ffs plattform which support ISA A+ or ISA C
m68knommu: add sched_clock() for the DMA timer
m68knommu: complete generic time
m68knommu: move code within time.c
m68knommu: m68knommu: add old stack trace method
m68knommu: Add Coldfire DMA Timer support
m68knommu: defconfig for M5407C3 board
m68knommu: defconfig for M5307C3 board
m68knommu: defconfig for M5275EVB board
m68knommu: defconfig for M5249EVB board
m68knommu: change to a configs directory for board configurations
Diffstat (limited to 'arch/m68knommu/kernel')
-rw-r--r-- | arch/m68knommu/kernel/time.c | 40 | ||||
-rw-r--r-- | arch/m68knommu/kernel/traps.c | 38 | ||||
-rw-r--r-- | arch/m68knommu/kernel/vmlinux.lds.S | 1 |
3 files changed, 54 insertions, 25 deletions
diff --git a/arch/m68knommu/kernel/time.c b/arch/m68knommu/kernel/time.c index 0ccfb2ad6380..d182b2f72211 100644 --- a/arch/m68knommu/kernel/time.c +++ b/arch/m68knommu/kernel/time.c | |||
@@ -33,14 +33,13 @@ static inline int set_rtc_mmss(unsigned long nowtime) | |||
33 | return -1; | 33 | return -1; |
34 | } | 34 | } |
35 | 35 | ||
36 | #ifndef CONFIG_GENERIC_CLOCKEVENTS | ||
36 | /* | 37 | /* |
37 | * timer_interrupt() needs to keep up the real-time clock, | 38 | * timer_interrupt() needs to keep up the real-time clock, |
38 | * as well as call the "do_timer()" routine every clocktick | 39 | * as well as call the "do_timer()" routine every clocktick |
39 | */ | 40 | */ |
40 | irqreturn_t arch_timer_interrupt(int irq, void *dummy) | 41 | irqreturn_t arch_timer_interrupt(int irq, void *dummy) |
41 | { | 42 | { |
42 | /* last time the cmos clock got updated */ | ||
43 | static long last_rtc_update=0; | ||
44 | 43 | ||
45 | if (current->pid) | 44 | if (current->pid) |
46 | profile_tick(CPU_PROFILING); | 45 | profile_tick(CPU_PROFILING); |
@@ -49,21 +48,6 @@ irqreturn_t arch_timer_interrupt(int irq, void *dummy) | |||
49 | 48 | ||
50 | do_timer(1); | 49 | do_timer(1); |
51 | 50 | ||
52 | /* | ||
53 | * If we have an externally synchronized Linux clock, then update | ||
54 | * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be | ||
55 | * called as close as possible to 500 ms before the new second starts. | ||
56 | */ | ||
57 | if (ntp_synced() && | ||
58 | xtime.tv_sec > last_rtc_update + 660 && | ||
59 | (xtime.tv_nsec / 1000) >= 500000 - ((unsigned) TICK_SIZE) / 2 && | ||
60 | (xtime.tv_nsec / 1000) <= 500000 + ((unsigned) TICK_SIZE) / 2) { | ||
61 | if (set_rtc_mmss(xtime.tv_sec) == 0) | ||
62 | last_rtc_update = xtime.tv_sec; | ||
63 | else | ||
64 | last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */ | ||
65 | } | ||
66 | |||
67 | write_sequnlock(&xtime_lock); | 51 | write_sequnlock(&xtime_lock); |
68 | 52 | ||
69 | #ifndef CONFIG_SMP | 53 | #ifndef CONFIG_SMP |
@@ -71,8 +55,9 @@ irqreturn_t arch_timer_interrupt(int irq, void *dummy) | |||
71 | #endif | 55 | #endif |
72 | return(IRQ_HANDLED); | 56 | return(IRQ_HANDLED); |
73 | } | 57 | } |
58 | #endif | ||
74 | 59 | ||
75 | void time_init(void) | 60 | static unsigned long read_rtc_mmss(void) |
76 | { | 61 | { |
77 | unsigned int year, mon, day, hour, min, sec; | 62 | unsigned int year, mon, day, hour, min, sec; |
78 | 63 | ||
@@ -83,10 +68,21 @@ void time_init(void) | |||
83 | 68 | ||
84 | if ((year += 1900) < 1970) | 69 | if ((year += 1900) < 1970) |
85 | year += 100; | 70 | year += 100; |
86 | xtime.tv_sec = mktime(year, mon, day, hour, min, sec); | ||
87 | xtime.tv_nsec = 0; | ||
88 | wall_to_monotonic.tv_sec = -xtime.tv_sec; | ||
89 | 71 | ||
90 | hw_timer_init(); | 72 | return mktime(year, mon, day, hour, min, sec);; |
73 | } | ||
74 | |||
75 | unsigned long read_persistent_clock(void) | ||
76 | { | ||
77 | return read_rtc_mmss(); | ||
91 | } | 78 | } |
92 | 79 | ||
80 | int update_persistent_clock(struct timespec now) | ||
81 | { | ||
82 | return set_rtc_mmss(now.tv_sec); | ||
83 | } | ||
84 | |||
85 | void time_init(void) | ||
86 | { | ||
87 | hw_timer_init(); | ||
88 | } | ||
diff --git a/arch/m68knommu/kernel/traps.c b/arch/m68knommu/kernel/traps.c index ec9aea652e79..46f8f9d0c408 100644 --- a/arch/m68knommu/kernel/traps.c +++ b/arch/m68knommu/kernel/traps.c | |||
@@ -103,12 +103,28 @@ asmlinkage void buserr_c(struct frame *fp) | |||
103 | force_sig(SIGSEGV, current); | 103 | force_sig(SIGSEGV, current); |
104 | } | 104 | } |
105 | 105 | ||
106 | static void print_this_address(unsigned long addr, int i) | ||
107 | { | ||
108 | #ifdef CONFIG_KALLSYMS | ||
109 | printk(KERN_EMERG " [%08lx] ", addr); | ||
110 | print_symbol(KERN_CONT "%s\n", addr); | ||
111 | #else | ||
112 | if (i % 5) | ||
113 | printk(KERN_CONT " [%08lx] ", addr); | ||
114 | else | ||
115 | printk(KERN_CONT "\n" KERN_EMERG " [%08lx] ", addr); | ||
116 | i++; | ||
117 | #endif | ||
118 | } | ||
119 | |||
106 | int kstack_depth_to_print = 48; | 120 | int kstack_depth_to_print = 48; |
107 | 121 | ||
108 | static void __show_stack(struct task_struct *task, unsigned long *stack) | 122 | static void __show_stack(struct task_struct *task, unsigned long *stack) |
109 | { | 123 | { |
110 | unsigned long *endstack, addr; | 124 | unsigned long *endstack, addr; |
125 | #ifdef CONFIG_FRAME_POINTER | ||
111 | unsigned long *last_stack; | 126 | unsigned long *last_stack; |
127 | #endif | ||
112 | int i; | 128 | int i; |
113 | 129 | ||
114 | if (!stack) | 130 | if (!stack) |
@@ -126,6 +142,7 @@ static void __show_stack(struct task_struct *task, unsigned long *stack) | |||
126 | printk(" %08lx", *(stack + i)); | 142 | printk(" %08lx", *(stack + i)); |
127 | } | 143 | } |
128 | printk("\n"); | 144 | printk("\n"); |
145 | i = 0; | ||
129 | 146 | ||
130 | #ifdef CONFIG_FRAME_POINTER | 147 | #ifdef CONFIG_FRAME_POINTER |
131 | printk(KERN_EMERG "Call Trace:\n"); | 148 | printk(KERN_EMERG "Call Trace:\n"); |
@@ -134,15 +151,30 @@ static void __show_stack(struct task_struct *task, unsigned long *stack) | |||
134 | while (stack <= endstack && stack > last_stack) { | 151 | while (stack <= endstack && stack > last_stack) { |
135 | 152 | ||
136 | addr = *(stack + 1); | 153 | addr = *(stack + 1); |
137 | printk(KERN_EMERG " [%08lx] ", addr); | 154 | print_this_address(addr, i); |
138 | print_symbol(KERN_CONT "%s\n", addr); | 155 | i++; |
139 | 156 | ||
140 | last_stack = stack; | 157 | last_stack = stack; |
141 | stack = (unsigned long *)*stack; | 158 | stack = (unsigned long *)*stack; |
142 | } | 159 | } |
143 | printk("\n"); | 160 | printk("\n"); |
144 | #else | 161 | #else |
145 | printk(KERN_EMERG "CONFIG_FRAME_POINTER disabled, no symbolic call trace\n"); | 162 | printk(KERN_EMERG "Call Trace with CONFIG_FRAME_POINTER disabled:\n"); |
163 | while (stack <= endstack) { | ||
164 | addr = *stack++; | ||
165 | /* | ||
166 | * If the address is either in the text segment of the kernel, | ||
167 | * or in a region which is occupied by a module then it *may* | ||
168 | * be the address of a calling routine; if so, print it so that | ||
169 | * someone tracing down the cause of the crash will be able to | ||
170 | * figure out the call path that was taken. | ||
171 | */ | ||
172 | if (__kernel_text_address(addr)) { | ||
173 | print_this_address(addr, i); | ||
174 | i++; | ||
175 | } | ||
176 | } | ||
177 | printk(KERN_CONT "\n"); | ||
146 | #endif | 178 | #endif |
147 | } | 179 | } |
148 | 180 | ||
diff --git a/arch/m68knommu/kernel/vmlinux.lds.S b/arch/m68knommu/kernel/vmlinux.lds.S index 93e69236ed6f..69ba9b10767a 100644 --- a/arch/m68knommu/kernel/vmlinux.lds.S +++ b/arch/m68knommu/kernel/vmlinux.lds.S | |||
@@ -62,6 +62,7 @@ SECTIONS { | |||
62 | .text : { | 62 | .text : { |
63 | _text = .; | 63 | _text = .; |
64 | _stext = . ; | 64 | _stext = . ; |
65 | HEAD_TEXT | ||
65 | TEXT_TEXT | 66 | TEXT_TEXT |
66 | SCHED_TEXT | 67 | SCHED_TEXT |
67 | LOCK_TEXT | 68 | LOCK_TEXT |