summaryrefslogtreecommitdiffstats
path: root/arch/m68k
AgeCommit message (Collapse)Author
2013-03-27signal: Define __ARCH_HAS_SA_RESTORER so we know whether to clear sa_restorerBen Hutchings
flush_signal_handlers() needs to know whether sigaction::sa_restorer is defined, not whether SA_RESTORER is defined. Define the __ARCH_HAS_SA_RESTORER macro to indicate this. Vaguely based on upstream commit 574c4866e33d 'consolidate kernel-side struct sigaction declarations'. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Cc: Al Viro <viro@zeniv.linux.org.uk>
2012-12-06m68k: fix sigset_t accessor functionsAndreas Schwab
commit 34fa78b59c52d1db3513db4c1a999db26b2e9ac2 upstream. The sigaddset/sigdelset/sigismember functions that are implemented with bitfield insn cannot allow the sigset argument to be placed in a data register since the sigset is wider than 32 bits. Remove the "d" constraint from the asm statements. The effect of the bug is that sending RT signals does not work, the signal number is truncated modulo 32. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2012-08-10m68k: Make sys_atomic_cmpxchg_32 work on classic m68kAndreas Schwab
commit 9e2760d18b3cf179534bbc27692c84879c61b97c upstream. User space access must always go through uaccess accessors, since on classic m68k user space and kernel space are completely separate. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Tested-by: Thorsten Glaser <tg@debian.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2012-08-10m68k: Correct the Atari ALLOWINT definitionMikael Pettersson
commit c663600584a596b5e66258cc10716fb781a5c2c9 upstream. Booting a 3.2, 3.3, or 3.4-rc4 kernel on an Atari using the `nfeth' ethernet device triggers a WARN_ONCE() in generic irq handling code on the first irq for that device: WARNING: at kernel/irq/handle.c:146 handle_irq_event_percpu+0x134/0x142() irq 3 handler nfeth_interrupt+0x0/0x194 enabled interrupts Modules linked in: Call Trace: [<000299b2>] warn_slowpath_common+0x48/0x6a [<000299c0>] warn_slowpath_common+0x56/0x6a [<00029a4c>] warn_slowpath_fmt+0x2a/0x32 [<0005b34c>] handle_irq_event_percpu+0x134/0x142 [<0005b34c>] handle_irq_event_percpu+0x134/0x142 [<0000a584>] nfeth_interrupt+0x0/0x194 [<001ba0a8>] schedule_preempt_disabled+0x0/0xc [<0005b37a>] handle_irq_event+0x20/0x2c [<0005add4>] generic_handle_irq+0x2c/0x3a [<00002ab6>] do_IRQ+0x20/0x32 [<0000289e>] auto_irqhandler_fixup+0x4/0x6 [<00003144>] cpu_idle+0x22/0x2e [<001b8a78>] printk+0x0/0x18 [<0024d112>] start_kernel+0x37a/0x386 [<0003021d>] __do_proc_dointvec+0xb1/0x366 [<0003021d>] __do_proc_dointvec+0xb1/0x366 [<0024c31e>] _sinittext+0x31e/0x9c0 After invoking the irq's handler the kernel sees !irqs_disabled() and concludes that the handler erroneously enabled interrupts. However, debugging shows that !irqs_disabled() is true even before the handler is invoked, which indicates a problem in the platform code rather than the specific driver. The warning does not occur in 3.1 or older kernels. It turns out that the ALLOWINT definition for Atari is incorrect. The Atari definition of ALLOWINT is ~0x400, the stated purpose of that is to avoid taking HSYNC interrupts. irqs_disabled() returns true if the 3-bit ipl & 4 is non-zero. The nfeth interrupt runs at ipl 3 (it's autovector 3), but 3 & 4 is zero so irqs_disabled() is false, and the warning above is generated. When interrupts are explicitly disabled, ipl is set to 7. When they are enabled, ipl is masked with ALLOWINT. On Atari this will result in ipl = 3, which blocks interrupts at ipl 3 and below. So how come nfeth interrupts at ipl 3 are received at all? That's because ipl is reset to 2 by Atari-specific code in default_idle(), again with the stated purpose of blocking HSYNC interrupts. This discrepancy means that ipl 3 can remain blocked for longer than intended. Both default_idle() and falcon_hblhandler() identify HSYNC with ipl 2, and the "Atari ST/.../F030 Hardware Register Listing" agrees, but ALLOWINT is defined as if HSYNC was ipl 3. [As an experiment I modified default_idle() to reset ipl to 3, and as expected that resulted in all nfeth interrupts being blocked.] The fix is simple: define ALLOWINT as ~0x500 instead. This makes arch_local_irq_enable() consistent with default_idle(), and prevents the !irqs_disabled() problems for ipl 3 interrupts. Tested on Atari running in an Aranym VM. Signed-off-by: Mikael Pettersson <mikpe@it.uu.se> Tested-by: Michael Schmitz <schmitzmic@googlemail.com> (on Falcon/CT60) [Geert Uytterhoeven: This version applies to v3.2..v3.4.] Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2012-04-13m68k/mac: Add missing platform check before registering platform devicesGeert Uytterhoeven
commit 6cfeba53911d6d2f17ebbd1246893557d5ff5aeb upstream. On multi-platform kernels, the Mac platform devices should be registered when running on Mac only. Else it may crash later. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-03m68k: Fix assembler constraint to prevent overeager gcc optimisationAndreas Schwab
commit 2a3535069e33d8b416f406c159ce924427315303 upstream. Passing the address of a variable as an operand to an asm statement doesn't mark the value of this variable as used, so gcc may optimize its initialisation away. Fix this by using the "m" constraint instead. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2011-12-06m68k: Wire up process_vm_{read,write}vGeert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Greg Ungerer <gerg@uclinux.org>
2011-11-08m68k/mac: Remove mac_irq_{en,dis}able() wrappersFinn Thain
Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-11-08m68k/irq: Remove obsolete support for user vector interrupt fixupsGeert Uytterhoeven
It was used on Apollo only, before its conversion to genirq. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-11-08m68k/irq: Remove obsolete m68k irq frameworkGeert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-11-08m68k/q40: Convert Q40/Q60 to genirqGeert Uytterhoeven
q40_irq_handler() must be kept to translate ISA IRQs to the range 1-15. q40_probe_irq_o{ff,n}() become unused. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Richard Zidlicky <rz@linux-m68k.org>
2011-11-08m68k/sun3: Convert Sun3/3x to genirqGeert Uytterhoeven
Replace the custom irq handler that masks the irq and calls do_IRQ(), and the unmasking in the individual handlers, by handle_level_irq(). Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Sam Creasey <sammy@sammy.net>
2011-11-08m68k/sun3: Use the kstat_irqs_cpu() wrapperGeert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Sam Creasey <sammy@sammy.net>
2011-11-08m68k/apollo: Convert Apollo to genirqGeert Uytterhoeven
Replace the custom user vector interrupt handler that calls do_IRQ() and does an EOI by handle_fasteoi_irq(). Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Peter De Schrijver <p2@debian.org>
2011-11-08m68k/vme: Convert VME to genirqGeert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Richard Hirst <rhirst@parisc-linux.org>
2011-11-08m68k/hp300: Convert HP9000/300 and HP9000/400 to genirqGeert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Philip Blundell <philb@gnu.org>
2011-11-08m68k/mac: Optimize interrupts using chain handlersGeert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-11-08m68k/mac: Convert Mac to genirqGeert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-11-08m68k/amiga: Optimize interrupts using chain handlersGeert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-11-08m68k/amiga: Convert Amiga to genirqGeert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-11-08m68k/amiga: Refactor amiints.cGeert Uytterhoeven
- Remove filename in comments, - Reorder functions so we no longer need forward declarations. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-11-08m68k/atari: Remove code and comments about different irq typesGeert Uytterhoeven
This code was obsoleted during the irq restructuring in 2006. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-11-08m68k/atari: Convert Atari to genirqGeert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> [v1] Acked-by: Thomas Gleixner <tglx@linutronix.de>
2011-11-08m68k/irq: Add genirq supportGeert Uytterhoeven
Disabled on all platforms for now Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> [v1] Acked-by: Thomas Gleixner <tglx@linutronix.de>
2011-11-08m68k/irq: Remove obsolete IRQ_FLG_* usersGeert Uytterhoeven
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-08m68k/irq: Rename {,__}m68k_handle_int()Geert Uytterhoeven
- 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-08m68k/irq: Add m68k_setup_irq_controller()Geert Uytterhoeven
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-08m68k/irq: Extract irq_set_chip()Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Thomas Gleixner <tglx@linutronix.de>
2011-11-08m68k/irq: Rename setup_irq() to m68k_setup_irq() and make it staticGeert Uytterhoeven
It has nothing to do with the standard one in <linux/irq.h> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Thomas Gleixner <tglx@linutronix.de>
2011-11-08m68k/irq: Switch irq_chip methods to "struct irq_data *data"Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Thomas Gleixner <tglx@linutronix.de>
2011-11-08m68k/irq: Rename irq_node to irq_dataGeert Uytterhoeven
Make it more similar to the genirq version: - Add an irq field Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Thomas Gleixner <tglx@linutronix.de>
2011-11-08m68k/irq: Kill irq_node_t typedef, always use struct irq_nodeGeert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Thomas Gleixner <tglx@linutronix.de>
2011-11-08m68k/irq: Rename irq_controller to irq_chipGeert Uytterhoeven
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-08m68k: Revive lost DIO bus config optionGeert Uytterhoeven
commit 0e152d80507b75c00aac60f2ffc586360687cd52 ("m68k: reorganize Kconfig options to improve mmu/non-mmu selections") accidentally dropped the DIO bus config option. Re-add it to the "Bus support" section. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-11-08m68k: Revive lost ARAnyM config optionsGeert Uytterhoeven
commit 0e152d80507b75c00aac60f2ffc586360687cd52 ("m68k: reorganize Kconfig options to improve mmu/non-mmu selections") accidentally dropped the ARAnyM config options. Re-add them to the "Platform devices" section. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Greg Ungerer <gerg@uclinux.org>
2011-11-06Merge branch 'modsplit-Oct31_2011' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits) Revert "tracing: Include module.h in define_trace.h" irq: don't put module.h into irq.h for tracking irqgen modules. bluetooth: macroize two small inlines to avoid module.h ip_vs.h: fix implicit use of module_get/module_put from module.h nf_conntrack.h: fix up fallout from implicit moduleparam.h presence include: replace linux/module.h with "struct module" wherever possible include: convert various register fcns to macros to avoid include chaining crypto.h: remove unused crypto_tfm_alg_modname() inline uwb.h: fix implicit use of asm/page.h for PAGE_SIZE pm_runtime.h: explicitly requires notifier.h linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h miscdevice.h: fix up implicit use of lists and types stop_machine.h: fix implicit use of smp.h for smp_processor_id of: fix implicit use of errno.h in include/linux/of.h of_platform.h: delete needless include <linux/module.h> acpi: remove module.h include from platform/aclinux.h miscdevice.h: delete unnecessary inclusion of module.h device_cgroup.h: delete needless include <linux/module.h> net: sch_generic remove redundant use of <linux/module.h> net: inet_timewait_sock doesnt need <linux/module.h> ... Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in - drivers/media/dvb/frontends/dibx000_common.c - drivers/media/video/{mt9m111.c,ov6650.c} - drivers/mfd/ab3550-core.c - include/linux/dmaengine.h
2011-11-04Merge branch 'for-3.2/core' of git://git.kernel.dk/linux-blockLinus Torvalds
* 'for-3.2/core' of git://git.kernel.dk/linux-block: (29 commits) block: don't call blk_drain_queue() if elevator is not up blk-throttle: use queue_is_locked() instead of lockdep_is_held() blk-throttle: Take blkcg->lock while traversing blkcg->policy_list blk-throttle: Free up policy node associated with deleted rule block: warn if tag is greater than real_max_depth. block: make gendisk hold a reference to its queue blk-flush: move the queue kick into blk-flush: fix invalid BUG_ON in blk_insert_flush block: Remove the control of complete cpu from bio. block: fix a typo in the blk-cgroup.h file block: initialize the bounce pool if high memory may be added later block: fix request_queue lifetime handling by making blk_queue_cleanup() properly shutdown block: drop @tsk from attempt_plug_merge() and explain sync rules block: make get_request[_wait]() fail if queue is dead block: reorganize throtl_get_tg() and blk_throtl_bio() block: reorganize queue draining block: drop unnecessary blk_get/put_queue() in scsi_cmd_ioctl() and blk_get_tg() block: pass around REQ_* flags instead of broken down booleans during request alloc/free block: move blk_throtl prototypes to block/blk.h block: fix genhd refcounting in blkio_policy_parse_and_set() ... Fix up trivial conflicts due to "mddev_t" -> "struct mddev" conversion and making the request functions be of type "void" instead of "int" in - drivers/md/{faulty.c,linear.c,md.c,md.h,multipath.c,raid0.c,raid1.c,raid10.c,raid5.c} - drivers/staging/zram/zram_drv.c
2011-10-31m68k: Add export.h to the m68k specific files as requiredPaul Gortmaker
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-25Merge branch 'for-linus' of git://github.com/gregungerer/m68knommuLinus Torvalds
* 'for-linus' of git://github.com/gregungerer/m68knommu: m68k: drop unused Kconfig symbols m68k: drop unused Kconfig symbols m68knommu: create common externs for _ram* vars m68knommu: remove extern declarations of memory_start/memory_end from mm/init m68knommu: use generic section names in mm/init code m68knommu: use generic section names in setup code m68k: merge the mmu and non-mmu traps.c files m68k: move hardware vector setting from traps.c to its own file m68k: merge mmu and non-mmu include/asm/entry.h files m68k: merge the mmu and non-mmu kernel/Makefiles m68k: merge mmu and non-mmu arch Makefiles m68k: reorganize Kconfig options to improve mmu/non-mmu selections m68knommu: fix problems with SPI/GPIO on ColdFire 520x m68k: fix memcpy to unmatched/unaligned source and dest on 68000
2011-10-25Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (59 commits) MAINTAINERS: linux-m32r is moderated for non-subscribers linux@lists.openrisc.net is moderated for non-subscribers Drop default from "DM365 codec select" choice parisc: Kconfig: cleanup Kernel page size default Kconfig: remove redundant CONFIG_ prefix on two symbols cris: remove arch/cris/arch-v32/lib/nand_init.S microblaze: add missing CONFIG_ prefixes h8300: drop puzzling Kconfig dependencies MAINTAINERS: microblaze-uclinux@itee.uq.edu.au is moderated for non-subscribers tty: drop superfluous dependency in Kconfig ARM: mxc: fix Kconfig typo 'i.MX51' Fix file references in Kconfig files aic7xxx: fix Kconfig references to READMEs Fix file references in drivers/ide/ thinkpad_acpi: Fix printk typo 'bluestooth' bcmring: drop commented out line in Kconfig btmrvl_sdio: fix typo 'btmrvl_sdio_sd6888' doc: raw1394: Trivial typo fix CIFS: Don't free volume_info->UNC until we are entirely done with it. treewide: Correct spelling of successfully in comments ...
2011-10-24m68k: Finally remove leftover markers sectionsKirill Tkhai
Markers have removed already twice: 1: fc5377668c3d808e1d53c4aee152c836f55c3490 2: eb878b3bc0349344dbf70c51bf01fc734d5cf2d3 But a little bit is still here. Signed-off-by: Tkhai Kirill <tkhai@yandex.ru> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-10-24m68k/mac: Fix mac_irq_pending() for PSC MACE and SCCFinn Thain
Add missing return statement. The docs say that the level 4 PSC IRQs relate to MACE DMA and SCC. Since those drivers don't call mac_irq_pending() this patch has no affect. But it should be fixed all the same, since it can be useful for MACE debugging. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-10-24m68k/mac: Fix compiler warning in via_read_time()Finn Thain
The algorithm described in the comment compares two reads from the RTC but the code actually reads once and compares the result to an uninitialized value. This causes the compiler to warn, "last_result maybe used uninitialized". Make the code match the comment, fix the warning and perhaps improve reliability. Tested on a Quadra 700. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-10-21m68k: drop unused Kconfig symbolsPaul Bolle
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-10-21m68k: drop unused Kconfig symbolsPaul Bolle
Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-10-19Merge branch 'v3.1-rc10' into for-3.2/coreJens Axboe
Conflicts: block/blk-core.c include/linux/blkdev.h Signed-off-by: Jens Axboe <axboe@kernel.dk>
2011-10-18m68knommu: create common externs for _ram* varsGreg Ungerer
Create common extern definitions of _rambase, _ramstart and _ramend instead of them being externed when used in code. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-10-18m68knommu: remove extern declarations of memory_start/memory_end from mm/initGreg Ungerer
We do not need to have local extern declarations of memory_start and memory_end in mm/init_no.c. There are declarations already in asm/page_no.h. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-10-18m68knommu: use generic section names in mm/init codeGreg Ungerer
We should be including and using sections.h to get at the extern definitions of the linker sections in the m68knommu mm init code. Not defining them locally. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-10-18m68knommu: use generic section names in setup codeGreg Ungerer
We should be including and using sections.h to get at the extern definitions of the linker sections in the m68knommu startup code. Not defining them locally. Signed-off-by: Greg Ungerer <gerg@uclinux.org>