Skip to contentSkip to conversation

2.6.1-rc1 arch/i386/kernel/setup.c wrong parameter order to request resources ?

PATCH Arjan van de Ven 1 participant 3 messages Jan 4, 2004 – Mar 29, 2004 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi,

in setup.c the kernel tries to reserve ram resources for system ram etc etc. However it seems it's done with the parameters to request_resource in the wrong order (it certainly is opposite order from other neighboring code). Can someone confirm I'm not overlooking something?

Greetings,
Arjan van de Ven

arch/i386/kernel/setup.c renamed from arch/i386/kernel/setup.c~ +2 -2
@@ -834,8 +834,8 @@
 			 *  so we try it repeatedly and let the resource manager
 			 *  test it.
 			 */
-			request_resource(res, &code_resource);
-			request_resource(res, &data_resource);
+			request_resource(&code_resource, res);
+			request_resource(&data_resource, res);
 		}
 	}
 
#2 lore raw
In reply to a message not in the archive
Quoted 11 lines · Linus Torvalds
Quoted 5 lines · Arjan van de Ven

in setup.c the kernel tries to reserve ram resources for system ram etc etc. However it seems it's done with the parameters to request_resource in the wrong order (it certainly is opposite order from other neighboring code). Can someone confirm I'm not overlooking something?

You've overlooked something.

Quoted 8 lines

The core uses the rigth order: it's literally trying to find _which_ of the e820 resources contains the "code" and "data" resource.

In other words: the code and data resources don't contain anything. They are contained _in_ something, but we don't know which one off-hand, so we try to register them in all the memory resources we find.

and not used for anything else.

ok fair enough; maybe deserves more comment but it makes sense.

#3 lore raw
In reply to a message not in the archive
Quoted 11 lines · Linus Torvalds
Quoted 5 lines · Arjan van de Ven

in setup.c the kernel tries to reserve ram resources for system ram etc etc. However it seems it's done with the parameters to request_resource in the wrong order (it certainly is opposite order from other neighboring code). Can someone confirm I'm not overlooking something?

You've overlooked something.

Quoted 8 lines

The core uses the rigth order: it's literally trying to find _which_ of the e820 resources contains the "code" and "data" resource.

In other words: the code and data resources don't contain anything. They are contained _in_ something, but we don't know which one off-hand, so we try to register them in all the memory resources we find.

and not used for anything else.

ok fair enough; maybe deserves more comment but it makes sense.