Skip to content

Commit

Permalink
Merge branch 'for-3.10' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
torvalds committed Jun 1, 2013
2 parents aa3ae6d + 4edb386 commit cc86397
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 16 deletions.
8 changes: 8 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -6088,7 +6088,15 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6.git
T: git git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux.git
S: Maintained
F: arch/parisc/
F: Documentation/parisc/
F: drivers/parisc/
F: drivers/char/agp/parisc-agp.c
F: drivers/input/serio/gscps2.c
F: drivers/parport/parport_gsc.*
F: drivers/tty/serial/8250/8250_gsc.c
F: drivers/video/sti*
F: drivers/video/console/sti*
F: drivers/video/logo/logo_parisc*

PC87360 HARDWARE MONITORING DRIVER
M: Jim Cromie <jim.cromie@gmail.com>
Expand Down
2 changes: 1 addition & 1 deletion arch/parisc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ KBUILD_CFLAGS_KERNEL += -mlong-calls
endif

# select which processor to optimise for
cflags-$(CONFIG_PA7100) += -march=1.1 -mschedule=7100
cflags-$(CONFIG_PA7000) += -march=1.1 -mschedule=7100
cflags-$(CONFIG_PA7200) += -march=1.1 -mschedule=7200
cflags-$(CONFIG_PA7100LC) += -march=1.1 -mschedule=7100LC
cflags-$(CONFIG_PA7300LC) += -march=1.1 -mschedule=7300
Expand Down
5 changes: 1 addition & 4 deletions arch/parisc/include/asm/mmzone.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,14 @@ extern unsigned char pfnnid_map[PFNNID_MAP_MAX];
static inline int pfn_to_nid(unsigned long pfn)
{
unsigned int i;
unsigned char r;

if (unlikely(pfn_is_io(pfn)))
return 0;

i = pfn >> PFNNID_SHIFT;
BUG_ON(i >= ARRAY_SIZE(pfnnid_map));
r = pfnnid_map[i];
BUG_ON(r == 0xff);

return (int)r;
return (int)pfnnid_map[i];
}

static inline int pfn_valid(int pfn)
Expand Down
2 changes: 1 addition & 1 deletion arch/parisc/kernel/drivers.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ EXPORT_SYMBOL(print_pci_hwpath);
static void setup_bus_id(struct parisc_device *padev)
{
struct hardware_path path;
char name[20];
char name[28];
char *output = name;
int i;

Expand Down
3 changes: 2 additions & 1 deletion arch/parisc/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ void __init setup_cmdline(char **cmdline_p)
/* called from hpux boot loader */
boot_command_line[0] = '\0';
} else {
strcpy(boot_command_line, (char *)__va(boot_args[1]));
strlcpy(boot_command_line, (char *)__va(boot_args[1]),
COMMAND_LINE_SIZE);

#ifdef CONFIG_BLK_DEV_INITRD
if (boot_args[2] != 0) /* did palo pass us a ramdisk? */
Expand Down
9 changes: 5 additions & 4 deletions drivers/parisc/lba_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ lba_fixup_bus(struct pci_bus *bus)
BUG();
}

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

case PAT_LMMIO:
/* used to fix up pre-initialized MEM BARs */
if (!lba_dev->hba.lmmio_space.start) {
if (!lba_dev->hba.lmmio_space.flags) {
sprintf(lba_dev->hba.lmmio_name,
"PCI%02x LMMIO",
(int)lba_dev->hba.bus_num.start);
lba_dev->hba.lmmio_space_offset = p->start -
io->start;
r = &lba_dev->hba.lmmio_space;
r->name = lba_dev->hba.lmmio_name;
} else if (!lba_dev->hba.elmmio_space.start) {
} else if (!lba_dev->hba.elmmio_space.flags) {
sprintf(lba_dev->hba.elmmio_name,
"PCI%02x ELMMIO",
(int)lba_dev->hba.bus_num.start);
Expand Down Expand Up @@ -1096,6 +1096,7 @@ lba_legacy_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev)
r->name = "LBA PCI Busses";
r->start = lba_num & 0xff;
r->end = (lba_num>>8) & 0xff;
r->flags = IORESOURCE_BUS;

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

pci_add_resource_offset(&resources, &lba_dev->hba.io_space,
HBA_PORT_BASE(lba_dev->hba.hba_num));
if (lba_dev->hba.elmmio_space.start)
if (lba_dev->hba.elmmio_space.flags)
pci_add_resource_offset(&resources, &lba_dev->hba.elmmio_space,
lba_dev->hba.lmmio_space_offset);
if (lba_dev->hba.lmmio_space.flags)
Expand Down
2 changes: 1 addition & 1 deletion drivers/parport/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ config PARPORT_PC_FIFO

config PARPORT_PC_SUPERIO
bool "SuperIO chipset support"
depends on PARPORT_PC
depends on PARPORT_PC && !PARISC
help
Saying Y here enables some probes for Super-IO chipsets in order to
find out things like base addresses, IRQ lines and DMA channels. It
Expand Down
6 changes: 3 additions & 3 deletions drivers/parport/parport_gsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ static int parport_PS2_supported(struct parport *pb)

struct parport *parport_gsc_probe_port(unsigned long base,
unsigned long base_hi, int irq,
int dma, struct pci_dev *dev)
int dma, struct parisc_device *padev)
{
struct parport_gsc_private *priv;
struct parport_operations *ops;
Expand All @@ -258,7 +258,6 @@ struct parport *parport_gsc_probe_port(unsigned long base,
priv->ctr_writable = 0xff;
priv->dma_buf = 0;
priv->dma_handle = 0;
priv->dev = dev;
p->base = base;
p->base_hi = base_hi;
p->irq = irq;
Expand All @@ -282,6 +281,7 @@ struct parport *parport_gsc_probe_port(unsigned long base,
return NULL;
}

p->dev = &padev->dev;
p->base_hi = base_hi;
p->modes = tmp.modes;
p->size = (p->modes & PARPORT_MODE_EPP)?8:3;
Expand Down Expand Up @@ -373,7 +373,7 @@ static int parport_init_chip(struct parisc_device *dev)
}

p = parport_gsc_probe_port(port, 0, dev->irq,
/* PARPORT_IRQ_NONE */ PARPORT_DMA_NONE, NULL);
/* PARPORT_IRQ_NONE */ PARPORT_DMA_NONE, dev);
if (p)
parport_count++;
dev_set_drvdata(&dev->dev, p);
Expand Down
2 changes: 1 addition & 1 deletion drivers/parport/parport_gsc.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,6 @@ extern void parport_gsc_dec_use_count(void);
extern struct parport *parport_gsc_probe_port(unsigned long base,
unsigned long base_hi,
int irq, int dma,
struct pci_dev *dev);
struct parisc_device *padev);

#endif /* __DRIVERS_PARPORT_PARPORT_GSC_H */

0 comments on commit cc86397

Please sign in to comment.