linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [UM] remove a group of unused bh functions
@ 2004-07-28 10:29 Coywolf Qi Hunt
  2004-07-28 17:14 ` [uml-devel] " Jeff Dike
  0 siblings, 1 reply; 3+ messages in thread
From: Coywolf Qi Hunt @ 2004-07-28 10:29 UTC (permalink / raw)
  To: jdike, akpm; +Cc: user-mode-linux-devel, linux-kernel

hi jdike, akpm,

This patch removes a group of unused bh functions in um.
This 2.2 legacy code should be cleaned up.

    -- coywolf

Signed-off-by: Coywolf Qi Hunt <coywolf@greatcn.org>

 smp.c |   35 -----------------------------------
 1 files changed, 35 deletions(-)

diff -Nrup linux-2.6.8-rc2/arch/um/kernel/smp.c linux-2.6.8-rc2-cy/arch/um/kernel/smp.c
--- linux-2.6.8-rc2/arch/um/kernel/smp.c	2004-06-29 23:03:33.000000000 -0500
+++ linux-2.6.8-rc2-cy/arch/um/kernel/smp.c	2004-07-28 05:26:32.554146767 -0500
@@ -59,41 +59,6 @@ void smp_send_reschedule(int cpu)
 	num_reschedules_sent++;
 }
 
-static void show(char * str)
-{
-	int cpu = smp_processor_id();
-
-	printk(KERN_INFO "\n%s, CPU %d:\n", str, cpu);
-}
-	
-#define MAXCOUNT 100000000
-
-static inline void wait_on_bh(void)
-{
-	int count = MAXCOUNT;
-	do {
-		if (!--count) {
-			show("wait_on_bh");
-			count = ~0;
-		}
-		/* nothing .. wait for the other bh's to go away */
-	} while (atomic_read(&global_bh_count) != 0);
-}
-
-/*
- * This is called when we want to synchronize with
- * bottom half handlers. We need to wait until
- * no other CPU is executing any bottom half handler.
- *
- * Don't wait if we're already running in an interrupt
- * context or are inside a bh handler. 
- */
-void synchronize_bh(void)
-{
-	if (atomic_read(&global_bh_count) && !in_interrupt())
-		wait_on_bh();
-}
-
 void smp_send_stop(void)
 {
 	int i;



-- 
Coywolf Qi Hunt
Homepage http://greatcn.org/~coywolf/
Admin of http://GreatCN.org and http://LoveCN.org


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [uml-devel] [PATCH] [UM] remove a group of unused bh functions
  2004-07-28 10:29 [PATCH] [UM] remove a group of unused bh functions Coywolf Qi Hunt
@ 2004-07-28 17:14 ` Jeff Dike
  2004-07-29 11:42   ` [uml-devel] [PATCH] more cleanup on smp.c Coywolf Qi Hunt
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Dike @ 2004-07-28 17:14 UTC (permalink / raw)
  To: Coywolf Qi Hunt; +Cc: akpm, user-mode-linux-devel, linux-kernel

coywolf@greatcn.org said:
> This patch removes a group of unused bh functions in um. This 2.2
> legacy code should be cleaned up. 

Applied to my tree, thanks.

				Jeff


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [uml-devel] [PATCH] more cleanup on smp.c
  2004-07-28 17:14 ` [uml-devel] " Jeff Dike
@ 2004-07-29 11:42   ` Coywolf Qi Hunt
  0 siblings, 0 replies; 3+ messages in thread
From: Coywolf Qi Hunt @ 2004-07-29 11:42 UTC (permalink / raw)
  To: Jeff Dike; +Cc: akpm, user-mode-linux-devel, linux-kernel

Jeff Dike wrote:

>coywolf@greatcn.org said:
>  
>
>>This patch removes a group of unused bh functions in um. This 2.2
>>legacy code should be cleaned up. 
>>    
>>
>
>Applied to my tree, thanks.
>

This includes the previous remove_old_bh patch, plus 8 more lines 
deletions in the same file.


smp.c |   43 -------------------------------------------
 1 files changed, 43 deletions(-)

diff -Nrup linux-2.6.8-rc2/arch/um/kernel/smp.c linux-2.6.8-rc2-cy/arch/um/kernel/smp.c
--- linux-2.6.8-rc2/arch/um/kernel/smp.c	2004-06-29 23:03:33.000000000 -0500
+++ linux-2.6.8-rc2-cy/arch/um/kernel/smp.c	2004-07-29 06:27:39.069874156 -0500
@@ -33,14 +33,6 @@ EXPORT_SYMBOL(cpu_online_map);
  */
 struct cpuinfo_um cpu_data[NR_CPUS];
 
-spinlock_t um_bh_lock = SPIN_LOCK_UNLOCKED;
-
-atomic_t global_bh_count;
-
-/* Not used by UML */
-unsigned char global_irq_holder = NO_PROC_ID;
-unsigned volatile long global_irq_lock;
-
 /* Set when the idlers are all forked */
 int smp_threads_ready = 0;
 
@@ -59,41 +51,6 @@ void smp_send_reschedule(int cpu)
 	num_reschedules_sent++;
 }
 
-static void show(char * str)
-{
-	int cpu = smp_processor_id();
-
-	printk(KERN_INFO "\n%s, CPU %d:\n", str, cpu);
-}
-	
-#define MAXCOUNT 100000000
-
-static inline void wait_on_bh(void)
-{
-	int count = MAXCOUNT;
-	do {
-		if (!--count) {
-			show("wait_on_bh");
-			count = ~0;
-		}
-		/* nothing .. wait for the other bh's to go away */
-	} while (atomic_read(&global_bh_count) != 0);
-}
-
-/*
- * This is called when we want to synchronize with
- * bottom half handlers. We need to wait until
- * no other CPU is executing any bottom half handler.
- *
- * Don't wait if we're already running in an interrupt
- * context or are inside a bh handler. 
- */
-void synchronize_bh(void)
-{
-	if (atomic_read(&global_bh_count) && !in_interrupt())
-		wait_on_bh();
-}
-
 void smp_send_stop(void)
 {
 	int i;



-- 
Coywolf Qi Hunt
Homepage http://greatcn.org/~coywolf/
Admin of http://GreatCN.org and http://LoveCN.org


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-07-29 11:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-28 10:29 [PATCH] [UM] remove a group of unused bh functions Coywolf Qi Hunt
2004-07-28 17:14 ` [uml-devel] " Jeff Dike
2004-07-29 11:42   ` [uml-devel] [PATCH] more cleanup on smp.c Coywolf Qi Hunt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).