Commit Graph

142 Commits (4c54005ca438a8b46dd542b497d4f0dc2ca375e8)

Author SHA1 Message Date
Thomas Gleixner 239007b844 genirq: Convert irq_desc.lock to raw_spinlock
Convert locks which cannot be sleeping locks in preempt-rt to
raw_spinlocks.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
2009-12-14 23:55:33 +01:00
Michal Simek 571202f50f microblaze: Remove rt_sigsuspend wrapper
Generic rt_sigsuspend syscalls doesn't need any asm wrapper.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:45:12 +01:00
steve@digidescorp.com 825c9a359e microblaze: nommu: Don't clobber R11 on syscalls
The noMMU syscall trap has a bug that causes R11 to be zero on return to
userland. Remove the extra "save" of R11 responsible for the bug.

Remove reloading of mode indicator because r11 already contains it.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:45:11 +01:00
Michal Simek 2ee2ff875a microblaze: Support for WB cache
Microblaze version 7.20.d is the first MB version which can be run
on MMU linux. Please do not used previous version because they contain
HW bug.
Based on WB support was necessary to redesign whole cache design.
Microblaze versions from 7.20.a don't need to disable IRQ and cache
before working with them that's why there are special structures for it.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:45:10 +01:00
Michal Simek c8983a5c6e microblaze: Add PVR for Microblaze v7.30.a
Microblaze v7.30.a will have 0x10 version string.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:45:10 +01:00
Michal Simek 81ab0dfd94 microblaze: Remove ancient and fake microblaze version from cpu_ver table
We need to continue with next microblaze PVR version that's why
I have to remove that ancient version. These version strings not match
any versions. From Microblaze v5.00.a is possible to use this style.
I believe that none use ancients versions. If yes they will be just
labeled as unknown version.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:45:09 +01:00
Michal Simek 5de2344630 microblaze: Remove panic_timeout init value
panic_timeout is in BSS section and it is cleared with BSS section.
This means that value is setup to 0.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:45:09 +01:00
Michal Simek 11d5136043 microblaze: Do not count system calls in default
There is not necessary to count system calls that's why
I added DEBUG macro

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:45:08 +01:00
steve@digidescorp.com 33d9ff5985 microblaze: Fix level interrupt ACKing
Level interrupts need to be ack'd in the unmask handler, as in powerpc.
Among other issues, this bug causes the system clock to appear to run at
double-speed.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:45:06 +01:00
Michal Simek 833d0d8da4 microblaze: Enable futimesat syscall
Futimesat was disabled. LTP testing shows that MB has no
problem with this syscall.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:45:06 +01:00
Michal Simek f6e1f1b480 microblaze: Checking DTS against PVR for write-back cache
WB cache has special flag in PVR. There is added checking mechanism
for PVR and DTS.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:45:05 +01:00
John Linn 6d858535be microblaze: Fix the heartbeat gpio to be more robust
The device tree handling for the gpio in the heart beat was not handling
the system when there was no gpio and it wasn't working with a newer version
of the gpio core which does not have the is-bidir property.

Signed-off-by: John Linn <john.linn@xilinx.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:45:03 +01:00
Michal Simek a1f55113ca microblaze: Move cache macro from cache.h to cacheflush.h
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:45:00 +01:00
Michal Simek a01523cdcd microblaze: Ptrace notifying from signal code
After the signal frame is set up on the userspace stack, ptrace() should
be given an opportunity to single-step into the signal handler

FRV, Blackfin, mn10300 and UM. Worth to look at that patches.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:44:58 +01:00
Michal Simek e051af576a microblaze: Extend cpuinfo for support write-back caches
There is missing checking agains PVR but this is not important
for now. There are some missing checking too.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:44:58 +01:00
Michal Simek 44e4e196a9 microblaze: Fix cache_line_lenght
We used cache_line as cache_line_lenght. For this reason
we did cache flushing 4 times longer than was necessary.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:44:57 +01:00
Michal Simek 6cec713b16 microblaze: Detect new 7.20.d version
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:44:57 +01:00
Michal Simek 67bf876654 microblaze: Support both levels for reset
Till this patch reset always perform writen to 1.
Now we can use negative logic and perform reset write to 0.

It is opposite level than is currently read from that pin

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:44:56 +01:00
Michal Simek 7537583040 microblaze: Fix announce message for reset gpio
I had to change message for gpio-reset because I always
not to see it. Prefix RESET is big and visible.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:44:56 +01:00
Michal Simek f7816e284b microblaze: Remove saving and restoring before calling signal code
Saving is done in SAVE_STATE macros that's why another save discard
previous saved value.

This change has no effect to normal programs because they ends in any exception
and they are killed. On the other side has effect on debugging.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:44:55 +01:00
Michal Simek 4f911b0daf microblaze: ftrace: Add dynamic function graph tracer
This patch add support for dynamic function graph tracer.

There is one my expactation that I can do flush_icache after
all code modification. On microblaze is this safer than do
flush for every entry. For icache is used name flush but
correct should be invalidation - this will be fix in upcomming
new cache implementaion and WB support.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:44:54 +01:00
Michal Simek a0d3e66522 microblaze: ftrace: add function graph support
For more information look at Documentation/trace folder.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:44:53 +01:00
Michal Simek 7d241ff056 microblaze: ftrace: Add dynamic trace support
With dynamic function tracer, by default, _mcount is defined as an
"empty" function, it returns directly without any more action. When
enabling it in user-space, it will jump to a real tracing
function(ftrace_caller), and do the real job for us.

Differ from the static function tracer, dynamic function tracer provides
two functions ftrace_make_call()/ftrace_make_nop() to enable/disable the
tracing of some indicated kernel functions(set_ftrace_filter).

In the kernel version, there is only one "_mcount" string for every
kernel function, so, we just need to match this one in mcount_regex of
scripts/recordmcount.pl.

For more information please look at code and Documentation/trace folder.

Steven ACK that scripts/recordmcount.pl part.

Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:44:01 +01:00
Michal Simek 6d9e60ce30 microblaze: ftrace: enable HAVE_FUNCTION_TRACE_MCOUNT_TEST
Implement MCOUNT_TEST in asm code - it is faster than use
generic code

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:40:10 +01:00
Michal Simek 2fd7c761a2 microblaze: ftrace: add static function tracer
If -pg of gcc is enabled with CONFIG_FUNCTION_TRACER=y. a calling to
_mcount will be inserted into each kernel function. so, there is a
possibility to trace the kernel functions in _mcount.

This patch add the specific _mcount support for static function
tracing. by default, ftrace_trace_function is initialized as
ftrace_stub(an empty function), so, the default _mcount will introduce
very little overhead. after enabling ftrace in user-space, it will jump
to a real tracing function and do static function tracing for us.

Commit message from Wu Zhangjin <wuzhangjin@gmail.com>

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:40:09 +01:00
Michal Simek a3cd613b2e microblaze: Add TRACE_IRQFLAGS_SUPPORT
There are just two major changes
Renamed local_irq functions to raw_local_irq in irq.c.
Added TRACE_IRQFLAGS_SUPPORT to Kconfig.debug.

Look at Documentation/irqflags-tracing.txt

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:40:09 +01:00
Michal Simek bf2d809668 microblaze: Lockdep support
Microblaze needs to do lock_init very soon because MMU init calls lock functions.

Here is the explanation from Peter Zijlstra why we have to enable
__ARCH_WANTS_INTERRUPTS_ON_CTSW.

"So we schedule while holding rq->lock (for obvious reasons), but since
lockdep tracks held locks per tasks, we need to transfer the held state
from the prev to the next task. We do this by explicity calling
spin_release(&rq->lock) in context_switch() right before switch_to(),
and calling spin_acquire(&rq->lock) in
finish_task_switch()->finish_lock_switch().

Now, for some reason lockdep thinks that interrupts got enabled over the
context switch (git grep __ARCH_WANTS_INTERRUPTS_ON_CTSW arch/microblaze
doesn't seem to turn up anything).

Clearly trying to acquire the rq->lock with interrupts enabled is a bad
idea and lockdep warns you about this."

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:40:09 +01:00
Michal Simek 519e9f4173 microblaze: Register timecounter/cyclecounter
It is the same counter as we use as free running one.
I would like to use it for ftrace.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:40:09 +01:00
Michal Simek 24b45a12c2 microblaze: Stack trace support
This is working implemetation but the problem is that
Microblaze misses frame pointer that's why is there
big loop which trace and show all addresses which are in text.
It shows addresses which are in registers, etc.

This is problem and this is the reason why all Microblaze
traces are wrong. There is an option to do hacks and trace
the kernel code but this is too complicated.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:40:09 +01:00
Michal Simek 7cf79d59ea microblaze: Add IRQENTRY_TEXT to lds
It is important for ftrace irqsoff support

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:40:09 +01:00
Michal Simek 13cdee2329 microblaze: __init_begin symbol must be aligned
The problem was that free_initmem pass to  free_initrd_mem got
bad aligned __init_begin symbol and free_initrd_mem don't care
about __init_end but take PAGE_SIZE instead.

Here is behavior in kernel bootlog.
ramdisk_execute_command from (init/main.c) was rewrite

Freeing unused kernel memory: 6224k freed
Failed to execute ��������������{���
Failed to execute ��������������{����.  Attempting defaults...
Mounting proc:
Mounting var:

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:40:08 +01:00
Michal Simek 42a2478b78 microblaze: GPIO reset support
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14 08:40:08 +01:00
Al Viro f8b7256096 Unify sys_mmap*
New helper - sys_mmap_pgoff(); switch syscalls to using it.

Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-11 06:44:29 -05:00
Linus Torvalds d7fc02c7ba Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1815 commits)
  mac80211: fix reorder buffer release
  iwmc3200wifi: Enable wimax core through module parameter
  iwmc3200wifi: Add wifi-wimax coexistence mode as a module parameter
  iwmc3200wifi: Coex table command does not expect a response
  iwmc3200wifi: Update wiwi priority table
  iwlwifi: driver version track kernel version
  iwlwifi: indicate uCode type when fail dump error/event log
  iwl3945: remove duplicated event logging code
  b43: fix two warnings
  ipw2100: fix rebooting hang with driver loaded
  cfg80211: indent regulatory messages with spaces
  iwmc3200wifi: fix NULL pointer dereference in pmkid update
  mac80211: Fix TX status reporting for injected data frames
  ath9k: enable 2GHz band only if the device supports it
  airo: Fix integer overflow warning
  rt2x00: Fix padding bug on L2PAD devices.
  WE: Fix set events not propagated
  b43legacy: avoid PPC fault during resume
  b43: avoid PPC fault during resume
  tcp: fix a timewait refcnt race
  ...

Fix up conflicts due to sysctl cleanups (dead sysctl_check code and
CTL_UNNUMBERED removed) in
	kernel/sysctl_check.c
	net/ipv4/sysctl_net_ipv4.c
	net/ipv6/addrconf.c
	net/sctp/sysctl.c
2009-12-08 07:55:01 -08:00
David S. Miller 3505d1a9fd Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/sfc/sfe4001.c
	drivers/net/wireless/libertas/cmd.c
	drivers/staging/Kconfig
	drivers/staging/Makefile
	drivers/staging/rtl8187se/Kconfig
	drivers/staging/rtl8192e/Kconfig
2009-11-18 22:19:03 -08:00
Grant Likely e91edcf5a2 of: merge of_find_all_nodes() implementations
Merge common code between Microblaze and PowerPC, and make it available
to Sparc

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Michal Simek <monstr@monstr.eu>
Acked-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
2009-10-15 10:58:09 -06:00
Grant Likely d8678b5870 of: add common header for flattened device tree representation
Add a common header file for working with the flattened device tree
data structure and merge the shared data tags used by Microblaze and
PowerPC

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Michal Simek <monstr@monstr.eu>
Acked-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
2009-10-15 10:57:53 -06:00
Arnaldo Carvalho de Melo a2e2725541 net: Introduce recvmmsg socket syscall
Meaning receive multiple messages, reducing the number of syscalls and
net stack entry/exit operations.

Next patches will introduce mechanisms where protocols that want to
optimize this operation will provide an unlocked_recvmsg operation.

This takes into account comments made by:

. Paul Moore: sock_recvmsg is called only for the first datagram,
  sock_recvmsg_nosec is used for the rest.

. Caitlin Bestler: recvmmsg now has a struct timespec timeout, that
  works in the same fashion as the ppoll one.

  If the underlying protocol returns a datagram with MSG_OOB set, this
  will make recvmmsg return right away with as many datagrams (+ the OOB
  one) it has received so far.

. Rémi Denis-Courmont & Steven Whitehouse: If we receive N < vlen
  datagrams and then recvmsg returns an error, recvmmsg will return
  the successfully received datagrams, store the error and return it
  in the next call.

This paves the way for a subsequent optimization, sk_prot->unlocked_recvmsg,
where we will be able to acquire the lock only at batch start and end, not at
every underlying recvmsg call.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12 23:40:10 -07:00
Michal Simek 131e4e97bf microblaze: Clear sticky FSR register after saving it to func parametr
Previous patch d63678d607d0e37ec7abe5ceb545d7e8aab956a4 clear
it for noMMU kernel. This one do it for MMU.

Correct noMMU version

Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-10-05 11:37:47 +02:00
Michal Simek f1ae3f6918 microblaze: UMS is used only for MMU kernel
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-10-05 11:37:47 +02:00
Linus Torvalds a6b49cb210 Merge branch 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze
* '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-24 09:01:44 -07:00
Alexey Dobriyan 2bcd57ab61 headers: utsname.h redux
* 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 <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-23 18:13:10 -07:00
Linus Torvalds c37efa9325 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next
* 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-23 15:37:02 -07:00
Michal Simek cfa9a775b9 microblaze: Fix _start symbol to physical address
_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 <monstr@monstr.eu>
2009-09-22 10:11:08 +02:00
Michal Simek a061dd5258 microblaze: Use LOAD_OFFSET macro to get correct LMA for all sections
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 <john.williams@petalogix.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-09-22 10:10:35 +02:00
Michal Simek 235754834b microblaze: Support ptrace syscall tracing.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-09-22 10:00:45 +02:00
John Williams f97b4f7de4 microblaze: Updated CPU version and FPGA family codes in PVR
Signed-off-by: John Williams <john.williams@petalogix.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-09-22 10:00:45 +02:00
Michal Simek 23902d95c9 microblaze: Generate correct signal and siginfo for integer div-by-zero
Signed-off-by: John Williams <john.williams@petalogix.com>
2009-09-22 10:00:44 +02:00
Michal Simek bfc32ad09b microblaze: Don't be noisy when userspace causes hardware exceptions
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-09-22 10:00:43 +02:00
John Williams 71b23d547b microblaze: Clear sticky FSR register after generating exception signals
FSR is sticky, so after the userspace exception/signal generation, clear
it ready for next time.

Signed-off-by: John Williams <john.williams@petalogix.com>
2009-09-22 10:00:42 +02:00