aboutsummaryrefslogtreecommitdiffstats
path: root/lib (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2009-12-15Blackfin: convert to generic checksum codeMike Frysinger4-192/+8
The Blackfin port only implemented an optimized version of the csum_tcpudp_nofold function, so convert everything else to the new generic code. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-14udf: Avoid IO in udf_clear_inodeJan Kara3-22/+41
It is not very good to do IO in udf_clear_inode. First, VFS does not really expect inode to become dirty there and thus we have to write it ourselves, second, memory reclaim gets blocked waiting for IO when it does not really expect it, third, the IO pattern (e.g. on umount) resulting from writes in udf_clear_inode is bad and it slows down writing a lot. The reason why UDF needed to do IO in udf_clear_inode is that UDF standard mandates extent length to exactly match inode size. But when we allocate extents to a file or directory, we don't really know what exactly the final file size will be and thus temporarily set it to block boundary and later truncate it to exact length in udf_clear_inode. Now, this is changed to truncate to final file size in udf_release_file for regular files. For directories and symlinks, we do the truncation at the moment when learn what the final file size will be. Signed-off-by: Jan Kara <jack@suse.cz>
2009-12-14udf: Try harder when looking for VAT inodeJan Kara1-8/+24
Some disks do not contain VAT inode in the last recorded block as required by the standard but a few blocks earlier (or the number of recorded blocks is wrong). So look for the VAT inode a bit before the end of the media. Signed-off-by: Jan Kara <jack@suse.cz>
2009-12-14udf: Fix compilation with UDFFS_DEBUG enabledJan Kara1-1/+1
Signed-off-by: Jan Kara <jack@suse.cz>
2009-12-14PCI: Global variable decls must match the defs in section attributesDavid Howells1-1/+1
Global variable declarations must match the definitions in section attributes as the compiler is at liberty to vary the method it uses to access a variable, depending on the section it is in. When building the FRV arch, I now see: drivers/built-in.o: In function `pci_apply_final_quirks': drivers/pci/quirks.c:2606: relocation truncated to fit: R_FRV_GPREL12 against symbol `pci_dfl_cache_line_size' defined in .devinit.data section in drivers/built-in.o drivers/pci/quirks.c:2623: relocation truncated to fit: R_FRV_GPREL12 against symbol `pci_dfl_cache_line_size' defined in .devinit.data section in drivers/built-in.o drivers/pci/quirks.c:2630: relocation truncated to fit: R_FRV_GPREL12 against symbol `pci_dfl_cache_line_size' defined in .devinit.data section in drivers/built-in.o because the declaration of pci_dfl_cache_line_size in linux/pci.h does not match the definition in drivers/pci/pci.c. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-14FRV: Fix no-hardware-breakpoint caseDavid Howells1-1/+1
If there is no hardware breakpoint support, modify_user_hw_breakpoint() tries to return a NULL pointer through as an 'int' return value: In file included from kernel/exit.c:53: include/linux/hw_breakpoint.h: In function 'modify_user_hw_breakpoint': include/linux/hw_breakpoint.h:96: warning: return makes integer from pointer without a cast Return 0 instead. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-14Documentation: rw_lock lessons learnedWilliam Allen Simpson1-100/+84
In recent months, two different network projects erroneously strayed down the rw_lock path. Update the Documentation based upon comments by Eric Dumazet and Paul E. McKenney in those threads. Further updates await somebody else with more expertise. Changes: - Merged with extensive content by Stephen Hemminger. - Fix one of the comments by Linus Torvalds. Signed-off-by: William.Allen.Simpson@gmail.com Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-14x86, mce: Clean up thermal init by introducing intel_thermal_supported()Hidetoshi Seto1-5/+12
It looks better to have a common function. No change in functionality. Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Cc: Cyrill Gorcunov <gorcunov@openvz.org> LKML-Reference: <4B25FDDC.407@jp.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: Cyrill Gorcunov <gorcunov@openvz.org>
2009-12-14x86, mce: Thermal monitoring depends on APIC being enabledCyrill Gorcunov1-2/+3
Add check if APIC is not disabled since thermal monitoring depends on it. As only apic gets disabled we should not try to install "thermal monitor" vector, print out that thermal monitoring is enabled and etc... Note that "Intel Correct Machine Check Interrupts" already has such a check. Also I decided to not add cpu_has_apic check into mcheck_intel_therm_init since even if it'll call apic_read on disabled apic -- it's safe here and allow us to save a few code bytes. Reported-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> LKML-Reference: <4B25FDC2.3020401@jp.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-12-14perf sched: Fix build failure on sparcDavid Miller2-4/+8
Here, tvec->tv_usec is "unsigned int" not "unsigned long". Since the type is different on every platform, it's probably best to just use long printf formats and cast. Signed-off-by: David S. Miller <davem@davemloft.net> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <20091213.235622.53363059.davem@davemloft.net> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-12-14x86: Gart: fix breakage due to IOMMU initialization cleanupYinghai Lu2-6/+8
This fixes the following breakage of the commit 75f1cdf1dda92cae037ec848ae63690d91913eac: - GART systems that don't AGP with broken BIOS and more than 4GB memory are forced to use swiotlb. They can allocate aperture by hand and use GART. - GART systems without GAP must disable GART on shutdown. - swiotlb usage is forced by the boot option, gart_iommu_hole_init() is not called, so we disable GART early_gart_iommu_check(). Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> LKML-Reference: <1260759135-6450-3-git-send-email-fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-12-14x86: Move swiotlb initialization before dma32_free_bootmemFUJITA Tomonori1-1/+4
The commit 75f1cdf1dda92cae037ec848ae63690d91913eac introduced a bug that we initialize SWIOTLB right after dma32_free_bootmem so we wrongly steal memory area allocated for GART with broken BIOS earlier. This moves swiotlb initialization before dma32_free_bootmem(). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: yinghai@kernel.org LKML-Reference: <1260759135-6450-2-git-send-email-fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-12-14x86: Fix build warning in arch/x86/mm/mmio-mod.cJoe Perches1-1/+1
Stephen Rothwell reported these warnings: arch/x86/mm/mmio-mod.c: In function 'print_pte': arch/x86/mm/mmio-mod.c:100: warning: too many arguments for format arch/x86/mm/mmio-mod.c:106: warning: too many arguments for format The 'fmt' was left out accidentally. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Joe Perches <joe@perches.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Linus <torvalds@linux-foundation.org> LKML-Reference: <1260775443.18538.16.camel@Joe-Laptop.home> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-12-14x86: Remove usedac in feature-removal-schedule.txtFUJITA Tomonori1-7/+0
The reason of removal, "replaced by allowdac and no dac combination" is incorrect. There is no way to do the same thing with "allowdac" and "nodac" combination. The usedac option enables us to stop via_no_dac() setting forbid_dac to 1. That is, someone who uses VIA bridges can use DAC with this option even if some of VIA bridges seem to be broken about DAC. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: WANG Cong <amwang@redhat.com> Cc: gcosta@redhat.com LKML-Reference: <20091214104423X.fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-12-14perf bench: Add "all" pseudo subsystem and "all" pseudo suiteHitoshi Mitake3-7/+57
This patch adds a new "all" pseudo subsystem and an "all" pseudo suite. These are for testing all subsystem and its all suite, or all suite of one subsystem. (This patch also contains a few trivial comment fixes for bench/* and output style fixes. I judged that there are no necessity to make them into individual patch.) Example of use: | % ./perf bench sched all # Test all suites of sched subsystem | # Running sched/messaging benchmark... | # 20 sender and receiver processes per group | # 10 groups == 400 processes run | | Total time: 0.414 [sec] | | # Running sched/pipe benchmark... | # Extecuted 1000000 pipe operations between two tasks | | Total time: 10.999 [sec] | | 10.999317 usecs/op | 90914 ops/sec | | % ./perf bench all # Test all suites of all subsystems | # Running sched/messaging benchmark... | # 20 sender and receiver processes per group | # 10 groups == 400 processes run | | Total time: 0.420 [sec] | | # Running sched/pipe benchmark... | # Extecuted 1000000 pipe operations between two tasks | | Total time: 11.741 [sec] | | 11.741346 usecs/op | 85169 ops/sec | | # Running mem/memcpy benchmark... | # Copying 1MB Bytes from 0x7ff33e920010 to 0x7ff3401ae010 ... | | 808.407437 MB/Sec Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <1260691319-4683-1-git-send-email-mitake@dcl.info.waseda.ac.jp> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-12-14microblaze: Remove rt_sigsuspend wrapperMichal Simek3-13/+1
Generic rt_sigsuspend syscalls doesn't need any asm wrapper. Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: nommu: Don't clobber R11 on syscallssteve@digidescorp.com1-2/+0
The noMMU syscall trap has a bug that causes R11 to be zero on return to userland. Remove the extra "save" of R11 responsible for the bug. Remove reloading of mode indicator because r11 already contains it. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Remove show_tmem functionMichal Simek1-10/+0
show_tmem function do nothing that's why I removed it. There is also cleaning of commented ancient code. Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Support for WB cacheMichal Simek4-268/+574
Microblaze version 7.20.d is the first MB version which can be run on MMU linux. Please do not used previous version because they contain HW bug. Based on WB support was necessary to redesign whole cache design. Microblaze versions from 7.20.a don't need to disable IRQ and cache before working with them that's why there are special structures for it. Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Add PVR for Microblaze v7.30.aMichal Simek1-0/+1
Microblaze v7.30.a will have 0x10 version string. Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Remove ancient and fake microblaze version from cpu_ver tableMichal Simek1-5/+0
We need to continue with next microblaze PVR version that's why I have to remove that ancient version. These version strings not match any versions. From Microblaze v5.00.a is possible to use this style. I believe that none use ancients versions. If yes they will be just labeled as unknown version. Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Remove panic_timeout init valueMichal Simek1-2/+0
panic_timeout is in BSS section and it is cleared with BSS section. This means that value is setup to 0. Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Do not count system calls in defaultMichal Simek1-0/+4
There is not necessary to count system calls that's why I added DEBUG macro Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Enable DTC compilationMichal Simek1-0/+3
For simpleImage format we need to compile DTC. There is still possibility to compile only Linux kernel without DTB compiled-in. Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Core oprofile configs and hooksJohn Williams4-0/+39
Microblaze uses timer interrupt mode. Microblaze don't have any performance counter that's why we use just simple implementation. Signed-off-by: John Williams <john.williams@petalogix.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Fix level interrupt ACKingsteve@digidescorp.com1-1/+9
Level interrupts need to be ack'd in the unmask handler, as in powerpc. Among other issues, this bug causes the system clock to appear to run at double-speed. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Enable futimesat syscallMichal Simek1-1/+1
Futimesat was disabled. LTP testing shows that MB has no problem with this syscall. Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Checking DTS against PVR for write-back cacheMichal Simek2-12/+29
WB cache has special flag in PVR. There is added checking mechanism for PVR and DTS. Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Remove duplicity from pgalloc.hMichal Simek1-6/+3
just file cleanup Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Futex supportMichal Simek1-1/+126
Microblaze v7.20 provides new lwx, swx instructions which bring possibility to implement lock rutines. There are some tests in open posix thread LTP part but current toolchain not support it. Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Adding dev_arch_data functionsMichal Simek1-0/+12
The functions, dev_arch_data_set_node and get_node are missing and are needed by some device drivers such as I2C. Signed-off-by: John Linn <john.linn@xilinx.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Fix the heartbeat gpio to be more robustJohn Linn1-5/+10
The device tree handling for the gpio in the heart beat was not handling the system when there was no gpio and it wasn't working with a newer version of the gpio core which does not have the is-bidir property. Signed-off-by: John Linn <john.linn@xilinx.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Simple __copy_tofrom_user for noMMUJohn Williams2-6/+13
This is first patch which clear part of uaccess.h. uaccess.h will be clear later. Signed-off-by: John Williams <john.williams@petalogix.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Export memory_start for modulesMichal Simek1-0/+1
memory_start symbol is needed by kernel modules. Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Use lowest-common-denominator default CPU settingsJohn Williams1-6/+6
This will ensure that kernels built with no custom CPU settings will still boot OK on hardware that has additional CPU hardware instructions etc. Signed-off-by: John Williams <john.williams@petalogix.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Update default generic DTSMichal Simek1-3/+7
It is generated with longer compatible list Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Enable asm optimization only for HW with barrel-shifterMichal Simek1-1/+1
Asm code uses barrel-shifter instruction that's why we have to protect cases when HW don't have it. Reported-by: John Linn <john.linn@xilinx.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Remove the buggy ALLOW_EDIT_AUTO config optionJohn Williams2-28/+8
This was intended to allow manual override of CPU settings copied automatically to Kconfig.auto, however it's problematic for several reasons, but mostly: * If the defconfig doesn't have ALLOW_EDIT_AUTO=y, then it's impossible for that defconfig to iverride the values in the kernel source tree. This leads to very strange errors where the kernel is compiled with the wrong CPUFLAGS. Next patch in the series will back out the default in Kconfig.auto to baseline settings, so a kernel built with no default values will at least boot on any hardware, just not make use of additional CPU features. Signed-off-by: John Williams <john.williams@petalogix.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Move cache macro from cache.h to cacheflush.hMichal Simek3-16/+18
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: support U-BOOT image formatMichal Simek1-2/+13
Two version are generated. linux.bin.ub which is created from linux.bin file and simpleImage.<dts>.ub which is created from stripped simpleImage.<dts> file Load address and entry point is for microblaze first instruction which is CONFIG_KERNEL_BASE_ADDR variable. There is possible for simpleImage format parse _start symbol too. simpleImage.<dts> is still stripped elf file I cleared simpleImage.<dts>.unstrip file because there are so big. Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Ptrace notifying from signal codeMichal Simek1-0/+4
After the signal frame is set up on the userspace stack, ptrace() should be given an opportunity to single-step into the signal handler FRV, Blackfin, mn10300 and UM. Worth to look at that patches. Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Extend cpuinfo for support write-back cachesMichal Simek3-2/+8
There is missing checking agains PVR but this is not important for now. There are some missing checking too. Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Fix cache_line_lenghtMichal Simek4-20/+20
We used cache_line as cache_line_lenght. For this reason we did cache flushing 4 times longer than was necessary. Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Detect new 7.20.d versionMichal Simek1-0/+1
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Support both levels for resetMichal Simek1-4/+6
Till this patch reset always perform writen to 1. Now we can use negative logic and perform reset write to 0. It is opposite level than is currently read from that pin Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Fix announce message for reset gpioMichal Simek1-1/+1
I had to change message for gpio-reset because I always not to see it. Prefix RESET is big and visible. Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Remove saving and restoring before calling signal codeMichal Simek1-4/+0
Saving is done in SAVE_STATE macros that's why another save discard previous saved value. This change has no effect to normal programs because they ends in any exception and they are killed. On the other side has effect on debugging. Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: Fix pfn_valid() for noMMUsteve@digidescorp.com1-1/+2
Configuring DEBUG_SLAB causes a noMMU kernel to die during initialization with an invalid virtual address panic in kfree_debugcheck(). The panic is due to an improper definition of pfn_valid(). Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: ftrace: Add dynamic function graph tracerMichal Simek2-0/+34
This patch add support for dynamic function graph tracer. There is one my expactation that I can do flush_icache after all code modification. On microblaze is this safer than do flush for every entry. For icache is used name flush but correct should be invalidation - this will be fix in upcomming new cache implementaion and WB support. Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-12-14microblaze: ftrace: add function graph supportMichal Simek3-0/+100
For more information look at Documentation/trace folder. Signed-off-by: Michal Simek <monstr@monstr.eu>