]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
18 years ago[PATCH] powerpc: fix large nvram access
Arnd Bergmann [Fri, 9 Dec 2005 18:21:44 +0000 (19:21 +0100)]
[PATCH] powerpc: fix large nvram access

/dev/nvram uses the user-provided read/write size
for kmalloc, which fails, if a large number is passed.
This will always use a single page at most, which
can be expected to succeed.

Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc/cell: disable legacy i/o area
David Woodhouse [Fri, 9 Dec 2005 18:04:21 +0000 (19:04 +0100)]
[PATCH] powerpc/cell: disable legacy i/o area

We currently crash in the fedora installer because the keyboard
driver tries to access I/O space that is not there on our hardware.

This uses the same solution as powermac by just marking all
legacy i/o as invalid.

Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc/cell: add iommu support for larger memory
Jens.Osterkamp@de.ibm.com [Fri, 9 Dec 2005 18:04:20 +0000 (19:04 +0100)]
[PATCH] powerpc/cell: add iommu support for larger memory

So far, the iommu code was hardwired to a linear mapping
between 0x20000000 and 0x40000000, so it could only support
512MB of RAM.

This patch still keeps the linear mapping, but looks for
proper ibm,dma-window properties to set up larger windows,
this makes the maximum supported RAM size 2GB.

If there is anything unusual about the dma-window properties,
we fall back to the old behavior.

We also support switching off the iommu completely now
with the regular iommu=off command line option.

Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] spufs: clear dsisr on CLASS1[Mf] exception
Arnd Bergmann [Fri, 9 Dec 2005 18:04:18 +0000 (19:04 +0100)]
[PATCH] spufs: clear dsisr on CLASS1[Mf] exception

Because of always clearing DSISR at spu class 1 interrupt handler,
kernel may lose Class1[Mf] interrupt.

Signed-off-by: Masato Noguchi <Masato.Noguchi@jp.sony.com>
Signed-off-by: Geoff Levand <geoff.levand@am.sony.com>
Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] spufs: fix hexdump format
Arnd Bergmann [Fri, 9 Dec 2005 18:04:17 +0000 (19:04 +0100)]
[PATCH] spufs: fix hexdump format

Output from hexdump with "%08x" depends on HOST platform's endian.
When building linux by cross toolchain, that difference makes errors.

Signed-off-by: Masato Noguchi <Masato.Noguchi@jp.sony.com>
Signed-off-by: Geoff Levand <geoff.levand@am.sony.com>
Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] spufs: trivial compile fix
Arnd Bergmann [Fri, 9 Dec 2005 18:04:16 +0000 (19:04 +0100)]
[PATCH] spufs: trivial compile fix

One of my last patches contained a broken line
from splitting out some other changes, this
restores a working version.

Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] spufs: fix module refcount race
Arnd Bergmann [Fri, 9 Dec 2005 18:04:15 +0000 (19:04 +0100)]
[PATCH] spufs: fix module refcount race

One of the two users of spufs_calls.owner still has a race
when calling try_module_get while the module is removed.
This makes it use the correct instance of owner.

Noticed by Milton Miller.

Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] ppc32: Add TQM85xx (8540/8541/8555/8560) board support
Kumar Gala [Fri, 9 Dec 2005 17:57:44 +0000 (11:57 -0600)]
[PATCH] ppc32: Add TQM85xx (8540/8541/8555/8560) board support

This patch adds support for the TQ Components TQM85xx modules. Currently the
modules TQM8540/8541/8555/8560 are supported.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] cell: add platform detection code
Arnd Bergmann [Tue, 6 Dec 2005 03:52:29 +0000 (22:52 -0500)]
[PATCH] cell: add platform detection code

I can't really get a conclusive answer from the firmware
people what to check for, so I just try scanning for
anything that starts with "IBM,CPB", which should be
correct for all hardware produced so far and for
systemsim.

Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] spufs: fix mailbox polling
Arnd Bergmann [Tue, 6 Dec 2005 03:52:27 +0000 (22:52 -0500)]
[PATCH] spufs: fix mailbox polling

Handling mailbox interrupts was broken in multiple respects,
the combination of which was hiding the bugs most of the time.

- The ibox interrupt mask was open initially even though there
  are no waiters on a newly created SPU.

- Acknowledging the mailbox interrupt did not work because
  it is level triggered and the mailbox data is never retrieved
  from inside the interrupt handler.

- The interrupt handler delivered interrupts with a disabled
  mask if another interrupt is triggered for the same class
  but a different mask.

- The poll function did not enable the interrupt if it had not
  been enabled, so we might run into the poll timeout if none of
  the other bugs saved us and no signal was delivered.

We probably still have a similar problem with blocking
read/write on mailbox files, but that will result in extra
wakeup in the worst case, not in incorrect behaviour.

Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] spufs: Improved SPU preemptability [part 2].
Arnd Bergmann [Tue, 6 Dec 2005 03:52:26 +0000 (22:52 -0500)]
[PATCH] spufs: Improved SPU preemptability [part 2].

This patch reduces lock complexity of SPU scheduler, particularly
for involuntary preemptive switches.  As a result the new code
does a better job of mapping the highest priority tasks to SPUs.

Lock complexity is reduced by using the system default workqueue
to perform involuntary saves.  In this way we avoid nasty lock
ordering problems that the previous code had.  A "minimum timeslice"
for SPU contexts is also introduced.  The intent here is to avoid
thrashing.

While the new scheduler does a better job at prioritization it
still does nothing for fairness.

From: Mark Nutter <mnutter@us.ibm.com>
Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] spufs: Improved SPU preemptability.
Arnd Bergmann [Tue, 6 Dec 2005 03:52:25 +0000 (22:52 -0500)]
[PATCH] spufs: Improved SPU preemptability.

This patch makes it easier to preempt an SPU context by
having the scheduler hold ctx->state_sema for much shorter
periods of time.

As part of this restructuring, the control logic for the "run"
operation is moved from arch/ppc64/kernel/spu_base.c to
fs/spufs/file.c.  Of course the base retains "bottom half"
handlers for class{0,1} irqs.  The new run loop will re-acquire
an SPU if preempted.

From: Mark Nutter <mnutter@us.ibm.com>
Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] spufs: Turn off debugging output
Arnd Bergmann [Tue, 6 Dec 2005 03:52:24 +0000 (22:52 -0500)]
[PATCH] spufs: Turn off debugging output

spufs is rather noisy when debugging is enabled, this
turns off the messages for production use.

Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] spufs: Fix oops when spufs module is not loaded
Arnd Bergmann [Tue, 6 Dec 2005 03:52:23 +0000 (22:52 -0500)]
[PATCH] spufs: Fix oops when spufs module is not loaded

try_module_get returns true when NULL arguments, so
we first need to check if there is a module loaded before
getting the reference count.

Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] spufs: fix local store page refcounting
Arnd Bergmann [Tue, 6 Dec 2005 03:52:22 +0000 (22:52 -0500)]
[PATCH] spufs: fix local store page refcounting

With the new rules for reserved pages, the spufs now
needs working page reference counting.

I should probably look into converting to vm_insert_page,
but for now this patch makes spufs work again.

Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] spufs: Make all exports GPL-only
Arnd Bergmann [Tue, 6 Dec 2005 03:52:21 +0000 (22:52 -0500)]
[PATCH] spufs: Make all exports GPL-only

This changes all exported symbols of spufs to EXPORT_SYMBOL_GPL.
The spu_ibox_read/spu_wbox_write symbols are not exported
any more when the scheduler patch is applied.

Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Add support for "linux,usable-memory" on memory nodes
Michael Ellerman [Sun, 4 Dec 2005 07:39:55 +0000 (18:39 +1100)]
[PATCH] powerpc: Add support for "linux,usable-memory" on memory nodes

Milton has proposed that we should support a "linux,usable-memory" property
on memory nodes which describes, in preference to "reg", the regions of memory
Linux should use.

This facility is required for kdump to inform the second kernel which memory
it should use.

Signed-off-by: Haren Myneni <haren@us.ibm.com>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Add arch-dependent copy_oldmem_page
Michael Ellerman [Sun, 4 Dec 2005 07:39:51 +0000 (18:39 +1100)]
[PATCH] powerpc: Add arch-dependent copy_oldmem_page

Signed-off-by: Haren Myneni <haren@us.ibm.com>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Parse crashkernel= parameter in first kernel
Michael Ellerman [Sun, 4 Dec 2005 07:39:48 +0000 (18:39 +1100)]
[PATCH] powerpc: Parse crashkernel= parameter in first kernel

This patch adds code to parse and setup the crash kernel resource in the
first kernel. PPC64 ignores the @x part, we always run at 32 MB.

Signed-off-by: Haren Myneni <haren@us.ibm.com>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Add arch dependent basic infrastructure for Kdump.
Michael Ellerman [Sun, 4 Dec 2005 07:39:43 +0000 (18:39 +1100)]
[PATCH] powerpc: Add arch dependent basic infrastructure for Kdump.

Implementing the machine_crash_shutdown which will be called by
crash_kexec (called in case of a panic, sysrq etc.). Disable the
interrupts, shootdown cpus using debugger IPI and collect regs
for all CPUs.

elfcorehdr= specifies the location of elf core header stored by
the crashed kernel. This command line option will be passed by
the kexec-tools to capture kernel.

savemaxmem= specifies the actual memory size that the first kernel
has and this value will be used for dumping in the capture kernel.
This command line option will be passed by the kexec-tools to
capture kernel.

Signed-off-by: Haren Myneni <haren@us.ibm.com>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Fixups for kernel linked at 32 MB
Michael Ellerman [Mon, 5 Dec 2005 21:49:00 +0000 (15:49 -0600)]
[PATCH] powerpc: Fixups for kernel linked at 32 MB

There's a few places where we need to fix things up for the kernel to work
if it's linked at 32MB:

 - platforms/powermac/smp.c
   To start secondary cpus on pmac we patch the reset vector, which is fine.
   Except if we're above 32MB we don't have enough bits for an absolute branch,
   it needs to relative.
 - kernel/head_64.s
    - A few branches in the cpu hold code need to load the full target address
      and do a bctr.
    - after_prom_start needs to load PHYSICAL_START as the dest address, not 0.
    - The exception prolog needs to load the low word of the target adddress,
      not just the low halfword.
    - Fixup handling of the initial stab address.
 - kernel/setup_64.c
   smp_release_cpus() needs to write 1 to the spinloop flag near 0, not 32 MB.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Reroute interrupts from 0 + offset to PHYSICAL_START + offset
Michael Ellerman [Sun, 4 Dec 2005 07:39:37 +0000 (18:39 +1100)]
[PATCH] powerpc: Reroute interrupts from 0 + offset to PHYSICAL_START + offset

Regardless of where the kernel's linked we always get interrupts at low
addresses. This patch creates a trampoline in the first 3 pages of memory,
where interrupts land, and patches those addresses to jump into the real
kernel code at PHYSICAL_START.

We also need to reserve the trampoline code and a bit more in prom.c

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Create a trampoline for the fwnmi vectors
Michael Ellerman [Sun, 4 Dec 2005 07:39:33 +0000 (18:39 +1100)]
[PATCH] powerpc: Create a trampoline for the fwnmi vectors

The fwnmi vectors can be anywhere < 32 MB, so we need to use a trampoline
for them. The kdump kernel will register the trampoline addresses, which will
then jump up to the real code above 32 MB.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Add CONFIG_CRASH_DUMP
Michael Ellerman [Sun, 4 Dec 2005 07:39:23 +0000 (18:39 +1100)]
[PATCH] powerpc: Add CONFIG_CRASH_DUMP

This patch adds a Kconfig variable, CONFIG_CRASH_DUMP, which configures the
built kernel for use as a Kdump kernel.

Currently "all" this involves is changing the value of KERNELBASE to 32 MB.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years agopowerpc: Fix typo in head_64.S
Paul Mackerras [Wed, 7 Dec 2005 03:52:16 +0000 (14:52 +1100)]
powerpc: Fix typo in head_64.S

Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: fix for "Update OF address parsers"
Stephen Rothwell [Wed, 7 Dec 2005 02:01:05 +0000 (13:01 +1100)]
[PATCH] powerpc: fix for "Update OF address parsers"

This allows iSeries to build again.  It just moves pci_address_to_pio
outside the #ifdef CONFIG_PPC_MULTIPLATFORM.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: minor cleanup of void ptr deref
linas [Tue, 6 Dec 2005 01:37:35 +0000 (19:37 -0600)]
[PATCH] powerpc: minor cleanup of void ptr deref

Minor: use macro to perform void pointer deref; this may someday help
avoid pointer typecasting errors.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc/8xx: Fix m8xx_wdt issues
Marcelo Tosatti [Mon, 5 Dec 2005 21:31:36 +0000 (19:31 -0200)]
[PATCH] powerpc/8xx: Fix m8xx_wdt issues

The following fixes some issues with the last mpc8xx_wdt update:

- Adds missing #include <asm/io.h>
- Use "uint __iomem" pointer for in_be32/out_be32

Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: numa placement for dynamically added memory
Mike Kravetz [Mon, 5 Dec 2005 20:06:42 +0000 (12:06 -0800)]
[PATCH] powerpc: numa placement for dynamically added memory

This places dynamically added memory within the appropriate
numa node.  A new routine hot_add_scn_to_nid() replicates most of
the memory scanning code in parse_numa_properties().

Signed-off-by: Mike Kravetz <kravetz@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Separate usage of KERNELBASE and PAGE_OFFSET
Michael Ellerman [Mon, 5 Dec 2005 16:24:33 +0000 (10:24 -0600)]
[PATCH] powerpc: Separate usage of KERNELBASE and PAGE_OFFSET

This patch separates usage of KERNELBASE and PAGE_OFFSET. I haven't
looked at any of the PPC32 code, if we ever want to support Kdump on
PPC we'll have to do another audit, ditto for iSeries.

This patch makes PAGE_OFFSET the constant, it'll always be 0xC * 1
gazillion for 64-bit.

To get a physical address from a virtual one you subtract PAGE_OFFSET,
_not_ KERNELBASE.

KERNELBASE is the virtual address of the start of the kernel, it's
often the same as PAGE_OFFSET, but _might not be_.

If you want to know something's offset from the start of the kernel
you should subtract KERNELBASE.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Add a is_kernel_addr() macro
Michael Ellerman [Sun, 4 Dec 2005 07:39:15 +0000 (18:39 +1100)]
[PATCH] powerpc: Add a is_kernel_addr() macro

There's a bunch of code that compares an address with KERNELBASE to see if
it's a "kernel address", ie. >= KERNELBASE. The proper test is actually to
compare with PAGE_OFFSET, since we're going to change KERNELBASE soon.

So replace all of them with an is_kernel_addr() macro that does that.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Propagate regs through to machine_crash_shutdown
Michael Ellerman [Sun, 4 Dec 2005 07:39:12 +0000 (18:39 +1100)]
[PATCH] powerpc: Propagate regs through to machine_crash_shutdown

Currently machine_crash_shutdown() gets a struct pt_regs, but doesn't pass it
through to the ppc_md function, it should.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc32: fix definition of distribute_irqs
Andy Whitcroft [Tue, 29 Nov 2005 19:25:54 +0000 (19:25 +0000)]
[PATCH] powerpc32: fix definition of distribute_irqs

When we select ppc32 under the powerpc architecture we get the
error below.  This relates to defining distribute_irqs when this
configuratiom option is undefined.

      CC      arch/powerpc/sysdev/mpic.o
    .../arch/powerpc/sysdev/mpic.c: In function `mpic_setup_this_cpu':
    .../arch/powerpc/sysdev/mpic.c:788: error: `CONFIG_IRQ_ALL_CPUS'
undeclared (first use in this function)

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc32: clean up available memory models
Andy Whitcroft [Tue, 29 Nov 2005 19:20:55 +0000 (19:20 +0000)]
[PATCH] powerpc32: clean up available memory models

Clean up the currently available memory models for ppc32 under
the powerpc architecture.  We need FLATMEM for ppc32: enable it.
SPARSEMEM is not parameterised for ppc32 so disable that.  Take this
opportunity to clean up white space for FLATMEM_ENABLE.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] ppc: removed unused variable i from code.
Otavio Salvador [Sat, 3 Dec 2005 18:42:25 +0000 (16:42 -0200)]
[PATCH] ppc: removed unused variable i from code.

Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Minor numa memory code cleanup
Mike Kravetz [Wed, 30 Nov 2005 21:47:23 +0000 (13:47 -0800)]
[PATCH] powerpc: Minor numa memory code cleanup

Here is an updated version of the patch that panics if no memory is
found as Nathan suggested.  I'm still concerned that panic strings
(not just the one added here) at this stage of booting do not show
up on my system.  But, that is an issue separate from this patch.

Combine get_mem_*_cells() routines to avoid multiple memory node
lookups.  Added missing of_node_put() call.  Changed variable names
to help with some confusion as to meaning.

Signed-off-by: Mike Kravetz <kravetz@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years agoRevert "[PATCH] powerpc: Minor numa memory code cleanup"
Paul Mackerras [Mon, 5 Dec 2005 04:50:39 +0000 (15:50 +1100)]
Revert "[PATCH] powerpc: Minor numa memory code cleanup"

This reverts f1fdc0117004d343698b9830e141491d5ae320d1 commit.

18 years ago[PATCH] powerpc: Update OF address parsers
Benjamin Herrenschmidt [Wed, 30 Nov 2005 05:57:28 +0000 (16:57 +1100)]
[PATCH] powerpc: Update OF address parsers

This updates the OF address parsers to return the IO flags
indicating the type of address obtained. It also adds a PCI
call for converting physical addresses that hit IO space into
into IO tokens, and add routines that return the translated
addresses into struct resource

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: udbg updates
Benjamin Herrenschmidt [Wed, 30 Nov 2005 05:54:12 +0000 (16:54 +1100)]
[PATCH] powerpc: udbg updates

The udbg low level io layer has an issue with udbg_getc() returning a
char (unsigned on ppc) instead of an int, thus the -1 if you had no
available input device could end up turned into 0xff, filling your
display with bogus characters. This fixes it, along with adding a little
blob to xmon to do a delay before exiting when getting an EOF and fixing
the detection of ADB keyboards in udbg_adb.c

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: powermac adb fix udbg_adb_use_btext warning
Andy Whitcroft [Wed, 30 Nov 2005 17:35:01 +0000 (17:35 +0000)]
[PATCH] powerpc: powermac adb fix udbg_adb_use_btext warning

When compiling without BOOTX_TEXT the following warning is emitted.
Fix up the definition to only be made when required.

      CC      arch/powerpc/platforms/powermac/udbg_adb.o
    .../arch/powerpc/platforms/powermac/udbg_adb.c:41: warning:
`udbg_adb_use_btext' defined but not used

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: powermac adb fix dependency on btext_drawchar
Andy Whitcroft [Wed, 30 Nov 2005 17:34:50 +0000 (17:34 +0000)]
[PATCH] powerpc: powermac adb fix dependency on btext_drawchar

udbg_adb_init() has become dependent on btext_drawchar, even when
BOOTX_TEXT support is not selected.  This leads to the error below.
Make the check dependant on BOOTX_TEXT.

      LD      .tmp_vmlinux1
    arch/powerpc/platforms/built-in.o(.toc1+0xa40): undefined
reference to `btext_drawchar'

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: migrate common PCI hotplug code
Linas Vepstas [Fri, 4 Nov 2005 00:52:16 +0000 (18:52 -0600)]
[PATCH] powerpc: migrate common PCI hotplug code

23-rpaphp-migrate.patch (parts)

This patch moves some pci device add & remove code from the PCI
hotplug directory to the arch/powerpc/kernel directory, and cleans
it up a tad. The primary reason for this is that the code performs
some fairly generic operations that are shared with the PCI error
recovery code (living in the arch/powerpc/kernel directory).

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: make pcibios_claim_one_bus available to other code
Linas Vepstas [Fri, 4 Nov 2005 00:52:01 +0000 (18:52 -0600)]
[PATCH] powerpc: make pcibios_claim_one_bus available to other code

22-rpaphp-eliminate-dupe-code.patch (parts)

The RPAPHP code contains two routines that appear to be gratuitous
copies of very similar pci code.  In particular,

   rpaphp_claim_resource ~~ pci_claim_resource
   rpadlpar_claim_one_bus == pcibios_claim_one_bus

This makes pcibios_claim_one_bus from arch/powerpc/kernel/pci_64.c
available to the RPAPHP code.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: PCI hotplug common code elimination
Linas Vepstas [Fri, 4 Nov 2005 00:51:31 +0000 (18:51 -0600)]
[PATCH] powerpc: PCI hotplug common code elimination

20-rpaphp-eeh-cleanup.patch

This patch move some code from the rpaphp directory, to the powerpc
directory, where it should have been all along (Among other things, I
need it in the powerpc directory for the PCI error recovery.)

Please note that patch affects TWO maintainers: Paul, after applying
the powerpc part, please ask that GregKH appli the PCI part. It is safe
to have the powerpc part go in first. It would be bad to have the
PCI part go in first.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Minor numa memory code cleanup
Mike Kravetz [Tue, 29 Nov 2005 00:33:24 +0000 (16:33 -0800)]
[PATCH] powerpc: Minor numa memory code cleanup

I started to add missing of_node_put() calls to the routines that
determine the number of cells for memory.  Decided to combine the
routines instead of making separate node lookups.  Changed variable
names to help with some confusion as to meaning.

Signed-off-by: Mike Kravetz <kravetz@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: More serial probe fixes (#2)
Benjamin Herrenschmidt [Tue, 29 Nov 2005 00:21:59 +0000 (11:21 +1100)]
[PATCH] powerpc: More serial probe fixes (#2)

This fixes the new serial probe code with some PCI MMIO UARTs, and fixes
CHRP build with ARCH=powerpc.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] ppc: Make ARCH=ppc build again with new syscall path
David Woodhouse [Sat, 26 Nov 2005 14:44:47 +0000 (14:44 +0000)]
[PATCH] ppc: Make ARCH=ppc build again with new syscall path

This makes ARCH=ppc build in your powerpc tree again, with the new
syscall entry/exit path.

Still doesn't actually boot on my Pegasos; the last thing I see is
'MMU:exit'. But at least it builds -- I'll look at why it doesn't boot
later, so that I can see if the mv643xx_eth actually works with ARCH=ppc
(it doesn't with ARCH=powerpc; two in every three packets I receive are
offset by 4 bytes).

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] ppc32: m8xx watchdog update
Marcelo Tosatti [Thu, 24 Nov 2005 13:32:09 +0000 (11:32 -0200)]
[PATCH] ppc32: m8xx watchdog update

This updates m8xx_wdt as follows:

1) Remove now obsolete fpos check in the write() function. The driver is
currently non functional due to this bug.

2) Use in/out macros for register access.

3) Allows m8xx_wdt to use a kernel timer instead of the builtin RTC/PIT
for keep-alive trigger (which is responsible for servicing the watchdog
until an userspace application takes over). For instance Cyclades PRxK
boards (MPC 855T based) have a non-functional internal RTC/PIT unit.
Behaviour for boards with RTC/PIT is unchaged.

4) The last change required moving the RTCSC register setting code
to a weak function which can be overriden by board specific files.
Otherwise the timer init code trashes the register making it impossible
for m8xx_wdt to detect the situation.

Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] Fix code that saves NVGPRS in 32-bit signal frame
David Woodhouse [Thu, 24 Nov 2005 17:36:20 +0000 (17:36 +0000)]
[PATCH] Fix code that saves NVGPRS in 32-bit signal frame

On Thu, 2005-11-24 at 12:51 +0000, David Woodhouse wrote:
> Somehow this one slipped through the cracks; when we ended up in
> do_signal() on a 32-bit kernel but without having the caller-saved
> registers into the regs, we didn't set the TIF_SAVE_NVGPRS flag to
> ensure they got saved later.

Oh, and if we actually set the flag, then we fairly quickly find out
that I was a bit overzealous in copying code from entry_64.S ... :)

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] Save NVGPRS in 32-bit signal frame
David Woodhouse [Thu, 24 Nov 2005 12:51:40 +0000 (12:51 +0000)]
[PATCH] Save NVGPRS in 32-bit signal frame

Somehow this one slipped through the cracks; when we ended up in
do_signal() on a 32-bit kernel but without having the caller-saved
registers into the regs, we didn't set the TIF_SAVE_NVGPRS flag to
ensure they got saved later.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: serial port discovery: cope with broken firmware
David Woodhouse [Thu, 24 Nov 2005 17:08:56 +0000 (17:08 +0000)]
[PATCH] powerpc: serial port discovery: cope with broken firmware

On Tue, 2005-11-22 at 15:49 +1100, Benjamin Herrenschmidt wrote:
> This moves the discovery of legacy serial ports to a separate file,
> makes it common to ppc32 and ppc64, and reworks it to use the new OF
> address translators to get to the ports early. This new version can also
> detect some PCI serial cards using legacy chips and will probably match
> those discovered port with the default console choice.

This makes it deal with the fact that the Pegasos firmware reports that
its clock frequency is zero...

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Fix g5 build with xmon
Benjamin Herrenschmidt [Thu, 24 Nov 2005 06:34:03 +0000 (17:34 +1100)]
[PATCH] powerpc: Fix g5 build with xmon

My previous patches inadvertently broke building a G5 kernel with
CONFIG_XMON enabled. This fixes it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Remove some unneeded fields from the paca
David Gibson [Thu, 24 Nov 2005 05:51:31 +0000 (16:51 +1100)]
[PATCH] powerpc: Remove some unneeded fields from the paca

This patch removes several unnecessary fields from the paca:

- next_jiffy_update_tb was simply unused.  Remove trivially.

- The exdsi exception save area was not used.  There were plans to use
  it, but they never seem to have gone anywhere.  If they ever do, we
  can put it back.  Remove from the paca, and from asm-offsets.c

- The default_decr field was used from asm, but was only ever assigned
  the value of tb_ticks_per_jiffy.  Just access tb_ticks_per_jiffy from
  asm directly instead.

Built and booted on POWER5 LPAR and iSeries RS64.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Remove ItLpRegSave area from the paca
David Gibson [Thu, 24 Nov 2005 05:34:45 +0000 (16:34 +1100)]
[PATCH] powerpc: Remove ItLpRegSave area from the paca

On iSeries, the paca contains, amongst other things an ItLpRegSave
structure used by the hypervisor to save registers.  The hypervisor
locates this area through a pointer at the beginning of the paca, so
the structure itself can be located elsewhere.  This patch moves the
reg_save area out into its own array.  This reduces the amount of
iSeries specific gunk which is visible to general powerpc code via
paca.h

Built and booted on POWER5 LPAR and iSeries RS64.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Make hugepage mappings respect hint addresses
David Gibson [Thu, 24 Nov 2005 03:16:15 +0000 (14:16 +1100)]
[PATCH] powerpc: Make hugepage mappings respect hint addresses

Currently, the powerpc version of hugetlb_get_unmapped_area() entirely
ignores the hint address.  The only way to get a hugepage mapping at a
specified address is with MAP_FIXED, in which case there's no way
(short of parsing /proc/self/maps) for userspace to tell if it will
clobber an existing mapping.  This is inconvenient, so the patch below
makes hugepage mappings use the given hint address if possible.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Fix suboptimal uImage target
Kumar Gala [Wed, 23 Nov 2005 19:03:37 +0000 (13:03 -0600)]
[PATCH] powerpc: Fix suboptimal uImage target

Sam Ravnborg pointed out that calling if_changed was redundant in the
rule since a prerequisite had to have changed for us to get there.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Add support for building uImages
Kumar Gala [Wed, 23 Nov 2005 18:43:15 +0000 (12:43 -0600)]
[PATCH] powerpc: Add support for building uImages

powerpc: Add support for building uImages

Add support to build a kernel image bootable by u-boot.
Most of the makefile foo is taken from arch/ppc/boot/images/Makefile

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years agopowerpc: more iseries irq work
Stephen Rothwell [Thu, 17 Nov 2005 07:04:37 +0000 (18:04 +1100)]
powerpc: more iseries irq work

Make get_IRQ return a pending irq number so it can be handled
in the powerpc geeneric code.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
18 years agopowerpc: reduce include in irq.c
Stephen Rothwell [Thu, 17 Nov 2005 05:14:17 +0000 (16:14 +1100)]
powerpc: reduce include in irq.c

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
18 years agopowerpc: partly merge iseries do_IRQ
Stephen Rothwell [Wed, 16 Nov 2005 07:53:29 +0000 (18:53 +1100)]
powerpc: partly merge iseries do_IRQ

Hide some of the iseries details in iSeries_get_irq.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
18 years agopowerpc: use end_IRQ for iseries irqs
Stephen Rothwell [Wed, 16 Nov 2005 07:10:40 +0000 (18:10 +1100)]
powerpc: use end_IRQ for iseries irqs

Encode the sub bus number into the real irq number (even though it
is always zero for now) so that we have enough information to do
the EOI in iseries_end_IRQ.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
18 years agopowerpc: cleanup iseries irq.c
Stephen Rothwell [Wed, 16 Nov 2005 06:47:43 +0000 (17:47 +1100)]
powerpc: cleanup iseries irq.c

Remove two useless counters.
DeStropify.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
18 years ago[PATCH] powerpc: convert macio_asic to use prom_parse
Benjamin Herrenschmidt [Wed, 23 Nov 2005 06:59:04 +0000 (17:59 +1100)]
[PATCH] powerpc: convert macio_asic to use prom_parse

Converts the macio_asic core to use the new OF parsing routines instead
of relying on the pre-parsed values in struct device_node.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Add back support for booting from BootX (#2)
Benjamin Herrenschmidt [Wed, 23 Nov 2005 06:58:13 +0000 (17:58 +1100)]
[PATCH] powerpc: Add back support for booting from BootX (#2)

ARCH=powerpc couldn't boot from BootX as it uses a "different" way of
getting in the kernel. This patch adds the necessary trampolines,
creating a flattened device-tree from the tree passed from MacOS, and
initializing the btext engine early for really-early debugging.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Unify udbg (#2)
Benjamin Herrenschmidt [Wed, 23 Nov 2005 06:57:25 +0000 (17:57 +1100)]
[PATCH] powerpc: Unify udbg (#2)

This patch unifies udbg for both ppc32 and ppc64 when building the
merged achitecture. xmon now has a single "back end". The powermac udbg
stuff gets enriched with some ADB capabilities and btext output. In
addition, the early_init callback is now called on ppc32 as well,
approx. in the same order as ppc64 regarding device-tree manipulations.
The init sequences of ppc32 and ppc64 are getting closer, I'll unify
them in a later patch.

For now, you can force udbg to the scc using "sccdbg" or to btext using
"btextdbg" on powermacs. I'll implement a cleaner way of forcing udbg
output to something else than the autodetected OF output device in a
later patch.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: serial port discovery (#2)
Benjamin Herrenschmidt [Wed, 23 Nov 2005 06:56:06 +0000 (17:56 +1100)]
[PATCH] powerpc: serial port discovery (#2)

This moves the discovery of legacy serial ports to a separate file,
makes it common to ppc32 and ppc64, and reworks it to use the new OF
address translators to get to the ports early. This new version can also
detect some PCI serial cards using legacy chips and will probably match
those discovered port with the default console choice.

Only ppc64 gets udbg still yet, unifying udbg isn't finished yet.

It also adds some speed-probing code to udbg so that the default console
can come up at the same speed it was set to by the firmware.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Add OF address parsing code (#2)
Benjamin Herrenschmidt [Wed, 23 Nov 2005 06:53:42 +0000 (17:53 +1100)]
[PATCH] powerpc: Add OF address parsing code (#2)

Parsing addresses extracted from Open Firmware isn't a simple matter. We
have various bits of code that try to do it in various place, including
some heuristics in prom.c that pre-parse addresses at boot and fill
device-nodes "addrs", but those are dodgy at best and I want to
deprecate them. So this patch introduces a new set of routines that
should be capable of parsing most types of addresses and translating
them into CPU physical addresses. It currently works for things on PCI
busses and ISA busses and should work on "standard" busses like the root
bus or the MacIO bus that don't put funky flags in addresses. If you
have other bus types that do use funky flags, you'll have to add new bus
type translators, which is fairly easy.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] ppc64 syscall_exit_work: call the save_nvgprs function, not its descriptor.
David Woodhouse [Fri, 18 Nov 2005 12:15:33 +0000 (12:15 +0000)]
[PATCH] ppc64 syscall_exit_work: call the save_nvgprs function, not its descriptor.

On Tue, 2005-11-15 at 18:52 +0000, David Woodhouse wrote:
> This cleanup patch speeds up the null syscall path on ppc64 by about 3%,
> and brings the ppc32 and ppc64 code slightly closer together.

Needs this unless your binutils, like mine, are clever enough to notice
my stupidity and fix it up automatically...

Spotted by Paul.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years agoppc: remove duplicate bseip.h
Paul Mackerras [Fri, 18 Nov 2005 11:30:06 +0000 (22:30 +1100)]
ppc: remove duplicate bseip.h

include/asm-ppc/bseip.h is a duplicate of arch/ppc/platforms/bseip.h
and is not referenced anywhere, so get rid of it.  Pointed out by
Marcelo Tosatti.

Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years agopowerpc: Update __NR_syscalls to account for SPU syscalls
Paul Mackerras [Fri, 18 Nov 2005 02:16:43 +0000 (13:16 +1100)]
powerpc: Update __NR_syscalls to account for SPU syscalls

A previous patch ended up not increasing __NR_syscalls to account
for the new SPU syscalls (probably my fault).

Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] spufs: cooperative scheduler support
Arnd Bergmann [Tue, 15 Nov 2005 20:53:52 +0000 (15:53 -0500)]
[PATCH] spufs: cooperative scheduler support

This adds a scheduler for SPUs to make it possible to use
more logical SPUs than physical ones are present in the
system.

Currently, there is no support for preempting a running
SPU thread, they have to leave the SPU by either triggering
an event on the SPU that causes it to return to the
owning thread or by sending a signal to it.

This patch also adds operations that enable accessing an SPU
in either runnable or saved state. We use an RW semaphore
to protect the state of the SPU from changing underneath
us, while we are holding it readable. In order to change
the state, it is acquired writeable and a context save
or restore is executed before downgrading the semaphore
to read-only.

From: Mark Nutter <mnutter@us.ibm.com>,
      Uli Weigand <Ulrich.Weigand@de.ibm.com>
Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] spufs: add spu-side context switch code
Mark Nutter [Tue, 15 Nov 2005 20:53:51 +0000 (15:53 -0500)]
[PATCH] spufs: add spu-side context switch code

Add the source code that is used to generate spu_save_dump.h and
spu_restore_dump.h. Since a full spu tool chain is needed to
generate these files, the default remains to use the shipped
versions in order to keep the number of tools for building the
kernel down.

Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] kernel-side context switch code for spufs
Mark Nutter [Tue, 15 Nov 2005 20:53:50 +0000 (15:53 -0500)]
[PATCH] kernel-side context switch code for spufs

This adds the code needed to perform a context switch from
spufs, following the recommended 76-step sequence.

Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] spufs: switchable spu contexts
Mark Nutter [Tue, 15 Nov 2005 20:53:49 +0000 (15:53 -0500)]
[PATCH] spufs: switchable spu contexts

Add some infrastructure for saving and restoring the context of an
SPE. This patch creates a new structure that can hold the whole
state of a physical SPE in memory. It also contains code that
avoids races during the context switch and the binary code that
is loaded to the SPU in order to access its registers.

The actual PPE- and SPE-side context switch code are two separate
patches.

Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] spufs: The SPU file system, base
Arnd Bergmann [Tue, 15 Nov 2005 20:53:48 +0000 (15:53 -0500)]
[PATCH] spufs: The SPU file system, base

This is the current version of the spu file system, used
for driving SPEs on the Cell Broadband Engine.

This release is almost identical to the version for the
2.6.14 kernel posted earlier, which is available as part
of the Cell BE Linux distribution from
http://www.bsc.es/projects/deepcomputing/linuxoncell/.

The first patch provides all the interfaces for running
spu application, but does not have any support for
debugging SPU tasks or for scheduling. Both these
functionalities are added in the subsequent patches.

See Documentation/filesystems/spufs.txt on how to use
spufs.

Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: IBMEBUS bus support
Heiko J Schick [Wed, 16 Nov 2005 07:56:43 +0000 (08:56 +0100)]
[PATCH] powerpc: IBMEBUS bus support

This patch adds the necessary core bus support used by device drivers
that sit on the IBM GX bus on modern pSeries machines like the Galaxy
infiniband for example. It provide transparent DMA ops (the low level
driver works with virtual addresses directly) along with a simple bus
layer using the Open Firmware matching routines.

Signed-off-by: Heiko J Schick <schickhj@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] syscall entry/exit revamp
David Woodhouse [Tue, 15 Nov 2005 18:52:18 +0000 (18:52 +0000)]
[PATCH] syscall entry/exit revamp

This cleanup patch speeds up the null syscall path on ppc64 by about 3%,
and brings the ppc32 and ppc64 code slightly closer together.

The ppc64 code was checking current_thread_info()->flags twice in the
syscall exit path; once for TIF_SYSCALL_T_OR_A before disabling
interrupts, and then again for TIF_SIGPENDING|TIF_NEED_RESCHED etc after
disabling interrupts. Now we do the same as ppc32 -- check the flags
only once in the fast path, and re-enable interrupts if necessary in the
ptrace case.

The patch abolishes the 'syscall_noerror' member of struct thread_info
and replaces it with a TIF_NOERROR bit in the flags, which is handled in
the slow path. This shortens the syscall entry code, which no longer
needs to clear syscall_noerror.

The patch adds a TIF_SAVE_NVGPRS flag which causes the syscall exit slow
path to save the non-volatile GPRs into a signal frame. This removes the
need for the assembly wrappers around sys_sigsuspend(),
sys_rt_sigsuspend(), et al which existed solely to save those registers
in advance. It also means I don't have to add new wrappers for ppoll()
and pselect(), which is what I was supposed to be doing when I got
distracted into this...

Finally, it unifies the ppc64 and ppc32 methods of handling syscall exit
directly into a signal handler (as required by sigsuspend et al) by
introducing a TIF_RESTOREALL flag which causes _all_ the registers to be
reloaded from the pt_regs by taking the ret_from_exception path, instead
of the normal syscall exit path which stomps on the callee-saved GPRs.

It appears to pass an LTP test run on ppc64, and passes basic testing on
ppc32 too. Brief tests of ptrace functionality with strace and gdb also
appear OK. I wouldn't send it to Linus for 2.6.15 just yet though :)

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: moved ipic code to arch/powerpc
Kumar Gala [Mon, 14 Nov 2005 18:54:33 +0000 (12:54 -0600)]
[PATCH] powerpc: moved ipic code to arch/powerpc

Moved 83xx and QUICC Engine interrupt handling code into arch/powerpc
as a precursor of getting 83xx sub-arch building in arch/powerpc.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc: Merge kexec
Michael Ellerman [Mon, 14 Nov 2005 12:35:00 +0000 (23:35 +1100)]
[PATCH] powerpc: Merge kexec

This patch merges, to some extent, the PPC32 and PPC64 kexec implementations.

We adopt the PPC32 approach of having ppc_md callbacks for the kexec functions.
The current PPC64 implementation becomes the "default" implementation for PPC64
which platforms can select if they need no special treatment.

I've added these default callbacks to pseries/maple/cell/powermac, this means
iSeries no longer supports kexec - but it never worked anyway.

I've renamed PPC32's machine_kexec_simple to default_machine_kexec, inline with
PPC64. Judging by the comments it might be better named machine_kexec_non_of,
or something, but at the moment it's the only implementation for PPC32 so it's
the "default".

Kexec requires machine_shutdown(), which is in machine_kexec.c on PPC32, but we
already have in setup-common.c on powerpc. All this does is call
ppc_md.nvram_sync, which only powermac implements, so instead make
machine_shutdown a ppc_md member and have it call core99_nvram_sync directly
on powermac.

I've also stuck relocate_kernel.S into misc_32.S for powerpc.

Built for ARCH=ppc, and 32 & 64 bit ARCH=powerpc, with KEXEC=y/n. Booted on
P5 LPAR and successfully kexec'ed.

Should apply on top of 493f25ef4087395891c99fcfe2c72e62e293e89f.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] PPC_PREP: remove unneeded exports
Adrian Bunk [Sun, 13 Nov 2005 01:26:09 +0000 (02:26 +0100)]
[PATCH] PPC_PREP: remove unneeded exports

This patch removes the EXPORT_SYMBOL'ed but completely unused variable
ucSystemType and removes the unneeded EXPORT_SYMBOL(_prep_type).

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Tom Rini <trini@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Sat, 7 Jan 2006 19:29:51 +0000 (11:29 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

18 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Sat, 7 Jan 2006 18:45:22 +0000 (10:45 -0800)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

18 years agoMerge master.kernel.org:/home/rmk/linux-2.6-serial
Linus Torvalds [Sat, 7 Jan 2006 18:44:22 +0000 (10:44 -0800)]
Merge master.kernel.org:/home/rmk/linux-2.6-serial

18 years agoMerge master.kernel.org:/home/rmk/linux-2.6-mmc
Linus Torvalds [Sat, 7 Jan 2006 18:43:40 +0000 (10:43 -0800)]
Merge master.kernel.org:/home/rmk/linux-2.6-mmc

18 years ago[PATCH] fbcon: don´t call set_par() in fbcon_init() if vc_mode == KD_GRAPHICS
Knut Petersen [Sat, 7 Jan 2006 09:22:04 +0000 (10:22 +0100)]
[PATCH] fbcon: don´t call set_par() in fbcon_init() if vc_mode == KD_GRAPHICS

Nothing prevents a user to modprobe a framebuffer driver from e.g.  the
xterm prompt.  As a result, the set_par() function of the driver will be
called from fbcon_init().

This is fatal as a lot of X / framebuffer combinations are unable to
recover from set_par() reprogramming the graphics controller in
KD_GRAPHICS mode.

It is also unnecessary as the set_par() function will be called during a
switch to KD_TEXT anyway.  Because of this no side effects are possible.

Signed-off-by: Knut Petersen <Knut_Petersen@t-online.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[ARM] byteorder.h needs linux/compiler.h
Russell King [Sat, 7 Jan 2006 16:55:50 +0000 (16:55 +0000)]
[ARM] byteorder.h needs linux/compiler.h

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years agoInput: ibmasm - convert to dynamic input_dev allocation
Vernon Mauery [Sat, 7 Jan 2006 16:35:05 +0000 (11:35 -0500)]
Input: ibmasm - convert to dynamic input_dev allocation

Update the ibmasm driver to use the dynamic allocation of input_dev
structs to work with the sysfs subsystem.

Vojtech: Fixed some problems/bugs in the patch.
Dmitry: Fixed some more.

Signed-off-by: Vernon Mauery <vernux@us.ibm.com>
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
18 years ago[ARM] Move asm/hardware/clock.h to linux/clk.h
Russell King [Sat, 7 Jan 2006 16:15:52 +0000 (16:15 +0000)]
[ARM] Move asm/hardware/clock.h to linux/clk.h

This is needs to be visible to other architectures using the AMBA
bus and peripherals.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM] Move AMBA bus code to drivers/amba/
Russell King [Sat, 7 Jan 2006 14:54:15 +0000 (14:54 +0000)]
[ARM] Move AMBA bus code to drivers/amba/

Make the AMBA bus code visible to other architectures.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years agoMerge with Linus' kernel.
Russell King [Sat, 7 Jan 2006 14:40:05 +0000 (14:40 +0000)]
Merge with Linus' kernel.

18 years ago[ARM] Move AMBA include files to include/linux/amba/
Russell King [Sat, 7 Jan 2006 13:52:45 +0000 (13:52 +0000)]
[ARM] Move AMBA include files to include/linux/amba/

Since the ARM AMBA bus is used on MIPS as well as ARM, we need
to make the bus available for other architectures to use.  Move
the AMBA include files from include/asm-arm/hardware/ to
include/linux/amba/

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM] 3239/1: Add ARM optimised swab32
Andre McCurdy [Sat, 7 Jan 2006 11:39:20 +0000 (11:39 +0000)]
[ARM] 3239/1: Add ARM optimised swab32

Patch from Andre McCurdy

Replaces generic swab32 routine with a more ARM friendly version.
Reduces kernel text size by approx 1200 bytes when compiled with
3.4.4 and approx 2400 bytes with 4.0.2

Probably some performance benefit as well.

Signed-off-by: Andre McCurdy <armccurdy@yahoo.co.uk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM] 3235/1: SharpSL PM: Fix a gcc4 build error
Richard Purdie [Sat, 7 Jan 2006 11:12:26 +0000 (11:12 +0000)]
[ARM] 3235/1: SharpSL PM: Fix a gcc4 build error

Patch from Richard Purdie

Fix a gcc4 build error (incomplete element type) in the pxa SharpSL
PM code.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM] 3232/1: i.MX Frame Buffer undeclared "dev" variable fix
Pavel Pisa [Sat, 7 Jan 2006 10:44:32 +0000 (10:44 +0000)]
[ARM] 3232/1: i.MX Frame Buffer undeclared "dev" variable fix

Patch from Pavel Pisa

Correction of the code broken by update
whole-tree platform devices update.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ACPI] remove Kconfig "default y" for laptop drivers
Borislav Petkov [Fri, 6 Jan 2006 06:31:00 +0000 (01:31 -0500)]
[ACPI] remove Kconfig "default y" for laptop drivers

Signed-off-by: Borislav Petkov <petkov@uni-muenster.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
18 years ago[ACPI] fix kernel-doc warnings in acpi/scan.c
Randy Dunlap [Fri, 6 Jan 2006 06:31:00 +0000 (01:31 -0500)]
[ACPI] fix kernel-doc warnings in acpi/scan.c

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
18 years agoAuto-update from upstream
Len Brown [Sat, 7 Jan 2006 07:05:40 +0000 (02:05 -0500)]
Auto-update from upstream

18 years ago[PATCH] Fix posix-cpu-timers sched_time accumulation
David S. Miller [Fri, 6 Jan 2006 23:36:48 +0000 (15:36 -0800)]
[PATCH] Fix posix-cpu-timers sched_time accumulation

I've spent the past 3 days digging into a glibc testsuite failure in
current CVS, specifically libc/rt/tst-cputimer1.c The thr1 and thr2
timers fire too early in the second pass of this test.  The second
pass is noteworthy because it makes use of intervals, whereas the
first pass does not.

All throughout the posix-cpu-timers.c code, the calculation of the
process sched_time sum is implemented roughly as:

unsigned long long sum;

sum = tsk->signal->sched_time;
t = tsk;
do {
sum += t->sched_time;
t = next_thread(t);
} while (t != tsk);

In fact this is the exact scheme used by check_process_timers().

In the case of check_process_timers(), current->sched_time has just
been updated (via scheduler_tick(), which is invoked by
update_process_times(), which subsequently invokes
run_posix_cpu_timers()) So there is no special processing necessary
wrt. that.

In other contexts, we have to allot for the fact that tsk->sched_time
might be a bit out of date if we are current.  And the
posix-cpu-timers.c code uses current_sched_time() to deal with that.

Unfortunately it does so in an erroneous and inconsistent manner in
one spot which is what results in the early timer firing.

In cpu_clock_sample_group_locked(), it does this:

cpu->sched = p->signal->sched_time;
/* Add in each other live thread.  */
while ((t = next_thread(t)) != p) {
cpu->sched += t->sched_time;
}
if (p->tgid == current->tgid) {
/*
 * We're sampling ourselves, so include the
 * cycles not yet banked.  We still omit
 * other threads running on other CPUs,
 * so the total can always be behind as
 * much as max(nthreads-1,ncpus) * (NSEC_PER_SEC/HZ).
 */
cpu->sched += current_sched_time(current);
} else {
cpu->sched += p->sched_time;
}

The problem is the "p->tgid == current->tgid" test.  If "p" is
not current, and the tgids are the same, we will add the process
t->sched_time twice into cpu->sched and omit "p"'s sched_time
which is very very very wrong.

posix-cpu-timers.c has a helper function, sched_ns(p) which takes care
of this, so my fix is to use that here instead of this special tgid
test.

The fact that current can be one of the sub-threads of "p" points out
that we could make things a little bit more accurate, perhaps by using
sched_ns() on every thread we process in these loops.  It also points
out that we don't use the most accurate value for threads in the group
actively running other cpus (and this is mentioned in the comment).

But that is a future enhancement, and this fix here definitely makes
sense.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6
Linus Torvalds [Fri, 6 Jan 2006 23:25:08 +0000 (15:25 -0800)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6

18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 6 Jan 2006 23:24:28 +0000 (15:24 -0800)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6