aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-10-18 17:24:36 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-18 17:24:36 -0400
commit857b50f5d0eed113428c864e927289d8f5f2b864 (patch)
tree6864b17f92b855d35f896b84948b8d19b0105ce4 /arch/mips/kernel
parent168f07a1ea75870b3fdee3d69d978813eb1fd58d (diff)
parent31d6f57d3c65fd75c18ea9a3acebedc6cd60d656 (diff)
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS updates from Ralf Baechle: "This is the MIPS pull request for the next kernel: - Zubair's patch series adds CMA support for MIPS. Doing so it also touches ARM64 and x86. - remove the last instance of IRQF_DISABLED from arch/mips - updates to two of the MIPS defconfig files. - cleanup of how cache coherency bits are handled on MIPS and implement support for write-combining. - platform upgrades for Alchemy - move MIPS DTS files to arch/mips/boot/dts/" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (24 commits) MIPS: ralink: remove deprecated IRQF_DISABLED MIPS: pgtable.h: Implement the pgprot_writecombine function for MIPS MIPS: cpu-probe: Set the write-combine CCA value on per core basis MIPS: pgtable-bits: Define the CCA bit for WC writes on Ingenic cores MIPS: pgtable-bits: Move the CCA bits out of the core's ifdef blocks MIPS: DMA: Add cma support x86: use generic dma-contiguous.h arm64: use generic dma-contiguous.h asm-generic: Add dma-contiguous.h MIPS: BPF: Add new emit_long_instr macro MIPS: ralink: Move device-trees to arch/mips/boot/dts/ MIPS: Netlogic: Move device-trees to arch/mips/boot/dts/ MIPS: sead3: Move device-trees to arch/mips/boot/dts/ MIPS: Lantiq: Move device-trees to arch/mips/boot/dts/ MIPS: Octeon: Move device-trees to arch/mips/boot/dts/ MIPS: Add support for building device-tree binaries MIPS: Create common infrastructure for building built-in device-trees MIPS: SEAD3: Enable DEVTMPFS MIPS: SEAD3: Regenerate defconfigs MIPS: Alchemy: DB1300: Add touch penirq support ...
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r--arch/mips/kernel/cpu-probe.c21
-rw-r--r--arch/mips/kernel/setup.c9
2 files changed, 30 insertions, 0 deletions
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index e34b10be782e..94c4a0c0a577 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -27,6 +27,7 @@
27#include <asm/msa.h> 27#include <asm/msa.h>
28#include <asm/watch.h> 28#include <asm/watch.h>
29#include <asm/elf.h> 29#include <asm/elf.h>
30#include <asm/pgtable-bits.h>
30#include <asm/spram.h> 31#include <asm/spram.h>
31#include <asm/uaccess.h> 32#include <asm/uaccess.h>
32 33
@@ -764,6 +765,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
764 break; 765 break;
765 case PRID_REV_LOONGSON3A: 766 case PRID_REV_LOONGSON3A:
766 c->cputype = CPU_LOONGSON3; 767 c->cputype = CPU_LOONGSON3;
768 c->writecombine = _CACHE_UNCACHED_ACCELERATED;
767 __cpu_name[cpu] = "ICT Loongson-3"; 769 __cpu_name[cpu] = "ICT Loongson-3";
768 set_elf_platform(cpu, "loongson3a"); 770 set_elf_platform(cpu, "loongson3a");
769 break; 771 break;
@@ -798,67 +800,83 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
798 800
799static inline void cpu_probe_mips(struct cpuinfo_mips *c, unsigned int cpu) 801static inline void cpu_probe_mips(struct cpuinfo_mips *c, unsigned int cpu)
800{ 802{
803 c->writecombine = _CACHE_UNCACHED_ACCELERATED;
801 switch (c->processor_id & PRID_IMP_MASK) { 804 switch (c->processor_id & PRID_IMP_MASK) {
802 case PRID_IMP_4KC: 805 case PRID_IMP_4KC:
803 c->cputype = CPU_4KC; 806 c->cputype = CPU_4KC;
807 c->writecombine = _CACHE_UNCACHED;
804 __cpu_name[cpu] = "MIPS 4Kc"; 808 __cpu_name[cpu] = "MIPS 4Kc";
805 break; 809 break;
806 case PRID_IMP_4KEC: 810 case PRID_IMP_4KEC:
807 case PRID_IMP_4KECR2: 811 case PRID_IMP_4KECR2:
808 c->cputype = CPU_4KEC; 812 c->cputype = CPU_4KEC;
813 c->writecombine = _CACHE_UNCACHED;
809 __cpu_name[cpu] = "MIPS 4KEc"; 814 __cpu_name[cpu] = "MIPS 4KEc";
810 break; 815 break;
811 case PRID_IMP_4KSC: 816 case PRID_IMP_4KSC:
812 case PRID_IMP_4KSD: 817 case PRID_IMP_4KSD:
813 c->cputype = CPU_4KSC; 818 c->cputype = CPU_4KSC;
819 c->writecombine = _CACHE_UNCACHED;
814 __cpu_name[cpu] = "MIPS 4KSc"; 820 __cpu_name[cpu] = "MIPS 4KSc";
815 break; 821 break;
816 case PRID_IMP_5KC: 822 case PRID_IMP_5KC:
817 c->cputype = CPU_5KC; 823 c->cputype = CPU_5KC;
824 c->writecombine = _CACHE_UNCACHED;
818 __cpu_name[cpu] = "MIPS 5Kc"; 825 __cpu_name[cpu] = "MIPS 5Kc";
819 break; 826 break;
820 case PRID_IMP_5KE: 827 case PRID_IMP_5KE:
821 c->cputype = CPU_5KE; 828 c->cputype = CPU_5KE;
829 c->writecombine = _CACHE_UNCACHED;
822 __cpu_name[cpu] = "MIPS 5KE"; 830 __cpu_name[cpu] = "MIPS 5KE";
823 break; 831 break;
824 case PRID_IMP_20KC: 832 case PRID_IMP_20KC:
825 c->cputype = CPU_20KC; 833 c->cputype = CPU_20KC;
834 c->writecombine = _CACHE_UNCACHED;
826 __cpu_name[cpu] = "MIPS 20Kc"; 835 __cpu_name[cpu] = "MIPS 20Kc";
827 break; 836 break;
828 case PRID_IMP_24K: 837 case PRID_IMP_24K:
829 c->cputype = CPU_24K; 838 c->cputype = CPU_24K;
839 c->writecombine = _CACHE_UNCACHED;
830 __cpu_name[cpu] = "MIPS 24Kc"; 840 __cpu_name[cpu] = "MIPS 24Kc";
831 break; 841 break;
832 case PRID_IMP_24KE: 842 case PRID_IMP_24KE:
833 c->cputype = CPU_24K; 843 c->cputype = CPU_24K;
844 c->writecombine = _CACHE_UNCACHED;
834 __cpu_name[cpu] = "MIPS 24KEc"; 845 __cpu_name[cpu] = "MIPS 24KEc";
835 break; 846 break;
836 case PRID_IMP_25KF: 847 case PRID_IMP_25KF:
837 c->cputype = CPU_25KF; 848 c->cputype = CPU_25KF;
849 c->writecombine = _CACHE_UNCACHED;
838 __cpu_name[cpu] = "MIPS 25Kc"; 850 __cpu_name[cpu] = "MIPS 25Kc";
839 break; 851 break;
840 case PRID_IMP_34K: 852 case PRID_IMP_34K:
841 c->cputype = CPU_34K; 853 c->cputype = CPU_34K;
854 c->writecombine = _CACHE_UNCACHED;
842 __cpu_name[cpu] = "MIPS 34Kc"; 855 __cpu_name[cpu] = "MIPS 34Kc";
843 break; 856 break;
844 case PRID_IMP_74K: 857 case PRID_IMP_74K:
845 c->cputype = CPU_74K; 858 c->cputype = CPU_74K;
859 c->writecombine = _CACHE_UNCACHED;
846 __cpu_name[cpu] = "MIPS 74Kc"; 860 __cpu_name[cpu] = "MIPS 74Kc";
847 break; 861 break;
848 case PRID_IMP_M14KC: 862 case PRID_IMP_M14KC:
849 c->cputype = CPU_M14KC; 863 c->cputype = CPU_M14KC;
864 c->writecombine = _CACHE_UNCACHED;
850 __cpu_name[cpu] = "MIPS M14Kc"; 865 __cpu_name[cpu] = "MIPS M14Kc";
851 break; 866 break;
852 case PRID_IMP_M14KEC: 867 case PRID_IMP_M14KEC:
853 c->cputype = CPU_M14KEC; 868 c->cputype = CPU_M14KEC;
869 c->writecombine = _CACHE_UNCACHED;
854 __cpu_name[cpu] = "MIPS M14KEc"; 870 __cpu_name[cpu] = "MIPS M14KEc";
855 break; 871 break;
856 case PRID_IMP_1004K: 872 case PRID_IMP_1004K:
857 c->cputype = CPU_1004K; 873 c->cputype = CPU_1004K;
874 c->writecombine = _CACHE_UNCACHED;
858 __cpu_name[cpu] = "MIPS 1004Kc"; 875 __cpu_name[cpu] = "MIPS 1004Kc";
859 break; 876 break;
860 case PRID_IMP_1074K: 877 case PRID_IMP_1074K:
861 c->cputype = CPU_1074K; 878 c->cputype = CPU_1074K;
879 c->writecombine = _CACHE_UNCACHED;
862 __cpu_name[cpu] = "MIPS 1074Kc"; 880 __cpu_name[cpu] = "MIPS 1074Kc";
863 break; 881 break;
864 case PRID_IMP_INTERAPTIV_UP: 882 case PRID_IMP_INTERAPTIV_UP:
@@ -932,6 +950,7 @@ static inline void cpu_probe_sibyte(struct cpuinfo_mips *c, unsigned int cpu)
932{ 950{
933 decode_configs(c); 951 decode_configs(c);
934 952
953 c->writecombine = _CACHE_UNCACHED_ACCELERATED;
935 switch (c->processor_id & PRID_IMP_MASK) { 954 switch (c->processor_id & PRID_IMP_MASK) {
936 case PRID_IMP_SB1: 955 case PRID_IMP_SB1:
937 c->cputype = CPU_SB1; 956 c->cputype = CPU_SB1;
@@ -1063,6 +1082,7 @@ static inline void cpu_probe_ingenic(struct cpuinfo_mips *c, unsigned int cpu)
1063 switch (c->processor_id & PRID_IMP_MASK) { 1082 switch (c->processor_id & PRID_IMP_MASK) {
1064 case PRID_IMP_JZRISC: 1083 case PRID_IMP_JZRISC:
1065 c->cputype = CPU_JZRISC; 1084 c->cputype = CPU_JZRISC;
1085 c->writecombine = _CACHE_UNCACHED_ACCELERATED;
1066 __cpu_name[cpu] = "Ingenic JZRISC"; 1086 __cpu_name[cpu] = "Ingenic JZRISC";
1067 break; 1087 break;
1068 default: 1088 default:
@@ -1169,6 +1189,7 @@ void cpu_probe(void)
1169 c->processor_id = PRID_IMP_UNKNOWN; 1189 c->processor_id = PRID_IMP_UNKNOWN;
1170 c->fpu_id = FPIR_IMP_NONE; 1190 c->fpu_id = FPIR_IMP_NONE;
1171 c->cputype = CPU_UNKNOWN; 1191 c->cputype = CPU_UNKNOWN;
1192 c->writecombine = _CACHE_UNCACHED;
1172 1193
1173 c->processor_id = read_c0_prid(); 1194 c->processor_id = read_c0_prid();
1174 switch (c->processor_id & PRID_COMP_MASK) { 1195 switch (c->processor_id & PRID_COMP_MASK) {
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 7c1fe2b42d40..b3b8f0d9d4a7 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -24,6 +24,8 @@
24#include <linux/debugfs.h> 24#include <linux/debugfs.h>
25#include <linux/kexec.h> 25#include <linux/kexec.h>
26#include <linux/sizes.h> 26#include <linux/sizes.h>
27#include <linux/device.h>
28#include <linux/dma-contiguous.h>
27 29
28#include <asm/addrspace.h> 30#include <asm/addrspace.h>
29#include <asm/bootinfo.h> 31#include <asm/bootinfo.h>
@@ -476,6 +478,7 @@ static void __init bootmem_init(void)
476 * o bootmem_init() 478 * o bootmem_init()
477 * o sparse_init() 479 * o sparse_init()
478 * o paging_init() 480 * o paging_init()
481 * o dma_continguous_reserve()
479 * 482 *
480 * At this stage the bootmem allocator is ready to use. 483 * At this stage the bootmem allocator is ready to use.
481 * 484 *
@@ -609,6 +612,7 @@ static void __init request_crashkernel(struct resource *res)
609 612
610static void __init arch_mem_init(char **cmdline_p) 613static void __init arch_mem_init(char **cmdline_p)
611{ 614{
615 struct memblock_region *reg;
612 extern void plat_mem_setup(void); 616 extern void plat_mem_setup(void);
613 617
614 /* call board setup routine */ 618 /* call board setup routine */
@@ -675,6 +679,11 @@ static void __init arch_mem_init(char **cmdline_p)
675 sparse_init(); 679 sparse_init();
676 plat_swiotlb_setup(); 680 plat_swiotlb_setup();
677 paging_init(); 681 paging_init();
682
683 dma_contiguous_reserve(PFN_PHYS(max_low_pfn));
684 /* Tell bootmem about cma reserved memblock section */
685 for_each_memblock(reserved, reg)
686 reserve_bootmem(reg->base, reg->size, BOOTMEM_DEFAULT);
678} 687}
679 688
680static void __init resource_init(void) 689static void __init resource_init(void)