1. 09 5月, 2007 2 次提交
    • R
      header cleaning: don't include smp_lock.h when not used · e63340ae
      Randy Dunlap 提交于
      Remove includes of <linux/smp_lock.h> where it is not used/needed.
      Suggested by Al Viro.
      
      Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc,
      sparc64, and arm (all 59 defconfigs).
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e63340ae
    • G
      Fixes and cleanups for earlyprintk aka boot console · 69331af7
      Gerd Hoffmann 提交于
      The console subsystem already has an idea of a boot console, using the
      CON_BOOT flag.  The implementation has some flaws though.  The major
      problem is that presence of a boot console makes register_console() ignore
      any other console devices (unless explicitly specified on the kernel
      command line).
      
      This patch fixes the console selection code to *not* consider a boot
      console a full-featured one, so the first non-boot console registering will
      become the default console instead.  This way the unregister call for the
      boot console in the register_console() function actually triggers and the
      handover from the boot console to the real console device works smoothly.
      Added a printk for the handover, so you know which console device the
      output goes to when the boot console stops printing messages.
      
      The disable_early_printk() call is obsolete with that patch, explicitly
      disabling the early console isn't needed any more as it works automagically
      with that patch.
      
      I've walked through the tree, dropped all disable_early_printk() instances
      found below arch/ and tagged the consoles with CON_BOOT if needed.  The
      code is tested on x86, sh (thanks to Paul) and mips (thanks to Ralf).
      
      Changes to last version: Rediffed against -rc3, adapted to mips cleanups by
      Ralf, fixed "udbg-immortal" cmd line arg on powerpc.
      Signed-off-by: NGerd Hoffmann <kraxel@exsuse.de>
      Acked-by: NPaul Mundt <lethal@linux-sh.org>
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      69331af7
  2. 18 2月, 2007 1 次提交
  3. 12 2月, 2007 3 次提交
  4. 23 12月, 2006 1 次提交
  5. 08 12月, 2006 3 次提交
  6. 04 11月, 2006 1 次提交
    • A
      [PATCH] Add printk_timed_ratelimit() · f46c4833
      Andrew Morton 提交于
      printk_ratelimit() has global state which makes it not useful for callers
      which wish to perform ratelimiting at a particular frequency.
      
      Add a printk_timed_ratelimit() which utilises caller-provided state storage to
      permit more flexibility.
      
      This function can in fact be used for things other than printk ratelimiting
      and is perhaps poorly named.
      
      Cc: Ulrich Drepper <drepper@redhat.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f46c4833
  7. 12 10月, 2006 1 次提交
    • I
      [PATCH] lockdep: fix printk recursion logic · 256a6b41
      Ingo Molnar 提交于
      Bug reported and fixed by Tilman Schmidt <tilman@imap.cc>: if lockdep is
      enabled then log messages make it to /var/log/messages belatedly.  The
      reason is a missed wakeup of klogd.
      
      Initially there was only a lockdep_internal() protection against lockdep
      recursion within vprintk() - it grew the 'outer' lockdep_off()/on()
      protection only later on.  But that lockdep_off() made the
      release_console_sem() within vprintk() always happen under the
      lockdep_internal() condition, causing the bug.
      
      The right solution to remove the inner protection against recursion here -
      the outer one is enough.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Cc: Tilman Schmidt <tilman@imap.cc>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      256a6b41
  8. 26 9月, 2006 1 次提交
  9. 06 8月, 2006 1 次提交
    • A
      [PATCH] vt: printk: Fix framebuffer console triggering might_sleep assertion · 78944e54
      Antonino A. Daplas 提交于
      Reported by: Dave Jones
      
      Whilst printk'ing to both console and serial console, I got this...
      (2.6.18rc1)
      
      BUG: sleeping function called from invalid context at kernel/sched.c:4438
      in_atomic():0, irqs_disabled():1
      
      Call Trace:
       [<ffffffff80271db8>] show_trace+0xaa/0x23d
       [<ffffffff80271f60>] dump_stack+0x15/0x17
       [<ffffffff8020b9f8>] __might_sleep+0xb2/0xb4
       [<ffffffff8029232e>] __cond_resched+0x15/0x55
       [<ffffffff80267eb8>] cond_resched+0x3b/0x42
       [<ffffffff80268c64>] console_conditional_schedule+0x12/0x14
       [<ffffffff80368159>] fbcon_redraw+0xf6/0x160
       [<ffffffff80369c58>] fbcon_scroll+0x5d9/0xb52
       [<ffffffff803a43c4>] scrup+0x6b/0xd6
       [<ffffffff803a4453>] lf+0x24/0x44
       [<ffffffff803a7ff8>] vt_console_print+0x166/0x23d
       [<ffffffff80295528>] __call_console_drivers+0x65/0x76
       [<ffffffff80295597>] _call_console_drivers+0x5e/0x62
       [<ffffffff80217e3f>] release_console_sem+0x14b/0x232
       [<ffffffff8036acd6>] fb_flashcursor+0x279/0x2a6
       [<ffffffff80251e3f>] run_workqueue+0xa8/0xfb
       [<ffffffff8024e5e0>] worker_thread+0xef/0x122
       [<ffffffff8023660f>] kthread+0x100/0x136
       [<ffffffff8026419e>] child_rip+0x8/0x12
      
      This can occur when release_console_sem() is called but the log
      buffer still has contents that need to be flushed. The console drivers
      are called while the console_may_schedule flag is still true. The
      might_sleep() is triggered when fbcon calls console_conditional_schedule().
      
      Fix by setting console_may_schedule to zero earlier, before the call to the
      console drivers.
      Signed-off-by: NAntonino Daplas <adaplas@pol.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      78944e54
  10. 11 7月, 2006 1 次提交
  11. 04 7月, 2006 1 次提交
  12. 03 7月, 2006 1 次提交
  13. 01 7月, 2006 1 次提交
  14. 26 6月, 2006 2 次提交
    • J
      [PATCH] printk time parameter · 3b9c0410
      Jan Engelhardt 提交于
      Currently, enabling/disabling printk timestamps is only possible through
      reboot (bootparam) or recompile.  I normally do not run with timestamps
      (since syslog handles that in a good manner), but for measuring small
      kernel delays (e.g.  irq probing - see parport thread) I needed subsecond
      precision, but then again, just for some minutes rather than all kernel
      messages to come.  The following patch adds a module_param() with which the
      timestamps can be en-/disabled in a live system through
      /sys/modules/printk/parameters/printk_time.
      Signed-off-by: NJan Engelhardt <jengelh@gmx.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3b9c0410
    • M
      [PATCH] Make printk work for really early debugging · 76a8ad29
      Michael Ellerman 提交于
      Currently printk is no use for early debugging because it refuses to
      actually print anything to the console unless
      cpu_online(smp_processor_id()) is true.
      
      The stated explanation is that console drivers may require per-cpu
      resources, or otherwise barf, because the system is not yet setup
      correctly.  Fair enough.
      
      However some console drivers might be quite happy running early during
      boot, in fact we have one, and so it'd be nice if printk understood that.
      
      So I added a flag (which I would have called CON_BOOT, but that's taken)
      called CON_ANYTIME, which indicates that a console is happy to be called
      anytime, even if the cpu is not yet online.
      
      Tested on a Power 5 machine, with both a CON_ANYTIME driver and a bogus
      console driver that BUG()s if called while offline.  No problems AFAICT.
      Built for i386 UP & SMP.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      76a8ad29
  15. 20 6月, 2006 1 次提交
  16. 01 4月, 2006 1 次提交
  17. 24 3月, 2006 1 次提交
    • J
      [PATCH] console_setup() depends (wrongly?) on CONFIG_PRINTK · 2ea1c539
      John Z. Bohach 提交于
      It appears that console_setup() code only gets compiled into the kernel if
      CONFIG_PRINTK is enabled.  One detrimental side-effect of this is that
      serial8250_console_setup() never gets invoked when CONFIG_PRINTK is not
      set, resulting in baud rate not being read/parsed from command line (i.e.
      console=ttyS0,115200n8 is ignored, at least the baud rate part...)
      
      Attached patch moves console_setup() code from inside
      
      #ifdef CONFIG_PRINTK
      
      to outside (in printk.c), removing dependence on said config. option.
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      2ea1c539
  18. 16 1月, 2006 1 次提交
  19. 15 1月, 2006 1 次提交
  20. 09 1月, 2006 1 次提交
  21. 24 11月, 2005 1 次提交
  22. 14 11月, 2005 1 次提交
  23. 07 11月, 2005 1 次提交
  24. 31 10月, 2005 1 次提交
  25. 22 9月, 2005 1 次提交
    • A
      [PATCH] Add printk_clock() · 31f6d9d6
      Andrew Morton 提交于
      ia64's sched_clock() accesses per-cpu data which isn't set up at boot time.
      Hence ia64 cannot use printk timestamping, because printk() will crash in
      sched_clock().
      
      So make printk() use printk_clock(), defaulting to sched_clock(), overrideable
      by the architecture via attribute(weak).
      
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      31f6d9d6
  26. 08 9月, 2005 1 次提交
  27. 26 6月, 2005 1 次提交
    • S
      [PATCH] CPU hotplug printk fix · ac255752
      Shaohua Li 提交于
      In the cpu hotplug case, per-cpu data possibly isn't initialized even the
      system state is 'running'.  As the comments say in the original code, some
      console drivers assume per-cpu resources have been allocated.  radeon fb is
      one such driver, which uses kmalloc.  After a CPU is down, the per-cpu data
      of slab is freed, so the system crashed when printing some info.
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ac255752
  28. 24 6月, 2005 1 次提交
    • G
      [PATCH] CON_CONSDEV bit not set correctly on last console · ab4af03a
      Greg Edwards 提交于
      According to include/linux/console.h, CON_CONSDEV flag should be set on
      the last console specified on the boot command line:
      
           86 #define CON_PRINTBUFFER (1)
           87 #define CON_CONSDEV     (2) /* Last on the command line */
           88 #define CON_ENABLED     (4)
           89 #define CON_BOOT        (8)
      
      This does not currently happen if there is more than one console specified
      on the boot commandline.  Instead, it gets set on the first console on the
      command line.  This can cause problems for things like kdb that look for
      the CON_CONSDEV flag to see if the console is valid.
      
      Additionaly, it doesn't look like CON_CONSDEV is reassigned to the next
      preferred console at unregister time if the console being unregistered
      currently has that bit set.
      
      Example (from sn2 ia64):
      
      elilo vmlinuz root=<dev> console=ttyS0 console=ttySG0
      
      in this case, the flags on ttySG console struct will be 0x4 (should be
      0x6).
      
      Attached patch against bk fixes both issues for the cases I looked at.  It
      uses selected_console (which gets incremented for each console specified on
      the command line) as the indicator of which console to set CON_CONSDEV on.
      When adding the console to the list, if the previous one had CON_CONSDEV
      set, it masks it out.  Tested on ia64 and x86.
      
      The problem with the current behavior is it breaks overriding the default from
      the boot line.  In the ia64 case, there may be a global append line defining
      console=a in elilo.conf.  Then you want to boot your kernel, and want to
      override the default by passing console=b on the boot line.  elilo constructs
      the kernel cmdline by starting with the value of the global append line, then
      tacks on whatever else you specify, which puts console=b last.
      Signed-off-by: NGreg Edwards <edwardsg@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ab4af03a
  29. 17 5月, 2005 1 次提交
  30. 01 5月, 2005 1 次提交
  31. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4