aboutsummaryrefslogtreecommitdiff
path: root/arch
AgeCommit message (Collapse)AuthorFilesLines
2014-12-08s390/idle: add missing irq off lockdep annotationHeiko Carstens1-0/+2
psw_idle() returns with interrupts disabled, so we should add the missing annotation. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2014-12-08s390/debug: avoid function call for debug_sprintf_*Christian Borntraeger2-10/+31
debug_sprintf_event/exception are called even for debug events with a disabling debug level. All other functions already do the check in a wrapper function. Lets do the same here. Due to the var_args the compiler rejects to make this function inline. So let's wrap this via a macro. This patch saves around 80 ns on my z196 for a KVM round trip (we have two debug statements for entry and exit) when KVM is build as a module. The savings for built-in drivers is smaller as we then avoid the PLT overhead for a function call. Signed-off-by: Christian Borntraeger <[email protected]> Reviewed-by: Michael Holzheu <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2014-12-08nios2: Make NIOS2_CMDLINE_IGNORE_DTB depend on CMDLINE_BOOLTobias Klauser1-0/+1
If NIOS2_CMDLINE_IGNORE_DTB is selected but CMDLINE_BOOL isn't and thus CONFIG_CMDLINE is not defined, the build fails with the following error: arch/nios2/kernel/setup.c: In function 'nios2_boot_init': arch/nios2/kernel/setup.c:131:30: error: 'CONFIG_CMDLINE' undeclared (first use in this function) strncpy(boot_command_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE); This can be reproduced using randconfig with KCONFIG_SEED=0xE5B8749E, i.e. 'make KCONFIG_SEED=0xE5B8749E ARCH=nios2 randconfig'. Fix this by letting NIOS2_CMDLINE_IGNORE_DTB depend on CMDLINE_BOOL, so we actually have a default kernel command string to fall back to. Signed-off-by: Tobias Klauser <[email protected]> Acked-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: Add missing NR_CPUS to KconfigTobias Klauser1-0/+4
kernel/time/Kconfig expects that NR_CPUS is defined. This fixes the following config warning: "kernel/time/Kconfig:163:warning: range is invalid" Follow 4cbbbb43d666 ("microblaze: Fix missing NR_CPUS in menuconfig") Signed-off-by: Tobias Klauser <[email protected]> Acked-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: asm-offsets: Remove unused definition TI_TASKTobias Klauser1-1/+0
TI_TASK is not used in nios2 assembly code, so remove it. Signed-off-by: Tobias Klauser <[email protected]> Acked-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: Remove write-only struct member from nios2_timerTobias Klauser1-2/+0
The irq member of struct nios2_timer is only written to but never read, thus it can be removed. Signed-off-by: Tobias Klauser <[email protected]> Acked-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: Remove unused extern declaration of shm_align_maskTobias Klauser1-2/+0
shm_align_mask is not defined/used on nios2, thus there is no need to declare it. Signed-off-by: Tobias Klauser <[email protected]> Acked-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: include linux/type.h in io.hLey Foon Tan1-0/+1
This is require for __iomem definition. Signed-off-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: move include asm-generic/io.h to end of fileLey Foon Tan1-2/+2
Move asm-generic/io.h to end of file to override functions like phys_to_virt, virt_to_phys in asm-generic/io.h. This is due to recent commit 9216efaf introduced new way to override functions by checking for the existence of a macro with the same of the function. Signed-off-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: remove include asm-generic/iomap.h from io.hLey Foon Tan1-1/+0
Don't need asm-generic/iomap.h and asm-generic/io.h added default ioread8/16/32 iowrite8/16/32 implementation. Signed-off-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: remove unnecessary space before defineLey Foon Tan1-4/+4
Remove extra space between # and define. Signed-off-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: fix error handling of irq_of_parse_and_mapDmitry Torokhov1-1/+1
Return value of irq_of_parse_and_map() is unsigned int, with 0 indicating failure, so testing for negative result never works. Signed-off-by: Dmitry Torokhov <[email protected]> Reviewed-by: Tobias Klauser <[email protected]> Acked-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: Use IS_ENABLED instead of #ifdefs to check config symbolsTobias Klauser1-9/+5
Make the checking for div/mul/mulx instruction config symbols easier to read by using IS_ENABLED instead of #ifdefs. Signed-off-by: Tobias Klauser <[email protected]> Acked-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: Build infrastructureLey Foon Tan15-0/+826
This patch adds Makefile and Kconfig files required for building a nios2 kernel. Signed-off-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: ptrace supportLey Foon Tan3-0/+319
Add ptrace support for nios2. Signed-off-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: Module supportLey Foon Tan1-0/+138
This patch adds support for loadable modules. Signed-off-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: Nios2 registersLey Foon Tan1-0/+71
This file contains constants for the instruction macros, cpu registers, fields and bits. Signed-off-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: Miscellaneous header filesLey Foon Tan5-0/+146
This patch introduces a few nios2-specific header files. Signed-off-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: Cpuinfo handlingLey Foon Tan2-0/+258
Signed-off-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: Time keepingLey Foon Tan4-0/+407
Add time keeping code for nios2. Signed-off-by: Ley Foon Tan <[email protected]> Reviewed-by: Thomas Gleixner <[email protected]>
2014-12-08nios2: Device tree supportLey Foon Tan4-0/+294
Add device tree support to arch/nios2. Signed-off-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: Library functionsLey Foon Tan5-0/+467
Add optimised library functions for nios2. Signed-off-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: Signal handling supportLey Foon Tan5-0/+428
This patch adds support for signal handling. Signed-off-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: System calls handlingLey Foon Tan5-0/+270
This patch adds support for system calls from userspaces. It uses the asm-generic/unistd.h definitions with architecture spcific syscall. The sys_call_table is just an array defined in a C file and it contains pointers to the syscall functions. Signed-off-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: ELF definitionsLey Foon Tan2-0/+168
This patch adds definitions for the ELF format Signed-off-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: DMA mapping APILey Foon Tan2-0/+326
This patch adds support for the DMA mapping API. Signed-off-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: Interrupt handlingLey Foon Tan3-0/+193
This patch adds the support for IRQ handling. Signed-off-by: Ley Foon Tan <[email protected]> Reviewed-by: Thomas Gleixner <[email protected]>
2014-12-08nios2: TLB handlingLey Foon Tan3-0/+355
This patch adds the TLB maintenance functions. Signed-off-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: Cache handlingLey Foon Tan3-0/+359
This patch adds functionality required for cache maintenance. Signed-off-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: Process managementLey Foon Tan6-0/+694
This patch adds support for thread creation and context switching. Signed-off-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: Page table managementLey Foon Tan4-0/+505
This patch adds support for page table management. Signed-off-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: MMU Fault handlingLey Foon Tan2-0/+276
This patch adds support for the handling of the MMU faults (exception entry code introduced by a previous patch, kernel/entry.S). Signed-off-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: I/O MappingLey Foon Tan2-0/+248
This patch adds several definitions for I/O accessors and ioremap(). Signed-off-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: Memory managementLey Foon Tan5-0/+663
This patch contains the initialisation of the memory blocks, MMU attributes and the memory map. Signed-off-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: Traps exception handlingLey Foon Tan3-0/+796
This patch contains traps exception handling. Signed-off-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: Exception handlingLey Foon Tan2-0/+811
This patch contains the exception entry code (kernel/entry.S) and misaligned exception. Signed-off-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: Kernel booting and initializationLey Foon Tan4-0/+551
This patch adds the kernel booting and the initial setup code. Signed-off-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: Assembly macros and definitionsLey Foon Tan3-0/+417
This patch add assembly macros and definitions used in the .S files across arch/nios2/ and together with asm-offsets.c. Signed-off-by: Ley Foon Tan <[email protected]>
2014-12-08powerpc/powernv: Return to cpu offline loop when finished in KVM guestPaul Mackerras5-25/+68
When a secondary hardware thread has finished running a KVM guest, we currently put that thread into nap mode using a nap instruction in the KVM code. This changes the code so that instead of doing a nap instruction directly, we instead cause the call to power7_nap() that put the thread into nap mode to return. The reason for doing this is to avoid having the KVM code having to know what low-power mode to put the thread into. In the case of a secondary thread used to run a KVM guest, the thread will be offline from the point of view of the host kernel, and the relevant power7_nap() call is the one in pnv_smp_cpu_disable(). In this case we don't want to clear pending IPIs in the offline loop in that function, since that might cause us to miss the wakeup for the next time the thread needs to run a guest. To tell whether or not to clear the interrupt, we use the SRR1 value returned from power7_nap(), and check if it indicates an external interrupt. We arrange that the return from power7_nap() when we have finished running a guest returns 0, so pending interrupts don't get flushed in that case. Note that it is important a secondary thread that has finished executing in the guest, or that didn't have a guest to run, should not return to power7_nap's caller while the kvm_hstate.hwthread_req flag in the PACA is non-zero, because the return from power7_nap will reenable the MMU, and the MMU might still be in guest context. In this situation we spin at low priority in real mode waiting for hwthread_req to become zero. Signed-off-by: Paul Mackerras <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
2014-12-08Merge tag 'v3.18' into drm-nextDave Airlie3-7/+5
Linux 3.18 Backmerge Linus tree into -next as we had conflicts in i915/radeon/nouveau, and everyone was solving them individually. * tag 'v3.18': (57 commits) Linux 3.18 watchdog: s3c2410_wdt: Fix the mask bit offset for Exynos7 uapi: fix to export linux/vm_sockets.h i2c: cadence: Set the hardware time-out register to maximum value i2c: davinci: generate STP always when NACK is received ahci: disable MSI on SAMSUNG 0xa800 SSD context_tracking: Restore previous state in schedule_user slab: fix nodeid bounds check for non-contiguous node IDs lib/genalloc.c: export devm_gen_pool_create() for modules mm: fix anon_vma_clone() error treatment mm: fix swapoff hang after page migration and fork fat: fix oops on corrupted vfat fs ipc/sem.c: fully initialize sem_array before making it visible drivers/input/evdev.c: don't kfree() a vmalloc address cxgb4: Fill in supported link mode for SFP modules xen-netfront: Remove BUGs on paged skb data which crosses a page boundary mm/vmpressure.c: fix race in vmpressure_work_fn() mm: frontswap: invalidate expired data on a dup-store failure mm: do not overwrite reserved pages counter at show_mem() drm/radeon: kernel panic in drm_calc_vbltimestamp_from_scanoutpos with 3.18.0-rc6 ... Conflicts: drivers/gpu/drm/i915/intel_display.c drivers/gpu/drm/nouveau/nouveau_drm.c drivers/gpu/drm/radeon/radeon_cs.c
2014-12-06Merge 3.18-rc7 into tty-nextGreg Kroah-Hartman143-409/+1027
This resolves the merge issue with drivers/tty/serial/of_serial.c Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-12-06x86, microcode: Reload microcode on resumeBorislav Petkov7-16/+84
Normally, we do reapply microcode on resume. However, in the cases where that microcode comes from the early loader and the late loader hasn't been utilized yet, there's no easy way for us to go and apply the patch applied during boot by the early loader. Thus, reuse the patch stashed by the early loader for the BSP. Signed-off-by: Borislav Petkov <[email protected]>
2014-12-06x86, microcode: Don't initialize microcode code on paravirtBoris Ostrovsky1-1/+1
Paravirtual guests are not expected to load microcode into processors and therefore it is not necessary to initialize microcode loading logic. In fact, under certain circumstances initializing this logic may cause the guest to crash. Specifically, 32-bit kernels use __pa_nodebug() macro which does not work in Xen (the code path that leads to this macro happens during resume when we call mc_bp_resume()->load_ucode_ap() ->check_loader_disabled_ap()) Signed-off-by: Boris Ostrovsky <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Borislav Petkov <[email protected]>
2014-12-06x86, microcode, intel: Drop unused parameterBorislav Petkov1-4/+3
apply_microcode_early() doesn't use mc_saved_data, kill it. Signed-off-by: Borislav Petkov <[email protected]>
2014-12-05net: sock: allow eBPF programs to be attached to socketsAlexei Starovoitov13-0/+39
introduce new setsockopt() command: setsockopt(sock, SOL_SOCKET, SO_ATTACH_BPF, &prog_fd, sizeof(prog_fd)) where prog_fd was received from syscall bpf(BPF_PROG_LOAD, attr, ...) and attr->prog_type == BPF_PROG_TYPE_SOCKET_FILTER setsockopt() calls bpf_prog_get() which increments refcnt of the program, so it doesn't get unloaded while socket is using the program. The same eBPF program can be attached to multiple sockets. User task exit automatically closes socket which calls sk_filter_uncharge() which decrements refcnt of eBPF program Signed-off-by: Alexei Starovoitov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-12-05bpf: x86: fix epilogue generation for eBPF programsAlexei Starovoitov1-2/+4
classic BPF has a restriction that last insn is always BPF_RET. eBPF doesn't have BPF_RET instruction and this restriction. It has BPF_EXIT insn which can appear anywhere in the program one or more times and it doesn't have to be last insn. Fix eBPF JIT to emit epilogue when first BPF_EXIT is seen and all other BPF_EXIT instructions will be emitted as jump. Since jump offset to epilogue is computed as: jmp_offset = ctx->cleanup_addr - addrs[i] we need to change type of cleanup_addr to signed to compute the offset as: (long long) ((int)20 - (int)30) instead of: (long long) ((unsigned int)20 - (int)30) Fixes: 622582786c9e ("net: filter: x86: internal BPF JIT") Signed-off-by: Alexei Starovoitov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-12-05groups: Consolidate the setgroups permission checksEric W. Biederman1-1/+1
Today there are 3 instances of setgroups and due to an oversight their permission checking has diverged. Add a common function so that they may all share the same permission checking code. This corrects the current oversight in the current permission checks and adds a helper to avoid this in the future. A user namespace security fix will update this new helper, shortly. Cc: [email protected] Signed-off-by: "Eric W. Biederman" <[email protected]>
2014-12-05Merge branch 'x86-urgent-for-linus' of ↵Linus Torvalds2-1/+3
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "Two final fixlets for 3.18: - Prevent microcode reload wreckage on 32bit - Unbreak cross compilation" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86, microcode: Limit the microcode reloading to 64-bit for now x86: Use $(OBJDUMP) instead of plain objdump
2014-12-05ARM: dts: rk3288: add arm,cpu-registers-not-fw-configuredSonny Rao1-0/+1
This will enable use of physical arch timers on rk3288, where each core comes out of reset with a different virtual offset. Using physical timers will help with SMP booting on coreboot and older u-boot and should also allow suspend-resume and cpu-hotplug to work on all firmwares. Firmware which does initialize the cpu registers properly at boot and cpu-hotplug can remove this property from the device tree. Signed-off-by: Sonny Rao <[email protected]> Signed-off-by: Olof Johansson <[email protected]>
2014-12-05ARM: omap2plus_defconfig: enable ECAP and EHRPWMFelipe Balbi1-0/+2
Many of AM335x and AM437x hook backlight to one of these two devices. By enabling their drivers we make sure pwm-backlight can do its thing. Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>