1. 14 4月, 2011 1 次提交
  2. 18 3月, 2011 4 次提交
  3. 10 1月, 2011 3 次提交
    • Y
      Blackfin: SMP: rewrite IPI handling to avoid memory allocation · 73a40064
      Yi Li 提交于
      Currently, sending an interprocessor interrupt (IPI) requires building up
      a message dynamically which means memory allocation.  But often times, we
      will want to send an IPI in low level contexts where allocation is not
      possible which may lead to a panic().  So create a per-cpu static array
      for the message queue and use that instead.
      
      Further, while we have two supplemental interrupts, we are currently only
      using one of them.  So use the second one for the most common IPI message
      of all -- smp_send_reschedule().  This avoids ugly contention for locks
      which in turn would require an IPI message ...
      
      In general, this improves SMP performance, and in some cases allows the
      SMP port to work in places it wouldn't before.  Such as the PREEMPT_RT
      state where the slab is protected by a per-cpu spin lock.  If the slab
      kmalloc/kfree were to put the task to sleep, and that task was actually
      the IPI handler, then the system falls down yet again.
      
      After running some various stress tests on the system, the static limit
      of 5 messages seems to work.  On the off chance even this overflows, we
      simply panic(), and we can review that scenario to see if the limit needs
      to be increased a bit more.
      Signed-off-by: NYi Li <yi.li@analog.com>
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      73a40064
    • G
      Blackfin: SMP: tweak platform_request_ipi() usage · 75734e66
      Graf Yang 提交于
      This function takes an irq_handler_t function, but the prototype in
      the header doesn't match the function definition.  This is due to the
      smp headers needing to avoid circular dependencies.  So change the
      function to take a simple pointer.
      Signed-off-by: NGraf Yang <graf.yang@analog.com>
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      75734e66
    • G
      Blackfin: SMP: fix cpumask misbehavior · 9c199b59
      Graf Yang 提交于
      The cpu maps are defines provided by common linux/cpumask.h, not local
      variables.  So stop exporting them locally and include the right header
      for their definition.
      Signed-off-by: NGraf Yang <graf.yang@analog.com>
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      9c199b59
  4. 23 5月, 2010 1 次提交
  5. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  6. 09 3月, 2010 4 次提交
  7. 15 12月, 2009 1 次提交
    • Y
      Blackfin: SMP: don't start up core b until its state has been completely onlined · 578d36f5
      Yi Li 提交于
      When testing PREEMPT_RT kernel on BF561-EZKit, the kernel blocks while
      booting.  When the kernel initializes the ethernet driver, it sleeps and
      never wakes up.
      
      The issue happens when the kernel waits for a timer for Core B to timeout
      (the timers are per-cpu based: static DEFINE_PER_CPU(struct tvec_base *,
      tvec_bases) = &boot_tvec_bases).
      
      However, the ksoftirqd thread for Core B (note, the ksoftirqd thread is
      also per-cpu based) cannot work properly, and the timers for Core B never
      times out.
      
      When ksoftirqd() for the first time runs on core B, it is possible core A
      is still initializing core B (see smp_init() -> cpu_up() -> __cpu_up()).
      So the "cpu_is_offline()" check may return true and ksoftirqd moves to
      "wait_to_die".
      
      So delay the core b start up until the per-cpu timers have been set up
      fully.
      Signed-off-by: NYi Li <yi.li@analog.com>
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      578d36f5
  8. 25 11月, 2009 1 次提交
  9. 07 10月, 2009 1 次提交
    • R
      Blackfin: mass clean up of copyright/licensing info · 96f1050d
      Robin Getz 提交于
      Bill Gatliff & David Brownell pointed out we were missing some
      copyrights, and licensing terms in some of the files in
      ./arch/blackfin, so this fixes things, and cleans them up.
      
      It also removes:
       - verbose GPL text(refer to the top level ./COPYING file)
       - file names (you are looking at the file)
       - bug url (it's in the ./MAINTAINERS file)
       - "or later" on GPL-2, when we did not have that right
      
      It also allows some Blackfin-specific assembly files to be under a BSD
      like license (for people to use them outside of Linux).
      Signed-off-by: NRobin Getz <robin.getz@analog.com>
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      96f1050d
  10. 16 7月, 2009 2 次提交
  11. 13 6月, 2009 2 次提交
  12. 12 6月, 2009 3 次提交
  13. 05 3月, 2009 1 次提交
  14. 07 1月, 2009 1 次提交
  15. 18 11月, 2008 1 次提交
  16. 07 1月, 2009 1 次提交