From aaf4f97f267aa0dbc42f089b33325e61aac8622e Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Sun, 16 Dec 2012 18:27:33 +0100 Subject: asm-generic/dma-mapping-broken.h: Provide dma_alloc_attrs()/dma_free_attrs() Since commit 0049fb2603b7afb1080776ee691dfa5a3d282357 ("OMAPFB: use dma_alloc_attrs to allocate memory") we have one non-arch user of dma_{alloc,free}_attrs(). Hence provide these functions, as wrappers around dma_{alloc,free}_coherent(). Note that most architectures do it the other way around. But as these are dummy functions, we don't care. Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann --- include/asm-generic/dma-mapping-broken.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include/asm-generic') diff --git a/include/asm-generic/dma-mapping-broken.h b/include/asm-generic/dma-mapping-broken.h index ccf7b4f34a3..6c32af918c2 100644 --- a/include/asm-generic/dma-mapping-broken.h +++ b/include/asm-generic/dma-mapping-broken.h @@ -16,6 +16,22 @@ extern void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, dma_addr_t dma_handle); +static inline void *dma_alloc_attrs(struct device *dev, size_t size, + dma_addr_t *dma_handle, gfp_t flag, + struct dma_attrs *attrs) +{ + /* attrs is not supported and ignored */ + return dma_alloc_coherent(dev, size, dma_handle, flag); +} + +static inline void dma_free_attrs(struct device *dev, size_t size, + void *cpu_addr, dma_addr_t dma_handle, + struct dma_attrs *attrs) +{ + /* attrs is not supported and ignored */ + dma_free_coherent(dev, size, cpu_addr, dma_handle); +} + #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) -- cgit v1.2.3 From f13a3664e4d1de8adc1fc82b981ba4699a731fa1 Mon Sep 17 00:00:00 2001 From: Vineet Gupta Date: Mon, 24 Dec 2012 10:51:36 +0530 Subject: CONFIG_GENERIC_SIGALTSTACK build breakage with asm-generic/syscalls.h Saner transition plan for GENERIC_SIGALTSTACK conversion - instead of adding #define sys_sigaltstack sys_sigaltstack in asm/syscalls.h of architecture if it's pulls asm-generic/syscalls.h, only to have those defines removed once all architectures are converted, make the declaration in said asm-generic/syscalls.h conditional on the lack of GENERIC_SIGALTSTACK. Less messy in intermediate stages that way... Signed-off-by: Vineet Gupta Acked-by: Al Viro Cc: james.hogan@imgtec.com Cc: arnd@arndb.de Cc: torvalds@linux-foundation.org Cc: linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org Signed-off-by: Al Viro --- include/asm-generic/syscalls.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/asm-generic') diff --git a/include/asm-generic/syscalls.h b/include/asm-generic/syscalls.h index 58f466ff00d..1db51b8524e 100644 --- a/include/asm-generic/syscalls.h +++ b/include/asm-generic/syscalls.h @@ -21,10 +21,12 @@ asmlinkage long sys_mmap(unsigned long addr, unsigned long len, unsigned long fd, off_t pgoff); #endif +#ifndef CONFIG_GENERIC_SIGALTSTACK #ifndef sys_sigaltstack asmlinkage long sys_sigaltstack(const stack_t __user *, stack_t __user *, struct pt_regs *); #endif +#endif #ifndef sys_rt_sigreturn asmlinkage long sys_rt_sigreturn(struct pt_regs *regs); -- cgit v1.2.3 From 2f91ec8cc456d6e57db3ebced34a9e96a356168f Mon Sep 17 00:00:00 2001 From: "Kirill A. Shutemov" Date: Wed, 26 Dec 2012 03:19:55 +0300 Subject: asm-generic, mm: pgtable: convert my_zero_pfn() to macros to fix build Commit 816422ad7647 ("asm-generic, mm: pgtable: consolidate zero page helpers") broke the compile on MIPS if SPARSEMEM is enabled. We get this: In file included from arch/mips/include/asm/pgtable.h:552, from include/linux/mm.h:44, from arch/mips/kernel/asm-offsets.c:14: include/asm-generic/pgtable.h: In function 'my_zero_pfn': include/asm-generic/pgtable.h:466: error: implicit declaration of function 'page_to_section' In file included from arch/mips/kernel/asm-offsets.c:14: include/linux/mm.h: At top level: include/linux/mm.h:738: error: conflicting types for 'page_to_section' include/asm-generic/pgtable.h:466: note: previous implicit declaration of 'page_to_section' was here Due header files inter-dependencies, the only way I see to fix it is convert my_zero_pfn() for __HAVE_COLOR_ZERO_PAGE to macros. Signed-off-by: Kirill A. Shutemov Tested-by: Aaro Koskinen Acked-by: David Daney Cc: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-generic/pgtable.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'include/asm-generic') diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index 701beab27aa..5cf680a98f9 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h @@ -461,10 +461,8 @@ static inline int is_zero_pfn(unsigned long pfn) return offset_from_zero_pfn <= (zero_page_mask >> PAGE_SHIFT); } -static inline unsigned long my_zero_pfn(unsigned long addr) -{ - return page_to_pfn(ZERO_PAGE(addr)); -} +#define my_zero_pfn(addr) page_to_pfn(ZERO_PAGE(addr)) + #else static inline int is_zero_pfn(unsigned long pfn) { -- cgit v1.2.3