From: Andrew Morton <akpm@osdl.org>
To: Ravikiran G Thirumalai <kiran@scalex86.org>
Cc: linux-kernel@vger.kernel.org, y-goto@jp.fujitsu.com
Subject: Re: [patch] Cleanup bootmem allocator and fix alloc_bootmem_low
Date: Thu, 10 Nov 2005 01:36:54 -0800 [thread overview]
Message-ID: <20051110013654.75e55a61.akpm@osdl.org> (raw)
In-Reply-To: <20051108073224.GA3753@localhost.localdomain>
Ravikiran G Thirumalai <kiran@scalex86.org> wrote:
>
> Hi Andrew,
> The following patch removes alloc_bootmem_*limit apis and fixes
> alloc_bootmem_low and friends to allocate below the 4G limit.
>
> ...
>
> +void * __init __alloc_bootmem_low(unsigned long size, unsigned long align, unsigned long goal)
> +{
> + pg_data_t *pgdat = pgdat_list;
> + void *ptr;
> +
> + for_each_pgdat(pgdat)
> + if ((ptr = __alloc_bootmem_core(pgdat->bdata, size,
> + align, goal, 0x100000000)))
> + return(ptr);
> +
> + /*
> + * Whoops, we cannot satisfy the allocation request.
> + */
> + printk(KERN_ALERT "low bootmem alloc of %lu bytes failed!\n", size);
> + panic("Out of low memory");
> + return NULL;
> +}
> +
> +void * __init __alloc_bootmem_low_node(pg_data_t *pgdat, unsigned long size,
> + unsigned long align, unsigned long goal)
> +{
> + return __alloc_bootmem_core(pgdat->bdata, size, align, goal, 0x100000000);
> +}
mm/bootmem.c: In function `__alloc_bootmem_low':
mm/bootmem.c:432: warning: integer constant is too large for "long" type
mm/bootmem.c:432: warning: large integer implicitly truncated to unsigned type
mm/bootmem.c: In function `__alloc_bootmem_low_node':
mm/bootmem.c:446: warning: integer constant is too large for "long" type
mm/bootmem.c:446: warning: large integer implicitly truncated to unsigned type
next prev parent reply other threads:[~2005-11-10 9:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-08 7:32 Ravikiran G Thirumalai
2005-11-08 14:24 ` Yasunori Goto
2005-11-08 18:45 ` Ravikiran G Thirumalai
2005-11-10 13:09 ` Yasunori Goto
2005-11-10 9:36 ` Andrew Morton [this message]
2005-11-23 19:01 ` Ravikiran G Thirumalai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051110013654.75e55a61.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=kiran@scalex86.org \
--cc=linux-kernel@vger.kernel.org \
--cc=y-goto@jp.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome