Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1471833
| Path | csiph.com!news.redatomik.org!weretis.net!feeder4.news.weretis.net!storethat.news.telefonica.de!telefonica.de!news.panservice.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | zijun_hu <zijun_hu@zoho.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] mm/nobootmem.c: make CONFIG_NO_BOOTMEM depend on CONFIG_HAVE_MEMBLOCK |
| Date | Mon, 29 Aug 2016 15:30:01 +0200 |
| Message-ID | <sbuNr-7PD-7@gated-at.bofh.it> (permalink) |
| References | <saNIu-6dz-15@gated-at.bofh.it> |
| X-Original-To | Andrew Morton <akpm@linux-foundation.org>, mingo@kernel.org |
| Domainkey-Signature | a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=subject:to:references:cc:from:message-id:date:user-agent:mime-version:in-reply-to:content-type; b=SiiM8e61KJ6Vg9uniyV/8z3vSfemxzkqHCumB/MNulMqX7fy0RKGD3Y6GqQ4oFfm0AlHHrU6Tc0+ EEHn+5rgKJSPV8cWKpMUg+QBMU0rHOGfH0BpW0QI+xCyvcKOvRHL |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 7bit |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 133 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-mm@kvack.org, linux-kernel@vger.kernel.org, zijun_hu@htc.com |
| X-Original-Date | Mon, 29 Aug 2016 21:25:42 +0800 |
| X-Original-Message-ID | <f5cda0af-3137-ef00-2aa3-dd830c4997a9@zoho.com> |
| X-Original-References | <9e9ff2eb-c7e3-4790-9678-85548306e3ac@zoho.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1471833 |
Show key headers only | View raw
i am sorry, this patch has many bugs
i resend it in another mail thread
please ignore it
On 2016/8/27 23:27, zijun_hu wrote:
> From: zijun_hu <zijun_hu@htc.com>
>
> this patch fixes the following bugs:
>
> - no bootmem is implemented by memblock currently, but config option
> CONFIG_NO_BOOTMEM doesn't depend on CONFIG_HAVE_MEMBLOCK
>
> - the same ARCH_LOW_ADDRESS_LIMIT statements are duplicated between
> header and relevant source
>
> - don't ensure ARCH_LOW_ADDRESS_LIMIT perhaps defined by ARCH in
> asm/processor.h is preferred over default in linux/bootmem.h
> completely since the former header isn't included by the latter
>
> Signed-off-by: zijun_hu <zijun_hu@htc.com>
> ---
> include/linux/bootmem.h | 13 +++++++------
> mm/Kconfig | 6 ++++--
> mm/nobootmem.c | 6 +-----
> 3 files changed, 12 insertions(+), 13 deletions(-)
>
> diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h
> index f9be32691718..95968236abc7 100644
> --- a/include/linux/bootmem.h
> +++ b/include/linux/bootmem.h
> @@ -7,6 +7,7 @@
> #include <linux/mmzone.h>
> #include <linux/mm_types.h>
> #include <asm/dma.h>
> +#include <asm/processor.h>
>
> /*
> * simple boot-time physical memory area allocator.
> @@ -119,6 +120,10 @@ extern void *__alloc_bootmem_low_node(pg_data_t *pgdat,
> #define BOOTMEM_LOW_LIMIT __pa(MAX_DMA_ADDRESS)
> #endif
>
> +#ifndef ARCH_LOW_ADDRESS_LIMIT
> +#define ARCH_LOW_ADDRESS_LIMIT 0xffffffffUL
> +#endif
> +
> #define alloc_bootmem(x) \
> __alloc_bootmem(x, SMP_CACHE_BYTES, BOOTMEM_LOW_LIMIT)
> #define alloc_bootmem_align(x, align) \
> @@ -148,7 +153,7 @@ extern void *__alloc_bootmem_low_node(pg_data_t *pgdat,
> __alloc_bootmem_low_node(pgdat, x, PAGE_SIZE, 0)
>
>
> -#if defined(CONFIG_HAVE_MEMBLOCK) && defined(CONFIG_NO_BOOTMEM)
> +#if defined(CONFIG_NO_BOOTMEM)
>
> /* FIXME: use MEMBLOCK_ALLOC_* variants here */
> #define BOOTMEM_ALLOC_ACCESSIBLE 0
> @@ -180,10 +185,6 @@ static inline void * __init memblock_virt_alloc_nopanic(
> NUMA_NO_NODE);
> }
>
> -#ifndef ARCH_LOW_ADDRESS_LIMIT
> -#define ARCH_LOW_ADDRESS_LIMIT 0xffffffffUL
> -#endif
> -
> static inline void * __init memblock_virt_alloc_low(
> phys_addr_t size, phys_addr_t align)
> {
> @@ -333,7 +334,7 @@ static inline void __init memblock_free_late(
> {
> free_bootmem_late(base, size);
> }
> -#endif /* defined(CONFIG_HAVE_MEMBLOCK) && defined(CONFIG_NO_BOOTMEM) */
> +#endif /* defined(CONFIG_NO_BOOTMEM) */
>
> #ifdef CONFIG_HAVE_ARCH_ALLOC_REMAP
> extern void *alloc_remap(int nid, unsigned long size);
> diff --git a/mm/Kconfig b/mm/Kconfig
> index be0ee11fa0d9..b7f19ff4b743 100644
> --- a/mm/Kconfig
> +++ b/mm/Kconfig
> @@ -144,14 +144,16 @@ config ARCH_DISCARD_MEMBLOCK
> bool
>
> config NO_BOOTMEM
> - bool
> + bool "No legacy boot memory"
> + depends on HAVE_MEMBLOCK
> + help
> + NO_BOOTMEM is implemented by memblock
>
> config MEMORY_ISOLATION
> bool
>
> config MOVABLE_NODE
> bool "Enable to assign a node which has only movable memory"
> - depends on HAVE_MEMBLOCK
> depends on NO_BOOTMEM
> depends on X86_64
> depends on NUMA
> diff --git a/mm/nobootmem.c b/mm/nobootmem.c
> index bd05a70f44b9..1802c9bbe11a 100644
> --- a/mm/nobootmem.c
> +++ b/mm/nobootmem.c
> @@ -11,15 +11,14 @@
> #include <linux/init.h>
> #include <linux/pfn.h>
> #include <linux/slab.h>
> -#include <linux/bootmem.h>
> #include <linux/export.h>
> #include <linux/kmemleak.h>
> #include <linux/range.h>
> #include <linux/memblock.h>
> +#include <linux/bootmem.h>
>
> #include <asm/bug.h>
> #include <asm/io.h>
> -#include <asm/processor.h>
>
> #include "internal.h"
>
> @@ -395,9 +394,6 @@ void * __init __alloc_bootmem_node_high(pg_data_t *pgdat, unsigned long size,
> return __alloc_bootmem_node(pgdat, size, align, goal);
> }
>
> -#ifndef ARCH_LOW_ADDRESS_LIMIT
> -#define ARCH_LOW_ADDRESS_LIMIT 0xffffffffUL
> -#endif
>
> /**
> * __alloc_bootmem_low - allocate low boot memory
>
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 1/2] mm/nobootmem.c: make CONFIG_NO_BOOTMEM depend on CONFIG_HAVE_MEMBLOCK zijun_hu <zijun_hu@zoho.com> - 2016-08-27 17:30 +0200 Re: [PATCH 1/2] mm/nobootmem.c: make CONFIG_NO_BOOTMEM depend on CONFIG_HAVE_MEMBLOCK zijun_hu <zijun_hu@zoho.com> - 2016-08-29 15:30 +0200
csiph-web