[klibc] [PATCH] add mips64 support

H. Peter Anvin hpa at zytor.com
Tue Mar 11 09:38:00 PDT 2014


On 03/10/2014 11:21 PM, YunQiang Su wrote:
> From: Dejan Latinovic <Dejan.Latinovic at imgtec.com>

Description goes here?  I think it would be helpful to break this up
into a few patches with descriptions.

> +	unsigned long __f20;
> +	unsigned long __f21;
> +	unsigned long __f22;
> +	unsigned long __f23;
> +	unsigned long __f24;
> +	unsigned long __f25;
> +	unsigned long __f26;
> +	unsigned long __f27;
> +	unsigned long __f28;
> +	unsigned long __f29;
> +	unsigned long __f30;
> +	unsigned long __f31;
> +	unsigned long __fcr31;
> +	unsigned long __unused;

Does it make sense to save all the floating-point state even though
klibc doesn't have any floating point support?

> +/*
> + * Symbolic register names for 32 bit ABI
> + */

64-bit?

> diff --git a/usr/include/fcntl.h b/usr/include/fcntl.h
> index bbd6917..09ba2f2 100644
> --- a/usr/include/fcntl.h
> +++ b/usr/include/fcntl.h
> @@ -9,7 +9,7 @@
>  #include <klibc/compiler.h>
>  #include <klibc/seek.h>
>  #include <sys/types.h>
> -#if defined(__mips__) && !defined(__mips64__)
> +#if defined(__mips__) && !defined(__mips64)
>  # include <klibc/archfcntl.h>
>  #endif
>  #include <linux/fcntl.h>
> diff --git a/usr/include/sys/md.h b/usr/include/sys/md.h
> index 184e4aa..7be8ead 100644
> --- a/usr/include/sys/md.h
> +++ b/usr/include/sys/md.h
> @@ -26,6 +26,7 @@
>  #define LEVEL_FAULTY            (-5)
>  #define MAX_MD_DEVS  256	/* Max number of md dev */
>  
> +#include <endian.h>
>  #include <linux/raid/md_u.h>
>  #include <linux/raid/md_p.h>
>

These hunks definitely should be explained, and probably should be
broken out as separate patches.

> diff --git a/usr/include/sys/resource.h b/usr/include/sys/resource.h
> index 5d8bd52..35398a7 100644
> --- a/usr/include/sys/resource.h
> +++ b/usr/include/sys/resource.h
> @@ -12,6 +12,8 @@
>  __extern int getpriority(int, int);
>  __extern int setpriority(int, int, int);
>  
> -__extern int getrusage(int, struct rusage *);
> +#if !defined(__mips64)
> + __extern int getrusage(int, struct rusage *);
> +#endif
>  

Say what?

> diff --git a/usr/klibc/arch/mips64/crt0.S b/usr/klibc/arch/mips64/crt0.S
> new file mode 100644
> index 0000000..142d9f2
> --- /dev/null
> +++ b/usr/klibc/arch/mips64/crt0.S
> @@ -0,0 +1,25 @@
> +#
> +# arch/mips/crt0.S

mips64?




More information about the klibc mailing list