diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-03 18:48:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-03 18:48:04 -0400 |
commit | 0734e00ef9e48e78c5c3ce1648572f160d07e323 (patch) | |
tree | 3b09ba7f66cabffbaafbeed1904760d94ed4e092 | |
parent | 4608f064532c28c0ea3c03fe26a3a5909852811a (diff) | |
parent | 615b2665fd20c327b631ff1e79426775de748094 (diff) |
Merge branch 'parisc-4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc updates from Helge Deller:
"Lots of small enhancements and fixes in this patchset:
- improved the x86-64 compatibility for PCI cards by returning -1UL
for timed out MMIO transactions (instead of crashing)
- fixed HPMC handler for PAT machines: size needs to be multiple of 16
- prepare machine_power_off() to be able to turn rp3410 and c8000
machines off via IMPI
- added code to extract machine info for usage with qemu
- some init sections fixes
- lots of fixes for sparse-, ubsan- and uninitalized variables
warnings"
* 'parisc-4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
parisc: Fix out of array access in match_pci_device()
parisc: Add code generator for Qemu/SeaBIOS machine info
parisc/pci: Switch LBA PCI bus from Hard Fail to Soft Fail mode
parisc: Fix HPMC handler by increasing size to multiple of 16 bytes
parisc: Directly call machine_power_off() in power button driver
parisc: machine_power_off() should call pm_power_off()
parisc/Kconfig: SMP kernels boot on all machines
parisc: Silence uninitialized variable warning in dbl_to_sgl_fcnvff()
parisc: Move various functions and strings to init section
parisc: Convert MAP_TYPE to cover 4 bits on parisc
parisc: Force to various endian types for sparse
parisc/gscps2: Fix sparse warnings
parisc/led: Fix sparse warnings
parisc/parport_gsc: Use NULL to avoid sparse warning
parisc/stifb: Use fb_memset() to avoid sparse warning
-rw-r--r-- | arch/parisc/Kconfig | 6 | ||||
-rw-r--r-- | arch/parisc/include/asm/io.h | 12 | ||||
-rw-r--r-- | arch/parisc/include/uapi/asm/mman.h | 2 | ||||
-rw-r--r-- | arch/parisc/kernel/drivers.c | 197 | ||||
-rw-r--r-- | arch/parisc/kernel/hardware.c | 12 | ||||
-rw-r--r-- | arch/parisc/kernel/hpmc.S | 6 | ||||
-rw-r--r-- | arch/parisc/kernel/process.c | 6 | ||||
-rw-r--r-- | arch/parisc/math-emu/fcnvff.c | 2 | ||||
-rw-r--r-- | drivers/input/serio/gscps2.c | 11 | ||||
-rw-r--r-- | drivers/parisc/lba_pci.c | 20 | ||||
-rw-r--r-- | drivers/parisc/led.c | 4 | ||||
-rw-r--r-- | drivers/parisc/power.c | 3 | ||||
-rw-r--r-- | drivers/parport/parport_gsc.c | 2 | ||||
-rw-r--r-- | drivers/video/fbdev/stifb.c | 2 |
14 files changed, 241 insertions, 44 deletions
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 9792d8cf4f56..7e0bb9836b58 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
@@ -276,10 +276,8 @@ config SMP | |||
276 | than one CPU, say Y. | 276 | than one CPU, say Y. |
277 | 277 | ||
278 | If you say N here, the kernel will run on uni- and multiprocessor | 278 | If you say N here, the kernel will run on uni- and multiprocessor |
279 | machines, but will use only one CPU of a multiprocessor machine. If | 279 | machines, but will use only one CPU of a multiprocessor machine. |
280 | you say Y here, the kernel will run on many, but not all, | 280 | On a uniprocessor machine, the kernel will run faster if you say N. |
281 | uniprocessor machines. On a uniprocessor machine, the kernel | ||
282 | will run faster if you say N here. | ||
283 | 281 | ||
284 | See also <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO | 282 | See also <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO |
285 | available at <http://www.tldp.org/docs.html#howto>. | 283 | available at <http://www.tldp.org/docs.html#howto>. |
diff --git a/arch/parisc/include/asm/io.h b/arch/parisc/include/asm/io.h index 27c62baa9c4e..afe493b23d04 100644 --- a/arch/parisc/include/asm/io.h +++ b/arch/parisc/include/asm/io.h | |||
@@ -183,15 +183,15 @@ static inline unsigned char readb(const volatile void __iomem *addr) | |||
183 | } | 183 | } |
184 | static inline unsigned short readw(const volatile void __iomem *addr) | 184 | static inline unsigned short readw(const volatile void __iomem *addr) |
185 | { | 185 | { |
186 | return le16_to_cpu(__raw_readw(addr)); | 186 | return le16_to_cpu((__le16 __force) __raw_readw(addr)); |
187 | } | 187 | } |
188 | static inline unsigned int readl(const volatile void __iomem *addr) | 188 | static inline unsigned int readl(const volatile void __iomem *addr) |
189 | { | 189 | { |
190 | return le32_to_cpu(__raw_readl(addr)); | 190 | return le32_to_cpu((__le32 __force) __raw_readl(addr)); |
191 | } | 191 | } |
192 | static inline unsigned long long readq(const volatile void __iomem *addr) | 192 | static inline unsigned long long readq(const volatile void __iomem *addr) |
193 | { | 193 | { |
194 | return le64_to_cpu(__raw_readq(addr)); | 194 | return le64_to_cpu((__le64 __force) __raw_readq(addr)); |
195 | } | 195 | } |
196 | 196 | ||
197 | static inline void writeb(unsigned char b, volatile void __iomem *addr) | 197 | static inline void writeb(unsigned char b, volatile void __iomem *addr) |
@@ -200,15 +200,15 @@ static inline void writeb(unsigned char b, volatile void __iomem *addr) | |||
200 | } | 200 | } |
201 | static inline void writew(unsigned short w, volatile void __iomem *addr) | 201 | static inline void writew(unsigned short w, volatile void __iomem *addr) |
202 | { | 202 | { |
203 | __raw_writew(cpu_to_le16(w), addr); | 203 | __raw_writew((__u16 __force) cpu_to_le16(w), addr); |
204 | } | 204 | } |
205 | static inline void writel(unsigned int l, volatile void __iomem *addr) | 205 | static inline void writel(unsigned int l, volatile void __iomem *addr) |
206 | { | 206 | { |
207 | __raw_writel(cpu_to_le32(l), addr); | 207 | __raw_writel((__u32 __force) cpu_to_le32(l), addr); |
208 | } | 208 | } |
209 | static inline void writeq(unsigned long long q, volatile void __iomem *addr) | 209 | static inline void writeq(unsigned long long q, volatile void __iomem *addr) |
210 | { | 210 | { |
211 | __raw_writeq(cpu_to_le64(q), addr); | 211 | __raw_writeq((__u64 __force) cpu_to_le64(q), addr); |
212 | } | 212 | } |
213 | 213 | ||
214 | #define readb readb | 214 | #define readb readb |
diff --git a/arch/parisc/include/uapi/asm/mman.h b/arch/parisc/include/uapi/asm/mman.h index 80510ba44c08..a056a642bb31 100644 --- a/arch/parisc/include/uapi/asm/mman.h +++ b/arch/parisc/include/uapi/asm/mman.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #define MAP_SHARED 0x01 /* Share changes */ | 13 | #define MAP_SHARED 0x01 /* Share changes */ |
14 | #define MAP_PRIVATE 0x02 /* Changes are private */ | 14 | #define MAP_PRIVATE 0x02 /* Changes are private */ |
15 | #define MAP_SHARED_VALIDATE 0x03 /* share + validate extension flags */ | 15 | #define MAP_SHARED_VALIDATE 0x03 /* share + validate extension flags */ |
16 | #define MAP_TYPE 0x03 /* Mask for type of mapping */ | 16 | #define MAP_TYPE 0x2b /* Mask for type of mapping, includes bits 0x08 and 0x20 */ |
17 | #define MAP_FIXED 0x04 /* Interpret addr exactly */ | 17 | #define MAP_FIXED 0x04 /* Interpret addr exactly */ |
18 | #define MAP_ANONYMOUS 0x10 /* don't use a file */ | 18 | #define MAP_ANONYMOUS 0x10 /* don't use a file */ |
19 | 19 | ||
diff --git a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c index 29b99b8964aa..3b8507f71050 100644 --- a/arch/parisc/kernel/drivers.c +++ b/arch/parisc/kernel/drivers.c | |||
@@ -135,7 +135,7 @@ static int parisc_driver_probe(struct device *dev) | |||
135 | return rc; | 135 | return rc; |
136 | } | 136 | } |
137 | 137 | ||
138 | static int parisc_driver_remove(struct device *dev) | 138 | static int __exit parisc_driver_remove(struct device *dev) |
139 | { | 139 | { |
140 | struct parisc_device *pa_dev = to_parisc_device(dev); | 140 | struct parisc_device *pa_dev = to_parisc_device(dev); |
141 | struct parisc_driver *pa_drv = to_parisc_driver(dev->driver); | 141 | struct parisc_driver *pa_drv = to_parisc_driver(dev->driver); |
@@ -205,7 +205,7 @@ static int match_and_count(struct device * dev, void * data) | |||
205 | * Use by IOMMU support to "guess" the right size IOPdir. | 205 | * Use by IOMMU support to "guess" the right size IOPdir. |
206 | * Formula is something like memsize/(num_iommu * entry_size). | 206 | * Formula is something like memsize/(num_iommu * entry_size). |
207 | */ | 207 | */ |
208 | int count_parisc_driver(struct parisc_driver *driver) | 208 | int __init count_parisc_driver(struct parisc_driver *driver) |
209 | { | 209 | { |
210 | struct match_count m = { | 210 | struct match_count m = { |
211 | .driver = driver, | 211 | .driver = driver, |
@@ -268,7 +268,7 @@ static struct parisc_device *find_device_by_addr(unsigned long hpa) | |||
268 | * Walks up the device tree looking for a device of the specified type. | 268 | * Walks up the device tree looking for a device of the specified type. |
269 | * If it finds it, it returns it. If not, it returns NULL. | 269 | * If it finds it, it returns it. If not, it returns NULL. |
270 | */ | 270 | */ |
271 | const struct parisc_device * | 271 | const struct parisc_device * __init |
272 | find_pa_parent_type(const struct parisc_device *padev, int type) | 272 | find_pa_parent_type(const struct parisc_device *padev, int type) |
273 | { | 273 | { |
274 | const struct device *dev = &padev->dev; | 274 | const struct device *dev = &padev->dev; |
@@ -397,7 +397,7 @@ static void setup_bus_id(struct parisc_device *padev) | |||
397 | dev_set_name(&padev->dev, name); | 397 | dev_set_name(&padev->dev, name); |
398 | } | 398 | } |
399 | 399 | ||
400 | struct parisc_device * create_tree_node(char id, struct device *parent) | 400 | struct parisc_device * __init create_tree_node(char id, struct device *parent) |
401 | { | 401 | { |
402 | struct parisc_device *dev = kzalloc(sizeof(*dev), GFP_KERNEL); | 402 | struct parisc_device *dev = kzalloc(sizeof(*dev), GFP_KERNEL); |
403 | if (!dev) | 403 | if (!dev) |
@@ -471,7 +471,7 @@ static struct parisc_device *create_parisc_device(struct hardware_path *modpath) | |||
471 | return alloc_tree_node(parent, modpath->mod); | 471 | return alloc_tree_node(parent, modpath->mod); |
472 | } | 472 | } |
473 | 473 | ||
474 | struct parisc_device * | 474 | struct parisc_device * __init |
475 | alloc_pa_dev(unsigned long hpa, struct hardware_path *mod_path) | 475 | alloc_pa_dev(unsigned long hpa, struct hardware_path *mod_path) |
476 | { | 476 | { |
477 | int status; | 477 | int status; |
@@ -609,7 +609,7 @@ struct bus_type parisc_bus_type = { | |||
609 | .uevent = parisc_uevent, | 609 | .uevent = parisc_uevent, |
610 | .dev_groups = parisc_device_groups, | 610 | .dev_groups = parisc_device_groups, |
611 | .probe = parisc_driver_probe, | 611 | .probe = parisc_driver_probe, |
612 | .remove = parisc_driver_remove, | 612 | .remove = __exit_p(parisc_driver_remove), |
613 | }; | 613 | }; |
614 | 614 | ||
615 | /** | 615 | /** |
@@ -619,7 +619,7 @@ struct bus_type parisc_bus_type = { | |||
619 | * Search the driver list for a driver that is willing to manage | 619 | * Search the driver list for a driver that is willing to manage |
620 | * this device. | 620 | * this device. |
621 | */ | 621 | */ |
622 | int register_parisc_device(struct parisc_device *dev) | 622 | int __init register_parisc_device(struct parisc_device *dev) |
623 | { | 623 | { |
624 | if (!dev) | 624 | if (!dev) |
625 | return 0; | 625 | return 0; |
@@ -651,6 +651,10 @@ static int match_pci_device(struct device *dev, int index, | |||
651 | (modpath->mod == PCI_FUNC(devfn))); | 651 | (modpath->mod == PCI_FUNC(devfn))); |
652 | } | 652 | } |
653 | 653 | ||
654 | /* index might be out of bounds for bc[] */ | ||
655 | if (index >= 6) | ||
656 | return 0; | ||
657 | |||
654 | id = PCI_SLOT(pdev->devfn) | (PCI_FUNC(pdev->devfn) << 5); | 658 | id = PCI_SLOT(pdev->devfn) | (PCI_FUNC(pdev->devfn) << 5); |
655 | return (modpath->bc[index] == id); | 659 | return (modpath->bc[index] == id); |
656 | } | 660 | } |
@@ -791,7 +795,7 @@ EXPORT_SYMBOL(device_to_hwpath); | |||
791 | static void walk_native_bus(unsigned long io_io_low, unsigned long io_io_high, | 795 | static void walk_native_bus(unsigned long io_io_low, unsigned long io_io_high, |
792 | struct device *parent); | 796 | struct device *parent); |
793 | 797 | ||
794 | void walk_lower_bus(struct parisc_device *dev) | 798 | static void walk_lower_bus(struct parisc_device *dev) |
795 | { | 799 | { |
796 | unsigned long io_io_low, io_io_high; | 800 | unsigned long io_io_low, io_io_high; |
797 | 801 | ||
@@ -857,7 +861,7 @@ static void walk_native_bus(unsigned long io_io_low, unsigned long io_io_high, | |||
857 | * PDC doesn't tell us about all devices in the system. This routine | 861 | * PDC doesn't tell us about all devices in the system. This routine |
858 | * finds devices connected to the central bus. | 862 | * finds devices connected to the central bus. |
859 | */ | 863 | */ |
860 | void walk_central_bus(void) | 864 | void __init walk_central_bus(void) |
861 | { | 865 | { |
862 | walk_native_bus(CENTRAL_BUS_ADDR, | 866 | walk_native_bus(CENTRAL_BUS_ADDR, |
863 | CENTRAL_BUS_ADDR + (MAX_NATIVE_DEVICES * NATIVE_DEVICE_OFFSET), | 867 | CENTRAL_BUS_ADDR + (MAX_NATIVE_DEVICES * NATIVE_DEVICE_OFFSET), |
@@ -886,7 +890,7 @@ static void print_parisc_device(struct parisc_device *dev) | |||
886 | /** | 890 | /** |
887 | * init_parisc_bus - Some preparation to be done before inventory | 891 | * init_parisc_bus - Some preparation to be done before inventory |
888 | */ | 892 | */ |
889 | void init_parisc_bus(void) | 893 | void __init init_parisc_bus(void) |
890 | { | 894 | { |
891 | if (bus_register(&parisc_bus_type)) | 895 | if (bus_register(&parisc_bus_type)) |
892 | panic("Could not register PA-RISC bus type\n"); | 896 | panic("Could not register PA-RISC bus type\n"); |
@@ -895,6 +899,171 @@ void init_parisc_bus(void) | |||
895 | get_device(&root); | 899 | get_device(&root); |
896 | } | 900 | } |
897 | 901 | ||
902 | static __init void qemu_header(void) | ||
903 | { | ||
904 | int num; | ||
905 | unsigned long *p; | ||
906 | |||
907 | pr_info("--- cut here ---\n"); | ||
908 | pr_info("/* AUTO-GENERATED HEADER FILE FOR SEABIOS FIRMWARE */\n"); | ||
909 | pr_cont("/* generated with Linux kernel */\n"); | ||
910 | pr_cont("/* search for PARISC_QEMU_MACHINE_HEADER in Linux */\n\n"); | ||
911 | |||
912 | pr_info("#define PARISC_MODEL \"%s\"\n\n", | ||
913 | boot_cpu_data.pdc.sys_model_name); | ||
914 | |||
915 | pr_info("#define PARISC_PDC_MODEL 0x%lx, 0x%lx, 0x%lx, " | ||
916 | "0x%lx, 0x%lx, 0x%lx, 0x%lx, 0x%lx, 0x%lx\n\n", | ||
917 | #define p ((unsigned long *)&boot_cpu_data.pdc.model) | ||
918 | p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7], p[8]); | ||
919 | #undef p | ||
920 | |||
921 | pr_info("#define PARISC_PDC_VERSION 0x%04lx\n\n", | ||
922 | boot_cpu_data.pdc.versions); | ||
923 | |||
924 | pr_info("#define PARISC_PDC_CPUID 0x%04lx\n\n", | ||
925 | boot_cpu_data.pdc.cpuid); | ||
926 | |||
927 | pr_info("#define PARISC_PDC_CAPABILITIES 0x%04lx\n\n", | ||
928 | boot_cpu_data.pdc.capabilities); | ||
929 | |||
930 | pr_info("#define PARISC_PDC_ENTRY_ORG 0x%04lx\n\n", | ||
931 | #ifdef CONFIG_64BIT | ||
932 | (unsigned long)(PAGE0->mem_pdc_hi) << 32 | | ||
933 | #endif | ||
934 | (unsigned long)PAGE0->mem_pdc); | ||
935 | |||
936 | pr_info("#define PARISC_PDC_CACHE_INFO"); | ||
937 | p = (unsigned long *) &cache_info; | ||
938 | for (num = 0; num < sizeof(cache_info); num += sizeof(unsigned long)) { | ||
939 | if (((num % 5) == 0)) { | ||
940 | pr_cont(" \\\n"); | ||
941 | pr_info("\t"); | ||
942 | } | ||
943 | pr_cont("%s0x%04lx", | ||
944 | num?", ":"", *p++); | ||
945 | } | ||
946 | pr_cont("\n\n"); | ||
947 | } | ||
948 | |||
949 | static __init int qemu_print_hpa(struct device *lin_dev, void *data) | ||
950 | { | ||
951 | struct parisc_device *dev = to_parisc_device(lin_dev); | ||
952 | unsigned long hpa = dev->hpa.start; | ||
953 | |||
954 | pr_cont("\t{\t.hpa = 0x%08lx,\\\n", hpa); | ||
955 | pr_cont("\t\t.iodc = &iodc_data_hpa_%08lx,\\\n", hpa); | ||
956 | pr_cont("\t\t.mod_info = &mod_info_hpa_%08lx,\\\n", hpa); | ||
957 | pr_cont("\t\t.mod_path = &mod_path_hpa_%08lx,\\\n", hpa); | ||
958 | pr_cont("\t\t.num_addr = HPA_%08lx_num_addr,\\\n", hpa); | ||
959 | pr_cont("\t\t.add_addr = { HPA_%08lx_add_addr } },\\\n", hpa); | ||
960 | return 0; | ||
961 | } | ||
962 | |||
963 | |||
964 | static __init void qemu_footer(void) | ||
965 | { | ||
966 | pr_info("\n\n#define PARISC_DEVICE_LIST \\\n"); | ||
967 | for_each_padev(qemu_print_hpa, NULL); | ||
968 | pr_cont("\t{ 0, }\n"); | ||
969 | pr_info("--- cut here ---\n"); | ||
970 | } | ||
971 | |||
972 | /* print iodc data of the various hpa modules for qemu inclusion */ | ||
973 | static __init int qemu_print_iodc_data(struct device *lin_dev, void *data) | ||
974 | { | ||
975 | struct parisc_device *dev = to_parisc_device(lin_dev); | ||
976 | unsigned long count; | ||
977 | unsigned long hpa = dev->hpa.start; | ||
978 | int status; | ||
979 | struct pdc_iodc iodc_data; | ||
980 | |||
981 | int mod_index; | ||
982 | struct pdc_system_map_mod_info pdc_mod_info; | ||
983 | struct pdc_module_path mod_path; | ||
984 | |||
985 | status = pdc_iodc_read(&count, hpa, 0, | ||
986 | &iodc_data, sizeof(iodc_data)); | ||
987 | if (status != PDC_OK) { | ||
988 | pr_info("No IODC data for hpa 0x%08lx\n", hpa); | ||
989 | return 0; | ||
990 | } | ||
991 | |||
992 | pr_info("\n"); | ||
993 | |||
994 | pr_info("#define HPA_%08lx_DESCRIPTION \"%s\"\n", | ||
995 | hpa, parisc_hardware_description(&dev->id)); | ||
996 | |||
997 | mod_index = 0; | ||
998 | do { | ||
999 | status = pdc_system_map_find_mods(&pdc_mod_info, | ||
1000 | &mod_path, mod_index++); | ||
1001 | } while (status == PDC_OK && pdc_mod_info.mod_addr != hpa); | ||
1002 | |||
1003 | pr_info("static struct pdc_system_map_mod_info" | ||
1004 | " mod_info_hpa_%08lx = {\n", hpa); | ||
1005 | #define DO(member) \ | ||
1006 | pr_cont("\t." #member " = 0x%x,\n", \ | ||
1007 | (unsigned int)pdc_mod_info.member) | ||
1008 | DO(mod_addr); | ||
1009 | DO(mod_pgs); | ||
1010 | DO(add_addrs); | ||
1011 | pr_cont("};\n"); | ||
1012 | #undef DO | ||
1013 | pr_info("static struct pdc_module_path " | ||
1014 | "mod_path_hpa_%08lx = {\n", hpa); | ||
1015 | pr_cont("\t.path = { "); | ||
1016 | pr_cont(".flags = 0x%x, ", mod_path.path.flags); | ||
1017 | pr_cont(".bc = { 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x }, ", | ||
1018 | (unsigned char)mod_path.path.bc[0], | ||
1019 | (unsigned char)mod_path.path.bc[1], | ||
1020 | (unsigned char)mod_path.path.bc[2], | ||
1021 | (unsigned char)mod_path.path.bc[3], | ||
1022 | (unsigned char)mod_path.path.bc[4], | ||
1023 | (unsigned char)mod_path.path.bc[5]); | ||
1024 | pr_cont(".mod = 0x%x ", mod_path.path.mod); | ||
1025 | pr_cont(" },\n"); | ||
1026 | pr_cont("\t.layers = { 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x }\n", | ||
1027 | mod_path.layers[0], mod_path.layers[1], mod_path.layers[2], | ||
1028 | mod_path.layers[3], mod_path.layers[4], mod_path.layers[5]); | ||
1029 | pr_cont("};\n"); | ||
1030 | |||
1031 | pr_info("static struct pdc_iodc iodc_data_hpa_%08lx = {\n", hpa); | ||
1032 | #define DO(member) \ | ||
1033 | pr_cont("\t." #member " = 0x%04lx,\n", \ | ||
1034 | (unsigned long)iodc_data.member) | ||
1035 | DO(hversion_model); | ||
1036 | DO(hversion); | ||
1037 | DO(spa); | ||
1038 | DO(type); | ||
1039 | DO(sversion_rev); | ||
1040 | DO(sversion_model); | ||
1041 | DO(sversion_opt); | ||
1042 | DO(rev); | ||
1043 | DO(dep); | ||
1044 | DO(features); | ||
1045 | DO(checksum); | ||
1046 | DO(length); | ||
1047 | #undef DO | ||
1048 | pr_cont("\t/* pad: 0x%04x, 0x%04x */\n", | ||
1049 | iodc_data.pad[0], iodc_data.pad[1]); | ||
1050 | pr_cont("};\n"); | ||
1051 | |||
1052 | pr_info("#define HPA_%08lx_num_addr %d\n", hpa, dev->num_addrs); | ||
1053 | pr_info("#define HPA_%08lx_add_addr ", hpa); | ||
1054 | count = 0; | ||
1055 | if (dev->num_addrs == 0) | ||
1056 | pr_cont("0"); | ||
1057 | while (count < dev->num_addrs) { | ||
1058 | pr_cont("0x%08lx, ", dev->addr[count]); | ||
1059 | count++; | ||
1060 | } | ||
1061 | pr_cont("\n\n"); | ||
1062 | |||
1063 | return 0; | ||
1064 | } | ||
1065 | |||
1066 | |||
898 | 1067 | ||
899 | static int print_one_device(struct device * dev, void * data) | 1068 | static int print_one_device(struct device * dev, void * data) |
900 | { | 1069 | { |
@@ -908,7 +1077,13 @@ static int print_one_device(struct device * dev, void * data) | |||
908 | /** | 1077 | /** |
909 | * print_parisc_devices - Print out a list of devices found in this system | 1078 | * print_parisc_devices - Print out a list of devices found in this system |
910 | */ | 1079 | */ |
911 | void print_parisc_devices(void) | 1080 | void __init print_parisc_devices(void) |
912 | { | 1081 | { |
913 | for_each_padev(print_one_device, NULL); | 1082 | for_each_padev(print_one_device, NULL); |
1083 | #define PARISC_QEMU_MACHINE_HEADER 0 | ||
1084 | if (PARISC_QEMU_MACHINE_HEADER) { | ||
1085 | qemu_header(); | ||
1086 | for_each_padev(qemu_print_iodc_data, NULL); | ||
1087 | qemu_footer(); | ||
1088 | } | ||
914 | } | 1089 | } |
diff --git a/arch/parisc/kernel/hardware.c b/arch/parisc/kernel/hardware.c index af3bc359dc70..a2058953a53f 100644 --- a/arch/parisc/kernel/hardware.c +++ b/arch/parisc/kernel/hardware.c | |||
@@ -41,7 +41,7 @@ | |||
41 | * are guessed. If you know the correct name, please let us know. | 41 | * are guessed. If you know the correct name, please let us know. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | static struct hp_hardware hp_hardware_list[] = { | 44 | static struct hp_hardware hp_hardware_list[] __initdata = { |
45 | {HPHW_NPROC,0x01,0x4,0x0,"Indigo (840, 930)"}, | 45 | {HPHW_NPROC,0x01,0x4,0x0,"Indigo (840, 930)"}, |
46 | {HPHW_NPROC,0x8,0x4,0x01,"Firefox(825,925)"}, | 46 | {HPHW_NPROC,0x8,0x4,0x01,"Firefox(825,925)"}, |
47 | {HPHW_NPROC,0xA,0x4,0x01,"Top Gun (835,834,935,635)"}, | 47 | {HPHW_NPROC,0xA,0x4,0x01,"Top Gun (835,834,935,635)"}, |
@@ -1238,7 +1238,7 @@ static struct hp_cpu_type_mask { | |||
1238 | unsigned short model; | 1238 | unsigned short model; |
1239 | unsigned short mask; | 1239 | unsigned short mask; |
1240 | enum cpu_type cpu; | 1240 | enum cpu_type cpu; |
1241 | } hp_cpu_type_mask_list[] = { | 1241 | } hp_cpu_type_mask_list[] __initdata = { |
1242 | 1242 | ||
1243 | { 0x0000, 0x0ff0, pcx }, /* 0x0000 - 0x000f */ | 1243 | { 0x0000, 0x0ff0, pcx }, /* 0x0000 - 0x000f */ |
1244 | { 0x0048, 0x0ff0, pcxl }, /* 0x0040 - 0x004f */ | 1244 | { 0x0048, 0x0ff0, pcxl }, /* 0x0040 - 0x004f */ |
@@ -1325,17 +1325,17 @@ const char * const cpu_name_version[][2] = { | |||
1325 | [pcxt] = { "PA7100 (PCX-T)", "1.1b" }, | 1325 | [pcxt] = { "PA7100 (PCX-T)", "1.1b" }, |
1326 | [pcxt_] = { "PA7200 (PCX-T')", "1.1c" }, | 1326 | [pcxt_] = { "PA7200 (PCX-T')", "1.1c" }, |
1327 | [pcxl] = { "PA7100LC (PCX-L)", "1.1d" }, | 1327 | [pcxl] = { "PA7100LC (PCX-L)", "1.1d" }, |
1328 | [pcxl2] = { "PA7300LC (PCX-L2)", "1.1e" }, | 1328 | [pcxl2] = { "PA7300LC (PCX-L2)","1.1e" }, |
1329 | [pcxu] = { "PA8000 (PCX-U)", "2.0" }, | 1329 | [pcxu] = { "PA8000 (PCX-U)", "2.0" }, |
1330 | [pcxu_] = { "PA8200 (PCX-U+)", "2.0" }, | 1330 | [pcxu_] = { "PA8200 (PCX-U+)", "2.0" }, |
1331 | [pcxw] = { "PA8500 (PCX-W)", "2.0" }, | 1331 | [pcxw] = { "PA8500 (PCX-W)", "2.0" }, |
1332 | [pcxw_] = { "PA8600 (PCX-W+)", "2.0" }, | 1332 | [pcxw_] = { "PA8600 (PCX-W+)", "2.0" }, |
1333 | [pcxw2] = { "PA8700 (PCX-W2)", "2.0" }, | 1333 | [pcxw2] = { "PA8700 (PCX-W2)", "2.0" }, |
1334 | [mako] = { "PA8800 (Mako)", "2.0" }, | 1334 | [mako] = { "PA8800 (Mako)", "2.0" }, |
1335 | [mako2] = { "PA8900 (Shortfin)", "2.0" } | 1335 | [mako2] = { "PA8900 (Shortfin)","2.0" } |
1336 | }; | 1336 | }; |
1337 | 1337 | ||
1338 | const char *parisc_hardware_description(struct parisc_device_id *id) | 1338 | const char * __init parisc_hardware_description(struct parisc_device_id *id) |
1339 | { | 1339 | { |
1340 | struct hp_hardware *listptr; | 1340 | struct hp_hardware *listptr; |
1341 | 1341 | ||
@@ -1373,7 +1373,7 @@ const char *parisc_hardware_description(struct parisc_device_id *id) | |||
1373 | 1373 | ||
1374 | 1374 | ||
1375 | /* Interpret hversion (ret[0]) from PDC_MODEL(4)/PDC_MODEL_INFO(0) */ | 1375 | /* Interpret hversion (ret[0]) from PDC_MODEL(4)/PDC_MODEL_INFO(0) */ |
1376 | enum cpu_type | 1376 | enum cpu_type __init |
1377 | parisc_get_cpu_type(unsigned long hversion) | 1377 | parisc_get_cpu_type(unsigned long hversion) |
1378 | { | 1378 | { |
1379 | struct hp_cpu_type_mask *ptr; | 1379 | struct hp_cpu_type_mask *ptr; |
diff --git a/arch/parisc/kernel/hpmc.S b/arch/parisc/kernel/hpmc.S index 8d072c44f300..781c3b9a3e46 100644 --- a/arch/parisc/kernel/hpmc.S +++ b/arch/parisc/kernel/hpmc.S | |||
@@ -84,6 +84,7 @@ END(hpmc_pim_data) | |||
84 | .text | 84 | .text |
85 | 85 | ||
86 | .import intr_save, code | 86 | .import intr_save, code |
87 | .align 16 | ||
87 | ENTRY_CFI(os_hpmc) | 88 | ENTRY_CFI(os_hpmc) |
88 | .os_hpmc: | 89 | .os_hpmc: |
89 | 90 | ||
@@ -300,12 +301,15 @@ os_hpmc_6: | |||
300 | 301 | ||
301 | b . | 302 | b . |
302 | nop | 303 | nop |
304 | .align 16 /* make function length multiple of 16 bytes */ | ||
303 | ENDPROC_CFI(os_hpmc) | 305 | ENDPROC_CFI(os_hpmc) |
304 | .os_hpmc_end: | 306 | .os_hpmc_end: |
305 | 307 | ||
306 | 308 | ||
307 | __INITRODATA | 309 | __INITRODATA |
310 | .globl os_hpmc_size | ||
308 | .align 4 | 311 | .align 4 |
309 | .export os_hpmc_size | 312 | .type os_hpmc_size, @object |
313 | .size os_hpmc_size, 4 | ||
310 | os_hpmc_size: | 314 | os_hpmc_size: |
311 | .word .os_hpmc_end-.os_hpmc | 315 | .word .os_hpmc_end-.os_hpmc |
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 6975a0627078..bbe46571ff96 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c | |||
@@ -138,6 +138,10 @@ void machine_power_off(void) | |||
138 | pdc_soft_power_button(0); | 138 | pdc_soft_power_button(0); |
139 | 139 | ||
140 | pdc_chassis_send_status(PDC_CHASSIS_DIRECT_SHUTDOWN); | 140 | pdc_chassis_send_status(PDC_CHASSIS_DIRECT_SHUTDOWN); |
141 | |||
142 | /* ipmi_poweroff may have been installed. */ | ||
143 | if (pm_power_off) | ||
144 | pm_power_off(); | ||
141 | 145 | ||
142 | /* It seems we have no way to power the system off via | 146 | /* It seems we have no way to power the system off via |
143 | * software. The user has to press the button himself. */ | 147 | * software. The user has to press the button himself. */ |
@@ -151,7 +155,7 @@ void machine_power_off(void) | |||
151 | for (;;); | 155 | for (;;); |
152 | } | 156 | } |
153 | 157 | ||
154 | void (*pm_power_off)(void) = machine_power_off; | 158 | void (*pm_power_off)(void); |
155 | EXPORT_SYMBOL(pm_power_off); | 159 | EXPORT_SYMBOL(pm_power_off); |
156 | 160 | ||
157 | void flush_thread(void) | 161 | void flush_thread(void) |
diff --git a/arch/parisc/math-emu/fcnvff.c b/arch/parisc/math-emu/fcnvff.c index 76c063f7d17c..f9357d9d4cb1 100644 --- a/arch/parisc/math-emu/fcnvff.c +++ b/arch/parisc/math-emu/fcnvff.c | |||
@@ -148,7 +148,7 @@ dbl_to_sgl_fcnvff( | |||
148 | register int src_exponent, dest_exponent, dest_mantissa; | 148 | register int src_exponent, dest_exponent, dest_mantissa; |
149 | register boolean inexact = FALSE, guardbit = FALSE, stickybit = FALSE; | 149 | register boolean inexact = FALSE, guardbit = FALSE, stickybit = FALSE; |
150 | register boolean lsb_odd = FALSE; | 150 | register boolean lsb_odd = FALSE; |
151 | boolean is_tiny; | 151 | boolean is_tiny = FALSE; |
152 | 152 | ||
153 | Dbl_copyfromptr(srcptr,srcp1,srcp2); | 153 | Dbl_copyfromptr(srcptr,srcp1,srcp2); |
154 | src_exponent = Dbl_exponent(srcp1); | 154 | src_exponent = Dbl_exponent(srcp1); |
diff --git a/drivers/input/serio/gscps2.c b/drivers/input/serio/gscps2.c index aa9f29b875de..49d8d53e50b7 100644 --- a/drivers/input/serio/gscps2.c +++ b/drivers/input/serio/gscps2.c | |||
@@ -91,7 +91,7 @@ struct gscps2port { | |||
91 | struct parisc_device *padev; | 91 | struct parisc_device *padev; |
92 | struct serio *port; | 92 | struct serio *port; |
93 | spinlock_t lock; | 93 | spinlock_t lock; |
94 | char *addr; | 94 | char __iomem *addr; |
95 | u8 act, append; /* position in buffer[] */ | 95 | u8 act, append; /* position in buffer[] */ |
96 | struct { | 96 | struct { |
97 | u8 data; | 97 | u8 data; |
@@ -114,7 +114,7 @@ struct gscps2port { | |||
114 | * wait_TBE() - wait for Transmit Buffer Empty | 114 | * wait_TBE() - wait for Transmit Buffer Empty |
115 | */ | 115 | */ |
116 | 116 | ||
117 | static int wait_TBE(char *addr) | 117 | static int wait_TBE(char __iomem *addr) |
118 | { | 118 | { |
119 | int timeout = 25000; /* device is expected to react within 250 msec */ | 119 | int timeout = 25000; /* device is expected to react within 250 msec */ |
120 | while (gscps2_readb_status(addr) & GSC_STAT_TBNE) { | 120 | while (gscps2_readb_status(addr) & GSC_STAT_TBNE) { |
@@ -146,14 +146,14 @@ static void gscps2_flush(struct gscps2port *ps2port) | |||
146 | static inline int gscps2_writeb_output(struct gscps2port *ps2port, u8 data) | 146 | static inline int gscps2_writeb_output(struct gscps2port *ps2port, u8 data) |
147 | { | 147 | { |
148 | unsigned long flags; | 148 | unsigned long flags; |
149 | char *addr = ps2port->addr; | 149 | char __iomem *addr = ps2port->addr; |
150 | 150 | ||
151 | if (!wait_TBE(addr)) { | 151 | if (!wait_TBE(addr)) { |
152 | printk(KERN_DEBUG PFX "timeout - could not write byte %#x\n", data); | 152 | printk(KERN_DEBUG PFX "timeout - could not write byte %#x\n", data); |
153 | return 0; | 153 | return 0; |
154 | } | 154 | } |
155 | 155 | ||
156 | while (gscps2_readb_status(ps2port->addr) & GSC_STAT_RBNE) | 156 | while (gscps2_readb_status(addr) & GSC_STAT_RBNE) |
157 | /* wait */; | 157 | /* wait */; |
158 | 158 | ||
159 | spin_lock_irqsave(&ps2port->lock, flags); | 159 | spin_lock_irqsave(&ps2port->lock, flags); |
@@ -200,13 +200,12 @@ static void gscps2_enable(struct gscps2port *ps2port, int enable) | |||
200 | 200 | ||
201 | static void gscps2_reset(struct gscps2port *ps2port) | 201 | static void gscps2_reset(struct gscps2port *ps2port) |
202 | { | 202 | { |
203 | char *addr = ps2port->addr; | ||
204 | unsigned long flags; | 203 | unsigned long flags; |
205 | 204 | ||
206 | /* reset the interface */ | 205 | /* reset the interface */ |
207 | spin_lock_irqsave(&ps2port->lock, flags); | 206 | spin_lock_irqsave(&ps2port->lock, flags); |
208 | gscps2_flush(ps2port); | 207 | gscps2_flush(ps2port); |
209 | writeb(0xff, addr+GSC_RESET); | 208 | writeb(0xff, ps2port->addr + GSC_RESET); |
210 | gscps2_flush(ps2port); | 209 | gscps2_flush(ps2port); |
211 | spin_unlock_irqrestore(&ps2port->lock, flags); | 210 | spin_unlock_irqrestore(&ps2port->lock, flags); |
212 | } | 211 | } |
diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c index 41b740aed3a3..69bd98421eb1 100644 --- a/drivers/parisc/lba_pci.c +++ b/drivers/parisc/lba_pci.c | |||
@@ -1403,9 +1403,27 @@ lba_hw_init(struct lba_device *d) | |||
1403 | WRITE_REG32(stat, d->hba.base_addr + LBA_ERROR_CONFIG); | 1403 | WRITE_REG32(stat, d->hba.base_addr + LBA_ERROR_CONFIG); |
1404 | } | 1404 | } |
1405 | 1405 | ||
1406 | /* Set HF mode as the default (vs. -1 mode). */ | 1406 | |
1407 | /* | ||
1408 | * Hard Fail vs. Soft Fail on PCI "Master Abort". | ||
1409 | * | ||
1410 | * "Master Abort" means the MMIO transaction timed out - usually due to | ||
1411 | * the device not responding to an MMIO read. We would like HF to be | ||
1412 | * enabled to find driver problems, though it means the system will | ||
1413 | * crash with a HPMC. | ||
1414 | * | ||
1415 | * In SoftFail mode "~0L" is returned as a result of a timeout on the | ||
1416 | * pci bus. This is like how PCI busses on x86 and most other | ||
1417 | * architectures behave. In order to increase compatibility with | ||
1418 | * existing (x86) PCI hardware and existing Linux drivers we enable | ||
1419 | * Soft Faul mode on PA-RISC now too. | ||
1420 | */ | ||
1407 | stat = READ_REG32(d->hba.base_addr + LBA_STAT_CTL); | 1421 | stat = READ_REG32(d->hba.base_addr + LBA_STAT_CTL); |
1422 | #if defined(ENABLE_HARDFAIL) | ||
1408 | WRITE_REG32(stat | HF_ENABLE, d->hba.base_addr + LBA_STAT_CTL); | 1423 | WRITE_REG32(stat | HF_ENABLE, d->hba.base_addr + LBA_STAT_CTL); |
1424 | #else | ||
1425 | WRITE_REG32(stat & ~HF_ENABLE, d->hba.base_addr + LBA_STAT_CTL); | ||
1426 | #endif | ||
1409 | 1427 | ||
1410 | /* | 1428 | /* |
1411 | ** Writing a zero to STAT_CTL.rf (bit 0) will clear reset signal | 1429 | ** Writing a zero to STAT_CTL.rf (bit 0) will clear reset signal |
diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c index ff1a332d76e4..0c6e8b44b4ed 100644 --- a/drivers/parisc/led.c +++ b/drivers/parisc/led.c | |||
@@ -176,7 +176,7 @@ static int led_proc_open(struct inode *inode, struct file *file) | |||
176 | } | 176 | } |
177 | 177 | ||
178 | 178 | ||
179 | static ssize_t led_proc_write(struct file *file, const char *buf, | 179 | static ssize_t led_proc_write(struct file *file, const char __user *buf, |
180 | size_t count, loff_t *pos) | 180 | size_t count, loff_t *pos) |
181 | { | 181 | { |
182 | void *data = PDE_DATA(file_inode(file)); | 182 | void *data = PDE_DATA(file_inode(file)); |
@@ -250,7 +250,7 @@ static int __init led_create_procfs(void) | |||
250 | 250 | ||
251 | if (led_type == -1) return -1; | 251 | if (led_type == -1) return -1; |
252 | 252 | ||
253 | proc_pdc_root = proc_mkdir("pdc", 0); | 253 | proc_pdc_root = proc_mkdir("pdc", NULL); |
254 | if (!proc_pdc_root) return -1; | 254 | if (!proc_pdc_root) return -1; |
255 | 255 | ||
256 | if (!lcd_no_led_support) | 256 | if (!lcd_no_led_support) |
diff --git a/drivers/parisc/power.c b/drivers/parisc/power.c index e2a3112f1c98..ebaf6867b457 100644 --- a/drivers/parisc/power.c +++ b/drivers/parisc/power.c | |||
@@ -95,8 +95,7 @@ static void process_shutdown(void) | |||
95 | /* send kill signal */ | 95 | /* send kill signal */ |
96 | if (kill_cad_pid(SIGINT, 1)) { | 96 | if (kill_cad_pid(SIGINT, 1)) { |
97 | /* just in case killing init process failed */ | 97 | /* just in case killing init process failed */ |
98 | if (pm_power_off) | 98 | machine_power_off(); |
99 | pm_power_off(); | ||
100 | } | 99 | } |
101 | } | 100 | } |
102 | } | 101 | } |
diff --git a/drivers/parport/parport_gsc.c b/drivers/parport/parport_gsc.c index 5f710aaaf3da..190c0a7a1c52 100644 --- a/drivers/parport/parport_gsc.c +++ b/drivers/parport/parport_gsc.c | |||
@@ -256,7 +256,7 @@ struct parport *parport_gsc_probe_port(unsigned long base, | |||
256 | } | 256 | } |
257 | priv->ctr = 0xc; | 257 | priv->ctr = 0xc; |
258 | priv->ctr_writable = 0xff; | 258 | priv->ctr_writable = 0xff; |
259 | priv->dma_buf = 0; | 259 | priv->dma_buf = NULL; |
260 | priv->dma_handle = 0; | 260 | priv->dma_handle = 0; |
261 | p->base = base; | 261 | p->base = base; |
262 | p->base_hi = base_hi; | 262 | p->base_hi = base_hi; |
diff --git a/drivers/video/fbdev/stifb.c b/drivers/video/fbdev/stifb.c index 6ded5c198998..3c2e4cabc08f 100644 --- a/drivers/video/fbdev/stifb.c +++ b/drivers/video/fbdev/stifb.c | |||
@@ -527,7 +527,7 @@ rattlerSetupPlanes(struct stifb_info *fb) | |||
527 | fb->id = saved_id; | 527 | fb->id = saved_id; |
528 | 528 | ||
529 | for (y = 0; y < fb->info.var.yres; ++y) | 529 | for (y = 0; y < fb->info.var.yres; ++y) |
530 | memset(fb->info.screen_base + y * fb->info.fix.line_length, | 530 | fb_memset(fb->info.screen_base + y * fb->info.fix.line_length, |
531 | 0xff, fb->info.var.xres * fb->info.var.bits_per_pixel/8); | 531 | 0xff, fb->info.var.xres * fb->info.var.bits_per_pixel/8); |
532 | 532 | ||
533 | CRX24_SET_OVLY_MASK(fb); | 533 | CRX24_SET_OVLY_MASK(fb); |