aboutsummaryrefslogtreecommitdiff
path: root/arch/microblaze/kernel
AgeCommit message (Collapse)AuthorFilesLines
2010-04-01microblaze: Print early printk information to log bufferMichal Simek1-9/+15
If early printk console is not enabled then all messages are written to log buffer. Signed-off-by: Michal Simek <[email protected]>
2010-04-01microblaze: head.S typo fixMichal Simek1-2/+2
I forget to change register name in comments. Signed-off-by: Michal Simek <[email protected]>
2010-04-01microblaze: Use MICROBLAZE_TLB_SIZE in asm codeMichal Simek2-3/+3
TLB size was hardcoded in asm code. This patch brings ability to change TLB size only in one place. (mmu.h). Signed-off-by: Michal Simek <[email protected]>
2010-04-01microblaze: Adding likely macrosMichal Simek2-5/+6
On the base on GCOV analytics is helpful to add likely/unlikely macros. Signed-off-by: Michal Simek <[email protected]>
2010-04-01microblaze: Add .type and .size to ASM functionsMichal Simek1-0/+11
Cachegrind analysis need this fix to be able to log asm functions. Signed-off-by: Michal Simek <[email protected]>
2010-04-01microblaze: Use instruction with delay slotMichal Simek1-8/+5
Sync labels. Signed-off-by: Michal Simek <[email protected]>
2010-04-01microblaze: Remove additional resr and rear loadingMichal Simek1-15/+3
RESR and REAR uses the same regs in whole file. Signed-off-by: Michal Simek <[email protected]>
2010-04-01microblaze: Change register usage for ESR and EARMichal Simek1-35/+35
This change synchronize register usage in code. ESR = R4 EAR = R3 Signed-off-by: Michal Simek <[email protected]>
2010-04-01microblaze: Prepare work for optimization in exception codeMichal Simek1-6/+3
Any sync branch must follow mts instructions not mfs. Signed-off-by: Michal Simek <[email protected]>
2010-04-01microblaze: Add DEBUG optionMichal Simek1-0/+2
Disable debug option in asm code. Signed-off-by: Michal Simek <[email protected]>
2010-04-01microblaze: Support systems without lmb bramMichal Simek1-0/+6
When the system has no lmb bram, main memory should be start from zero because of microblaze vectors. DTS fragment could look like: DDR2_SDRAM: memory@0 { device_type = "memory"; reg = < 0x0 0x10000000 >; } ; Then you have to setup CONFIG_KERNEL_BASE_ADDR=0 which caused that kernel physical start address will be zero. On reset vector place will be jump to 0x100 and on 0x100 starts kernel text. You have to solve how to load the kernel before cpu starts. Tested with XMD. Signed-off-by: Michal Simek <[email protected]>
2010-04-01microblaze: Remove segment.hMichal Simek1-0/+1
I would like to use asm-generic uaccess.h where are segment macros defined. This is just first step. Signed-off-by: Michal Simek <[email protected]>
2010-04-01microblaze: Fix "kstack=" parsingSteven J. Magnani1-4/+2
The "kstack=" command line parameter is not parsed correctly. All proper values are interpreted as zero. Signed-off-by: Steven J. Magnani <[email protected]> Signed-off-by: Michal Simek <[email protected]>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo5-3/+2
implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <[email protected]> Guess-its-ok-by: Christoph Lameter <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Lee Schermerhorn <[email protected]>
2010-03-18Merge branch 'for-linus' of git://git.monstr.eu/linux-2.6-microblazeLinus Torvalds8-116/+443
* 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze: (27 commits) microblaze: entry.S use delay slot for return handlers microblaze: Save current task directly microblaze: Simplify entry.S - save/restore r3/r4 - ret_from_trap microblaze: PCI early support for noMMU system microblaze: Fix dma alloc and free coherent dma functions microblaze: Add consistent code microblaze: pgtable.h: move consistent functions microblaze: Remove ancient Kconfig option for consistent mapping microblaze: Remove VMALLOC_VMADDR microblaze: Add define for ASM_LOOP microblaze: Preliminary support for dma drivers microblaze: remove trailing space in messages microblaze: Use generic show_mem() microblaze: Change temp register for cmdline microblaze: Preliminary support for dma drivers microblaze: Move cache function to cache.c microblaze: Add support from PREEMPT microblaze: Add support for Xilinx PCI host bridge microblaze: Enable PCI, missing files microblaze: Add core PCI files ...
2010-03-12microblaze: use generic ptrace_resume codeChristoph Hellwig1-37/+0
Use the generic ptrace_resume code for PTRACE_SYSCALL, PTRACE_CONT and PTRACE_KILL. This also makes PTRACE_SINGLESTEP return -EIO while it previously succeeded despite not actually causing any kind of single stepping. Also the TIF_SYSCALL_TRACE thread flag is now cleared on PTRACE_KILL which it previously wasn't which is consistent with all architectures using the modern ptrace code. Signed-off-by: Christoph Hellwig <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: Roland McGrath <[email protected]> Acked-by: Michal Simek <[email protected]> Cc: John Williams <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-03-12ptrace: use ptrace_request() in the remaining architecturesChristoph Hellwig1-26/+1
Use ptrace_request() in the three remaining architectures that didn't use it (m68knommu, h8300, microblaze). This means: - ptrace_request now handles PTRACE_{PEEK,POKE}{TEXT,DATA} and PTRACE_DETATCH calls that were previously called directly, or in case of h8300 even open coded. - adds new support for PTRACE_SETOPTIONS/PTRACE_GETEVENTMSG/ PTRACE_GETSIGINFO/PTRACE_SETSIGINFO Signed-off-by: Christoph Hellwig <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Yoshinori Sato <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: Michal Simek <[email protected]> Acked-by: Greg Ungerer <[email protected]> Acked-by: Roland McGrath <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-03-11microblaze: entry.S use delay slot for return handlersMichal Simek1-6/+3
Signed-off-by: Michal Simek <[email protected]>
2010-03-11microblaze: Save current task directlyMichal Simek1-8/+4
Signed-off-by: Michal Simek <[email protected]>
2010-03-11microblaze: Simplify entry.S - save/restore r3/r4 - ret_from_trapMichal Simek1-48/+30
There is possible to save r3/r4 at the beggining of user part before calling handlers and at the end restore it. Signed-off-by: Michal Simek <[email protected]>
2010-03-11microblaze: Fix dma alloc and free coherent dma functionsMichal Simek1-4/+13
We have to use consistent code to be able to do coherent dma function. In consistent code is used cache inhibit page mapping. Xilinx reported that there is bug in Microblaze for WB and d-cache_always use option. Microblaze 7.30.a should be first version where is this bug removed. Signed-off-by: Michal Simek <[email protected]>
2010-03-11microblaze: Add define for ASM_LOOPMichal Simek1-43/+161
It is default option but both options must be measured. Signed-off-by: Michal Simek <[email protected]>
2010-03-11microblaze: Preliminary support for dma driversMichal Simek1-6/+3
I found several problems for ll_temac driver and on system with WB. This early fix should fix it. I will clean this patch before I will add it to mainline Signed-off-by: Michal Simek <[email protected]>
2010-03-11microblaze: remove trailing space in messagesFrans Pop1-1/+1
Signed-off-by: Frans Pop <[email protected]> Cc: [email protected] Cc: Michal Simek <[email protected]> Signed-off-by: Michal Simek <[email protected]>
2010-03-11microblaze: Change temp register for cmdlineMichal Simek1-6/+7
For copy was used r7 register when CONFIG_CMDLINE_BOOL option is enabled. But r7 stores pointer to fdt that's why machine_early_init not detect compiled-in DTB. I also moved kernel PID setup to have TLB init in one block Signed-off-by: Michal Simek <[email protected]>
2010-03-11microblaze: Preliminary support for dma driversMichal Simek1-6/+12
I found several problems for ll_temac driver and on system with WB. This early fix should fix it. I will clean this patch before I will add it to mainline Signed-off-by: Michal Simek <[email protected]>
2010-03-11microblaze: Move cache function to cache.cMichal Simek2-6/+5
It is better to have init cache handling on one place. Signed-off-by: Michal Simek <[email protected]>
2010-03-11microblaze: Add support from PREEMPTMichal Simek2-1/+25
This patch add core PREEMPT support for Microblaze. I tried to trace it via tracers and I was able to see any output. I also added low level debug functions to see if that code is called. Signed-off-by: Michal Simek <[email protected]>
2010-03-11microblaze: Add support for Xilinx PCI host bridgeMichal Simek1-0/+3
This patch is based on powerpc patch 64f16502475ddf663169369fffff6da9b10ea9fb We did some cleanups and removed powerpc parts. There is one new debug early listing function too. Exclude function is only in Debug options. We tested in on custom board. Signed-off-by: Michal Simek <[email protected]>
2010-03-11microblaze: Add irq_create_{of_,}mapping functionsMichal Simek1-0/+15
Support function for PCI. We don't use any advance mapping mechanism that's why implementation is simple. Signed-off-by: Michal Simek <[email protected]>
2010-03-11microblaze: Implement __dma_sync_pageMichal Simek1-3/+23
There is necessary to do some cache handling for dma operations. Signed-off-by: Michal Simek <[email protected]>
2010-03-11microblaze: Support DMAMichal Simek3-1/+161
Add DMA support for Microblaze. There are some part of this new feature: 1. Basic DMA support 2. Enable DMA debug option 3. Setup notifier Ad 1. dma-mapping come from powerpc and x86 version and it is based on generic dma-mapping-common.h Ad 2. DMA support debug features which is used in generic file. For more information please look at Documentation/DMA-API.txt Ad 3. notifier is very important to setup dma_ops. Without this part for example ll_temac driver failed because there are no setup dma operations. Signed-off-by: Michal Simek <[email protected]>
2010-02-25Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds2-978/+14
* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6: (41 commits) of: remove undefined request_OF_resource & release_OF_resource of/sparc: Remove sparc-local declaration of allnodes and devtree_lock of: move definition of of_chosen into common code. of: remove unused extern reference to devtree_lock of: put default string compare and #a/s-cell values into common header of/flattree: Don't assume HAVE_LMB of: protect linux/of.h with CONFIG_OF proc_devtree: fix THIS_MODULE without module.h of: Remove old and misplaced function declarations of/flattree: Make the kernel accept ePAPR style phandle information of/flattree: endian-convert members of boot_param_header of: assume big-endian properties, adding conversions where necessary of: use __be32 for cell value accessors of/flattree: use OF_ROOT_NODE_{SIZE,ADDR}_CELLS DEFAULT for fdt parsing of/flattree: use callback to setup initrd from /chosen proc_devtree: include linux/of.h of: make set_node_proc_entry private to proc_devtree.c of: include linux/proc_fs.h of/flattree: merge early_init_dt_scan_memory() common code of: add 'of_' prefix to machine_is_compatible() ...
2010-02-24microblaze: Fix cache loop function for cache rangeMichal Simek1-19/+8
I create wrong asm code but none test shows that this part of code is wrong. I am not convinces that were good idea to create asm optimized macros for caches. The reason is that there is not optimization with previous code that's why make sense to add old code and do some benchmarking which functions are faster. Signed-off-by: Michal Simek <[email protected]>
2010-02-14of: move definition of of_chosen into common code.Grant Likely1-3/+0
Rather than defining of_chosen in each arch, it can be defined for all in driver/of/base.c Signed-off-by: Grant Likely <[email protected]> Acked-by: Benjamin Herrenschmidt <[email protected]> Acked-by: Michal Simek <[email protected]>
2010-02-14of/flattree: Don't assume HAVE_LMBJeremy Kerr1-0/+5
We don't always have lmb available, so make arches provide an early_init_dt_alloc_memory_arch() to handle the allocation of memory in the fdt code. When we don't have lmb.h included, we need asm/page.h for __va. Signed-off-by: Jeremy Kerr <[email protected]> Signed-off-by: Grant Likely <[email protected]> Acked-by: Benjamin Herrenschmidt <[email protected]> Acked-by: Michal Simek <[email protected]>
2010-02-09of/flattree: use callback to setup initrd from /chosenJeremy Kerr1-0/+10
At present, the fdt code sets the kernel-wide initrd_start and initrd_end variables when parsing /chosen. On ARM, we only set these once the bootmem has been reserved. This change adds an arch hook to setup the initrd from the device tree: void early_init_dt_setup_initrd_arch(unsigned long start, unsigned long end); The arch-specific code can then setup the initrd however it likes. Compiled on powerpc, with CONFIG_BLK_DEV_INITRD=y and =n. Signed-off-by: Jeremy Kerr <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2010-02-09of/flattree: merge early_init_dt_scan_memory() common codeGrant Likely1-49/+2
Merge common code between PowerPC and Microblaze architectures. Signed-off-by: Grant Likely <[email protected]> Acked-by: Michal Simek <[email protected]>
2010-02-09of: merge of_find_node_by_phandleJeremy Kerr1-21/+0
Merge common function between powerpc, sparc and microblaze. Code is identical for powerpc and microblaze, but adds a lock (and release) of the devtree_lock on sparc. Signed-off-by: Jeremy Kerr <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2010-02-09of: merge of_attach_node() & of_detach_node()Grant Likely1-59/+0
Merge common code between PowerPC and Microblaze Signed-off-by: Grant Likely <[email protected]> Tested-by: Wolfram Sang <[email protected]> Acked-by: Benjamin Herrenschmidt <[email protected]>
2010-02-09microblaze: remove early_init_dt_scan_cpus() and phyp_dump_*()Grant Likely1-153/+0
Microblaze only has one CPU, it isn't SMP at all. early_init_dt_scan_cpus() is effectively just a no-op, so remove it. Microblaze doesn't support hypervisor assisted dump either, so the phyp stuff can also go. Signed-off-by: Grant Likely <[email protected]> Acked-by: Michal Simek <[email protected]>
2010-02-08microblaze: Invalidate dcache before enabling itMichal Simek1-0/+1
We found that on write-trough kernel is necessary to do that invalidation. One WB is possible to use invalidation too. Signed-off-by: Michal Simek <[email protected]>
2010-02-03microblaze: fix interrupt state restoreSteven J. Magnani1-4/+6
Interrupts must be disabled while an interrupt state restore (prep for interrupt return) is in progress. Code to do this was lost in the port to the mainline kernel. Signed-off-by: Steven J. Magnani <[email protected]> Signed-off-by: Michal Simek <[email protected]>
2010-01-28Merge commit 'v2.6.33-rc5' into secretlab/test-devicetreeGrant Likely26-309/+1247
2010-01-28of: unify phandle name in struct device_nodeGrant Likely2-2/+2
In struct device_node, the phandle is named 'linux_phandle' for PowerPC and MicroBlaze, and 'node' for SPARC. There is no good reason for the difference, it is just an artifact of the code diverging over a couple of years. This patch renames both to simply .phandle. Note: the .node also existed in PowerPC/MicroBlaze, but the only user seems to be arch/powerpc/platforms/powermac/pfunc_core.c. It doesn't look like the assignment between .linux_phandle and .node is significantly different enough to warrant the separate code paths unless ibm,phandle properties actually appear in Apple device trees. I think it is safe to eliminate the old .node property and use phandle everywhere. Signed-off-by: Grant Likely <[email protected]> Acked-by: David S. Miller <[email protected]> Tested-by: Wolfram Sang <[email protected]> Acked-by: Benjamin Herrenschmidt <[email protected]>
2010-01-28of: Merge of_node_get() and of_node_put()Grant Likely1-74/+0
Merge common code between PowerPC and MicroBlaze Signed-off-by: Grant Likely <[email protected]> Tested-by: Wolfram Sang <[email protected]> Acked-by: Benjamin Herrenschmidt <[email protected]>
2010-01-28of: merge machine_is_compatible()Grant Likely1-18/+0
Merge common code between PowerPC and Microblaze Signed-off-by: Grant Likely <[email protected]> Tested-by: Wolfram Sang <[email protected]> Acked-by: Benjamin Herrenschmidt <[email protected]>
2010-01-18microblaze: pci_controller->arch_data really is a struct device_node *Michal Simek1-1/+1
we are follow powerpc change: 44ef339073f67d4abcc62ae52a5fbc069d7a4d29 Signed-off-by: Michal Simek <[email protected]>
2010-01-18microblaze: Enable accept4 syscallMichal Simek1-1/+1
We had wrong name in unistd.h + I wire up this syscall in syscall table. Signed-off-by: Michal Simek <[email protected]>
2009-12-14genirq: Convert irq_desc.lock to raw_spinlockThomas Gleixner1-2/+2
Convert locks which cannot be sleeping locks in preempt-rt to raw_spinlocks. Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Acked-by: Ingo Molnar <[email protected]>