aboutsummaryrefslogtreecommitdiff
path: root/arch/um/include/asm
AgeCommit message (Collapse)AuthorFilesLines
2012-03-20um: uml_dup_mmap() relies on ->mmap_sem being held, but activate_mm() ↵Al Viro1-2/+9
doesn't hold it ... while calling uml_dup_mmap() Signed-off-by: Al Viro <[email protected]>
2012-03-20um: embed ->stub_pages[] into mmu_contextAl Viro1-1/+1
seriously, kmalloc() for two-element array of pointers? Signed-off-by: Al Viro <[email protected]>
2011-11-21freezer: remove now unused TIF_FREEZETejun Heo1-2/+0
Signed-off-by: Tejun Heo <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: [email protected]
2011-11-02um: kill system-um.hAl Viro2-46/+37
most of it belonged in irqflags.h, actually Signed-off-by: Al Viro <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2011-11-02um: generic ftrace.h will do...Al Viro2-1/+1
Signed-off-by: Al Viro <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2011-11-02um: segment.h is x86-only and needed only thereAl Viro1-10/+0
Signed-off-by: Al Viro <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2011-11-02um: asm/pda.h is not needed anymoreAl Viro1-21/+0
Signed-off-by: Al Viro <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2011-11-02um: hw_irq.h can go generic as wellAl Viro2-8/+1
Signed-off-by: Al Viro <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2011-11-02um: switch to generic-yAl Viro13-59/+2
kill wrapper headers Signed-off-by: Al Viro <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2011-11-02um: page_offset.h is never usedAl Viro1-1/+0
... and neither is the only define in it Signed-off-by: Al Viro <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2011-11-02um: irq_vectors.h just shadows x86 oneAl Viro1-10/+0
Signed-off-by: Al Viro <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2011-11-02um: required-features.h is there only to shadow x86 one...Al Viro1-9/+0
Signed-off-by: Al Viro <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2011-11-02um: asm/apic.h is there only to shadow the x86 one...Al Viro1-4/+0
... so take it to arch/um/x86/asm. Signed-off-by: Al Viro <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2011-11-02um: take ldt.h to arch/x86/um/asm/mm_context.hAl Viro1-2/+2
it's x86-only and we have no business playing with it in asm/mmu.h; make the latter have struct uml_arch_mm_context arch; instead of struct uml_ldt ldt; and let arch/<subarch>/um/asm/mm_context.h decide what'll be in there. While we are at it, kill host_ldt.h - it's not needed in part of places that include it (we want asm/ldt.h in those) and it can be trivially expanded into the single remaining one. Signed-off-by: Al Viro <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2011-11-02um: move asm/desc.h into arch/x86/um/asmAl Viro1-16/+0
its only purpose is to shadow the x86 asm/desc.h Signed-off-by: Al Viro <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2011-11-02um: take um_mmu.h to asm/mmu.h, clean asm/mmu_context.h a bitAl Viro2-10/+19
Signed-off-by: Al Viro <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2011-11-02um: kill um_uaccess.hAl Viro1-5/+84
Signed-off-by: Al Viro <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2011-11-02um: bury unused macros around ptrace.hAl Viro1-4/+0
Signed-off-by: Al Viro <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2011-11-02um: arch_hweight.h is needed only on uml-x86Al Viro1-6/+0
Signed-off-by: Al Viro <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2011-11-02um: take system.h out of shared/sysdepAl Viro1-2/+0
Signed-off-by: Al Viro <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2011-11-02um: Get rid of UPT_SET/UPT_REG macrosAl Viro1-3/+0
the only users are arch getreg()/putreg() and it's easier to handle it there instead of playing with macros from hell Signed-off-by: Al Viro <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2011-11-02um: take vm-flags.h to sys-*/asmAl Viro1-1/+1
Signed-off-by: Al Viro <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2011-11-02um: get rid of sysdep/checksum.hAl Viro1-6/+0
Move those to sys-.../asm/checksum.h, kill include/asm/checksum.h Signed-off-by: Al Viro <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
2011-09-14um: clean arch_ptrace() up a bitAl Viro1-4/+0
1) take subarch-specific stuff to subarch_ptrace() 2) PTRACE_{PEEK,POKE}{TEXT,DATA} is handled by ptrace_request() just fine... Signed-off-by: Al Viro <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-07-26ptrace: unify show_regs() prototypeMike Frysinger1-2/+0
[ [email protected]: no need to declare show_regs() in ptrace.h, sched.h does this ] Signed-off-by: Mike Frysinger <[email protected]> Cc: Tejun Heo <[email protected]> Signed-off-by: Oleg Nesterov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-07-25um: clean up delay functionsRichard Weinberger1-6/+4
Both sys-i386 and sys-x86_64 support now ndelay(). The delay functions are based on arch/x86/lib/delay.c. Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-06-27um: add asm/percpu.hRichard Weinberger1-0/+6
To make SLUB work on UML we need this_cpu_cmpxchg from asm-generic/percpu.h. Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-05-25Remove unused PROC_CHANGE_PENALTY constantStephen Boyd1-1/+0
This constant hasn't been used since before the git era (2.6.12) and thus can be dropped. Signed-off-by: Stephen Boyd <[email protected]> Cc: Russell King <[email protected]> Cc: Richard Weinberger <[email protected]> Cc: Hirokazu Takata <[email protected]> Cc: Kyle McMartin <[email protected]> Cc: Richard Henderson <[email protected]> Cc: Ivan Kokshaysky <[email protected]> Cc: Matt Turner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-05-25um: include linux/prefetch.hRichard Weinberger1-0/+2
Fix build failures on UML. Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-05-25um: mmu_gather reworkPeter Zijlstra1-18/+11
Fix up the um mmu_gather code to conform to the new API. Signed-off-by: Peter Zijlstra <[email protected]> Cc: Jeff Dike <[email protected]> Cc: Richard Weinberger <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: David Miller <[email protected]> Cc: Martin Schwidefsky <[email protected]> Cc: Russell King <[email protected]> Cc: Paul Mundt <[email protected]> Cc: Tony Luck <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Mel Gorman <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Cc: Nick Piggin <[email protected]> Cc: Namhyung Kim <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-05-24Merge branch 'for-2.6.40' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu * 'for-2.6.40' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: percpu: Unify input section names percpu: Avoid extra NOP in percpu_cmpxchg16b_double percpu: Cast away printk format warning percpu: Always align percpu output section to PAGE_SIZE Fix up fairly trivial conflict in arch/x86/include/asm/percpu.h as per Tejun
2011-04-28um: adjust current_thread_info() for newer gcc versionsRichard Weinberger1-1/+4
In some cases gcc >= 4.5.2 will optimize away current_thread_info(). To prevent gcc from doing so the stack address has to be obtained via inline asm. Signed-off-by: Richard Weinberger <[email protected]> Acked-by: Kirill A. Shutemov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-04-14um: fix call tracer and bug handlerRichard Weinberger1-0/+6
Commit 1de1502c ("x86, um: now we can get rid of trivial uml headers") removed accidentally bug.h which broke UML's call tracer and bug handler. Without asm-generic/bug.h UML uses BUG() from arch/x86/ which makes use of ud2. UML cannot use ud2, it raises SIGILL in user mode. As UML has a different stack for handling signals the call trace will be cut off. Signed-off-by: Richard Weinberger <[email protected]> Reported-by: Sergei Trofimovich <[email protected]> Tested-by: Sergei Trofimovich <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-03-24percpu: Always align percpu output section to PAGE_SIZETejun Heo1-1/+1
Percpu allocator honors alignment request upto PAGE_SIZE and both the percpu addresses in the percpu address space and the translated kernel addresses should be aligned accordingly. The calculation of the former depends on the alignment of percpu output section in the kernel image. The linker script macros PERCPU_VADDR() and PERCPU() are used to define this output section and the latter takes @align parameter. Several architectures are using @align smaller than PAGE_SIZE breaking percpu memory alignment. This patch removes @align parameter from PERCPU(), renames it to PERCPU_SECTION() and makes it always align to PAGE_SIZE. While at it, add PCPU_SETUP_BUG_ON() checks such that alignment problems are reliably detected and remove percpu alignment comment recently added in workqueue.c as the condition would trigger BUG way before reaching there. For um, this patch raises the alignment of percpu area. As the area is in .init, there shouldn't be any noticeable difference. This problem was discovered by David Howells while debugging boot failure on mn10300. Signed-off-by: Tejun Heo <[email protected]> Acked-by: Mike Frysinger <[email protected]> Cc: [email protected] Cc: David Howells <[email protected]> Cc: Jeff Dike <[email protected]> Cc: [email protected]
2011-03-22mm: NUMA aware alloc_task_struct_node()Eric Dumazet1-1/+1
All kthreads being created from a single helper task, they all use memory from a single node for their kernel stack and task struct. This patch suite creates kthread_create_on_cpu(), adding a 'cpu' parameter to parameters already used by kthread_create(). This parameter serves in allocating memory for the new kthread on its memory node if available. Users of this new function are : ksoftirqd, kworker, migration, pktgend... This patch: Add a node parameter to alloc_task_struct(), and change its name to alloc_task_struct_node() This change is needed to allow NUMA aware kthread_create_on_cpu() Signed-off-by: Eric Dumazet <[email protected]> Acked-by: David S. Miller <[email protected]> Reviewed-by: Andi Kleen <[email protected]> Acked-by: Rusty Russell <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Tony Luck <[email protected]> Cc: Fenghua Yu <[email protected]> Cc: David Howells <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-01-25percpu: align percpu readmostly subsection to cachelineTejun Heo1-1/+1
Currently percpu readmostly subsection may share cachelines with other percpu subsections which may result in unnecessary cacheline bounce and performance degradation. This patch adds @cacheline parameter to PERCPU() and PERCPU_VADDR() linker macros, makes each arch linker scripts specify its cacheline size and use it to align percpu subsections. This is based on Shaohua's x86 only patch. Signed-off-by: Tejun Heo <[email protected]> Cc: Shaohua Li <[email protected]>
2010-11-12um: fix ptrace build errorRichard Weinberger1-2/+2
Both commits 0a3d763f1a68 ("ptrace: cleanup arch_ptrace() on um") and 9b05a69e0534 ("ptrace: change signature of arch_ptrace()") broke the um build. This patch fixes the issues. 0a3d763f1a68 introduced the undeclared variable "datavp". The patch seems completely untested. :-( 9b05a69e0534 changed arch_ptrace()'s signature but did not update um/include/asm/ptrace-generic.h. Signed-off-by: Richard Weinberger <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Jeff Dike <[email protected]> Tested-by: Will Newton <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-10-26uml: define CONFIG_NO_DMAFUJITA Tomonori1-112/+0
I think that it's better to detect DMA misuse at build time rather than calling BUG_ON. Architectures that can't do DMA need to define CONFIG_NO_DMA. Thanks to Sam Ravnborg for explaining how CONFIG_NO_DMA and CONFIG_HAS_DMA work: http://marc.info/?l=linux-kernel&m=128359913825550&w=2 HAS_DMA is defined like this: config HAS_DMA boolean depends on !NO_DMA default y So to set HAS_DMA to true an arch should do: 1) Do not define NO_DMA 2) Define NO_DMA abd set it to 'n' Must archs - including um - used principle 1). In the um case we want to say that we do NOT have any DMA. This can be done in two ways. a) define NO_DMA and set it to 'y' b) redefine HAS_DMA and set it to 'n'. The patch you provided used principle b) where other archs use principle a). So I suggest you should use principle a) for um too. Signed-off-by: FUJITA Tomonori <[email protected]> Cc: Miklos Szeredi <[email protected]> Cc: Jeff Dike <[email protected]> Cc: Sam Ravnborg <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-10-26mm: remove pte_*map_nested()Peter Zijlstra1-2/+0
Since we no longer need to provide KM_type, the whole pte_*map_nested() API is now redundant, remove it. Signed-off-by: Peter Zijlstra <[email protected]> Acked-by: Chris Metcalf <[email protected]> Cc: David Howells <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Russell King <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: David Miller <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-10-26um: fix IRQ flag handling namingRichard Weinberger1-17/+32
Commit df9ee292 ("Fix IRQ flag handling naming") changed the IRQ flag handling naming scheme and broke UML: In file included from arch/um/include/asm/fixmap.h:5, from arch/um/include/shared/um_uaccess.h:10, from arch/um/include/asm/uaccess.h:41, from arch/um/include/asm/thread_info.h:13, from include/linux/thread_info.h:56, from include/linux/preempt.h:9, from include/linux/spinlock.h:50, from include/linux/seqlock.h:29, from include/linux/time.h:8, from include/linux/stat.h:60, from include/linux/module.h:10, from init/main.c:13: arch/um/include/asm/system.h:11:1: warning: "local_save_flags" redefined This patch brings the new scheme to UML and makes it work again. Signed-off-by: Richard Weinberger <[email protected]> Acked-by: David Howells <[email protected]> Cc: Jeff Dike <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-20uml: fix compile error in dma_get_cache_alignment()Miklos Szeredi1-7/+0
Fix uml compile error: include/linux/dma-mapping.h:145: error: redefinition of 'dma_get_cache_alignment' arch/um/include/asm/dma-mapping.h:99: note: previous definition of 'dma_get_cache_alignment' was here Introduced by commit 4565f0170dfc ("dma-mapping: unify dma_get_cache_alignment implementations") Signed-off-by: Miklos Szeredi <[email protected]> Cc: Jeff Dike <[email protected]> Cc: FUJITA Tomonori <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-11dma-mapping: remove dma_is_consistent APIFUJITA Tomonori1-1/+0
Architectures implement dma_is_consistent() in different ways (some misinterpret the definition of API in DMA-API.txt). So it hasn't been so useful for drivers. We have only one user of the API in tree. Unlikely out-of-tree drivers use the API. Even if we fix dma_is_consistent() in some architectures, it doesn't look useful at all. It was invented long ago for some old systems that can't allocate coherent memory at all. It's better to export only APIs that are definitely necessary for drivers. Let's remove this API. Signed-off-by: FUJITA Tomonori <[email protected]> Cc: James Bottomley <[email protected]> Reviewed-by: Konrad Rzeszutek Wilk <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-08-03um, x86: Cast to (u64 *) inside set_64bit()H. Peter Anvin1-2/+2
After tightening up the types passed to set_64bit(), the cast to (phys_t *) triggers a warning apparently because phys_t is defined as "unsigned long" when building on 64 bits; however, u64 is defined as "unsigned long long". This is, however, a explicit cast inside a size-specific call, so just make the cast explicitly (u64 *). Signed-off-by: H. Peter Anvin <[email protected]> Cc: Jeff Dike <[email protected]> LKML-Reference: <[email protected]>
2010-06-10um, hweight: Fix UML boot crash due to x86 optimized hweightBorislav Petkov1-0/+6
Apparently UML cannot stomach callee reg-saving trickery introduced with d61931d89be506372d01a90d1755f6d0a9fafe2d (x86: Add optimized popcnt variants) and oopses during boot: http://marc.info/?l=linux-kernel&m=127522065202435&w=2 Redirect arch_hweight.h include from the x86 portion to the generic arch_hweight.h which is a fallback to the software hweight routines. LKML-Reference: <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
2010-05-14add descriptive comment for TIF_MEMDIE task flag declaration.Andreas Dilger1-4/+3
Signed-off-by: Andreas Dilger <[email protected]> Acked-by: KOSAKI Motohiro <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2010-04-20UML: Clean up asm/system.hJan Kiszka1-3/+0
Remove duplicates and unused prototypes. Signed-off-by: Jan Kiszka <[email protected]> Acked-by: WANG Cong <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2010-03-12um: remove dma_sync_single_rangeFUJITA Tomonori1-8/+0
dma_sync_single_for_cpu/for_device supports a partial sync so there is no point to have dma_sync_single_range (also dma_sync_single was obsoleted long ago, replaced with dma_sync_single_for_cpu/for_device). There is no user of dma_sync_single_range() in mainline and only Alpha architecture supports dma_sync_single_range(). So it's unlikely that someone out of the tree uses it. Signed-off-by: FUJITA Tomonori <[email protected]> Cc: Jeff Dike <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-03-12um: use generic ptrace_resume codeChristoph Hellwig1-0/+2
Use the generic ptrace_resume code for PTRACE_SYSCALL, PTRACE_CONT, PTRACE_KILL and PTRACE_SINGLESTEP. This implies defining arch_has_single_step in <asm/ptrace.h> and implementing the user_enable_single_step and user_disable_single_step functions, which also causes the breakpoint information to be cleared on fork, which could be considered a bug fix. Also the TIF_SYSCALL_TRACE thread flag is now cleared on PTRACE_KILL which it previously wasn't which is consistent with all architectures using the modern ptrace code. XXX: I'm not sure arch_has_single_step() is placed in the exactly correct location, please verify in which of the ptrace headers it should really be. Signed-off-by: Christoph Hellwig <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: Roland McGrath <[email protected]> Cc: Jeff Dike <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-02-20MM: Pass a PTE pointer to update_mmu_cache() rather than the PTE itselfRussell King1-1/+1
On VIVT ARM, when we have multiple shared mappings of the same file in the same MM, we need to ensure that we have coherency across all copies. We do this via make_coherent() by making the pages uncacheable. This used to work fine, until we allowed highmem with highpte - we now have a page table which is mapped as required, and is not available for modification via update_mmu_cache(). Ralf Beache suggested getting rid of the PTE value passed to update_mmu_cache(): On MIPS update_mmu_cache() calls __update_tlb() which walks pagetables to construct a pointer to the pte again. Passing a pte_t * is much more elegant. Maybe we might even replace the pte argument with the pte_t? Ben Herrenschmidt would also like the pte pointer for PowerPC: Passing the ptep in there is exactly what I want. I want that -instead- of the PTE value, because I have issue on some ppc cases, for I$/D$ coherency, where set_pte_at() may decide to mask out the _PAGE_EXEC. So, pass in the mapped page table pointer into update_mmu_cache(), and remove the PTE value, updating all implementations and call sites to suit. Includes a fix from Stephen Rothwell: sparc: fix fallout from update_mmu_cache API change Signed-off-by: Stephen Rothwell <[email protected]> Acked-by: Benjamin Herrenschmidt <[email protected]> Signed-off-by: Russell King <[email protected]>
2009-12-12kbuild: move asm-offsets.h to include/generatedSam Ravnborg1-0/+1
The simplest method was to add an extra asm-offsets.h file in arch/$ARCH/include/asm that references the generated file. We can now migrate the architectures one-by-one to reference the generated file direct - and when done we can delete the temporary arch/$ARCH/include/asm/asm-offsets.h file. Signed-off-by: Sam Ravnborg <[email protected]> Cc: Al Viro <[email protected]> Signed-off-by: Michal Marek <[email protected]>