| Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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.
|
|
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().
|
|
From: David Mosberger <davidm@napali.hpl.hp.com>
highmem.h uses stuff like page_address(), but fails to include
<linux/mm.h>.
|
|
It was broken on at least ppc32 & sparc32, and the debugging it
offered wasn't worth it any more anyway.
|
|
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.
|
|
kmap() can sleep, but rarely does. Add a check for kmap() being called from
inappropriate contexts.
|
|
- fix starfire.c printk compile warning (dma_addr_t can be 64 bit) (Martin
Bligh)
- Remove an ifdef from the scheduler
|
|
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.
|
|
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.
|
|
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 *.
|
|
|
|
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.
|
|
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.
|
|
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
|
|
Remove unused bh_kmap/bh_kunmap inlines from highmem.h.
|
|
asm/pgtable.h and/or asm/pgalloc.h to asm/cacheflush.h, and
tlb flushing routines to asm/tlbflush.h.
|
|
|
|
|
|
enables the allocation of the pagetables in highmem.
|
|
Big bits first, I'll redo the smaller bits tomorrow after some sleep.
Same as last time, rediffed against pre5
|
|
- 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
|
|
- Al Viro: floppy_eject cleanup, mount cleanups
- Jens Axboe: bio updates
- Ingo Molnar: mempool fixes
- GOTO Masanori: Fix O_DIRECT error handling
|
|
- 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.
|
|
- Jens Axboe: fix up bio highmem breakage, more cleanups
- Greg KH: USB update
|
|
- Greg KH: USB update
- Richard Gooch: refcounting for devfs
- Jens Axboe: start of new block IO layer
|
|
- Neil Brown: md cleanups/fixes
- Andrew Morton: console locking merge
- Andrea Arkangeli: major VM merge
|
|
- 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
|
|
- 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
|
|
|