Commit graph

6517 commits

Author SHA1 Message Date
Andreas Schwab
2833c28aa0 [PATCH] powerpc: Wire up *at syscalls
Wire up *at syscalls.

This patch has been tested on ppc64 (using glibc's testsuite, both 32bit
and 64bit), and compile-tested for ppc32 (I have currently no ppc32 system
available, but I expect no problems).

Signed-off-by: Andreas Schwab <schwab@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-28 21:04:59 +10:00
Eugene Surovegin
30aacebed0 [PATCH] ppc32: add 440GX erratum 440_43 workaround
This patch adds workaround for PPC 440GX erratum 440_43. According to
this erratum spurious MachineChecks (caused by L1 cache parity) can
happen during DataTLB miss processing. We disable L1 cache parity
checking for 440GX rev.C and rev.F

Signed-off-by: Eugene Surovegin <ebs@ebshome.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-28 21:04:56 +10:00
David Woodhouse
1269277a5e [PATCH] powerpc: Use check_legacy_ioport() on ppc32 too.
Some people report that we die on some Macs when we are expecting to
catch machine checks after poking at some random I/O address. I'd seen
it happen on my dual G4 with serial ports until we fixed those to use
OF, but now other users are reporting it with i8042.

This expands the use of check_legacy_ioport() to avoid that situation
even on 32-bit kernels.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-28 21:04:55 +10:00
Alan Modra
f749edae5e [PATCH] powerpc64: Fix loading of modules without a .toc section
Normally, ppc64 module .ko files contain a table-of-contents (.toc)
section, but if the module doesn't reference any static or external
data or external procedures, it is possible for gcc/binutils to
generate a .ko that doesn't have a .toc.  Currently the module
loader refuses to load such a module, since it needs the address
of the .toc section to use in relocations.

This patch fixes the problem by using the address of the .stubs
section instead, which is an acceptable substitute in this situation.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-28 21:04:49 +10:00
Paul Mackerras
f709bfac48 powerpc/pseries: Tell firmware our capabilities on new machines
This adds code to call a new firmware method to tell the firmware
what machines and capabilities (such as VMX/Altivec) we support.
This will be needed on POWER5+ and POWER6 machines, and it has no
effect on past and current machines.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-28 16:28:35 +10:00
David Gibson
f10a04c034 [PATCH] powerpc: Fix pagetable bloat for hugepages
At present, ARCH=powerpc kernels can waste considerable space in
pagetables when making large hugepage mappings.  Hugepage PTEs go in
PMD pages, but each PMD page maps 256M and so contains only 16
hugepage PTEs (128 bytes of data), but takes up a 1024 byte
allocation.  With CONFIG_PPC_64K_PAGES enabled (64k base page size),
the situation is worse.  Now hugepage PTEs are at the PTE page level
(also mapping 256M), so we store 16 hugepage PTEs in a 64k allocation.

The PowerPC MMU already means that any 256M region is either all
hugepage, or all normal pages.  Thus, with some care, we can use a
different allocation for the hugepage PTE tables and only allocate the
128 bytes necessary.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-28 15:02:51 +10:00
Linus Torvalds
37e53db8aa Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] update sn2 defconfig
  [IA64] Add mca recovery failure messages
  [IA64-SGI] fix SGI Altix tioce_reserve_m32() bug
  [IA64] enable dumps to capture second page of kernel stack
  [IA64-SGI] - Reduce overhead of reading sn_topology
  [IA64-SGI] - Fix discover of nearest cpu node to IO node
  [IA64] IOC4 config option ordering
  [IA64] Setup an IA64 specific reclaim distance
  [IA64] eliminate compile time warnings
  [IA64] eliminate compile time warnings
  [IA64-SGI] SN SAL call to inject memory errors
  [IA64] - Fix MAX_PXM_DOMAINS for systems with > 256 nodes
  [IA64] Remove unused variable in sn_sal.h
  [IA64] Remove redundant NULL checks before kfree
  [IA64] wire up compat_sys_adjtimex()
2006-04-27 17:01:37 -07:00
Jes Sorensen
7384c8bd90 [IA64] update sn2 defconfig
Update SN2 defconfig to latest kernel and add QLA FC drivers commonly
found in SN2 boxes.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-04-27 14:38:03 -07:00
Russ Anderson
189979619f [IA64] Add mca recovery failure messages
When the mca recovery code encounters a condition that makes
the MCA non-recoverable, print the reason it could not recover.
This will make it easier to identify why the recovery code did
not recover.

Signed-off-by: Russ Anderson <rja@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-04-27 14:34:01 -07:00
Mike Habeck
cda3d4a069 [IA64-SGI] fix SGI Altix tioce_reserve_m32() bug
The following patch fixes a bug in the SGI Altix tioce_reserve_m32()
code.  The bug was that we could walking past the end of the CE ASIC
32/40bit PMU ATE Buffer, resulting in a PIO Reply Error.

Signed-off-by: Mike Habeck <habeck@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-04-27 14:32:07 -07:00
Jack Steiner
dd4cb9f8ac [IA64-SGI] - Reduce overhead of reading sn_topology
MPI programs using certain debug options have a long
startup time. This was traced to a "vmalloc/vfree" in
the code that reads /proc/sgi_sn/sn_topology. On large
systems, vfree requires an IPI to all cpus to do TLB
purging.

Replace the vmalloc/vfree with kmalloc/kfree. Although
the size of the structure being allocated is unknown, it
will not not exceed 96 bytes.

Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-04-27 14:29:05 -07:00
Jack Steiner
f0fe253c47 [IA64-SGI] - Fix discover of nearest cpu node to IO node
Fix a bug that causes discovery of the nearest node/cpu to
a TIO (IO node) to fail.

Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-04-27 14:28:37 -07:00
Linus Torvalds
94b1661d08 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6:
  [PATCH] PCI quirk: VIA IRQ fixup should only run for VIA southbridges
  [PATCH] PCI: fix potential resource leak in drivers/pci/msi.c
  [PATCH] PCI: Documentation: no more device ids
  [PATCH] PCI: fix via irq SATA patch
2006-04-27 14:26:03 -07:00
Linus Torvalds
4e9a4b71f1 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  [PATCH] USB: ftdi_sio: add support for ASK RDR 400 series card reader
  [PATCH] USB: ftdi_sio: Adds support for iPlus device.
  [PATCH] USB: ftdi_sio vendor code for RR-CirKits LocoBuffer USB
  [PATCH] USB: Use new PCI_CLASS_SERIAL_USB_* defines
  [PATCH] USB: net2280: set driver data before it is used
  [PATCH] USB: net2280: check for shared IRQs
  [PATCH] USB: net2280: send 0-length packets for ep0
  [PATCH] USB: net2280: Handle STALLs for 0-length control-IN requests
  [PATCH] USB: storage: atmel unusual dev update
  [PATCH] USB: Storage: unusual devs update
  [PATCH] USB: add new iTegno usb CDMA 1x card support for pl2303
  [PATCH] USB: Resource leak fix for whiteheat driver
2006-04-27 14:25:46 -07:00
Greg Kroah-Hartman
8b4929e6a0 [PATCH] PCI: fix via irq SATA patch
This device id improperly got added to the VIA chipset list with a
previous patch.  Remove it as it is not correct.

Cc: Grzegorz Janoszka <Grzegorz@Janoszka.pl>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-27 13:00:51 -07:00
Jean Delvare
c67808eee6 [PATCH] USB: Use new PCI_CLASS_SERIAL_USB_* defines
We could use the recently added PCI_CLASS_SERIAL_USB_UHCI,
PCI_CLASS_SERIAL_USB_OHCI and PCI_CLASS_SERIAL_USB_EHCI defines in
more places, for slightly shorter and clearer code.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-27 10:28:59 -07:00
Ralf Baechle
ee1cca1b06 [MIPS] Fix branch emulation for floating-point exceptions.
In the branch emulation for floating-point exceptions, __compute_return_epc
must determine for bc1f et al which condition code bit to test. This is
based on bits <4:2> of the rt field. The switch statement to distinguish
bc1f et al needs to use only the two low bits of rt, but the old code tests
on the whole rt field.  This patch masks off the proper bits.
    
Signed-off-by: Win Treese <treese@acm.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-27 15:13:50 +01:00
Ralf Baechle
79e55bcf24 [MIPS] Cleanup inode->r_dev usage.
imajor()/iminor() should be used instead of accessing r_dev directly.

Based on patch from Eric Sesterhenn (snakebyte@gmx.de).
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-27 15:13:50 +01:00
Ralf Baechle
b775565952 [MIPS] Update MIPS defconfigs.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-27 15:13:50 +01:00
Ralf Baechle
f7062ddb23 [MIPS] Get rid of CONFIG_ADVANCED.
It's been a horrible source of confusion and let users to shoot themselves
into both feet with uzis to no end.
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-27 15:13:50 +01:00
Ralf Baechle
3763120a31 [MIPS] Kconfig: Clarify description of CROSSCOMPILE.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-27 15:13:50 +01:00
Chris Dearman
7a8341969f [MIPS] 24K LV: Add core card id.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-27 15:13:50 +01:00
Atsushi Nemoto
2a2c3e4519 [MIPS] Sparse: fix sparse for 64-bit kernels.
This commit breaks sparse for 64bit kernel.  The -m64 option is
required.  Also, some macro values (such as _MIPS_TUNE, etc.)  contain
double-quote characters so it would be better quoting arguments by
single-quote characters.
    
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-27 15:13:49 +01:00
Atsushi Nemoto
6f8782c4b2 [MIPS] Use __ffs() instead of ffs() in ip32_irq0().
With recent rewrite for generic bitops, ffs() is defined the same way
as the libc and compiler built-in routines (returns int instead of
unsigned long).  Use __ffs() for 64bit value.
    
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-27 15:13:49 +01:00
Atsushi Nemoto
c0858d82fa [MIPS] Fix ip27 build.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-27 15:13:49 +01:00
Ralf Baechle
5dac83030a [MIPS] Oprofile: fix sparse warning.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-27 15:13:49 +01:00
Ralf Baechle
49e31ca838 [MIPS] Fix oprofile module unloading
When unloading oprofile module with timer-mode, oprofile_arch_exit
dereferences a NULL pointer.
    
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-27 15:13:49 +01:00
Linus Torvalds
58f8236bed Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] nommu: trivial fixups for head-nommu.S and the Makefile
  [ARM] vfp: fix leak of VFP_NAN_FLAG into FPSCR
  [ARM] 3484/1: Correct AEABI CFLAGS for correct enum handling
2006-04-26 15:45:02 -07:00
Russell King
f13d241bc3 Merge nommu tree 2006-04-26 21:18:45 +01:00
Chandra Seetharaman
83d722f7e1 [PATCH] Remove __devinit and __cpuinit from notifier_call definitions
Few of the notifier_chain_register() callers use __init in the definition
of notifier_call.  It is incorrect as the function definition should be
available after the initializations (they do not unregister them during
initializations).

This patch fixes all such usages to _not_ have the notifier_call __init
section.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-26 08:30:03 -07:00
Chandra Seetharaman
649bbaa484 [PATCH] Remove __devinitdata from notifier block definitions
Few of the notifier_chain_register() callers use __devinitdata in the
definition of notifier_block data structure.  It is incorrect as the
data structure should be available after the initializations (they do
not unregister them during initializations).

This was leading to an oops when notifier_chain_register() call is
invoked for those callback chains after initialization.

This patch fixes all such usages to _not_ have the notifier_block data
structure in the init data section.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-26 08:27:50 -07:00
Al Viro
6ad0013b31 [PATCH] fix mips sys32_p{read,write}
Switched to use of sys_pread64()/sys_pwrite64() rather than keep duplicating
their guts; among the little things that had been missing there were such as
	ret = security_file_permission (file, MAY_READ);
Gotta love the LSM robustness, right?

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-26 07:52:21 -07:00
Jens Axboe
912d35f867 [PATCH] Add support for the sys_vmsplice syscall
sys_splice() moves data to/from pipes with a file input/output. sys_vmsplice()
moves data to a pipe, with the input being a user address range instead.

This uses an approach suggested by Linus, where we can hold partial ranges
inside the pages[] map. Hopefully this will be useful for network
receive support as well.

Signed-off-by: Jens Axboe <axboe@suse.de>
2006-04-26 10:59:21 +02:00
Russell King
928bd1b470 [ARM] vfp: fix leak of VFP_NAN_FLAG into FPSCR
The VFP code can leak VFP_NAN_FLAG into the FPSCR. It doesn't correspond
to any real FPSCR bit (and overlaps one of the exception flags).

Bug report from Daniel Jacobowitz

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-25 20:41:27 +01:00
Richard Purdie
c7fd84424f [ARM] 3484/1: Correct AEABI CFLAGS for correct enum handling
Patch from Richard Purdie

The AAPCS says that enums can be variably sized depending on the range
of valid values. This is not the accepted behaviour under linux so for
compatibility gcc has an aapcs-linux target, the main difference being
that enums are always of type int. Change the ARM Makefile to use this
target.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-25 20:36:04 +01:00
Ivan Kokshaysky
4d5c34ec7b [PATCH] Alpha: strncpy() fix
As it turned out after recent SCSI changes, strncpy() was broken -
it mixed up the return values from __stxncpy() in registers $24 and $27.

Thanks to Mathieu Chouquet-Stringer for tracking down the problem
and providing an excellent test case.

Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-25 07:51:06 -07:00
Hyok S. Choi
3b920cef34 [ARM] nommu: trivial fixups for head-nommu.S and the Makefile
This patch fix compilation problem of start-up codes.
(head-nommu.S, arch/arm/kernel/Makefile)

Signed-off-by: Hyok S. Choi <hyok.choi@samsung.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-24 09:45:35 +01:00
Linus Torvalds
6b426e785c Merge git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6:
  [PARISC] MAINTAINERS
  [PARISC] Make ioremap default to _nocache
  [PARISC] Add new entries to the syscall table
  [PARISC] Further work for multiple page sizes
  [PARISC] Fix up hil_kbd.c mismerge
  [PARISC] defconfig updates
  [PARISC] Document that we tolerate "Relaxed Ordering"
  [PARISC] Misc. janitorial work
  [PARISC] EISA regions must be mapped NO_CACHE
  [PARISC] OSS ad1889: Match register names with ALSA driver
2006-04-23 09:44:10 -07:00
Linus Torvalds
a580e5b9a5 Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge:
  powerpc: Fix define_machine so machine_is() works from modules
  powerpc/ppc: export strncasecmp
  [PATCH] powerpc: fix oops in alsa powermac driver
  [PATCH] powerpc: update {g5,iseries,pseries}_defconfigs
  [PATCH] ppc: Fix powersave code on arch/ppc
  [PATCH] powerpc/cell: remove BUILD_BUG_ON and add sys_tee to spu_syscall_table
  [PATCH] powermac: Fix i2c on keywest based chips
  [PATCH] powerpc: Lower threshold for DART enablement to 1GB
  [PATCH] powerpc: IOMMU support for honoring dma_mask
2006-04-23 09:36:31 -07:00
Mike Waychison
5b20192727 [PATCH] x86_64: Fix a race in the free_iommu path
We do this by removing a micro-optimization that tries to avoid grabbing
the iommu_bitmap_lock spinlock and using a bus-locked operation.

This still races with other simultaneous alloc_iommu or free_iommu(size >
1) which both use bus-unlocked operations.

The end result of this race is eventually ending up with an
iommu_gart_bitmap that has bits errornously set all over, making large
contiguous iommu space allocations fail with 'PCI-DMA: Out of IOMMU space'.

Signed-off-by: Mike Waychison <mikew@google.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-22 09:19:52 -07:00
Andi Kleen
ddbe3eec59 [PATCH] x86_64: Pass -32 to the assembler when compiling the 32bit vsyscall pages
This quietens warnings and actually fixes a bug.  The unwind tables would
come out wrong without -32, causing pthread cancellation during them to
crash in the gcc runtime.

The problem seems to only happen with newer binutils (it doesn't happen
with 2.16.91.0.2 but happens wit 2.16.91.0.5)

Thanks to David Altobelli <david.altobelli@hp.com> and Brian Baker
<Brian.B@hp.com> for test case and initial analysis.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-22 09:19:52 -07:00
Andy Whitcroft
3b5fd59fdd [PATCH] x86_64: sparsemem does not need node_mem_map
Seems we are trying to init the node_mem_map when we don't need to, for
example when SPARSEMEM is enabled.  This causes the error below during
compilation.  Use CONFIG_FLAT_NODE_MEM_MAP to gate allocation and init.

  arch/x86_64/mm/numa.c: In function `setup_node_zones':
  arch/x86_64/mm/numa.c:191: error: structure has no member
                                                  named `node_mem_map'

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Acked-by: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-22 09:19:52 -07:00
Paul Mackerras
7c8ce71b09 Merge branch 'misc' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc into merge 2006-04-22 19:19:06 +10:00
Kyle McMartin
6ca773cf8b [PARISC] Add new entries to the syscall table
Most are easy, but sync_file_range needed special handling when entering
through the 32-bit syscall table.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2006-04-21 22:20:35 +00:00
Helge Deller
2fd8303816 [PARISC] Further work for multiple page sizes
More work towards supporing multiple page sizes on 64-bit. Convert
some assumptions that 64bit uses 3 level page tables into testing
PT_NLEVELS. Also some BUG() to BUG_ON() conversions and some cleanups
to assembler.

Signed-off-by: Helge Deller <deller@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2006-04-21 22:20:34 +00:00
Helge Deller
8ea6947b4b [PARISC] defconfig updates
Make the defconfig more generally useful. Turn on IPv6, modules,
cardbus, etc. Boots 32bit on 715 with HIL, B160L with sound,
PrecisionBook, and C3000.

Signed-off-by: Helge Deller <deller@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2006-04-21 22:20:33 +00:00
Helge Deller
67a5a59d33 [PARISC] Misc. janitorial work
Fix a spelling mistake, add a KERN_INFO flag, and fix some whitespace
uglies.

Signed-off-by: Helge Deller <deller@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2006-04-21 22:20:32 +00:00
Helge Deller
b2d6b9fb35 [PARISC] EISA regions must be mapped NO_CACHE
Signed-off-by: Helge Deller <deller@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2006-04-21 22:20:32 +00:00
Brent Casavant
c1311af12c [IA64] IOC4 config option ordering
SERIAL_SGI_IOC4 and BLK_DEV_SGIIOC4 depend upon SGI_IOC4, and
SERIAL_SGI_IOC3 depends upon SGI_IOC3.  Currently the definitions
are out of order in the config sequence.

Fix by including drivers/sn/Kconfig immediately after SGI_SN,
upon which SGI_IOC4 and SGI_IOC3 depend.

Signed-off-by: Brent Casavant <bcasavan@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-04-21 10:59:00 -07:00
Will Schmidt
5ad1bfeaf7 [PATCH] powerpc: update {g5,iseries,pseries}_defconfigs
Default choices for all.

Signed-off-by: Will Schmidt <willschm@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-21 22:34:03 +10:00
Becky Bruce
ea1e847cc2 [PATCH] ppc: Fix powersave code on arch/ppc
Fix asm_offsets.c and entry.S to work with the new power save code.
Changes in arch/powerpc needed to exist in arch/ppc as well since the
idle code is shared by both ppc and powerpc..

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-21 22:33:22 +10:00
Arnd Bergmann
23b2527d5e [PATCH] powerpc/cell: remove BUILD_BUG_ON and add sys_tee to spu_syscall_table
Every time a new syscall gets added, a BUILD_BUG_ON in
arch/powerpc/platforms/cell/spu_callbacks.c gets triggered.
Since the addition of a new syscall is rather harmless,
the error should just be removed.

While we're here, add sys_tee to the list and add a comment
to systbl.S to remind people that there is another list
on powerpc.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-21 22:32:50 +10:00
Benjamin Herrenschmidt
60162e498e [PATCH] powermac: Fix i2c on keywest based chips
The new i2c implementation for PowerMac has a regression that causes the
hardware to go out of state when probing non-existent devices. While
fixing that, I also found & fixed a couple of other corner cases. This
fixes booting with a pbbuttons version that scans the i2c bus for an LMU
controller among others. Tested on a dual G5 with thermal control (which
has heavy i2c activity) with no problem so far.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-21 22:29:46 +10:00
Olof Johansson
2889773131 [PATCH] powerpc: Lower threshold for DART enablement to 1GB
Turn on the DART already at 1GB. This is needed because of crippled
devices in some systems, i.e. Airport Extreme cards, only supporting
30-bit DMA addresses.

Otherwise, users with between 1 and 2GB of memory will need to manually
enable it with iommu=force, and that's no good.

Some simple performance tests show that there's a slight impact of
enabling DART, but it's in the 1-3% range (kernel build with disk I/O
as well as over NFS).

iommu=off can still be used for those who don't want to deal with the
overhead (and don't need it for any devices).

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-21 22:29:37 +10:00
Olof Johansson
7daa411b81 [PATCH] powerpc: IOMMU support for honoring dma_mask
Some devices don't support full 32-bit DMA address space, which we currently
assume. Add the required mask-passing to the IOMMU allocators.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-21 22:28:55 +10:00
Satoru Takeuchi
a72391e42f [IA64] eliminate compile time warnings
This patch removes following compile time warnings:

drivers/pci/pci-sysfs.c: In function `pci_read_legacy_io':
drivers/pci/pci-sysfs.c:257: warning: implicit declaration of function `ia64_pci_legacy_read'
drivers/pci/pci-sysfs.c: In function `pci_write_legacy_io':
drivers/pci/pci-sysfs.c:280: warning: implicit declaration of function `ia64_pci_legacy_write'

It also fixes wrong definition of ia64_pci_legacy_write (type of `bus' is not
`pci_dev', but `pci_bus').

Signed-Off-By: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-04-20 17:06:54 -07:00
Satoru Takeuchi
ee6d4b6ef8 [IA64] eliminate compile time warnings
This is a trivial patch to remove following compile time warning:

arch/ia64/ia32/../../../fs/binfmt_elf.c:508: warning: 'randomize_stack_top' defined but not used

Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-04-20 17:06:35 -07:00
Linus Torvalds
a6db522c93 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] for_each_possible_cpu
  [ARM] add_memory() build fix
  [ARM] 3483/1: ixp23xx: update defconfig to 2.6.17-rc2
  [ARM] 3482/1: ixp2000: update defconfig to 2.6.17-rc2
  [ARM] 3481/1: ep93xx: update defconfig to 2.6.17-rc2
  [ARM] 3480/1: ixp4xx: fix irq2gpio array type
2006-04-20 15:22:41 -07:00
KAMEZAWA Hiroyuki
036999d501 [ARM] for_each_possible_cpu
for_each_cpu() actually iterates across all possible CPUs.  We've had mistakes
in the past where people were using for_each_cpu() where they should have been
iterating across only online or present CPUs.  This is inefficient and
possibly buggy.

We're renaming for_each_cpu() to for_each_possible_cpu() to avoid this in the
future.

This patch replaces for_each_cpu with for_each_possible_cpu.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-20 21:48:02 +01:00
Andrew Morton
1c97b73e89 [ARM] add_memory() build fix
This is back again.  Offending patch is x86_64-mm-hotadd-reserve.patch

arch/arm/kernel/setup.c:435: error: conflicting types for 'add_memory'
include/linux/memory_hotplug.h:102: error: previous declaration of 'add_memory' was here
arch/arm/kernel/setup.c:435: error: conflicting types for 'add_memory'
include/linux/memory_hotplug.h:102: error: previous declaration of 'add_memory' was here

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-20 21:41:18 +01:00
Lennert Buytenhek
4b91ff4f42 [ARM] 3483/1: ixp23xx: update defconfig to 2.6.17-rc2
Patch from Lennert Buytenhek

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-20 21:24:41 +01:00
Lennert Buytenhek
d2f9caa1be [ARM] 3482/1: ixp2000: update defconfig to 2.6.17-rc2
Patch from Lennert Buytenhek

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-20 21:24:40 +01:00
Lennert Buytenhek
67c6024cb4 [ARM] 3481/1: ep93xx: update defconfig to 2.6.17-rc2
Patch from Lennert Buytenhek

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-20 21:24:39 +01:00
Lennert Buytenhek
6cc1b65886 [ARM] 3480/1: ixp4xx: fix irq2gpio array type
Patch from Lennert Buytenhek

The irq2gpio array was recently converted from an array of ints to an
array of chars (by patch 3368/1.)  However, this array contains elements
that are -1, and on ARM, the char type is unsigned by default, so this
patch broke the GPIO check in ixp4xx_set_irq_type.

Change the 'char' to be a 'signed char' to fix this.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-20 21:24:38 +01:00
Jesper Juhl
cbf283c048 [IA64] Remove redundant NULL checks before kfree
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-04-20 10:11:09 -07:00
Luck, Tony
c6180deb1d [IA64] wire up compat_sys_adjtimex()
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-04-20 10:02:37 -07:00
Andi Kleen
18bd057b14 [PATCH] i386/x86-64: Fix x87 information leak between processes
AMD K7/K8 CPUs only save/restore the FOP/FIP/FDP x87 registers in FXSAVE
when an exception is pending.  This means the value leak through
context switches and allow processes to observe some x87 instruction
state of other processes.

This was actually documented by AMD, but nobody recognized it as
being different from Intel before.

The fix first adds an optimization: instead of unconditionally
calling FNCLEX after each FXSAVE test if ES is pending and skip
it when not needed. Then do a x87 load from a kernel variable to
clear FOP/FIP/FDP.

This means other processes always will only see a constant value
defined by the kernel in their FP state.

I took some pain to make sure to chose a variable that's already
in L1 during context switch to make the overhead of this low.

Also alternative() is used to patch away the new code on CPUs
who don't need it.

Patch for both i386/x86-64.

The problem was discovered originally by Jan Beulich. Richard
Brunner provided the basic code for the workarounds, with contribution
from Jan.

This is CVE-2006-1056

Cc: richard.brunner@amd.com
Cc: jbeulich@novell.com

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-20 07:58:11 -07:00
Prasanna S Panchamukhi
07fab8da80 [PATCH] Switch Kprobes inline functions to __kprobes for sparc64
Andrew Morton pointed out that compiler might not inline the functions
marked for inline in kprobes.  There-by allowing the insertion of probes
on these kprobes routines, which might cause recursion.

This patch removes all such inline and adds them to kprobes section
there by disallowing probes on all such routines.  Some of the routines
can even still be inlined, since these routines gets executed after the
kprobes had done necessay setup for reentrancy.

Signed-off-by: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-19 09:13:53 -07:00
Prasanna S Panchamukhi
3ca269d8b4 [PATCH] Switch Kprobes inline functions to __kprobes for ia64
Andrew Morton pointed out that compiler might not inline the functions
marked for inline in kprobes.  There-by allowing the insertion of probes
on these kprobes routines, which might cause recursion.

This patch removes all such inline and adds them to kprobes section
there by disallowing probes on all such routines.  Some of the routines
can even still be inlined, since these routines gets executed after the
kprobes had done necessay setup for reentrancy.

Signed-off-by: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-19 09:13:53 -07:00
Prasanna S Panchamukhi
46dbe2f4ef [PATCH] Switch Kprobes inline functions to __kprobes for ppc64
Andrew Morton pointed out that compiler might not inline the functions
marked for inline in kprobes.  There-by allowing the insertion of probes
on these kprobes routines, which might cause recursion.

This patch removes all such inline and adds them to kprobes section
there by disallowing probes on all such routines.  Some of the routines
can even still be inlined, since these routines gets executed after the
kprobes had done necessay setup for reentrancy.

Signed-off-by: Prasanna S Panchamukhi <prasanna@in.ibm.com>
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>
2006-04-19 09:13:53 -07:00
Prasanna S Panchamukhi
3b60211c16 [PATCH] Switch Kprobes inline functions to __kprobes for x86_64
Andrew Morton pointed out that compiler might not inline the functions
marked for inline in kprobes.  There-by allowing the insertion of probes
on these kprobes routines, which might cause recursion.

This patch removes all such inline and adds them to kprobes section
there by disallowing probes on all such routines.  Some of the routines
can even still be inlined, since these routines gets executed after the
kprobes had done necessay setup for reentrancy.

Signed-off-by: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-19 09:13:53 -07:00
Prasanna S Panchamukhi
34c37e1869 [PATCH] Switch Kprobes inline functions to __kprobes for i386
Andrew Morton pointed out that compiler might not inline the functions
marked for inline in kprobes.  There-by allowing the insertion of probes
on these kprobes routines, which might cause recursion.

This patch removes all such inline and adds them to kprobes section
there by disallowing probes on all such routines.  Some of the routines
can even still be inlined, since these routines gets executed after the
kprobes had done necessay setup for reentrancy.

Signed-off-by: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-19 09:13:52 -07:00
Samuel Thibault
7337445455 [PATCH] apm: fix Armada laptops again
Fix the "apm: set display: Interface not engaged" error on Armada laptops
again.

Jordan said:

  I think this is fine.  It seems to me that this may be the fault of one or
  both of the APM solutions handling this situation in a non-standard way, but
  since APM is used very little on the Geode, and I have direct access to our
  BIOS folks, if this problem comes up with a customer again, we'll solve it
  from the firmware.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: "Jordan Crouse" <jordan.crouse@amd.com>
Cc: Zachary Amsden <zach@vmware.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-19 09:13:52 -07:00
Jesper Juhl
b514d8c77a [PATCH] voyager: no need to define BITS_PER_BYTE when it's already in types.h
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-19 09:13:51 -07:00
Jeff Dike
fb30d64568 [PATCH] uml: add missing __volatile__
We were missing __volatile__ on some bits of asm in the segfault handlers.
On x86_64, this was messing up the move from %rdx to uc because that was
moved to after the GET_FAULTINFO_FROM_SC, which changed %rdx.

Also changed the other bit of asm and the one in the i386 handler to
prevent any similar occurrences.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-19 09:13:51 -07:00
Rob Landley
966a082f80 [PATCH] uml: physical memory map file fixes
UML really wants shared memory semantics form its physical memory map file,
and the place for that is /dev/shm.  So move the default, and fix the error
messages to recognize that this value can be overridden.

Signed-off-by: Rob Landley <rob@landley.net>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-19 09:13:51 -07:00
Al Viro
f983c45ebe [PATCH] uml: __user annotations
bits of uml __user annotations lost in merge

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-19 09:13:51 -07:00
Jeff Dike
ad28e02978 [PATCH] uml: change sigjmp_buf to jmp_buf
Clean up the jmpbuf code.  Since softints, we no longer use sig_setjmp, so
the UML_SIGSETJMP wrapper now has a misleading name.  Also, I forgot to
change the buffers from sigjmp_buf to jmp_buf.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-19 09:13:51 -07:00
Hirokazu Takata
4127272c38 [PATCH] m32r: update switch_to macro for tuning
- Remove unnecessary push/pop's of the switch_to() macro
  for performance tuning.
- Cosmetic updates: change __inline__ to inline, etc.

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Cc: NIIBE Yutaka <gniibe@fsij.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-19 09:13:51 -07:00
Hirokazu Takata
0d34c86c3b [PATCH] m32r: mappi3 reboot support
Here is a patch to support a reboot function for M3A-2170(Mappi-III)
evaluation board.

Signed-off-by: Hayato Fujiwara <fujiwara@linux-m32r.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-19 09:13:50 -07:00
Hirokazu Takata
8e8ff02c0b [PATCH] m32r: Fix pt_regs for !COFNIG_ISA_DSP_LEVEL2 target
This modification is required to fix debugging function for m32r targets
with !CONFIG_ISA_DSP_LEVEL2, by unifying 'struct pt_regs' and 'struct
sigcontext' size for all M32R ISA.

Some m32r processor core with !CONFIG_ISA_DSP_LEVEL2 configuration has only
single accumulator a0 (ex.  VDEC2 core, M32102 core, etc.), the others with
CONFIG_ISA_DSP_LEVEL2 has two accumulators, a0 and a1.

This means there are two variations of thread context.  So far, we reduced
and changed stackframe size at a syscall for their context size.  However,
this causes a problem that a GDB for processors with CONFIG_ISA_DSP_LEVEL2
cannot be used for processors with !CONFIG_ISA_DSP_LEVEL2.

From the viewpoint of GDB support, we should reduce such variation of
stackframe size for simplicity.

In this patch, dummy members are added to 'struct pt_regs' and 'struct
sigcontext' to adjust their size for !CONFIG_ISA_DSP_LEVEL2.

This modification is also a one step for a GDB update in future.
Currently, on the m32r, GDB can access process's context by using ptrace
functions in a simple way of register by register access.  By unifying
stackframe size, we have a possibility to make use of ptrace functions of
not only a single register access but also block register access,
PTRACE_{GETREGS,PUTREGS}.

However, for this purpose, we might have to modify stackframe structure
some more; for example, PSW (processor status word) register should be
pre-processed before pushing to stack at a syscall, and so on.  In this
case, we must update carefully both kernel and GDB at a time...

Signed-off-by: Hayato Fujiwara <fujiwara@linux-m32r.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Cc: Kei Sakamoto <ksakamot@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-19 09:13:50 -07:00
Randy Dunlap
efe87d2b82 [PATCH] x86 cpuid and msr notifier callback section mismatches
Fix section mismatch warnings in x86 cpuid and msr notifier callback
functions.  We can't have these as init (discarded) code.

WARNING: arch/x86_64/kernel/cpuid.o - Section mismatch: reference to .init.text: from .data between 'cpuid_class_cpu_notifier' (at offset 0x0) and 'cpuid_fops'
WARNING: arch/x86_64/kernel/msr.o - Section mismatch: reference to .init.text: from .data between 'msr_class_cpu_notifier' (at offset 0x0) and 'msr_fops'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-19 09:13:50 -07:00
Jeff Dike
b73781c866 [PATCH] uml: MADV_REMOVE fixes
MADV_REMOVE fixes - change the test mapping to be MAP_SHARED instead of
MAP_PRIVATE, as MADV_REMOVE on MAP_PRIVATE maps won't work.  Also, use
the kernel's definition of MADV_REMOVE instead of hardcoding it if there
isn't a libc definition.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-19 09:13:49 -07:00
Paolo 'Blaisorblade' Giarrusso
181ae4005d [PATCH] uml: make 64-bit COW files compatible with 32-bit ones
This is the minimal fix to make 64-bit UML binaries create 32-bit
compatible COW files and read them.

I've indeed tested that current code doesn't do this - the code gets
SIGFPE for a division by a value read at the wrong place, where 0 is
found.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-19 09:13:49 -07:00
Linus Torvalds
038e5e2bf2 Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (47 commits)
  [MAINTAINERS] The ham radio code now has website at http://www.linux-ax25.org.
  [MIPS] Use __ffs() instead of ffs() for waybit calculation.
  [MIPS] Fix Makefile bugs for MIPS32/MIPS64 R1 and R2.
  [MIPS] Handle IDE PIO cache aliases on SMP.
  [MIPS] Make mips_srs_init static.
  [MIPS] MIPS boards: Set HZ to 100.
  [MIPS] kgdb: Let gcc compute the array size itself.
  [MIPS] FPU affinity for MT ASE.
  [MIPS] MT: Improved multithreading support.
  [MIPS] kpsd and other AP/SP improvements.
  [MIPS] R2: Instruction hazard barrier.
  [MIPS] Fix genrtc compilation.
  [MIPS] R2: Implement shadow register allocation without spinlock.
  [MIPS] Fix VR41xx build errors.
  [MIPS] Fix tx49_blast_icache32_page_indexed.
  [MIPS] Enable SCHED_NO_NO_OMIT_FRAME_POINTER for MIPS.
  [MIPS] Use "R" constraint for cache_op.
  [MIPS] Rewrite all the assembler interrupt handlers to C.
  [MIPS] Fix the crime against humanity that mipsIRQ.S is.
  [MIPS] Fixup damage done by 22a9835c35.
  ...
2006-04-18 19:49:42 -07:00
Atsushi Nemoto
3c68da798a [MIPS] Use __ffs() instead of ffs() for waybit calculation.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:30 +02:00
Ralf Baechle
9200c0b2a0 [MIPS] Fix Makefile bugs for MIPS32/MIPS64 R1 and R2.
This fixes kernel builds with gcc 3.2 (not 64-bit, that is looking like
it is beyond recovery) and 3.3.  With these bugs fixed we now also can
get undo 3b4c4996a0c24da9e6f8be764e3950b756b18cc0 and similar bits for
SMTC that were added in 79cc8007b93838a670b164b8a55ab3e735a12a8b.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:29 +02:00
Ralf Baechle
7e3bfc7cfc [MIPS] Handle IDE PIO cache aliases on SMP.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:29 +02:00
Ralf Baechle
bb12d612d4 [MIPS] Make mips_srs_init static.
Nothing outside traps.c uses it.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:29 +02:00
Ralf Baechle
8f6539d559 [MIPS] kgdb: Let gcc compute the array size itself.
This is the same method as used in the serial driver.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:28 +02:00
Ralf Baechle
f088fc84f9 [MIPS] FPU affinity for MT ASE.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:28 +02:00
Ralf Baechle
41c594ab65 [MIPS] MT: Improved multithreading support.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:28 +02:00
Ralf Baechle
2600990e64 [MIPS] kpsd and other AP/SP improvements.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:27 +02:00
Ralf Baechle
bce1a28686 [MIPS] R2: Instruction hazard barrier.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:22 +02:00
Ralf Baechle
193dd2ce2a [MIPS] R2: Implement shadow register allocation without spinlock.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:22 +02:00
Yoichi Yuasa
62a442155e [MIPS] Fix VR41xx build errors.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
2006-04-19 04:14:22 +02:00
Atsushi Nemoto
67a3f6de93 [MIPS] Fix tx49_blast_icache32_page_indexed.
Fix the cache index value in tx49_blast_icache32_page_indexed().
This is a damage by de62893bc0 commit.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:21 +02:00
Atsushi Nemoto
1cc89038f3 [MIPS] Enable SCHED_NO_NO_OMIT_FRAME_POINTER for MIPS.
MIPS get_wchan() no longer requires -fno-omit-frame-pointer.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:21 +02:00
Ralf Baechle
e4ac58afdf [MIPS] Rewrite all the assembler interrupt handlers to C.
Saves like 1,600 lines of code, is way easier to debug, compilers
frequently do a better job than the cut and paste type of handlers many
boards had.  And finally having all the stuff done in a single place
also means alot of bug potencial for the MT ASE is gone.

The only surviving handler in assembler is the DECstation one; I hope
Maciej will rewrite it.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:21 +02:00
Ralf Baechle
d35d473c25 [MIPS] Fix the crime against humanity that mipsIRQ.S is.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:21 +02:00
Ralf Baechle
fde3505c69 [MIPS] Fixup damage done by 22a9835c35.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:21 +02:00
Ralf Baechle
9c1f1257a3 [MIPS] Replace redundant declarations of _end by <asm/sections.h>.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:20 +02:00
Ralf Baechle
ba8990f2ae [MIPS] JMR3927 build fixes for the RTC code.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:20 +02:00
Ralf Baechle
67cbeb334e [MIPS] EV96100: ev96100_cpu_irq needs a struct pt_regs argument.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:20 +02:00
Ralf Baechle
2ef2e1d973 [MIPS] EV96100: Fix over two year old typo in variable name.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:20 +02:00
Ralf Baechle
c40b92e09c [MIPS] Ocelot 3: Fix build errors after the recent move of Marvell headers.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:20 +02:00
Ralf Baechle
ed00e87fd0 [MIPS] ITE: Glue build.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:19 +02:00
Ralf Baechle
b56bce9a25 [MIPS] Jaguar: Fix build errors after the recent move of Marvell headers.
Some things were renamed because the PPC variant of the MV-643XX now
uses the same header and the Jaguar code didn't catch up on that.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:19 +02:00
Ralf Baechle
0428657d87 [MIPS] ITE8172: Fix build error due to missmatching prototypes.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:19 +02:00
Ralf Baechle
f13b68e817 [MIPS] Fix CONFIG_LIMITED_DMA build.
This fix a build error for the Momentum Jaguar ATX eval board.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:19 +02:00
Ralf Baechle
41d4f0e612 [MIPS] PNX8550 build fix.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:19 +02:00
Ralf Baechle
93373ed4d8 [MIPS] Rewrite spurious_interrupt from assembler to C.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:18 +02:00
Ralf Baechle
c9e321e095 [MIPS] Fix breakage due to the grand makefile crapectomy.
It's cc-option not cc-options.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:14 +02:00
Ralf Baechle
e49ed7f591 [MIPS] Sort out duplicate exports.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:14 +02:00
Ralf Baechle
a8d587a71b [MIPS] Wire up sync_file_range(2).
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:14 +02:00
Ralf Baechle
f115da9cd6 [MIPS] Wire splice syscall.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:13 +02:00
Ralf Baechle
91b05e6776 [MIPS] Fix vectored interrupt support in TLB exception handler generator.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:13 +02:00
Ralf Baechle
ff3eab2a98 [MIPS] Some formatting fixes.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:13 +02:00
Ralf Baechle
7acb783ecd [MIPS] Fixup printk in mips_srs_init.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:13 +02:00
Ralf Baechle
e76038dcc0 [MIPS] Remove redundant initialization of sr_allocated.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:13 +02:00
Ralf Baechle
b4d05cb9cb [MIPS] Make set_vi_srs_handler static.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:12 +02:00
Ralf Baechle
6fd11a2173 [MIPS] Cleanup free_initmem the same way as i386 did.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:12 +02:00
Yoichi Yuasa
18b68e1561 [MIPS] Added tb0287_defconfig back.
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-04-19 04:14:12 +02:00
Linus Torvalds
a196e78809 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Fix dependencies of HUGETLB_PAGE_SIZE_64K
2006-04-18 18:02:55 -07:00
Linus Torvalds
c63fdeee94 Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
* master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq:
  [CPUFREQ] powernow-k8.c: fix a check-after-use
  [CPUFREQ] Remove duplicate check in powernow-k8
  [CPUFREQ] drivers/cpufreq/cpufreq.c: static functions mustn't be exported
  [CPUFREQ] If max_freq got reduced (e.g. by _PPC) a write to sysfs scaling_governor let cpufreq core stuck at low max_freq for ever
  [CPUFREQ] x86_64: Proper null pointer check in powernow_k8_get
  [CPUFREQ] x86_64: Revert earlier powernow-k8 change
  [CPUFREQ] Update LART site URL
  [CPUFREQ] Remove pointless check in conservative governor.
  [CPUFREQ] trailing whitespace removal de-jour.
  [CPUFREQ] extra debugging in cpufreq_add_dev()
2006-04-18 18:01:47 -07:00
Linus Torvalds
c63f774ca1 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 3479/1: Corgi SSP: Fix potential concurrent access problem
  [ARM] 3478/1: SharpSL SCOOP: Fix potenial build failure
2006-04-18 18:01:19 -07:00
Jean-Luc Lger
f2a1585244 [SPARC64]: Fix dependencies of HUGETLB_PAGE_SIZE_64K
This patch fixes dependencies of HUGETLB_PAGE_SIZE_64K

Signed-off-by: Jean-Luc Lger <jean-luc.leger@dspnet.fr.eu.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-04-18 16:19:53 -07:00
Adrian Bunk
9180053cac [CPUFREQ] powernow-k8.c: fix a check-after-use
This patch fixes a check-after-use introduced by commit
4211a30349 and spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-04-18 17:24:52 -05:00
Tobias Klauser
3aee086bd3 [CPUFREQ] Remove duplicate check in powernow-k8
Remove a duplicate NULL pointer check introduced by commit
4211a30349

Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-04-18 17:24:52 -05:00
Richard Purdie
608c783aaa [ARM] 3479/1: Corgi SSP: Fix potential concurrent access problem
Patch from Richard Purdie

corgi_ssp_probe() should not access GPDR directly but should use
pxa_gpio_mode() which has appropriate locking and other safeguards.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-18 23:18:54 +01:00
Richard Purdie
7ea3bbbc89 [ARM] 3478/1: SharpSL SCOOP: Fix potenial build failure
Patch from Richard Purdie

Move platform_scoop_config from the SharpSL scoop PCMCIA driver to
the SCOOP driver. This avoids build failures when PCMCIA is not built
or is modular (scoop.c itself cannot be modular).

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-18 23:18:53 +01:00
Andi Kleen
102e41fd9d [PATCH] i386: Move CONFIG_DOUBLEFAULT into arch/i386 where it belongs.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-18 10:39:20 -07:00
Andi Kleen
f1233ab2ce [PATCH] x86_64: Add tee and sync_file_range
tee was already there for some reason for native 64bit, but
sys_sync_file_range was missing. Also add it to the compat layer.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-18 10:39:20 -07:00
Vivek Goyal
8bcc5280e6 [PATCH] x86_64: x86_64 add crashdump trigger points
o Start booting into the capture kernel after an Oops if system is in a
  unrecoverable state. System will boot into the capture kernel, if one is
  pre-loaded by the user, and capture the kernel core dump.

o One of the following conditions should be true to trigger the booting of
  capture kernel.
        - panic_on_oops is set.
        - pid of current thread is 0
        - pid of current thread is 1
        - Oops happened inside interrupt context.

Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-18 10:39:19 -07:00
Andi Kleen
87cb23a48c [PATCH] i386/x86-64: Fix ACPI disabled LAPIC handling mismerge
The patch I submitted earlier to fix disabled LAPIC handling in ACPI
was mismerged for some reason I still don't quite understand. Parts
of it was applied to the wrong function.

This patch fixes it up.

Cc: len.brown@intel.com

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-18 10:39:19 -07:00
Andi Kleen
d16e86243e [PATCH] x86_64: Update defconfig
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-18 10:39:19 -07:00
Linus Torvalds
6fbe85f914 Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge:
  powerpc: Use correct sequence for putting CPU into nap mode
  [PATCH] spufs: fix context-switch decrementer code
  [PATCH] powerpc32: Set cpu explicitly in kernel compiles
  [PATCH] powerpc/pseries: bugfix: balance calls to pci_device_put
  [PATCH] powerpc: Fix machine detection in prom_init.c
  [PATCH] ppc32: Fix string comparing in platform_notify_map
  [PATCH] powerpc: Avoid __initcall warnings
  [PATCH] powerpc: Ensure runlatch is off in the idle loop
  powerpc: Fix CHRP booting - needs a define_machine call
  powerpc: iSeries has only 256 IRQs
2006-04-18 10:34:24 -07:00
Paul Mackerras
f39224a8c1 powerpc: Use correct sequence for putting CPU into nap mode
We weren't using the recommended sequence for putting the CPU into
nap mode.  When I changed the idle loop, for some reason 7447A cpus
started hanging when we put them into nap mode.  Changing to the
recommended sequence fixes that.

The complexity here is that the recommended sequence is a loop that
keeps putting the cpu back into nap mode.  Clearly we need some way
to break out of the loop when an interrupt (external interrupt,
decrementer, performance monitor) occurs.  Here we use a bit in
the thread_info struct to indicate that we need this, and the exception
entry code notices this and arranges for the exception to return
to the value in the link register, thus breaking out of the loop.
We use a new `local_flags' field in the thread_info which we can
alter without needing to use an atomic update sequence.

The PPC970 has the same recommended sequence, so we do the same thing
there too.

This also fixes a bug in the kernel stack overflow handling code on
32-bit, since it was causing a value that we needed in a register to
get trashed.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-18 21:49:11 +10:00
David S. Miller
5fdfd42e3a [SPARC64]: Export pcibios_resource_to_bus().
SYM2 driver uses it.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-04-17 13:34:44 -07:00
Linus Torvalds
63d39fe88f Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 3477/1: ARM EABI: undefine removed syscalls
  [ARM] 3475/1: S3C2410: fix spelling mistake in SMDK partition table
  [ARM] 3474/1: S3C2440: USB rate writes wrong var to CLKDIVN
2006-04-15 16:01:39 -07:00
David Brownell
2c5362007b Fix AT91RM9200 build breakage
The at91_cf driver got out of sync with certain changes in the PCMCIA
layer, notably getting rid of some duplication of data ... causing the
version merged to kernel.org to fail compiling.

This patch gives the at91_cf platform device a new iomem resource, using
it so this new pcmcia scheme works.  It also cleans up some whitepsace
bugs that have accumulated over time (mostly too-long lines).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-14 18:38:01 -07:00
Linus Torvalds
f2f4d9e8cb Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  commit 5fdef39495
  Author: David S. Miller <davem@sunset.davemloft.net>
  Date:   Fri Apr 14 15:29:32 2006 -0700
  
      [SPARC]: Hook up sys_tee() into syscall tables.
      
      Signed-off-by: David S. Miller <davem@davemloft.net>
2006-04-14 17:09:41 -07:00
Linus Torvalds
bcdc084257 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (169 commits)
  commit 78a596b449
  Author: Adrian Bunk <bunk@stusta.de>
  Date:   Fri Mar 31 01:38:12 2006 -0800
  
      [PATCH] remove kernel/power/pm.c:pm_unregister()
      
      Since the last user is removed in -mm, we can now remove this long deprecated
      function.
      
      Signed-off-by: Adrian Bunk <bunk@stusta.de>
      Cc: Pavel Machek <pavel@ucw.cz>
      Signed-off-by: Andrew Morton <akpm@osdl.org>
      Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  
  commit 21440d3133
  Author: David Brownell <david-b@pacbell.net>
  Date:   Sat Apr 1 10:21:52 2006 -0800
  
      [PATCH] dma doc updates
      
  ...
2006-04-14 17:08:18 -07:00
David S. Miller
5fdef39495 [SPARC]: Hook up sys_tee() into syscall tables.
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-04-14 15:29:32 -07:00
Grzegorz Janoszka
40d8b89b06 [PATCH] arch/i386/pci/irq.c - new VIA chipsets (fwd)
I use 2.6.15.6 Linux kernel and found some problems. I have about 100
Linux boxes (all with the same (binary the same) kernel). Last time I have
upgraded all those boxes from 2.4.32 to 2.6.15.6 (first 2.6.15.1, next .2,
.4 and .6) and I have found some problems on VIA based PC's. Probably the
reason of this is that some VIA chipsets are unrecognized by IRQ router.

In line 586 there is: /* FIXME: add new ones for 8233/5 */

There were only a few of chipsets ID's there, some of my VIA chipsets were
not present and kernel used default IRQ router.

I have added three entries, so that the code looks like:

        case PCI_DEVICE_ID_VIA_82C596:
        case PCI_DEVICE_ID_VIA_82C686:
        case PCI_DEVICE_ID_VIA_8231:
        case PCI_DEVICE_ID_VIA_8233A:
        case PCI_DEVICE_ID_VIA_8235:
        case PCI_DEVICE_ID_VIA_8237:
        case PCI_DEVICE_ID_VIA_8237_SATA:
                /* FIXME: add new ones for 8233/5 */
                r->name = "VIA";
                r->get = pirq_via_get;
                r->set = pirq_via_set;
                return 1;
        }

The kernel goes fine but I haven't testes it for weeks, I'm just a moment
after reboot :)
One thing is different (better?):
Using previus kernel I had:
PCI: Via IRQ fixup for 0000:00:0f.1, from 255 to 0
now I have:
PCI: Via IRQ fixup for 0000:00:0f.1, from 255 to 11

Maybe it is good idea to add there some more VIA chipsets?
The ones I have added seem to be OK.

From: Grzegorz Janoszka <Grzegorz@Janoszka.pl>
Acked-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 12:25:25 -07:00
Bjorn Helgaas
4f705ae3e9 [PATCH] DMI: move dmi_scan.c from arch/i386 to drivers/firmware/
dmi_scan.c is arch-independent and is used by i386, x86_64, and ia64.
Currently all three arches compile it from arch/i386, which means that ia64
and x86_64 depend on things in arch/i386 that they wouldn't otherwise care
about.

This is simply "mv arch/i386/kernel/dmi_scan.c drivers/firmware/" (removing
trailing whitespace) and the associated Makefile changes.  All three
architectures already set CONFIG_DMI in their top-level Kconfig files.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Andrey Panin <pazke@orbita1.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:41:25 -07:00
Linus Torvalds
9ca686626c Merge branch 'tee' of git://brick.kernel.dk/data/git/linux-2.6-block
* 'tee' of git://brick.kernel.dk/data/git/linux-2.6-block:
  [PATCH] splice: add support for sys_tee()
  [PATCH] splice: pass offset around for ->splice_read() and ->splice_write()
2006-04-14 09:02:07 -07:00
Robin Holt
ace1d816a1 [IA64] Make show_mem() skip holes in a pgdat
This patch modifies ia64's show_mem() to walk the vmem_map page tables and
rapidly skip forward across regions where the page tables are missing.
This prevents the pfn_valid() check from causing numerous unnecessary
page faults.

Without this patch on a 512 node 512 cpu system where every node has four
memory holes, the show_mem() call takes 1 hour 18 minutes.  With this
patch, it takes less than 3 seconds.

Signed-off-by: Robin Holt <holt@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-04-13 15:34:45 -07:00
Keith Owens
356a5c1c6f [IA64] ia64_wait_for_slaves() incorrectly reports MCA
ia64_wait_for_slaves() was changed in 2.6.17-rc1 to report the slave
state.  It incorrectly assumes that all slaves are for MCA, but
ia64_wait_for_slaves() is also called from the INIT monarch handler.
The existing message is very misleading, so correct it.

Signed-off-by: Keith Owens <kaos@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-04-13 14:57:18 -07:00
Jordi Caubet
183b73ae7c [PATCH] spufs: fix context-switch decrementer code
We found that when the 'decrementer' is saved, the PPE saves the current
time 'csa->suspend_time'. When restoring the 'decrementer', (Step 34)
decrementer seems to be adjusted with the number of cycles th= at a spu
thread has not been running.

In that code it is missing a substract ('-') because 'delta_time' is
assigned a not substracted(see bellow).

Acked-by: Mark Nutter <mnutter@us.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-13 09:38:46 -07:00
Olaf Hering
f48b8296b3 [PATCH] powerpc32: Set cpu explicitly in kernel compiles
Compile the 32bit kernel with -mcpu=powerpc. This reduces the imagesize
when a compiler is used that defaults to -mtune=power4. It inserts lots
of nops to please the 64bit cpu instruction scheduling. But all these nops
are not needed for 32bit kernels.

Example with SLES10 gcc 4.1.0 and arch/powerpc/configs/pmac32_defconfig:

                    vmlinux  vmlinux.strip  vmlinux.gz
 -O2                4980515     4187528      1846829
 -Os                4618801     3827084      1673333
 -O2 -mcpu=powerpc  4738851     3945868      1816253
 -Os -mcpu=powerpc  4532785     3741068      1664688

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-13 09:38:33 -07:00
Linas Vepstas
b055a9e10f [PATCH] powerpc/pseries: bugfix: balance calls to pci_device_put
Repeated calls to eeh_remove_device() can result in multiple
(and thus unbalanced) calls to pci_dev_put(). Make sure the
pci_device_put() is called only once (since there was only
one call to the matching pci_device_get()).

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-13 09:34:15 -07:00
Michael Ellerman
6f806ceed5 [PATCH] powerpc: Fix machine detection in prom_init.c
In e8222502ee the detection of machine types
in prom_init broke for some machines. We should be checking /device_type
instead of /model. This should make Power3 and Power4 boot again. Haven't
been able to test this.  We also need to relocate before comparing.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-13 09:32:00 -07:00
Vitaly Bordug
132058f78a [PATCH] ppc32: Fix string comparing in platform_notify_map
Fixed odd function behavior when dev->bus_id does not contain '.' - it
compared that case 0 characters of the string and hereby reported success and
executed callback. Now bus_id's are compared correctly, extra callback
triggering eliminated.

Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-13 09:30:19 -07:00
Anton Blanchard
49c28e4e40 [PATCH] powerpc: Avoid __initcall warnings
Fix __initcall return in proc_rtas_init and rtas_init.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-13 09:27:26 -07:00
Anton Blanchard
ddafddcfc7 [PATCH] powerpc: Ensure runlatch is off in the idle loop
Since external and decrementer interrupts set the runlatch on, we need
to ensure its set off again in the idle loop. At the moment we dont turn
it off in the inner loop.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-13 09:27:22 -07:00
Ben Dooks
f683554344 [ARM] 3475/1: S3C2410: fix spelling mistake in SMDK partition table
Patch from Ben Dooks

Fix bad spelling of partition

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-13 09:57:15 +01:00
Ben Dooks
0f6e439c12 [ARM] 3474/1: S3C2440: USB rate writes wrong var to CLKDIVN
Patch from Ben Dooks

The wrong variable is written back to CLKDIVN
register if the USB PLL speed is above 94MHz

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-11 18:20:06 +01:00
Jens Axboe
70524490ee [PATCH] splice: add support for sys_tee()
Basically an in-kernel implementation of tee, which uses splice and the
pipe buffers as an intelligent way to pass data around by reference.

Where the user space tee consumes the input and produces a stdout and
file output, this syscall merely duplicates the data inside a pipe to
another pipe. No data is copied, the output just grabs a reference to the
input pipe data.

Signed-off-by: Jens Axboe <axboe@suse.de>
2006-04-11 15:51:17 +02:00
Linus Torvalds
2514395ef8 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
  kconfig: fix typo in change count initialization
  kconfig: recenter menuconfig
  kconfig: revert conf behaviour change
  kconfig: fix default value for choice input
  kbuild: fix NULL dereference in scripts/mod/modpost.c
  kbuild: fix mode of checkstack.pl and other files.
  kbuild: rebuild initramfs if content of initramfs changes
  kbuild: properly pass options to hostcc when doing make O=..
  kbuild: modules_install for external modules must not remove existing modules
  kbuild: fix make dir/
  ver_linux: don't print reiser4progs version if none found
  kbuild: mips: fix sed regexp to generate asm-offset.h
  kbuild: fix building single targets with make O=.. single-target
  kbuild: use relative path to -I
  kbuild: fix unneeded rebuilds in drivers/net/chelsio after moving source tree
  kbuild: fix unneeded rebuilds in drivers/media/video after moving source tree
  kbuild: fix garbled text in modules.txt
2006-04-11 06:41:02 -07:00
Linus Torvalds
b3967dc566 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] Prefetch mmap_sem in ia64_do_page_fault()
  [IA64] Failure to resume after INIT in user space
  [IA64] Pass more data to the MCA/INIT notify_die hooks
  [IA64] always map VGA framebuffer UC, even if it supports WB
  [IA64] fix bug in ia64 __mutex_fastpath_trylock
  [IA64] for_each_possible_cpu: ia64
  [IA64] update HP CSR space discovery via ACPI
  [IA64] Wire up new syscalls {set,get}_robust_list
  [IA64] 'msg' may be used uninitialized in xpc_initiate_allocate()
  [IA64] Wire up new syscall sync_file_range()
2006-04-11 06:40:17 -07:00
Andi Kleen
44b940c299 [PATCH] x86_64: Fix embarassing typo in mmconfig bus check
Surprising that it still worked at all with this - yes it was
tested.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:38:57 -07:00
Andi Kleen
ecc16ba96f [PATCH] i386/x86-64: Remove checks for value == NULL in PCI config space access
Nobody should pass NULL here. Could in theory make it a BUG,
but the NULL pointer oops will do as well.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:38:57 -07:00
Andi Kleen
3d8a4d795c [PATCH] i386: Remove bogus special case code from AMD core parsing
It's not actually needed and would break non power of two number
of cores.

Follows similar earlier x86-64 patch.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:38:57 -07:00
Andi Kleen
97a4d00388 [PATCH] x86_64: Remove check for canonical RIP
As pointed out by Linus it is useless now because entry.S should
handle it correctly in all cases.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:38:57 -07:00
Andi Kleen
0fcd270901 [PATCH] x86-64/i386: Don't process APICs/IO-APICs in ACPI when APIC is disabled.
When nolapic was passed or the local APIC was disabled
for another reason ACPI would still parse the IO-APICs
until these were explicitely disabled with noapic.

Usually this resulted in a non booting configuration unless
"nolapic noapic" was used.

I also disabled the local APIC parsing in this case, although
that's only cosmetic (suppresses a few printks)

This hopefully makes nolapic work in all cases.

Cc: Len Brown <len.brown@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:38:57 -07:00
Antonino A. Daplas
89ec4c238e [PATCH] vesafb: Fix incorrect logo colors in x86_64
Bugzilla Bug 6299:

A pixel size of 8 bits produces wrong logo colors in x86_64.

The driver has 2 methods for setting the color map, using the protected
mode interface provided by the video BIOS and directly writing to the VGA
registers.  The former is not supported in x86_64 and the latter is enabled
only in i386.

Fix by enabling the latter method in x86_64 only if supported by the BIOS.
If both methods are unsupported, change the visual of vesafb to
STATIC_PSEUDOCOLOR.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:54 -07:00
Kyle McMartin
894b5779ce [PATCH] No arch-specific strpbrk implementations
While cleaning up parisc_ksyms.c earlier, I noticed that strpbrk wasn't
being exported from lib/string.c.  Investigating further, I noticed a
changeset that removed its export and added it to _ksyms.c on a few more
architectures.  The justification was that "other arches do it."

I think this is wrong, since no architecture currently defines
__HAVE_ARCH_STRPBRK, there's no reason for any of them to be exporting it
themselves.  Therefore, consolidate the export to lib/string.c.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:40 -07:00
Yasunori Goto
c80d79d746 [PATCH] Configurable NODES_SHIFT
Current implementations define NODES_SHIFT in include/asm-xxx/numnodes.h for
each arch.  Its definition is sometimes configurable.  Indeed, ia64 defines 5
NODES_SHIFT values in the current git tree.  But it looks a bit messy.

SGI-SN2(ia64) system requires 1024 nodes, and the number of nodes already has
been changeable by config.  Suitable node's number may be changed in the
future even if it is other architecture.  So, I wrote configurable node's
number.

This patch set defines just default value for each arch which needs multi
nodes except ia64.  But, it is easy to change to configurable if necessary.

On ia64 the number of nodes can be already configured in generic ia64 and SN2
config.  But, NODES_SHIFT is defined for DIG64 and HP'S machine too.  So, I
changed it so that all platforms can be configured via CONFIG_NODES_SHIFT.  It
would be simpler.

See also: http://marc.theaimsgroup.com/?l=linux-kernel&m=114358010523896&w=2

Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Jack Steiner <steiner@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:39 -07:00
Adrian Bunk
b068b43ba4 [PATCH] arch/s390/Makefile: remove -finline-limit=10000
-finline-limit might have been required for older compilers, but nowadays
it does no longer make sense.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:39 -07:00
Martin Schwidefsky
bdc7f15909 [PATCH] s390: update default configuration
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:37 -07:00
Paolo 'Blaisorblade' Giarrusso
52c7378236 [PATCH] uml: avoid warnings for diffent names for an unsigned quadword
Since on some 64-bit systems __u64 is rightfully defined to unsigned long and
GCC recognizes anyway unsigned long and unsigned long long as different, fix
some types back to being unsigned long long to avoid warnings and errors (for
prototype mismatch) on those systems.

Thanks to the report by Wesley Emeneker wesleyemeneker (at) google (dot) com

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:37 -07:00
Paolo 'Blaisorblade' Giarrusso
40dbb8676e [PATCH] uml: fix parallel make early failure on clean tree
Parallel make failed once for me - fix this by adding the appropriate command
(mkdir before creating a link in that dir).

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:37 -07:00
Paolo 'Blaisorblade' Giarrusso
dbdb4c06b7 [PATCH] uml: local_irq_save, not local_save_flags
The call to local_save_flags seems bogus since it is followed by
local_irq_restore, and it's intended to lock the list from concurrent
mconsole_interrupt invocations.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:37 -07:00
Paolo 'Blaisorblade' Giarrusso
87276f721a [PATCH] uml: fix big stack user
Switch this proc from storing 4k of data (a whole path) on the stack to
keeping it on the heap.

Maybe it's not called in process context but only in early boot context (where
in UML you have a normal process stack on the host) but just to be safe, fix
it.

While at it some little readability simplifications.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:37 -07:00
Paolo 'Blaisorblade' Giarrusso
d84a19ce52 [PATCH] uml: fix failure path after conversion
Little fix for error paths in this code.

- Some bug come from conversion to os-Linux (open() doesn't follow the
  kernel -errno return convention, while the old code called os_open_file()
  which followed it).  This caused the wrong return code to be printed.

- Then be more precise about what happened and do some whitespace fixes.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:36 -07:00
Paolo 'Blaisorblade' Giarrusso
b1c332c9e8 [PATCH] uml: fix hang on run_helper() failure on uml_net
Fix an hang on a pipe when run_helper() fails when called by change_tramp()
(i.e.  when calling uml_net) - reproduced the bug and verified this fixes it.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:36 -07:00
Paolo 'Blaisorblade' Giarrusso
e6fb54abb8 [PATCH] uml: move outside spinlock call not needing it
Move a call to kfree on a local variable out of a spinlock - there's no need
to have it in.  Done on a just merged patch.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:36 -07:00
Paolo 'Blaisorblade' Giarrusso
ccea15f45e [PATCH] uml: support sparse for userspace files
Make sparse checker work for userspace files - it normally gets -nostdinc
separately, so avoid having it for userspace files.  Also, add -D$(SUBARCH)
for multiarch hosts (i.e.  AMD64 with compatibility headers).

It works, the only problem is a bit of bogus warnings for system headers, but
they're not too many.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:36 -07:00
Paolo 'Blaisorblade' Giarrusso
f53389d8af [PATCH] uml: fix critical typo for TT mode
Noticed this for a compilation-time warning, so I'm fixing it even for TT mode
- this is not put_user, but copy_to_user, so we need a pointer to sp, not sp
itself (we're trying to write the word pointed to by the "sp" var.).

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:36 -07:00
Paolo 'Blaisorblade' Giarrusso
5b0e94787f [PATCH] uml: fix "extern-vs-static" proto conflict in TLS code
Move the prototype from arch-generic to arch-specific includes because on
x86_64 these functions are two static inlines.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:36 -07:00
Paolo 'Blaisorblade' Giarrusso
7c45ad16f0 [PATCH] uml: fix some double export warnings
Some functions are exported twice in current code - remove the excess export.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:36 -07:00
Paolo 'Blaisorblade' Giarrusso
802e307795 [PATCH] uml: fix format errors
Now that GCC warns about format errors, fix them.  Nothing able to cause a
crash, however.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:36 -07:00
Paolo 'Blaisorblade' Giarrusso
9cf85b3af2 [PATCH] uml: request format warnings to GCC for appropriate functions
Add the format attribute to prototypes so GCC warns about improper usage.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:35 -07:00
Paolo 'Blaisorblade' Giarrusso
6dad2d3faa [PATCH] uml: fix 2 harmless cast warnings for 64-bit
Fix two harmless warnings in 64-bit compilation (the 2nd doesn't trigger for
now because of a missing __attribute((format)) for cow_printf, but next
patches fix that).

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:35 -07:00
Paolo 'Blaisorblade' Giarrusso
f2ea394082 [PATCH] uml: safe migration path to the correct V3 COW format
- Correct the layout of all header versions - make all them well-specified
  for any external event.  As we don't have 1-byte or 2-byte wide fields, the
  32-bit layout (historical one) has no extra padding, so we can safely add
  __attribute__((packed)).

- Add detection and reading of the broken 64-bit COW format which has been
  around for a while - to allow safe migration to the correct 32-bit format.
  Safe detection is possible, thanks to some luck with the existing format,
  and it works in practice.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:35 -07:00
Paolo 'Blaisorblade' Giarrusso
cda402b283 [PATCH] uml: make 64-bit COW files compatible with 32-bit ones
This is the minimal fix to make 64-bit UML binaries create 32-bit compatible
COW files and read them.  I've indeed tested that current code doesn't do this
- the code gets SIGFPE for a division by a value read at the wrong place,
where 0 is found.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:35 -07:00
Jeff Dike
60baa15839 [PATCH] uml: memory hotplug cleanups
Change memory hotplug to use GFP_NOWAIT instead of GFP_ATOMIC, so that it
will grab memory without sleeping, but doesn't try to use the emergency
pools.

A small list initialization suggested by Daniel Phillips - don't initialize
lists which are just about to be list_add-ed.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:35 -07:00
Jeff Dike
a5d2f46a97 [PATCH] UML: TLS fixlets
Two small TLS fixes -

arch/um/os-Linux/sys-i386/tls.c uses errno and -E* so it should include
    errno.h
__setup_host_supports_tls returns 1, but as an initcall, it should return 0

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:35 -07:00
Hirokazu Takata
73830056f5 [PATCH] m32r: Remove symbols exported twice
Remove multi-exported symbols from arch/m32r/kernel/m32r_ksyms.c.

WARNING: vmlinux: 'enable_irq' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'disable_irq' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'disable_irq_nosync' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'synchronize_irq' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'memchr' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strstr' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'memscan' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'memcmp' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'memmove' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strnlen' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strchr' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strncmp' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strcmp' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strncat' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strcat' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strncpy' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strcpy' exported twice. Previous export was in vmlinux

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:35 -07:00
Hirokazu Takata
04dfd0de4e [PATCH] m32r: security fix of {get,put}_user macros
Update {get,put}_user macros for m32r kernel.
- Modify get_user to use __get_user_asm macro, instead of __get_user_x macro.
- Remove arch/m32r/lib/{get,put}user.S.
- Some cosmetic updates.

I would like to thank NIIBE Yutaka for his reporting about the m32r kernel's
security problem in {get,put}_user macros.

There were no address checking for user space access in {get,put}_user macros.
 ;-)

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Cc: NIIBE Yutaka <gniibe@fsij.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:34 -07:00
Hirokazu Takata
7c1c4e5418 [PATCH] m32r: Fix cpu_possible_map and cpu_present_map initialization for SMP kernel
This patch fixes a boot problem of the m32r SMP kernel 2.6.16-rc1-mm3 or
later.

In this patch, cpu_possible_map is statically initialized, and cpu_present_map
is also copied from cpu_possible_map in smp_prepare_cpus(), because the m32r
architecture has not supported CPU hotplug yet.

Signed-off-by: Hayato Fujiwara <fujiwara.hayato@renesas.com>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:34 -07:00
Brian Uhrain says
917b1f78a9 [PATCH] alpha: SMP boot fixes
I've encountered two problems with 2.6.16 and newer kernels on my API CS20
(dual 833MHz Alpha 21264b processors).  The first is the kernel OOPSing
because of a NULL pointer dereference while trying to populate SysFS with the
CPU information.  The other is that only one processor was being brought up.
I've included a small Alpha-specific patch that fixes both problems.

The first problem was caused by the CPUs never being properly registered using
register_cpu(), the way it's done on other architectures.

The second problem has to do with the removal of hwrpb_cpu_present_mask in
arch/alpha/kernel/smp.c.  In setup_smp() in the 2.6.15 kernel sources,
hwrpb_cpu_present_mask has a bit set for each processor that is probed, and
afterwards cpu_present_mask is set to the cpumask for the boot CPU.  In the
same function of the same file in the 2.6.16 sources, instead of
hwrpb_cpu_present_mask being set, cpu_possible_map is updated for each probed
CPU.  cpu_present_mask is still set to the cpumask of the boot CPU afterwards.
 The problem lies in include/asm-alpha/smp.h, where cpu_possible_map is
#define'd to be cpu_present_mask.

Cleanups from: Ivan Kokshaysky <ink@jurassic.park.msu.ru>

 - cpu_present_mask and cpu_possible_map are essentially the same thing
   on alpha, as it doesn't support CPU hotplug;
 - allocate "struct cpu" only for present CPUs, like sparc64 does.
   Static array of "struct cpu" is just a waste of memory.

Signed-off-by: Brian Uhrain <buhrain@rosettastone.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:34 -07:00
Jordan Crouse
1c08ca89b0 [PATCH] Enable TSC for AMD Geode GX/LX
Geode GX/LX should enable X86_TSC.   Pointed out by Adrian Bunk.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:34 -07:00
Adrian Bunk
edd711f381 [PATCH] i386: move SMP option above subarch selection
Since several subarchs depend on SMP, the SMP option should be above the
subarch selection.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:34 -07:00
Randy Dunlap
c0ec31ad33 [PATCH] mpparse: prevent table index out-of-bounds
John Z. Bohach <jzb@aexorsyst.com> found this bug:

  If the board has more than 32 PCI busses on it, the mptable bus array will
  overwrite its bounds for the PCI busses, and stomp on anything that's after
  it.

Prevent possible table overflow and unknown data corruption.  Code is in an
__init section so it will be discarded after init.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:34 -07:00
Randy Dunlap
e39632faa0 [PATCH] menu: relocate DOUBLEFAULT option
Move the DOUBLEFAULT option from the top-level menu to the EMBEDDED menu.
Only applicable to X86_32.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:33 -07:00
Randy Dunlap
7bee5c0fd2 [PATCH] i386: print EIP/ESP last
Print summary registers (EIP and SS:ESP only) as last death info.  This
makes this important data visible in case it had scrolled off the top of
the display.  Similar to what x86_64 does.  Suggested by Andi Kleen.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:33 -07:00
Ashok Raj
6cf272acd5 [PATCH] swsusp: don't require bigsmp
Switching to automatic bigsmp causes a misleading error message, that more
then 8 cpus are detected, and user needs to select either X86_GENERICARCH
or X86_BIGSMP to handle.

Reason is we switched to bigsmp to avoid IP race when new cpu is comming
up.  [bigsmp is nothing but using physical flat mode that can work for 1 ..
 255 cpus] [default is X86_PC, that uses logical flat mode up to 8 CPUs
max] Current x86_64 code uses bigsmp as default when hotplug is enabled.

It would be preferable to make bigsmp as default, and work the dependencies
of other related code like SMP_SUSPEND, and some related to memory hotplug
code for i386.

Current logical flat mode doesnt use shortcuts that cause the race by using
the send_IPI_mask() instead of shortcuts when HOTPLUG_CPU is enabled.

In the meantime this patch is the path of lease resistance.

We will switch to bigsmp default sometime soon, when we get to work it again.

Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Nigel Cunningham <nigel@suspend2.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:33 -07:00
Hyok S. Choi
3016b42153 [PATCH] frv: define MMU mode specific syscalls as 'cond_syscall' and clean up unneeded macros
For some architectures, a few syscalls are not linked in noMMU mode.  In
that case, the MMU depending syscalls are needed to be defined as
'cond_syscall'.  For example, ARM architecture selectively links sys_mlock
by the mode configuration.

In case of FRV, it has been managed by #ifdef CONFIG_MMU macro in
arch/frv/kernel/entry.S.  However these conditional macros are just
duplicates if they were defined as cond_syscall.  Compilation test is done
with FRV toolchains for both of MMU and noMMU mode.

Signed-off-by: Hyok S. Choi <hyok.choi@samsung.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:33 -07:00
KAMEZAWA Hiroyuki
a283a52520 [PATCH] for_each_possible_cpu: sparc64
for_each_cpu() actually iterates across all possible CPUs.  We've had mistakes
in the past where people were using for_each_cpu() where they should have been
iterating across only online or present CPUs.  This is inefficient and
possibly buggy.

We're renaming for_each_cpu() to for_each_possible_cpu() to avoid this in the
future.

This patch replaces for_each_cpu with for_each_possible_cpu.
for sparc64.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:31 -07:00
KAMEZAWA Hiroyuki
fff8efe7b7 [PATCH] for_each_possible_cpu: sparc
for_each_cpu() actually iterates across all possible CPUs.  We've had mistakes
in the past where people were using for_each_cpu() where they should have been
iterating across only online or present CPUs.  This is inefficient and
possibly buggy.

We're renaming for_each_cpu() to for_each_possible_cpu() to avoid this in the
future.

This patch replaces for_each_cpu with for_each_possible_cpu.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:31 -07:00
Adrian Bunk
dd7ba3b8b1 [PATCH] arch/i386/mach-voyager/voyager_cat.c: named initializers
This patch switches arch/i386/mach-voyager/voyager_cat.c to using named
initializers for struct resource.

Besides a fixing compile error in Greg's tree, it makes the code more
readable.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11 06:18:30 -07:00
Linus Torvalds
30d41bfbfb Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 3473/1: Use numbers 0-15 for the VFP double registers
  [ARM] 3472/1: Use the D variants of FLDMIA/FSTMIA on ARMv6
  [ARM] 3471/1: FTOSI functions should return 0 for NaN
  [ARM] 3470/1: Clear the HWCAP bits for the disabled kernel features
  [ARM] 3469/1: S3C24XX: clkout missing hclk selector
  [ARM] 3468/1: S3C2410: SMDK common include fix
  [ARM] 3461/1: ARM: OMAP: Fix clk_get() when using id and name
  [ARM] 3460/1: ARM: OMAP: Remove unnecessary nop_release()
  [ARM] 3459/1: ixp23xx: fix debug serial macros for big-endian operation
  [ARM] Allow decompressor to be built with -ffunction-sections
  [ARM] Fix SA110/SA1100 cache flushing
  [ARM] ebsa110: Fix incorrect serial port address
  [ARM] Fix ebsa110 debug macros
  [ARM] Move FLUSH_BASE macros to asm/arch/memory.h
  [ARM] Remove unnecessary extra parens in include/asm-arm/memory.h
  [ARM] arm's arch_local_page_offset() fix against 2.6.17-rc1
2006-04-10 16:45:24 -07:00
Catalin Marinas
1356c1948d [ARM] 3473/1: Use numbers 0-15 for the VFP double registers
Patch from Catalin Marinas

This patch changes the double registers numbering to 0-15 from even 0-30,
in preparation for future VFP extensions. It also fixes the VFP_REG_ZERO
bug (value 16 actually represents the 8th double register with the original
numbering).

The original mcrr/mrrc on CP10 were generating FMRRS/FMSRR instead of
FMRRD/FMDRR. The patch changes to CP11 for the correct instructions.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-10 21:32:46 +01:00
Catalin Marinas
1320a80d1d [ARM] 3471/1: FTOSI functions should return 0 for NaN
Patch from Catalin Marinas

The NaN case was dealed with by the "exponent >= ... + 32" condition but it
was not setting the value "d" to 0.

Signed-off-by: Ken'ichi Kuromusha <musha@aplix.co.jp>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-10 21:32:39 +01:00
Catalin Marinas
adeff42236 [ARM] 3470/1: Clear the HWCAP bits for the disabled kernel features
Patch from Catalin Marinas

Glibc interprets the HWCAP bits and decides on what features to use.
However, even if the features are present in the hardware, they are not
always supported by the kernel and hence the corresponding bits have to be
cleared from the elf_hwcap variable.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-10 21:32:35 +01:00
David S. Miller
68491d5892 [SPARC64]: Set ARCH_SELECT_MEMORY_MODEL
Otherwise the build breaks with EXPERIMENTAL disabled
because SPARSEMEM will not get selected properly.  See
mm/Kconfig for how that works.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-04-09 22:56:45 -07:00
David S. Miller
aa1d1a0af6 [SPARC64]: smp_call_function() fixups...
1) Take doc-book function comment from i386 implementation.
2) cacheline align call_lock, taken from powerpc
3) Need memory barrier after setting call_data
4) Remove timeout

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-04-09 22:56:44 -07:00
David S. Miller
731bbe431f [SPARC64]: Translate PTRACE_GETEVENTMSG for 32-bit tasks.
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-04-09 22:56:41 -07:00
David S. Miller
1608a96e79 [SPARC64]: Update defconfig.
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-04-09 22:56:39 -07:00
David S. Miller
955c054f79 [SPARC64]: Print out return PC in cheetah_log_errors().
This makes debugging things a little bit easier.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-04-09 22:56:37 -07:00
David S. Miller
1759e58ed2 [SPARC64]: Add dummy PTRACE_PEEKUSR for gdb.
GDB uses a PTRACE_PEEKUSR call with offset 0 to see
if a thread is alive, so provide a success return for
this particular special case.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-04-09 22:56:35 -07:00
Ben Dooks
7359036d5c [ARM] 3469/1: S3C24XX: clkout missing hclk selector
Patch from Ben Dooks

The clkout0/1 output parent code is missing the
HCLK option, and does not set clk->parent field
after updating the clock field

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-09 22:21:10 +01:00
Ben Dooks
13011d0834 [ARM] 3468/1: S3C2410: SMDK common include fix
Patch from Ben Dooks

common-smdk.c does not include its own header file
defining the exported prototypes.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-09 22:21:09 +01:00
Tony Lindgren
67d4d8352b [ARM] 3461/1: ARM: OMAP: Fix clk_get() when using id and name
Patch from Tony Lindgren

Recent change to use both id and name when available was
not necessarily returning the right clock as it also searched
for clock name afterwards. This caused MMC to break on H2 and
H3 boards.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-09 22:21:05 +01:00
Tony Lindgren
50e5629aa9 [ARM] 3460/1: ARM: OMAP: Remove unnecessary nop_release()
Patch from Tony Lindgren

Remove unnecessary omap_nop_release() as noted by RMK.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-09 22:21:02 +01:00
Linus Torvalds
66004a6ca2 Move request_standard_resources() back to before PCI probing
This effectively undoes the PCI resource allocation changes done in
commit b408cbc704, but leaves the cleanups
of that commit in place.

We're going back to marking the resources reported by e820 busy _before_
doing PCI probing, so that any PCI resource that clashes with the BIOS-
reported memory map will be reloacted to a non-clashing area.

The reason? Larry Finger reports that his laptop has the cardbus
controller set up by the BIOS so that it conflicts with the e820 memory
map, and needs to be relocated. See

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

for more details.

We'll have to work out how to handle the fbcon problem that caused that
commit in the first place in some other way.

Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Antonino A. Daplas <adaplas@pol.net>
Cc: <bjk@luxsci.net>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 12:14:02 -07:00
Andi Kleen
b8feb47f99 [PATCH] x86_64: Update 32-bit system call table
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:53 -07:00
Andi Kleen
67d53ea5a3 [PATCH] x86_64: Eliminate IA32_NR_syscalls define
Or rather compute it based on the table length automatically.

This also has the intended side effect of not warning for new system calls
anymore.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:53 -07:00
Sam Ravnborg
bbd3aff89d [PATCH] x86_64: fix CONFIG_REORDER
Fix CONFIG_REORDER.

The value of cflags-y was assined to CFLAGS before cflags-y was assigned
the value used for CONFIG_REORDER.

Use cflags-y for all CFLAGS options in the Makefile to avoid this
happening again.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:53 -07:00
John Blackwood
97c2803c9c [PATCH] x86_64: Plug GS leak in arch_prctl()
In linux-2.6.16, we have noticed a problem where the gs base value
returned from an arch_prtcl(ARCH_GET_GS, ...) call will be incorrect if:

   - the current/calling task has NOT set its own gs base yet to a
     non-zero value,

   - some other task that ran on the same processor previously set their
     own gs base to a non-zero value.

In this situation, the ARCH_GET_GS code will read and return the
MSR_KERNEL_GS_BASE msr register.

However, since the __switch_to() code does NOT load/zero the
MSR_KERNEL_GS_BASE register when the task that is switched IN has a zero
next->gs value, the caller of arch_prctl(ARCH_GET_GS, ...) will get back
the value of some previous tasks's gs base value instead of 0.

    Change the arch_prctl() ARCH_GET_GS code to only read and return
    the MSR_KERNEL_GS_BASE msr register if the 'gs' register of the calling
    task is non-zero.

    Side note: Since in addition to using arch_prctl(ARCH_SET_GS, ...),
    a task can also setup a gs base value by using modify_ldt() and write
    an index value into 'gs' from user space, the patch below reads
    'gs' instead of using thread.gs, since in the modify_ldt() case,
    the thread.gs value will be 0, and incorrect value would be returned
    (the task->thread.gs value).

    When the user has not set its own gs base value and the 'gs'
    register is zero, then the MSR_KERNEL_GS_BASE register will not be
    read and a value of zero will be returned by reading and returning
    'task->thread.gs'.

    The first patch shown below is an attempt at implementing this
    approach.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:53 -07:00
Andi Kleen
e48c4729d2 [PATCH] i386: Remove printk about reboot fixups at reboot
Printk doesn't have any value

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:53 -07:00
Jordan Hargrave
b20367a6c2 [PATCH] x86_64: Fix drift with HPET timer enabled
If the HPET timer is enabled, the clock can drift by ~3 seconds a day.
This is due to the HPET timer not being initialized with the correct
setting (still using PIT count).

If HZ changes, this drift can become even more pronounced.

HPET patch initializes tick_nsec with correct tick_nsec settings for
HPET timer.

Vojtech comments:

  "It's not entirely correct (it assumes the HPET ticks totally
   exactly), but it's significantly better than assuming the PIT error
   there."

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:53 -07:00
Andi Kleen
49c93e84d8 [PATCH] i386/x86-64: Return defined error value for bad PCI config space accesses
Mostly to get better handling when a extended config space
access has to fallback to Type1.

Cc: gregkh@suse.de
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:52 -07:00
Andi Kleen
8c30b1a74a [PATCH] i386/x86_64: Check if MCFG works for the first 16 busses
Previously only the first bus would be checked against Type 1.

Why 16? Checking all would need too much memory and we
can assume that systems with more than 16 busses have better than
average quality BIOS.

This is an additional defense against bad MCFG tables.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:52 -07:00
Ravikiran G Thirumalai
e405d06729 [PATCH] x86_64: Fixup read_mostly section on internode cache line size for vSMP
Fixup the read mostly section to start at internode cacheline boundary.

Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: Shai Fultheim <shai@scalex86.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:52 -07:00
Andi Kleen
3d34ee6891 [PATCH] x86_64: Don't return error for HPET initialization in initcall
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:52 -07:00
Andi Kleen
ac04dcaf6f [PATCH] x86_64: Don't export strlen twice
Fix

  WARNING: vmlinux: 'strlen' exported twice. Previous export was in vmlinux

Reported by Mats Johannesson

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:52 -07:00
Andi Kleen
7bf36bbc5e [PATCH] x86_64: When user could have changed RIP always force IRET
Intel EM64T CPUs handle uncanonical return addresses differently
from AMD CPUs.

The exception is reported in the SYSRET, not the next instruction.
This leads to the kernel exception handler running on the user stack
with the wrong GS because the kernel didn't expect exceptions
on this instruction.

This version of the patch has the teething problems that plagued an earlier
version fixed.

This is CVE-2006-0744

Thanks to Ernie Petrides and Asit B. Mallick for analysis and initial
patches.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:52 -07:00
Andi Kleen
553f265fe8 [PATCH] x86_64: Don't run NMI watchdog during machine checks
Machine checks can stall the machine for a long time and
it's not good to trigger the nmi watchdog during that.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:52 -07:00
Jacob Shin
4211a30349 [PATCH] x86_64: Proper null pointer check in powernow_k8_get
This prevents crashes on dual core system when enough ticks are lost.

Replaces earlier patch by me.

Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:51 -07:00
Andi Kleen
d7fa706ce2 [PATCH] x86_64: Revert earlier powernow-k8 change
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:51 -07:00
Andi Kleen
95d769aaf4 [PATCH] i386: Consolidate modern APIC handling
AMD systems have a modern APIC that supports 8 bit IDs, but
don't have a XAPIC version number.  Add a new "modern_apic"
subfunction that handles this correctly and use it (nearly)
everywhere where XAPIC is tested for.

I removed one wart: the code specified that external APICs
would use an 8bit APIC ID. But I checked a real 82093 data sheet
and it says clearly that they only use 4bit. So I removed
this special case since it would a bit awkward to implement now.

I removed the valid APIC tests in mptable parsing completely. On any modern
system they only check against the full field width (8bit) anyways
and are no-ops. This also fixes them doing the wrong thing
on >8 core Opterons.

This makes i386 boot again on 16 core Opterons.

Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:51 -07:00
Andi Kleen
d1530d82e0 [PATCH] x86_64: Clear APIC feature bit when local APIC is disabled
Needed for other checks later in ACPI.

Pointed out by Len Brown

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:51 -07:00
Andi Kleen
d3b6a349d2 [PATCH] x86-64/i386: Don't process APICs/IO-APICs in ACPI when APIC is disabled.
When nolapic was passed or the local APIC was disabled
for another reason ACPI would still parse the IO-APICs
until these were explicitely disabled with noapic.

Usually this resulted in a non booting configuration unless
"nolapic noapic" was used.

I also disabled the local APIC parsing in this case, although
that's only cosmetic (suppresses a few printks)

This hopefully makes nolapic work in all cases.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:51 -07:00
Andi Kleen
ec0f08eeea [PATCH] x86_64: Don't sanity check Type 1 PCI bus access on newer systems
Horus systems don't have anything on bus 0 which makes
the Type 1 sanity checks fail.  Use the DMI BIOS year to
check for newer systems and always assume Type 1 works on them.
I used 2001 as an pretty arbitary cutoff year.

Cc: gregkh@suse.de
Cc: Navin Boppuri <navin.boppuri@newisys.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:51 -07:00
Andi Kleen
fa47dd0ba3 [PATCH] x86_64: Fix compilation with CONFIG_PCI=n / allnoconfig
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:51 -07:00
Arjan van de Ven
946f2ee5c7 [PATCH] i386/x86-64: Check that MCFG points to an e820 reserved area
This patch introduces a user for the e820_all_mapped function:

There have been several machines that don't have a working MMCONFIG,
often because of a buggy MCFG table in the ACPI bios.  This patch adds a
simple sanity check that detects a whole bunch of these cases, and when
it detects it, linux now boots rather than crash-and-burns.

The accuracy of this detection can in principle be improved if there was
a "is this entire range in e820 with THIS attribute", but no such
function exist and the complexity needed for this is not really worth
it; this simple check already catches most cases anyway.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:51 -07:00
Arjan van de Ven
952223683e [PATCH] x86_64: Introduce e820_all_mapped
Introduce a e820_all_mapped() function which checks if the entire range
<start,end> is mapped with type.

This is done by moving the local start variable to the end of each
known-good region; if at the end of the function the start address is
still before end, there must be a part that's not of the correct type;
otherwise it's a good region.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:50 -07:00
Arjan van de Ven
eee5a9fa63 [PATCH] x86_64: Rename e820_mapped to e820_any_mapped
Rename e820_mapped to e820_any_mapped since it tests if any part of the
range is mapped according to the type.

Later steps will introduce e820_all_mapped which will check if the
entire range is mapped with the type.  Both have their merit.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:17 -07:00
Andi Kleen
a8062231d8 [PATCH] x86_64: Handle empty PXMs that only contain hotplug memory
The node setup code would try to allocate the node metadata in the node
itself, but that fails if there is no memory in there.

This can happen with memory hotplug when the hotplug area defines an so
far empty node.

Now use bootmem to try to allocate the mem_map in other nodes.

And if it fails don't panic, but just ignore the node.

To make this work I added a new __alloc_bootmem_nopanic function that
does what its name implies.

TBD should try to use nearby nodes here.  Currently we just use any.
It's hard to do it better because bootmem doesn't have proper fallback
lists yet.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:16 -07:00
Andi Kleen
68a3a7feb0 [PATCH] x86_64: Reserve SRAT hotadd memory on x86-64
From: Keith Mannthey, Andi Kleen

Implement memory hotadd without sparsemem. The memory in the SRAT
hotadd area is just preserved instead and can be activated later.

There are a few restrictions:
- Only one continuous hotadd area allowed per node

The main problem is dealing with the many buggy SRAT tables
that are out there. The strategy here is to reject anything
suspicious.

Originally from Keith Mannthey, with several hacks and changes by AK
and also contributions from Andrew Morton

[ TBD: Problems pointed out by KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>:

 1) Goto's rebuild_zonelist patch will not work if CONFIG_MEMORY_HOTPLUG=n.

    Rebuilding zonelist is necessary when the system has just memory <
    4G at boot, and hot add memory > 4G.  because x86_64 has DMA32,
    ZONE_NORAML is not included into zonelist at boot time if system
    doesn't have memory >4G at boot.

    [AK: should just force the higher zones at boot time when SRAT tells us]

 2) zone and node's spanned_pages and present_pages are not incremented.
    They should be.

    For example, our server (ia64/Fujitsu PrimeQuest) can equip memory
    from 4G to 1T(maybe 2T in future), and SRAT will *always* say we have
    possible 1T +memory.  (Microsoft requires "write all possible memory
    in SRAT") When we reserve memmap for possible 1T memory, Linux will
    not work well in +minimum 4G configuraion ;)

    [AK: needs limiting to 5-10% of max memory]
 ]

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:16 -07:00
Andi Kleen
9d99aaa31f [PATCH] x86_64: Support memory hotadd without sparsemem
Memory hotadd doesn't need SPARSEMEM, but can be handled by just preallocating
mem_maps. This only needs some untangling of ifdefs to enable the necessary
code even without SPARSEMEM.

Originally from Keith Mannthey, hacked by AK.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:16 -07:00
Andi Kleen
805e8c03c9 [PATCH] x86_64: Clean up execve path
Just call IRET always, no need for any special cases.

Needed for the next bug fix.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:16 -07:00
Andi Kleen
903fcc608e [PATCH] x86_64: Update defconfig
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-09 11:53:16 -07:00
Russell King
c5b8ef62b5 [ARM] Allow decompressor to be built with -ffunction-sections
Arrange for all the text ends up in the right place when
-ffunction-sections is used.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-09 19:08:42 +01:00
Christoph Lameter
0ffe984917 [IA64] Prefetch mmap_sem in ia64_do_page_fault()
Take a hint from an x86_64 optimization by Arjan van de Ven and use it
for ia64.  See a9ba9a3b38

Prefetch the mmap_sem, which is critical for the performance of the page fault
handler.

Note: mm may be NULL but I guess that is safe.
See 458f935527

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-04-07 23:08:16 -07:00
Keith Owens
8cab7ccccb [IA64] Failure to resume after INIT in user space
The OS INIT handler is loading incorrect values into cr.ifa on exit.
This shows up as a hang when resuming after an INIT that is delivered
while a cpu is in user space.  Correct the value loaded into cr.ifa.

Signed-off-by: Keith Owens <kaos@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-04-07 23:01:32 -07:00
Keith Owens
958b166c00 [IA64] Pass more data to the MCA/INIT notify_die hooks
The MCA/INIT handlers maintain important state in the SAL to OS (sos)
area and in the monarch_cpu flag.  Kernel debuggers (such as KDB) need
this data, and may need to adjust the monarch_cpu field so make the
data available to the notify_die hooks.  Define two more events for
calling the functions on the notify_die chain.

Signed-off-by: Keith Owens <kaos@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-04-07 22:51:51 -07:00