- Sep 17, 2013
-
-
Ralf Baechle authored
This fixes the following issue BUG: using smp_processor_id() in preemptible [00000000] code: kjournald/1761 caller is blast_dcache32+0x30/0x254 Call Trace: [<8047f02c>] dump_stack+0x8/0x34 [<802e7e40>] debug_smp_processor_id+0xe0/0xf0 [<80114d94>] blast_dcache32+0x30/0x254 [<80118484>] r4k_dma_cache_wback_inv+0x200/0x288 [<80110ff0>] mips_dma_map_sg+0x108/0x180 [<80355098>] ide_dma_prepare+0xf0/0x1b8 [<8034eaa4>] do_rw_taskfile+0x1e8/0x33c [<8035951c>] ide_do_rw_disk+0x298/0x3e4 [<8034a3c4>] do_ide_request+0x2e0/0x704 [<802bb0dc>] __blk_run_queue+0x44/0x64 [<802be000>] queue_unplugged.isra.36+0x1c/0x54 [<802beb94>] blk_flush_plug_list+0x18c/0x24c [<802bec6c>] blk_finish_plug+0x18/0x48 [<8026554c>] journal_commit_transaction+0x3b8/0x151c [<80269648>] kjournald+0xec/0x238 [<8014ac00>] kthread+0xb8/0xc0 [<8010268c>] ret_from_kernel_thread+0x14/0x1c Caches in most systems are identical - but not always, so we can't avoid the use of smp_call_function() by just looking at the boot CPU's data, have to fiddle with preemption instead. Signed-off-by:
Ralf Baechle <ralf@linux-mips.org> Cc: Markos Chandras <markos.chandras@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/5835
-
- Jul 15, 2013
-
-
Paul Gortmaker authored
commit 3747069b25e419f6b51395f48127e9812abc3596 upstream. The __cpuinit type of throwaway sections might have made sense some time ago when RAM was more constrained, but now the savings do not offset the cost and complications. For example, the fix in commit 5e427ec2 ("x86: Fix bit corruption at CPU resume time") is a good example of the nasty type of bugs that can be created with improper use of the various __init prefixes. After a discussion on LKML[1] it was decided that cpuinit should go the way of devinit and be phased out. Once all the users are gone, we can then finally remove the macros themselves from linux/init.h. Note that some harmless section mismatch warnings may result, since notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c) and are flagged as __cpuinit -- so if we remove the __cpuinit from the arch specific callers, we will also get section mismatch warnings. As an intermediate step, we intend to turn the linux/init.h cpuinit related content into no-ops as early as possible, since that will get rid of these warnings. In any case, they are temporary and harmless. Here, we remove all the MIPS __cpuinit from C code and __CPUINIT from asm files. MIPS is interesting in this respect, because there are also uasm users hiding behind their own renamed versions of the __cpuinit macros. [1] https://lkml.org/lkml/2013/5/20/589 [ralf@linux-mips.org: Folded in Paul's followup fix.] Signed-off-by:
Paul Gortmaker <paul.gortmaker@windriver.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/5494/ Patchwork: https://patchwork.linux-mips.org/patch/5495/ Patchwork: https://patchwork.linux-mips.org/patch/5509/ Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- May 08, 2013
-
-
Sanjay Lal authored
Signed-off-by:
Sanjay Lal <sanjayl@kymasys.com> Cc: kvm@vger.kernel.org Cc: linux-mips@linux-mips.org Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- May 01, 2013
-
-
Steven J. Hill authored
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 <Steven.Hill@imgtec.com>
-
- Apr 05, 2013
-
-
Dengcheng Zhu authored
The commit a96102be introduced set_isa() where compatible ISA info is also set aside from the one gets passed in. It means, for example, 1004K will have MIPS_CPU_ISA_M32R2/M32R1/II/I flags. This leads to things like the following inappropriate: if (c->isa_level == MIPS_CPU_ISA_M32R1 || c->isa_level == MIPS_CPU_ISA_M32R2 || c->isa_level == MIPS_CPU_ISA_M64R1 || c->isa_level == MIPS_CPU_ISA_M64R2) This patch fixes it. Signed-off-by:
Deng-Cheng Zhu <dengcheng.zhu@imgtec.com> Cc: Steven J. Hill <Steven.Hill@imgtec.com> Cc: linux-mips@linux-mips.org Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- Feb 17, 2013
-
-
Steven J. Hill authored
Signed-off-by:
Steven J. Hill <sjhill@mips.com> Patchwork: http://patchwork.linux-mips.org/patch/4682/ Signed-off-by:
John Crispin <blogic@openwrt.org>
-
- Feb 01, 2013
-
-
Ralf Baechle authored
Having received another series of whitespace patches I decided to do this once and for all rather than dealing with this kind of patches trickling in forever. Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- Dec 13, 2012
-
-
Ralf Baechle authored
Nobody seems to be interested anymore and upstream also never had an ethernet driver. Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
Ralf Baechle authored
Normally r4k_dma_cache_inv should only ever be called with cacheline aligned addresses. If however, it isn't there is the theoretical possibility of data corruption. There is no correct way of handling this and anyway, it should only happen if the DMA API is used incorrectly so drop There is a different corruption scenario with these CACHE instructions removed but again there is no way of handling this correctly and it can be triggered only through incorrect use of the DMA API. So just get rid of the complexity. Signed-off-by:
Ralf Baechle <ralf@linux-mips.org> Reported-by:
James Rodriguez <jamesr@juniper.net>
-
- Nov 09, 2012
-
-
Shane McDonald authored
Commit 97ce2c88 (jump-label: initialize jump-label subsystem much earlier) caused MIPS to break, so this was resolved with commit 6650df3c (MIPS: Move cache setup to setup_arch().). Unfortunately, after this commit, the coherency kernel parameters, cca and coherentio, are no longer processed before their values are used. This patch fixes this problem by marking them as early_param, which results in them being processed before they are needed. Signed-off-by:
Shane McDonald <mcdonald.shane@gmail.com> Acked-by:
David Daney <david.daney@cavium.com> Cc: Ralf Baechle <ralf@linux-mips.org> Patchwork: http://patchwork.linux-mips.org/patch/3961 Signed-off-by:
John Crispin <blogic@openwrt.org>
-
- Sep 13, 2012
-
-
Steven J. Hill authored
Signed-off-by:
Steven J. Hill <sjhill@mips.com>
-
- Jul 19, 2012
-
-
Douglas Leung authored
This affects certain 4Kc cores. Signed-off-by:
Douglas Leung <douglas@mips.com> Signed-off-by:
Steven J. Hill <sjhill@mips.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/3855/ Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- Jul 06, 2012
-
-
Steven J. Hill authored
[ralf@linux-mips.org: Fixed whitespace damage.] Signed-off-by:
Steven J. Hill <sjhill@mips.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/3773/ Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- May 16, 2012
-
-
David Daney authored
Signed-off-by:
David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/3821/ Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- Mar 28, 2012
-
-
David Howells authored
Disintegrate asm/system.h for MIPS. Signed-off-by:
David Howells <dhowells@redhat.com> Acked-by:
Ralf Baechle <ralf@linux-mips.org> cc: linux-mips@linux-mips.org
-
- Mar 20, 2012
-
-
Cong Wang authored
Signed-off-by:
Cong Wang <amwang@redhat.com>
-
- Dec 07, 2011
-
-
Jayachandran C authored
Add support for Netlogic's XLP MIPS SoC. This patch adds: * XLP processor ID in cpu_probe.c and asm/cpu.h * XLP case to asm/module.h * CPU_XLP case to mm/tlbex.c * minor change to r4k cache handling to ignore XLP secondary cache * XLP cpu overrides to mach-netlogic/cpu-feature-overrides.h Signed-off-by:
Jayachandran C <jayachandranc@netlogicmicro.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/2966/ Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- Oct 20, 2011
-
-
Ralf Baechle authored
Until now flush_kernel_vmap_range() and invalidate_kernel_vmap_range() did not exist on MIPS resulting in heavy cache corruption on XFS filesystems. Left for the post-3.0 time: optimization and make this work with highmem, too. Since the combination of highmem + cache aliases atm doesn't work this isn't a regression. Signed-off-by:
Ralf Baechle <ralf@linux-mips.org> Patchwork: https://patchwork.linux-mips.org/patch/2505/
-
- Jul 25, 2011
-
-
Kevin Cernekee authored
On processors with deep write buffers, it is likely that many cycles will pass between a CACHE instruction and the time the data actually gets written out to DRAM. Add a SYNC instruction to ensure that the buffers get emptied before the flush functions return. Actual problem seen in the wild: 1) dma_alloc_coherent() allocates cached memory 2) memset() is called to clear the new pages 3) dma_cache_wback_inv() is called to flush the zero data out to memory 4) dma_alloc_coherent() returns an uncached (kseg1) pointer to the freshly allocated pages 5) Caller writes data through the kseg1 pointer 6) Buffered writeback data finally gets flushed out to DRAM 7) Part of caller's data is inexplicably zeroed out This patch adds SYNC between steps 3 and 4, which fixed the problem. Signed-off-by:
Kevin Cernekee <cernekee@gmail.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- May 19, 2011
-
-
Jayachandran C authored
CPU_XLR case added to mm/tlbex.c CPU_XLR case added to mm/c-r4k.c for PINDEX attribute Feature overrides for XLR cpu. Signed-off-by:
Jayachandran C <jayachandranc@netlogicmicro.com> To: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/2333/ Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- May 10, 2011
-
-
Ralf Baechle authored
CC arch/mips/mm/c-r4k.o arch/mips/mm/c-r4k.c: In function 'probe_scache': arch/mips/mm/c-r4k.c:1078:6: error: variable 'tmp' set but not used [-Werror=unused-but-set-variable] cc1: all warnings being treated as errors Older GCC versions didn't warn about the unused variable tmp because it was getting initialized. Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- Apr 06, 2011
-
-
Justin P. Mattock authored
Signed-off-by:
Justin P. Mattock <justinmattock@gmail.com> Acked-by:
David S. Miller <davem@davemloft.net> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- Oct 29, 2010
-
-
Ralf Baechle authored
All callers were passing in 1 anyway. Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
Ralf Baechle authored
Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- Jun 24, 2009
-
-
Ralf Baechle authored
Some of the were relying into smp.h being dragged in by another header which of course is fragile. <asm/cpu-info.h> uses smp_processor_id() only in macros and including smp.h there leads to an include loop, so don't change cpu-info.h. Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- Jun 17, 2009
-
-
Kevin Cernekee authored
Signed-off-by:
Kevin Cernekee <cernekee@gmail.com> Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- May 14, 2009
-
-
Ralf Baechle authored
Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- Mar 30, 2009
-
-
Manuel Lauss authored
This patch removes the various CPU_AU1??? model constants in favor of a single CPU_ALCHEMY one. All currently existing Alchemy models are identical in terms of cpu core and cache size/organization. The parts of the mips kernel which need to know the exact CPU revision extract it from the c0_prid register already; and finally nothing else in-tree depends on those any more. Should a new variant with slightly different "company options" and/or "processor revision" bits in c0_prid appear, it will be supported immediately (minus an exact model string in cpuinfo). Signed-off-by:
Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- Mar 23, 2009
-
-
Shinya Kuribayashi authored
Signed-off-by:
Shinya Kuribayashi <shinya.kuribayashi@necel.com> Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- Jan 30, 2009
-
-
Ralf Baechle authored
See discussion e9c3a7c20901051031y528d0d31r18d44c5096c59e0@mail.gmail.com. Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- Sep 05, 2008
-
-
Thomas Bogendoerfer authored
trap_init issues flush_icache_range(), which uses ipi functions to get icache flushing done on all cpus. But this is done before interrupts are enabled and caused WARN_ON messages. This changeset introduces a new local_flush_icache_range() and uses it before interrupts (and additional CPUs) are enabled to avoid this problem. Signed-off-by:
Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- Jun 26, 2008
-
-
Jens Axboe authored
It's never used and the comments refer to nonatomic and retry interchangably. So get rid of it. Acked-by:
Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by:
Jens Axboe <jens.axboe@oracle.com>
-
- Jun 16, 2008
-
-
Ralf Baechle authored
Assuming the call of kmap_coherent in local_r4k_flush_cache_page doesn't need fixing this was skipped in fcae549295bcae801ac48fc1c2030ab8cc487020. Turns out it needed the same change after all. Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
Ralf Baechle authored
Build error was caused by commit 35133692. Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- Apr 28, 2008
-
-
Ralf Baechle authored
Signed-off-by:
Chris Dearman <chris@mips.com> Signed-off-by:
Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
Chris Dearman authored
Slightly tacky, but there is a precedent in the sparc archirecture code. Signed-off-by:
Chris Dearman <chris@mips.com> Signed-off-by:
Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- Apr 07, 2008
-
-
Ralf Baechle authored
flush_cache_vmap / flush_cache_vunmap were calling flush_cache_all which - having been deprecated - turned into a nop ... Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- Mar 12, 2008
-
-
Ralf Baechle authored
Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- Feb 19, 2008
-
-
Ralf Baechle authored
So far flush_cache_range() did't consider the I-cache largely because it did rarely ever matter to real world code. This was working primarily because normally code and data are don't share the same pages - with the exception of MIPS16 code which uses address constants embedded between the code. The following sequence of events may break the code: o MIPS16 executable being loaded o dynamic linker relocates the address constants embedded into the code: o Uses mprotect(2) to make code pages PROT_READ|PROT_WRITE o Performs the actual relocations by writing to the pages which likely are COW. Because no PROT_EXEC is set I-cache coherence will not be considered. o Uses mprotect(2) to switch code pages back to PROT_READ|PROT_EXEC. This results in a call to flush_cache_range() which also does not consider I-caches. o => executing the page just having been relocated may now result in the I-cache getting refilled with stale data from memory. Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- Feb 03, 2008
-
-
Joe Perches authored
Signed-off-by:
Joe Perches <joe@perches.com> Signed-off-by:
Adrian Bunk <bunk@kernel.org>
-