From d6dd61c831226f9cd7750885da04d360d6455101 Mon Sep 17 00:00:00 2001 From: Jeremy Fitzhardinge Date: Wed, 2 May 2007 19:27:14 +0200 Subject: [PATCH] x86: PARAVIRT: add hooks to intercept mm creation and destruction Add hooks to allow a paravirt implementation to track the lifetime of an mm. Paravirtualization requires three hooks, but only two are needed in common code. They are: arch_dup_mmap, which is called when a new mmap is created at fork arch_exit_mmap, which is called when the last process reference to an mm is dropped, which typically happens on exit and exec. The third hook is activate_mm, which is called from the arch-specific activate_mm() macro/function, and so doesn't need stub versions for other architectures. It's called when an mm is first used. Signed-off-by: Jeremy Fitzhardinge Signed-off-by: Andi Kleen Cc: linux-arch@vger.kernel.org Cc: James Bottomley Acked-by: Ingo Molnar --- include/asm-powerpc/mmu_context.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/asm-powerpc') diff --git a/include/asm-powerpc/mmu_context.h b/include/asm-powerpc/mmu_context.h index 083ac917bd29..c0d7795e3d25 100644 --- a/include/asm-powerpc/mmu_context.h +++ b/include/asm-powerpc/mmu_context.h @@ -10,6 +10,7 @@ #include #include #include +#include /* * Copyright (C) 2001 PPC 64 Team, IBM Corp -- cgit v1.2.1 From 5caf5db887b2bc87d74a78674d8e3e4774fa2a14 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 2 May 2007 14:48:33 +0200 Subject: ps3av: thread updates ps3av: Replace the kernel_thread and the ping pong semaphores by a singlethread workqueue and a completion. Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Torvalds --- include/asm-powerpc/ps3av.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/asm-powerpc') diff --git a/include/asm-powerpc/ps3av.h b/include/asm-powerpc/ps3av.h index 43e90ea96136..5c1b989406e4 100644 --- a/include/asm-powerpc/ps3av.h +++ b/include/asm-powerpc/ps3av.h @@ -646,8 +646,9 @@ struct ps3av_pkt_avb_param { struct ps3av { int available; struct semaphore sem; - struct semaphore ping; - struct semaphore pong; + struct work_struct work; + struct completion done; + struct workqueue_struct *wq; struct mutex mutex; int open_count; struct ps3_vuart_port_device *dev; -- cgit v1.2.1 From fffe52e86b4ad5f8bdcb284c4ea6c87402967f3d Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 2 May 2007 14:48:35 +0200 Subject: ps3av: misc updates ps3av: - Move the definition of struct ps3av to ps3av.c, as it's locally used only. - Kill ps3av.sem, use the existing ps3av.mutex instead. - Make the 512-byte buffer in ps3av_do_pkt() static to reduce stack usage. Its use is protected by a semaphore anyway. Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Torvalds --- include/asm-powerpc/ps3av.h | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'include/asm-powerpc') diff --git a/include/asm-powerpc/ps3av.h b/include/asm-powerpc/ps3av.h index 5c1b989406e4..1366fc5b452d 100644 --- a/include/asm-powerpc/ps3av.h +++ b/include/asm-powerpc/ps3av.h @@ -18,8 +18,6 @@ #ifndef _ASM_POWERPC_PS3AV_H_ #define _ASM_POWERPC_PS3AV_H_ -#include - /** command for ioctl() **/ #define PS3AV_VERSION 0x205 /* version of ps3av command */ @@ -643,25 +641,6 @@ struct ps3av_pkt_avb_param { u8 buf[PS3AV_PKT_AVB_PARAM_MAX_BUF_SIZE]; }; -struct ps3av { - int available; - struct semaphore sem; - struct work_struct work; - struct completion done; - struct workqueue_struct *wq; - struct mutex mutex; - int open_count; - struct ps3_vuart_port_device *dev; - - int region; - struct ps3av_pkt_av_get_hw_conf av_hw_conf; - u32 av_port[PS3AV_AV_PORT_MAX + PS3AV_OPT_PORT_MAX]; - u32 opt_port[PS3AV_OPT_PORT_MAX]; - u32 head[PS3AV_HEAD_MAX]; - u32 audio_port; - int ps3av_mode; - int ps3av_mode_old; -}; /** command status **/ #define PS3AV_STATUS_SUCCESS 0x0000 /* success */ @@ -719,6 +698,7 @@ static inline void ps3av_cmd_av_monitor_info_dump(const struct ps3av_pkt_av_get_ extern int ps3av_cmd_video_get_monitor_info(struct ps3av_pkt_av_get_monitor_info *, u32); +struct ps3_vuart_port_device; extern int ps3av_vuart_write(struct ps3_vuart_port_device *dev, const void *buf, unsigned long size); extern int ps3av_vuart_read(struct ps3_vuart_port_device *dev, void *buf, -- cgit v1.2.1 From 640729014e073e6e2de1f513b2856b81aa7d84e9 Mon Sep 17 00:00:00 2001 From: Masashi Kimoto Date: Wed, 2 May 2007 14:48:36 +0200 Subject: ps3: Make `ps3videomode -v 0 (auto mode) work again ps3: Make `ps3videomode -v 0' (auto mode) work again Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Torvalds --- include/asm-powerpc/ps3av.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/asm-powerpc') diff --git a/include/asm-powerpc/ps3av.h b/include/asm-powerpc/ps3av.h index 1366fc5b452d..9efc40f1c778 100644 --- a/include/asm-powerpc/ps3av.h +++ b/include/asm-powerpc/ps3av.h @@ -706,6 +706,7 @@ extern int ps3av_vuart_read(struct ps3_vuart_port_device *dev, void *buf, extern int ps3av_set_video_mode(u32, int); extern int ps3av_set_audio_mode(u32, u32, u32, u32, u32); +extern int ps3av_get_auto_mode(int); extern int ps3av_set_mode(u32, int); extern int ps3av_get_mode(void); extern int ps3av_get_scanmode(int); -- cgit v1.2.1