1. 21 5月, 2011 2 次提交
    • S
      spinlock_up.h: include asm/processor.h in for cpu_relax · d974d905
      Stephen Rothwell 提交于
      Commit e66eed65 ("list: remove prefetching from regular list
      iterators") removed the include of prefetch.h from list.h and this was a
      path to including asm/processor.h.  We need to include it excplicitly
      now.
      
      Fixes this build error on sparc32 (at least):
      
        In file included from include/linux/seqlock.h:29,
                         from include/linux/time.h:8,
                         from include/linux/timex.h:56,
                         from include/linux/sched.h:57,
                         from arch/sparc/kernel/asm-offsets.c:13:
        include/linux/spinlock.h: In function 'spin_unlock_wait':
        include/linux/spinlock.h:360: error: implicit declaration of function 'cpu_relax
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d974d905
    • L
      sanitize <linux/prefetch.h> usage · 268bb0ce
      Linus Torvalds 提交于
      Commit e66eed65 ("list: remove prefetching from regular list
      iterators") removed the include of prefetch.h from list.h, which
      uncovered several cases that had apparently relied on that rather
      obscure header file dependency.
      
      So this fixes things up a bit, using
      
         grep -L linux/prefetch.h $(git grep -l '[^a-z_]prefetchw*(' -- '*.[ch]')
         grep -L 'prefetchw*(' $(git grep -l 'linux/prefetch.h' -- '*.[ch]')
      
      to guide us in finding files that either need <linux/prefetch.h>
      inclusion, or have it despite not needing it.
      
      There are more of them around (mostly network drivers), but this gets
      many core ones.
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      268bb0ce
  2. 20 5月, 2011 38 次提交