- 13 Mar, 2005 40 commits
-
-
Jan Kara authored
Allow admin to enable only some of the Magic-Sysrq functions. This allows admin to disable sysrq functions he considers dangerous (e.g. sending kill signal, remounting fs RO) while keeping the possibility to use the others (e.g. debug deadlocks by dumps of processes etc.). Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Stefan Seyfried authored
In platform swsusp mode, we were forgetting to spin disks down, leading to ugly emergency shutdown. This synchronizes platform method with other methods and actually helps. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Pavel Machek authored
From: <mjg59@scrf.ucam.org> When using a fully modularized kernel it is necessary to activate resume manually as the device node might not be available during kernel init. This patch implements a new sysfs attribute '/sys/power/resume' which allows for manual activation of software resume. When read from it prints the configured resume device in 'major:minor' format. When written to it expects a device in 'major:minor' format. This device is then checked for a suspended image and resume is started if a valid image is found. The original functionality is left in place. It should be used from initramfs, or with care. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Pavel Machek authored
This patch contains the necessary changes to the assembly routines etc. for ppc. It depends on the main resume part. It's a Hu Gang's patch. From: Hu Gang <hugang@soulinfo.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Pavel Machek authored
The following patch is designed to fix a problem in the current implementation of swsusp in mainline kernels. Namely, swsusp uses an array of page backup entries (aka pagedir) to store pointers to memory pages that must be saved during suspend and restored during resume. Unfortunately, the pagedir has to be located in a contiguous chunk of memory and it sometimes turns out that an 8-order or even 9-order allocation is needed for this purpose. It sometimes is impossible to get such an allocation and swsusp may fail during either suspend or resume due to the lack of memory, although theoretically there is enough free memory for it to succeed. Moreover, swsusp is more likely to fail for this reason during resume, which means that it may fail during resume after a successful suspend (this actually has happened for some people, including me :-)) and this, potentially, may lead to the loss of data. The problem is fixed by replacing the pagedir with a linklist so that high-order memory allocations are avoided (the patches make swsusp use only 0-order allocations). Unfortunately this means that it's necessary to change assembly routines used to restore the image after it's been loaded from swap so that they walk the list instead of walking the array. This patch makes swsusp allocate only individual pages during resume. it contains the necessary changes to the assembly routines etc. for i386 and x86-64. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Mike Kravetz authored
When I booted my new 720 on a kernel configured for NUMA, I received the following during bootup: WARNING: Unexpected node layout: region start 44000000 length 2000000 NUMA is disabled This is due to memory 'holes' within nodes. If such holes are encountered, then NUMA is disabled. The following patch adds support for such configurations. This patch gets the cell sizes before extracting the cells. I have made this change to existing code in the file, as well as the code I added. Signed-off-by: Mike Kravetz <kravetz@us.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Kumar Gala authored
Removed the Special purpose register (SPR) short-hand defines to help with name space pollution. All SPRs are now referenced as SPRN_<foo>. Signed-off-by: Kumar Gala <kumar.gala@freescale.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Kumar Gala authored
Some Book-E implementations (e500) do not implement the userland load/store string instructions. Apparently these instructions are rather painful to implement do to the fact that they modify the destination register differently then ever other instruction. Matt did the inital work some time ago, and I finally got around to cleaning it up. Signed-off-by: Matt McClintock Signed-off-by: Kumar Gala <kumar.gala@freescale.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Mark A. Greer authored
- Set up mtd partition from arch-specific platform file and remove obsoleted mtd map. - Update default config file (now enables embedded ethernet driver). - Make some minor fixups. - General code cleanup. Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Roland McGrath authored
We're currently not including sysv shared memory segments in coredumps. This patch intends to include any shared mapping whose target file has zero links. That covers sysv shm and MAP_ANON|MAP_SHARED mmap's (which I think are only ever useful if you want to share pages with a fork'd child). I think it also covers a regular file that was unlinked but is still mmap'd. It doesn't cover mapping of a tmpfs file like /dev/shm/foo, but those are still available to be seen after your program crashes, until reboot. Note that this still omits plenty of cases that the old code would include, such as all writable shared mappings of regular files. It also will include some arcane cases the old one wouldn't, like a read-only shared mapping of an unlinked file; that comes up e.g., for the text segment of a shared library or executable that was removed/renamed-over while still in use. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Dave Hansen authored
So, this patch started out with me trying to keep from passing contiguous, node-specific mem_map into free_area_init_node() and cousins. Instead, I relied on some calls to pfn_to_page(). This works fine and dandy when all you need is the pgdat->node_mem_map to do pfn_to_page(). However, the non-NUMA/DISCONTIG architectures use the real, global mem_map[] instead of a node_mem_map in the pfn_to_page() calculation. So, I ended up effectively trying to initialize mem_map from itself, when it was NULL. That was bad, and caused some very pretty colors on someone's screen when he tested it. So, I had to make sure to initialize the global mem_map[] before calling into free_area_init_node(). Then, I realized how many architectures do this on their own, and have comments like this: /* XXX: MRB-remove - this doesn't seem sane, should this be done somewhere else ?*/ mem_map = NODE_DATA(0)->node_mem_map; The following patch does what my first one did (don't pass mem_map into the init functions), incorporates Jesse Barnes' ia64 fixes on top of that, and gets rid of all but one of the global mem_map initializations (parisc is weird). It also magically removes more code than it adds. It could be smaller, but I shamelessly added some comments. Boot-tested on ppc64, i386 (NUMAQ, plain SMP, laptop), UML (i386). Signed-off-by: Dave Hansen <haveblue@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Oleg Nesterov authored
This patch assumes that there is no valid usage of vmalloced_or_vmaped_page->lru. In such a case vm_struct->array could be eliminated. It saves some memory and simplifies code a bit. In vmap/vunmap case vm_struct->page_list is used only in map_vm_area(), so it is ok to do: addr1 = vmap(pages, count); addr2 = vmap(pages, count); ... vunmap(addr1); vunmap(addr2); Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Oleg Nesterov authored
Replace open coded __vmalloc() with __vmalloc_area(). Uncompiled, untested. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: Andi Kleen <ak@muc.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Oleg Nesterov authored
Replace open coded __vmalloc() with __vmalloc_area(). Uncompiled, untested. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Oleg Nesterov authored
Replace open coded __vmalloc() with __vmalloc_area(). Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Oleg Nesterov authored
There are 3 copy-and-paste implementations of __vmalloc() in arch/{arm,sparc64,x86_64}/kernel/module.c. I believe the only reason is that __vmalloc() doesn't allow to specify parameters of __get_vm_area(). This patch splits __vmalloc() into 2 functions. The new one, __vmalloc_area(), can be used as follows: vm_struct *area = __get_vm_area(...); void *addr = __vmalloc_area(area, gfp, prot); Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hugh Dickins authored
Nick Piggin's patch to fold away most of the pud and pmd levels when not required. Adjusted to define minimal pud_addr_end (in the 4LEVEL_HACK case too) and pmd_addr_end. Responsible for half of the savings. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hugh Dickins authored
As a general rule, ask the compiler to inline action_on_pmd_range and action_on_pud_range: they're none very interesting, and it has a better chance of eliding them that way. But conversely, it helps debug traces if action_on_pte_range and top action_on_page_range remain uninlined. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hugh Dickins authored
To handle large sparse areas a little more efficiently, follow Nick and move the p?d_none_or_clear_bad tests up from the start of each function to its callsite. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hugh Dickins authored
Convert clear_page_range pagetable walkers to loops using p?d_addr_end. These are exceptional in that some out-of-tree memory layouts might pass end 0, so the macros need to handle that (though previous code did not). The naming here was out of step: now we usually pass pmd_t *pmd down to action_on_pte_range, not action_on_pmd_range, etc: made like the others. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hugh Dickins authored
This patch is the odd-one-out of the sequence. The one before adjusted copy_pte_range from a for loop to a do while loop, and it was therefore simplest to check for lockbreak before copying pte: possibility that it might keep getting preempted without making progress under some loads. Some loads such as startup: 2*HT*P4 with preemption cannot even reach multiuser login. Suspect needs_lockbreak is broken, can get in a state when it remains forever true. Investigate that later: for now, and for all time, it makes sense to aim for a little progress before breaking out; and we can manage more pte_nones than copies. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hugh Dickins authored
Convert copy_page_range pagetable walkers to loops using p?d_addr_end. Merge copy_swap_pte into copy_one_pte, make a few minor tidyups. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hugh Dickins authored
Convert unmap_page_range pagetable walkers to loops using p?d_addr_end. Move blanking of irrelevant details up to unmap_page_range as Nick did. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hugh Dickins authored
Convert zeromap_page_range pagetable walkers to loops using p?d_addr_end. Remove the redundant flush_tlb_range from afterwards: as its comment noted, there's already a BUG_ON(!pte_none). Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hugh Dickins authored
Convert remap_pfn_range pagetable walkers to loops using p?d_addr_end. Remove the redundant flush_tlb_range from afterwards: as its comment noted, there's already a BUG_ON(!pte_none). Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hugh Dickins authored
Convert i386 ioremap pagetable walkers to loops using p?d_addr_end. Rename internal levels ioremap_p??_range. Don't cheat, give it a real (but inlined) ioremap_pud_range; uninline lowest level to help debug. Replace "page already exists" printk and BUG by BUG_ON. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hugh Dickins authored
Convert unmap_vm_area and map_vm_area pagetable walkers to loops using p?d_addr_end; rename internal levels vunmap_p??_range, vmap_p??_range. map_vm_area shows the style when allocating: allocs moved down a level. Replace KERN_CRIT Whee message by boring WARN_ON. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hugh Dickins authored
Convert unuse_process pagetable walkers to loops using p?d_addr_end; but correct its name to unuse_mm, rename its levels to _range as elsewhere. Leave unuse_pte out-of-line since it's so rarely called; but move the funny activate_page inside it. foundaddr was a leftover from before: we still want to break out once page is found, but no need to pass addr up. And we need not comment on the page_table_lock at every level. Whereas most objects shrink ~200 bytes text, swapfile.o grows slightly: it had earlier been converted to the addr,end style to fix a 4level bug. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hugh Dickins authored
Convert filemap_sync pagetable walkers to loops using p?d_addr_end; use similar loop to split filemap_sync into chunks. Merge filemap_sync_pte into sync_pte_range, cut filemap_ off the longer names, vma arg first. There is no error from filemap_sync, nor is any use made of the flags: if it should do something else for MS_INVALIDATE, reinstate it when that is implemented. Remove the redundant flush_tlb_range from afterwards: as its comment noted, each dirty pte has already been flushed. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hugh Dickins authored
Begin the pagetable walker cleanup with a straightforward example, mprotect's change_protection. Started out from Nick Piggin's for_each proposal, but I prefer less hidden; and these are all do while loops, which degrade slightly when converted to for loops. Firmly agree with Andi and Nick that addr,end is the way to go: size is good at the user interface level, but unhelpful down in the loops. And the habit of an "address" which is actually an offset from some base has bitten us several times: use proper address at each level, whyever not? Don't apply each mask at two levels: all we need is a set of macros pgd_addr_end, pud_addr_end, pmd_addr_end to give the address of the end of each range. Which need to take the min of two addresses, with 0 as the greatest. Started out with a different macro, assumed end never 0; but clear_page_range (alone) might be passed end 0 by some out-of-tree memory layouts: could special case it, but this macro compiles smaller. Check "addr != end" instead of "addr < end" to work on that end 0 case. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Andrew Morton authored
pgtable.h now need pud_t. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hugh Dickins authored
Replace the repetitive p?d_none, p?d_bad, p?d_ERROR, p?d_clear clauses by pgd_none_or_clear_bad, pud_none_or_clear_bad, pmd_none_or_clear_bad inlines throughout common and i386 - avoids a sprinkling of "unlikely"s. Tests inline, but unlikely error handling in mm/memory.c - so the ERROR file and line won't tell much; but it comes too late anyway, and hardly ever seen outside development. Let mremap use them in get_one_pte_map, as it already did in _nested; but leave follow_page and untouched_anonymous page just skipping _bad as before - they don't have quite the same ownership of the mm. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Chris Wright authored
Successive mlock/munlock calls can leave fragmented vmas because they can be split but not merged. Give mlock et. al. full vma merging support. While we're at it, move *pprev assignment above first split_vma in mprotect_fixup to keep it in step with mlock_fixup (which for mlockall ignores errors yet still needs a valid prev pointer). Signed-off-by: Chris Wright <chrisw@osdl.org> Acked-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Jes Sorensen authored
Convert /dev/mem read/write calls to use arch_translate_mem_ptr if available. Needed on ia64 for pages converted fo uncached mappings to avoid it being accessed in cached mode after the conversion which can lead to memory corruption. Introduces PG_uncached page flag for marking pages uncached. Also folds do_write_mem into write_mem as it was it's only user. Use __ARCH_HAS_NO_PAGE_ZERO_MAPPED for architectures to indicate they require magic handling of the zero page (Sparc and m68k). Signed-off-by: Jes Sorensen <jes@wildopensource.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Chris Mason authored
In data=journal mode, when blocks are freed and their buffers are dirty, reiserfs can remove them from the transaction without cleaning them. These buffers never get cleaned, resulting in an unfreeable page. Signed-off-by: Chris Mason <mason@suse.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Andrea Arcangeli authored
Chris found that with data journaling a reiserfs pagecache may be truncate while still pinned. The truncation removes the page->mapping, but the page is still listed in the VM queues because it still has buffers. Then during the journaling process, a buffer is marked dirty and that sets the PG_dirty bitflag as well (in mark_buffer_dirty). After that the page is leaked because it's both dirty and without a mapping. So we must allow pages without mapping and dirty to reach the PagePrivate check. The page->mapping will be checked again right after the PagePrivate check. Signed-off-by: Andrea Arcangeli <andrea@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Dave Hansen authored
There is a bug booting with CONFIG_NUMA=y, CONFIG_X86_GENERICARCH=y, and booting on a non-NUMA system. While not the most common configuration, it should surely be supported. memmap_init_zone() is the first user to do pfn_to_nid(), which relies on physnode_map[] to be done properly. memory_present() was supposed to do that, but never got called for the flat configuration, so pfn_to_nid() was returning -1 on valid pages. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Adrian Bunk authored
drivers/video/intelfb/intelfbdrv.h:31: warning: 'intelfb_setup' declared `static' but never defined Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Adrian Bunk authored
drivers/mtd/maps/ich2rom.c is completely unused because it was renamed to drivers/mtd/maps/ichxrom.c. This patch removes the stale ich2rom.c file. This patch was already ACK'ed by David Woodhouse and Eric W. Biederman. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Prasanna Meda authored
dcache: is_subdir forgot to reset the result after seqretry. Signed-Off-by: Prasanna Meda <pmeda@akamai.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-