07 Jul, 2007
8 commits
-
In 7d12e780e003f93433d49ce78cfedf4b4c52adc5 David Howells performed
this evolution:
"IRQ: Maintain regs pointer globally rather than passing to IRQ handlers"He correctly updated many of the function definitions that were using this
extra regs pointer parameter but forgot to update some caller sites of
those functions. The reason the modifications was not properly done on all
drivers is that some drivers were rarely compiled because they are for
AMIGA, or that some code sites were inside #ifdefs where the option is not
set or inside #if 0.Here is the semantic patch that found the occurences
and fixed the problem.@ rule1 @
identifier fn;
identifier irq, dev_id;
typedef irqreturn_t;
@@static irqreturn_t fn(int irq, void *dev_id)
{
...
}@@
identifier rule1.fn;
expression E1, E2, E3;
@@fn(E1, E2
- ,E3
)Signed-off-by: Yoann Padioleau
Cc: "David S. Miller"
Cc: Jeff Garzik
Cc: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
o Commit 1833d6bc72893265f22addd79cf52e6987496e0f broke the build if
compiled with CONFIG_ES7000=y and CONFIG_X86_GENERICARCH=narch/i386/kernel/built-in.o(.init.text+0x4fa9): In function `acpi_parse_madt':
: undefined reference to `acpi_madt_oem_check'
arch/i386/kernel/built-in.o(.init.text+0x7406): In function `smp_read_mpc':
: undefined reference to `mps_oem_check'
arch/i386/kernel/built-in.o(.init.text+0x8990): In function
`connect_bsp_APIC':
: undefined reference to `enable_apic_mode'
make: *** [.tmp_vmlinux1] Error 1o Fix the build issue. Provided the definitions of missing functions.
o Don't have ES7000 machine. Only compile tested.
Cc: Len Brown
Cc: Natalie Protasevich
Cc: Roland Dreier
Cc: Andi Kleen
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When we enable the SMCf010 IR device, the Toshiba Portege 4000 BIOS claims
the device is working, but it really isn't configured correctly. The BIOS
*will* configure it, but only if we call _SRS after (1) reversing the order
of the SIR and FIR I/O port regions and (2) changing the IRQ from
active-high to active-low.This patch addresses the 2.6.22 regression:
"no irda0 interface (2.6.21 was OK), smsc does not find chip"I tested this on a Portege 4000. The smsc-ircc2 driver correctly detects
the device, and "irattach irda0 -s && irdadump" shows transmitted and
received packets.Signed-off-by: Bjorn Helgaas
Cc: Andrey Borzenkov
Cc: Samuel Ortiz
Cc: "Linus Walleij (LD/EAB)"
Cc: Michal Piotrowski
Cc: Adam Belay
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When calling a semctl(IPC_STAT) without IPC_64 the check if the memory is
unevaluated. This patch fixes this.Signed-off-by: Alexander Graf
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
A bug in headers_install for ARCH=x86_64 yields an asm/ directory full of
files all of which are using the same #ifdef guard, "__ASM_STUB_" with no
postfix. So the second and later asm files #included in the same C file
(often through standard headers like ioctl.h) yields no symbols.Strangeness with the Ubuntu 'tell me if I support something that's not
explcitly mentioned in POSIX, and I'll strip it out' shell, I believe.We don't need the 'export' but we do need a semicolon at the end of the
FNAME line:Signed-off-by: David Woodhouse
Signed-off-by: Rob Landley
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Processors synchronization in set_mtrr requires the .gate field to be set
after .count field is properly initialized. Without an explicit barrier,
the compiler was reordering those memory stores. That was sometimes
causing a processor (in ipi_handler) to see the .gate change and decrement
.count before the latter is set by set_mtrr() (which then hangs in a
infinite loop with irqs disabled).Signed-off-by: Loic Prylli
Cc: Andi Kleen
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The commit 635cf99a80f4ebee59d70eb64bb85ce829e4591f introduced a
regression. Executing a ptrace single step after certain int80
accesses will infinitely loop and never advance the PC.The TIF_SINGLESTEP check should be done on the return from the syscall
and not before it.I loops on each single step on the pop right after the int80 which writes out
to the console. At that point you can issue as many single steps as you want
and it will not advance any further.The test case is below:
/* Test whether singlestep through an int80 syscall works.
*/
#define _GNU_SOURCE
#include
#include
#include
#include
#include
#include
#include
#includestatic int child, status;
static struct user_regs_struct regs;static void do_child()
{
char str[80] = "child: int80 test\n";ptrace(PTRACE_TRACEME, 0, 0, 0);
kill(getpid(), SIGUSR1);
write(fileno(stdout),str,strlen(str));
asm ("int $0x80" : : "a" (20)); /* getpid */
}static void do_parent()
{
unsigned long eip, expected = 0;
again:
waitpid(child, &status, 0);
if (WIFEXITED(status) || WIFSIGNALED(status))
return;if (WIFSTOPPED(status)) {
ptrace(PTRACE_GETREGS, child, 0, ®s);
eip = regs.eip;
if (expected)
fprintf(stderr, "child stop @ %08lx, expected %08lx %s\n",
eip, expected,
eip == expected ? "" : "
Cc: Jeremy Fitzhardinge
Cc:
Cc: Chuck Ebbert
Acked-by: Andi Kleen
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
elf_core_dump() supports dumping arch specific ELF notes, via the #define
ELF_CORE_WRITE_EXTRA_NOTES. Currently the only user of this is the powerpc
spu coredump code.There is a bug in the handling of foffset WRT the arch notes, which causes
us to erroneously increment foffset by the size of the arch notes, leaving
a block of zeroes in the file, and causing all subsequent data in the file
to be at + . eg:LOAD 0x050000 0x00100000 0x00000000 0x20000 0x20000 R E 0x10000
Tells us we should have a chunk of data at 0x50000. The truth is the data
is at 0x90dbc = 0x50000 + 0x40dbc (the size of the arch notes).This bug prevents gdb from reading the core file correctly.
The simplest fix is to simply remember the size of the arch notes, and add
it to foffset after we've written the arch notes. The only drawback is
that if the arch code doesn't write as many bytes as it said it would, we
end up with a broken core dump again. For now I think that's a reasonable
requirement.Tested on a Cell blade, gdb no longer complains about the core file being
bogus.While I'm here I should point out that the spu coredump code does not work
if we're dumping to a pipe - we'll have to wait for 23 to fix that.Signed-off-by: Michael Ellerman
Acked-by: Arnd Bergmann
Acked-by: Benjamin Herrenschmidt
Acked-by: Paul Mackerras
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
06 Jul, 2007
5 commits
-
* master.kernel.org:/home/rmk/linux-2.6-arm:
[ARM] always allow dump_stack() to produce a backtrace
[ARM] Fix non-page aligned boot time mappings
[ARM] 4458/1: pxa: Fix CKEN usage and hence fix pxa suspend/resume
[ARM] 4454/1: Use word accesses in Versatile PCI config reads -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: document some of keycodes
Input: add a new EV_SW SW_RADIO event, for radio switches on laptops
Input: serio - take drv_mutex in serio_cleanup()
Input: atkbd - use printk_ratelimit for spurious ACK messages
Input: atkbd - throttle LED switching
Input: i8042 - add HP Pavilion ZT1000 to the MUX blacklist -
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
[POWERPC] Update defconfigs
[POWERPC] Uninline and export virq_to_hw() for the pasemi_mac driver
[POWERPC] Fix PMI breakage in cbe_cbufreq driver
[POWERPC] Disable old EMAC driver in arch/powerpc -
Commit b46b8f19c9cd435ecac4d9d12b39d78c137ecd66 fixed a couple of bugs
by switching the redzone to 64 bits. Unfortunately, it neglected to
ensure that the _second_ redzone, after the slab object, is aligned
correctly. This caused illegal instruction faults on sparc32, which for
some reason not entirely clear to me are not trapped and fixed up.Two things need to be done to fix this:
- increase the object size, rounding up to alignof(long long) so
that the second redzone can be aligned correctly.
- If SLAB_STORE_USER is set but alignof(long long)==8, allow a
full 64 bits of space for the user word at the end of the buffer,
even though we may not _use_ the whole 64 bits.This patch should be a no-op on any 64-bit architecture or any 32-bit
architecture where alignof(long long) == 4. Of the others, it's tested
on ppc32 by myself and a very similar patch was tested on sparc32 by
Mark Fortescue, who reported the new problem.Also, fix the conditions for FORCED_DEBUG, which hadn't been adjusted to
the new sizes. Again noticed by Mark.Signed-off-by: David Woodhouse
Signed-off-by: Linus Torvalds -
Don't make this dependent on CONFIG_DEBUG_KERNEL - if we hit a WARN_ON
we need the stack trace to work out how we got to that point.Signed-off-by: Russell King
05 Jul, 2007
3 commits
-
Yeah, we could have just disabled it, but there's work on a new one that
isn't as fundamentally broken, so there really doesn't seem to be any
point in keeping it around.The recent timer cleanup broke the only valid use, and when I say
"valid", I obviously mean "totally broken". So it's not like it works,
or really even can work in the current format that uses the unsafe
"panic" LED blinking routines..Signed-off-by: Linus Torvalds
-
AT91SAM9260 stopped booting with the recent changes to MM
initialisation - it was asking for a non-aligned virtual address
which caused loops to be non-terminal. Fix this by rounding
virtual addresses down, but remember to include the offset in
the length, and round the length up to the following page.This means that asking for a mapping of 4K starting at 2K into
a page maps two pages as one would expect.Signed-off-by: Russell King
-
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
[MIPS] VSMP: Fix initialization ordering bug.
[MIPS] Add whitelists for checksyscalls.sh
[MIPS] die(): Properly declare as non-returning
[MIPS] Fix include wrapper symbol definitions in IP32 code.
04 Jul, 2007
24 commits
-
Signed-off-by: Ralf Baechle
-
Signed-off-by: Atsushi Nemoto
Signed-off-by: Ralf Baechle -
This marks the declaration of die() correctly, removing "control reaches
end of non-void function" warnings from non-void functions that die() at
the end.Signed-off-by: Maciej W. Rozycki
Signed-off-by: Ralf Baechle -
Some IP35 defines snuck into some IP32-specific code during the DMA re-write.
Signed-off-by: Joshua Kinard
Signed-off-by: Ralf Baechle -
We should have stopped returning 1 from read_dnode() to indicate
failure. We can just mark the damn thing obsolete immediately. But I
missed a case where we don't.Signed-off-by: David Woodhouse
-
When Andi reverted the HPET resource reservation (in commit
0f8dc2f06560e2ca126d1670a24126ba08357d38), he didn't remove the now
unused variables, which just causes gcc to be noisy.Signed-off-by: Linus Torvalds
-
Badari Pulavarty reported a case of this BUG_ON is triggering during
testing. It's completely bogus and should be removed.It's trying to notice if we left references to the dio hanging around in
the sync case. They should have been dropped as IO completed while this
path was in dio_await_completion(). This condition will also be
checked, via some twisty logic, by the BUG_ON(ret != -EIOCBQUEUED) a few
lines lower. So to start this BUG_ON() is redundant.More fatally, it's dereferencing dio-> after having dropped its
reference. It's only safe to dereference the dio after releasing the
lock if the final reference was just dropped. Another CPU might free
the dio in bio completion and reuse the memory after this path drops the
dio lock but before the BUG_ON() is evaluated.This patch passed aio+dio regression unit tests and aio-stress on ext3.
Signed-off-by: Zach Brown
Cc: Badari Pulavarty
Cc: Andrew Morton
Signed-off-by: Linus Torvalds -
With this change it works again when the nmi watchdog is disabled.
Signed-off-by: Andi Kleen
Cc: Björn Steinbrink
Cc: Stephane Eranian
Cc: Andrew Morton
Signed-off-by: Linus Torvalds -
Matthias Lenk reports that the PCI subsystem would move the HPET on
SB400/SB600-based systems, where the HPET is in BAR1 of the SMbus
controller.The reason? The ACPI layer registered the PCI MMIO range as being busy
too early, before PCI enumeration had happened, causing the PCI layer to
decide that it should relocate the resources somewhere else.Firmware resources should be marked busy _after_ the PCI enumeration and
probing has happened, not before.Remove the too-early reservation, we'll fix it up to do it properly
later. In the meantime, this solves the regression.Tested-by: Matthias Lenk
Cc: Aaron Durbin
Cc: Andrew Morton
Signed-off-by: Linus Torvalds -
* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6:
ide: ide_scan_pcibus(): check __pci_register_driver return value
ide: pdc202xx_new PLL input clock fix
it821x: fix incorrect SWDMA mask
amd74xx: resume fix
hpt366: use correct enablebits for HPT36x
hpt366: blacklist MAXTOR STM3320620A for UltraDMA/66
ide: Fix a theoretical Ooops case
ide: never called printk statement in ide-taskfile.c::wait_drive_not_busy -
* 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
V4L/DVB (5822): Fix the return value in ttpci_budget_init()
V4L/DVB (5818): CinergyT2: fix flush_workqueue() vs work->func() deadlock
V4L/DVB (5816): Cx88-blackbird: fix vidioc_g_tuner never ending list of tuners
V4L/DVB (5808): Bttv: fix v4l1 breaking the driver -
If we move the local_irq_enable() to the end of the function then
add_partial() in early_kmem_cache_node_alloc() will be called
with interrupts disabled like during regular operations.This makes lockdep happy.
Signed-off-by: Christoph Lameter
Tested-by: Andre Noll
Acked-by: Ingo Molnar
Signed-off-by: Linus Torvalds -
The clock_was_set() call in seconds_overflow() which happens only when
leap seconds are inserted / deleted is wrong in two aspects:1. it results in a call to on_each_cpu() with interrupts disabled
2. it is potential deadlock source vs. call_lock in smp_call_function()The only possible side effect of the removal might be, that an absolute
CLOCK_REALTIME timer fires 1 second too late, in the rare case of leap
second deletion and an absolute CLOCK_REALTIME timer which expires in
the affected time frame. It will never fire too early.This was probably observed by the reporter of a June 30th -> July 1st
hang: http://lkml.org/lkml/2007/7/3/103A similar problem was observed by Dave Jones, who provided a screen shot
with a lockdep back trace, which allowed to analyse the problem.Signed-off-by: Thomas Gleixner
Acked-by: Ingo Molnar
Signed-off-by: Linus Torvalds -
drivers/ide/setup-pci.c: In function 'ide_scan_pcibus':
drivers/ide/setup-pci.c:879: warning: ignoring return value of '__pci_register_driver', declared with attribute warn_unused_resultSigned-off-by: Andrew Morton
Signed-off-by: Bartlomiej Zolnierkiewicz -
Recently the PLL input clock of Promise 2027x is sometimes detected
higher than expected (e.g. 20.027 MHz compared to 16.714 MHz).
It seems sometimes the mdelay() function is not as precise as it
used to be. Per Alan's advice, HT or power management might affect
the precision of mdelay().This patch calls gettimeofday() to measure the time elapsed and
calculate the PLL input clock accordingly.Signed-off-by: Albert Lee
Cc: Alan Cox
Cc: Bahadir Balban
Acked-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz -
SWDMA modes are unsupported by it821x. Attempts to tune SWDMA modes always
fail (due to sanity check in ->speedproc) and result in PIO being tuned.* Fix incorrect SWDMA mask so core code won't try these modes and will just
tune PIO if no other DMA modes are available.* Bump driver version.
Signed-off-by: Bartlomiej Zolnierkiewicz
Acked-by: Sergei Shtylyov -
* Driver can't skip programming transfer mode on the device in amd_set_drive()
(similar fix has been applied to via82cxxx driver ages ago).* While at it remove redundant warning (ide_config_drive_speed() already
produces more valuable one).* Bump driver version.
Signed-off-by: Bartlomiej Zolnierkiewicz
-
The HPT36x chips finally turned out to have the channel enable bits -- however,
badly implemented. Make use of them despite it's probably only going to burden
the driver's code -- assuming both channels are always enabled by the HighPoint
BIOS anyway...Signed-off-by: Sergei Shtylyov
Acked-by: Linas Vepstas
Cc: michal.kepien@poczta.onet.pl
Signed-off-by: Bartlomiej Zolnierkiewicz -
Add the MAXTOR STM3320620A drive into the UltraDMA/66 mode blacklist
for the HPT36x chips.Signed-off-by: Sergei Shtylyov
Acked-by: Linas Vepstas
Signed-off-by: Bartlomiej Zolnierkiewicz -
Found by a static analyser. It is in theory possible we dereference
dev->id when it has become invalid. Re-order to avoid this.Not needed for new-ide as we no longer support the crazy exabyte nest stuff
Signed-off-by: Alan Cox
Cc: Andrew Morton
Signed-off-by: Bartlomiej Zolnierkiewicz -
Look at wait_drive_not_busy in drivers/ide/ide-taskfile.c:
static u8 wait_drive_not_busy(ide_drive_t *drive)
{
ide_hwif_t *hwif = HWIF(drive);
int retries = 100;
u8 stat;/*
* Last sector was transfered, wait until drive is ready.
* This can take up to 10 usec, but we will wait max 1 ms
* (drive_cmd_intr() waits that long).
*/
while (((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) && retries--)
udelay(10);if (!retries)
printk(KERN_ERR "%s: drive still BUSY!\n", drive->name);return stat;
}`printk' is never called because `retries' never holds zero at the
outside of `while' loop: when `retries' holds zero at the while's loop
condition, `retries' will hold -1 at the if condition.Signed-off-by: Masatake YAMATO
Cc: Chuck Ebbert
Cc: joe@perches.com
Signed-off-by: Bartlomiej Zolnierkiewicz -
if the call to budget_register() fails in ttpci_budget_int(),
ttpci_budget_init() returns success. The attached patch will
fix this problem.Signed-off-by: Hartmut Birr
Signed-off-by: Michael Krufky
Signed-off-by: Mauro Carvalho Chehab -
Spotted and tested by Thomas Sattler .
cinergyT2.c does cancel_delayed_work() + flush_scheduled_work() while
holding cinergyt2->sem. This leads to deadlock because work->func()
needs the same mutex to complete. Another bug is that this code in fact
can't reliably stop the re-arming delayed_work.Convert this code to use cancel_rearming_delayed_work() and move it
out of ->sem. Another mutex, ->wq_sem, was added to protect against the
concurrent open/resume.This patch is a horrible hack to fix the lockup which happens in practice.
As Dmitry Torokhov pointed out this driver has other problems and needs
further changes.Signed-off-by: Oleg Nesterov
Signed-off-by: Mauro Carvalho Chehab -
v4l-info and other programs would loop indefinitely while querying the
tuners for cx88-blackbird cards.The cause was that vidioc_g_tuner didn't return an error value for
qctrl->id != 0, making the application think there is a never ending
list of tuners...This patch adds the same index check as done in vidioc_g_tuner() in
cx88-video.Signed-off-by: Jelle Foks
Signed-off-by: Michael Krufky
Signed-off-by: Mauro Carvalho Chehab