Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
init.c File Reference
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/log2.h>
#include <asm/mmu_context.h>
#include <asm/processor.h>
#include <asm/uaccess.h>
#include <asm/page.h>
#include <asm/cacheflush.h>
#include <asm/cache.h>
#include <asm/elf.h>
#include <asm/io.h>
#include <asm/smp.h>
#include <asm/sh_bios.h>
#include <asm/setup.h>

Go to the source code of this file.

Macros

#define cpu_has_fpu   0
 
#define cpu_has_dsp   0
 
#define onchip_setup(x)
 
#define speculative_execution_init()   do { } while (0)
 
#define expmask_init()   do { } while (0)
 
#define cache_init()   do { } while (0)
 
#define CSHAPE(totalsize, linesize, assoc)   ((totalsize & ~0xff) | (linesize << 4) | assoc)
 
#define CACHE_DESC_SHAPE(desc)   CSHAPE((desc).way_size * (desc).ways, ilog2((desc).linesz), (desc).ways)
 

Functions

 onchip_setup (fpu)
 
 onchip_setup (dsp)
 
void __attribute__ ((weak))
 
asmlinkage void __cpuinit cpu_init (void)
 

Macro Definition Documentation

#define CACHE_DESC_SHAPE (   desc)    CSHAPE((desc).way_size * (desc).ways, ilog2((desc).linesz), (desc).ways)

Definition at line 202 of file init.c.

#define cache_init (   void)    do { } while (0)

Definition at line 196 of file init.c.

#define cpu_has_dsp   0

Definition at line 38 of file init.c.

#define cpu_has_fpu   0

Definition at line 32 of file init.c.

#define CSHAPE (   totalsize,
  linesize,
  assoc 
)    ((totalsize & ~0xff) | (linesize << 4) | assoc)

Definition at line 199 of file init.c.

#define expmask_init ( )    do { } while (0)

Definition at line 98 of file init.c.

#define onchip_setup (   x)
Value:
static int x##_disabled __cpuinitdata = !cpu_has_##x; \
\
static int __cpuinit x##_setup(char *opts) \
{ \
x##_disabled = 1; \
return 1; \
} \
__setup("no" __stringify(x), x##_setup);

Definition at line 45 of file init.c.

#define speculative_execution_init ( )    do { } while (0)

Definition at line 72 of file init.c.

Function Documentation

void __attribute__ ( (weak)  )
read

Definition at line 102 of file init.c.

asmlinkage void __cpuinit cpu_init ( void  )

cpu_init

This is our initial entry point for each CPU, and is invoked on the boot CPU prior to calling start_kernel(). For SMP, a combination of this and start_secondary() will bring up each processor to a ready state prior to hand forking the idle loop.

We do all of the basic processor init here, including setting up the caches, FPU, DSP, etc. By the time start_kernel() is hit (and subsequently platform_setup()) things like determining the CPU subtype and initial configuration will all be done.

Each processor family is still responsible for doing its own probing and cache configuration in cpu_probe().

Definition at line 298 of file init.c.

onchip_setup ( fpu  )
onchip_setup ( dsp  )