Re-instate __ARCH_SI_BAND_T, to allow architecture overrides.
We default to "long" (which is what POSIX says), but since
a number of architectures have used "int" for historical
reasons, we need to allow overrides.
At least sparc64 needs this. Possibly others, but so far
architecture maintainers haven't spoken up. ppc64 and x86-64
are known to be ok with the default "long".
Andrew Morton [Fri, 2 Apr 2004 12:05:15 +0000 (04:05 -0800)]
[PATCH] PPC32: Fix thinko in arch/ppc/boot/simple/relocate.S
From: Tom Rini <trini@kernel.crashing.org>
When I was updating ppc/boot/simple/relocate.S to work on PPC_PREP systems, I
in advertantly broke 4xx systems. On classic PPC, the first three
instructions are nops, of which the first two can be overwritten. This is
not true of 4xx (or 8xx, but that's not working right now anyhow). The
following is needed to fix this.
Russell King [Fri, 2 Apr 2004 13:17:43 +0000 (14:17 +0100)]
[ARM] Update ARM makefiles
- Use -march=armv6 where available.
- CFLAGS_BOOT isn't needed - the decompressor uses CFLAGS, remove it.
- PROCESSOR is never used, remove it.
- LDFLAGS_BLOB is never used, remove it.
- Remove MACHINE macro.
- Correct comments for include/asm-arm/.arch target.
- Copy format of include/asm symlink rule.
- Arrange for configuration to be split before making
include/asm-arm/arch symlink.
- This means that asm-offsets.s no longer depends on
include/config/MARKER.
Andrew Morton [Thu, 1 Apr 2004 05:53:47 +0000 (21:53 -0800)]
[PATCH] Fix swp_entry_t encoding
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
This fixes a problem in sys_swapon that can cause the creation of invalid
swap ptes. This has its cause in the arch-independent swap entries vs.
the pte coded swap entries. The swp_entry_t uses 27 bits for the offset
and 5 bits for the type. In sys_swapon this definition is used to find how
many swap devices and how many pages on each device there can be. But the
swap entries encoded in a pte can be subject to additional restrictions due
to the hardware besides the 27/5 division of the bits in the swp_entry_t
type. This is solved by adding pte_to_swp_entry and swp_entry_to_pte calls
to the calculations for maximum type and offset.
In addition the s390 swap pte division for offset/type is changed from 19/6
bits to 20/5 bits.
Andrew Morton [Thu, 1 Apr 2004 05:52:20 +0000 (21:52 -0800)]
[PATCH] run page_address_init() earlier
If someone runs page_address() before page_address_init(), the kernel locks
up over uninitialised spinlocks.
This only happens with the 4:4 patch, but it is more robust to run
page_address_init() before setup_arch(). page_address_init() simply
initialises statically allocated storage.
Andrew Morton [Thu, 1 Apr 2004 05:52:06 +0000 (21:52 -0800)]
[PATCH] loop setup calling bd_set_size too soon
From: Chris Mason <mason@suse.com>
I think Andrew and I managed to mismerge the loop setup race fix.
loop_set_fd is using get_capacity() to read the size of the disk and
sending that to bd_set_size.
But, it is doing this before calling set_capacity, so the size being used
is wrong. This should clean things up.
Andrew Morton [Thu, 1 Apr 2004 05:51:54 +0000 (21:51 -0800)]
[PATCH] Replace MAX_MAP_COUNT with /proc/sys/vm/max_map_count
From: David Mosberger <davidm@napali.hpl.hp.com>
Below is a warmed up version of a patch originally done by Werner Almesberger
(see http://tinyurl.com/25zra) to replace the MAX_MAP_COUNT limit with a
sysctl variable. I thought this had gone into the tree a long time ago but
alas it has not and as luck would have it, the hard limit bit someone today
once again with a large app on a large machine.
Andrew Morton [Thu, 1 Apr 2004 05:51:13 +0000 (21:51 -0800)]
[PATCH] Fix hugetlb-vs-memory overcommit
From: Andy Whitcroft <apw@shadowen.org>
Two problems:
a) The memory overcommit code fails oto take into account all the pages
which are pinned by being reserved for the hugetlbpage pool
b) We're performing overcommit accounting and checking on behalf of
hugetlbpage vmas.
The main thrust is to ensure that VM_ACCOUNT actually only gets set on
vma's which are indeed accountable. With that ensured much of the rest
comes out in the wash. It also removes the hugetlb memory for the
overcommit_memory=2 case.
Andrew Morton [Thu, 1 Apr 2004 05:50:47 +0000 (21:50 -0800)]
[PATCH] ppc64: add useful warning message in hugepage code
From: David Gibson <david@gibson.dropbear.id.au>
This patch adds a debugging message to the ppc64 hugepage code when we
attempt to open the "low" (32-bit) hugepage window on PPC64, but can't
because a (non-hugepage) mapping already exists in the region.
Andrew Morton [Thu, 1 Apr 2004 05:50:36 +0000 (21:50 -0800)]
[PATCH] ppc64: allow MAP_FIXED hugepage mappings
From: David Gibson <david@gibson.dropbear.id.au>
On PowerPC64 the "low" hugepage range (at 2-3G for use by 32-bit processes)
needs to be activated before it can be used. hugetlb_get_unmapped_area()
automatically activates the range for hugepage mappings in 32-bit processes
which are not MAP_FIXED. However for MAP_FIXED mmap()s, even at a suitable
address will fail if the region is not already activated, because there is
no suitable callback from the generic MAP_FIXED code path into the arch
code.
This patch corrects this problem and allows PPC64 to do MAP_FIXED hugepage
mappings in the low hugepage range.
Andrew Morton [Thu, 1 Apr 2004 05:50:10 +0000 (21:50 -0800)]
[PATCH] ppc64: create dma_mapping_error
From: Anton Blanchard <anton@samba.org>
From: Stephen Rothwell <sfr@canb.auug.org.au>
This creates DMA_ERROR_CODE and uses it everywhere instead of
PCI_DMA_ERROR_CODE as we really want the three DMA mapping API's to return
a single error code. Also we now have dma_mapping_error and
vio_dma_mapping_error - and this latter and pci_dma_mapping_error both just
call the former.
Also a small fix in the vscsi - dma_map_sg returns 0 to indicate an error.
[XFS] Be explicit in adding in the non-transactional data to the reservation
estimate. We must add in for the worst case of a log stripe taking us the
full distance for a log stripe boundary.
[XFS] Define a new superblock field for more feature bits. Take the last
feature bit in sb_versionnum to use to indicate that the new feature bit
field is to be used.
Nathan Scott [Thu, 1 Apr 2004 20:38:16 +0000 (06:38 +1000)]
[XFS] Remove dup fdatasync/fdatawait call on fsync. Means we no longer
take the iolock here, and readers no longer conflict with concurrent
fsync activity. Kudos to Steve!
Linus Torvalds [Wed, 31 Mar 2004 10:18:18 +0000 (02:18 -0800)]
acpi: enable global wake events by default
People need the global wake events even when not sleeping:
they are used for lid open events at least on some laptops.
As such, they should be enabled by default.
You can disable them with "acpi_leave_gpes_disabled" if
your machine doesn't need them, and you want to get a few
less GPE's.
Bart De Schuymer [Wed, 31 Mar 2004 07:18:10 +0000 (23:18 -0800)]
[NETFILTER]: Do not require ip_forwarding for reset on a bridge.
Currently, to be able to send a reset in the FORWARD chain of iptables
for bridged traffic, ip forwarding must be enabled. This causes confusion
and in some situations people really don't want to enable ip forwarding.
The patch below lets the user send reset packets for bridged frames in
the FORWARD chain, with ip forwarding disabled (as long as there is a
route).
Jeff Garzik [Wed, 31 Mar 2004 04:01:25 +0000 (20:01 -0800)]
[PATCH] Fix oopses in fealnx driver TX path
In both uniprocessor and SMP, the fealnx driver's TX-submit path can
race against the interrupt handler, with disastrous results. Add the
lock that needed to be there all along, to fix this.
There's another problem in the RX path, that will be sent as a separate
patch, as soon as we get that patch 100% nailed down, and acceptable for
a Release Candidate.
Andrew Morton [Wed, 31 Mar 2004 00:34:59 +0000 (16:34 -0800)]
[PATCH] ppc64: clean up virtual <-> absolute code
From: Anton Blanchard <anton@samba.org>
Rusty Russell <rusty@rustcorp.com.au>
The iSeries has an arch-specific mapping from physical <-> absolute
addresses. Fortunately this is only used in a few places. However, the
following arch-specific macros/functions are provided in addition to the
standard macros:
Reduce them to these, with slightly shorter names, and taking either pointers
or unsigned long (as per __va and __pa) rather than making the caller cast:
abs_to_phys()
phys_to_abs()
And helper macros:
virt_to_abs()
abs_to_virt()
As is standard, virtual addresses are returned as void *, physical and
absolute as unsigned long.
Note that the change the iSeries_setup is a little subtle: ea is set to
__va(pa) above, so "phys_to_abs(pa)" is the same as "virt_to_abs(ea)".
Also, REALADDR is renamed to ISERIES_HV_ADDR and used in a couple of places
where appropriate.