Commit db142755 authored by Richard Henderson's avatar Richard Henderson Committed by Richard Henderson

[ALPHA] Correct io.h exports and inlining for marvel and titan.

parent e62c31e2
...@@ -6,7 +6,7 @@ EXTRA_TARGETS := head.o ...@@ -6,7 +6,7 @@ EXTRA_TARGETS := head.o
EXTRA_AFLAGS := $(CFLAGS) EXTRA_AFLAGS := $(CFLAGS)
export-objs := alpha_ksyms.o core_titan.o export-objs := alpha_ksyms.o core_marvel.o core_titan.o
obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o \ obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o \
irq_alpha.o signal.o setup.o ptrace.o time.o semaphore.o \ irq_alpha.o signal.o setup.o ptrace.o time.o semaphore.o \
......
...@@ -5,6 +5,12 @@ ...@@ -5,6 +5,12 @@
*/ */
#include <linux/config.h> #include <linux/config.h>
#define __EXTERN_INLINE inline
#include <asm/io.h>
#include <asm/core_marvel.h>
#undef __EXTERN_INLINE
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/pci.h> #include <linux/pci.h>
...@@ -13,6 +19,7 @@ ...@@ -13,6 +19,7 @@
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <linux/mc146818rtc.h> #include <linux/mc146818rtc.h>
#include <linux/rtc.h> #include <linux/rtc.h>
#include <linux/module.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/system.h> #include <asm/system.h>
...@@ -23,12 +30,7 @@ ...@@ -23,12 +30,7 @@
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#include <asm/rtc.h> #include <asm/rtc.h>
#define __EXTERN_INLINE inline #include <linux/bootmem.h>
#include <asm/io.h>
#include <asm/core_marvel.h>
#undef __EXTERN_INLINE
#include <linux/bootmem.h> /* this must be *after* io.h / core_marvel.h */
#include "proto.h" #include "proto.h"
#include "pci_impl.h" #include "pci_impl.h"
...@@ -726,6 +728,10 @@ marvel_iounmap(unsigned long addr) ...@@ -726,6 +728,10 @@ marvel_iounmap(unsigned long addr)
return vfree((void *)(PAGE_MASK & addr)); return vfree((void *)(PAGE_MASK & addr));
} }
#ifndef CONFIG_ALPHA_GENERIC
EXPORT_SYMBOL(marvel_ioremap);
EXPORT_SYMBOL(marvel_iounmap);
#endif
/* /*
* SRMCons support * SRMCons support
......
...@@ -567,8 +567,10 @@ titan_iounmap(unsigned long addr) ...@@ -567,8 +567,10 @@ titan_iounmap(unsigned long addr)
vfree((void *)(PAGE_MASK & addr)); vfree((void *)(PAGE_MASK & addr));
} }
#ifndef CONFIG_ALPHA_GENERIC
EXPORT_SYMBOL(titan_ioremap); EXPORT_SYMBOL(titan_ioremap);
EXPORT_SYMBOL(titan_iounmap); EXPORT_SYMBOL(titan_iounmap);
#endif
/* /*
* AGP GART Support. * AGP GART Support.
......
...@@ -374,8 +374,10 @@ __EXTERN_INLINE u8 marvel_inb(unsigned long addr) ...@@ -374,8 +374,10 @@ __EXTERN_INLINE u8 marvel_inb(unsigned long addr)
{ {
FIXUP_IOADDR(addr); FIXUP_IOADDR(addr);
if (!marvel_is_ioaddr(addr)) { if (!marvel_is_ioaddr(addr)) {
if (__marvel_is_port_kbd(addr)) return (u8)0; if (__marvel_is_port_kbd(addr))
if (__marvel_is_port_rtc(addr)) return __marvel_rtc_inb(addr); return (u8)0;
if (__marvel_is_port_rtc(addr))
return __marvel_rtc_inb(addr);
IOBUG_FILTER_IOADDR(addr, IOBUG_FILTER_IOADDR(addr,
("Bad IO addr %lx - reading -1\n", addr)); ("Bad IO addr %lx - reading -1\n", addr));
return (u8)-1; return (u8)-1;
...@@ -533,12 +535,12 @@ __EXTERN_INLINE void marvel_writeq(u64 q, unsigned long addr) ...@@ -533,12 +535,12 @@ __EXTERN_INLINE void marvel_writeq(u64 q, unsigned long addr)
#ifdef __WANT_IO_DEF #ifdef __WANT_IO_DEF
#define __inb(p) alpha_mv.mv_inb((unsigned long)(p)) #define __inb(p) marvel_inb((unsigned long)(p))
#define __inw(p) alpha_mv.mv_inw((unsigned long)(p)) #define __inw(p) marvel_inw((unsigned long)(p))
#define __inl(p) alpha_mv.mv_inl((unsigned long)(p)) #define __inl(p) marvel_inl((unsigned long)(p))
#define __outb(x,p) alpha_mv.mv_outb((x),(unsigned long)(p)) #define __outb(x,p) marvel_outb((x),(unsigned long)(p))
#define __outw(x,p) alpha_mv.mv_outw((x),(unsigned long)(p)) #define __outw(x,p) marvel_outw((x),(unsigned long)(p))
#define __outl(x,p) alpha_mv.mv_outl((x),(unsigned long)(p)) #define __outl(x,p) marvel_outl((x),(unsigned long)(p))
#define __readb(a) marvel_readb((unsigned long)(a)) #define __readb(a) marvel_readb((unsigned long)(a))
#define __readw(a) marvel_readw((unsigned long)(a)) #define __readw(a) marvel_readw((unsigned long)(a))
#define __readl(a) marvel_readl((unsigned long)(a)) #define __readl(a) marvel_readl((unsigned long)(a))
...@@ -547,25 +549,21 @@ __EXTERN_INLINE void marvel_writeq(u64 q, unsigned long addr) ...@@ -547,25 +549,21 @@ __EXTERN_INLINE void marvel_writeq(u64 q, unsigned long addr)
#define __writew(x,a) marvel_writew((x),(unsigned long)(a)) #define __writew(x,a) marvel_writew((x),(unsigned long)(a))
#define __writel(x,a) marvel_writel((x),(unsigned long)(a)) #define __writel(x,a) marvel_writel((x),(unsigned long)(a))
#define __writeq(x,a) marvel_writeq((x),(unsigned long)(a)) #define __writeq(x,a) marvel_writeq((x),(unsigned long)(a))
#define __ioremap(a,s) alpha_mv.mv_ioremap((unsigned long)(a),(s)) #define __ioremap(a,s) marvel_ioremap((unsigned long)(a),(s))
#define __iounmap(a) alpha_mv.mv_iounmap((unsigned long)(a)) #define __iounmap(a) marvel_iounmap((unsigned long)(a))
#define __is_ioaddr(a) marvel_is_ioaddr((unsigned long)(a)) #define __is_ioaddr(a) marvel_is_ioaddr((unsigned long)(a))
#define inb(port) __inb((port)) /* Disable direct inlining of these calls with the debug checks present. */
#define inw(port) __inw((port)) #if 0
#define inl(port) __inl((port)) #define __raw_readb(a) __readb(a)
#define outb(v, port) __outb((v),(port)) #define __raw_readw(a) __readw(a)
#define outw(v, port) __outw((v),(port)) #define __raw_readl(a) __readl(a)
#define outl(v, port) __outl((v),(port)) #define __raw_readq(a) __readq(a)
#define __raw_writeb(v,a) __writeb(v,a)
#define __raw_readb(a) __readb((unsigned long)(a)) #define __raw_writew(v,a) __writew(v,a)
#define __raw_readw(a) __readw((unsigned long)(a)) #define __raw_writel(v,a) __writel(v,a)
#define __raw_readl(a) __readl((unsigned long)(a)) #define __raw_writeq(v,a) __writeq(v,a)
#define __raw_readq(a) __readq((unsigned long)(a)) #endif
#define __raw_writeb(v,a) __writeb((v),(unsigned long)(a))
#define __raw_writew(v,a) __writew((v),(unsigned long)(a))
#define __raw_writel(v,a) __writel((v),(unsigned long)(a))
#define __raw_writeq(v,a) __writeq((v),(unsigned long)(a))
#endif /* __WANT_IO_DEF */ #endif /* __WANT_IO_DEF */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment