]> err.no Git - linux-2.6/log
linux-2.6
18 years ago[POWERPC] MSI abstraction
Jake Moilanen [Wed, 7 Jun 2006 21:15:10 +0000 (16:15 -0500)]
[POWERPC] MSI abstraction

Instead of trying to make PPC64 MSI fit in a Intel-centric MSI layer, a
simple short-term solution is to hook the pci_{en/dis}able_msi() calls
and make a machdep call.

The rest of the MSI functions are superfluous for what is needed at this
time.  Many of which can have machdep calls added as needed.

Ben and Michael Ellerman are looking into rewrite the MSI layer to be
more generic.  However, in the meantime this works as a interim
solution.

Signed-off-by: Jake Moilanen <moilanen@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[POWERPC] Add support for PCI-Express nodes in the device tree
Jake Moilanen [Wed, 7 Jun 2006 21:05:46 +0000 (16:05 -0500)]
[POWERPC] Add support for PCI-Express nodes in the device tree

This adds support to recognize the PCIe device_type "pciex" and made
the portdrv buildable.

Signed-off-by: Jake Moilanen <moilanen@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years agopowerpc: Simplify push_end definition in pci_32.c
Paul Mackerras [Thu, 15 Jun 2006 08:03:32 +0000 (18:03 +1000)]
powerpc: Simplify push_end definition in pci_32.c

The push_end macro in arch/powerpc/kernel/pci_32.c uses integer
division and multiplication to achieve the effect of rounding a
resource end address up and then advancing it to the end of a
power-of-2 sized region.  This changes it to an equivalent computation
that only needs an integer add and OR.  This is partly based on an
earlier patch by Mel Gorman.

Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years agopowerpc: Use 64k pages without needing cache-inhibited large pages
Paul Mackerras [Thu, 15 Jun 2006 00:45:18 +0000 (10:45 +1000)]
powerpc: Use 64k pages without needing cache-inhibited large pages

Some POWER5+ machines can do 64k hardware pages for normal memory but
not for cache-inhibited pages.  This patch lets us use 64k hardware
pages for most user processes on such machines (assuming the kernel
has been configured with CONFIG_PPC_64K_PAGES=y).  User processes
start out using 64k pages and get switched to 4k pages if they use any
non-cacheable mappings.

With this, we use 64k pages for the vmalloc region and 4k pages for
the imalloc region.  If anything creates a non-cacheable mapping in
the vmalloc region, the vmalloc region will get switched to 4k pages.
I don't know of any driver other than the DRM that would do this,
though, and these machines don't have AGP.

When a region gets switched from 64k pages to 4k pages, we do not have
to clear out all the 64k HPTEs from the hash table immediately.  We
use the _PAGE_COMBO bit in the Linux PTE to indicate whether the page
was hashed in as a 64k page or a set of 4k pages.  If hash_page is
trying to insert a 4k page for a Linux PTE and it sees that it has
already been inserted as a 64k page, it first invalidates the 64k HPTE
before inserting the 4k HPTE.  The hash invalidation routines also use
the _PAGE_COMBO bit, to determine whether to look for a 64k HPTE or a
set of 4k HPTEs to remove.  With those two changes, we can tolerate a
mix of 4k and 64k HPTEs in the hash table, and they will all get
removed when the address space is torn down.

Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years agopowerpc: Fix some missed ppc32 mm->context.id conversions
Paul Mackerras [Tue, 13 Jun 2006 03:43:00 +0000 (13:43 +1000)]
powerpc: Fix some missed ppc32 mm->context.id conversions

Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years agopowerpc: Remove unused paca->pgdir field
Paul Mackerras [Mon, 12 Jun 2006 08:38:21 +0000 (18:38 +1000)]
powerpc: Remove unused paca->pgdir field

The pgdir field in the paca was a leftover from the dynamic VSIDs
patch, and is not used in the current kernel code.  This removes it.

Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years agoMerge branch 'merge'
Paul Mackerras [Mon, 12 Jun 2006 07:53:34 +0000 (17:53 +1000)]
Merge branch 'merge'

18 years ago[PATCH] Fix for the PPTP hangs that have been reported
Paul Mackerras [Mon, 12 Jun 2006 02:16:26 +0000 (12:16 +1000)]
[PATCH] Fix for the PPTP hangs that have been reported

People have been reporting that PPP connections over ptys, such as
used with PPTP, will hang randomly when transferring large amounts of
data, for instance in http://bugzilla.kernel.org/show_bug.cgi?id=6530.
I have managed to reproduce the problem, and the patch below fixes the
actual cause.

The problem is not in fact in ppp_async.c but in n_tty.c.  What
happens is that when pptp reads from the pty, we call read_chan() in
drivers/char/n_tty.c on the master side of the pty.  That copies all
the characters out of its buffer to userspace and then calls
check_unthrottle(), which calls the pty unthrottle routine, which
calls tty_wakeup on the slave side, which calls ppp_asynctty_wakeup,
which calls tasklet_schedule.  So far so good.  Since we are in
process context, the tasklet runs immediately and calls
ppp_async_process(), which calls ppp_async_push, which calls the
tty->driver->write function to send some more output.

However, tty->driver->write() returns zero, because the master
tty->receive_room is still zero.  We haven't returned from
check_unthrottle() yet, and read_chan() only updates tty->receive_room
_after_ calling check_unthrottle.  That means that the driver->write
call in ppp_async_process() returns 0.  That would be fine if we were
going to get a subsequent wakeup call, but we aren't (we just had it,
and the buffer is now empty).

The solution is for n_tty.c to update tty->receive_room _before_
calling the driver unthrottle routine.  The patch below does this.
With this patch I was able to transfer a 900MB file over a PPTP
connection (taking about 25 minutes), whereas without the patch the
connection would always stall in under a minute.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
Linus Torvalds [Sun, 11 Jun 2006 22:28:04 +0000 (15:28 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6:
  [PATCH] PCI: reverse pci config space restore order
  [PATCH] PCI: Improve PCI config space writeback
  [PATCH] PCI: Error handling on PCI device resume
  [PATCH] PCI: fix pciehp compile issue when CONFIG_ACPI is not enabled

18 years ago[PATCH] typo in vmscan.c
Christoph Lameter [Sun, 11 Jun 2006 22:22:26 +0000 (15:22 -0700)]
[PATCH] typo in vmscan.c

From: Christoph Lameter <clameter@sgi.com>

Looks like a comma was left from the conversion from a struct to an
assignment.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] PCI: reverse pci config space restore order
Yu, Luming [Tue, 25 Apr 2006 07:00:34 +0000 (00:00 -0700)]
[PATCH] PCI: reverse pci config space restore order

According to Intel ICH spec, there are several rules that Base Address
should be programmed before IOSE  (PCICMD register ) enabled.

For example ICH7:

12.1.3  SATA : the base address register for the bus master register
               should be programmed before this bit is set.

11.1.3:  PCICMD (USB): The base address register for USB should be
                       programmed before this bit is set.
....

To make sure kernel code follow this rule , and prevent unnecessary
confusion. I proposal this patch.

Signed-off-by: Luming Yu <luming.yu@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] PCI: Improve PCI config space writeback
Dave Jones [Wed, 19 Apr 2006 04:06:51 +0000 (21:06 -0700)]
[PATCH] PCI: Improve PCI config space writeback

At least one laptop blew up on resume from suspend with a black screen due
to a lack of this patch.  By only writing back config space that is
different, we minimise the possibility of accidents like this.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] PCI: Error handling on PCI device resume
Jean Delvare [Tue, 18 Apr 2006 12:49:56 +0000 (14:49 +0200)]
[PATCH] PCI: Error handling on PCI device resume

We currently don't handle errors properly when resuming a PCI device:
* In pci_default_resume() we capture the error code returned by
  pci_enable_device() but don't pass it up to the caller.
  Introduced by commit 95a629657dbe28e44a312c47815b3dc3f1ce0970
* In pci_resume_device(), the errors possibly returned by the driver's
  .resume method or by the generic pci_default_resume() function are
  ignored.

This patch fixes both issues.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] PCI: fix pciehp compile issue when CONFIG_ACPI is not enabled
akpm@osdl.org [Sat, 13 May 2006 15:30:52 +0000 (08:30 -0700)]
[PATCH] PCI: fix pciehp compile issue when CONFIG_ACPI is not enabled

Fix build error when CONFIG_ACPI not defined

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[SPARC]: Migration cost tune up in sparc smp.
Krzysztof Helt [Sun, 11 Jun 2006 05:03:43 +0000 (22:03 -0700)]
[SPARC]: Migration cost tune up in sparc smp.

This patch sets the max_cache_size value required to tune up
scheduler in SMP systems. Otherwise, the calculated
migration_cost is too high and task scheduling may lock up.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Set appropriate max_cache_size.
David S. Miller [Sun, 11 Jun 2006 05:02:17 +0000 (22:02 -0700)]
[SPARC64]: Set appropriate max_cache_size.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years agopowerpc: add context.vdso_base for 32-bit too
Paul Mackerras [Sun, 11 Jun 2006 04:15:17 +0000 (14:15 +1000)]
powerpc: add context.vdso_base for 32-bit too

This adds a vdso_base element to the mm_context_t for 32-bit compiles
(both for ARCH=powerpc and ARCH=ppc).  This fixes the compile errors
that have been reported in arch/powerpc/kernel/signal_32.c.

Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Sat, 10 Jun 2006 18:03:51 +0000 (11:03 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Avoid JBUS errors on some Niagara systems.
  [FUSION]: Fix mptspi.c build with CONFIG_PM not set.
  [TG3]: Handle Sun onboard tg3 chips more correctly.
  [SPARC64]: Dump local cpu registers in sun4v_log_error()

18 years ago[PATCH] powerpc: console_initcall ordering issues
Milton Miller [Sat, 10 Jun 2006 16:54:16 +0000 (09:54 -0700)]
[PATCH] powerpc: console_initcall ordering issues

From: Milton Miller <miltonm@bga.com>

The add_preferred_console call in rtas_console.c was not causing the
console to be selected.  It turns out that the add_preferred_console was
being called after the hvc_console driver was registered.  It only works
when it is called before the console driver is registered.

Reorder hvc_console.o after the hvc_console drivers to allow the selection
during console_initcall processing.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] I2O: Bugfixes to get I2O working again
Markus Lidel [Sat, 10 Jun 2006 16:54:14 +0000 (09:54 -0700)]
[PATCH] I2O: Bugfixes to get I2O working again

From: Markus Lidel <Markus.Lidel@shadowconnect.com>

- Fixed locking of struct i2o_exec_wait in Executive-OSM

- Removed LCT Notify in i2o_exec_probe() which caused freeing memory and
  accessing freed memory during first enumeration of I2O devices

- Added missing locking in i2o_exec_lct_notify()

- removed put_device() of I2O controller in i2o_iop_remove() which caused
  the controller structure get freed to early

- Fixed size of mempool in i2o_iop_alloc()

- Fixed access to freed memory in i2o_msg_get()

See http://bugzilla.kernel.org/show_bug.cgi?id=6561

Signed-off-by: Markus Lidel <Markus.Lidel@shadowconnect.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] powernow-k8 crash workaround
Andrew Morton [Sat, 10 Jun 2006 16:54:13 +0000 (09:54 -0700)]
[PATCH] powernow-k8 crash workaround

From: Andrew Morton <akpm@osdl.org>

Work around the oops reported in
http://bugzilla.kernel.org/show_bug.cgi?id=6478.

Thanks to Ralf Hildebrandt <ralf.hildebrandt@charite.de> for testing and
reporting.

Acked-by: Dave Jones <davej@codemonkey.org.uk>
Cc: "Brown, Len" <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Further alterations for memory barrier document
David Howells [Sat, 10 Jun 2006 16:54:12 +0000 (09:54 -0700)]
[PATCH] Further alterations for memory barrier document

From: David Howells <dhowells@redhat.com>

Apply some alterations to the memory barrier document that I worked out
with Paul McKenney of IBM, plus some of the alterations suggested by Alan
Stern.

The following changes were made:

 (*) One of the examples given for what can happen with overlapping memory
     barriers was wrong.

 (*) The description of general memory barriers said that a general barrier is
     a combination of a read barrier and a write barrier.  This isn't entirely
     true: it implies both, but is more than a combination of both.

 (*) The first example in the "SMP Barrier Pairing" section was wrong: the
     loads around the read barrier need to touch the memory locations in the
     opposite order to the stores around the write barrier.

 (*) Added a note to make explicit that the loads should be in reverse order to
     the stores.

 (*) Adjusted the diagrams in the "Examples Of Memory Barrier Sequences"
     section to make them clearer.  Added a couple of diagrams to make it more
     clear as to how it could go wrong without the barrier.

 (*) Added a section on memory speculation.

 (*) Dropped any references to memory allocation routines doing memory
     barriers.  They may do sometimes, but it can't be relied on.  This may be
     worthy of further documentation later.

 (*) Made the fact that a LOCK followed by an UNLOCK should not be considered a
     full memory barrier more explicit and gave an example.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Paul E. McKenney <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Sat, 10 Jun 2006 17:59:39 +0000 (10:59 -0700)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [PATCH] powerpc: Fix cell blade detection
  [PATCH] powerpc: Fix call to ibm,client-architecture-support
  powerpc: Fix machine check problem on 32-bit kernels

18 years agopowerpc: Fix bug in iommu_alloc_coherent causing hang during boot
Paul Mackerras [Sat, 10 Jun 2006 08:17:35 +0000 (18:17 +1000)]
powerpc: Fix bug in iommu_alloc_coherent causing hang during boot

In commit 8eb6c6e3b9c8bfed3d75536ab142d7694627c2e5, Christoph Hellwig
made iommu_alloc_coherent able to do node-local allocations, but
unfortunately got the order of the arguments to alloc_pages_node
wrong.  This fixes it.

Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[SPARC64]: Avoid JBUS errors on some Niagara systems.
David S. Miller [Sat, 10 Jun 2006 08:06:25 +0000 (01:06 -0700)]
[SPARC64]: Avoid JBUS errors on some Niagara systems.

Doing PCI config space accesses to non-present PCI slots
can result in fatal JBUS errors if the PCI config access
hypervisor call is performed on cpus other than the boot
cpu.

PCI config space accesses to present PCI slots works just
fine.

Recursively traverse the OBP device tree under the PCI
controller node and record all present device IDs into
a small hash table.

Avoid the hypervisor call for any PCI config space access
attempt for a device not recorded in the hash table.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[FUSION]: Fix mptspi.c build with CONFIG_PM not set.
Tom "spot" Callaway [Sat, 10 Jun 2006 00:01:48 +0000 (17:01 -0700)]
[FUSION]: Fix mptspi.c build with CONFIG_PM not set.

Signed-off-by: Tom "spot" Callaway <tcallawa@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TG3]: Handle Sun onboard tg3 chips more correctly.
David S. Miller [Fri, 9 Jun 2006 18:58:36 +0000 (11:58 -0700)]
[TG3]: Handle Sun onboard tg3 chips more correctly.

Get rid of all the SUN_570X logic and instead:

1) Make sure MEMARB_ENABLE is set when we probe the SRAM
   for config information.  If that is off we will get
   timeouts.

2) Always try to sync with the firmware, if there is no
   firmware running do not treat it as an error and instead
   just report it the first time we notice this condition.

3) If there is no valid SRAM signature, assume the device
   is onboard by setting TG3_FLAG_EEPROM_WRITE_PROT.

Update driver version and release date.

With help from Michael Chan and Fabio Massimo Di Nitto.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Dump local cpu registers in sun4v_log_error()
David S. Miller [Wed, 7 Jun 2006 00:37:41 +0000 (17:37 -0700)]
[SPARC64]: Dump local cpu registers in sun4v_log_error()

This makes the debugging information more usable.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[PATCH] powerpc: Cleanup hvc_rtas.c a little
Michael Ellerman [Wed, 7 Jun 2006 07:10:09 +0000 (17:10 +1000)]
[PATCH] powerpc: Cleanup hvc_rtas.c a little

A few cleanups in hvc_rtas.c:
 1. Remove unused RTASCONS_PUT_ATTEMPTS
 2. Remove unused rtascons_put_delay.
 3. Use i as a loop counter like everyone else on earth.
 4. Remove pointless variables, eg. x = foo; if (x) return something_else;
 5. Whitespace cleanups and formatting.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Make rtas console _much_ faster
Michael Ellerman [Wed, 7 Jun 2006 07:10:03 +0000 (17:10 +1000)]
[PATCH] powerpc: Make rtas console _much_ faster

Currently the hvc_rtas driver is painfully slow to use. Our "benchmark" is
ls -R /etc, which spits out about 27866 characters. The theoretical maximum
speed would be about 2.2 seconds, the current code takes ~50 seconds.

The core of the problem is that sometimes when the tty layer asks us to push
characters the firmware isn't able to handle some or all of them, and so
returns an error. The current code sees this and just returns to the tty code
with the buffer half sent.

The khvcd thread will eventually wake up and try to push more characters, which
will usually work because by then the firmware's had time to make room. But
the khvcd thread only wakes up every 10 milliseconds, which isn't fast enough.

So change the khvcd thread logic so that if there's an incomplete write we
yield() and then immediately try writing again. Doing so makes POLL_QUICK and
POLL_WRITE synonymous, so remove POLL_QUICK.

With this patch our "benchmark" takes ~2.8 seconds.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Implement PR_[GS]ET_UNALIGN prctls for powerpc
Paul Mackerras [Wed, 7 Jun 2006 06:15:39 +0000 (16:15 +1000)]
[PATCH] powerpc: Implement PR_[GS]ET_UNALIGN prctls for powerpc

This gives the ability to control whether alignment exceptions get
fixed up or reported to the process as a SIGBUS, using the existing
PR_SET_UNALIGN and PR_GET_UNALIGN prctls.  We do not implement the
option of logging a message on alignment exceptions.

Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Implement support for setting little-endian mode via prctl
Paul Mackerras [Wed, 7 Jun 2006 06:14:40 +0000 (16:14 +1000)]
[PATCH] powerpc: Implement support for setting little-endian mode via prctl

This adds the PowerPC part of the code to allow processes to change
their endian mode via prctl.

This also extends the alignment exception handler to be able to fix up
alignment exceptions that occur in little-endian mode, both for
"PowerPC" little-endian and true little-endian.

We always enter signal handlers in big-endian mode -- the support for
little-endian mode does not amount to the creation of a little-endian
user/kernel ABI.  If the signal handler returns, the endian mode is
restored to what it was when the signal was delivered.

We have two new kernel CPU feature bits, one for PPC little-endian and
one for true little-endian.  Most of the classic 32-bit processors
support PPC little-endian, and this is reflected in the CPU feature
table.  There are two corresponding feature bits reported to userland
in the AT_HWCAP aux vector entry.

This is based on an earlier patch by Anton Blanchard.

Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] Add a prctl to change the endianness of a process.
Anton Blanchard [Wed, 7 Jun 2006 06:10:19 +0000 (16:10 +1000)]
[PATCH] Add a prctl to change the endianness of a process.

This new prctl is intended for changing the execution mode of the
processor, on processors that support both a little-endian mode and a
big-endian mode.  It is intended for use by programs such as
instruction set emulators (for example an x86 emulator on PowerPC),
which may find it convenient to use the processor in an alternate
endianness mode when executing translated instructions.

Note that this does not imply the existence of a fully-fledged ABI for
both endiannesses, or of compatibility code for converting system
calls done in the non-native endianness mode.  The program is expected
to arrange for all of its system call arguments to be presented in the
native endianness.

Switching between big and little-endian mode will require some care in
constructing the instruction sequence for the switch.  Generally the
instructions up to the instruction that invokes the prctl system call
will have to be in the old endianness, and subsequent instructions
will have to be in the new endianness.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Add udbg-immortal kernel option
Benjamin Herrenschmidt [Wed, 7 Jun 2006 02:06:20 +0000 (12:06 +1000)]
[PATCH] powerpc: Add udbg-immortal kernel option

When debugging early kernel crashes that happen after console_init() and
before a proper console driver takes over, we often have to go hack into
udbg.c to prevent it from unregistering so we can "see" what is
happening. This patch adds a kernel command line option "udbg-immortal"
instead to avoid having to modify the kernel.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: oprofile support for POWER6
Michael Neuling [Thu, 8 Jun 2006 04:42:34 +0000 (14:42 +1000)]
[PATCH] powerpc: oprofile support for POWER6

POWER6 moves some of the MMCRA bits and also requires some bits to be
cleared each PMU interrupt.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Acked-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: node-aware dma allocations
Christoph Hellwig [Tue, 6 Jun 2006 14:11:35 +0000 (16:11 +0200)]
[PATCH] powerpc: node-aware dma allocations

Make sure dma_alloc_coherent allocates memory from the local node.  This
is important on Cell where we avoid going through the slow cpu
interconnect.

Note:  I could only test this patch on Cell, it should be verified on
some pseries machine by those that have the hardware.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: implement pcibus_to_node and pcibus_to_cpumask
Christoph Hellwig [Tue, 6 Jun 2006 14:09:39 +0000 (16:09 +0200)]
[PATCH] powerpc: implement pcibus_to_node and pcibus_to_cpumask

On 64bit powerpc we can find out what node a pci bus hangs off, so
implement the topology.h macros that export this information.

For 32bit this seems a little more difficult, but I don't know of 32bit
powerpc NUMA machines either, so let's leave it out for now.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: reorg RTAS delay code
John Rose [Mon, 5 Jun 2006 21:31:48 +0000 (16:31 -0500)]
[PATCH] powerpc: reorg RTAS delay code

This patch attempts to handle RTAS "busy" return codes in a more simple
and consistent manner.  Typical callers of RTAS shouldn't have to
manage wait times and delay calls.

This patch also changes the kernel to use msleep() rather than udelay()
when a runtime delay is necessary.  This will avoid CPU soft lockups
for extended delay conditions.

Signed-off-by: John Rose <johnrose@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc kbuild warning fix
Andrew Morton [Fri, 2 Jun 2006 03:36:04 +0000 (20:36 -0700)]
[PATCH] powerpc kbuild warning fix

From: Andrew Morton <akpm@osdl.org>

arch/powerpc/Kconfig:339:warning: leading whitespace ignored
arch/powerpc/Kconfig:347:warning: leading whitespace ignored
arch/powerpc/Kconfig:357:warning: leading whitespace ignored
arch/powerpc/Kconfig:373:warning: leading whitespace ignored
arch/powerpc/Kconfig:382:warning: leading whitespace ignored
arch/powerpc/Kconfig:394:warning: leading whitespace ignored
arch/powerpc/Kconfig:842:warning: leading whitespace ignored
arch/powerpc/Kconfig:847:warning: leading whitespace ignored

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: add num_pmcs to 970MP cputable entry
Anton Blanchard [Thu, 4 May 2006 19:44:26 +0000 (05:44 +1000)]
[PATCH] powerpc: add num_pmcs to 970MP cputable entry

The 970MP cputable entry needs a num_pmcs entry for oprofile to work.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: fix of_parse_dma_window
Will Schmidt [Tue, 30 May 2006 18:38:40 +0000 (13:38 -0500)]
[PATCH] powerpc: fix of_parse_dma_window

My js20 appears to lack the ibm,#dma- properties, and boot fails with a
"Kernel panic - not syncing: iommu_init_table: Can't allocate 0 bytes"
message.

This adds a fallback to the "#address-cells" property in case the
"#ibm,dma-address-cells" property is missing.   Tested on js20 and
power5 lpar.

Unless there is a more elegant solution... :-)

Signed-off-by: Will Schmidt <willschm@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Fix buglet with MMU hash management
Benjamin Herrenschmidt [Tue, 30 May 2006 04:14:19 +0000 (14:14 +1000)]
[PATCH] powerpc: Fix buglet with MMU hash management

Our MMU hash management code would not set the "C" bit (changed bit) in
the hardware PTE when updating a RO PTE into a RW PTE. That would cause
the hardware to possibly to a write back to the hash table to set it on
the first store access, which in addition to being a performance issue,
might also hit a bug when running with native hash management (non-HV)
as our code is specifically optimized for the case where no write back
happens.

Thus there is a very small therocial window were a hash PTE can become
corrupted if that HPTE has just been upgraded to read write, a store
access happens on it, and that races with another processor evicting
that same slot. Since eviction (caused by an almost full hash) is
extremely rare, the bug is very unlikely to happen fortunately.

This fixes by allowing the updating of the protection bits in the native
hash handling to also set (but not clear) the "C" bit, and, in order to
also improve performances in the general case, by always setting that
bit on newly inserted hash PTE so that writeback really never happens.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc vdso updates
Benjamin Herrenschmidt [Tue, 30 May 2006 03:51:37 +0000 (13:51 +1000)]
[PATCH] powerpc vdso updates

This patch cleans up some locking & error handling in the ppc vdso and
moves the vdso base pointer from the thread struct to the mm context
where it more logically belongs. It brings the powerpc implementation
closer to Ingo's new x86 one and also adds an arch_vma_name() function
allowing to print [vsdo] in /proc/<pid>/maps if Ingo's x86 vdso patch is
also applied.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: enable PPC_PTRACE_[GS]ETREGS on ppc32
Renzo Davoli [Sun, 21 May 2006 18:06:58 +0000 (20:06 +0200)]
[PATCH] powerpc: enable PPC_PTRACE_[GS]ETREGS on ppc32

I have tested PPC_PTRACE_GETREGS and PPC_PTRACE_SETREGS on umview.

I do not understand why historically these tags has been defined as
PPC_PTRACE_GETREGS and PPC_PTRACE_SETREGS instead of simply
PTRACE_[GS]ETREGS. The other "originality" is that the address must be
put into the "addr" field instead of the "data" field as stated in the
manual.

Signed-off-by: renzo davoli <renzo@cs.unibo.it>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Fix cell blade detection
Arnd Bergmann [Wed, 7 Jun 2006 02:04:18 +0000 (12:04 +1000)]
[PATCH] powerpc: Fix cell blade detection

The IBM Cell blade firmware might confuse the kernel to think it's a
pSeries machine. This fixes it for now. With a bit of luck, the firmware
will be updated to avoid that in the future but currently that patch is
needed.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Fix call to ibm,client-architecture-support
Benjamin Herrenschmidt [Wed, 7 Jun 2006 02:01:32 +0000 (12:01 +1000)]
[PATCH] powerpc: Fix call to ibm,client-architecture-support

The code in prom_init.c calling the firmware
ibm,client-architecture-support method on pSeries has a bug where it
fails to properly pass the instance handle of the firmware object when
trying to call a method. Result ranges from the call doing nothing to
the firmware crashing. (Found by Segher, thanks !)

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years agopowerpc: Fix machine check problem on 32-bit kernels
Paul Mackerras [Fri, 9 Jun 2006 03:02:59 +0000 (13:02 +1000)]
powerpc: Fix machine check problem on 32-bit kernels

This fixes a bug found by Dave Jones that means that it is possible
for userspace to provoke a machine check on 32-bit kernels.  This
also fixes a couple of other places where I found similar problems
by inspection.

Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years agoMerge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Thu, 8 Jun 2006 22:16:35 +0000 (15:16 -0700)]
Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

* 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  e1000: remove risky prefetch on next_skb->data
  e1000: fix ethtool test irq alloc as "probe"
  [PATCH] bcm43xx: add DMA rx poll workaround to DMA4

18 years ago[PATCH] s390: fix in-user atomic futex operation.
Martin Schwidefsky [Thu, 8 Jun 2006 08:36:20 +0000 (01:36 -0700)]
[PATCH] s390: fix in-user atomic futex operation.

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

__futex_atomic_op needs to do an atomic operation in the user address space,
not the kernel address space.  Add the missing sacf 256/sacf 0 to switch to
the secondary mode before doing the compare-and-swap.  In addition add
another fixup for catch specification exceptions if the compare-and-swap
address is not aligned.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] debugfs inode leak
Jens Axboe [Thu, 8 Jun 2006 08:26:39 +0000 (10:26 +0200)]
[PATCH] debugfs inode leak

Looking at the reiser4 crash, I found a leak in debugfs. In
debugfs_mknod(), we create the inode before checking if the dentry
already has one attached. We don't free it if that is the case.

These bugs happen quite often, I'm starting to think we should disallow
such coding in CodingStyle.

Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] elevator switching race
Jens Axboe [Thu, 8 Jun 2006 06:49:06 +0000 (08:49 +0200)]
[PATCH] elevator switching race

There's a race between shutting down one io scheduler and firing up the
next, in which a new io could enter and cause the io scheduler to be
invoked with bad or NULL data.

To fix this, we need to maintain the queue lock for a bit longer.
Unfortunately we cannot do that, since the elevator init requires to be
run without the lock held.  This isn't easily fixable, without also
changing the mempool API.  So split the initialization into two parts,
and alloc-init operation and an attach operation.  Then we can
preallocate the io scheduler and related structures, and run the attach
inside the lock after we detach the old one.

This patch has survived 30 minutes of 1 second io scheduler switching
with a very busy io load.

Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] fbcon: fix limited scroll in SCROLL_PAN_REDRAW mode
Malcom Parsons [Thu, 8 Jun 2006 07:43:42 +0000 (00:43 -0700)]
[PATCH] fbcon: fix limited scroll in SCROLL_PAN_REDRAW mode

From: Malcom Parsons <malcolm.parsons@gmail.com>

When scrolling up in SCROLL_PAN_REDRAW mode with a large limited scroll
region, the bottom few lines have to be redrawn.  Without this patch, the
wrong text is drawn into these lines, corrupting the display.

Observed in 2.6.14 when running an IRC client in the Nintendo DS linux
port.

I haven't tested if scrolling down has the same problem.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Fix mempolicy.h build error
Ralf Baechle [Thu, 8 Jun 2006 07:43:41 +0000 (00:43 -0700)]
[PATCH] Fix mempolicy.h build error

From: Ralf Baechle <ralf@linux-mips.org>

<linux/mempolicy.h> uses struct mm_struct and relies on a definition or
declaration somehow magically being dragged in which may result in a
build:

[...]
  CC      mm/mempolicy.o
In file included from mm/mempolicy.c:69:
include/linux/mempolicy.h:150: warning: Ã¢\80\98struct mm_structâ\80\99 declared inside parameter list
include/linux/mempolicy.h:150: warning: its scope is only this definition or declaration, which is probably not what you want
include/linux/mempolicy.h:175: warning: Ã¢\80\98struct mm_structâ\80\99 declared inside parameter list
mm/mempolicy.c:622: error: conflicting types for Ã¢\80\98do_migrate_pagesâ\80\99
include/linux/mempolicy.h:175: error: previous declaration of Ã¢\80\98do_migrate_pagesâ\80\99 was here
mm/mempolicy.c:1661: error: conflicting types for Ã¢\80\98mpol_rebind_mmâ\80\99
include/linux/mempolicy.h:150: error: previous declaration of Ã¢\80\98mpol_rebind_mmâ\80\99 was here
make[1]: *** [mm/mempolicy.o] Error 1
make: *** [mm] Error 2
[ralf@denk linux-ip35]$

Including <linux/sched.h> is a step into direction of include hell so
fixed by adding a forward declaration of struct mm_struct instead.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] ep93xx build fix
Lennert Buytenhek [Thu, 8 Jun 2006 07:43:40 +0000 (00:43 -0700)]
[PATCH] ep93xx build fix

From: Lennert Buytenhek <buytenh@wantstofly.org>

The recent renaming of m48t86's ->readb() and ->writeb() platform driver
methods (2d7b20c1884777e66009be1a533641c19c4705f6) to ->readbyte() and
->writebyte() to fix the ia64 build broke the build of the cirrus ep93xx
ARM platform.  This patch fixes it up.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Fix HPET operation on 64-bit NVIDIA platforms
Andy Currid [Thu, 8 Jun 2006 07:43:39 +0000 (00:43 -0700)]
[PATCH] Fix HPET operation on 64-bit NVIDIA platforms

From: "Andy Currid" <ACurrid@nvidia.com>

This patch fixes a kernel panic during boot that occurs on NVIDIA platforms
that have HPET enabled.

When HPET is enabled, the standard timer IRQ is routed to IOAPIC pin 2 and is
advertised as such in the ACPI APIC table - but an earlier workaround in the
kernel was ignoring this override.  The fix is to honor timer IRQ overrides
from ACPI when HPET is detected on an NVIDIA platform.

Signed-off-by: Andy Currid <acurrid@nvidia.com>
Cc: "Brown, Len" <len.brown@intel.com>
Cc: "Yu, Luming" <luming.yu@intel.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Fix HPET operation on 32-bit NVIDIA platforms
Andy Currid [Thu, 8 Jun 2006 07:43:38 +0000 (00:43 -0700)]
[PATCH] Fix HPET operation on 32-bit NVIDIA platforms

From: "Andy Currid" <ACurrid@nvidia.com>

This patch fixes a kernel panic during boot that occurs on NVIDIA platforms
that have HPET enabled.

When HPET is enabled, the standard timer IRQ is routed to IOAPIC pin 2 and is
advertised as such in the ACPI APIC table - but an earlier workaround in the
kernel was ignoring this override.  The fix is to honor timer IRQ overrides
from ACPI when HPET is detected on an NVIDIA platform.

Signed-off-by: Andy Currid <acurrid@nvidia.com>
Cc: "Brown, Len" <len.brown@intel.com>
Cc: "Yu, Luming" <luming.yu@intel.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge branch 'upstream-fixes' of git://lost.foo-projects.org/~ahkok/git/netdev-2...
Jeff Garzik [Thu, 8 Jun 2006 19:49:36 +0000 (15:49 -0400)]
Merge branch 'upstream-fixes' of git://lost.foo-projects.org/~ahkok/git/netdev-2.6 into upstream-fixes

18 years agoMerge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linvil...
Jeff Garzik [Thu, 8 Jun 2006 19:46:27 +0000 (15:46 -0400)]
Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes

18 years agoe1000: remove risky prefetch on next_skb->data
Auke Kok [Thu, 8 Jun 2006 16:28:47 +0000 (09:28 -0700)]
e1000: remove risky prefetch on next_skb->data

It was brought to our attention that the prefetches break e1000 traffic
on xscale/arm architectures.  Remove them for now.  We'll let them
stay in mm for a while, or find a better solution to enable.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
18 years agoe1000: fix ethtool test irq alloc as "probe"
Auke Kok [Thu, 8 Jun 2006 16:28:38 +0000 (09:28 -0700)]
e1000: fix ethtool test irq alloc as "probe"

New code added in 2.6.17 caused setup_irq to print a warning when
running ethtool -t eth0 offline.

This test marks the request_irq call made by this test as a "probe"
to see if the interrupt is shared or not.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
18 years agoLinux 2.6.17-rc6 v2.6.17-rc6
Linus Torvalds [Tue, 6 Jun 2006 00:57:02 +0000 (17:57 -0700)]
Linux 2.6.17-rc6

18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Mon, 5 Jun 2006 23:59:46 +0000 (16:59 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [BRIDGE]: fix locking and memory leak in br_add_bridge
  [IRDA]: Missing allocation result check in irlap_change_speed().
  [PPPOE]: Missing result check in __pppoe_xmit().
  [NET]: Eliminate unused /proc/sys/net/ethernet
  [NETCONSOLE]: Clean up initcall warning.
  [TCP]: Avoid skb_pull if possible when trimming head

18 years ago[BRIDGE]: fix locking and memory leak in br_add_bridge
Jiri Benc [Mon, 5 Jun 2006 23:39:34 +0000 (16:39 -0700)]
[BRIDGE]: fix locking and memory leak in br_add_bridge

There are several bugs in error handling in br_add_bridge:
- when dev_alloc_name fails, allocated net_device is not freed
- unregister_netdev is called when rtnl lock is held
- free_netdev is called before netdev_run_todo has a chance to be run after
  unregistering net_device

Signed-off-by: Jiri Benc <jbenc@suse.cz>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years agoMerge master.kernel.org:/home/rmk/linux-2.6-serial
Linus Torvalds [Mon, 5 Jun 2006 23:23:02 +0000 (16:23 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-serial

* master.kernel.org:/home/rmk/linux-2.6-serial:
  [SERIAL] typo: buad -> baud

18 years agoMerge master.kernel.org:/home/rmk/linux-2.6-mmc
Linus Torvalds [Mon, 5 Jun 2006 23:22:43 +0000 (16:22 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-mmc

* master.kernel.org:/home/rmk/linux-2.6-mmc:
  [MMC] Prevent au1xmmc.c breakage on non-Au1200 Alchemy
  [MMC] Add maintainers entry for MMC subsystem

18 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Mon, 5 Jun 2006 23:22:26 +0000 (16:22 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 3543/1: [Fwd: PXA270 bootparams address not set]
  [ARM] Trivial typo fixes

18 years ago[MIPS] Fix sparsemem support.
Chad Reese [Wed, 31 May 2006 00:16:49 +0000 (17:16 -0700)]
[MIPS] Fix sparsemem support.

Move memory_present() in arch/mips/kernel/setup.c. When using sparsemem
extreme, this function does an allocate for bootmem. This would always
fail since init_bootmem hasn't been called yet.

Move memory_present after free_bootmem. This only marks actual memory
ranges as present instead of the entire address space.

Signed-off-by: Chad Reese <creese@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Fix compiler warnings (field width, unused variable)
Atsushi Nemoto [Wed, 31 May 2006 16:00:03 +0000 (01:00 +0900)]
[MIPS] Fix compiler warnings (field width, unused variable)

Fix following warnings:
linux/arch/mips/kernel/setup.c:432: warning: field width is not type int (arg 2)
linux/arch/mips/kernel/setup.c:432: warning: field width is not type int (arg 4)
linux/arch/mips/kernel/syscall.c:279: warning: unused variable `len'
linux/arch/mips/kernel/syscall.c:280: warning: unused variable `name'
linux/arch/mips/math-emu/dp_fint.c:32: warning: unused variable `xc'
linux/arch/mips/math-emu/dp_flong.c:32: warning: unused variable `xc'
linux/arch/mips/math-emu/sp_fint.c:32: warning: unused variable `xc'
linux/arch/mips/math-emu/sp_flong.c:32: warning: unused variable `xc'

(original patch by Atsushi, slight changes to the setup.c part by me.)

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Fix sparse warnings about too big constants.
Atsushi Nemoto [Wed, 31 May 2006 16:00:39 +0000 (01:00 +0900)]
[MIPS] Fix sparse warnings about too big constants.

Fix following warnings:
linux/arch/mips/kernel/setup.c:249:12: warning: constant 0xffffffff00000000 is so big it is unsigned long
linux/arch/mips/kernel/cpu-bugs64.c:209:10: warning: constant 0xffffffffffffdb9a is so big it is unsigned long
linux/arch/mips/kernel/cpu-bugs64.c:227:10: warning: constant 0xffffffffffffdb9a is so big it is unsigned long
linux/arch/mips/kernel/cpu-bugs64.c:283:10: warning: constant 0xffffffffffffdb9a is so big it is unsigned long
linux/arch/mips/kernel/cpu-bugs64.c:299:10: warning: constant 0xffffffffffffdb9a is so big it is unsigned long

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Fix 64-bit build for RM7000.
Ralf Baechle [Tue, 30 May 2006 14:55:05 +0000 (15:55 +0100)]
[MIPS] Fix 64-bit build for RM7000.

RM7000 has 40-bit virtual / 36-bit physical address space.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] IP32: Fix warnings.
Ralf Baechle [Tue, 30 May 2006 01:13:16 +0000 (02:13 +0100)]
[MIPS] IP32: Fix warnings.

The expressions are volatile; no need for temporary variables.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Fix non-linear memory mapping on MIPS
Sergei Shtylyov [Sat, 27 May 2006 18:39:39 +0000 (22:39 +0400)]
[MIPS] Fix non-linear memory mapping on MIPS

Fix the non-linear memory mapping done via remap_file_pages() -- it
didn't work on any MIPS CPU because the page offset clashing with
_PAGE_FILE and some other page protection bits which should have been left
zeros for this kind of pages.

Signed-off-by: Konstantin Baydarov <kbaidarov@ru.mvista.com>
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] SB1: Only pass1 FPUs are broken beyond recovery.
Ralf Baechle [Sun, 28 May 2006 23:02:12 +0000 (00:02 +0100)]
[MIPS] SB1: Only pass1 FPUs are broken beyond recovery.

The wrong revision number in the check was forcing a fallback to FPU
emulation for all SB1 cores in 2.6.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] open() forces O_LARGEFILE for o32 on 64bit kernels
Thiemo Seufer [Sun, 28 May 2006 14:02:53 +0000 (15:02 +0100)]
[MIPS] open() forces O_LARGEFILE for o32 on 64bit kernels

open() always sets the O_LARGEFILE flag for the o32 ABI implementation
of a 64bit kernel. The appended patch fixes it.

Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Au1xx0: fix prom_getenv() to handle YAMON style environment
Sergei Shtylyov [Sat, 27 May 2006 19:36:41 +0000 (23:36 +0400)]
[MIPS] Au1xx0: fix prom_getenv() to handle YAMON style environment

Alchemy boards use YAMON which passes the environment variables as the
tuples of strings (the name followed by the value) unlike PMON which
passes "name=<val>" strings.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Fix swap entry for MIPS32 36-bit physical address
Sergei Shtylyov [Sat, 27 May 2006 16:43:04 +0000 (20:43 +0400)]
[MIPS] Fix swap entry for MIPS32 36-bit physical address

With 64-bit physical address enabled, 'swapon' was causing kernel oops on
Alchemy CPUs (MIPS32) because of the swap entry type field corrupting the
_PAGE_FILE bit in 'pte_low' field. So, switch to storing the swap entry in
'pte_high' field using all its bits except _PAGE_GLOBAL and _PAGE_VALID which
gives 25 bits for the swap entry offset.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Fix mprotect() syscall for MIPS32 w/36-bit physical address support
Sergei Shtylyov [Wed, 3 May 2006 18:56:43 +0000 (22:56 +0400)]
[MIPS] Fix mprotect() syscall for MIPS32 w/36-bit physical address support

Fix mprotect() syscall for MIPS32 CPUs with 36-bit physical address
support: pte_modify() macro didn't clear the hardware page protection bits
before modifying...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Save write-only Config.OD from being clobbered
Sergei Shtylyov [Fri, 26 May 2006 15:44:54 +0000 (19:44 +0400)]
[MIPS] Save write-only Config.OD from being clobbered

Save the Config.OD bit from being clobbered by coherency_setup(). This
bit, when set, fixes various errata in the early steppings of Au1x00
SOCs.  Unfortunately, the bit was write-only on the most early of them.
In addition, also restore the bit after a wakeup from sleep.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Print more information if we're struck by a machine check exception.
Ralf Baechle [Wed, 24 May 2006 15:51:02 +0000 (16:51 +0100)]
[MIPS] Print more information if we're struck by a machine check exception.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Fix declaration of smp_prepare_cpus() platform hook.
Ralf Baechle [Wed, 24 May 2006 02:04:18 +0000 (03:04 +0100)]
[MIPS] Fix declaration of smp_prepare_cpus() platform hook.

A while ago prom_prepare_cpus was replaced by plat_prepare_cpus but
the declaration has stayed unchanged.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Fix modpost warning: Rename op_model_xxx to op_model_xxx_ops.
Atsushi Nemoto [Tue, 23 May 2006 07:42:38 +0000 (16:42 +0900)]
[MIPS] Fix modpost warning: Rename op_model_xxx to op_model_xxx_ops.

The modpost uses a whitelist for commonly used suffix on checking the
section mismatch.  Adding "_ops" suffix to op_modex_xxx get rid of
this modpost warning.

WARNING: arch/mips/oprofile/oprofile.o - Section mismatch: reference to .init.text: from .data after 'op_model_mipsxx' (at offset 0x528)

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Fix instable BogoMIPS on multi-issue processors.
Ralf Baechle [Tue, 23 May 2006 15:37:32 +0000 (16:37 +0100)]
[MIPS] Fix instable BogoMIPS on multi-issue processors.

Increase alignment of BogoMIPS loop to 8 bytes.  Having the delay loop
overlap cache line boundaries may cause instable delays.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Ignore unresolved weak symbols in modules.
Atsushi Nemoto [Mon, 22 May 2006 15:45:07 +0000 (00:45 +0900)]
[MIPS] Ignore unresolved weak symbols in modules.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Fix SMP now that fixup_cpu_present_map is gone.
Ralf Baechle [Mon, 22 May 2006 13:24:04 +0000 (14:24 +0100)]
[MIPS] Fix SMP now that fixup_cpu_present_map is gone.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Remove duplicate declaration of cpu_online_map.
Ralf Baechle [Wed, 17 May 2006 23:16:10 +0000 (01:16 +0200)]
[MIPS] Remove duplicate declaration of cpu_online_map.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[IRDA]: Missing allocation result check in irlap_change_speed().
Florin Malita [Mon, 5 Jun 2006 22:34:52 +0000 (15:34 -0700)]
[IRDA]: Missing allocation result check in irlap_change_speed().

The skb allocation may fail, which can result in a NULL pointer dereference
in irlap_queue_xmit().

Coverity CID: 434.

Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[PPPOE]: Missing result check in __pppoe_xmit().
Florin Malita [Mon, 5 Jun 2006 22:34:33 +0000 (15:34 -0700)]
[PPPOE]: Missing result check in __pppoe_xmit().

skb_clone() may fail, we should check the result.

Coverity CID: 1215.

Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: Eliminate unused /proc/sys/net/ethernet
Jes Sorensen [Mon, 5 Jun 2006 22:34:11 +0000 (15:34 -0700)]
[NET]: Eliminate unused /proc/sys/net/ethernet

The /proc/sys/net/ethernet directory has been sitting empty for more than
10 years!  Time to eliminate it!

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETCONSOLE]: Clean up initcall warning.
Matt Mackall [Mon, 5 Jun 2006 22:04:37 +0000 (15:04 -0700)]
[NETCONSOLE]: Clean up initcall warning.

From: Matt Mackall <mpm@selenic.com>

netconsole is being wrong here.  If it wasn't enabled there's no error.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TCP]: Avoid skb_pull if possible when trimming head
Herbert Xu ~{PmVHI~} [Mon, 5 Jun 2006 22:03:37 +0000 (15:03 -0700)]
[TCP]: Avoid skb_pull if possible when trimming head

Trimming the head of an skb by calling skb_pull can cause the packet
to become unaligned if the length pulled is odd.  Since the length is
entirely arbitrary for a FIN packet carrying data, this is actually
quite common.

Unaligned data is not the end of the world, but we should avoid it if
it's easily done.  In this case it is trivial.  Since we're discarding
all of the head data it doesn't matter whether we move skb->data forward
or back.

However, it is still possible to have unaligned skb->data in general.
So network drivers should be prepared to handle it instead of crashing.

This patch also adds an unlikely marking on len < headlen since partial
ACKs on head data are extremely rare in the wild.  As the return value
of __pskb_trim_head is no longer ever NULL that has been removed.

Signed-off-by: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6
Linus Torvalds [Mon, 5 Jun 2006 19:30:28 +0000 (12:30 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6:
  [PATCH] pcmcia: fix zeroing of cm4000_cs.c data
  [PATCH] pcmcia: missing pcmcia_get_socket() result check

18 years ago[PATCH] uml: add -ffreestanding to CFLAGS
Jeff Dike [Sun, 4 Jun 2006 09:51:49 +0000 (02:51 -0700)]
[PATCH] uml: add -ffreestanding to CFLAGS

From: Jeff Dike <jdike@addtoit.com>

This fixes the undefined reference to strcpy seen when building modules on
i386.  Tracked down by Al Viro.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: more __user annotations
Al Viro [Sun, 4 Jun 2006 09:51:48 +0000 (02:51 -0700)]
[PATCH] uml: more __user annotations

From: Al Viro <viro@zeniv.linux.org.uk>

uml __user annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: __user annotation in arch_prctl
Al Viro [Sun, 4 Jun 2006 09:51:47 +0000 (02:51 -0700)]
[PATCH] uml: __user annotation in arch_prctl

From: Al Viro <viro@zeniv.linux.org.uk>

fix uml/amd64 prctl()

put_user() there should go to (long __user *)addr, not &addr

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: fix a typo in do_uml_initcalls
Jeff Dike [Sun, 4 Jun 2006 09:51:47 +0000 (02:51 -0700)]
[PATCH] uml: fix a typo in do_uml_initcalls

From: Jeff Dike <jdike@addtoit.com>

We had a spurious semicolon somehow.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: fix wall_to_monotonic initialization
Jeff Dike [Sun, 4 Jun 2006 09:51:46 +0000 (02:51 -0700)]
[PATCH] uml: fix wall_to_monotonic initialization

From: Jeff Dike <jdike@addtoit.com>

Initialize wall_to_monotonic correctly.  This fixes a problem where sleeps
lasted about one secone less than they should.  This also called for a bit of
code restructuring, following a patch which Blaisorblade had been keeping.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: add asm/irqflags.h
Jeff Dike [Sun, 4 Jun 2006 09:51:43 +0000 (02:51 -0700)]
[PATCH] uml: add asm/irqflags.h

From: Jeff Dike <jdike@addtoit.com>

Add an empty asm/irqflags.h, which seems to satisfy the lock validator enough
that UML builds.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] m48t86: ia64 build fix
Andrew Morton [Sun, 4 Jun 2006 09:51:42 +0000 (02:51 -0700)]
[PATCH] m48t86: ia64 build fix

From: Andrew Morton <akpm@osdl.org>

drivers/rtc/rtc-m48t86.c: In function `m48t86_rtc_read_time':
drivers/rtc/rtc-m48t86.c:51: error: structure has no member named `ia64_mv'
drivers/rtc/rtc-m48t86.c:55: error: structure has no member named `ia64_mv'
drivers/rtc/rtc-m48t86.c:56: error: structure has no member named `ia64_mv'
drivers/rtc/rtc-m48t86.c:57: error: structure has no member named `ia64_mv'
drivers/rtc/rtc-m48t86.c:58: error: structure has no member named `ia64_mv'
drivers/rtc/rtc-m48t86.c:60: error: structure has no member named `ia64_mv'

readb() and writeb() are macros on ia64.

Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sata_sil24: SII3124 sata driver endian problem
Rune Torgersen [Sun, 4 Jun 2006 09:51:41 +0000 (02:51 -0700)]
[PATCH] sata_sil24: SII3124 sata driver endian problem

From: "Rune Torgersen" <runet@innovsys.com>

Fix an endian issue in the sil24 driver.

Signed-off-by: Rune Torgersen <runet@innovsys.com>
Acked-by: Jeff Garzik <jeff@garzik.org>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sbp2: fix check of return value of hpsb_allocate_and_register_addrspace()
Stefan Richter [Sun, 4 Jun 2006 09:51:40 +0000 (02:51 -0700)]
[PATCH] sbp2: fix check of return value of hpsb_allocate_and_register_addrspace()

From: Stefan Richter <stefanr@s5r6.in-berlin.de>

I added a failure check in patch "sbp2: variable status FIFO address (fix
login timeout)" --- alas for a wrong error value.  This is a bug since
Linux 2.6.16.  Leads to NULL pointer dereference if the call failed, and
bogus failure handling if call succeeded.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: <stable@kernel.org>
Cc: Ben Collins <bcollins@debian.org>
Cc: Jody McIntyre <scjody@modernduck.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>