Commit 81c0cfcc authored by Matthew Wilcox's avatar Matthew Wilcox Committed by Linus Torvalds

[PATCH] PA-RISC updates for 2.5.59

 - conversion of remaining drivers to generic device model
 - more of sfr's compat stuff
 - eliminate some bogus syscalls
 - update for MUX driver
 - beginnings of new module code
 - tell the keyboard driver about CONFIG_PARISC
parent 00492e8c
...@@ -33,10 +33,10 @@ FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align ...@@ -33,10 +33,10 @@ FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align
OBJCOPY_FLAGS =-O binary -R .note -R .comment -S OBJCOPY_FLAGS =-O binary -R .note -R .comment -S
cflags-y := -D__linux__ -pipe -fno-strength-reduce cflags-y := -pipe
# These should be on for older toolchains or SOM toolchains that don't # These flags should be implied by an hppa-linux configuration, but they
# enable them by default. # are not in gcc 3.2.
cflags-y += -mno-space-regs -mfast-indirect-calls cflags-y += -mno-space-regs -mfast-indirect-calls
# No fixed-point multiply # No fixed-point multiply
......
...@@ -243,7 +243,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -243,7 +243,7 @@ int show_interrupts(struct seq_file *p, void *v)
for (i = 0; i <= MAX_CPU_IRQ; i++) { for (i = 0; i <= MAX_CPU_IRQ; i++) {
struct irqaction *action = &region->action[i]; struct irqaction *action = &region->action[i];
unsigned int irq_no = IRQ_FROM_REGION(regnr) + i; unsigned int irq_no = IRQ_FROM_REGION(regnr) + i;
int j=0; int j = 0;
if (!action->handler) if (!action->handler)
continue; continue;
...@@ -251,7 +251,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -251,7 +251,7 @@ int show_interrupts(struct seq_file *p, void *v)
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
for (; j < NR_CPUS; j++) for (; j < NR_CPUS; j++)
#endif #endif
seq_printf(p, "%10u ", kstat_cpu(j).irqs[regnr][irq_no]); seq_printf(p, "%10u ", kstat_cpu(j).irqs[irq_no]);
seq_printf(p, " %14s", seq_printf(p, " %14s",
region->data.name ? region->data.name : "N/A"); region->data.name ? region->data.name : "N/A");
...@@ -388,7 +388,7 @@ void do_irq(struct irqaction *action, int irq, struct pt_regs * regs) ...@@ -388,7 +388,7 @@ void do_irq(struct irqaction *action, int irq, struct pt_regs * regs)
int cpu = smp_processor_id(); int cpu = smp_processor_id();
irq_enter(); irq_enter();
++kstat_cpu(cpu).irqs[IRQ_REGION(irq)][IRQ_OFFSET(irq)]; ++kstat_cpu(cpu).irqs[irq];
DBG_IRQ(irq, ("do_irq(%d) %d+%d\n", irq, IRQ_REGION(irq), IRQ_OFFSET(irq))); DBG_IRQ(irq, ("do_irq(%d) %d+%d\n", irq, IRQ_REGION(irq), IRQ_OFFSET(irq)));
......
This diff is collapsed.
...@@ -31,10 +31,6 @@ EXPORT_SYMBOL(hppa_dma_ops); ...@@ -31,10 +31,6 @@ EXPORT_SYMBOL(hppa_dma_ops);
EXPORT_SYMBOL(get_pci_node_path); EXPORT_SYMBOL(get_pci_node_path);
#endif #endif
#ifdef CONFIG_IOMMU_CCIO
EXPORT_SYMBOL(ccio_get_fake);
#endif
#include <linux/sched.h> #include <linux/sched.h>
#include <asm/irq.h> #include <asm/irq.h>
EXPORT_SYMBOL(enable_irq); EXPORT_SYMBOL(enable_irq);
......
...@@ -17,59 +17,6 @@ struct k_sigaction32 { ...@@ -17,59 +17,6 @@ struct k_sigaction32 {
struct sigaction32 sa; struct sigaction32 sa;
}; };
typedef unsigned int old_sigset_t32;
static int
put_old_sigset32(old_sigset_t32 *up, old_sigset_t *set)
{
old_sigset_t32 set32 = *set;
return put_user(set32, up);
}
static int
get_old_segset32(old_sigset_t32 *up, old_sigset_t *set)
{
old_sigset_t32 set32;
int r;
if ((r = get_user(set32, up)) == 0)
*set = set32;
return r;
}
long
sys32_sigpending(old_sigset_t32 *set)
{
extern long sys_sigpending(old_sigset_t *set);
old_sigset_t pending;
int ret;
KERNEL_SYSCALL(ret, sys_sigpending, &pending);
/* can't put_user an old_sigset_t -- it is too big */
if (put_old_sigset32(set, &pending))
return -EFAULT;
return ret;
}
int sys32_sigprocmask(int how, old_sigset_t32 *set,
old_sigset_t32 *oset)
{
extern int sys_sigprocmask(int how, old_sigset_t *set,
old_sigset_t *oset);
old_sigset_t s;
int ret;
if (set && get_old_segset32 (set, &s))
return -EFAULT;
KERNEL_SYSCALL(ret, sys_sigprocmask, how, set ? &s : NULL, oset ? &s : NULL);
if (!ret && oset && put_old_sigset32(oset, &s))
return -EFAULT;
return ret;
}
static inline void static inline void
sigset_32to64(sigset_t *s64, sigset_t32 *s32) sigset_32to64(sigset_t *s64, sigset_t32 *s32)
{ {
......
...@@ -314,74 +314,6 @@ asmlinkage long sys32_unimplemented(int r26, int r25, int r24, int r23, ...@@ -314,74 +314,6 @@ asmlinkage long sys32_unimplemented(int r26, int r25, int r24, int r23,
return -ENOSYS; return -ENOSYS;
} }
/* 32-bit user apps use struct statfs which uses 'long's */
struct statfs32 {
__s32 f_type;
__s32 f_bsize;
__s32 f_blocks;
__s32 f_bfree;
__s32 f_bavail;
__s32 f_files;
__s32 f_ffree;
__kernel_fsid_t f_fsid;
__s32 f_namelen;
__s32 f_spare[6];
};
/* convert statfs struct to statfs32 struct and copy result to user */
static unsigned long statfs32_to_user(struct statfs32 *ust32, struct statfs *st)
{
struct statfs32 st32;
#undef CP
#define CP(a) st32.a = st->a
CP(f_type);
CP(f_bsize);
CP(f_blocks);
CP(f_bfree);
CP(f_bavail);
CP(f_files);
CP(f_ffree);
CP(f_fsid);
CP(f_namelen);
return copy_to_user(ust32, &st32, sizeof st32);
}
/* The following statfs calls are copies of code from linux/fs/open.c and
* should be checked against those from time to time */
asmlinkage long sys32_statfs(const char * path, struct statfs32 * buf)
{
struct nameidata nd;
int error;
error = user_path_walk(path, &nd);
if (!error) {
struct statfs tmp;
error = vfs_statfs(nd.dentry->d_inode->i_sb, &tmp);
if (!error && statfs32_to_user(buf, &tmp))
error = -EFAULT;
path_release(&nd);
}
return error;
}
asmlinkage long sys32_fstatfs(unsigned int fd, struct statfs32 * buf)
{
struct file * file;
struct statfs tmp;
int error;
error = -EBADF;
file = fget(fd);
if (!file)
goto out;
error = vfs_statfs(file->f_dentry->d_inode->i_sb, &tmp);
if (!error && statfs32_to_user(buf, &tmp))
error = -EFAULT;
fput(file);
out:
return error;
}
extern asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg); extern asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg);
asmlinkage long sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg) asmlinkage long sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg)
......
...@@ -428,7 +428,7 @@ sys_call_table: ...@@ -428,7 +428,7 @@ sys_call_table:
ENTRY_SAME(setreuid) /* 70 */ ENTRY_SAME(setreuid) /* 70 */
ENTRY_SAME(setregid) ENTRY_SAME(setregid)
ENTRY_SAME(mincore) ENTRY_SAME(mincore)
ENTRY_DIFF(sigpending) ENTRY_COMP(sigpending)
ENTRY_SAME(sethostname) ENTRY_SAME(sethostname)
/* Following 3 have linux-common-code structs containing longs -( */ /* Following 3 have linux-common-code structs containing longs -( */
ENTRY_DIFF(setrlimit) /* 75 */ ENTRY_DIFF(setrlimit) /* 75 */
...@@ -445,10 +445,7 @@ sys_call_table: ...@@ -445,10 +445,7 @@ sys_call_table:
/* see stat comment */ /* see stat comment */
ENTRY_COMP(newlstat) ENTRY_COMP(newlstat)
ENTRY_SAME(readlink) /* 85 */ ENTRY_SAME(readlink) /* 85 */
/* suspect we'll need some work for narrow shlibs on wide kernel */ ENTRY_SAME(ni_syscall) /* was uselib */
/* NOTE this doesn't get used when I boot 32-bit userspace */
/* containing working shlib apps -- can this be nuked? */
ENTRY_UHOH(uselib)
ENTRY_SAME(swapon) ENTRY_SAME(swapon)
ENTRY_SAME(reboot) ENTRY_SAME(reboot)
ENTRY_SAME(mmap2) ENTRY_SAME(mmap2)
...@@ -461,12 +458,10 @@ sys_call_table: ...@@ -461,12 +458,10 @@ sys_call_table:
ENTRY_SAME(getpriority) ENTRY_SAME(getpriority)
ENTRY_SAME(setpriority) ENTRY_SAME(setpriority)
ENTRY_SAME(recv) ENTRY_SAME(recv)
ENTRY_DIFF(statfs) ENTRY_COMP(statfs)
ENTRY_DIFF(fstatfs) /* 100 */ ENTRY_COMP(fstatfs) /* 100 */
ENTRY_SAME(stat64) ENTRY_SAME(stat64)
/* don't think hppa glibc even provides an entry pt for this ENTRY_SAME(ni_syscall) /* was socketcall */
* so disable for now */
ENTRY_UHOH(socketcall)
ENTRY_SAME(syslog) ENTRY_SAME(syslog)
/* even though manpage says struct timeval contains longs, ours has /* even though manpage says struct timeval contains longs, ours has
* time_t and suseconds_t -- both of which are safe wide/narrow */ * time_t and suseconds_t -- both of which are safe wide/narrow */
...@@ -496,7 +491,7 @@ sys_call_table: ...@@ -496,7 +491,7 @@ sys_call_table:
ENTRY_DIFF(adjtimex) ENTRY_DIFF(adjtimex)
ENTRY_SAME(mprotect) /* 125 */ ENTRY_SAME(mprotect) /* 125 */
/* old_sigset_t forced to 32 bits. Beware glibc sigset_t */ /* old_sigset_t forced to 32 bits. Beware glibc sigset_t */
ENTRY_DIFF(sigprocmask) ENTRY_COMP(sigprocmask)
ENTRY_SAME(ni_syscall) /* create_module */ ENTRY_SAME(ni_syscall) /* create_module */
ENTRY_SAME(init_module) ENTRY_SAME(init_module)
ENTRY_SAME(delete_module) ENTRY_SAME(delete_module)
...@@ -594,15 +589,9 @@ sys_call_table: ...@@ -594,15 +589,9 @@ sys_call_table:
ENTRY_OURS(ftruncate64) /* 200 */ ENTRY_OURS(ftruncate64) /* 200 */
ENTRY_SAME(getdents64) ENTRY_SAME(getdents64)
ENTRY_DIFF(fcntl64) ENTRY_DIFF(fcntl64)
#ifdef CONFIG_XFS_FS
ENTRY_SAME(attrctl)
ENTRY_SAME(acl_get)
ENTRY_SAME(acl_set) /* 205 */
#else
ENTRY_SAME(ni_syscall) ENTRY_SAME(ni_syscall)
ENTRY_SAME(ni_syscall) ENTRY_SAME(ni_syscall)
ENTRY_SAME(ni_syscall) /* 205 */ ENTRY_SAME(ni_syscall) /* 205 */
#endif
ENTRY_SAME(gettid) ENTRY_SAME(gettid)
ENTRY_SAME(readahead) ENTRY_SAME(readahead)
ENTRY_SAME(ni_syscall) /* tkill */ ENTRY_SAME(ni_syscall) /* tkill */
......
...@@ -123,7 +123,11 @@ void dump_stack(void) ...@@ -123,7 +123,11 @@ void dump_stack(void)
} }
static int kstack_depth_to_print = 48; #ifndef __LP64__
static int kstack_depth_to_print = 64 * 4;
#else
static int kstack_depth_to_print = 128 * 4;
#endif
void show_stack(unsigned long *sp) void show_stack(unsigned long *sp)
{ {
......
...@@ -918,7 +918,7 @@ static void kbd_bh(unsigned long dummy) ...@@ -918,7 +918,7 @@ static void kbd_bh(unsigned long dummy)
DECLARE_TASKLET_DISABLED(keyboard_tasklet, kbd_bh, 0); DECLARE_TASKLET_DISABLED(keyboard_tasklet, kbd_bh, 0);
#if defined(CONFIG_X86) || defined(CONFIG_IA64) || defined(CONFIG_ALPHA) || defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) #if defined(CONFIG_X86) || defined(CONFIG_IA64) || defined(CONFIG_ALPHA) || defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) || defined(CONFIG_PARISC)
static unsigned short x86_keycodes[256] = static unsigned short x86_keycodes[256] =
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
......
...@@ -91,6 +91,7 @@ ...@@ -91,6 +91,7 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/pdc.h> #include <asm/pdc.h>
#include <asm/cache.h> #include <asm/cache.h>
#include <asm/parisc-device.h>
static char version[] __devinitdata = static char version[] __devinitdata =
"82596.c $Revision: 1.29 $\n"; "82596.c $Revision: 1.29 $\n";
...@@ -121,13 +122,13 @@ static char version[] __devinitdata = ...@@ -121,13 +122,13 @@ static char version[] __devinitdata =
#define CHECK_WBACK(addr,len) \ #define CHECK_WBACK(addr,len) \
do { if (!dma_consistent) dma_cache_wback((unsigned long)addr,len); } while (0) do { dma_cache_sync((void *)addr, len, DMA_TO_DEVICE); } while (0)
#define CHECK_INV(addr,len) \ #define CHECK_INV(addr,len) \
do { if (!dma_consistent) dma_cache_inv((unsigned long)addr,len); } while(0) do { dma_cache_sync((void *)addr,len, DMA_FROM_DEVICE); } while(0)
#define CHECK_WBACK_INV(addr,len) \ #define CHECK_WBACK_INV(addr,len) \
do { if (!dma_consistent) dma_cache_wback_inv((unsigned long)addr,len); } while (0) do { dma_cache_sync((void *)addr,len, DMA_BIDIRECTIONAL); } while (0)
#define PA_I82596_RESET 0 /* Offsets relative to LASI-LAN-Addr.*/ #define PA_I82596_RESET 0 /* Offsets relative to LASI-LAN-Addr.*/
...@@ -383,6 +384,7 @@ struct i596_private { ...@@ -383,6 +384,7 @@ struct i596_private {
int options; int options;
spinlock_t lock; spinlock_t lock;
dma_addr_t dma_addr; dma_addr_t dma_addr;
struct device *dev;
}; };
static char init_setup[] = static char init_setup[] =
...@@ -402,10 +404,6 @@ static char init_setup[] = ...@@ -402,10 +404,6 @@ static char init_setup[] =
0x00, 0x00,
0x7f /* *multi IA */ }; 0x7f /* *multi IA */ };
static struct pci_dev *fake_pci_dev; /* The fake pci_dev needed for
pci_* functions under ccio. */
static int dma_consistent = 1; /* Zero if pci_alloc_consistent() fails */
static int i596_open(struct net_device *dev); static int i596_open(struct net_device *dev);
static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev); static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev);
static void i596_interrupt(int irq, void *dev_id, struct pt_regs *regs); static void i596_interrupt(int irq, void *dev_id, struct pt_regs *regs);
...@@ -558,8 +556,8 @@ static inline void init_rx_bufs(struct net_device *dev) ...@@ -558,8 +556,8 @@ static inline void init_rx_bufs(struct net_device *dev)
if (skb == NULL) if (skb == NULL)
panic("82596: alloc_skb() failed"); panic("82596: alloc_skb() failed");
skb_reserve(skb, 2); skb_reserve(skb, 2);
dma_addr = pci_map_single(fake_pci_dev, skb->tail,PKT_BUF_SZ, dma_addr = dma_map_single(lp->dev, skb->tail,PKT_BUF_SZ,
PCI_DMA_FROMDEVICE); DMA_FROM_DEVICE);
skb->dev = dev; skb->dev = dev;
rbd->v_next = rbd+1; rbd->v_next = rbd+1;
rbd->b_next = WSWAPrbd(virt_to_dma(lp,rbd+1)); rbd->b_next = WSWAPrbd(virt_to_dma(lp,rbd+1));
...@@ -605,9 +603,9 @@ static inline void remove_rx_bufs(struct net_device *dev) ...@@ -605,9 +603,9 @@ static inline void remove_rx_bufs(struct net_device *dev)
for (i = 0, rbd = lp->rbds; i < rx_ring_size; i++, rbd++) { for (i = 0, rbd = lp->rbds; i < rx_ring_size; i++, rbd++) {
if (rbd->skb == NULL) if (rbd->skb == NULL)
break; break;
pci_unmap_single(fake_pci_dev, dma_unmap_single(lp->dev,
(dma_addr_t)WSWAPchar(rbd->b_data), (dma_addr_t)WSWAPchar(rbd->b_data),
PKT_BUF_SZ, PCI_DMA_FROMDEVICE); PKT_BUF_SZ, DMA_FROM_DEVICE);
dev_kfree_skb(rbd->skb); dev_kfree_skb(rbd->skb);
} }
} }
...@@ -774,7 +772,7 @@ static inline int i596_rx(struct net_device *dev) ...@@ -774,7 +772,7 @@ static inline int i596_rx(struct net_device *dev)
struct sk_buff *newskb; struct sk_buff *newskb;
dma_addr_t dma_addr; dma_addr_t dma_addr;
pci_unmap_single(fake_pci_dev,(dma_addr_t)WSWAPchar(rbd->b_data), PKT_BUF_SZ, PCI_DMA_FROMDEVICE); dma_unmap_single(lp->dev,(dma_addr_t)WSWAPchar(rbd->b_data), PKT_BUF_SZ, DMA_FROM_DEVICE);
/* Get fresh skbuff to replace filled one. */ /* Get fresh skbuff to replace filled one. */
newskb = dev_alloc_skb(PKT_BUF_SZ + 4); newskb = dev_alloc_skb(PKT_BUF_SZ + 4);
if (newskb == NULL) { if (newskb == NULL) {
...@@ -788,7 +786,7 @@ static inline int i596_rx(struct net_device *dev) ...@@ -788,7 +786,7 @@ static inline int i596_rx(struct net_device *dev)
rx_in_place = 1; rx_in_place = 1;
rbd->skb = newskb; rbd->skb = newskb;
newskb->dev = dev; newskb->dev = dev;
dma_addr = pci_map_single(fake_pci_dev, newskb->tail, PKT_BUF_SZ, PCI_DMA_FROMDEVICE); dma_addr = dma_map_single(lp->dev, newskb->tail, PKT_BUF_SZ, DMA_FROM_DEVICE);
rbd->v_data = newskb->tail; rbd->v_data = newskb->tail;
rbd->b_data = WSWAPchar(dma_addr); rbd->b_data = WSWAPchar(dma_addr);
CHECK_WBACK_INV(rbd, sizeof(struct i596_rbd)); CHECK_WBACK_INV(rbd, sizeof(struct i596_rbd));
...@@ -805,7 +803,7 @@ static inline int i596_rx(struct net_device *dev) ...@@ -805,7 +803,7 @@ static inline int i596_rx(struct net_device *dev)
skb->dev = dev; skb->dev = dev;
if (!rx_in_place) { if (!rx_in_place) {
/* 16 byte align the data fields */ /* 16 byte align the data fields */
pci_dma_sync_single(fake_pci_dev, (dma_addr_t)WSWAPchar(rbd->b_data), PKT_BUF_SZ, PCI_DMA_FROMDEVICE); dma_sync_single(lp->dev, (dma_addr_t)WSWAPchar(rbd->b_data), PKT_BUF_SZ, DMA_FROM_DEVICE);
skb_reserve(skb, 2); skb_reserve(skb, 2);
memcpy(skb_put(skb,pkt_len), rbd->v_data, pkt_len); memcpy(skb_put(skb,pkt_len), rbd->v_data, pkt_len);
} }
...@@ -886,7 +884,7 @@ static inline void i596_cleanup_cmd(struct net_device *dev, struct i596_private ...@@ -886,7 +884,7 @@ static inline void i596_cleanup_cmd(struct net_device *dev, struct i596_private
{ {
struct tx_cmd *tx_cmd = (struct tx_cmd *) ptr; struct tx_cmd *tx_cmd = (struct tx_cmd *) ptr;
struct sk_buff *skb = tx_cmd->skb; struct sk_buff *skb = tx_cmd->skb;
pci_unmap_single(fake_pci_dev, tx_cmd->dma_addr, skb->len, PCI_DMA_TODEVICE); dma_unmap_single(lp->dev, tx_cmd->dma_addr, skb->len, DMA_TO_DEVICE);
dev_kfree_skb(skb); dev_kfree_skb(skb);
...@@ -1118,8 +1116,8 @@ static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -1118,8 +1116,8 @@ static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev)
tbd->pad = 0; tbd->pad = 0;
tbd->size = EOF | length; tbd->size = EOF | length;
tx_cmd->dma_addr = pci_map_single(fake_pci_dev, skb->data, skb->len, tx_cmd->dma_addr = dma_map_single(lp->dev, skb->data, skb->len,
PCI_DMA_TODEVICE); DMA_TO_DEVICE);
tbd->data = WSWAPchar(tx_cmd->dma_addr); tbd->data = WSWAPchar(tx_cmd->dma_addr);
DEB(DEB_TXADDR,print_eth(skb->data, "tx-queued")); DEB(DEB_TXADDR,print_eth(skb->data, "tx-queued"));
...@@ -1156,6 +1154,8 @@ static int __devinit i82596_probe(struct net_device *dev) ...@@ -1156,6 +1154,8 @@ static int __devinit i82596_probe(struct net_device *dev)
{ {
int i; int i;
struct i596_private *lp; struct i596_private *lp;
/* we're going to overwrite dev->priv, so pull the device out */
struct device *gen_dev = dev->priv;
char eth_addr[6]; char eth_addr[6];
dma_addr_t dma_addr; dma_addr_t dma_addr;
...@@ -1198,18 +1198,12 @@ static int __devinit i82596_probe(struct net_device *dev) ...@@ -1198,18 +1198,12 @@ static int __devinit i82596_probe(struct net_device *dev)
printk("82596.c: MAC of HP700 LAN read from EEPROM\n"); printk("82596.c: MAC of HP700 LAN read from EEPROM\n");
} }
dev->mem_start = (unsigned long) pci_alloc_consistent(fake_pci_dev, dev->mem_start = (unsigned long) dma_alloc_noncoherent(gen_dev,
sizeof(struct i596_private), &dma_addr); sizeof(struct i596_private), &dma_addr, GFP_KERNEL);
if (!dev->mem_start) {
printk("%s: Couldn't get consistent shared memory\n", dev->name);
dma_consistent = 0;
dev->mem_start = (int)__get_free_pages(GFP_ATOMIC, 0);
if (!dev->mem_start) { if (!dev->mem_start) {
printk("%s: Couldn't get shared memory\n", dev->name); printk("%s: Couldn't get shared memory\n", dev->name);
return -ENOMEM; return -ENOMEM;
} }
dma_addr = virt_to_bus(dev->mem_start);
}
ether_setup(dev); ether_setup(dev);
DEB(DEB_PROBE,printk("%s: 82596 at %#3lx,", dev->name, dev->base_addr)); DEB(DEB_PROBE,printk("%s: 82596 at %#3lx,", dev->name, dev->base_addr));
...@@ -1243,6 +1237,7 @@ static int __devinit i82596_probe(struct net_device *dev) ...@@ -1243,6 +1237,7 @@ static int __devinit i82596_probe(struct net_device *dev)
lp->scb.rfd = I596_NULL; lp->scb.rfd = I596_NULL;
lp->lock = SPIN_LOCK_UNLOCKED; lp->lock = SPIN_LOCK_UNLOCKED;
lp->dma_addr = dma_addr; lp->dma_addr = dma_addr;
lp->dev = gen_dev;
CHECK_WBACK_INV(dev->mem_start, sizeof(struct i596_private)); CHECK_WBACK_INV(dev->mem_start, sizeof(struct i596_private));
...@@ -1320,7 +1315,7 @@ static void i596_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -1320,7 +1315,7 @@ static void i596_interrupt(int irq, void *dev_id, struct pt_regs *regs)
if ((ptr->status) & 0x1000) if ((ptr->status) & 0x1000)
lp->stats.tx_aborted_errors++; lp->stats.tx_aborted_errors++;
} }
pci_unmap_single(fake_pci_dev, tx_cmd->dma_addr, skb->len, PCI_DMA_TODEVICE); dma_unmap_single(lp->dev, tx_cmd->dma_addr, skb->len, DMA_TO_DEVICE);
dev_kfree_skb_irq(skb); dev_kfree_skb_irq(skb);
tx_cmd->cmd.command = 0; /* Mark free */ tx_cmd->cmd.command = 0; /* Mark free */
...@@ -1530,8 +1525,6 @@ lan_init_chip(struct parisc_device *dev) ...@@ -1530,8 +1525,6 @@ lan_init_chip(struct parisc_device *dev)
return -ENODEV; return -ENODEV;
} }
fake_pci_dev = ccio_get_fake(dev);
if (!dev->irq) { if (!dev->irq) {
printk(KERN_ERR __FILE__ ": IRQ not found for i82596 at 0x%lx\n", dev->hpa); printk(KERN_ERR __FILE__ ": IRQ not found for i82596 at 0x%lx\n", dev->hpa);
return -ENODEV; return -ENODEV;
...@@ -1546,6 +1539,7 @@ lan_init_chip(struct parisc_device *dev) ...@@ -1546,6 +1539,7 @@ lan_init_chip(struct parisc_device *dev)
netdevice->base_addr = dev->hpa; netdevice->base_addr = dev->hpa;
netdevice->irq = dev->irq; netdevice->irq = dev->irq;
netdevice->init = i82596_probe; netdevice->init = i82596_probe;
netdevice->priv = &dev->dev;
retval = register_netdev(netdevice); retval = register_netdev(netdevice);
if (retval) { if (retval) {
...@@ -1601,13 +1595,8 @@ static void __exit lasi_82596_exit(void) ...@@ -1601,13 +1595,8 @@ static void __exit lasi_82596_exit(void)
unregister_netdev(netdevice); unregister_netdev(netdevice);
lp = (struct i596_private *) netdevice->priv; lp = (struct i596_private *) netdevice->priv;
if (dma_consistent) dma_free_noncoherent(lp->dev, sizeof(struct i596_private),
pci_free_consistent(fake_pci_dev,
sizeof(struct i596_private),
(void *)netdevice->mem_start, lp->dma_addr); (void *)netdevice->mem_start, lp->dma_addr);
else
free_page(netdevice->mem_start);
netdevice->priv = NULL; netdevice->priv = NULL;
} }
......
...@@ -1555,38 +1555,6 @@ static int ccio_probe(struct parisc_device *dev) ...@@ -1555,38 +1555,6 @@ static int ccio_probe(struct parisc_device *dev)
return 0; return 0;
} }
struct pci_dev * ccio_get_fake(const struct parisc_device *dev)
{
struct ioc *ioc;
dev = find_pa_parent_type(dev, HPHW_IOA);
if(!dev)
return NULL;
ioc = ccio_find_ioc(dev->hw_path);
if(!ioc)
return NULL;
if(ioc->fake_pci_dev)
return ioc->fake_pci_dev;
ioc->fake_pci_dev = kmalloc(sizeof(struct pci_dev), GFP_KERNEL);
if(ioc->fake_pci_dev == NULL) {
printk(KERN_ERR MODULE_NAME ": memory allocation failure\n");
return NULL;
}
memset(ioc->fake_pci_dev, 0, sizeof(struct pci_dev));
ioc->fake_pci_dev->dev.platform_data = kmalloc(sizeof(struct pci_hba_data), GFP_KERNEL);
if(ioc->fake_pci_dev->dev.platform_data == NULL) {
printk(KERN_ERR MODULE_NAME ": memory allocation failure\n");
return NULL;
}
HBA_DATA(ioc->fake_pci_dev->dev.platform_data)->iommu = ioc;
return ioc->fake_pci_dev;
}
/* We *can't* support JAVA (T600). Venture there at your own risk. */ /* We *can't* support JAVA (T600). Venture there at your own risk. */
static struct parisc_device_id ccio_tbl[] = { static struct parisc_device_id ccio_tbl[] = {
{ HPHW_IOA, HVERSION_REV_ANY_ID, U2_IOA_RUNWAY, 0xb }, /* U2 */ { HPHW_IOA, HVERSION_REV_ANY_ID, U2_IOA_RUNWAY, 0xb }, /* U2 */
......
...@@ -974,8 +974,8 @@ sba_unmap_single(struct device *dev, dma_addr_t iova, size_t size, ...@@ -974,8 +974,8 @@ sba_unmap_single(struct device *dev, dma_addr_t iova, size_t size,
* *
* See Documentation/DMA-mapping.txt * See Documentation/DMA-mapping.txt
*/ */
static void * static void *sba_alloc_consistent(struct device *hwdev, size_t size,
sba_alloc_consistent(struct device *hwdev, size_t size, dma_addr_t *dma_handle) dma_addr_t *dma_handle, int gfp)
{ {
void *ret; void *ret;
...@@ -985,7 +985,7 @@ sba_alloc_consistent(struct device *hwdev, size_t size, dma_addr_t *dma_handle) ...@@ -985,7 +985,7 @@ sba_alloc_consistent(struct device *hwdev, size_t size, dma_addr_t *dma_handle)
return 0; return 0;
} }
ret = (void *) __get_free_pages(GFP_ATOMIC, get_order(size)); ret = (void *) __get_free_pages(gfp, get_order(size));
if (ret) { if (ret) {
memset(ret, 0, size); memset(ret, 0, size);
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include <linux/parport.h> #include <linux/parport.h>
#include <asm/pdc.h> #include <asm/pdc.h>
#include <asm/parisc-device.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/parport_gsc.h> #include <asm/parport_gsc.h>
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <linux/types.h> #include <linux/types.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/parisc-device.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/serial.h> #include <asm/serial.h>
...@@ -32,6 +33,7 @@ static void setup_parisc_serial(struct serial_struct *serial, ...@@ -32,6 +33,7 @@ static void setup_parisc_serial(struct serial_struct *serial,
serial->type = PORT_16550A; serial->type = PORT_16550A;
serial->line = line; serial->line = line;
serial->iomap_base = address;
serial->iomem_base = ioremap(address, 0x8); serial->iomem_base = ioremap(address, 0x8);
serial->irq = irq; serial->irq = irq;
...@@ -91,11 +93,13 @@ static struct parisc_device_id serial_tbl[] = { ...@@ -91,11 +93,13 @@ static struct parisc_device_id serial_tbl[] = {
{ 0 } { 0 }
}; };
/* Hack. Dino's serial port will get listed first on some machines. /* Hack. Some machines have SERIAL_0 attached to Lasi and SERIAL_1
* So we register this driver first which knows about Lasi's serial port. * attached to Dino. Unfortunately, Dino appears before Lasi in the device
* This needs to get fixed properly somehow. * tree. To ensure that ttyS0 == SERIAL_0, we register two drivers; one
* which only knows about Lasi and then a second which will find all the
* other serial ports. HPUX ignores this problem.
*/ */
static struct parisc_device_id serial1_tbl[] = { static struct parisc_device_id lasi_tbl[] = {
{ HPHW_FIO, HVERSION_REV_ANY_ID, 0x03B, 0x0008C }, /* C1xx/C1xxL */ { HPHW_FIO, HVERSION_REV_ANY_ID, 0x03B, 0x0008C }, /* C1xx/C1xxL */
{ HPHW_FIO, HVERSION_REV_ANY_ID, 0x03C, 0x0008C }, /* B132L */ { HPHW_FIO, HVERSION_REV_ANY_ID, 0x03C, 0x0008C }, /* B132L */
{ HPHW_FIO, HVERSION_REV_ANY_ID, 0x03D, 0x0008C }, /* B160L */ { HPHW_FIO, HVERSION_REV_ANY_ID, 0x03D, 0x0008C }, /* B160L */
...@@ -111,9 +115,9 @@ static struct parisc_device_id serial1_tbl[] = { ...@@ -111,9 +115,9 @@ static struct parisc_device_id serial1_tbl[] = {
MODULE_DEVICE_TABLE(parisc, serial_tbl); MODULE_DEVICE_TABLE(parisc, serial_tbl);
static struct parisc_driver serial1_driver = { static struct parisc_driver lasi_driver = {
.name = "Serial RS232", .name = "Lasi RS232",
.id_table = serial1_tbl, .id_table = lasi_tbl,
.probe = serial_init_chip, .probe = serial_init_chip,
}; };
...@@ -125,7 +129,7 @@ static struct parisc_driver serial_driver = { ...@@ -125,7 +129,7 @@ static struct parisc_driver serial_driver = {
int __init probe_serial_gsc(void) int __init probe_serial_gsc(void)
{ {
register_parisc_driver(&serial1_driver); register_parisc_driver(&lasi_driver);
register_parisc_driver(&serial_driver); register_parisc_driver(&serial_driver);
return 0; return 0;
} }
......
...@@ -23,7 +23,9 @@ ...@@ -23,7 +23,9 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/console.h> #include <linux/console.h>
#include <linux/slab.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/parisc-device.h>
#ifdef CONFIG_MAGIC_SYSRQ #ifdef CONFIG_MAGIC_SYSRQ
#include <linux/sysrq.h> #include <linux/sysrq.h>
...@@ -32,34 +34,35 @@ ...@@ -32,34 +34,35 @@
#include <linux/serial_core.h> #include <linux/serial_core.h>
#define MUX_NR 1
#define MUX_OFFSET 0x800 #define MUX_OFFSET 0x800
#define MUX_LINE_OFFSET 0x80 #define MUX_LINE_OFFSET 0x80
#define MUX_FIFO_SIZE 255 #define MUX_FIFO_SIZE 255
#define MUX_MIN_FREE_SIZE 32
#define MUX_FIFO_DRAIN_DELAY 1
#define MUX_POLL_DELAY (30 * HZ / 1000) #define MUX_POLL_DELAY (30 * HZ / 1000)
#define IO_COMMAND_REG_OFFSET 0x30
#define IO_STATUS_REG_OFFSET 0x34
#define IO_DATA_REG_OFFSET 0x3c #define IO_DATA_REG_OFFSET 0x3c
#define IO_DCOUNT_REG_OFFSET 0x40 #define IO_DCOUNT_REG_OFFSET 0x40
#define IO_UCOUNT_REG_OFFSET 0x44
#define IO_FIFOS_REG_OFFSET 0x48
#define MUX_EOFIFO(status) ((status & 0xF000) == 0xF000) #define MUX_EOFIFO(status) ((status & 0xF000) == 0xF000)
#define MUX_STATUS(status) ((status & 0xF000) == 0x8000) #define MUX_STATUS(status) ((status & 0xF000) == 0x8000)
#define MUX_BREAK(status) ((status & 0xF000) == 0x2000) #define MUX_BREAK(status) ((status & 0xF000) == 0x2000)
#define UART_NR 8
struct mux_card {
struct uart_port ports[UART_NR];
struct uart_driver drv;
struct mux_card *next;
};
static struct mux_card mux_card_head = {
.next = NULL,
};
static struct uart_port mux_ports[MUX_NR];
static struct timer_list mux_timer; static struct timer_list mux_timer;
#define UART_PUT_CHAR(p, c) __raw_writel((c), (unsigned long)(p)->membase + IO_DATA_REG_OFFSET) #define UART_PUT_CHAR(p, c) __raw_writel((c), (unsigned long)(p)->membase + IO_DATA_REG_OFFSET)
#define UART_GET_FIFO_CNT(p) __raw_readl((unsigned long)(p)->membase + IO_DCOUNT_REG_OFFSET) #define UART_GET_FIFO_CNT(p) __raw_readl((unsigned long)(p)->membase + IO_DCOUNT_REG_OFFSET)
#define GET_MUX_PORTS(iodc_data) ((((iodc_data)[4] & 0xf0) >> 4) * 8) + 8
/** /**
* mux_tx_empty - Check if the transmitter fifo is empty. * mux_tx_empty - Check if the transmitter fifo is empty.
...@@ -205,8 +208,8 @@ static void mux_write(struct uart_port *port) ...@@ -205,8 +208,8 @@ static void mux_write(struct uart_port *port)
static void mux_read(struct uart_port *port) static void mux_read(struct uart_port *port)
{ {
int data; int data;
__u32 start_count = port->icount.rx;
struct tty_struct *tty = port->info->tty; struct tty_struct *tty = port->info->tty;
__u32 start_count = port->icount.rx;
while(1) { while(1) {
data = __raw_readl((unsigned long)port->membase data = __raw_readl((unsigned long)port->membase
...@@ -294,7 +297,7 @@ static const char *mux_type(struct uart_port *port) ...@@ -294,7 +297,7 @@ static const char *mux_type(struct uart_port *port)
} }
/** /**
* release_port - Release memory and IO regions. * mux_release_port - Release memory and IO regions.
* @port: Ptr to the uart_port. * @port: Ptr to the uart_port.
* *
* Release any memory and IO region resources currently in use by * Release any memory and IO region resources currently in use by
...@@ -357,10 +360,19 @@ static int mux_verify_port(struct uart_port *port, struct serial_struct *ser) ...@@ -357,10 +360,19 @@ static int mux_verify_port(struct uart_port *port, struct serial_struct *ser)
*/ */
static void mux_poll(unsigned long unused) static void mux_poll(unsigned long unused)
{ {
struct uart_port *port = &mux_ports[0]; int i;
struct mux_card *card = &mux_card_head;
while(card) {
for(i = 0; i < UART_NR; ++i) {
if(!card->ports[i].info)
continue;
mux_read(port); mux_read(&card->ports[i]);
mux_write(port); mux_write(&card->ports[i]);
}
card = card->next;
}
mod_timer(&mux_timer, jiffies + MUX_POLL_DELAY); mod_timer(&mux_timer, jiffies + MUX_POLL_DELAY);
} }
...@@ -395,20 +407,6 @@ static struct uart_ops mux_pops = { ...@@ -395,20 +407,6 @@ static struct uart_ops mux_pops = {
.verify_port = mux_verify_port, .verify_port = mux_verify_port,
}; };
static struct uart_driver mux_reg = {
.owner = THIS_MODULE,
.driver_name = "ttyB",
#ifdef CONFIG_DEVFS_FS
.dev_name = "ttyB%d",
#else
.dev_name = "ttyB%d",
#endif
.major = MUX_MAJOR,
.minor = 0,
.nr = MUX_NR,
.cons = MUX_CONSOLE,
};
/** /**
* mux_probe - Determine if the Serial Mux should claim this device. * mux_probe - Determine if the Serial Mux should claim this device.
* @dev: The parisc device. * @dev: The parisc device.
...@@ -418,23 +416,63 @@ static struct uart_driver mux_reg = { ...@@ -418,23 +416,63 @@ static struct uart_driver mux_reg = {
*/ */
static int __init mux_probe(struct parisc_device *dev) static int __init mux_probe(struct parisc_device *dev)
{ {
int i, ret; int i, j, ret, ports, port_cnt = 0;
struct uart_port *port = &mux_ports[0]; u8 iodc_data[8];
unsigned long bytecnt;
struct uart_port *port;
struct mux_card *card = &mux_card_head;
ret = pdc_iodc_read(&bytecnt, dev->hpa, 0, iodc_data, 8);
if(ret != PDC_OK) {
printk(KERN_ERR "Serial mux: Unable to read IODC.\n");
return 1;
}
ports = GET_MUX_PORTS(iodc_data);
printk(KERN_INFO "Serial mux driver (%d ports) Revision: 0.2\n",
ports);
if(!card->drv.nr) {
init_timer(&mux_timer); init_timer(&mux_timer);
mux_timer.function = mux_poll; mux_timer.function = mux_poll;
} else {
port_cnt += UART_NR;
while(card->next) {
card = card->next;
port_cnt += UART_NR;
}
}
printk(KERN_INFO "Serial mux driver Revision: 0.1\n"); for(i = 0; i < ports / UART_NR; ++i) {
if(card->drv.nr) {
card->next = kmalloc(sizeof(struct mux_card), GFP_KERNEL);
if(!card->next) {
printk(KERN_ERR "Serial mux: Unable to allocate memory.\n");
return 1;
}
memset(card->next, '\0', sizeof(struct mux_card));
card = card->next;
}
ret = uart_register_driver(&mux_reg); card->drv.owner = THIS_MODULE;
if (ret) card->drv.driver_name = "ttyB";
return ret; card->drv.dev_name = "ttyB%d";
card->drv.major = MUX_MAJOR;
card->drv.minor = port_cnt;
card->drv.nr = UART_NR;
card->drv.cons = MUX_CONSOLE;
ret = uart_register_driver(&card->drv);
if(ret) {
printk(KERN_ERR "Serial mux: Unable to register driver.\n");
return 1;
}
for (i = 0; i < MUX_NR; i++) { for(j = 0; j < UART_NR; ++j) {
port = &mux_ports[i]; port = &card->ports[j];
port->iobase = 0; port->iobase = 0;
port->mapbase = dev->hpa + MUX_OFFSET + (i * MUX_LINE_OFFSET); port->mapbase = dev->hpa + MUX_OFFSET + (j * MUX_LINE_OFFSET);
port->membase = ioremap(port->mapbase, MUX_LINE_OFFSET); port->membase = ioremap(port->mapbase, MUX_LINE_OFFSET);
port->iotype = SERIAL_IO_MEM; port->iotype = SERIAL_IO_MEM;
port->type = PORT_MUX; port->type = PORT_MUX;
...@@ -443,11 +481,12 @@ static int __init mux_probe(struct parisc_device *dev) ...@@ -443,11 +481,12 @@ static int __init mux_probe(struct parisc_device *dev)
port->fifosize = MUX_FIFO_SIZE; port->fifosize = MUX_FIFO_SIZE;
port->ops = &mux_pops; port->ops = &mux_pops;
port->flags = UPF_BOOT_AUTOCONF; port->flags = UPF_BOOT_AUTOCONF;
port->line = 0; port->line = j;
ret = uart_add_one_port(&card->drv, port);
uart_add_one_port(&mux_reg, port); BUG_ON(ret);
}
port_cnt += UART_NR;
} }
return 0; return 0;
} }
...@@ -459,7 +498,7 @@ static struct parisc_device_id mux_tbl[] = { ...@@ -459,7 +498,7 @@ static struct parisc_device_id mux_tbl[] = {
MODULE_DEVICE_TABLE(parisc, mux_tbl); MODULE_DEVICE_TABLE(parisc, mux_tbl);
static struct parisc_driver mux_driver = { static struct parisc_driver mux_driver = {
.name = "Serial MUX driver", .name = "Serial MUX",
.id_table = mux_tbl, .id_table = mux_tbl,
.probe = mux_probe, .probe = mux_probe,
}; };
...@@ -482,12 +521,13 @@ static int __init mux_init(void) ...@@ -482,12 +521,13 @@ static int __init mux_init(void)
static void __exit mux_exit(void) static void __exit mux_exit(void)
{ {
int i; int i;
struct mux_card *card = &mux_card_head;
for (i = 0; i < MUX_NR; i++) { for (i = 0; i < UART_NR; i++) {
uart_remove_one_port(&mux_reg, &mux_ports[i]); uart_remove_one_port(&card->drv, &card->ports[i]);
} }
uart_unregister_driver(&mux_reg); uart_unregister_driver(&card->drv);
} }
module_init(mux_init); module_init(mux_init);
......
...@@ -56,7 +56,7 @@ static int som_core_dump(long signr, struct pt_regs * regs); ...@@ -56,7 +56,7 @@ static int som_core_dump(long signr, struct pt_regs * regs);
static struct linux_binfmt som_format = { static struct linux_binfmt som_format = {
.module = THIS_MODULE, .module = THIS_MODULE,
.load_binary = load_som_binary, .load_binary = load_som_binary,
.load_library = load_som_library, .load_shlib = load_som_library,
.core_dump = som_core_dump, .core_dump = som_core_dump,
.min_coredump = SOM_PAGESIZE .min_coredump = SOM_PAGESIZE
}; };
......
...@@ -257,7 +257,14 @@ static __inline__ int ffs(int x) ...@@ -257,7 +257,14 @@ static __inline__ int ffs(int x)
* hweightN: returns the hamming weight (i.e. the number * hweightN: returns the hamming weight (i.e. the number
* of bits set) of a N-bit word * of bits set) of a N-bit word
*/ */
#define hweight64(x) \
({ \
unsigned long __x = (x); \
unsigned int __w; \
__w = generic_hweight32((unsigned int) __x); \
__w += generic_hweight32((unsigned int) (__x>>32)); \
__w; \
})
#define hweight32(x) generic_hweight32(x) #define hweight32(x) generic_hweight32(x)
#define hweight16(x) generic_hweight16(x) #define hweight16(x) generic_hweight16(x)
#define hweight8(x) generic_hweight8(x) #define hweight8(x) generic_hweight8(x)
......
...@@ -72,4 +72,24 @@ struct compat_flock { ...@@ -72,4 +72,24 @@ struct compat_flock {
compat_pid_t l_pid; compat_pid_t l_pid;
}; };
struct compat_statfs {
s32 f_type;
s32 f_bsize;
s32 f_blocks;
s32 f_bfree;
s32 f_bavail;
s32 f_files;
s32 f_ffree;
__kernel_fsid_t f_fsid;
s32 f_namelen;
s32 f_spare[6];
};
typedef u32 compat_old_sigset_t; /* at least 32 bits */
#define _COMPAT_NSIG 64
#define _COMPAT_NSIG_BPW BITS_PER_LONG
typedef u32 compat_sigset_word;
#endif /* _ASM_PARISC_COMPAT_H */ #endif /* _ASM_PARISC_COMPAT_H */
...@@ -203,7 +203,6 @@ parisc_walk_tree(struct device *dev) ...@@ -203,7 +203,6 @@ parisc_walk_tree(struct device *dev)
struct parisc_device; struct parisc_device;
struct ioc; struct ioc;
void * ccio_get_iommu(const struct parisc_device *dev); void * ccio_get_iommu(const struct parisc_device *dev);
struct pci_dev * ccio_get_fake(const struct parisc_device *dev);
int ccio_request_resource(const struct parisc_device *dev, int ccio_request_resource(const struct parisc_device *dev,
struct resource *res); struct resource *res);
int ccio_allocate_resource(const struct parisc_device *dev, int ccio_allocate_resource(const struct parisc_device *dev,
...@@ -213,7 +212,6 @@ int ccio_allocate_resource(const struct parisc_device *dev, ...@@ -213,7 +212,6 @@ int ccio_allocate_resource(const struct parisc_device *dev,
void *alignf_data); void *alignf_data);
#else /* !CONFIG_IOMMU_CCIO */ #else /* !CONFIG_IOMMU_CCIO */
#define ccio_get_iommu(dev) NULL #define ccio_get_iommu(dev) NULL
#define ccio_get_fake(dev) NULL
#define ccio_request_resource(dev, res) request_resource(&iomem_resource, res) #define ccio_request_resource(dev, res) request_resource(&iomem_resource, res)
#define ccio_allocate_resource(dev, res, size, min, max, align, alignf, data) \ #define ccio_allocate_resource(dev, res, size, min, max, align, alignf, data) \
allocate_resource(&iomem_resource, res, size, min, max, \ allocate_resource(&iomem_resource, res, size, min, max, \
......
...@@ -7,10 +7,14 @@ ...@@ -7,10 +7,14 @@
#define Elf_Shdr Elf64_Shdr #define Elf_Shdr Elf64_Shdr
#define Elf_Sym Elf64_Sym #define Elf_Sym Elf64_Sym
#define Elf_Ehdr Elf64_Ehdr #define Elf_Ehdr Elf64_Ehdr
#define Elf_Addr Elf64_Addr
#define Elf_Rela Elf64_Rela
#else #else
#define Elf_Shdr Elf32_Shdr #define Elf_Shdr Elf32_Shdr
#define Elf_Sym Elf32_Sym #define Elf_Sym Elf32_Sym
#define Elf_Ehdr Elf32_Ehdr #define Elf_Ehdr Elf32_Ehdr
#define Elf_Addr Elf32_Addr
#define Elf_Rela Elf32_Rela
#endif #endif
#define module_map(x) vmalloc(x) #define module_map(x) vmalloc(x)
...@@ -20,6 +24,10 @@ ...@@ -20,6 +24,10 @@
struct mod_arch_specific struct mod_arch_specific
{ {
unsigned long got_offset;
unsigned long fdesc_offset, fdesc_count;
unsigned long stub_offset;
unsigned long stub_count;
}; };
#endif /* _ASM_PARISC_MODULE_H */ #endif /* _ASM_PARISC_MODULE_H */
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#define PDC_OS_BOOT_RENDEZVOUS_HI 0x28 #define PDC_OS_BOOT_RENDEZVOUS_HI 0x28
#ifndef ASSEMBLY #ifndef ASSEMBLY
#include <linux/bitops.h>
#include <linux/threads.h> /* for NR_CPUS */ #include <linux/threads.h> /* for NR_CPUS */
typedef unsigned long address_t; typedef unsigned long address_t;
......
...@@ -519,6 +519,174 @@ typedef struct { ...@@ -519,6 +519,174 @@ typedef struct {
#define EF_ALPHA_32BIT 1 /* All addresses are below 2GB */ #define EF_ALPHA_32BIT 1 /* All addresses are below 2GB */
/* HPPA specific definitions. */
/* Legal values for e_flags field of Elf32_Ehdr. */
#define EF_PARISC_TRAPNIL 0x00010000 /* Trap nil pointer dereference. */
#define EF_PARISC_EXT 0x00020000 /* Program uses arch. extensions. */
#define EF_PARISC_LSB 0x00040000 /* Program expects little endian. */
#define EF_PARISC_WIDE 0x00080000 /* Program expects wide mode. */
#define EF_PARISC_NO_KABP 0x00100000 /* No kernel assisted branch
prediction. */
#define EF_PARISC_LAZYSWAP 0x00400000 /* Allow lazy swapping. */
#define EF_PARISC_ARCH 0x0000ffff /* Architecture version. */
/* Defined values for `e_flags & EF_PARISC_ARCH' are: */
#define EFA_PARISC_1_0 0x020b /* PA-RISC 1.0 big-endian. */
#define EFA_PARISC_1_1 0x0210 /* PA-RISC 1.1 big-endian. */
#define EFA_PARISC_2_0 0x0214 /* PA-RISC 2.0 big-endian. */
/* Additional section indeces. */
#define SHN_PARISC_ANSI_COMMON 0xff00 /* Section for tenatively declared
symbols in ANSI C. */
#define SHN_PARISC_HUGE_COMMON 0xff01 /* Common blocks in huge model. */
/* Legal values for sh_type field of Elf32_Shdr. */
#define SHT_PARISC_EXT 0x70000000 /* Contains product specific ext. */
#define SHT_PARISC_UNWIND 0x70000001 /* Unwind information. */
#define SHT_PARISC_DOC 0x70000002 /* Debug info for optimized code. */
/* Legal values for sh_flags field of Elf32_Shdr. */
#define SHF_PARISC_SHORT 0x20000000 /* Section with short addressing. */
#define SHF_PARISC_HUGE 0x40000000 /* Section far from gp. */
#define SHF_PARISC_SBP 0x80000000 /* Static branch prediction code. */
/* Legal values for ST_TYPE subfield of st_info (symbol type). */
#define STT_PARISC_MILLICODE 13 /* Millicode function entry point. */
#define STT_HP_OPAQUE (STT_LOOS + 0x1)
#define STT_HP_STUB (STT_LOOS + 0x2)
/* HPPA relocs. */
#define R_PARISC_NONE 0 /* No reloc. */
#define R_PARISC_DIR32 1 /* Direct 32-bit reference. */
#define R_PARISC_DIR21L 2 /* Left 21 bits of eff. address. */
#define R_PARISC_DIR17R 3 /* Right 17 bits of eff. address. */
#define R_PARISC_DIR17F 4 /* 17 bits of eff. address. */
#define R_PARISC_DIR14R 6 /* Right 14 bits of eff. address. */
#define R_PARISC_PCREL32 9 /* 32-bit rel. address. */
#define R_PARISC_PCREL21L 10 /* Left 21 bits of rel. address. */
#define R_PARISC_PCREL17R 11 /* Right 17 bits of rel. address. */
#define R_PARISC_PCREL17F 12 /* 17 bits of rel. address. */
#define R_PARISC_PCREL14R 14 /* Right 14 bits of rel. address. */
#define R_PARISC_DPREL21L 18 /* Left 21 bits of rel. address. */
#define R_PARISC_DPREL14R 22 /* Right 14 bits of rel. address. */
#define R_PARISC_GPREL21L 26 /* GP-relative, left 21 bits. */
#define R_PARISC_GPREL14R 30 /* GP-relative, right 14 bits. */
#define R_PARISC_LTOFF21L 34 /* LT-relative, left 21 bits. */
#define R_PARISC_LTOFF14R 38 /* LT-relative, right 14 bits. */
#define R_PARISC_SECREL32 41 /* 32 bits section rel. address. */
#define R_PARISC_SEGBASE 48 /* No relocation, set segment base. */
#define R_PARISC_SEGREL32 49 /* 32 bits segment rel. address. */
#define R_PARISC_PLTOFF21L 50 /* PLT rel. address, left 21 bits. */
#define R_PARISC_PLTOFF14R 54 /* PLT rel. address, right 14 bits. */
#define R_PARISC_LTOFF_FPTR32 57 /* 32 bits LT-rel. function pointer. */
#define R_PARISC_LTOFF_FPTR21L 58 /* LT-rel. fct ptr, left 21 bits. */
#define R_PARISC_LTOFF_FPTR14R 62 /* LT-rel. fct ptr, right 14 bits. */
#define R_PARISC_FPTR64 64 /* 64 bits function address. */
#define R_PARISC_PLABEL32 65 /* 32 bits function address. */
#define R_PARISC_PCREL64 72 /* 64 bits PC-rel. address. */
#define R_PARISC_PCREL22F 74 /* 22 bits PC-rel. address. */
#define R_PARISC_PCREL14WR 75 /* PC-rel. address, right 14 bits. */
#define R_PARISC_PCREL14DR 76 /* PC rel. address, right 14 bits. */
#define R_PARISC_PCREL16F 77 /* 16 bits PC-rel. address. */
#define R_PARISC_PCREL16WF 78 /* 16 bits PC-rel. address. */
#define R_PARISC_PCREL16DF 79 /* 16 bits PC-rel. address. */
#define R_PARISC_DIR64 80 /* 64 bits of eff. address. */
#define R_PARISC_DIR14WR 83 /* 14 bits of eff. address. */
#define R_PARISC_DIR14DR 84 /* 14 bits of eff. address. */
#define R_PARISC_DIR16F 85 /* 16 bits of eff. address. */
#define R_PARISC_DIR16WF 86 /* 16 bits of eff. address. */
#define R_PARISC_DIR16DF 87 /* 16 bits of eff. address. */
#define R_PARISC_GPREL64 88 /* 64 bits of GP-rel. address. */
#define R_PARISC_GPREL14WR 91 /* GP-rel. address, right 14 bits. */
#define R_PARISC_GPREL14DR 92 /* GP-rel. address, right 14 bits. */
#define R_PARISC_GPREL16F 93 /* 16 bits GP-rel. address. */
#define R_PARISC_GPREL16WF 94 /* 16 bits GP-rel. address. */
#define R_PARISC_GPREL16DF 95 /* 16 bits GP-rel. address. */
#define R_PARISC_LTOFF64 96 /* 64 bits LT-rel. address. */
#define R_PARISC_LTOFF14WR 99 /* LT-rel. address, right 14 bits. */
#define R_PARISC_LTOFF14DR 100 /* LT-rel. address, right 14 bits. */
#define R_PARISC_LTOFF16F 101 /* 16 bits LT-rel. address. */
#define R_PARISC_LTOFF16WF 102 /* 16 bits LT-rel. address. */
#define R_PARISC_LTOFF16DF 103 /* 16 bits LT-rel. address. */
#define R_PARISC_SECREL64 104 /* 64 bits section rel. address. */
#define R_PARISC_SEGREL64 112 /* 64 bits segment rel. address. */
#define R_PARISC_PLTOFF14WR 115 /* PLT-rel. address, right 14 bits. */
#define R_PARISC_PLTOFF14DR 116 /* PLT-rel. address, right 14 bits. */
#define R_PARISC_PLTOFF16F 117 /* 16 bits LT-rel. address. */
#define R_PARISC_PLTOFF16WF 118 /* 16 bits PLT-rel. address. */
#define R_PARISC_PLTOFF16DF 119 /* 16 bits PLT-rel. address. */
#define R_PARISC_LTOFF_FPTR64 120 /* 64 bits LT-rel. function ptr. */
#define R_PARISC_LTOFF_FPTR14WR 123 /* LT-rel. fct. ptr., right 14 bits. */
#define R_PARISC_LTOFF_FPTR14DR 124 /* LT-rel. fct. ptr., right 14 bits. */
#define R_PARISC_LTOFF_FPTR16F 125 /* 16 bits LT-rel. function ptr. */
#define R_PARISC_LTOFF_FPTR16WF 126 /* 16 bits LT-rel. function ptr. */
#define R_PARISC_LTOFF_FPTR16DF 127 /* 16 bits LT-rel. function ptr. */
#define R_PARISC_LORESERVE 128
#define R_PARISC_COPY 128 /* Copy relocation. */
#define R_PARISC_IPLT 129 /* Dynamic reloc, imported PLT */
#define R_PARISC_EPLT 130 /* Dynamic reloc, exported PLT */
#define R_PARISC_TPREL32 153 /* 32 bits TP-rel. address. */
#define R_PARISC_TPREL21L 154 /* TP-rel. address, left 21 bits. */
#define R_PARISC_TPREL14R 158 /* TP-rel. address, right 14 bits. */
#define R_PARISC_LTOFF_TP21L 162 /* LT-TP-rel. address, left 21 bits. */
#define R_PARISC_LTOFF_TP14R 166 /* LT-TP-rel. address, right 14 bits.*/
#define R_PARISC_LTOFF_TP14F 167 /* 14 bits LT-TP-rel. address. */
#define R_PARISC_TPREL64 216 /* 64 bits TP-rel. address. */
#define R_PARISC_TPREL14WR 219 /* TP-rel. address, right 14 bits. */
#define R_PARISC_TPREL14DR 220 /* TP-rel. address, right 14 bits. */
#define R_PARISC_TPREL16F 221 /* 16 bits TP-rel. address. */
#define R_PARISC_TPREL16WF 222 /* 16 bits TP-rel. address. */
#define R_PARISC_TPREL16DF 223 /* 16 bits TP-rel. address. */
#define R_PARISC_LTOFF_TP64 224 /* 64 bits LT-TP-rel. address. */
#define R_PARISC_LTOFF_TP14WR 227 /* LT-TP-rel. address, right 14 bits.*/
#define R_PARISC_LTOFF_TP14DR 228 /* LT-TP-rel. address, right 14 bits.*/
#define R_PARISC_LTOFF_TP16F 229 /* 16 bits LT-TP-rel. address. */
#define R_PARISC_LTOFF_TP16WF 230 /* 16 bits LT-TP-rel. address. */
#define R_PARISC_LTOFF_TP16DF 231 /* 16 bits LT-TP-rel. address. */
#define R_PARISC_HIRESERVE 255
/* Legal values for p_type field of Elf32_Phdr/Elf64_Phdr. */
#define PT_HP_TLS (PT_LOOS + 0x0)
#define PT_HP_CORE_NONE (PT_LOOS + 0x1)
#define PT_HP_CORE_VERSION (PT_LOOS + 0x2)
#define PT_HP_CORE_KERNEL (PT_LOOS + 0x3)
#define PT_HP_CORE_COMM (PT_LOOS + 0x4)
#define PT_HP_CORE_PROC (PT_LOOS + 0x5)
#define PT_HP_CORE_LOADABLE (PT_LOOS + 0x6)
#define PT_HP_CORE_STACK (PT_LOOS + 0x7)
#define PT_HP_CORE_SHM (PT_LOOS + 0x8)
#define PT_HP_CORE_MMF (PT_LOOS + 0x9)
#define PT_HP_PARALLEL (PT_LOOS + 0x10)
#define PT_HP_FASTBIND (PT_LOOS + 0x11)
#define PT_HP_OPT_ANNOT (PT_LOOS + 0x12)
#define PT_HP_HSL_ANNOT (PT_LOOS + 0x13)
#define PT_HP_STACK (PT_LOOS + 0x14)
#define PT_PARISC_ARCHEXT 0x70000000
#define PT_PARISC_UNWIND 0x70000001
/* Legal values for p_flags field of Elf32_Phdr/Elf64_Phdr. */
#define PF_PARISC_SBP 0x08000000
#define PF_HP_PAGE_SIZE 0x00100000
#define PF_HP_FAR_SHARED 0x00200000
#define PF_HP_NEAR_SHARED 0x00400000
#define PF_HP_CODE 0x01000000
#define PF_HP_MODIFY 0x02000000
#define PF_HP_LAZYSWAP 0x04000000
#define PF_HP_SBP 0x08000000
typedef struct elf32_rel { typedef struct elf32_rel {
Elf32_Addr r_offset; Elf32_Addr r_offset;
......
...@@ -582,7 +582,10 @@ ...@@ -582,7 +582,10 @@
#define PCI_DEVICE_ID_SI_7016 0x7016 #define PCI_DEVICE_ID_SI_7016 0x7016
#define PCI_VENDOR_ID_HP 0x103c #define PCI_VENDOR_ID_HP 0x103c
#define PCI_DEVICE_ID_HP_DONNER_GFX 0x1008 #define PCI_DEVICE_ID_HP_VISUALIZE_EG 0x1005
#define PCI_DEVICE_ID_HP_VISUALIZE_FX6 0x1006
#define PCI_DEVICE_ID_HP_VISUALIZE_FX4 0x1008
#define PCI_DEVICE_ID_HP_VISUALIZE_FX2 0x100a
#define PCI_DEVICE_ID_HP_TACHYON 0x1028 #define PCI_DEVICE_ID_HP_TACHYON 0x1028
#define PCI_DEVICE_ID_HP_TACHLITE 0x1029 #define PCI_DEVICE_ID_HP_TACHLITE 0x1029
#define PCI_DEVICE_ID_HP_J2585A 0x1030 #define PCI_DEVICE_ID_HP_J2585A 0x1030
...@@ -591,6 +594,7 @@ ...@@ -591,6 +594,7 @@
#define PCI_DEVICE_ID_HP_DIVA_TOSCA1 0x1049 #define PCI_DEVICE_ID_HP_DIVA_TOSCA1 0x1049
#define PCI_DEVICE_ID_HP_DIVA_TOSCA2 0x104A #define PCI_DEVICE_ID_HP_DIVA_TOSCA2 0x104A
#define PCI_DEVICE_ID_HP_DIVA_MAESTRO 0x104B #define PCI_DEVICE_ID_HP_DIVA_MAESTRO 0x104B
#define PCI_DEVICE_ID_HP_VISUALIZE_FXE 0x108b
#define PCI_DEVICE_ID_HP_DIVA_HALFDOME 0x1223 #define PCI_DEVICE_ID_HP_DIVA_HALFDOME 0x1223
#define PCI_DEVICE_ID_HP_DIVA_KEYSTONE 0x1226 #define PCI_DEVICE_ID_HP_DIVA_KEYSTONE 0x1226
#define PCI_DEVICE_ID_HP_DIVA_POWERBAR 0x1227 #define PCI_DEVICE_ID_HP_DIVA_POWERBAR 0x1227
......
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