public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [sched.h 0/8] sched.h header cleanups vs. 2.6.9-rc2-mm3
@ 2004-09-25  2:45 William Lee Irwin III
  2004-09-25  2:49 ` [sched.h 1/8] nuke itimer_ticks and itimer_next William Lee Irwin III
  0 siblings, 1 reply; 14+ messages in thread
From: William Lee Irwin III @ 2004-09-25  2:45 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

I split off the most easily mergeable parts of some sched.h header
cleanups I wrote that better than halved the size of sched.h. In
particular, these are the parts that don't require large sweeps,
uninlining, or introducing new headers. Compiletested on x86-64.


-- wli

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

* [sched.h 1/8] nuke itimer_ticks and itimer_next
  2004-09-25  2:45 [sched.h 0/8] sched.h header cleanups vs. 2.6.9-rc2-mm3 William Lee Irwin III
@ 2004-09-25  2:49 ` William Lee Irwin III
  2004-09-25  2:53   ` [sched.h 2/8] nuke CT_TO_SECS() and CT_TO_USECS() William Lee Irwin III
  0 siblings, 1 reply; 14+ messages in thread
From: William Lee Irwin III @ 2004-09-25  2:49 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

On Fri, Sep 24, 2004 at 07:45:13PM -0700, William Lee Irwin III wrote:
> I split off the most easily mergeable parts of some sched.h header
> cleanups I wrote that better than halved the size of sched.h. In
> particular, these are the parts that don't require large sweeps,
> uninlining, or introducing new headers. Compiletested on x86-64.

Remove itimer_next and itimer_ticks; they are nowhere defined and
referenced nowhere else.


Index: mm3-2.6.9-rc2/include/linux/sched.h
===================================================================
--- mm3-2.6.9-rc2.orig/include/linux/sched.h	2004-09-24 17:37:15.000000000 -0700
+++ mm3-2.6.9-rc2/include/linux/sched.h	2004-09-24 18:38:02.935107528 -0700
@@ -939,8 +939,6 @@
 
 #include <asm/current.h>
 
-extern unsigned long itimer_ticks;
-extern unsigned long itimer_next;
 extern void do_timer(struct pt_regs *);
 
 extern int FASTCALL(wake_up_state(struct task_struct * tsk, unsigned int state));

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

* [sched.h 2/8] nuke CT_TO_SECS() and CT_TO_USECS()
  2004-09-25  2:49 ` [sched.h 1/8] nuke itimer_ticks and itimer_next William Lee Irwin III
@ 2004-09-25  2:53   ` William Lee Irwin III
  2004-09-25  3:08     ` [sched.h 3/8] privatize CALC_LOAD() William Lee Irwin III
  0 siblings, 1 reply; 14+ messages in thread
From: William Lee Irwin III @ 2004-09-25  2:53 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

On Fri, Sep 24, 2004 at 07:49:17PM -0700, William Lee Irwin III wrote:
> Remove itimer_next and itimer_ticks; they are nowhere defined and
> referenced nowhere else.

CT_TO_SECS() and CT_TO_USECS() are used where jiffies_to_timeval()
should be; this patch teaches their sole caller to use that instead and
by so doing removes them from the kernel entirely.


Index: mm3-2.6.9-rc2/arch/mips/kernel/irixelf.c
===================================================================
--- mm3-2.6.9-rc2.orig/arch/mips/kernel/irixelf.c	2004-09-12 22:33:39.000000000 -0700
+++ mm3-2.6.9-rc2/arch/mips/kernel/irixelf.c	2004-09-24 18:45:21.055503104 -0700
@@ -29,6 +29,7 @@
 #include <linux/personality.h>
 #include <linux/elfcore.h>
 #include <linux/smp_lock.h>
+#include <linux/jiffies.h>
 
 #include <asm/uaccess.h>
 #include <asm/mipsregs.h>
@@ -1131,14 +1132,10 @@
 	psinfo.pr_ppid = prstatus.pr_ppid = current->parent->pid;
 	psinfo.pr_pgrp = prstatus.pr_pgrp = process_group(current);
 	psinfo.pr_sid = prstatus.pr_sid = current->signal->session;
-	prstatus.pr_utime.tv_sec = CT_TO_SECS(current->utime);
-	prstatus.pr_utime.tv_usec = CT_TO_USECS(current->utime);
-	prstatus.pr_stime.tv_sec = CT_TO_SECS(current->stime);
-	prstatus.pr_stime.tv_usec = CT_TO_USECS(current->stime);
-	prstatus.pr_cutime.tv_sec = CT_TO_SECS(current->cutime);
-	prstatus.pr_cutime.tv_usec = CT_TO_USECS(current->cutime);
-	prstatus.pr_cstime.tv_sec = CT_TO_SECS(current->cstime);
-	prstatus.pr_cstime.tv_usec = CT_TO_USECS(current->cstime);
+	jiffies_to_timeval(current->utime, &prstatus.pr_utime);
+	jiffies_to_timeval(current->stime, &prstatus.pr_stime);
+	jiffies_to_timeval(current->cutime, &prstatus.pr_cutime);
+	jiffies_to_timeval(current->cstime, &prstatus.pr_cstime);
 	if (sizeof(elf_gregset_t) != sizeof(struct pt_regs)) {
 		printk("sizeof(elf_gregset_t) (%d) != sizeof(struct pt_regs) "
 		       "(%d)\n", sizeof(elf_gregset_t), sizeof(struct pt_regs));
Index: mm3-2.6.9-rc2/include/linux/sched.h
===================================================================
--- mm3-2.6.9-rc2.orig/include/linux/sched.h	2004-09-24 18:38:02.935107528 -0700
+++ mm3-2.6.9-rc2/include/linux/sched.h	2004-09-24 18:45:29.052287408 -0700
@@ -85,9 +85,6 @@
 	load += n*(FIXED_1-exp); \
 	load >>= FSHIFT;
 
-#define CT_TO_SECS(x)	((x) / HZ)
-#define CT_TO_USECS(x)	(((x) % HZ) * 1000000/HZ)
-
 extern int nr_threads;
 extern int last_pid;
 DECLARE_PER_CPU(unsigned long, process_counts);

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

* [sched.h 3/8] privatize CALC_LOAD()
  2004-09-25  2:53   ` [sched.h 2/8] nuke CT_TO_SECS() and CT_TO_USECS() William Lee Irwin III
@ 2004-09-25  3:08     ` William Lee Irwin III
  2004-09-25  3:19       ` [sched.h 4/8] move struct k_itimer to posix-timers.h William Lee Irwin III
  0 siblings, 1 reply; 14+ messages in thread
From: William Lee Irwin III @ 2004-09-25  3:08 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

On Fri, Sep 24, 2004 at 07:53:04PM -0700, William Lee Irwin III wrote:
> CT_TO_SECS() and CT_TO_USECS() are used where jiffies_to_timeval()
> should be; this patch teaches their sole caller to use that instead and
> by so doing removes them from the kernel entirely.

CALC_LOAD() is used nowhere but kernel/timer.c; this patch moves it
there.


Index: mm3-2.6.9-rc2/include/linux/sched.h
===================================================================
--- mm3-2.6.9-rc2.orig/include/linux/sched.h	2004-09-24 18:45:29.052287408 -0700
+++ mm3-2.6.9-rc2/include/linux/sched.h	2004-09-24 18:58:09.944614192 -0700
@@ -75,15 +75,6 @@
 
 #define FSHIFT		11		/* nr of bits of precision */
 #define FIXED_1		(1<<FSHIFT)	/* 1.0 as fixed-point */
-#define LOAD_FREQ	(5*HZ)		/* 5 sec intervals */
-#define EXP_1		1884		/* 1/exp(5sec/1min) as fixed-point */
-#define EXP_5		2014		/* 1/exp(5sec/5min) */
-#define EXP_15		2037		/* 1/exp(5sec/15min) */
-
-#define CALC_LOAD(load,exp,n) \
-	load *= exp; \
-	load += n*(FIXED_1-exp); \
-	load >>= FSHIFT;
 
 extern int nr_threads;
 extern int last_pid;
Index: mm3-2.6.9-rc2/kernel/timer.c
===================================================================
--- mm3-2.6.9-rc2.orig/kernel/timer.c	2004-09-24 17:37:17.000000000 -0700
+++ mm3-2.6.9-rc2/kernel/timer.c	2004-09-24 18:58:21.931791864 -0700
@@ -884,6 +884,16 @@
  */
 unsigned long avenrun[3];
 
+#define EXP_1		1884		/* 1/exp(5sec/1min) as fixed-point */
+#define EXP_5		2014		/* 1/exp(5sec/5min) */
+#define EXP_15		2037		/* 1/exp(5sec/15min) */
+
+static inline unsigned long
+__calc_load(unsigned long prev, unsigned long decay, unsigned long new)
+{
+	return (decay*prev + (FIXED_1 - decay)*new) >> FSHIFT;
+}
+
 /*
  * calc_load - given tick count, update the avenrun load estimates.
  * This is called while holding a write_lock on xtime_lock.
@@ -891,15 +901,15 @@
 static inline void calc_load(unsigned long ticks)
 {
 	unsigned long active_tasks; /* fixed-point */
-	static int count = LOAD_FREQ;
+	static int count = 5*HZ;
 
 	count -= ticks;
 	if (count < 0) {
-		count += LOAD_FREQ;
+		count += 5*HZ;
 		active_tasks = count_active_tasks();
-		CALC_LOAD(avenrun[0], EXP_1, active_tasks);
-		CALC_LOAD(avenrun[1], EXP_5, active_tasks);
-		CALC_LOAD(avenrun[2], EXP_15, active_tasks);
+		avenrun[0] = __calc_load(avenrun[0], EXP_1, active_tasks);
+		avenrun[1] = __calc_load(avenrun[1], EXP_5, active_tasks);
+		avenrun[2] = __calc_load(avenrun[2], EXP_15, active_tasks);
 	}
 }
 

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

* [sched.h 4/8] move struct k_itimer to posix-timers.h
  2004-09-25  3:08     ` [sched.h 3/8] privatize CALC_LOAD() William Lee Irwin III
@ 2004-09-25  3:19       ` William Lee Irwin III
  2004-09-25  3:24         ` [sched.h 5/8] move struct mm_struct to mm.h William Lee Irwin III
  0 siblings, 1 reply; 14+ messages in thread
From: William Lee Irwin III @ 2004-09-25  3:19 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

On Fri, Sep 24, 2004 at 08:08:02PM -0700, William Lee Irwin III wrote:
> CALC_LOAD() is used nowhere but kernel/timer.c; this patch moves it
> there.

struct k_itimer is used nowhere but posix-timers.h; this patch moves it
there.


Index: mm3-2.6.9-rc2/include/linux/posix-timers.h
===================================================================
--- mm3-2.6.9-rc2.orig/include/linux/posix-timers.h	2004-09-12 22:32:27.000000000 -0700
+++ mm3-2.6.9-rc2/include/linux/posix-timers.h	2004-09-24 18:55:19.288557856 -0700
@@ -8,6 +8,8 @@
 	struct list_head list;
 	spinlock_t lock;
 };
+
+struct k_itimer;
 struct k_clock {
 	int res;		/* in nano seconds */
 	struct k_clock_abs *abs_struct;
@@ -23,6 +25,27 @@
 	void (*timer_get) (struct k_itimer * timr,
 			   struct itimerspec * cur_setting);
 };
+
+/* POSIX.1b interval timer structure. */
+struct k_itimer {
+	struct list_head list;		 /* free/ allocate list */
+	spinlock_t it_lock;
+	clockid_t it_clock;		/* which timer type */
+	timer_t it_id;			/* timer id */
+	int it_overrun;			/* overrun on pending signal  */
+	int it_overrun_last;		 /* overrun on last delivered signal */
+	int it_requeue_pending;          /* waiting to requeue this timer */
+	int it_sigev_notify;		 /* notify word of sigevent struct */
+	int it_sigev_signo;		 /* signo word of sigevent struct */
+	sigval_t it_sigev_value;	 /* value word of sigevent struct */
+	unsigned long it_incr;		/* interval specified in jiffies */
+	struct task_struct *it_process;	/* process to send signal to */
+	struct timer_list it_timer;
+	struct sigqueue *sigq;		/* signal queue entry. */
+	struct list_head abs_timer_entry; /* clock abs_timer_list */
+	struct timespec wall_to_prev;   /* wall_to_monotonic used when set */
+};
+
 struct now_struct {
 	unsigned long jiffies;
 };
Index: mm3-2.6.9-rc2/include/linux/sched.h
===================================================================
--- mm3-2.6.9-rc2.orig/include/linux/sched.h	2004-09-24 18:51:25.969027816 -0700
+++ mm3-2.6.9-rc2/include/linux/sched.h	2004-09-24 18:54:45.788650616 -0700
@@ -352,26 +352,6 @@
 struct backing_dev_info;
 struct reclaim_state;
 
-/* POSIX.1b interval timer structure. */
-struct k_itimer {
-	struct list_head list;		 /* free/ allocate list */
-	spinlock_t it_lock;
-	clockid_t it_clock;		/* which timer type */
-	timer_t it_id;			/* timer id */
-	int it_overrun;			/* overrun on pending signal  */
-	int it_overrun_last;		 /* overrun on last delivered signal */
-	int it_requeue_pending;          /* waiting to requeue this timer */
-	int it_sigev_notify;		 /* notify word of sigevent struct */
-	int it_sigev_signo;		 /* signo word of sigevent struct */
-	sigval_t it_sigev_value;	 /* value word of sigevent struct */
-	unsigned long it_incr;		/* interval specified in jiffies */
-	struct task_struct *it_process;	/* process to send signal to */
-	struct timer_list it_timer;
-	struct sigqueue *sigq;		/* signal queue entry. */
-	struct list_head abs_timer_entry; /* clock abs_timer_list */
-	struct timespec wall_to_prev;   /* wall_to_monotonic used when set */
-};
-
 #ifdef CONFIG_SCHEDSTATS
 struct sched_info {
 	/* cumulative counters */

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

* [sched.h 5/8] move struct mm_struct to mm.h
  2004-09-25  3:19       ` [sched.h 4/8] move struct k_itimer to posix-timers.h William Lee Irwin III
@ 2004-09-25  3:24         ` William Lee Irwin III
  2004-09-25  3:26           ` [sched.h 6/8] move aio include " William Lee Irwin III
  0 siblings, 1 reply; 14+ messages in thread
From: William Lee Irwin III @ 2004-09-25  3:24 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

On Fri, Sep 24, 2004 at 08:19:12PM -0700, William Lee Irwin III wrote:
> struct k_itimer is used nowhere but posix-timers.h; this patch moves it
> there.

This patch moves mm_struct and the helpers to handle it into mm.h

Index: mm3-2.6.9-rc2/include/linux/mm.h
===================================================================
--- mm3-2.6.9-rc2.orig/include/linux/mm.h	2004-09-24 17:37:11.000000000 -0700
+++ mm3-2.6.9-rc2/include/linux/mm.h	2004-09-24 19:08:34.310696120 -0700
@@ -56,6 +56,7 @@
  * space that has a special rule for the page-fault handlers (ie a shared
  * library, the executable area etc).
  */
+struct mm_struct;
 struct vm_area_struct {
 	struct mm_struct * vm_mm;	/* The address space we belong to. */
 	unsigned long vm_start;		/* Our start address within vm_mm. */
@@ -109,6 +110,77 @@
 #endif
 };
 
+struct mm_struct {
+	struct vm_area_struct * mmap;		/* list of VMAs */
+	struct rb_root mm_rb;
+	struct vm_area_struct * mmap_cache;	/* last find_vma result */
+	unsigned long (*get_unmapped_area) (struct file *filp,
+				unsigned long addr, unsigned long len,
+				unsigned long pgoff, unsigned long flags);
+	void (*unmap_area) (struct vm_area_struct *area);
+	unsigned long mmap_base;		/* base of mmap area */
+	unsigned long free_area_cache;		/* first hole */
+	pgd_t * pgd;
+	atomic_t mm_users;			/* How many users with user space? */
+	atomic_t mm_count;			/* How many references to "struct mm_struct" (users count as 1) */
+	int map_count;				/* number of VMAs */
+	struct rw_semaphore mmap_sem;
+	spinlock_t page_table_lock;		/* Protects task page tables and mm->rss */
+
+	struct list_head mmlist;		/* List of maybe swapped mm's.  These are globally strung
+						 * together off init_mm.mmlist, and are protected
+						 * by mmlist_lock
+						 */
+
+	unsigned long start_code, end_code, start_data, end_data;
+	unsigned long start_brk, brk, start_stack;
+	unsigned long arg_start, arg_end, env_start, env_end;
+	unsigned long rss, total_vm, locked_vm, shared_vm;
+	unsigned long exec_vm, stack_vm, reserved_vm, def_flags, nr_ptes;
+
+	unsigned long saved_auxv[42]; /* for /proc/PID/auxv */
+
+	unsigned dumpable:1;
+	cpumask_t cpu_vm_mask;
+
+	/* Architecture-specific MM context */
+	mm_context_t context;
+
+	/* Token based thrashing protection. */
+	unsigned long swap_token_time;
+	char recent_pagein;
+
+	/* coredumping support */
+	int core_waiters;
+	struct completion *core_startup_done, core_done;
+
+	/* aio bits */
+	rwlock_t		ioctx_list_lock;
+	struct kioctx		*ioctx_list;
+
+	struct kioctx		default_kioctx;
+};
+
+extern struct mm_struct init_mm;
+
+/*
+ * Routines for handling mm_structs
+ */
+struct mm_struct *mm_alloc(void);
+/* mmput gets rid of the mappings and all user-space */
+void mmput(struct mm_struct *);
+/* Grab a reference to a task's mm, if it is not already going away */
+struct mm_struct *get_task_mm(struct task_struct *);
+/* Remove the current tasks stale references to the old mm_struct */
+void mm_release(struct task_struct *, struct mm_struct *);
+/* mmdrop drops the mm and the page tables */
+void FASTCALL(__mmdrop(struct mm_struct *));
+static inline void mmdrop(struct mm_struct *mm)
+{
+	if (atomic_dec_and_test(&mm->mm_count))
+		__mmdrop(mm);
+}
+
 /*
  * vm_flags..
  */
@@ -562,6 +634,25 @@
 	int atomic;				/* May not schedule() */
 };
 
+
+unsigned long arch_get_unmapped_area(struct file *, unsigned long,
+				unsigned long, unsigned long, unsigned long);
+unsigned long arch_get_unmapped_area_topdown(struct file *, unsigned long,
+				unsigned long, unsigned long, unsigned long);
+void arch_unmap_area(struct vm_area_struct *);
+void arch_unmap_area_topdown(struct vm_area_struct *);
+
+#ifdef HAVE_ARCH_PICK_MMAP_LAYOUT
+void arch_pick_mmap_layout(struct mm_struct *);
+#else
+static inline void arch_pick_mmap_layout(struct mm_struct *mm)
+{
+	mm->mmap_base = TASK_UNMAPPED_BASE;
+	mm->get_unmapped_area = arch_get_unmapped_area;
+	mm->unmap_area = arch_unmap_area;
+}
+#endif
+
 void zap_page_range(struct vm_area_struct *vma, unsigned long address,
 		unsigned long size, struct zap_details *);
 int unmap_vmas(struct mmu_gather **tlbp, struct mm_struct *mm,
Index: mm3-2.6.9-rc2/include/linux/sched.h
===================================================================
--- mm3-2.6.9-rc2.orig/include/linux/sched.h	2004-09-24 18:58:25.125306376 -0700
+++ mm3-2.6.9-rc2/include/linux/sched.h	2004-09-24 19:07:27.493853824 -0700
@@ -178,68 +178,6 @@
 
 #include <linux/aio.h>
 
-extern unsigned long
-arch_get_unmapped_area(struct file *, unsigned long, unsigned long,
-		       unsigned long, unsigned long);
-extern unsigned long
-arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr,
-			  unsigned long len, unsigned long pgoff,
-			  unsigned long flags);
-extern void arch_unmap_area(struct vm_area_struct *area);
-extern void arch_unmap_area_topdown(struct vm_area_struct *area);
-
-
-struct mm_struct {
-	struct vm_area_struct * mmap;		/* list of VMAs */
-	struct rb_root mm_rb;
-	struct vm_area_struct * mmap_cache;	/* last find_vma result */
-	unsigned long (*get_unmapped_area) (struct file *filp,
-				unsigned long addr, unsigned long len,
-				unsigned long pgoff, unsigned long flags);
-	void (*unmap_area) (struct vm_area_struct *area);
-	unsigned long mmap_base;		/* base of mmap area */
-	unsigned long free_area_cache;		/* first hole */
-	pgd_t * pgd;
-	atomic_t mm_users;			/* How many users with user space? */
-	atomic_t mm_count;			/* How many references to "struct mm_struct" (users count as 1) */
-	int map_count;				/* number of VMAs */
-	struct rw_semaphore mmap_sem;
-	spinlock_t page_table_lock;		/* Protects task page tables and mm->rss */
-
-	struct list_head mmlist;		/* List of maybe swapped mm's.  These are globally strung
-						 * together off init_mm.mmlist, and are protected
-						 * by mmlist_lock
-						 */
-
-	unsigned long start_code, end_code, start_data, end_data;
-	unsigned long start_brk, brk, start_stack;
-	unsigned long arg_start, arg_end, env_start, env_end;
-	unsigned long rss, total_vm, locked_vm, shared_vm;
-	unsigned long exec_vm, stack_vm, reserved_vm, def_flags, nr_ptes;
-
-	unsigned long saved_auxv[42]; /* for /proc/PID/auxv */
-
-	unsigned dumpable:1;
-	cpumask_t cpu_vm_mask;
-
-	/* Architecture-specific MM context */
-	mm_context_t context;
-
-	/* Token based thrashing protection. */
-	unsigned long swap_token_time;
-	char recent_pagein;
-
-	/* coredumping support */
-	int core_waiters;
-	struct completion *core_startup_done, core_done;
-
-	/* aio bits */
-	rwlock_t		ioctx_list_lock;
-	struct kioctx		*ioctx_list;
-
-	struct kioctx		default_kioctx;
-};
-
 struct sighand_struct {
 	atomic_t		count;
 	struct k_sigaction	action[_NSIG];
@@ -557,6 +495,7 @@
 
 struct audit_context;		/* See audit.c */
 struct mempolicy;
+struct mm_struct;
 
 /*
  * For entitlemnet based scheduling a task's shares will be determined from
@@ -888,8 +827,6 @@
 extern union thread_union init_thread_union;
 extern struct task_struct init_task;
 
-extern struct   mm_struct init_mm;
-
 #define find_task_by_pid(nr)	find_task_by_pid_type(PIDTYPE_PID, nr)
 extern struct task_struct *find_task_by_pid_type(int type, int pid);
 extern void set_special_pids(pid_t session, pid_t pgrp);
@@ -1000,26 +937,6 @@
 }
 #endif
 
-/*
- * Routines for handling mm_structs
- */
-extern struct mm_struct * mm_alloc(void);
-
-/* mmdrop drops the mm and the page tables */
-extern void FASTCALL(__mmdrop(struct mm_struct *));
-static inline void mmdrop(struct mm_struct * mm)
-{
-	if (atomic_dec_and_test(&mm->mm_count))
-		__mmdrop(mm);
-}
-
-/* mmput gets rid of the mappings and all user-space */
-extern void mmput(struct mm_struct *);
-/* Grab a reference to a task's mm, if it is not already going away */
-extern struct mm_struct *get_task_mm(struct task_struct *task);
-/* Remove the current tasks stale references to the old mm_struct */
-extern void mm_release(struct task_struct *, struct mm_struct *);
-
 extern int  copy_thread(int, unsigned long, unsigned long, unsigned long, struct task_struct *, struct pt_regs *);
 extern void flush_thread(void);
 extern void exit_thread(void);
@@ -1233,17 +1150,6 @@
 
 #endif /* CONFIG_SMP */
 
-#ifdef HAVE_ARCH_PICK_MMAP_LAYOUT
-extern void arch_pick_mmap_layout(struct mm_struct *mm);
-#else
-static inline void arch_pick_mmap_layout(struct mm_struct *mm)
-{
-	mm->mmap_base = TASK_UNMAPPED_BASE;
-	mm->get_unmapped_area = arch_get_unmapped_area;
-	mm->unmap_area = arch_unmap_area;
-}
-#endif
-
 extern long sched_setaffinity(pid_t pid, cpumask_t new_mask);
 extern long sched_getaffinity(pid_t pid, cpumask_t *mask);
 

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

* [sched.h 6/8] move aio include to mm.h
  2004-09-25  3:24         ` [sched.h 5/8] move struct mm_struct to mm.h William Lee Irwin III
@ 2004-09-25  3:26           ` William Lee Irwin III
  2004-09-25  3:27             ` [sched.h 7/8] remove rbtree.h inclusion from sched.h William Lee Irwin III
  2004-09-26  1:56             ` [sched.h 6/8] move aio include to mm.h Arnd Bergmann
  0 siblings, 2 replies; 14+ messages in thread
From: William Lee Irwin III @ 2004-09-25  3:26 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

On Fri, Sep 24, 2004 at 08:24:19PM -0700, William Lee Irwin III wrote:
> This patch moves mm_struct and the helpers to handle it into mm.h

This patch moves the aio inclusion from sched.h to mm.h, while leaving
workqueue.h directly included by sched.h; a large sweep is required to
clean up drivers including workqueue.h indirectly via sched.h


-- wli

Index: mm3-2.6.9-rc2/fs/ext3/file.c
===================================================================
--- mm3-2.6.9-rc2.orig/fs/ext3/file.c	2004-09-24 17:37:18.000000000 -0700
+++ mm3-2.6.9-rc2/fs/ext3/file.c	2004-09-24 19:22:09.556759880 -0700
@@ -23,6 +23,7 @@
 #include <linux/jbd.h>
 #include <linux/ext3_fs.h>
 #include <linux/ext3_jbd.h>
+#include <linux/aio.h>
 #include "xattr.h"
 #include "acl.h"
 
Index: mm3-2.6.9-rc2/include/linux/mm.h
===================================================================
--- mm3-2.6.9-rc2.orig/include/linux/mm.h	2004-09-24 19:08:34.310696120 -0700
+++ mm3-2.6.9-rc2/include/linux/mm.h	2004-09-24 19:17:00.863688360 -0700
@@ -13,6 +13,7 @@
 #include <linux/rbtree.h>
 #include <linux/prio_tree.h>
 #include <linux/fs.h>
+#include <linux/aio.h>
 
 struct mempolicy;
 struct anon_vma;
Index: mm3-2.6.9-rc2/include/linux/sched.h
===================================================================
--- mm3-2.6.9-rc2.orig/include/linux/sched.h	2004-09-24 19:07:27.493853824 -0700
+++ mm3-2.6.9-rc2/include/linux/sched.h	2004-09-24 19:16:49.428426784 -0700
@@ -14,6 +14,7 @@
 #include <linux/thread_info.h>
 #include <linux/cpumask.h>
 #include <linux/nodemask.h>
+#include <linux/workqueue.h>
 
 #include <asm/system.h>
 #include <asm/semaphore.h>
@@ -176,8 +177,6 @@
 
 extern int sysctl_max_map_count;
 
-#include <linux/aio.h>
-
 struct sighand_struct {
 	atomic_t		count;
 	struct k_sigaction	action[_NSIG];

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

* [sched.h 7/8] remove rbtree.h inclusion from sched.h
  2004-09-25  3:26           ` [sched.h 6/8] move aio include " William Lee Irwin III
@ 2004-09-25  3:27             ` William Lee Irwin III
  2004-09-25  3:29               ` [sched.h 8/8] move exec_domain declarations to personality.h William Lee Irwin III
  2004-09-26  1:56             ` [sched.h 6/8] move aio include to mm.h Arnd Bergmann
  1 sibling, 1 reply; 14+ messages in thread
From: William Lee Irwin III @ 2004-09-25  3:27 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

On Fri, Sep 24, 2004 at 08:26:16PM -0700, William Lee Irwin III wrote:
> This patch moves the aio inclusion from sched.h to mm.h, while leaving
> workqueue.h directly included by sched.h; a large sweep is required to
> clean up drivers including workqueue.h indirectly via sched.h

This patch removes the inclusion of rbtree.h in sched.h

Index: mm3-2.6.9-rc2/include/linux/sched.h
===================================================================
--- mm3-2.6.9-rc2.orig/include/linux/sched.h	2004-09-24 19:16:49.428426784 -0700
+++ mm3-2.6.9-rc2/include/linux/sched.h	2004-09-24 19:23:12.432201360 -0700
@@ -10,7 +10,6 @@
 #include <linux/types.h>
 #include <linux/timex.h>
 #include <linux/jiffies.h>
-#include <linux/rbtree.h>
 #include <linux/thread_info.h>
 #include <linux/cpumask.h>
 #include <linux/nodemask.h>

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

* [sched.h 8/8] move exec_domain declarations to personality.h
  2004-09-25  3:27             ` [sched.h 7/8] remove rbtree.h inclusion from sched.h William Lee Irwin III
@ 2004-09-25  3:29               ` William Lee Irwin III
  0 siblings, 0 replies; 14+ messages in thread
From: William Lee Irwin III @ 2004-09-25  3:29 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

On Fri, Sep 24, 2004 at 08:27:46PM -0700, William Lee Irwin III wrote:
> This patch removes the inclusion of rbtree.h in sched.h

This patch moves usage of struct exec_domain in sched.h to personality.h


Index: mm3-2.6.9-rc2/include/linux/personality.h
===================================================================
--- mm3-2.6.9-rc2.orig/include/linux/personality.h	2004-09-12 22:32:48.000000000 -0700
+++ mm3-2.6.9-rc2/include/linux/personality.h	2004-09-24 19:34:23.760144000 -0700
@@ -91,6 +91,11 @@
 };
 
 /*
+ * The default (Linux) execution domain.
+ */
+extern struct exec_domain	default_exec_domain;
+
+/*
  * Return the base personality without flags.
  */
 #define personality(pers)	(pers & PER_MASK)
Index: mm3-2.6.9-rc2/include/linux/sched.h
===================================================================
--- mm3-2.6.9-rc2.orig/include/linux/sched.h	2004-09-24 19:23:12.432201360 -0700
+++ mm3-2.6.9-rc2/include/linux/sched.h	2004-09-24 19:33:49.500352280 -0700
@@ -31,8 +31,6 @@
 #include <linux/pid.h>
 #include <linux/percpu.h>
 
-struct exec_domain;
-
 /*
  * cloning flags:
  */
@@ -802,11 +800,6 @@
 
 void yield(void);
 
-/*
- * The default (Linux) execution domain.
- */
-extern struct exec_domain	default_exec_domain;
-
 union thread_union {
 	struct thread_info thread_info;
 	unsigned long stack[THREAD_SIZE/sizeof(long)];

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

* Re: [sched.h 6/8] move aio include to mm.h
  2004-09-25  3:26           ` [sched.h 6/8] move aio include " William Lee Irwin III
  2004-09-25  3:27             ` [sched.h 7/8] remove rbtree.h inclusion from sched.h William Lee Irwin III
@ 2004-09-26  1:56             ` Arnd Bergmann
  2004-09-26  2:06               ` William Lee Irwin III
  1 sibling, 1 reply; 14+ messages in thread
From: Arnd Bergmann @ 2004-09-26  1:56 UTC (permalink / raw)
  To: William Lee Irwin III; +Cc: Andrew Morton, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 12415 bytes --]

On Samstag, 25. September 2004 05:26, William Lee Irwin III wrote:
> This patch moves the aio inclusion from sched.h to mm.h, while leaving
> workqueue.h directly included by sched.h; a large sweep is required to
> clean up drivers including workqueue.h indirectly via sched.h

FYI: the checkheaders.pl script I recently posted here gives me
the following 175 results about potentially incorrect use of
workqueue.h.

	Arnd <><

arch/cris/arch-v10/drivers/serial.c:4947: need linux/workqueue.h: INIT_WORK
arch/cris/arch-v10/drivers/serial.h:95: need linux/workqueue.h: struct work_struct
arch/ia64/hp/sim/simserial.c:749: need linux/workqueue.h: INIT_WORK
arch/ia64/kernel/smpboot.c:388: need linux/workqueue.h: DECLARE_WORK
arch/ppc64/kernel/spu_softirq.c:53: need linux/workqueue.h: create_workqueue
arch/ppc64/kernel/spu_traps.c:988: need linux/workqueue.h: INIT_WORK
arch/s390/mm/cmm.c:44: need linux/workqueue.h: struct work_struct
arch/um/drivers/chan_kern.c:460: need linux/workqueue.h: struct work_struct
arch/um/drivers/line.c:239: need linux/workqueue.h: INIT_WORK
arch/um/drivers/port_kern.c:139: need linux/workqueue.h: DECLARE_WORK
arch/um/include/chan_kern.h:26: need linux/workqueue.h: struct work_struct
arch/x86_64/kernel/mce.c:239: need linux/workqueue.h: DECLARE_WORK
drivers/atm/ambassador.c:2244: need linux/workqueue.h: INIT_WORK
drivers/atm/ambassador.h:635: need linux/workqueue.h: struct work_struct
drivers/atm/idt77252.c:3704: need linux/workqueue.h: INIT_WORK
drivers/base/firmware_class.c:477: need linux/workqueue.h: struct work_struct
drivers/block/as-iosched.c:124: need linux/workqueue.h: struct work_struct
drivers/block/ll_rw_blk.c:250: need linux/workqueue.h: INIT_WORK
drivers/char/drm/drm_irq.h:131: need linux/workqueue.h: INIT_WORK
drivers/char/cyclades.c:5503: need linux/workqueue.h: INIT_WORK
drivers/char/epca.c:1934: need linux/workqueue.h: INIT_WORK
drivers/char/epca.h:140: need linux/workqueue.h: struct work_struct
drivers/char/esp.c:2547: need linux/workqueue.h: INIT_WORK
drivers/char/ip2main.c:933: need linux/workqueue.h: INIT_WORK
drivers/char/isicom.c:1779: need linux/workqueue.h: INIT_WORK
drivers/char/istallion.c:3333: need linux/workqueue.h: INIT_WORK
drivers/char/moxa.c:159: need linux/workqueue.h: struct work_struct
drivers/char/mxser.c:270: need linux/workqueue.h: struct work_struct
drivers/char/pcxx.c:1447: need linux/workqueue.h: INIT_WORK
drivers/char/pcxx.h:91: need linux/workqueue.h: struct work_struct
drivers/char/riscom8.c:1711: need linux/workqueue.h: INIT_WORK
drivers/char/riscom8.h:84: need linux/workqueue.h: struct work_struct
drivers/char/specialix.c:2132: need linux/workqueue.h: INIT_WORK
drivers/char/specialix_io8.h:123: need linux/workqueue.h: struct work_struct
drivers/char/stallion.c:2296: need linux/workqueue.h: INIT_WORK
drivers/char/tty_io.c:1288: need linux/workqueue.h: cancel_delayed_work
drivers/char/ip2/i2ellis.h:404: need linux/workqueue.h: struct work_struct
drivers/char/ip2/i2lib.c:334: need linux/workqueue.h: INIT_WORK
drivers/cpufreq/cpufreq.c:394: need linux/workqueue.h: INIT_WORK
drivers/ieee1394/hosts.c:140: need linux/workqueue.h: INIT_WORK
drivers/ieee1394/hosts.h:69: need linux/workqueue.h: struct work_struct
drivers/input/power.c:52: need linux/workqueue.h: DECLARE_WORK
drivers/input/keyboard/atkbd.c:28: linux/workqueue.h not needed.
drivers/isdn/act2000/module.c:582: need linux/workqueue.h: INIT_WORK
drivers/isdn/hardware/eicon/divasmain.c:21: linux/workqueue.h not needed.
drivers/isdn/hisax/amd7930_fn.c:792: need linux/workqueue.h: INIT_WORK
drivers/isdn/hisax/hfc_2bds0.c:1081: need linux/workqueue.h: INIT_WORK
drivers/isdn/hisax/hfc_pci.c:1724: need linux/workqueue.h: INIT_WORK
drivers/isdn/hisax/hfc_sx.c:1504: need linux/workqueue.h: INIT_WORK
drivers/isdn/hisax/hisax.h:458: need linux/workqueue.h: struct work_struct
drivers/isdn/hisax/icc.c:681: need linux/workqueue.h: INIT_WORK
drivers/isdn/hisax/ipacx.c:998: need linux/workqueue.h: INIT_WORK
drivers/isdn/hisax/isac.c:680: need linux/workqueue.h: INIT_WORK
drivers/isdn/hisax/isar.c:1581: need linux/workqueue.h: INIT_WORK
drivers/isdn/hisax/isdnl1.c:364: need linux/workqueue.h: INIT_WORK
drivers/isdn/hisax/w6692.c:1078: need linux/workqueue.h: INIT_WORK
drivers/isdn/hysdn/boardergo.c:451: need linux/workqueue.h: INIT_WORK
drivers/isdn/i4l/isdn_net.c:2602: need linux/workqueue.h: INIT_WORK
drivers/isdn/pcbit/drv.c:132: need linux/workqueue.h: INIT_WORK
drivers/isdn/pcbit/layer2.c:33: linux/workqueue.h not needed.
drivers/isdn/tpam/tpam_main.c:180: need linux/workqueue.h: INIT_WORK
drivers/isdn/tpam/tpam_queues.c:16: linux/workqueue.h not needed.
drivers/macintosh/adb.c:277: need linux/workqueue.h: DECLARE_WORK
drivers/macintosh/macserial.h:163: need linux/workqueue.h: struct work_struct
drivers/media/dvb/dvb-core/dvb_net.c:112: need linux/workqueue.h: struct work_struct
drivers/media/video/ir-kbd-gpio.c:169: need linux/workqueue.h: struct work_struct
drivers/message/fusion/linux_compat.h:192: need linux/workqueue.h: INIT_WORK
drivers/message/fusion/mptlan.h:24: linux/workqueue.h not needed.
drivers/message/fusion/mptscsih.h:125: linux/workqueue.h not needed.
drivers/message/i2o/i2o_core.c:50: linux/workqueue.h not needed.
drivers/message/i2o/i2o_lan.h:139: need linux/workqueue.h: struct work_struct
drivers/message/i2o/i2o_proc.c:51: linux/workqueue.h not needed.
drivers/net/ibmveth.c:558: need linux/workqueue.h: cancel_delayed_work
drivers/net/ibmveth.h:118: need linux/workqueue.h: struct work_struct
drivers/net/iseries_veth.c:126: need linux/workqueue.h: struct work_struct
drivers/net/s2io.h:723: need linux/workqueue.h: struct work_struct
drivers/net/sungem.h:963: need linux/workqueue.h: struct work_struct
drivers/net/tg3.h:2121: need linux/workqueue.h: struct work_struct
drivers/net/tlan.h:211: need linux/workqueue.h: struct work_struct
drivers/net/e1000/e1000_main.c:525: need linux/workqueue.h: INIT_WORK
drivers/net/ixgb/ixgb.h:151: need linux/workqueue.h: struct work_struct
drivers/net/ixgb/ixgb_main.c:405: need linux/workqueue.h: INIT_WORK
drivers/net/wan/lmc/lmc_proto.c:37: linux/workqueue.h not needed.
drivers/net/wan/pc300_tty.c:107: need linux/workqueue.h: struct work_struct
drivers/net/wan/sdla_chdlc.c:161: need linux/workqueue.h: struct work_struct
drivers/net/wan/sdla_ppp.c:215: need linux/workqueue.h: struct work_struct
drivers/net/wan/sdlamain.c:217: need linux/workqueue.h: DECLARE_WORK
drivers/net/wireless/prism54/islpci_dev.c:744: need linux/workqueue.h: INIT_WORK
drivers/net/wireless/prism54/islpci_mgt.c:388: need linux/workqueue.h: INIT_WORK
drivers/net/wireless/orinoco.c:4163: need linux/workqueue.h: INIT_WORK
drivers/pci/hotplug/cpqphp.h:318: need linux/workqueue.h: struct work_struct
drivers/pci/hotplug/cpqphp_core.c:39: linux/workqueue.h not needed.
drivers/pci/hotplug/cpqphp_ctrl.c:34: linux/workqueue.h not needed.
drivers/pci/hotplug/cpqphp_nvram.c:35: linux/workqueue.h not needed.
drivers/pci/hotplug/cpqphp_pci.c:34: linux/workqueue.h not needed.
drivers/pci/hotplug/cpqphp_sysfs.c:34: linux/workqueue.h not needed.
drivers/pci/hotplug/pciehp_core.c:38: linux/workqueue.h not needed.
drivers/pci/hotplug/pciehp_ctrl.c:35: linux/workqueue.h not needed.
drivers/pci/hotplug/pciehp_pci.c:35: linux/workqueue.h not needed.
drivers/pci/hotplug/pciehp_sysfs.c:34: linux/workqueue.h not needed.
drivers/pci/hotplug/shpchp_core.c:38: linux/workqueue.h not needed.
drivers/pci/hotplug/shpchp_ctrl.c:35: linux/workqueue.h not needed.
drivers/pci/hotplug/shpchp_pci.c:35: linux/workqueue.h not needed.
drivers/pci/hotplug/shpchp_sysfs.c:34: linux/workqueue.h not needed.
drivers/pcmcia/i82092.c:17: linux/workqueue.h not needed.
drivers/pcmcia/i82365.c:48: linux/workqueue.h not needed.
drivers/pcmcia/tcic.c:46: linux/workqueue.h not needed.
drivers/pcmcia/yenta_socket.c:16: linux/workqueue.h not needed.
drivers/s390/block/dasd.c:105: need linux/workqueue.h: INIT_WORK
drivers/s390/char/ctrlchar.c:27: need linux/workqueue.h: DECLARE_WORK
drivers/s390/char/tape_block.c:261: need linux/workqueue.h: INIT_WORK
drivers/s390/cio/css.c:312: need linux/workqueue.h: DECLARE_WORK
drivers/s390/cio/device_fsm.c:162: need linux/workqueue.h: PREPARE_WORK
drivers/s390/cio/qdio.c:1756: need linux/workqueue.h: PREPARE_WORK
drivers/s390/net/lcs.c:337: need linux/workqueue.h: INIT_WORK
drivers/s390/net/qeth.h:702: need linux/workqueue.h: struct work_struct
drivers/s390/scsi/zfcp_erp.c:1733: need linux/workqueue.h: struct work_struct
drivers/scsi/NCR5380.c:1004: need linux/workqueue.h: INIT_WORK
drivers/scsi/NCR5380.h:276: need linux/workqueue.h: struct work_struct
drivers/scsi/ipr.c:5618: need linux/workqueue.h: INIT_WORK
drivers/scsi/ipr.h:900: need linux/workqueue.h: struct work_struct
drivers/serial/68328serial.c:1484: need linux/workqueue.h: INIT_WORK
drivers/serial/68328serial.h:162: need linux/workqueue.h: struct work_struct
drivers/serial/68360serial.c:252: need linux/workqueue.h: struct work_struct
drivers/serial/mcfserial.c:1722: need linux/workqueue.h: INIT_WORK
drivers/serial/mcfserial.h:66: need linux/workqueue.h: struct work_struct
drivers/usb/class/bluetty.c:197: need linux/workqueue.h: struct work_struct
drivers/usb/class/cdc-acm.c:151: need linux/workqueue.h: struct work_struct
drivers/usb/core/hcd.c:1597: need linux/workqueue.h: INIT_WORK
drivers/usb/core/hcd.h:70: need linux/workqueue.h: struct work_struct
drivers/usb/core/hub.c:499: need linux/workqueue.h: INIT_WORK
drivers/usb/host/ohci-mem.c:36: need linux/workqueue.h: INIT_WORK
drivers/usb/host/ohci.h:378: need linux/workqueue.h: struct work_struct
drivers/usb/gadget/ether.c:117: need linux/workqueue.h: struct work_struct
drivers/usb/net/kaweth.c:224: need linux/workqueue.h: struct work_struct
drivers/usb/serial/usb-serial.c:1075: need linux/workqueue.h: INIT_WORK
drivers/usb/serial/usb-serial.h:112: need linux/workqueue.h: struct work_struct
drivers/usb/serial/whiteheat.c:231: need linux/workqueue.h: struct work_struct
drivers/video/pxafb.c:1072: need linux/workqueue.h: INIT_WORK
drivers/video/pxafb.h:90: need linux/workqueue.h: struct work_struct
drivers/video/sa1100fb.c:1723: need linux/workqueue.h: INIT_WORK
drivers/video/sa1100fb.h:105: need linux/workqueue.h: struct work_struct
drivers/video/console/fbcon.c:587: need linux/workqueue.h: INIT_WORK
fs/ncpfs/inode.c:583: need linux/workqueue.h: INIT_WORK
fs/nfs/idmap.c:46: linux/workqueue.h not needed.
fs/nfs/nfs4renewd.c:90: need linux/workqueue.h: cancel_delayed_work
fs/smbfs/sock.c:22: linux/workqueue.h not needed.
fs/xfs/linux-2.6/xfs_buf.h:147: need linux/workqueue.h: struct work_struct
include/linux/cyclades.h:606: need linux/workqueue.h: struct work_struct
include/linux/hayesesp.h:103: need linux/workqueue.h: struct work_struct
include/linux/if_wanpipe_common.h:35: need linux/workqueue.h: struct work_struct
include/linux/isdn.h:383: need linux/workqueue.h: struct work_struct
include/linux/isicom.h:154: need linux/workqueue.h: struct work_struct
include/linux/istallion.h:76: need linux/workqueue.h: struct work_struct
include/linux/jffs2_fs_sb.h:8: linux/workqueue.h not needed.
include/linux/kernelcapi.h:67: need linux/workqueue.h: struct work_struct
include/linux/reiserfs_fs.h:19: linux/workqueue.h not needed.
include/linux/serial167.h:52: need linux/workqueue.h: struct work_struct
include/linux/stallion.h:100: need linux/workqueue.h: struct work_struct
include/linux/workqueue.h:5: need linux/workqueue.h: _LINUX_WORKQUEUE_H
include/linux/sunrpc/debug.h:15: linux/workqueue.h not needed.
include/linux/sunrpc/rpc_pipe_fs.h:33: need linux/workqueue.h: struct work_struct
include/linux/sunrpc/types.h:13: linux/workqueue.h not needed.
include/linux/sunrpc/xprt.h:173: need linux/workqueue.h: struct work_struct
include/net/irda/ircomm_tty.h:103: need linux/workqueue.h: struct work_struct
init/main.c:49: linux/workqueue.h not needed.
kernel/kthread.c:123: need linux/workqueue.h: DECLARE_WORK
net/bluetooth/hci_sock.c:40: linux/workqueue.h not needed.
net/irda/ircomm/ircomm_param.c:32: linux/workqueue.h not needed.
net/irda/ircomm/ircomm_tty.c:392: need linux/workqueue.h: INIT_WORK
net/sctp/inqueue.c:57: need linux/workqueue.h: INIT_WORK
net/sunrpc/auth_gss/auth_gss.c:53: linux/workqueue.h not needed.
net/sunrpc/clnt.c:33: linux/workqueue.h not needed.
net/sunrpc/sunrpc_syms.c:24: linux/workqueue.h not needed.
sound/core/init.c:121: need linux/workqueue.h: INIT_WORK

[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [sched.h 6/8] move aio include to mm.h
  2004-09-26  1:56             ` [sched.h 6/8] move aio include to mm.h Arnd Bergmann
@ 2004-09-26  2:06               ` William Lee Irwin III
  2004-09-26  2:15                 ` Lee Revell
  2004-09-26  3:03                 ` Arnd Bergmann
  0 siblings, 2 replies; 14+ messages in thread
From: William Lee Irwin III @ 2004-09-26  2:06 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Andrew Morton, linux-kernel

On Samstag, 25. September 2004 05:26, William Lee Irwin III wrote:
>> This patch moves the aio inclusion from sched.h to mm.h, while leaving
>> workqueue.h directly included by sched.h; a large sweep is required to
>> clean up drivers including workqueue.h indirectly via sched.h

On Sun, Sep 26, 2004 at 03:56:27AM +0200, Arnd Bergmann wrote:
> FYI: the checkheaders.pl script I recently posted here gives me
> the following 175 results about potentially incorrect use of
> workqueue.h.

Grepping by hand turned up 186 files missing potentially missing direct
includes of workqueue.h, though I don't have a way to tell if I got
false negatives.


-- wli

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

* Re: [sched.h 6/8] move aio include to mm.h
  2004-09-26  2:06               ` William Lee Irwin III
@ 2004-09-26  2:15                 ` Lee Revell
  2004-09-26  2:17                   ` William Lee Irwin III
  2004-09-26  3:03                 ` Arnd Bergmann
  1 sibling, 1 reply; 14+ messages in thread
From: Lee Revell @ 2004-09-26  2:15 UTC (permalink / raw)
  To: William Lee Irwin III; +Cc: Arnd Bergmann, Andrew Morton, linux-kernel

On Sat, 2004-09-25 at 22:06, William Lee Irwin III wrote:
> On Samstag, 25. September 2004 05:26, William Lee Irwin III wrote:
> >> This patch moves the aio inclusion from sched.h to mm.h, while leaving
> >> workqueue.h directly included by sched.h; a large sweep is required to
> >> clean up drivers including workqueue.h indirectly via sched.h
> 
> On Sun, Sep 26, 2004 at 03:56:27AM +0200, Arnd Bergmann wrote:
> > FYI: the checkheaders.pl script I recently posted here gives me
> > the following 175 results about potentially incorrect use of
> > workqueue.h.
> 
> Grepping by hand turned up 186 files missing potentially missing direct
> includes of workqueue.h, though I don't have a way to tell if I got
> false negatives.
> 

Can't you just try to build it with allyesconfig and see what breaks?

Lee


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

* Re: [sched.h 6/8] move aio include to mm.h
  2004-09-26  2:15                 ` Lee Revell
@ 2004-09-26  2:17                   ` William Lee Irwin III
  0 siblings, 0 replies; 14+ messages in thread
From: William Lee Irwin III @ 2004-09-26  2:17 UTC (permalink / raw)
  To: Lee Revell; +Cc: Arnd Bergmann, Andrew Morton, linux-kernel

On Sat, 2004-09-25 at 22:06, William Lee Irwin III wrote:
>> Grepping by hand turned up 186 files missing potentially missing direct
>> includes of workqueue.h, though I don't have a way to tell if I got
>> false negatives.

On Sat, Sep 25, 2004 at 10:15:12PM -0400, Lee Revell wrote:
> Can't you just try to build it with allyesconfig and see what breaks?

No, architectural ifdefs, not always done directly in drivers, fool
that, among other things, e.g. turning an option on can bring in the
header under various circumstances.


-- wli

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

* Re: [sched.h 6/8] move aio include to mm.h
  2004-09-26  2:06               ` William Lee Irwin III
  2004-09-26  2:15                 ` Lee Revell
@ 2004-09-26  3:03                 ` Arnd Bergmann
  1 sibling, 0 replies; 14+ messages in thread
From: Arnd Bergmann @ 2004-09-26  3:03 UTC (permalink / raw)
  To: William Lee Irwin III; +Cc: Andrew Morton, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 651 bytes --]

On Sonntag, 26. September 2004 04:06, William Lee Irwin III wrote:
> Grepping by hand turned up 186 files missing potentially missing direct
> includes of workqueue.h, though I don't have a way to tell if I got
> false negatives.
> 
I just realized that I was using an old kernel tree (2.6.7 with
some patches), which might be the reason for getting fewer results
(38 of my 175 findings were extra #include lines, not missing ones).

Running my script against the linux.bkbits.net tree gives now gives
me 178 missing and 35 extraneous inclusions of workqueue.h, so your
list is probably exact if you are grepping against -mm.

	Arnd <><

[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

end of thread, other threads:[~2004-09-26  3:04 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-25  2:45 [sched.h 0/8] sched.h header cleanups vs. 2.6.9-rc2-mm3 William Lee Irwin III
2004-09-25  2:49 ` [sched.h 1/8] nuke itimer_ticks and itimer_next William Lee Irwin III
2004-09-25  2:53   ` [sched.h 2/8] nuke CT_TO_SECS() and CT_TO_USECS() William Lee Irwin III
2004-09-25  3:08     ` [sched.h 3/8] privatize CALC_LOAD() William Lee Irwin III
2004-09-25  3:19       ` [sched.h 4/8] move struct k_itimer to posix-timers.h William Lee Irwin III
2004-09-25  3:24         ` [sched.h 5/8] move struct mm_struct to mm.h William Lee Irwin III
2004-09-25  3:26           ` [sched.h 6/8] move aio include " William Lee Irwin III
2004-09-25  3:27             ` [sched.h 7/8] remove rbtree.h inclusion from sched.h William Lee Irwin III
2004-09-25  3:29               ` [sched.h 8/8] move exec_domain declarations to personality.h William Lee Irwin III
2004-09-26  1:56             ` [sched.h 6/8] move aio include to mm.h Arnd Bergmann
2004-09-26  2:06               ` William Lee Irwin III
2004-09-26  2:15                 ` Lee Revell
2004-09-26  2:17                   ` William Lee Irwin III
2004-09-26  3:03                 ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox