Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/gerg/m68knommu

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: (22 commits)
  m68knommu: Use generic show_interrupts()
  coldfire_qspi compile fix
  m68k: merge the mmu and non-mmu versions of sys_m68k.c
  m68knommu: use asm-generic/bitops/ext2-atomic.h
  m68knommu: Remove obsolete #include <linux/sys.h>
  m68k: merge mmu and non-mmu versions of asm-offsets.c
  m68k: merge non-mmu and mmu versions of m68k_ksyms.c
  m68knommu: remove un-needed exporting of COLDFIRE symbols
  m68knommu: move EXPORT of kernel_thread to function definition
  m68knommu: move EXPORT of local checksumming functions to definitions
  m68knommu: move EXPORT of dump_fpu to function definition
  m68knommu: clean up mm/init_no.c
  m68k: merge the mmu and non-mmu mm/Makefile
  m68k: mv kmap_mm.c to kmap.c
  m68knommu: remove stubs for __ioremap() and iounmap()
  m68knommu: remove unused kernel_set_cachemode()
  m68k: let Makefile sort out compiling mmu and non-mmu lib/checksum.c
  m68k: remove duplicate memcpy() implementation
  m68k: remove duplicate memset() implementation
  m68k: remove duplicate memmove() implementation
  ...
  • Loading branch information
Linus Torvalds committed May 24, 2011
2 parents 988c7f2 + 531d289 commit 9f22aae
Show file tree
Hide file tree
Showing 41 changed files with 1,369 additions and 1,960 deletions.
1 change: 1 addition & 0 deletions arch/m68k/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ config M68K
select HAVE_AOUT if MMU
select GENERIC_ATOMIC64 if MMU
select HAVE_GENERIC_HARDIRQS if !MMU
select GENERIC_IRQ_SHOW if !MMU

config RWSEM_GENERIC_SPINLOCK
bool
Expand Down
18 changes: 1 addition & 17 deletions arch/m68k/include/asm/bitops_no.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,23 +246,7 @@ static inline int __test_and_clear_bit_le(int nr, volatile void *addr)
return retval;
}

#define ext2_set_bit_atomic(lock, nr, addr) \
({ \
int ret; \
spin_lock(lock); \
ret = __test_and_set_bit_le((nr), (addr)); \
spin_unlock(lock); \
ret; \
})

#define ext2_clear_bit_atomic(lock, nr, addr) \
({ \
int ret; \
spin_lock(lock); \
ret = __test_and_clear_bit_le((nr), (addr)); \
spin_unlock(lock); \
ret; \
})
#include <asm-generic/bitops/ext2-atomic.h>

static inline int test_bit_le(int nr, const volatile void *addr)
{
Expand Down
8 changes: 5 additions & 3 deletions arch/m68k/include/asm/io_no.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,10 @@ static inline void io_insl(unsigned int addr, void *buf, int len)
#define IOMAP_NOCACHE_NONSER 2
#define IOMAP_WRITETHROUGH 3

extern void *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag);

static inline void *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag)
{
return (void *) physaddr;
}
static inline void *ioremap(unsigned long physaddr, unsigned long size)
{
return __ioremap(physaddr, size, IOMAP_NOCACHE_SER);
Expand All @@ -163,7 +165,7 @@ static inline void *ioremap_fullcache(unsigned long physaddr, unsigned long size
return __ioremap(physaddr, size, IOMAP_FULL_CACHING);
}

extern void iounmap(void *addr);
#define iounmap(addr) do { } while(0)

/*
* Convert a physical pointer to a virtual kernel pointer for /dev/mem
Expand Down
106 changes: 103 additions & 3 deletions arch/m68k/kernel/asm-offsets.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,105 @@
#ifdef CONFIG_MMU
#include "asm-offsets_mm.c"
/*
* This program is used to generate definitions needed by
* assembly language modules.
*
* We use the technique used in the OSF Mach kernel code:
* generate asm statements containing #defines,
* compile this file to assembler, and then extract the
* #defines from the assembly-language output.
*/

#define ASM_OFFSETS_C

#include <linux/stddef.h>
#include <linux/sched.h>
#include <linux/kernel_stat.h>
#include <linux/kbuild.h>
#include <asm/bootinfo.h>
#include <asm/irq.h>
#include <asm/amigahw.h>
#include <linux/font.h>

int main(void)
{
/* offsets into the task struct */
DEFINE(TASK_THREAD, offsetof(struct task_struct, thread));
DEFINE(TASK_MM, offsetof(struct task_struct, mm));
DEFINE(TASK_INFO, offsetof(struct task_struct, thread.info));
DEFINE(TASK_TINFO, offsetof(struct task_struct, thread.info));

/* offsets into the thread struct */
DEFINE(THREAD_KSP, offsetof(struct thread_struct, ksp));
DEFINE(THREAD_USP, offsetof(struct thread_struct, usp));
DEFINE(THREAD_SR, offsetof(struct thread_struct, sr));
DEFINE(THREAD_FS, offsetof(struct thread_struct, fs));
DEFINE(THREAD_CRP, offsetof(struct thread_struct, crp));
DEFINE(THREAD_ESP0, offsetof(struct thread_struct, esp0));
DEFINE(THREAD_FPREG, offsetof(struct thread_struct, fp));
DEFINE(THREAD_FPCNTL, offsetof(struct thread_struct, fpcntl));
DEFINE(THREAD_FPSTATE, offsetof(struct thread_struct, fpstate));

/* offsets into the thread_info struct */
DEFINE(TINFO_PREEMPT, offsetof(struct thread_info, preempt_count));
DEFINE(TINFO_FLAGS, offsetof(struct thread_info, flags));

/* offsets into the pt_regs */
DEFINE(PT_OFF_D0, offsetof(struct pt_regs, d0));
DEFINE(PT_OFF_ORIG_D0, offsetof(struct pt_regs, orig_d0));
DEFINE(PT_OFF_D1, offsetof(struct pt_regs, d1));
DEFINE(PT_OFF_D2, offsetof(struct pt_regs, d2));
DEFINE(PT_OFF_D3, offsetof(struct pt_regs, d3));
DEFINE(PT_OFF_D4, offsetof(struct pt_regs, d4));
DEFINE(PT_OFF_D5, offsetof(struct pt_regs, d5));
DEFINE(PT_OFF_A0, offsetof(struct pt_regs, a0));
DEFINE(PT_OFF_A1, offsetof(struct pt_regs, a1));
DEFINE(PT_OFF_A2, offsetof(struct pt_regs, a2));
DEFINE(PT_OFF_PC, offsetof(struct pt_regs, pc));
DEFINE(PT_OFF_SR, offsetof(struct pt_regs, sr));

/* bitfields are a bit difficult */
#ifdef CONFIG_COLDFIRE
DEFINE(PT_OFF_FORMATVEC, offsetof(struct pt_regs, sr) - 2);
#else
#include "asm-offsets_no.c"
DEFINE(PT_OFF_FORMATVEC, offsetof(struct pt_regs, pc) + 4);
#endif

/* offsets into the irq_cpustat_t struct */
DEFINE(CPUSTAT_SOFTIRQ_PENDING, offsetof(irq_cpustat_t, __softirq_pending));

/* signal defines */
DEFINE(LSIGSEGV, SIGSEGV);
DEFINE(LSEGV_MAPERR, SEGV_MAPERR);
DEFINE(LSIGTRAP, SIGTRAP);
DEFINE(LTRAP_TRACE, TRAP_TRACE);

#ifdef CONFIG_MMU
/* offsets into the bi_record struct */
DEFINE(BIR_TAG, offsetof(struct bi_record, tag));
DEFINE(BIR_SIZE, offsetof(struct bi_record, size));
DEFINE(BIR_DATA, offsetof(struct bi_record, data));

/* offsets into font_desc (drivers/video/console/font.h) */
DEFINE(FONT_DESC_IDX, offsetof(struct font_desc, idx));
DEFINE(FONT_DESC_NAME, offsetof(struct font_desc, name));
DEFINE(FONT_DESC_WIDTH, offsetof(struct font_desc, width));
DEFINE(FONT_DESC_HEIGHT, offsetof(struct font_desc, height));
DEFINE(FONT_DESC_DATA, offsetof(struct font_desc, data));
DEFINE(FONT_DESC_PREF, offsetof(struct font_desc, pref));

/* offsets into the custom struct */
DEFINE(CUSTOMBASE, &amiga_custom);
DEFINE(C_INTENAR, offsetof(struct CUSTOM, intenar));
DEFINE(C_INTREQR, offsetof(struct CUSTOM, intreqr));
DEFINE(C_INTENA, offsetof(struct CUSTOM, intena));
DEFINE(C_INTREQ, offsetof(struct CUSTOM, intreq));
DEFINE(C_SERDATR, offsetof(struct CUSTOM, serdatr));
DEFINE(C_SERDAT, offsetof(struct CUSTOM, serdat));
DEFINE(C_SERPER, offsetof(struct CUSTOM, serper));
DEFINE(CIAABASE, &ciaa);
DEFINE(CIABBASE, &ciab);
DEFINE(C_PRA, offsetof(struct CIA, pra));
DEFINE(ZTWOBASE, zTwoBase);
#endif

return 0;
}
100 changes: 0 additions & 100 deletions arch/m68k/kernel/asm-offsets_mm.c

This file was deleted.

76 changes: 0 additions & 76 deletions arch/m68k/kernel/asm-offsets_no.c

This file was deleted.

1 change: 0 additions & 1 deletion arch/m68k/kernel/entry_no.S
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
* linux 2.4 support David McCullough <davidm@snapgear.com>
*/

#include <linux/sys.h>
#include <linux/linkage.h>
#include <asm/errno.h>
#include <asm/setup.h>
Expand Down
28 changes: 0 additions & 28 deletions arch/m68k/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,3 @@ asmlinkage void do_IRQ(int irq, struct pt_regs *regs)

set_irq_regs(oldregs);
}

int show_interrupts(struct seq_file *p, void *v)
{
struct irqaction *ap;
int irq = *((loff_t *) v);

if (irq == 0)
seq_puts(p, " CPU0\n");

if (irq < NR_IRQS) {
struct irq_desc *desc = irq_to_desc(irq);

ap = desc->action;
if (ap) {
seq_printf(p, "%3d: ", irq);
seq_printf(p, "%10u ", kstat_irqs(irq));
seq_printf(p, "%14s ", irq_desc_get_chip(desc)->name);

seq_printf(p, "%s", ap->name);
for (ap = ap->next; ap; ap = ap->next)
seq_printf(p, ", %s", ap->name);
seq_putc(p, '\n');
}
}

return 0;
}

Loading

0 comments on commit 9f22aae

Please sign in to comment.