David Woodhouse [Wed, 26 Apr 2006 23:12:56 +0000 (00:12 +0100)]
Sanitise linux/sched.h for userspace consumption
There was a whole load of crap exposed which should have been inside the
existing #ifdef __KERNEL__ part. Also hide struct sched_param for now,
since glibc has its own and doesn't like being given ours (yet).
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Wed, 26 Apr 2006 23:11:01 +0000 (00:11 +0100)]
Sanitise linux/audit.h for userspace consumption, split elf-em.h from elf.h
Don't include <linux/sched.h> outside __KERNEL__, and split the EM_xxx
definitions out of elf.h into elf-em.h so that audit.h can include just
that and not pollute the namespace any further than it needs to.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Tue, 25 Apr 2006 13:14:52 +0000 (14:14 +0100)]
Sanitise linux/i2c.h for userspace consumption
It was unconditionally including a whole bunch of headers which aren't
user-visible, and also exposing a lot of private internal stuff of its
own. Also fix some legacy character set to UTF-8 while we're at it.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse [Tue, 25 Apr 2006 13:10:40 +0000 (14:10 +0100)]
Sanitise linux/i2c-algo-ite.h for userspace consumption
It doesn't need to include i2c.h, because a forward declaration of
struct i2c_adapter is perfectly sufficient. And it can be inside
#ifdef __KERNEL__ along with the kernel-internal structure definition.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
xt_table->lock should be initialized before xt_replace_table() call, which
uses it. This patch removes strict requirement that table should define
lock before registering.
Signed-off-by: Dmitry Mishin <dim@openvz.org> Signed-off-by: Kirill Korotaev <dev@openvz.org> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy [Tue, 25 Apr 2006 00:16:28 +0000 (17:16 -0700)]
[NETFILTER]: Fix compat_xt_counters alignment for non-x86
Some (?) non-x86 architectures require 8byte alignment for u_int64_t
even when compiled for 32bit, using u_int32_t in compat_xt_counters
breaks on these architectures, use u_int64_t for everything but x86.
Reported by Andreas Schwab <schwab@suse.de>.
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
[NETFILTER]: nf_conntrack: Fix module refcount dropping too far
If nf_ct_l3proto_find_get() fails to get the refcount of
nf_ct_l3proto_generic, nf_ct_l3proto_put() will drop the refcount
too far.
This gets rid of '.me = THIS_MODULE' of nf_ct_l3proto_generic so that
nf_ct_l3proto_find_get() doesn't try to get refcount of it.
It's OK because its symbol is usable until nf_conntrack.ko is unloaded.
This also kills unnecessary NULL pointer check as well.
__nf_ct_proto_find() allways returns non-NULL pointer.
Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6:
[PARISC] MAINTAINERS
[PARISC] Make ioremap default to _nocache
[PARISC] Add new entries to the syscall table
[PARISC] Further work for multiple page sizes
[PARISC] Fix up hil_kbd.c mismerge
[PARISC] defconfig updates
[PARISC] Document that we tolerate "Relaxed Ordering"
[PARISC] Misc. janitorial work
[PARISC] EISA regions must be mapped NO_CACHE
[PARISC] OSS ad1889: Match register names with ALSA driver
* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6:
[PATCH] pcmcia/pcmcia_resource.c: fix crash when using Cardbus cards
[PATCH] vrc4171: update config
[PATCH] pcmcia: fix oops in static mapping case
[PATCH] pcmcia: remove unneeded forward declarations
[PATCH] pcmcia: do not set dev_node to NULL too early
[PATCH] pcmcia: fix comment for pcmcia_load_firmware
[PATCH] pcmcia: unload second device first
[PATCH] pcmcia: add new ID to pcnet_cs
* master.kernel.org:/pub/scm/linux/kernel/git/sfrench/cifs-2.6-stable:
[CIFS] Fix typo in previous
[CIFS] Readdir fixes to allow search to start at arbitrary position
[CIFS] Use the kthread_ API instead of opencoding lots of hairy code for kernel
[CIFS] Don't allow a backslash in a path component
[CIFS] [CIFS] Do not take rename sem on most path based calls (during
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge:
powerpc: Fix define_machine so machine_is() works from modules
powerpc/ppc: export strncasecmp
[PATCH] powerpc: fix oops in alsa powermac driver
[PATCH] powerpc: update {g5,iseries,pseries}_defconfigs
[PATCH] ppc: Fix powersave code on arch/ppc
[PATCH] powerpc/cell: remove BUILD_BUG_ON and add sys_tee to spu_syscall_table
[PATCH] powermac: Fix i2c on keywest based chips
[PATCH] powerpc: Lower threshold for DART enablement to 1GB
[PATCH] powerpc: IOMMU support for honoring dma_mask
Dave Airlie [Sun, 23 Apr 2006 08:26:40 +0000 (18:26 +1000)]
drm: possible cleanups
This patch contains the following possible cleanups:
- make the following needlessly global function static:
- drm_bufs.c: drm_addbufs_fb()
- remove the following unused EXPORT_SYMBOL's:
- drm_agpsupport.c: drm_agp_bind_memory
- drm_bufs.c: drm_rmmap_locked
- drm_bufs.c: drm_rmmap
- drm_stub.c: drm_get_dev
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Dave Airlie <airlied@linux.ie>
Paul Mackerras [Sun, 23 Apr 2006 00:42:04 +0000 (10:42 +1000)]
powerpc: Fix define_machine so machine_is() works from modules
machine_is() was always returning 0 when used in a module, because
we weren't exporting the machine definitions. This was why sound
wasn't working on powermacs when CONFIG_SND_POWERMAC=m. Original
fix from Ben Herrenschmidt, further fixed by me.
Kylene Jo Hall [Sat, 22 Apr 2006 09:39:52 +0000 (02:39 -0700)]
[PATCH] tpm: add HID module parameter
I recently found that not all BIOS manufacturers are using the specified
generic PNP id in their TPM ACPI table entry. I have added the vendor
specific IDs that I know about and added a module parameter that a user can
specify another HID to the probe list if their device isn't being found by the
default list.
Signed-off-by: Kylene Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Kylene Jo Hall [Sat, 22 Apr 2006 09:39:44 +0000 (02:39 -0700)]
[PATCH] tpm: add interrupt module parameter
This patch adds a boolean module parameter that allows the user to turn
interrupt support on and off. The default behavior is to attempt to use
interrupts.
Signed-off-by: Kylene Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Randy Dunlap [Sat, 22 Apr 2006 09:39:18 +0000 (02:39 -0700)]
[PATCH] tpm_infineon section fixup
Use __devexit_p() for the exit/remove function to protect against
discarding it.
WARNING: drivers/char/tpm/tpm_infineon.o - Section mismatch: reference to .exit.text:tpm_inf_pnp_remove from .data between 'tpm_inf_pnp' (at offset 0x20) and 'tpm_inf'
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Cc: Kylene Jo Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Kylene Jo Hall [Sat, 22 Apr 2006 09:39:07 +0000 (02:39 -0700)]
[PATCH] tpm: update bios log code for 1.2
The acpi table which contains the BIOS log events was updated for 1.2.
There are now client and server modes as defined in the specifications with
slightly different formats. Additionally, the start field was even too
small for the 1.1 version but had been working anyway. This patch updates
the code to deal with any of the three types of headers probperly (1.1, 1.2
client and 1.2 server).
Signed-off-by: Kylie Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Kylene Jo Hall [Sat, 22 Apr 2006 09:38:55 +0000 (02:38 -0700)]
[PATCH] tpm: check mem start and len
The memory start and length values obtained from the ACPI entry need to be
checked and filled in with the default values from the specification if
they don't exist. This patch fills in the default values and uses them
appropriately.
Signed-off-by: Kylie Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Kylene Jo Hall [Sat, 22 Apr 2006 09:38:19 +0000 (02:38 -0700)]
[PATCH] tpm: msecs_to_jiffies cleanups
The timeout and duration values used in the tpm driver are not exposed to
userspace. This patch converts the storage units to jiffies with
msecs_to_jiffies. They were always being used in jiffies so this
simplifies things removing the need for calculation all over the place.
The change necessitated a type change in the tpm_chip struct to hold
jiffies.
Signed-off-by: Kylie Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
The driver for the next generation of TPM chips version 1.2 including support
for interrupts. The Trusted Computing Group has written the TPM Interface
Specification (TIS) which defines a common interface for all manufacturer's
1.2 TPM's thus the name tpm_tis.
Signed-off-by: Leendert van Doorn <leendert@watson.ibm.com> Signed-off-by: Kylene Hall <kjhall@us.ibm.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Kylene Jo Hall [Sat, 22 Apr 2006 09:37:50 +0000 (02:37 -0700)]
[PATCH] tpm: new 1.2 sysfs files
Many of the sysfs files were calling the TPM_GetCapability command with array.
Since for 1.2 more sysfs files of this type are coming I am generalizing the
array so there can be one array and the unique parts can be filled in just
before the command is called.
This updated version of the patch breaks the multi-value sysfs file into
separate files pointed out by Greg. It also addresses the code redundancy and
ugliness in the tpm_show_* functions pointed out on another patch by Dave
Hansen.
Signed-off-by: Kylene Hall <kjhall@us.ibm.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Kylene Jo Hall [Sat, 22 Apr 2006 09:37:38 +0000 (02:37 -0700)]
[PATCH] tpm: command duration update
With the TPM 1.2 Specification, each command is classified as short, medium or
long and the chip tells you the maximum amount of time for a response to each
class of command. This patch provides and array of the classifications and a
function to determine how long the response should be waited for. Also, it
uses that information in the command processing to determine how long to poll
for. The function is exported so the 1.2 driver can use the functionality to
determine how long to wait for a DataAvailable interrupt if interrupts are
being used.
Signed-off-by: Kylene Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Kylene Jo Hall [Sat, 22 Apr 2006 09:37:26 +0000 (02:37 -0700)]
[PATCH] tpm: return chip from tpm_register_hardware
Changes in the 1.2 TPM Specification make it necessary to update some fields
of the chip structure in the initialization function after it is registered
with tpm.c thus tpm_register_hardware was modified to return a pointer to the
structure. This patch makes that change and the associated changes in
tpm_atmel and tpm_nsc. The changes to tpm_infineon will be coming in a patch
from Marcel Selhorst.
Signed-off-by: Kylene Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Kylene Jo Hall [Sat, 22 Apr 2006 09:37:15 +0000 (02:37 -0700)]
[PATCH] tpm: chip struct update
To assist with chip management and better support the possibility of having
multiple TPMs in the system of the same kind, the struct tpm_vendor_specific
member of the tpm_chip was changed from a pointer to an instance. This patch
changes that declaration and fixes up all accesses to the structure member
except in tpm_infineon which is coming in a patch from Marcel Selhorst.
Signed-off-by: Kylene Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Kylene Jo Hall [Sat, 22 Apr 2006 09:37:05 +0000 (02:37 -0700)]
[PATCH] tpm: reorganize sysfs files
Many of the sysfs files were calling the TPM_GetCapability command with array.
Since for 1.2 more sysfs files of this type are coming I am generalizing the
array so there can be one array and the unique parts can be filled in just
before the command is called.
Signed-off-by: Kylene Hall <kjhall@us.ibm.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Kylene Jo Hall [Sat, 22 Apr 2006 09:36:56 +0000 (02:36 -0700)]
[PATCH] tpm: spacing cleanups
The following patch set contains numerous changes to the base tpm driver
(tpm.c) to support the next generation of TPM chips. The changes include new
sysfs files because of more relevant data being available, a function to
access the timeout and duration values for the chip, and changes to make use
of those duration values. Duration in the TPM specification is defined as the
maximum amount of time the chip could take to return the results. Commands
are in one of three categories short, medium and long. Also included are
cleanups of how the commands for the sysfs files are composed to reduce a
bunch of redundant arrays.
This patch:
Fix minor spacing issues.
Signed-off-by: Kylene Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Kylene Jo Hall [Sat, 22 Apr 2006 09:36:46 +0000 (02:36 -0700)]
[PATCH] tpm: fix missing string
A string corresponding to the tcpa_pc_event_id POST_CONTENTS was missing
causing an overflow bug when access was attempted in the get_event_name
function.
This bug was found by Coverity.
Signed-off-by: Kylene Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jan Kara [Sat, 22 Apr 2006 09:36:24 +0000 (02:36 -0700)]
[PATCH] Fix reiserfs deadlock
reiserfs_cache_default_acl() should return whether we successfully found
the acl or not. We have to return correct value even if reiserfs_get_acl()
returns error code and not just 0. Otherwise callers such as
reiserfs_mkdir() can unnecessarily lock the xattrs and later functions such
as reiserfs_new_inode() fail to notice that we have already taken the lock
and try to take it again with obvious consequences.
Signed-off-by: Jan Kara <jack@suse.cz> Cc: <reiserfs-dev@namesys.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Fix Altix system controller (snsc) device names to include the slot number
of the blade whose associated system controller is the target of the device
interface. Including the slot number avoids a problem we're currently
having where slots within the same enclosure are attempting to create
multiple kobjects with identical names.
Signed-off-by: Greg Howard <ghoward@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Mike Waychison [Sat, 22 Apr 2006 09:36:06 +0000 (02:36 -0700)]
[PATCH] x86_64: Fix a race in the free_iommu path
We do this by removing a micro-optimization that tries to avoid grabbing
the iommu_bitmap_lock spinlock and using a bus-locked operation.
This still races with other simultaneous alloc_iommu or free_iommu(size >
1) which both use bus-unlocked operations.
The end result of this race is eventually ending up with an
iommu_gart_bitmap that has bits errornously set all over, making large
contiguous iommu space allocations fail with 'PCI-DMA: Out of IOMMU space'.
Signed-off-by: Mike Waychison <mikew@google.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] x86_64: Pass -32 to the assembler when compiling the 32bit vsyscall pages
This quietens warnings and actually fixes a bug. The unwind tables would
come out wrong without -32, causing pthread cancellation during them to
crash in the gcc runtime.
The problem seems to only happen with newer binutils (it doesn't happen
with 2.16.91.0.2 but happens wit 2.16.91.0.5)
Thanks to David Altobelli <david.altobelli@hp.com> and Brian Baker
<Brian.B@hp.com> for test case and initial analysis.
Lee Schermerhorn [Sat, 22 Apr 2006 09:35:48 +0000 (02:35 -0700)]
[PATCH] add migratepage address space op to shmem
Basic problem: pages of a shared memory segment can only be migrated once.
In 2.6.16 through 2.6.17-rc1, shared memory mappings do not have a
migratepage address space op. Therefore, migrate_pages() falls back to
default processing. In this path, it will try to pageout() dirty pages.
Once a shared memory page has been migrated it becomes dirty, so
migrate_pages() will try to page it out. However, because the page count
is 3 [cache + current + pte], pageout() will return PAGE_KEEP because
is_page_cache_freeable() returns false. This will abort all subsequent
migrations.
This patch adds a migratepage address space op to shared memory segments to
avoid taking the default path. We use the "migrate_page()" function
because it knows how to migrate dirty pages. This allows shared memory
segment pages to migrate, subject to other conditions such as # pte's
referencing the page [page_mapcount(page)], when requested.
I think this is safe. If we're migrating a shared memory page, then we
found the page via a page table, so it must be in memory.
Can be verified with memtoy and the shmem-mbind-test script, both
available at: http://free.linux.hp.com/~lts/Tools/
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com> Acked-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andy Whitcroft [Sat, 22 Apr 2006 09:35:41 +0000 (02:35 -0700)]
[PATCH] x86_64: sparsemem does not need node_mem_map
Seems we are trying to init the node_mem_map when we don't need to, for
example when SPARSEMEM is enabled. This causes the error below during
compilation. Use CONFIG_FLAT_NODE_MEM_MAP to gate allocation and init.
arch/x86_64/mm/numa.c: In function `setup_node_zones':
arch/x86_64/mm/numa.c:191: error: structure has no member
named `node_mem_map'
Signed-off-by: Andy Whitcroft <apw@shadowen.org> Acked-by: Andi Kleen <ak@muc.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] isdn4linux: Siemens Gigaset base driver: fix disconnect handling
Fix a possible Oops in the Siemens Gigaset base driver when the device is
unplugged while an ISDN connection is still active, and makes sure that the
isdn4linux link level (LL) is properly informed if a connection is broken
by the USB cable being unplugged.
- Avoid unsafe checks of URB status fields outside the URB completion
handlers, keep track of in-use URBs myself instead.
- If an isochronous transfer URB completes with status==0, also check the
status of the frame descriptors.
- Verify length of interrupt messages received from the device.
- Align the length limit on transmitted AT commands with the device
documentation.
- In case of AT response receive overrun, keep newly arrived instead of old
unread data.
- Remove redundant check of device ID in the USB probe function.
- Correct and improve some comments and formatting.
Signed-off-by: Tilman Schmidt <tilman@imap.cc> Acked-by: Hansjoerg Lipp <hjlipp@web.de> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Steve French [Fri, 21 Apr 2006 22:52:25 +0000 (22:52 +0000)]
[CIFS] Use the kthread_ API instead of opencoding lots of hairy code for kernel
thread creation and teardown.
It does not move the cifsd thread handling to kthread due to problems
found in testing with wakeup of threads blocked in the socket peek api,
but the other cifs kernel threads now use kthread.
Also cleanup cifs_init to properly unwind when thread creation fails.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Steve French <sfrench@us.ibm.com>
Daniel Ritz [Fri, 14 Apr 2006 15:42:13 +0000 (17:42 +0200)]
[PATCH] pcmcia/pcmcia_resource.c: fix crash when using Cardbus cards
Using the old ioctl interface together with cardbus card gives a NULL
pointer dereference since cardbus devices don't have a struct pcmcia_device.
also s->io[0].res can be NULL as well.
Fix is to move the pcmcia code after the cardbus code and to check for a null
pointer.
Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
[PATCH] pcmcia: do not set dev_node to NULL too early
If we set dev_node to NULL too early, some drivers which used this to
determine whether unregister_netdev() needs to be called fail when removing
a PCMCIA card.
Since it is way more work to change most drivers to comply with parisc, take
the easy way out and make ioremap _NO_CACHE by default. This is in line with
what powerpc does.
More work towards supporing multiple page sizes on 64-bit. Convert
some assumptions that 64bit uses 3 level page tables into testing
PT_NLEVELS. Also some BUG() to BUG_ON() conversions and some cleanups
to assembler.
Make the defconfig more generally useful. Turn on IPv6, modules,
cardbus, etc. Boots 32bit on 715 with HIL, B160L with sound,
PrecisionBook, and C3000.
Grant Grundler [Thu, 30 Mar 2006 07:13:21 +0000 (07:13 +0000)]
[PARISC] Document that we tolerate "Relaxed Ordering"
This means "DMA Read returns" can bypass "MMIO Writes".
Violating the PCI specs in this case improves outbound DMA "flows"
and is currently not required by any drivers.
This is NOT a new behavior. Previous chipsets did this
already and I believe ZX1 PDC was already setting this
for hpux. I just want to further document the behavior.
Signed-off-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>