summaryrefslogtreecommitdiff
path: root/src/cpu/x86
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/x86')
-rw-r--r--src/cpu/x86/lapic/apic_timer.c2
-rw-r--r--src/cpu/x86/lapic/lapic_cpu_init.c14
-rw-r--r--src/cpu/x86/pae/pgtbl.c4
-rw-r--r--src/cpu/x86/tsc/delay_tsc.c2
4 files changed, 11 insertions, 11 deletions
diff --git a/src/cpu/x86/lapic/apic_timer.c b/src/cpu/x86/lapic/apic_timer.c
index 41edde913f..1930ec4539 100644
--- a/src/cpu/x86/lapic/apic_timer.c
+++ b/src/cpu/x86/lapic/apic_timer.c
@@ -116,7 +116,7 @@ void udelay(u32 usecs)
start = lapic_read(LAPIC_TMCCT);
do {
value = lapic_read(LAPIC_TMCCT);
- } while((start - value) < ticks);
+ } while ((start - value) < ticks);
}
#if CONFIG_LAPIC_MONOTONIC_TIMER && !defined(__PRE_RAM__)
diff --git a/src/cpu/x86/lapic/lapic_cpu_init.c b/src/cpu/x86/lapic/lapic_cpu_init.c
index 792ae7a8eb..6e16d9e245 100644
--- a/src/cpu/x86/lapic/lapic_cpu_init.c
+++ b/src/cpu/x86/lapic/lapic_cpu_init.c
@@ -284,7 +284,7 @@ int start_cpu(struct device *cpu)
printk(BIOS_SPEW, "CPU%d: stack_base %p, stack_end %p\n", index,
(void *)stack_base, (void *)stack_end);
/* poison the stack */
- for(stack = (void *)stack_base, i = 0; i < CONFIG_STACK_SIZE; i++)
+ for (stack = (void *)stack_base, i = 0; i < CONFIG_STACK_SIZE; i++)
stack[i/sizeof(*stack)] = 0xDEADBEEF;
stacks[index] = stack;
/* Record the index and which CPU structure we are using */
@@ -307,7 +307,7 @@ int start_cpu(struct device *cpu)
if (result) {
result = 0;
/* Wait 1s or until the new CPU calls in */
- for(count = 0; count < 100000 ; count++) {
+ for (count = 0; count < 100000 ; count++) {
if (secondary_stack == 0) {
result = 1;
break;
@@ -436,7 +436,7 @@ static void start_other_cpus(struct bus *cpu_bus, struct device *bsp_cpu)
struct device *cpu;
/* Loop through the cpus once getting them started */
- for(cpu = cpu_bus->children; cpu ; cpu = cpu->sibling) {
+ for (cpu = cpu_bus->children; cpu ; cpu = cpu->sibling) {
if (cpu->path.type != DEVICE_PATH_APIC) {
continue;
}
@@ -471,7 +471,7 @@ static void smm_other_cpus(struct bus *cpu_bus, device_t bsp_cpu)
/* Loop through the cpus once to let them run through SMM relocator */
- for(cpu = cpu_bus->children; cpu ; cpu = cpu->sibling) {
+ for (cpu = cpu_bus->children; cpu ; cpu = cpu->sibling) {
if (cpu->path.type != DEVICE_PATH_APIC) {
continue;
}
@@ -507,7 +507,7 @@ static void wait_other_cpus_stop(struct bus *cpu_bus)
/* Now loop until the other cpus have finished initializing */
old_active_count = 1;
active_count = atomic_read(&active_cpus);
- while(active_count > 1) {
+ while (active_count > 1) {
if (active_count != old_active_count) {
printk(BIOS_INFO, "Waiting for %d CPUS to stop\n",
active_count - 1);
@@ -517,7 +517,7 @@ static void wait_other_cpus_stop(struct bus *cpu_bus)
active_count = atomic_read(&active_cpus);
loopcount++;
}
- for(cpu = cpu_bus->children; cpu; cpu = cpu->sibling) {
+ for (cpu = cpu_bus->children; cpu; cpu = cpu->sibling) {
if (cpu->path.type != DEVICE_PATH_APIC) {
continue;
}
@@ -531,7 +531,7 @@ static void wait_other_cpus_stop(struct bus *cpu_bus)
}
printk(BIOS_DEBUG, "All AP CPUs stopped (%ld loops)\n", loopcount);
checkstack(_estack, 0);
- for(i = 1; i <= last_cpu_index; i++)
+ for (i = 1; i <= last_cpu_index; i++)
checkstack((void *)stacks[i] + CONFIG_STACK_SIZE, i);
}
diff --git a/src/cpu/x86/pae/pgtbl.c b/src/cpu/x86/pae/pgtbl.c
index 9be415d8de..2dacc10367 100644
--- a/src/cpu/x86/pae/pgtbl.c
+++ b/src/cpu/x86/pae/pgtbl.c
@@ -78,12 +78,12 @@ void *map_2M_page(unsigned long page)
pdp[2].addr_lo = ((uint32_t)&pd[512*2])|1;
pdp[3].addr_lo = ((uint32_t)&pd[512*3])|1;
/* The first half of the page table is identity mapped */
- for(i = 0; i < 1024; i++) {
+ for (i = 0; i < 1024; i++) {
pd[i].addr_lo = ((i & 0x3ff) << 21)| 0xE3;
pd[i].addr_hi = 0;
}
/* The second half of the page table holds the mapped page */
- for(i = 1024; i < 2048; i++) {
+ for (i = 1024; i < 2048; i++) {
pd[i].addr_lo = ((window & 1) << 31) | ((i & 0x3ff) << 21) | 0xE3;
pd[i].addr_hi = (window >> 1);
}
diff --git a/src/cpu/x86/tsc/delay_tsc.c b/src/cpu/x86/tsc/delay_tsc.c
index 6120b88e96..816e07f234 100644
--- a/src/cpu/x86/tsc/delay_tsc.c
+++ b/src/cpu/x86/tsc/delay_tsc.c
@@ -116,7 +116,7 @@ void udelay(unsigned us)
clocks = us;
clocks *= get_clocks_per_usec();
current = rdtscll();
- while((current - start) < clocks) {
+ while ((current - start) < clocks) {
cpu_relax();
current = rdtscll();
}