Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm

Pull ARM fixes from Russell King:
"A random collection of various fixes, mainly from Arnd and a few other
people. Not thing really stands out here."

* 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
ARM: drop experimental status for hotplug and Thumb2
ARM: 7560/1: SMP_TWD: use DIV_ROUND_CLOSEST() for periodic mode
ARM: 7559/1: smp: switch away from the idmap before updating init_mm.mm_count
ARM: 7556/1: perf: fix updated event period in response to PERF_EVENT_IOC_PERIOD
ARM: 7555/1: kexec: fix segment memory addresses check
ARM: warnings in arch/arm/include/asm/uaccess.h
ARM: binfmt_flat: unused variable 'persistent'
ARM: be really quiet when building with 'make -s'
ARM: pass -marm to gcc by default for both C and assembler
ARM: Xen: fix initial build problems
ARM: export default read_current_timer
ARM: Fix another build warning in arch/arm/mm/alignment.c
ARM: export set_irq_flags
ARM: kprobes: make more tests conditional

+52 -30
+5 -4
arch/arm/Kconfig
··· 1603 1603 default "4" 1604 1604 1605 1605 config HOTPLUG_CPU 1606 - bool "Support for hot-pluggable CPUs (EXPERIMENTAL)" 1607 - depends on SMP && HOTPLUG && EXPERIMENTAL 1606 + bool "Support for hot-pluggable CPUs" 1607 + depends on SMP && HOTPLUG 1608 1608 help 1609 1609 Say Y here to experiment with turning CPUs off and on. CPUs 1610 1610 can be controlled through /sys/devices/system/cpu. ··· 1645 1645 default 100 1646 1646 1647 1647 config THUMB2_KERNEL 1648 - bool "Compile the kernel in Thumb-2 mode (EXPERIMENTAL)" 1649 - depends on CPU_V7 && !CPU_V6 && !CPU_V6K && EXPERIMENTAL 1648 + bool "Compile the kernel in Thumb-2 mode" 1649 + depends on CPU_V7 && !CPU_V6 && !CPU_V6K 1650 1650 select AEABI 1651 1651 select ARM_ASM_UNIFIED 1652 1652 select ARM_UNWIND ··· 1850 1850 config XEN 1851 1851 bool "Xen guest support on ARM (EXPERIMENTAL)" 1852 1852 depends on EXPERIMENTAL && ARM && OF 1853 + depends on CPU_V7 && !CPU_V6 1853 1854 help 1854 1855 Say Y if you want to run Linux in a Virtual Machine on Xen on ARM. 1855 1856
+7 -6
arch/arm/Makefile
··· 21 21 OBJCOPYFLAGS :=-O binary -R .comment -S 22 22 GZFLAGS :=-9 23 23 #KBUILD_CFLAGS +=-pipe 24 - # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: 25 - KBUILD_CFLAGS +=$(call cc-option,-marm,) 26 24 27 25 # Never generate .eh_frame 28 26 KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm) ··· 103 105 ifeq ($(CONFIG_THUMB2_KERNEL),y) 104 106 AFLAGS_AUTOIT :=$(call as-option,-Wa$(comma)-mimplicit-it=always,-Wa$(comma)-mauto-it) 105 107 AFLAGS_NOWARN :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W) 106 - CFLAGS_THUMB2 :=-mthumb $(AFLAGS_AUTOIT) $(AFLAGS_NOWARN) 107 - AFLAGS_THUMB2 :=$(CFLAGS_THUMB2) -Wa$(comma)-mthumb 108 + CFLAGS_ISA :=-mthumb $(AFLAGS_AUTOIT) $(AFLAGS_NOWARN) 109 + AFLAGS_ISA :=$(CFLAGS_ISA) -Wa$(comma)-mthumb 108 110 # Work around buggy relocation from gas if requested: 109 111 ifeq ($(CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11),y) 110 112 CFLAGS_MODULE +=-fno-optimize-sibling-calls 111 113 endif 114 + else 115 + CFLAGS_ISA :=$(call cc-option,-marm,) 116 + AFLAGS_ISA :=$(CFLAGS_ISA) 112 117 endif 113 118 114 119 # Need -Uarm for gcc < 3.x 115 - KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_THUMB2) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm 116 - KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_THUMB2) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float 120 + KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm 121 + KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float 117 122 118 123 CHECKFLAGS += -D__arm__ 119 124
+5 -5
arch/arm/boot/Makefile
··· 33 33 34 34 $(obj)/xipImage: vmlinux FORCE 35 35 $(call if_changed,objcopy) 36 - @echo ' Kernel: $@ is ready (physical address: $(CONFIG_XIP_PHYS_ADDR))' 36 + $(kecho) ' Kernel: $@ is ready (physical address: $(CONFIG_XIP_PHYS_ADDR))' 37 37 38 38 $(obj)/Image $(obj)/zImage: FORCE 39 39 @echo 'Kernel configured for XIP (CONFIG_XIP_KERNEL=y)' ··· 48 48 49 49 $(obj)/Image: vmlinux FORCE 50 50 $(call if_changed,objcopy) 51 - @echo ' Kernel: $@ is ready' 51 + $(kecho) ' Kernel: $@ is ready' 52 52 53 53 $(obj)/compressed/vmlinux: $(obj)/Image FORCE 54 54 $(Q)$(MAKE) $(build)=$(obj)/compressed $@ 55 55 56 56 $(obj)/zImage: $(obj)/compressed/vmlinux FORCE 57 57 $(call if_changed,objcopy) 58 - @echo ' Kernel: $@ is ready' 58 + $(kecho) ' Kernel: $@ is ready' 59 59 60 60 endif 61 61 ··· 90 90 $(obj)/uImage: $(obj)/zImage FORCE 91 91 @$(check_for_multiple_loadaddr) 92 92 $(call if_changed,uimage) 93 - @echo ' Image $@ is ready' 93 + $(kecho) ' Image $@ is ready' 94 94 95 95 $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE 96 96 $(Q)$(MAKE) $(build)=$(obj)/bootp $@ ··· 98 98 99 99 $(obj)/bootpImage: $(obj)/bootp/bootp FORCE 100 100 $(call if_changed,objcopy) 101 - @echo ' Kernel: $@ is ready' 101 + $(kecho) ' Kernel: $@ is ready' 102 102 103 103 PHONY += initrd FORCE 104 104 initrd:
+1 -1
arch/arm/include/asm/flat.h
··· 8 8 #define flat_argvp_envp_on_stack() 1 9 9 #define flat_old_ram_flag(flags) (flags) 10 10 #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) 11 - #define flat_get_addr_from_rp(rp, relval, flags, persistent) get_unaligned(rp) 11 + #define flat_get_addr_from_rp(rp, relval, flags, persistent) ((void)persistent,get_unaligned(rp)) 12 12 #define flat_put_addr_at_rp(rp, val, relval) put_unaligned(val,rp) 13 13 #define flat_get_relocate_addr(rel) (rel) 14 14 #define flat_set_persistent(relval, p) 0
+2 -2
arch/arm/include/asm/uaccess.h
··· 200 200 #define USER_DS KERNEL_DS 201 201 202 202 #define segment_eq(a,b) (1) 203 - #define __addr_ok(addr) (1) 204 - #define __range_ok(addr,size) (0) 203 + #define __addr_ok(addr) ((void)(addr),1) 204 + #define __range_ok(addr,size) ((void)(addr),0) 205 205 #define get_fs() (KERNEL_DS) 206 206 207 207 static inline void set_fs(mm_segment_t fs)
+2
arch/arm/kernel/irq.c
··· 34 34 #include <linux/list.h> 35 35 #include <linux/kallsyms.h> 36 36 #include <linux/proc_fs.h> 37 + #include <linux/export.h> 37 38 38 39 #include <asm/exception.h> 39 40 #include <asm/mach/arch.h> ··· 110 109 /* Order is clear bits in "clr" then set bits in "set" */ 111 110 irq_modify_status(irq, clr, set & ~clr); 112 111 } 112 + EXPORT_SYMBOL_GPL(set_irq_flags); 113 113 114 114 void __init init_IRQ(void) 115 115 {
+4
arch/arm/kernel/kprobes-test-arm.c
··· 366 366 TEST_UNSUPPORTED(".word 0xe04f0392 @ umaal r0, pc, r2, r3") 367 367 TEST_UNSUPPORTED(".word 0xe0500090 @ undef") 368 368 TEST_UNSUPPORTED(".word 0xe05fff9f @ undef") 369 + #endif 369 370 371 + #if __LINUX_ARM_ARCH__ >= 7 370 372 TEST_RRR( "mls r0, r",1, VAL1,", r",2, VAL2,", r",3, VAL3,"") 371 373 TEST_RRR( "mlshi r7, r",8, VAL3,", r",9, VAL1,", r",10, VAL2,"") 372 374 TEST_RR( "mls lr, r",1, VAL2,", r",2, VAL3,", r13") ··· 458 456 TEST_UNSUPPORTED(".word 0xe1700090") /* Unallocated space */ 459 457 #if __LINUX_ARM_ARCH__ >= 6 460 458 TEST_UNSUPPORTED("ldrex r2, [sp]") 459 + #endif 460 + #if (__LINUX_ARM_ARCH__ >= 7) || defined(CONFIG_CPU_32v6K) 461 461 TEST_UNSUPPORTED("strexd r0, r2, r3, [sp]") 462 462 TEST_UNSUPPORTED("ldrexd r2, r3, [sp]") 463 463 TEST_UNSUPPORTED("strexb r0, r2, [sp]")
+3 -4
arch/arm/kernel/machine_kexec.c
··· 45 45 for (i = 0; i < image->nr_segments; i++) { 46 46 current_segment = &image->segment[i]; 47 47 48 - err = memblock_is_region_memory(current_segment->mem, 49 - current_segment->memsz); 50 - if (err) 51 - return - EINVAL; 48 + if (!memblock_is_region_memory(current_segment->mem, 49 + current_segment->memsz)) 50 + return -EINVAL; 52 51 53 52 err = get_user(header, (__be32*)current_segment->buf); 54 53 if (err)
+4
arch/arm/kernel/perf_event.c
··· 96 96 s64 period = hwc->sample_period; 97 97 int ret = 0; 98 98 99 + /* The period may have been changed by PERF_EVENT_IOC_PERIOD */ 100 + if (unlikely(period != hwc->last_period)) 101 + left = period - (hwc->last_period - left); 102 + 99 103 if (unlikely(left <= -period)) { 100 104 left = period; 101 105 local64_set(&hwc->period_left, left);
+10 -4
arch/arm/kernel/smp.c
··· 294 294 asmlinkage void __cpuinit secondary_start_kernel(void) 295 295 { 296 296 struct mm_struct *mm = &init_mm; 297 - unsigned int cpu = smp_processor_id(); 297 + unsigned int cpu; 298 + 299 + /* 300 + * The identity mapping is uncached (strongly ordered), so 301 + * switch away from it before attempting any exclusive accesses. 302 + */ 303 + cpu_switch_mm(mm->pgd, mm); 304 + enter_lazy_tlb(mm, current); 305 + local_flush_tlb_all(); 298 306 299 307 /* 300 308 * All kernel threads share the same mm context; grab a 301 309 * reference and switch to it. 302 310 */ 311 + cpu = smp_processor_id(); 303 312 atomic_inc(&mm->mm_count); 304 313 current->active_mm = mm; 305 314 cpumask_set_cpu(cpu, mm_cpumask(mm)); 306 - cpu_switch_mm(mm->pgd, mm); 307 - enter_lazy_tlb(mm, current); 308 - local_flush_tlb_all(); 309 315 310 316 printk("CPU%u: Booted secondary processor\n", cpu); 311 317
+2 -2
arch/arm/kernel/smp_twd.c
··· 42 42 43 43 switch (mode) { 44 44 case CLOCK_EVT_MODE_PERIODIC: 45 - /* timer load already set up */ 46 45 ctrl = TWD_TIMER_CONTROL_ENABLE | TWD_TIMER_CONTROL_IT_ENABLE 47 46 | TWD_TIMER_CONTROL_PERIODIC; 48 - __raw_writel(twd_timer_rate / HZ, twd_base + TWD_TIMER_LOAD); 47 + __raw_writel(DIV_ROUND_CLOSEST(twd_timer_rate, HZ), 48 + twd_base + TWD_TIMER_LOAD); 49 49 break; 50 50 case CLOCK_EVT_MODE_ONESHOT: 51 51 /* period set, and timer enabled in 'next_event' hook */
+1
arch/arm/lib/delay.c
··· 45 45 *timer_val = delay_timer->read_current_timer(); 46 46 return 0; 47 47 } 48 + EXPORT_SYMBOL_GPL(read_current_timer); 48 49 49 50 static void __timer_delay(unsigned long cycles) 50 51 {
+3 -1
arch/arm/mm/alignment.c
··· 856 856 if (thumb2_32b) { 857 857 offset.un = 0; 858 858 handler = do_alignment_t32_to_handler(&instr, regs, &offset); 859 - } else 859 + } else { 860 + offset.un = 0; 860 861 handler = do_alignment_ldmstm; 862 + } 861 863 break; 862 864 863 865 default:
+1 -1
arch/arm/tools/Makefile
··· 5 5 # 6 6 7 7 include/generated/mach-types.h: $(src)/gen-mach-types $(src)/mach-types 8 - @echo ' Generating $@' 8 + $(kecho) ' Generating $@' 9 9 @mkdir -p $(dir $@) 10 10 $(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; }
+2
drivers/xen/Kconfig
··· 3 3 4 4 config XEN_BALLOON 5 5 bool "Xen memory balloon driver" 6 + depends on !ARM 6 7 default y 7 8 help 8 9 The balloon driver allows the Xen domain to request more memory from ··· 146 145 147 146 config XEN_TMEM 148 147 bool 148 + depends on !ARM 149 149 default y if (CLEANCACHE || FRONTSWAP) 150 150 help 151 151 Shim to interface in-kernel Transcendent Memory hooks