Paul Mackerras [Fri, 8 Oct 2004 00:35:51 +0000 (17:35 -0700)]
[PATCH] PPC64 Replace cmp instructions with cmpw/cmpd
There were a few places in assembly code in the ppc64 part of the
kernel where we were using the old forms of the compare instruction
(cmp, cmpi, cmpl, cmpli) which don't specify the operand size (word or
doubleword). These have been accepted for a long time for backward
compatibility with the old POWER architecture (and defaulted to a
32-bit comparison) but are now being rejected by the latest versions
of binutils. Some of them were actual bugs in that they were on
things which were actually 64-bit values such as pointers (not that
any of them actually caused a problem in practice).
This patch replaces cmp{,l}{,i} with cmp{,l}[wd]{,i} as appropriate.
The original patch was from Segher Boessenkool, slightly modified by
me.
Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Paul Mackerras [Fri, 8 Oct 2004 00:35:39 +0000 (17:35 -0700)]
[PATCH] PPC64: Remove degree symbol from rtas-proc.c
Alan Cox pointed out that the degree symbol in the thermal sensor proc
files that we have on ppc64 cause problems for people using other
locales or UTF-8. This patch makes them disappear.
Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Some stuffs in ppc_ksyms.c where still #ifdef CONFIG_PPC_PSERIES, which
is no longer set for PowerMac-only configs. Change them to depend on
CONFIG_PPC_MULTIPLATFORM for now. Later on, a bunch of these will be
just gone since those are mostly deprecated functions and I'll move the
exports close to the actual functions.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Currently hostfs passes the rdev value from stat() on the host as rdev
value to return to stat() on the guest; but we cannot pass rdev as is
because glibc and the kernel disagree about its definition. So we must
decode it in a major/minor couple with glibc macros and re-encode it in
kernelspace code.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
On 2.4 we used force_delete() to make sure inode were not cached, and we then
close the host file when the inode is cleared; when porting to 2.6 the
"force_delete" thing was dropped, and this patch adds a fix for this (by
setting drop_inode = generic_delete_inode).
Search for drop_inode in the 2.6 Documentation/filesystems/vfs.txt for info
about this.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
When we don't know how to handle ptrace(2) calls, call the arch-independent
ptrace_request like i386 (and I guess other archs) do, instead of returning
-EIO.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Colin Leroy [Fri, 8 Oct 2004 00:34:03 +0000 (17:34 -0700)]
[PATCH] fix warning in arch/ppc/pmac/simple/misc.c
Fixes a "variable might be used uninitialized". As usual it's a harmless
warning because it can't really be, but that cleans the compilation's
output :)
Signed-off-by: Colin Leroy <colin@colino.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jens Axboe [Fri, 8 Oct 2004 00:33:02 +0000 (17:33 -0700)]
[PATCH] cdrom generic_packet oops fix
Add dummy ->generic_packet() for devices that don't provide one. It will
error all commands with "unknown opcode" 0x05/0x20/0x00 sense and return
-EIO.
Ingo Molnar [Fri, 8 Oct 2004 00:32:37 +0000 (17:32 -0700)]
[PATCH] Use cache_decay_ticks instead of a constant
This patch, based on Ken Chen's patch, changes the default 2.5 msec
migration-cutoff value to be based on cache_decay_ticks, which is what
we used for a long time prior the sched-domains code. (If an
architecture does not set cache_decay_ticks then 2.5 msec is used.)
This causes the following new migration-cutoff values on various SMP
systems:
[*] ppc64 does not set cache_decay_ticks so we fall back to the
default.
I believe in light of previous testing we could attempt this for 2.6.9 as
well. (Note: that the 2.6.9-rc3 patch looks similar but needs to patch
kernel/sched.c. Note2: this patch is different from Ken's original one.)
Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Ken Chen <kenneth.w.chen@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Arun Sharma [Thu, 7 Oct 2004 05:57:18 +0000 (05:57 +0000)]
[IA64] sparse annotations and cleanups for ia32 subsystem
+ Add sparse annotations to ia32 subsystem so it checks out cleanly.
+ Add set_fs(KERNEL_DS) in elfcore32.h
+ Use compat_ptr() instead of P()
+ Fix a bug in ia32_sigsuspend() by introducing __ia32_rt_sigsuspend()
Signed-off-by: David Mosberger-Tang <davidm@hpl.hp.com> Signed-off-by: Arun Sharma <arun.sharma@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Russell King [Thu, 7 Oct 2004 02:06:24 +0000 (19:06 -0700)]
[PATCH] Fix ide-cs resource management
PCMCIA resource management is no longer brain dead, and acts just like
any other bus subsystem. Therefore, there's no need to play games with
the resource subsystem anymore.
Signed-off-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This updates the g5_defconfig, among others, it adds irq stacks,
hugetlbfs and cramfs (later is needed for ppl trying to install fedora,
and so often forgotten that I prefer adding it to the defconfig).
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
David Mosberger [Wed, 6 Oct 2004 17:33:12 +0000 (17:33 +0000)]
[IA64] fix UP build
Put back a secondary declaration of ipi_base_addr in hardirq.h. It
really is needed for UP builds and there doesn't seem to be an easy
way to avoid include-hell otherwise.
Signed-off-by: davidm@hpl.hp.com Signed-off-by: Tony Luck <tony.luck@intel.com>
Tony Luck [Wed, 6 Oct 2004 17:18:27 +0000 (17:18 +0000)]
[IA64] Don't hardcode offsets in thread_info
We had hardcoded defines for TI_TASK TI_EXEC_DOMAIN, TI_FLAGS, TI_CPU,
TI_ADDR_LIMIT, TI_PRE_COUNT, TI_RESTART_BLOCK; but only two of these
were ever used. Remove all from thread_info.h, and generate the two
that we do use (TI_FLAGS and TI_PRE_COUNT) in asm_offsets.c
The find_udbg_vterm() used to initialize the early boot console
on LPAR machines will not work properly on some recent pSeries
because the firmware is playing tricks with the "phandle" values
used to identify firmware nodes. This patch fixes that by using
the full path instead.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ian Campbell [Wed, 6 Oct 2004 23:04:39 +0000 (00:04 +0100)]
[ARM PATCH] 2133/1: params_phys is not available on PXA and apears to be ARCH_RPM specific anyway
Patch from Ian Campbell
Arecent changeset[0] that changed params into an asm function call
broke the PXA build since PXA does not define PARAMS_PHYS therefore
the params_phys variable is never defined and linking arch/arm/boot/compressed/head.S fails.
The function is defined in include/asm-arm/arch-rpc/uncompress.h
and so I assume it is dependendant on CONFIG_ARCH_RPC. I can't find
any use of it outside this file.
The token ring code in the kernel is bitrotting (no surprise :) ),
it uses skb->data all around... I have an assortment of token ring
cards but no MAU, can anybody send me one, please? I promise to
make ssh work over LLC over Token Ring networks! Duh... :o)
Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br> Signed-off-by: David S. Miller <davem@redhat.com>
Hirokazu Takata [Wed, 6 Oct 2004 01:15:24 +0000 (18:15 -0700)]
[PATCH] m32r: update ioremap routine
Here is a patch to update ioremap*.c for m32r, taken from "Add __iomem
modifier to the return value type of __ioremap() for much stricter
type-checking."
* arch/m32r/mm/ioremap.c: ditto.
- Add __iomem modifier to the return value type of __ioremap()
for much stricter type-checking.
* arch/m32r/mm/ioremap-nommu.c: ditto.
* include/asm-m32r/io.h:
- Modified for much stricter type-checking.
- Change __inline__ to inline.
[PATCH] Disable SW irqbalance/irqaffinity for E7520/E7320/E7525 - change TARGET_CPUS on x86_64
Set TARGET_CPUS on x86_64 to cpu_online_map. This brings the code inline
with x86 mach-default. Fix MSI_TARGET_CPU code which will break with this
target_cpus change.
Andi Kleen [Wed, 6 Oct 2004 01:14:35 +0000 (18:14 -0700)]
[PATCH] x86_64: make in_gate_vma() safer
x86-64 in_gate_vma would take a read lock on the VMA when the passed
address was inside the 32bit vsyscall page.
This would be called by get_user_pages, which already holds the mmap_sem.
Unfortunately some callers of get_user_pages hold the mmap_sem for writing,
which could in theory cause a deadlock.
I think it can currently not happen because the only users who hold it for
write before calling gup() are coredump and AIO in the ring setup, and both
should not ever access the vsyscall page.
But not taking the semaphore is safer and avoid this here.
Andi Kleen [Wed, 6 Oct 2004 01:13:54 +0000 (18:13 -0700)]
[PATCH] x86_64: remove CONFIG_FRAME_POINTER
CONFIG_FRAME_POINTER has never worked on x86-64 because it never passed
-fno-omit-frame-pointer to the compiler, and that is the only way to get a
frame pointer on x86-64.
It also causes complications with profiling. Drop it.
Andi Kleen [Wed, 6 Oct 2004 01:13:42 +0000 (18:13 -0700)]
[PATCH] x86_64: fix profile_pc
This fixes profile_pc to work properly on x86-64 and not crash.
It does now a simple backtrace to the caller of the spin lock without
requiring a frame pointer for this.
Frame pointer support has been dropped because it never worked.
There is still a small race window, but the only way to avoid it would be
to rewrite kernel/spinlock.c in assembler again. The race will account a
profile tick the the parent of the spinlock caller.
David Gibson [Wed, 6 Oct 2004 01:12:54 +0000 (18:12 -0700)]
[PATCH] ppc64: squash EEH warnings
A slightly non-ideal version of the recent patch which fixed EEH being a
no-op went in. The srcsave variable in eeh_memcpy_to_io() is now never
referenced on non-pSeries machines, and so spews hundreds of warnings. The
variable doesn't actually accomplish anything, so this patch gets rid of
it.
Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Gerhard Jaeger [Wed, 6 Oct 2004 01:11:53 +0000 (18:11 -0700)]
[PATCH] ppc32: fix PFC1_EPS and PFC1_EPS_SHIFT for IBM440GX
While writing some BSP code for a 440GX custom board, I noticed, that the
DCRN_SDR_PFC1_EPS and DCRN_SDR_PFC1_EPS_SHIFT definitions are wrong and
therefore the functions ibm440gx_get_eth_grp() and ibm440gx_set_eth_grp()
won't work correctly.
Signed-off-by: Matt Porter <mporter@kernel.crashing.org> Signed-off-by: Gerhard Jaeger <gjaeger@sysgo.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alexander Viro [Wed, 6 Oct 2004 00:56:41 +0000 (17:56 -0700)]
[PATCH] trivial usb endianness annotations
trivial endianness annotations in drivers/usb (apply after ohci and isd200
fixes).
Note: drivers/usb is nearly endian-clean at that point; there are several
very dubious places in there (in particular, rtl8150, pegasus and usbnet
are almost certainly broken in mii-related code on big-endian hosts); I'm
leaving them alone for now.
Signed-off-by: Al Viro <viro@parcelfarce.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alexander Viro [Wed, 6 Oct 2004 00:56:15 +0000 (17:56 -0700)]
[PATCH] ohci bugfix for big-endian 64bit boxen
->dma can be a 64bit variable on 64bit boxen; its value will fit into 32 bits
just fine (due to dma mask). However, cpu_to_le32p(&...) will break if we
are on a 64bit big-endian; we'll end up up passing it the address of upper
32 bits and get 0 instead of correct value. Fix is trivial...
Signed-off-by: Al Viro <viro@parcelfarce.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alexander Viro [Wed, 6 Oct 2004 00:56:03 +0000 (17:56 -0700)]
[PATCH] hfsplus endianness bugfix
hfs_bnode_read_u8() always returns 0 on little-endian (cut'n'paste bug -
function is almost exact copy of its u16 counterpart, but be16_to_cpu()
should've been removed here).
Signed-off-by: Al Viro <viro@parcelfarce.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alexander Viro [Wed, 6 Oct 2004 00:54:02 +0000 (17:54 -0700)]
[PATCH] ncpfs (7/7): misc fixes and cleanups
* remaining endiannes cleanups
* don't mess with setting finfo.i.dataStreamSize when creating the root
directory inode; that field is ignored when populating in-core directory
inodes.
* missing cpu_to_le16() in ncp_search_for_fileset() (for big-endian clients
server sees 0xff7f instead of intended 0x7fff).
Signed-off-by: Al Viro <viro@parcelfarce.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alexander Viro [Wed, 6 Oct 2004 00:53:38 +0000 (17:53 -0700)]
[PATCH] ncpfs (5/7): le16 handling in marshalling
New helper: ncp_reply_le16() (decode 16bit little-endian).
ConvertToNWfromDWORD() cleaned up and fixed (it used to have one too many
le16_to_cpu() in arithmetics, on top of ugly tricks with memcpy() et.al.).
ncp_reply_word() has no callers left; removed.
Signed-off-by: Al Viro <viro@parcelfarce.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>