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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Signed-off-by: Joshua Kinard <kumba@xxxxxxxxxx>
---

 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");

[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux