From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Dale Farnsworth <dale@farnsworth.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 07/10] powerpc: Implement kmap_atomic_pfn on powerpc
Date: Sat, 15 Dec 2007 17:17:41 +1100 [thread overview]
Message-ID: <1197699461.6696.45.camel@pasglop> (raw)
In-Reply-To: <20071122154638.GA26514@xyzzy.farnsworth.org>
On Thu, 2007-11-22 at 08:46 -0700, Dale Farnsworth wrote:
> This is needed for the ppc32 /dev/oldmem driver of crash dump.
Kumar's working (well, last I heard he was) on a fixmap mechanism
so we can do that sort of thing without CONFIG_HIGHMEM, you may
want to sync with him here, that would allow to shrink the crash
kernel by not having highmem selected.
Cheers,
Ben.
> Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
> ---
> include/asm-powerpc/highmem.h | 18 ++++++++++++++++++
> 1 files changed, 18 insertions(+), 0 deletions(-)
>
> diff --git a/include/asm-powerpc/highmem.h b/include/asm-powerpc/highmem.h
> index f7b21ee..88d9e05 100644
> --- a/include/asm-powerpc/highmem.h
> +++ b/include/asm-powerpc/highmem.h
> @@ -117,6 +117,24 @@ static inline void kunmap_atomic(void *kvaddr, enum km_type type)
> pagefault_enable();
> }
>
> +/* This is the same as kmap_atomic() but can map memory that doesn't
> + * have a struct page associated with it.
> + */
> +static inline void *kmap_atomic_pfn(unsigned long pfn, enum km_type type)
> +{
> + unsigned int idx;
> + unsigned long vaddr;
> +
> + pagefault_disable();
> +
> + idx = type + KM_TYPE_NR * smp_processor_id();
> + vaddr = KMAP_FIX_BEGIN + idx * PAGE_SIZE;
> + set_pte_at(&init_mm, vaddr, kmap_pte+idx, pfn_pte(pfn, kmap_prot));
> + flush_tlb_page(NULL, vaddr);
> +
> + return (void*) vaddr;
> +}
> +
> static inline struct page *kmap_atomic_to_page(void *ptr)
> {
> unsigned long idx, vaddr = (unsigned long) ptr;
next prev parent reply other threads:[~2007-12-15 6:17 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <foo@xyzzy.farnsworth.org>
2007-11-22 15:42 ` [PATCH 00/10] powerpc: Add kexec/kdump support for ppc32 Dale Farnsworth
2007-11-22 15:45 ` [PATCH 01/10] powerpc: Set up OF properties for ppc32 kexec Dale Farnsworth
2007-11-22 22:17 ` Stephen Rothwell
2007-11-23 4:43 ` Dale Farnsworth
2007-11-22 15:46 ` [PATCH 02/10] powerpc: Cleanup CONFIG_KEXEC dependency Dale Farnsworth
2007-11-22 15:46 ` [PATCH 03/10] powerpc: Add kexec support for PPC_85xx platforms Dale Farnsworth
2007-11-22 22:20 ` Stephen Rothwell
2007-12-15 6:16 ` Benjamin Herrenschmidt
2007-12-18 16:14 ` Dale Farnsworth
2007-11-22 15:46 ` [PATCH 04/10] powerpc: Add crash kernel support for classic ppc Dale Farnsworth
2007-11-22 15:46 ` [PATCH 05/10] powerpc: Add crash kernel support for 85xx Dale Farnsworth
2007-12-14 16:48 ` Kumar Gala
2007-12-14 17:23 ` Dale Farnsworth
2008-01-18 22:29 ` Kumar Gala
2008-01-18 23:09 ` Dale Farnsworth
2008-01-21 16:19 ` Kumar Gala
2007-11-22 15:46 ` [PATCH 06/10] powerpc: Fix bogus crash kernel messages Dale Farnsworth
2007-11-22 15:46 ` [PATCH 07/10] powerpc: Implement kmap_atomic_pfn on powerpc Dale Farnsworth
2007-12-15 6:17 ` Benjamin Herrenschmidt [this message]
2007-12-18 16:20 ` Dale Farnsworth
2007-12-18 16:42 ` Kumar Gala
2007-11-22 15:46 ` [PATCH 08/10] powerpc: Implement crash dump support on ppc32 Dale Farnsworth
2007-11-22 15:46 ` [PATCH 09/10] powepc: Remove unnecessary of_get_flat_dt_prop casts Dale Farnsworth
2007-11-22 15:46 ` [PATCH 10/10] powerpc: Make crashkernels ignore crashkernel reservations Dale Farnsworth
2008-04-24 12:50 ` [PATCH 00/10] powerpc: Add kexec/kdump support for ppc32 Kumar Gala
2008-04-24 15:42 ` Dale Farnsworth
2008-04-24 16:28 ` Kumar Gala
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=1197699461.6696.45.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=dale@farnsworth.org \
--cc=linuxppc-dev@ozlabs.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.