Skip to contentSkip to conversation

building ppc_htab?

PATCH Kumar Gala 3 participants 7 messages Mar 16, 2005 – Mar 18, 2005 Kbuild

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

Is there any reason not to make the following change so we build ppc_htab only on PPC STD MMU? This would also require fixing up fs/proc/proc_misc.c.

Makefile 2005-03-16 00:44:17 -06:00 renamed from arch/ppc/kernel/Makefile 2005-03-13 17:29:44 -06:00 +1 -1
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-extra-$(CONFIG_PPC_STD_MMU)    := head.o
+extra-$(CONFIG_PPC_STD_MMU)    := head.o ppc_htab.o
 extra-$(CONFIG_40x)            := head_4xx.o
 extra-$(CONFIG_44x)            := head_44x.o
 extra-$(CONFIG_E500)           := head_e500.o
@@ -14,7 +14,7 @@
 obj-y                          := entry.o traps.o irq.o idle.o time.o 

misc.o \
process.o signal.o ptrace.o

align.o \
                                        semaphore.o syscalls.o setup.o \

- cputable.o ppc_htab.o perfmon.o
+ cputable.o perfmon.o
obj-$(CONFIG_6xx) += l2cr.o cpu_setup_6xx.o
obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o
obj-$(CONFIG_POWER4) += cpu_setup_power4.o

- kumar

#1 lore raw
Quoted 1 line · Kumar Gala

Is there any reason not to make the following change so we build ppc_htab only on PPC STD MMU? This would also require fixing up fs/proc/proc_misc.c.

Does it actually build properly this way? There used to be functions/variables defined there, needed for linking resolution at least. There were also some generally called functions, that usually didn't do anything unless there was a hash table used. If that is fixed up, then this is fine :-)

Thanks.

	-- Dan
#2 lore raw
In reply to Kumar Gala
Quoted 3 lines · Kumar Gala

Is there any reason not to make the following change so we build ppc_htab only on PPC STD MMU? This would also require fixing up fs/proc/proc_misc.c.

I could have sworn, but maybe my memory sucks, that we no longer messed w/ fs/proc/proc_misc.c for any of the PPC-specific things (since in 2.6 you can do all of that proc magic in your 'driver'). So this patch would make a great deal of sense to do, and if it lacks what I'm talking about, we should do that part as well :)

Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
author
#3 lore raw
Quoted 7 lines · Tom Rini
Quoted 3 lines · Kumar Gala

Is there any reason not to make the following change so we build ppc_htab only on PPC STD MMU?=A0 This would also require fixing up fs/proc/proc_misc.c.

I could have sworn, but maybe my memory sucks, that we no longer =

messed

Quoted 1 line

w/ fs/proc/proc_misc.c for any of the PPC-specific things (since in =

2.6

Quoted 4 lines

you can do all of that proc magic in your 'driver').=A0 So this patch would make a great deal of sense to do, and if it lacks what I'm=20
talking
about, we should do that part as well :)

I'm not exactly clear on what you are talking about. There is this=20 snippet in fs/proc/proc_misc.c:

#ifdef CONFIG_PPC32
        {
                extern struct file_operations ppc_htab_operations;
                entry =3D create_proc_entry("ppc_htab", =
S_IRUGO|S_IWUSR,=20
NULL);
                if (entry)
                        entry->proc_fops =3D &ppc_htab_operations;
        }

#endif

Are you suggesting this should live elsewhere? I'm not that familiar=20 with proc code.

- kumar

#4 lore raw
Quoted 16 lines · Kumar Gala
Quoted 6 lines · Tom Rini
Quoted 3 lines · Kumar Gala

Is there any reason not to make the following change so we build ppc_htab only on PPC STD MMU?? This would also require fixing up fs/proc/proc_misc.c.

Quoted 6 lines

I could have sworn, but maybe my memory sucks, that we no longer messed w/ fs/proc/proc_misc.c for any of the PPC-specific things (since in 2.6 you can do all of that proc magic in your 'driver').? So this patch would make a great deal of sense to do, and if it lacks what I'm talking
about, we should do that part as well :)

Quoted 2 lines

I'm not exactly clear on what you are talking about. There is this snippet in fs/proc/proc_misc.c:

Crap :(

Quoted 8 lines
#ifdef CONFIG_PPC32
        {
                extern struct file_operations ppc_htab_operations;
                entry = create_proc_entry("ppc_htab", S_IRUGO|S_IWUSR, 
NULL);
                if (entry)
                        entry->proc_fops = &ppc_htab_operations;
        }
Quoted 4 lines

#endif

Are you suggesting this should live elsewhere? I'm not that familiar with proc code.

Yes, it should live in ppc_htab.c. See the CONFIG_SYSCTL stuff already in ppc_htab.c for l2crvec.

Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#5 lore raw
Quoted 32 lines · Tom Rini
Quoted 16 lines · Kumar Gala
Quoted 6 lines · Tom Rini
Quoted 3 lines · Kumar Gala

Is there any reason not to make the following change so we build ppc_htab only on PPC STD MMU?? This would also require fixing up fs/proc/proc_misc.c.

Quoted 6 lines

I could have sworn, but maybe my memory sucks, that we no longer messed w/ fs/proc/proc_misc.c for any of the PPC-specific things (since in 2.6 you can do all of that proc magic in your 'driver').? So this patch would make a great deal of sense to do, and if it lacks what I'm talking
about, we should do that part as well :)

Quoted 2 lines

I'm not exactly clear on what you are talking about. There is this snippet in fs/proc/proc_misc.c:

Crap :(

Quoted 10 lines
#ifdef CONFIG_PPC32
        {
                extern struct file_operations ppc_htab_operations;
                entry = create_proc_entry("ppc_htab", S_IRUGO|S_IWUSR, 
NULL);
                if (entry)
                        entry->proc_fops = &ppc_htab_operations;
        }

#endif

Quoted 5 lines
Quoted 2 lines

Are you suggesting this should live elsewhere? I'm not that familiar with proc code.

Yes, it should live in ppc_htab.c. See the CONFIG_SYSCTL stuff already in ppc_htab.c for l2crvec.

Der, that's not the same thing! I still swear there's a way to do this w/o messing w/ fs/proc/proc_misc.c, but I don't recall a good example.

Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
author
#6 lore raw
Quoted 5 lines
Quoted 5 lines

Crap :(

Quoted 3 lines

#ifdef CONFIG_PPC32
=A0=A0=A0=A0=A0=A0=A0=A0 { =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 extern struct =

file_operations ppc_htab_operations;

Quoted 1 line
Quoted 1 line
Quoted 1 line

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 entry =3D =

create_proc_entry("ppc_htab",=20

Quoted 4 lines

S_IRUGO|S_IWUSR,

Quoted 3 lines
Quoted 3 lines

NULL);
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (entry) =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=

=A0 entry->proc_fops =3D &ppc_htab_operations;

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

=A0=A0=A0=A0=A0=A0=A0=A0 }
#endif

Are you suggesting this should live elsewhere?=A0 I'm not that=20

Quoted 8 lines

familiar

Quoted 3 lines
Quoted 1 line

with proc code.

Yes, it should live in ppc_htab.c.=A0 See the CONFIG_SYSCTL stuff=20

already

Quoted 1 line

in ppc_htab.c for l2crvec.

Der, that's not the same thing!=A0 I still swear there's a way to do =

this

Quoted 1 line

w/o messing w/ fs/proc/proc_misc.c, but I don't recall a good =

example.

Will, for now I will add a conditional on CONFIG_PPC_STD_MMU. We can=20 move this out once we figure out how to do it outside of=20 fs/proc/proc_misc.c.

- kumar