This started out from sparse warnings about calling with fddi_broadcast
that is declared const. This fixes that and gets rid of some of the namespace
pollution of this driver by moving the predicate function is_individual, is_broadcast, ...
as inline's in the one file that uses them.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Don Fry [Wed, 30 Jun 2004 19:20:36 +0000 (15:20 -0400)]
[PATCH] pcnet32: correctly program bcr32.
The pcnet32 driver was not correctly enabling MII autonegotiation after
booting when ppc firmware forced the speed/duplex mode of the chip.
After several conversations with AMD this patch corrects the problem.
I have tested this on hardware I have available (ia32 and ppc64) but I
would like wider audience testing of this patch.
Don Fry [Wed, 30 Jun 2004 19:20:18 +0000 (15:20 -0400)]
[PATCH] pcnet32: acknowledge all interrupts early.
A recent change I made broke pcnet32 in a way that allowed real hardware
to work, but broke VMWare. This patch acknowledges all interrupts early
in the pcnet32_interrupt while loop. Without this patch on real hardware
the first transmit operation would clear the 'init' interrupt, but in
VMWare it would rain interrupts. Keith Moore did more testing for me
on VMWare and I did a better job testing on hardware. Petr Vandrovec
correctly pointed out the source of the problem on lkml.
This patch is not needed for 2.4.27-rc1 unless my patch labeled
"pcnet32: recover after rx hang" is applied (which it has not).
Russell King [Tue, 29 Jun 2004 19:26:07 +0000 (20:26 +0100)]
[ARM] Miscellaneous fixes
- Remove 'arc' machine name from Makefile
- clk_set_rate() should return non-zero atm.
- proc-sa1100.S doesn't need asm/ptrace.h
- update mach-types
- kill line of spaces in clock.h
Russell King [Tue, 29 Jun 2004 17:48:23 +0000 (18:48 +0100)]
[ARM] Move arch_adjust_zones to asm/memory.h
This places arch_adjust_zones along side ISA_DMA_THRESHOLD. These
two are related, but having them in separate files means its not
obvious that they are.
ISA_DMA_THRESHOLD is a DMA mask which must be defined such that it
matches the memory handed out by GFP_DMA, which in turn is controlled
by arch_adjust_zones.
Russell King [Tue, 29 Jun 2004 14:39:12 +0000 (15:39 +0100)]
[ARM] Prevent static data in misc.o
Static data causes GOTOFF relocations to be used, which won't work
because we want to relocate the .data section separately from the
.text section. Therefore, force all data to be nonstatic.
Russell King [Tue, 29 Jun 2004 13:33:49 +0000 (14:33 +0100)]
[ARM] Kernel boot decompressor updates
- use 'Image' target for kernel image to be compressed rather than
duplicating its generation.
- use .incbin-based generation of ELF objects from binary data rather
than 'ld'-based generation.
Russell King [Tue, 29 Jun 2004 12:38:54 +0000 (13:38 +0100)]
[ARM] Move ZTEXTADDR/ZBSSADDR initialisation to compressed/Makefile
Since this is where these two variables are used, it makes sense to
have them in that makefile. Also, consolidate "targets"
initialisation, fixes a missing FORCE dependency for the uImage rule,
and remove more FTVPCI code.
Oleg Nesterov [Tue, 29 Jun 2004 12:26:38 +0000 (05:26 -0700)]
[PATCH] kill mm_struct.used_hugetlb
mm_struct.used_hugetlb used to eliminate costly find_vma() from
follow_page(). Now it is used only in ia64 version of follow_huge_addr().
I know nothing about ia64, but this REGION_NUMBER() looks simple enough to
kill used_hugetlb.
There is debug version (commented out) of follow_huge_addr() in i386 which
looks at used_hugetlb, but it can work without this check.
Dave Hansen [Tue, 29 Jun 2004 12:21:13 +0000 (05:21 -0700)]
[PATCH] fix page->count discrepancy for zero page
While writing some analysis tools for memory hot-remove, we came across a
single page which had a ->count that always increased, without bound. It
ended up always being the zero page, and it was caused by a leaked
reference in some do_wp_page() code that ends up avoiding PG_reserved
pages.
Basically what happens is that page_cache_release()/put_page() ignore
PG_reserved pages, while page_cache_get()/get_page() go ahead and take the
reference. So, each time there's a COW fault on the zero-page, you get a
leaked page->count increment.
It's pretty rare to have a COW fault on anything that's PG_reserved, in
fact, I can't think of anything else that this applies to other than the
zero page.
In any case, it the bug doesn't cause any real problems, but it is a bit of
an annoyance and is obviously incorrect. We've been running with this
patch for about 3 months now, and haven't run into any problems with it.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
James Bottomley [Tue, 29 Jun 2004 12:20:29 +0000 (05:20 -0700)]
[PATCH] dma_get_required_mask()
This patch implements dma_get_required_mask() which may be used by drivers
to probe the optimal DMA descriptor type they should be implementing on the
platform.
I've also tested it this time with the sym_2 driver...making it chose the
correct descriptors for the platform. (although I don't have a 64 bit
platform with >4GB memory, so I only confirmed it selects the 32 bit
descriptors all the time...)
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Mika Kukkonen [Tue, 29 Jun 2004 12:20:18 +0000 (05:20 -0700)]
[PATCH] Combined patch for remaining trivial sparse warnings in allnoconfig build
Well, one of these (fs/block_dev.c) is little non-trivial, but i felt
throwing that away would be a shame (and I did add comments ;-).
Also almost all of these have been submitted earlier through other
channels, but have not been picked up (the only controversial is again the
fs/block_dev.c patch, where Linus felt a better job would be done with
__ffs(), but I could not convince myself that is does the same thing as
original code).
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Matt Domsch [Tue, 29 Jun 2004 12:20:06 +0000 (05:20 -0700)]
[PATCH] EDD: store mbr_signature on first 16 int13 devices
Currently, the x86/x86_64 real-mode kernel setup code reads and stores the
mbr_signature (4 bytes in the MBR at offset 440 decimal) for BIOS int13h
device 80h only. This is useful, but not as useful as if we stored such
signatures for all int13h devices. Think OS installer wanting to set up md
software RAID across several BIOS disks.
Patch below against 2.6.7 allows the storing of the mbr_signature for the
first 16 BIOS int13h devices, and exports them via
/sys/firmware/edd/int13_dev8x/mbr_signature as before.
This also merges the three EXPORT_SYMBOLs that setup.c exported for edd.c's
use into one.
Signed-off-by: Matt Domsch <Matt_Domsch@dell.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Paul Mundt [Tue, 29 Jun 2004 12:19:10 +0000 (05:19 -0700)]
[PATCH] sh64: Fix syscall table alignment
If the syscall table is in the text section, the movi that loads its
address into a register will at link time have its immediates resolved as
though it's an SHmedia symbol, i.e. the LSB will be 1. This is then
misaligned as a base address for loading the address to jump to.
This could be fixed either by moving the table back to the .data section
(as done here), or by masking off the LSB after loading the table address
into a register.
Signed-off-by: Richard Curnow <richard.curnow@superh.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Paul Mundt [Tue, 29 Jun 2004 12:18:58 +0000 (05:18 -0700)]
[PATCH] sh64 support
This patch adds sh64 support.
This is a bit overdue, as this was on the should-fix list, though we
weren't done debugging and finishing off the port until just recently (I
did a port against 2.5.68 but it wasn't in any shape to be merged).
sh64 is already in 2.4 and has been for quite awhile, so this is mostly
just a forward port of that code to 2.6 with appropriate bug fixes, etc.
along the way. There isn't much in the way of new features that have been
added to the port yet, though I have added rough hugetlb and oprofile
support.
This patch doesn't really touch any common code, with the exception of an
ifdef or two for keyboard support and an ifdef in fb.h to omit sh64 from
the __raw_xxx() wrapping that sh does.
The only other common driver changes were to sh-sci for serial support, but
those bits were already merged with the latest batch of sh-sci updates.
Beyond that, the port is completely isolated.
Signed-off-by: Richard Curnow <richard.curnow@superh.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Tigran Aivazian [Tue, 29 Jun 2004 12:17:15 +0000 (05:17 -0700)]
[PATCH] fix to microcode driver for the old CPUs.
Here is a patch against Linux 2.6.7 which fixes the sigmatch() macro to
work for the relatively old processors as well, which have 'pf == 0'
(processor flags as read from MSR 0x17), For example, the processors
failing without this patch are Pentium II 300 MHz (Klamath) with
family/model/stepping 6/3/4 and 6/3/3.
The patch also contains minor cosmetic changes (to make source code more
uniform).
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Antonino Daplas [Tue, 29 Jun 2004 12:17:04 +0000 (05:17 -0700)]
[PATCH] fbcon: fix display artifacts
Fixed display artifacts present in the space reserved for the boot logo.
Use attributes of the background erase character instead of hardcoding the
color to zero.
Signed-off-by: Antonino A. Daplas <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Russell King [Tue, 29 Jun 2004 12:16:41 +0000 (05:16 -0700)]
[PATCH] Provide console_suspend() and console_resume()
Add console_stop() and console_start() methods so the serial drivers
can disable console output before suspending a port, and re-enable output
afterwards.
We also add locking to ensure that we synchronise with any in-progress
printk.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Russell King [Tue, 29 Jun 2004 12:16:30 +0000 (05:16 -0700)]
[PATCH] Provide console_device()
[This patch series has also been separately sent to the architecture
maintainers]
Add console_device() to return the console tty driver structure and the
index. Acquire the console lock while scanning the list of console drivers
to protect us against console driver list manipulations.
Signed-off-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
I am not exactly 100% sure I translated it correctly since I have no idea
what exactly was that NEC v850 evaluation board, but should be OK (say 95%
sure).
Acked by Miles Bader <miles@lsi.nec.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Yoav Zach [Tue, 29 Jun 2004 12:16:08 +0000 (05:16 -0700)]
[PATCH] binfmt misc fd passing via ELF aux vector
The proposed patch uses the aux-vector to pass the fd of the open misc
binary to the interpreter, instead of using argv[1] for that purpose.
Previous patch - open_nonreadable_binaries, offered the option of
binfmt_misc opening the binary on behalf of the interpreter. In case
binfmt_misc is requested to do that it would pass the file-descriptor of
the open binary to the interpreter as its second argument (argv[1]). This
method of passing the file descriptor was suspected to be problematic,
since it changes the command line that users expect to see when using tools
such as 'ps' and 'top'.
The proposed patch changes the method of passing the fd of the open binary
to the translator. Instead of passing it as an argument, binfmt_misc will
request the ELF loader to pass it as a new element in the aux-vector that
it prepares on the stack for ELF interpreter. With this patch, argv[1]
will hold the full path to the binary regardless of whether it opened it or
not.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andy Whitcroft [Tue, 29 Jun 2004 12:15:56 +0000 (05:15 -0700)]
[PATCH] ppc64: fix deadlocks when oopsing while mmap_sem is held
If a fault in the kernel leads to an unexpected protection fault whilst in
a code path which holds mmap_sem we will deadlock in do_page_fault() while
trying to classify the fault. By carefully testing the source of the fault
we can detect and OOPS on the vast majority of these, greatly enhancing
diagnosis of such bugs.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Tue, 29 Jun 2004 12:15:45 +0000 (05:15 -0700)]
[PATCH] x86_64 .init.setup alignment fix
We're now putting 24-byte structures into .init.setup via __setup. But
x86_64's compiler is emitting a `.align 16' in there, so they end up on
32-byte boundaries and do_early_param()'s pointer arithmetic goes wrong.
Fix that up by forcing the compiler to align these structures to sizeof(long).
[BRIDGE]: Fix message age in bridge STP config packets.
This is a revised version of Kishore's patch to set message age appropriately
in STP configuration packets.
Signed-off-by: Kishore A K <KishoreAK@myw.ltindia.com> Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
Tony Luck [Tue, 29 Jun 2004 08:52:46 +0000 (01:52 -0700)]
[PATCH] ia64: fix reloc-out-of-range error on module loading
I'm hitting this problem because the module I want to load was
compiled with -g, so the filesize is absolutely huge. kernel/module.c
does a vmalloc() to inhale the entire file, and then two calls to
module_alloc() (which calls vmalloc() on ia64) to load the 'init' and
'core' sections. The 'init' is small and slips into a gap early in the
vmalloc playspace, while the 'core' area is allocated after the huge
area that was allocated for the inhaled copy of the whole file.
I made a one coding change to Jean-Marc's version, adding a check to
see whether the init/core sections are close enough together for the
PCREL21B to reach (they almost always are).
I've kept the test that there are no jumps from core to init (though
the message that is printed is almost as unhelpful as the one that you
get when you statically link a module into the kernel that has calls
to the discarded .exit section :-)
This patch stalled out before on the question of whether a PLT was
overkill for a section-to-section branch, and whether it would be
better to use relaxation techniques to extend the range. Doing that
might be more elegant in some way, but it needs a whole heap of extra
code (to count how many relaxed branches need to be added and
allocated them as needed). This seems a lot of extra code that is
only ever going to be exercised by maniacs like me with 49MB .ko
files.
I fixed up the comments to be a little more heplful.
Signed-off-by: <tony.luck@intel.com> Signed-off-by: David Mosberger <davidm@hpl.hp.com>
Jesse Barnes [Tue, 29 Jun 2004 07:47:36 +0000 (00:47 -0700)]
[PATCH] ia64: update early printk for new console driver
The Altix console driver has been replaced in Andrew's tree by a new
one that uses the serial core API. Update the early_console_setup
routine to use the new config option so that it's ready when the
driver hits Linus' tree. This will also fix a build bug since the old
driver hasn't been updated.
Signed-off-by: Jesse Barnes <jbarnes@sgi.com> Signed-off-by: David Mosberger <davidm@hpl.hp.com>
The packet scheduler simulates 64 bit jiffies on 32 bit platforms by running
a timer keeping a mark and and offset. Since there is no locking and this is
racy and doesn't handle jiffie wrap real well.
We can use get_jiffies_64 on 2.6 do get what is needed.
The downside is the overhead of a function call, and a cache miss in
get_jiffies_64.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
This code in the csz scheduler, is just plain broken. The TDIFF_SAFE
effectively expands to:
unsigned long delay = now - q->t_c;
if (delay > 0) {
delay = 0;
goto do_reset;
}
if (delay >> q->delta_log)
So delay is always 0! I assume that what was originally intended
is the to keep delay bounded to 1<<q->delta_log.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
Kenneth W. Chen [Tue, 29 Jun 2004 07:36:05 +0000 (00:36 -0700)]
[PATCH] ia64: fix incorrect initialization of ar.k4 for BP
The patch to move the current pointer for init_task from region 7 to
region 5 inadvertendly caused ar.k4 (CURRENT_STACK) to be initialized
improperly for the bootstrap processor. Fix this by initializing it
to -1.
Signed-off-by: David Mosberger <davidm@hpl.hp.com>
USB: fix bug where removing usb-serial modules or usb serial devices could oops
This fixes the issue where the Generic driver would bind to all usb-serial
devices, so the disconnect would not properly go to the real driver that
controlled the device. This was very bad when unloading the module with
the device still connected.
The packet scheduling code has some ugly define's which were to deal with
configuration possibilities and the old style module exports. With the current
2.6 method, this is unnecessary.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
Dmitry Torokhov [Tue, 29 Jun 2004 07:25:48 +0000 (00:25 -0700)]
[PKT_SCHED]: Compile warning and logic rearrangement in sch_prio enqueue.
When CONFIG_NET_CLS_ACT is not set 'result' variable in prio_classify is
unused. Also I was looking over the rest of the module and had hard time
understanding the logic in prio_enqueue - I rearranged it a bit for better
readability. Plus there are some formatting changes.
Signed-off-by: Dmitry Torokhov <dtor_core@ameritech.net> Signed-off-by: David S. Miller <davem@redhat.com>