1. 21 Jan, 2010 1 commit
    • Paul Mundt's avatar
      sh: initial PMB mapping iteration by helper macro. · 77c2019f
      Paul Mundt authored
      All of the cached/uncached mapping setup is duplicated for each size, and
      also misses out on the 16MB case. Rather than duplicating the same iter
      code for that we just consolidate it in to a helper macro that builds an
      iter for each size. The 16MB case is then trivially bolted on at the end.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      77c2019f
  2. 20 Jan, 2010 8 commits
    • Paul Mundt's avatar
      sh: pretty print virtual memory map on boot. · 35f99c0d
      Paul Mundt authored
      This cribs the pretty printing from arch/x86/mm/init_32.c to dump the
      virtual memory layout on boot. This is primarily intended as a debugging
      aid, given that the newer CPUs have full control over their address space
      and as such have little to nothing in common with the legacy layout.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      35f99c0d
    • Paul Mundt's avatar
      sh: mach-sdk7786: Probe system FPGA area mapping. · d9116d07
      Paul Mundt authored
      This implements dynamic probing for the system FPGA. The system reset
      controller contains a fixed magic read word in order to identify the
      FPGA. This just utilizes a simple loop that scans across all of the fixed
      physical areas (area 0 through area 6) to locate the FPGA.
      
      The FPGA also contains register information detailing the area mappings
      and chip select settings for all of the other blocks, so this needs to be
      done before we can set up anything else.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      d9116d07
    • Paul Mundt's avatar
      sh: Correct iounmap fixmap teardown. · 920efaab
      Paul Mundt authored
      iounmap_fixed() had a couple of bugs in it that caused it to effectively
      fail at life. The total number of pages to unmap factored in the mapping
      offset and aligned up to the next page boundary, which doesn't match the
      ioremap_fixed() behaviour.
      
      When ioremap_fixed() pegs a slot, the address in the mapping data already
      contains the offset displacement, and the size is recorded verbatim given
      that we're only interested in total number of pages required. As such, we
      need to calculate the total number from the original size in the unmap
      path as well.
      
      At the same time, there was also an off-by-1 problem in the fixmap index
      calculation which has also been corrected.
      
      Previously subsequent remaps of an identical fixmap index would trigger
      the pte_ERROR() in set_pte_phys():
      
      	arch/sh/mm/init.c:77: bad pte 8053ffb0(0000781003fff506).
      	arch/sh/mm/init.c:77: bad pte 8053ffb0(0000781003fff506).
      	arch/sh/mm/init.c:77: bad pte 8053ffb0(0000781003fff506).
      	arch/sh/mm/init.c:77: bad pte 8053ffb0(0000781003fff506).
      	arch/sh/mm/init.c:77: bad pte 8053ffb0(0000781003fff506).
      	arch/sh/mm/init.c:77: bad pte 8053ffb0(0000781003fff506).
      
      With this patch in place, the iounmap-driven fixmap teardown actually
      does what it's supposed to do.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      920efaab
    • Paul Mundt's avatar
      sh: mach-sdk7786: reset controller reboot support. · b51989b8
      Paul Mundt authored
      This wires up the machine_ops reboot call to use the system reset
      controller.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      b51989b8
    • Paul Mundt's avatar
      sh: machine_ops based reboot support. · fbb82b03
      Paul Mundt authored
      This provides a machine_ops-based reboot interface loosely cloned from
      x86, and converts the native sh32 and sh64 cases over to it.
      
      Necessary both for tying in SMP support and also enabling platforms like
      SDK7786 to add support for their microcontroller-based power managers.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      fbb82b03
    • Paul Mundt's avatar
      sh: Make 29/32-bit mode check helper generally available. · 2efa53b2
      Paul Mundt authored
      Presently __in_29bit_mode() is only defined for the PMB case, but
      it's also easily derived from the CONFIG_29BIT and CONFIG_32BIT &&
      CONFIG_PMB=n cases.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      2efa53b2
    • Paul Mundt's avatar
      sh: mach-sdk7786: Split out FPGA IRQ controller setup. · 5f240718
      Paul Mundt authored
      This moves out the FPGA IRQ controller setup code to its own file, in
      preparation for switching off of IRL mode and having it provide its own
      irq_chip.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      5f240718
    • Paul Mundt's avatar
      sh: mach-sdk7786: FPGA updates. · efd590d5
      Paul Mundt authored
      This does a bit of refactoring of the FPGA management code. The primary
      FPGA initialization is moved out to its own file in preparation for
      implementing some of the more complex capabilities, a complete set of
      register definitions is provided, and all of the existing users in the
      board code are moved over to use the new interface instead of setting up
      overlapping mappings. This also corrects the FPGA size, which previously
      was chomped off at the SDIF control register.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      efd590d5
  3. 19 Jan, 2010 19 commits
  4. 18 Jan, 2010 10 commits
  5. 17 Jan, 2010 2 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 · 7dc9c484
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
        do_add_mount() should sanitize mnt_flags
        CIFS shouldn't make mountpoints shrinkable
        mnt_flags fixes in do_remount()
        attach_recursive_mnt() needs to hold vfsmount_lock over set_mnt_shared()
        may_umount() needs namespace_sem
        Fix configfs leak
        Fix the -ESTALE handling in do_filp_open()
        ecryptfs: Fix refcnt leak on ecryptfs_follow_link() error path
        Fix ACC_MODE() for real
        Unrot uml mconsole a bit
        hppfs: handle ->put_link()
        Kill 9p readlink()
        fix autofs/afs/etc. magic mountpoint breakage
      7dc9c484
    • Mike Frysinger's avatar
      modpost: fix segfault in sym_is() with prefixed arches · 3a5dd791
      Mike Frysinger authored
      The sym_is() compares a symbol in an attempt to automatically skip symbol
      prefixes.  It does this first by searching the real symbol with the normal
      unprefixed symbol.  But then it uses the length of the original symbol to
      check the end of the substring instead of the length of the symbol it is
      looking for.  On non-prefixed arches, this is effectively the same thing,
      so there is no problem.  On prefixed-arches, since this is exceeds by just
      one byte, a crash is rare and it is usually a NUL byte anyways.  But every
      once in a blue moon, you get the right page alignment and it segfaults.
      
      For example, on the Blackfin arch, sym_is() will be called with the real
      symbol "___mod_usb_device_table" as "symbol" when looking for the normal
      symbol "__mod_usb_device_table" as "name".  The substring will thus return
      one byte into "symbol" and store it into "match".  But then "match" will
      be indexed with the length of "symbol" instead of "name" and so we will
      exceed the storage.  i.e. the code ends up doing:
      	char foo[] = "abc"; return foo[strlen(foo)+1] == '\0';
      Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3a5dd791