Age | Commit message (Collapse) | Author | Files | Lines |
|
For symbols still lacking namespace qualifiers, add an of_pdt_ prefix.
Signed-off-by: Andres Salomon <[email protected]>
Acked-by: David S. Miller <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
Rather than assuming an architecture defines prom_getchild and friends,
define an ops struct with hooks for the various prom functions that
pdt.c needs. This ops struct is filled in by the
arch-(and sometimes firmware-)specific code, and passed to
of_pdt_build_devicetree.
Update sparc code to define the ops struct as well.
Signed-off-by: Andres Salomon <[email protected]>
Acked-by: David S. Miller <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
We need to round memory regions correctly -- specifically, we need to
round reserved region in the more expansive direction (lower limit
down, upper limit up) whereas usable memory regions need to be rounded
in the more restrictive direction (lower limit up, upper limit down).
This introduces two set of inlines:
memblock_region_memory_base_pfn()
memblock_region_memory_end_pfn()
memblock_region_reserved_base_pfn()
memblock_region_reserved_end_pfn()
Although they are antisymmetric (and therefore are technically
duplicates) the use of the different inlines explicitly documents the
programmer's intention.
The lack of proper rounding caused a bug on ARM, which was then found
to also affect other architectures.
Reported-by: Russell King <[email protected]>
Signed-off-by: Yinghai Lu <[email protected]>
LKML-Reference: <[email protected]>
Cc: Jeremy Fitzhardinge <[email protected]>
Signed-off-by: H. Peter Anvin <[email protected]>
|
|
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Ingo Molnar <[email protected]>
Acked-by: Jesse Barnes <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Tony Luck <[email protected]>
Cc: Russell King <[email protected]>
|
|
We need to revert the temporary hack in 71ebc01, hence the merge.
|
|
Clean up pdt.c:
- make build dependent upon config OF_PROMTREE
- #ifdef out the sparc-specific stuff
- create pdt-specific header
Signed-off-by: Andres Salomon <[email protected]>
Acked-by: David S. Miller <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
Transitioning into making this useful for architectures other than sparc.
This is a verbatim copy of all functions/variables that've been moved.
Signed-off-by: Andres Salomon <[email protected]>
Acked-by: David S. Miller <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
Rather than passing around ints everywhere, use the
phandle type where appropriate for the various functions
that talk to the PROM.
Signed-off-by: Andres Salomon <[email protected]>
Acked-by: David S. Miller <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
It's unknown why openprom.h was being exported; there doesn't seem to be any
reason for it currently, and it creates headaches with userspace being able
to potentially use the structures in there. So, don't export it anymore.
Signed-off-by: Andres Salomon <[email protected]>
Acked-by: David S. Miller <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
Merge reason: Update from -rc3 to -rc7.
Signed-off-by: Ingo Molnar <[email protected]>
|
|
Fix the IRQ flag handling naming. In linux/irqflags.h under one configuration,
it maps:
local_irq_enable() -> raw_local_irq_enable()
local_irq_disable() -> raw_local_irq_disable()
local_irq_save() -> raw_local_irq_save()
...
and under the other configuration, it maps:
raw_local_irq_enable() -> local_irq_enable()
raw_local_irq_disable() -> local_irq_disable()
raw_local_irq_save() -> local_irq_save()
...
This is quite confusing. There should be one set of names expected of the
arch, and this should be wrapped to give another set of names that are expected
by users of this facility.
Change this to have the arch provide:
flags = arch_local_save_flags()
flags = arch_local_irq_save()
arch_local_irq_restore(flags)
arch_local_irq_disable()
arch_local_irq_enable()
arch_irqs_disabled_flags(flags)
arch_irqs_disabled()
arch_safe_halt()
Then linux/irqflags.h wraps these to provide:
raw_local_save_flags(flags)
raw_local_irq_save(flags)
raw_local_irq_restore(flags)
raw_local_irq_disable()
raw_local_irq_enable()
raw_irqs_disabled_flags(flags)
raw_irqs_disabled()
raw_safe_halt()
with type checking on the flags 'arguments', and then wraps those to provide:
local_save_flags(flags)
local_irq_save(flags)
local_irq_restore(flags)
local_irq_disable()
local_irq_enable()
irqs_disabled_flags(flags)
irqs_disabled()
safe_halt()
with tracing included if enabled.
The arch functions can now all be inline functions rather than some of them
having to be macros.
Signed-off-by: David Howells <[email protected]> [X86, FRV, MN10300]
Signed-off-by: Chris Metcalf <[email protected]> [Tile]
Signed-off-by: Michal Simek <[email protected]> [Microblaze]
Tested-by: Catalin Marinas <[email protected]> [ARM]
Acked-by: Thomas Gleixner <[email protected]>
Acked-by: Haavard Skinnemoen <[email protected]> [AVR]
Acked-by: Tony Luck <[email protected]> [IA-64]
Acked-by: Hirokazu Takata <[email protected]> [M32R]
Acked-by: Greg Ungerer <[email protected]> [M68K/M68KNOMMU]
Acked-by: Ralf Baechle <[email protected]> [MIPS]
Acked-by: Kyle McMartin <[email protected]> [PA-RISC]
Acked-by: Paul Mackerras <[email protected]> [PowerPC]
Acked-by: Martin Schwidefsky <[email protected]> [S390]
Acked-by: Chen Liqin <[email protected]> [Score]
Acked-by: Matt Fleming <[email protected]> [SH]
Acked-by: David S. Miller <[email protected]> [Sparc]
Acked-by: Chris Zankel <[email protected]> [Xtensa]
Reviewed-by: Richard Henderson <[email protected]> [Alpha]
Reviewed-by: Yoshinori Sato <[email protected]> [H8300]
Cc: [email protected] [CRIS]
Cc: [email protected] [CRIS]
Cc: [email protected]
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/core
|
|
Conflicts:
arch/sparc/kernel/perf_event.c
Merge reason: Resolve the conflict.
Signed-off-by: Ingo Molnar <[email protected]>
|
|
The !CC_OPTIMIZE_FOR_SIZE was added to enable the jump label functionality
because Jason noticed that the gcc option would not optimize the labels
and may even hurt performance.
But this is a gcc problem not a kernel one. Removing this condition should
add motivation to the gcc developers to actually fix it.
Cc: Jason Baron <[email protected]>
Acked-by: David S. Miller <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
|
|
Add jump label support for sparc64.
Signed-off-by: David S. Miller <[email protected]>
LKML-Reference: <3b5b071fcdb2afb7f67cacecfa78b14c740278a7.1284733808.git.jbaron@redhat.com>
Signed-off-by: Jason Baron <[email protected]>
[ cleaned up some formatting ]
Signed-off-by: Steven Rostedt <[email protected]>
|
|
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
sparc: Prevent no-handler signal syscall restart recursion.
sparc: Don't mask signal when we can't setup signal frame.
sparc64: Fix race in signal instruction flushing.
sparc64: Support RAW perf events.
|
|
Explicitly clear the "in-syscall" bit when we have no signal
handler and back up the program counters to back up the system
call.
Reported-by: Al Viro <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Don't invoke the signal handler tracehook in that situation
either.
Reported-by: Al Viro <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Merge reason: Pick up the latest fixes in -rc5.
Signed-off-by: Ingo Molnar <[email protected]>
|
|
If another cpu does a very wide munmap() on the signal frame area,
it can tear down the page table hierarchy from underneath us.
Borrow an idea from the 64-bit fault path's get_user_insn(), and
disable cross call interrupts during the page table traversal
to lock them in place while we operate.
Reported-by: Al Viro <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Signed-off-by: Arnaud Lacombe <[email protected]>
Reviewed-by: Sam Ravnborg <[email protected]>
Reviewed-by: Michal Marek <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/core
|
|
compat_alloc_user_space() expects the caller to independently call
access_ok() to verify the returned area. A missing call could
introduce problems on some architectures.
This patch incorporates the access_ok() check into
compat_alloc_user_space() and also adds a sanity check on the length.
The existing compat_alloc_user_space() implementations are renamed
arch_compat_alloc_user_space() and are used as part of the
implementation of the new global function.
This patch assumes NULL will cause __get_user()/__put_user() to either
fail or access userspace on all architectures. This should be
followed by checking the return value of compat_access_user_space()
for NULL in the callers, at which time the access_ok() in the callers
can also be removed.
Reported-by: Ben Hawkes <[email protected]>
Signed-off-by: H. Peter Anvin <[email protected]>
Acked-by: Benjamin Herrenschmidt <[email protected]>
Acked-by: Chris Metcalf <[email protected]>
Acked-by: David S. Miller <[email protected]>
Acked-by: Ingo Molnar <[email protected]>
Acked-by: Thomas Gleixner <[email protected]>
Acked-by: Tony Luck <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Fenghua Yu <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Helge Deller <[email protected]>
Cc: James Bottomley <[email protected]>
Cc: Kyle McMartin <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: <[email protected]>
|
|
Encoding is "(encoding << 16) | pic_mask"
Signed-off-by: David S. Miller <[email protected]>
|
|
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
sparc: Kill all BKL usage.
|
|
Neither the overcommit nor the reservation sysfs parameter were
actually working, remove them as they'll only get in the way.
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: paulus <[email protected]>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <[email protected]>
|
|
Replace pmu::{enable,disable,start,stop,unthrottle} with
pmu::{add,del,start,stop}, all of which take a flags argument.
The new interface extends the capability to stop a counter while
keeping it scheduled on the PMU. We replace the throttled state with
the generic stopped state.
This also allows us to efficiently stop/start counters over certain
code paths (like IRQ handlers).
It also allows scheduling a counter without it starting, allowing for
a generic frozen state (useful for rotating stopped counters).
The stopped state is implemented in two different ways, depending on
how the architecture implemented the throttled state:
1) We disable the counter:
a) the pmu has per-counter enable bits, we flip that
b) we program a NOP event, preserving the counter state
2) We store the counter state and ignore all read/overflow events
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: paulus <[email protected]>
Cc: stephane eranian <[email protected]>
Cc: Robert Richter <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Paul Mundt <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Cyrill Gorcunov <[email protected]>
Cc: Lin Ming <[email protected]>
Cc: Yanmin <[email protected]>
Cc: Deng-Cheng Zhu <[email protected]>
Cc: David Miller <[email protected]>
Cc: Michael Cree <[email protected]>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <[email protected]>
|
|
Changes perf_disable() into perf_pmu_disable().
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: paulus <[email protected]>
Cc: stephane eranian <[email protected]>
Cc: Robert Richter <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Paul Mundt <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Cyrill Gorcunov <[email protected]>
Cc: Lin Ming <[email protected]>
Cc: Yanmin <[email protected]>
Cc: Deng-Cheng Zhu <[email protected]>
Cc: David Miller <[email protected]>
Cc: Michael Cree <[email protected]>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <[email protected]>
|
|
Since the current perf_disable() usage is only an optimization,
remove it for now. This eases the removal of the __weak
hw_perf_enable() interface.
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: paulus <[email protected]>
Cc: stephane eranian <[email protected]>
Cc: Robert Richter <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Paul Mundt <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Cyrill Gorcunov <[email protected]>
Cc: Lin Ming <[email protected]>
Cc: Yanmin <[email protected]>
Cc: Deng-Cheng Zhu <[email protected]>
Cc: David Miller <[email protected]>
Cc: Michael Cree <[email protected]>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <[email protected]>
|
|
Simple registration interface for struct pmu, this provides the
infrastructure for removing all the weak functions.
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: paulus <[email protected]>
Cc: stephane eranian <[email protected]>
Cc: Robert Richter <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Paul Mundt <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Cyrill Gorcunov <[email protected]>
Cc: Lin Ming <[email protected]>
Cc: Yanmin <[email protected]>
Cc: Deng-Cheng Zhu <[email protected]>
Cc: David Miller <[email protected]>
Cc: Michael Cree <[email protected]>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <[email protected]>
|
|
sed -ie 's/const struct pmu\>/struct pmu/g' `git grep -l "const struct pmu\>"`
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: paulus <[email protected]>
Cc: stephane eranian <[email protected]>
Cc: Robert Richter <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Paul Mundt <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Cyrill Gorcunov <[email protected]>
Cc: Lin Ming <[email protected]>
Cc: Yanmin <[email protected]>
Cc: Deng-Cheng Zhu <[email protected]>
Cc: David Miller <[email protected]>
Cc: Michael Cree <[email protected]>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <[email protected]>
|
|
They were all bogus artifacts and completely unnecessary.
Signed-off-by: David S. Miller <[email protected]>
|
|
Conflicts:
arch/x86/kernel/trampoline.c
mm/memblock.c
Merge reason: Resolve the conflicts, update to latest upstream.
Signed-off-by: Ingo Molnar <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: pxa27x_keypad - remove input_free_device() in pxa27x_keypad_remove()
Input: mousedev - fix regression of inverting axes
Input: uinput - add devname alias to allow module on-demand load
Input: hil_kbd - fix compile error
USB: drop tty argument from usb_serial_handle_sysrq_char()
Input: sysrq - drop tty argument form handle_sysrq()
Input: sysrq - drop tty argument from sysrq ops handlers
|
|
Merge reason: pick up perf fixes
Signed-off-by: Ingo Molnar <[email protected]>
|
|
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
sparc64: Get rid of indirect p1275 PROM call buffer.
sparc64: Fill a missing delay slot.
sparc64: Make lock backoff really a NOP on UP builds.
sparc64: simple microoptimizations for atomic functions
sparc64: Make rwsems 64-bit.
sparc64: Really fix atomic64_t interface types.
|
|
This is based upon a report by Meelis Roos showing that it's possible
that we'll try to fetch a property that is 32K in size with some
devices. With the current fixed 3K buffer we use for moving data in
and out of the firmware during PROM calls, that simply won't work.
In fact, it will scramble random kernel data during bootup.
The reasoning behind the temporary buffer is entirely historical. It
used to be the case that we had problems referencing dynamic kernel
memory (including the stack) early in the boot process before we
explicitly told the firwmare to switch us over to the kernel trap
table.
So what we did was always give the firmware buffers that were locked
into the main kernel image.
But we no longer have problems like that, so get rid of all of this
indirect bounce buffering.
Besides fixing Meelis's bug, this also makes the kernel data about 3K
smaller.
It was also discovered during these conversions that the
implementation of prom_retain() was completely wrong, so that was
fixed here as well. Currently that interface is not in use.
Reported-by: Meelis Roos <[email protected]>
Tested-by: Meelis Roos <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Noone is using tty argument so let's get rid of it.
Acked-by: Alan Cox <[email protected]>
Acked-by: Jason Wessel <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
|
|
If the code were already aligned to 64 bytes, wr instruction would be executed
twice --- once in delay slot and once in the jump target.
Signed-off-by: Mikulas Patocka <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/core
|
|
As noticed by Mikulas Patocka, the backoff macros don't
completely nop out for UP builds, we still get a
branch always and a delay slot nop.
Fix this by making the branch to the backoff spin loop
selective, then we can nop out the spin loop completely.
Signed-off-by: David S. Miller <[email protected]>
|
|
Simple microoptimizations for sparc64 atomic functions:
Save one instruction by using a delay slot.
Use %g1 instead of %g7, because %g1 is written earlier.
Signed-off-by: Mikulas Patocka <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Store the kernel and user contexts from the generic layer instead
of archs, this gathers some repetitive code.
Signed-off-by: Frederic Weisbecker <[email protected]>
Acked-by: Paul Mackerras <[email protected]>
Tested-by: Will Deacon <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: David Miller <[email protected]>
Cc: Paul Mundt <[email protected]>
Cc: Borislav Petkov <[email protected]>
|
|
- Most archs use one callchain buffer per cpu, except x86 that needs
to deal with NMIs. Provide a default perf_callchain_buffer()
implementation that x86 overrides.
- Centralize all the kernel/user regs handling and invoke new arch
handlers from there: perf_callchain_user() / perf_callchain_kernel()
That avoid all the user_mode(), current->mm checks and so...
- Invert some parameters in perf_callchain_*() helpers: entry to the
left, regs to the right, following the traditional (dst, src).
Signed-off-by: Frederic Weisbecker <[email protected]>
Acked-by: Paul Mackerras <[email protected]>
Tested-by: Will Deacon <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: David Miller <[email protected]>
Cc: Paul Mundt <[email protected]>
Cc: Borislav Petkov <[email protected]>
|
|
callchain_store() is the same on every archs, inline it in
perf_event.h and rename it to perf_callchain_store() to avoid
any collision.
This removes repetitive code.
Signed-off-by: Frederic Weisbecker <[email protected]>
Acked-by: Paul Mackerras <[email protected]>
Tested-by: Will Deacon <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: David Miller <[email protected]>
Cc: Paul Mundt <[email protected]>
Cc: Borislav Petkov <[email protected]>
|
|
Basically tip-off the powerpc code, use a 64-bit type and atomic64_t
interfaces for the implementation.
This gets us off of the by-hand asm code I wrote, which frankly I
think probably ruins I-cache hit rates.
The idea was the keep the call chains less deep, but anything taking
the rw-semaphores probably is also calling other stuff and therefore
already has allocated a stack-frame. So no real stack frame savings
ever.
Ben H. has posted patches to make powerpc use 64-bit too and with some
abstractions we can probably use a shared header file somewhere.
With suggestions from Sam Ravnborg.
Signed-off-by: David S. Miller <[email protected]>
|
|
Linus noticed that some of the interface arguments
didn't get "int" --> "long" conversion, as needed.
Signed-off-by: David S. Miller <[email protected]>
|
|
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
sparc64: Fix atomic64_t routine return values.
sparc64: Fix rwsem constant bug leading to hangs.
sparc: Hook up new fanotify and prlimit64 syscalls.
sparc: Really fix "console=" for serial consoles.
|
|
Make do_execve() take a const filename pointer so that kernel_execve() compiles
correctly on ARM:
arch/arm/kernel/sys_arm.c:88: warning: passing argument 1 of 'do_execve' discards qualifiers from pointer target type
This also requires the argv and envp arguments to be consted twice, once for
the pointer array and once for the strings the array points to. This is
because do_execve() passes a pointer to the filename (now const) to
copy_strings_kernel(). A simpler alternative would be to cast the filename
pointer in do_execve() when it's passed to copy_strings_kernel().
do_execve() may not change any of the strings it is passed as part of the argv
or envp lists as they are some of them in .rodata, so marking these strings as
const should be fine.
Further kernel_execve() and sys_execve() need to be changed to match.
This has been test built on x86_64, frv, arm and mips.
Signed-off-by: David Howells <[email protected]>
Tested-by: Ralf Baechle <[email protected]>
Acked-by: Russell King <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Should return 'long' instead of 'int'.
Thanks to Dimitris Michailidis and Tony Luck.
Signed-off-by: David S. Miller <[email protected]>
|