def_bool y
select ARCH_32BIT_OFF_T
select ARCH_NO_SWAP
- select ARCH_HAS_BINFMT_FLAT if !MMU
select ARCH_HAS_DMA_PREP_COHERENT
select ARCH_HAS_GCOV_PROFILE_ALL
select ARCH_HAS_SYNC_DMA_FOR_CPU
select ARCH_HAS_SYNC_DMA_FOR_DEVICE
- select ARCH_HAS_DMA_SET_UNCACHED if !MMU
select ARCH_MIGHT_HAVE_PC_PARPORT
select ARCH_WANT_IPC_PARSE_VERSION
select BUILDTIME_TABLE_SORT
select TIMER_OF
select CLONE_BACKWARDS3
select COMMON_CLK
- select DMA_DIRECT_REMAP if MMU
+ select DMA_DIRECT_REMAP
select GENERIC_ATOMIC64
- select GENERIC_CLOCKEVENTS
select GENERIC_CPU_DEVICES
select GENERIC_IDLE_POLL_SETUP
select GENERIC_IRQ_PROBE
select TRACING_SUPPORT
select VIRT_TO_BUS
select CPU_NO_EFFICIENT_FFS
- select MMU_GATHER_NO_RANGE if MMU
+ select MMU_GATHER_NO_RANGE
select SPARSE_IRQ
select SET_FS
source "kernel/Kconfig.hz"
config MMU
- bool "MMU support"
- default n
+ def_bool y
comment "Boot options"
comment "Default settings for advanced configuration options are used"
depends on !ADVANCED_OPTIONS
- config XILINX_UNCACHED_SHADOW
- bool "Are you using uncached shadow for RAM ?"
- depends on ADVANCED_OPTIONS && !MMU
- default n
- help
- This is needed to be able to allocate uncachable memory regions.
- The feature requires the design to define the RAM memory controller
- window to be twice as large as the actual physical memory.
-
config HIGHMEM
bool "High memory support"
- depends on MMU
+ select KMAP_LOCAL
help
The address space of Microblaze processors is only 4 Gigabytes large
and it has to accommodate user address space, kernel address
config LOWMEM_SIZE_BOOL
bool "Set maximum low memory"
- depends on ADVANCED_OPTIONS && MMU
+ depends on ADVANCED_OPTIONS
help
This option allows you to set the maximum amount of memory which
will be used as "low memory", that is, memory which the kernel can
config KERNEL_START
hex "Virtual address of kernel base" if KERNEL_START_BOOL
- default "0xc0000000" if MMU
- default KERNEL_BASE_ADDR if !MMU
+ default "0xc0000000"
config TASK_SIZE_BOOL
bool "Set custom user task size"
- depends on ADVANCED_OPTIONS && MMU
+ depends on ADVANCED_OPTIONS
help
This option allows you to set the amount of virtual address space
allocated to user tasks. This can be useful in optimizing the
hex "Size of user task space" if TASK_SIZE_BOOL
default "0x80000000"
- choice
- prompt "Page size"
- default MICROBLAZE_4K_PAGES
- depends on ADVANCED_OPTIONS && !MMU
- help
- Select the kernel logical page size. Increasing the page size
- will reduce software overhead at each page boundary, allow
- hardware prefetch mechanisms to be more effective, and allow
- larger dma transfers increasing IO efficiency and reducing
- overhead. However the utilization of memory will increase.
- For example, each cached file will using a multiple of the
- page size to hold its contents and the difference between the
- end of file and the end of page is wasted.
-
- If unsure, choose 4K_PAGES.
-
- config MICROBLAZE_4K_PAGES
- bool "4k page size"
-
- config MICROBLAZE_16K_PAGES
- bool "16k page size"
-
- config MICROBLAZE_64K_PAGES
- bool "64k page size"
-
- endchoice
-
endmenu
menu "Bus Options"
# endif /* __ASSEMBLY__ */
- # ifndef CONFIG_MMU
- /*
- * User space process size: memory size
- *
- * TASK_SIZE on MMU cpu is usually 1GB. However, on no-MMU arch, both
- * user processes and the kernel is on the same memory region. They
- * both share the memory space and that is limited by the amount of
- * physical memory. thus, we set TASK_SIZE == amount of total memory.
- */
- # define TASK_SIZE (0x81000000 - 0x80000000)
-
- /*
- * This decides where the kernel will search for a free chunk of vm
- * space during mmap's. We won't be using it
- */
- # define TASK_UNMAPPED_BASE 0
-
- /* definition in include/linux/sched.h */
- struct task_struct;
-
- /* thread_struct is gone. use thread_info instead. */
- struct thread_struct { };
- # define INIT_THREAD { }
-
- /* Free all resources held by a thread. */
- static inline void release_thread(struct task_struct *dead_task)
- {
- }
-
- extern unsigned long get_wchan(struct task_struct *p);
-
- # define KSTK_EIP(tsk) (0)
- # define KSTK_ESP(tsk) (0)
-
- # else /* CONFIG_MMU */
-
/*
* This is used to define STACK_TOP, and with MMU it must be below
* kernel base to select the correct PGD when handling MMU exceptions.
# define KSTK_EIP(task) (task_pc(task))
# define KSTK_ESP(task) (task_sp(task))
-/* FIXME */
-# define deactivate_mm(tsk, mm) do { } while (0)
-
# define STACK_TOP TASK_SIZE
# define STACK_TOP_MAX STACK_TOP
#endif
# endif /* __ASSEMBLY__ */
- # endif /* CONFIG_MMU */
#endif /* _ASM_MICROBLAZE_PROCESSOR_H */
ti->cpu_context.r19 = (unsigned long)arg;
childregs->pt_mode = 1;
local_save_flags(childregs->msr);
- #ifdef CONFIG_MMU
ti->cpu_context.msr = childregs->msr & ~MSR_IE;
- #endif
ti->cpu_context.r15 = (unsigned long)ret_from_kernel_thread - 8;
return 0;
}
memset(&ti->cpu_context, 0, sizeof(struct cpu_context));
ti->cpu_context.r1 = (unsigned long)childregs;
- #ifndef CONFIG_MMU
- ti->cpu_context.msr = (unsigned long)childregs->msr;
- #else
childregs->msr |= MSR_UMS;
/* we should consider the fact that childregs is a copy of the parent
ti->cpu_context.msr = (childregs->msr|MSR_VM);
ti->cpu_context.msr &= ~MSR_UMS; /* switch_to to kernel mode */
ti->cpu_context.msr &= ~MSR_IE;
- #endif
ti->cpu_context.r15 = (unsigned long)ret_from_fork - 8;
/*
regs->pc = pc;
regs->r1 = usp;
regs->pt_mode = 0;
- #ifdef CONFIG_MMU
regs->msr |= MSR_UMS;
regs->msr &= ~MSR_VM;
- #endif
}
- #ifdef CONFIG_MMU
#include <linux/elfcore.h>
/*
* Set up a thread for executing a new program
{
return 0; /* MicroBlaze has no separate FPU registers */
}
- #endif /* CONFIG_MMU */
void arch_cpu_idle(void)
{
- local_irq_enable();
+ raw_local_irq_enable();
}
# Makefile
#
--obj-y := consistent.o init.o
--
- obj-$(CONFIG_MMU) += pgtable.o mmu_context.o fault.o
-obj-y += pgtable.o mmu_context.o fault.o
-obj-$(CONFIG_HIGHMEM) += highmem.o
++obj-y := consistent.o init.o pgtable.o mmu_context.o fault.o
/* Use for MMU and noMMU because of PCI generic code */
int mem_init_done;
- #ifndef CONFIG_MMU
- unsigned int __page_offset;
- EXPORT_SYMBOL(__page_offset);
- #endif /* CONFIG_MMU */
-
char *klimit = _end;
/*
EXPORT_SYMBOL(max_low_pfn);
#ifdef CONFIG_HIGHMEM
-pte_t *kmap_pte;
-EXPORT_SYMBOL(kmap_pte);
-
static void __init highmem_init(void)
{
pr_debug("%x\n", (u32)PKMAP_BASE);
map_page(PKMAP_BASE, 0, 0); /* XXX gross */
pkmap_page_table = virt_to_kpte(PKMAP_BASE);
-
- kmap_pte = virt_to_kpte(__fix_to_virt(FIX_KMAP_BEGIN));
}
static void highmem_setup(void)
static void __init paging_init(void)
{
unsigned long zones_size[MAX_NR_ZONES];
- #ifdef CONFIG_MMU
int idx;
/* Setup fixmaps */
for (idx = 0; idx < __end_of_fixed_addresses; idx++)
clear_fixmap(idx);
- #endif
/* Clean every zones */
memset(zones_size, 0, sizeof(zones_size));
void __init setup_memory(void)
{
- #ifndef CONFIG_MMU
- u32 kernel_align_start, kernel_align_size;
- phys_addr_t start, end;
- u64 i;
-
- /* Find main memory where is the kernel */
- for_each_mem_range(i, &start, &end) {
- memory_start = start;
- lowmem_size = end - start;
- if ((memory_start <= (u32)_text) &&
- ((u32)_text <= (memory_start + lowmem_size - 1))) {
- memory_size = lowmem_size;
- PAGE_OFFSET = memory_start;
- pr_info("%s: Main mem: 0x%x, size 0x%08x\n",
- __func__, (u32) memory_start,
- (u32) memory_size);
- break;
- }
- }
-
- if (!memory_start || !memory_size) {
- panic("%s: Missing memory setting 0x%08x, size=0x%08x\n",
- __func__, (u32) memory_start, (u32) memory_size);
- }
-
- /* reservation of region where is the kernel */
- kernel_align_start = PAGE_DOWN((u32)_text);
- /* ALIGN can be remove because _end in vmlinux.lds.S is align */
- kernel_align_size = PAGE_UP((u32)klimit) - kernel_align_start;
- pr_info("%s: kernel addr:0x%08x-0x%08x size=0x%08x\n",
- __func__, kernel_align_start, kernel_align_start
- + kernel_align_size, kernel_align_size);
- memblock_reserve(kernel_align_start, kernel_align_size);
- #endif
/*
* Kernel:
* start: base phys address of kernel - page align
mem_init_done = 1;
}
- #ifndef CONFIG_MMU
- int page_is_ram(unsigned long pfn)
- {
- return __range_ok(pfn, 0);
- }
- #else
int page_is_ram(unsigned long pfn)
{
return pfn < max_low_pfn;
NUMA_NO_NODE);
}
- #endif /* CONFIG_MMU */
-
void * __ref zalloc_maybe_bootmem(size_t size, gfp_t mask)
{
void *p;