]> git.baikalelectronics.ru Git - kernel.git/commit
mmc_test: fix large memory allocation
authorAdrian Hunter <adrian.hunter@nokia.com>
Wed, 11 Aug 2010 21:17:51 +0000 (14:17 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Aug 2010 15:43:31 +0000 (08:43 -0700)
commitfb358dd0cdd800d747833e8e89bcb4460233b579
tree018b868ff5a1a66ac5dfcbc8704362295987f4f6
parent9667e7c2a9bd197aa90617c2c4367aad00eba320
mmc_test: fix large memory allocation

- Fix mmc_test_alloc_mem.

- Use nr_free_buffer_pages() instead of sysinfo.totalram to determine
  total lowmem pages.

- Change variables containing memory sizes to unsigned long.

- Limit maximum test area size to 128MiB because that is the maximum MMC
  high capacity erase size (the maxmium SD allocation unit size is just
  4MiB)

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/mmc/card/mmc_test.c