summaryrefslogtreecommitdiff
path: root/include/linux/highmem.h
AgeCommit message (Collapse)Author
2006-03-26[PATCH] Add flush_kernel_dcache_page() APIJames Bottomley
We have a problem in a lot of emulated storage in that it takes a page from get_user_pages() and does something like kmap_atomic(page) modify page kunmap_atomic(page) However, nothing has flushed the kernel cache view of the page before the kunmap. We need a lightweight API to do this, so this new API would specifically be for flushing the kernel cache view of a user page which the kernel has modified. The driver would need to add flush_kernel_dcache_page(page) before the final kunmap. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-26[PATCH] Add API for flushing Anon pagesJames Bottomley
Currently, get_user_pages() returns fully coherent pages to the kernel for anything other than anonymous pages. This is a problem for things like fuse and the SCSI generic ioctl SG_IO which can potentially wish to do DMA to anonymous pages passed in by users. The fix is to add a new memory management API: flush_anon_page() which is used in get_user_pages() to make anonymous pages coherent. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-25[PATCH] kdump: Routines for copying dump pagesVivek Goyal
This patch provides the interfaces necessary to read the dump contents, treating it as a high memory device. Signed off by Hariprasad Nellitheertha <hari@in.ibm.com> Signed-off-by: Eric Biederman <ebiederm@xmission.com> Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-02-08[PATCH] Fix oops in alloc_zeroed_user_highpage() when page is NULLMichael Ellerman
The generic and IA-64 versions of alloc_zeroed_user_highpage() don't check the return value from alloc_page_vma(). This can lead to an oops if we're OOM. This fixes my oops on PPC64, but I haven't got an IA-64 machine/compiler handy. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-02-01[PATCH] alloc_zeroed_user_highpage() to fix the clear_user_highpage issueChristoph Lameter
This patch adds a new function alloc_zeroed_user_highpage that is then used in the anonymous page fault handler and in the COW code to allocate zeroed pages. The function can be defined per arch to setup special processing for user pages by defining __HAVE_ARCH_ALLOC_ZEROED_USER_PAGE. For arches that do not need to do special things for user pages, alloc_zeroed_user_highpage is defined to simply do alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO, vma, vaddr) This patch needs to update a number of archs. Wish there was a better way to do this. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-01-03[PATCH] kill off highmem_start_pageDave Hansen
People love to do comparisons with highmem_start_page. However, where CONFIG_HIGHMEM=y and there is no actual highmem, there's no real page at *highmem_start_page. That's usually not a problem, but CONFIG_NONLINEAR is a bit more strict and catches the bogus address tranlations. There are about a gillion different ways to find out of a 'struct page' is highmem or not. Why not just check page_flags? Just use PageHighMem() wherever there used to be a highmem_start_page comparison. Then, kill off highmem_start_page. This removes more code than it adds, and gets rid of some nasty #ifdefs in .c files. 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>
2004-10-13Fix threaded user page write memory orderingLinus Torvalds
Make sure we order the writes to a newly created page with the page table update that potentially exposes the page to another CPU. This is a no-op on any architecture where getting the page table spinlock will already do the ordering (notably x86), but other architectures can care.
2004-01-19[PATCH] if ... BUG() -> BUG_ON()Andrew Morton
From: Adrian Bunk <bunk@fs.tum.de> four months ago, Rolf Eike Beer <eike-kernel@sf-tec.de> sent a patch against 2.6.0-test5-bk1 that converted several if ... BUG() to BUG_ON() This might in some cases result in slightly faster code because BUG_ON() uses unlikely().
2003-06-20[PATCH] highmem.h needs mm.hAndrew Morton
From: David Mosberger <davidm@napali.hpl.hp.com> highmem.h uses stuff like page_address(), but fails to include <linux/mm.h>.
2003-06-13[PATCH] Nuke check_highmem_ptes()Benjamin Herrenschmidt
It was broken on at least ppc32 & sparc32, and the debugging it offered wasn't worth it any more anyway.
2003-04-12[PATCH] Remove flush_page_to_ram()Andrew Morton
From: Hugh Dickins <hugh@veritas.com> This patch removes the long deprecated flush_page_to_ram. We have two different schemes for doing this cache flushing stuff, the old flush_page_to_ram way and the not so old flush_dcache_page etc. way: see DaveM's Documentation/cachetlb.txt. Keeping flush_page_to_ram around is confusing, and makes it harder to get this done right. All architectures are updated, but the only ones where it amounts to more than deleting a line or two are m68k, mips, mips64 and v850. I followed a prescription from DaveM (though not to the letter), that those arches with non-nop flush_page_to_ram need to do what it did in their clear_user_page and copy_user_page and flush_dcache_page. Dave is consterned that, in the v850 nb85e case, this patch leaves its flush_dcache_page as was, uses it in clear_user_page and copy_user_page, instead of making them all flush icache as well. That may be wrong: I'm just hesitant to add cruft blindly, changing a flush_dcache macro to flush icache too; and naively hope that the necessary flush_icache calls are already in place. Miles, please let us know which way is right for v850 nb85e - thanks.
2003-03-28[PATCH] add a might_sleep() check to kmap()Andrew Morton
kmap() can sleep, but rarely does. Add a check for kmap() being called from inappropriate contexts.
2003-01-05[PATCH] misc fixesAndrew Morton
- fix starfire.c printk compile warning (dma_addr_t can be 64 bit) (Martin Bligh) - Remove an ifdef from the scheduler
2002-10-29[PATCH] tmpfs: support loopbackAndrew Morton
Patch from Hugh Dickins Added shmem_readpage and shmem_prepare_write so tmpfs files can be used by the loop driver (together with simple_commit_write). shmem_getpage extended to accept file page passed in, which may have to be copied over from swap page. Use bdget and sb_set_blocksize so loop can see our preferred blocksize PAGE_CACHE_SIZE. Use copy_highpage, removed from highmem.h in 2.4.17: restore it but with kmap_atomics. Restore (a simple) copy_page to asm-sparc64/page.h, which alone of all arches discarded it.
2002-09-09[PATCH] resurrect CONFIG_HIGHPTEAndrew Morton
Bill Irwin's patch to fix up pte's in highmem. With CONFIG_HIGHPTE, the direct pte pointer in struct page becomes the 64-bit physical address of the single pte which is mapping this page. If the page is not PageDirect then page->pte.chain points at a list of pte_chains, which each now contain an array of 64-bit physical addresses of the pte's which are mapping the page. The functions rmap_ptep_map() and rmap_ptep_unmap() are used for mapping and unmapping the page which backs the target pte. The patch touches all architectures (adding do-nothing compatibility macros and inlines). It generally mangles lots of header files and may break non-ia32 compiles. I've had it in testing since 2.5.31.
2002-09-07[PATCH] atomic copy_*_user infrastructureAndrew Morton
The patch implements the atomic copy_*_user() function. If the kernel takes a pagefault while running copy_*_user() in an atomic region, the copy_*_user() will fail (return a short value). And with this patch, holding an atomic kmap() puts the CPU into an atomic region. - Increment preempt_count() in kmap_atomic() regardless of the setting of CONFIG_PREEMPT. The pagefault handler recognises this as an atomic region and refuses to service the fault. copy_*_user will return a non-zero value. - Attempts to propagate the in_atomic() predicate to all the other highmem-capable architectures' pagefault handlers. But the code is only tested on x86. - Fixed a PPC bug in kunmap_atomic(): it forgot to reenable preemption if HIGHMEM_DEBUG is turned on. - Fixed a sparc bug in kunmap_atomic(): it forgot to reenable preemption all the time, for non-fixmap pages. - Fix an error in <linux/highmem.h> - in the CONFIG_HIGHMEM=n case, kunmap_atomic() takes an address, not a page *.
2002-08-28Avoid unused variable warning when kmap() ends up being a no-op.Linus Torvalds
2002-06-17[PATCH] take bio.h out of highmem.hAndrew Morton
highmem.h includes bio.h, so just about every compilation unit in the kernel gets to process bio.h. The patch moves the BIO-related functions out of highmem.h and into bio-related headers. The nested include is removed and all files which need to include bio.h now do so.
2002-06-17[PATCH] kmap_atomic fix in bio_copy()Andrew Morton
bio_copy is doing vfrom = kmap_atomic(bv->bv_page, KM_BIO_IRQ); vto = kmap_atomic(bbv->bv_page, KM_BIO_IRQ); which, if I understand atomic kmaps, is incorrect. Both source and dest will get the same pte. The patch creates a separate atomic kmap member for the destination and source of this copy.
2002-05-30[PATCH] pass "page" pointer to clear_user_page()/copy_user_page()David Mosberger
Hi Linus, Are you willing to change the interfaces of clear_user_page() and copy_user_page() so that they can receive the relevant page pointer as a separate argument? I need this on ia64 to implement the lazy-cache flushing scheme. I believe PPC would also benefit from this. --david
2002-05-22[PATCH] include buffer_head.h in actual users instead of fs.h (3/10)Christoph Hellwig
Remove unused bh_kmap/bh_kunmap inlines from highmem.h.
2002-03-24Break an include loop by moving cache flushing routines fromRichard Henderson
asm/pgtable.h and/or asm/pgalloc.h to asm/cacheflush.h, and tlb flushing routines to asm/tlbflush.h.
2002-03-07Remove circular header file dependencyLinus Torvalds
2002-02-21Update Alpha for Ingo's page tables in highmem patch.Richard Henderson
2002-02-19adds simple support for atomically-mapped PTEs. On highmem systems this ↵Ingo Molnar
enables the allocation of the pagetables in highmem.
2002-02-08[PATCH] includes cleanup, 2nd try.Dave Jones
Big bits first, I'll redo the smaller bits tomorrow after some sleep. Same as last time, rediffed against pre5
2002-02-05v2.5.2 -> v2.5.2.1Linus Torvalds
- Al Viro: fix up silly problem in swapfile filp cleanups in 2.5.2 - Tachino Nobuhiro: fix another error return for swapfile filp code - Robert Love: merge some of Ingo's scheduler fixes - David Miller: networking, sparc and some scsi driver fixes - Tim Waugh: parport update - OGAWA Hirofumi: fatfs cleanups and bugfixes - Roland Dreier: fix vsscanf buglets. - Ben LaHaise: include file cleanup - Andre Hedrick: IDE taskfile update
2002-02-04v2.5.0.11 -> v2.5.1Linus Torvalds
- Al Viro: floppy_eject cleanup, mount cleanups - Jens Axboe: bio updates - Ingo Molnar: mempool fixes - GOTO Masanori: Fix O_DIRECT error handling
2002-02-04v2.5.0.4 -> v2.5.0.5Linus Torvalds
- Patrick Mochel: driver model infrastructure, part 1 - Jens Axboe: more bio fixes, cleanups - Andrew Morton: release locking fixes - Al Viro: superblock/mount handling - Kai Germaschewski: AVM Fritz!Card ISDN driver - Christoph Hellwig: make cramfs SMP-safe.
2002-02-04v2.5.0.3 -> v2.5.0.4Linus Torvalds
- Jens Axboe: fix up bio highmem breakage, more cleanups - Greg KH: USB update
2002-02-04v2.5.0.1 -> v2.5.0.2Linus Torvalds
- Greg KH: USB update - Richard Gooch: refcounting for devfs - Jens Axboe: start of new block IO layer
2002-02-04v2.4.9.10 -> v2.4.9.11Linus Torvalds
- Neil Brown: md cleanups/fixes - Andrew Morton: console locking merge - Andrea Arkangeli: major VM merge
2002-02-04v2.4.9 -> v2.4.9.1Linus Torvalds
- Jeff Hartmann: DRM AGP/alpha cleanups - Ben LaHaise: highmem user pagecopy/clear optimization - Vojtech Pavlik: VIA IDE driver update - Herbert Xu: make cramfs work with HIGHMEM pages - David Fennell: awe32 ram size detection improvement - Istvan Varadi: umsdos EMD filename bug fix - Keith Owens: make min/max work for pointers too - Jan Kara: quota initialization fix - Brad Hards: Kaweth USB driver update (enable, and fix endianness) - Ralf Baechle: MIPS updates - David Gibson: airport driver update - Rogier Wolff: firestream ATM driver multi-phy support - Daniel Phillips: swap read page referenced set - avoid swap thrashing
2002-02-04v2.4.1.2 -> v2.4.1.3Linus Torvalds
- Jens: better ordering of requests when unable to merge - Neil Brown: make md work as a module again (we cannot autodetect in modules, not enough background information) - Neil Brown: raid5 SMP locking cleanups - Neil Brown: nfsd: handle Irix NFS clients named pipe behavior and dentry leak fix - maestro3 shutdown fix - fix dcache hash calculation that could cause bad hashes under certain circumstances (Dean Gaudet) - David Miller: networking and sparc updates - Jeff Garzik: include file cleanups - Andy Grover: ACPI update - Coda-fs error return fixes - rth: alpha Jensen update
2002-02-04Import changesetLinus Torvalds