Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[MIPS] Atlas, Malta, SEAD: Remove scroll from interrupt handler.

Aside of being handy for debugging this has never been a particularly
good idea but is now getting in the way of dyntick / tickless kernels
and general cleanups.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

+37 -29
+2
arch/mips/mips-boards/atlas/atlas_setup.c
··· 48 48 return "MIPS Atlas"; 49 49 } 50 50 51 + const char display_string[] = " LINUX ON ATLAS "; 52 + 51 53 void __init plat_mem_setup(void) 52 54 { 53 55 mips_pcibios_init();
+24
arch/mips/mips-boards/generic/display.c
··· 19 19 */ 20 20 21 21 #include <linux/compiler.h> 22 + #include <linux/timer.h> 22 23 #include <asm/io.h> 23 24 #include <asm/mips-boards/generic.h> 25 + 26 + extern const char display_string[]; 27 + static unsigned int display_count; 28 + static unsigned int max_display_count; 24 29 25 30 void mips_display_message(const char *str) 26 31 { ··· 41 36 else 42 37 writel(' ', display + i); 43 38 } 39 + } 40 + 41 + static void scroll_display_message(unsigned long data); 42 + static DEFINE_TIMER(mips_scroll_timer, scroll_display_message, HZ, 0); 43 + 44 + static void scroll_display_message(unsigned long data) 45 + { 46 + mips_display_message(&display_string[display_count++]); 47 + if (display_count == max_display_count) 48 + display_count = 0; 49 + 50 + mod_timer(&mips_scroll_timer, jiffies + HZ); 51 + } 52 + 53 + void mips_scroll_message(void) 54 + { 55 + del_timer_sync(&mips_scroll_timer); 56 + max_display_count = strlen(display_string) + 1 - 8; 57 + mod_timer(&mips_scroll_timer, jiffies + 1); 44 58 }
+2 -29
arch/mips/mips-boards/generic/time.c
··· 53 53 54 54 unsigned long cpu_khz; 55 55 56 - #if defined(CONFIG_MIPS_ATLAS) 57 - static char display_string[] = " LINUX ON ATLAS "; 58 - #endif 59 - #if defined(CONFIG_MIPS_MALTA) 60 - #if defined(CONFIG_MIPS_MT_SMTC) 61 - static char display_string[] = " SMTC LINUX ON MALTA "; 62 - #else 63 - static char display_string[] = " LINUX ON MALTA "; 64 - #endif /* CONFIG_MIPS_MT_SMTC */ 65 - #endif 66 - #if defined(CONFIG_MIPS_SEAD) 67 - static char display_string[] = " LINUX ON SEAD "; 68 - #endif 69 - static unsigned int display_count; 70 - #define MAX_DISPLAY_COUNT (sizeof(display_string) - 8) 71 - 72 56 #define CPUCTR_IMASKBIT (0x100 << MIPSCPU_INT_CPUCTR) 73 57 74 - static unsigned int timer_tick_count; 75 58 static int mips_cpu_timer_irq; 76 59 extern void smtc_timer_broadcast(int); 77 - 78 - static inline void scroll_display_message(void) 79 - { 80 - if ((timer_tick_count++ % HZ) == 0) { 81 - mips_display_message(&display_string[display_count++]); 82 - if (display_count == MAX_DISPLAY_COUNT) 83 - display_count = 0; 84 - } 85 - } 86 60 87 61 static void mips_timer_dispatch(void) 88 62 { ··· 117 143 if (cpu_data[cpu].vpe_id == 0) { 118 144 timer_interrupt(irq, NULL); 119 145 smtc_timer_broadcast(cpu_data[cpu].vpe_id); 120 - scroll_display_message(); 121 146 } else { 122 147 write_c0_compare(read_c0_count() + 123 148 (mips_hpt_frequency/HZ)); ··· 140 167 /* we keep interrupt disabled all the time */ 141 168 if (!r2 || (read_c0_cause() & (1 << 30))) 142 169 timer_interrupt(irq, NULL); 143 - 144 - scroll_display_message(); 145 170 } else { 146 171 /* Everyone else needs to reset the timer int here as 147 172 ll_local_timer_interrupt doesn't */ ··· 233 262 (est_freq%1000000)*100/1000000); 234 263 235 264 cpu_khz = est_freq / 1000; 265 + 266 + mips_scroll_message(); 236 267 } 237 268 238 269 void __init plat_timer_setup(struct irqaction *irq)
+6
arch/mips/mips-boards/malta/malta_setup.c
··· 56 56 return "MIPS Malta"; 57 57 } 58 58 59 + #if defined(CONFIG_MIPS_MT_SMTC) 60 + const char display_string[] = " SMTC LINUX ON MALTA "; 61 + #else 62 + const char display_string[] = " LINUX ON MALTA "; 63 + #endif /* CONFIG_MIPS_MT_SMTC */ 64 + 59 65 #ifdef CONFIG_BLK_DEV_FD 60 66 void __init fd_activate(void) 61 67 {
+2
arch/mips/mips-boards/sead/sead_setup.c
··· 43 43 return "MIPS SEAD"; 44 44 } 45 45 46 + const char display_string[] = " LINUX ON SEAD "; 47 + 46 48 void __init plat_mem_setup(void) 47 49 { 48 50 ioport_resource.end = 0x7fffffff;
+1
include/asm-mips/mips-boards/prom.h
··· 33 33 extern void prom_fixup_mem_map(unsigned long start_mem, unsigned long end_mem); 34 34 extern void mips_display_message(const char *str); 35 35 extern void mips_display_word(unsigned int num); 36 + extern void mips_scroll_message(void); 36 37 extern int get_ethernet_addr(char *ethernet_addr); 37 38 38 39 /* Memory descriptor management. */