public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] Fix boot on efi 32 bit Machines
@ 2006-06-20 13:30 Edgar Hucek
  2006-06-20 17:16 ` Randy.Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Edgar Hucek @ 2006-06-20 13:30 UTC (permalink / raw)
  To: linux-kernel

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

Fix EFI boot on 32 bit machines with pcie port.
Efi machines does not have an e820 memory map.

Signed-off-by: Edgar Hucek <hostmaster@ed-soft.at>

[-- Attachment #2: efi_e820_all_mapped_fix.patch --]
[-- Type: text/x-patch, Size: 1461 bytes --]

--- a/arch/i386/kernel/setup.c	2006-06-19 09:12:09.000000000 +0200
+++ b/arch/i386/kernel/setup.c	2006-06-19 09:12:24.000000000 +0200
@@ -975,24 +975,28 @@
 	u64 start = s;
 	u64 end = e;
 	int i;
-	for (i = 0; i < e820.nr_map; i++) {
-		struct e820entry *ei = &e820.map[i];
-		if (type && ei->type != type)
-			continue;
-		/* is the region (part) in overlap with the current region ?*/
-		if (ei->addr >= end || ei->addr + ei->size <= start)
-			continue;
-		/* if the region is at the beginning of <start,end> we move
-		 * start to the end of the region since it's ok until there
-		 */
-		if (ei->addr <= start)
-			start = ei->addr + ei->size;
-		/* if start is now at or beyond end, we're done, full
-		 * coverage */
-		if (start >= end)
-			return 1; /* we're done */
+	if(!efi_enabled) {
+		for (i = 0; i < e820.nr_map; i++) {
+			struct e820entry *ei = &e820.map[i];
+			if (type && ei->type != type)
+				continue;
+			/* is the region (part) in overlap with the current region ?*/
+			if (ei->addr >= end || ei->addr + ei->size <= start)
+				continue;
+			/* if the region is at the beginning of <start,end> we move
+			 * start to the end of the region since it's ok until there
+			 */
+			if (ei->addr <= start)
+				start = ei->addr + ei->size;
+			/* if start is now at or beyond end, we're done, full
+			 * coverage */
+			if (start >= end)
+				return 1; /* we're done */
+		}
+		return 0;
+	} else {
+		return 1;
 	}
-	return 0;
 }
 
 /*

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

* Re: [PATCH 1/1] Fix boot on efi 32 bit Machines
  2006-06-20 13:30 [PATCH 1/1] Fix boot on efi 32 bit Machines Edgar Hucek
@ 2006-06-20 17:16 ` Randy.Dunlap
  2006-06-20 21:58   ` Jan Engelhardt
  0 siblings, 1 reply; 4+ messages in thread
From: Randy.Dunlap @ 2006-06-20 17:16 UTC (permalink / raw)
  To: Edgar Hucek; +Cc: linux-kernel

On Tue, 20 Jun 2006 15:30:03 +0200 Edgar Hucek wrote:

> Fix EFI boot on 32 bit machines with pcie port.
> Efi machines does not have an e820 memory map.
> 
> Signed-off-by: Edgar Hucek <hostmaster@ed-soft.at>

Darn, I was going to comment on the patch, but the attachment
isn't quoted... :(


1.  if you modify this patch, change
+	if(!efi_enabled) {
to
	if (!efi_enabled) {
to be compatible with Linux coding style.

2.  There are ways to send inline patches with thunderbird.
Take a look at these:
http://mbligh.org/linuxdocs/Email/Clients/Thunderbird
http://lkml.org/lkml/2005/12/27/191
http://lists.osdl.org/pipermail/kernel-janitors/2006-June/006478.html

Thanks,
---
~Randy

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

* Re: [PATCH 1/1] Fix boot on efi 32 bit Machines
  2006-06-20 17:16 ` Randy.Dunlap
@ 2006-06-20 21:58   ` Jan Engelhardt
  2006-06-20 22:26     ` Randy.Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Engelhardt @ 2006-06-20 21:58 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: Edgar Hucek, linux-kernel

>
>Darn, I was going to comment on the patch, but the attachment
>isn't quoted... :(
>
>
>1.  if you modify this patch, change
>+	if(!efi_enabled) {
>to
>	if (!efi_enabled) {
>to be compatible with Linux coding style.
>
Care to name the section this is listed in? It is used all over the place 
in examples in the CodingStyle document, but I could not find an 
explanation which explicitly says "space after if".


Jan Engelhardt
-- 

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

* Re: [PATCH 1/1] Fix boot on efi 32 bit Machines
  2006-06-20 21:58   ` Jan Engelhardt
@ 2006-06-20 22:26     ` Randy.Dunlap
  0 siblings, 0 replies; 4+ messages in thread
From: Randy.Dunlap @ 2006-06-20 22:26 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: hostmaster, linux-kernel

On Tue, 20 Jun 2006 23:58:57 +0200 (MEST) Jan Engelhardt wrote:

> >
> >Darn, I was going to comment on the patch, but the attachment
> >isn't quoted... :(
> >
> >
> >1.  if you modify this patch, change
> >+	if(!efi_enabled) {
> >to
> >	if (!efi_enabled) {
> >to be compatible with Linux coding style.
> >
> Care to name the section this is listed in? It is used all over the place 
> in examples in the CodingStyle document, but I could not find an 
> explanation which explicitly says "space after if".

Nope, I didn't say compatible with Documentation/CodingStyle.
I'm just basing it on visible evidence in source files and
many emails requesting the same.

---
~Randy

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

end of thread, other threads:[~2006-06-20 22:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-20 13:30 [PATCH 1/1] Fix boot on efi 32 bit Machines Edgar Hucek
2006-06-20 17:16 ` Randy.Dunlap
2006-06-20 21:58   ` Jan Engelhardt
2006-06-20 22:26     ` Randy.Dunlap

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