aboutsummaryrefslogtreecommitdiff
path: root/arch/microblaze/kernel
AgeCommit message (Collapse)AuthorFilesLines
2009-10-05microblaze: Clear sticky FSR register after saving it to func parametrMichal Simek2-1/+3
Previous patch d63678d607d0e37ec7abe5ceb545d7e8aab956a4 clear it for noMMU kernel. This one do it for MMU. Correct noMMU version Signed-off-by: Michal Simek <[email protected]>
2009-10-05microblaze: UMS is used only for MMU kernelMichal Simek1-0/+2
Signed-off-by: Michal Simek <[email protected]>
2009-09-24Merge branch 'for-linus' of git://git.monstr.eu/linux-2.6-microblazeLinus Torvalds9-74/+205
* 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze: (24 commits) microblaze: Disable heartbeat/enable emaclite in defconfigs microblaze: Support simpleImage.dts make target microblaze: Fix _start symbol to physical address microblaze: Use LOAD_OFFSET macro to get correct LMA for all sections microblaze: Create the LOAD_OFFSET macro used to compute VMA vs LMA offsets microblaze: Copy ppc asm-compat.h for clean handling of constants in asm and C microblaze: Actually show KiB rather than pages in "Freeing initrd memory:" microblaze: Support ptrace syscall tracing. microblaze: Updated CPU version and FPGA family codes in PVR microblaze: Generate correct signal and siginfo for integer div-by-zero microblaze: Don't be noisy when userspace causes hardware exceptions microblaze: Remove ipc.h file which points to non-existing asm-generic file microblaze: Clear sticky FSR register after generating exception signals microblaze: Ensure CPU usermode is set on new userspace processes microblaze: Use correct kbuild variable KBUILD_CFLAGS microblaze: Save and restore msr in hw exception microblaze: Add architectural support for USB EHCI host controllers microblaze: Implement include/asm/syscall.h. microblaze: Improve checking mechanism for MSR instruction microblaze: Add checking mechanism for MSR instruction ...
2009-09-23headers: utsname.h reduxAlexey Dobriyan1-1/+0
* remove asm/atomic.h inclusion from linux/utsname.h -- not needed after kref conversion * remove linux/utsname.h inclusion from files which do not need it NOTE: it looks like fs/binfmt_elf.c do not need utsname.h, however due to some personality stuff it _is_ needed -- cowardly leave ELF-related headers and files alone. Signed-off-by: Alexey Dobriyan <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-09-23Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-nextLinus Torvalds1-3/+2
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next: (30 commits) Use macros for .data.page_aligned section. Use macros for .bss.page_aligned section. Use new __init_task_data macro in arch init_task.c files. kbuild: Don't define ALIGN and ENTRY when preprocessing linker scripts. arm, cris, mips, sparc, powerpc, um, xtensa: fix build with bash 4.0 kbuild: add static to prototypes kbuild: fail build if recordmcount.pl fails kbuild: set -fconserve-stack option for gcc 4.5 kbuild: echo the record_mcount command gconfig: disable "typeahead find" search in treeviews kbuild: fix cc1 options check to ensure we do not use -fPIC when compiling checkincludes.pl: add option to remove duplicates in place markup_oops: use modinfo to avoid confusion with underscored module names checkincludes.pl: provide usage helper checkincludes.pl: close file as soon as we're done with it ctags: usability fix kernel hacking: move STRIP_ASM_SYMS from General gitignore usr/initramfs_data.cpio.bz2 and usr/initramfs_data.cpio.lzma kbuild: Check if linker supports the -X option kbuild: introduce ld-option ... Fix trivial conflict in scripts/basic/fixdep.c
2009-09-22microblaze: Fix _start symbol to physical addressMichal Simek1-0/+1
_start is setup to physical kernel start address. This caused that when you load vmlinux (with MMU kernel) via XMD program counter (pc) is setup correctly and then you can write con and start kernel. Signed-off-by: Michal Simek <[email protected]>
2009-09-22microblaze: Use LOAD_OFFSET macro to get correct LMA for all sectionsMichal Simek1-15/+19
Currently, vmlinux has LMA==VMA for all sections, which is wrong for MMU kernels. Previous patches in this series defined the LOAD_OFFSET constant, now we make use of it in our link script. Other minor changes in this patch: * brace/indenting cleanup of some sections * put __fdt_* symbols in their own section, and apply LOAD_OFFSET fixup Signed-off-by: John Williams <[email protected]> Signed-off-by: Michal Simek <[email protected]>
2009-09-22microblaze: Support ptrace syscall tracing.Michal Simek2-12/+122
Signed-off-by: Edgar E. Iglesias <[email protected]> Signed-off-by: Michal Simek <[email protected]>
2009-09-22microblaze: Updated CPU version and FPGA family codes in PVRJohn Williams1-0/+3
Signed-off-by: John Williams <[email protected]> Signed-off-by: Michal Simek <[email protected]>
2009-09-22microblaze: Generate correct signal and siginfo for integer div-by-zeroMichal Simek1-1/+1
Signed-off-by: John Williams <[email protected]>
2009-09-22microblaze: Don't be noisy when userspace causes hardware exceptionsMichal Simek1-11/+20
Signed-off-by: Michal Simek <[email protected]>
2009-09-22microblaze: Clear sticky FSR register after generating exception signalsJohn Williams1-0/+2
FSR is sticky, so after the userspace exception/signal generation, clear it ready for next time. Signed-off-by: John Williams <[email protected]>
2009-09-22microblaze: Ensure CPU usermode is set on new userspace processesJohn Williams1-0/+1
Signed-off-by: John Williams <[email protected]>
2009-09-22microblaze: Save and restore msr in hw exceptionMichal Simek1-2/+6
I thought that this part of code could be removed because just save and restore MSR but any code can't change it. But seems to that any part of code works with this information. This patch solved problem with allocation. Signed-off-by: Michal Simek <[email protected]>
2009-09-21microblaze: Improve checking mechanism for MSR instructionMichal Simek1-8/+5
It is more safe to use clear instead of msrset. We save some instructions too. Signed-off-by: Michal Simek <[email protected]>
2009-09-21microblaze: Add checking mechanism for MSR instructionMichal Simek2-3/+26
It was necessary to use fourth parameter(r8) in early_printk to show messages on console. Signed-off-by: Michal Simek <[email protected]>
2009-09-21microblaze: Cleanup linker script using new linker script macros.Tim Abbott1-31/+8
I wasn't able to further clean up the linker script using the INIT_DATA_SECTION macro because of the FIXME comment for the .init.ramfs section; when that is resolved we should convert microblaze to use INIT_DATA_SECTION. Signed-off-by: Tim Abbott <[email protected]> Cc: Michal Simek <[email protected]> Cc: [email protected] Cc: Sam Ravnborg <[email protected]> Signed-off-by: Michal Simek <[email protected]>
2009-09-21perf: Do the big rename: Performance Counters -> Performance EventsIngo Molnar1-1/+1
Bye-bye Performance Counters, welcome Performance Events! In the past few months the perfcounters subsystem has grown out its initial role of counting hardware events, and has become (and is becoming) a much broader generic event enumeration, reporting, logging, monitoring, analysis facility. Naming its core object 'perf_counter' and naming the subsystem 'perfcounters' has become more and more of a misnomer. With pending code like hw-breakpoints support the 'counter' name is less and less appropriate. All in one, we've decided to rename the subsystem to 'performance events' and to propagate this rename through all fields, variables and API names. (in an ABI compatible fashion) The word 'event' is also a bit shorter than 'counter' - which makes it slightly more convenient to write/handle as well. Thanks goes to Stephane Eranian who first observed this misnomer and suggested a rename. User-space tooling and ABI compatibility is not affected - this patch should be function-invariant. (Also, defconfigs were not touched to keep the size down.) This patch has been generated via the following script: FILES=$(find * -type f | grep -vE 'oprofile|[^K]config') sed -i \ -e 's/PERF_EVENT_/PERF_RECORD_/g' \ -e 's/PERF_COUNTER/PERF_EVENT/g' \ -e 's/perf_counter/perf_event/g' \ -e 's/nb_counters/nb_events/g' \ -e 's/swcounter/swevent/g' \ -e 's/tpcounter_event/tp_event/g' \ $FILES for N in $(find . -name perf_counter.[ch]); do M=$(echo $N | sed 's/perf_counter/perf_event/g') mv $N $M done FILES=$(find . -name perf_event.*) sed -i \ -e 's/COUNTER_MASK/REG_MASK/g' \ -e 's/COUNTER/EVENT/g' \ -e 's/\<event\>/event_id/g' \ -e 's/counter/event/g' \ -e 's/Counter/Event/g' \ $FILES ... to keep it as correct as possible. This script can also be used by anyone who has pending perfcounters patches - it converts a Linux kernel tree over to the new naming. We tried to time this change to the point in time where the amount of pending patches is the smallest: the end of the merge window. Namespace clashes were fixed up in a preparatory patch - and some stylistic fallout will be fixed up in a subsequent patch. ( NOTE: 'counters' are still the proper terminology when we deal with hardware registers - and these sed scripts are a bit over-eager in renaming them. I've undone some of that, but in case there's something left where 'counter' would be better than 'event' we can undo that on an individual basis instead of touching an otherwise nicely automated patch. ) Suggested-by: Stephane Eranian <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Acked-by: Paul Mackerras <[email protected]> Reviewed-by: Arjan van de Ven <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: David Howells <[email protected]> Cc: Kyle McMartin <[email protected]> Cc: Martin Schwidefsky <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: <[email protected]> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <[email protected]>
2009-09-21Use new __init_task_data macro in arch init_task.c files.Joe Perches1-3/+2
Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Tim Abbott <[email protected]> Acked-by: Paul Mundt <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]>
2009-09-15Merge branch 'for-linus' of ↵Linus Torvalds1-2/+4
git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (46 commits) powerpc64: convert to dynamic percpu allocator sparc64: use embedding percpu first chunk allocator percpu: kill lpage first chunk allocator x86,percpu: use embedding for 64bit NUMA and page for 32bit NUMA percpu: update embedding first chunk allocator to handle sparse units percpu: use group information to allocate vmap areas sparsely vmalloc: implement pcpu_get_vm_areas() vmalloc: separate out insert_vmalloc_vm() percpu: add chunk->base_addr percpu: add pcpu_unit_offsets[] percpu: introduce pcpu_alloc_info and pcpu_group_info percpu: move pcpu_lpage_build_unit_map() and pcpul_lpage_dump_cfg() upward percpu: add @align to pcpu_fc_alloc_fn_t percpu: make @dyn_size mandatory for pcpu_setup_first_chunk() percpu: drop @static_size from first chunk allocators percpu: generalize first chunk allocator selection percpu: build first chunk allocators selectively percpu: rename 4k first chunk allocator to page percpu: improve boot messages percpu: fix pcpu_reclaim() locking ... Fix trivial conflict as by Tejun Heo in kernel/sched.c
2009-08-18microblaze: Enable ppoll syscallMichal Simek1-1/+1
Signed-off-by: Michal Simek <[email protected]>
2009-08-18microblaze: Sane handling of missing timer/intc in device treeJohn Williams2-0/+4
This code path doesn't test any returned pointers for NULL, leading to a bad kernel page fault if there's no timer/intc found. Slightly better is to BUG(), but even better still would be a printk beforehand. Signed-off-by: John Williams <[email protected]> Signed-off-by: Michal Simek <[email protected]>
2009-08-18microblaze: use the generic ack_bad_irq implementationChristoph Hellwig1-9/+0
Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Michal Simek <[email protected]>
2009-08-14Merge branch 'percpu-for-linus' into percpu-for-nextTejun Heo14-375/+150
Conflicts: arch/sparc/kernel/smp_64.c arch/x86/kernel/cpu/perf_counter.c arch/x86/kernel/setup_percpu.c drivers/cpufreq/cpufreq_ondemand.c mm/percpu.c Conflicts in core and arch percpu codes are mostly from commit ed78e1e078dd44249f88b1dd8c76dafb39567161 which substituted many num_possible_cpus() with nr_cpu_ids. As for-next branch has moved all the first chunk allocators into mm/percpu.c, the changes are moved from arch code to mm/percpu.c. Signed-off-by: Tejun Heo <[email protected]>
2009-07-27microblaze: Makefile cleanupSam Ravnborg1-1/+1
Reviewed the Makefile on request by Michal and this is the resulting changes. o Use ':=' for assignmnet so we do not re-evaluate for each use o Use $(shell echo xxx) to remove "" o Replaced CFLAGS_KERNEL with KBUILD_CFLAGS The settings are equally relevant for modules and the linked kernel o Dropped LDFLAGS_BLOB - it is no longer used o Refactored assignmnets to libs-y and core-y o Use MMU for the MMU specific extension. "MMUEXT" was hurting my eyes and I did not wanted it spread to m68k Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: Michal Simek <[email protected]>
2009-07-27microblaze: Typo fix for cpu param inconsistencyMichal Simek2-2/+2
Signed-off-by: Michal Simek <[email protected]>
2009-07-27microblaze: Add support for R_MICROBLAZE_64_NONEMichal Simek1-0/+4
For example reiserfs use this relocation type. Signed-off-by: Michal Simek <[email protected]>
2009-07-27microblaze: Get module loading workingJohn Williams1-5/+10
New reloc type R_MICROBLAZE_32_PCREL_LO requires a null handler (no work to do). Remove legacy hack for broken linker pre gcc-4.1.1, that required us to extract an offset from the code, add it to the addend, then rewrite the instruction. Fixup the invalid reloc type error output. Boot tested with the xilinx_emaclite ethernet driver. Signed-off-by: John Williams <[email protected]> Signed-off-by: Michal Simek <[email protected]>
2009-07-27microblaze: remove sys_ipcArnd Bergmann2-100/+1
The ipc system call is now unused in microblaze, as the system call table points directly to the indidual system calls for IPC. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Michal Simek <[email protected]>
2009-07-27microblaze: Support unaligned address for put/get_user macrosMichal Simek1-63/+46
This patch add support for cases where load/store instruction in put/get_user macro gets unaligned pointer to data and this address is not valid. I prevent all cases which can failed. I had to disable first stage of unaligned handler which is used only for noMMU kernel and the whole work is done when interrupt is enabled. You have enable HW support for detect unaligned access in Microblaze. This patch fixed three LTP tests: getpeername01, getsockname01, socketpair01 Signed-off-by: Michal Simek <[email protected]>
2009-07-27microblaze: Detect new Microblaze 7.20 versionsMichal Simek1-0/+2
Signed-off-by: Michal Simek <[email protected]>
2009-07-27microblaze: Clear print messages for DTB passing via r7Michal Simek1-0/+3
It is necessary to zeroed r7 when r7 points to bad dtb - this caused that we have correct messages about compiled-in dtb or passing via r7 Signed-off-by: Michal Simek <[email protected]>
2009-07-27microblaze: Not to clear r7 after copying DTB to kernelMichal Simek1-1/+0
I can't clear r7 because if I do it I lose information where DTB come from. Signed-off-by: Michal Simek <[email protected]>
2009-07-27microblaze: Add messages about FDT blobMichal Simek1-3/+6
Print accurate message about place where FDT blob is. Signed-off-by: Michal Simek <[email protected]>
2009-07-27microblaze: Final support for statically linked DTBJohn Williams2-5/+13
If r7 is zero at kernel boot, or does not point to a valid DTB, then we fall back to a DTB (assumed to be) linked statically in the kernel, instead of blindly copying bogus cruft into the kernel DTB memory region Signed-off-by: John Williams <[email protected]> Signed-off-by: Michal Simek <[email protected]>
2009-07-12headers: smp_lock.h reduxAlexey Dobriyan3-3/+0
* Remove smp_lock.h from files which don't need it (including some headers!) * Add smp_lock.h to files which do need it * Make smp_lock.h include conditional in hardirq.h It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT This will make hardirq.h inclusion cheaper for every PREEMPT=n config (which includes allmodconfig/allyesconfig, BTW) Signed-off-by: Alexey Dobriyan <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-07-09linker script: unify usage of discard definitionTejun Heo1-1/+1
Discarded sections in different archs share some commonality but have considerable differences. This led to linker script for each arch implementing its own /DISCARD/ definition, which makes maintaining tedious and adding new entries error-prone. This patch makes all linker scripts to move discard definitions to the end of the linker script and use the common DISCARDS macro. As ld uses the first matching section definition, archs can include default discarded sections by including them earlier in the linker script. ia64 is notable because it first throws away some ia64 specific subsections and then include the rest of the sections into the final image, so those sections must be discarded before the inclusion. defconfig compile tested for x86, x86-64, powerpc, powerpc64, ia64, alpha, sparc, sparc64 and s390. Michal Simek tested microblaze. Signed-off-by: Tejun Heo <[email protected]> Acked-by: Paul Mundt <[email protected]> Acked-by: Mike Frysinger <[email protected]> Tested-by: Michal Simek <[email protected]> Cc: [email protected] Cc: Michal Simek <[email protected]> Cc: [email protected] Cc: Sam Ravnborg <[email protected]> Cc: Tony Luck <[email protected]>
2009-07-09microblaze: include EXIT_TEXT to _stextMichal Simek1-2/+2
Microblaze wants to throw out EXIT_TEXT during runtime too. This hasn't caused trouble till now because the linker script didn't discard EXIT_TEXT and it ended up in its default output section. As discard definition is about to be unified, include EXIT_TEXT into _stext explicitly and while at it replace explicit exitcall definition to EXIT_CALL. Signed-off-by: Michal Simek <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
2009-07-06microblaze: Wire up new syscallsMichal Simek1-0/+2
Wire up new syscalls rt_tgsigqueueinfo and perf_counter_open. Signed-off-by: Michal Simek <[email protected]>
2009-07-06microblaze: use generic syscalls.hArnd Bergmann5-26/+25
The prototypes in syscalls.h all make sense for microblaze, but for some of them, the actual implementation in sys_microblaze.c needs to be adapted. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Michal Simek <[email protected]>
2009-07-06microblaze: clean up signal handlingArnd Bergmann4-170/+39
When legacy signal handling is disabled, the arch/microblaze/kernel/signal.c implementation can be much simpler, as most of it is handled generically from kernel/signal.c. This is also a prerequisite for using the generic asm/unistd.h, which does not provide __NR_sigreturn, because this macro is referenced by the current signal.c implementation. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Michal Simek <[email protected]>
2009-06-24linker script: throw away .discard sectionTejun Heo1-0/+2
x86 throws away .discard section but no other archs do. Also, .discard is not thrown away while linking modules. Make every arch and module linking throw it away. This will be used to define dummy variables for percpu declarations and definitions. This patch is based on Ivan Kokshaysky's alpha percpu patch. [ Impact: always throw away everything in .discard ] Signed-off-by: Tejun Heo <[email protected]> Cc: Ivan Kokshaysky <[email protected]> Cc: Richard Henderson <[email protected]> Cc: Russell King <[email protected]> Cc: Haavard Skinnemoen <[email protected]> Cc: Bryan Wu <[email protected]> Cc: Mikael Starvik <[email protected]> Cc: Jesper Nilsson <[email protected]> Cc: David Howells <[email protected]> Cc: Yoshinori Sato <[email protected]> Cc: Tony Luck <[email protected]> Cc: Hirokazu Takata <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Michal Simek <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Kyle McMartin <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Martin Schwidefsky <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Paul Mundt <[email protected]> Cc: David S. Miller <[email protected]> Cc: Jeff Dike <[email protected]> Cc: Chris Zankel <[email protected]> Cc: Rusty Russell <[email protected]> Cc: Ingo Molnar <[email protected]>
2009-06-20microblaze: Add missing symbols for CONSTRUCTORS supportMichal Simek1-5/+6
Commit b99b87f70c7785ab1e253c6220f4b0b57ce3a7f7 add CONSTRUCTOR support to Linux but Microblaze not defined KERNEL_CTORS symbols which are used with that patch. This patch fixed it. Signed-off-by: Michal Simek <[email protected]>
2009-06-20microblaze: remove init_mmArnd Bergmann1-2/+0
Alexey removed the definition for init_mm from all architectures but forgot microblaze, which was only recently added. This fixes the microblaze build by dropping it there as well. Cc: Alexey Dobriyan <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Michal Simek <[email protected]>
2009-05-30microblaze: Fix problem with early_printk in startupMichal Simek1-1/+1
Problem arise when is incopatibility between kernel/dts/pvr and kernel tries to announce it. Early printk device (uartlite in our case) was in TLB 2 and when kernel extract DTB it necessary to allocate at least one TLB at the end of memory. First free TLB was number two where was early printk. But checking mechanism (kernel/dts/pvr) was after extrahing but TLB 2 was different. This caused that kernel hung up. Moving early printk device to TLB 63 solve it and we don't protect it which means that we can use early_printk messages only for initial parts of kernel then we rewrite TLB 63. Reported-by: Edgar E. Iglesias <[email protected]> Signed-off-by: Michal Simek <[email protected]>
2009-05-26microblaze_mmu_v2: MakefilesMichal Simek1-0/+1
Signed-off-by: Michal Simek <[email protected]>
2009-05-26microblaze_mmu_v2: Update signal returning addressMichal Simek1-0/+8
Signed-off-by: Michal Simek <[email protected]>
2009-05-26microblaze_mmu_v2: Traps MMU updateMichal Simek1-0/+34
Signed-off-by: Michal Simek <[email protected]>
2009-05-26microblaze_mmu_v2: Enable fork syscall for MMU and add fork as vfork for noMMUMichal Simek2-2/+6
Signed-off-by: Michal Simek <[email protected]>
2009-05-26microblaze_mmu_v2: Update linker script for MMUMichal Simek1-2/+1
Signed-off-by: Michal Simek <[email protected]>