12 Feb, 2007
3 commits
-
The line discipline numbers N_* are currently defined for each architecture
individually, but (except for a seeming mistake) identically, in
asm/termios.h. There is no obvious reason why these numbers should be
architecture specific, nor any apparent relationship with the termios
structure. The total number of these, NR_LDISCS, is defined in linux/tty.h
anyway. So I propose the following patch which moves the definitions of
the individual line disciplines to linux/tty.h too.Three of these numbers (N_MASC, N_PROFIBUS_FDL, and N_SMSBLOCK) are unused
in the current kernel, but the patch still keeps the complete set in case
there are plans to use them yet.Signed-off-by: Tilman Schmidt
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Module loading on Alpha was failing with error "Could not allocate 8 bytes
percpu data".Looking at dmesg we have the below error "No per-cpu room for modules."
Increase the PERCPU_ENOUGH_ROOM in a similar way as x86_64
Signed-off-by: Aneesh Kumar K.V
Cc:
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Remove the last vestiges of the long-deprecated "MAP_ANON" page protection
flag: use "MAP_ANONYMOUS" instead.Signed-off-by: Robert P. J. Day
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
10 Feb, 2007
1 commit
-
On all targets that sucker boils down to memcpy_fromio(sbk->data, from, len).
The function name is highly misguiding (it _never_ does any checksums), the
last argument is just a noise and simply expanding the call to memcpy_fromio()
gives shorter and more readable source. For a lot of reasons it has almost
no remaining users, so it's better to just outright kill it.Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds
08 Feb, 2007
1 commit
-
Since isa_bridge is neither assigned any value !NULL nor used on !Alpha,
there's no reason for providing it.Signed-off-by: Adrian Bunk
Signed-off-by: Greg Kroah-Hartman
04 Feb, 2007
1 commit
-
We went and named them __NR_sys_foo instead of __NR_foo.
It may be too late to change this, but we can at least add the proper names
now.Signed-off-by: Mike Frysinger
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
31 Jan, 2007
2 commits
-
do { } while(0) is not a good imitation of function returning void;
use ((void)0) instead.Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
no-op as all dma_sync_... there.
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds
12 Jan, 2007
1 commit
-
unionfs managed to hit this on s390. Some architectures use __ptr_t in their
FD_ZERO implementation. We don't have a __ptr_t. Switch them over to plain
old void*.Cc: Richard Henderson
Cc: Ivan Kokshaysky
Cc: Al Viro
Cc: Paul Mackerras
Cc: Benjamin Herrenschmidt
Cc: "Luck, Tony"
Cc: Martin Schwidefsky
Cc: Heiko Carstens
Cc: Josef 'Jeff' Sipek
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
14 Dec, 2006
1 commit
-
Virtually index, physically tagged cache architectures can get away
without cache flushing when forking. This patch adds a new cache
flushing function flush_cache_dup_mm(struct mm_struct *) which for the
moment I've implemented to do the same thing on all architectures
except on MIPS where it's a no-op.Signed-off-by: Ralf Baechle
Signed-off-by: Linus Torvalds
09 Dec, 2006
1 commit
-
In order to sort out our struct termios and add proper speed control we need
to separate the kernel and user termios structures. Glibc is fine but the
other libraries rely on the kernel exported struct termios and we need to
extend this without breaking the ABI/APITo do so we add a struct ktermios which is the kernel view of a termios
structure and overlaps the struct termios with extra fields on the end for
now. (That limitation will go away in later patches). Some platforms (eg
alpha) planned ahead and thus use the same struct for both, others did not.This just adds the structures but does not use them, it seems a sensible
splitting point for bisect if there are compile failures (not that I expect
them)Signed-off-by: Alan Cox
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
08 Dec, 2006
3 commits
-
Pass struct dev pointer to dma_cache_sync()
dma_cache_sync() is ill-designed in that it does not have a struct device
pointer argument which makes proper support for systems that consist of a
mix of coherent and non-coherent DMA devices hard. Change dma_cache_sync
to take a struct device pointer as first argument and fix all its callers
to pass it.Signed-off-by: Ralf Baechle
Cc: James Bottomley
Cc: "David S. Miller"
Cc: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
dma_is_consistent() is ill-designed in that it does not have a struct
device pointer argument which makes proper support for systems that consist
of a mix of coherent and non-coherent DMA devices hard. Change
dma_is_consistent to take a struct device pointer as first argument and fix
the sole caller to pass it.Signed-off-by: Ralf Baechle
Cc: James Bottomley
Cc: "David S. Miller"
Cc: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The last thing we agreed on was to remove the macros entirely for 2.6.19,
on all architectures. Unfortunately, I think nobody actually _did_ that,
so they are still there.[akpm@osdl.org: x86_64 fix]
Cc: David Woodhouse
Cc: Greg Schafer
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
03 Dec, 2006
1 commit
-
* sanitize prototypes and annotate
* kill useless access_ok() in csum_partial_copy_from_user() (the only
caller checks it already).
* do_csum_partial_copy_from_user() is not needed now
* replace htons(len) with len << 8 - they are the same wrt checksums
on little-endian.Signed-off-by: Al Viro
Signed-off-by: David S. Miller
02 Dec, 2006
1 commit
-
Add arch specific dev_archdata to struct device
Adds an arch specific struct dev_arch to struct device. This enables
architecture to add specific fields to every device in the system, like
DMA operation pointers, NUMA node ID, firmware specific data, etc...Signed-off-by: Benjamin Herrenschmidt
Acked-by: Andi Kleen
Acked-By: David Howells
Signed-off-by: Greg Kroah-Hartman
12 Oct, 2006
1 commit
-
There's nothing arch-specific about check_signature(), so move it to
. Use a cross between the Alpha and i386 implementations as
the generic one.Signed-off-by: Matthew Wilcox
Acked-by: Alan Cox
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
09 Oct, 2006
2 commits
-
do set_irq_regs() in caller, kill pt_regs argument.
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds -
callers of ->device_interrupt() do set_irq_regs() now; pt_regs argument
removed, remaining uses of regs in instances of ->device_interrupt()
are switched to get_irq_regs() and will be gone in the next patch.Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds
08 Oct, 2006
1 commit
-
Signed-off-by: Al Viro
Acked-by: Jeff Garzik
Signed-off-by: Linus Torvalds
02 Oct, 2006
1 commit
-
Some architectures provide an execve function that does not set errno, but
instead returns the result code directly. Rename these to kernel_execve to
get the right semantics there. Moreover, there is no reasone for any of these
architectures to still provide __KERNEL_SYSCALLS__ or _syscallN macros, so
remove these right away.[akpm@osdl.org: build fix]
[bunk@stusta.de: build fix]
Signed-off-by: Arnd Bergmann
Cc: Andi Kleen
Acked-by: Paul Mackerras
Cc: Benjamin Herrenschmidt
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Cc: Russell King
Cc: Ian Molton
Cc: Mikael Starvik
Cc: David Howells
Cc: Yoshinori Sato
Cc: Hirokazu Takata
Cc: Ralf Baechle
Cc: Kyle McMartin
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: Jeff Dike
Cc: Paolo 'Blaisorblade' Giarrusso
Cc: Miles Bader
Cc: Chris Zankel
Cc: "Luck, Tony"
Cc: Geert Uytterhoeven
Cc: Roman Zippel
Signed-off-by: Adrian Bunk
Cc: Arnd Bergmann
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
01 Oct, 2006
1 commit
-
On systems running with virtual cpus there is optimization potential in
regard to spinlocks and rw-locks. If the virtual cpu that has taken a lock
is known to a cpu that wants to acquire the same lock it is beneficial to
yield the timeslice of the virtual cpu in favour of the cpu that has the
lock (directed yield).With CONFIG_PREEMPT="n" this can be implemented by the architecture without
common code changes. Powerpc already does this.With CONFIG_PREEMPT="y" the lock loops are coded with _raw_spin_trylock,
_raw_read_trylock and _raw_write_trylock in kernel/spinlock.c. If the lock
could not be taken cpu_relax is called. A directed yield is not possible
because cpu_relax doesn't know anything about the lock. To be able to
yield the lock in favour of the current lock holder variants of cpu_relax
for spinlocks and rw-locks are needed. The new _raw_spin_relax,
_raw_read_relax and _raw_write_relax primitives differ from cpu_relax
insofar that they have an argument: a pointer to the lock structure.Signed-off-by: Martin Schwidefsky
Cc: Ingo Molnar
Cc: Paul Mackerras
Cc: Haavard Skinnemoen
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
26 Sep, 2006
2 commits
-
One of the changes necessary for shared page tables is to standardize the
pxx_page macros. pte_page and pmd_page have always returned the struct
page associated with their entry, while pte_page_kernel and pmd_page_kernel
have returned the kernel virtual address. pud_page and pgd_page, on the
other hand, return the kernel virtual address.Shared page tables needs pud_page and pgd_page to return the actual page
structures. There are very few actual users of these functions, so it is
simple to standardize their usage.Since this is basic cleanup, I am submitting these changes as a standalone
patch. Per Hugh Dickins' comments about it, I am also changing the
pxx_page_kernel macros to pxx_page_vaddr to clarify their meaning.Signed-off-by: Dave McCracken
Cc: Hugh Dickins
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
They all contain the same thing. Instead, have a single generic one in
include/asm-generic, and permit an arch to override as needed.Signed-off-by: Jeff Garzik
24 Sep, 2006
1 commit
19 Sep, 2006
2 commits
-
Signed-off-by: David Woodhouse
17 Sep, 2006
1 commit
-
Alpha currently fails 'make headers_check' in the 2.6.18-rc kernels. This
patch fixes it, by moving the existing #ifdef __KERNEL__ in asm/page.h so that
it covers everything that userspace shouldn't so, and by adding asm/compiler.h
to the list of exported files so that its use within asm/byteorder.h is
successful.[ Note that at least with GCC 4, doesn't do the forced
inlining about which there are nasty comments (and a workaround) in
, unless you set CONFIG_FORCED_INLINING. Rather than keep
the mess you have in you could perhaps just make sure
CONFIG_FORCED_INLINING=n is also honoured with GCC3, and make sure it cannot
be set for Alpha? ]Signed-off-by: David Woodhouse
Cc: Sam Ravnborg
Cc: Ivan Kokshaysky
Cc: Richard Henderson
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
10 Aug, 2006
1 commit
-
Kill host_set->next
Fix simplex support
Allow per platform setting of IDE legacy basesSome of this can be tidied further later on, in particular all the
legacy port gunge belongs as a PCI quirk/PCI header decode to understand
the special legacy IDE rules in the PCI spec.Longer term Jeff also wants to move the request_irq/free_irq out of core
which will make this even cleaner.tj: folded in three followup patches - ata_piix-fix, broken-arch-fix
and fix-new-legacy-handling, and separated per-dev xfermask into
separate patch preceding this one. Folded in fixes are...* ata_piix-fix: fix build failure due to host_set->next removal
* broken-arch-fix: add missing include/asm-*/libata-portmap.h
* fix-new-legacy-handling:
* In ata_pci_init_legacy_port(), probe_num was incorrectly
incremented during initialization of the secondary port and
probe_ent->n_ports was incorrectly fixed to 1.* Both legacy ports ended up having the same hard_port_no.
* When printing port information, both legacy ports printed
the first irq.Signed-off-by: Alan Cox
Signed-off-by: Andrew Morton
Signed-off-by: Tejun Heo
15 Jul, 2006
1 commit
-
set_wmb should not be used in the kernel because it just confuses the
code more and has no benefit. Since it is not currently used in the
kernel this patch removes it so that new code does not include it.All archs define set_wmb(var, value) to do { var = value; wmb(); }
while(0) except ia64 and sparc which use a mb() instead. But this is
still moot since it is not used anyway.Hasn't been tested on any archs but x86 and x86_64 (and only compiled
tested)Signed-off-by: Steven Rostedt
Signed-off-by: Linus Torvalds
05 Jul, 2006
1 commit
-
* git://git.infradead.org/hdrinstall-2.6:
Remove export of include/linux/isdn/tpam.h
Remove and from userspace export
Restrict headers exported to userspace for SPARC and SPARC64
Add empty Kbuild files for 'make headers_install' in remaining arches.
Add Kbuild file for Alpha 'make headers_install'
Add Kbuild file for SPARC 'make headers_install'
Add Kbuild file for IA64 'make headers_install'
Add Kbuild file for S390 'make headers_install'
Add Kbuild file for i386 'make headers_install'
Add Kbuild file for x86_64 'make headers_install'
Add Kbuild file for PowerPC 'make headers_install'
Add generic Kbuild files for 'make headers_install'
Basic implementation of 'make headers_check'
Basic implementation of 'make headers_install'
04 Jul, 2006
1 commit
-
RWSEM_DEBUG used to be a printk based 'tracing' facility, probably used for
very early prototypes of the rwsem code. Remove it.Signed-off-by: Ingo Molnar
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
03 Jul, 2006
1 commit
-
Use the new IRQF_ constants and remove the SA_INTERRUPT define
Signed-off-by: Thomas Gleixner
Cc: Ingo Molnar
Cc: "David S. Miller"
Cc: Benjamin Herrenschmidt
Cc: Ivan Kokshaysky
Cc: Richard Henderson
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
30 Jun, 2006
2 commits
-
This patch implements an API whereby an application can determine the
label of its peer's Unix datagram sockets via the auxiliary data mechanism of
recvmsg.Patch purpose:
This patch enables a security-aware application to retrieve the
security context of the peer of a Unix datagram socket. The application
can then use this security context to determine the security context for
processing on behalf of the peer who sent the packet.Patch design and implementation:
The design and implementation is very similar to the UDP case for INET
sockets. Basically we build upon the existing Unix domain socket API for
retrieving user credentials. Linux offers the API for obtaining user
credentials via ancillary messages (i.e., out of band/control messages
that are bundled together with a normal message). To retrieve the security
context, the application first indicates to the kernel such desire by
setting the SO_PASSSEC option via getsockopt. Then the application
retrieves the security context using the auxiliary data mechanism.An example server application for Unix datagram socket should look like this:
toggle = 1;
toggle_len = sizeof(toggle);setsockopt(sockfd, SOL_SOCKET, SO_PASSSEC, &toggle, &toggle_len);
recvmsg(sockfd, &msg_hdr, 0);
if (msg_hdr.msg_controllen > sizeof(struct cmsghdr)) {
cmsg_hdr = CMSG_FIRSTHDR(&msg_hdr);
if (cmsg_hdr->cmsg_len cmsg_level == SOL_SOCKET &&
cmsg_hdr->cmsg_type == SCM_SECURITY) {
memcpy(&scontext, CMSG_DATA(cmsg_hdr), sizeof(scontext));
}
}sock_setsockopt is enhanced with a new socket option SOCK_PASSSEC to allow
a server socket to receive security context of the peer.Testing:
We have tested the patch by setting up Unix datagram client and server
applications. We verified that the server can retrieve the security context
using the auxiliary data mechanism of recvmsg.Signed-off-by: Catherine Zhang
Acked-by: Acked-by: James Morris
Signed-off-by: David S. Miller -
Add ->retrigger() irq op to consolidate hw_irq_resend() implementations.
(Most architectures had it defined to NOP anyway.)NOTE: ia64 needs testing. i386 and x86_64 tested.
Signed-off-by: Ingo Molnar
Signed-off-by: Thomas Gleixner
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
28 Jun, 2006
1 commit
-
locking init cleanups:
- convert " = SPIN_LOCK_UNLOCKED" to spin_lock_init() or DEFINE_SPINLOCK()
- convert rwlocks in a similar mannerthis patch was generated automatically.
Motivation:
- cleanliness
- lockdep needs control of lock initialization, which the open-coded
variants do not give
- it's also useful for -rt and for lock debugging in generalSigned-off-by: Ingo Molnar
Signed-off-by: Arjan van de Ven
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
26 Jun, 2006
1 commit
-
The floppy driver is already calling add_disk_randomness as it should, so this
was redundant.Signed-off-by: Matt Mackall
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
23 Jun, 2006
2 commits
-
Correct the return type of handle_IRQ_event() (inconsistency noticed during
Xen development), and remove redundant declarations. The return type
adjustment required breaking out the definition of irqreturn_t into a
separate header, in order to satisfy current include order dependencies.Signed-off-by: Jan Beulich
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Cc: Russell King
Cc: Ian Molton
Cc: Mikael Starvik
Cc: Yoshinori Sato
Cc: Hirokazu Takata
Cc: Heiko Carstens
Cc: Martin Schwidefsky
Cc: William Lee Irwin III
Cc: "David S. Miller"
Cc: Miles Bader
Cc: Geert Uytterhoeven
Cc: Roman Zippel
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
VGA_MAP_MEM translates to ioremap() on some architectures. It makes sense
to do this to vga_vram_base, because we're going to access memory between
vga_vram_base and vga_vram_end.But it doesn't really make sense to map starting at vga_vram_end, because
we aren't going to access memory starting there. On ia64, which always has
to be different, ioremapping vga_vram_end gives you something completely
incompatible with ioremapped vga_vram_start, so vga_vram_size ends up being
nonsense.As a bonus, we often know the size up front, so we can use ioremap()
correctly, rather than giving it a zero size.Signed-off-by: Bjorn Helgaas
Cc: "Antonino A. Daplas"
Cc: "Luck, Tony"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
21 Jun, 2006
1 commit
-
* git://git.infradead.org/hdrcleanup-2.6: (63 commits)
[S390] __FD_foo definitions.
Switch to __s32 types in joystick.h instead of C99 types for consistency.
Add to headers included for userspace in
Move inclusion of out of user scope in asm-x86_64/mtrr.h
Remove struct fddi_statistics from user view in
Move user-visible parts of drivers/s390/crypto/z90crypt.h to include/asm-s390
Revert include/media changes: Mauro says those ioctls are only used in-kernel(!)
Include and use __uXX types in
Use __uXX types in , include too
Remove private struct dx_hash_info from public view in
Include and use __uXX types in
Use __uXX types in for struct divert_blk et al.
Use __u32 for elf_addr_t in , not u32. It's user-visible.
Remove PPP_FCS from user view in , remove __P mess entirely
Use __uXX types in user-visible structures in
Don't use 'u32' in user-visible struct ip_conntrack_old_tuple.
Use __uXX types for S390 DASD volume label definitions which are user-visible
S390 BIODASDREADCMB ioctl should use __u64 not u64 type.
Remove unneeded inclusion of from
Fix private integer types used in V4L2 ioctls.
...Manually resolve conflict in include/linux/mtd/physmap.h