1. 27 11月, 2007 2 次提交
    • N
      [ARM] 4659/1: remove possibilities for spurious false negative with __kuser_cmpxchg · b49c0f24
      Nicolas Pitre 提交于
      The ARM __kuser_cmpxchg routine is meant to implement an atomic cmpxchg
      in user space.  It however can produce spurious false negative if a
      processor exception occurs in the middle of the operation.  Normally
      this is not a problem since cmpxchg is typically called in a loop until
      it succeeds to implement an atomic increment for example.
      
      Some use cases which don't involve a loop require that the operation be
      100% reliable though.  This patch changes the implementation so to
      reattempt the operation after an exception has occurred in the critical
      section rather than abort it.
      
      Here's a simple program to test the fix (don't use CONFIG_NO_HZ in your
      kernel as this depends on a sufficiently high interrupt rate):
      
      	#include <stdio.h>
      
      	typedef int (__kernel_cmpxchg_t)(int oldval, int newval, int *ptr);
      	#define __kernel_cmpxchg (*(__kernel_cmpxchg_t *)0xffff0fc0)
      
      	int main()
      	{
      		int i, x = 0;
      		for (i = 0; i < 100000000; i++) {
      			int v = x;
      			if (__kernel_cmpxchg(v, v+1, &x))
      				printf("failed at %d: %d vs %d\n", i, v, x);
      		}
      		printf("done with %d vs %d\n", i, x);
      		return 0;
      	}
      Signed-off-by: NNicolas Pitre <nico@marvell.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      b49c0f24
    • N
      [ARM] 4661/1: fix do_undefinstr wrt the enabling of IRQs · aeb747af
      Nicolas Pitre 提交于
      The lock is acquired with spin_lock_irqsave() and released in the
      not-found case with spin_unlock_irqrestore().
      Signed-off-by: NNicolas Pitre <nico@marvell.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      aeb747af
  2. 20 10月, 2007 1 次提交
  3. 17 10月, 2007 2 次提交
  4. 16 10月, 2007 1 次提交
  5. 13 10月, 2007 3 次提交
    • M
      [ARM] 4599/1: Preserve ATAG list for use with kexec (2.6.23) · 033b8ffe
      Mike Westerhof 提交于
      This patch resolves a kexec boot failure that can occur because
      no ATAGs are passed in to the kexec'd kernel. Currently the
      newly-kexec'd kernel may fail if it requires specific ATAGs, or
      it may fail because the fixed memory location at which it expects
      to find the ATAGs may contain random data instead of ATAGs.
      
      The patch ensures that any ATAGs passed to the current kernel
      at boot time are copied to a static buffer, and are copied back
      when kexec copies the new kernel into place. Thus the new
      kernel sees the same ATAGs from kexec and the boot loader.
      
      The boot parameters are copied without regard to type, content,
      or length -- this patch's scope is limited soley to saving and
      restoring a fixed-size block of memory containing the kernel's
      boot parameters. Additional functionality to examine, alter, or
      replace the ATAGs (using kexec, for example) can be implemented
      by manipulating the static buffer containing the preserved ATAGs.
      
      Note: the size of the buffer (1.5KB) is selected to comfortably
      hold one of each ATAG type, including a maximum-length command
      line and the maximum number of ATAG_MEM structures currently
      supported by the kernel. Should an ATAG list exceed that limit,
      the list will be silently truncated to that limit (to do other-
      wise at that point in the boot process would make a simple
      problem exceedingly complicated).
      
      [Note: this is the same patch as 4579, modified to accomodate
      the ATAG changes introduced in 2.6.23]
      
      Signed-off-by: Mike Westerhof <mwester at dls.net>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      033b8ffe
    • R
      [ARM] Add fallocate syscall entry · 883042d6
      Russell King 提交于
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      883042d6
    • C
      [ARM] 4585/1: Correctly identify the CPU architecture version · 180005c4
      Catalin Marinas 提交于
      The cpu_architecture() function in arch/arm/kernel/setup.c only works
      with cores produced by ARM Ltd. The more generic approach is to read
      the ID_MMFR0 register and check for the VMSA or PMSA version
      supported. With this patch, the ARM11MPCore would be reported as ARMv7
      since its MMU is compatible with ARMv7.
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      180005c4
  6. 01 10月, 2007 1 次提交
    • R
      [ARM] Resolve PCI section warnings · 46edfc54
      Russell King 提交于
      Fix the following (valid) section warnings:
      
      WARNING: vmlinux.o(.text+0xf7b5c): Section mismatch: reference to .init.text:pcibios_fixup_bus (between 'pci_scan_child_bus' and 'pci_scan_bridge')
      WARNING: vmlinux.o(.text+0xfc5f4): Section mismatch: reference to .init.text:pcibios_resource_to_bus (between 'pci_map_rom' and 'pci_unmap_rom')
      WARNING: vmlinux.o(.text+0xfc824): Section mismatch: reference to .init.text:pcibios_resource_to_bus (between 'pci_update_resource' and 'pci_claim_resource')
      WARNING: vmlinux.o(.text+0xfd6d8): Section mismatch: reference to .init.text:pcibios_resource_to_bus (between 'pci_setup_cardbus' and 'find_free_bus_resource')
      WARNING: vmlinux.o(.text+0xfd730): Section mismatch: reference to .init.text:pcibios_resource_to_bus (between 'pci_setup_cardbus' and 'find_free_bus_resource')
      WARNING: vmlinux.o(.text+0xfd788): Section mismatch: reference to .init.text:pcibios_resource_to_bus (between 'pci_setup_cardbus' and 'find_free_bus_resource')
      WARNING: vmlinux.o(.text+0xfd7e0): Section mismatch: reference to .init.text:pcibios_resource_to_bus (between 'pci_setup_cardbus' and 'find_free_bus_resource')
      WARNING: vmlinux.o(.text+0xfe024): Section mismatch: reference to .init.text:pcibios_resource_to_bus (between 'pci_bus_assign_resources' and 'sys_pciconfig_read')
      WARNING: vmlinux.o(.text+0xfe0f4): Section mismatch: reference to .init.text:pcibios_resource_to_bus (between 'pci_bus_assign_resources' and 'sys_pciconfig_read')
      WARNING: vmlinux.o(.text+0xfe17c): Section mismatch: reference to .init.text:pcibios_resource_to_bus (between 'pci_bus_assign_resources' and 'sys_pciconfig_read')
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      46edfc54
  7. 01 8月, 2007 1 次提交
  8. 30 7月, 2007 1 次提交
    • A
      Remove fs.h from mm.h · 4e950f6f
      Alexey Dobriyan 提交于
      Remove fs.h from mm.h. For this,
       1) Uninline vma_wants_writenotify(). It's pretty huge anyway.
       2) Add back fs.h or less bloated headers (err.h) to files that need it.
      
      As result, on x86_64 allyesconfig, fs.h dependencies cut down from 3929 files
      rebuilt down to 3444 (-12.3%).
      
      Cross-compile tested without regressions on my two usual configs and (sigh):
      
      alpha              arm-mx1ads        mips-bigsur          powerpc-ebony
      alpha-allnoconfig  arm-neponset      mips-capcella        powerpc-g5
      alpha-defconfig    arm-netwinder     mips-cobalt          powerpc-holly
      alpha-up           arm-netx          mips-db1000          powerpc-iseries
      arm                arm-ns9xxx        mips-db1100          powerpc-linkstation
      arm-assabet        arm-omap_h2_1610  mips-db1200          powerpc-lite5200
      arm-at91rm9200dk   arm-onearm        mips-db1500          powerpc-maple
      arm-at91rm9200ek   arm-picotux200    mips-db1550          powerpc-mpc7448_hpc2
      arm-at91sam9260ek  arm-pleb          mips-ddb5477         powerpc-mpc8272_ads
      arm-at91sam9261ek  arm-pnx4008       mips-decstation      powerpc-mpc8313_rdb
      arm-at91sam9263ek  arm-pxa255-idp    mips-e55             powerpc-mpc832x_mds
      arm-at91sam9rlek   arm-realview      mips-emma2rh         powerpc-mpc832x_rdb
      arm-ateb9200       arm-realview-smp  mips-excite          powerpc-mpc834x_itx
      arm-badge4         arm-rpc           mips-fulong          powerpc-mpc834x_itxgp
      arm-carmeva        arm-s3c2410       mips-ip22            powerpc-mpc834x_mds
      arm-cerfcube       arm-shannon       mips-ip27            powerpc-mpc836x_mds
      arm-clps7500       arm-shark         mips-ip32            powerpc-mpc8540_ads
      arm-collie         arm-simpad        mips-jazz            powerpc-mpc8544_ds
      arm-corgi          arm-spitz         mips-jmr3927         powerpc-mpc8560_ads
      arm-csb337         arm-trizeps4      mips-malta           powerpc-mpc8568mds
      arm-csb637         arm-versatile     mips-mipssim         powerpc-mpc85xx_cds
      arm-ebsa110        i386              mips-mpc30x          powerpc-mpc8641_hpcn
      arm-edb7211        i386-allnoconfig  mips-msp71xx         powerpc-mpc866_ads
      arm-em_x270        i386-defconfig    mips-ocelot          powerpc-mpc885_ads
      arm-ep93xx         i386-up           mips-pb1100          powerpc-pasemi
      arm-footbridge     ia64              mips-pb1500          powerpc-pmac32
      arm-fortunet       ia64-allnoconfig  mips-pb1550          powerpc-ppc64
      arm-h3600          ia64-bigsur       mips-pnx8550-jbs     powerpc-prpmc2800
      arm-h7201          ia64-defconfig    mips-pnx8550-stb810  powerpc-ps3
      arm-h7202          ia64-gensparse    mips-qemu            powerpc-pseries
      arm-hackkit        ia64-sim          mips-rbhma4200       powerpc-up
      arm-integrator     ia64-sn2          mips-rbhma4500       s390
      arm-iop13xx        ia64-tiger        mips-rm200           s390-allnoconfig
      arm-iop32x         ia64-up           mips-sb1250-swarm    s390-defconfig
      arm-iop33x         ia64-zx1          mips-sead            s390-up
      arm-ixp2000        m68k              mips-tb0219          sparc
      arm-ixp23xx        m68k-amiga        mips-tb0226          sparc-allnoconfig
      arm-ixp4xx         m68k-apollo       mips-tb0287          sparc-defconfig
      arm-jornada720     m68k-atari        mips-workpad         sparc-up
      arm-kafa           m68k-bvme6000     mips-wrppmc          sparc64
      arm-kb9202         m68k-hp300        mips-yosemite        sparc64-allnoconfig
      arm-ks8695         m68k-mac          parisc               sparc64-defconfig
      arm-lart           m68k-mvme147      parisc-allnoconfig   sparc64-up
      arm-lpd270         m68k-mvme16x      parisc-defconfig     um-x86_64
      arm-lpd7a400       m68k-q40          parisc-up            x86_64
      arm-lpd7a404       m68k-sun3         powerpc              x86_64-allnoconfig
      arm-lubbock        m68k-sun3x        powerpc-cell         x86_64-defconfig
      arm-lusl7200       mips              powerpc-celleb       x86_64-up
      arm-mainstone      mips-atlas        powerpc-chrp32
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4e950f6f
  9. 26 7月, 2007 1 次提交
  10. 23 7月, 2007 1 次提交
  11. 20 7月, 2007 1 次提交
    • F
      define new percpu interface for shared data · 5fb7dc37
      Fenghua Yu 提交于
      per cpu data section contains two types of data.  One set which is
      exclusively accessed by the local cpu and the other set which is per cpu,
      but also shared by remote cpus.  In the current kernel, these two sets are
      not clearely separated out.  This can potentially cause the same data
      cacheline shared between the two sets of data, which will result in
      unnecessary bouncing of the cacheline between cpus.
      
      One way to fix the problem is to cacheline align the remotely accessed per
      cpu data, both at the beginning and at the end.  Because of the padding at
      both ends, this will likely cause some memory wastage and also the
      interface to achieve this is not clean.
      
      This patch:
      
      Moves the remotely accessed per cpu data (which is currently marked
      as ____cacheline_aligned_in_smp) into a different section, where all the data
      elements are cacheline aligned. And as such, this differentiates the local
      only data and remotely accessed data cleanly.
      Signed-off-by: NFenghua Yu <fenghua.yu@intel.com>
      Acked-by: NSuresh Siddha <suresh.b.siddha@intel.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Christoph Lameter <clameter@sgi.com>
      Cc: <linux-arch@vger.kernel.org>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5fb7dc37
  12. 18 7月, 2007 3 次提交
  13. 12 7月, 2007 2 次提交
  14. 06 7月, 2007 1 次提交
  15. 29 6月, 2007 1 次提交
    • D
      Introduce fixed sys_sync_file_range2() syscall, implement on PowerPC and ARM · edd5cd4a
      David Woodhouse 提交于
      Not all the world is an i386.  Many architectures need 64-bit arguments to be
      aligned in suitable pairs of registers, and the original
      sys_sync_file_range(int, loff_t, loff_t, int) was therefore wasting an
      argument register for padding after the first integer.  Since we don't
      normally have more than 6 arguments for system calls, that left no room for
      the final argument on some architectures.
      
      Fix this by introducing sys_sync_file_range2(int, int, loff_t, loff_t) which
      all fits nicely.  In fact, ARM already had that, but called it
      sys_arm_sync_file_range.  Move it to fs/sync.c and rename it, then implement
      the needed compatibility routine.  And stop the missing syscall check from
      bitching about the absence of sys_sync_file_range() if we've implemented
      sys_sync_file_range2() instead.
      
      Tested on PPC32 and with 32-bit and 64-bit userspace on PPC64.
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      edd5cd4a
  16. 18 6月, 2007 1 次提交
    • R
      [ARM] Update show_regs/oops register format · 154c772e
      Russell King 提交于
      Add the kernel release and version information to the output of
      show_regs/oops.  Add the CPU PSR register.  Avoid using printk
      to output partial lines; always output a complete line.
      
      Re-combine the "Control" and "Table + DAC" lines after nommu
      separated them; we don't want to waste vertical screen space
      needlessly.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      154c772e
  17. 17 6月, 2007 1 次提交
  18. 30 5月, 2007 2 次提交
  19. 21 5月, 2007 2 次提交
  20. 19 5月, 2007 2 次提交
  21. 17 5月, 2007 1 次提交
    • R
      [ARM] ARMv6: add CPU_HAS_ASID configuration · 516793c6
      Russell King 提交于
      Presently, we check for the minimum ARM architecture that we're
      building for to determine whether we need ASID support.  This is
      wrong - if we're going to support a range of CPUs which include
      ARMv6 or higher, we need the ASID.
      
      Convert the checks to use a new configuration symbol, and arrange
      for ARMv6 and higher CPU entries to select it.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      516793c6
  22. 16 5月, 2007 2 次提交
  23. 12 5月, 2007 5 次提交
  24. 09 5月, 2007 2 次提交