09 May, 2008
2 commits
-
m32r can use the generic sys_pipe implementation.
The current sys_pipe implementation on m32r only differes from the
generic one by passing a lot of additional unused registers to sys_pipe.Reviewed and tested by Hirokazu Takata.
Signed-off-by: Christoph Hellwig
Acked-by: Hirokazu Takata
Signed-off-by: Linus Torvalds -
Remember to close the files if copy_to_user() failed.
Spotted by dm.n9107@gmail.com.
Signed-off-by: Ulrich Drepper
Cc: DM
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
29 Apr, 2008
2 commits
-
The section .data.idt is not used at all - so drop it.
Signed-off-by: Cyrill Gorcunov
Acked-by: Sam Ravnborg
Signed-off-by: Andrew Morton
Signed-off-by: Hirokazu Takata -
With using KBUILD_DEFCONFIG we don't have to ship a second copy of
m32700ut.smp_defconfigSigned-off-by: Adrian Bunk
Acked-by: Hirokazu Takata
17 Apr, 2008
1 commit
-
Semaphores are no longer performance-critical, so a generic C
implementation is better for maintainability, debuggability and
extensibility. Thanks to Peter Zijlstra for fixing the lockdep
warning. Thanks to Harvey Harrison for pointing out that the
unlikely() was unnecessary.Signed-off-by: Matthew Wilcox
Acked-by: Ingo Molnar
09 Feb, 2008
4 commits
-
To allow flexible configuration of IDE introduce HAVE_IDE.
All archs except arm, um and s390 unconditionally select it.
For arm the actual configuration determine if IDE is supported.This is a step towards introducing drivers/Kconfig for arm.
Signed-off-by: Sam Ravnborg
Acked-by: Russell King - ARM Linux
Acked-by: Bartlomiej Zolnierkiewicz -
When the conversion factor between jiffies and milli- or microseconds is
not a single multiply or divide, as for the case of HZ == 300, we currently
do a multiply followed by a divide. The intervening result, however, is
subject to overflows, especially since the fraction is not simplified (for
HZ == 300, we multiply by 300 and divide by 1000).This is exposed to the user when passing a large timeout to poll(), for
example.This patch replaces the multiply-divide with a reciprocal multiplication on
32-bit platforms. When the input is an unsigned long, there is no portable
way to do this on 64-bit platforms there is no portable way to do this
since it requires a 128-bit intermediate result (which gcc does support on
64-bit platforms but may generate libgcc calls, e.g. on 64-bit s390), but
since the output is a 32-bit integer in the cases affected, just simplify
the multiply-divide (*3/10 instead of *300/1000).The reciprocal multiply used can have off-by-one errors in the upper half
of the valid output range. This could be avoided at the expense of having
to deal with a potential 65-bit intermediate result. Since the intent is
to avoid overflow problems and most of the other time conversions are only
semiexact, the off-by-one errors were considered an acceptable tradeoff.At Ralf Baechle's suggestion, this version uses a Perl script to compute
the necessary constants. We already have dependencies on Perl for kernel
compiles. This does, however, require the Perl module Math::BigInt, which
is included in the standard Perl distribution starting with version 5.8.0.
In order to support older versions of Perl, include a table of canned
constants in the script itself, and structure the script so that
Math::BigInt isn't required if pulling values from said table.Running the script requires that the HZ value is available from the
Makefile. Thus, this patch also adds the Kconfig variable CONFIG_HZ to the
architectures which didn't already have it (alpha, cris, frv, h8300, m32r,
m68k, m68knommu, sparc, v850, and xtensa.) It does *not* touch the sh or
sh64 architectures, since Paul Mundt has dealt with those separately in the
sh tree.Signed-off-by: H. Peter Anvin
Cc: Ralf Baechle ,
Cc: Sam Ravnborg ,
Cc: Paul Mundt ,
Cc: Richard Henderson ,
Cc: Michael Starvik ,
Cc: David Howells ,
Cc: Yoshinori Sato ,
Cc: Hirokazu Takata ,
Cc: Geert Uytterhoeven ,
Cc: Roman Zippel ,
Cc: William L. Irwin ,
Cc: Chris Zankel ,
Cc: H. Peter Anvin ,
Cc: Jan Engelhardt
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Jan Engelhardt
Acked-by: Geert Uytterhoeven
Acked-by: Mike Frysinger
Acked-By: David Howells
Acked-by: Bryan Wu
Acked-by: Jesper Nilsson
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Mark arches that support A.OUT format by including the following in their
master Kconfig files:config ARCH_SUPPORTS_AOUT
def_bool yThis should also be set if the arch provides compatibility A.OUT support for
an older arch, for instance x86_64 for i386 or sparc64 for sparc.I've guessed at which arches don't, based on comments in the code, however I'm
sure that some of the ones I've marked as 'yes' actually should be 'no'.Signed-off-by: David Howells
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
08 Feb, 2008
2 commits
-
This patch is for Mathieu Desnoyers's include/asm-m32r/local.h.
Applying the new include/asm-m32r/local.h, inclusion of linux/sched.h
is needed to fix a build error of arch/m32r/kernel/smpboot.c....
CC arch/m32r/kernel/smpboot.o
/project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c: In function 'do_boot_cpu':
/project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:279: error: implicit declaration of function 'fork_idle'
/project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:279: warning: assignment makes pointer from integer without a cast
/project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:283: error: dereferencing pointer to incomplete type
/project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:289: error: dereferencing pointer to incomplete type
/project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:290: error: implicit declaration of function 'task_thread_info'
/project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:290: error: invalid type argument of '->'
/project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c: In function 'start_secondary':
/project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:429: error: implicit declaration of function 'cpu_init'
make[2]: *** [arch/m32r/kernel/smpboot.o] Error 1Signed-off-by: Hirokazu Takata
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patchset adds a flags variable to reserve_bootmem() and uses the
BOOTMEM_EXCLUSIVE flag in crashkernel reservation code to detect collisions
between crashkernel area and already used memory.This patch:
Change the reserve_bootmem() function to accept a new flag BOOTMEM_EXCLUSIVE.
If that flag is set, the function returns with -EBUSY if the memory already
has been reserved in the past. This is to avoid conflicts.Because that code runs before SMP initialisation, there's no race condition
inside reserve_bootmem_core().[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: fix powerpc build]
Signed-off-by: Bernhard Walle
Cc:
Cc: "Eric W. Biederman"
Cc: Vivek Goyal
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
06 Feb, 2008
2 commits
-
Cc: David Howells
Cc: Hirokazu Takata
Cc: Paul Mundt
Cc: Kazumoto Kojima
Cc: Richard Curnow
Cc: Davide Libenzi
Cc: Michael Kerrisk
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
remove dead config symbols from M32R code
Signed-off-by: Jiri Olsa
Cc: Hirokazu Takata
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
04 Feb, 2008
1 commit
-
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (79 commits)
Jesper Juhl is the new trivial patches maintainer
Documentation: mention email-clients.txt in SubmittingPatches
fs/binfmt_elf.c: spello fix
do_invalidatepage() comment typo fix
Documentation/filesystems/porting fixes
typo fixes in net/core/net_namespace.c
typo fix in net/rfkill/rfkill.c
typo fixes in net/sctp/sm_statefuns.c
lib/: Spelling fixes
kernel/: Spelling fixes
include/scsi/: Spelling fixes
include/linux/: Spelling fixes
include/asm-m68knommu/: Spelling fixes
include/asm-frv/: Spelling fixes
fs/: Spelling fixes
drivers/watchdog/: Spelling fixes
drivers/video/: Spelling fixes
drivers/ssb/: Spelling fixes
drivers/serial/: Spelling fixes
drivers/scsi/: Spelling fixes
...
03 Feb, 2008
4 commits
-
Signed-off-by: Joe Perches
Signed-off-by: Adrian Bunk -
After seeing the filename I'd have expected something about the
implementation of SMP in the Linux kernel - not some notes on kernel
configuration and building trivialities noone would search at this
place.Signed-off-by: Adrian Bunk
Acked-by: Alan Cox -
Move the instrumentation Kconfig to
arch/Kconfig for architecture dependent options
- oprofile
- kprobesand
init/Kconfig for architecture independent options
- profiling
- markersRemove the "Instrumentation Support" menu. Everything moves to "General setup".
Delete the kernel/Kconfig.instrumentation file.Signed-off-by: Mathieu Desnoyers
Cc: Linus Torvalds
Cc:
Signed-off-by: Sam Ravnborg -
Linus:
On the per-architecture side, I do think it would be better to *not* have
internal architecture knowledge in a generic file, and as such a line likedepends on X86_32 || IA64 || PPC || S390 || SPARC64 || X86_64 || AVR32
really shouldn't exist in a file like kernel/Kconfig.instrumentation.
It would be much better to do
depends on ARCH_SUPPORTS_KPROBES
in that generic file, and then architectures that do support it would just
have abool ARCH_SUPPORTS_KPROBES
default yin *their* architecture files. That would seem to be much more logical,
and is readable both for arch maintainers *and* for people who have no
clue - and don't care - about which architecture is supposed to support
which interface...Changelog:
Actually, I know I gave this as the magic incantation, but now that I see
it, I realize that I should have told you to just useconfig ARCH_SUPPORTS_KPROBES
def_bool yinstead, which is a bit denser.
We seem to use both kinds of syntax for these things, but this is really
what "def_bool" is there for...Changelog :
- Moving to HAVE_*.
- Add AVR32 oprofile.Signed-off-by: Mathieu Desnoyers
Cc: Andrew Morton
Cc: Haavard Skinnemoen
Cc: David Howells
Cc: Jeff Dike
Cc: Ananth N Mavinakayanahalli
Signed-off-by: Sam Ravnborg
02 Feb, 2008
1 commit
-
A HOWTO that hasn't been updated for half a dozen years no longer
"contains valuable information about which PCI hardware does work under
Linux and which doesn't".Signed-off-by: Adrian Bunk
Signed-off-by: Greg Kroah-Hartman
30 Jan, 2008
1 commit
-
The break_lock data structure and code for spinlocks is quite nasty.
Not only does it double the size of a spinlock but it changes locking to
a potentially less optimal trylock.Put all of that under CONFIG_GENERIC_LOCKBREAK, and introduce a
__raw_spin_is_contended that uses the lock data itself to determine whether
there are waiters on the lock, to be used if CONFIG_GENERIC_LOCKBREAK is
not set.Rename need_lockbreak to spin_needbreak, make it use spin_is_contended to
decouple it from the spinlock implementation, and make it typesafe (rwlocks
do not have any need_lockbreak sites -- why do they even get bloated up
with that break_lock then?).Signed-off-by: Nick Piggin
Signed-off-by: Ingo Molnar
Signed-off-by: Thomas Gleixner
29 Jan, 2008
1 commit
-
This patch consolidate all definitions of .init.text, .init.data
and .exit.text, .exit.data section definitions in
the generic vmlinux.lds.h.This is a preparational patch - alone it does not buy
us much good.Signed-off-by: Sam Ravnborg
28 Nov, 2007
2 commits
-
Update sys_rt_sigsuspend() of arch/m32r/signal.c.
This modification is derived from generic one of kernel/signal.c.Signed-off-by: Hirokazu Takata
-
Add the following 39 syscalls for m32r:
sys_add_key, sys_request_key, sys_keyctl, sys_ioprio_set,
sys_ioprio_get, sys_inotify_init, sys_inotify_add_watch,
sys_inotify_rm_watch, sys_migrate_pages, sys_openat,
sys_mkdirat, sys_mknodat, sys_fchownat, sys_futimesat,
sys_fstatat64, sys_unlinkat, sys_renameat, sys_linkat,
sys_symlinkat, sys_readlinkat, sys_fchmodat, sys_faccessat,
sys_pselect6, sys_ppoll, sys_unshare, sys_set_robust_list,
sys_get_robust_list, sys_splice, sys_sync_file_range,
sys_tee, sys_vmsplice, sys_move_pages, sys_getcpu, sys_epoll_pwait,
sys_utimensat, sys_signalfd, sys_timerfd, sys_eventfd, sys_fallocateSigned-off-by: Hirokazu Takata
20 Oct, 2007
4 commits
-
Spelling fixes in arch/m32r/.
Signed-off-by: Simon Arlott
Signed-off-by: Adrian Bunk -
Quoting Randy:
"It seems sad that this patch sources Kconfig.marker, a 7-line file,
20-something times. Yes, you (we) don't want to put those 7 lines into
20-something different files, so sourcing is the right thing.However, what you did for avr32 seems more on the right track to me: make
_one_ Instrumentation support menu that includes PROFILING, OPROFILE, KPROBES,
and MARKERS and then use (source) that in all of the arches."Signed-off-by: Mathieu Desnoyers
Acked-by: Randy Dunlap
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
One of the easiest things to isolate is the pid printed in kernel log.
There was a patch, that made this for arch-independent code, this one makes
so for arch/xxx files.It took some time to cross-compile it, but hopefully these are all the
printks in arch code.Signed-off-by: Alexey Dobriyan
Signed-off-by: Pavel Emelyanov
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
is_init() is an ambiguous name for the pid==1 check. Split it into
is_global_init() and is_container_init().A cgroup init has it's tsk->pid == 1.
A global init also has it's tsk->pid == 1 and it's active pid namespace
is the init_pid_ns. But rather than check the active pid namespace,
compare the task structure with 'init_pid_ns.child_reaper', which is
initialized during boot to the /sbin/init process and never changes.Changelog:
2.6.22-rc4-mm2-pidns1:
- Use 'init_pid_ns.child_reaper' to determine if a given task is the
global init (/sbin/init) process. This would improve performance
and remove dependence on the task_pid().2.6.21-mm2-pidns2:
- [Sukadev Bhattiprolu] Changed is_container_init() calls in {powerpc,
ppc,avr32}/traps.c for the _exception() call to is_global_init().
This way, we kill only the cgroup if the cgroup's init has a
bug rather than force a kernel panic.[akpm@linux-foundation.org: fix comment]
[sukadev@us.ibm.com: Use is_global_init() in arch/m32r/mm/fault.c]
[bunk@stusta.de: kernel/pid.c: remove unused exports]
[sukadev@us.ibm.com: Fix capability.c to work with threaded init]
Signed-off-by: Serge E. Hallyn
Signed-off-by: Sukadev Bhattiprolu
Acked-by: Pavel Emelianov
Cc: Eric W. Biederman
Cc: Cedric Le Goater
Cc: Dave Hansen
Cc: Herbert Poetzel
Cc: Kirill Korotaev
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
17 Oct, 2007
6 commits
-
All asm/ipc.h files do only #include .
This patch therefore removes all include/asm-*/ipc.h files and moves the
contents of include/asm-generic/ipc.h to include/linux/ipc.h.Signed-off-by: Adrian Bunk
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (40 commits)
kbuild: introduce ccflags-y, asflags-y and ldflags-y
kbuild: enable 'make CPPFLAGS=...' to add additional options to CPP
kbuild: enable use of AFLAGS and CFLAGS on commandline
kbuild: enable 'make AFLAGS=...' to add additional options to AS
kbuild: fix AFLAGS use in h8300 and m68knommu
kbuild: check for wrong use of CFLAGS
kbuild: enable 'make CFLAGS=...' to add additional options to CC
kbuild: fix up CFLAGS usage
kbuild: make modpost detect unterminated device id lists
kbuild: call export_report from the Makefile
kbuild: move Kai Germaschewski to CREDITS
kconfig/menuconfig: distinguish between selected-by-another options and comments
kconfig: tristate choices with mixed tristate and boolean values
include/linux/Kbuild: remove duplicate entries
kbuild: kill backward compatibility checks
kbuild: kill EXTRA_ARFLAGS
kbuild: fix documentation in makefiles.txt
kbuild: call make once for all targets when O=.. is used
kbuild: pass -g to assembler under CONFIG_DEBUG_INFO
kbuild: update _shipped files for kconfig syntax cleanup
...Fix up conflicts in arch/um/sys-{x86_64,i386}/Makefile manually.
-
Convert m32r to the generic sys_ptrace. The conversion requires an
architecture hook after ptrace_attach which this patch adds. The hook
will also be needed for a conersion of ia64 to the generic ptrace code.Thanks to Hirokazu Takata for fixing a bug in the first version of this
code.Signed-off-by: Christoph Hellwig
Cc: Hirokazu Takata
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Thomas Gleixner
Cc: Hirokazu Takata
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
We have had complaints where a threaded application is left in a bad state
after one of it's threads is killed when we hit a VM: out_of_memory
condition.Killing just one of the process threads can leave the application in a bad
state, whereas killing the entire process group would allow for the
application to restart, or be otherwise handled, and makes it very obvious
that something has gone wrong.This change allows the entire process group to be taken down, rather
than just the one thread.Signed-off-by: Will Schmidt
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Cc: Russell King
Cc: Ian Molton
Cc: Haavard Skinnemoen
Cc: Mikael Starvik
Cc: David Howells
Cc: Andi Kleen
Cc: "Luck, Tony"
Cc: Hirokazu Takata
Cc: Geert Uytterhoeven
Cc: Roman Zippel
Cc: Ralf Baechle
Cc: Kyle McMartin
Cc: Matthew Wilcox
Cc: Paul Mackerras
Cc: Benjamin Herrenschmidt
Cc: Heiko Carstens
Cc: Martin Schwidefsky
Cc: Paul Mundt
Cc: Kazumoto Kojima
Cc: Richard Curnow
Cc: William Lee Irwin III
Cc: "David S. Miller"
Cc: Chris Zankel
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Identical handlers of PTRACE_DETACH go into ptrace_request().
Not touching compat code.
Not touching archs that don't call ptrace_request.Signed-off-by: Alexey Dobriyan
Acked-by: Christoph Hellwig
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
16 Oct, 2007
1 commit
-
The variable AFLAGS is a wellknown variable and the usage by
kbuild may result in unexpected behaviour.
On top of that several people over time has asked for a way to
pass in additional flags to gcc.This patch replace use of AFLAGS with KBUILD_AFLAGS all over
the tree.Patch was tested on following architectures:
alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k, s390Signed-off-by: Sam Ravnborg
15 Oct, 2007
1 commit
-
The variable CFLAGS is a wellknown variable and the usage by
kbuild may result in unexpected behaviour.
On top of that several people over time has asked for a way to
pass in additional flags to gcc.This patch replace use of CFLAGS with KBUILD_CFLAGS all over the
tree and enabling one to use:
make CFLAGS=...
to specify additional gcc commandline options.One usecase is when trying to find gcc bugs but other
use cases has been requested too.Patch was tested on following architectures:
alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68kTest was simple to do a defconfig build, apply the patch and check
that nothing got rebuild.Signed-off-by: Sam Ravnborg
06 Sep, 2007
2 commits
-
The names of STI and CLI macros were derived from i386 arch historically,
but their name are incomprehensible.
So, for easy to understand, rename these macros to ENABLE_INTERRUPTS
and DISABLE_INTERRUPTS, respectively.Signed-off-by: Hirokazu Takata
-
This patch fixes the following compile error:
...
AS arch/m32r/kernel/entry.o
/home/bunk/linux/kernel-2.6/linux-2.6.23-rc3-mm1/arch/m32r/kernel/entry.S: Assembler messages:
/home/bunk/linux/kernel-2.6/linux-2.6.23-rc3-mm1/arch/m32r/kernel/entry.S:358: Error: bad instruction `addi r0,#(((((0)+(64))+(32))+(32)))'
make[2]: *** [arch/m32r/kernel/entry.o] Error 1Signed-off-by: Hirokazu Takata
Cc: Adrian Bunk
03 Sep, 2007
3 commits
-
- Separate sys_call_table from arch/m32r/kernel/entry.S and
move it to arch/m32r/kernel/system_call.S.
- Change sys_call_table section from .data to .rodata.Signed-off-by: Hirokazu Takata
-
- Remove unused symbols *_MASK
- Change indentation of comments, etc.Signed-off-by: Hirokazu Takata
-
If no IRQ request is found in the IRQ check of ei_handler,
we can exit directly by jumping "restore_all", instead of via
"ret_from_intr".This modification is also likely effective for IPI operations,
because scheduler call never happen at the exit of IPIs.Signed-off-by: Hitoshi Yamamoto
Signed-off-by: Hirokazu Takata