* [PATCH 0/7] Get ride of CPHYSADDR() in setup.c [take #2]
@ 2006-10-13 12:38 Franck Bui-Huu
2006-10-13 12:39 ` [PATCH 1/7] page.h: remove __pa() usages Franck Bui-Huu
` (6 more replies)
0 siblings, 7 replies; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-13 12:38 UTC (permalink / raw)
To: ralf; +Cc: anemo, ths, linux-mips
Here's the take #2.
I changed the definition of __pa() for 64-bits kernels to match
the one suggested by Atsushi. It should be safer.
It also makes virt_to_page() uses virt_to_phys() instead of
__pa().
Unfortunately, no tests have been done for 64 bit kernels
because of lacks of hardware. If anybody could give a try that
would be great.
Please consider,
Franck
---
arch/mips/kernel/setup.c | 55 +++++++++++++++++++++++++-------------------
arch/mips/mm/init.c | 42 +++++++++++++++-------------------
include/asm-mips/io.h | 2 +-
include/asm-mips/page.h | 14 ++++++++---
include/asm-mips/pgtable.h | 2 +-
5 files changed, 62 insertions(+), 53 deletions(-)
^ permalink raw reply [flat|nested] 46+ messages in thread
* [PATCH 1/7] page.h: remove __pa() usages.
2006-10-13 12:38 [PATCH 0/7] Get ride of CPHYSADDR() in setup.c [take #2] Franck Bui-Huu
@ 2006-10-13 12:39 ` Franck Bui-Huu
2006-10-13 16:27 ` Atsushi Nemoto
2006-10-13 12:39 ` [PATCH 2/7] Make __pa() aware of XKPHYS/CKSEG0 address mix for 64 bit kernels Franck Bui-Huu
` (5 subsequent siblings)
6 siblings, 1 reply; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-13 12:39 UTC (permalink / raw)
To: ralf; +Cc: anemo, ths, linux-mips, Franck Bui-Huu
__pa() was used by virt_to_page() and virt_addr_valid(). These
latter are used when kernel is initialised so __pa() is not
appropriate, we use virt_to_phys() instead.
Futhermore __pa() is going to take care of CKSEG0/XKPHYS
address mix for 64 bit kernels. This makes __pa() more complex
than virt_to_phys() and this extra work is not needed by
virt_to_page() and virt_addr_valid().
Eventually it consolidates virt_to_phys() prototype by making
its argument 'const'. this avoids some warnings that was due
to some virt_to_page() usages which pass const pointer.
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
---
arch/mips/mm/init.c | 8 ++++----
include/asm-mips/io.h | 2 +-
include/asm-mips/page.h | 4 ++--
include/asm-mips/pgtable.h | 2 +-
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 2f346d1..4431ea0 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -90,9 +90,9 @@ unsigned long setup_zero_pages(void)
if (!empty_zero_page)
panic("Oh boy, that early out of memory?");
- page = virt_to_page(empty_zero_page);
+ page = virt_to_page((void *)empty_zero_page);
split_page(page, order);
- while (page < virt_to_page(empty_zero_page + (PAGE_SIZE << order))) {
+ while (page < virt_to_page((void *)(empty_zero_page + (PAGE_SIZE << order)))) {
SetPageReserved(page);
page++;
}
@@ -490,8 +490,8 @@ void free_init_pages(char *what, unsigne
unsigned long addr;
for (addr = begin; addr < end; addr += PAGE_SIZE) {
- ClearPageReserved(virt_to_page(addr));
- init_page_count(virt_to_page(addr));
+ ClearPageReserved(virt_to_page((void *)addr));
+ init_page_count(virt_to_page((void *)addr));
memset((void *)addr, 0xcc, PAGE_SIZE);
free_page(addr);
totalram_pages++;
diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h
index cfad7c8..5ff8fc2 100644
--- a/include/asm-mips/io.h
+++ b/include/asm-mips/io.h
@@ -113,7 +113,7 @@ #endif
* almost all conceivable cases a device driver should not be using
* this function
*/
-static inline unsigned long virt_to_phys(volatile void * address)
+static inline unsigned long virt_to_phys(volatile const void *address)
{
return (unsigned long)address - PAGE_OFFSET;
}
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
index 32e5625..0821eb0 100644
--- a/include/asm-mips/page.h
+++ b/include/asm-mips/page.h
@@ -157,8 +157,8 @@ ({ \
#endif
-#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
-#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
+#define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(virt_to_phys(kaddr)))
+#define virt_addr_valid(kaddr) pfn_valid(PFN_DOWN(virt_to_phys(kaddr)))
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h
index 1ca4d1e..f2e1325 100644
--- a/include/asm-mips/pgtable.h
+++ b/include/asm-mips/pgtable.h
@@ -67,7 +67,7 @@ extern unsigned long empty_zero_page;
extern unsigned long zero_page_mask;
#define ZERO_PAGE(vaddr) \
- (virt_to_page(empty_zero_page + (((unsigned long)(vaddr)) & zero_page_mask)))
+ (virt_to_page((void *)(empty_zero_page + (((unsigned long)(vaddr)) & zero_page_mask))))
#define __HAVE_ARCH_MOVE_PTE
#define move_pte(pte, prot, old_addr, new_addr) \
--
1.4.2.3
^ permalink raw reply related [flat|nested] 46+ messages in thread
* [PATCH 2/7] Make __pa() aware of XKPHYS/CKSEG0 address mix for 64 bit kernels
2006-10-13 12:38 [PATCH 0/7] Get ride of CPHYSADDR() in setup.c [take #2] Franck Bui-Huu
2006-10-13 12:39 ` [PATCH 1/7] page.h: remove __pa() usages Franck Bui-Huu
@ 2006-10-13 12:39 ` Franck Bui-Huu
2006-10-13 16:27 ` Atsushi Nemoto
2006-10-19 4:01 ` Atsushi Nemoto
2006-10-13 12:39 ` [PATCH 3/7] setup.c: get ride of CPHYSADDR() Franck Bui-Huu
` (4 subsequent siblings)
6 siblings, 2 replies; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-13 12:39 UTC (permalink / raw)
To: ralf; +Cc: anemo, ths, linux-mips, Franck Bui-Huu
During early boot mem init, some configs couldn't use __pa() to
convert virtual into physical addresses. Specially for 64 bit
kernel cases when CONFIG_BUILD_ELF64=n. This patch make __pa()
work for _all_ configs and thus make CPHYSADDR() useless.
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
---
include/asm-mips/page.h | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
index 0821eb0..5da4733 100644
--- a/include/asm-mips/page.h
+++ b/include/asm-mips/page.h
@@ -131,8 +131,13 @@ #endif /* !__ASSEMBLY__ */
/* to align the pointer to the (next) page boundary */
#define PAGE_ALIGN(addr) (((addr) + PAGE_SIZE - 1) & PAGE_MASK)
-#define __pa(x) ((unsigned long) (x) - PAGE_OFFSET)
-#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))
+#if defined(CONFIG_64BITS) && !defined(CONFIG_BUILD_ELF64)
+#define __page_offset(x) ((unsigned long)(x) < CKSEG0 ? PAGE_OFFSET : CKSEG0)
+#else
+#define __page_offset(x) PAGE_OFFSET
+#endif
+#define __pa(x) ((unsigned long)(x) - __page_offset(x))
+#define __va(x) ((void *)((unsigned long)(x) + __page_offset(x)))
#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
--
1.4.2.3
^ permalink raw reply related [flat|nested] 46+ messages in thread
* [PATCH 3/7] setup.c: get ride of CPHYSADDR()
2006-10-13 12:38 [PATCH 0/7] Get ride of CPHYSADDR() in setup.c [take #2] Franck Bui-Huu
2006-10-13 12:39 ` [PATCH 1/7] page.h: remove __pa() usages Franck Bui-Huu
2006-10-13 12:39 ` [PATCH 2/7] Make __pa() aware of XKPHYS/CKSEG0 address mix for 64 bit kernels Franck Bui-Huu
@ 2006-10-13 12:39 ` Franck Bui-Huu
2006-10-13 12:39 ` [PATCH 4/7] Introduce __pa_symbol() Franck Bui-Huu
` (3 subsequent siblings)
6 siblings, 0 replies; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-13 12:39 UTC (permalink / raw)
To: ralf; +Cc: anemo, ths, linux-mips, Franck Bui-Huu
and use new __pa() implementation instead introduced by the previous
patch. Indeed this macro can be used now even by the 64 bit kernels
with CONFIG_BUILD_ELF64=n config.
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
---
arch/mips/kernel/setup.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index fdbb508..00d62bd 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -204,12 +204,12 @@ static void __init finalize_initrd(void)
printk(KERN_INFO "Initrd not found or empty");
goto disable;
}
- if (CPHYSADDR(initrd_end) > PFN_PHYS(max_low_pfn)) {
+ if (__pa(initrd_end) > PFN_PHYS(max_low_pfn)) {
printk("Initrd extends beyond end of memory");
goto disable;
}
- reserve_bootmem(CPHYSADDR(initrd_start), size);
+ reserve_bootmem(__pa(initrd_start), size);
initrd_below_start_ok = 1;
printk(KERN_INFO "Initial ramdisk at: 0x%lx (%lu bytes)\n",
@@ -256,7 +256,7 @@ static void __init bootmem_init(void)
* of usable memory.
*/
reserved_end = init_initrd();
- reserved_end = PFN_UP(CPHYSADDR(max(reserved_end, (unsigned long)&_end)));
+ reserved_end = PFN_UP(__pa(max(reserved_end, (unsigned long)&_end)));
/*
* Find the highest page frame number we have available.
--
1.4.2.3
^ permalink raw reply related [flat|nested] 46+ messages in thread
* [PATCH 4/7] Introduce __pa_symbol()
2006-10-13 12:38 [PATCH 0/7] Get ride of CPHYSADDR() in setup.c [take #2] Franck Bui-Huu
` (2 preceding siblings ...)
2006-10-13 12:39 ` [PATCH 3/7] setup.c: get ride of CPHYSADDR() Franck Bui-Huu
@ 2006-10-13 12:39 ` Franck Bui-Huu
2006-10-13 12:39 ` [PATCH 5/7] setup.c: use __pa_symbol() where needed Franck Bui-Huu
` (2 subsequent siblings)
6 siblings, 0 replies; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-13 12:39 UTC (permalink / raw)
To: ralf; +Cc: anemo, ths, linux-mips, Franck Bui-Huu
This patch introduces __pa_symbol() macro which should be used to
calculate the physical address of kernel symbols. It also relies
on RELOC_HIDE() to avoid any compiler's oddities when doing
arithmetics on symbols.
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
---
include/asm-mips/page.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
index 5da4733..662e009 100644
--- a/include/asm-mips/page.h
+++ b/include/asm-mips/page.h
@@ -137,6 +137,7 @@ #else
#define __page_offset(x) PAGE_OFFSET
#endif
#define __pa(x) ((unsigned long)(x) - __page_offset(x))
+#define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x),0))
#define __va(x) ((void *)((unsigned long)(x) + __page_offset(x)))
#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
--
1.4.2.3
^ permalink raw reply related [flat|nested] 46+ messages in thread
* [PATCH 5/7] setup.c: use __pa_symbol() where needed
2006-10-13 12:38 [PATCH 0/7] Get ride of CPHYSADDR() in setup.c [take #2] Franck Bui-Huu
` (3 preceding siblings ...)
2006-10-13 12:39 ` [PATCH 4/7] Introduce __pa_symbol() Franck Bui-Huu
@ 2006-10-13 12:39 ` Franck Bui-Huu
2006-10-13 12:39 ` [PATCH 6/7] setup.c: clean up initrd related code Franck Bui-Huu
2006-10-13 12:39 ` [PATCH 7/7] Make free_init_pages() arguments to be physical addresses Franck Bui-Huu
6 siblings, 0 replies; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-13 12:39 UTC (permalink / raw)
To: ralf; +Cc: anemo, ths, linux-mips, Franck Bui-Huu
It should fix the broken code in resource_init() too.
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
---
arch/mips/kernel/setup.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 00d62bd..84faa4b 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -256,7 +256,7 @@ static void __init bootmem_init(void)
* of usable memory.
*/
reserved_end = init_initrd();
- reserved_end = PFN_UP(__pa(max(reserved_end, (unsigned long)&_end)));
+ reserved_end = PFN_UP(max(__pa(reserved_end), __pa_symbol(&_end)));
/*
* Find the highest page frame number we have available.
@@ -428,10 +428,10 @@ static void __init resource_init(void)
if (UNCAC_BASE != IO_BASE)
return;
- code_resource.start = virt_to_phys(&_text);
- code_resource.end = virt_to_phys(&_etext) - 1;
- data_resource.start = virt_to_phys(&_etext);
- data_resource.end = virt_to_phys(&_edata) - 1;
+ code_resource.start = __pa_symbol(&_text);
+ code_resource.end = __pa_symbol(&_etext) - 1;
+ data_resource.start = __pa_symbol(&_etext);
+ data_resource.end = __pa_symbol(&_edata) - 1;
/*
* Request address space for all standard RAM.
--
1.4.2.3
^ permalink raw reply related [flat|nested] 46+ messages in thread
* [PATCH 6/7] setup.c: clean up initrd related code
2006-10-13 12:38 [PATCH 0/7] Get ride of CPHYSADDR() in setup.c [take #2] Franck Bui-Huu
` (4 preceding siblings ...)
2006-10-13 12:39 ` [PATCH 5/7] setup.c: use __pa_symbol() where needed Franck Bui-Huu
@ 2006-10-13 12:39 ` Franck Bui-Huu
2006-10-16 8:03 ` Franck Bui-Huu
2006-10-19 4:13 ` Atsushi Nemoto
2006-10-13 12:39 ` [PATCH 7/7] Make free_init_pages() arguments to be physical addresses Franck Bui-Huu
6 siblings, 2 replies; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-13 12:39 UTC (permalink / raw)
To: ralf; +Cc: anemo, ths, linux-mips, Franck Bui-Huu
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
---
arch/mips/kernel/setup.c | 43 +++++++++++++++++++++++++------------------
arch/mips/mm/init.c | 5 -----
2 files changed, 25 insertions(+), 23 deletions(-)
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 84faa4b..811a8fd 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -144,14 +144,12 @@ static int __init rd_start_early(char *p
{
unsigned long start = memparse(p, &p);
-#ifdef CONFIG_64BIT
- /* HACK: Guess if the sign extension was forgotten */
- if (start > 0x0000000080000000 && start < 0x00000000ffffffff)
- start |= 0xffffffff00000000UL;
-#endif
+ /*
+ * No sanity checkings are needed here, they're going to be
+ * done by init_initrd() soon.
+ */
initrd_start = start;
initrd_end += start;
-
return 0;
}
early_param("rd_start", rd_start_early);
@@ -159,14 +157,14 @@ early_param("rd_start", rd_start_early);
static int __init rd_size_early(char *p)
{
initrd_end += memparse(p, &p);
-
return 0;
}
early_param("rd_size", rd_size_early);
+/* it returns the next free pfn after initrd */
static unsigned long __init init_initrd(void)
{
- unsigned long tmp, end, size;
+ unsigned long tmp, end;
u32 *initrd_header;
ROOT_DEV = Root_RAM0;
@@ -176,24 +174,34 @@ static unsigned long __init init_initrd(
* already set up initrd_start and initrd_end. In these cases
* perfom sanity checks and use them if all looks good.
*/
- size = initrd_end - initrd_start;
- if (initrd_end == 0 || size == 0) {
- initrd_start = 0;
- initrd_end = 0;
- } else
- return initrd_end;
+ if (initrd_end > initrd_start)
+ goto sanitize;
end = (unsigned long)&_end;
tmp = PAGE_ALIGN(end) - sizeof(u32) * 2;
if (tmp < end)
tmp += PAGE_SIZE;
+ initrd_start = 0;
+ initrd_end = 0;
+ end = 0;
initrd_header = (u32 *)tmp;
if (initrd_header[0] == 0x494E5244) {
initrd_start = (unsigned long)&initrd_header[2];
initrd_end = initrd_start + initrd_header[1];
+sanitize:
+ /*
+ * Sanitize initrd addresses. For example firmware
+ * can't guess if they need to pass them through
+ * 64-bits values if the kernel has been built in pure
+ * 32-bit. We need also to switch from KSEG0 to XKPHYS
+ * addresses now, so the code can now safely use __pa().
+ */
+ end = __pa(initrd_end);
+ initrd_end = (unsigned long)__va(end);
+ initrd_start = (unsigned long)__va(__pa(initrd_start));
}
- return initrd_end;
+ return PFN_UP(end);
}
static void __init finalize_initrd(void)
@@ -223,7 +231,7 @@ disable:
#else /* !CONFIG_BLK_DEV_INITRD */
-#define init_initrd() 0
+#define init_initrd() 0UL
#define finalize_initrd() do {} while (0)
#endif
@@ -255,8 +263,7 @@ static void __init bootmem_init(void)
* not selected. Once that done we can determine the low bound
* of usable memory.
*/
- reserved_end = init_initrd();
- reserved_end = PFN_UP(max(__pa(reserved_end), __pa_symbol(&_end)));
+ reserved_end = max(init_initrd(), PFN_UP(__pa_symbol(&_end)));
/*
* Find the highest page frame number we have available.
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 4431ea0..072b3b0 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -502,11 +502,6 @@ void free_init_pages(char *what, unsigne
#ifdef CONFIG_BLK_DEV_INITRD
void free_initrd_mem(unsigned long start, unsigned long end)
{
-#ifdef CONFIG_64BIT
- /* Switch from KSEG0 to XKPHYS addresses */
- start = (unsigned long)phys_to_virt(CPHYSADDR(start));
- end = (unsigned long)phys_to_virt(CPHYSADDR(end));
-#endif
free_init_pages("initrd memory", start, end);
}
#endif
--
1.4.2.3
^ permalink raw reply related [flat|nested] 46+ messages in thread
* [PATCH 7/7] Make free_init_pages() arguments to be physical addresses
2006-10-13 12:38 [PATCH 0/7] Get ride of CPHYSADDR() in setup.c [take #2] Franck Bui-Huu
` (5 preceding siblings ...)
2006-10-13 12:39 ` [PATCH 6/7] setup.c: clean up initrd related code Franck Bui-Huu
@ 2006-10-13 12:39 ` Franck Bui-Huu
2006-10-13 13:31 ` Franck Bui-Huu
6 siblings, 1 reply; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-13 12:39 UTC (permalink / raw)
To: ralf; +Cc: anemo, ths, linux-mips, Franck Bui-Huu
It allows caller of this function to not care about CKSEG0/XKPHYS
address mixes. It's now automatically done by free_init_pages().
We can now safely remove hack needed by 64 bit kernels with
CONFIG_BUILD_ELF64=n in free_initmem().
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
---
arch/mips/mm/init.c | 33 +++++++++++++++++----------------
1 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 072b3b0..8ccaddf 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -485,15 +485,18 @@ #endif
}
#endif /* !CONFIG_NEED_MULTIPLE_NODES */
-void free_init_pages(char *what, unsigned long begin, unsigned long end)
+static void free_init_pages(char *what, unsigned long begin, unsigned long end)
{
- unsigned long addr;
+ unsigned long pfn;
- for (addr = begin; addr < end; addr += PAGE_SIZE) {
- ClearPageReserved(virt_to_page((void *)addr));
- init_page_count(virt_to_page((void *)addr));
- memset((void *)addr, 0xcc, PAGE_SIZE);
- free_page(addr);
+ for (pfn = PFN_UP(begin); pfn < PFN_DOWN(end); pfn++) {
+ struct page *page = pfn_to_page(pfn);
+ void *addr = phys_to_virt(PFN_PHYS(pfn));
+
+ ClearPageReserved(page);
+ init_page_count(page);
+ memset(addr, POISON_FREE_INITMEM, PAGE_SIZE);
+ __free_page(page);
totalram_pages++;
}
printk(KERN_INFO "Freeing %s: %ldk freed\n", what, (end - begin) >> 10);
@@ -502,7 +505,9 @@ void free_init_pages(char *what, unsigne
#ifdef CONFIG_BLK_DEV_INITRD
void free_initrd_mem(unsigned long start, unsigned long end)
{
- free_init_pages("initrd memory", start, end);
+ free_init_pages("initrd memory",
+ virt_to_phys(start),
+ virt_to_phys(end));
}
#endif
@@ -510,17 +515,13 @@ extern unsigned long prom_free_prom_memo
void free_initmem(void)
{
- unsigned long start, end, freed;
+ unsigned long freed;
freed = prom_free_prom_memory();
if (freed)
printk(KERN_INFO "Freeing firmware memory: %ldk freed\n",freed);
- start = (unsigned long)(&__init_begin);
- end = (unsigned long)(&__init_end);
-#ifdef CONFIG_64BIT
- start = PAGE_OFFSET | CPHYSADDR(start);
- end = PAGE_OFFSET | CPHYSADDR(end);
-#endif
- free_init_pages("unused kernel memory", start, end);
+ free_init_pages("unused kernel memory",
+ __pa_symbol(&__init_begin),
+ __pa_symbol(&__init_end));
}
--
1.4.2.3
^ permalink raw reply related [flat|nested] 46+ messages in thread
* Re: [PATCH 7/7] Make free_init_pages() arguments to be physical addresses
2006-10-13 12:39 ` [PATCH 7/7] Make free_init_pages() arguments to be physical addresses Franck Bui-Huu
@ 2006-10-13 13:31 ` Franck Bui-Huu
0 siblings, 0 replies; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-13 13:31 UTC (permalink / raw)
To: Franck Bui-Huu; +Cc: ralf, anemo, ths, linux-mips, Franck Bui-Huu
Franck Bui-Huu wrote:
[snip]
> void free_initrd_mem(unsigned long start, unsigned long end)
> {
> - free_init_pages("initrd memory", start, end);
> + free_init_pages("initrd memory",
> + virt_to_phys(start),
> + virt_to_phys(end));
> }
argh, this part generates warnings... please consider the patch
below instead.
-- >8 --
Subject: [PATCH 7/7] Make free_init_pages() arguments to be physical addresses
It allows caller of this function to not care about CKSEG0/XKPHYS
address mixes. It's now automatically done by free_init_pages().
We can now safely remove hack needed by 64 bit kernels with
CONFIG_BUILD_ELF64=n in free_initmem().
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
---
arch/mips/mm/init.c | 33 +++++++++++++++++----------------
1 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 072b3b0..733bdec 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -485,15 +485,18 @@ #endif
}
#endif /* !CONFIG_NEED_MULTIPLE_NODES */
-void free_init_pages(char *what, unsigned long begin, unsigned long end)
+static void free_init_pages(char *what, unsigned long begin, unsigned long end)
{
- unsigned long addr;
+ unsigned long pfn;
- for (addr = begin; addr < end; addr += PAGE_SIZE) {
- ClearPageReserved(virt_to_page((void *)addr));
- init_page_count(virt_to_page((void *)addr));
- memset((void *)addr, 0xcc, PAGE_SIZE);
- free_page(addr);
+ for (pfn = PFN_UP(begin); pfn < PFN_DOWN(end); pfn++) {
+ struct page *page = pfn_to_page(pfn);
+ void *addr = phys_to_virt(PFN_PHYS(pfn));
+
+ ClearPageReserved(page);
+ init_page_count(page);
+ memset(addr, POISON_FREE_INITMEM, PAGE_SIZE);
+ __free_page(page);
totalram_pages++;
}
printk(KERN_INFO "Freeing %s: %ldk freed\n", what, (end - begin) >> 10);
@@ -502,7 +505,9 @@ void free_init_pages(char *what, unsigne
#ifdef CONFIG_BLK_DEV_INITRD
void free_initrd_mem(unsigned long start, unsigned long end)
{
- free_init_pages("initrd memory", start, end);
+ free_init_pages("initrd memory",
+ virt_to_phys((void *)start),
+ virt_to_phys((void *)end));
}
#endif
@@ -510,17 +515,13 @@ extern unsigned long prom_free_prom_memo
void free_initmem(void)
{
- unsigned long start, end, freed;
+ unsigned long freed;
freed = prom_free_prom_memory();
if (freed)
printk(KERN_INFO "Freeing firmware memory: %ldk freed\n",freed);
- start = (unsigned long)(&__init_begin);
- end = (unsigned long)(&__init_end);
-#ifdef CONFIG_64BIT
- start = PAGE_OFFSET | CPHYSADDR(start);
- end = PAGE_OFFSET | CPHYSADDR(end);
-#endif
- free_init_pages("unused kernel memory", start, end);
+ free_init_pages("unused kernel memory",
+ __pa_symbol(&__init_begin),
+ __pa_symbol(&__init_end));
}
--
1.4.2.3
^ permalink raw reply related [flat|nested] 46+ messages in thread
* Re: [PATCH 1/7] page.h: remove __pa() usages.
2006-10-13 12:39 ` [PATCH 1/7] page.h: remove __pa() usages Franck Bui-Huu
@ 2006-10-13 16:27 ` Atsushi Nemoto
2006-10-14 9:22 ` Franck Bui-Huu
0 siblings, 1 reply; 46+ messages in thread
From: Atsushi Nemoto @ 2006-10-13 16:27 UTC (permalink / raw)
To: vagabon.xyz; +Cc: ralf, ths, linux-mips, fbuihuu
On Fri, 13 Oct 2006 14:39:00 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
> -#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
> -#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
> +#define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(virt_to_phys(kaddr)))
> +#define virt_addr_valid(kaddr) pfn_valid(PFN_DOWN(virt_to_phys(kaddr)))
It seems "#include <linux/pfn.h>" (and "#include <asm/io.h>" perhaps)
required.
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 2/7] Make __pa() aware of XKPHYS/CKSEG0 address mix for 64 bit kernels
2006-10-13 12:39 ` [PATCH 2/7] Make __pa() aware of XKPHYS/CKSEG0 address mix for 64 bit kernels Franck Bui-Huu
@ 2006-10-13 16:27 ` Atsushi Nemoto
2006-10-14 8:39 ` Franck Bui-Huu
2006-10-19 4:01 ` Atsushi Nemoto
1 sibling, 1 reply; 46+ messages in thread
From: Atsushi Nemoto @ 2006-10-13 16:27 UTC (permalink / raw)
To: vagabon.xyz; +Cc: ralf, ths, linux-mips, fbuihuu
On Fri, 13 Oct 2006 14:39:01 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
> -#define __pa(x) ((unsigned long) (x) - PAGE_OFFSET)
> -#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))
> +#if defined(CONFIG_64BITS) && !defined(CONFIG_BUILD_ELF64)
> +#define __page_offset(x) ((unsigned long)(x) < CKSEG0 ? PAGE_OFFSET : CKSEG0)
> +#else
> +#define __page_offset(x) PAGE_OFFSET
> +#endif
> +#define __pa(x) ((unsigned long)(x) - __page_offset(x))
> +#define __va(x) ((void *)((unsigned long)(x) + __page_offset(x)))
In __va(), you are passing an physical address to __page_offset().
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 2/7] Make __pa() aware of XKPHYS/CKSEG0 address mix for 64 bit kernels
2006-10-13 16:27 ` Atsushi Nemoto
@ 2006-10-14 8:39 ` Franck Bui-Huu
0 siblings, 0 replies; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-14 8:39 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: ralf, ths, linux-mips, fbuihuu
On 10/13/06, Atsushi Nemoto <anemo@mba.ocn.ne.jp> wrote:
> On Fri, 13 Oct 2006 14:39:01 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
> > -#define __pa(x) ((unsigned long) (x) - PAGE_OFFSET)
> > -#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))
> > +#if defined(CONFIG_64BITS) && !defined(CONFIG_BUILD_ELF64)
> > +#define __page_offset(x) ((unsigned long)(x) < CKSEG0 ? PAGE_OFFSET : CKSEG0)
> > +#else
> > +#define __page_offset(x) PAGE_OFFSET
> > +#endif
> > +#define __pa(x) ((unsigned long)(x) - __page_offset(x))
> > +#define __va(x) ((void *)((unsigned long)(x) + __page_offset(x)))
>
> In __va(), you are passing an physical address to __page_offset().
>
oops, good catch ! I'll change that.
thanks
--
Franck
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 1/7] page.h: remove __pa() usages.
2006-10-13 16:27 ` Atsushi Nemoto
@ 2006-10-14 9:22 ` Franck Bui-Huu
0 siblings, 0 replies; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-14 9:22 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: ralf, ths, linux-mips
On 10/13/06, Atsushi Nemoto <anemo@mba.ocn.ne.jp> wrote:
> On Fri, 13 Oct 2006 14:39:00 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
> > -#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
> > -#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
> > +#define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(virt_to_phys(kaddr)))
> > +#define virt_addr_valid(kaddr) pfn_valid(PFN_DOWN(virt_to_phys(kaddr)))
>
> It seems "#include <linux/pfn.h>" (and "#include <asm/io.h>" perhaps)
> required.
>
Well it just compiles fine for me and to be honest I have no strong
feeling here. So I'm following your recommendation.
thanks
--
Franck
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 6/7] setup.c: clean up initrd related code
2006-10-13 12:39 ` [PATCH 6/7] setup.c: clean up initrd related code Franck Bui-Huu
@ 2006-10-16 8:03 ` Franck Bui-Huu
2006-10-16 8:10 ` Atsushi Nemoto
2006-10-16 9:09 ` Thiemo Seufer
2006-10-19 4:13 ` Atsushi Nemoto
1 sibling, 2 replies; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-16 8:03 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: ralf, linux-mips
Atsushi,
Franck Bui-Huu wrote:
> Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
> ---
[snip]
> @@ -176,24 +174,34 @@ static unsigned long __init init_initrd(
[snip]
> end = (unsigned long)&_end;
> tmp = PAGE_ALIGN(end) - sizeof(u32) * 2;
> if (tmp < end)
> tmp += PAGE_SIZE;
>
Any idea on what is this code for ?
It seems that a minimum gap is needed betweend the end of kernel
code and initrd but I don't see why...
Thanks
Franck
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 6/7] setup.c: clean up initrd related code
2006-10-16 8:03 ` Franck Bui-Huu
@ 2006-10-16 8:10 ` Atsushi Nemoto
2006-10-16 8:48 ` Franck Bui-Huu
2006-10-16 9:09 ` Thiemo Seufer
1 sibling, 1 reply; 46+ messages in thread
From: Atsushi Nemoto @ 2006-10-16 8:10 UTC (permalink / raw)
To: vagabon.xyz; +Cc: ralf, linux-mips
On Mon, 16 Oct 2006 10:03:13 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
> > end = (unsigned long)&_end;
> > tmp = PAGE_ALIGN(end) - sizeof(u32) * 2;
> > if (tmp < end)
> > tmp += PAGE_SIZE;
> >
>
> Any idea on what is this code for ?
> It seems that a minimum gap is needed betweend the end of kernel
> code and initrd but I don't see why...
Perhaps because current tools put initrd image at that place.
For example:
arch/mips/boot/addinitrd.c:92:
loadaddr = ((SWAB(esecs[2].s_vaddr) + SWAB(esecs[2].s_size)
+ MIPS_PAGE_SIZE-1) & ~MIPS_PAGE_MASK) - 8;
if (loadaddr < (SWAB(esecs[2].s_vaddr) + SWAB(esecs[2].s_size)))
loadaddr += MIPS_PAGE_SIZE;
initrd_header[0] = SWAB(0x494E5244);
initrd_header[1] = SWAB(st.st_size);
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 6/7] setup.c: clean up initrd related code
2006-10-16 8:10 ` Atsushi Nemoto
@ 2006-10-16 8:48 ` Franck Bui-Huu
2006-10-16 9:07 ` Atsushi Nemoto
0 siblings, 1 reply; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-16 8:48 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: vagabon.xyz, ralf, linux-mips
Atsushi Nemoto wrote:
> On Mon, 16 Oct 2006 10:03:13 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
>>> end = (unsigned long)&_end;
>>> tmp = PAGE_ALIGN(end) - sizeof(u32) * 2;
>>> if (tmp < end)
>>> tmp += PAGE_SIZE;
>>>
>> Any idea on what is this code for ?
>> It seems that a minimum gap is needed betweend the end of kernel
>> code and initrd but I don't see why...
>
> Perhaps because current tools put initrd image at that place.
>
> For example:
>
> arch/mips/boot/addinitrd.c:92:
> loadaddr = ((SWAB(esecs[2].s_vaddr) + SWAB(esecs[2].s_size)
> + MIPS_PAGE_SIZE-1) & ~MIPS_PAGE_MASK) - 8;
> if (loadaddr < (SWAB(esecs[2].s_vaddr) + SWAB(esecs[2].s_size)))
> loadaddr += MIPS_PAGE_SIZE;
> initrd_header[0] = SWAB(0x494E5244);
> initrd_header[1] = SWAB(st.st_size);
>
thanks but it doesn't explain anything either...Anyways what about this
patch on top of the previous one ?
-- >8 --
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 811a8fd..0e61e18 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -177,15 +177,13 @@ static unsigned long __init init_initrd(
if (initrd_end > initrd_start)
goto sanitize;
- end = (unsigned long)&_end;
- tmp = PAGE_ALIGN(end) - sizeof(u32) * 2;
- if (tmp < end)
- tmp += PAGE_SIZE;
-
+ /*
+ * FIXME: a good comment would be nice here...
+ */
+ initrd_header = __va(PAGE_ALIGN(__pa_symbol(&_end) + sizeof(u32) * 2 + 1));
initrd_start = 0;
initrd_end = 0;
end = 0;
- initrd_header = (u32 *)tmp;
if (initrd_header[0] == 0x494E5244) {
initrd_start = (unsigned long)&initrd_header[2];
initrd_end = initrd_start + initrd_header[1];
^ permalink raw reply related [flat|nested] 46+ messages in thread
* Re: [PATCH 6/7] setup.c: clean up initrd related code
2006-10-16 8:48 ` Franck Bui-Huu
@ 2006-10-16 9:07 ` Atsushi Nemoto
2006-10-16 9:54 ` Thiemo Seufer
2006-10-16 14:42 ` Franck Bui-Huu
0 siblings, 2 replies; 46+ messages in thread
From: Atsushi Nemoto @ 2006-10-16 9:07 UTC (permalink / raw)
To: vagabon.xyz; +Cc: ralf, linux-mips
On Mon, 16 Oct 2006 10:48:37 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
> thanks but it doesn't explain anything either...Anyways what about this
> patch on top of the previous one ?
> + initrd_header = __va(PAGE_ALIGN(__pa_symbol(&_end) + sizeof(u32) * 2 + 1));
This breaks the addinitrd. You mean this perhaps?
initrd_header = __va(PAGE_ALIGN(__pa_symbol(&_end) + sizeof(u32) * 2)) - sizeof(u32) * 2;
BTW, I'm a bit uncomfortable with current automatic initrd detection.
Now we have rd_start= option. If I enabled BLK_DEV_INITRD and did
pass nfsroot= instead of rd_start= option, I want kernel do not search
initrd_header at all. Note that in this case current kernel might
misdetect initrd_header from garbage beyond "_end".
I think something like CONFIG_INITRD_AUTODETECT to control this
behaviour is useful. What do you think?
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 6/7] setup.c: clean up initrd related code
2006-10-16 8:03 ` Franck Bui-Huu
2006-10-16 8:10 ` Atsushi Nemoto
@ 2006-10-16 9:09 ` Thiemo Seufer
2006-10-16 14:23 ` Franck Bui-Huu
1 sibling, 1 reply; 46+ messages in thread
From: Thiemo Seufer @ 2006-10-16 9:09 UTC (permalink / raw)
To: Franck Bui-Huu; +Cc: Atsushi Nemoto, ralf, linux-mips
Franck Bui-Huu wrote:
> Atsushi,
>
> Franck Bui-Huu wrote:
> > Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
> > ---
> [snip]
> > @@ -176,24 +174,34 @@ static unsigned long __init init_initrd(
> [snip]
> > end = (unsigned long)&_end;
> > tmp = PAGE_ALIGN(end) - sizeof(u32) * 2;
> > if (tmp < end)
> > tmp += PAGE_SIZE;
> >
>
> Any idea on what is this code for ?
> It seems that a minimum gap is needed betweend the end of kernel
> code and initrd but I don't see why...
AFAIR the bootmem map is placed there.
Thiemo
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 6/7] setup.c: clean up initrd related code
2006-10-16 9:07 ` Atsushi Nemoto
@ 2006-10-16 9:54 ` Thiemo Seufer
2006-10-16 10:19 ` Atsushi Nemoto
2006-10-16 14:42 ` Franck Bui-Huu
1 sibling, 1 reply; 46+ messages in thread
From: Thiemo Seufer @ 2006-10-16 9:54 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: vagabon.xyz, ralf, linux-mips
Atsushi Nemoto wrote:
> On Mon, 16 Oct 2006 10:48:37 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
> > thanks but it doesn't explain anything either...Anyways what about this
> > patch on top of the previous one ?
>
> > + initrd_header = __va(PAGE_ALIGN(__pa_symbol(&_end) + sizeof(u32) * 2 + 1));
>
> This breaks the addinitrd. You mean this perhaps?
>
> initrd_header = __va(PAGE_ALIGN(__pa_symbol(&_end) + sizeof(u32) * 2)) - sizeof(u32) * 2;
>
>
> BTW, I'm a bit uncomfortable with current automatic initrd detection.
> Now we have rd_start= option. If I enabled BLK_DEV_INITRD and did
> pass nfsroot= instead of rd_start= option, I want kernel do not search
> initrd_header at all.
There's "noinitrd" for that purpose. Alos, one might want to use a
built-in initrd plus nfsroot.
Thiemo
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 6/7] setup.c: clean up initrd related code
2006-10-16 9:54 ` Thiemo Seufer
@ 2006-10-16 10:19 ` Atsushi Nemoto
0 siblings, 0 replies; 46+ messages in thread
From: Atsushi Nemoto @ 2006-10-16 10:19 UTC (permalink / raw)
To: ths; +Cc: vagabon.xyz, ralf, linux-mips
On Mon, 16 Oct 2006 10:54:51 +0100, Thiemo Seufer <ths@networkno.de> wrote:
> > BTW, I'm a bit uncomfortable with current automatic initrd detection.
> > Now we have rd_start= option. If I enabled BLK_DEV_INITRD and did
> > pass nfsroot= instead of rd_start= option, I want kernel do not search
> > initrd_header at all.
>
> There's "noinitrd" for that purpose. Alos, one might want to use a
> built-in initrd plus nfsroot.
Yes, but "noinitrd" is checked _after_ we preserved initrd space, so
if I did not initialize initrd_header area kernel might try to
preserve initrd space based on garbage...
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 6/7] setup.c: clean up initrd related code
2006-10-16 9:09 ` Thiemo Seufer
@ 2006-10-16 14:23 ` Franck Bui-Huu
2006-10-16 14:49 ` Franck Bui-Huu
0 siblings, 1 reply; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-16 14:23 UTC (permalink / raw)
To: Thiemo Seufer; +Cc: Franck Bui-Huu, Atsushi Nemoto, ralf, linux-mips
Thiemo Seufer wrote:
> Franck Bui-Huu wrote:
>> Atsushi,
>>
>> Franck Bui-Huu wrote:
>>> Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
>>> ---
>> [snip]
>>> @@ -176,24 +174,34 @@ static unsigned long __init init_initrd(
>> [snip]
>>> end = (unsigned long)&_end;
>>> tmp = PAGE_ALIGN(end) - sizeof(u32) * 2;
>>> if (tmp < end)
>>> tmp += PAGE_SIZE;
>>>
>> Any idea on what is this code for ?
>> It seems that a minimum gap is needed betweend the end of kernel
>> code and initrd but I don't see why...
>
> AFAIR the bootmem map is placed there.
>
boot_mem_map[] seems to be located in bss.
Franck
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 6/7] setup.c: clean up initrd related code
2006-10-16 9:07 ` Atsushi Nemoto
2006-10-16 9:54 ` Thiemo Seufer
@ 2006-10-16 14:42 ` Franck Bui-Huu
2006-10-16 14:51 ` Franck Bui-Huu
1 sibling, 1 reply; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-16 14:42 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: vagabon.xyz, ralf, linux-mips
Atsushi Nemoto wrote:
> On Mon, 16 Oct 2006 10:48:37 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
>> thanks but it doesn't explain anything either...Anyways what about this
>> patch on top of the previous one ?
>
>> + initrd_header = __va(PAGE_ALIGN(__pa_symbol(&_end) + sizeof(u32) * 2 + 1));
>
> This breaks the addinitrd. You mean this perhaps?
>
> initrd_header = __va(PAGE_ALIGN(__pa_symbol(&_end) + sizeof(u32) * 2)) - sizeof(u32) * 2;
>
you're right, but I really don't see how this work and IMHO this
code is broken.
In my mind, I was thinking that initrd_head had to be PAGE_SIZE
aligned and that was the reason of that weird code...
>
> BTW, I'm a bit uncomfortable with current automatic initrd detection.
> Now we have rd_start= option. If I enabled BLK_DEV_INITRD and did
> pass nfsroot= instead of rd_start= option, I want kernel do not search
> initrd_header at all. Note that in this case current kernel might
> misdetect initrd_header from garbage beyond "_end".
>
Well that might happen if you want a nfs rootfs but want to execute
an initrd before mounting the rootfs and this initrd has been included
in the kernel image with the 'addinitrd' stuff.
> I think something like CONFIG_INITRD_AUTODETECT to control this
> behaviour is useful. What do you think?
>
It's safer although it can be enough to check against a magic number
well chosen. Maybe we can introduce a new option to the command line,
'initrd_noprobe' for example. But in any case make the default to
auto detect initrd to avoid breaking some old configs.
Franck
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 6/7] setup.c: clean up initrd related code
2006-10-16 14:23 ` Franck Bui-Huu
@ 2006-10-16 14:49 ` Franck Bui-Huu
0 siblings, 0 replies; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-16 14:49 UTC (permalink / raw)
To: Franck; +Cc: Thiemo Seufer, Atsushi Nemoto, ralf, linux-mips
Franck Bui-Huu wrote:
> Thiemo Seufer wrote:
>> Franck Bui-Huu wrote:
>>> Atsushi,
>>>
>>> Franck Bui-Huu wrote:
>>>> Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
>>>> ---
>>> [snip]
>>>> @@ -176,24 +174,34 @@ static unsigned long __init init_initrd(
>>> [snip]
>>>> end = (unsigned long)&_end;
>>>> tmp = PAGE_ALIGN(end) - sizeof(u32) * 2;
>>>> if (tmp < end)
>>>> tmp += PAGE_SIZE;
>>>>
>>> Any idea on what is this code for ?
>>> It seems that a minimum gap is needed betweend the end of kernel
>>> code and initrd but I don't see why...
>> AFAIR the bootmem map is placed there.
>>
>
> boot_mem_map[] seems to be located in bss.
>
ok I think I got it...
Actually sizeof(u32) * 2 is the place reserved for the initrd header
and this header is right before initrd itself.
initrd_header[0] -> magic number
initrd_header[1] -> size of initrd
initrd start
...
initrd end
and initrd start must be PAGE_SIZE aligned, surely because we free it
with a page granularity.
Franck
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 6/7] setup.c: clean up initrd related code
2006-10-16 14:42 ` Franck Bui-Huu
@ 2006-10-16 14:51 ` Franck Bui-Huu
0 siblings, 0 replies; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-16 14:51 UTC (permalink / raw)
To: Franck; +Cc: Atsushi Nemoto, ralf, linux-mips
Franck Bui-Huu wrote:
> Atsushi Nemoto wrote:
>> On Mon, 16 Oct 2006 10:48:37 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
>>> thanks but it doesn't explain anything either...Anyways what about this
>>> patch on top of the previous one ?
>>> + initrd_header = __va(PAGE_ALIGN(__pa_symbol(&_end) + sizeof(u32) * 2 + 1));
>> This breaks the addinitrd. You mean this perhaps?
>>
>> initrd_header = __va(PAGE_ALIGN(__pa_symbol(&_end) + sizeof(u32) * 2)) - sizeof(u32) * 2;
>>
>
> you're right, but I really don't see how this work and IMHO this
> code is broken.
nope it's not, I just realised what is it for, see my reply to Thiemo.
Franck
^ permalink raw reply [flat|nested] 46+ messages in thread
* [PATCH 2/7] Make __pa() aware of XKPHYS/CKSEG0 address mix for 64 bit kernels
2006-10-16 16:12 [PATCH 0/7] Get ride of CPHYSADDR() in setup.c [take #3] Franck Bui-Huu
@ 2006-10-16 16:12 ` Franck Bui-Huu
0 siblings, 0 replies; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-16 16:12 UTC (permalink / raw)
To: ralf; +Cc: anemo, ths, linux-mips, Franck Bui-Huu
During early boot mem init, some configs couldn't use __pa() to
convert virtual into physical addresses. Specially for 64 bit
kernel cases when CONFIG_BUILD_ELF64=n. This patch make __pa()
work for _all_ configs and thus make CPHYSADDR() useless.
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
---
include/asm-mips/page.h | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
index fa4e4d9..df3a87e 100644
--- a/include/asm-mips/page.h
+++ b/include/asm-mips/page.h
@@ -133,8 +133,13 @@ #endif /* !__ASSEMBLY__ */
/* to align the pointer to the (next) page boundary */
#define PAGE_ALIGN(addr) (((addr) + PAGE_SIZE - 1) & PAGE_MASK)
-#define __pa(x) ((unsigned long) (x) - PAGE_OFFSET)
-#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))
+#if defined(CONFIG_64BITS) && !defined(CONFIG_BUILD_ELF64)
+#define __pa_page_offset(x) ((unsigned long)(x) < CKSEG0 ? PAGE_OFFSET : CKSEG0)
+#else
+#define __pa_page_offset(x) PAGE_OFFSET
+#endif
+#define __pa(x) ((unsigned long)(x) - __pa_page_offset(x))
+#define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET))
#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
--
1.4.2.3
^ permalink raw reply related [flat|nested] 46+ messages in thread
* Re: [PATCH 2/7] Make __pa() aware of XKPHYS/CKSEG0 address mix for 64 bit kernels
2006-10-13 12:39 ` [PATCH 2/7] Make __pa() aware of XKPHYS/CKSEG0 address mix for 64 bit kernels Franck Bui-Huu
2006-10-13 16:27 ` Atsushi Nemoto
@ 2006-10-19 4:01 ` Atsushi Nemoto
2006-10-19 6:20 ` Franck Bui-Huu
2006-10-19 6:41 ` Yoichi Yuasa
1 sibling, 2 replies; 46+ messages in thread
From: Atsushi Nemoto @ 2006-10-19 4:01 UTC (permalink / raw)
To: vagabon.xyz; +Cc: ralf, ths, linux-mips, fbuihuu
On Fri, 13 Oct 2006 14:39:01 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
> +#if defined(CONFIG_64BITS) && !defined(CONFIG_BUILD_ELF64)
> +#define __page_offset(x) ((unsigned long)(x) < CKSEG0 ? PAGE_OFFSET : CKSEG0)
CONFIG_64BIT, not CONFIG_64BITS. Sorry, my mistake.
Also since CKSEG0 is defined with _LLCONST_ macro, the final type of
__page_offset(), __pa(), __pa_sym() will be "unsigned long long", not
"unsigned long". This raise a "comparison of distinct pointer types
lacks a cast" warning on this line.
reserved_end = max(init_initrd(), PFN_UP(__pa_symbol(&_end)));
A qiuck and non-intrusive hack would be cast CKSEG0 with "unsigned
long" here, but it might be preferred to change _LLCONST_ definition
like this. What do you think?
Subject: Use "long" for _ATYPE64_ and _LLCONST_ on 64-bit kernel.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
diff --git a/include/asm-mips/addrspace.h b/include/asm-mips/addrspace.h
index 45c706e..5005555 100644
--- a/include/asm-mips/addrspace.h
+++ b/include/asm-mips/addrspace.h
@@ -23,9 +23,14 @@ #define _LLCONST_(x) x
#else
#define _ATYPE_ __PTRDIFF_TYPE__
#define _ATYPE32_ int
+#ifdef CONFIG_64BIT
+#define _ATYPE64_ long
+#define _LLCONST_(x) x ## L
+#else
#define _ATYPE64_ long long
#define _LLCONST_(x) x ## LL
#endif
+#endif
/*
* 32-bit MIPS address spaces
---
Atsushi Nemoto
^ permalink raw reply related [flat|nested] 46+ messages in thread
* Re: [PATCH 6/7] setup.c: clean up initrd related code
2006-10-13 12:39 ` [PATCH 6/7] setup.c: clean up initrd related code Franck Bui-Huu
2006-10-16 8:03 ` Franck Bui-Huu
@ 2006-10-19 4:13 ` Atsushi Nemoto
2006-10-19 6:37 ` Franck Bui-Huu
2006-10-19 8:39 ` Franck Bui-Huu
1 sibling, 2 replies; 46+ messages in thread
From: Atsushi Nemoto @ 2006-10-19 4:13 UTC (permalink / raw)
To: vagabon.xyz; +Cc: ralf, ths, linux-mips, fbuihuu
On Fri, 13 Oct 2006 14:39:05 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
> +sanitize:
> + /*
> + * Sanitize initrd addresses. For example firmware
> + * can't guess if they need to pass them through
> + * 64-bits values if the kernel has been built in pure
> + * 32-bit. We need also to switch from KSEG0 to XKPHYS
> + * addresses now, so the code can now safely use __pa().
> + */
> + end = __pa(initrd_end);
> + initrd_end = (unsigned long)__va(end);
> + initrd_start = (unsigned long)__va(__pa(initrd_start));
At last I tested whole patchset on 64-bit and see this is not enough.
If I passed 0x000000008XXXXXXX instead of 0xffffffff8XXXXXXX to
initrd_start and initrd_end, the result of __pa() is not what I
wanted. This is a proposal fix.
--- arch/mips/kernel/setup.c.orig 2006-10-19 11:31:12.000000000 +0900
+++ arch/mips/kernel/setup.c 2006-10-19 13:06:39.000000000 +0900
@@ -199,6 +199,14 @@
* 32-bit. We need also to switch from KSEG0 to XKPHYS
* addresses now, so the code can now safely use __pa().
*/
+#ifdef CONFIG_64BIT
+ /* HACK: Guess if the sign extension was forgotten */
+ if (initrd_start < XKPHYS) {
+ initrd_end -= initrd_start;
+ initrd_start = (int)initrd_start;
+ initrd_end += initrd_start;
+ }
+#endif
end = __pa(initrd_end);
initrd_end = (unsigned long)__va(end);
initrd_start = (unsigned long)__va(__pa(initrd_start));
With this fix and __pa() fix in my previous mail, your patchset works
well on my 64-bit kernel. Thanks.
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 2/7] Make __pa() aware of XKPHYS/CKSEG0 address mix for 64 bit kernels
2006-10-19 4:01 ` Atsushi Nemoto
@ 2006-10-19 6:20 ` Franck Bui-Huu
2006-10-19 6:41 ` Yoichi Yuasa
1 sibling, 0 replies; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-19 6:20 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: ralf, ths, linux-mips
On 10/19/06, Atsushi Nemoto <anemo@mba.ocn.ne.jp> wrote:
>
> A qiuck and non-intrusive hack would be cast CKSEG0 with "unsigned
> long" here, but it might be preferred to change _LLCONST_ definition
> like this. What do you think?
>
I think _LLCONST_ change is the correct thing to do. Can you please
submit your patch to Ralf ?
thanks
--
Franck
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 6/7] setup.c: clean up initrd related code
2006-10-19 4:13 ` Atsushi Nemoto
@ 2006-10-19 6:37 ` Franck Bui-Huu
2006-10-19 6:51 ` Atsushi Nemoto
2006-10-19 8:39 ` Franck Bui-Huu
1 sibling, 1 reply; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-19 6:37 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: ralf, ths, linux-mips
On 10/19/06, Atsushi Nemoto <anemo@mba.ocn.ne.jp> wrote:
> On Fri, 13 Oct 2006 14:39:05 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
> > + end = __pa(initrd_end);
> > + initrd_end = (unsigned long)__va(end);
> > + initrd_start = (unsigned long)__va(__pa(initrd_start));
>
> At last I tested whole patchset on 64-bit and see this is not enough.
Thanks for testing. You're right this is not enough since CPHYSADDR()
is not used anymore by __pa(). That shows that usage of __va(__pa(x))
construction to sanitize sign extension was weak since it relied on
__pa() implementation. My own fault...
>
> If I passed 0x000000008XXXXXXX instead of 0xffffffff8XXXXXXX to
> initrd_start and initrd_end, the result of __pa() is not what I
> wanted. This is a proposal fix.
>
I would rather move this fix into initrd start setup function as it
was done by old code. We know that some bootloaders forget sign
extension on 64 bits kernel. But if for example the sign extension is
forgotten by a board specific code, we shouldn't automatically fix the
mistake, but rather fix the board specific code. So I would do instead
of your fix:
> --- arch/mips/kernel/setup.c.orig 2006-10-19 11:31:12.000000000 +0900
> +++ arch/mips/kernel/setup.c 2006-10-19 13:06:39.000000000 +0900
> @@ -199,6 +199,14 @@
> * 32-bit. We need also to switch from KSEG0 to XKPHYS
> * addresses now, so the code can now safely use __pa().
> */
> +#ifdef CONFIG_64BIT
> + if (initrd_start < XKPHYS)
> + panic("initrd start (%08lx) < XKPHYS", initrd_start);
> +#endif
--
Franck
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 2/7] Make __pa() aware of XKPHYS/CKSEG0 address mix for 64 bit kernels
2006-10-19 4:01 ` Atsushi Nemoto
2006-10-19 6:20 ` Franck Bui-Huu
@ 2006-10-19 6:41 ` Yoichi Yuasa
2006-10-19 7:01 ` Atsushi Nemoto
1 sibling, 1 reply; 46+ messages in thread
From: Yoichi Yuasa @ 2006-10-19 6:41 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: yoichi_yuasa, vagabon.xyz, ralf, ths, linux-mips, fbuihuu
On Thu, 19 Oct 2006 13:01:33 +0900 (JST)
Atsushi Nemoto <anemo@mba.ocn.ne.jp> wrote:
> On Fri, 13 Oct 2006 14:39:01 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
> > +#if defined(CONFIG_64BITS) && !defined(CONFIG_BUILD_ELF64)
> > +#define __page_offset(x) ((unsigned long)(x) < CKSEG0 ? PAGE_OFFSET : CKSEG0)
>
> CONFIG_64BIT, not CONFIG_64BITS. Sorry, my mistake.
>
> Also since CKSEG0 is defined with _LLCONST_ macro, the final type of
> __page_offset(), __pa(), __pa_sym() will be "unsigned long long", not
> "unsigned long". This raise a "comparison of distinct pointer types
> lacks a cast" warning on this line.
>
> reserved_end = max(init_initrd(), PFN_UP(__pa_symbol(&_end)));
>
> A qiuck and non-intrusive hack would be cast CKSEG0 with "unsigned
> long" here, but it might be preferred to change _LLCONST_ definition
> like this. What do you think?
>
>
> Subject: Use "long" for _ATYPE64_ and _LLCONST_ on 64-bit kernel.
>
> Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
>
> diff --git a/include/asm-mips/addrspace.h b/include/asm-mips/addrspace.h
> index 45c706e..5005555 100644
> --- a/include/asm-mips/addrspace.h
> +++ b/include/asm-mips/addrspace.h
> @@ -23,9 +23,14 @@ #define _LLCONST_(x) x
> #else
> #define _ATYPE_ __PTRDIFF_TYPE__
> #define _ATYPE32_ int
> +#ifdef CONFIG_64BIT
> +#define _ATYPE64_ long
> +#define _LLCONST_(x) x ## L
^^ ^
The name is not corresponding to reality.
It's not so good.
Yoichi
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 6/7] setup.c: clean up initrd related code
2006-10-19 6:37 ` Franck Bui-Huu
@ 2006-10-19 6:51 ` Atsushi Nemoto
2006-10-19 7:29 ` Franck Bui-Huu
0 siblings, 1 reply; 46+ messages in thread
From: Atsushi Nemoto @ 2006-10-19 6:51 UTC (permalink / raw)
To: vagabon.xyz; +Cc: ralf, ths, linux-mips
On Thu, 19 Oct 2006 08:37:32 +0200, "Franck Bui-Huu" <vagabon.xyz@gmail.com> wrote:
> I would rather move this fix into initrd start setup function as it
> was done by old code. We know that some bootloaders forget sign
> extension on 64 bits kernel. But if for example the sign extension is
> forgotten by a board specific code, we shouldn't automatically fix the
> mistake, but rather fix the board specific code. So I would do instead
> of your fix:
But we need sign extension for values comes from the initrd_header
anyway. The initrd_header is fixed-size and can not hold 64-bit
address.
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 2/7] Make __pa() aware of XKPHYS/CKSEG0 address mix for 64 bit kernels
2006-10-19 6:41 ` Yoichi Yuasa
@ 2006-10-19 7:01 ` Atsushi Nemoto
2006-10-19 7:23 ` Yoichi Yuasa
2006-10-19 7:43 ` Franck Bui-Huu
0 siblings, 2 replies; 46+ messages in thread
From: Atsushi Nemoto @ 2006-10-19 7:01 UTC (permalink / raw)
To: yoichi_yuasa; +Cc: vagabon.xyz, ralf, ths, linux-mips, fbuihuu
On Thu, 19 Oct 2006 15:41:38 +0900, Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> wrote:
> > +#define _LLCONST_(x) x ## L
> ^^ ^
> The name is not corresponding to reality.
> It's not so good.
Indeed. How about this?
Subject: Use "long" for 64-bit values on 64-bit kernel.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
diff --git a/include/asm-mips/addrspace.h b/include/asm-mips/addrspace.h
index 45c706e..7401711 100644
--- a/include/asm-mips/addrspace.h
+++ b/include/asm-mips/addrspace.h
@@ -19,12 +19,17 @@ #ifdef __ASSEMBLY__
#define _ATYPE_
#define _ATYPE32_
#define _ATYPE64_
-#define _LLCONST_(x) x
+#define _CONST64_(x) x
#else
#define _ATYPE_ __PTRDIFF_TYPE__
#define _ATYPE32_ int
+#ifdef CONFIG_64BIT
+#define _ATYPE64_ long
+#define _CONST64_(x) x ## L
+#else
#define _ATYPE64_ long long
-#define _LLCONST_(x) x ## LL
+#define _CONST64_(x) x ## LL
+#endif
#endif
/*
@@ -48,7 +53,7 @@ #define KSEGX(a) ((_ACAST32_ (a)) & 0xe
*/
#define CPHYSADDR(a) ((_ACAST32_(a)) & 0x1fffffff)
#define XPHYSADDR(a) ((_ACAST64_(a)) & \
- _LLCONST_(0x000000ffffffffff))
+ _CONST64_(0x000000ffffffffff))
#ifdef CONFIG_64BIT
@@ -57,14 +62,14 @@ #ifdef CONFIG_64BIT
* The compatibility segments use the full 64-bit sign extended value. Note
* the R8000 doesn't have them so don't reference these in generic MIPS code.
*/
-#define XKUSEG _LLCONST_(0x0000000000000000)
-#define XKSSEG _LLCONST_(0x4000000000000000)
-#define XKPHYS _LLCONST_(0x8000000000000000)
-#define XKSEG _LLCONST_(0xc000000000000000)
-#define CKSEG0 _LLCONST_(0xffffffff80000000)
-#define CKSEG1 _LLCONST_(0xffffffffa0000000)
-#define CKSSEG _LLCONST_(0xffffffffc0000000)
-#define CKSEG3 _LLCONST_(0xffffffffe0000000)
+#define XKUSEG _CONST64_(0x0000000000000000)
+#define XKSSEG _CONST64_(0x4000000000000000)
+#define XKPHYS _CONST64_(0x8000000000000000)
+#define XKSEG _CONST64_(0xc000000000000000)
+#define CKSEG0 _CONST64_(0xffffffff80000000)
+#define CKSEG1 _CONST64_(0xffffffffa0000000)
+#define CKSSEG _CONST64_(0xffffffffc0000000)
+#define CKSEG3 _CONST64_(0xffffffffe0000000)
#define CKSEG0ADDR(a) (CPHYSADDR(a) | CKSEG0)
#define CKSEG1ADDR(a) (CPHYSADDR(a) | CKSEG1)
@@ -122,7 +127,7 @@ #define K_CALG_UNCACHED_ACCEL 7
#define PHYS_TO_XKSEG_UNCACHED(p) PHYS_TO_XKPHYS(K_CALG_UNCACHED,(p))
#define PHYS_TO_XKSEG_CACHED(p) PHYS_TO_XKPHYS(K_CALG_COH_SHAREABLE,(p))
#define XKPHYS_TO_PHYS(p) ((p) & TO_PHYS_MASK)
-#define PHYS_TO_XKPHYS(cm,a) (_LLCONST_(0x8000000000000000) | \
+#define PHYS_TO_XKPHYS(cm,a) (_CONST64_(0x8000000000000000) | \
((cm)<<59) | (a))
#if defined (CONFIG_CPU_R4300) \
@@ -132,20 +137,20 @@ #if defined (CONFIG_CPU_R4300) \
|| defined (CONFIG_CPU_NEVADA) \
|| defined (CONFIG_CPU_TX49XX) \
|| defined (CONFIG_CPU_MIPS64)
-#define TO_PHYS_MASK _LLCONST_(0x0000000fffffffff) /* 2^^36 - 1 */
+#define TO_PHYS_MASK _CONST64_(0x0000000fffffffff) /* 2^^36 - 1 */
#endif
#if defined (CONFIG_CPU_R8000)
/* We keep KUSIZE consistent with R4000 for now (2^^40) instead of (2^^48) */
-#define TO_PHYS_MASK _LLCONST_(0x000000ffffffffff) /* 2^^40 - 1 */
+#define TO_PHYS_MASK _CONST64_(0x000000ffffffffff) /* 2^^40 - 1 */
#endif
#if defined (CONFIG_CPU_R10000)
-#define TO_PHYS_MASK _LLCONST_(0x000000ffffffffff) /* 2^^40 - 1 */
+#define TO_PHYS_MASK _CONST64_(0x000000ffffffffff) /* 2^^40 - 1 */
#endif
#if defined(CONFIG_CPU_SB1) || defined(CONFIG_CPU_SB1A)
-#define TO_PHYS_MASK _LLCONST_(0x00000fffffffffff) /* 2^^44 - 1 */
+#define TO_PHYS_MASK _CONST64_(0x00000fffffffffff) /* 2^^44 - 1 */
#endif
#ifndef CONFIG_CPU_R8000
@@ -155,7 +160,7 @@ #ifndef CONFIG_CPU_R8000
* in order to catch bugs in the source code.
*/
-#define COMPAT_K1BASE32 _LLCONST_(0xffffffffa0000000)
+#define COMPAT_K1BASE32 _CONST64_(0xffffffffa0000000)
#define PHYS_TO_COMPATK1(x) ((x) | COMPAT_K1BASE32) /* 32-bit compat k1 */
#endif
^ permalink raw reply related [flat|nested] 46+ messages in thread
* Re: [PATCH 2/7] Make __pa() aware of XKPHYS/CKSEG0 address mix for 64 bit kernels
2006-10-19 7:01 ` Atsushi Nemoto
@ 2006-10-19 7:23 ` Yoichi Yuasa
2006-10-19 7:43 ` Franck Bui-Huu
1 sibling, 0 replies; 46+ messages in thread
From: Yoichi Yuasa @ 2006-10-19 7:23 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: yoichi_yuasa, vagabon.xyz, ralf, ths, linux-mips, fbuihuu
On Thu, 19 Oct 2006 16:01:45 +0900 (JST)
Atsushi Nemoto <anemo@mba.ocn.ne.jp> wrote:
> On Thu, 19 Oct 2006 15:41:38 +0900, Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> wrote:
> > > +#define _LLCONST_(x) x ## L
> > ^^ ^
> > The name is not corresponding to reality.
> > It's not so good.
>
> Indeed. How about this?
>
>
> Subject: Use "long" for 64-bit values on 64-bit kernel.
>
> Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
>
> diff --git a/include/asm-mips/addrspace.h b/include/asm-mips/addrspace.h
> index 45c706e..7401711 100644
> --- a/include/asm-mips/addrspace.h
> +++ b/include/asm-mips/addrspace.h
> @@ -19,12 +19,17 @@ #ifdef __ASSEMBLY__
> #define _ATYPE_
> #define _ATYPE32_
> #define _ATYPE64_
> -#define _LLCONST_(x) x
> +#define _CONST64_(x) x
> #else
> #define _ATYPE_ __PTRDIFF_TYPE__
> #define _ATYPE32_ int
> +#ifdef CONFIG_64BIT
> +#define _ATYPE64_ long
> +#define _CONST64_(x) x ## L
> +#else
> #define _ATYPE64_ long long
> -#define _LLCONST_(x) x ## LL
> +#define _CONST64_(x) x ## LL
> +#endif
> #endif
<snip>
It's good for me.
Thanks,
Yoichi
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 6/7] setup.c: clean up initrd related code
2006-10-19 6:51 ` Atsushi Nemoto
@ 2006-10-19 7:29 ` Franck Bui-Huu
2006-10-19 7:51 ` Atsushi Nemoto
0 siblings, 1 reply; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-19 7:29 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: vagabon.xyz, ralf, ths, linux-mips
Atsushi Nemoto wrote:
> On Thu, 19 Oct 2006 08:37:32 +0200, "Franck Bui-Huu" <vagabon.xyz@gmail.com> wrote:
>> I would rather move this fix into initrd start setup function as it
>> was done by old code. We know that some bootloaders forget sign
>> extension on 64 bits kernel. But if for example the sign extension is
>> forgotten by a board specific code, we shouldn't automatically fix the
>> mistake, but rather fix the board specific code. So I would do instead
>> of your fix:
>
> But we need sign extension for values comes from the initrd_header
> anyway. The initrd_header is fixed-size and can not hold 64-bit
> address.
>
initrd_header gives only 2 numbers: size of initrd, and a magic number,
well it's what I understood when rewriting the code.
the start address of initrd is given by:
initrd_header = __va(PAGE_ALIGN(__pa_symbol(&_end) + 8)) - 8;
initrd_start = (unsigned long)&initrd_header[2];
I don't think we need any sign extension here, do we ?
Franck
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 2/7] Make __pa() aware of XKPHYS/CKSEG0 address mix for 64 bit kernels
2006-10-19 7:01 ` Atsushi Nemoto
2006-10-19 7:23 ` Yoichi Yuasa
@ 2006-10-19 7:43 ` Franck Bui-Huu
2006-10-19 7:59 ` Atsushi Nemoto
1 sibling, 1 reply; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-19 7:43 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: yoichi_yuasa, vagabon.xyz, ralf, ths, linux-mips, fbuihuu
Atsushi Nemoto wrote:
> On Thu, 19 Oct 2006 15:41:38 +0900, Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> wrote:
>>> +#define _LLCONST_(x) x ## L
>> ^^ ^
>> The name is not corresponding to reality.
>> It's not so good.
>
> Indeed. How about this?
>
or why not simply replacing _LLCONST_ usages by _LCONST_ ? After all,
64 bits value seems to be used only for 64 bits kernels.
Franck
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 6/7] setup.c: clean up initrd related code
2006-10-19 7:29 ` Franck Bui-Huu
@ 2006-10-19 7:51 ` Atsushi Nemoto
2006-10-19 8:30 ` Franck Bui-Huu
0 siblings, 1 reply; 46+ messages in thread
From: Atsushi Nemoto @ 2006-10-19 7:51 UTC (permalink / raw)
To: vagabon.xyz; +Cc: ralf, ths, linux-mips
On Thu, 19 Oct 2006 09:29:48 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
> > But we need sign extension for values comes from the initrd_header
> > anyway. The initrd_header is fixed-size and can not hold 64-bit
> > address.
> >
>
> initrd_header gives only 2 numbers: size of initrd, and a magic number,
> well it's what I understood when rewriting the code.
>
> the start address of initrd is given by:
>
> initrd_header = __va(PAGE_ALIGN(__pa_symbol(&_end) + 8)) - 8;
> initrd_start = (unsigned long)&initrd_header[2];
>
> I don't think we need any sign extension here, do we ?
Oh I was confused. You are right.
BTW, we can just ignore initrd instead of panic() if invalid values
given. This place around is too early to print panic message.
Continuing with printk(KERN_ERR) will give us a chance to see what's
wrong.
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 2/7] Make __pa() aware of XKPHYS/CKSEG0 address mix for 64 bit kernels
2006-10-19 7:43 ` Franck Bui-Huu
@ 2006-10-19 7:59 ` Atsushi Nemoto
0 siblings, 0 replies; 46+ messages in thread
From: Atsushi Nemoto @ 2006-10-19 7:59 UTC (permalink / raw)
To: vagabon.xyz; +Cc: yoichi_yuasa, ralf, ths, linux-mips, fbuihuu
On Thu, 19 Oct 2006 09:43:56 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
> or why not simply replacing _LLCONST_ usages by _LCONST_ ? After all,
> 64 bits value seems to be used only for 64 bits kernels.
Well, I suppose 32bit kernel might want to use 64bit values, for
example, CONFIG_64BIT_PHYS_ADDR.
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 6/7] setup.c: clean up initrd related code
2006-10-19 7:51 ` Atsushi Nemoto
@ 2006-10-19 8:30 ` Franck Bui-Huu
0 siblings, 0 replies; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-19 8:30 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: vagabon.xyz, ralf, ths, linux-mips
Atsushi Nemoto wrote:
> On Thu, 19 Oct 2006 09:29:48 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
>>> But we need sign extension for values comes from the initrd_header
>>> anyway. The initrd_header is fixed-size and can not hold 64-bit
>>> address.
>>>
>> initrd_header gives only 2 numbers: size of initrd, and a magic number,
>> well it's what I understood when rewriting the code.
>>
>> the start address of initrd is given by:
>>
>> initrd_header = __va(PAGE_ALIGN(__pa_symbol(&_end) + 8)) - 8;
>>
>>
>> I don't think we need any sign extension here, do we ?
>
> Oh I was confused. You are right.
yeah I was confused at the first look too. I think rewriting it like
this:
initrd_start = (unsigned long)(initrd_header + 2);
is less confusing...
>
> BTW, we can just ignore initrd instead of panic() if invalid values
> given. This place around is too early to print panic message.
> Continuing with printk(KERN_ERR) will give us a chance to see what's
> wrong.
>
ok, I'm rebuilding a new patchset and sending it pretty soon,
Franck
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 6/7] setup.c: clean up initrd related code
2006-10-19 4:13 ` Atsushi Nemoto
2006-10-19 6:37 ` Franck Bui-Huu
@ 2006-10-19 8:39 ` Franck Bui-Huu
2006-10-19 9:15 ` Atsushi Nemoto
1 sibling, 1 reply; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-19 8:39 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: vagabon.xyz, ralf, ths, linux-mips, fbuihuu
Atsushi Nemoto wrote:
> On Fri, 13 Oct 2006 14:39:05 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
>> +sanitize:
>> + /*
>> + * Sanitize initrd addresses. For example firmware
>> + * can't guess if they need to pass them through
>> + * 64-bits values if the kernel has been built in pure
>> + * 32-bit. We need also to switch from KSEG0 to XKPHYS
>> + * addresses now, so the code can now safely use __pa().
>> + */
>> + end = __pa(initrd_end);
>> + initrd_end = (unsigned long)__va(end);
>> + initrd_start = (unsigned long)__va(__pa(initrd_start));
>
> At last I tested whole patchset on 64-bit and see this is not enough.
>
> If I passed 0x000000008XXXXXXX instead of 0xffffffff8XXXXXXX to
> initrd_start and initrd_end, the result of __pa() is not what I
> wanted. This is a proposal fix.
>
> --- arch/mips/kernel/setup.c.orig 2006-10-19 11:31:12.000000000 +0900
> +++ arch/mips/kernel/setup.c 2006-10-19 13:06:39.000000000 +0900
> @@ -199,6 +199,14 @@
> * 32-bit. We need also to switch from KSEG0 to XKPHYS
> * addresses now, so the code can now safely use __pa().
> */
> +#ifdef CONFIG_64BIT
> + /* HACK: Guess if the sign extension was forgotten */
> + if (initrd_start < XKPHYS) {
> + initrd_end -= initrd_start;
> + initrd_start = (int)initrd_start;
> + initrd_end += initrd_start;
> + }
> +#endif
BTW, what about this condition:
if (initrd_start < PAGE_OFFSET) {
...;
}
that would work even on 32 bits kernel.
Franck
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 6/7] setup.c: clean up initrd related code
2006-10-19 8:39 ` Franck Bui-Huu
@ 2006-10-19 9:15 ` Atsushi Nemoto
2006-10-19 9:54 ` Franck Bui-Huu
0 siblings, 1 reply; 46+ messages in thread
From: Atsushi Nemoto @ 2006-10-19 9:15 UTC (permalink / raw)
To: vagabon.xyz; +Cc: ralf, ths, linux-mips, fbuihuu
On Thu, 19 Oct 2006 10:39:14 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
> > +#ifdef CONFIG_64BIT
> > + /* HACK: Guess if the sign extension was forgotten */
> > + if (initrd_start < XKPHYS) {
> > + initrd_end -= initrd_start;
> > + initrd_start = (int)initrd_start;
> > + initrd_end += initrd_start;
> > + }
> > +#endif
>
> BTW, what about this condition:
>
> if (initrd_start < PAGE_OFFSET) {
> ...;
> }
>
> that would work even on 32 bits kernel.
This does not work if PAGE_OFFSET was 0xffffffff80000000 and
initrd_start was 0x980000000XXXXXXX :-)
if ((long)initrd_start >= 0) {
would work.
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 6/7] setup.c: clean up initrd related code
2006-10-19 9:15 ` Atsushi Nemoto
@ 2006-10-19 9:54 ` Franck Bui-Huu
2006-10-19 10:30 ` Atsushi Nemoto
0 siblings, 1 reply; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-19 9:54 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: vagabon.xyz, ralf, ths, linux-mips, fbuihuu
Atsushi Nemoto wrote:
> On Thu, 19 Oct 2006 10:39:14 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
>> BTW, what about this condition:
>>
>> if (initrd_start < PAGE_OFFSET) {
>> ...;
>> }
>>
>> that would work even on 32 bits kernel.
>
> This does not work if PAGE_OFFSET was 0xffffffff80000000 and
> initrd_start was 0x980000000XXXXXXX :-)
>
I think we should terminate this patch pretty quickly because
it's going to make me mad ;)
How can PAGE_OFFSET be in CKSEG0 segment and initrd_start be
in XKPHYS ?
With the current code we can say:
- If PAGE_OFFSET is in CKSEG0, that means that all kernel
virtual address must be in CKSEG0.
- If PAGE_OFFSET is in XKPHYS, that means that _after_ booting
process all kernel virtual address will be in XKPHYS. But we
allow CKSEG0 virtual address during boot for the reasons
we know.
What woud give __pa(initrd_start) in your example ?
__pa(initrd_start) -> 0x980000000XXXXXXX - 0xffffffff80000000
which is wrong...Does your example come from a real use case ?
Franck
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 6/7] setup.c: clean up initrd related code
2006-10-19 9:54 ` Franck Bui-Huu
@ 2006-10-19 10:30 ` Atsushi Nemoto
2006-10-19 10:51 ` Franck Bui-Huu
0 siblings, 1 reply; 46+ messages in thread
From: Atsushi Nemoto @ 2006-10-19 10:30 UTC (permalink / raw)
To: vagabon.xyz; +Cc: ralf, ths, linux-mips, fbuihuu
On Thu, 19 Oct 2006 11:54:09 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
> > This does not work if PAGE_OFFSET was 0xffffffff80000000 and
> > initrd_start was 0x980000000XXXXXXX :-)
> >
>
> I think we should terminate this patch pretty quickly because
> it's going to make me mad ;)
>
> How can PAGE_OFFSET be in CKSEG0 segment and initrd_start be
> in XKPHYS ?
If we passed a XKPHYS address to "rd_start=" option. Bad usage :-)
> With the current code we can say:
>
> - If PAGE_OFFSET is in CKSEG0, that means that all kernel
> virtual address must be in CKSEG0.
> - If PAGE_OFFSET is in XKPHYS, that means that _after_ booting
> process all kernel virtual address will be in XKPHYS. But we
> allow CKSEG0 virtual address during boot for the reasons
> we know.
>
> What woud give __pa(initrd_start) in your example ?
>
> __pa(initrd_start) -> 0x980000000XXXXXXX - 0xffffffff80000000
>
> which is wrong...Does your example come from a real use case ?
It's wrong indeed. But I can not see good way to handle such terrible
usage. So ... let's ignore it. I'm OK, are you ?
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 6/7] setup.c: clean up initrd related code
2006-10-19 10:30 ` Atsushi Nemoto
@ 2006-10-19 10:51 ` Franck Bui-Huu
2006-10-19 11:00 ` Atsushi Nemoto
0 siblings, 1 reply; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-19 10:51 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: vagabon.xyz, ralf, ths, linux-mips, fbuihuu
Atsushi Nemoto wrote:
> On Thu, 19 Oct 2006 11:54:09 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
>>> This does not work if PAGE_OFFSET was 0xffffffff80000000 and
>>> initrd_start was 0x980000000XXXXXXX :-)
>>>
>> I think we should terminate this patch pretty quickly because
>> it's going to make me mad ;)
>>
>> How can PAGE_OFFSET be in CKSEG0 segment and initrd_start be
>> in XKPHYS ?
>
> If we passed a XKPHYS address to "rd_start=" option. Bad usage :-)
>
ok so testing initrd_start against PAGE_OFFSET (instead of XKPHYS)
is good check since we catch such bad usages. Do you agree ?
>> With the current code we can say:
>>
>> - If PAGE_OFFSET is in CKSEG0, that means that all kernel
>> virtual address must be in CKSEG0.
>> - If PAGE_OFFSET is in XKPHYS, that means that _after_ booting
>> process all kernel virtual address will be in XKPHYS. But we
>> allow CKSEG0 virtual address during boot for the reasons
>> we know.
>>
>> What woud give __pa(initrd_start) in your example ?
>>
>> __pa(initrd_start) -> 0x980000000XXXXXXX - 0xffffffff80000000
>>
>> which is wrong...Does your example come from a real use case ?
>
> It's wrong indeed. But I can not see good way to handle such terrible
> usage. So ... let's ignore it. I'm OK, are you ?
>
why do we need to handle them anyway ?
PAGE_OFFSET in XKPHYS means that the kernel runs in XKPHYS address
space. We allow at boot time kernel address to be in CKSEG0 because
we have a good reason to handle that. It allows to get a kernel
smaller and faster at compile time.
PAGE_OFFSET in CKSEG0 means that the kernel runs in CKSEG0 address
space. This means also that kernel can't handle XKPHYS address. But
how would the kernel get addresses in XKPHYS (except user bad usages) ?
Franck
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 6/7] setup.c: clean up initrd related code
2006-10-19 10:51 ` Franck Bui-Huu
@ 2006-10-19 11:00 ` Atsushi Nemoto
2006-10-19 11:12 ` Franck Bui-Huu
0 siblings, 1 reply; 46+ messages in thread
From: Atsushi Nemoto @ 2006-10-19 11:00 UTC (permalink / raw)
To: vagabon.xyz; +Cc: ralf, ths, linux-mips, fbuihuu
On Thu, 19 Oct 2006 12:51:27 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> wrote:
> > If we passed a XKPHYS address to "rd_start=" option. Bad usage :-)
>
> ok so testing initrd_start against PAGE_OFFSET (instead of XKPHYS)
> is good check since we catch such bad usages. Do you agree ?
Yes.
> > It's wrong indeed. But I can not see good way to handle such terrible
> > usage. So ... let's ignore it. I'm OK, are you ?
>
> why do we need to handle them anyway ?
>
> PAGE_OFFSET in XKPHYS means that the kernel runs in XKPHYS address
> space. We allow at boot time kernel address to be in CKSEG0 because
> we have a good reason to handle that. It allows to get a kernel
> smaller and faster at compile time.
>
> PAGE_OFFSET in CKSEG0 means that the kernel runs in CKSEG0 address
> space. This means also that kernel can't handle XKPHYS address. But
> how would the kernel get addresses in XKPHYS (except user bad usages) ?
Sure. No reason. Excuse me for such a bad example ;)
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 46+ messages in thread
* Re: [PATCH 6/7] setup.c: clean up initrd related code
2006-10-19 11:00 ` Atsushi Nemoto
@ 2006-10-19 11:12 ` Franck Bui-Huu
0 siblings, 0 replies; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-19 11:12 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: vagabon.xyz, ralf, ths, linux-mips
Atsushi Nemoto wrote:
> Sure. No reason. Excuse me for such a bad example ;)
>
no problem, your feedbacks are always welcome.
Franck
^ permalink raw reply [flat|nested] 46+ messages in thread
* [PATCH 2/7] Make __pa() aware of XKPHYS/CKSEG0 address mix for 64 bit kernels
2006-10-19 11:19 [PATCH 0/7] Get ride of CPHYSADDR() in setup.c [take #4] Franck Bui-Huu
@ 2006-10-19 11:20 ` Franck Bui-Huu
0 siblings, 0 replies; 46+ messages in thread
From: Franck Bui-Huu @ 2006-10-19 11:20 UTC (permalink / raw)
To: ralf; +Cc: anemo, ths, linux-mips, Franck Bui-Huu
During early boot mem init, some configs couldn't use __pa() to
convert virtual into physical addresses. Specially for 64 bit
kernel cases when CONFIG_BUILD_ELF64=n. This patch make __pa()
work for _all_ configs and thus make CPHYSADDR() useless.
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
---
include/asm-mips/page.h | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
index fa4e4d9..119daee 100644
--- a/include/asm-mips/page.h
+++ b/include/asm-mips/page.h
@@ -133,8 +133,13 @@ #endif /* !__ASSEMBLY__ */
/* to align the pointer to the (next) page boundary */
#define PAGE_ALIGN(addr) (((addr) + PAGE_SIZE - 1) & PAGE_MASK)
-#define __pa(x) ((unsigned long) (x) - PAGE_OFFSET)
-#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))
+#if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64)
+#define __pa_page_offset(x) ((unsigned long)(x) < CKSEG0 ? PAGE_OFFSET : CKSEG0)
+#else
+#define __pa_page_offset(x) PAGE_OFFSET
+#endif
+#define __pa(x) ((unsigned long)(x) - __pa_page_offset(x))
+#define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET))
#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
--
1.4.2.3
^ permalink raw reply related [flat|nested] 46+ messages in thread
end of thread, other threads:[~2006-10-19 11:21 UTC | newest]
Thread overview: 46+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-13 12:38 [PATCH 0/7] Get ride of CPHYSADDR() in setup.c [take #2] Franck Bui-Huu
2006-10-13 12:39 ` [PATCH 1/7] page.h: remove __pa() usages Franck Bui-Huu
2006-10-13 16:27 ` Atsushi Nemoto
2006-10-14 9:22 ` Franck Bui-Huu
2006-10-13 12:39 ` [PATCH 2/7] Make __pa() aware of XKPHYS/CKSEG0 address mix for 64 bit kernels Franck Bui-Huu
2006-10-13 16:27 ` Atsushi Nemoto
2006-10-14 8:39 ` Franck Bui-Huu
2006-10-19 4:01 ` Atsushi Nemoto
2006-10-19 6:20 ` Franck Bui-Huu
2006-10-19 6:41 ` Yoichi Yuasa
2006-10-19 7:01 ` Atsushi Nemoto
2006-10-19 7:23 ` Yoichi Yuasa
2006-10-19 7:43 ` Franck Bui-Huu
2006-10-19 7:59 ` Atsushi Nemoto
2006-10-13 12:39 ` [PATCH 3/7] setup.c: get ride of CPHYSADDR() Franck Bui-Huu
2006-10-13 12:39 ` [PATCH 4/7] Introduce __pa_symbol() Franck Bui-Huu
2006-10-13 12:39 ` [PATCH 5/7] setup.c: use __pa_symbol() where needed Franck Bui-Huu
2006-10-13 12:39 ` [PATCH 6/7] setup.c: clean up initrd related code Franck Bui-Huu
2006-10-16 8:03 ` Franck Bui-Huu
2006-10-16 8:10 ` Atsushi Nemoto
2006-10-16 8:48 ` Franck Bui-Huu
2006-10-16 9:07 ` Atsushi Nemoto
2006-10-16 9:54 ` Thiemo Seufer
2006-10-16 10:19 ` Atsushi Nemoto
2006-10-16 14:42 ` Franck Bui-Huu
2006-10-16 14:51 ` Franck Bui-Huu
2006-10-16 9:09 ` Thiemo Seufer
2006-10-16 14:23 ` Franck Bui-Huu
2006-10-16 14:49 ` Franck Bui-Huu
2006-10-19 4:13 ` Atsushi Nemoto
2006-10-19 6:37 ` Franck Bui-Huu
2006-10-19 6:51 ` Atsushi Nemoto
2006-10-19 7:29 ` Franck Bui-Huu
2006-10-19 7:51 ` Atsushi Nemoto
2006-10-19 8:30 ` Franck Bui-Huu
2006-10-19 8:39 ` Franck Bui-Huu
2006-10-19 9:15 ` Atsushi Nemoto
2006-10-19 9:54 ` Franck Bui-Huu
2006-10-19 10:30 ` Atsushi Nemoto
2006-10-19 10:51 ` Franck Bui-Huu
2006-10-19 11:00 ` Atsushi Nemoto
2006-10-19 11:12 ` Franck Bui-Huu
2006-10-13 12:39 ` [PATCH 7/7] Make free_init_pages() arguments to be physical addresses Franck Bui-Huu
2006-10-13 13:31 ` Franck Bui-Huu
-- strict thread matches above, loose matches on Subject: below --
2006-10-16 16:12 [PATCH 0/7] Get ride of CPHYSADDR() in setup.c [take #3] Franck Bui-Huu
2006-10-16 16:12 ` [PATCH 2/7] Make __pa() aware of XKPHYS/CKSEG0 address mix for 64 bit kernels Franck Bui-Huu
2006-10-19 11:19 [PATCH 0/7] Get ride of CPHYSADDR() in setup.c [take #4] Franck Bui-Huu
2006-10-19 11:20 ` [PATCH 2/7] Make __pa() aware of XKPHYS/CKSEG0 address mix for 64 bit kernels Franck Bui-Huu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox