linux-drm-fsl-dcu.git
17 years ago[PATCH] KVM: cpu hotplug support
Avi Kivity [Mon, 12 Feb 2007 08:54:47 +0000 (00:54 -0800)]
[PATCH] KVM: cpu hotplug support

On hotplug, we execute the hardware extension enable sequence.  On unplug, we
decache any vcpus that last ran on the exiting cpu, and execute the hardware
extension disable sequence.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] KVM: VMX: add vcpu_clear()
Avi Kivity [Mon, 12 Feb 2007 08:54:46 +0000 (00:54 -0800)]
[PATCH] KVM: VMX: add vcpu_clear()

Like the inline code it replaces, this function decaches the vmcs from the cpu
it last executed on.  in addition:

 - vcpu_clear() works if the last cpu is also the cpu we're running on
 - it is faster on larger smps by virtue of using smp_call_function_single()

Includes fix from Ingo Molnar.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] KVM: Add a global list of all virtual machines
Avi Kivity [Mon, 12 Feb 2007 08:54:44 +0000 (00:54 -0800)]
[PATCH] KVM: Add a global list of all virtual machines

This will allow us to iterate over all vcpus and see which cpus they are
running on.

[akpm@osdl.org: use standard (ugly) initialisers]
Signed-off-by: Avi Kivity <avi@qumranet.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] hotplug: Allow modules to use the cpu hotplug notifiers even if !CONFIG_HOTPL...
Avi Kivity [Mon, 12 Feb 2007 08:54:43 +0000 (00:54 -0800)]
[PATCH] hotplug: Allow modules to use the cpu hotplug notifiers even if !CONFIG_HOTPLUG_CPU

The following patchset allows a host with running virtual machines to be
suspended and, on at least a subset of the machines tested, resumed.  Note
that this is orthogonal to suspending and resuming an individual guest to a
file.

A side effect of implementing suspend/resume is that cpu hotplug is now
supported.  This should please the owners of big iron.

This patch:

KVM wants the cpu hotplug notifications, both for cpu hotplug itself, but more
commonly for host suspend/resume.

In order to avoid extensive #ifdefs, provide stubs when CONFIG_CPU_HOTPLUG is
not defined.

In all, we have four cases:

- UP: register and unregister stubbed out
- SMP+hotplug: full register and unregister
- SMP, no hotplug, core: register as __init, unregister stubbed
      (cpus are brought up during core initialization)
- SMP, no hotplug, module: register and unregister stubbed out
      (cpus cannot be brought up during module lifetime)

Signed-off-by: Avi Kivity <avi@qumranet.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] kvm: fix vcpu freeing bug
Ingo Molnar [Mon, 12 Feb 2007 08:54:42 +0000 (00:54 -0800)]
[PATCH] kvm: fix vcpu freeing bug

vcpu_load() can return NULL and it sometimes does in failure paths (for
example when the userspace ABI version is too old) - causing a preemption
count underflow in the ->vcpu_free() later on.  So check for NULL.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] kvm: Fix mismatch between 32-bit and 64-bit abi
Avi Kivity [Mon, 12 Feb 2007 08:54:41 +0000 (00:54 -0800)]
[PATCH] kvm: Fix mismatch between 32-bit and 64-bit abi

Unfortunately requiring a version bump.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] kvm: VMX: Reload ds and es even in 64-bit mode
Avi Kivity [Mon, 12 Feb 2007 08:54:40 +0000 (00:54 -0800)]
[PATCH] kvm: VMX: Reload ds and es even in 64-bit mode

Or 32-bit userspace will get confused.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] kvm: Two-way apic tpr synchronization
Dor Laor [Mon, 12 Feb 2007 08:54:39 +0000 (00:54 -0800)]
[PATCH] kvm: Two-way apic tpr synchronization

We report the value of cr8 to userspace on an exit.  Also let userspace change
cr8 when we re-enter the guest.  The lets 64-bit guest code maintain the tpr
correctly.

Thanks for Yaniv Kamay for the idea.

Signed-off-by: Dor Laor <dor.laor@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] kvm: SVM: Hack initial cpu csbase to be consistent with intel
Avi Kivity [Mon, 12 Feb 2007 08:54:38 +0000 (00:54 -0800)]
[PATCH] kvm: SVM: Hack initial cpu csbase to be consistent with intel

This allows us to run the mmu testsuite on amd.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] kvm: Fix mmu going crazy of guest sets cr0.wp == 0
Avi Kivity [Mon, 12 Feb 2007 08:54:37 +0000 (00:54 -0800)]
[PATCH] kvm: Fix mmu going crazy of guest sets cr0.wp == 0

The kvm mmu relies on cr0.wp being set even if the guest does not set it.  The
vmx code correctly forces cr0.wp at all times, the svm code does not, so it
can't boot solaris without this patch.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] kvm: vmx: handle triple faults by returning EXIT_REASON_SHUTDOWN to userspace
Avi Kivity [Mon, 12 Feb 2007 08:54:36 +0000 (00:54 -0800)]
[PATCH] kvm: vmx: handle triple faults by returning EXIT_REASON_SHUTDOWN to userspace

Just like svm.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] kvm: Fix gva_to_gpa()
Avi Kivity [Mon, 12 Feb 2007 08:54:36 +0000 (00:54 -0800)]
[PATCH] kvm: Fix gva_to_gpa()

gva_to_gpa() needs to be updated to the new walk_addr() calling convention,
otherwise it may oops under some circumstances.

Use the opportunity to remove all the code duplication in gva_to_gpa(), which
essentially repeats the calculations in walk_addr().

Signed-off-by: Avi Kivity <avi@qumranet.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] kvm: Fix asm constraint for lldt instruction
S.Caglar Onur [Mon, 12 Feb 2007 08:54:34 +0000 (00:54 -0800)]
[PATCH] kvm: Fix asm constraint for lldt instruction

lldt does not accept immediate operands, which "g" allows.

Signed-off-by: S.Caglar Onur <caglar@pardus.org.tr>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] kvm: optimize inline assembly
Ingo Molnar [Mon, 12 Feb 2007 08:54:33 +0000 (00:54 -0800)]
[PATCH] kvm: optimize inline assembly

Forms like "0(%rsp)" generate an instruction with an unnecessary one byte
displacement under certain circumstances.  replace with the equivalent
"(%rsp)".

Signed-off-by: Avi Kivity <avi@qumranet.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] ufs2 write: block allocation update
Evgeniy Dushistov [Mon, 12 Feb 2007 08:54:32 +0000 (00:54 -0800)]
[PATCH] ufs2 write: block allocation update

Patch adds ability to work with 64bit metadata, this made by replacing work
with 32bit pointers by inline functions.

Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] ufs2 write: inodes write
Evgeniy Dushistov [Mon, 12 Feb 2007 08:54:31 +0000 (00:54 -0800)]
[PATCH] ufs2 write: inodes write

This patch adds into write inode path function to write UFS2 inode, and
modifys allocate inode path to allocate and init additional inode chunks.

Also some cleanups:
- remove not used parameters in some functions
- remove i_gen field from ufs_inode_info structure,
there is i_generation in inode structure with same purposes.

Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] ufs2 write: mount as rw
Evgeniy Dushistov [Mon, 12 Feb 2007 08:54:30 +0000 (00:54 -0800)]
[PATCH] ufs2 write: mount as rw

These series of patches add UFS2 write-support.  UFS2 - is default file system
for recent versions of FreeBSD.

The main differences from UFS1 from write support point of view
are:
1)Not all inodes are allocated during formatation of disk.
2)All meta-data(pointer to data blocks) are 64bit(in UFS1 they
are 32bit).

So patch series consist of
1)make possible mount UFS2 in read-write mode
2)code to write ufs2 inodes and code to initialize inodes chunks.
3)work with 64bit meta-data

I made simple testing like create/deleting/writing/reading/truncating, also I
ran fsx-linux and untar and build kernel on UFS1 and UFS2, after that FreeBSD
fsck do not find any errors in fs.

This patch makes possible to mount ufs2 "rw", and updates UFS2 documentation:
remove note about bug(it fixed by reallocate blocks on the fly patch) and add
me in the list of people who want receive bug reports.

Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] ia64: 2048-byte command line
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:29 +0000 (00:54 -0800)]
[PATCH] ia64: 2048-byte command line

Current implementation allows the kernel to receive up to 255 characters from
the bootloader.  While the boot protocol allows greater buffers to be sent.

In current environment, the command-line is used in order to specify many
values, including suspend/resume, module arguments, splash, initramfs and
more.

255 characters are not enough anymore.

After edd issue was fixed, and dynammic kernel command-line patch was
accepted, we can extend the COMMAND_LINE_SIZE without runtime memory
requirements.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] x86_64: 2048-byte command line
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:28 +0000 (00:54 -0800)]
[PATCH] x86_64: 2048-byte command line

Current implementation allows the kernel to receive up to 255 characters from
the bootloader.  While the boot protocol allows greater buffers to be sent.

In current environment, the command-line is used in order to specify many
values, including suspend/resume, module arguments, splash, initramfs and
more.

255 characters are not enough anymore.

After edd issue was fixed, and dynammic kernel command-line patch was
accepted, we can extend the COMMAND_LINE_SIZE without runtime memory
requirements.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] i386: 2048-byte command line
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:27 +0000 (00:54 -0800)]
[PATCH] i386: 2048-byte command line

Current implementation allows the kernel to receive up to 255 characters from
the bootloader.  While the boot protocol allows greater buffers to be sent.

In current environment, the command-line is used in order to specify many
values, including suspend/resume, module arguments, splash, initramfs and
more.

255 characters are not enough anymore.

After edd issue was fixed, and dynammic kernel command-line patch was
accepted, we can extend the COMMAND_LINE_SIZE without runtime memory
requirements.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Dynamic kernel command-line: fixups
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:26 +0000 (00:54 -0800)]
[PATCH] Dynamic kernel command-line: fixups

Remove in-source externs, linux/init.h is included in all cases.
This is a fixups for "Dynamic kernel command-line" patch.

It also includes some uml __init fixups so that we can __initdata also its
command_line.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Dynamic kernel command-line: xtensa
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:25 +0000 (00:54 -0800)]
[PATCH] Dynamic kernel command-line: xtensa

1. Rename saved_command_line into boot_command_line.
2. Set command_line as __initdata.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: Chris Zankel <chris@zankel.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Dynamic kernel command-line: x86_64
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:25 +0000 (00:54 -0800)]
[PATCH] Dynamic kernel command-line: x86_64

1. Rename saved_command_line into boot_command_line.
2. Set command_line as __initdata.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Dynamic kernel command-line: v850
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:24 +0000 (00:54 -0800)]
[PATCH] Dynamic kernel command-line: v850

1. Rename saved_command_line into boot_command_line.
2. Set command_line as __initdata.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Dynamic kernel command-line: um
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:23 +0000 (00:54 -0800)]
[PATCH] Dynamic kernel command-line: um

1. Rename saved_command_line into boot_command_line.
2. Set command_line as __initdata.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Dynamic kernel command-line: sparc64
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:22 +0000 (00:54 -0800)]
[PATCH] Dynamic kernel command-line: sparc64

Rename saved_command_line into boot_command_line.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Dynamic kernel command-line: sparc
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:21 +0000 (00:54 -0800)]
[PATCH] Dynamic kernel command-line: sparc

Rename saved_command_line into boot_command_line.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: William Lee Irwin III <wli@holomorphy.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Dynamic kernel command-line: sh64
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:20 +0000 (00:54 -0800)]
[PATCH] Dynamic kernel command-line: sh64

1. Rename saved_command_line into boot_command_line.
2. Set command_line as __initdata.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Dynamic kernel command-line: sh
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:19 +0000 (00:54 -0800)]
[PATCH] Dynamic kernel command-line: sh

1. Rename saved_command_line into boot_command_line.
2. Set command_line as __initdata.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Dynamic kernel command-line: s390
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:19 +0000 (00:54 -0800)]
[PATCH] Dynamic kernel command-line: s390

Rename saved_command_line into boot_command_line.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Dynamic kernel command-line: ppc
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:18 +0000 (00:54 -0800)]
[PATCH] Dynamic kernel command-line: ppc

Rename saved_command_line into boot_command_line.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Dynamic kernel command-line: powerpc
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:17 +0000 (00:54 -0800)]
[PATCH] Dynamic kernel command-line: powerpc

Rename saved_command_line into boot_command_line.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Dynamic kernel command-line: parisc
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:16 +0000 (00:54 -0800)]
[PATCH] Dynamic kernel command-line: parisc

1. Rename saved_command_line into boot_command_line.
2. Set command_line as __initdata.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Dynamic kernel command-line: mips
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:15 +0000 (00:54 -0800)]
[PATCH] Dynamic kernel command-line: mips

Rename saved_command_line into boot_command_line.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Dynamic kernel command-line: m68knommu
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:14 +0000 (00:54 -0800)]
[PATCH] Dynamic kernel command-line: m68knommu

1. Rename saved_command_line into boot_command_line.
2. Set command_line as __initdata.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Dynamic kernel command-line: m68k
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:14 +0000 (00:54 -0800)]
[PATCH] Dynamic kernel command-line: m68k

Rename saved_command_line into boot_command_line.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Dynamic kernel command-line: m32r
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:13 +0000 (00:54 -0800)]
[PATCH] Dynamic kernel command-line: m32r

1. Rename saved_command_line into boot_command_line.
2. Set command_line as __initdata.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Dynamic kernel command-line: ia64
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:12 +0000 (00:54 -0800)]
[PATCH] Dynamic kernel command-line: ia64

1. Rename saved_command_line into boot_command_line.
2. Set command_line as __initdata.

[akpm@osdl.org: move some declarations to the right place]
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Dynamic kernel command-line: i386
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:11 +0000 (00:54 -0800)]
[PATCH] Dynamic kernel command-line: i386

1. Rename saved_command_line into boot_command_line.
2. Set command_line as __initdata.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Dynamic kernel command-line: h8300
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:10 +0000 (00:54 -0800)]
[PATCH] Dynamic kernel command-line: h8300

1. Rename saved_command_line into boot_command_line.
2. Set command_line as __initdata.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Dynamic kernel command-line: frv
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:09 +0000 (00:54 -0800)]
[PATCH] Dynamic kernel command-line: frv

1. Rename saved_command_line into boot_command_line.
2. Set command_line as __initdata.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Dynamic kernel command-line: cris
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:09 +0000 (00:54 -0800)]
[PATCH] Dynamic kernel command-line: cris

1. Rename saved_command_line into boot_command_line.
2. Set cris_command_line as __initdata.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Dynamic kernel command-line: avr32
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:08 +0000 (00:54 -0800)]
[PATCH] Dynamic kernel command-line: avr32

1. Rename saved_command_line into boot_command_line.
2. Set command_line as __initdata.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Acked-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Dynamic kernel command-line: arm26
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:07 +0000 (00:54 -0800)]
[PATCH] Dynamic kernel command-line: arm26

1. Rename saved_command_line into boot_command_line.
2. Set command_line as __initdata.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: Ian Molton <spyro@f2s.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Dynamic kernel command-line: arm
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:06 +0000 (00:54 -0800)]
[PATCH] Dynamic kernel command-line: arm

1. Rename saved_command_line into boot_command_line.
2. Set command_line as __initdata.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Dynamic kernel command-line: alpha
Alon Bar-Lev [Mon, 12 Feb 2007 08:54:05 +0000 (00:54 -0800)]
[PATCH] Dynamic kernel command-line: alpha

1. Rename saved_command_line into boot_command_line.
2. Set command_line as __initdata.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Dynamic kernel command-line: common
Alon Bar-Lev [Mon, 12 Feb 2007 08:53:52 +0000 (00:53 -0800)]
[PATCH] Dynamic kernel command-line: common

Current implementation stores a static command-line buffer allocated to
COMMAND_LINE_SIZE size.  Most architectures stores two copies of this buffer,
one for future reference and one for parameter parsing.

Current kernel command-line size for most architecture is much too small for
module parameters, video settings, initramfs paramters and much more.  The
problem is that setting COMMAND_LINE_SIZE to a grater value, allocates static
buffers.

In order to allow a greater command-line size, these buffers should be
dynamically allocated or marked as init disposable buffers, so unused memory
can be released.

This patch renames the static saved_command_line variable into
boot_command_line adding __initdata attribute, so that it can be disposed
after initialization.  This rename is required so applications that use
saved_command_line will not be affected by this change.

It reintroduces saved_command_line as dynamically allocated buffer to match
the data in boot_command_line.

It also mark secondary command-line buffer as __initdata, and copies it to
dynamically allocated static_command_line buffer components may hold reference
to it after initialization.

This patch is for linux-2.6.20-rc4-mm1 and is divided to target each
architecture.  I could not check this in any architecture so please forgive me
if I got it wrong.

The per-architecture modification is very simple, use boot_command_line in
place of saved_command_line.  The common code is the change into dynamic
command-line.

This patch:

1. Rename saved_command_line into boot_command_line, mark as init
   disposable.

2. Add dynamic allocated saved_command_line.

3. Add dynamic allocated static_command_line.

4. During startup copy: boot_command_line into saved_command_line.  arch
   command_line into static_command_line.

5. Parse static_command_line and not arch command_line, so arch
   command_line may be freed.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: Andi Kleen <ak@muc.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Ian Molton <spyro@f2s.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
Cc: Richard Curnow <rc@rc0.org.uk>
Cc: William Lee Irwin III <wli@holomorphy.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
Cc: Chris Zankel <chris@zankel.net>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] sched: avoid div in rebalance_tick
Nick Piggin [Mon, 12 Feb 2007 08:53:51 +0000 (00:53 -0800)]
[PATCH] sched: avoid div in rebalance_tick

Avoid expensive integer divide 3 times per CPU per tick.

A userspace test of this loop went from 26ns, down to 19ns on a G5; and
from 123ns down to 28ns on a P3.

(Also avoid a variable bit shift, as suggested by Alan. The effect
of this wasn't noticable on the CPUs I tested with).

Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] eCryptfs: add flush_dcache_page() calls
Michael Halcrow [Mon, 12 Feb 2007 08:53:50 +0000 (00:53 -0800)]
[PATCH] eCryptfs: add flush_dcache_page() calls

Call flush_dcache_page() after modifying a pagecache by hand.

Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] eCryptfs: open-code flag checking and manipulation
Michael Halcrow [Mon, 12 Feb 2007 08:53:49 +0000 (00:53 -0800)]
[PATCH] eCryptfs: open-code flag checking and manipulation

Open-code flag checking and manipulation.

Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Trevor Highland <tshighla@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] eCryptfs: convert kmap() to kmap_atomic()
Michael Halcrow [Mon, 12 Feb 2007 08:53:48 +0000 (00:53 -0800)]
[PATCH] eCryptfs: convert kmap() to kmap_atomic()

Replace kmap() with kmap_atomic().  Reduce the amount of time that mappings
are held.

Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Trevor Highland <tshighla@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] eCryptfs: convert f_op->write() to vfs_write()
Michael Halcrow [Mon, 12 Feb 2007 08:53:48 +0000 (00:53 -0800)]
[PATCH] eCryptfs: convert f_op->write() to vfs_write()

sys_write() takes a local copy of f_pos and writes that back
into the struct file. It does this so that two concurrent write()
callers don't make a mess of f_pos, and of the file contents.

ecryptfs should be calling vfs_write().  That way we also get the fsnotify
notifications, which ecryptfs presently appears to have subverted.

Convert direct calls to f_op->write() into calls to vfs_write().

Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] eCryptfs: Encrypted passthrough
Michael Halcrow [Mon, 12 Feb 2007 08:53:47 +0000 (00:53 -0800)]
[PATCH] eCryptfs: Encrypted passthrough

Provide an option to provide a view of the encrypted files such that the
metadata is always in the header of the files, regardless of whether the
metadata is actually in the header or in the extended attribute.  This mode of
operation is useful for applications like incremental backup utilities that do
not preserve the extended attributes when directly accessing the lower files.

With this option enabled, the files under the eCryptfs mount point will be
read-only.

Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] eCryptfs: Generalize metadata read/write
Michael Halcrow [Mon, 12 Feb 2007 08:53:46 +0000 (00:53 -0800)]
[PATCH] eCryptfs: Generalize metadata read/write

Generalize the metadata reading and writing mechanisms, with two targets for
now: metadata in file header and metadata in the user.ecryptfs xattr of the
lower file.

[akpm@osdl.org: printk warning fix]
[bunk@stusta.de: make some needlessly global code static]
Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] eCryptfs: xattr flags and mount options
Michael Halcrow [Mon, 12 Feb 2007 08:53:45 +0000 (00:53 -0800)]
[PATCH] eCryptfs: xattr flags and mount options

This patch set introduces the ability to store cryptographic metadata into an
lower file extended attribute rather than the lower file header region.

This patch set implements two new mount options:

ecryptfs_xattr_metadata
 - When set, newly created files will have their cryptographic
   metadata stored in the extended attribute region of the file rather
   than the header.

   When storing the data in the file header, there is a minimum of 8KB
   reserved for the header information for each file, making each file at
   least 12KB in size.  This can take up a lot of extra disk space if the user
   creates a lot of small files.  By storing the data in the extended
   attribute, each file will only occupy at least of 4KB of space.

   As the eCryptfs metadata set becomes larger with new features such as
   multi-key associations, most popular filesystems will not be able to store
   all of the information in the xattr region in some cases due to space
   constraints.  However, the majority of users will only ever associate one
   key per file, so most users will be okay with storing their data in the
   xattr region.

   This option should be used with caution.  I want to emphasize that the
   xattr must be maintained under all circumstances, or the file will be
   rendered permanently unrecoverable.  The last thing I want is for a user to
   forget to set an xattr flag in a backup utility, only to later discover
   that their backups are worthless.

ecryptfs_encrypted_view
 - When set, this option causes eCryptfs to present applications a
   view of encrypted files as if the cryptographic metadata were
   stored in the file header, whether the metadata is actually stored
   in the header or in the extended attributes.

   No matter what eCryptfs winds up doing in the lower filesystem, I want
   to preserve a baseline format compatibility for the encrypted files.  As of
   right now, the metadata may be in the file header or in an xattr.  There is
   no reason why the metadata could not be put in a separate file in future
   versions.

   Without the compatibility mode, backup utilities would have to know to
   back up the metadata file along with the files.  The semantics of eCryptfs
   have always been that the lower files are self-contained units of encrypted
   data, and the only additional information required to decrypt any given
   eCryptfs file is the key.  That is what has always been emphasized about
   eCryptfs lower files, and that is what users expect.  Providing the
   encrypted view option will provide a way to userspace applications wherein
   they can always get to the same old familiar eCryptfs encrypted files,
   regardless of what eCryptfs winds up doing with the metadata behind the
   scenes.

This patch:

Add extended attribute support to version bit vector, flags to indicate when
xattr or encrypted view modes are enabled, and support for the new mount
options.

Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] eCryptfs: Public key; packet management
Michael Halcrow [Mon, 12 Feb 2007 08:53:44 +0000 (00:53 -0800)]
[PATCH] eCryptfs: Public key; packet management

Public key support code.  This reads and writes packets in the header that
contain public key encrypted file keys.  It calls the messaging code in the
previous patch to send and receive encryption and decryption request
packets from the userspace daemon.

[akpm@osdl.org: cleab fix]
Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] eCryptfs: Public key transport mechanism
Michael Halcrow [Mon, 12 Feb 2007 08:53:43 +0000 (00:53 -0800)]
[PATCH] eCryptfs: Public key transport mechanism

This is the transport code for public key functionality in eCryptfs.  It
manages encryption/decryption request queues with a transport mechanism.
Currently, netlink is the only implemented transport.

Each inode has a unique File Encryption Key (FEK).  Under passphrase, a File
Encryption Key Encryption Key (FEKEK) is generated from a salt/passphrase
combo on mount.  This FEKEK encrypts each FEK and writes it into the header of
each file using the packet format specified in RFC 2440.  This is all
symmetric key encryption, so it can all be done via the kernel crypto API.

These new patches introduce public key encryption of the FEK.  There is no
asymmetric key encryption support in the kernel crypto API, so eCryptfs pushes
the FEK encryption and decryption out to a userspace daemon.  After
considering our requirements and determining the complexity of using various
transport mechanisms, we settled on netlink for this communication.

eCryptfs stores authentication tokens into the kernel keyring.  These tokens
correlate with individual keys.  For passphrase mode of operation, the
authentication token contains the symmetric FEKEK.  For public key, the
authentication token contains a PKI type and an opaque data blob managed by
individual PKI modules in userspace.

Each user who opens a file under an eCryptfs partition mounted in public key
mode must be running a daemon.  That daemon has the user's credentials and has
access to all of the keys to which the user should have access.  The daemon,
when started, initializes the pluggable PKI modules available on the system
and registers itself with the eCryptfs kernel module.  Userspace utilities
register public key authentication tokens into the user session keyring.
These authentication tokens correlate key signatures with PKI modules and PKI
blobs.  The PKI blobs contain PKI-specific information necessary for the PKI
module to carry out asymmetric key encryption and decryption.

When the eCryptfs module parses the header of an existing file and finds a Tag
1 (Public Key) packet (see RFC 2440), it reads in the public key identifier
(signature).  The asymmetrically encrypted FEK is in the Tag 1 packet;
eCryptfs puts together a decrypt request packet containing the signature and
the encrypted FEK, then it passes it to the daemon registered for the
current->euid via a netlink unicast to the PID of the daemon, which was
registered at the time the daemon was started by the user.

The daemon actually just makes calls to libecryptfs, which implements request
packet parsing and manages PKI modules.  libecryptfs grabs the public key
authentication token for the given signature from the user session keyring.
This auth tok tells libecryptfs which PKI module should receive the request.
libecryptfs then makes a decrypt() call to the PKI module, and it passes along
the PKI block from the auth tok.  The PKI uses the blob to figure out how it
should decrypt the data passed to it; it performs the decryption and passes
the decrypted data back to libecryptfs.  libecryptfs then puts together a
reply packet with the decrypted FEK and passes that back to the eCryptfs
module.

The eCryptfs module manages these request callouts to userspace code via
message context structs.  The module maintains an array of message context
structs and places the elements of the array on two lists: a free and an
allocated list.  When eCryptfs wants to make a request, it moves a msg ctx
from the free list to the allocated list, sets its state to pending, and fires
off the message to the user's registered daemon.

When eCryptfs receives a netlink message (via the callback), it correlates the
msg ctx struct in the alloc list with the data in the message itself.  The
msg->index contains the offset of the array of msg ctx structs.  It verifies
that the registered daemon PID is the same as the PID of the process that sent
the message.  It also validates a sequence number between the received packet
and the msg ctx.  Then, it copies the contents of the message (the reply
packet) into the msg ctx struct, sets the state in the msg ctx to done, and
wakes up the process that was sleeping while waiting for the reply.

The sleeping process was whatever was performing the sys_open().  This process
originally called ecryptfs_send_message(); it is now in
ecryptfs_wait_for_response().  When it wakes up and sees that the msg ctx
state was set to done, it returns a pointer to the message contents (the reply
packet) and returns.  If all went well, this packet contains the decrypted
FEK, which is then copied into the crypt_stat struct, and life continues as
normal.

The case for creation of a new file is very similar, only instead of a decrypt
request, eCryptfs sends out an encrypt request.

> - We have a great clod of key mangement code in-kernel.  Why is that
>   not suitable (or growable) for public key management?

eCryptfs uses Howells' keyring to store persistent key data and PKI state
information.  It defers public key cryptographic transformations to userspace
code.  The userspace data manipulation request really is orthogonal to key
management in and of itself.  What eCryptfs basically needs is a secure way to
communicate with a particular daemon for a particular task doing a syscall,
based on the UID.  Nothing running under another UID should be able to access
that channel of communication.

> - Is it appropriate that new infrastructure for public key
> management be private to a particular fs?

The messaging.c file contains a lot of code that, perhaps, could be extracted
into a separate kernel service.  In essence, this would be a sort of
request/reply mechanism that would involve a userspace daemon.  I am not aware
of anything that does quite what eCryptfs does, so I was not aware of any
existing tools to do just what we wanted.

>   What happens if one of these daemons exits without sending a quit
>   message?

There is a stale uid<->pid association in the hash table for that user.  When
the user registers a new daemon, eCryptfs cleans up the old association and
generates a new one.  See ecryptfs_process_helo().

> - _why_ does it use netlink?

Netlink provides the transport mechanism that would minimize the complexity of
the implementation, given that we can have multiple daemons (one per user).  I
explored the possibility of using relayfs, but that would involve having to
introduce control channels and a protocol for creating and tearing down
channels for the daemons.  We do not have to worry about any of that with
netlink.

Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] include/linux/nfsd/const.h: remove NFS_SUPER_MAGIC
Adrian Bunk [Mon, 12 Feb 2007 08:53:40 +0000 (00:53 -0800)]
[PATCH] include/linux/nfsd/const.h: remove NFS_SUPER_MAGIC

NFS_SUPER_MAGIC is already defined in include/linux/magic.h

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] knfsd: SUNRPC: fix up svc_create_socket() to take a sockaddr struct + length
Chuck Lever [Mon, 12 Feb 2007 08:53:39 +0000 (00:53 -0800)]
[PATCH] knfsd: SUNRPC: fix up svc_create_socket() to take a sockaddr struct + length

Replace existing svc_create_socket() API to allow callers to pass addresses
larger than a sockaddr_in.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] knfsd: SUNRPC: support IPv6 addresses in RPC server's UDP receive path
Chuck Lever [Mon, 12 Feb 2007 08:53:38 +0000 (00:53 -0800)]
[PATCH] knfsd: SUNRPC: support IPv6 addresses in RPC server's UDP receive path

Add support for IPv6 addresses in the RPC server's UDP receive path.

[akpm@linux-foundation.org: cleanups]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] knfsd: SUNRPC: Support IPv6 addresses in svc_tcp_accept
akpm@linux-foundation.org [Mon, 12 Feb 2007 08:53:38 +0000 (00:53 -0800)]
[PATCH] knfsd: SUNRPC: Support IPv6 addresses in svc_tcp_accept

Modify svc_tcp_accept to support connecting on IPv6 sockets.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] knfsd: SUNRPC: add a "generic" function to see if the peer uses a secure...
Chuck Lever [Mon, 12 Feb 2007 08:53:37 +0000 (00:53 -0800)]
[PATCH] knfsd: SUNRPC: add a "generic" function to see if the peer uses a secure port

The only reason svcsock.c looks at a sockaddr's port is to check whether the
remote peer is connecting from a privileged port.  Refactor this check to hide
processing that is specific to address format.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] knfsd: SUNRPC: teach svc_sendto() to deal with IPv6 addresses
Chuck Lever [Mon, 12 Feb 2007 08:53:36 +0000 (00:53 -0800)]
[PATCH] knfsd: SUNRPC: teach svc_sendto() to deal with IPv6 addresses

CMSG_DATA comes in different sizes, depending on address family.

[akpm@linux-foundation.org: remove unneeded do/while (0)]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] knfsd: SUNRPC: Make rq_daddr field address-version independent
Chuck Lever [Mon, 12 Feb 2007 08:53:35 +0000 (00:53 -0800)]
[PATCH] knfsd: SUNRPC: Make rq_daddr field address-version independent

The rq_daddr field must support larger addresses.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] knfsd: SUNRPC: Provide room in svc_rqst for larger addresses
Chuck Lever [Mon, 12 Feb 2007 08:53:34 +0000 (00:53 -0800)]
[PATCH] knfsd: SUNRPC: Provide room in svc_rqst for larger addresses

Expand the rq_addr field to allow it to contain larger addresses.

Specifically, we replace a 'sockaddr_in' with a 'sockaddr_storage', then
everywhere the 'sockaddr_in' was referenced, we use instead an accessor
function (svc_addr_in) which safely casts the _storage to _in.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] knfsd: SUNRPC: Use sockaddr_storage to store address in svc_deferred_req
Chuck Lever [Mon, 12 Feb 2007 08:53:33 +0000 (00:53 -0800)]
[PATCH] knfsd: SUNRPC: Use sockaddr_storage to store address in svc_deferred_req

Sockaddr_storage will allow us to store arbitrary socket addresses in the
svc_deferred_req struct.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] knfsd: SUNRPC: Add a function to format the address in an svc_rqst for printing
Chuck Lever [Mon, 12 Feb 2007 08:53:32 +0000 (00:53 -0800)]
[PATCH] knfsd: SUNRPC: Add a function to format the address in an svc_rqst for printing

There are loads of places where the RPC server assumes that the rq_addr fields
contains an IPv4 address.  Top among these are error and debugging messages
that display the server's IP address.

Let's refactor the address printing into a separate function that's smart
enough to figure out the difference between IPv4 and IPv6 addresses.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] knfsd: SUNRPC: Don't set msg_name and msg_namelen when calling sock_recvmsg
Chuck Lever [Mon, 12 Feb 2007 08:53:31 +0000 (00:53 -0800)]
[PATCH] knfsd: SUNRPC: Don't set msg_name and msg_namelen when calling sock_recvmsg

Clean-up: msg_name and msg_namelen are not used by sock_recvmsg, so don't
bother to set them in svc_recvfrom.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] knfsd: SUNRPC: Cache remote peer's address in svc_sock
Chuck Lever [Mon, 12 Feb 2007 08:53:30 +0000 (00:53 -0800)]
[PATCH] knfsd: SUNRPC: Cache remote peer's address in svc_sock

The remote peer's address won't change after the socket has been accepted.  We
don't need to call ->getname on every incoming request.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] knfsd: SUNRPC: aplit svc_sock_enqueue out of svc_setup_socket
NeilBrown [Mon, 12 Feb 2007 08:53:30 +0000 (00:53 -0800)]
[PATCH] knfsd: SUNRPC: aplit svc_sock_enqueue out of svc_setup_socket

Rather than calling svc_sock_enqueue at the end of svc_setup_socket, we now
call it (via svc_sock_recieved) after calling svc_setup_socket at each call
site.

We do this because a subsequent patch will insert some code between the two
calls at one call site.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] knfsd: SUNRPC: allow creating an RPC service without registering with portmapper
Chuck Lever [Mon, 12 Feb 2007 08:53:29 +0000 (00:53 -0800)]
[PATCH] knfsd: SUNRPC: allow creating an RPC service without registering with portmapper

Sometimes we need to create an RPC service but not register it with the local
portmapper.  NFSv4 delegation callback, for example.

Change the svc_makesock() API to allow optionally creating temporary or
permanent sockets, optionally registering with the local portmapper, and make
it return the ephemeral port of the new socket.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] knfsd: SUNRPC: update internal API: separate pmap register and temp sockets
Chuck Lever [Mon, 12 Feb 2007 08:53:28 +0000 (00:53 -0800)]
[PATCH] knfsd: SUNRPC: update internal API: separate pmap register and temp sockets

Currently in the RPC server, registering with the local portmapper and
creating "permanent" sockets are tied together.  Expand the internal APIs to
allow these two socket characteristics to be separately specified.

This will be externalized in the next patch.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] isdn-eicon: Use ARRAY_SIZE macro when appropriate
Ahmed S. Darwish [Mon, 12 Feb 2007 08:53:27 +0000 (00:53 -0800)]
[PATCH] isdn-eicon: Use ARRAY_SIZE macro when appropriate

Use ARRAY_SIZE macro already defined in kernel.h

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Workaround CAPI subsystem locking issue
Michael Buesch [Mon, 12 Feb 2007 08:53:26 +0000 (00:53 -0800)]
[PATCH] Workaround CAPI subsystem locking issue

I think the following patch should go into the kernel, until the ISDN/CAPI
guys create the real fix for this issue.

The issue is a concurrency issue with some internal CAPI data structure
which can crash the kernel.

On my FritzCard DSL with the AVM driver it crashes about once a day without
this workaround patch.  With this workaround patch it's rock-stable (at
least on UP, but I don't see why this shouldn't work on SMP as well.  But
maybe I'm missing something.)

This workaround is kind of a sledgehammer which inserts a global lock to
wrap around all the critical sections.  Of course, this is a scalability
issue, if you have many ISDN/CAPI cards.  But it prevents a crash.  So I
vote for this fix to get merged, until people come up with a better
solution.  Better have a stable kernel that's less scalable, than a
crashing and useless kernel.

This bug is in the kernel since 2.6.15 (at least).

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: Kai Germaschewski <kai.germaschewski@gmx.de>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] drivers/isdn/hisax/: Convert to generic boolean-values
Richard Knutsson [Mon, 12 Feb 2007 08:53:25 +0000 (00:53 -0800)]
[PATCH] drivers/isdn/hisax/: Convert to generic boolean-values

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] drivers/isdn/hardware/eicon/: convert to generic boolean-values
Richard Knutsson [Mon, 12 Feb 2007 08:53:24 +0000 (00:53 -0800)]
[PATCH] drivers/isdn/hardware/eicon/: convert to generic boolean-values

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] ISDN: Rename special macro CONFIG_HISAX_HFC4S8S_PCIMEM
Robert P. J. Day [Mon, 12 Feb 2007 08:53:23 +0000 (00:53 -0800)]
[PATCH] ISDN: Rename special macro CONFIG_HISAX_HFC4S8S_PCIMEM

Rename the macro CONFIG_HISAX_HFC4S8S_PCIMEM to simply HISAX_HFC4S8S_PCIMEM so
that it no longer resembles a user-settable kernel config macro.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] ISDN: Remove defunct test emulator
Robert P. J. Day [Mon, 12 Feb 2007 08:53:22 +0000 (00:53 -0800)]
[PATCH] ISDN: Remove defunct test emulator

Based on advice from K.  Keil, get rid of remaining traces of defunct test
emulator for HISAX.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] ISDN: Rename debug option CONFIG_SERIAL_NOPAUSE_IO
Robert P. J. Day [Mon, 12 Feb 2007 08:53:21 +0000 (00:53 -0800)]
[PATCH] ISDN: Rename debug option CONFIG_SERIAL_NOPAUSE_IO

Based on advice from K.  Keil, rename the special debug option
CONFIG_SERIAL_NOPAUSE_IO to ELSA_SERIAL_NOPAUSE_IO so it no longer resembles a
user-selectable kernel config option.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] ISDN: Rename some debugging macros to not resemble CONFIG options
Robert P. J. Day [Mon, 12 Feb 2007 08:53:20 +0000 (00:53 -0800)]
[PATCH] ISDN: Rename some debugging macros to not resemble CONFIG options

Rename some of the debugging macros for ISDN AVM so that they don't resemble
kernel config settings, as they're primarily for author debugging instead.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] ISDN: Fix typo "CONFIG_HISAX_QUADRO" -> "CONFIG_HISAX_SCT_QUADRO".
Robert P. J. Day [Mon, 12 Feb 2007 08:53:19 +0000 (00:53 -0800)]
[PATCH] ISDN: Fix typo "CONFIG_HISAX_QUADRO" -> "CONFIG_HISAX_SCT_QUADRO".

Replace misspelled CONFIG_HISAX_QUADRO with CONFIG_HISAX_SCT_QUADRO.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] isdn/capi: use ARRAY_SIZE when appropriate
Ahmed S. Darwish [Mon, 12 Feb 2007 08:53:19 +0000 (00:53 -0800)]
[PATCH] isdn/capi: use ARRAY_SIZE when appropriate

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] drivers/isdn/sc/: proper prototypes
Adrian Bunk [Mon, 12 Feb 2007 08:53:18 +0000 (00:53 -0800)]
[PATCH] drivers/isdn/sc/: proper prototypes

Add proper prototypes in a header file for global code under
drivers/isdn/sc/.

Since the GNU C compiler is now able do tell us that caller and callee
disagreed about the number of arguments of setup_buffers(), this patch
also fixes this bug.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] drivers/isdn/hisax/: proper prototypes
Adrian Bunk [Mon, 12 Feb 2007 08:53:17 +0000 (00:53 -0800)]
[PATCH] drivers/isdn/hisax/: proper prototypes

- add functions prototypes for some global functions to header files

- remove unneeded "extern"s from some function prototypes

You might note that this patch results in a new warning - that's due to the
fact that with a proper prototype gcc is able to discover a broken
work_struct conversion.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] drivers/isdn/pcbit/: proper prototypes
Adrian Bunk [Mon, 12 Feb 2007 08:53:16 +0000 (00:53 -0800)]
[PATCH] drivers/isdn/pcbit/: proper prototypes

Add correct prototypes in header files for global functions and variables.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] S3C2410 GPIO wrappers
Philipp Zabel [Mon, 12 Feb 2007 08:53:15 +0000 (00:53 -0800)]
[PATCH] S3C2410 GPIO wrappers

Arch-neutral GPIO calls for S3C24xx.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] SA1100 GPIO wrappers
Philipp Zabel [Mon, 12 Feb 2007 08:53:14 +0000 (00:53 -0800)]
[PATCH] SA1100 GPIO wrappers

Arch-neutral GPIO calls for SA-1100.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] PXA GPIO wrappers
Philipp Zabel [Mon, 12 Feb 2007 08:53:14 +0000 (00:53 -0800)]
[PATCH] PXA GPIO wrappers

Arch-neutral GPIO calls for PXA.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] AT91 GPIO wrappers
David Brownell [Mon, 12 Feb 2007 08:53:13 +0000 (00:53 -0800)]
[PATCH] AT91 GPIO wrappers

This is a first cut at making the AT91 code use the generic GPIO calls.

Note that the original AT91 GPIO calls merged the "mux pin as GPIO" and "set
GPIO direction" functionality into one API call, contrary to what's specified
as a cross-platform portable model.  So this involved a few non-inlinable
functions.

[akpm@osdl.org: cleanups]
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] OMAP GPIO wrappers
David Brownell [Mon, 12 Feb 2007 08:53:12 +0000 (00:53 -0800)]
[PATCH] OMAP GPIO wrappers

This teaches OMAP how to implement the cross-platform GPIO interfaces.

[akpm@osdl.org: cleanups]
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] GPIO core
David Brownell [Mon, 12 Feb 2007 08:53:11 +0000 (00:53 -0800)]
[PATCH] GPIO core

This defines a simple and minimalist programming interface for GPIO APIs:

  - Documentation/gpio.txt ... describes things (read it)

  - include/asm-arm/gpio.h ... defines the ARM hook, which just punts
    to <asm/arch/gpio.h> for any implementation

  - include/asm-generic/gpio.h ... implement "can sleep" variants as calling
    the normal ones, for systems that don't handle i2c expanders.

The immediate need for such a cross-architecture API convention is to support
drivers that work the same on AT91 ARM and AVR32 AP7000 chips, which embed many
of the same controllers but have different CPUs.  However, several other users
have been reported, including a driver for a hardware watchdog chip and some
handhelds.org multi-CPU button drivers.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] EDAC: Add Fully-Buffered DIMM APIs to core
eric wollesen [Mon, 12 Feb 2007 08:53:08 +0000 (00:53 -0800)]
[PATCH] EDAC: Add Fully-Buffered DIMM APIs to core

Eric Wollesen ported the Bluesmoke Memory Controller driver for the Intel
5000X/V/P (Blackford/Greencreek) chipset to the in kernel EDAC model.

This patch incorporates those required changes to the edac_mc.c and edac_mc.h
core files by added new Fully Buffered DIMM interface to the EDAC Core module.

Signed-off-by: eric wollesen <ericw@xmtp.net>
Signed-off-by: doug thompson <norsk5@xmission.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] EDAC: Add memory scrubbing controls API to core
Frithiof Jensen [Mon, 12 Feb 2007 08:53:07 +0000 (00:53 -0800)]
[PATCH] EDAC: Add memory scrubbing controls API to core

This is an attempt of providing an interface for memory scrubbing control in
EDAC.

This patch modifies the EDAC Core to provide the Interface for memory
controller modules to implment.

The following things are still outstanding:

 - K8 is the first implemenation,

   The patch provide a method of configuring the K8 hardware memory scrubber
   via the 'mcX' sysfs directory.  There should be some fallback to a generic
   scrubber implemented in software if the hardware does not support
   scrubbing.

   Or .. the scrubbing sysfs entry should not be visible at all.

 - Only works with SDRAM, not cache,

   The K8 can scrub cache and l2cache also - but I think this is not so
   useful as the cache is busy all the time (one hopes).

   One would also expect that cache scrubbing requires hardware support.

 - Error Handling,

   I would like that errors are returned to the user in "terms of file
   system".

 - Presentation,

   I chose Bandwidth in Bytes/Second as a representation of the scrubbing
   rate for the following reasons:

   I like that the sysfs entries are sort-of textual, related to something
   that makes sense instead of magical values that must be looked up.

   "My People" wants "% main memory scrubbed per hour" others prefer "%
   memory bandwidth used" as representation, "bandwith used" makes it easy to
   calculate both versions in one-liner scripts.

   If one later wants to scrub cache, the scaling becomes wierd for K8
   changing from "blocks of 64 byte memory" to "blocks of 64 cache lines" to
   "blocks of 64 bit".  Using "bandwidth used" makes sense in all three cases,
   (I.M.O.  anyway ;-).

 - Discovery,

   There is no way to discover the possible settings and what they do
   without reading the code and the documentation.

   *I* do not know how to make that work in a practical way.

 - Bugs(??),

   other tools can set invalid values in the memory scrub control register,
   those will read back as '-1', requiring the user to reset the scrub rate.
   This is how *I* think it should be.

 - Afflicting other areas of code,

   I made changes to edac_mc.c and edac_mc.h which will show up globally -
   this is not nice, it would be better that the memory scrubbing fuctionality
   and interface could be entirely contained within the memory controller it
   applies to.

Frithiof Jensen

edac_mc.c and its .h file is a CORE helper module for EDAC
driver modules. This provides the abstraction for device specific
drivers. It is fine to modify this CORE to provide help for
new features of the the drivers

doug thompson

Signed-off-by: Frithiof Jensen <frithiof.jensen@ericson.com>
Signed-off-by: doug thompson <norsk5@xmission.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] EDAC: Fix in e752x mc driver
Mike Chan [Mon, 12 Feb 2007 08:53:06 +0000 (00:53 -0800)]
[PATCH] EDAC: Fix in e752x mc driver

This fix/change returns the offset into the page for the ce/ue error, instead
of just 0.  The e752x dram controller reads 34:6 of the linear address with
the error.

Signed-off-by: Mike Chan <mikechan@google.com>
Signed-off-by: doug thompson <norsk5@xmission.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] EDAC: e752x byte access fix
Brian Pomerantz [Mon, 12 Feb 2007 08:53:05 +0000 (00:53 -0800)]
[PATCH] EDAC: e752x byte access fix

The reading of the DRA registers should be a byte at a time (one register at a
time) instead of 4 bytes at a time (four registers).  Reading a dword at a
time retrieves erroneous information from all but the first register.  A
change was made to read in each register in a loop prior to using the data in
those registers.

Signed-off-by: Brian Pomerantz <bapper@mvista.com>
Signed-off-by: Dave Jiang <djiang@mvista.com>
Signed-off-by: Doug Thompson <norsk5@xmission.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Andi Kleen <ak@suse.de>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] EDAC: e752x bit mask fix
Brian Pomerantz [Mon, 12 Feb 2007 08:53:03 +0000 (00:53 -0800)]
[PATCH] EDAC: e752x bit mask fix

The fatal vs.  non-fatal mask for the sysbus FERR status is incorrect
according to the E7520 datasheet.  This patch corrects the mask to correctly
handle fatal and non-fatal errors.

Signed-off-by: Brian Pomerantz <bapper@mvista.com>
Signed-off-by: Dave Jiang <djiang@mvista.com>
Signed-off-by: Doug Thompson <norsk5@xmission.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Andi Kleen <ak@suse.de>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] pid: remove the now unused kill_pg kill_pg_info and __kill_pg_info
Eric W. Biederman [Mon, 12 Feb 2007 08:53:02 +0000 (00:53 -0800)]
[PATCH] pid: remove the now unused kill_pg kill_pg_info and __kill_pg_info

Now that I have changed all of the in-tree users remove the old version of
these functions.  This should make it clear to any out of tree users that they
should be using kill_pgrp kill_pgrp_info or __kill_pgrp_info instead.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] pid: remove now unused do_each_task_pid and while_each_task_pid
Eric W. Biederman [Mon, 12 Feb 2007 08:53:02 +0000 (00:53 -0800)]
[PATCH] pid: remove now unused do_each_task_pid and while_each_task_pid

Now that I have changed all of the users remove the old version of these
functions.  This should be a clear hint to any out of tree users that they
should use do_each_pid_task and while_each_pid_task for new code.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] pid: replace do/while_each_task_pid with do/while_each_pid_task
Eric W. Biederman [Mon, 12 Feb 2007 08:53:01 +0000 (00:53 -0800)]
[PATCH] pid: replace do/while_each_task_pid with do/while_each_pid_task

There isn't any real advantage to this change except that it allows the old
functions to be removed.  Which is easier on maintenance and puts the code in
a more uniform style.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] tty: update the tty layer to work with struct pid
Eric W. Biederman [Mon, 12 Feb 2007 08:53:00 +0000 (00:53 -0800)]
[PATCH] tty: update the tty layer to work with struct pid

Of kernel subsystems that work with pids the tty layer is probably the largest
consumer.  But it has the nice virtue that the assiation with a session only
lasts until the session leader exits.  Which means that no reference counting
is required.  So using struct pid winds up being a simple optimization to
avoid hash table lookups.

In the long term the use of pid_nr also ensures that when we have multiple pid
spaces mixed everything will work correctly.

Signed-off-by: Eric W. Biederman <eric@maxwell.lnxi.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>