10 Aug, 2014
1 commit
-
Pull arch signal handling cleanup from Richard Weinberger:
"This patch series moves all remaining archs to the get_signal(),
signal_setup_done() and sigsp() functions.Currently these archs use open coded variants of the said functions.
Further, unused parameters get removed from get_signal_to_deliver(),
tracehook_signal_handler() and signal_delivered().At the end of the day we save around 500 lines of code."
* 'signal-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc: (43 commits)
powerpc: Use sigsp()
openrisc: Use sigsp()
mn10300: Use sigsp()
mips: Use sigsp()
microblaze: Use sigsp()
metag: Use sigsp()
m68k: Use sigsp()
m32r: Use sigsp()
hexagon: Use sigsp()
frv: Use sigsp()
cris: Use sigsp()
c6x: Use sigsp()
blackfin: Use sigsp()
avr32: Use sigsp()
arm64: Use sigsp()
arc: Use sigsp()
sas_ss_flags: Remove nested ternary if
Rip out get_signal_to_deliver()
Clean up signal_delivered()
tracehook_signal_handler: Remove sig, info, ka and regs
...
06 Aug, 2014
1 commit
-
Use sigsp() instead of the open coded variant.
Signed-off-by: Richard Weinberger
01 Jul, 2014
1 commit
-
In addition to consolidating the or1k-pic with other interrupt
controllers, this makes OpenRISC less tied to its on-cpu
interrupt controller.All or1k-pic specific parts are moved out of irq.c and into
drivers/irqchip/irq-or1k-pic.cIn that transition, the functionality have been divided into
three chip variants.
One that handles level triggered interrupts, one that handles edge
triggered interrupts and one that handles the interrupt
controller that is present in the or1200 OpenRISC cpu
implementation.Signed-off-by: Stefan Kristiansson
Link: https://lkml.kernel.org/r/1401136302-27654-1-git-send-email-stefan.kristiansson@saunalahti.fi
Acked-by: Jonas Bonn
Signed-off-by: Jason Cooper
30 Apr, 2014
1 commit
-
Unify the various architectures __dtb_start and __dtb_end definitions
moving them into of_fdt.h.Signed-off-by: Rob Herring
Acked-by: Vineet Gupta
Acked-by: James Hogan
Tested-by: Michal Simek
Cc: Ralf Baechle
Cc: Jonas Bonn
Cc: Chris Zankel
Cc: Max Filippov
Cc: linux-metag@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux@lists.openrisc.net
Cc: linux-xtensa@linux-xtensa.org
Tested-by: Grant Likely
Tested-by: Stephen Chivers
09 Jan, 2014
2 commits
-
Use the more generic functions get_signal() signal_setup_done()
for signal delivery.Signed-off-by: Richard Weinberger
Signed-off-by: Jonas Bonn -
The mainline signal handling code for OpenRISC has been buggy since day
one with respect to syscall restart. This patch significantly reworks
the signal handling code:i) Move the "work pending" loop to C code (borrowed from ARM arch)
ii) Allow a tracer to muck about with the IP and skip syscall restart
in that case (again, borrowed from ARM)iii) Make signal handling WRT syscall restart actually work
v) Make the signal handling code look more like that of other
architectures so that it's easier for others to followReported-by: Anders Nystrom
Signed-off-by: Jonas Bonn
16 Nov, 2013
1 commit
-
Pull OpenRISC updates from Jonas Bonn:
- small cleanups to make allmodconfig pass
- defconfig refresh
- a handful of code sanitization patches* tag 'for-3.13' of git://git.openrisc.net/~jonas/linux:
openrisc: Refactor or32_early_setup()
openrisc: Remove unused declaration of __initramfs_start
openrisc: Use the declarations provided by
openrisc: Refresh or1ksim_defconfig for v3.12
openrisc: Refactor 16-bit constant relocation
openrisc: include: asm: Kbuild: add default "vga.h"
openrisc: Makefile: append "-D__linux__" to KBUILD_CFLAGS
15 Nov, 2013
3 commits
-
- Change fdt pointer (passed from head.S) from unsigned int to void *,
which allows to kill a cast, and makes it compatible with __dtb_start.
- Use pr_info(),
- Extract common part.Signed-off-by: Geert Uytterhoeven
Cc: linux@lists.openrisc.net
Signed-off-by: Jonas Bonn -
Signed-off-by: Geert Uytterhoeven
Signed-off-by: Jonas Bonn -
Openrisc's private vmlinux.h duplicates a few definitions that are already
provided by asm-generic/sections.h. The former is used by setup.c only,
while the latter is already used everywhere else.Convert setup.c to use the generic version:
- Include ,
- Remove the (slightly different) extern declarations,
- Remove the no longer needed address-of ('&') operators.Signed-off-by: Geert Uytterhoeven
Signed-off-by: Jonas Bonn
05 Nov, 2013
1 commit
-
arch/openrisc/kernel/module.c: In function 'apply_relocate_add':
arch/openrisc/kernel/module.c:50:13: warning: assignment from incompatible pointer type
arch/openrisc/kernel/module.c:54:13: warning: assignment from incompatible pointer typeMove the pointer increments to the dereference statements to avoid
incompatible pointer assignments, and remove superfluous casts.Signed-off-by: Geert Uytterhoeven
Signed-off-by: Jonas Bonn
10 Oct, 2013
6 commits
-
It appears openrisc prom.c was just copied from another arch with a
bunch of unnecessary includes. Remove all the unecessary ones.Signed-off-by: Rob Herring
Cc: Jonas Bonn
Cc: linux@lists.openrisc.net -
All arches do essentially the same thing now for
early_init_dt_setup_initrd_arch, so it can now be removed.Signed-off-by: Rob Herring
Acked-by: Vineet Gupta
Cc: Russell King
Cc: Mark Salter
Cc: Aurelien Jacquiot
Cc: James Hogan
Cc: Michal Simek
Cc: Ralf Baechle
Cc: Jonas Bonn
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Thomas Gleixner
Cc: Ingo Molnar
Cc: "H. Peter Anvin"
Cc: x86@kernel.org
Cc: Chris Zankel
Cc: Max Filippov
Acked-by: Grant Likely -
Create a weak version of early_init_dt_add_memory_arch which uses
memblock. This will unify all architectures except ones with custom
memory bank structs.Signed-off-by: Rob Herring
Acked-by: Catalin Marinas
Cc: Will Deacon
Cc: Michal Simek
Cc: Jonas Bonn
Acked-by: Grant Likely
Cc: linux-arm-kernel@lists.infradead.org
Cc: microblaze-uclinux@itee.uq.edu.au
Cc: linux@lists.openrisc.net
Cc: devicetree@vger.kernel.org -
Convert openrisc to use new early_init_dt_scan function.
Signed-off-by: Rob Herring
Cc: Jonas Bonn
Cc: linux@lists.openrisc.net -
Use the common unflatten_and_copy_device_tree to copy the built-in FDT
out of init section. This moves the copy later in the boot, but there
do not appear to be any references to strings in the FDT before the copy.Signed-off-by: Rob Herring
Cc: Jonas Bonn
Cc: linux@lists.openrisc.net -
Save some pointless copying of the kernel command line and just use
boot_command_line instead. The DT code already handles CONFIG_CMDLINE,
so a separate copy is not needed.Signed-off-by: Rob Herring
Cc: Jonas Bonn
Cc: linux@lists.openrisc.net
Reviewed-by: Grant Likely
29 Aug, 2013
1 commit
-
Most architectures use the same implementation. Collapse the common ones
into a single weak function that can be overridden.Signed-off-by: Grant Likely
24 Jul, 2013
1 commit
-
On some PAE architectures, the entire range of physical memory could reside
outside the 32-bit limit. These systems need the ability to specify the
initrd location using 64-bit numbers.This patch globally modifies the early_init_dt_setup_initrd_arch() function to
use 64-bit numbers instead of the current unsigned long.There has been quite a bit of debate about whether to use u64 or phys_addr_t.
It was concluded to stick to u64 to be consistent with rest of the device
tree code. As summarized by Geert, "The address to load the initrd is decided
by the bootloader/user and set at that point later in time. The dtb should not
be tied to the kernel you are booting"More details on the discussion can be found here:
https://lkml.org/lkml/2013/6/20/690
https://lkml.org/lkml/2012/9/13/544Signed-off-by: Santosh Shilimkar
Acked-by: Rob Herring
Acked-by: Vineet Gupta
Acked-by: Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Grant Likely
15 Jul, 2013
1 commit
-
The __cpuinit type of throwaway sections might have made sense
some time ago when RAM was more constrained, but now the savings
do not offset the cost and complications. For example, the fix in
commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time")
is a good example of the nasty type of bugs that can be created
with improper use of the various __init prefixes.After a discussion on LKML[1] it was decided that cpuinit should go
the way of devinit and be phased out. Once all the users are gone,
we can then finally remove the macros themselves from linux/init.h.Note that some harmless section mismatch warnings may result, since
notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
are flagged as __cpuinit -- so if we remove the __cpuinit from
arch specific callers, we will also get section mismatch warnings.
As an intermediate step, we intend to turn the linux/init.h cpuinit
content into no-ops as early as possible, since that will get rid
of these warnings. In any case, they are temporary and harmless.This removes all the arch/openrisc uses of the __cpuinit macros from
all C files. Currently openrisc does not have any __CPUINIT used in
assembly files.[1] https://lkml.org/lkml/2013/5/20/589
Cc: Jonas Bonn
Cc: linux@lists.openrisc.net
Signed-off-by: Paul Gortmaker
01 May, 2013
2 commits
-
show_regs() is inherently arch-dependent but it does make sense to print
generic debug information and some archs already do albeit in slightly
different forms. This patch introduces a generic function to print debug
information from show_regs() so that different archs print out the same
information and it's much easier to modify what's printed.show_regs_print_info() prints out the same debug info as dump_stack()
does plus task and thread_info pointers.* Archs which didn't print debug info now do.
alpha, arc, blackfin, c6x, cris, frv, h8300, hexagon, ia64, m32r,
metag, microblaze, mn10300, openrisc, parisc, score, sh64, sparc,
um, xtensa* Already prints debug info. Replaced with show_regs_print_info().
The printed information is superset of what used to be there.arm, arm64, avr32, mips, powerpc, sh32, tile, unicore32, x86
* s390 is special in that it used to print arch-specific information
along with generic debug info. Heiko and Martin think that the
arch-specific extra isn't worth keeping s390 specfic implementation.
Converted to use the generic version.Note that now all archs print the debug info before actual register
dumps.An example BUG() dump follows.
kernel BUG at /work/os/work/kernel/workqueue.c:4841!
invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.9.0-rc1-work+ #7
Hardware name: empty empty/S3992, BIOS 080011 10/26/2007
task: ffff88007c85e040 ti: ffff88007c860000 task.ti: ffff88007c860000
RIP: 0010:[] [] init_workqueues+0x4/0x6
RSP: 0000:ffff88007c861ec8 EFLAGS: 00010246
RAX: ffff88007c861fd8 RBX: ffffffff824466a8 RCX: 0000000000000001
RDX: 0000000000000046 RSI: 0000000000000001 RDI: ffffffff8234a07a
RBP: ffff88007c861ec8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffffffff8234a07a
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff88007dc00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: ffff88015f7ff000 CR3: 00000000021f1000 CR4: 00000000000007f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Stack:
ffff88007c861ef8 ffffffff81000312 ffffffff824466a8 ffff88007c85e650
0000000000000003 0000000000000000 ffff88007c861f38 ffffffff82335e5d
ffff88007c862080 ffffffff8223d8c0 ffff88007c862080 ffffffff81c47760
Call Trace:
[] do_one_initcall+0x122/0x170
[] kernel_init_freeable+0x9b/0x1c8
[] ? rest_init+0x140/0x140
[] kernel_init+0xe/0xf0
[] ret_from_fork+0x7c/0xb0
[] ? rest_init+0x140/0x140
...v2: Typo fix in x86-32.
v3: CPU number dropped from show_regs_print_info() as
dump_stack_print_info() has been updated to print it. s390
specific implementation dropped as requested by s390 maintainers.Signed-off-by: Tejun Heo
Acked-by: David S. Miller
Acked-by: Jesper Nilsson
Cc: Heiko Carstens
Cc: Martin Schwidefsky
Cc: Bjorn Helgaas
Cc: Fengguang Wu
Cc: Mike Frysinger
Cc: Vineet Gupta
Cc: Sam Ravnborg
Acked-by: Chris Metcalf [tile bits]
Acked-by: Richard Kuo [hexagon bits]
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Both dump_stack() and show_stack() are currently implemented by each
architecture. show_stack(NULL, NULL) dumps the backtrace for the
current task as does dump_stack(). On some archs, dump_stack() prints
extra information - pid, utsname and so on - in addition to the
backtrace while the two are identical on other archs.The usages in arch-independent code of the two functions indicate
show_stack(NULL, NULL) should print out bare backtrace while
dump_stack() is used for debugging purposes when something went wrong,
so it does make sense to print additional information on the task which
triggered dump_stack().There's no reason to require archs to implement two separate but mostly
identical functions. It leads to unnecessary subtle information.This patch expands the dummy fallback dump_stack() implementation in
lib/dump_stack.c such that it prints out debug information (taken from
x86) and invokes show_stack(NULL, NULL) and drops arch-specific
dump_stack() implementations in all archs except blackfin. Blackfin's
dump_stack() does something wonky that I don't understand.Debug information can be printed separately by calling
dump_stack_print_info() so that arch-specific dump_stack()
implementation can still emit the same debug information. This is used
in blackfin.This patch brings the following behavior changes.
* On some archs, an extra level in backtrace for show_stack() could be
printed. This is because the top frame was determined in
dump_stack() on those archs while generic dump_stack() can't do that
reliably. It can be compensated by inlining dump_stack() but not
sure whether that'd be necessary.* Most archs didn't use to print debug info on dump_stack(). They do
now.An example WARN dump follows.
WARNING: at kernel/workqueue.c:4841 init_workqueues+0x35/0x505()
Hardware name: empty
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.9.0-rc1-work+ #9
0000000000000009 ffff88007c861e08 ffffffff81c614dc ffff88007c861e48
ffffffff8108f50f ffffffff82228240 0000000000000040 ffffffff8234a03c
0000000000000000 0000000000000000 0000000000000000 ffff88007c861e58
Call Trace:
[] dump_stack+0x19/0x1b
[] warn_slowpath_common+0x7f/0xc0
[] warn_slowpath_null+0x1a/0x20
[] init_workqueues+0x35/0x505
...v2: CPU number added to the generic debug info as requested by s390
folks and dropped the s390 specific dump_stack(). This loses %ksp
from the debug message which the maintainers think isn't important
enough to keep the s390-specific dump_stack() implementation.dump_stack_print_info() is moved to kernel/printk.c from
lib/dump_stack.c. Because linkage is per objecct file,
dump_stack_print_info() living in the same lib file as generic
dump_stack() means that archs which implement custom dump_stack()
- at this point, only blackfin - can't use dump_stack_print_info()
as that will bring in the generic version of dump_stack() too. v1
The v1 patch broke build on blackfin due to this issue. The build
breakage was reported by Fengguang Wu.Signed-off-by: Tejun Heo
Acked-by: David S. Miller
Acked-by: Vineet Gupta
Acked-by: Jesper Nilsson
Acked-by: Vineet Gupta
Acked-by: Martin Schwidefsky [s390 bits]
Cc: Heiko Carstens
Cc: Mike Frysinger
Cc: Fengguang Wu
Cc: Bjorn Helgaas
Cc: Sam Ravnborg
Acked-by: Richard Kuo [hexagon bits]
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
08 Apr, 2013
1 commit
-
Idle poller with an extra check_pgt_cache() invocation. Use the core
code.Signed-off-by: Thomas Gleixner
Cc: Linus Torvalds
Cc: Rusty Russell
Cc: Paul McKenney
Cc: Peter Zijlstra
Reviewed-by: Cc: Srivatsa S. Bhat
Cc: Magnus Damm
Link: http://lkml.kernel.org/r/20130321215234.886530981@linutronix.de
Signed-off-by: Thomas Gleixner
27 Feb, 2013
1 commit
-
Pull OpenRISC updates from Jonas Bonn:
"An equal number of bug fixes and trivial cleanups; no new features.- Two patches to fix errors thrown by the updated toolchain.
- Three other bug fixes.
- Four trivial cleanups."
* 'for-upstream' of git://openrisc.net/jonas/linux:
openrisc: add missing header inclusion
openrisc: really pass correct arg to schedule_tail
Add bitops include needed for ext2 filesystem
openrisc: update DTLB-miss handler last
openrisc: fix up vmalloc page table loading
openrisc idle: delete pm_idle
openrisc: remove CONFIG_SYMBOL_PREFIX
openrisc: avoid using function parameter regs in reset vector
openrisc: remove unused current_regs
26 Feb, 2013
1 commit
-
Prevents build issue with updated toolchain
Reported-by: Jack Thomasson
Tested-by: Christian Svensson
Signed-off-by: Stefan Kristiansson
Signed-off-by: Jonas Bonn
24 Feb, 2013
1 commit
-
Pull signal handling cleanups from Al Viro:
"This is the first pile; another one will come a bit later and will
contain SYSCALL_DEFINE-related patches.- a bunch of signal-related syscalls (both native and compat)
unified.- a bunch of compat syscalls switched to COMPAT_SYSCALL_DEFINE
(fixing several potential problems with missing argument
validation, while we are at it)- a lot of now-pointless wrappers killed
- a couple of architectures (cris and hexagon) forgot to save
altstack settings into sigframe, even though they used the
(uninitialized) values in sigreturn; fixed.- microblaze fixes for delivery of multiple signals arriving at once
- saner set of helpers for signal delivery introduced, several
architectures switched to using those."* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal: (143 commits)
x86: convert to ksignal
sparc: convert to ksignal
arm: switch to struct ksignal * passing
alpha: pass k_sigaction and siginfo_t using ksignal pointer
burying unused conditionals
make do_sigaltstack() static
arm64: switch to generic old sigaction() (compat-only)
arm64: switch to generic compat rt_sigaction()
arm64: switch compat to generic old sigsuspend
arm64: switch to generic compat rt_sigqueueinfo()
arm64: switch to generic compat rt_sigpending()
arm64: switch to generic compat rt_sigprocmask()
arm64: switch to generic sigaltstack
sparc: switch to generic old sigsuspend
sparc: COMPAT_SYSCALL_DEFINE does all sign-extension as well as SYSCALL_DEFINE
sparc: kill sign-extending wrappers for native syscalls
kill sparc32_open()
sparc: switch to use of generic old sigaction
sparc: switch sys_compat_rt_sigaction() to COMPAT_SYSCALL_DEFINE
mips: switch to generic sys_fork() and sys_clone()
...
18 Feb, 2013
1 commit
-
pm_idle() on openrisc was dead code.
Signed-off-by: Len Brown
Cc: linux@lists.openrisc.net
17 Feb, 2013
1 commit
-
Commit 287ad220cd8b5a9d29f71c78f6e4051093f051fc tried to set up the argument
to schedule_tail, but ended up using TI_STACK which isn't a defined symbol.
Sadly, the old openrisc compiler silently ignores this fact and it was first
discovered now when building with an updated toolchain.Reported-by: Christian Svensson
Signed-off-by: Jonas Bonn
14 Feb, 2013
1 commit
-
vmalloc'ed pages are faulted into a process' page tables on demand. In
order to facilitate this, do_page_fault needs to know whether it was
called via a page fault exception or a TLB-miss exception.This patch adds a wrapper around the _x_page_fault_handler entry points
that the TLB-miss exceptions can call into in order to have the relevant
parameter set to satisfy do_page_fault.This fixes a bug and is "good enough" for now. That said, this whole
handling of vmalloc needs to be audited for correctness at some point.Signed-off-by: Jonas Bonn
11 Feb, 2013
2 commits
-
pm_idle() on openrisc was dead code.
Signed-off-by: Len Brown
Cc: linux@lists.openrisc.net
Signed-off-by: Jonas Bonn -
The kernel might be invoked through the reset vector, so to
preserve parameters passed to it, temp regs that are not
in the function parameter range needs to be used.Signed-off-by: Stefan Kristiansson
Signed-off-by: Jonas Bonn
04 Feb, 2013
1 commit
-
Signed-off-by: Al Viro
19 Dec, 2012
1 commit
-
Pull OpenRISC update from Jonas Bonn:
"Trivial cleanups for OpenRISC."* tag 'for-3.8' of git://openrisc.net/~jonas/linux:
openrisc: use kbuild.h instead of defining macros in asm-offset.c
openrisc: Use Kbuild infrastructure for kvm_para.h
29 Nov, 2012
4 commits
-
Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
…8300', 'arch-m32r', 'arch-mn10300', 'arch-score', 'arch-sh' and 'arch-powerpc' into for-next
-
do_sigaltstack() expects _userland_ address, TYVM...
Signed-off-by: Al Viro
25 Oct, 2012
1 commit
-
This is modelled on commits such as the one below:
Commit fc1c3a003edb8a6778e64e10ef671a38c76c969e ("sh: use kbuild.h
instead of defining macros in asm-offsets.c") introduced in v2.6.26.Signed-off-by: James Hogan
Signed-off-by: Jonas Bonn
20 Oct, 2012
2 commits
-
Signed-off-by: Jonas Bonn
-
Signed-off-by: Jonas Bonn