Skip to contentSkip to conversation

arch/mips/setup.c

PATCH Bryan Chua 2 participants 3 messages Jan 21, 2002 – Jan 22, 2002 MIPS

lore
Share & tools
lore

Bryan Chua

author
#0 lore raw

I recall a bunch of disussion about changing arch/mips/setup.c to simplify adding vendor-specific platform code in setup_arch, but to date nothing has come of it. So while this is a dramatic oversimplification of the various proposals, how about this for now --

just a vendor-defined function "platform_setup (void)" and it is up to the vendor to figure out what to do from there.

-- bryan

Index: arch/mips/kernel/setup.c
===================================================================
RCS file: /cvs/linux/arch/mips/kernel/setup.c,v
retrieving revision 1.96.2.3

mips/kernel/setup.c +1 -1
diff -u -r1.96.2.3 setup.c
@@ -666,6 +666,7 @@
  	void it8172_setup(void);
 	void swarm_setup(void);
 	void hp_setup(void);
+ void platform_setup (void);
 
 	unsigned long bootmap_size;
 	unsigned long start_pfn, max_pfn, first_usable_pfn;
@@ -793,7 +794,8 @@
                 break;
 #endif
 	default:
- 
	panic("Unsupported architecture");
+ 
        platform_setup ();
+ 
	break;

}

strncpy(command_line, arcs_cmdline, sizeof command_line);

#1 lore raw
Quoted 28 lines · Bryan Chua

I recall a bunch of disussion about changing arch/mips/setup.c to simplify adding vendor-specific platform code in setup_arch, but to date nothing has come of it. So while this is a dramatic oversimplification of the various proposals, how about this for now --

just a vendor-defined function "platform_setup (void)" and it is up to the vendor to figure out what to do from there.

-- bryan

Index: arch/mips/kernel/setup.c
===================================================================
RCS file: /cvs/linux/arch/mips/kernel/setup.c,v
retrieving revision 1.96.2.3
diff -u -r1.96.2.3 setup.c

mips/kernel/setup.c +1 -0
@@ -666,6 +666,7 @@
   	void it8172_setup(void);
  	void swarm_setup(void);
  	void hp_setup(void);
+ 
 void platform_setup (void);
 
  	unsigned long bootmap_size;

unsigned long start_pfn, max_pfn, first_usable_pfn;

mips/kernel/setup.c line 800

Quoted 8 lines
mips/kernel/setup.c +2 -1
@@ -793,7 +794,8 @@
                  break;
  #endif
  	default:
- 
 	panic("Unsupported architecture");
+ 
         platform_setup ();
+ 

At first I thought: he's adding code after a call to panic(), but it turns out your mailer screwed your patch...

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

author
#2 lore raw

Sorry , it is attached.

-- bryan

Quoted 41 lines · Geert Uytterhoeven
Quoted 24 lines · Bryan Chua

I recall a bunch of disussion about changing arch/mips/setup.c to simplify adding vendor-specific platform code in setup_arch, but to date nothing has come of it. So while this is a dramatic oversimplification of the various proposals, how about this for now --

just a vendor-defined function "platform_setup (void)" and it is up to the vendor to figure out what to do from there.

-- bryan

Index: arch/mips/kernel/setup.c
===================================================================
RCS file: /cvs/linux/arch/mips/kernel/setup.c,v
retrieving revision 1.96.2.3
diff -u -r1.96.2.3 setup.c

mips/kernel/setup.c +1 -0
@@ -666,6 +666,7 @@
  	void it8172_setup(void);
 	void swarm_setup(void);
 	void hp_setup(void);
+ 
 void platform_setup (void);
 
 	unsigned long bootmap_size;
mips/kernel/setup.c +0 -0
 	unsigned long start_pfn, max_pfn, first_usable_pfn;

mips/kernel/setup.c line 801

Quoted 9 lines
mips/kernel/setup.c +2 -1
@@ -793,7 +794,8 @@
                 break;
 #endif
 	default:
- 
 	panic("Unsupported architecture");
+ 
        platform_setup ();
+ 
 

At first I thought: he's adding code after a call to panic(), but it turns out your mailer screwed your patch...

Gr{oetje,eeting}s,

Quoted 10 lines

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

Index: arch/mips/kernel/setup.c
===================================================================
RCS file: /cvs/linux/arch/mips/kernel/setup.c,v
retrieving revision 1.96.2.3

mips/kernel/setup.c +3 -1
diff -u -r1.96.2.3 setup.c
@@ -666,6 +666,7 @@
  	void it8172_setup(void);
 	void swarm_setup(void);
 	void hp_setup(void);
+	void platform_setup (void);
 
 	unsigned long bootmap_size;
 	unsigned long start_pfn, max_pfn, first_usable_pfn;
@@ -793,7 +794,8 @@
                 break;
 #endif
 	default:
-		panic("Unsupported architecture");
+	        platform_setup ();
+		break;
 	}
 
 	strncpy(command_line, arcs_cmdline, sizeof command_line);