aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-06-01 17:24:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-06-01 17:24:54 -0400
commitcc8639739250a4a5bbfb29abffdab8ff2c8ab1b6 (patch)
tree86bdb6694d6361a97bfe6b16807028c0e148dccb
parentaa3ae6de36c86994c3446bdbc6b69ece9193732a (diff)
parent4edb38695d9a3cd62739f8595e21f36f0aabf4c2 (diff)
Merge branch 'for-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc fixes from Helge Deller: "This patcheset includes fixes for: - the PCI/LBA which brings back the stifb graphics framebuffer console - possible memory overflows in parisc kernel init code - parport support on older GSC machines - avoids that users by mistake enable PARPORT_PC_SUPERIO on parisc - MAINTAINERS file list updates for parisc." * 'for-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: parport0: fix this legacy no-device port driver! parport_pc: disable PARPORT_PC_SUPERIO on parisc architecture parisc/PCI: lba: fix: convert to pci_create_root_bus() for correct root bus resources (v2) parisc/PCI: Set type for LBA bus_num resource MAINTAINERS: update parisc architecture file list parisc: kernel: using strlcpy() instead of strcpy() parisc: rename "CONFIG_PA7100" to "CONFIG_PA7000" parisc: fix kernel BUG at arch/parisc/include/asm/mmzone.h:50 parisc: memory overflow, 'name' length is too short for using
-rw-r--r--MAINTAINERS8
-rw-r--r--arch/parisc/Makefile2
-rw-r--r--arch/parisc/include/asm/mmzone.h5
-rw-r--r--arch/parisc/kernel/drivers.c2
-rw-r--r--arch/parisc/kernel/setup.c3
-rw-r--r--drivers/parisc/lba_pci.c9
-rw-r--r--drivers/parport/Kconfig2
-rw-r--r--drivers/parport/parport_gsc.c6
-rw-r--r--drivers/parport/parport_gsc.h2
9 files changed, 23 insertions, 16 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 7714c3c363c3..f35a259a6564 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -6088,7 +6088,15 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6.git
6088T: git git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux.git 6088T: git git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux.git
6089S: Maintained 6089S: Maintained
6090F: arch/parisc/ 6090F: arch/parisc/
6091F: Documentation/parisc/
6091F: drivers/parisc/ 6092F: drivers/parisc/
6093F: drivers/char/agp/parisc-agp.c
6094F: drivers/input/serio/gscps2.c
6095F: drivers/parport/parport_gsc.*
6096F: drivers/tty/serial/8250/8250_gsc.c
6097F: drivers/video/sti*
6098F: drivers/video/console/sti*
6099F: drivers/video/logo/logo_parisc*
6092 6100
6093PC87360 HARDWARE MONITORING DRIVER 6101PC87360 HARDWARE MONITORING DRIVER
6094M: Jim Cromie <jim.cromie@gmail.com> 6102M: Jim Cromie <jim.cromie@gmail.com>
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
index 197690068f88..96ec3982be8d 100644
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -66,7 +66,7 @@ KBUILD_CFLAGS_KERNEL += -mlong-calls
66endif 66endif
67 67
68# select which processor to optimise for 68# select which processor to optimise for
69cflags-$(CONFIG_PA7100) += -march=1.1 -mschedule=7100 69cflags-$(CONFIG_PA7000) += -march=1.1 -mschedule=7100
70cflags-$(CONFIG_PA7200) += -march=1.1 -mschedule=7200 70cflags-$(CONFIG_PA7200) += -march=1.1 -mschedule=7200
71cflags-$(CONFIG_PA7100LC) += -march=1.1 -mschedule=7100LC 71cflags-$(CONFIG_PA7100LC) += -march=1.1 -mschedule=7100LC
72cflags-$(CONFIG_PA7300LC) += -march=1.1 -mschedule=7300 72cflags-$(CONFIG_PA7300LC) += -march=1.1 -mschedule=7300
diff --git a/arch/parisc/include/asm/mmzone.h b/arch/parisc/include/asm/mmzone.h
index 0e625ab9aaec..cc50d33b7b88 100644
--- a/arch/parisc/include/asm/mmzone.h
+++ b/arch/parisc/include/asm/mmzone.h
@@ -39,17 +39,14 @@ extern unsigned char pfnnid_map[PFNNID_MAP_MAX];
39static inline int pfn_to_nid(unsigned long pfn) 39static inline int pfn_to_nid(unsigned long pfn)
40{ 40{
41 unsigned int i; 41 unsigned int i;
42 unsigned char r;
43 42
44 if (unlikely(pfn_is_io(pfn))) 43 if (unlikely(pfn_is_io(pfn)))
45 return 0; 44 return 0;
46 45
47 i = pfn >> PFNNID_SHIFT; 46 i = pfn >> PFNNID_SHIFT;
48 BUG_ON(i >= ARRAY_SIZE(pfnnid_map)); 47 BUG_ON(i >= ARRAY_SIZE(pfnnid_map));
49 r = pfnnid_map[i];
50 BUG_ON(r == 0xff);
51 48
52 return (int)r; 49 return (int)pfnnid_map[i];
53} 50}
54 51
55static inline int pfn_valid(int pfn) 52static inline int pfn_valid(int pfn)
diff --git a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c
index 5709c5e59be8..14285caec71a 100644
--- a/arch/parisc/kernel/drivers.c
+++ b/arch/parisc/kernel/drivers.c
@@ -394,7 +394,7 @@ EXPORT_SYMBOL(print_pci_hwpath);
394static void setup_bus_id(struct parisc_device *padev) 394static void setup_bus_id(struct parisc_device *padev)
395{ 395{
396 struct hardware_path path; 396 struct hardware_path path;
397 char name[20]; 397 char name[28];
398 char *output = name; 398 char *output = name;
399 int i; 399 int i;
400 400
diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c
index 76b63e726a53..1e95b2000ce8 100644
--- a/arch/parisc/kernel/setup.c
+++ b/arch/parisc/kernel/setup.c
@@ -69,7 +69,8 @@ void __init setup_cmdline(char **cmdline_p)
69 /* called from hpux boot loader */ 69 /* called from hpux boot loader */
70 boot_command_line[0] = '\0'; 70 boot_command_line[0] = '\0';
71 } else { 71 } else {
72 strcpy(boot_command_line, (char *)__va(boot_args[1])); 72 strlcpy(boot_command_line, (char *)__va(boot_args[1]),
73 COMMAND_LINE_SIZE);
73 74
74#ifdef CONFIG_BLK_DEV_INITRD 75#ifdef CONFIG_BLK_DEV_INITRD
75 if (boot_args[2] != 0) /* did palo pass us a ramdisk? */ 76 if (boot_args[2] != 0) /* did palo pass us a ramdisk? */
diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c
index 2ef7103270bb..1f05913ae677 100644
--- a/drivers/parisc/lba_pci.c
+++ b/drivers/parisc/lba_pci.c
@@ -668,7 +668,7 @@ lba_fixup_bus(struct pci_bus *bus)
668 BUG(); 668 BUG();
669 } 669 }
670 670
671 if (ldev->hba.elmmio_space.start) { 671 if (ldev->hba.elmmio_space.flags) {
672 err = request_resource(&iomem_resource, 672 err = request_resource(&iomem_resource,
673 &(ldev->hba.elmmio_space)); 673 &(ldev->hba.elmmio_space));
674 if (err < 0) { 674 if (err < 0) {
@@ -993,7 +993,7 @@ lba_pat_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev)
993 993
994 case PAT_LMMIO: 994 case PAT_LMMIO:
995 /* used to fix up pre-initialized MEM BARs */ 995 /* used to fix up pre-initialized MEM BARs */
996 if (!lba_dev->hba.lmmio_space.start) { 996 if (!lba_dev->hba.lmmio_space.flags) {
997 sprintf(lba_dev->hba.lmmio_name, 997 sprintf(lba_dev->hba.lmmio_name,
998 "PCI%02x LMMIO", 998 "PCI%02x LMMIO",
999 (int)lba_dev->hba.bus_num.start); 999 (int)lba_dev->hba.bus_num.start);
@@ -1001,7 +1001,7 @@ lba_pat_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev)
1001 io->start; 1001 io->start;
1002 r = &lba_dev->hba.lmmio_space; 1002 r = &lba_dev->hba.lmmio_space;
1003 r->name = lba_dev->hba.lmmio_name; 1003 r->name = lba_dev->hba.lmmio_name;
1004 } else if (!lba_dev->hba.elmmio_space.start) { 1004 } else if (!lba_dev->hba.elmmio_space.flags) {
1005 sprintf(lba_dev->hba.elmmio_name, 1005 sprintf(lba_dev->hba.elmmio_name,
1006 "PCI%02x ELMMIO", 1006 "PCI%02x ELMMIO",
1007 (int)lba_dev->hba.bus_num.start); 1007 (int)lba_dev->hba.bus_num.start);
@@ -1096,6 +1096,7 @@ lba_legacy_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev)
1096 r->name = "LBA PCI Busses"; 1096 r->name = "LBA PCI Busses";
1097 r->start = lba_num & 0xff; 1097 r->start = lba_num & 0xff;
1098 r->end = (lba_num>>8) & 0xff; 1098 r->end = (lba_num>>8) & 0xff;
1099 r->flags = IORESOURCE_BUS;
1099 1100
1100 /* Set up local PCI Bus resources - we don't need them for 1101 /* Set up local PCI Bus resources - we don't need them for
1101 ** Legacy boxes but it's nice to see in /proc/iomem. 1102 ** Legacy boxes but it's nice to see in /proc/iomem.
@@ -1494,7 +1495,7 @@ lba_driver_probe(struct parisc_device *dev)
1494 1495
1495 pci_add_resource_offset(&resources, &lba_dev->hba.io_space, 1496 pci_add_resource_offset(&resources, &lba_dev->hba.io_space,
1496 HBA_PORT_BASE(lba_dev->hba.hba_num)); 1497 HBA_PORT_BASE(lba_dev->hba.hba_num));
1497 if (lba_dev->hba.elmmio_space.start) 1498 if (lba_dev->hba.elmmio_space.flags)
1498 pci_add_resource_offset(&resources, &lba_dev->hba.elmmio_space, 1499 pci_add_resource_offset(&resources, &lba_dev->hba.elmmio_space,
1499 lba_dev->hba.lmmio_space_offset); 1500 lba_dev->hba.lmmio_space_offset);
1500 if (lba_dev->hba.lmmio_space.flags) 1501 if (lba_dev->hba.lmmio_space.flags)
diff --git a/drivers/parport/Kconfig b/drivers/parport/Kconfig
index 24e12d4d1769..a50576081b34 100644
--- a/drivers/parport/Kconfig
+++ b/drivers/parport/Kconfig
@@ -71,7 +71,7 @@ config PARPORT_PC_FIFO
71 71
72config PARPORT_PC_SUPERIO 72config PARPORT_PC_SUPERIO
73 bool "SuperIO chipset support" 73 bool "SuperIO chipset support"
74 depends on PARPORT_PC 74 depends on PARPORT_PC && !PARISC
75 help 75 help
76 Saying Y here enables some probes for Super-IO chipsets in order to 76 Saying Y here enables some probes for Super-IO chipsets in order to
77 find out things like base addresses, IRQ lines and DMA channels. It 77 find out things like base addresses, IRQ lines and DMA channels. It
diff --git a/drivers/parport/parport_gsc.c b/drivers/parport/parport_gsc.c
index a5251cb5fb0c..6e3a60c78873 100644
--- a/drivers/parport/parport_gsc.c
+++ b/drivers/parport/parport_gsc.c
@@ -234,7 +234,7 @@ static int parport_PS2_supported(struct parport *pb)
234 234
235struct parport *parport_gsc_probe_port(unsigned long base, 235struct parport *parport_gsc_probe_port(unsigned long base,
236 unsigned long base_hi, int irq, 236 unsigned long base_hi, int irq,
237 int dma, struct pci_dev *dev) 237 int dma, struct parisc_device *padev)
238{ 238{
239 struct parport_gsc_private *priv; 239 struct parport_gsc_private *priv;
240 struct parport_operations *ops; 240 struct parport_operations *ops;
@@ -258,7 +258,6 @@ struct parport *parport_gsc_probe_port(unsigned long base,
258 priv->ctr_writable = 0xff; 258 priv->ctr_writable = 0xff;
259 priv->dma_buf = 0; 259 priv->dma_buf = 0;
260 priv->dma_handle = 0; 260 priv->dma_handle = 0;
261 priv->dev = dev;
262 p->base = base; 261 p->base = base;
263 p->base_hi = base_hi; 262 p->base_hi = base_hi;
264 p->irq = irq; 263 p->irq = irq;
@@ -282,6 +281,7 @@ struct parport *parport_gsc_probe_port(unsigned long base,
282 return NULL; 281 return NULL;
283 } 282 }
284 283
284 p->dev = &padev->dev;
285 p->base_hi = base_hi; 285 p->base_hi = base_hi;
286 p->modes = tmp.modes; 286 p->modes = tmp.modes;
287 p->size = (p->modes & PARPORT_MODE_EPP)?8:3; 287 p->size = (p->modes & PARPORT_MODE_EPP)?8:3;
@@ -373,7 +373,7 @@ static int parport_init_chip(struct parisc_device *dev)
373 } 373 }
374 374
375 p = parport_gsc_probe_port(port, 0, dev->irq, 375 p = parport_gsc_probe_port(port, 0, dev->irq,
376 /* PARPORT_IRQ_NONE */ PARPORT_DMA_NONE, NULL); 376 /* PARPORT_IRQ_NONE */ PARPORT_DMA_NONE, dev);
377 if (p) 377 if (p)
378 parport_count++; 378 parport_count++;
379 dev_set_drvdata(&dev->dev, p); 379 dev_set_drvdata(&dev->dev, p);
diff --git a/drivers/parport/parport_gsc.h b/drivers/parport/parport_gsc.h
index fc9c37c54022..812214768d27 100644
--- a/drivers/parport/parport_gsc.h
+++ b/drivers/parport/parport_gsc.h
@@ -217,6 +217,6 @@ extern void parport_gsc_dec_use_count(void);
217extern struct parport *parport_gsc_probe_port(unsigned long base, 217extern struct parport *parport_gsc_probe_port(unsigned long base,
218 unsigned long base_hi, 218 unsigned long base_hi,
219 int irq, int dma, 219 int irq, int dma,
220 struct pci_dev *dev); 220 struct parisc_device *padev);
221 221
222#endif /* __DRIVERS_PARPORT_PARPORT_GSC_H */ 222#endif /* __DRIVERS_PARPORT_PARPORT_GSC_H */