aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/parisc/Makefile8
-rw-r--r--arch/parisc/hpux/fs.c26
-rw-r--r--arch/parisc/hpux/sys_hpux.c30
-rw-r--r--arch/parisc/kernel/drivers.c8
-rw-r--r--arch/parisc/kernel/module.c3
-rw-r--r--arch/parisc/kernel/pci-dma.c2
-rw-r--r--arch/parisc/kernel/pci.c4
-rw-r--r--arch/parisc/kernel/process.c4
-rw-r--r--arch/parisc/kernel/processor.c2
-rw-r--r--arch/parisc/kernel/smp.c11
-rw-r--r--arch/parisc/mm/init.c64
-rw-r--r--arch/parisc/mm/ioremap.c6
-rw-r--r--arch/parisc/mm/kmap.c166
-rw-r--r--arch/parisc/oprofile/init.c2
-rw-r--r--drivers/char/agp/parisc-agp.c2
-rw-r--r--drivers/net/Kconfig6
-rw-r--r--drivers/net/lasi_82596.c34
-rw-r--r--drivers/parisc/hppb.c14
-rw-r--r--drivers/parisc/iosapic_private.h2
-rw-r--r--drivers/parisc/lba_pci.c34
-rw-r--r--drivers/parisc/led.c12
-rw-r--r--drivers/parisc/power.c4
-rw-r--r--drivers/parisc/sba_iommu.c4
-rw-r--r--drivers/serial/mux.c167
-rw-r--r--include/asm-parisc/dma-mapping.h2
-rw-r--r--include/asm-parisc/page.h6
-rw-r--r--include/asm-parisc/pdcpat.h31
-rw-r--r--include/asm-parisc/processor.h1
-rw-r--r--include/asm-parisc/statfs.h10
-rw-r--r--scripts/mod/modpost.c3
30 files changed, 310 insertions, 358 deletions
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
index 9b7e42490dd1..760567a9ba16 100644
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -35,12 +35,8 @@ FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align
35 35
36OBJCOPY_FLAGS =-O binary -R .note -R .comment -S 36OBJCOPY_FLAGS =-O binary -R .note -R .comment -S
37 37
38GCC_VERSION := $(call cc-version) 38ifneq ($(call cc-ifversion, -lt, 0303, "bad"),)
39ifneq ($(shell if [ -z $(GCC_VERSION) ] ; then echo "bad"; fi ;),) 39$(error Sorry, GCC v3.3 or above is required.)
40$(error Sorry, couldn't find ($(cc-version)).)
41endif
42ifneq ($(shell if [ $(GCC_VERSION) -lt 0303 ] ; then echo "bad"; fi ;),)
43$(error Sorry, your compiler is too old ($(GCC_VERSION)). GCC v3.3 or above is required.)
44endif 40endif
45 41
46cflags-y := -pipe 42cflags-y := -pipe
diff --git a/arch/parisc/hpux/fs.c b/arch/parisc/hpux/fs.c
index 4204cd1f3cf9..c7a81a2c014c 100644
--- a/arch/parisc/hpux/fs.c
+++ b/arch/parisc/hpux/fs.c
@@ -35,13 +35,13 @@ int hpux_execve(struct pt_regs *regs)
35 int error; 35 int error;
36 char *filename; 36 char *filename;
37 37
38 filename = getname((char *) regs->gr[26]); 38 filename = getname((char __user *) regs->gr[26]);
39 error = PTR_ERR(filename); 39 error = PTR_ERR(filename);
40 if (IS_ERR(filename)) 40 if (IS_ERR(filename))
41 goto out; 41 goto out;
42 42
43 error = do_execve(filename, (char **) regs->gr[25], 43 error = do_execve(filename, (char __user * __user *) regs->gr[25],
44 (char **)regs->gr[24], regs); 44 (char __user * __user *) regs->gr[24], regs);
45 45
46 if (error == 0) { 46 if (error == 0) {
47 task_lock(current); 47 task_lock(current);
@@ -63,19 +63,19 @@ struct hpux_dirent {
63}; 63};
64 64
65struct getdents_callback { 65struct getdents_callback {
66 struct hpux_dirent *current_dir; 66 struct hpux_dirent __user *current_dir;
67 struct hpux_dirent *previous; 67 struct hpux_dirent __user *previous;
68 int count; 68 int count;
69 int error; 69 int error;
70}; 70};
71 71
72#define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de))) 72#define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de)))
73#define ROUND_UP(x) (((x)+sizeof(long)-1) & ~(sizeof(long)-1)) 73#define ROUND_UP(x) (((x)+sizeof(long)-1) & ~(sizeof(long)-1))
74 74
75static int filldir(void * __buf, const char * name, int namlen, loff_t offset, 75static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
76 u64 ino, unsigned d_type) 76 u64 ino, unsigned d_type)
77{ 77{
78 struct hpux_dirent * dirent; 78 struct hpux_dirent __user * dirent;
79 struct getdents_callback * buf = (struct getdents_callback *) __buf; 79 struct getdents_callback * buf = (struct getdents_callback *) __buf;
80 ino_t d_ino; 80 ino_t d_ino;
81 int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1); 81 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,
105#undef NAME_OFFSET 105#undef NAME_OFFSET
106#undef ROUND_UP 106#undef ROUND_UP
107 107
108int hpux_getdents(unsigned int fd, struct hpux_dirent *dirent, unsigned int count) 108int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned int count)
109{ 109{
110 struct file * file; 110 struct file * file;
111 struct hpux_dirent * lastdirent; 111 struct hpux_dirent __user * lastdirent;
112 struct getdents_callback buf; 112 struct getdents_callback buf;
113 int error = -EBADF; 113 int error = -EBADF;
114 114
@@ -143,7 +143,7 @@ int hpux_mount(const char *fs, const char *path, int mflag,
143 return -ENOSYS; 143 return -ENOSYS;
144} 144}
145 145
146static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 *statbuf) 146static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 __user *statbuf)
147{ 147{
148 struct hpux_stat64 tmp; 148 struct hpux_stat64 tmp;
149 149
@@ -169,7 +169,7 @@ static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 *statbuf)
169 return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; 169 return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0;
170} 170}
171 171
172long hpux_stat64(char *filename, struct hpux_stat64 *statbuf) 172long hpux_stat64(char __user *filename, struct hpux_stat64 __user *statbuf)
173{ 173{
174 struct kstat stat; 174 struct kstat stat;
175 int error = vfs_stat(filename, &stat); 175 int error = vfs_stat(filename, &stat);
@@ -180,7 +180,7 @@ long hpux_stat64(char *filename, struct hpux_stat64 *statbuf)
180 return error; 180 return error;
181} 181}
182 182
183long hpux_fstat64(unsigned int fd, struct hpux_stat64 *statbuf) 183long hpux_fstat64(unsigned int fd, struct hpux_stat64 __user *statbuf)
184{ 184{
185 struct kstat stat; 185 struct kstat stat;
186 int error = vfs_fstat(fd, &stat); 186 int error = vfs_fstat(fd, &stat);
@@ -191,7 +191,7 @@ long hpux_fstat64(unsigned int fd, struct hpux_stat64 *statbuf)
191 return error; 191 return error;
192} 192}
193 193
194long hpux_lstat64(char *filename, struct hpux_stat64 *statbuf) 194long hpux_lstat64(char __user *filename, struct hpux_stat64 __user *statbuf)
195{ 195{
196 struct kstat stat; 196 struct kstat stat;
197 int error = vfs_lstat(filename, &stat); 197 int error = vfs_lstat(filename, &stat);
diff --git a/arch/parisc/hpux/sys_hpux.c b/arch/parisc/hpux/sys_hpux.c
index 04c2ff444396..c57fcb4b2173 100644
--- a/arch/parisc/hpux/sys_hpux.c
+++ b/arch/parisc/hpux/sys_hpux.c
@@ -61,7 +61,7 @@ int hpux_ptrace(void)
61 return -ENOSYS; 61 return -ENOSYS;
62} 62}
63 63
64int hpux_wait(int *stat_loc) 64int hpux_wait(int __user *stat_loc)
65{ 65{
66 return sys_waitpid(-1, stat_loc, 0); 66 return sys_waitpid(-1, stat_loc, 0);
67} 67}
@@ -255,7 +255,7 @@ asmlinkage long hpux_fstatfs(unsigned int fd, struct hpux_statfs __user * buf)
255/* TODO: Are these put_user calls OK? Should they pass an int? 255/* TODO: Are these put_user calls OK? Should they pass an int?
256 * (I copied it from sys_i386.c like this.) 256 * (I copied it from sys_i386.c like this.)
257 */ 257 */
258static int hpux_uname(struct hpux_utsname *name) 258static int hpux_uname(struct hpux_utsname __user *name)
259{ 259{
260 int error; 260 int error;
261 261
@@ -300,14 +300,14 @@ static int hpux_uname(struct hpux_utsname *name)
300/* Note: HP-UX just uses the old suser() function to check perms 300/* Note: HP-UX just uses the old suser() function to check perms
301 * in this system call. We'll use capable(CAP_SYS_ADMIN). 301 * in this system call. We'll use capable(CAP_SYS_ADMIN).
302 */ 302 */
303int hpux_utssys(char *ubuf, int n, int type) 303int hpux_utssys(char __user *ubuf, int n, int type)
304{ 304{
305 int len; 305 int len;
306 int error; 306 int error;
307 switch( type ) { 307 switch( type ) {
308 case 0: 308 case 0:
309 /* uname(): */ 309 /* uname(): */
310 return( hpux_uname( (struct hpux_utsname *)ubuf ) ); 310 return hpux_uname((struct hpux_utsname __user *)ubuf);
311 break ; 311 break ;
312 case 1: 312 case 1:
313 /* Obsolete (used to be umask().) */ 313 /* Obsolete (used to be umask().) */
@@ -315,8 +315,9 @@ int hpux_utssys(char *ubuf, int n, int type)
315 break ; 315 break ;
316 case 2: 316 case 2:
317 /* ustat(): */ 317 /* ustat(): */
318 return( hpux_ustat(new_decode_dev(n), (struct hpux_ustat *)ubuf) ); 318 return hpux_ustat(new_decode_dev(n),
319 break ; 319 (struct hpux_ustat __user *)ubuf);
320 break;
320 case 3: 321 case 3:
321 /* setuname(): 322 /* setuname():
322 * 323 *
@@ -332,7 +333,7 @@ int hpux_utssys(char *ubuf, int n, int type)
332 return -EINVAL ; 333 return -EINVAL ;
333 /* Unlike Linux, HP-UX truncates it if n is too big: */ 334 /* Unlike Linux, HP-UX truncates it if n is too big: */
334 len = (n <= __NEW_UTS_LEN) ? n : __NEW_UTS_LEN ; 335 len = (n <= __NEW_UTS_LEN) ? n : __NEW_UTS_LEN ;
335 return( sys_sethostname(ubuf, len) ); 336 return sys_sethostname(ubuf, len);
336 break ; 337 break ;
337 case 4: 338 case 4:
338 /* sethostname(): 339 /* sethostname():
@@ -346,7 +347,7 @@ int hpux_utssys(char *ubuf, int n, int type)
346 return -EINVAL ; 347 return -EINVAL ;
347 /* Unlike Linux, HP-UX truncates it if n is too big: */ 348 /* Unlike Linux, HP-UX truncates it if n is too big: */
348 len = (n <= __NEW_UTS_LEN) ? n : __NEW_UTS_LEN ; 349 len = (n <= __NEW_UTS_LEN) ? n : __NEW_UTS_LEN ;
349 return( sys_sethostname(ubuf, len) ); 350 return sys_sethostname(ubuf, len);
350 break ; 351 break ;
351 case 5: 352 case 5:
352 /* gethostname(): 353 /* gethostname():
@@ -356,7 +357,7 @@ int hpux_utssys(char *ubuf, int n, int type)
356 /* Unlike Linux, HP-UX returns an error if n==0: */ 357 /* Unlike Linux, HP-UX returns an error if n==0: */
357 if ( n <= 0 ) 358 if ( n <= 0 )
358 return -EINVAL ; 359 return -EINVAL ;
359 return( sys_gethostname(ubuf, n) ); 360 return sys_gethostname(ubuf, n);
360 break ; 361 break ;
361 case 6: 362 case 6:
362 /* Supposedly called from setuname() in libc. 363 /* Supposedly called from setuname() in libc.
@@ -420,7 +421,7 @@ int hpux_utssys(char *ubuf, int n, int type)
420 } 421 }
421} 422}
422 423
423int hpux_getdomainname(char *name, int len) 424int hpux_getdomainname(char __user *name, int len)
424{ 425{
425 int nlen; 426 int nlen;
426 int err = -EFAULT; 427 int err = -EFAULT;
@@ -471,17 +472,18 @@ int hpux_sysfs(int opcode, unsigned long arg1, unsigned long arg2)
471 printk(KERN_DEBUG "hpux_sysfs called with arg1='%lx'\n", arg1); 472 printk(KERN_DEBUG "hpux_sysfs called with arg1='%lx'\n", arg1);
472 473
473 if ( opcode == 1 ) { /* GETFSIND */ 474 if ( opcode == 1 ) { /* GETFSIND */
474 len = strlen_user((char *)arg1); 475 char __user *user_fsname = (char __user *)arg1;
476 len = strlen_user(user_fsname);
475 printk(KERN_DEBUG "len of arg1 = %d\n", len); 477 printk(KERN_DEBUG "len of arg1 = %d\n", len);
476 if (len == 0) 478 if (len == 0)
477 return 0; 479 return 0;
478 fsname = kmalloc(len, GFP_KERNEL); 480 fsname = kmalloc(len, GFP_KERNEL);
479 if ( !fsname ) { 481 if (!fsname) {
480 printk(KERN_DEBUG "failed to kmalloc fsname\n"); 482 printk(KERN_DEBUG "failed to kmalloc fsname\n");
481 return 0; 483 return 0;
482 } 484 }
483 485
484 if ( copy_from_user(fsname, (char *)arg1, len) ) { 486 if (copy_from_user(fsname, user_fsname, len)) {
485 printk(KERN_DEBUG "failed to copy_from_user fsname\n"); 487 printk(KERN_DEBUG "failed to copy_from_user fsname\n");
486 kfree(fsname); 488 kfree(fsname);
487 return 0; 489 return 0;
@@ -495,7 +497,7 @@ int hpux_sysfs(int opcode, unsigned long arg1, unsigned long arg2)
495 fstype = 0; 497 fstype = 0;
496 } else { 498 } else {
497 fstype = 0; 499 fstype = 0;
498 }; 500 }
499 501
500 kfree(fsname); 502 kfree(fsname);
501 503
diff --git a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c
index d6c486e9501c..6274cd268e6a 100644
--- a/arch/parisc/kernel/drivers.c
+++ b/arch/parisc/kernel/drivers.c
@@ -689,7 +689,9 @@ parse_tree_node(struct device *parent, int index, struct hardware_path *modpath)
689 .fn = check_parent, 689 .fn = check_parent,
690 }; 690 };
691 691
692 device_for_each_child(parent, &recurse_data, descend_children); 692 if (device_for_each_child(parent, &recurse_data, descend_children))
693 /* nothing */;
694
693 return d.dev; 695 return d.dev;
694} 696}
695 697
@@ -835,8 +837,8 @@ static void print_parisc_device(struct parisc_device *dev)
835 static int count; 837 static int count;
836 838
837 print_pa_hwpath(dev, hw_path); 839 print_pa_hwpath(dev, hw_path);
838 printk(KERN_INFO "%d. %s at 0x%lx [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }", 840 printk(KERN_INFO "%d. %s at 0x%p [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }",
839 ++count, dev->name, dev->hpa.start, hw_path, dev->id.hw_type, 841 ++count, dev->name, (void*) dev->hpa.start, hw_path, dev->id.hw_type,
840 dev->id.hversion_rev, dev->id.hversion, dev->id.sversion); 842 dev->id.hversion_rev, dev->id.hversion, dev->id.sversion);
841 843
842 if (dev->num_addrs) { 844 if (dev->num_addrs) {
diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c
index f50b982b0834..47ea4e4a2179 100644
--- a/arch/parisc/kernel/module.c
+++ b/arch/parisc/kernel/module.c
@@ -822,7 +822,8 @@ int module_finalize(const Elf_Ehdr *hdr,
822 me->name, strtab, symhdr); 822 me->name, strtab, symhdr);
823 823
824 if(me->arch.got_count > MAX_GOTS) { 824 if(me->arch.got_count > MAX_GOTS) {
825 printk(KERN_ERR "%s: Global Offset Table overflow (used %ld, allowed %d\n", me->name, me->arch.got_count, MAX_GOTS); 825 printk(KERN_ERR "%s: Global Offset Table overflow (used %ld, allowed %d)\n",
826 me->name, me->arch.got_count, MAX_GOTS);
826 return -EINVAL; 827 return -EINVAL;
827 } 828 }
828 829
diff --git a/arch/parisc/kernel/pci-dma.c b/arch/parisc/kernel/pci-dma.c
index a6caf1073085..0c3aecb85a5c 100644
--- a/arch/parisc/kernel/pci-dma.c
+++ b/arch/parisc/kernel/pci-dma.c
@@ -342,7 +342,7 @@ pcxl_dma_init(void)
342 pcxl_res_map = (char *)__get_free_pages(GFP_KERNEL, 342 pcxl_res_map = (char *)__get_free_pages(GFP_KERNEL,
343 get_order(pcxl_res_size)); 343 get_order(pcxl_res_size));
344 memset(pcxl_res_map, 0, pcxl_res_size); 344 memset(pcxl_res_map, 0, pcxl_res_size);
345 proc_gsc_root = proc_mkdir("gsc", 0); 345 proc_gsc_root = proc_mkdir("gsc", NULL);
346 if (!proc_gsc_root) 346 if (!proc_gsc_root)
347 printk(KERN_WARNING 347 printk(KERN_WARNING
348 "pcxl_dma_init: Unable to create gsc /proc dir entry\n"); 348 "pcxl_dma_init: Unable to create gsc /proc dir entry\n");
diff --git a/arch/parisc/kernel/pci.c b/arch/parisc/kernel/pci.c
index 199887a61c76..563df0072dee 100644
--- a/arch/parisc/kernel/pci.c
+++ b/arch/parisc/kernel/pci.c
@@ -200,8 +200,8 @@ static void
200pcibios_link_hba_resources( struct resource *hba_res, struct resource *r) 200pcibios_link_hba_resources( struct resource *hba_res, struct resource *r)
201{ 201{
202 if (!r->parent) { 202 if (!r->parent) {
203 printk(KERN_EMERG "PCI: resource not parented! [%lx-%lx]\n", 203 printk(KERN_EMERG "PCI: resource not parented! [%p-%p]\n",
204 r->start, r->end); 204 (void*) r->start, (void*) r->end);
205 r->parent = hba_res; 205 r->parent = hba_res;
206 206
207 /* reverse link is harder *sigh* */ 207 /* reverse link is harder *sigh* */
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c
index 2f9f9dfa66f7..dfca014b49ba 100644
--- a/arch/parisc/kernel/process.c
+++ b/arch/parisc/kernel/process.c
@@ -355,8 +355,8 @@ asmlinkage int sys_execve(struct pt_regs *regs)
355 error = PTR_ERR(filename); 355 error = PTR_ERR(filename);
356 if (IS_ERR(filename)) 356 if (IS_ERR(filename))
357 goto out; 357 goto out;
358 error = do_execve(filename, (char __user **) regs->gr[25], 358 error = do_execve(filename, (char __user * __user *) regs->gr[25],
359 (char __user **) regs->gr[24], regs); 359 (char __user * __user *) regs->gr[24], regs);
360 if (error == 0) { 360 if (error == 0) {
361 task_lock(current); 361 task_lock(current);
362 current->ptrace &= ~PT_DTRACE; 362 current->ptrace &= ~PT_DTRACE;
diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c
index fb81e5687e7c..0af1fad2fc65 100644
--- a/arch/parisc/kernel/processor.c
+++ b/arch/parisc/kernel/processor.c
@@ -153,8 +153,6 @@ static int __init processor_probe(struct parisc_device *dev)
153 p->cpuid = cpuid; /* save CPU id */ 153 p->cpuid = cpuid; /* save CPU id */
154 p->txn_addr = txn_addr; /* save CPU IRQ address */ 154 p->txn_addr = txn_addr; /* save CPU IRQ address */
155#ifdef CONFIG_SMP 155#ifdef CONFIG_SMP
156 spin_lock_init(&p->lock);
157
158 /* 156 /*
159 ** FIXME: review if any other initialization is clobbered 157 ** FIXME: review if any other initialization is clobbered
160 ** for boot_cpu by the above memset(). 158 ** for boot_cpu by the above memset().
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c
index 12cc019307ad..3b67d115fb0a 100644
--- a/arch/parisc/kernel/smp.c
+++ b/arch/parisc/kernel/smp.c
@@ -76,6 +76,7 @@ cpumask_t cpu_possible_map __read_mostly = CPU_MASK_ALL; /* Bitmap of Present CP
76EXPORT_SYMBOL(cpu_online_map); 76EXPORT_SYMBOL(cpu_online_map);
77EXPORT_SYMBOL(cpu_possible_map); 77EXPORT_SYMBOL(cpu_possible_map);
78 78
79DEFINE_PER_CPU(spinlock_t, ipi_lock) = SPIN_LOCK_UNLOCKED;
79 80
80struct smp_call_struct { 81struct smp_call_struct {
81 void (*func) (void *info); 82 void (*func) (void *info);
@@ -167,10 +168,11 @@ ipi_interrupt(int irq, void *dev_id)
167 mb(); /* Order interrupt and bit testing. */ 168 mb(); /* Order interrupt and bit testing. */
168 169
169 for (;;) { 170 for (;;) {
170 spin_lock_irqsave(&(p->lock),flags); 171 spinlock_t *lock = &per_cpu(ipi_lock, this_cpu);
172 spin_lock_irqsave(lock, flags);
171 ops = p->pending_ipi; 173 ops = p->pending_ipi;
172 p->pending_ipi = 0; 174 p->pending_ipi = 0;
173 spin_unlock_irqrestore(&(p->lock),flags); 175 spin_unlock_irqrestore(lock, flags);
174 176
175 mb(); /* Order bit clearing and data access. */ 177 mb(); /* Order bit clearing and data access. */
176 178
@@ -275,12 +277,13 @@ static inline void
275ipi_send(int cpu, enum ipi_message_type op) 277ipi_send(int cpu, enum ipi_message_type op)
276{ 278{
277 struct cpuinfo_parisc *p = &cpu_data[cpu]; 279 struct cpuinfo_parisc *p = &cpu_data[cpu];
280 spinlock_t *lock = &per_cpu(ipi_lock, cpu);
278 unsigned long flags; 281 unsigned long flags;
279 282
280 spin_lock_irqsave(&(p->lock),flags); 283 spin_lock_irqsave(lock, flags);
281 p->pending_ipi |= 1 << op; 284 p->pending_ipi |= 1 << op;
282 gsc_writel(IPI_IRQ - CPU_IRQ_BASE, cpu_data[cpu].hpa); 285 gsc_writel(IPI_IRQ - CPU_IRQ_BASE, cpu_data[cpu].hpa);
283 spin_unlock_irqrestore(&(p->lock),flags); 286 spin_unlock_irqrestore(lock, flags);
284} 287}
285 288
286 289
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 0667f2b4f977..fc49a5ed78cc 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -24,6 +24,7 @@
24#include <linux/pagemap.h> /* for release_pages and page_cache_release */ 24#include <linux/pagemap.h> /* for release_pages and page_cache_release */
25 25
26#include <asm/pgalloc.h> 26#include <asm/pgalloc.h>
27#include <asm/pgtable.h>
27#include <asm/tlb.h> 28#include <asm/tlb.h>
28#include <asm/pdc_chassis.h> 29#include <asm/pdc_chassis.h>
29#include <asm/mmzone.h> 30#include <asm/mmzone.h>
@@ -453,6 +454,8 @@ unsigned long pcxl_dma_start __read_mostly;
453 454
454void __init mem_init(void) 455void __init mem_init(void)
455{ 456{
457 int codesize, reservedpages, datasize, initsize;
458
456 high_memory = __va((max_pfn << PAGE_SHIFT)); 459 high_memory = __va((max_pfn << PAGE_SHIFT));
457 460
458#ifndef CONFIG_DISCONTIGMEM 461#ifndef CONFIG_DISCONTIGMEM
@@ -467,7 +470,32 @@ void __init mem_init(void)
467 } 470 }
468#endif 471#endif
469 472
470 printk(KERN_INFO "Memory: %luk available\n", num_physpages << (PAGE_SHIFT-10)); 473 codesize = (unsigned long)_etext - (unsigned long)_text;
474 datasize = (unsigned long)_edata - (unsigned long)_etext;
475 initsize = (unsigned long)__init_end - (unsigned long)__init_begin;
476
477 reservedpages = 0;
478{
479 unsigned long pfn;
480#ifdef CONFIG_DISCONTIGMEM
481 int i;
482
483 for (i = 0; i < npmem_ranges; i++) {
484 for (pfn = node_start_pfn(i); pfn < node_end_pfn(i); pfn++) {
485 if (PageReserved(pfn_to_page(pfn)))
486 reservedpages++;
487 }
488 }
489#else /* !CONFIG_DISCONTIGMEM */
490 for (pfn = 0; pfn < max_pfn; pfn++) {
491 /*
492 * Only count reserved RAM pages
493 */
494 if (PageReserved(pfn_to_page(pfn)))
495 reservedpages++;
496 }
497#endif
498}
471 499
472#ifdef CONFIG_PA11 500#ifdef CONFIG_PA11
473 if (hppa_dma_ops == &pcxl_dma_ops) { 501 if (hppa_dma_ops == &pcxl_dma_ops) {
@@ -481,6 +509,38 @@ void __init mem_init(void)
481 vmalloc_start = SET_MAP_OFFSET(MAP_START); 509 vmalloc_start = SET_MAP_OFFSET(MAP_START);
482#endif 510#endif
483 511
512 printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, %dk reserved, %dk data, %dk init)\n",
513 (unsigned long)nr_free_pages() << (PAGE_SHIFT-10),
514 num_physpages << (PAGE_SHIFT-10),
515 codesize >> 10,
516 reservedpages << (PAGE_SHIFT-10),
517 datasize >> 10,
518 initsize >> 10
519 );
520
521#ifdef CONFIG_DEBUG_KERNEL /* double-sanity-check paranoia */
522 printk("virtual kernel memory layout:\n"
523 " vmalloc : 0x%p - 0x%p (%4ld MB)\n"
524 " memory : 0x%p - 0x%p (%4ld MB)\n"
525 " .init : 0x%p - 0x%p (%4ld kB)\n"
526 " .data : 0x%p - 0x%p (%4ld kB)\n"
527 " .text : 0x%p - 0x%p (%4ld kB)\n",
528
529 (void*)VMALLOC_START, (void*)VMALLOC_END,
530 (VMALLOC_END - VMALLOC_START) >> 20,
531
532 __va(0), high_memory,
533 ((unsigned long)high_memory - (unsigned long)__va(0)) >> 20,
534
535 __init_begin, __init_end,
536 ((unsigned long)__init_end - (unsigned long)__init_begin) >> 10,
537
538 _etext, _edata,
539 ((unsigned long)_edata - (unsigned long)_etext) >> 10,
540
541 _text, _etext,
542 ((unsigned long)_etext - (unsigned long)_text) >> 10);
543#endif
484} 544}
485 545
486unsigned long *empty_zero_page __read_mostly; 546unsigned long *empty_zero_page __read_mostly;
@@ -548,7 +608,7 @@ void show_mem(void)
548 608
549 printk("Zone list for zone %d on node %d: ", j, i); 609 printk("Zone list for zone %d on node %d: ", j, i);
550 for (k = 0; zl->zones[k] != NULL; k++) 610 for (k = 0; zl->zones[k] != NULL; k++)
551 printk("[%d/%s] ", zone_to_nid(zl->zones[k]), zl->zones[k]->name); 611 printk("[%ld/%s] ", zone_to_nid(zl->zones[k]), zl->zones[k]->name);
552 printk("\n"); 612 printk("\n");
553 } 613 }
554 } 614 }
diff --git a/arch/parisc/mm/ioremap.c b/arch/parisc/mm/ioremap.c
index 44b42c7f639d..92d496ad07c9 100644
--- a/arch/parisc/mm/ioremap.c
+++ b/arch/parisc/mm/ioremap.c
@@ -26,7 +26,7 @@
26 */ 26 */
27void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flags) 27void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flags)
28{ 28{
29 void *addr; 29 void __iomem *addr;
30 struct vm_struct *area; 30 struct vm_struct *area;
31 unsigned long offset, last_addr; 31 unsigned long offset, last_addr;
32 pgprot_t pgprot; 32 pgprot_t pgprot;
@@ -80,14 +80,14 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l
80 if (!area) 80 if (!area)
81 return NULL; 81 return NULL;
82 82
83 addr = area->addr; 83 addr = (void __iomem *) area->addr;
84 if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size, 84 if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size,
85 phys_addr, pgprot)) { 85 phys_addr, pgprot)) {
86 vfree(addr); 86 vfree(addr);
87 return NULL; 87 return NULL;
88 } 88 }
89 89
90 return (void __iomem *) (offset + (char *)addr); 90 return (void __iomem *) (offset + (char __iomem *)addr);
91} 91}
92EXPORT_SYMBOL(__ioremap); 92EXPORT_SYMBOL(__ioremap);
93 93
diff --git a/arch/parisc/mm/kmap.c b/arch/parisc/mm/kmap.c
deleted file mode 100644
index 1b1acd5e2f6e..000000000000
--- a/arch/parisc/mm/kmap.c
+++ /dev/null
@@ -1,166 +0,0 @@
1/*
2 * kmap/page table map and unmap support routines
3 *
4 * Copyright 1999,2000 Hewlett-Packard Company
5 * Copyright 2000 John Marvin <jsm at hp.com>
6 * Copyright 2000 Grant Grundler <grundler at parisc-linux.org>
7 * Copyright 2000 Philipp Rumpf <prumpf@tux.org>
8 *
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
24/*
25** Stolen mostly from arch/parisc/kernel/pci-dma.c
26*/
27
28#include <linux/types.h>
29#include <linux/mm.h>
30#include <linux/string.h>
31#include <linux/pci.h>
32
33#include <linux/slab.h>
34#include <linux/vmalloc.h>
35
36#include <asm/uaccess.h>
37#include <asm/pgalloc.h>
38
39#include <asm/io.h>
40#include <asm/page.h> /* get_order */
41
42#undef flush_cache_all
43#define flush_cache_all flush_all_caches
44
45typedef void (*pte_iterator_t) (pte_t * pte, unsigned long arg);
46
47#if 0
48/* XXX This routine could be used with iterate_page() to replace
49 * unmap_uncached_page() and save a little code space but I didn't
50 * do that since I'm not certain whether this is the right path. -PB
51 */
52static void unmap_cached_pte(pte_t * pte, unsigned long addr, unsigned long arg)
53{
54 pte_t page = *pte;
55 pte_clear(&init_mm, addr, pte);
56 if (!pte_none(page)) {
57 if (pte_present(page)) {
58 unsigned long map_nr = pte_pagenr(page);
59 if (map_nr < max_mapnr)
60 __free_page(mem_map + map_nr);
61 } else {
62 printk(KERN_CRIT
63 "Whee.. Swapped out page in kernel page table\n");
64 }
65 }
66}
67#endif
68
69/* These two routines should probably check a few things... */
70static void set_uncached(pte_t * pte, unsigned long arg)
71{
72 pte_val(*pte) |= _PAGE_NO_CACHE;
73}
74
75static void set_cached(pte_t * pte, unsigned long arg)
76{
77 pte_val(*pte) &= ~_PAGE_NO_CACHE;
78}
79
80static inline void iterate_pte(pmd_t * pmd, unsigned long address,
81 unsigned long size, pte_iterator_t op,
82 unsigned long arg)
83{
84 pte_t *pte;
85 unsigned long end;
86
87 if (pmd_none(*pmd))
88 return;
89 if (pmd_bad(*pmd)) {
90 pmd_ERROR(*pmd);
91 pmd_clear(pmd);
92 return;
93 }
94 pte = pte_offset(pmd, address);
95 address &= ~PMD_MASK;
96 end = address + size;
97 if (end > PMD_SIZE)
98 end = PMD_SIZE;
99 do {
100 op(pte, arg);
101 address += PAGE_SIZE;
102 pte++;
103 } while (address < end);
104}
105
106static inline void iterate_pmd(pgd_t * dir, unsigned long address,
107 unsigned long size, pte_iterator_t op,
108 unsigned long arg)
109{
110 pmd_t *pmd;
111 unsigned long end;
112
113 if (pgd_none(*dir))
114 return;
115 if (pgd_bad(*dir)) {
116 pgd_ERROR(*dir);
117 pgd_clear(dir);
118 return;
119 }
120 pmd = pmd_offset(dir, address);
121 address &= ~PGDIR_MASK;
122 end = address + size;
123 if (end > PGDIR_SIZE)
124 end = PGDIR_SIZE;
125 do {
126 iterate_pte(pmd, address, end - address, op, arg);
127 address = (address + PMD_SIZE) & PMD_MASK;
128 pmd++;
129 } while (address < end);
130}
131
132static void iterate_pages(unsigned long address, unsigned long size,
133 pte_iterator_t op, unsigned long arg)
134{
135 pgd_t *dir;
136 unsigned long end = address + size;
137
138 dir = pgd_offset_k(address);
139 flush_cache_all();
140 do {
141 iterate_pmd(dir, address, end - address, op, arg);
142 address = (address + PGDIR_SIZE) & PGDIR_MASK;
143 dir++;
144 } while (address && (address < end));
145 flush_tlb_all();
146}
147
148void
149kernel_set_cachemode(unsigned long vaddr, unsigned long size, int what)
150{
151 switch (what) {
152 case IOMAP_FULL_CACHING:
153 iterate_pages(vaddr, size, set_cached, 0);
154 flush_tlb_range(NULL, vaddr, size);
155 break;
156 case IOMAP_NOCACHE_SER:
157 iterate_pages(vaddr, size, set_uncached, 0);
158 flush_tlb_range(NULL, vaddr, size);
159 break;
160 default:
161 printk(KERN_CRIT
162 "kernel_set_cachemode mode %d not understood\n",
163 what);
164 break;
165 }
166}
diff --git a/arch/parisc/oprofile/init.c b/arch/parisc/oprofile/init.c
index a5b898c4d0b0..113f5139f551 100644
--- a/arch/parisc/oprofile/init.c
+++ b/arch/parisc/oprofile/init.c
@@ -18,6 +18,6 @@ int __init oprofile_arch_init(struct oprofile_operations * ops)
18} 18}
19 19
20 20
21void oprofile_arch_exit() 21void oprofile_arch_exit(void)
22{ 22{
23} 23}
diff --git a/drivers/char/agp/parisc-agp.c b/drivers/char/agp/parisc-agp.c
index 17c50b0f83f0..30cc7aeae9ab 100644
--- a/drivers/char/agp/parisc-agp.c
+++ b/drivers/char/agp/parisc-agp.c
@@ -235,7 +235,7 @@ static int __init
235agp_ioc_init(void __iomem *ioc_regs) 235agp_ioc_init(void __iomem *ioc_regs)
236{ 236{
237 struct _parisc_agp_info *info = &parisc_agp_info; 237 struct _parisc_agp_info *info = &parisc_agp_info;
238 u64 *iova_base, *io_pdir, io_tlb_ps; 238 u64 iova_base, *io_pdir, io_tlb_ps;
239 int io_tlb_shift; 239 int io_tlb_shift;
240 240
241 printk(KERN_INFO DRVPFX "IO PDIR shared with sba_iommu\n"); 241 printk(KERN_INFO DRVPFX "IO PDIR shared with sba_iommu\n");
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 8aa8dd02b910..79eade7e9d91 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -440,10 +440,10 @@ config HPLANCE
440 440
441config LASI_82596 441config LASI_82596
442 tristate "Lasi ethernet" 442 tristate "Lasi ethernet"
443 depends on NET_ETHERNET && PARISC && GSC_LASI 443 depends on NET_ETHERNET && GSC
444 help 444 help
445 Say Y here to support the on-board Intel 82596 ethernet controller 445 Say Y here to support the builtin Intel 82596 ethernet controller
446 built into Hewlett-Packard PA-RISC machines. 446 found in Hewlett-Packard PA-RISC machines with 10Mbit ethernet.
447 447
448config MIPS_JAZZ_SONIC 448config MIPS_JAZZ_SONIC
449 tristate "MIPS JAZZ onboard SONIC Ethernet support" 449 tristate "MIPS JAZZ onboard SONIC Ethernet support"
diff --git a/drivers/net/lasi_82596.c b/drivers/net/lasi_82596.c
index ea392f2a5aa2..452863d5d498 100644
--- a/drivers/net/lasi_82596.c
+++ b/drivers/net/lasi_82596.c
@@ -384,7 +384,7 @@ struct i596_private {
384 struct device *dev; 384 struct device *dev;
385}; 385};
386 386
387static char init_setup[] = 387static const char init_setup[] =
388{ 388{
389 0x8E, /* length, prefetch on */ 389 0x8E, /* length, prefetch on */
390 0xC8, /* fifo to 8, monitor off */ 390 0xC8, /* fifo to 8, monitor off */
@@ -683,7 +683,7 @@ static int init_i596_mem(struct net_device *dev)
683 enable_irq(dev->irq); /* enable IRQs from LAN */ 683 enable_irq(dev->irq); /* enable IRQs from LAN */
684 684
685 DEB(DEB_INIT, printk("%s: queuing CmdConfigure\n", dev->name)); 685 DEB(DEB_INIT, printk("%s: queuing CmdConfigure\n", dev->name));
686 memcpy(lp->cf_cmd.i596_config, init_setup, 14); 686 memcpy(lp->cf_cmd.i596_config, init_setup, sizeof(init_setup));
687 lp->cf_cmd.cmd.command = CmdConfigure; 687 lp->cf_cmd.cmd.command = CmdConfigure;
688 CHECK_WBACK(lp, &(lp->cf_cmd), sizeof(struct cf_cmd)); 688 CHECK_WBACK(lp, &(lp->cf_cmd), sizeof(struct cf_cmd));
689 i596_add_cmd(dev, &lp->cf_cmd.cmd); 689 i596_add_cmd(dev, &lp->cf_cmd.cmd);
@@ -1156,32 +1156,12 @@ static int __devinit i82596_probe(struct net_device *dev,
1156 dma_addr_t dma_addr; 1156 dma_addr_t dma_addr;
1157 1157
1158 /* This lot is ensure things have been cache line aligned. */ 1158 /* This lot is ensure things have been cache line aligned. */
1159 if (sizeof(struct i596_rfd) != 32) { 1159 BUILD_BUG_ON(sizeof(struct i596_rfd) != 32);
1160 printk("82596: sizeof(struct i596_rfd) = %d\n", 1160 BUILD_BUG_ON(sizeof(struct i596_rbd) & 31);
1161 (int)sizeof(struct i596_rfd)); 1161 BUILD_BUG_ON(sizeof(struct tx_cmd) & 31);
1162 return -ENODEV; 1162 BUILD_BUG_ON(sizeof(struct i596_tbd) != 32);
1163 }
1164 if ((sizeof(struct i596_rbd) % 32) != 0) {
1165 printk("82596: sizeof(struct i596_rbd) = %d\n",
1166 (int)sizeof(struct i596_rbd));
1167 return -ENODEV;
1168 }
1169 if ((sizeof(struct tx_cmd) % 32) != 0) {
1170 printk("82596: sizeof(struct tx_cmd) = %d\n",
1171 (int)sizeof(struct tx_cmd));
1172 return -ENODEV;
1173 }
1174 if (sizeof(struct i596_tbd) != 32) {
1175 printk("82596: sizeof(struct i596_tbd) = %d\n",
1176 (int)sizeof(struct i596_tbd));
1177 return -ENODEV;
1178 }
1179#ifndef __LP64__ 1163#ifndef __LP64__
1180 if (sizeof(struct i596_private) > 4096) { 1164 BUILD_BUG_ON(sizeof(struct i596_private) > 4096);
1181 printk("82596: sizeof(struct i596_private) = %d\n",
1182 (int)sizeof(struct i596_private));
1183 return -ENODEV;
1184 }
1185#endif 1165#endif
1186 1166
1187 if (!dev->base_addr || !dev->irq) 1167 if (!dev->base_addr || !dev->irq)
diff --git a/drivers/parisc/hppb.c b/drivers/parisc/hppb.c
index 07dc2b6d4e93..9bb4db552f3c 100644
--- a/drivers/parisc/hppb.c
+++ b/drivers/parisc/hppb.c
@@ -10,10 +10,6 @@
10** the Free Software Foundation; either version 2 of the License, or 10** the Free Software Foundation; either version 2 of the License, or
11** (at your option) any later version. 11** (at your option) any later version.
12** 12**
13** This Driver currently only supports the console (port 0) on the MUX.
14** Additional work will be needed on this driver to enable the full
15** functionality of the MUX.
16**
17*/ 13*/
18 14
19#include <linux/types.h> 15#include <linux/types.h>
@@ -67,7 +63,7 @@ static int hppb_probe(struct parisc_device *dev)
67 } 63 }
68 card = card->next; 64 card = card->next;
69 } 65 }
70 printk(KERN_INFO "Found GeckoBoa at 0x%lx\n", dev->hpa.start); 66 printk(KERN_INFO "Found GeckoBoa at 0x%x\n", dev->hpa.start);
71 67
72 card->hpa = dev->hpa.start; 68 card->hpa = dev->hpa.start;
73 card->mmio_region.name = "HP-PB Bus"; 69 card->mmio_region.name = "HP-PB Bus";
@@ -78,16 +74,18 @@ static int hppb_probe(struct parisc_device *dev)
78 74
79 status = ccio_request_resource(dev, &card->mmio_region); 75 status = ccio_request_resource(dev, &card->mmio_region);
80 if(status < 0) { 76 if(status < 0) {
81 printk(KERN_ERR "%s: failed to claim HP-PB bus space (%08lx, %08lx)\n", 77 printk(KERN_ERR "%s: failed to claim HP-PB bus space (%08x, %08x)\n",
82 __FILE__, card->mmio_region.start, card->mmio_region.end); 78 __FILE__, card->mmio_region.start, card->mmio_region.end);
83 } 79 }
84 80
85 return 0; 81 return 0;
86} 82}
87 83
88
89static struct parisc_device_id hppb_tbl[] = { 84static struct parisc_device_id hppb_tbl[] = {
90 { HPHW_BCPORT, HVERSION_REV_ANY_ID, 0x500, 0xc }, 85 { HPHW_BCPORT, HVERSION_REV_ANY_ID, 0x500, 0xc }, /* E25 and K */
86 { HPHW_BCPORT, 0x0, 0x501, 0xc }, /* E35 */
87 { HPHW_BCPORT, 0x0, 0x502, 0xc }, /* E45 */
88 { HPHW_BCPORT, 0x0, 0x503, 0xc }, /* E55 */
91 { 0, } 89 { 0, }
92}; 90};
93 91
diff --git a/drivers/parisc/iosapic_private.h b/drivers/parisc/iosapic_private.h
index 41e7ec2a44aa..6e05e30a2450 100644
--- a/drivers/parisc/iosapic_private.h
+++ b/drivers/parisc/iosapic_private.h
@@ -132,7 +132,7 @@ struct iosapic_irt {
132struct vector_info { 132struct vector_info {
133 struct iosapic_info *iosapic; /* I/O SAPIC this vector is on */ 133 struct iosapic_info *iosapic; /* I/O SAPIC this vector is on */
134 struct irt_entry *irte; /* IRT entry */ 134 struct irt_entry *irte; /* IRT entry */
135 u32 *eoi_addr; /* precalculate EOI reg address */ 135 u32 __iomem *eoi_addr; /* precalculate EOI reg address */
136 u32 eoi_data; /* IA64: ? PA: swapped txn_data */ 136 u32 eoi_data; /* IA64: ? PA: swapped txn_data */
137 int txn_irq; /* virtual IRQ number for processor */ 137 int txn_irq; /* virtual IRQ number for processor */
138 ulong txn_addr; /* IA64: id_eid PA: partial HPA */ 138 ulong txn_addr; /* IA64: id_eid PA: partial HPA */
diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c
index ba6769934c77..eae0812f01a5 100644
--- a/drivers/parisc/lba_pci.c
+++ b/drivers/parisc/lba_pci.c
@@ -980,7 +980,7 @@ LBA_PORT_IN(32, 0)
980#define LBA_PORT_OUT(size, mask) \ 980#define LBA_PORT_OUT(size, mask) \
981static void lba_pat_out##size (struct pci_hba_data *l, u16 addr, u##size val) \ 981static void lba_pat_out##size (struct pci_hba_data *l, u16 addr, u##size val) \
982{ \ 982{ \
983 void *where = (void *) PIOP_TO_GMMIO(LBA_DEV(l), addr); \ 983 void __iomem *where = PIOP_TO_GMMIO(LBA_DEV(l), addr); \
984 DBG_PORT("%s(0x%p, 0x%x, 0x%x)\n", __FUNCTION__, l, addr, val); \ 984 DBG_PORT("%s(0x%p, 0x%x, 0x%x)\n", __FUNCTION__, l, addr, val); \
985 WRITE_REG##size(val, where); \ 985 WRITE_REG##size(val, where); \
986 /* flush the I/O down to the elroy at least */ \ 986 /* flush the I/O down to the elroy at least */ \
@@ -1406,13 +1406,20 @@ lba_hw_init(struct lba_device *d)
1406 return 0; 1406 return 0;
1407} 1407}
1408 1408
1409 1409/*
1410 * Unfortunately, when firmware numbers busses, it doesn't take into account
1411 * Cardbus bridges. So we have to renumber the busses to suit ourselves.
1412 * Elroy/Mercury don't actually know what bus number they're attached to;
1413 * we use bus 0 to indicate the directly attached bus and any other bus
1414 * number will be taken care of by the PCI-PCI bridge.
1415 */
1416static unsigned int lba_next_bus = 0;
1410 1417
1411/* 1418/*
1412** Determine if lba should claim this chip (return 0) or not (return 1). 1419 * Determine if lba should claim this chip (return 0) or not (return 1).
1413** If so, initialize the chip and tell other partners in crime they 1420 * If so, initialize the chip and tell other partners in crime they
1414** have work to do. 1421 * have work to do.
1415*/ 1422 */
1416static int __init 1423static int __init
1417lba_driver_probe(struct parisc_device *dev) 1424lba_driver_probe(struct parisc_device *dev)
1418{ 1425{
@@ -1478,9 +1485,7 @@ lba_driver_probe(struct parisc_device *dev)
1478 return -ENODEV; 1485 return -ENODEV;
1479 } 1486 }
1480 1487
1481 /* 1488 /* Tell I/O SAPIC driver we have a IRQ handler/region. */
1482 ** Tell I/O SAPIC driver we have a IRQ handler/region.
1483 */
1484 tmp_obj = iosapic_register(dev->hpa.start + LBA_IOSAPIC_BASE); 1489 tmp_obj = iosapic_register(dev->hpa.start + LBA_IOSAPIC_BASE);
1485 1490
1486 /* NOTE: PCI devices (e.g. 103c:1005 graphics card) which don't 1491 /* NOTE: PCI devices (e.g. 103c:1005 graphics card) which don't
@@ -1529,16 +1534,17 @@ lba_driver_probe(struct parisc_device *dev)
1529 lba_legacy_resources(dev, lba_dev); 1534 lba_legacy_resources(dev, lba_dev);
1530 } 1535 }
1531 1536
1532 /* 1537 if (lba_dev->hba.bus_num.start < lba_next_bus)
1533 ** Tell PCI support another PCI bus was found. 1538 lba_dev->hba.bus_num.start = lba_next_bus;
1534 ** Walks PCI bus for us too. 1539
1535 */
1536 dev->dev.platform_data = lba_dev; 1540 dev->dev.platform_data = lba_dev;
1537 lba_bus = lba_dev->hba.hba_bus = 1541 lba_bus = lba_dev->hba.hba_bus =
1538 pci_scan_bus_parented(&dev->dev, lba_dev->hba.bus_num.start, 1542 pci_scan_bus_parented(&dev->dev, lba_dev->hba.bus_num.start,
1539 cfg_ops, NULL); 1543 cfg_ops, NULL);
1540 if (lba_bus) 1544 if (lba_bus) {
1545 lba_next_bus = lba_bus->subordinate + 1;
1541 pci_bus_add_devices(lba_bus); 1546 pci_bus_add_devices(lba_bus);
1547 }
1542 1548
1543 /* This is in lieu of calling pci_assign_unassigned_resources() */ 1549 /* This is in lieu of calling pci_assign_unassigned_resources() */
1544 if (is_pdc_pat()) { 1550 if (is_pdc_pat()) {
diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c
index 8dac2ba82bb9..6818c10c0c46 100644
--- a/drivers/parisc/led.c
+++ b/drivers/parisc/led.c
@@ -66,8 +66,8 @@ static char lcd_text_default[32] __read_mostly;
66 66
67 67
68static struct workqueue_struct *led_wq; 68static struct workqueue_struct *led_wq;
69static void led_work_func(void *); 69static void led_work_func(struct work_struct *);
70static DECLARE_WORK(led_task, led_work_func, NULL); 70static DECLARE_DELAYED_WORK(led_task, led_work_func);
71 71
72#if 0 72#if 0
73#define DPRINTK(x) printk x 73#define DPRINTK(x) printk x
@@ -136,7 +136,7 @@ static int start_task(void)
136 136
137 /* Create the work queue and queue the LED task */ 137 /* Create the work queue and queue the LED task */
138 led_wq = create_singlethread_workqueue("led_wq"); 138 led_wq = create_singlethread_workqueue("led_wq");
139 queue_work(led_wq, &led_task); 139 queue_delayed_work(led_wq, &led_task, 0);
140 140
141 return 0; 141 return 0;
142} 142}
@@ -443,7 +443,7 @@ static __inline__ int led_get_diskio_activity(void)
443 443
444#define LED_UPDATE_INTERVAL (1 + (HZ*19/1000)) 444#define LED_UPDATE_INTERVAL (1 + (HZ*19/1000))
445 445
446static void led_work_func (void *unused) 446static void led_work_func (struct work_struct *unused)
447{ 447{
448 static unsigned long last_jiffies; 448 static unsigned long last_jiffies;
449 static unsigned long count_HZ; /* counter in range 0..HZ */ 449 static unsigned long count_HZ; /* counter in range 0..HZ */
@@ -590,7 +590,7 @@ int __init register_led_driver(int model, unsigned long cmd_reg, unsigned long d
590 590
591 /* Ensure the work is queued */ 591 /* Ensure the work is queued */
592 if (led_wq) { 592 if (led_wq) {
593 queue_work(led_wq, &led_task); 593 queue_delayed_work(led_wq, &led_task, 0);
594 } 594 }
595 595
596 return 0; 596 return 0;
@@ -660,7 +660,7 @@ int lcd_print( char *str )
660 660
661 /* re-queue the work */ 661 /* re-queue the work */
662 if (led_wq) { 662 if (led_wq) {
663 queue_work(led_wq, &led_task); 663 queue_delayed_work(led_wq, &led_task, 0);
664 } 664 }
665 665
666 return lcd_info.lcd_width; 666 return lcd_info.lcd_width;
diff --git a/drivers/parisc/power.c b/drivers/parisc/power.c
index 97e9dc066f95..9228e210c3bb 100644
--- a/drivers/parisc/power.c
+++ b/drivers/parisc/power.c
@@ -82,7 +82,7 @@
82} ) 82} )
83 83
84 84
85static void deferred_poweroff(void *dummy) 85static void deferred_poweroff(struct work_struct *unused)
86{ 86{
87 if (kill_cad_pid(SIGINT, 1)) { 87 if (kill_cad_pid(SIGINT, 1)) {
88 /* just in case killing init process failed */ 88 /* just in case killing init process failed */
@@ -96,7 +96,7 @@ static void deferred_poweroff(void *dummy)
96 * use schedule_work(). 96 * use schedule_work().
97 */ 97 */
98 98
99static DECLARE_WORK(poweroff_work, deferred_poweroff, NULL); 99static DECLARE_WORK(poweroff_work, deferred_poweroff);
100 100
101static void poweroff(void) 101static void poweroff(void)
102{ 102{
diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c
index f1e7ccd5475b..26fece45e737 100644
--- a/drivers/parisc/sba_iommu.c
+++ b/drivers/parisc/sba_iommu.c
@@ -109,7 +109,7 @@ static unsigned long piranha_bad_128k = 0;
109 109
110#ifdef SBA_AGP_SUPPORT 110#ifdef SBA_AGP_SUPPORT
111static int sba_reserve_agpgart = 1; 111static int sba_reserve_agpgart = 1;
112module_param(sba_reserve_agpgart, int, 1); 112module_param(sba_reserve_agpgart, int, 0444);
113MODULE_PARM_DESC(sba_reserve_agpgart, "Reserve half of IO pdir as AGPGART"); 113MODULE_PARM_DESC(sba_reserve_agpgart, "Reserve half of IO pdir as AGPGART");
114#endif 114#endif
115 115
@@ -846,7 +846,7 @@ static void *sba_alloc_consistent(struct device *hwdev, size_t size,
846 if (!hwdev) { 846 if (!hwdev) {
847 /* only support PCI */ 847 /* only support PCI */
848 *dma_handle = 0; 848 *dma_handle = 0;
849 return 0; 849 return NULL;
850 } 850 }
851 851
852 ret = (void *) __get_free_pages(gfp, get_order(size)); 852 ret = (void *) __get_free_pages(gfp, get_order(size));
diff --git a/drivers/serial/mux.c b/drivers/serial/mux.c
index ccb8fa1800a5..83211013deb8 100644
--- a/drivers/serial/mux.c
+++ b/drivers/serial/mux.c
@@ -51,7 +51,11 @@
51 51
52#define MUX_NR 256 52#define MUX_NR 256
53static unsigned int port_cnt __read_mostly; 53static unsigned int port_cnt __read_mostly;
54static struct uart_port mux_ports[MUX_NR]; 54struct mux_port {
55 struct uart_port port;
56 int enabled;
57};
58static struct mux_port mux_ports[MUX_NR];
55 59
56static struct uart_driver mux_driver = { 60static struct uart_driver mux_driver = {
57 .owner = THIS_MODULE, 61 .owner = THIS_MODULE,
@@ -66,7 +70,36 @@ static struct timer_list mux_timer;
66 70
67#define UART_PUT_CHAR(p, c) __raw_writel((c), (p)->membase + IO_DATA_REG_OFFSET) 71#define UART_PUT_CHAR(p, c) __raw_writel((c), (p)->membase + IO_DATA_REG_OFFSET)
68#define UART_GET_FIFO_CNT(p) __raw_readl((p)->membase + IO_DCOUNT_REG_OFFSET) 72#define UART_GET_FIFO_CNT(p) __raw_readl((p)->membase + IO_DCOUNT_REG_OFFSET)
69#define GET_MUX_PORTS(iodc_data) ((((iodc_data)[4] & 0xf0) >> 4) * 8) + 8 73
74/**
75 * get_mux_port_count - Get the number of available ports on the Mux.
76 * @dev: The parisc device.
77 *
78 * This function is used to determine the number of ports the Mux
79 * supports. The IODC data reports the number of ports the Mux
80 * can support, but there are cases where not all the Mux ports
81 * are connected. This function can override the IODC and
82 * return the true port count.
83 */
84static int __init get_mux_port_count(struct parisc_device *dev)
85{
86 int status;
87 u8 iodc_data[32];
88 unsigned long bytecnt;
89
90 /* If this is the built-in Mux for the K-Class (Eole CAP/MUX),
91 * we only need to allocate resources for 1 port since the
92 * other 7 ports are not connected.
93 */
94 if(dev->id.hversion == 0x15)
95 return 1;
96
97 status = pdc_iodc_read(&bytecnt, dev->hpa.start, 0, iodc_data, 32);
98 BUG_ON(status != PDC_OK);
99
100 /* Return the number of ports specified in the iodc data. */
101 return ((((iodc_data)[4] & 0xf0) >> 4) * 8) + 8;
102}
70 103
71/** 104/**
72 * mux_tx_empty - Check if the transmitter fifo is empty. 105 * mux_tx_empty - Check if the transmitter fifo is empty.
@@ -250,7 +283,7 @@ static void mux_read(struct uart_port *port)
250 */ 283 */
251static int mux_startup(struct uart_port *port) 284static int mux_startup(struct uart_port *port)
252{ 285{
253 mod_timer(&mux_timer, jiffies + MUX_POLL_DELAY); 286 mux_ports[port->line].enabled = 1;
254 return 0; 287 return 0;
255} 288}
256 289
@@ -262,6 +295,7 @@ static int mux_startup(struct uart_port *port)
262 */ 295 */
263static void mux_shutdown(struct uart_port *port) 296static void mux_shutdown(struct uart_port *port)
264{ 297{
298 mux_ports[port->line].enabled = 0;
265} 299}
266 300
267/** 301/**
@@ -319,7 +353,7 @@ static int mux_request_port(struct uart_port *port)
319 * @port: Ptr to the uart_port. 353 * @port: Ptr to the uart_port.
320 * @type: Bitmask of required configurations. 354 * @type: Bitmask of required configurations.
321 * 355 *
322 * Perform any autoconfiguration steps for the port. This functino is 356 * Perform any autoconfiguration steps for the port. This function is
323 * called if the UPF_BOOT_AUTOCONF flag is specified for the port. 357 * called if the UPF_BOOT_AUTOCONF flag is specified for the port.
324 * [Note: This is required for now because of a bug in the Serial core. 358 * [Note: This is required for now because of a bug in the Serial core.
325 * rmk has already submitted a patch to linus, should be available for 359 * rmk has already submitted a patch to linus, should be available for
@@ -357,11 +391,11 @@ static void mux_poll(unsigned long unused)
357 int i; 391 int i;
358 392
359 for(i = 0; i < port_cnt; ++i) { 393 for(i = 0; i < port_cnt; ++i) {
360 if(!mux_ports[i].info) 394 if(!mux_ports[i].enabled)
361 continue; 395 continue;
362 396
363 mux_read(&mux_ports[i]); 397 mux_read(&mux_ports[i].port);
364 mux_write(&mux_ports[i]); 398 mux_write(&mux_ports[i].port);
365 } 399 }
366 400
367 mod_timer(&mux_timer, jiffies + MUX_POLL_DELAY); 401 mod_timer(&mux_timer, jiffies + MUX_POLL_DELAY);
@@ -371,8 +405,17 @@ static void mux_poll(unsigned long unused)
371#ifdef CONFIG_SERIAL_MUX_CONSOLE 405#ifdef CONFIG_SERIAL_MUX_CONSOLE
372static void mux_console_write(struct console *co, const char *s, unsigned count) 406static void mux_console_write(struct console *co, const char *s, unsigned count)
373{ 407{
374 while(count--) 408 /* Wait until the FIFO drains. */
375 pdc_iodc_putc(*s++); 409 while(UART_GET_FIFO_CNT(&mux_ports[0].port))
410 udelay(1);
411
412 while(count--) {
413 if(*s == '\n') {
414 UART_PUT_CHAR(&mux_ports[0].port, '\r');
415 }
416 UART_PUT_CHAR(&mux_ports[0].port, *s++);
417 }
418
376} 419}
377 420
378static int mux_console_setup(struct console *co, char *options) 421static int mux_console_setup(struct console *co, char *options)
@@ -428,19 +471,14 @@ static struct uart_ops mux_pops = {
428 */ 471 */
429static int __init mux_probe(struct parisc_device *dev) 472static int __init mux_probe(struct parisc_device *dev)
430{ 473{
431 int i, status, ports; 474 int i, status;
432 u8 iodc_data[32];
433 unsigned long bytecnt;
434 struct uart_port *port;
435 475
436 status = pdc_iodc_read(&bytecnt, dev->hpa.start, 0, iodc_data, 32); 476 int port_count = get_mux_port_count(dev);
437 if(status != PDC_OK) { 477 printk(KERN_INFO "Serial mux driver (%d ports) Revision: 0.6\n", port_count);
438 printk(KERN_ERR "Serial mux: Unable to read IODC.\n");
439 return 1;
440 }
441 478
442 ports = GET_MUX_PORTS(iodc_data); 479 dev_set_drvdata(&dev->dev, (void *)(long)port_count);
443 printk(KERN_INFO "Serial mux driver (%d ports) Revision: 0.3\n", ports); 480 request_mem_region(dev->hpa.start + MUX_OFFSET,
481 port_count * MUX_LINE_OFFSET, "Mux");
444 482
445 if(!port_cnt) { 483 if(!port_cnt) {
446 mux_driver.cons = MUX_CONSOLE; 484 mux_driver.cons = MUX_CONSOLE;
@@ -450,13 +488,10 @@ static int __init mux_probe(struct parisc_device *dev)
450 printk(KERN_ERR "Serial mux: Unable to register driver.\n"); 488 printk(KERN_ERR "Serial mux: Unable to register driver.\n");
451 return 1; 489 return 1;
452 } 490 }
453
454 init_timer(&mux_timer);
455 mux_timer.function = mux_poll;
456 } 491 }
457 492
458 for(i = 0; i < ports; ++i, ++port_cnt) { 493 for(i = 0; i < port_count; ++i, ++port_cnt) {
459 port = &mux_ports[port_cnt]; 494 struct uart_port *port = &mux_ports[port_cnt].port;
460 port->iobase = 0; 495 port->iobase = 0;
461 port->mapbase = dev->hpa.start + MUX_OFFSET + 496 port->mapbase = dev->hpa.start + MUX_OFFSET +
462 (i * MUX_LINE_OFFSET); 497 (i * MUX_LINE_OFFSET);
@@ -477,27 +512,73 @@ static int __init mux_probe(struct parisc_device *dev)
477 */ 512 */
478 port->timeout = HZ / 50; 513 port->timeout = HZ / 50;
479 spin_lock_init(&port->lock); 514 spin_lock_init(&port->lock);
515
480 status = uart_add_one_port(&mux_driver, port); 516 status = uart_add_one_port(&mux_driver, port);
481 BUG_ON(status); 517 BUG_ON(status);
482 } 518 }
483 519
484#ifdef CONFIG_SERIAL_MUX_CONSOLE
485 register_console(&mux_console);
486#endif
487 return 0; 520 return 0;
488} 521}
489 522
523static int __devexit mux_remove(struct parisc_device *dev)
524{
525 int i, j;
526 int port_count = (long)dev_get_drvdata(&dev->dev);
527
528 /* Find Port 0 for this card in the mux_ports list. */
529 for(i = 0; i < port_cnt; ++i) {
530 if(mux_ports[i].port.mapbase == dev->hpa.start + MUX_OFFSET)
531 break;
532 }
533 BUG_ON(i + port_count > port_cnt);
534
535 /* Release the resources associated with each port on the device. */
536 for(j = 0; j < port_count; ++j, ++i) {
537 struct uart_port *port = &mux_ports[i].port;
538
539 uart_remove_one_port(&mux_driver, port);
540 if(port->membase)
541 iounmap(port->membase);
542 }
543
544 release_mem_region(dev->hpa.start + MUX_OFFSET, port_count * MUX_LINE_OFFSET);
545 return 0;
546}
547
548/* Hack. This idea was taken from the 8250_gsc.c on how to properly order
549 * the serial port detection in the proper order. The idea is we always
550 * want the builtin mux to be detected before addin mux cards, so we
551 * specifically probe for the builtin mux cards first.
552 *
553 * This table only contains the parisc_device_id of known builtin mux
554 * devices. All other mux cards will be detected by the generic mux_tbl.
555 */
556static struct parisc_device_id builtin_mux_tbl[] = {
557 { HPHW_A_DIRECT, HVERSION_REV_ANY_ID, 0x15, 0x0000D }, /* All K-class */
558 { HPHW_A_DIRECT, HVERSION_REV_ANY_ID, 0x44, 0x0000D }, /* E35, E45, and E55 */
559 { 0, }
560};
561
490static struct parisc_device_id mux_tbl[] = { 562static struct parisc_device_id mux_tbl[] = {
491 { HPHW_A_DIRECT, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x0000D }, 563 { HPHW_A_DIRECT, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x0000D },
492 { 0, } 564 { 0, }
493}; 565};
494 566
567MODULE_DEVICE_TABLE(parisc, builtin_mux_tbl);
495MODULE_DEVICE_TABLE(parisc, mux_tbl); 568MODULE_DEVICE_TABLE(parisc, mux_tbl);
496 569
570static struct parisc_driver builtin_serial_mux_driver = {
571 .name = "builtin_serial_mux",
572 .id_table = builtin_mux_tbl,
573 .probe = mux_probe,
574 .remove = __devexit_p(mux_remove),
575};
576
497static struct parisc_driver serial_mux_driver = { 577static struct parisc_driver serial_mux_driver = {
498 .name = "serial_mux", 578 .name = "serial_mux",
499 .id_table = mux_tbl, 579 .id_table = mux_tbl,
500 .probe = mux_probe, 580 .probe = mux_probe,
581 .remove = __devexit_p(mux_remove),
501}; 582};
502 583
503/** 584/**
@@ -507,7 +588,21 @@ static struct parisc_driver serial_mux_driver = {
507 */ 588 */
508static int __init mux_init(void) 589static int __init mux_init(void)
509{ 590{
510 return register_parisc_driver(&serial_mux_driver); 591 register_parisc_driver(&builtin_serial_mux_driver);
592 register_parisc_driver(&serial_mux_driver);
593
594 if(port_cnt > 0) {
595 /* Start the Mux timer */
596 init_timer(&mux_timer);
597 mux_timer.function = mux_poll;
598 mod_timer(&mux_timer, jiffies + MUX_POLL_DELAY);
599
600#ifdef CONFIG_SERIAL_MUX_CONSOLE
601 register_console(&mux_console);
602#endif
603 }
604
605 return 0;
511} 606}
512 607
513/** 608/**
@@ -517,14 +612,16 @@ static int __init mux_init(void)
517 */ 612 */
518static void __exit mux_exit(void) 613static void __exit mux_exit(void)
519{ 614{
520 int i; 615 /* Delete the Mux timer. */
521 616 if(port_cnt > 0) {
522 for (i = 0; i < port_cnt; i++) { 617 del_timer(&mux_timer);
523 uart_remove_one_port(&mux_driver, &mux_ports[i]); 618#ifdef CONFIG_SERIAL_MUX_CONSOLE
524 if (mux_ports[i].membase) 619 unregister_console(&mux_console);
525 iounmap(mux_ports[i].membase); 620#endif
526 } 621 }
527 622
623 unregister_parisc_driver(&builtin_serial_mux_driver);
624 unregister_parisc_driver(&serial_mux_driver);
528 uart_unregister_driver(&mux_driver); 625 uart_unregister_driver(&mux_driver);
529} 626}
530 627
diff --git a/include/asm-parisc/dma-mapping.h b/include/asm-parisc/dma-mapping.h
index 66f0b408c669..c6c0e9ff6bde 100644
--- a/include/asm-parisc/dma-mapping.h
+++ b/include/asm-parisc/dma-mapping.h
@@ -236,7 +236,7 @@ int ccio_allocate_resource(const struct parisc_device *dev,
236 unsigned long min, unsigned long max, unsigned long align); 236 unsigned long min, unsigned long max, unsigned long align);
237#else /* !CONFIG_IOMMU_CCIO */ 237#else /* !CONFIG_IOMMU_CCIO */
238#define ccio_get_iommu(dev) NULL 238#define ccio_get_iommu(dev) NULL
239#define ccio_request_resource(dev, res) request_resource(&iomem_resource, res) 239#define ccio_request_resource(dev, res) insert_resource(&iomem_resource, res)
240#define ccio_allocate_resource(dev, res, size, min, max, align) \ 240#define ccio_allocate_resource(dev, res, size, min, max, align) \
241 allocate_resource(&iomem_resource, res, size, min, max, \ 241 allocate_resource(&iomem_resource, res, size, min, max, \
242 align, NULL, NULL) 242 align, NULL, NULL)
diff --git a/include/asm-parisc/page.h b/include/asm-parisc/page.h
index 3567208191e3..dcf9047f7fb4 100644
--- a/include/asm-parisc/page.h
+++ b/include/asm-parisc/page.h
@@ -127,7 +127,11 @@ extern int npmem_ranges;
127/* This governs the relationship between virtual and physical addresses. 127/* This governs the relationship between virtual and physical addresses.
128 * If you alter it, make sure to take care of our various fixed mapping 128 * If you alter it, make sure to take care of our various fixed mapping
129 * segments in fixmap.h */ 129 * segments in fixmap.h */
130#define __PAGE_OFFSET (0x10000000) 130#ifdef CONFIG_64BIT
131#define __PAGE_OFFSET (0x40000000) /* 1GB */
132#else
133#define __PAGE_OFFSET (0x10000000) /* 256MB */
134#endif
131 135
132#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET) 136#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
133 137
diff --git a/include/asm-parisc/pdcpat.h b/include/asm-parisc/pdcpat.h
index b4b34c0e8c1a..47539f117958 100644
--- a/include/asm-parisc/pdcpat.h
+++ b/include/asm-parisc/pdcpat.h
@@ -250,7 +250,7 @@ struct pdc_pat_pd_addr_map_entry {
250#define PAT_GET_ENTITY(value) (((value) >> 56) & 0xffUL) 250#define PAT_GET_ENTITY(value) (((value) >> 56) & 0xffUL)
251#define PAT_GET_DVI(value) (((value) >> 48) & 0xffUL) 251#define PAT_GET_DVI(value) (((value) >> 48) & 0xffUL)
252#define PAT_GET_IOC(value) (((value) >> 40) & 0xffUL) 252#define PAT_GET_IOC(value) (((value) >> 40) & 0xffUL)
253#define PAT_GET_MOD_PAGES(value)(((value) & 0xffffffUL) 253#define PAT_GET_MOD_PAGES(value) ((value) & 0xffffffUL)
254 254
255 255
256/* 256/*
@@ -303,35 +303,6 @@ extern int pdc_pat_io_pci_cfg_write(unsigned long pci_addr, int pci_size, u32 va
303*/ 303*/
304extern int pdc_pat; /* arch/parisc/kernel/inventory.c */ 304extern int pdc_pat; /* arch/parisc/kernel/inventory.c */
305 305
306/********************************************************************
307* PDC_PAT_CELL[Return Cell Module] memaddr[0] conf_base_addr
308* ----------------------------------------------------------
309* Bit 0 to 51 - conf_base_addr
310* Bit 52 to 62 - reserved
311* Bit 63 - endianess bit
312********************************************************************/
313#define PAT_GET_CBA(value) ((value) & 0xfffffffffffff000UL)
314
315/********************************************************************
316* PDC_PAT_CELL[Return Cell Module] memaddr[1] mod_info
317* ----------------------------------------------------
318* Bit 0 to 7 - entity type
319* 0 = central agent, 1 = processor,
320* 2 = memory controller, 3 = system bus adapter,
321* 4 = local bus adapter, 5 = processor bus converter,
322* 6 = crossbar fabric connect, 7 = fabric interconnect,
323* 8 to 254 reserved, 255 = unknown.
324* Bit 8 to 15 - DVI
325* Bit 16 to 23 - IOC functions
326* Bit 24 to 39 - reserved
327* Bit 40 to 63 - mod_pages
328* number of 4K pages a module occupies starting at conf_base_addr
329********************************************************************/
330#define PAT_GET_ENTITY(value) (((value) >> 56) & 0xffUL)
331#define PAT_GET_DVI(value) (((value) >> 48) & 0xffUL)
332#define PAT_GET_IOC(value) (((value) >> 40) & 0xffUL)
333#define PAT_GET_MOD_PAGES(value)(((value) & 0xffffffUL)
334
335#endif /* __ASSEMBLY__ */ 306#endif /* __ASSEMBLY__ */
336 307
337#endif /* ! __PARISC_PATPDC_H */ 308#endif /* ! __PARISC_PATPDC_H */
diff --git a/include/asm-parisc/processor.h b/include/asm-parisc/processor.h
index fd7866dc8c83..435afe5a149d 100644
--- a/include/asm-parisc/processor.h
+++ b/include/asm-parisc/processor.h
@@ -87,7 +87,6 @@ struct cpuinfo_parisc {
87 unsigned long hpa; /* Host Physical address */ 87 unsigned long hpa; /* Host Physical address */
88 unsigned long txn_addr; /* MMIO addr of EIR or id_eid */ 88 unsigned long txn_addr; /* MMIO addr of EIR or id_eid */
89#ifdef CONFIG_SMP 89#ifdef CONFIG_SMP
90 spinlock_t lock; /* synchronization for ipi's */
91 unsigned long pending_ipi; /* bitmap of type ipi_message_type */ 90 unsigned long pending_ipi; /* bitmap of type ipi_message_type */
92 unsigned long ipi_count; /* number ipi Interrupts */ 91 unsigned long ipi_count; /* number ipi Interrupts */
93#endif 92#endif
diff --git a/include/asm-parisc/statfs.h b/include/asm-parisc/statfs.h
index a52d8f93f05c..1d2b8130b23d 100644
--- a/include/asm-parisc/statfs.h
+++ b/include/asm-parisc/statfs.h
@@ -30,11 +30,11 @@ struct statfs {
30struct statfs64 { 30struct statfs64 {
31 long f_type; 31 long f_type;
32 long f_bsize; 32 long f_bsize;
33 u64 f_blocks; 33 __u64 f_blocks;
34 u64 f_bfree; 34 __u64 f_bfree;
35 u64 f_bavail; 35 __u64 f_bavail;
36 u64 f_files; 36 __u64 f_files;
37 u64 f_ffree; 37 __u64 f_ffree;
38 __kernel_fsid_t f_fsid; 38 __kernel_fsid_t f_fsid;
39 long f_namelen; 39 long f_namelen;
40 long f_frsize; 40 long f_frsize;
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 2aa47623f5f8..47bef62eecd7 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -933,7 +933,7 @@ static int init_section_ref_ok(const char *name)
933 ".opd", /* see comment [OPD] at exit_section_ref_ok() */ 933 ".opd", /* see comment [OPD] at exit_section_ref_ok() */
934 ".toc1", /* used by ppc64 */ 934 ".toc1", /* used by ppc64 */
935 ".stab", 935 ".stab",
936 ".rodata", 936 ".data.rel.ro", /* used by parisc64 */
937 ".parainstructions", 937 ".parainstructions",
938 ".text.lock", 938 ".text.lock",
939 "__bug_table", /* used by powerpc for BUG() */ 939 "__bug_table", /* used by powerpc for BUG() */
@@ -956,6 +956,7 @@ static int init_section_ref_ok(const char *name)
956 ".eh_frame", 956 ".eh_frame",
957 ".debug", 957 ".debug",
958 ".parainstructions", 958 ".parainstructions",
959 ".rodata",
959 NULL 960 NULL
960 }; 961 };
961 /* part of section name */ 962 /* part of section name */