Skip to content

Commit cc86397

Browse files
committed
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
2 parents aa3ae6d + 4edb386 commit cc86397

File tree

9 files changed

+23
-16
lines changed

9 files changed

+23
-16
lines changed

MAINTAINERS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6088,7 +6088,15 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6.git
60886088
T: git git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux.git
60896089
S: Maintained
60906090
F: arch/parisc/
6091+
F: Documentation/parisc/
60916092
F: drivers/parisc/
6093+
F: drivers/char/agp/parisc-agp.c
6094+
F: drivers/input/serio/gscps2.c
6095+
F: drivers/parport/parport_gsc.*
6096+
F: drivers/tty/serial/8250/8250_gsc.c
6097+
F: drivers/video/sti*
6098+
F: drivers/video/console/sti*
6099+
F: drivers/video/logo/logo_parisc*
60926100

60936101
PC87360 HARDWARE MONITORING DRIVER
60946102
M: Jim Cromie <jim.cromie@gmail.com>

arch/parisc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ KBUILD_CFLAGS_KERNEL += -mlong-calls
6666
endif
6767

6868
# select which processor to optimise for
69-
cflags-$(CONFIG_PA7100) += -march=1.1 -mschedule=7100
69+
cflags-$(CONFIG_PA7000) += -march=1.1 -mschedule=7100
7070
cflags-$(CONFIG_PA7200) += -march=1.1 -mschedule=7200
7171
cflags-$(CONFIG_PA7100LC) += -march=1.1 -mschedule=7100LC
7272
cflags-$(CONFIG_PA7300LC) += -march=1.1 -mschedule=7300

arch/parisc/include/asm/mmzone.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,14 @@ extern unsigned char pfnnid_map[PFNNID_MAP_MAX];
3939
static inline int pfn_to_nid(unsigned long pfn)
4040
{
4141
unsigned int i;
42-
unsigned char r;
4342

4443
if (unlikely(pfn_is_io(pfn)))
4544
return 0;
4645

4746
i = pfn >> PFNNID_SHIFT;
4847
BUG_ON(i >= ARRAY_SIZE(pfnnid_map));
49-
r = pfnnid_map[i];
50-
BUG_ON(r == 0xff);
5148

52-
return (int)r;
49+
return (int)pfnnid_map[i];
5350
}
5451

5552
static inline int pfn_valid(int pfn)

arch/parisc/kernel/drivers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ EXPORT_SYMBOL(print_pci_hwpath);
394394
static void setup_bus_id(struct parisc_device *padev)
395395
{
396396
struct hardware_path path;
397-
char name[20];
397+
char name[28];
398398
char *output = name;
399399
int i;
400400

arch/parisc/kernel/setup.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ void __init setup_cmdline(char **cmdline_p)
6969
/* called from hpux boot loader */
7070
boot_command_line[0] = '\0';
7171
} 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);
7374

7475
#ifdef CONFIG_BLK_DEV_INITRD
7576
if (boot_args[2] != 0) /* did palo pass us a ramdisk? */

drivers/parisc/lba_pci.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ lba_fixup_bus(struct pci_bus *bus)
668668
BUG();
669669
}
670670

671-
if (ldev->hba.elmmio_space.start) {
671+
if (ldev->hba.elmmio_space.flags) {
672672
err = request_resource(&iomem_resource,
673673
&(ldev->hba.elmmio_space));
674674
if (err < 0) {
@@ -993,15 +993,15 @@ lba_pat_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev)
993993

994994
case PAT_LMMIO:
995995
/* used to fix up pre-initialized MEM BARs */
996-
if (!lba_dev->hba.lmmio_space.start) {
996+
if (!lba_dev->hba.lmmio_space.flags) {
997997
sprintf(lba_dev->hba.lmmio_name,
998998
"PCI%02x LMMIO",
999999
(int)lba_dev->hba.bus_num.start);
10001000
lba_dev->hba.lmmio_space_offset = p->start -
10011001
io->start;
10021002
r = &lba_dev->hba.lmmio_space;
10031003
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) {
10051005
sprintf(lba_dev->hba.elmmio_name,
10061006
"PCI%02x ELMMIO",
10071007
(int)lba_dev->hba.bus_num.start);
@@ -1096,6 +1096,7 @@ lba_legacy_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev)
10961096
r->name = "LBA PCI Busses";
10971097
r->start = lba_num & 0xff;
10981098
r->end = (lba_num>>8) & 0xff;
1099+
r->flags = IORESOURCE_BUS;
10991100

11001101
/* Set up local PCI Bus resources - we don't need them for
11011102
** Legacy boxes but it's nice to see in /proc/iomem.
@@ -1494,7 +1495,7 @@ lba_driver_probe(struct parisc_device *dev)
14941495

14951496
pci_add_resource_offset(&resources, &lba_dev->hba.io_space,
14961497
HBA_PORT_BASE(lba_dev->hba.hba_num));
1497-
if (lba_dev->hba.elmmio_space.start)
1498+
if (lba_dev->hba.elmmio_space.flags)
14981499
pci_add_resource_offset(&resources, &lba_dev->hba.elmmio_space,
14991500
lba_dev->hba.lmmio_space_offset);
15001501
if (lba_dev->hba.lmmio_space.flags)

drivers/parport/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ config PARPORT_PC_FIFO
7171

7272
config PARPORT_PC_SUPERIO
7373
bool "SuperIO chipset support"
74-
depends on PARPORT_PC
74+
depends on PARPORT_PC && !PARISC
7575
help
7676
Saying Y here enables some probes for Super-IO chipsets in order to
7777
find out things like base addresses, IRQ lines and DMA channels. It

drivers/parport/parport_gsc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ static int parport_PS2_supported(struct parport *pb)
234234

235235
struct parport *parport_gsc_probe_port(unsigned long base,
236236
unsigned long base_hi, int irq,
237-
int dma, struct pci_dev *dev)
237+
int dma, struct parisc_device *padev)
238238
{
239239
struct parport_gsc_private *priv;
240240
struct parport_operations *ops;
@@ -258,7 +258,6 @@ struct parport *parport_gsc_probe_port(unsigned long base,
258258
priv->ctr_writable = 0xff;
259259
priv->dma_buf = 0;
260260
priv->dma_handle = 0;
261-
priv->dev = dev;
262261
p->base = base;
263262
p->base_hi = base_hi;
264263
p->irq = irq;
@@ -282,6 +281,7 @@ struct parport *parport_gsc_probe_port(unsigned long base,
282281
return NULL;
283282
}
284283

284+
p->dev = &padev->dev;
285285
p->base_hi = base_hi;
286286
p->modes = tmp.modes;
287287
p->size = (p->modes & PARPORT_MODE_EPP)?8:3;
@@ -373,7 +373,7 @@ static int parport_init_chip(struct parisc_device *dev)
373373
}
374374

375375
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);
377377
if (p)
378378
parport_count++;
379379
dev_set_drvdata(&dev->dev, p);

drivers/parport/parport_gsc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,6 @@ extern void parport_gsc_dec_use_count(void);
217217
extern struct parport *parport_gsc_probe_port(unsigned long base,
218218
unsigned long base_hi,
219219
int irq, int dma,
220-
struct pci_dev *dev);
220+
struct parisc_device *padev);
221221

222222
#endif /* __DRIVERS_PARPORT_PARPORT_GSC_H */

0 commit comments

Comments
 (0)