Re: [PATCH] more procfs bits for !CONFIG_MMU

From: Linus Torvalds (torvalds@transmeta.com)
Date: Wed Jan 01 2003 - 18:43:05 EST


On Thu, 2 Jan 2003, Christoph Hellwig wrote:
>
> To avoid ifdef hell I extented the task_foo() abstraction already
> present in array.c a bit and the actual implementations now live
> in task_mmu.c and task_nommu.c.

Please do "proc_mmu.c" and "proc_nommu.c", and move the non-task-related
parts there too (ie move "pid_maps_read()" there too, and just make the
no-mmu version of it be empty or whatever, ok?)

That should get rid of the last CONFIG_MMU #ifdef stuff.

Also:

> --- 1.4/fs/proc/Makefile Sat Dec 14 07:38:56 2002
> +++ edited/fs/proc/Makefile Wed Jan 1 13:45:28 2003
> @@ -9,6 +9,12 @@
> proc-objs := inode.o root.o base.o generic.o array.o \
> kmsg.o proc_tty.o proc_misc.o kcore.o
>
> +ifeq ($(CONFIG_MMU),y)
> +proc-objs += task_mmu.o
> +else
> +proc-objs += task_nommu.o
> +endif

Isn't it much nicer to just write this something like

        proc-mmu-y = proc_mmu.o
        proc-mmu-n = proc_nommu.o

        obj-y += $(proc-mmu-$(CONFIG_MMU))

instead, and avoid conditionals?

                Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jan 07 2003 - 22:00:15 EST