Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://www.linux-m32r.org/git/takata/linux…
Browse files Browse the repository at this point in the history
…-2.6_dev

* 'for-linus' of git://www.linux-m32r.org/git/takata/linux-2.6_dev:
  m32r: Fix IPI function calls for SMP
  m32r: Fix set_memory() for DISCONTIGMEM
  m32r: add rtc_lock variable
  m32r: define ioread* and iowrite* macros
  m32r: export delay loop symbols
  m32r: fix tme_handler
  • Loading branch information
Linus Torvalds committed Oct 4, 2009
2 parents 0b5759c + 0a3d31b commit 8a0382f
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 13 deletions.
7 changes: 7 additions & 0 deletions arch/m32r/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,13 @@ static inline void _writel(unsigned long l, unsigned long addr)
#define __raw_writew writew
#define __raw_writel writel

#define ioread8 read
#define ioread16 readw
#define ioread32 readl
#define iowrite8 writeb
#define iowrite16 writew
#define iowrite32 writel

#define mmiowb()

#define flush_write_buffers() do { } while (0) /* M32R_FIXME */
Expand Down
6 changes: 0 additions & 6 deletions arch/m32r/kernel/m32r_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ EXPORT_SYMBOL(__ioremap);
EXPORT_SYMBOL(iounmap);
EXPORT_SYMBOL(kernel_thread);

/* Networking helper routines. */
/* Delay loops */
EXPORT_SYMBOL(__udelay);
EXPORT_SYMBOL(__delay);
EXPORT_SYMBOL(__const_udelay);

EXPORT_SYMBOL(strncpy_from_user);
EXPORT_SYMBOL(__strncpy_from_user);
EXPORT_SYMBOL(clear_user);
Expand Down
9 changes: 9 additions & 0 deletions arch/m32r/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@

#include <asm/hw_irq.h>

#if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE)
/* this needs a better home */
DEFINE_SPINLOCK(rtc_lock);

#ifdef CONFIG_RTC_DRV_CMOS_MODULE
EXPORT_SYMBOL(rtc_lock);
#endif
#endif /* pc-style 'CMOS' RTC support */

#ifdef CONFIG_SMP
extern void smp_local_timer_interrupt(void);
#endif
Expand Down
4 changes: 2 additions & 2 deletions arch/m32r/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ static void set_eit_vector_entries(void)
eit_vector[186] = (unsigned long)smp_call_function_interrupt;
eit_vector[187] = (unsigned long)smp_ipi_timer_interrupt;
eit_vector[188] = (unsigned long)smp_flush_cache_all_interrupt;
eit_vector[189] = (unsigned long)smp_call_function_single_interrupt;
eit_vector[190] = 0;
eit_vector[189] = 0; /* CPU_BOOT_IPI */
eit_vector[190] = (unsigned long)smp_call_function_single_interrupt;
eit_vector[191] = 0;
#endif
_flush_cache_copyback_all();
Expand Down
4 changes: 4 additions & 0 deletions arch/m32r/lib/delay.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,8 @@ void __ndelay(unsigned long nsecs)
{
__const_udelay(nsecs * 0x00005); /* 2**32 / 1000000000 (rounded up) */
}

EXPORT_SYMBOL(__delay);
EXPORT_SYMBOL(__const_udelay);
EXPORT_SYMBOL(__udelay);
EXPORT_SYMBOL(__ndelay);
5 changes: 4 additions & 1 deletion arch/m32r/mm/discontig.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ typedef struct {
} mem_prof_t;
static mem_prof_t mem_prof[MAX_NUMNODES];

extern unsigned long memory_start;
extern unsigned long memory_end;

static void __init mem_prof_init(void)
{
unsigned long start_pfn, holes, free_pfn;
Expand All @@ -42,7 +45,7 @@ static void __init mem_prof_init(void)
/* Node#0 SDRAM */
mp = &mem_prof[0];
mp->start_pfn = PFN_UP(CONFIG_MEMORY_START);
mp->pages = PFN_DOWN(CONFIG_MEMORY_SIZE);
mp->pages = PFN_DOWN(memory_end - memory_start);
mp->holes = 0;
mp->free_pfn = PFN_UP(__pa(_end));

Expand Down
12 changes: 8 additions & 4 deletions arch/m32r/mm/mmu.S
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,13 @@ ENTRY(tme_handler)

; pmd = pmd_offset(pgd, address);
ld r3, @r3 ; r3: pmd data
ldi r2, #-4096
beqz r3, 3f ; pmd_none(*pmd) ?

and3 r2, r3, #0xfff
add3 r2, r2, #-355 ; _KERNPG_TABLE(=0x163)
bnez r2, 3f ; pmd_bad(*pmd) ?
ldi r2, #-4096

; pte = pte_offset(pmd, address);
and r2, r3 ; r2: pte base addr
srl3 r3, r0, #10
Expand Down Expand Up @@ -263,9 +267,9 @@ ENTRY(tme_handler)
ld r1, @r3 ; r1: pmd
beqz r1, 3f ; pmd_none(*pmd) ?
;
and3 r1, r1, #0xeff
ldi r4, #611 ; _KERNPG_TABLE(=611)
bne r1, r4, 3f ; !pmd_bad(*pmd) ?
and3 r1, r1, #0x3ff
ldi r4, #0x163 ; _KERNPG_TABLE(=0x163)
bne r1, r4, 3f ; pmd_bad(*pmd) ?

.fillinsn
4:
Expand Down

0 comments on commit 8a0382f

Please sign in to comment.