Changeset 7e7c8747 in mainline for kernel/arch/sparc64/src/cpu/cpu.c


Ignore:
Timestamp:
2006-12-17T12:11:00Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
95155b0c
Parents:
771cd22
Message:

More formatting and indentation changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/cpu/cpu.c

    r771cd22 r7e7c8747  
    4545#include <macros.h>
    4646
    47 /** Perform sparc64 specific initialization of the processor structure for the current processor. */
     47/** Perform sparc64 specific initialization of the processor structure for the
     48 * current processor.
     49 */
    4850void cpu_arch_init(void)
    4951{
     
    6769                        mid = *((uint32_t *) prop->value);
    6870                        if (mid == CPU->arch.mid) {
    69                                 prop = ofw_tree_getprop(node, "clock-frequency");
     71                                prop = ofw_tree_getprop(node,
     72                                        "clock-frequency");
    7073                                if (prop && prop->value)
    71                                         clock_frequency = *((uint32_t *) prop->value);
     74                                        clock_frequency = *((uint32_t *)
     75                                                prop->value);
    7276                        }
    7377                }
     
    8185         * Lock CPU stack in DTLB.
    8286         */
    83         uintptr_t base = ALIGN_DOWN(config.base, 1<<KERNEL_PAGE_WIDTH);
     87        uintptr_t base = ALIGN_DOWN(config.base, 1 << KERNEL_PAGE_WIDTH);
    8488                 
    85         if (!overlaps((uintptr_t) CPU->stack, PAGE_SIZE, base, (1<<KERNEL_PAGE_WIDTH))) {
     89        if (!overlaps((uintptr_t) CPU->stack, PAGE_SIZE, base, (1 <<
     90                KERNEL_PAGE_WIDTH))) {
    8691                /*
    8792                 * Kernel stack of this processor is not locked in DTLB.
     
    8994                 * Second, create a locked mapping for it.
    9095                 */
    91                 dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_NUCLEUS, (uintptr_t) CPU->stack);
    92                 dtlb_insert_mapping((uintptr_t) CPU->stack, KA2PA(CPU->stack), PAGESIZE_8K, true, true);
     96                dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_NUCLEUS, (uintptr_t)
     97                        CPU->stack);
     98                dtlb_insert_mapping((uintptr_t) CPU->stack, KA2PA(CPU->stack),
     99                        PAGESIZE_8K, true, true);
    93100        }
    94101}
     
    104111 * This function is called by the bootstrap processor.
    105112 *
    106  * @param m Processor structure of the CPU for which version information is to be printed.
     113 * @param m Processor structure of the CPU for which version information is to
     114 *      be printed.
    107115 */
    108116void cpu_print_report(cpu_t *m)
     
    152160        }
    153161
    154         printf("cpu%d: manuf=%s, impl=%s, mask=%d (%dMHz)\n",
    155                 m->id, manuf, impl, m->arch.ver.mask, m->arch.clock_frequency/1000000);
     162        printf("cpu%d: manuf=%s, impl=%s, mask=%d (%dMHz)\n", m->id, manuf,
     163                impl, m->arch.ver.mask, m->arch.clock_frequency / 1000000);
    156164}
    157165
Note: See TracChangeset for help on using the changeset viewer.