1
0
Fork 0
Commit Graph

79 Commits (918f7c2d5095e4067eb77a54425fd6e1bab5787f)

Author SHA1 Message Date
Thomas Gleixner bd0b9ac405 genirq: Remove irq argument from irq flow handlers
Most interrupt flow handlers do not use the irq argument. Those few
which use it can retrieve the irq number from the irq descriptor.

Remove the argument.

Search and replace was done with coccinelle and some extra helper
scripts around it. Thanks to Julia for her help!

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
2015-09-16 15:47:51 +02:00
Fabian Frederick f296401b04 m68k/amiga: Convert printk(foo to pr_foo()
-no level printk converted to pr_warn/pr_info
-fixed a small identation problem

This is untested

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2014-05-28 10:11:54 +02:00
Thomas Gleixner 14b4319a44 m68k: amiga: Add linux/irq.h to make it compile again
The removal of linux/irq.h from kernel_stat.h causes 

 arch/m68k/amiga/cia.c:171: error: 'handle_simple_irq' undeclared

Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2014-03-19 11:28:14 +01:00
Geert Uytterhoeven 8a09cec25f m68k/amiga,atari: Fix specifying multiple debug= parameters
Since commit d6713b4091 ("m68k: early
parameter support"), the user can specify multiple debug consoles using the
"debug=" kernel command line parameter.
However, as there's only a single struct console object, which is reused,
it would actually register the same console object multiple times, causing
the following warning:

WARNING: CPU: 0 PID: 0 at kernel/printk/printk.c:2233 register_console+0x36/
console 'debug0' already registered

Make sure to register the console object only once, to avoid the warning.

Note that still only one console (the one corresponding to the last
"debug=" parameter) will be active at the same time, as the .write() method
of the already registered console object is overwritten by a subsequent
"debug=" parameter.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-12-08 11:03:21 +01:00
Geert Uytterhoeven 50190edb2a m68k/amiga: Provide mach_random_get_entropy()
Use the beam position registers, which provide at least 17 bits of data
changing at 1.79 MHz.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-11-26 11:09:25 +01:00
Geert Uytterhoeven abe48101c1 m68k/UAPI: Use proper types (endianness/size) in <asm/bootinfo*.h>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-11-26 11:09:21 +01:00
Geert Uytterhoeven 4c3c522bce m68k/UAPI: Disintegrate arch/m68k/include/asm/bootinfo.h
Export the bootinfo definitions that are used by bootstrap loaders, and
split them up in generic and platform-specific parts.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-11-26 11:09:15 +01:00
Geert Uytterhoeven bd9ba8f40e zorro/UAPI: Use proper types (endianness/size) in <linux/zorro.h>
Fix member definitions for non-native userspace handling:
  - All multi-byte values are big-endian, hence use __be*,
  - All pointers are 32-bit pointers under AmigaOS, but unused (except for
    cd_BoardAddr) under Linux, hence use __be32.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-11-26 11:09:09 +01:00
Geert Uytterhoeven 6112ea0862 zorro: ZTWO_VADDR() should return "void __iomem *"
ZTWO_VADDR() converts from physical to virtual I/O addresses, so it should
return "void __iomem *" instead of "unsigned long".

This allows to drop several casts, but requires adding a few casts to
accomodate legacy driver frameworks that store "unsigned long" I/O
addresses.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-11-26 11:09:07 +01:00
Geert Uytterhoeven c293738e6d zorro: Do not allocate zorro_autocon[] statically
Currently the array of Zorro devices is allocated statically, wasting
up to 4.5 KiB when running an Amiga or multi-platform kernel on a machine
with no or a handful of Zorro expansion cards. Convert it to conditional
dynamic memory allocation to fix this.

amiga_parse_bootinfo() still needs to store some information about the
detected Zorro devices, at a time even the bootmem allocator is not yet
available.  This is now handled using a much smaller array (typically less
than 0.5 KiB), which is __initdata and thus freed later.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-11-26 11:09:03 +01:00
Geert Uytterhoeven a4df02a217 m68k: Mark functions only called from setup_arch() __init
Some functions that are only called (indirectly) from setup_arch() lack
__init annotations.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-11-26 11:08:54 +01:00
Rusty Russell 8c6ffba0ed PTR_RET is now PTR_ERR_OR_ZERO(): Replace most.
Sweep of the simple cases.

Cc: netdev@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-07-15 11:25:01 +09:30
Stephen Warren c8d5ba1891 m68k: set arch_gettimeoffset directly
remove m68k's mach_gettimeoffset function pointer, and instead directly
set the arch_gettimeoffset function pointer. This requires multiplying
all function results by 1000, since the removed m68k_gettimeoffset() did
this. Also, s/unsigned long/u32/ just to make the function prototypes
exactly match that of arch_gettimeoffset.

Cc: Joshua Thompson <funaho@jurai.org>
Cc: Sam Creasey <sammy@sammy.net>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2012-12-24 09:36:34 -07:00
Thomas Meyer 27b05e4d20 m68k/amiga: Use PTR_RET rather than if(IS_ERR(...)) + PTR_ERR
The semantic patch that makes this change is available
in scripts/coccinelle/api/ptr_ret.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2012-08-18 15:15:57 +02:00
Geert Uytterhoeven e2b56288af m68k/amiga: Use arch_initcall() for registering platform devices
module_init() maps to device_initcall(), opening the possibility of
race conditions between platform_driver_probe() and registering platform
devices.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2012-04-22 20:16:48 +02:00
Geert Uytterhoeven eeed227966 m68k/amiga: Add error checks when registering platform devices
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2012-04-22 20:16:48 +02:00
Geert Uytterhoeven 943ce30806 m68k/amiga: Mark z_dev_present() __init
It's called from amiga_init_devices() only, which is __init.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2012-04-22 20:16:48 +02:00
David Howells 803f69144f Disintegrate asm/system.h for M68K
Disintegrate asm/system.h for M68K.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Greg Ungerer <gerg@uclinux.org>
cc: linux-m68k@lists.linux-m68k.org
2012-03-28 18:30:02 +01:00
Joe Perches ff2d8b19a3 treewide: convert uses of ATTRIB_NORETURN to __noreturn
Use the more commonly used __noreturn instead of ATTRIB_NORETURN.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-12 20:13:03 -08:00
Joe Perches 9402c95f34 treewide: remove useless NORET_TYPE macro and uses
It's a very old and now unused prototype marking so just delete it.

Neaten panic pointer argument style to keep checkpatch quiet.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-12 20:13:03 -08:00
Geert Uytterhoeven d890d73995 m68k/irq: Remove obsolete m68k irq framework
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-11-08 22:35:52 +01:00
Geert Uytterhoeven fb1b646aa3 m68k/amiga: Optimize interrupts using chain handlers
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-11-08 22:35:50 +01:00
Geert Uytterhoeven 978ef7e6d0 m68k/amiga: Convert Amiga to genirq
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-11-08 22:35:50 +01:00
Geert Uytterhoeven 92b1bd5f1a m68k/amiga: Refactor amiints.c
- Remove filename in comments,
  - Reorder functions so we no longer need forward declarations.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-11-08 22:35:49 +01:00
Geert Uytterhoeven 5a2394534b m68k/irq: Remove obsolete IRQ_FLG_* users
The m68k core irq code stopped honoring these flags during the irq
restructuring in 2006.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-11-08 22:35:48 +01:00
Geert Uytterhoeven 1425df87c2 m68k/irq: Rename {,__}m68k_handle_int()
- Rename m68k_handle_int() to generic_handle_irq(), and drop the unneeded
    asmlinkage,
  - Rename __m68k_handle_int() to do_IRQ().

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-11-08 22:35:48 +01:00
Geert Uytterhoeven edb347256c m68k/irq: Add m68k_setup_irq_controller()
This is a wrapper around m68k_setup_irq_chip() that discards its dummy
second parameter, to ease the future transition to genirq.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-11-08 22:35:48 +01:00
Geert Uytterhoeven e8abf5e73c m68k/irq: Switch irq_chip methods to "struct irq_data *data"
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
2011-11-08 22:35:47 +01:00
Geert Uytterhoeven c288bf2533 m68k/irq: Rename irq_controller to irq_chip
Make it more similar to the genirq version:
  - Remove lock (unused as we don't do SMP anyway),
  - Prepend methods with irq_,
  - Make irq_startup() return unsigned int.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
2011-11-08 22:35:47 +01:00
Geert Uytterhoeven b7785e9543 m68k/amiga: Chip RAM - Use lookup_resource()
Replace a custom implementation (which doesn't lock the resource tree) by a
call to lookup_resource()

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-07-30 21:21:39 +02:00
Geert Uytterhoeven 1dad6c7bd7 m68k/amiga: Chip RAM - Offset resource end by CHIP_PHYSADDR
Technically, the end of Chip RAM should be offset by CHIP_PHYSADDR (which is
zero).

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-07-30 21:21:38 +02:00
Geert Uytterhoeven cb4f9988f8 m68k/amiga: Chip RAM - Use resource_size() to fix off-by-one error
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-07-30 21:21:38 +02:00
Geert Uytterhoeven cab49bc95d m68k/amiga: Chip RAM - Change chipavail to an atomic_t
While the core resource handling code is safe, our global counter must
still be protected against concurrent modifications.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-07-30 21:21:38 +02:00
Geert Uytterhoeven 3a17bfa4fb m68k/amiga: Chip RAM - Always allocate from the start of memory
As of commit 5df1abdbd3 ('m68k/amiga: Fix
"debug=mem"'), "debug=mem" no longer uses amiga_chip_alloc_res(), so we
can remove the hack to prefer memory at the safe end.

This allows to simplify the code and make amiga_chip_alloc() just call
amiga_chip_alloc_res() internally.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-07-30 21:21:38 +02:00
Geert Uytterhoeven b4f6f45302 m68k/amiga: Chip RAM - Convert from printk() to pr_*()
and fix a few formattings:
  - resource sizes are now resource_size_t, use %pR to make it future proof,
  - use %lu for unsigned long.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-07-30 21:21:38 +02:00
Geert Uytterhoeven 5be3246306 m68k/amiga: Chip RAM - Use tabs for indentation
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-07-30 21:21:37 +02:00
Geert Uytterhoeven f369e37816 m68k/amiga: Reclaim Chip RAM for PPC exception handlers
On m68k, it doesn't make sense to reserve memory for the PPC exception
handlers, and APUS support is dead.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-03-16 19:10:40 +01:00
Geert Uytterhoeven 5df1abdbd3 m68k/amiga: Fix "debug=mem"
`debug=mem' on Amiga has been broken for a while.
early_param() processing is done very/too early, i.e. before
amiga_identify() / amiga_chip_init(), causing amiga_savekmsg_setup() not
to find any Chip RAM.

As we don't plan to free this memory anyway, just steal it from the initial
Chip RAM memory block instead.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-01-23 11:24:42 +01:00
Geert Uytterhoeven 0779c862e4 m68k: amiga - RTC platform device conversion
The A2000 TOD is an Oki MSM6242B, while the A3000 TOD is a Ricoh RP5C01.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2010-05-26 19:51:10 +02:00
Geert Uytterhoeven 6f8221c26b m68k: amiga - Parallel port platform device conversion
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2010-05-26 19:51:09 +02:00
Geert Uytterhoeven 826e8c8c80 m68k: amiga - Serial port platform device conversion
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2010-05-26 19:51:09 +02:00
Geert Uytterhoeven 314c926f64 m68k: amiga - Mouse platform device conversion
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2010-05-26 19:51:09 +02:00
Geert Uytterhoeven 5121c7172d m68k: amiga - Keyboard platform device conversion
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2010-05-26 19:51:09 +02:00
Geert Uytterhoeven 9aed230265 m68k: amiga - Amiga Gayle IDE platform device conversion
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2010-05-26 19:51:09 +02:00
Geert Uytterhoeven a24a6b2225 m68k: amiga - A4000T SCSI platform device conversion
Acked-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2010-05-26 19:51:09 +02:00
Geert Uytterhoeven c2a24a4ca1 m68k: amiga - A3000 SCSI platform device conversion
Acked-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2010-05-26 19:51:08 +02:00
Geert Uytterhoeven 92183b346f m68k: amiga - Floppy platform device conversion
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2010-05-17 21:37:45 +02:00
Geert Uytterhoeven ff2db7c5ab m68k: amiga - Sound platform device conversion
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2010-05-17 21:37:44 +02:00
Geert Uytterhoeven fa6688e1c7 m68k: amiga - Frame buffer platform device conversion
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2010-05-17 21:37:43 +02:00
Geert Uytterhoeven 0d305464ae m68k: amiga - Zorro host bridge platform device conversion
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2010-05-17 21:37:42 +02:00