diff options
Diffstat (limited to 'arch/x86/machine')
-rw-r--r-- | arch/x86/machine/cga.c | 4 | ||||
-rw-r--r-- | arch/x86/machine/cpu.c | 6 | ||||
-rw-r--r-- | arch/x86/machine/lapic.c | 6 | ||||
-rw-r--r-- | arch/x86/machine/pmap.c | 8 | ||||
-rw-r--r-- | arch/x86/machine/strace.c | 9 | ||||
-rw-r--r-- | arch/x86/machine/trap.c | 5 |
6 files changed, 20 insertions, 18 deletions
diff --git a/arch/x86/machine/cga.c b/arch/x86/machine/cga.c index 4dac1af2..72fec7f9 100644 --- a/arch/x86/machine/cga.c +++ b/arch/x86/machine/cga.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2012 Richard Braun. + * Copyright (c) 2010-2014 Richard Braun. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -66,7 +66,7 @@ */ #define CGA_TABULATION_SPACES 8 -static uint8_t *cga_memory; +static uint8_t *cga_memory __read_mostly; static uint16_t cga_cursor; static uint16_t diff --git a/arch/x86/machine/cpu.c b/arch/x86/machine/cpu.c index 4767789a..5cdd85ff 100644 --- a/arch/x86/machine/cpu.c +++ b/arch/x86/machine/cpu.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2011, 2012, 2013 Richard Braun. + * Copyright (c) 2010-2014 Richard Braun. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -77,7 +77,7 @@ static struct cpu cpu_array[MAX_CPUS]; * processors are present. */ static unsigned int cpu_boot_array_size __initdata; -unsigned int cpu_array_size; +unsigned int cpu_array_size __read_mostly; /* * Barrier for processor synchronization on kernel entry. @@ -87,7 +87,7 @@ static unsigned int cpu_mp_synced __initdata; /* * Interrupt descriptor table. */ -static struct cpu_gate_desc cpu_idt[CPU_IDT_SIZE] __aligned(8); +static struct cpu_gate_desc cpu_idt[CPU_IDT_SIZE] __aligned(8) __read_mostly; /* * Double fault handler, and stack for the main processor. diff --git a/arch/x86/machine/lapic.c b/arch/x86/machine/lapic.c index 10d6b40e..2e879a9c 100644 --- a/arch/x86/machine/lapic.c +++ b/arch/x86/machine/lapic.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012 Richard Braun. + * Copyright (c) 2011-2014 Richard Braun. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -181,12 +181,12 @@ struct lapic_map { /* * Address where local APIC registers are mapped. */ -static volatile struct lapic_map *lapic_map; +static volatile struct lapic_map *lapic_map __read_mostly; /* * Base frequency of the local APIC timer. */ -static uint32_t lapic_bus_freq; +static uint32_t lapic_bus_freq __read_mostly; static uint32_t lapic_read(const volatile struct lapic_register *r) diff --git a/arch/x86/machine/pmap.c b/arch/x86/machine/pmap.c index 1790b00e..843db7e2 100644 --- a/arch/x86/machine/pmap.c +++ b/arch/x86/machine/pmap.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2012, 2013 Richard Braun. + * Copyright (c) 2010-2014 Richard Braun. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -71,7 +71,7 @@ struct pmap_pt_level { /* * Table of page translation properties. */ -static struct pmap_pt_level pmap_pt_levels[] = { +static struct pmap_pt_level pmap_pt_levels[] __read_mostly = { { PMAP_L0_BITS, PMAP_L0_SHIFT, PMAP_L0_PTEMAP_BASE, PMAP_L0_PTES_PER_PTP, PMAP_L0_MASK }, { PMAP_L1_BITS, PMAP_L1_SHIFT, PMAP_L1_PTEMAP_BASE, PMAP_L1_PTES_PER_PTP, @@ -111,7 +111,7 @@ static struct pmap_tmp_mapping pmap_zero_mappings[MAX_CPUS]; static struct pmap_tmp_mapping pmap_root_ptp_mappings[MAX_CPUS]; static struct pmap kernel_pmap_store; -struct pmap *kernel_pmap = &kernel_pmap_store; +struct pmap *kernel_pmap __read_mostly = &kernel_pmap_store; /* * Reserved pages of virtual memory available for early allocation. @@ -140,7 +140,7 @@ static pmap_pte_t pmap_kpdpt[PMAP_NR_RPTPS] __aligned(PMAP_PDPT_ALIGN); * Table used to convert machine independent protection flags to architecture * specific PTE bits. */ -static pmap_pte_t pmap_prot_table[VM_PROT_ALL + 1]; +static pmap_pte_t pmap_prot_table[VM_PROT_ALL + 1] __read_mostly; /* * Maximum number of mappings for which individual TLB invalidations can be diff --git a/arch/x86/machine/strace.c b/arch/x86/machine/strace.c index 63550201..a3a8f1f2 100644 --- a/arch/x86/machine/strace.c +++ b/arch/x86/machine/strace.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013 Richard Braun. + * Copyright (c) 2012-2014 Richard Braun. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,6 +17,7 @@ #include <kern/init.h> #include <kern/kmem.h> +#include <kern/param.h> #include <kern/printk.h> #include <kern/stddef.h> #include <kern/string.h> @@ -33,9 +34,9 @@ #define STRACE_ADDR_FORMAT "%#010lx" #endif /* __LP64__ */ -static struct elf_sym *strace_symtab; -static struct elf_sym *strace_symtab_end; -static char *strace_strtab; +static struct elf_sym *strace_symtab __read_mostly; +static struct elf_sym *strace_symtab_end __read_mostly; +static char *strace_strtab __read_mostly; static const char * strace_lookup(unsigned long addr, unsigned long *offset, unsigned long *size) diff --git a/arch/x86/machine/trap.c b/arch/x86/machine/trap.c index 36585c25..78a62d87 100644 --- a/arch/x86/machine/trap.c +++ b/arch/x86/machine/trap.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013 Richard Braun. + * Copyright (c) 2012-2014 Richard Braun. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,6 +23,7 @@ #include <kern/init.h> #include <kern/macros.h> #include <kern/panic.h> +#include <kern/param.h> #include <kern/printk.h> #include <kern/thread.h> #include <machine/cpu.h> @@ -88,7 +89,7 @@ void trap_isr_lapic_spurious(void); * * The additional entry is the default entry used for unhandled traps. */ -static struct trap_handler trap_handlers[CPU_IDT_SIZE + 1]; +static struct trap_handler trap_handlers[CPU_IDT_SIZE + 1] __read_mostly; static void __init trap_handler_init(struct trap_handler *handler, int flags, trap_handler_fn_t fn) |