1. Nov 28, 2008
    • Nicolas Pitre's avatar
      [ARM] fix a couple clear_user_highpage assembly constraints · 43ae286b
      Nicolas Pitre authored
      
      
      In all cases the kaddr is assigned an input register even though it is
      modified in the assembly code.  Let's assign a new variable to the
      modified value and mark those inline asm with volatile otherwise they
      get optimized away because the output variable is otherwise not used.
      
      Also fix a few conversion errors in copypage-feroceon.c and
      copypage-v4mc.c.
      
      Signed-off-by: default avatarNicolas Pitre <nico@marvell.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      43ae286b
    • Russell King's avatar
      [ARM] clearpage: provide our own clear_user_highpage() · 303c6443
      Russell King authored
      
      
      For similar reasons as copy_user_page(), we want to avoid the
      additional kmap_atomic if it's unnecessary.
      
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      303c6443
    • Russell King's avatar
      [ARM] copypage: provide our own copy_user_highpage() · 063b0a42
      Russell King authored
      
      
      We used to override the copy_user_page() function.  However, this
      is not only inefficient, it also causes additional complexity for
      highmem support, since we convert from a struct page to a kernel
      direct mapped address and back to a struct page again.
      
      Moreover, with highmem support, we end up pointlessly setting up
      kmap entries for pages which we're going to remap.  So, push the
      kmapping down into the copypage implementation files where it's
      required.
      
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      063b0a42
    • Russell King's avatar
      d73e60b7
    • Russell King's avatar
      Allow architectures to override copy_user_highpage() · 487ff320
      Russell King authored
      
      
      With aliasing VIPT cache support, the ARM implementation of
      clear_user_page() and copy_user_page() sets up a temporary kernel space
      mapping such that we have the same cache colour as the userspace page.
      This avoids having to consider any userspace aliases from this operation.
      
      However, when highmem is enabled, kmap_atomic() have to setup mappings.
      The copy_user_highpage() and clear_user_highpage() call these functions
      before delegating the copies to copy_user_page() and clear_user_page().
      
      The effect of this is that each of the *_user_highpage() functions setup
      their own kmap mapping, followed by the *_user_page() functions setting
      up another mapping.  This is rather wasteful.
      
      Thankfully, copy_user_highpage() can be overriden by architectures by
      defining __HAVE_ARCH_COPY_USER_HIGHPAGE.  However, replacement of
      clear_user_highpage() is more difficult because its inline definition
      is not conditional.  It seems that you're expected to define
      __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE and provide a replacement
      __alloc_zeroed_user_highpage() implementation instead.
      
      The allocation itself is fine, so we don't want to override that.  What
      we really want to do is to override clear_user_highpage() with our own
      version which doesn't kmap_atomic() unnecessarily.
      
      Other VIPT architectures (PARISC and SH) would also like to override
      this function as well.
      
      Acked-by: default avatarHugh Dickins <hugh@veritas.com>
      Acked-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
      Acked-by: default avatarPaul Mundt <lethal@linux-sh.org>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      487ff320
  2. Nov 27, 2008
  3. Nov 26, 2008
  4. Nov 25, 2008
    • Tony Lindgren's avatar
      ARM: OMAP: Remove broken LCD driver for SX1 · 7953031d
      Tony Lindgren authored
      
      
      Recently the omap McBSP code was cleaned up to get rid of
      direct McBSP register tinkering by the drivers. Looks like
      lcd_sx1.c never got converted, and now it breaks builds.
      
      It seems the lcd_sx1.c driver is attempting SPI mode, but
      doing it in a different way compared to omap_mcbsp_set_spi_mode().
      
      Remove the broken driver, patches welcome to add it back when
      done properly by patching both mcbsp.c and lcd_sx1.c.
      
      Cc: Vovan888@gmail.com
      Cc: linux-fbdev-devel@lists.sourceforge.net
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      7953031d
  5. Nov 23, 2008
  6. Nov 22, 2008
  7. Nov 21, 2008
  8. Nov 20, 2008
    • Alexey Dobriyan's avatar
      net: fix tiny output corruption of /proc/net/snmp6 · 5ece6c2d
      Alexey Dobriyan authored
      
      
      Because "name" is static, it can be occasionally be filled with
      somewhat garbage if two processes read /proc/net/snmp6.
      
      Also, remove useless casts and "-1" -- snprintf() correctly terminates it's
      output.
      
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5ece6c2d
    • Alan Jenkins's avatar
      atl2: don't request irq on resume if netif running · a849854f
      Alan Jenkins authored
      
      
      If the device is suspended with the cable disconnected, then
      resumed with the cable connected, dev->open is called before
      resume. During resume, we request an IRQ, but the IRQ was
      already assigned during dev->open, resulting in the warning
      shown below.
      
      Don't request an IRQ if the device is running.
      
      Call Trace:
       [<c011b89a>] warn_on_slowpath+0x40/0x59
       [<c023df15>] raw_pci_read+0x4d/0x55
       [<c023dff3>] pci_read+0x1c/0x21
       [<c01bcd81>] __pci_find_next_cap_ttl+0x44/0x70
       [<c01bce86>] __pci_find_next_cap+0x1a/0x1f
       [<c01bcef9>] pci_find_capability+0x28/0x2c
       [<c01c4144>] pci_msi_check_device+0x53/0x62
       [<c01c49c2>] pci_enable_msi+0x3a/0x1cd
       [<e019f17b>] atl2_write_phy_reg+0x40/0x5f [atl2]
       [<c01061b1>] dma_generic_alloc_coherent+0x0/0xd7
       [<e019f107>] atl2_request_irq+0x15/0x49 [atl2]
       [<e01a1481>] atl2_open+0x20b/0x297 [atl2]
       [<c024a35c>] dev_open+0x62/0x91
       [<c0248b9a>] dev_change_flags+0x93/0x141
       [<c024f308>] do_setlink+0x238/0x2d5
       [<c02501b2>] rtnl_setlink+0xa9/0xbf
       [<c0297f0c>] mutex_lock+0xb/0x19
       [<c024ffa7>] rtnl_dump_ifinfo+0x0/0x69
       [<c0250109>] rtnl_setlink+0x0/0xbf
       [<c024fe42>] rtnetlink_rcv_msg+0x185/0x19f
       [<c0240fd1>] sock_rmalloc+0x23/0x57
       [<c024fcbd>] rtnetlink_rcv_msg+0x0/0x19f
       [<c0259457>] netlink_rcv_skb+0x2d/0x71
       [<c024fcb7>] rtnetlink_rcv+0x14/0x1a
       [<c025929e>] netlink_unicast+0x184/0x1e4
       [<c025992a>] netlink_sendmsg+0x233/0x240
       [<c023f405>] sock_sendmsg+0xb7/0xd0
       [<c0129131>] autoremove_wake_function+0x0/0x2b
       [<c0129131>] autoremove_wake_function+0x0/0x2b
       [<c0147796>] mempool_alloc+0x2d/0x9e
       [<c020c923>] scsi_pool_alloc_command+0x35/0x4f
       [<c0297f0c>] mutex_lock+0xb/0x19
       [<c028e867>] unix_stream_recvmsg+0x357/0x3e2
       [<c01b81c9>] copy_from_user+0x23/0x4f
       [<c02452ea>] verify_iovec+0x3e/0x6c
       [<c023f5ab>] sys_sendmsg+0x18d/0x1f0
       [<c023ffa8>] sys_recvmsg+0x146/0x1c8
       [<c0240016>] sys_recvmsg+0x1b4/0x1c8
       [<c0118f48>] __wake_up+0xf/0x15
       [<c02586cd>] netlink_table_ungrab+0x17/0x19
       [<c01b83ba>] copy_to_user+0x25/0x3b
       [<c023fe4a>] move_addr_to_user+0x50/0x68
       [<c0240266>] sys_getsockname+0x6f/0x9a
       [<c0240280>] sys_getsockname+0x89/0x9a
       [<c015046a>] do_wp_page+0x3ae/0x41a
       [<c0151525>] handle_mm_fault+0x4c5/0x540
       [<c02405d0>] sys_socketcall+0x176/0x1b0
       [<c010376d>] sysenter_do_call+0x12/0x21
      
      Signed-off-by: default avatarAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Signed-off-by: default avatarJay Cliburn <jcliburn@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a849854f
    • Benjamin Thery's avatar
      ipv6: use seq_release_private for ip6mr.c /proc entries · eedd726e
      Benjamin Thery authored
      
      
      In ip6mr.c, /proc entries /proc/net/ip6_mr_cache and /proc/net/ip6_mr_vif
      are opened with seq_open_private(), thus seq_release_private() should be 
      used to release them.
      Should fix a small memory leak.
      
      Signed-off-by: default avatarBenjamin Thery <benjamin.thery@bull.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      eedd726e