1. 12 Sep, 2008 8 commits
    • Viktor Rosendahl's avatar
      lowmem: get rid of the percentages · 7ad66bbe
      Viktor Rosendahl authored
      The purpose of this patch is to get rid of the lame percentage calculations in
      lowmem.c. Currently, the limits (measured in pages) are calculated from
      percentages every time somebody from userspace requests some memory. With this
      patch, the limits are in pages and furthermore, they are specified as minimum
      amount of "free pages", instead of as maximum amount of "used pages". "Free"
      means free pages or such pages that can easily be freed by the VM system.
      
      This patch changes the names of the lowmem sysctl limits in /proc/sys/vm:
      lowmem_deny_watermark  	     => lowmem_deny_watermark_pages
      lowmem_notify_low	     => lowmem_notify_low_pages
      lowmem_notify_high 	     => lowmem_notify_high_pages
      
      The following read only value disappears:
      lowmem_used_pages
      
      The following read only value is introduced:
      lowmem_free_pages
      
      The old value can be calculated from userspace with the following pseudocode:
      
      if lowmem_free_pages < lowmem_allowed_pages
         lowmem_used_pages = lowmem_allowed_pages - lowmem_free_pages
      else
         lowmem_used_pages = 0;
      
      Note that the value of lowmem_free_pages is only accurate when the system is
      rather low on memory (otherwise it's a bit too pessimistic), this was true also
      for the lowmem_used_pages metric.
      Signed-off-by: default avatarViktor Rosendahl <viktor.rosendahl@nokia.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      7ad66bbe
    • Viktor Rosendahl's avatar
      lowmem: remove unecessary usage of proc_dointvec_minmax() · 336092c0
      Viktor Rosendahl authored
      As far as I can understand, using proc_dointvec_minmax() instead of
      proc_dointvec only makes sense if you supply the min and/or max values in the
      extra1 and extra2 fields of the struct.
      Signed-off-by: default avatarViktor Rosendahl <viktor.rosendahl@nokia.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      336092c0
    • Henrik Saari's avatar
      Security: Kernel OOM-killer and allocation denial use different rules · ad27614b
      Henrik Saari authored
      Security: Kernel OOM-killer and allocation denial use different rules
      
      Original patch created by Leonid Moiseichuk <leonid.moiseichuk@nokia.com>
      
      Fixes the issue with the oom killer and lowmem module being inconsistent;
      processes that are important enough to be protected from the oom killer should
      not be denied memory either.
      Signed-off-by: default avatarHenrik Saari <henrik.saari@nokia.com>
      Signed-off-by: default avatarViktor Rosendahl <viktor.rosendahl@nokia.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      ad27614b
    • David Brownell's avatar
      twl4030: improve rtc device setup · 74fcfe9c
      David Brownell authored
      Make the twl4030 RTC initialization follow the driver model better.
      The platform device is created (if needed) as part of twl4030 setup
      instead of as a board-specific thing, and fits properly into the
      driver model tree.
      
      The only minor glitch here is on boards using platform_data to pass
      MSECURE initialization hooks to the RTC driver.  The right solution
      probably just removes that platform_data, and might even make Linux
      follow the principle of "least privilege" (at the hardware level!)
      instead of always holding this signal high.
      
      Pending better handling of MSECURE, this patch just does what the
      RTC init does, but earlier:  MSECURE is always high, so the RTC time
      and calendar registers can be updated (and presumably a bunch of
      non-RTC privileged operations will be allowed too).
      
      Yet to be done:  set up the IRQ resource; make the rtc driver use
      that IRQ resource; and properly issue wakeup alarms.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      74fcfe9c
    • David Brownell's avatar
      mach-omap2: fix more arch_initcall() breakage · 846fe83e
      David Brownell authored
      Remove more bogus arch_initcall() logic in mach-omap2/board-xyx.c files.
      They broke a multi-OMAP build I did, at *RUN TIME* not build time, since
      it tried to do the i2c init for every board linked in the kernel.
      
      Remember, init_machine() entries run at arch_initcall() time; that's
      where any board-specific init logic should normally go.  Any initcalls
      in the mach-*/*c files should normally be guarded by tests to make sure
      they only run on the relevant hardware (board, cpu).  Better yet, get
      rid of the initcalls; init_machine() can *explicitly* call the right
      version of that code, and pass in board-specific config data; and there
      are hooks that can handle cpu-specific stuff too.
      
      A quick glance suggests most of the remaining initcall logic in the
      mach-omap2 directory is similarly broken... this patch gets rid of
      one frequently-cloned idiom, it should help.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      846fe83e
    • Peter 'p2' De Schrijver's avatar
      Fix build for beagleboard · edbfb2fa
      Peter 'p2' De Schrijver authored
      Also add missing u8 data as noted by Felipe Balbi.
      Signed-off-by: default avatarPeter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      edbfb2fa
    • Tony Lindgren's avatar
      ARM: OMAP: Clean-up MMC device init · 8e6e06c7
      Tony Lindgren authored
      Clean-up MMC device init:
      
      - Initialize devices in mach-omap1/devices.c and mach-omap2/devices.c
        instead of plat-omap/devices.c
      
      - Remove old struct omap_mmc_config, use struct omap_mmc_platform_data instead
      
      Note that this removes the second omap-hsmmc controller init for overo.
      This needs to be fixed properly by changing hsmmc_init() to accept
      board specific struct omap_mmc_platform_data.
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      8e6e06c7
    • Tony Lindgren's avatar
      Sync MMC device code with arm devel branch · 535e1808
      Tony Lindgren authored
      This is to sync with Russell's commit 7736c09c.
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      535e1808
  2. 11 Sep, 2008 8 commits
  3. 10 Sep, 2008 12 commits
  4. 09 Sep, 2008 12 commits