Age | Commit message (Collapse) | Author | Files | Lines |
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
This is require for __iomem definition.
Signed-off-by: Ley Foon Tan <[email protected]>
|
|
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]>
|
|
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]>
|
|
Remove extra space between # and define.
Signed-off-by: Ley Foon Tan <[email protected]>
|
|
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]>
|
|
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]>
|
|
This patch adds Makefile and Kconfig files required for building a
nios2 kernel.
Signed-off-by: Ley Foon Tan <[email protected]>
|
|
Add ptrace support for nios2.
Signed-off-by: Ley Foon Tan <[email protected]>
|
|
This patch adds support for loadable modules.
Signed-off-by: Ley Foon Tan <[email protected]>
|
|
This file contains constants for the instruction macros, cpu registers,
fields and bits.
Signed-off-by: Ley Foon Tan <[email protected]>
|
|
This patch introduces a few nios2-specific header files.
Signed-off-by: Ley Foon Tan <[email protected]>
|
|
Signed-off-by: Ley Foon Tan <[email protected]>
|
|
Add time keeping code for nios2.
Signed-off-by: Ley Foon Tan <[email protected]>
Reviewed-by: Thomas Gleixner <[email protected]>
|
|
Add device tree support to arch/nios2.
Signed-off-by: Ley Foon Tan <[email protected]>
|
|
Add optimised library functions for nios2.
Signed-off-by: Ley Foon Tan <[email protected]>
|
|
This patch adds support for signal handling.
Signed-off-by: Ley Foon Tan <[email protected]>
|
|
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]>
|
|
This patch adds definitions for the ELF format
Signed-off-by: Ley Foon Tan <[email protected]>
|
|
This patch adds support for the DMA mapping API.
Signed-off-by: Ley Foon Tan <[email protected]>
|
|
This patch adds the support for IRQ handling.
Signed-off-by: Ley Foon Tan <[email protected]>
Reviewed-by: Thomas Gleixner <[email protected]>
|
|
This patch adds the TLB maintenance functions.
Signed-off-by: Ley Foon Tan <[email protected]>
|
|
This patch adds functionality required for cache maintenance.
Signed-off-by: Ley Foon Tan <[email protected]>
|
|
This patch adds support for thread creation and context switching.
Signed-off-by: Ley Foon Tan <[email protected]>
|
|
This patch adds support for page table management.
Signed-off-by: Ley Foon Tan <[email protected]>
|
|
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]>
|
|
This patch adds several definitions for I/O accessors and ioremap().
Signed-off-by: Ley Foon Tan <[email protected]>
|
|
This patch contains the initialisation of the memory blocks, MMU
attributes and the memory map.
Signed-off-by: Ley Foon Tan <[email protected]>
|
|
This patch contains traps exception handling.
Signed-off-by: Ley Foon Tan <[email protected]>
|
|
This patch contains the exception entry code (kernel/entry.S) and
misaligned exception.
Signed-off-by: Ley Foon Tan <[email protected]>
|
|
This patch adds the kernel booting and the initial setup code.
Signed-off-by: Ley Foon Tan <[email protected]>
|
|
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]>
|
|
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]>
|
|
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
|
|
This resolves the merge issue with drivers/tty/serial/of_serial.c
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
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]>
|
|
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]>
|
|
apply_microcode_early() doesn't use mc_saved_data, kill it.
Signed-off-by: Borislav Petkov <[email protected]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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
|
|
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]>
|
|
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]>
|