diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/boot/compressed/head.S | 14 | ||||
-rw-r--r-- | arch/arm/mm/proc-v6.S | 2 | ||||
-rw-r--r-- | arch/mips/kernel/setup.c | 26 | ||||
-rw-r--r-- | arch/mips/lib/mips-atomic.c | 8 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/eeh_pe.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/msi.c | 3 |
6 files changed, 41 insertions, 14 deletions
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 90275f036cd1..49ca86e37b8d 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -652,6 +652,15 @@ __setup_mmu: sub r3, r4, #16384 @ Page directory size | |||
652 | mov pc, lr | 652 | mov pc, lr |
653 | ENDPROC(__setup_mmu) | 653 | ENDPROC(__setup_mmu) |
654 | 654 | ||
655 | @ Enable unaligned access on v6, to allow better code generation | ||
656 | @ for the decompressor C code: | ||
657 | __armv6_mmu_cache_on: | ||
658 | mrc p15, 0, r0, c1, c0, 0 @ read SCTLR | ||
659 | bic r0, r0, #2 @ A (no unaligned access fault) | ||
660 | orr r0, r0, #1 << 22 @ U (v6 unaligned access model) | ||
661 | mcr p15, 0, r0, c1, c0, 0 @ write SCTLR | ||
662 | b __armv4_mmu_cache_on | ||
663 | |||
655 | __arm926ejs_mmu_cache_on: | 664 | __arm926ejs_mmu_cache_on: |
656 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | 665 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH |
657 | mov r0, #4 @ put dcache in WT mode | 666 | mov r0, #4 @ put dcache in WT mode |
@@ -694,6 +703,9 @@ __armv7_mmu_cache_on: | |||
694 | bic r0, r0, #1 << 28 @ clear SCTLR.TRE | 703 | bic r0, r0, #1 << 28 @ clear SCTLR.TRE |
695 | orr r0, r0, #0x5000 @ I-cache enable, RR cache replacement | 704 | orr r0, r0, #0x5000 @ I-cache enable, RR cache replacement |
696 | orr r0, r0, #0x003c @ write buffer | 705 | orr r0, r0, #0x003c @ write buffer |
706 | bic r0, r0, #2 @ A (no unaligned access fault) | ||
707 | orr r0, r0, #1 << 22 @ U (v6 unaligned access model) | ||
708 | @ (needed for ARM1176) | ||
697 | #ifdef CONFIG_MMU | 709 | #ifdef CONFIG_MMU |
698 | #ifdef CONFIG_CPU_ENDIAN_BE8 | 710 | #ifdef CONFIG_CPU_ENDIAN_BE8 |
699 | orr r0, r0, #1 << 25 @ big-endian page tables | 711 | orr r0, r0, #1 << 25 @ big-endian page tables |
@@ -914,7 +926,7 @@ proc_types: | |||
914 | 926 | ||
915 | .word 0x0007b000 @ ARMv6 | 927 | .word 0x0007b000 @ ARMv6 |
916 | .word 0x000ff000 | 928 | .word 0x000ff000 |
917 | W(b) __armv4_mmu_cache_on | 929 | W(b) __armv6_mmu_cache_on |
918 | W(b) __armv4_mmu_cache_off | 930 | W(b) __armv4_mmu_cache_off |
919 | W(b) __armv6_mmu_cache_flush | 931 | W(b) __armv6_mmu_cache_flush |
920 | 932 | ||
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S index 86b8b480634f..09c5233f4dfc 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S | |||
@@ -89,7 +89,7 @@ ENTRY(cpu_v6_dcache_clean_area) | |||
89 | mov pc, lr | 89 | mov pc, lr |
90 | 90 | ||
91 | /* | 91 | /* |
92 | * cpu_arm926_switch_mm(pgd_phys, tsk) | 92 | * cpu_v6_switch_mm(pgd_phys, tsk) |
93 | * | 93 | * |
94 | * Set the translation table base pointer to be pgd_phys | 94 | * Set the translation table base pointer to be pgd_phys |
95 | * | 95 | * |
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index a53f8ec37aac..290dc6a1d7a3 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c | |||
@@ -79,7 +79,7 @@ static struct resource data_resource = { .name = "Kernel data", }; | |||
79 | void __init add_memory_region(phys_t start, phys_t size, long type) | 79 | void __init add_memory_region(phys_t start, phys_t size, long type) |
80 | { | 80 | { |
81 | int x = boot_mem_map.nr_map; | 81 | int x = boot_mem_map.nr_map; |
82 | struct boot_mem_map_entry *prev = boot_mem_map.map + x - 1; | 82 | int i; |
83 | 83 | ||
84 | /* Sanity check */ | 84 | /* Sanity check */ |
85 | if (start + size < start) { | 85 | if (start + size < start) { |
@@ -88,15 +88,29 @@ void __init add_memory_region(phys_t start, phys_t size, long type) | |||
88 | } | 88 | } |
89 | 89 | ||
90 | /* | 90 | /* |
91 | * Try to merge with previous entry if any. This is far less than | 91 | * Try to merge with existing entry, if any. |
92 | * perfect but is sufficient for most real world cases. | ||
93 | */ | 92 | */ |
94 | if (x && prev->addr + prev->size == start && prev->type == type) { | 93 | for (i = 0; i < boot_mem_map.nr_map; i++) { |
95 | prev->size += size; | 94 | struct boot_mem_map_entry *entry = boot_mem_map.map + i; |
95 | unsigned long top; | ||
96 | |||
97 | if (entry->type != type) | ||
98 | continue; | ||
99 | |||
100 | if (start + size < entry->addr) | ||
101 | continue; /* no overlap */ | ||
102 | |||
103 | if (entry->addr + entry->size < start) | ||
104 | continue; /* no overlap */ | ||
105 | |||
106 | top = max(entry->addr + entry->size, start + size); | ||
107 | entry->addr = min(entry->addr, start); | ||
108 | entry->size = top - entry->addr; | ||
109 | |||
96 | return; | 110 | return; |
97 | } | 111 | } |
98 | 112 | ||
99 | if (x == BOOT_MEM_MAP_MAX) { | 113 | if (boot_mem_map.nr_map == BOOT_MEM_MAP_MAX) { |
100 | pr_err("Ooops! Too many entries in the memory map!\n"); | 114 | pr_err("Ooops! Too many entries in the memory map!\n"); |
101 | return; | 115 | return; |
102 | } | 116 | } |
diff --git a/arch/mips/lib/mips-atomic.c b/arch/mips/lib/mips-atomic.c index e091430dbeb1..cd160be3ce4d 100644 --- a/arch/mips/lib/mips-atomic.c +++ b/arch/mips/lib/mips-atomic.c | |||
@@ -56,7 +56,7 @@ __asm__( | |||
56 | " .set pop \n" | 56 | " .set pop \n" |
57 | " .endm \n"); | 57 | " .endm \n"); |
58 | 58 | ||
59 | void arch_local_irq_disable(void) | 59 | notrace void arch_local_irq_disable(void) |
60 | { | 60 | { |
61 | preempt_disable(); | 61 | preempt_disable(); |
62 | __asm__ __volatile__( | 62 | __asm__ __volatile__( |
@@ -93,7 +93,7 @@ __asm__( | |||
93 | " .set pop \n" | 93 | " .set pop \n" |
94 | " .endm \n"); | 94 | " .endm \n"); |
95 | 95 | ||
96 | unsigned long arch_local_irq_save(void) | 96 | notrace unsigned long arch_local_irq_save(void) |
97 | { | 97 | { |
98 | unsigned long flags; | 98 | unsigned long flags; |
99 | preempt_disable(); | 99 | preempt_disable(); |
@@ -135,7 +135,7 @@ __asm__( | |||
135 | " .set pop \n" | 135 | " .set pop \n" |
136 | " .endm \n"); | 136 | " .endm \n"); |
137 | 137 | ||
138 | void arch_local_irq_restore(unsigned long flags) | 138 | notrace void arch_local_irq_restore(unsigned long flags) |
139 | { | 139 | { |
140 | unsigned long __tmp1; | 140 | unsigned long __tmp1; |
141 | 141 | ||
@@ -159,7 +159,7 @@ void arch_local_irq_restore(unsigned long flags) | |||
159 | EXPORT_SYMBOL(arch_local_irq_restore); | 159 | EXPORT_SYMBOL(arch_local_irq_restore); |
160 | 160 | ||
161 | 161 | ||
162 | void __arch_local_irq_restore(unsigned long flags) | 162 | notrace void __arch_local_irq_restore(unsigned long flags) |
163 | { | 163 | { |
164 | unsigned long __tmp1; | 164 | unsigned long __tmp1; |
165 | 165 | ||
diff --git a/arch/powerpc/platforms/pseries/eeh_pe.c b/arch/powerpc/platforms/pseries/eeh_pe.c index 797cd181dc3f..d16c8ded1084 100644 --- a/arch/powerpc/platforms/pseries/eeh_pe.c +++ b/arch/powerpc/platforms/pseries/eeh_pe.c | |||
@@ -449,7 +449,7 @@ int eeh_rmv_from_parent_pe(struct eeh_dev *edev, int purge_pe) | |||
449 | if (list_empty(&pe->edevs)) { | 449 | if (list_empty(&pe->edevs)) { |
450 | cnt = 0; | 450 | cnt = 0; |
451 | list_for_each_entry(child, &pe->child_list, child) { | 451 | list_for_each_entry(child, &pe->child_list, child) { |
452 | if (!(pe->type & EEH_PE_INVALID)) { | 452 | if (!(child->type & EEH_PE_INVALID)) { |
453 | cnt++; | 453 | cnt++; |
454 | break; | 454 | break; |
455 | } | 455 | } |
diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c index d19f4977c834..e5b084723131 100644 --- a/arch/powerpc/platforms/pseries/msi.c +++ b/arch/powerpc/platforms/pseries/msi.c | |||
@@ -220,7 +220,8 @@ static struct device_node *find_pe_dn(struct pci_dev *dev, int *total) | |||
220 | 220 | ||
221 | /* Get the top level device in the PE */ | 221 | /* Get the top level device in the PE */ |
222 | edev = of_node_to_eeh_dev(dn); | 222 | edev = of_node_to_eeh_dev(dn); |
223 | edev = list_first_entry(&edev->pe->edevs, struct eeh_dev, list); | 223 | if (edev->pe) |
224 | edev = list_first_entry(&edev->pe->edevs, struct eeh_dev, list); | ||
224 | dn = eeh_dev_to_of_node(edev); | 225 | dn = eeh_dev_to_of_node(edev); |
225 | if (!dn) | 226 | if (!dn) |
226 | return NULL; | 227 | return NULL; |