From: Ingo Molnar <mingo@elte.hu>
To: David Miller <davem@davemloft.net>
Cc: a.p.zijlstra@chello.nl, joerg.roedel@amd.com,
fujita.tomonori@lab.ntt.co.jp, reif@earthlink.net,
sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org,
x86@kernel.org, tony.luck@intel.com, akpm@linux-foundation.org
Subject: Re: [PATCH v2 0/8] sparc: use asm-generic/dma-mapping-common.h and pci-dma-compat.h
Date: Mon, 3 Aug 2009 07:54:41 +0200 [thread overview]
Message-ID: <20090803055441.GA19428@elte.hu> (raw)
In-Reply-To: <20090802.202135.63875488.davem@davemloft.net>
* David Miller <davem@davemloft.net> wrote:
> From: Ingo Molnar <mingo@elte.hu>
> Date: Sat, 18 Jul 2009 13:06:20 +0200
>
> > I'm wondering why sparc32 frees from the middle of the kernel
> > image. The way architectures generally do it is to put freeable
> > pages into a separate section. That way it does not get mingled
> > with the kernel core image area (which stays nicely continuous).
>
> It's conditionally free'able, we actually use the pages if the
> system is SMP and has more than cpu 0 installed.
Sounds similar to the alternate instructions section on x86:
arch/x86/kernel/alternative.c:
if (smp_alt_once)
free_init_pages("SMP alternatives",
(unsigned long)__smp_locks,
(unsigned long)__smp_locks_end);
It's in a separate section and linked + freed separately. The linker
script page-aligns it:
arch/x86/kernel/vmlinux.lds.S:
/*
* smp_locks might be freed after init
* start/end must be page aligned
*/
. = ALIGN(PAGE_SIZE);
.smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
__smp_locks = .;
*(.smp_locks)
__smp_locks_end = .;
. = ALIGN(PAGE_SIZE);
}
So that it can be freed. It's also placed next to the regular init
section to not create too many holes. It also keeps the 'kernel text
area' continuous and things like core_kernel_text() & co still work
fine.
Ingo
next prev parent reply other threads:[~2009-08-03 5:55 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-13 6:25 [PATCH v2 0/8] sparc: use asm-generic/dma-mapping-common.h and pci-dma-compat.h FUJITA Tomonori
2009-07-13 6:25 ` [PATCH 1/8] remove flush_write_buffers() in dma-mapping-common.h FUJITA Tomonori
2009-08-05 1:48 ` FUJITA Tomonori
2009-07-13 6:25 ` [PATCH 2/8] IA64: remove NULL flush_write_buffers FUJITA Tomonori
2009-07-13 6:25 ` [PATCH 3/8] sparc: use dma_map_ops struct FUJITA Tomonori
2009-07-17 2:36 ` David Miller
2009-07-13 6:25 ` [PATCH 4/8] sparc: use asm-generic/dma-mapping-common.h FUJITA Tomonori
2009-07-17 2:37 ` David Miller
2009-07-13 6:25 ` [PATCH 5/8] sparc: remove no-op dma_4v_sync_single_for_cpu and dma_4v_sync_sg_for_cpu FUJITA Tomonori
2009-07-17 2:37 ` David Miller
2009-07-13 6:25 ` [PATCH 6/8] sparc: replace sbus_map_single and sbus_unmap_single with sbus_map_page and sbus_unmap_page FUJITA Tomonori
2009-07-17 2:37 ` David Miller
2009-07-13 6:25 ` [PATCH 7/8] sparc: use asm-generic/pci-dma-compat FUJITA Tomonori
2009-07-17 2:38 ` David Miller
2009-07-13 6:26 ` [PATCH 8/8] sparc: add CONFIG_DMA_API_DEBUG support FUJITA Tomonori
2009-07-17 2:39 ` David Miller
2009-07-14 0:56 ` [PATCH v2 0/8] sparc: use asm-generic/dma-mapping-common.h and pci-dma-compat.h Robert Reif
2009-07-14 1:40 ` FUJITA Tomonori
2009-07-14 9:23 ` Joerg Roedel
2009-07-14 20:12 ` David Miller
2009-07-18 11:06 ` Ingo Molnar
2009-08-03 3:21 ` David Miller
2009-08-03 5:54 ` Ingo Molnar [this message]
2009-08-04 4:21 ` David Miller
2009-07-21 16:05 ` Joerg Roedel
2009-07-21 19:15 ` David Miller
2009-08-03 5:56 ` Ingo Molnar
2009-08-04 4:22 ` David Miller
2009-08-04 7:45 ` Ingo Molnar
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=20090803055441.GA19428@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=joerg.roedel@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=reif@earthlink.net \
--cc=sparclinux@vger.kernel.org \
--cc=tony.luck@intel.com \
--cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox