[PATCH] compat: introduce compat_time_t

From: Stephen Rothwell (sfr_at_canb.auug.org.au)
Date: 05/31/05

  • Next message: Jeff Garzik: "Re: [PATCH] SATA NCQ support"
    Date:	Tue, 31 May 2005 11:01:14 +1000
    To: Andrew Morton <akpm@osdl.org>
    
    

    Hi Andrew,

    This patch is based on work by Carlos O'Donell and Matthew Wilcox. It
    introduces/updates the compat_time_t type and uses it for compat siginfo
    structures. I have built this on ppc64 and x86_64.

    Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

    ---
     arch/ia64/ia32/ia32priv.h       |    2 +-
     arch/s390/kernel/compat_linux.h |    2 +-
     arch/sparc64/kernel/signal32.c  |    2 +-
     include/asm-ia64/compat.h       |    1 +
     include/asm-mips/compat.h       |    1 +
     include/asm-parisc/compat.h     |    2 +-
     include/asm-ppc64/compat.h      |    1 +
     include/asm-ppc64/ppc32.h       |    2 +-
     include/asm-sparc64/compat.h    |    1 +
     include/asm-x86_64/ia32.h       |    2 +-
     10 files changed, 10 insertions(+), 6 deletions(-)
    diff -ruNp linus/arch/ia64/ia32/ia32priv.h linus-willy.2/arch/ia64/ia32/ia32priv.h
    --- linus/arch/ia64/ia32/ia32priv.h	2005-05-20 09:02:39.000000000 +1000
    +++ linus-willy.2/arch/ia64/ia32/ia32priv.h	2005-04-18 18:03:46.000000000 +1000
    @@ -241,7 +241,7 @@ typedef struct compat_siginfo {
     
     		/* POSIX.1b timers */
     		struct {
    -			timer_t _tid;		/* timer id */
    +			compat_timer_t _tid;		/* timer id */
     			int _overrun;		/* overrun count */
     			char _pad[sizeof(unsigned int) - sizeof(int)];
     			compat_sigval_t _sigval;	/* same as below */
    diff -ruNp linus/arch/s390/kernel/compat_linux.h linus-willy.2/arch/s390/kernel/compat_linux.h
    --- linus/arch/s390/kernel/compat_linux.h	2005-05-20 09:03:16.000000000 +1000
    +++ linus-willy.2/arch/s390/kernel/compat_linux.h	2005-04-18 18:11:49.000000000 +1000
    @@ -45,7 +45,7 @@ typedef struct compat_siginfo {
     
     		/* POSIX.1b timers */
     		struct {
    -			timer_t _tid;		/* timer id */
    +			compat_timer_t _tid;		/* timer id */
     			int _overrun;		/* overrun count */
     			compat_sigval_t _sigval;	/* same as below */
     			int _sys_private;       /* not to be passed to user */
    diff -ruNp linus/arch/sparc64/kernel/signal32.c linus-willy.2/arch/sparc64/kernel/signal32.c
    --- linus/arch/sparc64/kernel/signal32.c	2005-05-20 09:03:27.000000000 +1000
    +++ linus-willy.2/arch/sparc64/kernel/signal32.c	2005-04-27 02:33:26.000000000 +1000
    @@ -102,7 +102,7 @@ typedef struct compat_siginfo{
     
     		/* POSIX.1b timers */
     		struct {
    -			timer_t _tid;			/* timer id */
    +			compat_timer_t _tid;			/* timer id */
     			int _overrun;			/* overrun count */
     			compat_sigval_t _sigval;		/* same as below */
     			int _sys_private;		/* not to be passed to user */
    diff -ruNp linus/include/asm-ia64/compat.h linus-willy.2/include/asm-ia64/compat.h
    --- linus/include/asm-ia64/compat.h	2005-05-20 09:05:37.000000000 +1000
    +++ linus-willy.2/include/asm-ia64/compat.h	2005-03-15 23:57:33.000000000 +1100
    @@ -27,6 +27,7 @@ typedef u16		compat_ipc_pid_t;
     typedef s32		compat_daddr_t;
     typedef u32		compat_caddr_t;
     typedef __kernel_fsid_t	compat_fsid_t;
    +typedef s32		compat_timer_t;
     
     typedef s32		compat_int_t;
     typedef s32		compat_long_t;
    diff -ruNp linus/include/asm-mips/compat.h linus-willy.2/include/asm-mips/compat.h
    --- linus/include/asm-mips/compat.h	2005-05-20 09:05:46.000000000 +1000
    +++ linus-willy.2/include/asm-mips/compat.h	2005-03-15 23:58:59.000000000 +1100
    @@ -29,6 +29,7 @@ typedef s32		compat_caddr_t;
     typedef struct {
     	s32	val[2];
     } compat_fsid_t;
    +typedef s32		compat_timer_t;
     
     typedef s32		compat_int_t;
     typedef s32		compat_long_t;
    diff -ruNp linus/include/asm-parisc/compat.h linus-willy.2/include/asm-parisc/compat.h
    --- linus/include/asm-parisc/compat.h	2005-05-20 09:05:51.000000000 +1000
    +++ linus-willy.2/include/asm-parisc/compat.h	2005-03-16 00:01:32.000000000 +1100
    @@ -24,7 +24,7 @@ typedef u16	compat_nlink_t;
     typedef u16	compat_ipc_pid_t;
     typedef s32	compat_daddr_t;
     typedef u32	compat_caddr_t;
    -typedef u32	compat_timer_t;
    +typedef s32	compat_timer_t;
     
     typedef s32	compat_int_t;
     typedef s32	compat_long_t;
    diff -ruNp linus/include/asm-ppc64/compat.h linus-willy.2/include/asm-ppc64/compat.h
    --- linus/include/asm-ppc64/compat.h	2005-05-20 09:05:54.000000000 +1000
    +++ linus-willy.2/include/asm-ppc64/compat.h	2005-03-16 00:02:28.000000000 +1100
    @@ -26,6 +26,7 @@ typedef s32		compat_daddr_t;
     typedef u32		compat_caddr_t;
     typedef __kernel_fsid_t	compat_fsid_t;
     typedef s32		compat_key_t;
    +typedef s32		compat_timer_t;
     
     typedef s32		compat_int_t;
     typedef s32		compat_long_t;
    diff -ruNp linus/include/asm-ppc64/ppc32.h linus-willy.2/include/asm-ppc64/ppc32.h
    --- linus/include/asm-ppc64/ppc32.h	2005-05-20 09:05:56.000000000 +1000
    +++ linus-willy.2/include/asm-ppc64/ppc32.h	2005-04-18 18:15:06.000000000 +1000
    @@ -32,7 +32,7 @@ typedef struct compat_siginfo {
     
     		/* POSIX.1b timers */
     		struct {
    -			timer_t _tid;			/* timer id */
    +			compat_timer_t _tid;			/* timer id */
     			int _overrun;			/* overrun count */
     			compat_sigval_t _sigval;		/* same as below */
     			int _sys_private;		/* not to be passed to user */
    diff -ruNp linus/include/asm-sparc64/compat.h linus-willy.2/include/asm-sparc64/compat.h
    --- linus/include/asm-sparc64/compat.h	2005-05-20 09:06:04.000000000 +1000
    +++ linus-willy.2/include/asm-sparc64/compat.h	2005-04-27 02:33:58.000000000 +1000
    @@ -25,6 +25,7 @@ typedef s32		compat_daddr_t;
     typedef u32		compat_caddr_t;
     typedef __kernel_fsid_t	compat_fsid_t;
     typedef s32		compat_key_t;
    +typedef s32		compat_timer_t;
     
     typedef s32		compat_int_t;
     typedef s32		compat_long_t;
    diff -ruNp linus/include/asm-x86_64/ia32.h linus-willy.2/include/asm-x86_64/ia32.h
    --- linus/include/asm-x86_64/ia32.h	2005-05-20 09:06:10.000000000 +1000
    +++ linus-willy.2/include/asm-x86_64/ia32.h	2005-04-18 18:17:50.000000000 +1000
    @@ -94,7 +94,7 @@ typedef struct compat_siginfo{
     
     		/* POSIX.1b timers */
     		struct {
    -			int _tid;		/* timer id */
    +			compat_timer_t _tid;	/* timer id */
     			int _overrun;		/* overrun count */
     			compat_sigval_t _sigval;	/* same as below */
     			int _sys_private;	/* not to be passed to user */
    -- 
    Cheers,
    Stephen Rothwell                    sfr@canb.auug.org.au
    http://www.canb.auug.org.au/~sfr/
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Jeff Garzik: "Re: [PATCH] SATA NCQ support"

    Relevant Pages

    • Re: CPU POSIX timers livelock (with patch for review)
      ... ITIMER_VIRT timers and rlimit handling. ... struct thread_group_cputime { ... the structure corresponding to the running CPU, ... from all threads in the thread group now use thread_group_cputimeto ...
      (Linux-Kernel)
    • Re: [RFC] (How to) Let idle CPUs sleep
      ... I modified the slab allocator to do a slightly better job of handling timers. ... struct array_cache *ac, int force); static void do_drain ... this do you still advocate that we restrict idle CPUs to wakeup every 100ms and check for imbalance? ...
      (Linux-Kernel)
    • Re: posix-cpu-timers revamp
      ... POSIX timers CPU timers ... CPU time rlimits (RLIMIT_CPU for process-wide, ... just replace these with a single struct thread_group_cputime ... any process-wide expiration is set. ...
      (Linux-Kernel)
    • [RFC] char: Add MFGPT driver for the CS5535/CS5536
      ... The Geode CS5535 and CS5536 companion chips contain a block of timers ... +struct mfgpt_timer_t { ... +static int mfgpt_major; ... +static void mfgpt_set_events ...
      (Linux-Kernel)
    • [PATCH] rmap 26 __setup_arg_pages
      ... put_kernel_page (struct page *page, unsigned long address, pgprot_t pgprot) ... extern void compute_creds; ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)