aboutsummaryrefslogtreecommitdiff
path: root/arch
AgeCommit message (Collapse)AuthorFilesLines
2012-04-02ARM: mach-msm: fix compile fail from system.h falloutPaul Gortmaker1-0/+1
To fix: In file included from arm/boot/compressed/misc.c:28:0: arm/mach-msm/include/mach/uncompress.h: In function 'putc': arch/arm/mach-msm/include/mach/uncompress.h:48:3: error: implicit declaration of function 'smp_mb' [-Werror=implicit-function-declaration] The putc does a cpu_relax which for this platform is smp_mb. Bisect indicates the 1st failing commit as: 0195c00244dc ("Merge tag 'split-asm_system_h...") Signed-off-by: Paul Gortmaker <[email protected]> Acked-by: David Howells <[email protected]> Acked-by: David Brown <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-04-02Merge branch 'merge' of ↵Linus Torvalds31-50/+699
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc Pull powerpc fixes from Benjamin Herrenschmidt: "This contains a couple more fixes for the system.h disintegration, a trivial section mismatch fix, a couple of patches from akpm that I didn't quite get he expected me to pickup, and a few more trivialities form Kumar that he appear to have forgotten to send me in the previous batch." * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: powerpc/eeh: Fix use of set_current_state() in eeh event handling set_current_state() wart powerpc/eeh: Remove eeh_event_handler()->daemonize() powerpc/kvm: Fallout from system.h disintegration powerpc: Fix fallout from system.h split up powerpc: Mark const init data with __initconst instead of __initdata powerpc/qe: Update the SNUM table for MPC8569 Rev2.0 powerpc/dts: Removed fsl,msi property from dts. powerpc/epapr: add "memory" as a clobber to all hypercalls powerpc/85xx: Enable I2C_CHARDEV and I2C_MPC options in defconfigs powerpc/85xx: add the P1020UTM-PC DTS support powerpc/85xx: add the P1020MBG-PC DTS support powerpc/8xxx: remove 85xx/86xx restrictions from fsl_guts.h
2012-04-02arch/tile: avoid accidentally unmasking NMI-type interrupt accidentallyChris Metcalf2-7/+36
The return path as we reload registers and core state requires that r30 hold a boolean indicating whether we are returning from an NMI, but in a couple of cases we weren't setting this properly, with the result that we could accidentally unmask the NMI interrupt(s), which could cause confusion. Now we set r30 in every place where we jump into the interrupt return path. Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile: remove bogus performance optimizationChris Metcalf1-5/+0
We were re-homing the initial task's kernel stack on the boot cpu, but in fact it's better to let it stay globally homed, since that task isn't bound to the boot cpu anyway. This is more of a general cleanup than an actual performance optimization, but it removes code, which is a good thing. :-) Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile: return SIGBUS for addresses that are unaligned AND invalidChris Metcalf1-12/+19
Previously we were returning SIGSEGV in this case. It seems cleaner to return SIGBUS since the hardware figures out alignment traps before TLB violations, so SIGBUS is the "more correct" signal. Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile: fix finv_buffer_remote() for tilegxChris Metcalf1-2/+26
There were some correctness issues with this code that are now fixed with this change. The change is likely less performant than it could be, but it should no longer be vulnerable to any races with memory operations on the memory network while invalidating a range of memory. This code is run infrequently so performance isn't critical, but correctness definitely is. Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile: use atomic exchange in arch_write_unlock()Chris Metcalf1-1/+1
This idiom is used elsewhere when we do an unlock by writing a zero, but I missed it here. Using an atomic operation avoids waiting on the write buffer for the unlocking write to be sent to the home cache. Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile: stop mentioning the "kvm" subdirectoryChris Metcalf1-2/+0
It causes "make clean" to fail, for example. Once we have KVM support complete, we'll reinstate the subdir reference. Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile: export the page_home() function.Chris Metcalf1-0/+1
This avois a bug in modules trying to use the function. Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile: fix pointer cast in cacheflush.cChris Metcalf1-1/+1
Pragmatically it couldn't be wrong to cast pointers to long to compare them (since all kernel addresses are in the top half of VA space), but it's more correct to cast to unsigned long. Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile: fix single-stepping over swint1 instructions on tilegxChris Metcalf1-3/+18
If we are single-stepping and make a syscall, we call ptrace_notify() explicitly on the return path back to user space, since we are returning to a pc value set artificially to the next instruction, and otherwise we won't register that we stepped over the syscall instruction (swint1). Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile: implement panic_smp_self_stop()Chris Metcalf1-0/+6
This allows the later-panicking tiles to wait in a lower power state until they get interrupted with an smp_send_stop(). Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile: add "nop" after "nap" to help GX idle power drawChris Metcalf2-1/+3
This avoids the hardware istream prefetcher doing unnecessary work. Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile: use proper memparse() for "maxmem" optionsChris Metcalf1-9/+8
This is more standard and avoids having to remember what units the options actually take. Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile: fix up locking in pgtable.c slightlyChris Metcalf1-10/+12
We should be holding the init_mm.page_table_lock in shatter_huge_page() since we are modifying the kernel page tables. Then, only if we are walking the other root page tables to update them, do we want to take the pgd_lock. Add a comment about taking the pgd_lock that we always do it with interrupts disabled and therefore are not at risk from the tlbflush IPI deadlock as is seen on x86. Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile: don't leak kernel memory when we unload modulesChris Metcalf1-0/+2
We were failing to track the memory when we allocated it. Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile: fix bug in delay_backoff()Chris Metcalf1-1/+1
We were carefully computing a value to use for the number of loops to spin for, and then ignoring it. Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile: fix bug in loading kernels larger than 16 MBChris Metcalf1-6/+15
Previously we only handled kernels up to a single huge page in size. Now we create additional PTEs appropriately. Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile: don't enable irqs unconditionally in page fault handlerChris Metcalf1-2/+5
If we took a page fault while we had interrupts disabled, we shouldn't enable them in the page fault handler. Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile: don't set the homecache of a PTE unless appropriateChris Metcalf1-4/+12
We make sure not to try to set the home for an MMIO PTE (on tilegx) or a PTE that isn't referencing memory managed by Linux. Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile: don't wait for migrating PTEs in an NMI handlerChris Metcalf1-3/+10
Doing so raises the possibility of self-deadlock if we are waiting for a backtrace for an oprofile or perf interrupt while we are in the middle of migrating our own stack page. Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile/Makefile: use KCFLAGS when figuring out the libgcc path.Chris Metcalf1-1/+2
Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile: fix a couple of comments that needed updatingChris Metcalf2-3/+10
Not associated with any code changes, so I'm just lumping these comment changes into a commit by themselves. Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile: fix up some minor trap handling issuesChris Metcalf2-3/+8
We now respond to MEM_ERROR traps (e.g. an atomic instruction to non-cacheable memory) with a SIGBUS. We also no longer generate a console crash message if a user process die due to a SIGTRAP. Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile: work around a hardware issue with the return-address stackChris Metcalf3-2/+22
In certain circumstances we need to do a bunch of jump-and-link instructions to fill the hardware return-address stack with nonzero values. Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile: various bugs in stack backtracerChris Metcalf2-120/+112
Fix a long-standing bug in the stack backtracer where we would print garbage to the console instead of kernel function names, if the kernel wasn't built with symbol support (e.g. mboot). Make sure to tag every line of userspace backtrace output if we actually have the mmap_sem, since that way if there's no tag, we know that it's because we couldn't trylock the semaphore. Stop doing a TLB flush and examining page tables during backtrace. Instead, just trust that __copy_from_user_inatomic() will properly fault and return a failure, which it should do in all cases. Fix a latent bug where the backtracer would directly examine a signal context in user space, rather than copying it safely to kernel memory first. This meant that a race with another thread could potentially have caused a kernel panic. Guard against unaligned sp when trying to restart backtrace at an interrupt or signal handler point in the kernel backtracer. Report kernel symbolic information for the call instruction rather than for the following instruction. We still report the actual numeric address corresponding to the instruction after the call, for the sake of consistency with the normal expectations for stack backtracers. Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile: make sure to build memcpy_user_64 without frame pointerChris Metcalf2-1/+8
Add a comment explaining why this is important, and add a CFLAGS_REMOVE clause to the Makefile to make sure it happens. Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile: avoid false corrupt frame warning in early bootChris Metcalf1-1/+1
With lockstat we can end up trying to get a backtrace before "high_memory" is initialized, so don't worry about range testing if it is zero. Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile: use 0 for IRQ_RESCHEDULE instead of 1Chris Metcalf1-1/+1
This avoids assigning IRQ 0 to PCI devices, because we've seen that doesn't always work well. Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile: fix gcc 4.6 warnings in <asm/bitops_64.h>Chris Metcalf1-4/+4
Fix some signedness and variable usage warnings in change_bit() and test_and_change_bit(). Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile: revert comment for atomic64_add_unless().Chris Metcalf1-1/+1
It still returns whether @v was not @u, not the old value, unlike __atomic_add_unless(). Signed-off-by: Chris Metcalf <[email protected]> Acked-by: Arun Sharma <[email protected]>
2012-04-02arch/tile: fix typo in <arch/spr_def.h>Chris Metcalf1-2/+2
We aren't yet using this definition in the kernel, but fix it up before someone goes looking for it. Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile/Kconfig: don't specify CONFIG_PAGE_OFFSET for 64-bit buildsChris Metcalf1-0/+1
It's fixed at half the VA space and there's no point in configuring it. Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile/Kconfig: rename tile_defconfig to tilepro_defconfigChris Metcalf1-1/+4
We switched to using "tilepro" for the 32-bit stuff a while ago, but missed this one usage. Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02arch/tile/Kconfig: remove pointless "!M386" test.Chris Metcalf1-1/+1
Looks like a cut and paste bug from the x86 version. Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02tile: fix multiple build failures from system.h dismantlePaul Gortmaker4-48/+77
Commit bd119c69239322caafdb64517a806037d0d0c70a "Disintegrate asm/system.h for Tile" created the asm/switch_to.h file, but did not add an include of it to all its users. Also, commit b4816afa3986704d1404fc48e931da5135820472 "Move the asm-generic/system.h xchg() implementation to asm-generic/cmpxchg.h" introduced the concept of asm/cmpxchg.h but the tile arch never got one. Fork the cmpxchg content out of the asm/atomic.h file to create one. Acked-by: David Howells <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]> Signed-off-by: Chris Metcalf <[email protected]>
2012-04-02Merge tag 'for-linus' of git://github.com/rustyrussell/linuxLinus Torvalds22-64/+59
Pull cpumask cleanups from Rusty Russell: "(Somehow forgot to send this out; it's been sitting in linux-next, and if you don't want it, it can sit there another cycle)" I'm a sucker for things that actually delete lines of code. Fix up trivial conflict in arch/arm/kernel/kprobes.c, where Rusty fixed a user of &cpu_online_map to be cpu_online_mask, but that code got deleted by commit b21d55e98ac2 ("ARM: 7332/1: extract out code patch function from kprobes"). * tag 'for-linus' of git://github.com/rustyrussell/linux: cpumask: remove old cpu_*_map. documentation: remove references to cpu_*_map. drivers/cpufreq/db8500-cpufreq: remove references to cpu_*_map. remove references to cpu_*_map in arch/
2012-04-02ARM: armadillo5x0: Fix smsc911x driver probeFabio Estevam1-0/+9
Fix smsc911x driver probe by adding a fixed dummy regulator. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Sascha Hauer <[email protected]>
2012-04-02ARM: kzm_arm11_01: Fix smsc911x driver probeFabio Estevam1-0/+9
Fix smsc911x driver probe by adding a fixed dummy regulator. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Sascha Hauer <[email protected]>
2012-04-02ARM: mx31lilly: Fix smsc911x driver probeFabio Estevam1-0/+9
Fix smsc911x driver probe by adding a fixed dummy regulator. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Sascha Hauer <[email protected]>
2012-04-02ARM: mx31lite: Fix smsc911x driver probeFabio Estevam1-0/+9
Fix smsc911x driver probe by adding a fixed dummy regulator. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Sascha Hauer <[email protected]>
2012-04-02ARM: mx53ard: Fix smsc911x driver probeFabio Estevam1-0/+8
Fix smsc911x driver probe by adding a fixed dummy regulator. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Sascha Hauer <[email protected]>
2012-04-02x86, kvm: Call restore_sched_clock_state() only after %gs is initializedMarcelo Tosatti1-1/+1
s2ram broke due to this KVM commit: b74f05d61b73 x86: kvmclock: abstract save/restore sched_clock_state restore_sched_clock_state() methods use percpu data, therefore they must run after %gs is initialized, but before mtrr_bp_restore() (due to lockstat using sched_clock). Move it to the correct place. Reported-and-tested-by: Konstantin Khlebnikov <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]> Cc: Avi Kivity <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2012-04-02microblaze: Fix ret_from_fork declarationMichal Simek1-2/+2
ret_from_fork is used by noMMU system too. It should be the part of patch "Disintegrate asm/system.h for Microblaze" (sha1: c40d04df152a1111c5bbcb632278394dabd2b73d) Signed-off-by: Michal Simek <[email protected]>
2012-04-02microblaze: Do not use tlb_skip in early_printkMichal Simek1-0/+2
tlb_skip is valid only for MMU system. Signed-off-by: Michal Simek <[email protected]>
2012-04-02ARM: at91/at91sam9x5: add clkdev entries for DMA controllersNicolas Ferre1-0/+2
Signed-off-by: Nicolas Ferre <[email protected]> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
2012-04-02ARM: mx35: Fix registration of camera clockFabio Estevam1-1/+1
Fix registration of camera clock so that mx3-camera driver can get its clock correctly. Reported-by: Alex Gershgorin <[email protected]> Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Sascha Hauer <[email protected]>
2012-04-02ARM: 3ds_debugboard: Fix smsc911x driver probeFabio Estevam1-1/+1
Fix smsc911x id field in order to fix smsc911x driver probe error: smsc911x smsc911x.0: Failed to get supply 'vdd33a': -517 smsc911x smsc911x.0: (unregistered net_device): couldn't get regulators -517 platform smsc911x.0: Driver smsc911x requests probe deferral Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Sascha Hauer <[email protected]>
2012-04-02MX2: Fix mx2_camera clock regression.Javier Martin1-0/+1
The following patch breaks mx2_camera driver: http://git.linuxtv.org/media_tree.git?a=commitdiff;h=52f1a845e25dc0c6435153aca1a170e20b282429 This change fixes the problem. Signed-off-by: Javier Martin <[email protected]> Signed-off-by: Sascha Hauer <[email protected]>
2012-04-02ARM: mach-mx35_3ds: Fix build warning due to the lack of 'const' annotationFabio Estevam1-1/+1
Fix the following build warning: arch/arm/mach-imx/mach-mx35_3ds.c: In function 'mx35_3ds_lcd_set_power': arch/arm/mach-imx/mach-mx35_3ds.c:112: warning: passing argument 2 of 'gpiochip_find' from incompatible pointer type include/asm-generic/gpio.h:145: note: expected 'int (*)(struct gpio_chip *, const void *)' but argument is of type 'int (*)(struct gpio_chip *, void *)' Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Sascha Hauer <[email protected]>