Alexander Viro [Fri, 27 Feb 2004 23:58:28 +0000 (15:58 -0800)]
[PATCH] oops on HPFS filesystem file rename
Maurice van der Stee noted that he got an oops on a HPFS filesystem when
saving an edited file..
<stares at the code>
<blinks>
<wonders whereTF do we assign hpfs1_i and hpfs2_i if both inodes are non-NULL>
<finds the patch in question>
<stares at jgarzik>
This fixes it. That, BTW, means that *nobody* had ever tried to use
hpfs r/w since 2.5.3-pre3.
David Mosberger [Fri, 27 Feb 2004 18:02:53 +0000 (10:02 -0800)]
ia64: Fix pdflush-triggered stack-overflow due to long thread-creation chains.
The pdflush kernel threads can lead to an unbounded chain of thread-creations
which can overflow the kernel stacks because we didn't uses to reset
the stack on kernel thread-creation. We do now.
Reported by Andreas Schwab, tracked down with help from Keith Owens.
This patch changes the I/O SAPIC code to cache the low 32 bits of the mask
word in kernel memory. This greatly speeds up mask_irq() and unmask_irq().
Normally, these operations are not on the speed-critical path of the
kernel but with certain devices drivers (including users-level device-
drivers) they can become performance-critical.
Stéphane Eranian [Fri, 27 Feb 2004 13:39:54 +0000 (05:39 -0800)]
[PATCH] ia64: perfmon update
- fix bug in pfm_unload(), not allowed when not on correct CPU for
system-wide
- some perf/cleanup in overflow handler
- fix reset_pmds to be on a per PMD basis on counter overflow rather
than global
- remove timing debug code on messages
- no kernel info leak on PFM_END_MSG
- remove double-store on reg_flags for pfm_write_pmcs, pfm_write_pmds
- on restart reset_pmds is 0 by default
- cleanup useless macros
- cleanup some debug prints
- added ability to remove debug code
- streamlined sys_perfmonctl(), pfm_read_pmds(), pfm_write_*()
- added current->tgid to default format sample header by using one
reserved field
David Mosberger [Fri, 27 Feb 2004 13:17:14 +0000 (05:17 -0800)]
ia64: Fix IDE block-layer BUG_ON() reported by Darren Williams.
The problem was that IDE-disks on machines with IDE harddisks,
memory above 4GB and no hardware I/O TLB would go BUG_ON() in
blk_queue_bounce_limit() because the IDE-controller could only
address 4GB of memory and that was much less than BLK_BOUNCE_ISA
(which is equal to ISA_DMA_THRESHOLD). Note that the problem does
NOT trigger with CD-ROMs, which always uses the software I/O TLB
(and hence bounce-buffers) on such machines.
The best fix seems to be to simply lower ISA_DMA_THRESHOLD to 4GB-1 since
that will ensure that the IDE block layer allocates memory with GFP_DMA,
which will minimize bounce buffering.
Russell King [Fri, 27 Feb 2004 22:14:34 +0000 (22:14 +0000)]
[MTD] Fix ARM Firmware Suite MTD partition detection.
Tighten AFS partition checks:
- check footer checksum.
- check that the image name is NUL terminated.
- return error from mtd->read intact.
This prevents us finding bogus AFS partitions.
Olof Johansson [Fri, 27 Feb 2004 09:23:31 +0000 (01:23 -0800)]
[PATCH] ppc64: Add iommu=on for enabling DART on small-mem machines
This makes it possible for people like me with a small-mem G5 to enable
the DART. I see two reasons for wanting to do so:
1. To debug/test DART/iommu code itself (small audience, including
myself).
2. To debug drivers on small-mem machines, since bad pci_map*() usage will
be punished (possibly larger audience).
Russell King [Fri, 27 Feb 2004 17:18:54 +0000 (17:18 +0000)]
[ARM] amba_{request,release}_regions
Add documentation for the above two functions. Allow a NULL name to
be passed to amba_request_regions. In this case, we use the driver's
name associated with the device.
Russell King [Fri, 27 Feb 2004 16:37:12 +0000 (16:37 +0000)]
[ARM] Allow decompressor to use "cache type" register
This allows the decompressor to automatically detect the geometry of
the cache while booting to ensure correct behaviour over a wider
number of ARM CPUs.
Russell King [Fri, 27 Feb 2004 15:22:13 +0000 (15:22 +0000)]
[ARM] Remove obsolete sysctl PM interface.
The old sysctl PM interface has been replaced by the driver models
interface. This has been gone for a while in the -rmk tree and no
one complained, so there's no point keeping it around.
Russell King [Fri, 27 Feb 2004 14:02:35 +0000 (14:02 +0000)]
[ARM] Update sa1111-pcibuf for dmapool changes.
- use dev_dbg for device-centric debugging messages
- use pr_debug for general debugging messages
- use dmapools instead of pcipools
- use NULL rather than 0 for NULL pointers
- use enum dma_data_direction rather than int
- use DMA_* direction definitions rather than PCI_DMA_*
- only check for sane DMA direction on mapping functions, but
check that DMA direction matches when unmapping/syncing.
Kenneth W. Chen [Fri, 27 Feb 2004 02:41:00 +0000 (18:41 -0800)]
[PATCH] ia64: make hugetlbfs page size a boot-time option
This patch makes it possible to select the hugetlbfs page size at boot-time,
rather than at compile-time. We believe we have resolved all the remaining
issues. All critical speed path has been taken care of, i.e., vhpt handler
and context switch. There should be no performance penalty with this dynamic
hugetlb page size feature.
We would like to thank Jack Steiner for his initiative on this feature
and his initial cool working patch.
[SCTP] Fix incorrect INIT process termination with sinit_max_init_timeo.
Currently, sinit_max_init_timeo is treated as the maximum timeout
value for INIT retransmissions and the INIT process is aborted when
the timeout reaches this value. But as per the SCTP sockets API draft,
sinit_max_init_timeo only limits the timeout. The INIT process should
be aborted only after MAX_INIT_RETRANSMITS.
Anton Blanchard [Fri, 27 Feb 2004 01:28:28 +0000 (17:28 -0800)]
[PATCH] ppc64: TLB flush rework
ppc64 tlb flush rework from Paul Mackerras
Instead of doing a double pass of the pagetables, we batch things
up in the pte flush routines and then shoot the batch down in
flush_tlb_pending.
Our page aging was broken, we never flushed entries out of the ppc64
hashtable. We now flush in ptep_test_and_clear_young.
A number of other things were fixed up in the process:
- change ppc64_tlb_batch to per cpu data
- remove some LPAR debug code
- be more careful with ioremap_mm inits
- clean up arch/ppc64/mm/init.c, create tlb.c
[PATCH] ppc64:Implement support for Apple DART IOMMU (PowerMac G5)
This allows us to use more than 2Gb of RAM on a PowerMac G5. You can
also boot with iommu=off to disable it, but then you get back the 2Gb
RAM limitation.
[PATCH] ppc64: Fix drivers/ide when using an IOMMU
Make IDE advertise only 128 entries of SG table on archs with an IOMMU.
The current IOMMU implementations of pci_map_sg() may produce segments
that don't match the boundary requirements of IDE, thus causing the
driver to break them up. The BIO is supposed to account for that,
however, it cannot account for a pci_map_sg producing a segment of the
requested size, but with incorrect alignement, thus we may still try to
break up the list in more entries than is supported by the HW.
A similar fix already went in libata. The "real" long term fix will be
to move the boundary requirements to struct device so that pci_map_sg()
can respect them when producing the sglist. In the meantime, this
band-aid works around the problem.
Lots of things renamed, sillicaps killed, stuffs moved around and common
code properly extracted from implementation specific code, new
allocator, etc... The code is overall a lot simpler, faster, less prone
to fail, and a lot more manageable. I didn't use "bk mv", there is no
need to keep the old history attached to the new file.
[PATCH] ppc64: Fix /dev/mem idea of what is memory
This adds a hack to /dev/mem (along with the other ones already there)
to prevent mapping cacheable of the IO hole.
Without this, XFree blows up on machines with enough memory to go past
the IO hole. It also tries to prevent memory from beeing mapped
uncached. Cache paradoxes are evil and can kill the CPU.
The necessary page_is_ram() call was added by the previous patch doing
the proper IO hole accounting.
On machines with an IO hole (like Apple G5 with more than 2Gb of RAM,
but also some pSeries) we failed to properly account for the real
amount of physical RAM and inform the zone allocator of our hole size.
During the process, I included Anton slaughtering of the guard page we
had in the first 256Mb kernel segment, thus allowing this segment to be
mapped with large pages as it should be.
Jeff Garzik [Thu, 26 Feb 2004 16:26:13 +0000 (11:26 -0500)]
[libata] limit S/G table size to 128 entries
Agreeing with Ben H's recommendation, I reduce the max-hw-segments
number to 128, to match max-phys-segments number. This shouldn't
affect performance because 128*64K is far above the max transfer size
for most current IDE devices. Even 128*4K is OK.
Andrew Morton [Thu, 26 Feb 2004 14:51:58 +0000 (06:51 -0800)]
[PATCH] Add a MODULE_VERSION macro
From: Rusty Russell <rusty@au1.ibm.com>
The way it works is that the .mod file contains the name of the module (as
before), but succeeding lines are the constituent parts (assumed to be .c
files, which usually works: if they use MODULE_VERSION in a file for which
this isn't true we'll get a warning).
As we postprocess modules, we look in the .modinfo section for a
"version=", which is placed by the MODULE_VERSION() macro. This will be of
form "version=<macroarg>" "\0" [24 chars] "\0". The 24 chars are replaced
by the md4 sum of the .c files and any files they #include using '#include
"file"' which are found in the current directory. Whitespace is collapsed
outside strings, and comments are ignored for purposes of the sum.
At the kernel summit, various people asked for a MODULE_VERSION macro to
store module strings (for later access through sysfs). A simple md4 is
needed to identify changes in modules which, inevitably, do not update the
version. It skips whitespace and comments, and includes #includes which
are in the same dir.
The module versions should be set according to this definition, based on
the RPM one, or CVS Revision tags. Violators will be shot.
[<epoch>`:']<version>[`-'<extraversion>]
<epoch>: A (small) unsigned integer which allows you to start versions
anew. If not mentioned, it's zero. eg. "2:1.0" is after
"1:2.0".
<version>: The <version> may contain only alphanumerics.
<extraversion>: Like <version>, but inserted for local
customizations, eg "rh3" or "rusty1".
Comparison of two versions (assuming same epoch):
Split each into all-digit and all-alphabetical parts. Compare each one one
at a time: digit parts numerically, alphabetical in ASCII order. So 0.10
comes after 0.9.
Andrew Morton [Thu, 26 Feb 2004 14:51:46 +0000 (06:51 -0800)]
[PATCH] kNFSd: return more than one page of directory entries.
From: NeilBrown <neilb@cse.unsw.edu.au>
From: Bruce Allan <bwa@us.ibm.com>
This requires checking if the entry will fit in the current page and, if it
doesn't, encoding it into the next page, and then copying it back to lie
across the boundary between two pages.
Andrew Morton [Thu, 26 Feb 2004 14:50:27 +0000 (06:50 -0800)]
[PATCH] kNFSd: Enforce open_downgrade requirement
From: NeilBrown <neilb@cse.unsw.edu.au>
The spec requires that the access and deny bits requested in open_downgrade
represent the union of the bits for some subset of the OPENS for the given
open_owner and file. Enforce that requirement.
Andrew Morton [Thu, 26 Feb 2004 14:49:20 +0000 (06:49 -0800)]
[PATCH] kNFSd: move fh_dup2 and fix it
From: NeilBrown <neilb@cse.unsw.edu.au>
fh_dup2 duplicates an entire svc_fh structure, so in addition to dget()'ing
the dentry, it also needs to bump the reference count on fh_export.
Moved it out of the header file into nfsfh.c for the simple reason that I
couldn't figure out how to reorganize the headers files right so that the
fh_dup2 could use the definition of svc_fh. Since fh_dup2 is never actually
used outside of nfs4proc.c, it could just as well be moved there....
Andrew Morton [Thu, 26 Feb 2004 14:48:26 +0000 (06:48 -0800)]
[PATCH] kNFSd: correct symlink related error returns.
From: NeilBrown <neilb@cse.unsw.edu.au>
unlike v2/v3, nfsv4 returns nfserr_inval when attempting to read, write,
commit or test lock a symlink. nfsv4 does return nfserr_symlink on lookup
and open, so a simple fix in fh_verify() will not work.
Andrew Morton [Thu, 26 Feb 2004 14:47:08 +0000 (06:47 -0800)]
[PATCH] kNFSd: Use only the uid when deciding whether a setclientid is being done with the "same principal".
From: NeilBrown <neilb@cse.unsw.edu.au>
I would have assumed that we should also check for the same security
(pseudo)flavor, but that doesn't seem to be how Solaris does it, and since
the spec doesn't suggest including such information in the clientid, that
would make it impossible to switch pseudoflavors.
Andrew Morton [Thu, 26 Feb 2004 14:46:54 +0000 (06:46 -0800)]
[PATCH] kNFSd: NFSdV4 fixes for replaying open requests.
From: NeilBrown <neilb@cse.unsw.edu.au>
Since the open op changes the current filehandle, we can't correctly replay
compounds containing opens unless we save the filehandle resulting from the
open as well as the encoded reply.
Andrew Morton [Thu, 26 Feb 2004 14:46:20 +0000 (06:46 -0800)]
[PATCH] kNFSd: v4 exclusive open fix.
From: NeilBrown <neilb@cse.unsw.edu.au>
Exclusive creates were failing with permission errors, because they don't set
the mode on the newly created file, and the permission check in fh_verify
(called at the end of do_open_lookup) was failing. So pass in the
MAY_OWNER_OVERRIDE flag to allow the owner of the file to override the
permission check.
Andrew Morton [Thu, 26 Feb 2004 14:46:09 +0000 (06:46 -0800)]
[PATCH] kNFSd: NFSv4 locking state fix
From: NeilBrown <neilb@cse.unsw.edu.au>
It's OK for the find_lockstateowner_str to fail; that just means we haven't
seen the lockowner, and will compare the request range to all locks on the
file.
Andrew Morton [Thu, 26 Feb 2004 14:45:47 +0000 (06:45 -0800)]
[PATCH] kNFSd: IDmap support for the NFSv4 server.
From: NeilBrown <neilb@cse.unsw.edu.au>
Updated version which uses ascii-encoding of messages, from
http://www.citi.umich.edu/u/marius/linux-2.5.70-idmap-server-new.diff as of
October 14, 2003.
Andrew Morton [Thu, 26 Feb 2004 14:45:35 +0000 (06:45 -0800)]
[PATCH] kNFSd: gss api changes for integrity checking.
From: NeilBrown <neilb@cse.unsw.edu.au>
Doesn't actually add integrity support on the server yet; just adapts
server-side code to the gss api changes necessary to get integrity working on
the client.