Anton Vorontsov [Sun, 11 Jan 2009 15:30:13 +0000 (18:30 +0300)]
powerpc/83xx: Make serial ports work on MPC8315E-RDB w/ FSL U-Boots
FSL U-Boots use /soc8315@e0000000 node to search and fixup serial
nodes' clock-frequency properties. Though in upstream kernels we use
new naming convention -- for IMMR address space dts files specify
/immr@e0000000 nodes.
This makes FSL U-Boots fail to fixup the clock frequencies, and that
leads to serial ports misbehaviour. We can workaround the issue by
filling the clock frequency values manually.
p.s. For the same reason FSL U-Boots fail to fixup MAC addresses for
ethernet nodes, so users should either change the .dts file locally
or set MAC address via `ifconfig hw ether' command.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
The PowerMac kernel occasionally fails to bring up the secondary CPUs on
SMP, the trigger factor seem to be fairly random and related to location
of code and data.
This appears to be due to the initial loading of the TOC value by the
secondary processor which now happens before we clear HID4:RM_CI (Real
Mode Cache Invalidate). This bit should really be cleared before we do
any load or store other than fetching code.
This fix works based on the assumption that all SMP 64-bit PowerMacs use
variants of the 970, which fortunately is true, by explicitely clearing
that bit, adding an slbia for good measure as RM_CI mode is known to
create bogus ERAT entries.
I also removed some spurrious debug output that was left enabled by
mistake while at it.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Milton Miller [Thu, 8 Jan 2009 02:14:24 +0000 (02:14 +0000)]
hvc_console: Do not set low_latency when using interrupts
hvc_console is setting low_latency unconditionally, but some clients are
interrupt driven and will call hvc_poll from irq context. This will cause
tty_flip_buffer_push to be called from irq context, and it very clearly
states it must not be called from IRQ when low_latency is specified.
Milton Miller [Thu, 8 Jan 2009 02:14:18 +0000 (02:14 +0000)]
hvc_console: Change an mb() to smp_mb() and add some comments
I remember some history on this barrier. There was a race between
open via /dev/console and the tty being fully setup. Its also why
there is a temporary variable and the global is assigned at the end
of the function.
Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
powerpc: Cleanup from l64 to ll64 change: drivers/net
These are powerpc specific drivers.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Ingo Molnar [Tue, 6 Jan 2009 14:26:03 +0000 (14:26 +0000)]
powerpc: Change u64/s64 to a long long integer type
Convert arch/powerpc/ over to long long based u64:
-#ifdef __powerpc64__
-# include <asm-generic/int-l64.h>
-#else
-# include <asm-generic/int-ll64.h>
-#endif
+#include <asm-generic/int-ll64.h>
This will avoid reoccuring spurious warnings in core kernel code that
comes when people test on their own hardware. (i.e. x86 in ~98% of the
cases) This is what x86 uses and it generally helps keep 64-bit code
32-bit clean too.
[Adjusted to not impact user mode (from paulus) - sfr]
Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Milton Miller [Fri, 2 Jan 2009 10:46:15 +0000 (10:46 +0000)]
powerpc/kexec: Check crash_base for relocatable kernel
Enforce that the crash kernel region never overlaps the current kernel,
as it will be written directly on kexec load.
Also, default to the previous KDUMP_KERNELBASE if the start is 0.
Other architectures (x86, ia64) state that specifying the start address
0 (or omitting it) will result in the kernel allocating it. Before the
relocatable patch in 2.6.28, powerpc would adjust any other start value
to the hardcoded KDUMP_KERNELBASE of 32M.
Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Milton Miller [Fri, 2 Jan 2009 10:46:04 +0000 (10:46 +0000)]
powerpc: Make dummy section a valid note header
We are declaring the dummy section (used to work around a binutils
bug) as PT_NOTE, but we don't have enough bytes for it to be a valid
note header, and kexec userspace complains:
Warning: Elf Note name is not null terminated
Warning: append= option is not passed. Using the first kernel root partition
Warning: Elf Note name is not null terminated
Instead of using the arbitray value 0xf177 (aka "fill"), declare a
no-name no-description note of type 0.
Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Arjan van de Ven [Sun, 11 Jan 2009 15:35:01 +0000 (15:35 +0000)]
async: fix __lowest_in_progress()
At 37000 feet somewhere near Greenland I woke up from a half-sleep with the
realisation that __lowest_in_progress() is buggy. After landing I checked
and there were indeed 2 problems with it; this patch fixes both:
* The order of the list checks was wrong
* The locking was not correct.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Arjan van de Ven [Sun, 11 Jan 2009 15:03:23 +0000 (15:03 +0000)]
script: improve markup_oops.pl to also decode oopses in modules
There has been some light flamewar on lkml about decoding oopses
in modules (as part of the crashdump flamewar).
Now this isn't rocket science, just the markup_oops.pl script
cheaped out and didn't handle modules. But really; a flamewar
all about that?? What happened to C++ in the kernel or reading
files from inside the kernel?
This patch adds module support to markup_oops.pl; it's not the
most pretty perl but it works for my testcases...
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Chris Adams [Sun, 11 Jan 2009 19:48:53 +0000 (19:48 +0000)]
ti_usb_3410_5052: support alternate firmware
The TI USB serial driver supports specifying alternate vendor and
product IDs (since the chips can and are used in devices under other
vendor/product IDs). However, the alternate IDs were not loaded in the
combined product table. This patch also adds support for loading
alternate firmware for alternate vendor/product IDs.
Signed-off-by: Chris Adams <cmadams@hiwaay.net> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Alan Cox [Sun, 11 Jan 2009 19:48:41 +0000 (19:48 +0000)]
usb-serial: remove NULL check
Julia Lawell found a case where a NULL check was misplaced in the
usb-serial code. However as the object in question cannot be NULL the
check can simply be removed.
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Alan Cox [Sun, 11 Jan 2009 19:48:34 +0000 (19:48 +0000)]
neo: Remove a bogus NULL check
Julia Lawall found an un-needed check in the neo driver. Her patch moves
the check to cover the code dereferencing it, however it cannot be NULL
anyway so remove the NULL check instead.
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Tue, 13 Jan 2009 00:28:26 +0000 (16:28 -0800)]
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
sparc64: Fix cpumask related build failure
smp_call_function_single(): be slightly less stupid, fix
smp_call_function_single(): be slightly less stupid
rcu: fix bug in rcutorture system-shutdown code
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (37 commits)
ucc_geth: use correct UCCE macros
net_dma: acquire/release dma channels on ifup/ifdown
cxgb3: Keep LRO off if disabled when interface is down
sfc: SFT9001: Fix condition for LNPGA power-off
dccp ccid-3: Fix RFC reference
smsc911x: register irq with device name, not driver name
smsc911x: fix smsc911x_reg_read compiler warning
forcedeth: napi schedule lock fix
net: fix section mismatch warnings in dccp/ccids/lib/tfrc.c
forcedeth: remove mgmt unit for mcp79 chipset
qlge: Remove dynamic alloc of rx ring control blocks.
qlge: Fix schedule while atomic issue.
qlge: Remove support for device ID 8000.
qlge: Get rid of split addresses in hardware control blocks.
qlge: Get rid of volatile usage for shadow register.
forcedeth: version bump and copyright
forcedeth: xmit lock fix
netdev: missing validate_address hooks
netdev: add missing set_mac_address hook
netdev: gianfar: add MII ioctl handler
...
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
sparc: Fix asm/signal.h for 32-bit.
sparc: Eliminate PROMLIB_INTERNAL as it does nothing
sparc: Kill exports of prom internal functions
sparc64: move EXPORT_SYMBOL to the symbols definition
sparc: move EXPORT_SYMBOL to the symbols definition
sparc: Create a new file lib/ksyms.c and add export of all symbols defined in assembler in lib/ to this file.
sparc: Most unaligned_64.c tweaks for branch tracer warnings.
sparc: Fix sun4d_irq.c build.
sparc: Update 32-bit defconfig.
sparc64: fix warnings in psycho_common after ull conversion
Linus Torvalds [Mon, 12 Jan 2009 23:57:34 +0000 (15:57 -0800)]
Merge branch 'for_2.6.29' of git://git.kernel.org/pub/scm/linux/kernel/git/kkeil/ISDN-2.6
* 'for_2.6.29' of git://git.kernel.org/pub/scm/linux/kernel/git/kkeil/ISDN-2.6:
Fix small typo
misdn: indentation and braces disagree - add braces
misdn: one handmade ARRAY_SIZE converted
drivers/isdn/hardware/mISDN: move a dereference below a NULL test
indentation & braces disagree - add braces
Make parameter debug writable
BUGFIX: used NULL pointer at ioctl(sk,IMGETDEVINFO,&devinfo) when devinfo.id not registered
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
[WATCHDOG] Pika Warp appliance watchdog timer
[WATCHDOG] Enable watchdog timer on GE Fanuc's SBC610
[WATCHDOG] Basic support for GE Fanuc's FPGA based watchdog timer
[WATCHDOG] wm8350: Fix section annotations
Linus Torvalds [Mon, 12 Jan 2009 23:53:58 +0000 (15:53 -0800)]
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/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:
Revert "cpumask: use work_on_cpu in acpi-cpufreq.c for drv_read and drv_write"
x86: fix apic.c build error on latest git
x86: fix mpparse.c build error on latest git
x86: avoid theoretical vmalloc fault loop
x86, mtrr: fix types used in userspace exported header
Linus Torvalds [Mon, 12 Jan 2009 23:53:02 +0000 (15:53 -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:
ALSA: hda - Use own workqueue
ALSA: hda - add support for Intel DX58SO board
ASoC: TWL4030: Module unloading fix
ALSA: hda - create hda_codec.control_mutex for kcontrol->private_value
ALSA: caiaq - Version 1.3.10
ALSA: hda - Add quirk for Dell Inspiron Mini9
ALSA: caiaq - Fix Oops with MIDI
ASoC: TWL4030: Change the soc_value_enum back to soc_enum
ASoC: Merge the soc_value_enum to soc_enum struct
ALSA: hda - Add quirks for Acer Aspire 5930G and 6930G
ALSA: hda - Add codec ID for MCP73 HDMI
ALSA: hda - Fix typos for AD1882 codecs
ALSA: hda - Add quirk for HP 2230s
Martyn Welch [Mon, 10 Nov 2008 12:31:33 +0000 (12:31 +0000)]
[WATCHDOG] Enable watchdog timer on GE Fanuc's SBC610
Support for the FPGA based watchdog timer on GE Fanuc's SBC610.
This patch enables one of the watchdog timers found on the SBC610. There are
two identical watchdog timers at different offsets in the above mentioned
boards, however the current driver is only capable of supporting one of them.
The watchdog timers are also capable of generating interrupts at a
user-configurable threshold, though support for this operation is currently
not supported by the driver.
Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Martyn Welch [Mon, 10 Nov 2008 12:31:26 +0000 (12:31 +0000)]
[WATCHDOG] Basic support for GE Fanuc's FPGA based watchdog timer
GE Fanuc SBC610
Support for the FPGA based watchdog timer as found on GE Fanuc's SBC310,
SBC610 and PPC9A Single Board Computers.
This patch adds support for the watchdog timer found in one of the devices
FPGAs. There are two identical watchdog timers at different offsets in the
above mentioned boards, this driver is capable of supporting one of them.
The watchdog timers are also capable of generating interrupts at a
user-configurable threshold, though support for this operation is currently
not supported by the driver.
Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
warning: ignoring return value of 'device_register', declared with attribute
warn_unused_result
warning: ignoring return value of 'device_create_file', declared with
attribute warn_unused_result
warning: ignoring return value of 'device_register', declared with attribute
warn_unused_result
warning: ignoring return value of 'device_create_file', declared with
attribute warn_unused_result
m68k: Kill several external declarations in source files
- Replace external declarations by proper includes where availiable.
The accesses to some symbols had to be modified, as before they were
declared using e.g. "extern int _end", while asm-generic/sections.h uses
e.g. "extern char _end[]"
- Remove unused or superfluous external declarations
Andreas Bombe [Wed, 10 Dec 2008 01:02:19 +0000 (02:02 +0100)]
m68k: amiflop - Get rid of sleep_on calls
Apart from sleep_on() calls that could be easily converted to
wait_event() and completion calls amiflop also used a flag in ms_delay()
and ms_isr() as a custom mutex for ms_delay() without a need for
explicit unlocking. I converted that to a standard mutex.
The replacement for the unconditional sleep_on() in fd_motor_on() is a
complete_all() together with a INIT_COMPLETION() before the mod_timer()
call. It appears to me that fd_motor_on() might be called concurrently
and fd_select() does not guarantee mutual exclusivity in the case the
same drive gets selected again.
- Improve comments and naming
- Convert macros to static inline functions
- Remove superfluous `break' after `return'
- Make sure we get a build-time error (undefined reference to
'c2p_unsupported') in case of future misuse
- Replace `unsigned long' by `u32' in comp(), as that's what all callers use
- Use {get,put}_unaligned_be32() in store_planar{,_masked}()
- Use void * for arbitrary pointers
- Use a union to represent pixels/words, to avoid casts
- 16 bpp must use the cfb_*() ops
- 16 bpp needs to set up info->pseudo_palette[] (was fbcon_cfb16_cmap[] in
2.4.x)
- Kill commented out 2.4.x fbcon remnants
- Make sure par->next_line is always set (this was done for Falcon only),
as all the text console drawing operations need a valid par->next_line,
- Make sure fix->line_length is always set, as some userspace applications
need it because they don't have fallback code for the case where it's zero.
Dieter Ries reported bootup soft-hangs and bisected it back to
this commit, and reverting this commit gave him a working system.
The commit introduces work_on_cpu() use into the cpufreq code,
but that is subtly problematic from a lock hierarchy POV: the
hotplug-cpu lock is an highlevel lock that is taken before
lowlevel locks, and in this codepath we are called with the
policy lock taken.
Dieter did not have lockdep enabled so we dont have a nice stack
trace proof for this, but using work_on_cpu() in such a lowlevel
place certainly looks wrong, so we revert the patch.
work_on_cpu() needs to be reworked to be more generally usable.
Here the intention is to get the pgd corresponding to the current process
and sync it up with the pgd in init_mm(obtained from pgd_offset_k).
However, for kernel threads current->mm is NULL and hence pgd =
pgd_offset(init_mm, address) = pgd_ref which means the fault handler
returns without setting the pgd entry in the MM structure in the context
of which the kernel thread has faulted. This could lead to never-ending
faults and busy looping of kernel threads like pdflush. So, shouldn't the
pgd = pgd_offset(current->mm ?: &init_mm, address); be pgd =
pgd_offset(current->active_mm ?: &init_mm, address);
We can use active_mm unconditionally because it should be always set.
Takashi Iwai [Mon, 12 Jan 2009 09:09:24 +0000 (10:09 +0100)]
ALSA: hda - Use own workqueue
snd-hda-intel driver used schedule_work() fot the delayed DMA pointer
updates, but this has several potential problems:
- it may block other eventsd works longer
- it may deadlock when probing fails and flush_scheduled_work() is
called during probe callback (as probe callback itself could be
invoked from eventd)
This patch adds an own workq for each driver instance to solve these
problems.
powerpc: Fix cpufreq drivers after cpufreq core changes
This updates the cpufreq drivers in arch/powerpc so they build again
after the core cpufreq changes that broke them in commit
in835481d9bcd65720b473db6b38746a74a3964218.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The nodes 'gpio[0-7]' and 'timer' configure the GPIO0..7 and M2
bits of the SYS_WAKEMSK (wakeup source enable) register. Writing '1'
enables a wakesource, 0 disables it.
The 'timer_timeout' node holds the timeout in seconds after which the
TOYMATCH2 event should wake the system.
The 'wakesrc' node holds the SYS_WAKESRC register after wakeup (in hex),
the 'wakemsk' node can be used to get/set the wakeup mask directly.
For example, to have the timer wake the system after 10 seconds of sleep,
the following must be done in userspace:
This patch also removes the homebrew CPU frequency switching code. I don't
understand how it could have ever worked reliably; it does not communicate
the clock changes to peripheral devices other than uarts.
Manuel Lauss [Sun, 21 Dec 2008 08:26:25 +0000 (09:26 +0100)]
MIPS: Alchemy: Fix up PM code on Au1550/Au1200
Au1550/Au1200 have a different memory controller which requires additi-
onal code to properly put memory to sleep (code taken from AMD/RMI's
Linux-2.6.11 source package).
Also fix up the remaining pm-related paths to compile on Au1200/Au1550
platforms.
Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Manuel Lauss [Sun, 21 Dec 2008 08:26:24 +0000 (09:26 +0100)]
MIPS: Alchemy: move calc_clock function.
Now that nothing in time.c depends on calc_clock, it can
be moved to clocks.c where it belongs.
While at it, give it a better non-generic name and call it
as soon as possible in plat_mem_init.
Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Add support for the 32 kHz counter1 (RTC) as clocksource / clockevent
device. As a nice side effect, this also enables use of the 'wait'
instruction for runtime idle power savings.
If the counters aren't enabled/working properly, fall back on the
cp0 counter clock code.
Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Manuel Lauss [Sun, 21 Dec 2008 08:26:22 +0000 (09:26 +0100)]
MIPS: make cp0 counter clocksource/event usable as fallback.
The current mips clock build infrastructure lets a system only use
either the MIPS cp0 counter or a SoC specific timer as a clocksource /
clockevent device.
This patch renames the core cp0 counter clocksource / clockevent functions
from mips_* to r4k_* and updates the wrappers in asm-mips/time.h to
call these renamed functions instead.
Chips which can detect whether it is safe to use a chip-specific timer
can now fall back on the cp0 counter if necessary and possible
(e.g. Alchemy with a follow-on patch).
Existing behaviour is not changed in any way.
Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Manuel Lauss [Sun, 21 Dec 2008 08:26:21 +0000 (09:26 +0100)]
MIPS: Alchemy: remove cpu_table.
Remove the cpu_table:
- move detection of whether c0_config[OD] is read-only and should be set
to fix various chip errata to au1000 headers.
- move detection of write-only sys_cpupll to au1000 headers.
- remove the BCLK switching code: Activation of this features should be
left to the boards using the chips since it also affects external devices
tied to BCLK, and only the board designers know whether it is safe to
enable.