* [PATCH 1/2] MIPS: Allow the auxv's elf_platform entry to be set.
@ 2010-01-29 0:52 David Daney
2010-01-29 0:52 ` [PATCH 2/2] MIPS: Set __elf_platform for Octeon David Daney
2010-01-29 12:29 ` [PATCH 1/2] MIPS: Allow the auxv's elf_platform entry to be set Ralf Baechle
0 siblings, 2 replies; 4+ messages in thread
From: David Daney @ 2010-01-29 0:52 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: David Daney
The userspace runtime linker uses the elf_platform to find the
libraries optimized for the current CPU archecture variant. First we
need to allow it to be set to something other than NULL. Follow-on
patches will set some values for specific CPUs.
GLIBC already does the right thing. The kernel just needs to supply
good data.
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
---
arch/mips/include/asm/elf.h | 14 +++++++-------
arch/mips/kernel/cpu-probe.c | 1 +
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h
index 9266f02..1c3dbf0 100644
--- a/arch/mips/include/asm/elf.h
+++ b/arch/mips/include/asm/elf.h
@@ -334,14 +334,14 @@ extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *);
#define ELF_HWCAP (0)
-/* This yields a string that ld.so will use to load implementation
- specific libraries for optimization. This is more specific in
- intent than poking at uname or /proc/cpuinfo.
-
- For the moment, we have only optimizations for the Intel generations,
- but that could change... */
+/*
+ * This yields a string that ld.so will use to load implementation
+ * specific libraries for optimization. This is more specific in
+ * intent than poking at uname or /proc/cpuinfo.
+ */
-#define ELF_PLATFORM (NULL)
+#define ELF_PLATFORM __elf_platform
+extern const char *__elf_platform;
/*
* See comments in asm-alpha/elf.h, this is the same thing
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index aa25fd0..91ba1c8 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -917,6 +917,7 @@ static inline void cpu_probe_cavium(struct cpuinfo_mips *c, unsigned int cpu)
}
const char *__cpu_name[NR_CPUS];
+const char *__elf_platform;
__cpuinit void cpu_probe(void)
{
--
1.6.0.6
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/2] MIPS: Set __elf_platform for Octeon.
2010-01-29 0:52 [PATCH 1/2] MIPS: Allow the auxv's elf_platform entry to be set David Daney
@ 2010-01-29 0:52 ` David Daney
2010-01-29 12:29 ` Ralf Baechle
2010-01-29 12:29 ` [PATCH 1/2] MIPS: Allow the auxv's elf_platform entry to be set Ralf Baechle
1 sibling, 1 reply; 4+ messages in thread
From: David Daney @ 2010-01-29 0:52 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: David Daney
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
---
arch/mips/kernel/cpu-probe.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index 91ba1c8..906a2d1 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -908,6 +908,8 @@ static inline void cpu_probe_cavium(struct cpuinfo_mips *c, unsigned int cpu)
case PRID_IMP_CAVIUM_CN52XX:
c->cputype = CPU_CAVIUM_OCTEON;
__cpu_name[cpu] = "Cavium Octeon";
+ if (cpu == 0)
+ __elf_platform = "octeon";
break;
default:
printk(KERN_INFO "Unknown Octeon chip!\n");
--
1.6.0.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] MIPS: Allow the auxv's elf_platform entry to be set.
2010-01-29 0:52 [PATCH 1/2] MIPS: Allow the auxv's elf_platform entry to be set David Daney
2010-01-29 0:52 ` [PATCH 2/2] MIPS: Set __elf_platform for Octeon David Daney
@ 2010-01-29 12:29 ` Ralf Baechle
1 sibling, 0 replies; 4+ messages in thread
From: Ralf Baechle @ 2010-01-29 12:29 UTC (permalink / raw)
To: David Daney; +Cc: linux-mips
On Thu, Jan 28, 2010 at 04:52:12PM -0800, David Daney wrote:
> The userspace runtime linker uses the elf_platform to find the
> libraries optimized for the current CPU archecture variant. First we
> need to allow it to be set to something other than NULL. Follow-on
> patches will set some values for specific CPUs.
>
> GLIBC already does the right thing. The kernel just needs to supply
> good data.
Thanks, queued for 2.6.34.
Ralf
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-01-29 12:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-29 0:52 [PATCH 1/2] MIPS: Allow the auxv's elf_platform entry to be set David Daney
2010-01-29 0:52 ` [PATCH 2/2] MIPS: Set __elf_platform for Octeon David Daney
2010-01-29 12:29 ` Ralf Baechle
2010-01-29 12:29 ` [PATCH 1/2] MIPS: Allow the auxv's elf_platform entry to be set Ralf Baechle
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.