1. 15 Mar, 2009 3 commits
  2. 14 Mar, 2009 3 commits
    • Jeremy Fitzhardinge's avatar
      x86: add brk allocation for very, very early allocations · 93dbda7c
      Jeremy Fitzhardinge authored
      Impact: new interface
      
      Add a brk()-like allocator which effectively extends the bss in order
      to allow very early code to do dynamic allocations.  This is better than
      using statically allocated arrays for data in subsystems which may never
      get used.
      
      The space for brk allocations is in the bss ELF segment, so that the
      space is mapped properly by the code which maps the kernel, and so
      that bootloaders keep the space free rather than putting a ramdisk or
      something into it.
      
      The bss itself, delimited by __bss_stop, ends before the brk area
      (__brk_base to __brk_limit).  The kernel text, data and bss is reserved
      up to __bss_stop.
      
      Any brk-allocated data is reserved separately just before the kernel
      pagetable is built, as that code allocates from unreserved spaces
      in the e820 map, potentially allocating from any unused brk memory.
      Ultimately any unused memory in the brk area is used in the general
      kernel memory pool.
      
      Initially the brk space is set to 1MB, which is probably much larger
      than any user needs (the largest current user is i386 head_32.S's code
      to build the pagetables to map the kernel, which can get fairly large
      with a big kernel image and no PSE support).  So long as the system
      has sufficient memory for the bootloader to reserve the kernel+1MB brk,
      there are no bad effects resulting from an over-large brk.
      Signed-off-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      93dbda7c
    • Jeremy Fitzhardinge's avatar
      x86: make section delimiter symbols part of their section · b9719a4d
      Jeremy Fitzhardinge authored
      Impact: cleanup
      
      Move the symbols delimiting a section part of the section
      (section relative) rather than absolute.  This avoids any
      unexpected gaps between the section-start symbol and the first
      data in the section, which could be caused by implicit
      alignment of the section data.  It also makes the general
      form of vmlinux_64.lds.S consistent with vmlinux_32.lds.S.
      Signed-off-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      b9719a4d
    • Ingo Molnar's avatar
      Merge branch 'core/percpu' into x86/core · c550033c
      Ingo Molnar authored
      c550033c
  3. 13 Mar, 2009 1 commit
    • Li Zefan's avatar
      cpuacct: reduce one NULL check in fast-path · 7a46c594
      Li Zefan authored
      Impact: micro-optimization
      
      In cpuacct_charge(), task_ca() will never return NULL, so change
      for(...) to do { } while(...) to save one NULL check.
      Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Menage <menage@google.com>
      Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
      Cc: Bharata B Rao <bharata@linux.vnet.ibm.com>
      LKML-Reference: <49B863F5.2060400@cn.fujitsu.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      7a46c594
  4. 12 Mar, 2009 1 commit
  5. 11 Mar, 2009 28 commits
  6. 10 Mar, 2009 4 commits
    • Benjamin Herrenschmidt's avatar
      radeonfb/aty128fb: Disable broken early resume hook for PowerBooks · d801cec7
      Benjamin Herrenschmidt authored
      radeonfb and aty128fb have a special hook called by the PowerMac platform
      code very very early on resume from sleep to bring the screen back. This
      is useful for debugging wakup problems, but unfortunately, this also became
      a source of problems of its own.
      
      The hook is called extremely early, with interrupts still off, and the code
      path involved with that code nowadays rely on things like taking mutexes,
      GFP_KERNEL allocations, etc...
      
      In addition, the driver now relies on the PCI core to restore the standard
      config space before calling resume which doesn't happen with this early
      code path.
      
      I'm keeping the code in but commented out along with a fixup call to
      pci_restore_state(). The reason is that I still want to make it easy to
      re-enable temporarily to track wake up problems, and it's possible that
      I can revive it at some stage if we make sleeping things save to call
      in early resume using a system state.
      
      In the meantime, this should fix several reported regressions.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      d801cec7
    • Benjamin Herrenschmidt's avatar
      hvc_console: Remove tty->low_latency on pseries backends · 187cfc43
      Benjamin Herrenschmidt authored
      The hvcs and hvsi backends both set tty->low_latency to one, along
      with more or less scary comments regarding bugs or races that would
      happen if not doing so.
      
      However, they also both call tty_flip_buffer_push() in conexts where
      it's illegal to do so since some recent tty changes (or at least it
      may have been illegal always but it nows blows) when low_latency is
      set (ie, hard interrupt or with spinlock held and irqs disabled).
      
      This removes the setting for now to get them back to working condition,
      we'll have to address the races described in the comments separately
      if they are still an issue (some of this might have been fixed already).
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      187cfc43
    • Benjamin Herrenschmidt's avatar
      d301a9f3
    • Samuel CUELLA's avatar
      i810: fix kernel crash fix when struct fb_var_screeninfo is supplied · 16b71fdf
      Samuel CUELLA authored
      Prevent the kernel from being crashed by a divide-by-zero operation when
      supplied an incorrectly filled 'struct fb_var_screeninfo' from userland.
      
      Previously i810_main.c:1005 (i810_check_params) was using the global
      'yres' symbol previously defined at i810_main.c:145 as a module parameter
      value holder (i810_main.c:2174).  If i810fb is compiled-in or if this
      param doesn't get a default value, this direct usage leads to a
      divide-by-zero at i810_main.c:1005 (i810_check_params).  The patch simply
      replace the 'yres' global, perhaps undefined symbol usage by a given
      parameter structure lookup.
      
      This problem occurs with directfb, mplayer -vo fbdev, SDL library.
      It was also reported ( but non solved ) at:
      
      	http://mail.directfb.org/pipermail/directfb-dev/2008-March/004050.htmlSigned-off-by: default avatarSamuel CUELLA <samuel.cuella@supinfo.com>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      16b71fdf