From 9b04ebd1584766229c58fedaa8fe4dfff575ac3a Mon Sep 17 00:00:00 2001 From: James Hogan Date: Tue, 23 Oct 2012 10:21:57 +0100 Subject: asm-generic/io.h: remove asm/cacheflush.h include Including from prevents cacheflush.h being able to use I/O functions like readl and writel due to circular include dependencies. It doesn't appear as if anything from cacheflush.h is actually used by the generic io.h, so remove the include. I've compile tested a defconfig compilation of blackfin, openrisc (which needed including from it's to get the PAGE_* definitions), and xtensa. Other architectures which use asm-generic/io.h are score and unicore32, and looking at their io.h I don't see any obvious problems. Signed-off-by: James Hogan Acked-by: Jonas Bonn Cc: Chris Zankel Cc: Max Filippov Cc: Mike Frysinger Cc: Chen Liqin Cc: Lennox Wu Cc: Guan Xuetao Signed-off-by: Arnd Bergmann --- arch/openrisc/include/asm/io.h | 1 + include/asm-generic/io.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/openrisc/include/asm/io.h b/arch/openrisc/include/asm/io.h index 07f5299..7c69139 100644 --- a/arch/openrisc/include/asm/io.h +++ b/arch/openrisc/include/asm/io.h @@ -30,6 +30,7 @@ #define PIO_MASK 0 #include +#include extern void __iomem *__ioremap(phys_addr_t offset, unsigned long size, pgprot_t prot); diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index 448303b..616eea5 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h @@ -12,7 +12,6 @@ #define __ASM_GENERIC_IO_H #include /* I/O is all done through memory accesses */ -#include #include #ifdef CONFIG_GENERIC_IOMAP -- cgit v1.1 From b2656a138ab7bc4e7abd3b1cbd6d1f105c7a7186 Mon Sep 17 00:00:00 2001 From: Will Deacon Date: Wed, 17 Oct 2012 16:45:01 +0100 Subject: asm-generic: io: remove {read,write} string functions The {read,write}s{b,w,l} functions are not defined across all architectures and therefore shouldn't be used by portable drivers. We should encourage driver writers to use the io{read,write}{8,16,32}_rep functions instead. This patch removes the {read,write} string functions for the generic IO header as they have no place in a new architecture port. Cc: Arnd Bergmann Cc: Mike Frysinger Cc: Ben Herrenschmidt Signed-off-by: Will Deacon --- include/asm-generic/io.h | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index 616eea5..063ce76 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h @@ -216,36 +216,6 @@ static inline void outsl(unsigned long addr, const void *buffer, int count) } #endif -static inline void readsl(const void __iomem *addr, void *buf, int len) -{ - insl(addr - PCI_IOBASE, buf, len); -} - -static inline void readsw(const void __iomem *addr, void *buf, int len) -{ - insw(addr - PCI_IOBASE, buf, len); -} - -static inline void readsb(const void __iomem *addr, void *buf, int len) -{ - insb(addr - PCI_IOBASE, buf, len); -} - -static inline void writesl(const void __iomem *addr, const void *buf, int len) -{ - outsl(addr - PCI_IOBASE, buf, len); -} - -static inline void writesw(const void __iomem *addr, const void *buf, int len) -{ - outsw(addr - PCI_IOBASE, buf, len); -} - -static inline void writesb(const void __iomem *addr, const void *buf, int len) -{ - outsb(addr - PCI_IOBASE, buf, len); -} - #ifndef CONFIG_GENERIC_IOMAP #define ioread8(addr) readb(addr) #define ioread16(addr) readw(addr) -- cgit v1.1 From 20154fd3706d603216f462854862203d231c6086 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Sat, 1 Dec 2012 14:24:40 +0100 Subject: asm-generic/mmu.h: Remove unused vmlist field from mm_context_t Nothing is using the vmlist field in mm_context_t anymore. It has been removed from the non-generic versions over 3 years ago 8feae1311 ("NOMMU: Make VMAs per MM as for MMU-mode linux"). Signed-off-by: Lars-Peter Clausen Signed-off-by: Arnd Bergmann --- include/asm-generic/mmu.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/asm-generic/mmu.h b/include/asm-generic/mmu.h index 4f4aa56..a67ae0a9 100644 --- a/include/asm-generic/mmu.h +++ b/include/asm-generic/mmu.h @@ -7,7 +7,6 @@ */ #ifndef __ASSEMBLY__ typedef struct { - struct vm_list_struct *vmlist; unsigned long end_brk; } mm_context_t; #endif -- cgit v1.1 From 9d2951bcd96ff2d5a88022ad3b4aebd6357d65d7 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Sat, 1 Dec 2012 14:24:41 +0100 Subject: asm-generic/mmu.h: Add support for FDPIC No-MMU architectures often have support for FDPIC binaries. FDPIC support requires two additional fields in the mm_context_t struct. This patch adds these fields to the generic mm_context_t definition if support for FDPIC binaries is enabled. This allows to use the generic mmu.h for a few more architectures. Signed-off-by: Lars-Peter Clausen Signed-off-by: Arnd Bergmann --- include/asm-generic/mmu.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/asm-generic/mmu.h b/include/asm-generic/mmu.h index a67ae0a9..0ed3f1c 100644 --- a/include/asm-generic/mmu.h +++ b/include/asm-generic/mmu.h @@ -8,6 +8,11 @@ #ifndef __ASSEMBLY__ typedef struct { unsigned long end_brk; + +#ifdef CONFIG_BINFMT_ELF_FDPIC + unsigned long exec_fdpic_loadmap; + unsigned long interp_fdpic_loadmap; +#endif } mm_context_t; #endif -- cgit v1.1 From 9ab9da5ee2adc2b98ce7cc13a7f1cc900d2bee5a Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Sat, 1 Dec 2012 14:24:42 +0100 Subject: c6x: Use generic asm/mmu.h c6x's asm/mmu.h is basically identical to asm-generic/mmu.h, so use it instead of the custom version. Signed-off-by: Lars-Peter Clausen Acked-by: Mark Salter Tested-by: Mark Salter Signed-off-by: Arnd Bergmann --- arch/c6x/include/asm/Kbuild | 1 + arch/c6x/include/asm/mmu.h | 22 ---------------------- 2 files changed, 1 insertion(+), 22 deletions(-) delete mode 100644 arch/c6x/include/asm/mmu.h diff --git a/arch/c6x/include/asm/Kbuild b/arch/c6x/include/asm/Kbuild index 112a496..3c8b660 100644 --- a/arch/c6x/include/asm/Kbuild +++ b/arch/c6x/include/asm/Kbuild @@ -25,6 +25,7 @@ generic-y += kdebug.h generic-y += kmap_types.h generic-y += local.h generic-y += mman.h +generic-y += mmu.h generic-y += mmu_context.h generic-y += msgbuf.h generic-y += param.h diff --git a/arch/c6x/include/asm/mmu.h b/arch/c6x/include/asm/mmu.h deleted file mode 100644 index 4467e77..0000000 --- a/arch/c6x/include/asm/mmu.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Port on Texas Instruments TMS320C6x architecture - * - * Copyright (C) 2004, 2009, 2010 Texas Instruments Incorporated - * Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ -#ifndef _ASM_C6X_MMU_H -#define _ASM_C6X_MMU_H - -typedef struct { - unsigned long end_brk; -#ifdef CONFIG_BINFMT_ELF_FDPIC - unsigned long exec_fdpic_loadmap; - unsigned long interp_fdpic_loadmap; -#endif -} mm_context_t; - -#endif /* _ASM_C6X_MMU_H */ -- cgit v1.1 From 0a2f505ee721f0b5480464673ca71520c0ac2eb6 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Sat, 1 Dec 2012 14:24:43 +0100 Subject: h8300: Use generic asm/mmu.h h8300's asm/mmu.h is basically identical to asm-generic/mmu.h, so use it instead of the custom version. Signed-off-by: Lars-Peter Clausen Signed-off-by: Arnd Bergmann --- arch/h8300/include/asm/Kbuild | 1 + arch/h8300/include/asm/mmu.h | 10 ---------- 2 files changed, 1 insertion(+), 10 deletions(-) delete mode 100644 arch/h8300/include/asm/mmu.h diff --git a/arch/h8300/include/asm/Kbuild b/arch/h8300/include/asm/Kbuild index 50bbf38..173de77 100644 --- a/arch/h8300/include/asm/Kbuild +++ b/arch/h8300/include/asm/Kbuild @@ -2,4 +2,5 @@ include include/asm-generic/Kbuild.asm generic-y += clkdev.h generic-y += exec.h +generic-y += mmu.h generic-y += module.h diff --git a/arch/h8300/include/asm/mmu.h b/arch/h8300/include/asm/mmu.h deleted file mode 100644 index 3130996..0000000 --- a/arch/h8300/include/asm/mmu.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __MMU_H -#define __MMU_H - -/* Copyright (C) 2002, David McCullough */ - -typedef struct { - unsigned long end_brk; -} mm_context_t; - -#endif -- cgit v1.1 From fb9de7ebc3a2eb7ddb83c92e288447a0c313bced Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Sat, 1 Dec 2012 14:24:44 +0100 Subject: xtensa: Use generic asm/mmu.h for nommu The nommu portion of mmu.h of the extensa platform is basically the same as the asm-generic mmu.h. So use it instead. Signed-off-by: Lars-Peter Clausen Acked-by: Chris Zankel Signed-off-by: Arnd Bergmann --- arch/xtensa/include/asm/mmu.h | 2 +- arch/xtensa/include/asm/nommu.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) delete mode 100644 arch/xtensa/include/asm/nommu.h diff --git a/arch/xtensa/include/asm/mmu.h b/arch/xtensa/include/asm/mmu.h index 04890d6..8554b2c 100644 --- a/arch/xtensa/include/asm/mmu.h +++ b/arch/xtensa/include/asm/mmu.h @@ -12,7 +12,7 @@ #define _XTENSA_MMU_H #ifndef CONFIG_MMU -#include +#include #else /* Default "unsigned long" context */ diff --git a/arch/xtensa/include/asm/nommu.h b/arch/xtensa/include/asm/nommu.h deleted file mode 100644 index dce2c43..0000000 --- a/arch/xtensa/include/asm/nommu.h +++ /dev/null @@ -1,3 +0,0 @@ -typedef struct { - unsigned long end_brk; -} mm_context_t; -- cgit v1.1