From 2d3399ab54c9763fcba314d0b33ab82e1580d7aa Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Mon, 13 Sep 2004 00:05:18 -0700 Subject: [PATCH] Clean up compat sched affinity syscalls Remove the set_fs hack in the compat affinity calls. Create sched_getaffinity and sched_setaffinity helper functions that both the native and compat affinity syscalls use. Also make the compat functions match what the native ones are doing now, setaffinity calls succeed no matter what length the bitmask is, but getaffinity calls must pass in bitmasks at least as long as the kernel type. Signed-off-by: Anton Blanchard Signed-off-by: Linus Torvalds --- include/linux/sched.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/linux') diff --git a/include/linux/sched.h b/include/linux/sched.h index b73710a9ac12..f5d4b9cae523 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1024,6 +1024,9 @@ static inline void arch_pick_mmap_layout(struct mm_struct *mm) } #endif +extern long sched_setaffinity(pid_t pid, cpumask_t new_mask); +extern long sched_getaffinity(pid_t pid, cpumask_t *mask); + #endif /* __KERNEL__ */ #endif -- cgit v1.2.3 From 5c422c68d6e8cb32f6d3525858c5fb8bc71ef754 Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Mon, 13 Sep 2004 01:11:27 -0700 Subject: [PATCH] linux/dma-mapping.h needs linux/device.h It seems that most architectures already include linux/device.h in their own asm/dma-mapping.h. Most but not all, and some drivers fail to compile on those architectures that don't. Since everybody needs it let's include device.h from one place only and fix compilation for everybody. --- include/asm-i386/dma-mapping.h | 1 - include/asm-ia64/dma-mapping.h | 1 - include/asm-mips/dma-mapping.h | 1 - include/asm-ppc/dma-mapping.h | 1 - include/asm-ppc64/dma-mapping.h | 1 - include/asm-sh/dma-mapping.h | 1 - include/asm-sh64/dma-mapping.h | 1 - include/asm-sparc/dma-mapping.h | 1 - include/asm-x86_64/dma-mapping.h | 1 - include/linux/dma-mapping.h | 1 + 10 files changed, 1 insertion(+), 9 deletions(-) (limited to 'include/linux') diff --git a/include/asm-i386/dma-mapping.h b/include/asm-i386/dma-mapping.h index eced63913860..8d432bd90f2b 100644 --- a/include/asm-i386/dma-mapping.h +++ b/include/asm-i386/dma-mapping.h @@ -1,7 +1,6 @@ #ifndef _ASM_I386_DMA_MAPPING_H #define _ASM_I386_DMA_MAPPING_H -#include #include #include diff --git a/include/asm-ia64/dma-mapping.h b/include/asm-ia64/dma-mapping.h index 695690a5429b..6347c9845642 100644 --- a/include/asm-ia64/dma-mapping.h +++ b/include/asm-ia64/dma-mapping.h @@ -6,7 +6,6 @@ * David Mosberger-Tang */ #include -#include #include #define dma_alloc_coherent platform_dma_alloc_coherent diff --git a/include/asm-mips/dma-mapping.h b/include/asm-mips/dma-mapping.h index a11cf994d526..716951187bf0 100644 --- a/include/asm-mips/dma-mapping.h +++ b/include/asm-mips/dma-mapping.h @@ -1,7 +1,6 @@ #ifndef _ASM_DMA_MAPPING_H #define _ASM_DMA_MAPPING_H -#include #include #include diff --git a/include/asm-ppc/dma-mapping.h b/include/asm-ppc/dma-mapping.h index 9be4f7297400..7f0487afebbe 100644 --- a/include/asm-ppc/dma-mapping.h +++ b/include/asm-ppc/dma-mapping.h @@ -8,7 +8,6 @@ #include /* need struct page definitions */ #include -#include #include #include diff --git a/include/asm-ppc64/dma-mapping.h b/include/asm-ppc64/dma-mapping.h index 0cdc5346f6f8..1e05f389e72b 100644 --- a/include/asm-ppc64/dma-mapping.h +++ b/include/asm-ppc64/dma-mapping.h @@ -8,7 +8,6 @@ #define _ASM_DMA_MAPPING_H #include -#include #include /* need struct page definitions */ #include diff --git a/include/asm-sh/dma-mapping.h b/include/asm-sh/dma-mapping.h index 8f149477ee2c..8876ec7b0e4d 100644 --- a/include/asm-sh/dma-mapping.h +++ b/include/asm-sh/dma-mapping.h @@ -3,7 +3,6 @@ #include #include -#include #include #include diff --git a/include/asm-sh64/dma-mapping.h b/include/asm-sh64/dma-mapping.h index 3a6424986b4b..b8d26fe677f4 100644 --- a/include/asm-sh64/dma-mapping.h +++ b/include/asm-sh64/dma-mapping.h @@ -3,7 +3,6 @@ #include #include -#include #include #include diff --git a/include/asm-sparc/dma-mapping.h b/include/asm-sparc/dma-mapping.h index 08ede04f7eaf..2dc5bb8effa6 100644 --- a/include/asm-sparc/dma-mapping.h +++ b/include/asm-sparc/dma-mapping.h @@ -2,7 +2,6 @@ #define _ASM_SPARC_DMA_MAPPING_H #include -#include #ifdef CONFIG_PCI #include diff --git a/include/asm-x86_64/dma-mapping.h b/include/asm-x86_64/dma-mapping.h index 95102ecc1b70..a416dc31634a 100644 --- a/include/asm-x86_64/dma-mapping.h +++ b/include/asm-x86_64/dma-mapping.h @@ -7,7 +7,6 @@ */ #include -#include #include #include diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 3c545e326d57..806c305332c1 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -1,6 +1,7 @@ #ifndef _ASM_LINUX_DMA_MAPPING_H #define _ASM_LINUX_DMA_MAPPING_H +#include #include /* These definitions mirror those in pci.h, so they can be used -- cgit v1.2.3