All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Mike Kravetz <kravetz@us.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>,
	linuxppc64-dev@ozlabs.org, linux-kernel@vger.kernel.org,
	lhms-devel@lists.sourceforge.net
Subject: Re: [PATCH 1/4] Memory Add Fixes for ppc64
Date: Sat, 05 Nov 2005 11:04:30 +1100	[thread overview]
Message-ID: <1131149070.29195.41.camel@gaston> (raw)
In-Reply-To: <20051104231800.GB25545@w-mikek2.ibm.com>

On Fri, 2005-11-04 at 15:18 -0800, Mike Kravetz wrote:
> Add the create_section_mapping() routine to create hptes for memory
> sections dynamically added after system boot.
> 
> Signed-off-by: Mike Kravetz <kravetz@us.ibm.com>

This patch will have to be slightly reworked on top of the 64k pages
one. It should be trivial though.

Ben.

> diff -Naupr linux-2.6.14-git7/arch/powerpc/mm/hash_utils_64.c linux-2.6.14-git7.work/arch/powerpc/mm/hash_utils_64.c
> --- linux-2.6.14-git7/arch/powerpc/mm/hash_utils_64.c	2005-11-04 21:21:05.000000000 +0000
> +++ linux-2.6.14-git7.work/arch/powerpc/mm/hash_utils_64.c	2005-11-04 22:05:06.000000000 +0000
> @@ -176,6 +176,15 @@ static unsigned long get_hashtable_size(
>  	return pteg_count << 7;
>  }
>  
> +#ifdef CONFIG_MEMORY_HOTPLUG
> +void create_section_mapping(unsigned long start, unsigned long end)
> +{
> +	create_pte_mapping(start, end,
> +		_PAGE_ACCESSED | _PAGE_COHERENT | PP_RWXX,
> +		cur_cpu_spec->cpu_features & CPU_FTR_16M_PAGE ? 1 : 0);
> +}
> +#endif /* CONFIG_MEMORY_HOTPLUG */
> +
>  void __init htab_initialize(void)
>  {
>  	unsigned long table, htab_size_bytes;
> diff -Naupr linux-2.6.14-git7/arch/powerpc/mm/mem.c linux-2.6.14-git7.work/arch/powerpc/mm/mem.c
> --- linux-2.6.14-git7/arch/powerpc/mm/mem.c	2005-11-04 21:21:05.000000000 +0000
> +++ linux-2.6.14-git7.work/arch/powerpc/mm/mem.c	2005-11-04 22:05:06.000000000 +0000
> @@ -124,6 +124,9 @@ int __devinit add_memory(u64 start, u64 
>  	unsigned long start_pfn = start >> PAGE_SHIFT;
>  	unsigned long nr_pages = size >> PAGE_SHIFT;
>  
> +	start += KERNELBASE;
> +	create_section_mapping(start, start + size);
> +
>  	/* this should work for most non-highmem platforms */
>  	zone = pgdata->node_zones;
>  
> diff -Naupr linux-2.6.14-git7/include/asm-ppc64/sparsemem.h linux-2.6.14-git7.work/include/asm-ppc64/sparsemem.h
> --- linux-2.6.14-git7/include/asm-ppc64/sparsemem.h	2005-10-28 00:02:08.000000000 +0000
> +++ linux-2.6.14-git7.work/include/asm-ppc64/sparsemem.h	2005-11-04 22:05:06.000000000 +0000
> @@ -11,6 +11,10 @@
>  #define MAX_PHYSADDR_BITS       38
>  #define MAX_PHYSMEM_BITS        36
>  
> +#ifdef CONFIG_MEMORY_HOTPLUG
> +extern void create_section_mapping(unsigned long start, unsigned long end);
> +#endif /* CONFIG_MEMORY_HOTPLUG */
> +
>  #endif /* CONFIG_SPARSEMEM */
>  
>  #endif /* _ASM_PPC64_SPARSEMEM_H */
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


  reply	other threads:[~2005-11-05  0:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-04 23:15 [PATCH 0/4] Memory Add Fixes for ppc64 Mike Kravetz
2005-11-04 23:18 ` [PATCH 1/4] " Mike Kravetz
2005-11-05  0:04   ` Benjamin Herrenschmidt [this message]
2005-11-05  0:35     ` Mike Kravetz
2005-11-05  0:43       ` Benjamin Herrenschmidt
2005-11-07 20:47     ` Mike Kravetz
2005-11-07 21:12       ` Benjamin Herrenschmidt
2005-11-07 21:48         ` Mike Kravetz
2005-11-08  0:35           ` Benjamin Herrenschmidt
2005-11-08 14:51       ` Andy Whitcroft
2005-11-08  0:25     ` [PATCH 1/4] revised " Mike Kravetz
2005-11-08  2:07       ` Paul Mackerras
2005-11-08  3:02         ` Mike Kravetz
2005-11-04 23:19 ` [PATCH 2/4] " Mike Kravetz
2005-11-04 23:20 ` [PATCH 3/4] " Mike Kravetz
2005-11-04 23:21 ` [PATCH 4/4] " Mike Kravetz
2005-11-07  0:59   ` Paul Mackerras
2005-11-07 17:39     ` Mike Kravetz
2005-11-08  0:39 ` [PATCH 0/4] " Anton Blanchard
2005-11-08  0:48   ` Mike Kravetz

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=1131149070.29195.41.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=kravetz@us.ibm.com \
    --cc=lhms-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc64-dev@ozlabs.org \
    --cc=paulus@samba.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.