aboutsummaryrefslogtreecommitdiffstats
path: root/net (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2013-03-12tty: serial: mpc5xxx: fix PSC clock name bugAnatolij Gustschin1-1/+1
mpc512x platform clock code names PSC clocks as "pscX_mclk" but the driver tries to get "pscX_clk" clock and this results in errors like: mpc52xx-psc-uart 80011700.psc: Failed to get PSC clock entry! The problem appears when opening ttyPSC devices other than the system's serial console. Since getting and enabling the PSC clock fails, uart port startup doesn't succeed and tty flag TTY_IO_ERROR remains set causing further errors in tty ioctls, i.e. 'strace stty -F /dev/ttyPSC1' shows: open("/dev/ttyPSC1", O_RDONLY|O_NONBLOCK|O_LARGEFILE) = 3 dup2(3, 0) = 0 close(3) = 0 fcntl64(0, F_GETFL) = 0x10800 (flags O_RDONLY|O_NONBLOCK|O_LARGEFILE) fcntl64(0, F_SETFL, O_RDONLY|O_LARGEFILE) = 0 ioctl(0, TCGETS, 0xbff89038) = -1 EIO (Input/output error) Only request PSC clock names that the platform actually provides. Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-04TTY: disable debugging warningJiri Slaby1-1/+1
We added a warning to flush_to_ldisc to report cases when it is called with a NULL tty. It was for debugging purposes and it lead to a patchset from Peter Hurley. The patchset however did not make it to 3.9, so disable the warning now to not disturb people. We can re-add it when the series is in and we are hunting for another bugs. Reported-by: David Miller <davem@davemloft.net> Cc: stable <stable@vger.kernel.org> # 3.8 Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-03Linux 3.9-rc1Linus Torvalds1-2/+2
2013-03-03btrfs/raid56: Add missing #include <linux/vmalloc.h>Geert Uytterhoeven1-0/+1
tilegx_defconfig: fs/btrfs/raid56.c: In function 'btrfs_alloc_stripe_hash_table': fs/btrfs/raid56.c:206:3: error: implicit declaration of function 'vzalloc' [-Werror=implicit-function-declaration] fs/btrfs/raid56.c:206:9: warning: assignment makes pointer from integer without a cast [enabled by default] fs/btrfs/raid56.c:226:4: error: implicit declaration of function 'vfree' [-Werror=implicit-function-declaration] Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-03-02fix compat_sys_rt_sigprocmask()Al Viro1-1/+1
Converting bitmask to 32bit granularity is fine, but we'd better _do_ something with the result. Such as "copy it to userland"... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-03-02SUNRPC: One line comment fixTrond Myklebust1-1/+1
Reported-by: Weston Andros Adamson <dros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2013-03-02ext4: enable quotas before orphan cleanupJan Kara1-10/+10
When using quota feature we need to enable quotas before orphan cleanup so that changes happening during it are properly reflected in quota accounting. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-03-02ext4: don't allow quota mount options when quota feature enabledJan Kara1-7/+26
So far we silently ignored when quota mount options were set while quota feature was enabled. But this can create confusion in userspace when mount options are set but silently ignored and also creates opportunities for bugs when we don't properly test all quota types. Actually ext4_mark_dquot_dirty() forgets to test for quota feature so it was dependent on journaled quota options being set. OTOH ext4_orphan_cleanup() tries to enable journaled quota when quota options are specified which is wrong when quota feature is enabled. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-03-02ext4: fix a warning from sparse check for ext4_dir_llseekZheng Liu1-1/+1
ext4_dir_llseek is only used as a callback function, and no one calls it directly. So make it as a static function in order to remove a warning message from sparse check. Signed-off-by: Zheng Liu <wenqing.lz@taobao.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-03-02ext4: convert number of blocks to clusters properlyLukas Czerner4-9/+9
We're using macro EXT4_B2C() to convert number of blocks to number of clusters for bigalloc file systems. However, we should be using EXT4_NUM_B2C(). Signed-off-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: stable@vger.kernel.org
2013-03-02ext4: fix possible memory leak in ext4_remount()Wei Yongjun1-0/+1
'orig_data' is malloced in ext4_remount() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Lukas Czerner <lczerner@redhat.com> Cc: stable@vger.kernel.org
2013-03-02jbd2: fix ERR_PTR dereference in jbd2__journal_startDmitry Monakhov1-1/+1
If start_this_handle() failed handle will be initialized to ERR_PTR() and can not be dereferenced. paging request at fffffffffffffff6 IP: [<ffffffff813c073f>] jbd2__journal_start+0x18f/0x290 PGD 200e067 PUD 200f067 PMD 0 Oops: 0000 [#1] SMP Modules linked in: cpufreq_ondemand acpi_cpufreq freq_table mperf coretemp kvm_intel kvm crc32c_intel ghash_clmulni_intel microcode sg xhci_hcd button sd_mod crc_t10dif aesni_intel ablk_helper cryptd lrw aes_x86_64 xts gf128mul ahci libahci pata_acpi ata_generic dm_mirror dm_region_hash dm_log dm_mod CPU 0 journal commit I/O error Pid: 2694, comm: fio Not tainted 3.8.0-rc3+ #79 /DQ67SW RIP: 0010:[<ffffffff813c073f>] [<ffffffff813c073f>] jbd2__journal_start+0x18f/0x290 RSP: 0018:ffff880233b8ba58 EFLAGS: 00010292 RAX: 00000000ffffffe2 RBX: ffffffffffffffe2 RCX: 0000000000000006 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff82128f48 RBP: ffff880233b8ba98 R08: 0000000000000000 R09: ffff88021440a6e0 Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-03-02metag: Provide dma_get_sgtable()James Hogan1-0/+7
metag/allmodconfig: drivers/media/v4l2-core/videobuf2-dma-contig.c: In function 'vb2_dc_get_base_sgt': drivers/media/v4l2-core/videobuf2-dma-contig.c:387: error: implicit declaration of function 'dma_get_sgtable' For architectures using dma_map_ops, dma_get_sgtable() is provided in <asm-generic/dma-mapping-common.h>. Metag does not use dma_map_ops yet, hence it should implement it as an inline stub using dma_common_get_sgtable(). Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
2013-03-02metag: prom.h: remove declaration of metag_dt_memblock_reserve()James Hogan1-1/+0
Metag doesn't have a metag_dt_memblock_reserve() function so remove the declaration from asm/prom.h. Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: copy devicetree to non-init memoryJames Hogan3-0/+20
Make a copy of the device tree blob in non-init memory. It is required when using built-in device tree files that the platform code copies the blob to non-init memory prior to calling unflatten_device_tree(), otherwise the strings that the device tree refer to will get poisoned and potentially reused, breaking later reading of the device tree post-init (such as compatible matching in modules, debugfs, and the procfs interface). Signed-off-by: James Hogan <james.hogan@imgtec.com> Reviewed-by: Vineet Gupta <vgupta@synopsys.com>
2013-03-02metag: cleanup metag_ksyms.c includesJames Hogan1-6/+3
Minimise metag_ksyms.c includes to directly include the <asm/*.h> files that declare a particular symbol, and not include any unnecessary ones. Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: move mm/init.c exports out of metag_ksyms.cJames Hogan2-2/+3
It's less error prone to have function symbols exported immediately after the function rather than in metag_ksyms.c. Move each EXPORT_SYMBOL in metag_ksyms.c for symbols defined in mm/init.c into mm/init.c. Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: move usercopy.c exports out of metag_ksyms.cJames Hogan2-16/+13
It's less error prone to have function symbols exported immediately after the function rather than in metag_ksyms.c. Move each EXPORT_SYMBOL in metag_ksyms.c for symbols defined in usercopy.c into usercopy.c Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: move setup.c exports out of metag_ksyms.cJames Hogan2-5/+3
It's less error prone to have function symbols exported immediately after the function rather than in metag_ksyms.c. Move each EXPORT_SYMBOL in metag_ksyms.c for symbols defined in setup.c into setup.c Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: move kick.c exports out of metag_ksyms.cJames Hogan2-2/+3
It's less error prone to have function symbols exported immediately after the function rather than in metag_ksyms.c. Move each EXPORT_SYMBOL in metag_ksyms.c for symbols defined in kick.c into kick.c Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: move traps.c exports out of metag_ksyms.cJames Hogan2-5/+3
It's less error prone to have function symbols exported immediately after the function rather than in metag_ksyms.c. Move each EXPORT_SYMBOL in metag_ksyms.c for symbols defined in traps.c into traps.c Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: move irq enable out of irqflags.h on SMPJames Hogan2-7/+20
The SMP version of arch_local_irq_enable() uses preempt_disable(), but <asm/irqflags.h> doesn't include <linux/preempt.h> causing the following errors on SMP when pstore/ftrace is enabled (caught by buildbot smp allyesconfig): In file included from include/linux/irqflags.h:15, from fs/pstore/ftrace.c:16: arch/metag/include/asm/irqflags.h: In function 'arch_local_irq_enable': arch/metag/include/asm/irqflags.h:84: error: implicit declaration of function 'preempt_disable' arch/metag/include/asm/irqflags.h:86: error: implicit declaration of function 'preempt_enable_no_resched' However <linux/preempt.h> cannot be easily included from <asm/irqflags.h> as it can cause circular include dependencies in the !SMP case, and potentially in the SMP case in the future. Therefore move the SMP implementation of arch_local_irq_enable() into traps.c and use an inline version of get_trigger_mask() which is also defined in traps.c for SMP. This adds an extra layer of function call / stack push when preempt_disable needs to call other functions, however in the non-preemptive SMP case it should be about as fast, as it was already calling the get_trigger_mask() function which is now used inline. Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02genksyms: fix metag symbol prefix on crc symbolsJames Hogan1-1/+2
Meta uses symbol prefixes, so add "metag" to the list of architectures to set the mod_prefix to "_" for. This fixes __crc_* symbols to add the extra underscore to match _CRC_SYMBOL macro in <linux/export.h> and so that modpost finds them. Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: hugetlb: convert to vm_unmapped_area()James Hogan1-42/+10
Convert hugetlb_get_unmapped_area_new_pmd() to use vm_unmapped_area() rather than searching the virtual address space itself. This fixes the following errors in linux-next due to the specified members being removed after other architectures have already been converted: arch/metag/mm/hugetlbpage.c: In function 'hugetlb_get_unmapped_area_new_pmd': arch/metag/mm/hugetlbpage.c:199: error: 'struct mm_struct' has no member named 'cached_hole_size' arch/metag/mm/hugetlbpage.c:200: error: 'struct mm_struct' has no member named 'free_area_cache' arch/metag/mm/hugetlbpage.c:215: error: 'struct mm_struct' has no member named 'cached_hole_size' Signed-off-by: James Hogan <james.hogan@imgtec.com> Acked-by: Michel Lespinasse <walken@google.com>
2013-03-02metag: export clear_page and copy_pageJames Hogan1-0/+2
Various file systems use clear_page() and copy_page(), so when they're built as modules we get build errors like the following: ERROR: "clear_page" [fs/ntfs/ntfs.ko] undefined! ERROR: "copy_page" [fs/nilfs2/nilfs2.ko] undefined! Therefore export these functions to modules from metag_ksyms.c to fix the errors. This was hit by a randconfig build. Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: export metag_code_cache_flush_allJames Hogan1-0/+1
Various file systems indirectly use metag_code_cache_flush_all(), so when they're built as modules we get build errors like the following: ERROR: "metag_code_cache_flush_all" [fs/xfs/xfs.ko] undefined! Therefore export this function to modules to fix the errors. This was hit by a randconfig build. Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: protect more non-MMU memory regionsJames Hogan3-7/+42
Rename setup_txprivext() to setup_priv() and add initialisation of some more per-thread privilege protection registers: - TxPRIVSYSR: 0x04400000-0x047fffff 0x05000000-0x07ffffff 0x84000000-0x87ffffff - TxPIOREG: 0x02000000-0x02ffffff 0x04800000-0x048fffff - TxSYREG: 0x04000000-0x04000fff (except write fetch system event) Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: make TXPRIVEXT bits explicitJames Hogan2-7/+31
Define PRIV_BITS using explicit constants from <asm/metag_regs.h> rather than with a hard coded value. This also adds a couple of missing definitions for the TXPRIVEXT priv bits for protecting writes to TXTIMER and the trace registers. Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: kernel/setup.c: sort includesJames Hogan1-23/+23
Sort includes in kernel/setup.c. Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02perf: Enable building perf tools for MetaJames Hogan1-0/+6
Define rmb(), cpu_relax(), and CPUINFO_PROC for Meta so that the perf tools can be built for Meta. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2013-03-02metag: add boot time LNKGET/LNKSET checkJames Hogan1-0/+79
Add boot time check for whether LNKGET/LNKSET go through or around the cache. Depending on the configuration an info message (no harm), warning (technically wrong but no harm), or big WARN (expect failure in either kernel or userland) may be emitted if the behaviour is not as expected: Configuration Hardware Response ------------------------------------------ -------- -------- AROUND_CACHE through pr_info !AROUND_CACHE && ATOMICITY_LNKGET around WARN (kernel) " && !ATOMICITY_LNKGET && SMP around WARN (user) " " && !SMP around pr_warn Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: add __init to metag_cache_probe()James Hogan1-1/+1
metag_cache_probe() is only called from setup_arch(), so add the __init attribute to it. Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: Add JTAG Debug Adapter (DA) supportJames Hogan9-0/+105
Add basic JTAG Debug Adapter (DA) support so that drivers which communicate with the DA can detect whether one is actually present (otherwise the target will halt indefinitely). This allows the metag_da TTY driver and imgdafs filesystem driver to be built, updates defconfigs, and sets up the metag_da console early if it's configured in. Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02scripts/checkstack.pl: Add metag supportJames Hogan1-2/+6
Adapt checkstack.pl so that it works for metag. Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: ftrace supportJames Hogan7-1/+248
Add ftrace support for metag. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
2013-03-02metag: PerfJames Hogan7-0/+1073
Add Perf support for metag. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2013-03-02metag: Build infrastructureJames Hogan19-0/+1124
Add metag build infrastructure. Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02Kconfig.debug: add METAG to dependency listsJames Hogan1-2/+2
Add [!]METAG to a couple of Kconfig dependencies in lib/Kconfig.debug. Don't allow stack utilization instrumentation on metag, and allow building with frame pointers. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: "Paul E. McKenney" <paul.mckenney@linaro.org> Cc: Akinobu Mita <akinobu.mita@gmail.com> Cc: Michel Lespinasse <walken@google.com> Cc: Catalin Marinas <catalin.marinas@arm.com>
2013-03-02mm: define VM_GROWSUP for CONFIG_METAGJames Hogan1-0/+2
Commit cc2383ec06be093789469852e1fe96e1148e9a2c ("mm: introduce arch-specific vma flag VM_ARCH_1") merged in v3.7-rc1. The above commit combined several arch-specific vma flags into one, and in the process it changed the VM_GROWSUP definition to depend on specific architectures rather than CONFIG_STACK_GROWSUP. Therefore add an ifdef for CONFIG_METAG to also set VM_GROWSUP. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Konstantin Khlebnikov <khlebnikov@openvz.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Mel Gorman <mgorman@suse.de> Cc: Michel Lespinasse <walken@google.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: linux-mm@kvack.org
2013-03-02metag: Various other headersJames Hogan11-0/+526
Add the remaining metag header files: - byteorder.h, swab.h (byte order and swapping) - barrier.h, cpu.h. hwthread.h, processor.h (hardware thread related) - bug.h, elf.h, gpio.h, linkage.h, resource.h (other) Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: Stack unwindingJames Hogan2-0/+207
Add stack unwinding support for metag. Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: Optimised library functionsJames Hogan20-0/+1474
Add optimised library functions for metag. Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: DMAJames Hogan2-0/+690
Add DMA mapping code. Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: SMP supportJames Hogan9-0/+1064
Add SMP support for metag. This allows Linux to take control of multiple hardware threads on a single Meta core, treating them as separate Linux CPUs. Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: Basic documentationJames Hogan4-0/+266
Add basic metag documentation. This includes an outline description of the ABIs (including syscall ABI) and calling conventions, similar to the one in Documentation/frv/. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Rob Landley <rob@landley.net> Cc: Al Viro <viro@ZenIV.linux.org.uk> Cc: linux-doc@vger.kernel.org
2013-03-02metag: Atomics, locks and bitopsJames Hogan13-0/+1395
Add header files to implement Meta hardware thread locks (used by some other atomic operations), atomics, spinlocks, and bitops. There are 2 main types of atomic primitives for metag (in addition to IRQs off on UP): - LOCK instructions provide locking between hardware threads. - LNKGET/LNKSET instructions provide load-linked/store-conditional operations allowing for lighter weight atomics on Meta2 LOCK instructions allow for hardware threads to acquire voluntary or exclusive hardware thread locks: - LOCK0 releases exclusive and voluntary lock from the running hardware thread. - LOCK1 acquires the voluntary hardware lock, blocking until it becomes available. - LOCK2 implies LOCK1, and additionally acquires the exclusive hardware lock, blocking all other hardware threads from executing. Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: Module supportJames Hogan2-0/+321
Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: Scheduling/Process managementJames Hogan2-0/+616
Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: System CallsJames Hogan8-0/+508
Add metag system call and gateway page interfaces. The metag architecture port uses the generic system call numbers from asm-generic/unistd.h, as well as a user gateway page mapped at 0x6ffff000 which contains fast atomic primitives (depending on SMP) and a fast method of accessing TLS data. System calls use the SWITCH instruction with the immediate 0x440001 to signal a system call. Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: Internal and external irqchipsJames Hogan8-0/+1359
Meta core internal interrupts (from HWSTATMETA and friends) are vectored onto the TR1 core trigger for the current thread. This is demultiplexed in irq-metag.c to individual Linux IRQs for each internal interrupt. External SoC interrupts (from HWSTATEXT and friends) are vectored onto the TR2 core trigger for the current thread. This is demultiplexed in irq-metag-ext.c to individual Linux IRQs for each external SoC interrupt. The external irqchip has devicetree bindings for configuring the number of irq banks and the type of masking available. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Rob Herring <rob.herring@calxeda.com> Cc: Rob Landley <rob@landley.net> Cc: Dom Cobley <popcornmix@gmail.com> Cc: Simon Arlott <simon@fire.lp0.eu> Cc: Viresh Kumar <viresh.kumar@linaro.org> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: devicetree-discuss@lists.ozlabs.org Cc: linux-doc@vger.kernel.org