Commit e7b3ca08 authored by Kyle McMartin's avatar Kyle McMartin
Browse files

Merge branch 'parisc' from /home/kyle/repos/parisc-2.6.git

Conflicts:

	arch/parisc/hpux/sys_hpux.c
	arch/parisc/mm/ioremap.c
parents 62d0cfcb cb6efb39
......@@ -35,12 +35,8 @@ FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align
OBJCOPY_FLAGS =-O binary -R .note -R .comment -S
GCC_VERSION := $(call cc-version)
ifneq ($(shell if [ -z $(GCC_VERSION) ] ; then echo "bad"; fi ;),)
$(error Sorry, couldn't find ($(cc-version)).)
endif
ifneq ($(shell if [ $(GCC_VERSION) -lt 0303 ] ; then echo "bad"; fi ;),)
$(error Sorry, your compiler is too old ($(GCC_VERSION)). GCC v3.3 or above is required.)
ifneq ($(call cc-ifversion, -lt, 0303, "bad"),)
$(error Sorry, GCC v3.3 or above is required.)
endif
cflags-y := -pipe
......
......@@ -35,13 +35,13 @@ int hpux_execve(struct pt_regs *regs)
int error;
char *filename;
filename = getname((char *) regs->gr[26]);
filename = getname((char __user *) regs->gr[26]);
error = PTR_ERR(filename);
if (IS_ERR(filename))
goto out;
error = do_execve(filename, (char **) regs->gr[25],
(char **)regs->gr[24], regs);
error = do_execve(filename, (char __user * __user *) regs->gr[25],
(char __user * __user *) regs->gr[24], regs);
if (error == 0) {
task_lock(current);
......@@ -63,19 +63,19 @@ struct hpux_dirent {
};
struct getdents_callback {
struct hpux_dirent *current_dir;
struct hpux_dirent *previous;
struct hpux_dirent __user *current_dir;
struct hpux_dirent __user *previous;
int count;
int error;
};
#define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de)))
#define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de)))
#define ROUND_UP(x) (((x)+sizeof(long)-1) & ~(sizeof(long)-1))
static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
u64 ino, unsigned d_type)
{
struct hpux_dirent * dirent;
struct hpux_dirent __user * dirent;
struct getdents_callback * buf = (struct getdents_callback *) __buf;
ino_t d_ino;
int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1);
......@@ -105,10 +105,10 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
#undef NAME_OFFSET
#undef ROUND_UP
int hpux_getdents(unsigned int fd, struct hpux_dirent *dirent, unsigned int count)
int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned int count)
{
struct file * file;
struct hpux_dirent * lastdirent;
struct hpux_dirent __user * lastdirent;
struct getdents_callback buf;
int error = -EBADF;
......@@ -143,7 +143,7 @@ int hpux_mount(const char *fs, const char *path, int mflag,
return -ENOSYS;
}
static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 *statbuf)
static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 __user *statbuf)
{
struct hpux_stat64 tmp;
......@@ -169,7 +169,7 @@ static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 *statbuf)
return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0;
}
long hpux_stat64(char *filename, struct hpux_stat64 *statbuf)
long hpux_stat64(char __user *filename, struct hpux_stat64 __user *statbuf)
{
struct kstat stat;
int error = vfs_stat(filename, &stat);
......@@ -180,7 +180,7 @@ long hpux_stat64(char *filename, struct hpux_stat64 *statbuf)
return error;
}
long hpux_fstat64(unsigned int fd, struct hpux_stat64 *statbuf)
long hpux_fstat64(unsigned int fd, struct hpux_stat64 __user *statbuf)
{
struct kstat stat;
int error = vfs_fstat(fd, &stat);
......@@ -191,7 +191,7 @@ long hpux_fstat64(unsigned int fd, struct hpux_stat64 *statbuf)
return error;
}
long hpux_lstat64(char *filename, struct hpux_stat64 *statbuf)
long hpux_lstat64(char __user *filename, struct hpux_stat64 __user *statbuf)
{
struct kstat stat;
int error = vfs_lstat(filename, &stat);
......
......@@ -61,7 +61,7 @@ int hpux_ptrace(void)
return -ENOSYS;
}
int hpux_wait(int *stat_loc)
int hpux_wait(int __user *stat_loc)
{
return sys_waitpid(-1, stat_loc, 0);
}
......@@ -255,7 +255,7 @@ asmlinkage long hpux_fstatfs(unsigned int fd, struct hpux_statfs __user * buf)
/* TODO: Are these put_user calls OK? Should they pass an int?
* (I copied it from sys_i386.c like this.)
*/
static int hpux_uname(struct hpux_utsname *name)
static int hpux_uname(struct hpux_utsname __user *name)
{
int error;
......@@ -300,14 +300,14 @@ static int hpux_uname(struct hpux_utsname *name)
/* Note: HP-UX just uses the old suser() function to check perms
* in this system call. We'll use capable(CAP_SYS_ADMIN).
*/
int hpux_utssys(char *ubuf, int n, int type)
int hpux_utssys(char __user *ubuf, int n, int type)
{
int len;
int error;
switch( type ) {
case 0:
/* uname(): */
return( hpux_uname( (struct hpux_utsname *)ubuf ) );
return hpux_uname((struct hpux_utsname __user *)ubuf);
break ;
case 1:
/* Obsolete (used to be umask().) */
......@@ -315,8 +315,9 @@ int hpux_utssys(char *ubuf, int n, int type)
break ;
case 2:
/* ustat(): */
return( hpux_ustat(new_decode_dev(n), (struct hpux_ustat *)ubuf) );
break ;
return hpux_ustat(new_decode_dev(n),
(struct hpux_ustat __user *)ubuf);
break;
case 3:
/* setuname():
*
......@@ -332,7 +333,7 @@ int hpux_utssys(char *ubuf, int n, int type)
return -EINVAL ;
/* Unlike Linux, HP-UX truncates it if n is too big: */
len = (n <= __NEW_UTS_LEN) ? n : __NEW_UTS_LEN ;
return( sys_sethostname(ubuf, len) );
return sys_sethostname(ubuf, len);
break ;
case 4:
/* sethostname():
......@@ -346,7 +347,7 @@ int hpux_utssys(char *ubuf, int n, int type)
return -EINVAL ;
/* Unlike Linux, HP-UX truncates it if n is too big: */
len = (n <= __NEW_UTS_LEN) ? n : __NEW_UTS_LEN ;
return( sys_sethostname(ubuf, len) );
return sys_sethostname(ubuf, len);
break ;
case 5:
/* gethostname():
......@@ -356,7 +357,7 @@ int hpux_utssys(char *ubuf, int n, int type)
/* Unlike Linux, HP-UX returns an error if n==0: */
if ( n <= 0 )
return -EINVAL ;
return( sys_gethostname(ubuf, n) );
return sys_gethostname(ubuf, n);
break ;
case 6:
/* Supposedly called from setuname() in libc.
......@@ -420,7 +421,7 @@ int hpux_utssys(char *ubuf, int n, int type)
}
}
int hpux_getdomainname(char *name, int len)
int hpux_getdomainname(char __user *name, int len)
{
int nlen;
int err = -EFAULT;
......@@ -471,17 +472,18 @@ int hpux_sysfs(int opcode, unsigned long arg1, unsigned long arg2)
printk(KERN_DEBUG "hpux_sysfs called with arg1='%lx'\n", arg1);
if ( opcode == 1 ) { /* GETFSIND */
len = strlen_user((char *)arg1);
char __user *user_fsname = (char __user *)arg1;
len = strlen_user(user_fsname);
printk(KERN_DEBUG "len of arg1 = %d\n", len);
if (len == 0)
return 0;
fsname = kmalloc(len, GFP_KERNEL);
if ( !fsname ) {
if (!fsname) {
printk(KERN_DEBUG "failed to kmalloc fsname\n");
return 0;
}
if ( copy_from_user(fsname, (char *)arg1, len) ) {
if (copy_from_user(fsname, user_fsname, len)) {
printk(KERN_DEBUG "failed to copy_from_user fsname\n");
kfree(fsname);
return 0;
......@@ -495,7 +497,7 @@ int hpux_sysfs(int opcode, unsigned long arg1, unsigned long arg2)
fstype = 0;
} else {
fstype = 0;
};
}
kfree(fsname);
......
......@@ -689,7 +689,9 @@ parse_tree_node(struct device *parent, int index, struct hardware_path *modpath)
.fn = check_parent,
};
device_for_each_child(parent, &recurse_data, descend_children);
if (device_for_each_child(parent, &recurse_data, descend_children))
/* nothing */;
return d.dev;
}
......@@ -835,8 +837,8 @@ static void print_parisc_device(struct parisc_device *dev)
static int count;
print_pa_hwpath(dev, hw_path);
printk(KERN_INFO "%d. %s at 0x%lx [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }",
++count, dev->name, dev->hpa.start, hw_path, dev->id.hw_type,
printk(KERN_INFO "%d. %s at 0x%p [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }",
++count, dev->name, (void*) dev->hpa.start, hw_path, dev->id.hw_type,
dev->id.hversion_rev, dev->id.hversion, dev->id.sversion);
if (dev->num_addrs) {
......
......@@ -822,7 +822,8 @@ int module_finalize(const Elf_Ehdr *hdr,
me->name, strtab, symhdr);
if(me->arch.got_count > MAX_GOTS) {
printk(KERN_ERR "%s: Global Offset Table overflow (used %ld, allowed %d\n", me->name, me->arch.got_count, MAX_GOTS);
printk(KERN_ERR "%s: Global Offset Table overflow (used %ld, allowed %d)\n",
me->name, me->arch.got_count, MAX_GOTS);
return -EINVAL;
}
......
......@@ -342,7 +342,7 @@ pcxl_dma_init(void)
pcxl_res_map = (char *)__get_free_pages(GFP_KERNEL,
get_order(pcxl_res_size));
memset(pcxl_res_map, 0, pcxl_res_size);
proc_gsc_root = proc_mkdir("gsc", 0);
proc_gsc_root = proc_mkdir("gsc", NULL);
if (!proc_gsc_root)
printk(KERN_WARNING
"pcxl_dma_init: Unable to create gsc /proc dir entry\n");
......
......@@ -200,8 +200,8 @@ static void
pcibios_link_hba_resources( struct resource *hba_res, struct resource *r)
{
if (!r->parent) {
printk(KERN_EMERG "PCI: resource not parented! [%lx-%lx]\n",
r->start, r->end);
printk(KERN_EMERG "PCI: resource not parented! [%p-%p]\n",
(void*) r->start, (void*) r->end);
r->parent = hba_res;
/* reverse link is harder *sigh* */
......
......@@ -355,8 +355,8 @@ asmlinkage int sys_execve(struct pt_regs *regs)
error = PTR_ERR(filename);
if (IS_ERR(filename))
goto out;
error = do_execve(filename, (char __user **) regs->gr[25],
(char __user **) regs->gr[24], regs);
error = do_execve(filename, (char __user * __user *) regs->gr[25],
(char __user * __user *) regs->gr[24], regs);
if (error == 0) {
task_lock(current);
current->ptrace &= ~PT_DTRACE;
......
......@@ -153,8 +153,6 @@ static int __init processor_probe(struct parisc_device *dev)
p->cpuid = cpuid; /* save CPU id */
p->txn_addr = txn_addr; /* save CPU IRQ address */
#ifdef CONFIG_SMP
spin_lock_init(&p->lock);
/*
** FIXME: review if any other initialization is clobbered
** for boot_cpu by the above memset().
......
......@@ -76,6 +76,7 @@ cpumask_t cpu_possible_map __read_mostly = CPU_MASK_ALL; /* Bitmap of Present CP
EXPORT_SYMBOL(cpu_online_map);
EXPORT_SYMBOL(cpu_possible_map);
DEFINE_PER_CPU(spinlock_t, ipi_lock) = SPIN_LOCK_UNLOCKED;
struct smp_call_struct {
void (*func) (void *info);
......@@ -167,10 +168,11 @@ ipi_interrupt(int irq, void *dev_id)
mb(); /* Order interrupt and bit testing. */
for (;;) {
spin_lock_irqsave(&(p->lock),flags);
spinlock_t *lock = &per_cpu(ipi_lock, this_cpu);
spin_lock_irqsave(lock, flags);
ops = p->pending_ipi;
p->pending_ipi = 0;
spin_unlock_irqrestore(&(p->lock),flags);
spin_unlock_irqrestore(lock, flags);
mb(); /* Order bit clearing and data access. */
......@@ -275,12 +277,13 @@ static inline void
ipi_send(int cpu, enum ipi_message_type op)
{
struct cpuinfo_parisc *p = &cpu_data[cpu];
spinlock_t *lock = &per_cpu(ipi_lock, cpu);
unsigned long flags;
spin_lock_irqsave(&(p->lock),flags);
spin_lock_irqsave(lock, flags);
p->pending_ipi |= 1 << op;
gsc_writel(IPI_IRQ - CPU_IRQ_BASE, cpu_data[cpu].hpa);
spin_unlock_irqrestore(&(p->lock),flags);
spin_unlock_irqrestore(lock, flags);
}
......
......@@ -24,6 +24,7 @@
#include <linux/pagemap.h> /* for release_pages and page_cache_release */
#include <asm/pgalloc.h>
#include <asm/pgtable.h>
#include <asm/tlb.h>
#include <asm/pdc_chassis.h>
#include <asm/mmzone.h>
......@@ -453,6 +454,8 @@ unsigned long pcxl_dma_start __read_mostly;
void __init mem_init(void)
{
int codesize, reservedpages, datasize, initsize;
high_memory = __va((max_pfn << PAGE_SHIFT));
#ifndef CONFIG_DISCONTIGMEM
......@@ -467,7 +470,32 @@ void __init mem_init(void)
}
#endif
printk(KERN_INFO "Memory: %luk available\n", num_physpages << (PAGE_SHIFT-10));
codesize = (unsigned long)_etext - (unsigned long)_text;
datasize = (unsigned long)_edata - (unsigned long)_etext;
initsize = (unsigned long)__init_end - (unsigned long)__init_begin;
reservedpages = 0;
{
unsigned long pfn;
#ifdef CONFIG_DISCONTIGMEM
int i;
for (i = 0; i < npmem_ranges; i++) {
for (pfn = node_start_pfn(i); pfn < node_end_pfn(i); pfn++) {
if (PageReserved(pfn_to_page(pfn)))
reservedpages++;
}
}
#else /* !CONFIG_DISCONTIGMEM */
for (pfn = 0; pfn < max_pfn; pfn++) {
/*
* Only count reserved RAM pages
*/
if (PageReserved(pfn_to_page(pfn)))
reservedpages++;
}
#endif
}
#ifdef CONFIG_PA11
if (hppa_dma_ops == &pcxl_dma_ops) {
......@@ -481,6 +509,38 @@ void __init mem_init(void)
vmalloc_start = SET_MAP_OFFSET(MAP_START);
#endif
printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, %dk reserved, %dk data, %dk init)\n",
(unsigned long)nr_free_pages() << (PAGE_SHIFT-10),
num_physpages << (PAGE_SHIFT-10),
codesize >> 10,
reservedpages << (PAGE_SHIFT-10),
datasize >> 10,
initsize >> 10
);
#ifdef CONFIG_DEBUG_KERNEL /* double-sanity-check paranoia */
printk("virtual kernel memory layout:\n"
" vmalloc : 0x%p - 0x%p (%4ld MB)\n"
" memory : 0x%p - 0x%p (%4ld MB)\n"
" .init : 0x%p - 0x%p (%4ld kB)\n"
" .data : 0x%p - 0x%p (%4ld kB)\n"
" .text : 0x%p - 0x%p (%4ld kB)\n",
(void*)VMALLOC_START, (void*)VMALLOC_END,
(VMALLOC_END - VMALLOC_START) >> 20,
__va(0), high_memory,
((unsigned long)high_memory - (unsigned long)__va(0)) >> 20,
__init_begin, __init_end,
((unsigned long)__init_end - (unsigned long)__init_begin) >> 10,
_etext, _edata,
((unsigned long)_edata - (unsigned long)_etext) >> 10,
_text, _etext,
((unsigned long)_etext - (unsigned long)_text) >> 10);
#endif
}
unsigned long *empty_zero_page __read_mostly;
......@@ -548,7 +608,7 @@ void show_mem(void)
printk("Zone list for zone %d on node %d: ", j, i);
for (k = 0; zl->zones[k] != NULL; k++)
printk("[%d/%s] ", zone_to_nid(zl->zones[k]), zl->zones[k]->name);
printk("[%ld/%s] ", zone_to_nid(zl->zones[k]), zl->zones[k]->name);
printk("\n");
}
}
......
......@@ -26,7 +26,7 @@
*/
void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flags)
{
void *addr;
void __iomem *addr;
struct vm_struct *area;
unsigned long offset, last_addr;
pgprot_t pgprot;
......@@ -80,14 +80,14 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l
if (!area)
return NULL;
addr = area->addr;
addr = (void __iomem *) area->addr;
if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size,
phys_addr, pgprot)) {
vfree(addr);
return NULL;
}
return (void __iomem *) (offset + (char *)addr);
return (void __iomem *) (offset + (char __iomem *)addr);
}
EXPORT_SYMBOL(__ioremap);
......
/*
* kmap/page table map and unmap support routines
*
* Copyright 1999,2000 Hewlett-Packard Company
* Copyright 2000 John Marvin <jsm at hp.com>
* Copyright 2000 Grant Grundler <grundler at parisc-linux.org>
* Copyright 2000 Philipp Rumpf <prumpf@tux.org>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*
** Stolen mostly from arch/parisc/kernel/pci-dma.c
*/
#include <linux/types.h>
#include <linux/mm.h>
#include <linux/string.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <asm/uaccess.h>
#include <asm/pgalloc.h>
#include <asm/io.h>
#include <asm/page.h> /* get_order */
#undef flush_cache_all
#define flush_cache_all flush_all_caches
typedef void (*pte_iterator_t) (pte_t * pte, unsigned long arg);
#if 0
/* XXX This routine could be used with iterate_page() to replace
* unmap_uncached_page() and save a little code space but I didn't
* do that since I'm not certain whether this is the right path. -PB
*/
static void unmap_cached_pte(pte_t * pte, unsigned long addr, unsigned long arg)
{
pte_t page = *pte;
pte_clear(&init_mm, addr, pte);
if (!pte_none(page)) {
if (pte_present(page)) {
unsigned long map_nr = pte_pagenr(page);
if (map_nr < max_mapnr)
__free_page(mem_map + map_nr);
} else {
printk(KERN_CRIT
"Whee.. Swapped out page in kernel page table\n");
}
}
}
#endif
/* These two routines should probably check a few things... */
static void set_uncached(pte_t * pte, unsigned long arg)
{
pte_val(*pte) |= _PAGE_NO_CACHE;
}
static void set_cached(pte_t * pte, unsigned long arg)
{
pte_val(*pte) &= ~_PAGE_NO_CACHE;
}
static inline void iterate_pte(pmd_t * pmd, unsigned long address,
unsigned long size, pte_iterator_t op,
unsigned long arg)
{
pte_t *pte;
unsigned long end;
if (pmd_none(*pmd))
return;
if (pmd_bad(*pmd)) {
pmd_ERROR(*pmd);
pmd_clear(pmd);
return;
}
pte = pte_offset(pmd, address);
address &= ~PMD_MASK;
end = address + size;
if (end > PMD_SIZE)
end = PMD_SIZE;
do {
op(pte, arg);
address += PAGE_SIZE;
pte++;
} while (address < end);
}
static inline void iterate_pmd(pgd_t * dir, unsigned long address,
unsigned long size, pte_iterator_t op,
unsigned long arg)
{
pmd_t *pmd;
unsigned long end;
if (pgd_none(*dir))
return;
if (pgd_bad(*dir)) {
pgd_ERROR(*dir);
pgd_clear(dir);
return;
}
pmd = pmd_offset(dir, address);
address &= ~PGDIR_MASK;
end = address + size;
if (end > PGDIR_SIZE)
end = PGDIR_SIZE;
do {
iterate_pte(pmd, address, end - address, op, arg);
address = (address + PMD_SIZE) & PMD_MASK;
pmd++;
} while (address < end);
}
static void iterate_pages(unsigned long address, unsigned long size,
pte_iterator_t op, unsigned long arg)
{
pgd_t *dir;
unsigned long end = address + size;
dir = pgd_offset_k(address);
flush_cache_all();
do {
iterate_pmd(dir, address, end - address, op, arg);
address = (address + PGDIR_SIZE) & PGDIR_MASK;
dir++;
} while (address && (address < end));
flush_tlb_all();
}
void
kernel_set_cachemode(unsigned long vaddr, unsigned long size, int what)
{
switch (what) {
case IOMAP_FULL_CACHING:
iterate_pages(vaddr, size, set_cached, 0);
flush_tlb_range(NULL, vaddr, size);
break;
case IOMAP_NOCACHE_SER:
iterate_pages(vaddr, size, set_uncached, 0);
flush_tlb_range(NULL, vaddr, size);
break;
default:
printk(KERN_CRIT
"kernel_set_cachemode mode %d not understood\n",
what);
break;
}
}
......@@ -18,6 +18,6 @@ int __init oprofile_arch_init(struct oprofile_operations * ops)
}
void oprofile_arch_exit()
void oprofile_arch_exit(void)
{
}
......@@ -235,7 +235,7 @@ static int __init
agp_ioc_init(void __iomem *ioc_regs)
{
struct _parisc_agp_info *info = &parisc_agp_info;
u64 *iova_base, *io_pdir, io_tlb_ps;
u64 iova_base, *io_pdir, io_tlb_ps;
int io_tlb_shift;
printk(KERN_INFO DRVPFX "IO PDIR shared with sba_iommu\n");
......
......@@ -440,10 +440,10 @@ config HPLANCE
config LASI_82596
tristate "Lasi ethernet"
depends on NET_ETHERNET && PARISC && GSC_LASI
depends on NET_ETHERNET && GSC
help
Say Y here to support the on-board Intel 82596 ethernet controller
built into Hewlett-Packard PA-RISC machines.
Say Y here to support the builtin Intel 82596 ethernet controller
found in Hewlett-Packard PA-RISC machines with 10Mbit ethernet.
config MIPS_JAZZ_SONIC
tristate "MIPS JAZZ onboard SONIC Ethernet support"
......
......@@ -384,7 +384,7 @@ struct i596_private {
struct device *dev;
};
static char init_setup[] =
static const char init_setup[] =
{
0x8E, /* length, prefetch on */
0xC8, /* fifo to 8, monitor off */
......@@ -683,7 +683,7 @@ static int init_i596_mem(struct net_device *dev)
enable_irq(dev->irq); /* enable IRQs from LAN */
DEB(DEB_INIT, printk("%s: queuing CmdConfigure\n", dev->name));
memcpy(lp->cf_cmd.i596_config, init_setup, 14);
memcpy(lp->cf_cmd.i596_config, init_setup, sizeof(init_setup));
lp->cf_cmd.cmd.command = CmdConfigure;
CHECK_WBACK(lp, &(lp->cf_cmd), sizeof(struct cf_cmd));
i596_add_cmd(dev, &lp->cf_cmd.cmd);
......@@ -1156,32 +1156,12 @@ static int __devinit i82596_probe(struct net_device *dev,
dma_addr_t dma_addr;
/* This lot is ensure things have been cache line aligned. */
if (sizeof(struct i596_rfd) != 32) {
printk("82596: sizeof(struct i596_rfd) = %d\n",
(int)sizeof(struct i596_rfd));
return -ENODEV;
}
if ((sizeof(struct i596_rbd) % 32) != 0) {
printk("82596: sizeof(struct i596_rbd) = %d\n",
(int)sizeof(struct i596_rbd));
return -ENODEV;
}
if ((sizeof(struct tx_cmd) % 32) != 0) {
printk("82596: sizeof(struct tx_cmd) = %d\n",
(int)sizeof(struct tx_cmd));
return -ENODEV;
}
if (sizeof(struct i596_tbd) != 32) {
printk("82596: sizeof(struct i596_tbd) = %d\n",
(int)sizeof(struct i596_tbd));
return -ENODEV;
}
BUILD_BUG_ON(sizeof(struct i596_rfd) != 32);
BUILD_BUG_ON(sizeof(struct i596_rbd) & 31);
BUILD_BUG_ON(sizeof(struct tx_cmd) & 31);
BUILD_BUG_ON(sizeof(struct i596_tbd) != 32);
#ifndef __LP64__
if (sizeof(struct i596_private) > 4096) {
printk("82596: sizeof(struct i596_private) = %d\n",
(int)sizeof(struct i596_private));
return -ENODEV;
}
BUILD_BUG_ON(sizeof(struct i596_private) > 4096);
#endif
if (!dev->base_addr || !dev->irq)
......
......@@ -10,10 +10,6 @@
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This Driver currently only supports the console (port 0) on the MUX.
** Additional work will be needed on this driver to enable the full
** functionality of the MUX.
**
*/
#include <linux/types.h>
......@@ -67,7 +63,7 @@ static int hppb_probe(struct parisc_device *dev)
}
card = card->next;
}
printk(KERN_INFO "Found GeckoBoa at 0x%lx\n", dev->hpa.start);
printk(KERN_INFO "Found GeckoBoa at 0x%x\n", dev->hpa.start);
card->hpa = dev->hpa.start;
card->mmio_region.name = "HP-PB Bus";
......@@ -78,16 +74,18 @@ static int hppb_probe(struct parisc_device *dev)
status = ccio_request_resource(dev, &card->mmio_region);
if(status < 0) {
printk(KERN_ERR "%s: failed to claim HP-PB bus space (%08lx, %08lx)\n",
printk(KERN_ERR "%s: failed to claim HP-PB bus space (%08x, %08x)\n",
__FILE__, card->mmio_region.start, card->mmio_region.end);
}
return 0;
}
static struct parisc_device_id hppb_tbl[] = {
{ HPHW_BCPORT, HVERSION_REV_ANY_ID, 0x500, 0xc },
{ HPHW_BCPORT, HVERSION_REV_ANY_ID, 0x500, 0xc }, /* E25 and K */
{ HPHW_BCPORT, 0x0, 0x501, 0xc }, /* E35 */
{ HPHW_BCPORT, 0x0, 0x502, 0xc }, /* E45 */
{ HPHW_BCPORT, 0x0, 0x503, 0xc }, /* E55 */
{ 0, }
};
......
......@@ -132,7 +132,7 @@ struct iosapic_irt {
struct vector_info {
struct iosapic_info *iosapic; /* I/O SAPIC this vector is on */
struct irt_entry *irte; /* IRT entry */
u32 *eoi_addr; /* precalculate EOI reg address */
u32 __iomem *eoi_addr; /* precalculate EOI reg address */
u32 eoi_data; /* IA64: ? PA: swapped txn_data */
int txn_irq; /* virtual IRQ number for processor */
ulong txn_addr; /* IA64: id_eid PA: partial HPA */
......
......@@ -980,7 +980,7 @@ LBA_PORT_IN(32, 0)
#define LBA_PORT_OUT(size, mask) \
static void lba_pat_out##size (struct pci_hba_data *l, u16 addr, u##size val) \
{ \
void *where = (void *) PIOP_TO_GMMIO(LBA_DEV(l), addr); \
void __iomem *where = PIOP_TO_GMMIO(LBA_DEV(l), addr); \
DBG_PORT("%s(0x%p, 0x%x, 0x%x)\n", __FUNCTION__, l, addr, val); \
WRITE_REG##size(val, where); \
/* flush the I/O down to the elroy at least */ \
......@@ -1406,13 +1406,20 @@ lba_hw_init(struct lba_device *d)
return 0;
}
/*
* Unfortunately, when firmware numbers busses, it doesn't take into account
* Cardbus bridges. So we have to renumber the busses to suit ourselves.
* Elroy/Mercury don't actually know what bus number they're attached to;
* we use bus 0 to indicate the directly attached bus and any other bus
* number will be taken care of by the PCI-PCI bridge.
*/
static unsigned int lba_next_bus = 0;
/*
** Determine if lba should claim this chip (return 0) or not (return 1).
** If so, initialize the chip and tell other partners in crime they
** have work to do.
*/
* Determine if lba should claim this chip (return 0) or not (return 1).
* If so, initialize the chip and tell other partners in crime they
* have work to do.
*/
static int __init
lba_driver_probe(struct parisc_device *dev)
{
......@@ -1478,9 +1485,7 @@ lba_driver_probe(struct parisc_device *dev)
return -ENODEV;
}
/*
** Tell I/O SAPIC driver we have a IRQ handler/region.
*/
/* Tell I/O SAPIC driver we have a IRQ handler/region. */
tmp_obj = iosapic_register(dev->hpa.start + LBA_IOSAPIC_BASE);
/* NOTE: PCI devices (e.g. 103c:1005 graphics card) which don't
......@@ -1529,16 +1534,17 @@ lba_driver_probe(struct parisc_device *dev)
lba_legacy_resources(dev, lba_dev);
}
/*
** Tell PCI support another PCI bus was found.
** Walks PCI bus for us too.
*/
if (lba_dev->hba.bus_num.start < lba_next_bus)
lba_dev->hba.bus_num.start = lba_next_bus;
dev->dev.platform_data = lba_dev;
lba_bus = lba_dev->hba.hba_bus =
pci_scan_bus_parented(&dev->dev, lba_dev->hba.bus_num.start,
cfg_ops, NULL);
if (lba_bus)
if (lba_bus) {
lba_next_bus = lba_bus->subordinate + 1;
pci_bus_add_devices(lba_bus);
}
/* This is in lieu of calling pci_assign_unassigned_resources() */
if (is_pdc_pat()) {
......
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