diff options
Diffstat (limited to 'arch/h8300')
-rw-r--r-- | arch/h8300/Kconfig | 2 | ||||
-rw-r--r-- | arch/h8300/include/asm/linkage.h | 2 | ||||
-rw-r--r-- | arch/h8300/include/asm/unistd.h | 7 | ||||
-rw-r--r-- | arch/h8300/include/uapi/asm/socket.h | 2 | ||||
-rw-r--r-- | arch/h8300/kernel/gpio.c | 35 | ||||
-rw-r--r-- | arch/h8300/kernel/process.c | 37 | ||||
-rw-r--r-- | arch/h8300/kernel/traps.c | 7 | ||||
-rw-r--r-- | arch/h8300/mm/init.c | 30 |
8 files changed, 32 insertions, 90 deletions
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig index ae8551eb3736..79250de1b12a 100644 --- a/arch/h8300/Kconfig +++ b/arch/h8300/Kconfig @@ -5,7 +5,7 @@ config H8300 select HAVE_GENERIC_HARDIRQS select GENERIC_ATOMIC64 select HAVE_UID16 - select HAVE_VIRT_TO_BUS + select VIRT_TO_BUS select ARCH_WANT_IPC_PARSE_VERSION select GENERIC_IRQ_SHOW select GENERIC_CPU_DEVICES diff --git a/arch/h8300/include/asm/linkage.h b/arch/h8300/include/asm/linkage.h index 6f4df7d46180..1d81604fb0ad 100644 --- a/arch/h8300/include/asm/linkage.h +++ b/arch/h8300/include/asm/linkage.h @@ -2,7 +2,5 @@ #define _H8300_LINKAGE_H #undef SYMBOL_NAME_LABEL -#undef SYMBOL_NAME #define SYMBOL_NAME_LABEL(_name_) _##_name_##: -#define SYMBOL_NAME(_name_) _##_name_ #endif diff --git a/arch/h8300/include/asm/unistd.h b/arch/h8300/include/asm/unistd.h index 6721856d841b..ab671ecf5196 100644 --- a/arch/h8300/include/asm/unistd.h +++ b/arch/h8300/include/asm/unistd.h @@ -33,11 +33,4 @@ #define __ARCH_WANT_SYS_VFORK #define __ARCH_WANT_SYS_CLONE -/* - * "Conditional" syscalls - */ -#define cond_syscall(name) \ - asm (".weak\t_" #name "\n" \ - ".set\t_" #name ",_sys_ni_syscall"); - #endif /* _ASM_H8300_UNISTD_H_ */ diff --git a/arch/h8300/include/uapi/asm/socket.h b/arch/h8300/include/uapi/asm/socket.h index 43e32621da7d..5d1c6d0870e6 100644 --- a/arch/h8300/include/uapi/asm/socket.h +++ b/arch/h8300/include/uapi/asm/socket.h @@ -72,4 +72,6 @@ #define SO_LOCK_FILTER 44 +#define SO_SELECT_ERR_QUEUE 45 + #endif /* _ASM_SOCKET_H */ diff --git a/arch/h8300/kernel/gpio.c b/arch/h8300/kernel/gpio.c index 6a25dd5530e7..b02c752cd326 100644 --- a/arch/h8300/kernel/gpio.c +++ b/arch/h8300/kernel/gpio.c @@ -11,6 +11,7 @@ #include <linux/stddef.h> #include <linux/proc_fs.h> +#include <linux/seq_file.h> #include <linux/kernel.h> #include <linux/string.h> #include <linux/fs.h> @@ -138,30 +139,34 @@ static char *port_status(int portno) return result; } -static int gpio_proc_read(char *buf, char **start, off_t offset, - int len, int *unused_i, void *unused_v) +static int gpio_proc_show(struct seq_file *m, void *v) { - int c,outlen; static const char port_name[]="123456789ABCDEFGH"; - outlen = 0; + int c; + for (c = 0; c < MAX_PORT; c++) { if (ddrs[c] == NULL) - continue ; - len = sprintf(buf,"P%c: %s\n",port_name[c],port_status(c)); - buf += len; - outlen += len; + continue; + seq_printf(m, "P%c: %s\n", port_name[c], port_status(c)); } - return outlen; + return 0; } -static __init int register_proc(void) +static int gpio_proc_open(struct inode *inode, struct file *file) { - struct proc_dir_entry *proc_gpio; + return single_open(file, gpio_proc_show, PDE_DATA(inode)); +} - proc_gpio = create_proc_entry("gpio", S_IRUGO, NULL); - if (proc_gpio) - proc_gpio->read_proc = gpio_proc_read; - return proc_gpio != NULL; +static const struct file_operations gpio_proc_fops = { + .open = gpio_proc_open, + .read = seq_read, + .llseek = seq_lseek, + .release = seq_release, +}; + +static __init int register_proc(void) +{ + return proc_create("gpio", S_IRUGO, NULL, &gpio_proc_fops) != NULL; } __initcall(register_proc); diff --git a/arch/h8300/kernel/process.c b/arch/h8300/kernel/process.c index b609f63f1590..1a744ab7e7e5 100644 --- a/arch/h8300/kernel/process.c +++ b/arch/h8300/kernel/process.c @@ -53,40 +53,13 @@ asmlinkage void ret_from_kernel_thread(void); * The idle loop on an H8/300.. */ #if !defined(CONFIG_H8300H_SIM) && !defined(CONFIG_H8S_SIM) -static void default_idle(void) +void arch_cpu_idle(void) { - local_irq_disable(); - if (!need_resched()) { - local_irq_enable(); - /* XXX: race here! What if need_resched() gets set now? */ - __asm__("sleep"); - } else - local_irq_enable(); -} -#else -static void default_idle(void) -{ - cpu_relax(); + local_irq_enable(); + /* XXX: race here! What if need_resched() gets set now? */ + __asm__("sleep"); } #endif -void (*idle)(void) = default_idle; - -/* - * The idle thread. There's no useful work to be - * done, so just try to conserve power and have a - * low exit latency (ie sit in a loop waiting for - * somebody to say that they'd like to reschedule) - */ -void cpu_idle(void) -{ - while (1) { - rcu_idle_enter(); - while (!need_resched()) - idle(); - rcu_idle_exit(); - schedule_preempt_disabled(); - } -} void machine_restart(char * __unused) { @@ -110,6 +83,8 @@ void machine_power_off(void) void show_regs(struct pt_regs * regs) { + show_regs_print_info(KERN_DEFAULT); + printk("\nPC: %08lx Status: %02x", regs->pc, regs->ccr); printk("\nORIG_ER0: %08lx ER0: %08lx ER1: %08lx", diff --git a/arch/h8300/kernel/traps.c b/arch/h8300/kernel/traps.c index 7833aa3e7c7d..cfe494dbe3da 100644 --- a/arch/h8300/kernel/traps.c +++ b/arch/h8300/kernel/traps.c @@ -164,10 +164,3 @@ void show_trace_task(struct task_struct *tsk) { show_stack(tsk,(unsigned long *)tsk->thread.esp0); } - -void dump_stack(void) -{ - show_stack(NULL,NULL); -} - -EXPORT_SYMBOL(dump_stack); diff --git a/arch/h8300/mm/init.c b/arch/h8300/mm/init.c index 981e25094b1a..ff349d70a29b 100644 --- a/arch/h8300/mm/init.c +++ b/arch/h8300/mm/init.c @@ -139,7 +139,7 @@ void __init mem_init(void) start_mem = PAGE_ALIGN(start_mem); max_mapnr = num_physpages = MAP_NR(high_memory); - /* this will put all memory onto the freelists */ + /* this will put all low memory onto the freelists */ totalram_pages = free_all_bootmem(); codek = (_etext - _stext) >> 10; @@ -161,15 +161,7 @@ void __init mem_init(void) #ifdef CONFIG_BLK_DEV_INITRD void free_initrd_mem(unsigned long start, unsigned long end) { - int pages = 0; - for (; start < end; start += PAGE_SIZE) { - ClearPageReserved(virt_to_page(start)); - init_page_count(virt_to_page(start)); - free_page(start); - totalram_pages++; - pages++; - } - printk ("Freeing initrd memory: %dk freed\n", pages); + free_reserved_area(start, end, 0, "initrd"); } #endif @@ -177,23 +169,7 @@ void free_initmem(void) { #ifdef CONFIG_RAMKERNEL - unsigned long addr; -/* - * the following code should be cool even if these sections - * are not page aligned. - */ - addr = PAGE_ALIGN((unsigned long)(__init_begin)); - /* next to check that the page we free is not a partial page */ - for (; addr + PAGE_SIZE < (unsigned long)__init_end; addr +=PAGE_SIZE) { - ClearPageReserved(virt_to_page(addr)); - init_page_count(virt_to_page(addr)); - free_page(addr); - totalram_pages++; - } - printk(KERN_INFO "Freeing unused kernel memory: %ldk freed (0x%x - 0x%x)\n", - (addr - PAGE_ALIGN((long) __init_begin)) >> 10, - (int)(PAGE_ALIGN((unsigned long)__init_begin)), - (int)(addr - PAGE_SIZE)); + free_initmem_default(0); #endif } |