From: NIIBE Y. <gn...@m1...> - 2001-08-17 07:51:21
|
> Here it is: No, that's bad. Here's update. This includes patches for drivers. * drivers/net/8139too.c: Include <linux/completion.h>. * drivers/maple/maple.c: Likewise. (kmapled_exited, maple_exit, kmapled_thread): Use new "completion" interface. * include/asm-sh/keyboard.h (kbd_rate): New function. * include/asm-sh/io.h (page_to_bus): New macro. * include/asm-sh/mmzone.h (page_to_phys): Defined. Index: drivers/maple/maple.c =================================================================== RCS file: /cvsroot/linuxsh/kernel/drivers/maple/maple.c,v retrieving revision 1.6 diff -u -r1.6 maple.c --- drivers/maple/maple.c 2001/08/03 11:22:06 1.6 +++ drivers/maple/maple.c 2001/08/17 07:47:48 @@ -13,6 +13,7 @@ #include <linux/init.h> #include <linux/string.h> #include <linux/smp_lock.h> +#include <linux/completion.h> #include <asm/page.h> #include <asm/io.h> @@ -35,7 +36,7 @@ static LIST_HEAD(maple_waitq); static LIST_HEAD(maple_sentq); static DECLARE_WAIT_QUEUE_HEAD(kmapled_wait); -static DECLARE_MUTEX_LOCKED(kmapled_exited); +static DECLARE_COMPLETION(kmapled_exited); static int kmapled_pid = 0; struct timer_list maple_timer; @@ -462,7 +463,7 @@ unlock_kernel(); - up_and_exit(&kmapled_exited, 0); + complete_and_exit(&kmapled_exited, 0); } @@ -526,7 +527,7 @@ /* XXX: Must do proper clean-up */ kill_proc(kmapled_pid, SIGTERM, 1); - down(&kmapled_exited); + wait_for_completion(&kmapled_exited); if (maple_sendbuf) free_pages((unsigned long)maple_sendbuf, MAPLE_DMA_PAGES); Index: drivers/net/8139too.c =================================================================== RCS file: /cvsroot/linuxsh/kernel/drivers/net/8139too.c,v retrieving revision 1.23 diff -u -r1.23 8139too.c --- drivers/net/8139too.c 2001/08/17 00:41:15 1.23 +++ drivers/net/8139too.c 2001/08/17 07:47:48 @@ -152,6 +152,8 @@ #include <linux/delay.h> #include <linux/ethtool.h> #include <linux/mii.h> +#include <linux/completion.h> + #include <asm/io.h> #include <asm/uaccess.h> Index: include/asm-sh/io.h =================================================================== RCS file: /cvsroot/linuxsh/kernel/include/asm-sh/io.h,v retrieving revision 1.30 diff -u -r1.30 io.h --- include/asm-sh/io.h 2001/08/11 01:23:28 1.30 +++ include/asm-sh/io.h 2001/08/17 07:48:01 @@ -405,6 +405,7 @@ #define virt_to_bus virt_to_phys #define bus_to_virt phys_to_virt +#define page_to_bus page_to_phys /* * readX/writeX() are used to access memory mapped devices. On some Index: include/asm-sh/keyboard.h =================================================================== RCS file: /cvsroot/linuxsh/kernel/include/asm-sh/keyboard.h,v retrieving revision 1.10 diff -u -r1.10 keyboard.h --- include/asm-sh/keyboard.h 2001/08/08 14:54:58 1.10 +++ include/asm-sh/keyboard.h 2001/08/17 07:48:01 @@ -4,6 +4,7 @@ * $Id: keyboard.h,v 1.10 2001/08/08 14:54:58 yaegashi Exp $ */ +#include <linux/kd.h> #include <linux/config.h> #include <asm/machvec.h> @@ -40,6 +41,13 @@ static __inline__ void kbd_leds(unsigned char leds) { +} + +static __inline__ int kbd_rate(struct kbd_repeat *rep) +{ + if (rep == NULL) + return -EINVAL; + return -EIO; } extern void hp600_kbd_init_hw(void); Index: include/asm-sh/mmzone.h =================================================================== RCS file: /cvsroot/linuxsh/kernel/include/asm-sh/mmzone.h,v retrieving revision 1.3 diff -u -r1.3 mmzone.h --- include/asm-sh/mmzone.h 2001/08/09 23:52:16 1.3 +++ include/asm-sh/mmzone.h 2001/08/17 07:48:01 @@ -55,5 +55,7 @@ } #define VALID_PAGE(page) is_valid_page(page) +#define page_to_phys(page) PHYSADDR(page_address(page)) + #endif /* CONFIG_DISCONTIGMEM */ #endif Index: include/asm-sh/page.h =================================================================== RCS file: /cvsroot/linuxsh/kernel/include/asm-sh/page.h,v retrieving revision 1.12 diff -u -r1.12 page.h --- include/asm-sh/page.h 2001/07/27 06:09:47 1.12 +++ include/asm-sh/page.h 2001/08/17 07:48:01 @@ -82,6 +82,7 @@ #ifndef CONFIG_DISCONTIGMEM #define phys_to_page(phys) (mem_map + (((phys)-__MEMORY_START) >> PAGE_SHIFT)) #define VALID_PAGE(page) ((page - mem_map) < max_mapnr) +#define page_to_phys(page) (((page - mem_map) << PAGE_SHIFT) + __MEMORY_START) #endif #define virt_to_page(kaddr) phys_to_page(__pa(kaddr)) |