Skip to contentSkip to conversation

kexec/kdump: Whitespace fixes

PATCH New Horms 1 participant 1 message Oct 2, 2006

Subsystems (3)
lore
Share & tools
lore

Horms

author
#0 lore raw

PATCH 3/3 kexec/kdump: Whitespace fixes

Quoted 37 lines

Date: Fri, 29 Sep 2006 14:46:23 -0700
From: Tony Luck <[email protected]>
Message-Id: <[email protected]>
To: [email protected]
Subject: kexec/kdump and the ia64 test tree
Cc: [email protected], [email protected]

The kexec/kdump patch in my test tree is very stale, plus it is time for some git maintenance on the test tree (to clean away all the "Auto-update from upstream" commits that my workflow generates). So I'm planning on resetting my "test" branch to Linus-latest + kdump/kexec (so git pull/fetch will barf on my test tree, you'll need to re-clone).

Below I've include what I believe to be the latest version of the patch produced by:

1) Take 2.6.18
2) Apply Nan Hai patch for 2.6.18 (posted Sept 20th)
3) Pull in Linus-latest (c972398b ...) and resolve conflicts in smp.h, sysctl.h
4) Apply Nan hai's "Fix OS_INIT" patch that fixed Indou-san's deadlock issue +(Sept 28th)
5) Fix a few warnings:
arch/ia64/kernel/iosapic.c:
`vec' may be used before set in kexec_disable_iosapic() ... I'm not totally confident that I fixed this right. Please look

(quoted diff) +2 -0
+closely
                at what I did.
        arch/ia64/kernel/smp.c:
                Trivial fixes to stop compiler complaining that
+kdump_smp_send_stop()
                and kdump_smp_send_init() definitions were not prototypes.

6) Lots of white-space cleanup (mostly multiple spaces that should be tabs, but

(quoted diff) +2 -0
+I
   also threw the whole kdump_find_rsvd_region() in arch/ia64/kernel/efi.c
+through
   scripts/Lindent as it was only using two-spaces for indentation.)
Quoted 5 lines

Let me know if I've goofed up the patch during this process.

I'm planning to reset my test tree on Monday (Oct 2nd).

-Tony

This is the whitespace and formating portion of the above patch.

Cc Tony Luck <[email protected]>
Cc Zou Nan hai <[email protected]>
 arch/ia64/kernel/efi.c             |   78 +++---
 arch/ia64/kernel/machine_kexec.c   |   16 -
 arch/ia64/kernel/relocate_kernel.S |  431 +++++++++++++++++-------------------
 arch/ia64/kernel/setup.c           |   11 
 arch/ia64/kernel/smp.c             |    4 
 include/asm-ia64/kexec.h           |    6 
 include/linux/kexec.h              |    1 
 kernel/irq/manage.c                |    1 
 8 files changed, 273 insertions(+), 275 deletions(-)

1ddb2ba2f841518c40d8eb55837e8c2223c0646b

arch/ia64/kernel/efi.c +39 -39
index 9b96e7d..a01ba73 100644
@@ -1124,8 +1124,8 @@ efi_initialize_iomem_resources(struct re
 			insert_resource(res, code_resource);
 			insert_resource(res, data_resource);
 #ifdef CONFIG_KEXEC
-                        insert_resource(res, &efi_memmap_res);
-                        insert_resource(res, &boot_param_res);
+			insert_resource(res, &efi_memmap_res);
+			insert_resource(res, &boot_param_res);
 			if (crashk_res.end > crashk_res.start)
 				insert_resource(res, &crashk_res);
 #endif
@@ -1135,46 +1135,46 @@ #endif
 
 #ifdef CONFIG_KEXEC
 /* find a block of memory aligned to 64M exclude reserved regions
-   rsvd_regions are sorted
+ * rsvd_regions are sorted
  */
 unsigned long
-kdump_find_rsvd_region (unsigned long size,
-		struct rsvd_region *r, int n)
+kdump_find_rsvd_region(unsigned long size, struct rsvd_region *r, int n)
 {
-  int i;
-  u64 start, end;
-  u64 alignment = 1UL << _PAGE_SIZE_64M;
-  void *efi_map_start, *efi_map_end, *p;
-  efi_memory_desc_t *md;
-  u64 efi_desc_size;
-
-  efi_map_start = __va(ia64_boot_param->efi_memmap);
-  efi_map_end   = efi_map_start + ia64_boot_param->efi_memmap_size;
-  efi_desc_size = ia64_boot_param->efi_memdesc_size;
-
-  for (p = efi_map_start; p < efi_map_end; p += efi_desc_size) {
-	  md = p;
-	  if (!efi_wb(md))
-		  continue;
-	  start = ALIGN(md->phys_addr, alignment);
-	  end = efi_md_end(md);
-	  for (i = 0; i < n; i++) {
-		if (__pa(r[i].start) >= start && __pa(r[i].end) < end) {
-			if (__pa(r[i].start) > start + size)
-				return start;
-			start = ALIGN(__pa(r[i].end), alignment);
-			if (i < n-1 && __pa(r[i+1].start) < start + size)
-				continue;
-			else
-				break;
+	int i;
+	u64 start, end;
+	u64 alignment = 1UL << _PAGE_SIZE_64M;
+	void *efi_map_start, *efi_map_end, *p;
+	efi_memory_desc_t *md;
+	u64 efi_desc_size;
+
+	efi_map_start = __va(ia64_boot_param->efi_memmap);
+	efi_map_end   = efi_map_start + ia64_boot_param->efi_memmap_size;
+	efi_desc_size = ia64_boot_param->efi_memdesc_size;
+
+	for (p = efi_map_start; p < efi_map_end; p += efi_desc_size) {
+		md = p;
+		if (!efi_wb(md))
+			continue;
+		start = ALIGN(md->phys_addr, alignment);
+		end = efi_md_end(md);
+		for (i = 0; i < n; i++) {
+			if (__pa(r[i].start) >= start && __pa(r[i].end) < end) {
+				if (__pa(r[i].start) > start + size)
+					return start;
+				start = ALIGN(__pa(r[i].end), alignment);
+				if (i < n - 1
+				    && __pa(r[i + 1].start) < start + size)
+					continue;
+				else
+					break;
+			}
 		}
-	  }
-	  if (end > start + size)
-		return start;
-  }
-
-  printk(KERN_WARNING "Cannot reserve 0x%lx byte of memory for crashdump\n",
-	size);
-  return ~0UL;
+		if (end > start + size)
+			return start;
+	}
+
+	printk(KERN_WARNING
+	       "Cannot reserve 0x%lx byte of memory for crashdump\n", size);
+	return ~0UL;
 }
 #endif
arch/ia64/kernel/machine_kexec.c +8 -8
index 3673f97..2bbdabe 100644
@@ -25,17 +25,17 @@ typedef void (*relocate_new_kernel_t)(un
 struct kimage *ia64_kimage;
 
 struct resource efi_memmap_res = {
-        .name  = "EFI Memory Map",
-        .start = 0,
-        .end   = 0,
-        .flags = IORESOURCE_BUSY | IORESOURCE_MEM
+	.name  = "EFI Memory Map",
+	.start = 0,
+	.end   = 0,
+	.flags = IORESOURCE_BUSY | IORESOURCE_MEM
 };
 
 struct resource boot_param_res = {
-        .name  = "Boot parameter",
-        .start = 0,
-        .end   = 0,
-        .flags = IORESOURCE_BUSY | IORESOURCE_MEM
+	.name  = "Boot parameter",
+	.start = 0,
+	.end   = 0,
+	.flags = IORESOURCE_BUSY | IORESOURCE_MEM
 };
 
 
arch/ia64/kernel/relocate_kernel.S +215 -216

527 lines not on this page · raw message

arch/ia64/kernel/setup.c +5 -6
index eaf6782..1bdb3b6 100644
@@ -283,11 +283,11 @@ #ifdef CONFIG_KEXEC
 			}
 		}
 		efi_memmap_res.start = ia64_boot_param->efi_memmap;
-                efi_memmap_res.end = efi_memmap_res.start +
-                        ia64_boot_param->efi_memmap_size;
-                boot_param_res.start = __pa(ia64_boot_param);
-                boot_param_res.end = boot_param_res.start +
-                        sizeof(*ia64_boot_param);
+		efi_memmap_res.end = efi_memmap_res.start +
+			ia64_boot_param->efi_memmap_size;
+		boot_param_res.start = __pa(ia64_boot_param);
+		boot_param_res.end = boot_param_res.start +
+			sizeof(*ia64_boot_param);
 	}
 #endif
 	/* end of memory marker */
@@ -301,7 +301,6 @@ #endif
 	sort_regions(rsvd_region, num_rsvd_regions);
 }
 
-
 /**
  * find_initrd - get initrd parameters from the boot parameter structure
  *
arch/ia64/kernel/smp.c +2 -2
index 82cc471..deb47d7 100644
@@ -249,13 +249,13 @@ send_IPI_self (int op)
 
 #ifdef CONFIG_CRASH_DUMP
 void
-kdump_smp_send_stop()
+kdump_smp_send_stop(void)
 {
  	send_IPI_allbutself(IPI_KDUMP_CPU_STOP);
 }
 
 void
-kdump_smp_send_init()
+kdump_smp_send_init(void)
 {
 	unsigned int cpu, self_cpu;
 	self_cpu = smp_processor_id();
include/asm-ia64/kexec.h +3 -3
index f389e2a..7eb8ca2 100644
@@ -21,9 +21,9 @@ #define vmlpt_bits	(impl_va_bits - PAGE_
 #define POW2(n)		(1ULL << (n))
 
 #define kexec_flush_icache_page(page) do { \
-                unsigned long page_addr = (unsigned long)page_address(page); \
-                flush_icache_range(page_addr, page_addr + PAGE_SIZE); \
-        } while(0)
+		unsigned long page_addr = (unsigned long)page_address(page); \
+		flush_icache_range(page_addr, page_addr + PAGE_SIZE); \
+	} while(0)
 
 extern struct kimage *ia64_kimage;
 DECLARE_PER_CPU(u64, ia64_mca_pal_base);
include/linux/kexec.h +0 -1
index 75fbb7e..c790e08 100644
@@ -135,7 +135,6 @@ extern struct resource crashk_res;
 typedef u32 note_buf_t[MAX_NOTE_BYTES/4];
 extern note_buf_t *crash_notes;
 
-
 #else /* !CONFIG_KEXEC */
 struct pt_regs;
 struct task_struct;
kernel/irq/manage.c +1 -0
index a795d6f..92be519 100644
@@ -475,3 +475,4 @@ #endif
 	return retval;
 }
 EXPORT_SYMBOL(request_irq);
+