1. 23 Feb, 2007 16 commits
  2. 13 Feb, 2007 1 commit
  3. 02 Feb, 2007 6 commits
  4. 18 Jan, 2007 15 commits
    • Russell King's avatar
      [ARM] Provide basic printk_clock() implementation · d57fe6c0
      Russell King authored
      Current sched_clock() implementations on ARM cause unbootable kernels
      with PRINTK_TIME support enabled.  To avoid this, provide a basic
      printk_clock() implementation which avoids sched_clock() being called
      before the page tables have been set up.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      d57fe6c0
    • Russell King's avatar
      [ARM] Fix VFP initialisation issue for SMP systems · 08de961a
      Russell King authored
      When we install the handlers for context switching, we must enable
      VFP on all CPU cores, otherwise undefined (and random) effects
      occur.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      08de961a
    • Richard Purdie's avatar
      [ARM] 4078/1: Fix ARM copypage cache coherency problems · 1b0c9083
      Richard Purdie authored
      If PG_dcache_dirty is set for a page, we need to flush the source page
      before performing any copypage operation using a different virtual address.
      
      This fixes the copypage implementations for XScale, StrongARM and ARMv6.
      
      This patch fixes segmentation faults seen in the dynamic linker under
      the usage patterns in glibc 2.4/2.5.
      Signed-off-by: default avatarRichard Purdie <rpurdie@rpsys.net>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      1b0c9083
    • Russell King's avatar
      [ARM] Fix warnings from asm/system.h · 19eecd50
      Russell King authored
      Move adjust_cr() into arch/arm/mm/mmu.c, and move irqflags.h to
      a more appropriate place in the header file.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      19eecd50
    • Russell King's avatar
      [ARM] Fix BUG()s in ioremap() code · 7a998b09
      Russell King authored
      We need to ensure that the area size is page aligned so that
      remap_area_pte() doesn't increment the address past the end of
      the desired area.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      7a998b09
    • Russell King's avatar
      [ARM] Add more syscalls · 27d9101e
      Russell King authored
      Add:
        sys_unshare
        sys_set_robust_list
        sys_get_robust_list
        sys_splice
        sys_arm_sync_file_range
        sys_tee
        sys_vmsplice
        sys_move_pages
        sys_getcpu
      
      Special note about sys_arm_sync_file_range(), which is implemented as:
      
      asmlinkage long sys_arm_sync_file_range(int fd, unsigned int flags,
                                              loff_t offset, loff_t nbytes)
      {
              return sys_sync_file_range(fd, offset, nbytes, flags);
      }
      
      We can't export sys_sync_file_range() directly on ARM because the
      argument list someone picked does not fit in the available registers.
      Would be nice if... there was an arch maintainer review mechanism for
      new syscalls before they hit the kernel.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      27d9101e
    • Russell King's avatar
      [ARM] Provide a method to alter the control register · b0e407ac
      Russell King authored
      i.MX needs to tweak the control register to support CPU frequency
      scaling.  Rather than have folk blindly try and change the control
      register by writing to it and then wondering why it doesn't work,
      provide a method (which is safe for UP only, and therefore only
      available for UP) to achieve this.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      b0e407ac
    • Nicolas Pitre's avatar
      [ARM] 4016/1: prefetch macro is wrong wrt gcc's "delete-null-pointer-checks" · 563c5768
      Nicolas Pitre authored
       optimization
      
      The gcc manual says:
      
      |`-fdelete-null-pointer-checks'
      |     Use global dataflow analysis to identify and eliminate useless
      |     checks for null pointers.  The compiler assumes that dereferencing
      |     a null pointer would have halted the program.  If a pointer is
      |     checked after it has already been dereferenced, it cannot be null.
      |     Enabled at levels `-O2', `-O3', `-Os'.
      
      Now the problem can be seen with this test case:
      
      #include <linux/prefetch.h>
      extern void bar(char *x);
      void foo(char *x)
      {
      	prefetch(x);
      	if (x)
      		bar(x);
      }
      
      Because the constraint to the inline asm used in the prefetch() macro is
      a memory operand, gcc assumes that the asm code does dereference the
      pointer and the delete-null-pointer-checks optimization kicks in.
      Inspection of generated assembly for the above example shows that bar()
      is indeed called unconditionally without any test on the value of x.
      
      Of course in the prefetch case there is no real dereference and it
      cannot be assumed that a null pointer would have been caught at that
      point. This causes kernel oopses with constructs like
      hlist_for_each_entry() where the list's 'next' content is prefetched
      before the pointer is tested against NULL, and only when gcc feels like
      applying this optimization which doesn't happen all the time with more
      complex code.
      
      It appears that the way to prevent delete-null-pointer-checks
      optimization to occur in this case is to make prefetch() into a static
      inline function instead of a macro. At least this is what is done on
      x86_64 where a similar inline asm memory operand is used (I presume they
      would have seen the same problem if it didn't work) and resulting code
      for the above example confirms that.
      
      An alternative would consist of replacing the memory operand by a
      register operand containing the pointer, and use the addressing mode
      explicitly in the asm template. But that would be less optimal than an
      offsettable memory reference.
      Signed-off-by: default avatarNicolas Pitre <nico@cam.org>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      563c5768
    • Russell King's avatar
      [ARM] Add sys_*at syscalls · 0cb96821
      Russell King authored
      Later glibc requires the *at syscalls.  Add them.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      0cb96821
    • Russell King's avatar
    • Russell King's avatar
      [ARM] Handle HWCAP_VFP in VFP support code · 854de764
      Russell King authored
      Don't set HWCAP_VFP in the processor support file; not only does it
      depend on the processor features, but it also depends on the support
      code being present.  Therefore, only set it if the support code
      detects that we have a VFP coprocessor attached.
      
      Also, move the VFP handling of the coprocessor access register into
      the VFP support code.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      854de764
    • Russell King's avatar
      [ARM] Fix Versatile PB initialisation to use .init_machine · e3b8b8e1
      Russell King authored
      There's no point having the Versatile PB initialisation using an
      arch_initcall() and then checking whether it's running on a
      Versatile PB board - this is what the .init_machine function
      pointer in the machine description is for.  Use it.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      e3b8b8e1
    • Paul Gortmaker's avatar
      [ARM] 3911/2: Simplify alloc_thread_info on ARM · 9f661896
      Paul Gortmaker authored
      Remove ARM local cache of 4 struct thread_info.
      Can cause oops under certain circumstances.
      
      Russell indicated the original optimization was
      required on older kernels to avoid thread starvation
      on memory fragmentation, but may no longer be
      required.  I've updated the patch to 19rc4 and
      ensured no <config.h> dain-bramage slipped in this
      time (sorry about that).
      
      Original description follows:
      
      I was given some test results which pointed to an
      Oops in alloc_thread_info (happened 2x), and after
      looking at the code, I see that ARM has its own
      local cache of 4 struct thread_info. There wasn't
      any clear (to me) synchronization between the
      alloc_thread_info and the free_thread_info.
      
      I looked over the other arch, and they all simply
      allocate them on an as needed basis, so I simplified
      the ARM to do the same, based on the other arch
      (e.g. PPC) and the folks doing the testing have
      indicated that this fixed the oops.
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      9f661896
    • Russell King's avatar
      [ARM] Move HWCAP_* definitions to asm/elf.h · ced6b4c0
      Russell King authored
      Move HWCAP_* definitions into asm/elf.h, where they should belong.
      Since userspace wants to get at these definitions by including
      asm/procinfo.h, include asm/elf.h from this file if __KERNEL__
      is not defined, and issue a warning suggesting to fix the program
      up to use asm/elf.h instead.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      ced6b4c0
    • Russell King's avatar
      [ARM] Include asm/elf.h instead of asm/procinfo.h · e83087d9
      Russell King authored
      These files want to provide/access ELF hwcap information, so should
      be including asm/elf.h rather than asm/procinfo.h
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      e83087d9
  5. 17 Jan, 2007 1 commit
  6. 29 Nov, 2006 1 commit