linux-mips
[Top] [All Lists]

Re: [PATCH]: Add byteorder/endianess to /proc/cpuinfo

To: Kumba <kumba@gentoo.org>
Subject: Re: [PATCH]: Add byteorder/endianess to /proc/cpuinfo
From: Guido Guenther <agx@sigxcpu.org>
Date: Thu, 26 Jan 2006 17:45:53 +0100
Cc: linux-mips@linux-mips.org
In-reply-to: <20060124195419.GB24568@toucan.gentoo.org>
Mail-followup-to: Guido Guenther <agx@sigxcpu.org>, Kumba <kumba@gentoo.org>, linux-mips@linux-mips.org
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20060124195419.GB24568@toucan.gentoo.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.11
On Tue, Jan 24, 2006 at 07:54:19PM +0000, Kumba wrote:
> Adds an additional field to /proc/cpuinfo that states the byteorder
> of the system.  This has been floating around for some time on the
> list, so maybe this time is the charm.
This actually got removed from mainline ages ago. It's only being
carried around in distribution kernels for legacy reasons - we shouldn't
readd it.
Cheers,
 -- Guido
> 
> Signed-off-by: Joshua Kinard <kumba@gentoo.org>
> ---
> 
>  proc.c |    5 +++++
>  1 file changed, 5 insertions(+)
> 

> diff -Naurp mipslinux/arch/mips/kernel/proc.c 
> mipslinux-byteorder/arch/mips/kernel/proc.c
> --- mipslinux/arch/mips/kernel/proc.c 2006-01-22 21:14:11.000000000 -0500
> +++ mipslinux-byteorder/arch/mips/kernel/proc.c       2006-01-24 
> 13:39:47.000000000 -0500
> @@ -114,6 +114,11 @@ static int show_cpuinfo(struct seq_file 
>       seq_printf(m, "BogoMIPS\t\t: %lu.%02lu\n",
>                     cpu_data[n].udelay_val / (500000/HZ),
>                     (cpu_data[n].udelay_val / (5000/HZ)) % 100);
> +#ifdef __MIPSEB__
> +     seq_printf(m, "byteorder\t\t: big endian\n");
> +#else
> +     seq_printf(m, "byteorder\t\t: little endian\n");
> +#endif
>       seq_printf(m, "wait instruction\t: %s\n", cpu_wait ? "yes" : "no");
>       seq_printf(m, "microsecond timers\t: %s\n",
>                     cpu_has_counter ? "yes" : "no");

Attachment: signature.asc
Description: Digital signature

<Prev in Thread] Current Thread [Next in Thread>