12 Oct, 2008
2 commits
-
at32_select_periph() now takes an u32 bitmask rather than a single pin.
This allows to set multiple pins at once.Signed-off-by: Alex Raimondi
Signed-off-by: Haavard Skinnemoen
09 Oct, 2008
2 commits
-
Include to see the declaration of pm_power_off, and remove
unneeded NULL initializer.Signed-off-by: Haavard Skinnemoen
-
Signed-off-by: Haavard Skinnemoen
06 Oct, 2008
9 commits
-
Signed-off-by: Haavard Skinnemoen
-
After a data error, we wait for the NOTBUSY bit to be set so that we can
be sure the data transfer is completely finished. However, when NOTBUSY
is set, the interrupt handler copies the contents of SR into
data_status, overwriting any error bits we may have detected earlier.To avoid this, initialize data_status to 0 before starting a request, and
don't overwrite it unless it still contains 0.Signed-off-by: Haavard Skinnemoen
-
This adds support for DMA transfers through the generic DMA engine
framework with the DMA slave extensions.The driver has been tested using mmc-block and ext3fs on several SD,
SDHC and MMC+ cards. Reads and writes work fine, with read transfer
rates up to 7.5 MiB/s on fast cards with debugging disabled.Unfortunately, the driver has been known to lock up from time to time
with DMA enabled, so DMA support is currently optional and marked
EXPERIMENTAL. However, I didn't see any problems while testing 13
different cards (MMC, SD and SDHC of different brands and sizes), so I
suspect the "Initialize BLKR before sending data transfer command" fix
that was posted earlier fixed this as well.Signed-off-by: Haavard Skinnemoen
-
The Atmel MCI controller can drive multiple cards through separate sets
of pins, but only one at a time. This patch adds support for
multiplexing access to the controller so that multiple card slots can be
used as if they were hooked up to separate mmc controllers.The atmel-mci driver registers each slot as a separate mmc_host. Both
access the same common controller state, but they also have some state
on their own for card detection/write protect handling, and separate
shadows of the MR and SDCR registers.When one of the slots receives a request from the mmc core, the common
controller state is checked. If it's idle, the request is submitted
immediately. If not, the request is added to a queue. When a request is
done, the queue is checked and if there is a queued request, it is
submitted before the completion callback is called.This patch also includes a few cleanups and fixes, including a locking
overhaul. I had to change the locking extensively in any case, so I
might as well try to get it right. The driver no longer takes any
irq-safe locks, which may or may not improve the overall system
performance.This patch also adds a bit of documentation of the internal data
structures.Signed-off-by: Haavard Skinnemoen
-
Add the necessary platform infrastructure to support multiple mmc/sdcard
slots all at once through a single controller. Currently, the driver
will use the first valid slot it finds and stick with that, but later
patches will add support for switching between several slots on the fly.Extend the platform data structure with per-slot information: MMC/SDcard
bus width and card detect/write protect pins. This will affect the pin
muxing as well as the capabilities announced to the mmc core.Note that board code is now required to supply a mci_platform_data
struct to at32_add_device_mci().Signed-off-by: Haavard Skinnemoen
-
Some cards might get upset if we turn off the clock for extended periods
of time. So keep the clock running until the mmc core tells us to turn
it off.Also, don't reset the controller between each transfer. That was an
attempt to work around earlier bugs, and it never really worked very
well.Signed-off-by: Haavard Skinnemoen
-
With the current system of completed/pending events, things may get
handled in different order depending on which event triggers first. For
example, if the data transfer is complete before the command, the stop
command must be sent after the command is complete, not the data. This
creates a bit of complexity around the stop command.By having the tasklet go through a sequence of clearly defined states,
things always happen in a certain order even if the events come at
different times, so the stop command can simply be sent when we exit the
"sending data" state because we will never enter that state before the
command has been sent successfully.Signed-off-by: Haavard Skinnemoen
-
The atmel-mci driver sometimes fails data transfers like this:
mmcblk0: error -5 transferring data
end_request: I/O error, dev mmcblk0, sector 2749769
end_request: I/O error, dev mmcblk0, sector 2749777It turns out that this might be caused by the BLKR register (which
contains the block size and the number of blocks being transfered) being
initialized too late. This patch moves the initialization of BLKR so
that it contains the correct value before the block transfer command is
sent.This error is difficult to reproduce, but if you insert a long delay
(mdelay(10) or thereabouts) between the calls to atmci_start_command()
and atmci_submit_data(), all transfers seem to fail without this patch,
while I haven't seen any failures with this patch.Reported-by: Hein_Tibosch
Signed-off-by: Haavard Skinnemoen -
This replaces the at32_clock_list array with a linked list.
Clocks can now be registered (added) to the list.Signed-off-by: Alex Raimondi
Signed-off-by: Haavard Skinnemoen
05 Oct, 2008
2 commits
-
…el/git/tip/linux-2.6-tip
* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
clockevents: check broadcast tick device not the clock events device -
…git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86 setup: correct segfault in generation of 32-bit reloc kernel
04 Oct, 2008
25 commits
-
Impact: jiffies increment too fast.
Hugh Dickins noted that with NOHZ=n and HIGHRES=n jiffies get
incremented too fast. The reason is a wrong check in the broadcast
enter/exit code, which keeps the local apic timer in periodic mode
when the switch happens.Signed-off-by: Thomas Gleixner
-
…s/security-testing-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
selinux: Fix an uninitialized variable BUG/panic in selinux_secattr_to_sid() -
Make the ACPI /proc/acpi/wakeup interface set the appropriate wake-up bits
of physical devices corresponding to the ACPI devices and make those bits
be set initially for devices that are enabled to wake up by default. This
is needed to restore the 2.6.26 and earlier behavior for the PCI devices
that were previously handled correctly with the help of the
/proc/acpi/wakeup interface.Signed-off-by: Rafael J. Wysocki
Cc: Len Brown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Check the return value of led_classdev_register and unregister all
registered devices, if registering one device fails. Also the dynamic
memory handling is totally bogus. You can't allocate multiple chunks via
kzalloc() and expect them to be in order later. I wonder how this ever
worked.Signed-off-by: Sven Wegener
Acked-by: Nate Case
Tested-by: Nate Case
Acked-by: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
On initialization, we first do the ioremap and then register the led devices.
On deinitialization, we do it in reverse order. This prevents someone calling
into the brightness_set functions with an invalid latch_address.Signed-off-by: Sven Wegener
Acked-by: Rod Whitby
Acked-by: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The tasklet checks RAW.BLOCK twice, and does not check RAW.XFER. This is
obviously wrong, and could theoretically cause the driver to hang.Reported-by: Nicolas Ferre
Signed-off-by: Haavard Skinnemoen
Acked-by: Dan Williams
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The "Documentation" section of this file mentions that when an interface
change is made, I should be CCed with info about the change (so that
man-pages can document it). Additionally request that this info be CCed
to the new linux-api@vger.kernel.org list.Signed-off-by: Michael Kerrisk
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Mention that patches that change the kernel-userland interface should
be CCed to the new list linux-api@vger.kernel.org.Signed-off-by: Michael Kerrisk
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Nowadays, man-pages has an associated mailing list. Mention that list
in MAINTAINERS.Signed-off-by: Michael Kerrisk
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Remove myself from the kernel MAINTAINERS file for cpusets. I am leaving
SGI and probably will not be active in Linux kernel work. I can be
reached at . Contact Derek Fults for future
SGI+cpuset related issues. I'm off to the next chapter of this good life.Signed-off-by: Paul Jackson
Cc: Paul Menage
Cc: Derek Fults
Cc: John Hesterberg
Cc: Paul Jackson
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
include/linux/stacktrace.h:13: warning:
'struct task_struct' declared inside parameter list(This might be a hard error on sparc64, which uses this header and has
-Werror)Reported-by: "Randy.Dunlap"
Acked-by: Ingo Molnar
Cc: Peter Zijlstra
Cc: Arjan van de Ven
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Accept zero (the default!) as a per-transfer clock speed override.
Signed-off-by: Lennert Buytenhek
Signed-off-by: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Fix infinite recursive notifier in the fbdev layer. This causes recursive
locking. Dmitry Baryshkov found the problem and confirmed that the patch
fixes the bug.After doing
# echo 1 > /sys/class/graphics/fb0/blank
I got the following in my kernel log:=============================================
[ INFO: possible recursive locking detected ]
2.6.27-rc6-00086-gda63874-dirty #97
---------------------------------------------
echo/1564 is trying to acquire lock:
((fb_notifier_list).rwsem){..--}, at: [] __blocking_notifier_call_chain+0x38/0x6cbut task is already holding lock:
((fb_notifier_list).rwsem){..--}, at: [] __blocking_notifier_call_chain+0x38/0x6cother info that might help us debug this:
2 locks held by echo/1564:
#0: (&buffer->mutex){--..}, at: [] sysfs_write_file+0x30/0x80
#1: ((fb_notifier_list).rwsem){..--}, at: [] __blocking_notifier_call_chain+0x38/0x6cstack backtrace:
[] (dump_stack+0x0/0x14) from [] (print_deadlock_bug+0xa4/0xd0)
[] (print_deadlock_bug+0x0/0xd0) from [] (check_deadlock+0x148/0x17c)
r6:c397a1e0 r5:c397a530 r4:c04fcf98
[] (check_deadlock+0x0/0x17c) from [] (validate_chain+0x3c4/0x4f0)
[] (validate_chain+0x0/0x4f0) from [] (__lock_acquire+0x5e8/0x6b4)
[] (__lock_acquire+0x0/0x6b4) from [] (lock_acquire+0x64/0x78)
[] (lock_acquire+0x0/0x78) from [] (down_read+0x4c/0x60)
r7:00000009 r6:ffffffff r5:c0427a40 r4:c005a384
[] (down_read+0x0/0x60) from [] (__blocking_notifier_call_chain+0x38/0x6c)
r5:c0427a40 r4:c0427a74
[] (__blocking_notifier_call_chain+0x0/0x6c) from [] (blocking_notifier_call_chain+0x20/0x28)
r8:00000009 r7:c086d640 r6:c3967940 r5:00000000 r4:c38984b8
[] (blocking_notifier_call_chain+0x0/0x28) from [] (fb_notifier_call_chain+0x1c/0x24)
[] (fb_notifier_call_chain+0x0/0x24) from [] (fb_blank+0x64/0x70)
[] (fb_blank+0x0/0x70) from [] (fbcon_blank+0x114/0x1bc)
r5:00000001 r4:c38984b8
[] (fbcon_blank+0x0/0x1bc) from [] (do_blank_screen+0x1e0/0x2a0)
[] (do_blank_screen+0x0/0x2a0) from [] (fbcon_fb_blanked+0x74/0x94)
r5:c3967940 r4:00000001
[] (fbcon_fb_blanked+0x0/0x94) from [] (fbcon_event_notify+0x100/0x12c)
r5:fffffffe r4:c39bc194
[] (fbcon_event_notify+0x0/0x12c) from [] (notifier_call_chain+0x38/0x7c)
[] (notifier_call_chain+0x0/0x7c) from [] (__blocking_notifier_call_chain+0x54/0x6c)
r8:c3b51ea0 r7:00000009 r6:ffffffff r5:c0427a40 r4:c0427a74
[] (__blocking_notifier_call_chain+0x0/0x6c) from [] (blocking_notifier_call_chain+0x20/0x28)
r8:00000001 r7:c3a7e000 r6:00000000 r5:00000000 r4:c38984b8
[] (blocking_notifier_call_chain+0x0/0x28) from [] (fb_notifier_call_chain+0x1c/0x24)
[] (fb_notifier_call_chain+0x0/0x24) from [] (fb_blank+0x64/0x70)
[] (fb_blank+0x0/0x70) from [] (store_blank+0x54/0x7c)
r5:c38984b8 r4:c3b51ec4
[] (store_blank+0x0/0x7c) from [] (dev_attr_store+0x28/0x2c)
r8:00000001 r7:c042bf80 r6:c39eba10 r5:c3967c30 r4:c38e0140
[] (dev_attr_store+0x0/0x2c) from [] (flush_write_buffer+0x54/0x68)
[] (flush_write_buffer+0x0/0x68) from [] (sysfs_write_file+0x58/0x80)
r8:c3b51f78 r7:c3bcb070 r6:c39eba10 r5:00000001 r4:00000001
[] (sysfs_write_file+0x0/0x80) from [] (vfs_write+0xb8/0x148)
[] (vfs_write+0x0/0x148) from [] (sys_write+0x44/0x70)
r7:00000004 r6:c3bcb070 r5:00000000 r4:00000000
[] (sys_write+0x0/0x70) from [] (ret_fast_syscall+0x0/0x2c)
r6:4001b000 r5:00000001 r4:401dc658Signed-off-by: Krzysztof Helt
Reported-by: Dmitry Baryshkov
Testted-by: Dmitry Baryshkov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When userspace uses SIGIO notification and forgets to disable it before
closing file descriptor, rtc->async_queue contains stale pointer to struct
file. When user space enables again SIGIO notification in different
process, kernel dereferences this (poisoned) pointer and crashes.So disable SIGIO notification on close.
Kernel panic:
(second run of qemu (requires echo 1024 > /sys/class/rtc/rtc0/max_user_freq))general protection fault: 0000 [1] PREEMPT
CPU 0
Modules linked in: af_packet snd_pcm_oss snd_mixer_oss snd_seq_oss snd_seq_midi_event snd_seq usbhid tuner tea5767 tda8290 tuner_xc2028 xc5000 tda9887 tuner_simple tuner_types mt20xx tea5761 tda9875 uhci_hcd ehci_hcd usbcore bttv snd_via82xx snd_ac97_codec ac97_bus snd_pcm snd_timer ir_common compat_ioctl32 snd_page_alloc videodev v4l1_compat snd_mpu401_uart snd_rawmidi v4l2_common videobuf_dma_sg videobuf_core snd_seq_device snd btcx_risc soundcore tveeprom i2c_viapro
Pid: 5781, comm: qemu-system-x86 Not tainted 2.6.27-rc6 #363
RIP: 0010:[] [] __lock_acquire+0x3db/0x73f
RSP: 0000:ffffffff80674cb8 EFLAGS: 00010002
RAX: ffff8800224c62f0 RBX: 0000000000000046 RCX: 0000000000000002
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8800224c62f0
RBP: ffffffff80674d08 R08: 0000000000000002 R09: 0000000000000001
R10: ffffffff80238941 R11: 0000000000000001 R12: 0000000000000000
R13: 6b6b6b6b6b6b6b6b R14: ffff88003a450080 R15: 0000000000000000
FS: 00007f98b69516f0(0000) GS:ffffffff80623200(0000) knlGS:00000000f7cc86d0
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000a87000 CR3: 0000000022598000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process qemu-system-x86 (pid: 5781, threadinfo ffff880028812000, task ffff88003a450080)
Stack: ffffffff80674cf8 0000000180238440 0000000200000002 0000000000000000
ffff8800224c62f0 0000000000000046 0000000000000000 0000000000000002
0000000000000002 0000000000000000 ffffffff80674d68 ffffffff8024fc7a
Call Trace:
[] lock_acquire+0x85/0xa9
[] ? send_sigio+0x2a/0x184
[] _read_lock+0x3e/0x4a
[] ? send_sigio+0x2a/0x184
[] send_sigio+0x2a/0x184
[] ? __lock_acquire+0x6e1/0x73f
[] ? kill_fasync+0x2c/0x4e
[] __kill_fasync+0x54/0x65
[] kill_fasync+0x3a/0x4e
[] rtc_update_irq+0x9c/0xa5
[] cmos_interrupt+0xae/0xc0
[] handle_IRQ_event+0x25/0x5a
[] handle_edge_irq+0xdd/0x123
[] do_IRQ+0xe4/0x144
[] ret_from_intr+0x0/0xf
[] ? __alloc_pages_internal+0xe7/0x3ad
[] ? clear_page_c+0x7/0x10
[] ? get_page_from_freelist+0x385/0x450
[] ? __alloc_pages_internal+0xe7/0x3ad
[] ? anon_vma_prepare+0x2e/0xf6
[] ? handle_mm_fault+0x227/0x6a5
[] ? do_page_fault+0x494/0x83f
[] ? error_exit+0x0/0xa9Code: cc 41 39 45 28 74 24 e8 5e 1d 0f 00 85 c0 0f 84 6a 03 00 00 83 3d 8f a9 aa 00 00 be 47 03 00 00 0f 84 6a 02 00 00 e9 53 03 00 00 ff 85 38 01 00 00 45 8b be 90 06 00 00 41 83 ff 2f 76 24 e8
RIP [] __lock_acquire+0x3db/0x73f
RSP
---[ end trace 431877d860448760 ]---
Kernel panic - not syncing: Aiee, killing interrupt handler!Signed-off-by: Marcin Slusarz
Acked-by: Alessandro Zummo
Acked-by: David Brownell
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
At some point during the 2.6.27 development cycle two new fields were added
to the SELinux context structure, a string pointer and a length field. The
code in selinux_secattr_to_sid() was not modified and as a result these two
fields were left uninitialized which could result in erratic behavior,
including kernel panics, when NetLabel is used. This patch fixes the
problem by fully initializing the context in selinux_secattr_to_sid() before
use and reducing the level of direct context manipulation done to help
prevent future problems.Please apply this to the 2.6.27-rcX release stream.
Signed-off-by: Paul Moore
Signed-off-by: James Morris -
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
[MIPS] SMTC: Fix SMTC dyntick support.
[MIPS] SMTC: Close tiny holes in the SMTC IPI replay system.
[MIPS] SMTC: Fix holes in SMTC and FPU affinity support.
[MIPS] SMTC: Build fix: Fix filename in Makefile
[MIPS] Build fix: Fix irq flags type -
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
[S390] qdio: prevent stack clobber
[S390] nohz: Fix __udelay. -
Impact: segfault on build of a 32-bit relocatable kernel
When converting arch/x86/boot/compressed/relocs.c to support unlimited
sections, the computation of sym_strtab in walk_relocs() was done
incorrectly. This causes a segfault for some people when building the
relocatable 32-bit kernel.Pointed out by Anonymous .
Signed-off-by: H. Peter Anvin
-
.. small detail, but the silly e1000e initcall warning debugging caused
me to look at this code. Rather than gouge my eyes out with a spoon, I
just fixed it.Signed-off-by: Linus Torvalds
-
Don't print more information than fits into the string on the
stack. Combine the informational output of qdio to fit into
one line.Signed-off-by: Jan Glauber
Signed-off-by: Martin Schwidefsky -
This fixes a regression that came with 934b2857cc576ae53c92a66e63fce7ddcfa74691
("[S390] nohz/sclp: disable timer on synchronous waits.").
If udelay() gets called from a disabled context it sets the clock comparator
to a value where it expects the next interrupt. When the interrupt happens
the clock comparator gets not reset and therefore the interrupt condition
doesn't get cleared. The result is an endless timer interrupt loop.In addition this patch fixes also the following:
rcutorture reveals that our __udelay implementation is still buggy,
since it might schedule tasklets, but prevents their execution:NOHZ: local_softirq_pending 42
NOHZ: local_softirq_pending 02
NOHZ: local_softirq_pending 142
NOHZ: local_softirq_pending 02To fix this we make sure that only the clock comparator interrupt
is enabled when the enabled wait psw is loaded.
Also no code gets called anymore which might schedule tasklets.Signed-off-by: Heiko Carstens
Signed-off-by: Martin Schwidefsky -
Rework of SMTC support to make it work with the new clock event system,
allowing "tickless" operation, and to make it compatible with the use of
the "wait_irqoff" idle loop. The new clocking scheme means that the
previously optional IPI instant replay mechanism is now required, and has
been made more robust.Signed-off-by: Kevin D. Kissell
Signed-off-by: Ralf Baechle -
Signed-off-by: Kevin D. Kissell
Signed-off-by: Ralf Baechle -
Signed-off-by: Kevin D. Kissell
Signed-off-by: Ralf Baechle -
Signed-off-by: Ralf Baechle