aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parisc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/parisc')
-rw-r--r--drivers/parisc/Kconfig33
-rw-r--r--drivers/parisc/ccio-dma.c1
-rw-r--r--drivers/parisc/dino.c5
-rw-r--r--drivers/parisc/eisa.c4
-rw-r--r--drivers/parisc/gsc.c9
-rw-r--r--drivers/parisc/iosapic.c2
-rw-r--r--drivers/parisc/led.c12
-rw-r--r--drivers/parisc/pdc_stable.c223
-rw-r--r--drivers/parisc/power.c1
-rw-r--r--drivers/parisc/sba_iommu.c18
-rw-r--r--drivers/parisc/superio.c4
11 files changed, 254 insertions, 58 deletions
diff --git a/drivers/parisc/Kconfig b/drivers/parisc/Kconfig
index 3f5de867acd7..1d3b84b4af3f 100644
--- a/drivers/parisc/Kconfig
+++ b/drivers/parisc/Kconfig
@@ -140,18 +140,37 @@ config CHASSIS_LCD_LED
140 If unsure, say Y. 140 If unsure, say Y.
141 141
142config PDC_CHASSIS 142config PDC_CHASSIS
143 bool "PDC chassis State Panel support" 143 bool "PDC chassis state codes support"
144 default y 144 default y
145 help 145 help
146 Say Y here if you want to enable support for the LED State front 146 Say Y here if you want to enable support for Chassis codes.
147 panel as found on E class, and support for the GSP Virtual Front 147 That includes support for LED State front panel as found on E
148 Panel (LED State and message logging) as found on high end 148 class, and support for the GSP Virtual Front Panel (LED State and
149 servers such as A, L and N-class. 149 message logging) as found on high end servers such as A, L and
150 150 N-class.
151 This has nothing to do with Chassis LCD and LED support. 151 This driver will also display progress messages on LCD display,
152 such as "INI", "RUN" and "FLT", and might thus clobber messages
153 shown by the LED/LCD driver.
154 This driver updates the state panel (LED and/or LCD) upon system
155 state change (eg: boot, shutdown or panic).
152 156
153 If unsure, say Y. 157 If unsure, say Y.
154 158
159
160config PDC_CHASSIS_WARN
161 bool "PDC chassis warnings support"
162 depends on PROC_FS
163 default y
164 help
165 Say Y here if you want to enable support for Chassis warnings.
166 This will add a proc entry '/proc/chassis' giving some information
167 about the overall health state of the system.
168 This includes NVRAM battery level, overtemp or failures such as
169 fans or power units.
170
171 If unsure, say Y.
172
173
155config PDC_STABLE 174config PDC_STABLE
156 tristate "PDC Stable Storage support" 175 tristate "PDC Stable Storage support"
157 depends on SYSFS 176 depends on SYSFS
diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c
index a5d826237b26..68cb3a080050 100644
--- a/drivers/parisc/ccio-dma.c
+++ b/drivers/parisc/ccio-dma.c
@@ -31,7 +31,6 @@
31** the coherency design originally worked out. Only PCX-W does. 31** the coherency design originally worked out. Only PCX-W does.
32*/ 32*/
33 33
34#include <linux/config.h>
35#include <linux/types.h> 34#include <linux/types.h>
36#include <linux/init.h> 35#include <linux/init.h>
37#include <linux/mm.h> 36#include <linux/mm.h>
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c
index 6e8ed0c81a6c..0d96c50ffe9c 100644
--- a/drivers/parisc/dino.c
+++ b/drivers/parisc/dino.c
@@ -43,7 +43,6 @@
43** for PCI drivers devices which implement/use MMIO registers. 43** for PCI drivers devices which implement/use MMIO registers.
44*/ 44*/
45 45
46#include <linux/config.h>
47#include <linux/delay.h> 46#include <linux/delay.h>
48#include <linux/types.h> 47#include <linux/types.h>
49#include <linux/kernel.h> 48#include <linux/kernel.h>
@@ -299,7 +298,7 @@ struct pci_port_ops dino_port_ops = {
299 298
300static void dino_disable_irq(unsigned int irq) 299static void dino_disable_irq(unsigned int irq)
301{ 300{
302 struct dino_device *dino_dev = irq_desc[irq].handler_data; 301 struct dino_device *dino_dev = irq_desc[irq].chip_data;
303 int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS); 302 int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS);
304 303
305 DBG(KERN_WARNING "%s(0x%p, %d)\n", __FUNCTION__, dino_dev, irq); 304 DBG(KERN_WARNING "%s(0x%p, %d)\n", __FUNCTION__, dino_dev, irq);
@@ -311,7 +310,7 @@ static void dino_disable_irq(unsigned int irq)
311 310
312static void dino_enable_irq(unsigned int irq) 311static void dino_enable_irq(unsigned int irq)
313{ 312{
314 struct dino_device *dino_dev = irq_desc[irq].handler_data; 313 struct dino_device *dino_dev = irq_desc[irq].chip_data;
315 int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS); 314 int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS);
316 u32 tmp; 315 u32 tmp;
317 316
diff --git a/drivers/parisc/eisa.c b/drivers/parisc/eisa.c
index 9d3bd15bf53b..884965cedec9 100644
--- a/drivers/parisc/eisa.c
+++ b/drivers/parisc/eisa.c
@@ -340,7 +340,7 @@ static int __devinit eisa_probe(struct parisc_device *dev)
340 } 340 }
341 pcibios_register_hba(&eisa_dev.hba); 341 pcibios_register_hba(&eisa_dev.hba);
342 342
343 result = request_irq(dev->irq, eisa_irq, SA_SHIRQ, "EISA", &eisa_dev); 343 result = request_irq(dev->irq, eisa_irq, IRQF_SHARED, "EISA", &eisa_dev);
344 if (result) { 344 if (result) {
345 printk(KERN_ERR "EISA: request_irq failed!\n"); 345 printk(KERN_ERR "EISA: request_irq failed!\n");
346 return result; 346 return result;
@@ -350,7 +350,7 @@ static int __devinit eisa_probe(struct parisc_device *dev)
350 irq_desc[2].action = &irq2_action; 350 irq_desc[2].action = &irq2_action;
351 351
352 for (i = 0; i < 16; i++) { 352 for (i = 0; i < 16; i++) {
353 irq_desc[i].handler = &eisa_interrupt_type; 353 irq_desc[i].chip = &eisa_interrupt_type;
354 } 354 }
355 355
356 EISA_bus = 1; 356 EISA_bus = 1;
diff --git a/drivers/parisc/gsc.c b/drivers/parisc/gsc.c
index 16d40f95978d..b45aa5c675a0 100644
--- a/drivers/parisc/gsc.c
+++ b/drivers/parisc/gsc.c
@@ -14,7 +14,6 @@
14 */ 14 */
15 15
16#include <linux/bitops.h> 16#include <linux/bitops.h>
17#include <linux/config.h>
18#include <linux/errno.h> 17#include <linux/errno.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <linux/interrupt.h> 19#include <linux/interrupt.h>
@@ -109,7 +108,7 @@ int gsc_find_local_irq(unsigned int irq, int *global_irqs, int limit)
109 108
110static void gsc_asic_disable_irq(unsigned int irq) 109static void gsc_asic_disable_irq(unsigned int irq)
111{ 110{
112 struct gsc_asic *irq_dev = irq_desc[irq].handler_data; 111 struct gsc_asic *irq_dev = irq_desc[irq].chip_data;
113 int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32); 112 int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32);
114 u32 imr; 113 u32 imr;
115 114
@@ -124,7 +123,7 @@ static void gsc_asic_disable_irq(unsigned int irq)
124 123
125static void gsc_asic_enable_irq(unsigned int irq) 124static void gsc_asic_enable_irq(unsigned int irq)
126{ 125{
127 struct gsc_asic *irq_dev = irq_desc[irq].handler_data; 126 struct gsc_asic *irq_dev = irq_desc[irq].chip_data;
128 int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32); 127 int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32);
129 u32 imr; 128 u32 imr;
130 129
@@ -164,8 +163,8 @@ int gsc_assign_irq(struct hw_interrupt_type *type, void *data)
164 if (irq > GSC_IRQ_MAX) 163 if (irq > GSC_IRQ_MAX)
165 return NO_IRQ; 164 return NO_IRQ;
166 165
167 irq_desc[irq].handler = type; 166 irq_desc[irq].chip = type;
168 irq_desc[irq].handler_data = data; 167 irq_desc[irq].chip_data = data;
169 return irq++; 168 return irq++;
170} 169}
171 170
diff --git a/drivers/parisc/iosapic.c b/drivers/parisc/iosapic.c
index 7a458d5bc751..1fbda77cefc2 100644
--- a/drivers/parisc/iosapic.c
+++ b/drivers/parisc/iosapic.c
@@ -619,7 +619,7 @@ iosapic_set_irt_data( struct vector_info *vi, u32 *dp0, u32 *dp1)
619 619
620static struct vector_info *iosapic_get_vector(unsigned int irq) 620static struct vector_info *iosapic_get_vector(unsigned int irq)
621{ 621{
622 return irq_desc[irq].handler_data; 622 return irq_desc[irq].chip_data;
623} 623}
624 624
625static void iosapic_disable_irq(unsigned int irq) 625static void iosapic_disable_irq(unsigned int irq)
diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c
index 298f2ddb2c17..bf00fa2537bb 100644
--- a/drivers/parisc/led.c
+++ b/drivers/parisc/led.c
@@ -23,7 +23,6 @@
23 * David Pye <dmp@davidmpye.dyndns.org> 23 * David Pye <dmp@davidmpye.dyndns.org>
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/module.h> 26#include <linux/module.h>
28#include <linux/stddef.h> /* for offsetof() */ 27#include <linux/stddef.h> /* for offsetof() */
29#include <linux/init.h> 28#include <linux/init.h>
@@ -411,16 +410,17 @@ static __inline__ int led_get_net_activity(void)
411static __inline__ int led_get_diskio_activity(void) 410static __inline__ int led_get_diskio_activity(void)
412{ 411{
413 static unsigned long last_pgpgin, last_pgpgout; 412 static unsigned long last_pgpgin, last_pgpgout;
414 struct page_state pgstat; 413 unsigned long events[NR_VM_EVENT_ITEMS];
415 int changed; 414 int changed;
416 415
417 get_full_page_state(&pgstat); /* get no of sectors in & out */ 416 all_vm_events(events);
418 417
419 /* Just use a very simple calculation here. Do not care about overflow, 418 /* Just use a very simple calculation here. Do not care about overflow,
420 since we only want to know if there was activity or not. */ 419 since we only want to know if there was activity or not. */
421 changed = (pgstat.pgpgin != last_pgpgin) || (pgstat.pgpgout != last_pgpgout); 420 changed = (events[PGPGIN] != last_pgpgin) ||
422 last_pgpgin = pgstat.pgpgin; 421 (events[PGPGOUT] != last_pgpgout);
423 last_pgpgout = pgstat.pgpgout; 422 last_pgpgin = events[PGPGIN];
423 last_pgpgout = events[PGPGOUT];
424 424
425 return (changed ? LED_DISK_IO : 0); 425 return (changed ? LED_DISK_IO : 0);
426} 426}
diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c
index bbeabe3fc4c6..ea1b7a63598e 100644
--- a/drivers/parisc/pdc_stable.c
+++ b/drivers/parisc/pdc_stable.c
@@ -28,8 +28,15 @@
28 * following code can deal with just 96 bytes of Stable Storage, and all 28 * following code can deal with just 96 bytes of Stable Storage, and all
29 * sizes between 96 and 192 bytes (provided they are multiple of struct 29 * sizes between 96 and 192 bytes (provided they are multiple of struct
30 * device_path size, eg: 128, 160 and 192) to provide full information. 30 * device_path size, eg: 128, 160 and 192) to provide full information.
31 * The code makes no use of data above 192 bytes. One last word: there's one 31 * One last word: there's one path we can always count on: the primary path.
32 * path we can always count on: the primary path. 32 * Anything above 224 bytes is used for 'osdep2' OS-dependent storage area.
33 *
34 * The first OS-dependent area should always be available. Obviously, this is
35 * not true for the other one. Also bear in mind that reading/writing from/to
36 * osdep2 is much more expensive than from/to osdep1.
37 * NOTE: We do not handle the 2 bytes OS-dep area at 0x5D, nor the first
38 * 2 bytes of storage available right after OSID. That's a total of 4 bytes
39 * sacrificed: -ETOOLAZY :P
33 * 40 *
34 * The current policy wrt file permissions is: 41 * The current policy wrt file permissions is:
35 * - write: root only 42 * - write: root only
@@ -64,15 +71,18 @@
64#include <asm/uaccess.h> 71#include <asm/uaccess.h>
65#include <asm/hardware.h> 72#include <asm/hardware.h>
66 73
67#define PDCS_VERSION "0.22" 74#define PDCS_VERSION "0.30"
68#define PDCS_PREFIX "PDC Stable Storage" 75#define PDCS_PREFIX "PDC Stable Storage"
69 76
70#define PDCS_ADDR_PPRI 0x00 77#define PDCS_ADDR_PPRI 0x00
71#define PDCS_ADDR_OSID 0x40 78#define PDCS_ADDR_OSID 0x40
79#define PDCS_ADDR_OSD1 0x48
80#define PDCS_ADDR_DIAG 0x58
72#define PDCS_ADDR_FSIZ 0x5C 81#define PDCS_ADDR_FSIZ 0x5C
73#define PDCS_ADDR_PCON 0x60 82#define PDCS_ADDR_PCON 0x60
74#define PDCS_ADDR_PALT 0x80 83#define PDCS_ADDR_PALT 0x80
75#define PDCS_ADDR_PKBD 0xA0 84#define PDCS_ADDR_PKBD 0xA0
85#define PDCS_ADDR_OSD2 0xE0
76 86
77MODULE_AUTHOR("Thibaut VARENE <varenet@parisc-linux.org>"); 87MODULE_AUTHOR("Thibaut VARENE <varenet@parisc-linux.org>");
78MODULE_DESCRIPTION("sysfs interface to HP PDC Stable Storage data"); 88MODULE_DESCRIPTION("sysfs interface to HP PDC Stable Storage data");
@@ -82,6 +92,9 @@ MODULE_VERSION(PDCS_VERSION);
82/* holds Stable Storage size. Initialized once and for all, no lock needed */ 92/* holds Stable Storage size. Initialized once and for all, no lock needed */
83static unsigned long pdcs_size __read_mostly; 93static unsigned long pdcs_size __read_mostly;
84 94
95/* holds OS ID. Initialized once and for all, hopefully to 0x0006 */
96static u16 pdcs_osid __read_mostly;
97
85/* This struct defines what we need to deal with a parisc pdc path entry */ 98/* This struct defines what we need to deal with a parisc pdc path entry */
86struct pdcspath_entry { 99struct pdcspath_entry {
87 rwlock_t rw_lock; /* to protect path entry access */ 100 rwlock_t rw_lock; /* to protect path entry access */
@@ -609,27 +622,64 @@ static ssize_t
609pdcs_osid_read(struct subsystem *entry, char *buf) 622pdcs_osid_read(struct subsystem *entry, char *buf)
610{ 623{
611 char *out = buf; 624 char *out = buf;
612 __u32 result;
613 char *tmpstr = NULL;
614 625
615 if (!entry || !buf) 626 if (!entry || !buf)
616 return -EINVAL; 627 return -EINVAL;
617 628
618 /* get OSID */ 629 out += sprintf(out, "%s dependent data (0x%.4x)\n",
619 if (pdc_stable_read(PDCS_ADDR_OSID, &result, sizeof(result)) != PDC_OK) 630 os_id_to_string(pdcs_osid), pdcs_osid);
631
632 return out - buf;
633}
634
635/**
636 * pdcs_osdep1_read - Stable Storage OS-Dependent data area 1 output.
637 * @entry: An allocated and populated subsytem struct. We don't use it tho.
638 * @buf: The output buffer to write to.
639 *
640 * This can hold 16 bytes of OS-Dependent data.
641 */
642static ssize_t
643pdcs_osdep1_read(struct subsystem *entry, char *buf)
644{
645 char *out = buf;
646 u32 result[4];
647
648 if (!entry || !buf)
649 return -EINVAL;
650
651 if (pdc_stable_read(PDCS_ADDR_OSD1, &result, sizeof(result)) != PDC_OK)
620 return -EIO; 652 return -EIO;
621 653
622 /* the actual result is 16 bits away */ 654 out += sprintf(out, "0x%.8x\n", result[0]);
623 switch (result >> 16) { 655 out += sprintf(out, "0x%.8x\n", result[1]);
624 case 0x0000: tmpstr = "No OS-dependent data"; break; 656 out += sprintf(out, "0x%.8x\n", result[2]);
625 case 0x0001: tmpstr = "HP-UX dependent data"; break; 657 out += sprintf(out, "0x%.8x\n", result[3]);
626 case 0x0002: tmpstr = "MPE-iX dependent data"; break; 658
627 case 0x0003: tmpstr = "OSF dependent data"; break; 659 return out - buf;
628 case 0x0004: tmpstr = "HP-RT dependent data"; break; 660}
629 case 0x0005: tmpstr = "Novell Netware dependent data"; break; 661
630 default: tmpstr = "Unknown"; break; 662/**
631 } 663 * pdcs_diagnostic_read - Stable Storage Diagnostic register output.
632 out += sprintf(out, "%s (0x%.4x)\n", tmpstr, (result >> 16)); 664 * @entry: An allocated and populated subsytem struct. We don't use it tho.
665 * @buf: The output buffer to write to.
666 *
667 * I have NFC how to interpret the content of that register ;-).
668 */
669static ssize_t
670pdcs_diagnostic_read(struct subsystem *entry, char *buf)
671{
672 char *out = buf;
673 u32 result;
674
675 if (!entry || !buf)
676 return -EINVAL;
677
678 /* get diagnostic */
679 if (pdc_stable_read(PDCS_ADDR_DIAG, &result, sizeof(result)) != PDC_OK)
680 return -EIO;
681
682 out += sprintf(out, "0x%.4x\n", (result >> 16));
633 683
634 return out - buf; 684 return out - buf;
635} 685}
@@ -645,7 +695,7 @@ static ssize_t
645pdcs_fastsize_read(struct subsystem *entry, char *buf) 695pdcs_fastsize_read(struct subsystem *entry, char *buf)
646{ 696{
647 char *out = buf; 697 char *out = buf;
648 __u32 result; 698 u32 result;
649 699
650 if (!entry || !buf) 700 if (!entry || !buf)
651 return -EINVAL; 701 return -EINVAL;
@@ -664,6 +714,39 @@ pdcs_fastsize_read(struct subsystem *entry, char *buf)
664} 714}
665 715
666/** 716/**
717 * pdcs_osdep2_read - Stable Storage OS-Dependent data area 2 output.
718 * @entry: An allocated and populated subsytem struct. We don't use it tho.
719 * @buf: The output buffer to write to.
720 *
721 * This can hold pdcs_size - 224 bytes of OS-Dependent data, when available.
722 */
723static ssize_t
724pdcs_osdep2_read(struct subsystem *entry, char *buf)
725{
726 char *out = buf;
727 unsigned long size;
728 unsigned short i;
729 u32 result;
730
731 if (unlikely(pdcs_size <= 224))
732 return -ENODATA;
733
734 size = pdcs_size - 224;
735
736 if (!entry || !buf)
737 return -EINVAL;
738
739 for (i=0; i<size; i+=4) {
740 if (unlikely(pdc_stable_read(PDCS_ADDR_OSD2 + i, &result,
741 sizeof(result)) != PDC_OK))
742 return -EIO;
743 out += sprintf(out, "0x%.8x\n", result);
744 }
745
746 return out - buf;
747}
748
749/**
667 * pdcs_auto_write - This function handles autoboot/search flag modifying. 750 * pdcs_auto_write - This function handles autoboot/search flag modifying.
668 * @entry: An allocated and populated subsytem struct. We don't use it tho. 751 * @entry: An allocated and populated subsytem struct. We don't use it tho.
669 * @buf: The input buffer to read from. 752 * @buf: The input buffer to read from.
@@ -770,13 +853,100 @@ pdcs_autosearch_write(struct subsystem *entry, const char *buf, size_t count)
770 return pdcs_auto_write(entry, buf, count, PF_AUTOSEARCH); 853 return pdcs_auto_write(entry, buf, count, PF_AUTOSEARCH);
771} 854}
772 855
856/**
857 * pdcs_osdep1_write - Stable Storage OS-Dependent data area 1 input.
858 * @entry: An allocated and populated subsytem struct. We don't use it tho.
859 * @buf: The input buffer to read from.
860 * @count: The number of bytes to be read.
861 *
862 * This can store 16 bytes of OS-Dependent data. We use a byte-by-byte
863 * write approach. It's up to userspace to deal with it when constructing
864 * its input buffer.
865 */
866static ssize_t
867pdcs_osdep1_write(struct subsystem *entry, const char *buf, size_t count)
868{
869 u8 in[16];
870
871 if (!capable(CAP_SYS_ADMIN))
872 return -EACCES;
873
874 if (!entry || !buf || !count)
875 return -EINVAL;
876
877 if (unlikely(pdcs_osid != OS_ID_LINUX))
878 return -EPERM;
879
880 if (count > 16)
881 return -EMSGSIZE;
882
883 /* We'll use a local copy of buf */
884 memset(in, 0, 16);
885 memcpy(in, buf, count);
886
887 if (pdc_stable_write(PDCS_ADDR_OSD1, &in, sizeof(in)) != PDC_OK)
888 return -EIO;
889
890 return count;
891}
892
893/**
894 * pdcs_osdep2_write - Stable Storage OS-Dependent data area 2 input.
895 * @entry: An allocated and populated subsytem struct. We don't use it tho.
896 * @buf: The input buffer to read from.
897 * @count: The number of bytes to be read.
898 *
899 * This can store pdcs_size - 224 bytes of OS-Dependent data. We use a
900 * byte-by-byte write approach. It's up to userspace to deal with it when
901 * constructing its input buffer.
902 */
903static ssize_t
904pdcs_osdep2_write(struct subsystem *entry, const char *buf, size_t count)
905{
906 unsigned long size;
907 unsigned short i;
908 u8 in[4];
909
910 if (!capable(CAP_SYS_ADMIN))
911 return -EACCES;
912
913 if (!entry || !buf || !count)
914 return -EINVAL;
915
916 if (unlikely(pdcs_size <= 224))
917 return -ENOSYS;
918
919 if (unlikely(pdcs_osid != OS_ID_LINUX))
920 return -EPERM;
921
922 size = pdcs_size - 224;
923
924 if (count > size)
925 return -EMSGSIZE;
926
927 /* We'll use a local copy of buf */
928
929 for (i=0; i<count; i+=4) {
930 memset(in, 0, 4);
931 memcpy(in, buf+i, (count-i < 4) ? count-i : 4);
932 if (unlikely(pdc_stable_write(PDCS_ADDR_OSD2 + i, &in,
933 sizeof(in)) != PDC_OK))
934 return -EIO;
935 }
936
937 return count;
938}
939
773/* The remaining attributes. */ 940/* The remaining attributes. */
774static PDCS_ATTR(size, 0444, pdcs_size_read, NULL); 941static PDCS_ATTR(size, 0444, pdcs_size_read, NULL);
775static PDCS_ATTR(autoboot, 0644, pdcs_autoboot_read, pdcs_autoboot_write); 942static PDCS_ATTR(autoboot, 0644, pdcs_autoboot_read, pdcs_autoboot_write);
776static PDCS_ATTR(autosearch, 0644, pdcs_autosearch_read, pdcs_autosearch_write); 943static PDCS_ATTR(autosearch, 0644, pdcs_autosearch_read, pdcs_autosearch_write);
777static PDCS_ATTR(timer, 0444, pdcs_timer_read, NULL); 944static PDCS_ATTR(timer, 0444, pdcs_timer_read, NULL);
778static PDCS_ATTR(osid, 0400, pdcs_osid_read, NULL); 945static PDCS_ATTR(osid, 0444, pdcs_osid_read, NULL);
946static PDCS_ATTR(osdep1, 0600, pdcs_osdep1_read, pdcs_osdep1_write);
947static PDCS_ATTR(diagnostic, 0400, pdcs_diagnostic_read, NULL);
779static PDCS_ATTR(fastsize, 0400, pdcs_fastsize_read, NULL); 948static PDCS_ATTR(fastsize, 0400, pdcs_fastsize_read, NULL);
949static PDCS_ATTR(osdep2, 0600, pdcs_osdep2_read, pdcs_osdep2_write);
780 950
781static struct subsys_attribute *pdcs_subsys_attrs[] = { 951static struct subsys_attribute *pdcs_subsys_attrs[] = {
782 &pdcs_attr_size, 952 &pdcs_attr_size,
@@ -784,7 +954,10 @@ static struct subsys_attribute *pdcs_subsys_attrs[] = {
784 &pdcs_attr_autosearch, 954 &pdcs_attr_autosearch,
785 &pdcs_attr_timer, 955 &pdcs_attr_timer,
786 &pdcs_attr_osid, 956 &pdcs_attr_osid,
957 &pdcs_attr_osdep1,
958 &pdcs_attr_diagnostic,
787 &pdcs_attr_fastsize, 959 &pdcs_attr_fastsize,
960 &pdcs_attr_osdep2,
788 NULL, 961 NULL,
789}; 962};
790 963
@@ -865,6 +1038,7 @@ pdc_stable_init(void)
865{ 1038{
866 struct subsys_attribute *attr; 1039 struct subsys_attribute *attr;
867 int i, rc = 0, error = 0; 1040 int i, rc = 0, error = 0;
1041 u32 result;
868 1042
869 /* find the size of the stable storage */ 1043 /* find the size of the stable storage */
870 if (pdc_stable_get_size(&pdcs_size) != PDC_OK) 1044 if (pdc_stable_get_size(&pdcs_size) != PDC_OK)
@@ -876,6 +1050,13 @@ pdc_stable_init(void)
876 1050
877 printk(KERN_INFO PDCS_PREFIX " facility v%s\n", PDCS_VERSION); 1051 printk(KERN_INFO PDCS_PREFIX " facility v%s\n", PDCS_VERSION);
878 1052
1053 /* get OSID */
1054 if (pdc_stable_read(PDCS_ADDR_OSID, &result, sizeof(result)) != PDC_OK)
1055 return -EIO;
1056
1057 /* the actual result is 16 bits away */
1058 pdcs_osid = (u16)(result >> 16);
1059
879 /* For now we'll register the stable subsys within this driver */ 1060 /* For now we'll register the stable subsys within this driver */
880 if ((rc = firmware_register(&stable_subsys))) 1061 if ((rc = firmware_register(&stable_subsys)))
881 goto fail_firmreg; 1062 goto fail_firmreg;
@@ -887,7 +1068,7 @@ pdc_stable_init(void)
887 1068
888 /* register the paths subsys as a subsystem of stable subsys */ 1069 /* register the paths subsys as a subsystem of stable subsys */
889 kset_set_kset_s(&paths_subsys, stable_subsys); 1070 kset_set_kset_s(&paths_subsys, stable_subsys);
890 if ((rc= subsystem_register(&paths_subsys))) 1071 if ((rc = subsystem_register(&paths_subsys)))
891 goto fail_subsysreg; 1072 goto fail_subsysreg;
892 1073
893 /* now we create all "files" for the paths subsys */ 1074 /* now we create all "files" for the paths subsys */
diff --git a/drivers/parisc/power.c b/drivers/parisc/power.c
index 0bcab83b4080..fad5a33bf0fa 100644
--- a/drivers/parisc/power.c
+++ b/drivers/parisc/power.c
@@ -35,7 +35,6 @@
35 * runtime through the "/proc/sys/kernel/power" procfs entry. 35 * runtime through the "/proc/sys/kernel/power" procfs entry.
36 */ 36 */
37 37
38#include <linux/config.h>
39#include <linux/module.h> 38#include <linux/module.h>
40#include <linux/init.h> 39#include <linux/init.h>
41#include <linux/kernel.h> 40#include <linux/kernel.h>
diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c
index 278f325021ee..8b4732815511 100644
--- a/drivers/parisc/sba_iommu.c
+++ b/drivers/parisc/sba_iommu.c
@@ -19,7 +19,6 @@
19** FIXME: add DMA hint support programming in both sba and lba modules. 19** FIXME: add DMA hint support programming in both sba and lba modules.
20*/ 20*/
21 21
22#include <linux/config.h>
23#include <linux/types.h> 22#include <linux/types.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
25#include <linux/spinlock.h> 24#include <linux/spinlock.h>
@@ -316,10 +315,10 @@ static int reserve_sba_gart = 1;
316** 315**
317** Superdome (in particular, REO) allows only 64-bit CSR accesses. 316** Superdome (in particular, REO) allows only 64-bit CSR accesses.
318*/ 317*/
319#define READ_REG32(addr) le32_to_cpu(__raw_readl(addr)) 318#define READ_REG32(addr) readl(addr)
320#define READ_REG64(addr) le64_to_cpu(__raw_readq(addr)) 319#define READ_REG64(addr) readq(addr)
321#define WRITE_REG32(val, addr) __raw_writel(cpu_to_le32(val), addr) 320#define WRITE_REG32(val, addr) writel((val), (addr))
322#define WRITE_REG64(val, addr) __raw_writeq(cpu_to_le64(val), addr) 321#define WRITE_REG64(val, addr) writeq((val), (addr))
323 322
324#ifdef CONFIG_64BIT 323#ifdef CONFIG_64BIT
325#define READ_REG(addr) READ_REG64(addr) 324#define READ_REG(addr) READ_REG64(addr)
@@ -1427,7 +1426,7 @@ sba_ioc_init_pluto(struct parisc_device *sba, struct ioc *ioc, int ioc_num)
1427 iov_order = get_order(iova_space_size >> (IOVP_SHIFT - PAGE_SHIFT)); 1426 iov_order = get_order(iova_space_size >> (IOVP_SHIFT - PAGE_SHIFT));
1428 ioc->pdir_size = (iova_space_size / IOVP_SIZE) * sizeof(u64); 1427 ioc->pdir_size = (iova_space_size / IOVP_SIZE) * sizeof(u64);
1429 1428
1430 DBG_INIT("%s() hpa 0x%lx IOV %dMB (%d bits)\n", 1429 DBG_INIT("%s() hpa 0x%p IOV %dMB (%d bits)\n",
1431 __FUNCTION__, ioc->ioc_hpa, iova_space_size >> 20, 1430 __FUNCTION__, ioc->ioc_hpa, iova_space_size >> 20,
1432 iov_order + PAGE_SHIFT); 1431 iov_order + PAGE_SHIFT);
1433 1432
@@ -1764,7 +1763,7 @@ printk("sba_hw_init(): mem_boot 0x%x 0x%x 0x%x 0x%x\n", PAGE0->mem_boot.hpa,
1764 1763
1765 sba_dev->num_ioc = num_ioc; 1764 sba_dev->num_ioc = num_ioc;
1766 for (i = 0; i < num_ioc; i++) { 1765 for (i = 0; i < num_ioc; i++) {
1767 unsigned long ioc_hpa = sba_dev->ioc[i].ioc_hpa; 1766 void __iomem *ioc_hpa = sba_dev->ioc[i].ioc_hpa;
1768 unsigned int j; 1767 unsigned int j;
1769 1768
1770 for (j=0; j < sizeof(u64) * ROPES_PER_IOC; j+=sizeof(u64)) { 1769 for (j=0; j < sizeof(u64) * ROPES_PER_IOC; j+=sizeof(u64)) {
@@ -1776,7 +1775,8 @@ printk("sba_hw_init(): mem_boot 0x%x 0x%x 0x%x 0x%x\n", PAGE0->mem_boot.hpa,
1776 * Improves netperf UDP_STREAM by ~10% for bcm5701. 1775 * Improves netperf UDP_STREAM by ~10% for bcm5701.
1777 */ 1776 */
1778 if (IS_PLUTO(sba_dev->iodc)) { 1777 if (IS_PLUTO(sba_dev->iodc)) {
1779 unsigned long rope_cfg, cfg_val; 1778 void __iomem *rope_cfg;
1779 unsigned long cfg_val;
1780 1780
1781 rope_cfg = ioc_hpa + IOC_ROPE0_CFG + j; 1781 rope_cfg = ioc_hpa + IOC_ROPE0_CFG + j;
1782 cfg_val = READ_REG(rope_cfg); 1782 cfg_val = READ_REG(rope_cfg);
@@ -1902,7 +1902,7 @@ sba_common_init(struct sba_device *sba_dev)
1902 * (bit #61, big endian), we have to flush and sync every time 1902 * (bit #61, big endian), we have to flush and sync every time
1903 * IO-PDIR is changed in Ike/Astro. 1903 * IO-PDIR is changed in Ike/Astro.
1904 */ 1904 */
1905 if (boot_cpu_data.pdc.capabilities & PDC_MODEL_IOPDIR_FDC) { 1905 if (ioc_needs_fdc) {
1906 printk(KERN_INFO MODULE_NAME " FDC/SYNC required.\n"); 1906 printk(KERN_INFO MODULE_NAME " FDC/SYNC required.\n");
1907 } else { 1907 } else {
1908 printk(KERN_INFO MODULE_NAME " IOC has cache coherent PDIR.\n"); 1908 printk(KERN_INFO MODULE_NAME " IOC has cache coherent PDIR.\n");
diff --git a/drivers/parisc/superio.c b/drivers/parisc/superio.c
index 828eb45062de..4ee26a6d9e25 100644
--- a/drivers/parisc/superio.c
+++ b/drivers/parisc/superio.c
@@ -271,7 +271,7 @@ superio_init(struct pci_dev *pcidev)
271 else 271 else
272 printk(KERN_ERR PFX "USB regulator not initialized!\n"); 272 printk(KERN_ERR PFX "USB regulator not initialized!\n");
273 273
274 if (request_irq(pdev->irq, superio_interrupt, SA_INTERRUPT, 274 if (request_irq(pdev->irq, superio_interrupt, IRQF_DISABLED,
275 SUPERIO, (void *)sio)) { 275 SUPERIO, (void *)sio)) {
276 276
277 printk(KERN_ERR PFX "could not get irq\n"); 277 printk(KERN_ERR PFX "could not get irq\n");
@@ -360,7 +360,7 @@ int superio_fixup_irq(struct pci_dev *pcidev)
360#endif 360#endif
361 361
362 for (i = 0; i < 16; i++) { 362 for (i = 0; i < 16; i++) {
363 irq_desc[i].handler = &superio_interrupt_type; 363 irq_desc[i].chip = &superio_interrupt_type;
364 } 364 }
365 365
366 /* 366 /*