25 Mar, 2015
3 commits
-
Provide a fast sched clock using the free-running timer and the generic
sched_clock infrastructure.Signed-off-by: Rabin Vincent
Signed-off-by: Jesper Nilsson -
Al Viro noted that CRIS fails to handle multiple signals.
This fixes the problem for CRISv32 by making it use a C work_pending
handling loop similar to the ARM implementation in 0a267fa6a15d41c
("ARM: 7472/1: pull all work_pending logics into C function").This also happens to fixes the warnings which currently trigger on
CRISv32 due to do_signal() being called with interrupts disabled.Test case (should die of the SIGSEGV which gets raised when setting up
the stack for SIGALRM, but instead reaches and executes the _exit(1)):#include
#include
#include
#includestatic void handler(int sig) { }
int main(int argc, char *argv[])
{
int ret;
struct itimerval t1 = { .it_value = {1} };
stack_t ss = {
.ss_sp = NULL,
.ss_size = SIGSTKSZ,
};
struct sigaction action = {
.sa_handler = handler,
.sa_flags = SA_ONSTACK,
};ret = sigaltstack(&ss, NULL);
if (ret < 0)
err(1, "sigaltstack");sigaction(SIGALRM, &action, NULL);
setitimer(ITIMER_REAL, &t1, NULL);pause();
_exit(1);
return 0;
}Reported-by: Al Viro
Link: http://lkml.kernel.org/r/20121208074429.GC4939@ZenIV.linux.org.uk
Signed-off-by: Rabin Vincent
Signed-off-by: Jesper Nilsson -
Add support for booting CRISv32 with a built-in device tree.
Signed-off-by: Rabin Vincent
Signed-off-by: Jesper Nilsson
29 Jan, 2015
1 commit
-
Allows that symbol to be used in modules, and fixes
the following on allmodconfig:ERROR: "csum_partial_copy_nocheck" [net/ipv6/ipv6.ko] undefined!
Signed-off-by: Jesper Nilsson
20 Jan, 2015
1 commit
-
Nothing needs the module pointer any more, and the next patch will
call it from RCU, where the module itself might no longer exist.
Removing the arg is the safest approach.This just codifies the use of the module_alloc/module_free pattern
which ftrace and bpf use.Signed-off-by: Rusty Russell
Acked-by: Alexei Starovoitov
Cc: Mikael Starvik
Cc: Jesper Nilsson
Cc: Ralf Baechle
Cc: Ley Foon Tan
Cc: Benjamin Herrenschmidt
Cc: Chris Metcalf
Cc: Steven Rostedt
Cc: x86@kernel.org
Cc: Ananth N Mavinakayanahalli
Cc: Anil S Keshavamurthy
Cc: Masami Hiramatsu
Cc: linux-cris-kernel@axis.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: nios2-dev@lists.rocketboards.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: sparclinux@vger.kernel.org
Cc: netdev@vger.kernel.org
20 Dec, 2014
2 commits
-
Also, print kernel version on oops.
Signed-off-by: Jesper Nilsson
-
strcmp was lost when all other string functions were removed,
but we still have an optimized version for this on CRISv32,
so any driver built as a module would not have access to this symbol.In a similar manner, we had optimized versions of
csum_partial_copy_from_user and __do_clear_user
but no exported symbols for them, breaking bunch of other drivers
when built as a module.At the same time, move EXPORT_SYMBOL(__copy_user) and
EXPORT_SYMBOL(__copy_user_zeroing) C-files so it's
located together with the function definition.Signed-off-by: Jesper Nilsson
08 Apr, 2014
1 commit
-
Fix breakage which will be exposed by the patch "kconfig: make allnoconfig
disable options behind EMBEDDED and EXPERT".Now allnoconfig started disabling CONFIG_PROC_FS:
arch/cris/kernel/built-in.o:(.rodata+0xc): undefined reference to `show_cpuinfo'
make: *** [vmlinux] Error 1Signed-off-by: Geert Uytterhoeven
Cc: Stephen Rothwell
Cc: Mikael Starvik
Cc: Jesper Nilsson
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
08 Jan, 2014
1 commit
-
This patch proposes to remove the IRQF_DISABLED flag from CRIS
architecture code. It's a NOOP since 2.6.35 and it will be removed
one day.Comments mentioning IRQF_DISABLED are also updated, knowing
that all interrupts are now "fast interrupts", their handlers
running with interrupts disabled.Don't hesitate to let me know if you have other ways of
rephrasing the comments!This is an update for 3.11 of a patch already sent for 3.10
Signed-off-by: Michael Opdenacker
Signed-off-by: Jesper Nilsson
08 May, 2013
1 commit
-
arch/arm/mach-msm/last_radio_log.c: In function 'msm_init_last_radio_log':
arch/arm/mach-msm/last_radio_log.c:69:7: error: dereferencing pointer to incomplete typearch/cris/kernel/profile.c: In function 'init_cris_profile':
arch/cris/kernel/profile.c:79:8: error: dereferencing pointer to incomplete typeUse proc_set_size(), cfr. commit 271a15eabe094538d958dc68ccfc9c36b699247a
("proc: Supply PDE attribute setting accessor functions")Signed-off-by: Geert Uytterhoeven
Signed-off-by: Al Viro
01 May, 2013
1 commit
-
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
2 commits
-
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
Acked-by: Jesper Nilsson
Link: http://lkml.kernel.org/r/20130321215234.148829489@linutronix.de
Signed-off-by: Thomas Gleixner -
enable/disable_hlt() does not need to be exported and can be killed on
architectures which do not use it at all.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/20130321215233.377959540@linutronix.de
Signed-off-by: Thomas Gleixner
22 Feb, 2013
1 commit
-
Pull ARM SoC cleanups from Arnd Bergmann:
"A large number of cleanups, all over the platforms. This is dominated
largely by the Samsung platforms (s3c, s5p, exynos) and a few of the
others moving code out of arch/arm into more appropriate subsystems.The clocksource and irqchip drivers are now abstracted to the point
where platforms that are already cleaned up do not need to even
specify the driver they use, it can all get configured from the device
tree as we do for normal device drivers. The clocksource changes
basically touch every single platform in the process.We further clean up the use of platform specific header files here,
with the goal of turning more of the platforms over to being
"multiplatform" enabled, which implies that they cannot expose their
headers to architecture independent code any more.It is expected that no functional changes are part of the cleanup.
The overall reduction in total code lines is mostly the result of
removing broken and obsolete code."* tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (133 commits)
ARM: mvebu: correct gated clock documentation
ARM: kirkwood: add missing include for nsa310
ARM: exynos: move exynos4210-combiner to drivers/irqchip
mfd: db8500-prcmu: update resource passing
drivers/db8500-cpufreq: delete dangling include
ARM: at91: remove NEOCORE 926 board
sunxi: Cleanup the reset code and add meaningful registers defines
ARM: S3C24XX: header mach/regs-mem.h local
ARM: S3C24XX: header mach/regs-power.h local
ARM: S3C24XX: header mach/regs-s3c2412-mem.h local
ARM: S3C24XX: Remove plat-s3c24xx directory in arch/arm/
ARM: S3C24XX: transform s3c2443 subirqs into new structure
ARM: S3C24XX: modify s3c2443 irq init to initialize all irqs
ARM: S3C24XX: move s3c2443 irq code to irq.c
ARM: S3C24XX: transform s3c2416 irqs into new structure
ARM: S3C24XX: modify s3c2416 irq init to initialize all irqs
ARM: S3C24XX: move s3c2416 irq init to common irq code
ARM: S3C24XX: Modify s3c_irq_wake to use the hwirq property
ARM: S3C24XX: Move irq syscore-ops to irq-pm
clocksource: always define CLOCKSOURCE_OF_DECLARE
...
18 Feb, 2013
1 commit
-
pm_idle() and idle() served no purpose on cris --
invoke default_idle() directly.Signed-off-by: Len Brown
Acked-by: Jesper Nilsson
25 Dec, 2012
2 commits
-
Currently, whenever CONFIG_ARCH_USES_GETTIMEOFFSET is enabled, each
arch core provides a single implementation of arch_gettimeoffset(). In
many cases, different sub-architectures, different machines, or
different timer providers exist, and so the arch ends up implementing
arch_gettimeoffset() as a call-through-pointer anyway. Examples are
ARM, Cris, M68K, and it's arguable that the remaining architectures,
M32R and Blackfin, should be doing this anyway.Modify arch_gettimeoffset so that it itself is a function pointer, which
the arch initializes. This will allow later changes to move the
initialization of this function into individual machine support or timer
drivers. This is particularly useful for code in drivers/clocksource
which should rely on an arch-independant mechanism to register their
implementation of arch_gettimeoffset().This patch also converts the Cris architecture to set arch_gettimeoffset
directly to the final implementation in time_init(), because Cris already
had separate time_init() functions per sub-architecture. M68K and ARM
are converted to set arch_gettimeoffset to the final implementation in
later patches, because they already have function pointers in place for
this purpose.Cc: Russell King
Cc: Mike Frysinger
Cc: Mikael Starvik
Cc: Hirokazu Takata
Cc: Thomas Gleixner
Acked-by: Geert Uytterhoeven
Acked-by: Jesper Nilsson
Acked-by: John Stultz
Signed-off-by: Stephen Warren -
Move usec to nsec conversion from arch_gettimeoffset() to
do_slow_gettimeoffset(); in a future patch, do_slow_gettimeoffset()
will be used directly as the implementation of arch_gettimeoffset(),
so needs to perform all required calculations.Cc: Mikael Starvik
Cc: linux-cris-kernel@axis.com
Acked-by: Jesper Nilsson
Signed-off-by: Stephen Warren
20 Dec, 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: Jesper Nilsson
19 Dec, 2012
1 commit
-
Pull module update from Rusty Russell:
"Nothing all that exciting; a new module-from-fd syscall for those who
want to verify the source of the module (ChromeOS) and/or use standard
IMA on it or other security hooks."* tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
MODSIGN: Fix kbuild output when using default extra_certificates
MODSIGN: Avoid using .incbin in C source
modules: don't hand 0 to vmalloc.
module: Remove a extra null character at the top of module->strtab.
ASN.1: Use the ASN1_LONG_TAG and ASN1_INDEFINITE_LENGTH constants
ASN.1: Define indefinite length marker constant
moduleparam: use __UNIQUE_ID()
__UNIQUE_ID()
MODSIGN: Add modules_sign make target
powerpc: add finit_module syscall.
ima: support new kernel module syscall
add finit_module syscall to asm-generic
ARM: add finit_module syscall to ARM
security: introduce kernel_module_from_file hook
module: add flags arg to sys_finit_module()
module: add syscall to load module from fd
14 Dec, 2012
1 commit
-
In commit d0a21265dfb5fa8a David Rientjes unified various archs'
module_alloc implementation (including x86) and removed the graduitous
shortcut for size == 0.Then, in commit de7d2b567d040e3b, Joe Perches added a warning for
zero-length vmallocs, which can happen without kallsyms on modules
with no init sections (eg. zlib_deflate).Fix this once and for all; the module code has to handle zero length
anyway, so get it right at the caller and remove the now-gratuitous
checks within the arch-specific module_alloc implementations.Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42608
Reported-by: Conrad Kostecki
Cc: David Rientjes
Cc: Joe Perches
Signed-off-by: Rusty Russell
15 Oct, 2012
1 commit
-
Signed-off-by: Al Viro
23 Sep, 2012
1 commit
-
In the old times, the whole idle task was considered
as an RCU quiescent state. But as RCU became more and
more successful overtime, some RCU read side critical
section have been added even in the code of some
architectures idle tasks, for tracing for example.So nowadays, rcu_idle_enter() and rcu_idle_exit() must
be called by the architecture to tell RCU about the part
in the idle loop that doesn't make use of rcu read side
critical sections, typically the part that puts the CPU
in low power mode.This is necessary for RCU to find the quiescent states in
idle in order to complete grace periods.Add this missing pair of calls in the Cris's idle loop.
Reported-by: Paul E. McKenney
Signed-off-by: Frederic Weisbecker
Cc: Mikael Starvik
Cc: Jesper Nilsson
Cc: Cris
Cc: # 3.3+
Signed-off-by: Paul E. McKenney
Reviewed-by: Josh Triplett
01 Jun, 2012
1 commit
-
Pull second pile of signal handling patches from Al Viro:
"This one is just task_work_add() series + remaining prereqs for it.There probably will be another pull request from that tree this
cycle - at least for helpers, to get them out of the way for per-arch
fixes remaining in the tree."Fix trivial conflict in kernel/irq/manage.c: the merge of Andrew's pile
had brought in commit 97fd75b7b8e0 ("kernel/irq/manage.c: use the
pr_foo() infrastructure to prefix printks") which changed one of the
pr_err() calls that this merge moves around.* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal:
keys: kill task_struct->replacement_session_keyring
keys: kill the dummy key_replace_session_keyring()
keys: change keyctl_session_to_parent() to use task_work_add()
genirq: reimplement exit_irq_thread() hook via task_work_add()
task_work_add: generic process-context callbacks
avr32: missed _TIF_NOTIFY_RESUME on one of do_notify_resume callers
parisc: need to check NOTIFY_RESUME when exiting from syscall
move key_repace_session_keyring() into tracehook_notify_resume()
TIF_NOTIFY_RESUME is defined on all targets now
25 May, 2012
1 commit
-
Pull CRIS changes from Jesper Nilsson:
"No major changes here, but fixes some compile errors for CRIS, some
small style issues, some documentation and as a bonus nukes a couple
of obsolete rtc-files and related code."* tag 'cris-for-linus' of git://jni.nu/cris:
cris: Remove old legacy "-traditional" flag from arch-v10/lib/Makefile
CRIS: Remove legacy RTC drivers
cris/mm/fault.c: Port OOM changes to do_page_fault
cris:fix the wrong function declear
CRIS: Add _sdata to vmlinux.lds.S
cris: posix_types.h, include asm-generic/posix_types.h
CRIS: Update documentation
cris/arch-v32: cryptocop: Use kzalloc
net:removed the unused variable
cris:removed the unused variable
CRISv32: Correct name of read_mostly section.
24 May, 2012
1 commit
-
Signed-off-by: Al Viro
05 May, 2012
1 commit
-
Same code. Use the generic version.
Signed-off-by: Thomas Gleixner
Acked-by: Jesper Nilsson
Link: http://lkml.kernel.org/r/20120503085034.475552133@linutronix.de
05 Apr, 2012
1 commit
-
These old drivers are not used anymore, we use the ones in drivers/rtc.
This allows us to remove some cruft in the CRIS timekeeping code.Signed-off-by: Jesper Nilsson
03 Apr, 2012
1 commit
-
Fixes link error:
LD vmlinux
kernel/built-in.o: In function `core_kernel_data':
(.text+0x13e44): undefined reference to `_sdata'Signed-off-by: Jesper Nilsson
29 Mar, 2012
1 commit
-
Disintegrate asm/system.h for CRIS.
Signed-off-by: David Howells
Acked-by: Jesper Nilsson
cc: linux-cris-kernel@axis.com
01 Mar, 2012
1 commit
-
Coccinelle based conversion.
Signed-off-by: Thomas Gleixner
Acked-by: Peter Zijlstra
Link: http://lkml.kernel.org/n/tip-24swm5zut3h9c4a6s46x8rws@git.kernel.org
Signed-off-by: Ingo Molnar
27 Jul, 2011
1 commit
-
This allows us to move duplicated code in
(atomic_inc_not_zero() for now) toSigned-off-by: Arun Sharma
Reviewed-by: Eric Dumazet
Cc: Ingo Molnar
Cc: David Miller
Cc: Eric Dumazet
Acked-by: Mike Frysinger
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
24 Jul, 2011
1 commit
-
This patch removes all the module loader hook implementations in the
architecture specific code where the functionality is the same as that
now provided by the recently added default hooks.Signed-off-by: Jonas Bonn
Acked-by: Mike Frysinger
Acked-by: Geert Uytterhoeven
Tested-by: Michal Simek
Signed-off-by: Rusty Russell
25 May, 2011
1 commit
-
* 'for-2.6.40' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
percpu: Unify input section names
percpu: Avoid extra NOP in percpu_cmpxchg16b_double
percpu: Cast away printk format warning
percpu: Always align percpu output section to PAGE_SIZEFix up fairly trivial conflict in arch/x86/include/asm/percpu.h as per Tejun
31 Mar, 2011
1 commit
-
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi
25 Mar, 2011
1 commit
-
Percpu allocator honors alignment request upto PAGE_SIZE and both the
percpu addresses in the percpu address space and the translated kernel
addresses should be aligned accordingly. The calculation of the
former depends on the alignment of percpu output section in the kernel
image.The linker script macros PERCPU_VADDR() and PERCPU() are used to
define this output section and the latter takes @align parameter.
Several architectures are using @align smaller than PAGE_SIZE breaking
percpu memory alignment.This patch removes @align parameter from PERCPU(), renames it to
PERCPU_SECTION() and makes it always align to PAGE_SIZE. While at it,
add PCPU_SETUP_BUG_ON() checks such that alignment problems are
reliably detected and remove percpu alignment comment recently added
in workqueue.c as the condition would trigger BUG way before reaching
there.For um, this patch raises the alignment of percpu area. As the area
is in .init, there shouldn't be any noticeable difference.This problem was discovered by David Howells while debugging boot
failure on mn10300.Signed-off-by: Tejun Heo
Acked-by: Mike Frysinger
Cc: uclinux-dist-devel@blackfin.uclinux.org
Cc: David Howells
Cc: Jeff Dike
Cc: user-mode-linux-devel@lists.sourceforge.net
19 Mar, 2011
1 commit
-
…rnel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
genirq: Fix incorrect unlock in __setup_irq()
cris: Use generic show_interrupts()
genirq: show_interrupts: Check desc->name before printing it blindly
cris: Use accessor functions to set IRQ_PER_CPU flag
cris: Fix irq conversion fallout* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
sched, kernel-doc: Fix runqueue_is_locked() description
17 Mar, 2011
1 commit
-
Signed-off-by: Thomas Gleixner
Cc: Jesper Nilsson
16 Mar, 2011
1 commit
-
* 'for-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
percpu, x86: Add arch-specific this_cpu_cmpxchg_double() support
percpu: Generic support for this_cpu_cmpxchg_double()
alpha: use L1_CACHE_BYTES for cacheline size in the linker script
percpu: align percpu readmostly subsection to cachelineFix up trivial conflict in arch/x86/kernel/vmlinux.lds.S due to the
percpu alignment having changed ("x86: Reduce back the alignment of the
per-CPU data section")
24 Feb, 2011
1 commit
-
The __param section is already brought in by RODATA above.
Signed-off-by: Jesper Nilsson
Signed-off-by: Linus Torvalds
25 Jan, 2011
1 commit
-
Currently percpu readmostly subsection may share cachelines with other
percpu subsections which may result in unnecessary cacheline bounce
and performance degradation.This patch adds @cacheline parameter to PERCPU() and PERCPU_VADDR()
linker macros, makes each arch linker scripts specify its cacheline
size and use it to align percpu subsections.This is based on Shaohua's x86 only patch.
Signed-off-by: Tejun Heo
Cc: Shaohua Li