Commit Graph

3860 Commits

Author SHA1 Message Date
David S. Miller
5cd9194a1b [PATCH] sparc: convert IO remapping to VM_PFNMAP
Here are the Sparc bits.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-28 14:35:36 -08:00
Linus Torvalds
6aab341e0a mm: re-architect the VM_UNPAGED logic
This replaces the (in my opinion horrible) VM_UNMAPPED logic with very
explicit support for a "remapped page range" aka VM_PFNMAP.  It allows a
VM area to contain an arbitrary range of page table entries that the VM
never touches, and never considers to be normal pages.

Any user of "remap_pfn_range()" automatically gets this new
functionality, and doesn't even have to mark the pages reserved or
indeed mark them any other way.  It just works.  As a side effect, doing
mmap() on /dev/mem works for arbitrary ranges.

Sparc update from David in the next commit.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-28 14:34:23 -08:00
Pierre Ossman
24117defab [MMC] Fix protocol errors
A review against MMC/SD specifications found some errors in the current
implementation.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-28 21:00:29 +00:00
Sascha Hauer
f5417612d7 [ARM] 3181/1: add PORT_ identifier for Hilscher netx uart
Patch from Sascha Hauer

This patch adds PORT_NETX for supporting the Hilscher netx embedded
UARTs.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-28 18:09:44 +00:00
Lucas Correia Villa Real
192cdc5809 [ARM] 3178/1: S3C2400 - adds GPIO registers definitions to regs-gpio.h
Patch from Lucas Correia Villa Real

This patch adds definitions to GPIO registers for the S3C2400 into
include/asm-arm/arch-s3c2410/regs-gpio.h.

Signed-off-by: Lucas Correia Villa Real <lucasvr@gobolinux.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-28 18:08:43 +00:00
Russell King
225937bd5d [ARM] Remove asm/hardware.h include from SA1100 io.h
Unfortunately, we have a symbol clash between the SA-1100 header and
some drivers.  Since everywhere which needs SA1100 specifics includes
asm/hardware.h, we don't need to include it in the SA1100 io.h header.

In file included from drivers/net/wireless/wavelan_cs.p.h:459,
                 from drivers/net/wireless/wavelan_cs.c:60:
drivers/net/wireless/wavelan_cs.h:97:1: warning: "LCSR" redefined
In file included from include/asm/arch/hardware.h:56,
                 from include/asm/hardware.h:16,
                 from include/asm/arch/io.h:13,
                 from include/asm/io.h:71,
                 from drivers/net/wireless/wavelan_cs.p.h:433,
                 from drivers/net/wireless/wavelan_cs.c:60:
include/asm/arch/SA-1100.h:1907:1: warning: this is the location of the previous definition

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-25 15:33:12 +00:00
David Gibson
9a94c5793a [PATCH] powerpc: More hugepage boundary case fixes
Blah.  The patch [0] I recently sent fixing errors with
in_hugepage_area() and prepare_hugepage_range() for powerpc itself has
an off-by-one bug.  Furthermore, the related functions
touches_hugepage_*_range() and within_hugepage_*_range() are also
buggy.  Some of the bugs, like those addressed in [0] originated with
commit 7d24f0b8a5 where we tweaked the
semantics of where hugepages are allowed.  Other bugs have been there
essentially forever, and are due to the undefined behaviour of '<<'
with shift counts greater than the type width (LOW_ESID_MASK could
return non-zero for high ranges with the right congruences).

The good news is that I now have a testsuite which should pick up
things like this if they creep in again.

[0] "powerpc-fix-for-hugepage-areas-straddling-4gb-boundary"

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-25 22:12:45 +11:00
Paul Mackerras
26925c5910 Merge ../linux-2.6 2005-11-25 22:12:01 +11:00
Linus Torvalds
cd0cca7bf5 Merge master.kernel.org:/home/rmk/linux-2.6-arm 2005-11-24 18:41:59 -08:00
Randy Dunlap
8dd396ec7b [PATCH] USB: kernel-doc for linux/usb.h
Fix kernel-doc warning in linux/usb.h.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-23 23:04:28 -08:00
David Gibson
5e391dc9e3 [PATCH] powerpc: fix for hugepage areas straddling 4GB boundary
Commit 7d24f0b8a5 fixed bugs in the ppc64 SLB
miss handler with respect to hugepage handling, and in the process tweaked
the semantics of the hugepage address masks in mm_context_t.

Unfortunately, it left out a couple of necessary changes to go with that
change.  First, the in_hugepage_area() macro was not updated to match,
second prepare_hugepage_range() was not updated to correctly handle
hugepages regions which straddled the 4GB point.

The latter appears only to cause process-hangs when attempting to map such
a region, but the former can cause oopses if a get_user_pages() is
triggered at the wrong point.  This patch addresses both bugs.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-23 16:08:39 -08:00
Hugh Dickins
7c72aaf296 [PATCH] mm: fill arch atomic64 gaps
alpha, sparc64, x86_64 are each missing some primitives from their atomic64
support: fill in the gaps I've noticed by extrapolating asm, follow the
groupings in each file.  But powerpc and parisc still lack atomic64.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Andi Kleen <ak@muc.de>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-23 16:08:39 -08:00
Adam Brooks
3238c448c6 [ARM] 3173/1: Fix to allow 2.6.15-rc2 to compile for IOP3xx boards
Patch from Adam Brooks

Fixes an issue in 2.6.15-rc2 that prevented compilation of kernels for IOP3xx boards.

Signed-off-by: Adam Brooks <adam.j.brooks@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-23 22:45:27 +00:00
Linus Torvalds
2d0ebb3603 Revert "[NET]: Shut up warnings in net/core/flow.c"
This reverts commit af2b4079ab

Changing the #define to an inline function breaks on non-SMP builds,
since wuite a few places in the kernel do not implement the ipi handler
when compiling for UP.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-23 08:44:05 -08:00
Olof Johansson
91f14480a5 [PATCH] powerpc: update my email address
Email address update, changing old work address to personal (permanent)
one.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-23 21:23:20 +11:00
Linus Torvalds
1778d55edb compat-ioctl.c: fix compile with no CONFIG_JBD
The ext3 compat-ioctl translation wants to translate data structures
that <linux/jbd.h> only declared when CONFIG_JBD was enabled.

So make <linux/jbd.h> play nicely even when we don't actually end up
using it.

Acked-by: Andrew Morton <akpm@osdl.org>
Acked-by: Jeffrey Hundstad <jeffrey.hundstad@mnsu.edu>
Acked-by: Zan Lynx <zlynx@acm.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-22 21:58:37 -08:00
Linus Torvalds
ac3461ad63 Fix up GFP_ZONEMASK for GFP_DMA32 usage
There was some confusion about the different zone usage, this should fix
up the resulting mess in the GFP zonemask handling.

The different zone usage is still confusing (it's very easy to mix up
the individual zone numbers with the GFP zone _list_ numbers), so we
might want to clean up some of this in the future, but in the meantime
this should fix the actual problems.

Acked-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-22 19:39:30 -08:00
Jamal Hadi Salim
0ff60a4567 [IPV4]: Fix secondary IP addresses after promotion
This patch fixes the problem with promoting aliases when:
a) a single primary and > 1 secondary addresses
b) multiple primary addresses each with at least one secondary address

Based on earlier efforts from Brian Pomerantz <bapper@piratehaven.org>,
Patrick McHardy <kaber@trash.net> and Thomas Graf <tgraf@suug.ch>

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-11-22 14:47:37 -08:00
Russell King
af2b4079ab [NET]: Shut up warnings in net/core/flow.c
Not really a network problem, more a !SMP issue.

net/core/flow.c:295: warning: statement with no effect

flow.c:295:        smp_call_function(flow_cache_flush_per_cpu, &info, 1, 0);

Fix this by converting the macro to an inline function, which
also increases the typechecking for !SMP builds.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-11-22 14:38:04 -08:00
Hugh Dickins
0b14c179a4 [PATCH] unpaged: VM_UNPAGED
Although we tend to associate VM_RESERVED with remap_pfn_range, quite a few
drivers set VM_RESERVED on areas which are then populated by nopage.  The
PageReserved removal in 2.6.15-rc1 changed VM_RESERVED not to free pages in
zap_pte_range, without changing those drivers not to set it: so their pages
just leak away.

Let's not change miscellaneous drivers now: introduce VM_UNPAGED at the core,
to flag the special areas where the ptes may have no struct page, or if they
have then it's not to be touched.  Replace most instances of VM_RESERVED in
core mm by VM_UNPAGED.  Force it on in remap_pfn_range, and the sparc and
sparc64 io_remap_pfn_range.

Revert addition of VM_RESERVED to powerpc vdso, it's not needed there.  Is it
needed anywhere?  It still governs the mm->reserved_vm statistic, and special
vmas not to be merged, and areas not to be core dumped; but could probably be
eliminated later (the drivers are probably specifying it because in 2.4 it
kept swapout off the vma, but in 2.6 we work from the LRU, which these pages
don't get on).

Use the VM_SHM slot for VM_UNPAGED, and define VM_SHM to 0: it serves no
purpose whatsoever, and should be removed from drivers when we clean up.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Acked-by: William Irwin <wli@holomorphy.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-22 09:13:42 -08:00
Hugh Dickins
664beed019 [PATCH] unpaged: unifdefed PageCompound
It looks like snd_xxx is not the only nopage to be using PageReserved as a way
of holding a high-order page together: which no longer works, but is masked by
our failure to free from VM_RESERVED areas.  We cannot fix that bug without
first substituting another way to hold the high-order page together, while
farming out the 0-order pages from within it.

That's just what PageCompound is designed for, but it's been kept under
CONFIG_HUGETLB_PAGE.  Remove the #ifdefs: which saves some space (out- of-line
put_page), doesn't slow down what most needs to be fast (already using
hugetlb), and unifies the way we handle high-order pages.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-22 09:13:42 -08:00
Jeff Dike
e23181deec [PATCH] uml: eliminate anonymous union and clean up symlink lossage
This gives a name to the anonymous union introduced in skas-hold-own-ldt,
allowing to build on a wider range of gccs.

It also removes ldt.h, which somehow became real, and replaces it with a
symlink, and creates ldt-x86_64.h as a copy of ldt-i386.h for now.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-22 09:13:41 -08:00
Linus Torvalds
66b5920f61 Merge master.kernel.org:/home/rmk/linux-2.6-arm 2005-11-21 19:00:05 -08:00
Linus Torvalds
49bd96c2ca Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2005-11-21 17:44:56 -08:00
Jack Steiner
771388dc7d [IA64-SGI] support for older versions of PROM
Add support for old versions of the SN PROMs. Eventually this
support will be deleted but it is useful right now to continue
supporting older PROMs.

Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-11-21 14:17:28 -08:00
Linus Torvalds
f9e6bfa141 Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart 2005-11-21 10:56:30 -08:00
Linus Torvalds
1a324727ca Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2005-11-21 10:46:34 -08:00
Russell King
30a09616df [ARM] ebsa110: __arch_ioremap should be 3 args
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-21 15:26:52 +00:00
Russell King
5aaf291056 [ARM] Add asm/memory.h to asm/numnodes.h
Since the defintion of NODES_SHIFT may be overridden in asm/arch/memory.h
it's important to include asm/memory.h into asm/numnodes.h to ensure
that the correct value is always defined.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-21 15:26:18 +00:00
Kenneth Tan
19f07be3b8 [ARM] 3171/1: To add missing QMGR region size for IXP4XX
Patch from Kenneth Tan

To add queue manager region size which is missing from ixp4xx-regs.h

Signed-off-by: Kenneth Tan <chong.yin.tan@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-21 15:17:07 +00:00
Dave Jones
e7e37ee9c5 Merge ../linus/ 2005-11-21 06:56:52 -08:00
Dave Jones
c243f1f1f6 [AGPGART] Support VIA P4M800CE bridge.
Signed-off-by: Dave Jones <davej@redhat.com>
2005-11-21 06:53:16 -08:00
Randy Dunlap
461ddf3b90 [NET]: kernel-doc fixes
Fix kernel-doc warnings in network files.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-11-20 21:25:15 -08:00
Patrick McHardy
b84f4cc977 [NET]: Use unused bit for ipvs_property field in struct sk_buff
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-11-20 21:19:21 -08:00
Nicolas Kaiser
bd4cfb594b [NETFILTER]: Remove ARRAY_SIZE duplicate
Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-11-20 21:11:31 -08:00
David S. Miller
1ef43204f4 Merge git://git.skbuff.net/gitroot/yoshfuji/linux-2.6.14+advapi-fix/ 2005-11-20 20:52:16 -08:00
Jacob.Shin@amd.com
e6c667592e [PATCH] Fix x86_64/msr.h interface to agree with i386/msr.h
Ever since we remove msr.c from x86_64 branch and started grabbing it from
i386, msr device (read functionality) has been broken for us.

This is due to the differences between asm-i386/msr.h and asm-x86_64/msr.h interfaces.

Here is a patch to our side to fix this.

Thankfully, as of current (2.6.15-rc1-git6) tree, arch/i386/kernel/msr.c is the only file that uses rdmsr_safe macro.

Signed-off-by: Jacob Shin <jacob.shin@amd.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-20 11:52:59 -08:00
Dmitry Torokhov
59c7c0377e Input: uinput - add UI_SET_SWBIT ioctl
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-11-20 00:51:33 -05:00
Dmitry Torokhov
29506415a0 Input: uinput - convert to dynalloc allocation
Also introduce proper locking when creating/deleting device.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-11-20 00:51:22 -05:00
YOSHIFUJI Hideaki
df9890c31a [IPV6]: Fix sending extension headers before and including routing header.
Based on suggestion from Masahide Nakamura <nakam@linux-ipv6.org>.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
2005-11-20 12:23:18 +09:00
Linus Torvalds
44779149e9 Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6 2005-11-19 16:31:03 -08:00
Linus Torvalds
8ee3f40267 Merge master.kernel.org:/home/rmk/linux-2.6-serial 2005-11-19 15:25:23 -08:00
Linus Torvalds
29ac878a71 Merge master.kernel.org:/home/rmk/linux-2.6-arm 2005-11-19 15:21:51 -08:00
Bartlomiej Zolnierkiewicz
e07bc70964 [PATCH] ide: remove dead code from flagged_taskfile()
flagged_taskfile() is called from execute_drive_cmd()
(the only user) only if args->tf_out_flags.all != 0.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2005-11-19 22:17:55 +01:00
Bartlomiej Zolnierkiewicz
071ffcc0f7 [PATCH] ide: remove unused ide_action_t:ide_next
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2005-11-19 22:01:35 +01:00
Bartlomiej Zolnierkiewicz
84e7b9e94b [PATCH] ide: remove duplicate documentation for ide_do_drive_cmd()
Remove duplicate documentation for ide_do_drive_cmd() from
<linux/ide.h>, this function is already documented in ide-io.c.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2005-11-19 21:54:04 +01:00
Aurelien Jarno
14351f8e57 [PATCH] sis5513: enable ATA133 for the SiS965 southbridge
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2005-11-19 21:43:45 +01:00
Mathias Kretschmer
4f1d774aad [PATCH] via82cxxx: add VIA VT6410 IDE support
From: Mathias Kretschmer <posting@blx4.net>

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2005-11-19 21:32:38 +01:00
Russell King
b63d4f0fb8 [SERIAL] Fix status reporting with PL011 serial driver
The receiver status register reports latched error conditions, which
must be cleared by writing to it.  However, the data register reports
unlatched conditions which are associated with the current character.
Use the data register to interpret error status rather than the RSR.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-19 11:10:35 +00:00
Paul Mackerras
0212ddd839 powerpc: Merge spinlock.h
The result is mostly similar to the original ppc64 version but with
some adaptations for 32-bit compilation.

include/asm-ppc64 is now empty!

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-19 20:50:46 +11:00
Paul Mackerras
21a6290220 powerpc: move include/asm-ppc64/ptrace-common.h to arch/powerpc/kernel
It's only used by arch/powerpc/kernel/ptrace{,32}.c.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-19 20:47:22 +11:00
Paul Mackerras
f8ef270596 powerpc: Merge pci.h
This involves some minor changes: a few unused functions that the
ppc32 pci.c provides are no longer declared here or exported;
pcibios_assign_all_busses now just refers to the pci_assign_all_buses
variable on both 32-bit and 64-bit; pcibios_scan_all_fns is now
just 0 instead of a function that always returns 0 on 64-bit.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-19 20:46:04 +11:00
Paul Mackerras
047ea78465 powerpc: Trivially merge several headers from asm-ppc64 to asm-powerpc
For these, I have just done the lame-o merge where the file ends up
looking like:

	#ifndef CONFIG_PPC64
	#include <asm-ppc/foo.h>
	#else
	... contents from asm-ppc64/foo.h
	#endif

so nothing has changed, really, except that we reduce include/asm-ppc64
a bit more.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-19 20:17:32 +11:00
David Gibson
800fc3eeb0 [PATCH] powerpc: Remove imalloc.h
asm-ppc64/imalloc.h is only included from files in arch/powerpc/mm.
We already have a header for mm local definitions,
arch/powerpc/mm/mmu_decl.h.  Thus, this patch moves the contents of
imalloc.h into mmu_decl.h.  The only exception are the definitions of
PHBS_IO_BASE, IMALLOC_BASE and IMALLOC_END.  Those are moved into
pgtable.h, next to similar definitions of VMALLOC_START and
VMALLOC_SIZE.

Built for multiplatform 32bit and 64bit (ARCH=powerpc).

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-19 14:46:02 +11:00
Paul Mackerras
0e6850f615 Merge branch 'mymerge' of ssh://ozlabs.org/home/sfr/kernel-sfr 2005-11-19 14:25:23 +11:00
Linus Torvalds
b286e39207 Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6 2005-11-18 15:58:38 -08:00
Linus Torvalds
62ae144f56 Merge branch 'parisc' of master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6 2005-11-18 14:25:40 -08:00
Linus Torvalds
bcd039b230 Merge branch 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block 2005-11-18 13:49:44 -08:00
Kyle McMartin
2161558fa5 Merge branch 'master' 2005-11-18 16:39:20 -05:00
Matthew Wilcox
9ab8851549 [PARISC] Fix compile warning caused by conflicting types of expand_upwards()
Fix compile warning caused by conflicting types of expand_upwards. IA64
requires it to not be static inline, as it's used outside mm/mmap.c

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-18 16:16:42 -05:00
Laurent Riffard
4ef3b8f4a5 [PATCH] ide: remove ide_driver_t.owner field
The structure ide_driver_t have a .owner field which is a duplicate
of .gendriver.owner field (.gen_driver is a struct device_driver).

This patch removes ide_driver_t's owner field.

Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2005-11-18 22:15:40 +01:00
Mark Maule
48b1dcc5d8 [IA64] altix: fix copyright in tioce .h files
Fix up copyright in tioce header files

Signed-off-by: Mark Maule <maule@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-11-18 13:06:03 -08:00
mikem
7f0d50391a [PATCH 1/3] cciss: bug fix for hpacucli
This patch fixes a bug that breaks hpacucli, a command line interface
for the HP Array Config Utility. Without this fix the utility will
not detect any controllers in the system. I thought I had already fixed
this, but I guess not.

Thanks to all who reported the issue. Please consider this this inclusion.

Signed-off-by: Mike Miller <mikem@beardog.cca.cpqcorp.net>
Signed-off-by: Jens Axboe <axboe@suse.de>
2005-11-18 22:00:17 +01:00
Andrew Morton
cea00da397 [PATCH] git-netdev-all-ieee80211_get_payload-warning-fix
include/net/ieee80211.h: In function `ieee80211_get_payload':
include/net/ieee80211.h:1046: warning: control reaches end of non-void function

Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-11-18 13:33:31 -05:00
Andy Whitcroft
b50ce2324c [PATCH] ppc64 need HPAGE_SHIFT when huge pages disabled
With the new powerpc architecture we don't seem to be able to disable huge
pages anymore.

    mm/built-in.o(.toc1+0xae0): undefined reference to `HPAGE_SHIFT'
    make: *** [.tmp_vmlinux1] Error 1

We seem to need to define HPAGE_SHIFT to something when HUGETLB_PAGE isn't
defined.  This patch defines it to PAGE_SHIFT when we have no support.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-18 07:49:46 -08:00
Vitaly Bordug
966cc04b4d [PATCH] ppc32: add missing define for fs_enet Ethernet driver
This adds the FCC_PSMR_RMII defenition, which is used in fs_enet to enable
RMII mode.

Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-18 07:49:45 -08:00
Linus Torvalds
2656c076e3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge 2005-11-18 07:22:51 -08:00
Stephen Rothwell
78b09735a2 powerpc: merge dma-mapping.h
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-11-19 01:48:52 +11:00
Stephen Rothwell
78baa2f8ad ppc32: move some dma routines
Every other architecture define dma_cache_{inv,wback,wback_inv}
in asm/io.h and doing so brings us closer to ppc64.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-11-19 01:48:33 +11:00
Russell King
d2c5b69099 [ARM] Fix get_user when passed a const pointer
Unfortunately, later gcc versions error out when our get_user is passed
a const pointer, since we write to a temporary variable declared as
typeof(*(p)) which propagates the const-ness.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-18 14:22:03 +00:00
Benjamin Herrenschmidt
5daf9071b5 [PATCH] powerpc: merge align.c
This patch merges align.c, the result isn't quite what was in ppc64 nor
what was in ppc32 :) It should implement all the functionalities of both
though. Kumar, since you played with that in the past, I suppose you
have some test cases for verifying that it works properly before I dig
out the 601 machine ? :)

Since it's likely that I won't be able to test all scenario, code
inspection is much welcome.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18 14:39:23 +11:00
Paul Mackerras
6defa38b37 powerpc: Fix delay functions for 601 processors
My earlier merge of delay.h introduced a timebase-based udelay for
32-bit machines but also broke the 601, which doesn't have the
timebase register.  This fixes it by using the 601's RTC register on
the 601, and also moves __delay() and udelay() to be out-of-line in
arch/powerpc/kernel/time.c.  These functions aren't really performance
critical, after all.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18 14:08:12 +11:00
Michael Ellerman
d2a3317097 [PATCH] powerpc: Fix typo in topology.h
The fix to topology.h (5cfccd7f13) seems to have
a typeo, struct sched_domain has an idle_idx member but not an idle_id
member. I assume this is the fix.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18 13:18:11 +11:00
Matthew Wilcox
29a622dd2b [PARISC] Always spinlock tlb flush operations to ensure preempt safety
Since taking a spinlock disables preempt, and we need to spinlock tlb flush
on SMP for N class, we might as well just spinlock on uniprocessor machines
too.

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17 16:44:14 -05:00
James Bottomley
08dc2ca61e [PARISC] Fix our spinlock implementation
We actually have two separate bad bugs

1. The read_lock implementation spins with disabled interrupts.  This is
completely wrong
2. Our spin_lock_irqsave should check to see if interrupts were enabled
before the call and re-enable interrupts around the inner spin loop.

The problem is that if we spin with interrupts off, we can't receive
IPIs. This has resulted in a bug where SMP machines suddenly spit
smp_call_function timeout messages and hang.

The scenario I've caught is

CPU0 does a flush_tlb_all holding the vmlist_lock for write.
CPU1 tries a cat of /proc/meminfo which tries to acquire vmlist_lock for
     read
CPU1 is now spinning with interrupts disabled
CPU0 tries to execute a smp_call_function to flush the local tlb caches

This is now a deadlock because CPU1 is spinning with interrupts disabled
and can never receive the IPI

Signed-off-by: James Bottomley <jejb@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17 16:35:09 -05:00
James Bottomley
c2ab64d098 [PARISC] Add IRQ affinities
This really only adds them for the machines I can check SMP on, which
is CPU interrupts and IOSAPIC (so not any of the GSC based machines).

With this patch, irqbalanced can be used to maintain irq balancing.
Unfortunately, irqbalanced is a bit x86 centric, so it doesn't do an
incredibly good job, but it does work.

Signed-off-by: James Bottomley <jejb@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17 16:28:37 -05:00
Kyle McMartin
1d4c452a85 [PARISC] Fix uniprocessor build by dummying smp_send_all_nop()
Since irq.c uses smp_send_all_nop, we must define it for UP builds
as well. Make it a static inline so it gets optimized away. This forces
irq.c to include <asm/smp.h> though.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17 16:27:44 -05:00
James Bottomley
d911aed8ad [PARISC] Fix our interrupts not to use smp_call_function
Fix our interrupts not to use smp_call_function

On K and D class smp, the generic code calls this under an irq
spinlock, which causes the WARN_ON() message in smp_call_function()
(and is also illegal because it could deadlock).

The fix is to use a new scheme based on the IPI_NOP.

Signed-off-by: James Bottomley <jejb@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17 16:27:02 -05:00
Linus Torvalds
7652aab77f Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus 2005-11-17 10:56:34 -08:00
Linus Torvalds
cd02e27b15 x86: Fix silly typo in recent <asm/signal.h> fixes
The second __const_sigaddset() should have been a sigdelset..  Compile
trouble noted by Greg K-H.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-17 10:04:31 -08:00
Russell King
67a1901ff4 [ARM] __ioremap doesn't use 4th argument
The "align" argument in ARMs __ioremap is unused and provides a
misleading expectation that it might do something.  It doesn't.
Remove it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-17 16:48:00 +00:00
Linus Torvalds
d0fa7e9f8e Merge master.kernel.org:/home/rmk/linux-2.6-arm 2005-11-17 08:45:42 -08:00
Constantine Gavrilov
b7fd1edd2c [PATCH] x86: fix sigaddset() inline asm memory constraint
Due to incomplete memory constraints, gcc would miscompile code with
sigaddset on i386 if sig arg was const.

A quote form Jakub to make the issue clear:

 "You need either
	__asm__("btsl %1,%0" : "+m"(*set) : "Ir"(_sig-1) : "cc");
  or
	__asm__("btsl %1,%0" : "=m"(*set) : "Ir"(_sig-1), "m"(*set) : "cc");
  because the btsl instruction doesn't just set the memory to some
  value, but needs to read its previous content as well.  If you don't
  tell that fact to GCC, GCC is of course free to optimize as if the asm
  was just setting the value and not depended on the previous value."

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-17 08:42:26 -08:00
Ralf Baechle
1a6ea3ec67 [MIPS] SEAD: More build fixes.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17 16:23:57 +00:00
Ralf Baechle
561a079240 [MIPS] SEAD: Delete seadint_init() prototype.
There is no definition for seadint_init() and the unprotected prototype
breaks compilation of assembler files.
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17 16:23:55 +00:00
Ralf Baechle
c183f1224b [MIPS] JMR3927: Fix include wrapper symbol.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17 16:23:54 +00:00
Arnaud Giersch
f10d14ddec [MIPS] Fix documentation typos.
Signed-off-by: Arnaud Giersch <arnaud.giersch@free.fr>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17 16:23:49 +00:00
Arnaud Giersch
99289a4e8a [MIPS] Add const qualifier to writes##bwlq.
Add const qualifier to parameter addr of writes##bwlq.
    
Signed-off-by: Arnaud Giersch <arnaud.giersch@free.fr>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17 16:23:49 +00:00
Arnaud Giersch
59f145d28c [MIPS] IP32: Fix sparse warnings.
Add __iomem qualifier to crime and mace pointers.
    
Signed-off-by: Arnaud Giersch <arnaud.giersch@free.fr>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17 16:23:48 +00:00
Arnaud Giersch
84c493d8e1 [MIPS] IP32 Fix and complete IP32 parport definitions
Fix, complete, and indent IP32 parport definitions.
Definition were wrong for CTXINUSE and DMACTIVE (1-bit shift).
Add macros DATA_BOUND, DATALEN_SHIFT, and CTRSHIFT.
    
Signed-off-by: Arnaud Giersch <arnaud.giersch@free.fr>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17 16:23:47 +00:00
Ralf Baechle
efd9412d85 [MIPS] JMR3927: Undo accidental rename.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17 16:23:45 +00:00
Ralf Baechle
16212017a5 [MIPS] IP32: No need to include <asm/io.h>.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17 16:23:44 +00:00
Ralf Baechle
cd017fbdd3 Add definitions for the Dallas DS1742 RTC / non-volatile memory.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17 16:23:43 +00:00
Ralf Baechle
443bf3292f Add definitions for the Dallas DS17287 RTC.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17 16:23:42 +00:00
Ralf Baechle
bdc3c3c7cb [MIPS] Add missing arch defines for the Alchemy MTD driver.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17 16:23:42 +00:00
Yoichi Yuasa
6f17ce33fe Add GT64111 PCI ID back
Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17 16:23:41 +00:00
Ralf Baechle
db7f686182 [MIPS] Delete duplicate definitions of break codes.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17 16:23:38 +00:00
David Woodhouse
1e28a7ddd3 [PATCH] Avoid use of uninitialised spinlock in EEH.
If the kernel supports both G5 and pSeries, and CONFIG_EEH is enabled,
eeh_init() is (quite reasonably) never called when we boot on a G5. Yet
eeh_check_failure() still gets called. We should avoid doing that if
!eeh_subsystem_enabled.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-17 16:53:38 +11:00
Nick Piggin
5cfccd7f13 [PATCH] powerpc: Fix database regression due to scheduler changes
PowerPC's NUMA domain doesn't currently set up some of the newer
sched-domains parameters.

Brian Twichell <tbrian@us.ibm.com> discovered and diagnosed a 1.5% OLTP
database regression on a 4 core POWER5 system that was due to the use of
NUMA scheduling on ppc64.

This patch applies some saneish values to the parameters, in line with
other architectures. This solves the regression.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-17 16:52:18 +11:00
Russell King
5470dc6568 [ARM] No need to include asm/proc-fns.h into asm/system.h
In the old days when arm26/arm32 was combined into the same
architecture, proc-fns.h provided the xchg implementation for
arm26 CPUs.  Since we no longer combine these two, this include
is no longer required.  Remove it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-16 18:36:49 +00:00
Russell King
49ee57a329 [ARM] Use unsigned long not u32 in atomic_cmpxchg
Since atomic.h does not include types.h, u32 may not be defined.
Since atomics are supposed to work on unsigned long quantities,
use unsigned long instead.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-16 18:03:10 +00:00
Russell King
1b12050f17 [ARM] Move zone adjustment for SA1111 on SA11x0 platforms
Unfortunately, using PAGE_SHIFT in asm/arch/memory.h is unsafe, and we
can't include asm/page.h into this file because then we have a circular
dependency.  Move the offending code to arch/arm/common/sa1111.c
instead.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-16 17:38:40 +00:00
Russell King
8dc39b883e [ARM] Add linux/compiler.h includes where required
atomic.h, bitops.h and mmu_context.h are using likely/unlikely.
thread_info.h uses __attribute_const__.  Hence these files require
linux/compiler.h to be included.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-16 17:23:57 +00:00
Linus Torvalds
0db169f970 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 2005-11-16 08:25:28 -08:00
Linus Torvalds
d58a75ef75 Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge 2005-11-16 07:58:48 -08:00
Nicolas Pitre
a7d0683361 [ARM] 3165/1: fix atomic_cmpxchg() implementation for ARMv6+
Patch from Nicolas Pitre

If 'old' and 'oldval' are different then 'res' never gets set.  In that
case, if ever %0 happened to contain anything but zero (rather likely)
then the code will loop forever (or until another CPU just come along
and change the atomic value to match 'old' which is rather unlikely).

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-16 15:05:11 +00:00
Russell King
0a5709b2dc [ARM] Include asm/hardware.h instead of asm/arch/hardware.h
Rationalise hardware.h include.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-16 14:51:20 +00:00
Russell King
ce07d90aa8 [ARM] Fix arch-realview/system.h to use __io_address()
Move __io_address to arch-realview/hardware.h, drop core.h from platsmp.c
and localtimer.c, and include asm/io.h where required.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-16 14:38:19 +00:00
David S. Miller
6e87abd0b8 [DVB]: Add compat ioctl handling.
Based upon a patch by Guido Guenther <agx@sigxcpu.org>.

Some of these ioctls had embedded time_t objects
or pointers, so needed translation.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-11-16 00:52:57 -08:00
Benjamin Herrenschmidt
5d66da3d71 [PATCH] powerpc: Make the vDSO functions set error code (#2)
The vDSO functions should have the same calling convention as a syscall.
Unfortunately, they currently don't set the cr0.so bit which is used to
indicate an error. This patch makes them clear this bit unconditionally
since all functions currently succeed. The syscall fallback done by some
of them will eventually override this if the syscall fails.

This also changes the symbol version of all vdso exports to make sure
glibc can differenciate between old and fixed calls for existing ones
like __kernel_gettimeofday.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-16 14:05:11 +11:00
Kumar Gala
7486a38f68 [PATCH] powerpc: replace page_to_virt() with lowmem_page_address() for Book-E
page_to_virt and lowmem_page_address provided equiavlent functionality
so use the more standard lowmem_page_address

This also addresses build issue in ARCH=powerpc since page_to_virt()
has been removed from include/asm-powerpc/page.h

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-16 13:52:12 +11:00
Benjamin Herrenschmidt
b5166cc252 [PATCH] powerpc: pci_64 fixes & cleanups
I discovered that in some cases (PowerMac for example) we wouldn't
properly map the PCI IO space on recent kernels. In addition, the code
for initializing PCI host bridges was scattered all over the place with
some duplication between platforms.

This patch fixes the problem and does a small cleanup by creating a
pcibios_alloc_controller() in pci_64.c that is similar to the one in
pci_32.c (just takes an additional device node argument) that takes care
of all the grunt allocation and initialisation work. It should work for
both boot time and dynamically allocated PHBs.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-16 13:29:46 +11:00
Linus Torvalds
f6ff56cd56 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2005-11-15 16:59:38 -08:00
Stephen Hemminger
31f3426904 [TCP]: More spelling fixes.
From Joe Perches

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-11-15 15:17:10 -08:00
Linus Torvalds
7ae8c5ec12 Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev 2005-11-15 12:45:33 -08:00
Christoph Hellwig
0c53508980 [PATCH] v850: use generic hardirq code
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Miles Bader <miles@gnu.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-15 08:59:20 -08:00
Miles Bader
f4eeb0a20f [PATCH] v850: Add missing include in hardirq.h
Signed-off-by: Miles Bader <miles@gnu.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-15 08:59:19 -08:00
Harald Welte
d4ed803c56 [PATCH] Make sysctl.h (again) usable from userspace
Make sysctl.h (again) useable from userspace

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-15 08:59:18 -08:00
Jochen Friedrich
cf22535657 [LLC]: Fix typo
Signed-off-by: Jochen Friedrich <jochen@scram.de>
Acked-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-11-14 21:58:18 -08:00
Linus Torvalds
4060994c3e Merge x86-64 update from Andi 2005-11-14 19:56:02 -08:00
Andi Kleen
8893166ff8 [PATCH] x86_64: Increase the maximum number of local APICs to the maximum
This is needed for large multinode IBM systems which have a sparse
APIC space in clustered mode, fully covering the available 8 bits.

The previous kernels would limit the local APIC number to 127,
which caused it to reject some of the CPUs at boot.

I increased the maximum and shrunk the apic_version array a bit
to make up for that (the version is only 8 bit, so don't need
an full int to store)

Cc:  Chris McDermott <lcm@us.ibm.com>

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14 19:55:17 -08:00
Paolo 'Blaisorblade' Giarrusso
efbbdce94f [PATCH] x86_64: Use common sys_time64
Keeping this function does not makes sense because it's a copied (and
buggy) copy of sys_time.  The only difference is that now.tv_sec (which is
a time_t, i.e.  a 64-bit long) is copied (and truncated) into a int
(32-bit).

The prototype is the same (they both take a long __user *), so let's drop
this and redirect it to sys_time (and make sure it exists by defining
__ARCH_WANT_SYS_TIME).

Only disadvantage is that the sys_stime definition is also compiled (may be
fixed if needed by adding a separate __ARCH_WANT_SYS_STIME macro, and
defining it for all arch's defining __ARCH_WANT_SYS_TIME except x86_64).

Acked-by: Andi Kleen <ak@suse.de>
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14 19:55:17 -08:00
Paolo 'Blaisorblade' Giarrusso
bf0f2e2383 [PATCH] x86_64: Set ____cacheline_maxaligned_in_smp alignment to 128 bytes
The current value was correct before the introduction of Intel EM64T support -
but now L1_CACHE_SHIFT_MAX can be less than L1_CACHE_SHIFT, which _is_ funny!

Between the few users of ____cacheline_maxaligned_in_smp, we also have (for
example) rcu_ctrlblk, and struct zone, with zone->{lru_,}lock.  I.e.  we have
a lot of excess cacheline bouncing on them.

No correctness issues, obviously.  So this could even be merged for 2.6.14
(I'm not a fan of this idea, though).

CC: Andi Kleen <ak@suse.de>
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14 19:55:17 -08:00
Andi Kleen
8e0d4f4e91 [PATCH] x86_64: Remove asm-x86_64/rwsem.h
Not needed since x86-64 always uses the spinlock based rwsems.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14 19:55:17 -08:00
Andi Kleen
a6f5deb2be [PATCH] x86_64: Reduce number of retries for reset through keyboard controller
Old code could retry for 10 seconds worst time. Only try it
for one second now.

Suggested by Yinghai Lu

Cc: Yinghai.Lu@amd.com

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14 19:55:16 -08:00
Siddha, Suresh B
94605eff57 [PATCH] x86-64/i386: Intel HT, Multi core detection fixes
Fields obtained through cpuid vector 0x1(ebx[16:23]) and
vector 0x4(eax[14:25], eax[26:31]) indicate the maximum values and might not
always be the same as what is available and what OS sees.  So make sure
"siblings" and "cpu cores" values in /proc/cpuinfo reflect the values as seen
by OS instead of what cpuid instruction says. This will also fix the buggy BIOS
cases (for example where cpuid on a single core cpu says there are "2" siblings,
even when HT is disabled in the BIOS.
http://bugzilla.kernel.org/show_bug.cgi?id=4359)

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14 19:55:16 -08:00
Andi Kleen
e90f22edf4 [PATCH] x86_64: Fix NUMA node lookup debug code which had bitrotted
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14 19:55:16 -08:00
Andi Kleen
a88cde13ba [PATCH] x86_64: Formatting fixes for arch/x86_64/kernel/process.c
No functional changes.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14 19:55:16 -08:00
Andi Kleen
ea0be473a1 [PATCH] x86_64: Allow modular build of ia32 aout loader
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14 19:55:16 -08:00
Andi Kleen
420f8f68c9 [PATCH] x86_64: New heuristics to find out hotpluggable CPUs.
With a NR_CPUS==128 kernel with CPU hotplug enabled we would waste 4MB
on per CPU data of all possible CPUs.  The reason was that HOTPLUG
always set up possible map to NR_CPUS cpus and then we need to allocate
that much (each per CPU data is roughly ~32k now)

The underlying problem is that ACPI didn't tell us how many hotplug CPUs
the platform supports.  So the old code just assumed all, which would
lead to this memory wastage.

This implements some new heuristics:

 - If the BIOS specified disabled CPUs in the ACPI/mptables assume they
   can be enabled later (this is bending the ACPI specification a bit,
   but seems like a obvious extension)
 - The user can overwrite it with a new additionals_cpus=NUM option
 - Otherwise use half of the available CPUs or 2, whatever is more.

Cc: ashok.raj@intel.com
Cc: len.brown@intel.com

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14 19:55:15 -08:00
Andi Kleen
485832a5d9 [PATCH] x86_64: Use int operations in spinlocks to support more than 128 CPUs spinning.
Pointed out by Eric Dumazet

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14 19:55:15 -08:00
Andi Kleen
2bc0414ee0 [PATCH] x86_64: Only use asm/sections.h to declare section symbols
Adding __initdata_* to asm-generic/sections.h
Replaces a lot of open coded externs in arch/x86_64/*
I had to change __bss_end to __bss_stop to match the other architectures.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14 19:55:14 -08:00
Andi Kleen
6b75aeedde [PATCH] x86_64: Don't apply __PHYSICAL_MASK to page frame numbers
It is for physical addresses, not for PFNs.

Pointed out by Tejun Heo.

Cc: htejun@gmail.com

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14 19:55:14 -08:00
Siddha, Suresh B
f6c2e3330d [PATCH] x86_64: Unmap NULL during early bootup
We should zap the low mappings, as soon as possible, so that we can catch
kernel bugs more effectively. Previously early boot had NULL mapped
and didn't trap on NULL references.

This patch introduces boot_level4_pgt, which will always have low identity
addresses mapped.  Druing boot, all the processors will use this as their
level4 pgt.  On BP, we will switch to init_level4_pgt as soon as we enter C
code and zap the low mappings as soon as we are done with the usage of
identity low mapped addresses.  On AP's we will zap the low mappings as
soon as we jump to C code.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14 19:55:14 -08:00
Andi Kleen
69d81fcde7 [PATCH] x86_64: Speed up numa_node_id by putting it directly into the PDA
Not go from the CPU number to an mapping array.
Mode number is often used now in fast paths.

This also adds a generic numa_node_id to all the topology includes

Suggested by Eric Dumazet

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14 19:55:14 -08:00
Andi Kleen
07808b74e7 [PATCH] x86_64: Remove obsolete ARCH_HAS_ATOMIC_UNSIGNED and page_flags_t
Has been introduced for x86-64 at some point to save memory
in struct page, but has been obsolete for some time. Just
remove it.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14 19:55:14 -08:00
Andi Kleen
1dff7f3db5 [PATCH] x86_64: Fix up outdated pfn_to_page comment
pfn_to_page really requires pfn_valid to be true now, no question.
Some people stumbled over it, but it was misleading and wrong.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14 19:55:13 -08:00
James Cleverdon
6004e1b7ef [PATCH] i386/x86-64: Share interrupt vectors when there is a large number of interrupt sources
Here's a patch that builds on Natalie Protasevich's IRQ compression
patch and tries to work for MPS boots as well as ACPI.  It is meant for
a 4-node IBM x460 NUMA box, which was dying because it had interrupt
pins with GSI numbers > NR_IRQS and thus overflowed irq_desc.

The problem is that this system has 270 GSIs (which are 1:1 mapped with
I/O APIC RTEs) and an 8-node box would have 540.  This is much bigger
than NR_IRQS (224 for both i386 and x86_64).  Also, there aren't enough
vectors to go around.  There are about 190 usable vectors, not counting
the reserved ones and the unused vectors at 0x20 to 0x2F.  So, my patch
attempts to compress the GSI range and share vectors by sharing IRQs.

Cc: "Protasevich, Natalie" <Natalie.Protasevich@unisys.com>

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14 19:55:13 -08:00
Jacob Shin
89b831ef8b [PATCH] x86_64: Support for AMD specific MCE Threshold.
MC4_MISC - DRAM Errors Threshold Register realized under AMD K8 Rev F.
This register is used to count correctable and uncorrectable ECC errors that occur during DRAM read operations.
The user may interface through sysfs files in order to change the threshold configuration.

bank%d/error_count - reads current error count, write to clear.
bank%d/interrupt_enable - set/clear interrupt enable.
bank%d/threshold_limit - read/write the threshold limit.

APIC vector 0xF9 in hw_irq.h.
5 software defined bank ids in mce.h.
new apic.c function to setup threshold apic lvt.
defaults to interrupt off, count enabled, and threshold limit max.
sysfs interface created on /sys/devices/system/threshold.

AK: added some ifdefs to make it compile on UP

Signed-off-by: Jacob Shin <jacob.shin@amd.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14 19:55:13 -08:00
Jan Beulich
979edfadba [PATCH] x86_64: Adjust, correct, and complete the HPET definitions for x86-64.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14 19:55:13 -08:00
Andi Kleen
a2f1b42490 [PATCH] x86_64: Add 4GB DMA32 zone
Add a new 4GB GFP_DMA32 zone between the GFP_DMA and GFP_NORMAL zones.

As a bit of historical background: when the x86-64 port
was originally designed we had some discussion if we should
use a 16MB DMA zone like i386 or a 4GB DMA zone like IA64 or
both. Both was ruled out at this point because it was in early
2.4 when VM is still quite shakey and had bad troubles even
dealing with one DMA zone.  We settled on the 16MB DMA zone mainly
because we worried about older soundcards and the floppy.

But this has always caused problems since then because
device drivers had trouble getting enough DMA able memory. These days
the VM works much better and the wide use of NUMA has proven
it can deal with many zones successfully.

So this patch adds both zones.

This helps drivers who need a lot of memory below 4GB because
their hardware is not accessing more (graphic drivers - proprietary
and free ones, video frame buffer drivers, sound drivers etc.).
Previously they could only use IOMMU+16MB GFP_DMA, which
was not enough memory.

Another common problem is that hardware who has full memory
addressing for >4GB misses it for some control structures in memory
(like transmit rings or other metadata).  They tended to allocate memory
in the 16MB GFP_DMA or the IOMMU/swiotlb then using pci_alloc_consistent,
but that can tie up a lot of precious 16MB GFPDMA/IOMMU/swiotlb memory
(even on AMD systems the IOMMU tends to be quite small) especially if you have
many devices.  With the new zone pci_alloc_consistent can just put
this stuff into memory below 4GB which works better.

One argument was still if the zone should be 4GB or 2GB. The main
motivation for 2GB would be an unnamed not so unpopular hardware
raid controller (mostly found in older machines from a particular four letter
company) who has a strange 2GB restriction in firmware. But
that one works ok with swiotlb/IOMMU anyways, so it doesn't really
need GFP_DMA32. I chose 4GB to be compatible with IA64 and because
it seems to be the most common restriction.

The new zone is so far added only for x86-64.

For other architectures who don't set up this
new zone nothing changes. Architectures can set a compatibility
define in Kconfig CONFIG_DMA_IS_DMA32 that will define GFP_DMA32
as GFP_DMA. Otherwise it's a nop because on 32bit architectures
it's normally not needed because GFP_NORMAL (=0) is DMA able
enough.

One problem is still that GFP_DMA means different things on different
architectures. e.g. some drivers used to have #ifdef ia64  use GFP_DMA
(trusting it to be 4GB) #elif __x86_64__ (use other hacks like
the swiotlb because 16MB is not enough) ... . This was quite
ugly and is now obsolete.

These should be now converted to use GFP_DMA32 unconditionally. I haven't done
this yet. Or best only use pci_alloc_consistent/dma_alloc_coherent
which will use GFP_DMA32 transparently.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14 19:55:13 -08:00
Linus Torvalds
0174f72f84 Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge 2005-11-14 17:56:00 -08:00
Paul Mackerras
a272e24cc8 powerpc: Remove an extraneous and incorrect declaration of pmac_nvram_init.
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-15 11:17:02 +11:00
Harald Welte
37d2e7a20d [NETFILTER] nfnetlink: unconditionally require CAP_NET_ADMIN
This patch unconditionally requires CAP_NET_ADMIN for all nfnetlink
messages.  It also removes the per-message cap_required field, since all
existing subsystems use CAP_NET_ADMIN for all their messages anyway.

Patrick McHardy owes me a beer if we ever need to re-introduce this.

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-11-14 15:24:59 -08:00
Pablo Neira Ayuso
c0400c4f5a [NETFILTER] nfnetlink: skip size check if size not specified (== 0)
Skip sizecheck if the size of the attribute wasn't specified, ie. zero.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-11-14 15:21:41 -08:00
Jeff Garzik
2c13b7cee0 [libata] minor fixes, new helpers
- in ata_dev_identify(), don't assume that all devices are either
  ATA or ATAPI.  In the future, this code will see port multipliers
  and other devices.
- make a debugging printk less verbose
- add new helper ata_qc_reinit()
- add new helper BPRINTK() and port flag ATA_FLAG_DEBUGMSG, for
  fine-grained debugging use.
2005-11-14 14:14:16 -05:00
Paul Mackerras
493f25ef40 powerpc: Fix 32-bit compile: PPC_MEMSTART was undeclared
This defines PPC_MEMSTART as 0 because it is still used in a couple
of places in the 32-bit code.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-14 17:32:50 +11:00
Paul Mackerras
7568cb4ef6 powerpc: Move most remaining ppc64 files over to arch/powerpc
Also deletes files in arch/ppc64 that are no longer used now that
we don't compile with ARCH=ppc64 any more.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-14 17:30:17 +11:00
Paul Mackerras
c55377ee73 powerpc: Move a bunch of ppc64 headers to include/asm-powerpc
... and also delete some that are no longer used because we already
had an include/asm-powerpc version of the header.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-14 17:22:01 +11:00
Benjamin Herrenschmidt
0c37ec2aa8 [PATCH] powerpc: vdso fixes (take #2)
This fixes various errors in the new functions added in the vDSO's,
I've now verified all functions on both 32 and 64 bits vDSOs. It also
fix a sign extension bug getting the initial time of day at boot that
could cause the monotonic clock value to be completely on bogus for
64 bits applications (with either the vDSO or the syscall) on
powermacs.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-14 16:35:58 +11:00