aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze/kernel (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-05-22Merge remote branch 'origin' into secretlab/next-devicetreeGrant Likely13-112/+72
Merging in current state of Linus' tree to deal with merge conflicts and build failures in vio.c after merge. Conflicts: drivers/i2c/busses/i2c-cpm.c drivers/i2c/busses/i2c-mpc.c drivers/net/gianfar.c Also fixed up one line in arch/powerpc/kernel/vio.c to use the correct node pointer. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-05-22arch/microblaze: Move dma_mask from of_device into pdev_archdataGrant Likely2-2/+2
By moving dma_mask into pdev_archdata, and adding archdata to struct of_device, it makes it possible to substitute of_device with struct platform_device, which is a stepping stone to removing the of_platform bus entirely. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-05-18of: eliminate of_device->node and dev_archdata->{of,prom}_nodeGrant Likely1-3/+1
This patch eliminates the node pointer from struct of_device and the of_node (or prom_node) pointer from struct dev_archdata since the node pointer is now part of struct device proper when CONFIG_OF is set, and all users of the old pointer locations have already been converted over to use device->of_node. Also remove dev_archdata_{get,set}_node() as it is no longer used by anything. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-05-18of: Always use 'struct device.of_node' to get device node pointer.Grant Likely2-6/+6
The following structure elements duplicate the information in 'struct device.of_node' and so are being eliminated. This patch makes all readers of these elements use device.of_node instead. (struct of_device *)->node (struct dev_archdata *)->prom_node (sparc) (struct dev_archdata *)->of_node (powerpc & microblaze) Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-05-14microblaze: Fix module loading on system with WB cacheMichal Simek1-0/+2
There is necessary to flush whole dcache. Icache work should be done in kernel/module.c. Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-05-13microblaze: export assembly functions used by modulesMichal Simek1-0/+1
Export __strncpy_user, memory_size, ioremap_bot for modules. Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-05-13microblaze: Remove compilation warnings in cache macroMichal Simek1-1/+2
CC arch/microblaze/kernel/cpu/cache.o arch/microblaze/kernel/cpu/cache.c: In function '__invalidate_dcache_range_wb': arch/microblaze/kernel/cpu/cache.c:398: warning: ISO C90 forbids mixed declarations and code arch/microblaze/kernel/cpu/cache.c: In function '__flush_dcache_range_wb': arch/microblaze/kernel/cpu/cache.c:509: warning: ISO C90 forbids mixed declara Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-05-13microblaze: export assembly functions used by modulesSteven J. Magnani1-0/+10
Modules that use copy_{to,from}_user(), memcpy(), and memset() fail to build in certain circumstances. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-05-13microblaze: re-enable interrupts before calling scheduleSteven J. Magnani1-0/+2
schedule() should not be called with interrupts disabled. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-05-06microblaze: Optimize CACHE_LOOP_LIMITS and CACHE_RANGE_LOOP macrosMichal Simek1-27/+35
1. Remove CACHE_ALL_LOOP2 macro because it is identical to CACHE_ALL_LOOP 2. Change BUG_ON to WARN_ON 3. Remove end aligned from CACHE_LOOP_LIMITS. C implementation do not need aligned end address and ASM code do aligned in their macros 4. ASM optimized CACHE_RANGE_LOOP_1/2 macros needs to get aligned end address. Because end address is compound from start + size, end address is the first address which is exclude. Here is the corresponding code which describe it. + int align = ~(line_length - 1); + end = ((end & align) == end) ? end - line_length : end & align; a) end is aligned: it is necessary to subtruct line length because we don't want to work with next cacheline b) end address is not aligned: Just align it to be ready for ASM code. Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-05-06microblaze: cpuinfo shows cache line lengthMichal Simek1-4/+6
Show cache line length in /proc/cpuinfo. Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-05-06microblaze: Fix typo fault in cache codeMichal Simek1-5/+5
Copy & paste error. Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-05-06microblaze: Fix consistent codeMichal Simek1-1/+1
This patch fix consistent code which had problems with consistent_free function. I am not sure if we need to call flush_tlb_all after it but it keeps tlbs synced. I added noMMU and MMU version together. Uncached shadow feature is not tested. Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-05-06microblaze: Remove "cache" optimized copy_page functionMichal Simek2-36/+1
Current implementation doesn't handle dcache_line_length correctly that's why is better to use generic memcpy. Cache optimized function could be good way howto improve performance but must be based on benchmarking not blind function like this. Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-05-06microblaze: fix divide by zero exception messageRandy Dunlap1-1/+1
Fix divide exception message to say "divide by zero". Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Michal Simek <monstr@monstr.eu> Cc: microblaze-uclinux@itee.uq.edu.au Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-05-06microblaze: Remove ancient codeMichal Simek1-34/+0
I found several function which we don't use that's why I am removing them. Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-05-06microblaze: Quiet section mismatch warningsSteven J. Magnani2-2/+4
_start is located in .text, which causes mismatch warnings with machine_early_init() and start_kernel() in .init.text. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-05-06microblaze: Fix IRQ entry/exit ftracingSteven J. Magnani1-1/+2
Function traces on Microblaze don't include IRQ entry and exit arrows, i.e. 0) | memcpy_toiovec() { 0) ==========> | 0) | do_IRQ() { ... 0) <========== | 0) ! 5414.000 us | } ...because do_IRQ() doesn't have the proper attributes. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-04-28driver-core: Add device node pointer to struct deviceGrant Likely1-0/+1
Currently, platforms using CONFIG_OF add a 'struct device_node *of_node' to dev->archdata. However, with CONFIG_OF becoming generic for all architectures, it makes sense for commonality to move it out of archdata and into struct device proper. This patch adds a struct device_node *of_node member to struct device and updates all locations which currently write the device_node pointer into archdata to also update dev->of_node. Subsequent patches will modify callers to use the archdata location and ultimately remove the archdata member entirely. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> CC: Michal Simek <monstr@monstr.eu> CC: Greg Kroah-Hartman <gregkh@suse.de> CC: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: "David S. Miller" <davem@davemloft.net> CC: Stephen Rothwell <sfr@canb.auug.org.au> CC: Jeremy Kerr <jeremy.kerr@canonical.com> CC: microblaze-uclinux@itee.uq.edu.au CC: linux-kernel@vger.kernel.org CC: linuxppc-dev@ozlabs.org CC: sparclinux@vger.kernel.org
2010-04-07microblaze: Remove unused variable from ptraceMichal Simek1-1/+0
Patch b3c1e01a09d6af2dd7811a066ffcfc5171be2bed should do it. Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-04-07microblaze: Fix ftrace_update_ftrace_func panicSteven J. Magnani1-9/+3
The Microblaze dynamic ftrace code assumes a call ordering that is not met in all scenarios. Specifically, executing a command similar to: echo 105 > /sys/kernel/debug/tracing/set_ftrace_pid before any other tracing-related commands results in a kernel panic: BUG: failure at arch/microblaze/kernel/ftrace.c:198/ftrace_update_ftrace_func()! Recoding ftrace_update_ftrace_func() to use &ftrace_caller directly eliminates the need to capture its address elsewhere (and thus rely on a particular call sequence). Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-04-05Merge branch 'master' into export-slabhTejun Heo7-87/+94
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 <monstr@monstr.eu>
2010-04-01microblaze: head.S typo fixMichal Simek1-2/+2
I forget to change register name in comments. Signed-off-by: Michal Simek <monstr@monstr.eu>
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 <monstr@monstr.eu>
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 <monstr@monstr.eu>
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 <monstr@monstr.eu>
2010-04-01microblaze: Use instruction with delay slotMichal Simek1-8/+5
Sync labels. Signed-off-by: Michal Simek <monstr@monstr.eu>
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 <monstr@monstr.eu>
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 <monstr@monstr.eu>
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 <monstr@monstr.eu>
2010-04-01microblaze: Add DEBUG optionMichal Simek1-0/+2
Disable debug option in asm code. Signed-off-by: Michal Simek <monstr@monstr.eu>
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 <monstr@monstr.eu>
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 <monstr@monstr.eu>
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 <steve@digidescorp.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.hTejun Heo5-3/+2
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 <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
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 <hch@lst.de> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Roland McGrath <roland@redhat.com> Acked-by: Michal Simek <monstr@monstr.eu> Cc: John Williams <john.williams@petalogix.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 <hch@lst.de> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Michal Simek <monstr@monstr.eu> Acked-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-11microblaze: entry.S use delay slot for return handlersMichal Simek1-6/+3
Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-03-11microblaze: Save current task directlyMichal Simek1-8/+4
Signed-off-by: Michal Simek <monstr@monstr.eu>
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 <monstr@monstr.eu>
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 <monstr@monstr.eu>
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 <monstr@monstr.eu>
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 <monstr@monstr.eu>
2010-03-11microblaze: remove trailing space in messagesFrans Pop1-1/+1
Signed-off-by: Frans Pop <elendil@planet.nl> Cc: microblaze-uclinux@itee.uq.edu.au Cc: Michal Simek <monstr@monstr.eu> Signed-off-by: Michal Simek <monstr@monstr.eu>
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 <monstr@monstr.eu>
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 <monstr@monstr.eu>
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 <monstr@monstr.eu>
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 <monstr@monstr.eu>