aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/tx4939ide.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/tx4939ide.c')
-rw-r--r--drivers/ide/tx4939ide.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/ide/tx4939ide.c b/drivers/ide/tx4939ide.c
index e0e0a803dde3..53f99853b065 100644
--- a/drivers/ide/tx4939ide.c
+++ b/drivers/ide/tx4939ide.c
@@ -632,7 +632,6 @@ static const struct ide_dma_ops tx4939ide_dma_ops = {
632 .dma_test_irq = tx4939ide_dma_test_irq, 632 .dma_test_irq = tx4939ide_dma_test_irq,
633 .dma_lost_irq = ide_dma_lost_irq, 633 .dma_lost_irq = ide_dma_lost_irq,
634 .dma_timer_expiry = ide_dma_sff_timer_expiry, 634 .dma_timer_expiry = ide_dma_sff_timer_expiry,
635 .dma_timeout = ide_dma_timeout,
636 .dma_sff_read_status = tx4939ide_dma_sff_read_status, 635 .dma_sff_read_status = tx4939ide_dma_sff_read_status,
637}; 636};
638 637
#ifndef __H8300_UACCESS_H
#define __H8300_UACCESS_H

/*
 * User space memory access functions
 */
#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/string.h>

#include <asm/segment.h>

#define VERIFY_READ	0
#define VERIFY_WRITE	1

/* We let the MMU do all checking */
#define access_ok(type, addr, size) __access_ok((unsigned long)addr,size)
static inline int __access_ok(unsigned long addr, unsigned long size)
{
#define	RANGE_CHECK_OK(addr, size, lower, upper) \
	(((addr) >= (lower)) && (((addr) + (size)) < (upper)))

	extern unsigned long _ramend;
	return(RANGE_CHECK_OK(addr, size, 0L, (unsigned long)&_ramend));
}

/*
 * The exception table consists of pairs of addresses: the first is the
 * address of an instruction that is allowed to fault, and the second is
 * the address at which the program should continue.  No registers are
 * modified, so it is entirely up to the continuation code to figure out
 * what to do.
 *
 * All the routines below use bits of fixup code that are out of line
 * with the main instruction path.  This means when everything is well,
 * we don't even have to jump over them.  Further, they do not intrude
 * on our cache or tlb entries.
 */

struct exception_table_entry
{
	unsigned long insn, fixup;
};

/* Returns 0 if exception not found and fixup otherwise.  */
extern unsigned long search_exception_table(unsigned long);


/*
 * These are the main single-value transfer routines.  They automatically
 * use the right size if we just have the right pointer type.
 */

#define put_user(x, ptr)				\
({							\
    int __pu_err = 0;					\
    typeof(*(ptr)) __pu_val = (x);			\
    switch (sizeof (*(ptr))) {				\
    case 1:						\
    case 2:						\
    case 4:						\
	*(ptr) = (__pu_val);   	        		\
	break;						\
    case 8:						\
	memcpy(ptr, &__pu_val, sizeof (*(ptr)));        \
	break;						\
    default:						\
	__pu_err = __put_user_bad();			\
	break;						\
    }							\
    __pu_err;						\
})
#define __put_user(x, ptr) put_user(x, ptr)