dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

4002 Commits

Author SHA1 Message Date
Jeff Dike 7b033e1fde [PATCH] uml: add mconsole_reply variant with length param
This is needed for the console output patch, since we have a possibly
non-NULL-terminated string there.  So, the new interface takes a string and a
length, and the old interface calls strlen on its string and calls the new
interface with the length.

There's also a bit of whitespace cleanup.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:47 -08:00
Jeff Dike 44700a4469 [PATCH] uml: better diagnostics for broken configs
Produce a compile-time error if both MODE_SKAS and MODE_TT are disabled.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:47 -08:00
Jeff Dike e464bf2bed [PATCH] uml: SIGWINCH handling cleanup
Code cleanup - unregister_winch and winch_cleanup had some duplicate code.
This is now abstracted out into free_winch.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:47 -08:00
Jeff Dike 7eebe8a9c5 [PATCH] uml: umid cleanup
This patch cleans up the umid code:

- The only_if_set argument to get_umid is gone.

- get_umid returns an empty string rather than NULL if there is no umid.

- umid_is_random is gone since its users went away.

- Some printfs were turned into printks because the code runs late enough
  that printk is working.

- Error paths were cleaned up.

- Some functions now return an error and let the caller print the error
  message rather than printing it themselves.  This eliminates the practice of
  passing a pointer to printf or printk in, depending on where in the boot
  process we are.

- Major tidying of not_dead_yet - mostly error path cleanup, plus a comment
  explaining why it doesn't react to errors the way you might expect.

- Calls to os_* interfaces that were moved under os are changed back to
  their native libc forms.

- snprintf, strlcpy, and their bounds-checking friends are used more often,
  replacing by-hand bounds checking in some places.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:47 -08:00
Jeff Dike 2264c475e4 [PATCH] uml: separate libc-dependent umid code
I reworked Gennady's umid OS abstraction patch because the code shouldn't
be moved entirely to os.  As it turns out, I moved most of it anyway.  This
patch is the minimal one needed to move the code and have it work.
It turns out that the concept of the umid is OS-independent, but
almost everything else about the implementation is OS-dependent.

This is code movement without cleanup - a follow-on patch tidies
everything up without shuffling code around.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:47 -08:00
Jeff Dike e4dcee8099 [PATCH] uml: Add throttling to console driver
This patch adds support for throttling and unthrottling input when the tty
driver can't handle it.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:46 -08:00
Jeff Dike 9159c9dfff [PATCH] uml: Fix flip_buf full handling
When the tty flip_buf is full, it's a good idea to delay the input processing
for a jiffy, rather than just scheduling the tasklet immediately.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:46 -08:00
Jeff Dike 165dc59116 [PATCH] uml: Simplify console opening/closing and irq registration
This patch simplifies the opening and closing of host console devices and the
registration and deregistration of IRQs.  The intent is to make it obvious
that an IRQ can't exist without an open file descriptor.

chan_enable will now open the channel, and when both opening and IRQ
registration are desired, this should be used.  Opening only is done for the
initial console, so that interface still needs to exist.

The free_irqs_later interface is now gone.  It was intended to avoid freeing
an IRQ while it was being processed.  It did this, but it didn't eliminate the
possiblity of free_irq being called from an interrupt, which is bad.  In its
place is a list of irqs to be freed, which is processed by the signal handler
just before exiting.  close_one_chan now disables irqs.

When a host device disappears, it is just closed, and that disables IRQs.

The device id registered with the IRQ is now the chan structure, not the tty.
This is because the interrupt arrives on a descriptor associated with the
channel.  This caused equivalent changes in the arguments to line_timer_cb.
line_disable is gone since it is not used any more.

The count field in the line structure is gone.  tty->count is used instead.

The complicated logic in sigio_handler with freeing IRQs when necessary and
making sure its idea of the next irq is correct is now much simpler.  The irq
list can't be rearranged underneath it, so it is now a simple list walk.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:46 -08:00
Jeff Dike 1f80171e81 [PATCH] uml: move console configuration
This patch changes when console devices are configured in order to prepare the
ground for the next patch.

parse_chan_pair is now done earlier, when initcalls are run, rather than when
the device is opened.

When a host device disappears, the channel list is closed, but not freed.
This is required by the previous change.  line_config now takes the options
structure as an argument, and line_open doesn't.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:46 -08:00
Jeff Dike 418e55d49b [PATCH] uml: line_setup interface change
line_setup is changed to return the device which it set up, rather than just
success or failure.  This will be important in the line-config patch.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:46 -08:00
Jeff Dike 9010772cdf [PATCH] uml: Add static initializations and declarations
Some structure fields were being dynamically initialized when they could be
initialized at compile-time instead.  This also makes some declarations static
(in the C sense).

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:46 -08:00
Jeff Dike d571cd18f2 [PATCH] uml: Move mconsole support out of generic code
A bit of restructuring which eliminates the all_allowed argument (which is
mconsole-specific) to line_setup.  That logic is moved to the mconsole
callback.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:45 -08:00
Jeff Dike 88890b8874 [PATCH] uml: Remove unneeded structure field
This removes a structure field which turned out to be pointless, and
references to it.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:45 -08:00
Jeff Dike 0834cc77af [PATCH] uml: use ARRAY_SIZE
This patch replaces instances of "sizeof(foo)/sizeof(foo[0])" with
ARRAY_SIZE(foo), which expands to the same thing.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:45 -08:00
Jeff Dike d50084a299 [PATCH] uml: Formatting changes
This patch makes a bunch of non-functional changes -
    return(foo); becomes return foo;
    some statements are broken across lines for readability
    some trailing whitespace is cleaned up
    open_one_chan took four arguments, three of which could be
       deduced from the first.  Accordingly, they were eliminated.
    some examples of "} else {" had a newline added
    some whitespace cleanup in the indentation
    lines_init got some control flow cleanup
    some long lines were broken
    removed another emacs-specific C formatting comment

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:45 -08:00
Jeff Dike 1b57e9c278 [PATCH] uml: non-void functions should return something
There are a few functions which are declared to return something, but don't.
These are actually infinite loops which are forced to be declared as non-void.
 This makes them all return 0.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:45 -08:00
Jeff Dike 970d6e3a34 [PATCH] uml: use kstrdup
There were a bunch of calls to uml_strdup dating from before kstrdup was
introduced.  This changes those calls.  It doesn't eliminate the definition
since there is still a couple of calls in userspace code (which should
probably call the libc strdup).

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:45 -08:00
Alexey Dobriyan 118c1f27b8 [PATCH] cris: kgdb: remove double_this()
Doesn't make much sense and unused.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:45 -08:00
Christoph Hellwig 3258891825 [PATCH] m68knommu: enable_irq/disable_irq
mach_enable_irq/mach_disable_irq are never actually set, so let's remove
them.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:44 -08:00
Hirokazu Takata adfc31c67f [PATCH] m32r: Remove unnecessary icu_data_t definitions
This patch removes unnecessary struct icu_data_t definitions of
arch/m32r/kernel/setup_*.c.

Signed-off-by: Hayato Fujiwara <fujiwara@linux-m32r.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:44 -08:00
Hirokazu Takata 9b791d4766 [PATCH] m32r: Fix M32104 cache flushing routines
This patch fixes cache memory parameter setting for the M32104 target.  So
far, its performance seemed to have been degraded due to incorrect cache
parameter setting.

  * arch/m32r/boot/setup.S: Set SFR(Special Fuction Registers) region
    to be non-cachable explicitly.
  * arch/m32r/mm/cache.c: Fix cache flushing routines not to switch off
    the M32104 cache.

Signed-off-by: Hayato Fujiwara <fujiwara@linux-m32r.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:44 -08:00
Hirokazu Takata 46ea178b7a [PATCH] m32r: Update _port2addr to use NONCACHE_OFFSET
Modify _port2addr*() routines in arch/m32r/kernel/io_*.c to use
NONCACHE_OFFSET instead of hard-coding of a constant address.

This modification is also required to support an M3A-ZA36 FPGA eva board in
case an MMU-less synthesizable m32r core is used.

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:44 -08:00
Hirokazu Takata 9287d95ea1 [PATCH] m32r: Support M32104UT target platform
This patch is for supporting a new target platform, Renesas M32104UT
evaluation board.

The M32104UT is an eval board based on an uT-Engine specification.  This board
has an MMU-less M32R family processor, M32104.
http://www-wa0.personal-media.co.jp/pmc/archive/te/te_m32104_e.pdf

This board is one of the most popular M32R platform, so we have ported
Linux/M32R to it.

Signed-off-by: Naoto Sugai <Sugai.Naoto@ak.MitsubishiElectric.co.jp>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:43 -08:00
Hirokazu Takata 60c83c77c4 [PATCH] m32r: trivial fix to remove unused instructions
A trivial fix to remove unused instructions.

Signed-off-by: Naoto Sugai <Sugai.Naoto@ak.MitsubishiElectric.co.jp>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:43 -08:00
Ivan Kokshaysky 0595bf3bca [PATCH] Alpha: convert to generic irq framework (alpha part)
Kconfig tweaks and tons of deletions.

Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:40 -08:00
Shaohua Li 1fa744e6e9 [PATCH] cpu hotplug/x86_64: disable interrupt in play_dead
With physical CPU hotplug, the CPU is hot removed and it should not receive
any interrupts.  Disabling interrupt is much safer.  This basically is what we
do in ia64 & x86.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:39 -08:00
Ben Collins 766c3f94d4 [PATCH] i386: Handle HP laptop rebooting properly.
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:39 -08:00
Vivek Goyal 76865c3f87 [PATCH] i386: ioapic virtual wire mode fix
o Currently, during kexec reboot, IOAPIC is re-programmed back to virtual
  wire mode if there was an i8259 connected to it. This enables getting
  timer interrupts in second kernel in legacy mode.

o After putting into virtual wire mode, IOAPIC delivers the i8259 interrupts
  to CPU0. This works well for kexec but not for kdump as we might crash
  on a different CPU and second kernel will not see timer interrupts.

o This patch modifies the redirection table entry to deliver the timer
  interrupts to the cpu we are rebooting (instead of hardcoding to zero).
  This ensures that second kernel receives timer interrupts even on a
  non-boot cpu.

Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Seth, Rohit" <rohit.seth@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:39 -08:00
Larry Finger bcf0f0d233 [PATCH] fix cpu frequency detection in arch/i386/kernel/timers/timer_tsc.c::recalibrate_cpu_khz()
When we re-calibrate the frequency, it is likely that an interrupt (as for
example the main system clock) will be triggered by the system.  Therefore
the calibration may not be accurate.  This will also provide a fix to bug
#5266.

Many thanks to Larry Finger for helping resolving this issue.

Signed-off-by: Bruno Ducrot <ducrot@poupinou.org>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:39 -08:00
Jordan Crouse 3841b0a173 [PATCH] APM Screen Blanking fix
- Fix screen blanking on BIOSes that return APM_NOT_ENGAGED when APM enabled
  screen blanking is not turned on.

  The original code only tried to set the state on device 0x100, and then
  0x1FF, and I added 0x101 to the mix too.

- Clean up logic in apm_console_blank().

- Prevent the error message from printing out twice.

Cc: Jordan Crouse <jordan.crouse@amd.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:39 -08:00
Jordan Crouse f90b811603 [PATCH] Base support for AMD Geode GX/LX processors
Provide basic support for the AMD Geode GX and LX processors.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:38 -08:00
Daniel Marjamaki 6b7f430ee0 [PATCH] arch/i386/kernel/cpuid.c: unused variable
Removed the unused variable "rv".

Signed-off-by: Daniel Marjamaki <daniel.marjamaki@comhem.se>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:38 -08:00
Daniel Marjamaki 6926d570b6 [PATCH] arch/i386/kernel/msr.c: removed unused variable
Removed the unused variable "rv".

Signed-off-by: Daniel Marjamaki <daniel.marjamaki@comhem.se>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:38 -08:00
Dave Jones e31b88ba49 [PATCH] x86: missing printk newline in apic boot option parser
Missing newline in printk.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:38 -08:00
Dave Jones f8af095d3a [PATCH] x86: change_page_attr() fix
The 'make rodata read-only' patch in -mm exposes a latent bug in the 32-bit
change_page_attr() function, which causes certain CPUs (Those with NX
basically) to reboot instantly after pages are marked read-only.

The same bug got fixed a while back on x86-64, but never got propagated to
i386.

Stuart Hayes from Dell also picked up on this last June, but it never got
fixed, as the only thing affected by it aparently was the nvidia driver.

Blatantly stealing description from his post..

"It doesn't appear to be fixed (in the i386 arch).  The
 change_page_attr()/split_large_page() code will still still set all the
 4K PTEs to PAGE_KERNEL (setting the _PAGE_NX bit) when a large page
 needs to be split.

 This wouldn't be a problem for the bulk of the kernel memory, but there
 are pages in the lower 4MB of memory that's free, and are part of large
 executable pages that also contain kernel code.  If change_page_attr()
 is called on these, it will set the _PAGE_NX bit on the whole 2MB region
 that was covered by the large page, causing a large chunk of kernel code
 to be non-executable."

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Dave Jones <davej@redhat.com>
Cc: <Stuart_Hayes@Dell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:38 -08:00
Ashok Raj e72c8585e0 [PATCH] make bigsmp the default mode if CONFIG_HOTPLUG_CPU
If we are using hotplug enabled kernel, then make bigsmp the default mode.

Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:37 -08:00
Andy Whitcroft 215c3409ee [PATCH] i386 sparsemem for single node systems
Allow SPARSEMEM to be enabled on non-numa x86 systems.  This is made
dependant on EXPERIMENTAL also being set.  When an in-tree user (such as
simulated numa) exists it should be made dependant on that.

The plan is to have no options and no selector as normal when
!EXPERIMENTAL.  When EXPERIMENTAL we enable the FLATMEM and SPARSEMEM
options for X86_PC whilst maintaining DISCONTIGMEM and SPARSEMEM for NUMA.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:37 -08:00
Arjan van de Ven bb152f5312 [PATCH] x86/x86_64: mark rodata section read-only: make some datastructures const
Mark some key kernel datastructures readonly.  This patch was previously
posted on Jun 28th but was back then not merged because nothing was enforcing
rodata anyway..  well that changed now :)

Patch by Christoph Lameter <christoph@lameter.com> and Dave Jones
<davej@redhat.com>

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:36 -08:00
Arjan van de Ven 67df197b1a [PATCH] x86/x86_64: mark rodata section read-only: x86-64 support
x86-64 specific parts to make the .rodata section read only

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:36 -08:00
Arjan van de Ven c728252c7a [PATCH] x86/x86_64: mark rodata section read only: generic x86-64 bugfix
Bug fix required for the .rodata work on x86-64:

when change_page_attr() and friends need to break up a 2Mb page into 4Kb
pages, it always set the NX bit on the PMD, which causes the cpu to consider
the entire 2Mb region to be NX regardless of the actual PTE perms.  This is
fine in general, with one big exception: the 2Mb page that covers the last
part of the kernel .text!  The fix is to not invent a new permission for the
new PMD entry, but to just inherit the existing one minus the PSE bit.

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:36 -08:00
Arjan van de Ven 63aaf3086b [PATCH] x86/x86_64: mark rodata section read only: x86 parts
x86 specific parts to make the .rodata section read only

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:36 -08:00
Zachary Amsden 2684927c6b [PATCH] x86: Deprecate useless bug
Remove the "temporary debugging check" which has managed to live for quite
some time, and is clearly unneeded.  The mm can never be live at this point,
so clearly checking the LDT in the mm->context is redundant as well.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Cc: "Seth, Rohit" <rohit.seth@intel.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:35 -08:00
Zachary Amsden 92f17f0171 [PATCH] x86: Apm is on cpu zero only
APM BIOS code has a protective wrapper that runs it only on CPU zero.  Thus,
no need to set APM BIOS segments in the GDT for other CPUs.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Acked-by: "Seth, Rohit" <rohit.seth@intel.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:35 -08:00
Zachary Amsden 2891dcdc45 [PATCH] x86: Stop deleting nt
Stop deleting NT bit from EFLAGS.  See arch/i386/kernel/head.S line 223, which
does something even better.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Cc: "Seth, Rohit" <rohit.seth@intel.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:35 -08:00
Zachary Amsden e6a9918c96 [PATCH] x86: Fixed pnp bios limits
PnP BIOS data, code, and 32-bit entry segments all have fixed limits as well;
set them in the GDT rather than adding more code.  It would be nice to add
these fixups to the boot GDT rather than setting the GDT for each CPU; perhaps
I can wiggle this in later, but getting it in before the subsys init looks
tricky.

Also, make some progress on deprecating the ugly Q_SET_SEL macros.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Cc: "Seth, Rohit" <rohit.seth@intel.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:35 -08:00
Zachary Amsden 5fe9fe3c6f [PATCH] x86: Pnp byte granularity
The one remaining caller of set_limit, the PnP BIOS code, calls into the PnP
BIOS, passing kernel parameters in and out.  These parameteres may be passed
from arbitrary kernel virtual memory, so they deserve strict protection to
stop a bad BIOS from smashing beyond the object size.

Unfortunately, the use of set_limit was badly botching this by setting the
limit in terms of pages, when it really should have byte granularity.

When doing this, I discovered my BIOS had the buggy code during the "get
system device node" call:

 mov ax, es:[bx]

Which is harmless, but has a trivial workaround.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Cc: "Seth, Rohit" <rohit.seth@intel.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:35 -08:00
Zachary Amsden 99022c4695 [PATCH] x86: Apm seg in gdt
Since APM BIOS segment limits are now fixed, set them in head.S GDT and don't
use the complicated _set_limit() macro expansion.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Acked-by: "Seth, Rohit" <rohit.seth@intel.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:35 -08:00
Zachary Amsden 3012d2d209 [PATCH] x86: Always relax segments
APM BIOSes have many bugs regarding proper representation of the appropriate
segment limits for calling the BIOS.  By default, APM_RELAX_SEGMENTS is always
turned on to support running the APM BIOS on these buggy machines.  Keeping
64k limits poses very little danger to the kernel, because the pages where the
APM BIOS is located will always be in low physical memory BIOS areas, which
should already be marked reserved, and only buggy BIOSes would possibly
overstep the segment bounds with writes to data anyway.

Since forcing stricter limits breaks many machines and is not default
behavior, it seems reasonable to deprecate the older code which may cause APM
BIOS to fault.

If you really have a badly enough broken APM BIOS that you have to turn off
APM_RELAX_SEGMENTS, seems like the best recourse here would be to disable the
APM BIOS and / or not compile it into your kernel to begin with, and / or add
your system to the known bad list.

The reason I want to deprecate this code is there is underlying brokenness
with the set_limit macros, and getting rid of many of the call sites rather
than rewriting them seems to be the simplest and most correct course of
action.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Acked-by: "Seth, Rohit" <rohit.seth@intel.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:34 -08:00
Zachary Amsden ff6e8c0d5e [PATCH] x86: Cr4 is valid on some 486s
So some 486 processors do have CR4 register.  Allow them to present it in
register dumps by using the old fault technique rather than testing processor
family.

Thanks to Maciej for noticing this.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Cc: "Seth, Rohit" <rohit.seth@intel.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:34 -08:00
Jan Beulich eb05c3249a [PATCH] i386: fix bound check IDT gate
Other than apparently commonly assumed, the bound instruction does not
require the corresponding IDT entry to have DPL 3.

Acked-by: "Seth, Rohit" <rohit.seth@intel.com>
Acked-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:34 -08:00
Jan Beulich d43c6e8083 [PATCH] i386: move SIMD initialization
Move some code unrelated to any dealing with hardware bugs from i386's
bugs.h to a more logical place.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:34 -08:00
Jan Beulich e43d674f44 [PATCH] i386: don't blindly enable interrupts in die()
Rather than blindly re-enabling interrupts in die(), save their state
upon entry and then restore that state.

If the kernel is in really bad condition and faults with interrupts disabled,
re-enabling them in die() may cause even more trouble, implying more chances
of data corruption.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:34 -08:00
Zachary Amsden 7c4cb60e5b [PATCH] x86: GDT alignment fix
Make GDT page aligned and page padded to support running inside of a
hypervisor.  This prevents false sharing of the GDT page with other hot
data, which is not allowed in Xen, and causes performance problems in
VMware.

Rather than go back to the old method of statically allocating the GDT
(which wastes unneded space for non-present CPUs), the GDT for APs is
allocated dynamically.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Cc: "Seth, Rohit" <rohit.seth@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:33 -08:00
David Howells fef2b580eb [PATCH] frv: improve signal handling
The attached patch improves the signal handling:

 (1) It makes do_signal() static as it isn't called from anywhere outside of
     the arch code.

 (2) It removes the regs argument to all the static functions within that file,
     using __frame instead (which is the same thing held in a global register).

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:33 -08:00
David Howells 8efc0ab50e [PATCH] frv: fix signal handling
The attached patch makes FRV signal handling work properly:

 (1) After do_notify_resume() has been called, the work flags must be checked
     again (there may be another signal to deliver or the process might require
     rescheduling for instance).

 (2) After the signal frame is set up on the userspace stack, ptrace() should
     be given an opportunity to single-step into the signal handler.

 (3) The error state from setting up a signal frame should be passed back up
     the call chain.

 (4) The segfault handler shouldn't be preemptively reset in the arch if we
     fail to deliver a SEGV signal: force_sig() will take care of that.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:33 -08:00
David Howells 5c40f7f373 [PATCH] FRV: Implement futex operations for FRV
The attached patch implements futex operations for the FRV architecture. The
operations are applicable to both MMU and no-MMU modes; though the EFAULT
handling will be a little bit of wasted space on the latter.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:33 -08:00
Peter Korsgaard 683e2cc6dc [PATCH] ppc32: Re-add embed_config.c to ml300/ep405
Commit 3e9e7c1d0b (ppc32: cleanup AMCC PPC40x
eval boards to support U-Boot) broke the kernel for ML300 / EP405.

It still compiles as there's a weak definition of the function in
misc-embedded.c, but the kernel crashes as the bd_t fixup isn't performed.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:31 -08:00
Sylvain Munaut f80257a25d [PATCH] ppc32: Allows compilation of a MPC52xx kernel without PCI
Some custom cards might not need PCI, without this patch, compilation fails.

Signed-off-by: Roger Blofeld <blofeldus@yahoo.com>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:31 -08:00
Sylvain Munaut 041cb6241f [PATCH] ppc32: Fix MPC52xx PCI init in cas the bootloader didn't do it
We were counting on the bootloader to init some stuff, like get the bus out of
reset and enable accesses.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:31 -08:00
Sylvain Munaut db674ed450 [PATCH] ppc32: Fix MPC52xx configuration space access
This patch takes care of an errata of the MPC5200 by avoiding 32 bits access
in type 1 configuration accesses.  All others accesses are still 32 bits wide.
 It also adds some mb() since the simple out_be(...) are not sufficient in
this case.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:31 -08:00
Sylvain Munaut dbeb198d93 [PATCH] ppc32: Remove __init qualifier from mpc52xx pci resources fixups
The mpc52xx_pci_fixup_resources is not only called at init but also when there
is a pci hotplug like when a cardbus card is plugged in.  So that function is
needed after init too.

Thanks to Asier Llano Palacios for reporting this.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:31 -08:00
Sylvain Munaut 4aa7c80193 [PATCH] ppc32: Fix static IO mapping for Freescale MPC52xx
The current iomapping used MBAR_SIZE for the size argument of
io_block_mapping, resulting in a call to setbat with a size argument of 64k
which is invalid.

This patch correct this and maps the whole 0xf0000000->0xffffffff range so
that devices on the local bus are also included in the BAT mapping.

Thanks to Bernhard Kuhn from Metrowerks for pointing this out.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:31 -08:00
Sylvain Munaut 7558824a8d [PATCH] ppc32: Remove useless file arch/ppc/platforms/mpc5200.c
That file is a left-over of the 'old' OCP model that should have been erased
during the change to platform model but I forgot it ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:30 -08:00
Otavio Salvador e13ac21981 [PATCH] arch/ppc/kernel/idle.c: don't declare cpu variable in non-SMP kernels
Disable declaration of cpu variable in default_idle function when
building non-SMP kernels.

Signed-off-by: Otavio Salvador <otavio@debian.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:30 -08:00
Eugene Surovegin fa57f9c2b8 [PATCH] ppc32: remove "jumbo" member from ocp_func_emac_data
Remove the not needed anymore "jumbo" member from ocp_func_emac_data.
Jumbo frame support is handled by PPC4xx EMAC driver internally now.

Signed-off-by: Eugene Surovegin <ebs@ebshome.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:30 -08:00
Greg Kroah-Hartman 2b48716d1d [PATCH] I2C: Remove .owner setting from i2c_driver as it's no longer needed
Now that i2c_add_driver() doesn't need the module owner to be set by
hand, we can delete it from the drivers.  This patch catches all of the
drivers that I found in the current tree (if a driver sets the .owner by
hand, it's not a problem, just not needed.)

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Jean Delvare <khali@linux-fr.org>
2006-01-05 22:16:25 -08:00
Jean Delvare b33a665dba [PATCH] i2c: Drop i2c_driver.{owner,name}, 10 of 11
We should use the i2c_driver.driver's .name and .owner fields
instead of the i2c_driver's ones.

This patch updates the drivers for arm arch.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
CC: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-05 22:16:24 -08:00
Jean Delvare cde7859bda [PATCH] i2c: Rework client usage count, 2 of 3
Make I2C_CLIENT_ALLOW_USE the default for all i2c clients. It doesn't
hurt if the usage count is actually never used for any given driver,
and allows for nice code simplifications in i2c-core.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-05 22:16:22 -08:00
Jean Delvare 8a9947552d [PATCH] i2c: Drop i2c_driver.flags, 2 of 3
Just about every i2c chip driver sets the I2C_DF_NOTIFY flag, so we
can simply make it the default and drop the flag. If any driver really
doesn't want to be notified when i2c adapters are added, that driver
can simply omit to set .attach_adapter. This approach is also more
robust as it prevents accidental NULL pointer dereferences.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-05 22:16:21 -08:00
Chuck Ebbert 9f155b9802 [PATCH] i386: PTRACE_POKEUSR: allow changing RF bit in EFLAGS register.
Setting RF (resume flag) allows a debugger to resume execution after a
code breakpoint without tripping the breakpoint again.  It is reset by
the CPU after execution of one instruction.

Requested by Stephane Eranian:
  "I am trying to the user HW debug registers on i386 and I am running
   into a problem with ptrace() not allowing access to EFLAGS_RF for
   POKEUSER (see FLAG_MASK).  [ ...  ] It avoids the need to remove the
   breakpoint, single step, and reinstall.  The equivalent functionality
   exists on IA-64 and is allowed by ptrace()"

Cc: Stephane Eranian <eranian@hpl.hp.com>
Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-05 20:50:51 -08:00
Tony Luck 38c0b2c2aa [IA64] Fix compile warnings in setup.c
arch/ia64/kernel/setup.c: In function `show_cpuinfo':
arch/ia64/kernel/setup.c:576: warning: long unsigned int format, different type arg (arg 12)
arch/ia64/kernel/setup.c:576: warning: long unsigned int format, different type arg (arg 13)

Introduced by 95235ca2c2

Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-01-05 13:30:52 -08:00
Jared Hulbert 5b2e98cdf3 [ARM] 3206/1: Modifications to the bus arbiter controller for the Intel PXA27x
Patch from Jared Hulbert

The following patch changes the bus arbiter controller settings
for the Intel PXA27x Application Processor Family.  Up to 5%
better video performance.  It parks the bus on the core while not
in use and sets the arbitration for other bus items.  The patch
only applies changes to the Intel Mainstone development platform.

This patch is not compatible with preproduction Intel PXA27x
silicon.

This patch is based on the Intel Linux Preview Kit released to the
public on 25 Feb. 2005 found at
ftp://ftp.arm.linux.org.uk/pub/linux/arm/people/xscale/mainstone/02-25-2005/.

Signed-off-by: Justin A Treon <justin_treon@yahoo.com>
Signed-off-by: Jared Hulbert <jaredeh@gmail.com>
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-05 21:12:26 +00:00
Deepak Saxena 54e269ead6 [ARM] 3226/1: IXP4xx runtime expansion bus window size configuration
Patch from Deepak Saxena

The expansion bus on the IXP46x NPU can be configured for either 32MiB or
16MiB windows and changing the configuration causes the base address for
each chip select for each region to change. Because of this, we cannot
hardcode the physical base as we currently do. This patch checks the
expansion bus configuration registers at runtime to determine the
appropriate window size. Note that this requires that the bootloader
already configured the device sizes appropriately, but I feel that is
valid assumption to make as the bootloader must configure and access
the flash window, the output display (LCD, LEDs, etc) window, and
other expansion bus devices.

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-05 20:59:29 +00:00
Dan Williams 2b9ac7c15c [ARM] 3217/1: iop331 uarts as platform devices
Patch from Dan Williams

Convert old-style serial devices to platform devices so that printk's are visible during the boot process.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-05 20:53:02 +00:00
Sascha Hauer 6a2273d6fc [ARM] 3231/1: mx1ads board support cleanup
Patch from Sascha Hauer

- remove unnecessary mappings
- rename mx1ads_device to cs89x0_device, because
  that's what it is
- fix io/irq resource for cs89x0 device

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-05 20:44:58 +00:00
Richard Purdie 945b957972 [ARM] 3230/1: Sharp Scoop: Fix Shared Power Control Issues
Patch from Richard Purdie

The SL-Cxx00 devices have a power control register in SCOOP that is
shared by both CF and MMC/SD card slots. The CF reset code was resetting
this register leading to various lockups as the MMC power was suddenly
lost. This patch handles the CPR register in a more sensitive manner.

It also removes some unneeded collie specific calls as the reset code
handles this.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-05 20:44:57 +00:00
Richard Purdie 53b7c2b243 [ARM] 3229/1: Remove uneeded ARM apm dependency on PM_LEGACY
Patch from Richard Purdie

ARM doesn't use ACPI so ARM's apm implementation has no need to depend
on PM_LEGACY. This patch removes that dependency.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-05 20:44:55 +00:00
Richard Purdie b7557de41a [ARM] 3228/1: SharpSL: Move PM code to arch/arm/common
Patch from Richard Purdie

This patch moves a large chunk of the sharpsl_pm driver to
arch/arm/common so that it can be reused on other devices such as the
SL-5500 (collie). It also abstracts some functions from the core into
the machine and platform specific parts of the driver to aid reuse.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-05 20:44:55 +00:00
Richard Purdie 3125c68d70 [ARM] 3227/1: Spitz: Add pxa27x OHCI platform specific code
Patch from Richard Purdie

Add platform code to enable the ohci device on the pxa27x based
Sharp Zaurus Cxx00 devices.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-05 20:44:52 +00:00
Tony Luck 5c3eee7912 Auto-update from upstream 2006-01-05 08:52:11 -08:00
Linus Torvalds db9edfd7e3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
Trivial manual merge fixup for usb_find_interface clashes.
2006-01-04 18:44:12 -08:00
Chuck Ebbert 631b034724 [PATCH] i386: "invalid operand" -> "invalid opcode"
According to the manual, INT 6 is "invalid opcode", not "invalid operand".

Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-04 16:47:42 -08:00
Linus Torvalds 25c862cc9e Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild 2006-01-04 16:36:52 -08:00
Linus Torvalds 52347f4e81 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2006-01-04 16:34:57 -08:00
Linus Torvalds c6c88bbde4 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 2006-01-04 16:25:44 -08:00
Linus Torvalds 0356dbb7fe Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq 2006-01-04 16:21:26 -08:00
Linus Torvalds e28cc71572 Relax the rw_verify_area() error checking.
In particular, allow over-large read- or write-requests to be downgraded
to a more reasonable range, rather than considering them outright errors.

We want to protect lower layers from (the sadly all too common) overflow
conditions, but prefer to do so by chopping the requests up, rather than
just refusing them outright.

Cc: Peter Anvin <hpa@zytor.com>
Cc: Ulrich Drepper <drepper@redhat.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Al Viro <viro@ftp.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-04 16:20:40 -08:00
Paul Jackson 6d20b035de [PATCH] driver kill hotplug word from sn and others fix
The first of these changes s/hotplug/uevent/ was needed to
compile sn2_defconfig (ia64/sn).  The other three files
changed are blind changes of all remaining bus_type.hotplug
references I could find to bus_type.uevent.

This patch attempts to finish similar changes made in the
gregkh-driver-kill-hotplug-word-from-driver-core Nov 22 patch.

Signed-off-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 16:18:08 -08:00
Kay Sievers 312c004d36 [PATCH] driver core: replace "hotplug" by "uevent"
Leave the overloaded "hotplug" word to susbsystems which are handling
real devices. The driver core does not "plug" anything, it just exports
the state to userspace and generates events.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 16:18:08 -08:00
Richard Purdie 81f280e22f [PATCH] USB: pxa27x OHCI - Separate platform code from main driver
To allow multiple platforms to use the PXA27x OHCI driver, the platform
code needs to be moved into the board specific files in
arch/arm/mach-pxa. This patch does this for mainstone and adds
preliminary hooks to allow other boards to use the driver.

This has been compile tested for mainstone and successfully run on Spitz
(Sharp Zaurus SL-C3000) with the addition of an appropriate board
support file.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Nicolas Pitre <nico@cam.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:48:28 -08:00
Deepak Saxena b1ad3a57d3 [ARM] 3221/1: Update IXP4xx defconfig
Patch from Deepak Saxena

Add NAS 100d to machine build list and update to new 2.6.15 options.

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>

---
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-04 17:17:14 +00:00
Rod Whitby 313cbb5519 [ARM] 3218/1: PAGE_SHIFT undeclared in arch-ixp4xx/memory.h (adjust_zones moved out of line)
Patch from Rod Whitby

PAGE_SHIFT is undeclared in include/asm-arm/arch-ixp4xx/memory.h, identified by the following kernel compilation error:

CC [M] sound/core/memory.o
In file included from include/asm/memory.h:27,
from include/asm/io.h:28,
from sound/core/memory.c:24:
include/asm/arch/memory.h: In function `__arch_adjust_zones':
include/asm/arch/memory.h:28: error: `PAGE_SHIFT' undeclared (first use
in this function)

This patch replaces my previous attempt at fixing this problem (Patch 3214/1) and is based on the following feedback:

Russell King wrote:
> The error you see came up on SA1100.  The best solution was to move
> the __arch_adjust_zones() function out of line.  I suggest ixp4xx
> does the same.

I have moved the function out of line into arch/arm/mach-ixp4xx/common-pci.c as suggested.

Signed-off-by: Rod Whitby <rod@whitby.id.au>
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-04 17:17:13 +00:00
Deepak Saxena 8d27e6992b [ARM] 3220/1: Remove gpio_isr_line_clear() from NAS 100d
Patch from Deepak Saxena

This patch removes referneces to gpio_isr_line_clear() from the
NAS 100d platform implementation.

Depends on 3192/1 and 3215/1

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-04 17:17:12 +00:00
Rod Whitby 3145d8a6cc [ARM] 3215/1: Iomega NAS 100d (MACH_NAS100D) machine support
Patch from Rod Whitby

This patch adds support for a new arm/ixp4xx machine - the Iomega NAS 100d network attached storage product.  The NAS100D is a consumer device containing a 266MHz Intel IXP420 processor, 16MB of flash, 64MB of RAM, a 160Gb internal IDE hard disk, and 802.11b/g wireless on an Atheros mini-PCI card.

Work on porting the latest 2.6.x kernel to this device is being done by
the NSLU2-Linux project (the same team who maintains the port to the
Linksys NSLU2 device).  In particular, the majority of this patch was
authored by Alessandro Zummo, based on the work done for MACH_NSLU2
support by the NSLU2-Linux core team of developers.

MACH_NAS100D (as implemented by this patch) can be enabled in jumbo
ixp4xx kernels without any affect on the other machines supported by
that kernel.

This patch applies cleanly against 2.6.15-rc7 and should be trivial to
apply to later kernel versions. It does not depend upon any other
patches.

Modified files (and number of lines inserted):
 arch/arm/mach-ixp4xx/Kconfig           |    8
 arch/arm/mach-ixp4xx/Makefile          |    1
 include/asm-arm/arch-ixp4xx/hardware.h |    1
 include/asm-arm/arch-ixp4xx/irqs.h     |    9
 include/asm-arm/arch-ixp4xx/nas100d.h  |   75
 arch/arm/mach-ixp4xx/nas100d-pci.c     |   77
 arch/arm/mach-ixp4xx/nas100d-power.c   |   69
 arch/arm/mach-ixp4xx/nas100d-setup.c   |  133

-- Rod Whitby (NSLU2-Linux project lead)

Signed-off-by: Rod Whitby <rod@whitby.id.au>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-04 17:17:11 +00:00
Deepak Saxena f7e8bbb820 [ARM] 3192/1: Remove gpio_isr_line_clear() API from IXP4xx
Patch from Deepak Saxena

Other than interrupt masking purposes, this API is only used when
configuring interrupt lines and this patch moves that functionality
directly into the ixp4xx_set_irq_type() implementation as board level
PCI code should not need to worry about those details.

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-04 17:17:10 +00:00
Russell King b3a962455b [ARM] Remove SA1100 PM prepare/finish ops
These are empty, unnecessary functions, so remove them.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-04 15:55:41 +00:00
Russell King d7b4a75677 [ARM] Move DMA exports to be next to each function
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-04 15:52:45 +00:00
Russell King 95ba9fb06b [ARM] Remove definition of MAX_DMA_CHANNELS to zero
Since we now only build arch/arm/kernel/dma.c on machine types
which set ISA_DMA_API, we don't need to define MAX_DMA_CHANNELS
to 0 to indicate this - this definition becomes superfluous.
Remove it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-04 15:51:51 +00:00
Russell King 065909b915 [ARM] Refine selection of ISA_DMA_API and generic dma.c code
ISA_DMA_API tells the rest of the kernel if the ISA DMA API is
available.  Select this symbol only on machine types which make
use of the ISA DMA API.

Make building of arch/arm/kernel/dma.c depend on this symbol -
if a machine does not support the ISA DMA API, it's pointless
building this file.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-04 15:44:16 +00:00
Russell King 6842b92992 [ARM] Use core_initcall() to initialise ARM DMA
There's no need to have DMA initialised at the same time as
interrupts.  Move it to a core_initcall().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-04 15:17:08 +00:00