1. 29 Jul, 2009 5 commits
  2. 28 Jul, 2009 2 commits
    • Dave Airlie's avatar
      drm/radeon/kms: add initial colortiling support. · e024e110
      Dave Airlie authored
      This adds new set/get tiling interfaces where the pitch
      and macro/micro tiling enables can be set. Along with
      a flag to decide if this object should have a surface when mapped.
      
      The only thing we need to allocate with a mapped surface should be
      the frontbuffer. Note rotate scanout shouldn't require one, and
      back/depth shouldn't either, though mesa needs some fixes.
      
      It fixes the TTM interfaces along Thomas's suggestions, and I've tested
      the surface stealing code with two X servers and not seen any lockdep issues.
      
      I've stopped tiling the fbcon frontbuffer, as I don't see there being
      any advantage other than testing, I've left the testing commands in there,
      just flip the fb_tiled to true in radeon_fb.c
      
      Open: Can we integrate endian swapping in with this?
      
      Future features:
      texture tiling - need to relocate texture registers TXOFFSET* with tiling info.
      
      This also merges Michel's cleanup surfaces regs at init time patch
      even though it makes sense on its own, this patch really relies on it.
      
      Some PowerMac firmwares set up a tiling surface at the beginning of VRAM
      which messes us up otherwise.
      that patch is:
      Signed-off-by: default avatarMichel Dänzer <daenzer@vmware.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      e024e110
    • Tejun Heo's avatar
      libata: accept late unlocking of HPA · 5920dadf
      Tejun Heo authored
      On certain configurations, HPA isn't or can't be unlocked during
      probing but it somehow ends up unlocked afterwards.  In the following
      thread, the problem can be reliably reproduced after resuming from
      STR.  The BIOS turns on HPA during boot but forgets to do it during
      resume.
      
        http://thread.gmane.org/gmane.linux.kernel/858310
      
      This patch updates libata revalidation such that it considers native
      n_sectors.  If the device size has increased to match native
      n_sectors, it's assumed that HPA has been unlocked involuntarily and
      the device is recognized as the same one.  This should be fairly safe
      while nicely working around the problem.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Reported-by: default avatarChristof Warlich <christof@warlich.name>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      5920dadf
  3. 27 Jul, 2009 1 commit
    • Benjamin Herrenschmidt's avatar
      mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() · 9e1b32ca
      Benjamin Herrenschmidt authored
      mm: Pass virtual address to [__]p{te,ud,md}_free_tlb()
      
      Upcoming paches to support the new 64-bit "BookE" powerpc architecture
      will need to have the virtual address corresponding to PTE page when
      freeing it, due to the way the HW table walker works.
      
      Basically, the TLB can be loaded with "large" pages that cover the whole
      virtual space (well, sort-of, half of it actually) represented by a PTE
      page, and which contain an "indirect" bit indicating that this TLB entry
      RPN points to an array of PTEs from which the TLB can then create direct
      entries. Thus, in order to invalidate those when PTE pages are deleted,
      we need the virtual address to pass to tlbilx or tlbivax instructions.
      
      The old trick of sticking it somewhere in the PTE page struct page sucks
      too much, the address is almost readily available in all call sites and
      almost everybody implemets these as macros, so we may as well add the
      argument everywhere. I added it to the pmd and pud variants for consistency.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: David Howells <dhowells@redhat.com> [MN10300 & FRV]
      Acked-by: default avatarNick Piggin <npiggin@suse.de>
      Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> [s390]
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9e1b32ca
  4. 26 Jul, 2009 1 commit
  5. 24 Jul, 2009 1 commit
  6. 23 Jul, 2009 1 commit
  7. 22 Jul, 2009 3 commits
    • Anton Vorontsov's avatar
      of/mdio: Add support function for Ethernet fixed-link property · 24c30dbb
      Anton Vorontsov authored
      Fixed-link support is broken for the ucc_eth, gianfar, and fs_enet
      device drivers.  The "OF MDIO rework" patches removed most of the
      support. Instead of re-adding fixed-link stuff to the drivers, this
      patch adds a support function for parsing the fixed-link property
      and obtaining a dummy phy to match.
      
      Note: the dummy phy handling in arch/powerpc is a bit of a hack and
      needs to be reworked.  This function is being added now to solve the
      regression in the Ethernet drivers, but it should be considered a
      temporary measure until the fixed link handling can be reworked.
      Signed-off-by: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      24c30dbb
    • Peter Zijlstra's avatar
      perf_counter: PERF_SAMPLE_ID and inherited counters · 7f453c24
      Peter Zijlstra authored
      Anton noted that for inherited counters the counter-id as provided by
      PERF_SAMPLE_ID isn't mappable to the id found through PERF_RECORD_ID
      because each inherited counter gets its own id.
      
      His suggestion was to always return the parent counter id, since that
      is the primary counter id as exposed. However, these inherited
      counters have a unique identifier so that events like
      PERF_EVENT_PERIOD and PERF_EVENT_THROTTLE can be specific about which
      counter gets modified, which is important when trying to normalize the
      sample streams.
      
      This patch removes PERF_EVENT_PERIOD in favour of PERF_SAMPLE_PERIOD,
      which is more useful anyway, since changing periods became a lot more
      common than initially thought -- rendering PERF_EVENT_PERIOD the less
      useful solution (also, PERF_SAMPLE_PERIOD reports the more accurate
      value, since it reports the value used to trigger the overflow,
      whereas PERF_EVENT_PERIOD simply reports the requested period changed,
      which might only take effect on the next cycle).
      
      This still leaves us PERF_EVENT_THROTTLE to consider, but since that
      _should_ be a rare occurrence, and linking it to a primary id is the
      most useful bit to diagnose the problem, we introduce a
      PERF_SAMPLE_STREAM_ID, for those few cases where the full
      reconstruction is important.
      
      [Does change the ABI a little, but I see no other way out]
      Suggested-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <1248095846.15751.8781.camel@twins>
      7f453c24
    • Peter Zijlstra's avatar
      softirq: introduce tasklet_hrtimer infrastructure · 9ba5f005
      Peter Zijlstra authored
      commit ca109491 (hrtimer: removing all ur callback modes) moved all
      hrtimer callbacks into hard interrupt context when high resolution
      timers are active. That breaks code which relied on the assumption
      that the callback happens in softirq context.
      
      Provide a generic infrastructure which combines tasklets and hrtimers
      together to provide an in-softirq hrtimer experience.
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: torvalds@linux-foundation.org
      Cc: kaber@trash.net
      Cc: David Miller <davem@davemloft.net>
      LKML-Reference: <1248265724.27058.1366.camel@twins>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      9ba5f005
  8. 21 Jul, 2009 3 commits
    • Eric Paris's avatar
      inotify: use GFP_NOFS under potential memory pressure · f44aebcc
      Eric Paris authored
      inotify can have a watchs removed under filesystem reclaim.
      
      =================================
      [ INFO: inconsistent lock state ]
      2.6.31-rc2 #16
      ---------------------------------
      inconsistent {IN-RECLAIM_FS-W} -> {RECLAIM_FS-ON-W} usage.
      khubd/217 [HC0[0]:SC0[0]:HE1:SE1] takes:
       (iprune_mutex){+.+.?.}, at: [<c10ba899>] invalidate_inodes+0x20/0xe3
      {IN-RECLAIM_FS-W} state was registered at:
        [<c10536ab>] __lock_acquire+0x2c9/0xac4
        [<c1053f45>] lock_acquire+0x9f/0xc2
        [<c1308872>] __mutex_lock_common+0x2d/0x323
        [<c1308c00>] mutex_lock_nested+0x2e/0x36
        [<c10ba6ff>] shrink_icache_memory+0x38/0x1b2
        [<c108bfb6>] shrink_slab+0xe2/0x13c
        [<c108c3e1>] kswapd+0x3d1/0x55d
        [<c10449b5>] kthread+0x66/0x6b
        [<c1003fdf>] kernel_thread_helper+0x7/0x10
        [<ffffffff>] 0xffffffff
      
      Two things are needed to fix this.  First we need a method to tell
      fsnotify_create_event() to use GFP_NOFS and second we need to stop using
      one global IN_IGNORED event and allocate them one at a time.  This solves
      current issues with multiple IN_IGNORED on a queue having tail drop
      problems and simplifies the allocations since we don't have to worry about
      two tasks opperating on the IGNORED event concurrently.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      f44aebcc
    • Alan Jenkins's avatar
      rfkill: remove too-strict __must_check · e56f0975
      Alan Jenkins authored
      Some drivers don't need the return value of rfkill_set_hw_state(),
      so it should not be marked as __must_check.
      Signed-off-by: default avatarAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Acked-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      e56f0975
    • Thomas Gleixner's avatar
      genirq: Delegate irq affinity setting to the irq thread · 591d2fb0
      Thomas Gleixner authored
      irq_set_thread_affinity() calls set_cpus_allowed_ptr() which might
      sleep, but irq_set_thread_affinity() is called with desc->lock held
      and can be called from hard interrupt context as well. The code has
      another bug as it does not hold a ref on the task struct as required
      by set_cpus_allowed_ptr().
      
      Just set the IRQTF_AFFINITY bit in action->thread_flags. The next time
      the thread runs it migrates itself. Solves all of the above problems
      nicely.
      
      Add kerneldoc to irq_set_thread_affinity() while at it.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      LKML-Reference: <new-submission>
      591d2fb0
  9. 20 Jul, 2009 1 commit
  10. 18 Jul, 2009 1 commit
    • Thomas Gleixner's avatar
      sched: fix nr_uninterruptible accounting of frozen tasks really · 6301cb95
      Thomas Gleixner authored
      commit e3c8ca83 (sched: do not count frozen tasks toward load) broke
      the nr_uninterruptible accounting on freeze/thaw. On freeze the task
      is excluded from accounting with a check for (task->flags &
      PF_FROZEN), but that flag is cleared before the task is thawed. So
      while we prevent that the task with state TASK_UNINTERRUPTIBLE
      is accounted to nr_uninterruptible on freeze we decrement
      nr_uninterruptible on thaw.
      
      Use a separate flag which is handled by the freezing task itself. Set
      it before calling the scheduler with TASK_UNINTERRUPTIBLE state and
      clear it after we return from frozen state.
      
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      6301cb95
  11. 17 Jul, 2009 3 commits
    • Tim Abbott's avatar
      vmlinux.lds.h: restructure BSS linker script macros · 04e448d9
      Tim Abbott authored
      The BSS section macros in vmlinux.lds.h currently place the .sbss
      input section outside the bounds of [__bss_start, __bss_end].  On all
      architectures except for microblaze that handle both .sbss and
      __bss_start/__bss_end, this is wrong: the .sbss input section is
      within the range [__bss_start, __bss_end].  Relatedly, the example
      code at the top of the file actually has __bss_start/__bss_end defined
      twice; I believe the right fix here is to define them in the
      BSS_SECTION macro but not in the BSS macro.
      
      Another problem with the current macros is that several
      architectures have an ALIGN(4) or some other small number just before
      __bss_stop in their linker scripts.  The BSS_SECTION macro currently
      hardcodes this to 4; while it should really be an argument.  It also
      ignores its sbss_align argument; fix that.
      
      mn10300 is the only user at present of any of the macros touched by
      this patch.  It looks like mn10300 actually was incorrectly converted
      to use the new BSS() macro (the alignment of 4 prior to conversion was
      a __bss_stop alignment, but the argument to the BSS macro is a start
      alignment).  So fix this as well.
      
      I'd like acks from Sam and David on this one.  Also CCing Paul, since
      he has a patch from me which will need to be updated to use
      BSS_SECTION(0, PAGE_SIZE, 4) once this gets merged.
      Signed-off-by: default avatarTim Abbott <tabbott@ksplice.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: David Howells <dhowells@redhat.com>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      04e448d9
    • Alex Williamson's avatar
      virtio_net: Sync header with qemu · e79f07e2
      Alex Williamson authored
      Qemu added support for a few extra RX modes that Linux doesn't
      currently make use of.  Sync the headers to maintain consistency.
      Signed-off-by: default avatarAlex Williamson <alex.williamson@hp.com>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      e79f07e2
    • Matias Zabaljauregui's avatar
      lguest: fix journey · 5780888b
      Matias Zabaljauregui authored
      fix: "make Guest" was complaining about duplicated G:032
      Signed-off-by: default avatarMatias Zabaljauregui <zabaljauregui@gmail.com>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      5780888b
  12. 16 Jul, 2009 2 commits
    • Eric Dumazet's avatar
      net: sock_copy() fixes · 4dc6dc71
      Eric Dumazet authored
      Commit e912b114
      (net: sk_prot_alloc() should not blindly overwrite memory)
      took care of not zeroing whole new socket at allocation time.
      
      sock_copy() is another spot where we should be very careful.
      We should not set refcnt to a non null value, until
      we are sure other fields are correctly setup, or
      a lockless reader could catch this socket by mistake,
      while not fully (re)initialized.
      
      This patch puts sk_node & sk_refcnt to the very beginning
      of struct sock to ease sock_copy() & sk_prot_alloc() job.
      
      We add appropriate smp_wmb() before sk_refcnt initializations
      to match our RCU requirements (changes to sock keys should
      be committed to memory before sk_refcnt setting)
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4dc6dc71
    • Johannes Weiner's avatar
      vt: drop bootmem/slab memory distinction · 5c9228f0
      Johannes Weiner authored
      Bootmem is not used for the vt screen buffer anymore as slab is now
      available at the time the console is initialized.
      
      Get rid of the now superfluous distinction between slab and bootmem,
      it's always slab.
      
      This also fixes a kmalloc leak which Catalin described thusly:
      
      Commit a5f4f52e ("vt: use kzalloc() instead of the bootmem allocator")
      replaced the alloc_bootmem() with kzalloc() but didn't set vc_kmalloced to
      1 and the memory block is later leaked.  The corresponding kmemleak trace:
      
      unreferenced object 0xdf828000 (size 8192):
        comm "swapper", pid 0, jiffies 4294937296
        backtrace:
          [<c006d473>] __save_stack_trace+0x17/0x1c
          [<c000d869>] log_early+0x55/0x84
          [<c01cfa4b>] kmemleak_alloc+0x33/0x3c
          [<c006c013>] __kmalloc+0xd7/0xe4
          [<c00108c7>] con_init+0xbf/0x1b8
          [<c0010149>] console_init+0x11/0x20
          [<c0008797>] start_kernel+0x137/0x1e4
      Signed-off-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Reviewed-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
      Tested-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarAlan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5c9228f0
  13. 15 Jul, 2009 3 commits
  14. 14 Jul, 2009 3 commits
  15. 13 Jul, 2009 1 commit
    • Li Zefan's avatar
      tracing/events: Move TRACE_SYSTEM outside of include guard · d0b6e04a
      Li Zefan authored
      If TRACE_INCLDUE_FILE is defined, <trace/events/TRACE_INCLUDE_FILE.h>
      will be included and compiled, otherwise it will be
      <trace/events/TRACE_SYSTEM.h>
      
      So TRACE_SYSTEM should be defined outside of #if proctection,
      just like TRACE_INCLUDE_FILE.
      
      Imaging this scenario:
      
       #include <trace/events/foo.h>
          -> TRACE_SYSTEM == foo
       ...
       #include <trace/events/bar.h>
          -> TRACE_SYSTEM == bar
       ...
       #define CREATE_TRACE_POINTS
       #include <trace/events/foo.h>
          -> TRACE_SYSTEM == bar !!!
      
      and then bar.h will be included and compiled.
      Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <4A5A9CF1.2010007@cn.fujitsu.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      d0b6e04a
  16. 12 Jul, 2009 5 commits
  17. 11 Jul, 2009 1 commit
  18. 10 Jul, 2009 3 commits