Commit Graph

25655 Commits (cbb7e577e732f576b9f399bc2600bdc0626c68dc)

Author SHA1 Message Date
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
Bjorn Helgaas 2db8d99ffd [IA64] always map VGA framebuffer UC, even if it supports WB
EFI on some machines, e.g., Intel Tiger, reports that the VGA framebuffer
supports WB access.  ioremap() prefers WB when possible, so it can work
when mapping main memory.

But it doesn't make sense to map a framebuffer WB, because the driver
doesn't flush explicitly, so updates won't make it to the device
immediately.

This is due to Zou Nan hai <nanhai.zou@intel.com>.

More extensive fix that adds a "size" argument coming soon.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-04-07 22:47:12 -07:00
Chen, Kenneth W cfab9d0e1d [IA64] fix bug in ia64 __mutex_fastpath_trylock
The parenthesis around "likely" used in ia64 __mutex_fastpath_trylock
is incorrect, and it leads to broken mutex_trylock.  Here is the
patch that fixed the bug.  I removed the likely altogether because
there is no branch and gcc does a reasonable job at predicating the
return value.

Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-04-07 22:39:49 -07:00
Mark Fasheh a9e2ae3917 ocfs2: Better I/O error handling in heartbeat
Propagate errors received in o2hb_bio_end_io() back to the heartbeat thread
so it can skip re-arming the timer.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-04-07 18:03:09 -07:00
Mark Fasheh 2cd9888590 ocfs2: test and set teardown flag early in user_dlm_destroy_lock()
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-04-07 17:39:43 -07:00
Mark Fasheh f43e6918c0 ocfs2: Handle the DLM_CANCELGRANT case in user_unlock_ast()
Remove the code which attempted to catch it via dlmunlock() return status -
this never happens there.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-04-07 17:37:52 -07:00
Mark Fasheh cc6eb72595 ocfs2: catch an invalid ast case in dlmfs
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-04-07 17:36:16 -07:00
Mark Fasheh 1f7bc828e3 ocfs2: remove an overly aggressive BUG() in dlmfs
Don't BUG() user_dlm_unblock_lock() on the absence of the USER_LOCK_BLOCKED
flag - this turns out to be a valid case. Make some of the related BUG()
statements print more useful information.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-04-07 17:27:43 -07:00
Mark Fasheh ab0920ce7e ocfs2: multi node truncate fix
Fix ocfs2_truncate_file() so that it forces a truncate_inode_pages() on all
interested nodes in all cases of a truncate(), not just allocation change.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-04-07 16:47:24 -07:00
Russell King 95f3df6bcb [ARM] Fix SA110/SA1100 cache flushing
We had two implementations for flushing the cache, which meant StrongARM
caches weren't being correctly flushed.  Fix this by always using the
v4wb_flush_kern_cache_all method, rather than duplicating it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-07 13:23:57 +01:00
Russell King f1dc24d53e [ARM] ebsa110: Fix incorrect serial port address
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-07 13:23:48 +01:00
Russell King 6e29ebad0f [ARM] Fix ebsa110 debug macros
Was including debug-8250.h rather than debug-8250.S

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-07 13:23:37 +01:00
Russell King 74d02fb954 [ARM] Move FLUSH_BASE macros to asm/arch/memory.h
FLUSH_BASE must be visible to arch/arm/mm/init.c in order for the
memory region to be setup.  Move these definitions from
asm-arm/arch-*/hardware.h into asm-arm/arch-*/memory.h where mm
stuff can see them.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-07 13:22:21 +01:00
Sam Ravnborg d9df92e22a kbuild: properly pass options to hostcc when doing make O=..
This fix a longstanding bug where proper options was not
passed to hostcc in case of a make O=.. build.
This bug showed up in (not yet merged) klibc, and is not known
to have any counterpart in-kernel.
Fixed by moving the flags macro to Kbuild.include so it can be used
by both Makefile.lib and Makefile.host.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-04-07 08:36:49 +02:00
KAMEZAWA Hiroyuki 0681226661 [IA64] for_each_possible_cpu: ia64
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 under
arch/ia64/kernel/.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fjitsu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-04-06 15:03:49 -07:00
Bjorn Helgaas 03fbaca36a [IA64] update HP CSR space discovery via ACPI
Get rid of the manual search of _CRS, in favor of
acpi_get_vendor_resource() which is now provided by the ACPI CA.  And fall
back to searching for a consumer-only address space descriptor if no
vendor-defined resource is found.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-04-06 14:42:38 -07:00
Tony Luck b8cd2af862 [IA64] Wire up new syscalls {set,get}_robust_list
Join the dots to enable Ingo's robut futex syscalls.

Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-04-06 14:20:16 -07:00
Andreas Gruenbacher 7d2d8fe0cb kbuild: modules_install for external modules must not remove existing modules
When installing external modules with `make modules_install', the
first thing that happens is a rm -rf of the target directory. This
works only once, and breaks when installing more than one (set of)
external module(s).
With following fix we have the functionality:
- for a in-kernel modules_install the $(MODLIB)/kernel directory will be
  deleted before module installation
- for external modules the existing modules will be left as is assuming
  one may be building and installign several external modules

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-04-06 08:42:17 +02:00
Sam Ravnborg aa360879ed kbuild: fix make dir/
kbuild added an extra '/' after the directory - resulting in all
files being rebuild in a subdirectory.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-04-06 08:25:31 +02:00
Alexey Dobriyan ea88df9bf8 ver_linux: don't print reiser4progs version if none found
Sam: did the same for reiserprogs

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-04-05 13:10:19 +02:00
Atsushi Nemoto 0947640f43 kbuild: mips: fix sed regexp to generate asm-offset.h
Changes to Makefile.kbuild ("kbuild: add -fverbose-asm to i386
Makefile") breaks asm-offset.h file on MIPS.  Other archs possibly
suffer this change too but I'm not sure.

Here is a fix just for MIPS.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-04-05 12:59:36 +02:00
Sam Ravnborg bc2546a679 kbuild: fix building single targets with make O=.. single-target
This fixes single targets build so it now works relaiably in
following cases:
- build with mixed kernel source and output files (make single-target)
- build with separate output directory (make O=.. single-target)
- external module with mixed kernel source and output files
  (make M='pwd' single-target)
- external module with separate kernel source and output files
  (make O=.. M='pwd' single-target)

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-04-05 12:57:21 +02:00
Tony Luck 27f4aa3db0 [IA64] 'msg' may be used uninitialized in xpc_initiate_allocate()
Found by gcc4.1 and reported by Dean Nelson.

Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-04-04 14:11:49 -07:00
Tony Luck d905b00b3b [IA64] Wire up new syscall sync_file_range()
Also reserve syscall numbers for {set,get}_robust_list

Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-04-04 14:08:11 -07:00
Russell King 7d12963757 [ARM] Remove unnecessary extra parens in include/asm-arm/memory.h
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-04 16:25:47 +01:00
KAMEZAWA Hiroyuki 0da323505f [ARM] arm's arch_local_page_offset() fix against 2.6.17-rc1
This patch fixes arch_local_page_offset(pfn,nid) in arm.
This new one (added by unify_pfn_to_page patches) is obviously buggy.

This macro calculate page offset in a node.

Note: about LOCAL_MAP_NR()
comment in arm's sub-archs says...

 /*
  * Given a kaddr, LOCAL_MAP_NR finds the owning node of the memory
  * and returns the index corresponding to the appropriate page in the
  * node's mem_map.
  */

but LOCAL_MAP_NR() is designed to be able to take both paddr and kaddr.
In this case, paddr is better.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitu.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-04-04 16:06:00 +01:00
Sam Ravnborg b46da0567d kbuild: use relative path to -I
Using a relative path has the advantage that when the kernel source
tree is moved the relevant .o files will not be rebuild just because
the path to the kernel src has changed.
This also got rid of a user of TOPDIR - which has been deprecated for a long time now.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-04-04 16:56:10 +02:00
Carl-Daniel Hailfinger 1417ae0869 kbuild: fix unneeded rebuilds in drivers/net/chelsio after moving source tree
This fixes some uneeded rebuilds under drivers/net/chelsio after moving
the source tree. The makefiles used $(TOPDIR) for include paths, which
is unnecessary. Changed to use relative paths.

Compile tested, produces byte-identical code to the previous makefiles.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-04-04 16:51:41 +02:00
Carl-Daniel Hailfinger 8036dc6bdc kbuild: fix unneeded rebuilds in drivers/media/video after moving source tree
This fixes some uneeded rebuilds under drivers/media/video after moving
the source tree. The makefiles used $(src) and $(srctree) for include
paths, which is unnecessary. Changed to use relative paths.

Compile tested, produces byte-identical code to the previous makefiles.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-04-04 16:50:50 +02:00
Brian Gerst a7d7cb3cd6 kbuild: fix garbled text in modules.txt
Signed-off-by: Brian Gerst <bgerst@didntduck.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-04-04 15:28:21 +02:00
Linus Torvalds 6246b6128b Linux v2.6.17-rc1
Close of the merge window..
2006-04-02 20:22:10 -07:00
Linus Torvalds 6fdb94bd95 Update dummy snd_power_wait() function for new calling convention
Apparently nobody had tried to compile the ALSA CVS tree without power
management enabled.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-02 14:37:36 -07:00
Linus Torvalds d69636157a Merge branch 'splice' of git://brick.kernel.dk/data/git/linux-2.6-block
* 'splice' of git://brick.kernel.dk/data/git/linux-2.6-block:
  [PATCH] splice: fix page stealing LRU handling.
  [PATCH] splice: page stealing needs to wait_on_page_writeback()
  [PATCH] splice: export generic_splice_sendpage
  [PATCH] splice: add a SPLICE_F_MORE flag
  [PATCH] splice: add comments documenting more of the code
  [PATCH] splice: improve writeback and clean up page stealing
  [PATCH] splice: fix shadow[] filling logic
2006-04-02 14:22:06 -07:00
Jens Axboe 3e7ee3e7b3 [PATCH] splice: fix page stealing LRU handling.
Originally from Nick Piggin, just adapted to the newer branch.

You can't check PageLRU without holding zone->lru_lock.  The page
release code can get away with it only because the page refcount is 0 at
that point. Also, you can't reliably remove pages from the LRU unless
the refcount is 0. Ever.

Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Jens Axboe <axboe@suse.de>
2006-04-02 23:11:04 +02:00
Jens Axboe ad8d6f0a78 [PATCH] splice: page stealing needs to wait_on_page_writeback()
Thanks to Andrew for the good explanation of why this is so. akpm writes:

If a page is under writeback and we remove it from pagecache, it's still
going to get written to disk.  But the VFS no longer knows about that page,
nor that this page is about to modify disk blocks.

So there might be scenarios in which those
blocks-which-are-about-to-be-written-to get reused for something else.
When writeback completes, it'll scribble on those blocks.

This won't happen in ext2/ext3-style filesystems in normal mode because the
page has buffers and try_to_release_page() will fail.

But ext2 in nobh mode doesn't attach buffers at all - it just sticks the
page in a BIO, finds some new blocks, points the BIO at those blocks and
lets it rip.

While that write IO's in flight, someone could truncate the file.  Truncate
won't block on the writeout because the page isn't in pagecache any more.
So truncate will the free the blocks from the file under the page's feet.
Then something else can reallocate those blocks.  Then write data to them.

Now, the original write completes, corrupting the filesystem.

Signed-off-by: Jens Axboe <axboe@suse.de>
2006-04-02 23:10:32 +02:00
Jens Axboe 059a8f3734 [PATCH] splice: export generic_splice_sendpage
Forgot that one, thanks Jeff. Also move the other EXPORT_SYMBOL
to right below the functions.

Signed-off-by: Jens Axboe <axboe@suse.de>
2006-04-02 23:06:05 +02:00
Jens Axboe b2b39fa478 [PATCH] splice: add a SPLICE_F_MORE flag
This lets userspace indicate whether more data will be coming in a
subsequent splice call.

Signed-off-by: Jens Axboe <axboe@suse.de>
2006-04-02 23:05:41 +02:00
Jens Axboe 83f9135bdd [PATCH] splice: add comments documenting more of the code
Hopefully this will make Andrew a little more happy.

Signed-off-by: Jens Axboe <axboe@suse.de>
2006-04-02 23:05:09 +02:00
Jens Axboe 4f6f0bd2ff [PATCH] splice: improve writeback and clean up page stealing
By cleaning up the writeback logic (killing write_one_page() and the manual
set_page_dirty()), we can get rid of ->stolen inside the pipe_buffer and
just keep it local in pipe_to_file().

This also adds dirty page balancing logic and O_SYNC handling.

Signed-off-by: Jens Axboe <axboe@suse.de>
2006-04-02 23:04:46 +02:00
Jens Axboe 53cd9ae886 [PATCH] splice: fix shadow[] filling logic
Clear the entire range, and don't increment pidx or we keep filling
the same position again and again.

Thanks to KAMEZAWA Hiroyuki.

Signed-off-by: Jens Axboe <axboe@suse.de>
2006-04-02 23:04:21 +02:00
Linus Torvalds 1810b6cb16 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: (27 commits)
  [ARM] 3433/1: ARM: OMAP: 8/8 Update board files
  [ARM] 3455/1: ARM: OMAP: 7/8 Misc updates, take 2
  [ARM] 3454/1: ARM: OMAP: 6/8 Update framebuffer low-level init code, take 2
  [ARM] 3430/1: ARM: OMAP: 5/8 Update PM
  [ARM] 3429/1: ARM: OMAP: 4/8 Update GPIO
  [ARM] 3428/1: ARM: OMAP: 3/8 Update pin multiplexing
  [ARM] 3427/1: ARM: OMAP: 2/8 Update timers
  [ARM] 3426/1: ARM: OMAP: 1/8 Update clock framework
  [ARM] 3396/2: AT91RM9200 Platform devices update
  [ARM] 3395/2: AT91RM9200 Dataflash Card vs MMC selection
  [ARM] 3393/2: AT91RM9200 LED support
  [ARM] 3453/1: Poodle: Correctly set the memory size
  [ARM] 3446/1: i.MX: MMC/SD SDHC controller registration for i.MX/MX1 MX1ADS board
  [ARM] 3444/1: i.MX: Scatter-gather DMA emulation for i.MX/MX1
  [ARM] 3451/1: ep93xx: use the m48t86 rtc driver on the ts72xx platform
  [ARM] 3450/1: ep93xx: use the ep93xx rtc driver
  [ARM] 3452/1: [S3C2410] RX3715 - add nand information
  [ARM] 3449/1: [S3C2410] Anubis - fix NAND timings
  [ARM] 3448/1: [S3C2410] Settle delay when _enabling_ USB PLL
  [ARM] 3442/1: [S3C2410] SMDK: NAND device setup
  ...
2006-04-02 13:34:00 -07:00
Linus Torvalds ef7a4567dc Merge master.kernel.org:/home/rmk/linux-2.6-mmc
* master.kernel.org:/home/rmk/linux-2.6-mmc:
  [ARM] 3457/1: i.MX: SD/MMC support for i.MX/MX1
  [ARM] 3456/1: AT91RM9200 support for 2.6 (MMC/SD driver)
2006-04-02 13:32:55 -07:00