aboutsummaryrefslogtreecommitdiffstats
path: root/arch
Commit message (Collapse)AuthorAge
* [S390] tlb flush fix.Martin Schwidefsky2007-10-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current tlb flushing code for page table entries violates the s390 architecture in a small detail. The relevant section from the principles of operation (SA22-7832-02 page 3-47): "A valid table entry must not be changed while it is attached to any CPU and may be used for translation by that CPU except to (1) invalidate the entry by using INVALIDATE PAGE TABLE ENTRY or INVALIDATE DAT TABLE ENTRY, (2) alter bits 56-63 of a page-table entry, or (3) make a change by means of a COMPARE AND SWAP AND PURGE instruction that purges the TLB." That means if one thread of a multithreaded applciation uses a vma while another thread does an unmap on it, the page table entries of that vma needs to get removed with IPTE, IDTE or CSP. In some strange and rare situations a cpu could check-stop (die) because a entry has been pushed out of the TLB that is still needed to complete a (milli-coded) instruction. I've never seen it happen with the current code on any of the supported machines, so right now this is a theoretical problem. But I want to fix it nevertheless, to avoid headaches in the futures. To get this implemented correctly without changing common code the primitives ptep_get_and_clear, ptep_get_and_clear_full and ptep_set_wrprotect need to use the IPTE instruction to invalidate the pte before the new pte value gets stored. If IPTE is always used for the three primitives three important operations will have a performace hit: fork, mprotect and exit_mmap. Time for some workarounds: * 1: ptep_get_and_clear_full is used in unmap_vmas to remove page tables entries in a batched tlb gather operation. If the mmu_gather context passed to unmap_vmas has been started with full_mm_flush==1 or if only one cpu is online or if the only user of a mm_struct is the current process then the fullmm indication in the mmu_gather context is set to one. All TLBs for mm_struct are flushed by the tlb_gather_mmu call. No new TLBs can be created while the unmap is in progress. In this case ptep_get_and_clear_full clears the ptes with a simple store. * 2: ptep_get_and_clear is used in change_protection to clear the ptes from the page tables before they are reentered with the new access flags. At the end of the update flush_tlb_range clears the remaining TLBs. In general the ptep_get_and_clear has to issue IPTE for each pte and flush_tlb_range is a nop. But if there is only one user of the mm_struct then ptep_get_and_clear uses simple stores to do the update and flush_tlb_range will flush the TLBs. * 3: Similar to 2, ptep_set_wrprotect is used in copy_page_range for a fork to make all ptes of a cow mapping read-only. At the end of of copy_page_range dup_mmap will flush the TLBs with a call to flush_tlb_mm. Check for mm->mm_users and if there is only one user avoid using IPTE in ptep_set_wrprotect and let flush_tlb_mm clear the TLBs. Overall for single threaded programs the tlb flush code now performs better, for multi threaded programs it is slightly worse. In particular exit_mmap() now does a single IDTE for the mm and then just frees every page cache reference and every page table page directly without a delay over the mmu_gather structure. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] kernel: Fix dump on panic for DASDs under LPAR.Michael Holzheu2007-10-22
| | | | | | | | | | Currently the ccw method is used to ipl the DASD dump record under LPAR. This mechanism is not reliable, which can cause dump failures. This fix now uses the diag 308 ipl method for all machines, which have diag308 subcode 5 and 4 support. Signed-off-by: Michael Holzheu <holzheu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] Add per-cpu idle time / idle count sysfs attributes.Heiko Carstens2007-10-22
| | | | | | | | | | | | | | | | | Add two new sysfs entries per cpu: idle_count and idle_time. idle_count contains the number of times a cpu went into idle state. idle_time contains the time a cpu spent in idle state in microseconds. This can be used e.g. by powertop to tell how often idle state is entered and left. # cat /sys/devices/system/cpu/cpu0/idle_count 504 # cat /sys/devices/system/cpu/cpu0/idle_time 469734037 us Cc: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] Update default configuration.Martin Schwidefsky2007-10-22
| | | | Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* Blackfin arch: update boards filesBryan Wu2007-10-21
| | | | | Signed-off-by: Bryan Wu <bryan.wu@analog.com>
* Blackfin arch: dma add some API and cleanup bf54x DMA definitionBryan Wu2007-10-21
| | | | | Signed-off-by: Bryan Wu <bryan.wu@analog.com>
* Blackfin arch: cleanup and promote the general purpose timers api to a core ↵Mike Frysinger2007-10-21
| | | | | | | | blackfin component Signed-off-by: Mike Frysinger <michael.frysinger@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
* Blackfin arch: add a cheesy install targetMike Frysinger2007-10-21
| | | | | | Signed-off-by: Mike Frysinger <michael.frysinger@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
* Blackfin arch: add functions for converting between sclks and usecsMike Frysinger2007-10-21
| | | | | | Signed-off-by: Mike Frysinger <michael.frysinger@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
* Blackfin arch: add assembly function for doing 64bit unsigned divisionMike Frysinger2007-10-21
| | | | | | Signed-off-by: Mike Frysinger <michael.frysinger@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
* Blackfin arch: -mno-fdpic worksMike Frysinger2007-10-21
| | | | | | | | | | | | | now that -mno-fdpic works, force it on so that we can use any blackfin toolchain to build up the kernel and kernel modules wrap -mno-fdpic in $(call cc-option,-mno-fdpic) so that older toolchains will still work Signed-off-by: Mike Frysinger <michael.frysinger@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
* Blackfin arch: use "char bfin_board_name[]" rather than "char ↵Mike Frysinger2007-10-21
| | | | | | | | *bfin_board_name" per discussion on lkml as the former uses less storage Signed-off-by: Mike Frysinger <michael.frysinger@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
* Blackfin arch: Fixing Bug: balance calls to get_task_mm with corresponding ↵Bernd Schmidt2007-10-21
| | | | | | | | | | mmput calls We must balance calls to get_task_mm with corresponding mmput calls, otherwise refcounting is screwed up and mms don't get freed when their task exits. Signed-off-by: Bryan Wu <bryan.wu@analog.com>
* Blackfin arch: Fix up /proc/cpuinfo so it is like everyone elseRobin Getz2007-10-21
| | | | | | | | | | | Fix up /proc/cpuinfo so it is like everyone else, and gets parsed by various applications properly. Still needs some tweaking on parts without full L1 sram, like 532, 531, so it doesn't print out L1 bank info that doesn't exist. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
* Blackfin arch: Optimization - no need to make additional math hereMichael Hennerich2007-10-21
| | | | | | Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
* Blackfin arch: force irq_flags into the .data sectionMike Frysinger2007-10-21
| | | | | | | | | | | | force irq_flags into the .data section by initializing it to the hardware masks that cannot be disabled. this way if we use irq enable/disable functions before the .bss has been zeroed out (as does our l1 relocate/dma functions), we dont hit a problem where bss contains bogus crap. Signed-off-by: Mike Frysinger <michael.frysinger@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
* Blackfin arch BF548 defconfig: enable watchdog by defaultMike Frysinger2007-10-21
| | | | | | Signed-off-by: Mike Frysinger <michael.frysinger@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
* Blackfin arch: add new processor ADSP-BF52x arch/mach supportMichael Hennerich2007-10-21
| | | | | | Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
* Merge branch 'master' of ↵Linus Torvalds2007-10-20
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hera.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6 * 'master' of hera.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6: (29 commits) [PARISC] fix uninitialized variable warning in asm/rtc.h [PARISC] Port checkstack.pl to parisc [PARISC] Make palo target work when $obj != $src [PARISC] Zap unused variable warnings in pci.c [PARISC] Fix tests in palo target [PARISC] Fix palo target [PARISC] Restore palo target [PARISC] Attempt to clean up parisc/Makefile [PARISC] Fix infinite loop in /proc/iomem [PARISC] Quiet sysfs_create_link __must_check warnings in pdc_stable [PARISC] Squelch pci_enable_device __must_check warning in superio [PARISC] Kill off broken irqstack code [PARISC] Remove hardcoded uses of PAGE_SIZE [PARISC] Clean up pointless ASM_PAGE_SIZE_DIV use [PARISC] Kill off the last vestiges of ASM_PAGE_SIZE [PARISC] Kill off ASM_PAGE_SIZE use [PARISC] Beautify parisc vmlinux.lds.S [PARISC] Clean up a resource_size_t warning in sba_iommu [PARISC] Kill incorrect cast warning in unwinder [PARISC] Kill zone_to_nid printk warning ... Fixed trivial conflict in include/asm-parisc/tlbflush.h manually
| * [PARISC] Make palo target work when $obj != $srcKyle McMartin2007-10-20
| | | | | | | | | | | | | | Stumbled upon when I was testing it out and using make O=... to build. Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
| * [PARISC] Zap unused variable warnings in pci.cKyle McMartin2007-10-20
| | | | | | | | | | | | | | 'bus' was basically useless and 'hba' is only applicable on 64bit. Sigh, there's got to be a cleaner way to do this... Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
| * [PARISC] Fix tests in palo targetKyle McMartin2007-10-20
| | | | | | | | Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
| * [PARISC] Fix palo targetKyle McMartin2007-10-18
| | | | | | | | | | | | Hunk missing from previous commit, oops. Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
| * [PARISC] Restore palo targetKyle McMartin2007-10-18
| | | | | | | | | | | | Turns out, people were still using it, and it accidently works. Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
| * [PARISC] Attempt to clean up parisc/MakefileKyle McMartin2007-10-18
| | | | | | | | Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
| * [PARISC] Fix infinite loop in /proc/iomemMatthew Wilcox2007-10-18
| | | | | | | | | | | | | | | | | | | | | | pcibios_link_hba_resources() could corrupt the resource tree by inserting resources in the wrong place. Fix this by calling pci_claim_resource() for PCI-PCI bridges. Delete pcibios_link_hba_resources as we shouldn't need it any more. Also get rid of lba_claim_dev_resources() and just call pci_claim_resource() directly. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
| * [PARISC] Kill off broken irqstack codeKyle McMartin2007-10-18
| | | | | | | | | | | | | | It's been unfinished and broken long enough, and I have some ideas on how to do it more cleanly. Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
| * [PARISC] Remove hardcoded uses of PAGE_SIZEKyle McMartin2007-10-18
| | | | | | | | Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
| * [PARISC] Clean up pointless ASM_PAGE_SIZE_DIV useKyle McMartin2007-10-18
| | | | | | | | Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
| * [PARISC] Kill off the last vestiges of ASM_PAGE_SIZEKyle McMartin2007-10-18
| | | | | | | | | | | | Sam's previous patch missed a few uses of ASM_PAGE_SIZE. Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
| * [PARISC] Kill off ASM_PAGE_SIZE useSam Ravnborg2007-10-18
| | | | | | | | | | | | | | | | | | | | | | We have the macro _AC() generally available now so the calculation of PAGE_SIZE can be made assembler compatible. Introduce use of _AC() and kill all users of ASM_PAGE_SIZE. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
| * [PARISC] Beautify parisc vmlinux.lds.SSam Ravnborg2007-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a consistent layout of vmlinux. The same layout has been introduced for most architectures. And the same time move a few label definitions inside the curly brackets so they are assigned the correct starting address. Before a ld inserted alignment would have casued the label to pint before the actual start of the section. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
| * [PARISC] Kill incorrect cast warning in unwinderKyle McMartin2007-10-18
| | | | | | | | Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
| * [PARISC] Kill zone_to_nid printk warningKyle McMartin2007-10-18
| | | | | | | | | | | | zone_to_nid returns int, always. Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
| * [PARISC] Unbreak processor_probe when we have more than NR_CPUSKyle McMartin2007-10-18
| | | | | | | | | | | | | | | | If we already have NR_CPUS worth of cpus online, we obviously shouldn't be trying to bring up more... Fixes a particularly vexing issue I had when running another machines kernel on my rp3440. Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
| * [PARISC] Kill pointless variable use in time.cKyle McMartin2007-10-18
| | | | | | | | | | | | | | Clean up a pointless use of a variable in update_cr16_clocksource. It just looks silly. Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
| * [PARISC] import necessary bits of libgcc.aKyle McMartin2007-10-18
| | | | | | | | | | | | | | | | | | Currently we're hacking libs-y to include libgcc.a, but this has unforeseen consequences since the userspace libgcc is linked with fpregs enabled. We need the kernel to stop using fpregs in an uncontrolled manner to implement lazy fpu state saves. Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
| * [PARISC] Use page allocator instead of slab allocator in pci-dma.cChristoph Lameter2007-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Slab pages obtained via kmalloc are not cacheline aligned. Nor is it advisable to perform VM operations designed for page allocator pages on memory obtained via kmalloc. So replace the page sized allocations in kernel/pci-dma.c with page allocator pages. Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Hugh Dickins <hugh@veritas.com> Cc: Grant Grundler <grundler@parisc-linux.org> Cc: Matthew Wilcox <willy@debian.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
| * [PARISC] parisc: "extern inline" -> "static inline"Adrian Bunk2007-10-18
| | | | | | | | | | | | | | | | | | | | "extern inline" will have different semantics with gcc 4.3, and "static inline" is correct here. Signed-off-by: Adrian Bunk <bunk@stusta.de> Cc: Matthew Wilcox <willy@debian.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
| * [PARISC] Update defconfigsKyle McMartin2007-10-18
| | | | | | | | Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
| * [PARISC] Wire up sys_fallocate (and compat_sys_fallocate)Kyle McMartin2007-10-18
| | | | | | | | Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
* | kbuild: restore arch/{ppc/xtensa}/boot cflagsMilton Miller2007-10-20
| | | | | | | | | | | | | | | | | | | | | | Commit 9a39e273d4df0560c724c5fe71f6314a0583ca2b removed the boot directory addition to CFLAGS that was being used by the subdirectory builds. For the other files, that patch set EXTRA_CFLAGS, but Makefile.build explicitly sets that to empty as it is explicitly for a single directory only. Append to KBUILD_CFLAGS instead. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivialLinus Torvalds2007-10-19
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (74 commits) fix do_sys_open() prototype sysfs: trivial: fix sysfs_create_file kerneldoc spelling mistake Documentation: Fix typo in SubmitChecklist. Typo: depricated -> deprecated Add missing profile=kvm option to Documentation/kernel-parameters.txt fix typo about TBI in e1000 comment proc.txt: Add /proc/stat field small documentation fixes Fix compiler warning in smount example program from sharedsubtree.txt docs/sysfs: add missing word to sysfs attribute explanation documentation/ext3: grammar fixes Documentation/java.txt: typo and grammar fixes Documentation/filesystems/vfs.txt: typo fix include/asm-*/system.h: remove unused set_rmb(), set_wmb() macros trivial copy_data_pages() tidy up Fix typo in arch/x86/kernel/tsc_32.c file link fix for Pegasus USB net driver help remove unused return within void return function Typo fixes retrun -> return x86 hpet.h: remove broken links ...
| * | small documentation fixesPhilipp Marek2007-10-19
| | | | | | | | | | | | Signed-off-by: Adrian Bunk <bunk@kernel.org>
| * | Fix typo in arch/x86/kernel/tsc_32.cJosh Triplett2007-10-19
| | | | | | | | | | | | | | | Signed-off-by: Josh Triplett <josh@kernel.org> Signed-off-by: Adrian Bunk <bunk@kernel.org>
| * | typo fixesMatt LaPlante2007-10-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of these fixes were already submitted for old kernel versions, and were approved, but for some reason they never made it into the releases. Because this is a consolidation of a couple old missed patches, it touches both Kconfigs and documentation texts. Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
| * | spelling fixes: arch/x86_64/Simon Arlott2007-10-19
| | | | | | | | | | | | | | | | | | | | | Spelling fixes in arch/x86_64/. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Adrian Bunk <bunk@kernel.org>
| * | spelling fixes: arch/v850/Simon Arlott2007-10-19
| | | | | | | | | | | | | | | | | | | | | Spelling fixes in arch/v850/. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Adrian Bunk <bunk@kernel.org>
| * | spelling fixes: arch/um/Simon Arlott2007-10-19
| | | | | | | | | | | | | | | | | | | | | | | | Spelling fixes in arch/um/. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Acked-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
| * | spelling fixes: arch/m68k/Simon Arlott2007-10-19
| | | | | | | | | | | | | | | | | | | | | | | | Spelling fixes in arch/m68k/. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Adrian Bunk <bunk@kernel.org>