Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Sep 2012 22:41:38 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r240844 - in head/sys/arm: broadcom/bcm2835 lpc mv tegra ti
Message-ID:  <201209222241.q8MMfcFX057941@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andrew
Date: Sat Sep 22 22:41:38 2012
New Revision: 240844
URL: http://svn.freebsd.org/changeset/base/240844

Log:
  Reduce the diff between the FDT implementations of initarm.
  This only touches whitespace and comments.

Modified:
  head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c
  head/sys/arm/lpc/lpc_machdep.c
  head/sys/arm/mv/mv_machdep.c
  head/sys/arm/tegra/tegra2_machdep.c
  head/sys/arm/ti/ti_machdep.c

Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c
==============================================================================
--- head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c	Sat Sep 22 22:16:07 2012	(r240843)
+++ head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c	Sat Sep 22 22:41:38 2012	(r240844)
@@ -304,6 +304,9 @@ initarm(struct arm_boot_params *abp)
 	memsize = 0;
 	set_cpufuncs();
 
+	/*
+	 * Find the dtb passed in by the boot loader.
+	 */
 	kmdp = preload_search_by_type("elf kernel");
 	if (kmdp != NULL)
 		dtbp = MD_FETCH(kmdp, MODINFOMD_DTBP, vm_offset_t);
@@ -460,9 +463,7 @@ initarm(struct arm_boot_params *abp)
 
 	cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL * 2)) |
 	    DOMAIN_CLIENT);
-
 	pmap_pa = kernel_l1pt.pv_pa;
-
 	setttb(kernel_l1pt.pv_pa);
 	cpu_tlb_flushID();
 	cpu_domains(DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL * 2));
@@ -517,7 +518,6 @@ initarm(struct arm_boot_params *abp)
 	init_proc0(kernelstack.pv_va);
 
 	arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL);
-
 	arm_dump_avail_init(memsize, sizeof(dump_avail) / sizeof(dump_avail[0]));
 	pmap_bootstrap(freemempos, pmap_bootstrap_lastaddr, &kernel_l1pt);
 	msgbufp = (void *)msgbufpv.pv_va;

Modified: head/sys/arm/lpc/lpc_machdep.c
==============================================================================
--- head/sys/arm/lpc/lpc_machdep.c	Sat Sep 22 22:16:07 2012	(r240843)
+++ head/sys/arm/lpc/lpc_machdep.c	Sat Sep 22 22:41:38 2012	(r240844)
@@ -306,7 +306,7 @@ initarm(struct arm_boot_params *abp)
 	set_cpufuncs();
 
 	kmdp = preload_search_by_type("elf kernel");
-	if (kmdp != NULL) 
+	if (kmdp != NULL)
 		dtbp = MD_FETCH(kmdp, MODINFOMD_DTBP, vm_offset_t);
 	else
 		dtbp = (vm_offset_t)NULL;
@@ -318,7 +318,6 @@ initarm(struct arm_boot_params *abp)
 	 */
 	if (dtbp == (vm_offset_t)NULL)
 		dtbp = (vm_offset_t)&fdt_static_dtb;
-
 #endif
 
 	if (OF_install(OFW_FDT, 0) == FALSE)
@@ -427,7 +426,7 @@ initarm(struct arm_boot_params *abp)
 		    &kernel_pt_table[i]);
 
 	pmap_curmaxkvaddr = l2_start + (l2size - 1) * L1_S_SIZE;
-	
+
 	/* Map kernel code and data */
 	pmap_map_chunk(l1pagetable, KERNVIRTADDR, KERNPHYSADDR,
 	   (((uint32_t)(lastaddr) - KERNVIRTADDR) + PAGE_MASK) & ~PAGE_MASK,
@@ -480,7 +479,7 @@ initarm(struct arm_boot_params *abp)
 #endif
 
 	cninit();
-	
+
 	physmem = memsize / PAGE_SIZE;
 
 	debugf("initarm: console initialized\n");
@@ -547,6 +546,7 @@ initarm(struct arm_boot_params *abp)
 	/* Do basic tuning, hz etc */
 	init_param2(physmem);
 	kdb_init();
+
 	return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP -
 	    sizeof(struct pcb)));
 }

Modified: head/sys/arm/mv/mv_machdep.c
==============================================================================
--- head/sys/arm/mv/mv_machdep.c	Sat Sep 22 22:16:07 2012	(r240843)
+++ head/sys/arm/mv/mv_machdep.c	Sat Sep 22 22:41:38 2012	(r240844)
@@ -301,19 +301,18 @@ initarm(struct arm_boot_params *abp)
 	u_int l1pagetable;
 	int i = 0, j = 0, err_devmap = 0;
 
-        lastaddr = parse_boot_param(abp);
+	lastaddr = parse_boot_param(abp);
 	memsize = 0;
 	set_cpufuncs();
 
 	/*
 	 * Find the dtb passed in by the boot loader.
 	 */
-        kmdp = preload_search_by_type("elf kernel");
-        if (kmdp != NULL)
+	kmdp = preload_search_by_type("elf kernel");
+	if (kmdp != NULL)
 		dtbp = MD_FETCH(kmdp, MODINFOMD_DTBP, vm_offset_t);
 	else
 		dtbp = (vm_offset_t)NULL;
-		
 
 #if defined(FDT_DTB_STATIC)
 	/*
@@ -429,7 +428,7 @@ initarm(struct arm_boot_params *abp)
 		    &kernel_pt_table[i]);
 
 	pmap_curmaxkvaddr = l2_start + (l2size - 1) * L1_S_SIZE;
-	
+
 	/* Map kernel code and data */
 	pmap_map_chunk(l1pagetable, KERNVIRTADDR, KERNPHYSADDR,
 	   (((uint32_t)(lastaddr) - KERNVIRTADDR) + PAGE_MASK) & ~PAGE_MASK,
@@ -493,7 +492,7 @@ initarm(struct arm_boot_params *abp)
 
 	if (err_devmap != 0)
 		printf("WARNING: could not fully configure devmap, error=%d\n",
-                    err_devmap);
+		    err_devmap);
 
 	/*
 	 * Re-initialise decode windows
@@ -554,6 +553,7 @@ initarm(struct arm_boot_params *abp)
 	/* Do basic tuning, hz etc */
 	init_param2(physmem);
 	kdb_init();
+
 	return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP -
 	    sizeof(struct pcb)));
 }

Modified: head/sys/arm/tegra/tegra2_machdep.c
==============================================================================
--- head/sys/arm/tegra/tegra2_machdep.c	Sat Sep 22 22:16:07 2012	(r240843)
+++ head/sys/arm/tegra/tegra2_machdep.c	Sat Sep 22 22:41:38 2012	(r240844)
@@ -344,6 +344,9 @@ initarm(struct arm_boot_params *abp)
 	memsize = 0;
 	set_cpufuncs();
 
+	/*
+	 * Find the dtb passed in by the boot loader.
+	 */
 	kmdp = preload_search_by_type("elf kernel");
 	if (kmdp != NULL)
 		dtbp = MD_FETCH(kmdp, MODINFOMD_DTBP, vm_offset_t);
@@ -520,7 +523,7 @@ initarm(struct arm_boot_params *abp)
 
 	if (err_devmap != 0)
 		printf("WARNING: could not fully configure devmap, error=%d\n",
-			err_devmap);
+		    err_devmap);
 
 	/*
 	 * Pages were allocated during the secondary bootstrap for the
@@ -553,8 +556,8 @@ initarm(struct arm_boot_params *abp)
 	undefined_init();
 
 	init_proc0(kernelstack.pv_va);
-	arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL);
 
+	arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL);
 	arm_dump_avail_init(memsize, sizeof(dump_avail) / sizeof(dump_avail[0]));
 	pmap_bootstrap(freemempos, pmap_bootstrap_lastaddr, &kernel_l1pt);
 	msgbufp = (void *)msgbufpv.pv_va;

Modified: head/sys/arm/ti/ti_machdep.c
==============================================================================
--- head/sys/arm/ti/ti_machdep.c	Sat Sep 22 22:16:07 2012	(r240843)
+++ head/sys/arm/ti/ti_machdep.c	Sat Sep 22 22:41:38 2012	(r240844)
@@ -305,13 +305,15 @@ initarm(struct arm_boot_params *abp)
 	memsize = 0;
 	set_cpufuncs();
 
-
+	/*
+	 * Find the dtb passed in by the boot loader.
+	 */
 	kmdp = preload_search_by_type("elf kernel");
 	if (kmdp != NULL)
 		dtbp = MD_FETCH(kmdp, MODINFOMD_DTBP, vm_offset_t);
 	else
 		dtbp = (vm_offset_t)NULL;
- 
+
 #if defined(FDT_DTB_STATIC)
 	/*
 	 * In case the device tree blob was not retrieved (from metadata) try
@@ -423,7 +425,7 @@ initarm(struct arm_boot_params *abp)
 		    &kernel_pt_table[i]);
 
 	pmap_curmaxkvaddr = l2_start + (l2size - 1) * L1_S_SIZE;
-	
+
 	/* Map kernel code and data */
 	pmap_map_chunk(l1pagetable, KERNVIRTADDR, KERNPHYSADDR,
 	   (((uint32_t)(lastaddr) - KERNVIRTADDR) + PAGE_MASK) & ~PAGE_MASK,
@@ -480,7 +482,7 @@ initarm(struct arm_boot_params *abp)
 
 	if (err_devmap != 0)
 		printf("WARNING: could not fully configure devmap, error=%d\n",
-			err_devmap);
+		    err_devmap);
 
 	/*
 	 * Pages were allocated during the secondary bootstrap for the
@@ -513,8 +515,8 @@ initarm(struct arm_boot_params *abp)
 	undefined_init();
 
 	init_proc0(kernelstack.pv_va);
-	arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL);
 
+	arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL);
 	arm_dump_avail_init(memsize, sizeof(dump_avail) / sizeof(dump_avail[0]));
 	pmap_bootstrap(freemempos, pmap_bootstrap_lastaddr, &kernel_l1pt);
 	msgbufp = (void *)msgbufpv.pv_va;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209222241.q8MMfcFX057941>