summaryrefslogtreecommitdiffstats
path: root/arch/microblaze
Commit message (Collapse)AuthorAgeFilesLines
* Remove GENERIC_HARDIRQ config optionMartin Schwidefsky2013-09-131-1/+0
| | | | | | | | After the last architecture switched to generic hard irqs the config options HAVE_GENERIC_HARDIRQS & GENERIC_HARDIRQS and the related code for !CONFIG_GENERIC_HARDIRQS can be removed. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* arch: mm: pass userspace fault flag to generic fault handlerJohannes Weiner2013-09-121-2/+5
| | | | | | | | | | | | | | | | | | | | Unlike global OOM handling, memory cgroup code will invoke the OOM killer in any OOM situation because it has no way of telling faults occuring in kernel context - which could be handled more gracefully - from user-triggered faults. Pass a flag that identifies faults originating in user space from the architecture-specific fault handlers to generic code so that memcg OOM handling can be improved. Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Reviewed-by: Michal Hocko <mhocko@suse.cz> Cc: David Rientjes <rientjes@google.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: azurIt <azurit@pobox.sk> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linuxLinus Torvalds2013-09-101-7/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull device tree core updates from Grant Likely: "Generally minor changes. A bunch of bug fixes, particularly for initialization and some refactoring. Most notable change if feeding the entire flattened tree into the random pool at boot. May not be significant, but shouldn't hurt either" Tim Bird questions whether the boot time cost of the random feeding may be noticeable. And "add_device_randomness()" is definitely not some speed deamon of a function. * tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux: of/platform: add error reporting to of_amba_device_create() irq/of: Fix comment typo for irq_of_parse_and_map of: Feed entire flattened device tree into the random pool of/fdt: Clean up casting in unflattening path of/fdt: Remove duplicate memory clearing on FDT unflattening gpio: implement gpio-ranges binding document fix of: call __of_parse_phandle_with_args from of_parse_phandle of: introduce of_parse_phandle_with_fixed_args of: move of_parse_phandle() of: move documentation of of_parse_phandle_with_args of: Fix missing memory initialization on FDT unflattening of: consolidate definition of early_init_dt_alloc_memory_arch() of: Make of_get_phy_mode() return int i.s.o. const int include: dt-binding: input: create a DT header defining key codes. of/platform: Staticize of_platform_device_create_pdata() of: Specify initrd location using 64-bit dt: Typo fix OF: make of_property_for_each_{u32|string}() use parameters if OF is not enabled
| * of: consolidate definition of early_init_dt_alloc_memory_arch()Grant Likely2013-08-281-5/+0
| | | | | | | | | | | | | | Most architectures use the same implementation. Collapse the common ones into a single weak function that can be overridden. Signed-off-by: Grant Likely <grant.likely@linaro.org>
| * Merge tag 'v3.11-rc7' into devicetree/nextGrant Likely2013-08-281-1/+1
| |\ | | | | | | | | | Linux 3.11-rc7
| * | of: Specify initrd location using 64-bitSantosh Shilimkar2013-07-241-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some PAE architectures, the entire range of physical memory could reside outside the 32-bit limit. These systems need the ability to specify the initrd location using 64-bit numbers. This patch globally modifies the early_init_dt_setup_initrd_arch() function to use 64-bit numbers instead of the current unsigned long. There has been quite a bit of debate about whether to use u64 or phys_addr_t. It was concluded to stick to u64 to be consistent with rest of the device tree code. As summarized by Geert, "The address to load the initrd is decided by the bootloader/user and set at that point later in time. The dtb should not be tied to the kernel you are booting" More details on the discussion can be found here: https://lkml.org/lkml/2013/6/20/690 https://lkml.org/lkml/2012/9/13/544 Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Rob Herring <rob.herring@calxeda.com> Acked-by: Vineet Gupta <vgupta@synopsys.com> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Grant Likely <grant.likely@linaro.org>
* | | Merge tag 'microblaze-3.12-rc1' of git://git.monstr.eu/linux-2.6-microblazeLinus Torvalds2013-09-0614-367/+178
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull Microblaze patches from Michal Simek: - PCI fixes - Selfmod code removing - Intc and timer fixes - Adding new MB versions - Minor fixes * tag 'microblaze-3.12-rc1' of git://git.monstr.eu/linux-2.6-microblaze: microblaze: Show message when reset gpio is not present microblaze: Add linux.bin.ub target microblaze: Add PVR version string for MB v9.0 and v9.1 microblaze: timer: Replace microblaze_ prefix by xilinx_ microblaze: timer: Update header microblaze: timer: Remove unused header microblaze: timer: Clear driver init function microblaze: timer: Use CLKSRC_OF initialization microblaze: intc: Remove unused header microblaze: intc: Clean driver init function microblaze: intc: Using irqchip microblaze: intc: Update header microblaze: intc: Remove unused headers microblaze: Remove selfmodified feature of/pci: Use of_pci_range_parser
| * | | microblaze: Show message when reset gpio is not presentMichal Simek2013-09-041-1/+5
| | | | | | | | | | | | | | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | | microblaze: Add linux.bin.ub targetJason Wu2013-09-032-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the linux.bin target creates both linux.bin and linux.bin.ub. Add linux.bin.ub as separate target to generate linux.bin.ub. Signed-off-by: Jason Wu <huanyu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | | microblaze: Add PVR version string for MB v9.0 and v9.1Michal Simek2013-09-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Extend PVR reg decoding. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | | microblaze: timer: Replace microblaze_ prefix by xilinx_Michal Simek2013-09-031-39/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The main reason that this driver can be used by ARM and PPC. The part of preparing of move to generic location. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | | microblaze: timer: Update headerMichal Simek2013-09-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Update dates in header and add Xilinx to it. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | | microblaze: timer: Remove unused headerMichal Simek2013-09-031-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | Remove unused headers. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | | microblaze: timer: Clear driver init functionMichal Simek2013-09-031-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use of_iomap - Use of_property_read_u32 - Fix printk Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | | microblaze: timer: Use CLKSRC_OF initializationMichal Simek2013-09-033-13/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify timer initialization and prepare the driver for moving to drivers/clocksource folder. Also remove system-timer property from binding because the name is too generic. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | | microblaze: intc: Remove unused headerMichal Simek2013-09-031-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | asm/irq.h is included in linux/irq.h asm/prom.h and linux/init.h is not needed Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | | microblaze: intc: Clean driver init functionMichal Simek2013-09-031-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use of_iomap - Use of_property_read_u32 - Fix printk Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | | microblaze: intc: Using irqchipMichal Simek2013-09-032-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move init_IRQ to irq.c - Use IRQCHIP_DECLARE macro Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | | microblaze: intc: Update headerMichal Simek2013-09-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Update dates in header and add Xilinx to it. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | | microblaze: intc: Remove unused headersMichal Simek2013-09-031-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | Trivial. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | | microblaze: Remove selfmodified featureMichal Simek2013-09-037-192/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was experimental feature which has never been widely used because it expects GCC behaviour. Also remove INTC_BASE and TIMER_BASE macros. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | | of/pci: Use of_pci_range_parserAndrew Murray2013-09-031-68/+38
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | This patch converts the pci_load_of_ranges function to use the new common of_pci_range_parser. Signed-off-by: Andrew Murray <amurray@embedded-bits.co.uk> Signed-off-by: Andrew Murray <Andrew.Murray@arm.com> Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* | | microblaze: remove undefined of_get_cpu_node declarationSudeep KarkadaNagesha2013-08-211-3/+0
|/ / | | | | | | | | | | | | | | | | | | | | | | This patch removes the declaration of the function 'of_get_cpu_node' which is not defined for microblaze. This is in preparation to move it's definition from PPC to DT common code. Michal Simek says: "it was just there because Microblaze was based on powerpc code" Acked-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
* | microblaze: fix clone syscallMichal Simek2013-08-131-1/+1
|/ | | | | | | | | | | | | | | | | | | | | Fix inadvertent breakage in the clone syscall ABI for Microblaze that was introduced in commit f3268edbe6fe ("microblaze: switch to generic fork/vfork/clone"). The Microblaze syscall ABI for clone takes the parent tid address in the 4th argument; the third argument slot is used for the stack size. The incorrectly-used CLONE_BACKWARDS type assigned parent tid to the 3rd slot. This commit restores the original ABI so that existing userspace libc code will work correctly. All kernel versions from v3.8-rc1 were affected. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblazeLinus Torvalds2013-07-104-4/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Pull microblaze update from Michal Simek: "This Microblaze merge window is quite minimal. I have also added to my branch one xilinx systemace sparse fix because haven't got any reply from block maintainer." * 'next' of git://git.monstr.eu/linux-2.6-microblaze: xilinx systemace: Fix sparse warnings microblaze: Move __NR_syscalls from uapi microblaze: Enable KGDB in defconfig microblaze: Don't mark arch_kgdb_ops as const.
| * microblaze: Move __NR_syscalls from uapiMichal Simek2013-07-102-2/+3
| | | | | | | | | | | | | | | | The reason is that other applications like strace think that every __NR_xx is syscall. Also __NR_syscalls is not used by user applications/libs. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * microblaze: Enable KGDB in defconfigMichal Simek2013-06-261-1/+3
| | | | | | | | | | | | | | Enable KGDB in defconfig to be sure that support is regularly compiled. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * microblaze: Don't mark arch_kgdb_ops as const.Graeme Smecher2013-06-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Other architectures don't do it, and it conflicts with the extern'd definition in include/linux/kgdb.h. The patch fails checkpatch but it reflects current functions declaration and solved compilation error. Signed-off-by: Graeme Smecher <gsmecher@threespeedlogic.com> CC: Michal Simek <monstr@monstr.eu> CC: linux-kernel@vger.kernel.org Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* | mm/microblaze: clean up unused VALID_PAGE()Jiang Liu2013-07-031-1/+0
| | | | | | | | | | | | | | | | | | VALID_PAGE() has been removed from kernel long time ago, so clean up it. Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Cc: Michal Simek <monstr@monstr.eu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | mm/microblaze: prepare for removing num_physpages and simplify mem_init()Jiang Liu2013-07-031-45/+6
| | | | | | | | | | | | | | | | | | Prepare for removing num_physpages and simplify mem_init(). Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Cc: Michal Simek <monstr@monstr.eu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | mm: concentrate modification of totalram_pages into the mm coreJiang Liu2013-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Concentrate code to modify totalram_pages into the mm core, so the arch memory initialized code doesn't need to take care of it. With these changes applied, only following functions from mm core modify global variable totalram_pages: free_bootmem_late(), free_all_bootmem(), free_all_bootmem_node(), adjust_managed_page_count(). With this patch applied, it will be much more easier for us to keep totalram_pages and zone->managed_pages in consistence. Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Acked-by: David Howells <dhowells@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: <sworddragon2@aol.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Chris Metcalf <cmetcalf@tilera.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: Jianguo Wu <wujianguo@huawei.com> Cc: Joonsoo Kim <js1304@gmail.com> Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Michel Lespinasse <walken@google.com> Cc: Minchan Kim <minchan@kernel.org> Cc: Rik van Riel <riel@redhat.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Tang Chen <tangchen@cn.fujitsu.com> Cc: Tejun Heo <tj@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Wen Congyang <wency@cn.fujitsu.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> Cc: Yinghai Lu <yinghai@kernel.org> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | mm: enhance free_reserved_area() to support poisoning memory with zeroJiang Liu2013-07-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Address more review comments from last round of code review. 1) Enhance free_reserved_area() to support poisoning freed memory with pattern '0'. This could be used to get rid of poison_init_mem() on ARM64. 2) A previous patch has disabled memory poison for initmem on s390 by mistake, so restore to the original behavior. 3) Remove redundant PAGE_ALIGN() when calling free_reserved_area(). Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: <sworddragon2@aol.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Chris Metcalf <cmetcalf@tilera.com> Cc: David Howells <dhowells@redhat.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: Jianguo Wu <wujianguo@huawei.com> Cc: Joonsoo Kim <js1304@gmail.com> Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Michel Lespinasse <walken@google.com> Cc: Minchan Kim <minchan@kernel.org> Cc: Rik van Riel <riel@redhat.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Tang Chen <tangchen@cn.fujitsu.com> Cc: Tejun Heo <tj@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Wen Congyang <wency@cn.fujitsu.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> Cc: Yinghai Lu <yinghai@kernel.org> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | mm: change signature of free_reserved_area() to fix building warningsJiang Liu2013-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change signature of free_reserved_area() according to Russell King's suggestion to fix following build warnings: arch/arm/mm/init.c: In function 'mem_init': arch/arm/mm/init.c:603:2: warning: passing argument 1 of 'free_reserved_area' makes integer from pointer without a cast [enabled by default] free_reserved_area(__va(PHYS_PFN_OFFSET), swapper_pg_dir, 0, NULL); ^ In file included from include/linux/mman.h:4:0, from arch/arm/mm/init.c:15: include/linux/mm.h:1301:22: note: expected 'long unsigned int' but argument is of type 'void *' extern unsigned long free_reserved_area(unsigned long start, unsigned long end, mm/page_alloc.c: In function 'free_reserved_area': >> mm/page_alloc.c:5134:3: warning: passing argument 1 of 'virt_to_phys' makes pointer from integer without a cast [enabled by default] In file included from arch/mips/include/asm/page.h:49:0, from include/linux/mmzone.h:20, from include/linux/gfp.h:4, from include/linux/mm.h:8, from mm/page_alloc.c:18: arch/mips/include/asm/io.h:119:29: note: expected 'const volatile void *' but argument is of type 'long unsigned int' mm/page_alloc.c: In function 'free_area_init_nodes': mm/page_alloc.c:5030:34: warning: array subscript is below array bounds [-Warray-bounds] Also address some minor code review comments. Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Reported-by: Arnd Bergmann <arnd@arndb.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: <sworddragon2@aol.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Chris Metcalf <cmetcalf@tilera.com> Cc: David Howells <dhowells@redhat.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: Jianguo Wu <wujianguo@huawei.com> Cc: Joonsoo Kim <js1304@gmail.com> Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Michel Lespinasse <walken@google.com> Cc: Minchan Kim <minchan@kernel.org> Cc: Rik van Riel <riel@redhat.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Tang Chen <tangchen@cn.fujitsu.com> Cc: Tejun Heo <tj@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Wen Congyang <wency@cn.fujitsu.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> Cc: Yinghai Lu <yinghai@kernel.org> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge branch 'sched-mm-for-linus' of ↵Linus Torvalds2013-07-021-3/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull voluntary preemption fixes from Ingo Molnar: "This tree contains a speedup which is achieved through better might_sleep()/might_fault() preemption point annotations for uaccess functions, by Michael S Tsirkin: 1. The only reason uaccess routines might sleep is if they fault. Make this explicit for all architectures. 2. A voluntary preemption point in uaccess functions means compiler can't inline them efficiently, this breaks assumptions that they are very fast and small that e.g. net code seems to make. Remove this preemption point so behaviour matches with what callers assume. 3. Accesses (e.g through socket ops) to kernel memory with KERNEL_DS like net/sunrpc does will never sleep. Remove an unconditinal might_sleep() in the might_fault() inline in kernel.h (used when PROVE_LOCKING is not set). 4. Accesses with pagefault_disable() return EFAULT but won't cause caller to sleep. Check for that and thus avoid might_sleep() when PROVE_LOCKING is set. These changes offer a nice speedup for CONFIG_PREEMPT_VOLUNTARY=y kernels, here's a network bandwidth measurement between a virtual machine and the host: before: incoming: 7122.77 Mb/s outgoing: 8480.37 Mb/s after: incoming: 8619.24 Mb/s [ +21.0% ] outgoing: 9455.42 Mb/s [ +11.5% ] I kept these changes in a separate tree, separate from scheduler changes, because it's a mixed MM and scheduler topic" * 'sched-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: mm, sched: Allow uaccess in atomic with pagefault_disable() mm, sched: Drop voluntary schedule from might_fault() x86: uaccess s/might_sleep/might_fault/ tile: uaccess s/might_sleep/might_fault/ powerpc: uaccess s/might_sleep/might_fault/ mn10300: uaccess s/might_sleep/might_fault/ microblaze: uaccess s/might_sleep/might_fault/ m32r: uaccess s/might_sleep/might_fault/ frv: uaccess s/might_sleep/might_fault/ arm64: uaccess s/might_sleep/might_fault/ asm-generic: uaccess s/might_sleep/might_fault/
| * | microblaze: uaccess s/might_sleep/might_fault/Michael S. Tsirkin2013-05-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only reason uaccess routines might sleep is if they fault. Make this explicit. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1369577426-26721-5-git-send-email-mst@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
* | | consolidate io_remap_pfn_range definitionsAl Viro2013-06-291-3/+0
| |/ |/| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | microblaze: Use static inline functions in cacheflush.hMichal Simek2013-06-031-16/+18
| | | | | | | | | | | | | | | | | | | | | | Using static inline functions ensure proper type checking which also remove compilation warning for no MMU Compilation warning: arch/microblaze/include/asm/cacheflush.h: warning: 'addr' may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* | microblaze: Fix sparse warningsMichal Simek2013-06-031-2/+2
| | | | | | | | | | | | | | | | | | arch/microblaze/include/asm/uaccess.h:101:3: warning: cast removes address space of expression arch/microblaze/include/asm/uaccess.h:107:2: warning: cast removes address space of expression Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* | microblaze: Reversed logic in futex cmpxchgMeyer, Kirk2013-05-271-1/+1
| | | | | | | | | | | | | | | | | | futex_atomic_cmpxchg_inatomic exchanged if the values were unequal rather than equal. This caused incorrect behavior of robust futexes. Signed-off-by: Kirk Meyer <kirk.meyer@sencore.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* | microblaze: Use proper casting for inb/inw/inl in io.hMichal Simek2013-05-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | We are going to move to asm-generic/io.h but let's fix compilation warnings first for 3.10. Warning message: arch/microblaze/include/asm/io.h:126:26: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define inb(port) readb((u8 *)((port))) ... Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* | microblaze: Initialize temp variable to remove compilation warningMichal Simek2013-05-141-1/+1
|/ | | | | | | | Compilation warning: arch/microblaze/kernel/cpu/cache.c:148:2: warning: 'temp' is used uninitialized in this function [-Wuninitialized] Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblazeLinus Torvalds2013-05-109-29/+46
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull microblaze updates from Michal Simek. * 'next' of git://git.monstr.eu/linux-2.6-microblaze: microblaze: Enable IRQ in arch_cpu_idle microblaze: Fix uaccess_ok macro microblaze: Add support for new cpu versions and target architecture microblaze: Do not select OPT_LIB_ASM by default microblaze: Fix initrd support microblaze: Do not use r6 in head.S microblaze: pci: Remove duplicated header microblaze: Set the default irq_domain microblaze: pci: Remove duplicated include from pci-common.c
| * microblaze: Enable IRQ in arch_cpu_idleMichal Simek2013-05-091-0/+5
| | | | | | | | | | | | | | | | | | | | Microblaze requires to enable IRQ in cpu_idle loop. It should be the part of this patch: "microblaze: Use generic idle loop" (sha1: e962bb9e9cf73b8c8893c95903e791dd5ec19fb4) Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * microblaze: Fix uaccess_ok macroMichal Simek2013-05-091-11/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix access_ok macro no to permit case where user will try to access the last address space which is equal to segment address. Example: segment addr = 0xbfff ffff address = 0xbfff fff0 size = 0x10 Current wrong implementation 0xbfff ffff >= (0xbfff fff0 | 0x10 | (0xbfff fff0 + 0x10)) 0xbfff ffff >= (0xbfff fff0 | 0xc000 0000) 0xbfff ffff >= 0xf000 0000 return 0 which is access failed even the combination is valid. because get_fs().seq returns the last valid address. This patch fix this problem. Size equals to zero is valid access. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * microblaze: Add support for new cpu versions and target architectureMichal Simek2013-05-091-0/+5
| | | | | | | | | | | | Update PVR values based on reference manual. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * microblaze: Do not select OPT_LIB_ASM by defaultMichal Simek2013-05-091-1/+0
| | | | | | | | | | | | This option is valid only for BE systems. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * microblaze: Fix initrd supportMichal Simek2013-05-091-4/+5
| | | | | | | | | | | | Initrd/ramdisk support has been never validated. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * microblaze: Do not use r6 in head.SMichal Simek2013-05-091-10/+10
| | | | | | | | | | | | | | r6 stores pointer to ramdisk and shouldn't be used before it is passed to machine_early_init. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * microblaze: pci: Remove duplicated headerMichal Simek2013-05-091-2/+0
| | | | | | | | | | | | Remove duplicated header. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * microblaze: Set the default irq_domainDan Christensen2013-05-091-0/+2
| | | | | | | | | | | | | | | | | | Register the irq_domain created during initialization as the default so that device drivers can pass NULL to irq_create_mapping and get a virtual irq to pass to request_irq. Signed-off-by: Dan Christensen <opello@opello.org> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
OpenPOWER on IntegriCloud