aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-05-09MIPS: Add new GIC clockevent driver.Raghu Gandham8-2/+163
Add new clockevent driver that uses the counter present on the MIPS Global Interrupt Controller. Signed-off-by: Raghu Gandham <[email protected]> Signed-off-by: Steven J. Hill <[email protected]>
2013-05-09MIPS: Formatting clean-ups for clocksources.Steven J. Hill3-10/+2
Various whitespace and #ifdef removals for GIC and R4K clocksources. Signed-off-by: Steven J. Hill <[email protected]>
2013-05-09MIPS: Refactor GIC clocksource code.Steven J. Hill6-25/+48
Reorganize some of the GIC clocksource driver code. Below is a list of the various changes. * No longer select CSRC_GIC by default for Malta platform. * Limit choice for either the GIC or R4K clocksource, not both. * Change location in Makefile. * Created new 'gic_read_count' function in common 'irq-gic.c' file. * Change 'git_hpt_read' function in 'csrc-gic.c' to use new function. * Surround GIC specific code in Malta platform code with #ifdef's. * Only initialize the GIC clocksource if it was selected. Original code called it unconditionally if a GIC was found. Signed-off-by: Steven J. Hill <[email protected]>
2013-05-09MIPS: Move 'gic_frequency' to common location.Steven J. Hill3-1/+2
Move the global variable 'gic_frequency' to be defined in the file 'arch/mips/kernel/irq-gic.c' instead of defining it individually for each platform making use of the GIC. Also change the type to be an unsigned integer instead of signed. Signed-off-by: Steven J. Hill <[email protected]>
2013-05-09MIPS: Move 'gic_present' to common location.Steven J. Hill5-5/+3
Move the global variable 'gic_present' to be defined in the file 'arch/mips/kernel/irq-gic.c' instead of defining it individually for each platform making use of the GIC. Also change the type to be an unsigned integer instead of signed. Signed-off-by: Steven J. Hill <[email protected]>
2013-05-09MIPS: MIPS16e: Add unaligned access support.Steven J. Hill1-0/+255
Add logic needed to handle unaligned accesses in MIPS16e mode. Signed-off-by: Steven J. Hill <[email protected]> Signed-off-by: Leonid Yegoshin <[email protected]>
2013-05-09MIPS: MIPS16e: Support handling of delay slots.Steven J. Hill3-5/+119
Add logic needed to properly calculate exceptions for delay slots when in MIPS16e mode. Signed-off-by: Steven J. Hill <[email protected]>
2013-05-09MIPS: MIPS16e: Add instruction formats.Steven J. Hill1-0/+110
Add structures for all the MIPS16e instructions. Also add the enumerations for all the bit fields for opcodes, functions, etc. Signed-off-by: Steven J. Hill <[email protected]>
2013-05-09MIPS: microMIPS: Optimise 'strnlen' core library function.Steven J. Hill1-1/+1
Optimise 'strnlen' to use microMIPS instructions and/or optimisations for binary size reduction. When the microMIPS ISA is not being used, the library function compiles to the original binary code. Signed-off-by: Steven J. Hill <[email protected]>
2013-05-09MIPS: microMIPS: Optimise 'strlen' core library function.Steven J. Hill1-4/+5
Optimise 'strlen' to use microMIPS instructions and/or optimisations for binary size reduction. When the microMIPS ISA is not being used, the library function compiles to the original binary code. Signed-off-by: Steven J. Hill <[email protected]>
2013-05-09MIPS: microMIPS: Optimise 'strncpy' core library function.Steven J. Hill1-15/+17
Optimise 'strncpy' to use microMIPS instructions and/or optimisations for binary size reduction. When the microMIPS ISA is not being used, the library function compiles to the original binary code. Signed-off-by: Steven J. Hill <[email protected]>
2013-05-09MIPS: microMIPS: Optimise 'memset' core library function.Steven J. Hill2-30/+56
Optimise 'memset' to use microMIPS instructions and/or optimisations for binary size reduction. When the microMIPS ISA is not being used, the library function compiles to the original binary code. Signed-off-by: Steven J. Hill <[email protected]>
2013-05-09MIPS: microMIPS: Add configuration option for microMIPS kernel.Steven J. Hill5-3/+134
This adds the option to build the Linux kernel using only the microMIPS ISA. The resulting kernel binary is, at a minimum, 20% smaller than using the MIPS32R2 ISA. Signed-off-by: Steven J. Hill <[email protected]>
2013-05-09MIPS: microMIPS: Disable LL/SC and fix linker bug.Steven J. Hill2-2/+16
Partially revert commit e0c14a260d66ba35935600d6435940a566fe806b and turn off LL/SC when building a pure microMIPS kernel. This is a temporary fix until the cmpxchg assembly macro functions are re-written to not use the HI/LO registers in address calculations. Also add .insn in selected user access functions which would otherwise produce ISA mode jump incompatibilities. This is also a temporary fix. Signed-off-by: Steven J. Hill <[email protected]>
2013-05-09MIPS: microMIPS: Add vdso support.Douglas Leung1-0/+9
Support vdso in microMIPS mode. Signed-off-by: Douglas Leung <[email protected]> Signed-off-by: Steven J. Hill <[email protected]>
2013-05-09MIPS: microMIPS: Add unaligned access support.Leonid Yegoshin2-201/+1112
Add logic needed to handle unaligned accesses in microMIPS mode. Signed-off-by: Steven J. Hill <[email protected]> Signed-off-by: Leonid Yegoshin <[email protected]>
2013-05-09MIPS: microMIPS: Support handling of delay slots.Leonid Yegoshin2-5/+102
Add logic needed to properly calculate exceptions for delay slots when in microMIPS mode. Signed-off-by: Leonid Yegoshin <[email protected]> Signed-off-by: Steven J. Hill <[email protected]>
2013-05-09MIPS: microMIPS: Add support for exception handling.Steven J. Hill9-107/+353
All exceptions must be taken in microMIPS mode, never in classic MIPS mode or the kernel falls apart. A few NOP instructions are used to maintain the correct alignment of microMIPS versions of the exception vectors. Signed-off-by: Steven J. Hill <[email protected]>
2013-05-09MIPS: microMIPS: Floating point support.Leonid Yegoshin7-100/+893
Add logic needed to do floating point emulation in microMIPS mode. Signed-off-by: Leonid Yegoshin <[email protected]> Signed-off-by: Steven J. Hill <Steven. [email protected]>
2013-05-09MIPS: microMIPS: Fix macro naming in micro-assembler.Steven J. Hill2-2/+25
The macros did not properly take into account the ISA that the kernel was being compiled with. A classic MIPS kernel will have the standard 'uasm_i_##op' macro functions with 'MM_uasm_i_##op' macro functions for the microMIPS version. A pure microMIPS kernel will have the standard macros with 'CL_uasm_i_##op' macro functions for the classic version. Signed-off-by: Steven J. Hill <[email protected]>
2013-05-09MIPS: microMIPS: Fix incorrect mask for jump immediate.Steven J. Hill1-1/+2
Jump or branch target addresses have the first bit set. The original mask did not take this into account and will cause a field overflow warning for the target address when a jump immediate instruction is built. Signed-off-by: Steven J. Hill <[email protected]>
2013-05-08MIPS: microMIPS: Support dynamic ASID sizing.Steven J. Hill1-2/+32
Changes for pure microMIPS cores to dynamically determine the ASID size at boot time. Includes bug fix https://patchwork.linux-mips.org/patch/5230/ Signed-off-by: Steven J. Hill <[email protected]> Signed-off-by: Jonas Gorski <[email protected]>
2013-05-08MIPS: Allow ASID size to be determined at boot time.Steven J. Hill10-61/+137
Original patch by Ralf Baechle and removed by Harold Koerfgen with commit f67e4ffc79905482c3b9b8c8dd65197bac7eb508. This allows for more generic kernels since the size of the ASID and corresponding masks can be determined at run-time. This patch is also required for the new Aptiv cores and has been tested on Malta and Malta Aptiv platforms. [[email protected]: Added relevant part of fix https://patchwork.linux-mips.org/patch/5213/] Signed-off-by: Steven J. Hill <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2013-05-08MIPS: FW: malta: Code formatting clean-ups.Steven J. Hill4-88/+64
Clean-up code according to the 'checkpatch.pl' script. Signed-off-by: Steven J. Hill <[email protected]>
2013-05-08MIPS: FW: Remove obsolete header file for MTI platforms.Steven J. Hill14-61/+4
Remove 'arch/mips/include/asm/mips-boards/prom.h' and get rid of all inclusions of it by Malta and SEAD-3 platforms. [[email protected]: Fold in John Crispin <[email protected]>'s "MIPS: ar7 powertv build"]. [[email protected]: Fold in John Crispin <[email protected]>'s "MIPS: unbreak powertv build"]. [[email protected]: Test. Build. Your. Fscking. Code. Or...] Signed-off-by: Steven J. Hill <[email protected]>
2013-05-08MIPS: FW: malta: Use new common FW library variable processing.Steven J. Hill5-199/+28
Remove old YAMON prom code and use common firmware library code. Signed-off-by: Steven J. Hill <[email protected]>
2013-05-08MIPS: FW: sead3: Use new common FW library variable processing.Steven J. Hill4-86/+51
Remove old YAMON prom code and use common firmware library code. Signed-off-by: Steven J. Hill <[email protected]>
2013-05-08MIPS: FW: Add environment variable processing.Steven J. Hill3-0/+150
Add parsing of the environment and command line variables passed to the kernel to the firmware library. Signed-off-by: Steven J. Hill <[email protected]>
2013-05-08MIPS: Add declarations to MIPS Technologies Inc. generic header.Steven J. Hill1-0/+3
Add declaration of 'mips_scroll_message' and 'mips_display_message' to the common generic header file for the MIPS Technologies Inc. development boards. Signed-off-by: Steven J. Hill <[email protected]>
2013-05-08MIPS: sead3: Use generic suspend/resume for LEDs.Lars-Peter Clausen1-22/+2
Setting the LED_CORE_SUSPENDRESUME flag causes the LED driver core to call led_classdev_suspend/led_classdev_resume during suspend/resume. Since this is exactly what the driver's custom suspend/resume callbacks do we can replace them by setting the LED_CORE_SUSPENDRESUME flag. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Steven J. Hill <[email protected]>
2013-05-01MIPS: Add option to disable software I/O coherency.Steven J. Hill7-24/+112
Some MIPS controllers have hardware I/O coherency. This patch detects those and turns off software coherency. A new kernel command line option also allows the user to manually turn software coherency on or off. Signed-off-by: Steven J. Hill <[email protected]>
2013-05-01MIPS: malta: Add new Malta config files.Steven J. Hill5-57/+796
Add in new Malta config files for SMVP, SMTC, and APRP. Also update the original 'malta_defconfig' config file. Signed-off-by: Steven J. Hill <[email protected]>
2013-05-01MIPS: microMIPS: Add instruction utility macros.Steven J. Hill1-0/+18
Add two new macros for microMIPS. One checks if an exception was taken in either microMIPS or classic MIPS mode. The other checks if a microMIPS instruction is 16-bit or 32-bit in length. [[email protected]: Removed unnecessary parenthesis as noted by Sergei Shtylyov <[email protected]>] Signed-off-by: Steven J. Hill <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: Sergei Shtylyov <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/4924/ Signed-off-by: Ralf Baechle <[email protected]> (cherry picked from commit 49df26472338b935fd5781bf94a77a88b148a716)
2013-05-01MIPS: microMIPS: uasm: Add microMIPS micro assembler support.Steven J. Hill4-0/+230
Add new file 'uasm-micromips.c' that allows the micro assembler to generate microMIPS ISA code. It can be included in the kernel alongside the classic ISA as long as the platform supports the microMIPS ISA. Signed-off-by: Steven J. Hill <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/4923/ Signed-off-by: Ralf Baechle <[email protected]> (cherry picked from commit 5f011a866afbd03a5379f67f4e70e5efbdfc16e9)
2013-05-01MIPS: microMIPS: uasm: Split 'uasm.c' into two files.Steven J. Hill4-273/+313
Split 'uasm.c' into two files. The new file 'uasm-mips.c' has the functions specific to the classic MIPS ISA. The 'uasm.c' file contains common code that can be used by classic or other ISAs that could be supported by the kernel. Signed-off-by: Steven J. Hill <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/4922/ Signed-off-by: Ralf Baechle <[email protected]> (cherry picked from commit 0961103562ab958fa74f35043bf4f72e51ed6155)
2013-05-01MIPS: microMIPS: Add instruction formats.Steven J. Hill1-0/+449
Add structures for all the microMIPS instructions. Also add the enumerations for all the bit fields for opcodes, functions, etc. Signed-off-by: Steven J. Hill <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/4921/ Signed-off-by: Ralf Baechle <[email protected]> (cherry picked from commit d7f19e43a4337d4d40ff5e241172912130d06a4c)
2013-04-14Linux 3.9-rc7Linus Torvalds1-1/+1
2013-04-14Merge branch 'x86-urgent-for-linus' of ↵Linus Torvalds8-21/+33
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Misc fixes" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm: Flush lazy MMU when DEBUG_PAGEALLOC is set x86/mm/cpa/selftest: Fix false positive in CPA self test x86/mm/cpa: Convert noop to functional fix x86, mm: Patch out arch_flush_lazy_mmu_mode() when running on bare metal x86, mm, paravirt: Fix vmalloc_fault oops during lazy MMU updates
2013-04-14Merge branch 'sched-urgent-for-linus' of ↵Linus Torvalds3-4/+32
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: "Misc fixlets" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/cputime: Fix accounting on multi-threaded processes sched/debug: Fix sd->*_idx limit range avoiding overflow sched_clock: Prevent 64bit inatomicity on 32bit systems sched: Convert BUG_ON()s in try_to_wake_up_local() to WARN_ON_ONCE()s
2013-04-14Merge branch 'perf-urgent-for-linus' of ↵Linus Torvalds6-11/+28
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "Misc fixlets" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf: Fix error return code ftrace: Fix strncpy() use, use strlcpy() instead of strncpy() perf: Fix strncpy() use, use strlcpy() instead of strncpy() perf: Fix strncpy() use, always make sure it's NUL terminated perf: Fix ring_buffer perf_output_space() boundary calculation perf/x86: Fix uninitialized pt_regs in intel_pmu_drain_bts_buffer()
2013-04-14Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds2-3/+9
Pull drm fixes from Dave Airlie: "One fix for a hotplug locking regressions, and one fix for an oops if you unplug the monitor at an inopportune moment on the udl device." * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/fb-helper: Fix locking in drm_fb_helper_hotplug_event udl: handle EDID failure properly.
2013-04-14Merge branch 'for-linus' of ↵Linus Torvalds1-0/+20
git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68knommu fix from Greg Ungerer: "This contains only a single compilation fix for ColdFire m68k targets that use local non-GPIOLIB support." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k: define a local gpio_request_one() function
2013-04-14Merge git://www.linux-watchdog.org/linux-watchdogLinus Torvalds1-1/+1
Pull watchdog fix from Wim Van Sebroeck: "It will fix compile errors for the at91rm9200_wdt driver" * git://www.linux-watchdog.org/linux-watchdog: watchdog: Revert the AT91RM9200_WATCHDOG dependency
2013-04-14Merge branch 'for-linus' of ↵Linus Torvalds1-6/+42
git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull one more btrfs fix from Chris Mason: "This has a recent fix from Josef for our tree log replay code. It fixes problems where the inode counter for the number of bytes in the file wasn't getting updated properly during fsync replay. The commit did get rebased this morning, but it was only to clean up the subject line. The code hasn't changed." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: Btrfs: make sure nbytes are right after log replay
2013-04-14Merge tag 'trace-fixes-v3.9-rc-v3' of ↵Linus Torvalds3-20/+21
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull ftrace fixes from Steven Rostedt: "Namhyung Kim found and fixed a bug that can crash the kernel by simply doing: echo 1234 | tee -a /sys/kernel/debug/tracing/set_ftrace_pid Luckily, this can only be done by root, but still is a nasty bug." * tag 'trace-fixes-v3.9-rc-v3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ftrace: Move ftrace_filter_lseek out of CONFIG_DYNAMIC_FTRACE section tracing: Fix possible NULL pointer dereferences
2013-04-14Add file_ns_capable() helper function for open-time capability checkingLinus Torvalds2-0/+26
Nothing is using it yet, but this will allow us to delay the open-time checks to use time, without breaking the normal UNIX permission semantics where permissions are determined by the opener (and the file descriptor can then be passed to a different process, or the process can drop capabilities). Signed-off-by: Linus Torvalds <[email protected]>
2013-04-14watchdog: Revert the AT91RM9200_WATCHDOG dependencyNicolas Ferre1-1/+1
Compiling the at91rm9200_wdt.c driver without at91rm9200 support was leading to several errors: drivers/built-in.o: In function `at91_wdt_close': at91_adc.c:(.text+0xc9fe4): undefined reference to `at91_st_base' drivers/built-in.o: In function `at91_wdt_write': at91_adc.c:(.text+0xca004): undefined reference to `at91_st_base' drivers/built-in.o: In function `at91wdt_shutdown': at91_adc.c:(.text+0xca01c): undefined reference to `at91_st_base' drivers/built-in.o: In function `at91wdt_suspend': at91_adc.c:(.text+0xca038): undefined reference to `at91_st_base' drivers/built-in.o: In function `at91_wdt_open': at91_adc.c:(.text+0xca0cc): undefined reference to `at91_st_base' drivers/built-in.o:at91_adc.c:(.text+0xca2c8): more undefined references to `at91_st_base' follow So, reverting the modification of the "depends" Kconfig line introduced by patch a6a1bcd37 (watchdog: at91rm9200: add DT support) seems to be the good solution. Signed-off-by: Nicolas Ferre <[email protected]> Acked-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2013-04-13vfs: Revert spurious fix to spinning prevention in prune_icache_sbSuleiman Souhlal1-1/+1
Revert commit 62a3ddef6181 ("vfs: fix spinning prevention in prune_icache_sb"). This commit doesn't look right: since we are looking at the tail of the list (sb->s_inode_lru.prev) if we want to skip an inode, we should put it back at the head of the list instead of the tail, otherwise we will keep spinning on it. Discovered when investigating why prune_icache_sb came top in perf reports of a swapping load. Signed-off-by: Suleiman Souhlal <[email protected]> Signed-off-by: Hugh Dickins <[email protected]> Cc: [email protected] # v3.2+ Signed-off-by: Linus Torvalds <[email protected]>
2013-04-13kobject: fix kset_find_obj() race with concurrent last kobject_put()Linus Torvalds1-1/+8
Anatol Pomozov identified a race condition that hits module unloading and re-loading. To quote Anatol: "This is a race codition that exists between kset_find_obj() and kobject_put(). kset_find_obj() might return kobject that has refcount equal to 0 if this kobject is freeing by kobject_put() in other thread. Here is timeline for the crash in case if kset_find_obj() searches for an object tht nobody holds and other thread is doing kobject_put() on the same kobject: THREAD A (calls kset_find_obj()) THREAD B (calls kobject_put()) splin_lock() atomic_dec_return(kobj->kref), counter gets zero here ... starts kobject cleanup .... spin_lock() // WAIT thread A in kobj_kset_leave() iterate over kset->list atomic_inc(kobj->kref) (counter becomes 1) spin_unlock() spin_lock() // taken // it does not know that thread A increased counter so it remove obj from list spin_unlock() vfree(module) // frees module object with containing kobj // kobj points to freed memory area!! kobject_put(kobj) // OOPS!!!! The race above happens because module.c tries to use kset_find_obj() when somebody unloads module. The module.c code was introduced in commit 6494a93d55fa" Anatol supplied a patch specific for module.c that worked around the problem by simply not using kset_find_obj() at all, but rather than make a local band-aid, this just fixes kset_find_obj() to be thread-safe using the proper model of refusing the get a new reference if the refcount has already dropped to zero. See examples of this proper refcount handling not only in the kref documentation, but in various other equivalent uses of this pattern by grepping for atomic_inc_not_zero(). [ Side note: the module race does indicate that module loading and unloading is not properly serialized wrt sysfs information using the module mutex. That may require further thought, but this is the correct fix at the kobject layer regardless. ] Reported-analyzed-and-tested-by: Anatol Pomozov <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Al Viro <[email protected]> Cc: [email protected] Signed-off-by: Linus Torvalds <[email protected]>
2013-04-13Btrfs: make sure nbytes are right after log replayJosef Bacik1-6/+42
While trying to track down a tree log replay bug I noticed that fsck was always complaining about nbytes not being right for our fsynced file. That is because the new fsync stuff doesn't wait for ordered extents to complete, so the inodes nbytes are not necessarily updated properly when we log it. So to fix this we need to set nbytes to whatever it is on the inode that is on disk, so when we replay the extents we can just add the bytes that are being added as we replay the extent. This makes it work for the case that we have the wrong nbytes or the case that we logged everything and nbytes is actually correct. With this I'm no longer getting nbytes errors out of btrfsck. Cc: [email protected] Signed-off-by: Josef Bacik <[email protected]> Signed-off-by: Chris Mason <[email protected]>