On BF537/6 the implementation is not straight forward since there are now
two chained chained_handlers. A cleaner approach would have been to add
latter IRQs to the demux of IRQ_GENERIC_ERROR.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Wed, 17 Feb 2010 10:44:22 +0000 (10:44 +0000)]
Blackfin: fix single stepping over system calls
On Blackfin systems, the hardware single step exception triggers before
the system call exception, so we need to save this info to process it
later on. Otherwise, single stepping in userspace misses a few insns
right after the system call.
This is based a bit on the SuperH code added in commit 4b505db9c4c72dbd.
Reported-by: Roland McGrath <roland@redhat.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sun, 14 Feb 2010 22:49:59 +0000 (22:49 +0000)]
Blackfin: simplify SYSCFG code a bit and ignore attempts to change it
We don't want to let user space modify the SYSCFG register arbitrarily as
the settings are system wide (SNEN/CNEN) and can cause misbehavior. The
only other bit here (SSSTEP) has proper controls via PTRACE_SINGLESTEP.
Use the generic ptrace_resume code for PTRACE_SYSCALL, PTRACE_CONT,
PTRACE_KILL and PTRACE_SINGLESTEP. This implies defining
arch_has_single_step in <asm/ptrace.h> and implementing the
user_enable_single_step and user_disable_single_step functions, which
also causes the breakpoint information to be cleared on fork, which
could be considered a bug fix.
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> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Graf Yang [Mon, 1 Feb 2010 06:07:50 +0000 (06:07 +0000)]
Blackfin: rewrite resync_core_{i,d}cache() SMP logic to avoid per_cpu data
This functions are implicitly called by core functions like cpu_relax(),
and since those functions may be called early on before common code has
initialized the per-cpu data area, we need to tweak the stats gathering.
Now the statistics are maintained in common bss which makes these funcs
safe to use as soon as the C runtime env is setup.
Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Barry Song [Tue, 19 Jan 2010 11:01:08 +0000 (11:01 +0000)]
Blackfin: fill out the signal si_addr when sending a SIGBUS/SIGSEGV
Some userspace applications use this member in diagnosing crashes. It
also makes some LTP tests pass (i.e. the Blackfin arch behaves more like
everyone else).
Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Barry Song [Fri, 15 Jan 2010 03:24:39 +0000 (03:24 +0000)]
Blackfin: bf537-stamp: declare parallel flash as ROM with XIP kernel
When the kernel is executing out of parallel flash (XIP), we can't have
the flash go into an erase/programming cycle, otherwise the instruction
fetching steps fail and everything crashes.
Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Graf Yang [Wed, 13 Jan 2010 06:09:34 +0000 (06:09 +0000)]
Blackfin: fix up mm locking in address dumping
The locking code in the address dumper needs to grab the mm's mmap_sem
so that other CPUs do not get an inconsistent view. On UP systems this
really wasn't a problem, but it is easy to trigger a race on SMP systems
when another CPU removes a mapping.
Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Barry Song [Tue, 5 Jan 2010 07:25:24 +0000 (07:25 +0000)]
Blackfin: fix initial stack pointer setup
During very early init, the stack pointer is given a slightly incorrect
value (&init_thread_union). The value is later adjusted to the right one
during early init (&init_thread_union + THREAD_SIZE), but it is used a few
times in between. While the few functions used don't actually put things
onto the stack (due to optimization), it's best if we simply use the right
value from the start.
Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Jie Zhang [Tue, 5 Jan 2010 04:22:33 +0000 (04:22 +0000)]
Blackfin: fix relocation errors with large initramfs images
Since we are now discarding .exit.text at runtime instead of link time, we
need to place all .text sections ahead of the .data sections. Otherwise,
a really large attached initramfs may cause link errors as it pushes the
PC relative relocations behind the limits of the Blackfin ISA (~16meg).
The instructions in the .exit.text are unable to call back into the .text
sections leading to a link failure.
Signed-off-by: Jie Zhang <jie.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Yi Li [Mon, 28 Dec 2009 10:21:49 +0000 (10:21 +0000)]
Blackfin: SMP: make core timers per-cpu clock events for HRT
SMP systems require per-cpu local clock event devices in order to enable
HRT support. One a BF561, we can use local core timer for this purpose.
Originally, there was one global core-timer clock event device set up for
core A.
To accomplish this feat, we need to split the gptimer0/core timer logic
so that each is a standalone clock event. There is no requirement that
we only have one clock event source anyways. Once we have this, we just
define per-cpu clock event devices for each local core timer.
Signed-off-by: Yi Li <yi.li@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Sonic Zhang [Wed, 23 Dec 2009 07:01:43 +0000 (07:01 +0000)]
Blackfin: update defconfigs
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
The gpio label size is 16 char, but the current code uses a longer name
resulting in chopped display. So use a shorter name.
Reported-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Sonic Zhang [Wed, 9 Dec 2009 07:01:50 +0000 (07:01 +0000)]
Blackfin: MPU: handle caches for reserved memory
We weren't handling the user-specified cache behavior for the reserved
memory regions (via mem=/max_mem=). The no-MPU code already takes care
of this, so add support to the MPU code as well.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Barry Song [Mon, 7 Dec 2009 10:05:58 +0000 (10:05 +0000)]
Blackfin: fix MPU page permission masks overflow when dealing with async memory
Attempting to use the MPU while doing XIP out of parallel flash hooked up
to the async memory bus would often result in random crashes as the MPU
slowly corrupted memory.
The fallout here is that the async banks gain MPU protection from user
space too. So any accesses have to go through the mmap() interface rather
than just using hardcoded pointers.
Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Yi Li [Fri, 4 Dec 2009 06:56:21 +0000 (06:56 +0000)]
Blackfin: flush caches on SMP when one core calls another via IPI
Sometimes a SMP system will randomly panic at boot. This is due to caches
being out of sync when one core tries to signal the other. So when one
core calls another via IPI, flush the data caches.
Signed-off-by: Yi Li <yi.li@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Sonic Zhang [Wed, 23 Sep 2009 05:01:56 +0000 (05:01 +0000)]
Blackfin: move SPORT UART resources to boards files
Rather than keeping the pins in the actual driver and worrying about a
mess of Kconfig options, declare all the desired pin resources in the
boards file. This lets people easily select the specific pins/ports for
the normal emulated UART as well as GPIOs for CTS/RTS.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Sonic Zhang [Wed, 9 Sep 2009 10:46:19 +0000 (10:46 +0000)]
Blackfin: move on-chip UART resources to boards files
Rather than keeping the pins in the actual driver and worrying about a
mess of Kconfig options, declare all the desired pin resources in the
boards file. This lets people easily select the specific pins/ports for
the normal UART as well as GPIOs for CTS/RTS.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (62 commits)
msi-laptop: depends on RFKILL
msi-laptop: Detect 3G device exists by standard ec command
msi-laptop: Add resume method for set the SCM load again
msi-laptop: Support some MSI 3G netbook that is need load SCM
msi-laptop: Add threeg sysfs file for support query 3G state by standard 66/62 ec command
msi-laptop: Support standard ec 66/62 command on MSI notebook and nebook
Driver core: create lock/unlock functions for struct device
sysfs: fix for thinko with sysfs_bin_attr_init()
sysfs: Kill unused sysfs_sb variable.
sysfs: Pass super_block to sysfs_get_inode
driver core: Use sysfs_rename_link in device_rename
sysfs: Implement sysfs_rename_link
sysfs: Pack sysfs_dirent more tightly.
sysfs: Serialize updates to the vfs inode
sysfs: windfarm: init sysfs attributes
sysfs: Use sysfs_attr_init and sysfs_bin_attr_init on module dynamic attributes
sysfs: Document sysfs_attr_init and sysfs_bin_attr_init
sysfs: Use sysfs_attr_init and sysfs_bin_attr_init on dynamic attributes
sysfs: Use one lockdep class per sysfs attribute.
sysfs: Only take active references on attributes.
...
Linus Torvalds [Mon, 8 Mar 2010 15:34:26 +0000 (07:34 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (26 commits)
ALSA: hdmi - show debug message on changing audio infoframe
ALSA: hdmi - merge common code for intelhdmi and nvhdmi
ALSA: hda - Add ASRock mobo to MSI blacklist
ALSA: hda: uninitialized variable fix
ALSA: hda: Use LPIB for a Biostar Microtech board
ALSA: usb/audio.h: Fix field order
ALSA: fix jazz16 compile (udelay)
ALSA: hda: Use LPIB for Dell Latitude 131L
ALSA: hda - Build hda_eld into snd-hda-codec module
ALSA: hda - Support NVIDIA MCP89 and GT21x hdmi audio
ALSA: hda - Support max codecs to 8 for nvidia hda controller
ALSA: riptide: clean up while loop
ALSA: usbaudio - remove debug "SAMPLE BYTES" printk line
ALSA: timer - pass real event in snd_timer_notify1() to instance callback
ALSA: oxygen: change || to &&
ALSA: opti92x: use PnP data to select Master Control port
ASoC: fix ak4104 register array access
ASoC: soc_pcm_open: Add missing bailout tag
ALSA: usbaudio: Fix wrong bitrate for Creative Creative VF0470 Live Cam
ALSA: ua101: removing debugging code
...
Linus Torvalds [Mon, 8 Mar 2010 15:33:46 +0000 (07:33 -0800)]
Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
[S390] smsgiucv_app: deliver z/VM CP special messages (SMSG) as uevents
[S390] smsgiucv: declare char pointers as "const"
[S390] dasd: automatic recognition of read-only devices
[S390] remove unused qdio flags in zfcp and qeth
[S390] Cleanup xtime usage
[S390] qdio: add missing bracket
[S390] cio: fix init_count in case of recognition after steal lock
[S390] dasd: security and PSF update patch for EMC CKD ioctl
[S390] hvc_iucv: allocate memory buffers for IUCV in zone DMA
[S390] uaccess: make sure copy_from_user_overflow is builtin
[S390] smsgiucv_app: deliver z/VM CP special messages (SMSG) as uevents
The smsgiucv_app driver registers a callback with the smsgiucv driver
to receive z/VM CP special messages (SMSG) starting with "APP".
When the callback is called for special messages, the driver creates
an uevent for the received message. The uevent consists of additional
environment data containing the message prefix ("APP"), message sender,
and message content.
udev rules can be used to trigger application specific actions through
matching the content or sender of the special message.
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
[S390] dasd: automatic recognition of read-only devices
In z/VM it is possible to attach a device as read-only. To prevent
unintentional write requests and subsequent I/O errors, we can detect
this configuration using the z/VM DIAG 210 interface and set the
respective linux block device to read-only as well.
Signed-off-by: Stefan Weinhuber <wein@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Ursula Braun [Mon, 8 Mar 2010 11:25:20 +0000 (12:25 +0100)]
[S390] remove unused qdio flags in zfcp and qeth
zfcp and qeth are setting flags for the qdio-layer, but these flags
are not used in qdio. Patch removes the flag definitions from qdio
and their settings in zfcp and qeth.
Cc: Jan Glauber <jang@linux.vnet.ibm.com> Cc: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>