diff options
| -rw-r--r-- | arch/powerpc/platforms/iseries/Makefile | 4 | ||||
| -rw-r--r-- | arch/powerpc/platforms/iseries/irq.c | 6 | ||||
| -rw-r--r-- | drivers/char/mem.c | 8 | ||||
| -rw-r--r-- | include/asm-powerpc/iseries/iseries_io.h | 12 |
4 files changed, 24 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/iseries/Makefile b/arch/powerpc/platforms/iseries/Makefile index 127b465308be..ce8c0b943fa0 100644 --- a/arch/powerpc/platforms/iseries/Makefile +++ b/arch/powerpc/platforms/iseries/Makefile | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | EXTRA_CFLAGS += -mno-minimal-toc | 1 | EXTRA_CFLAGS += -mno-minimal-toc |
| 2 | 2 | ||
| 3 | obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o mf.o lpevents.o \ | 3 | obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o mf.o lpevents.o \ |
| 4 | hvcall.o proc.o htab.o iommu.o misc.o | 4 | hvcall.o proc.o htab.o iommu.o misc.o irq.o |
| 5 | obj-$(CONFIG_PCI) += pci.o irq.o vpdinfo.o | 5 | obj-$(CONFIG_PCI) += pci.o vpdinfo.o |
| 6 | obj-$(CONFIG_IBMVIO) += vio.o | 6 | obj-$(CONFIG_IBMVIO) += vio.o |
| 7 | obj-$(CONFIG_SMP) += smp.o | 7 | obj-$(CONFIG_SMP) += smp.o |
| 8 | obj-$(CONFIG_VIOPATH) += viopath.o | 8 | obj-$(CONFIG_VIOPATH) += viopath.o |
diff --git a/arch/powerpc/platforms/iseries/irq.c b/arch/powerpc/platforms/iseries/irq.c index 3d023856405a..83442ea77476 100644 --- a/arch/powerpc/platforms/iseries/irq.c +++ b/arch/powerpc/platforms/iseries/irq.c | |||
| @@ -48,6 +48,8 @@ | |||
| 48 | extern void iSeries_smp_message_recv(struct pt_regs *); | 48 | extern void iSeries_smp_message_recv(struct pt_regs *); |
| 49 | #endif | 49 | #endif |
| 50 | 50 | ||
| 51 | #ifdef CONFIG_PCI | ||
| 52 | |||
| 51 | enum pci_event_type { | 53 | enum pci_event_type { |
| 52 | pe_bus_created = 0, /* PHB has been created */ | 54 | pe_bus_created = 0, /* PHB has been created */ |
| 53 | pe_bus_error = 1, /* PHB has failed */ | 55 | pe_bus_error = 1, /* PHB has failed */ |
| @@ -325,6 +327,8 @@ int __init iSeries_allocate_IRQ(HvBusNumber bus, | |||
| 325 | return virtirq; | 327 | return virtirq; |
| 326 | } | 328 | } |
| 327 | 329 | ||
| 330 | #endif /* CONFIG_PCI */ | ||
| 331 | |||
| 328 | /* | 332 | /* |
| 329 | * Get the next pending IRQ. | 333 | * Get the next pending IRQ. |
| 330 | */ | 334 | */ |
| @@ -344,6 +348,7 @@ int iSeries_get_irq(struct pt_regs *regs) | |||
| 344 | if (hvlpevent_is_pending()) | 348 | if (hvlpevent_is_pending()) |
| 345 | process_hvlpevents(regs); | 349 | process_hvlpevents(regs); |
| 346 | 350 | ||
| 351 | #ifdef CONFIG_PCI | ||
| 347 | if (num_pending_irqs) { | 352 | if (num_pending_irqs) { |
| 348 | spin_lock(&pending_irqs_lock); | 353 | spin_lock(&pending_irqs_lock); |
| 349 | for (irq = 0; irq < NR_IRQS; irq++) { | 354 | for (irq = 0; irq < NR_IRQS; irq++) { |
| @@ -357,6 +362,7 @@ int iSeries_get_irq(struct pt_regs *regs) | |||
| 357 | if (irq >= NR_IRQS) | 362 | if (irq >= NR_IRQS) |
| 358 | irq = -2; | 363 | irq = -2; |
| 359 | } | 364 | } |
| 365 | #endif | ||
| 360 | 366 | ||
| 361 | return irq; | 367 | return irq; |
| 362 | } | 368 | } |
diff --git a/drivers/char/mem.c b/drivers/char/mem.c index 704c3c07f0ab..29c41f4418c0 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c | |||
| @@ -534,7 +534,7 @@ static ssize_t write_kmem(struct file * file, const char __user * buf, | |||
| 534 | return virtr + wrote; | 534 | return virtr + wrote; |
| 535 | } | 535 | } |
| 536 | 536 | ||
| 537 | #if (defined(CONFIG_ISA) || !defined(__mc68000__)) && (!defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI)) | 537 | #if defined(CONFIG_ISA) || !defined(__mc68000__) |
| 538 | static ssize_t read_port(struct file * file, char __user * buf, | 538 | static ssize_t read_port(struct file * file, char __user * buf, |
| 539 | size_t count, loff_t *ppos) | 539 | size_t count, loff_t *ppos) |
| 540 | { | 540 | { |
| @@ -795,7 +795,7 @@ static struct file_operations null_fops = { | |||
| 795 | .write = write_null, | 795 | .write = write_null, |
| 796 | }; | 796 | }; |
| 797 | 797 | ||
| 798 | #if (defined(CONFIG_ISA) || !defined(__mc68000__)) && (!defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI)) | 798 | #if defined(CONFIG_ISA) || !defined(__mc68000__) |
| 799 | static struct file_operations port_fops = { | 799 | static struct file_operations port_fops = { |
| 800 | .llseek = memory_lseek, | 800 | .llseek = memory_lseek, |
| 801 | .read = read_port, | 801 | .read = read_port, |
| @@ -865,7 +865,7 @@ static int memory_open(struct inode * inode, struct file * filp) | |||
| 865 | case 3: | 865 | case 3: |
| 866 | filp->f_op = &null_fops; | 866 | filp->f_op = &null_fops; |
| 867 | break; | 867 | break; |
| 868 | #if (defined(CONFIG_ISA) || !defined(__mc68000__)) && (!defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI)) | 868 | #if defined(CONFIG_ISA) || !defined(__mc68000__) |
| 869 | case 4: | 869 | case 4: |
| 870 | filp->f_op = &port_fops; | 870 | filp->f_op = &port_fops; |
| 871 | break; | 871 | break; |
| @@ -912,7 +912,7 @@ static const struct { | |||
| 912 | {1, "mem", S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops}, | 912 | {1, "mem", S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops}, |
| 913 | {2, "kmem", S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops}, | 913 | {2, "kmem", S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops}, |
| 914 | {3, "null", S_IRUGO | S_IWUGO, &null_fops}, | 914 | {3, "null", S_IRUGO | S_IWUGO, &null_fops}, |
| 915 | #if (defined(CONFIG_ISA) || !defined(__mc68000__)) && (!defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI)) | 915 | #if defined(CONFIG_ISA) || !defined(__mc68000__) |
| 916 | {4, "port", S_IRUSR | S_IWUSR | S_IRGRP, &port_fops}, | 916 | {4, "port", S_IRUSR | S_IWUSR | S_IRGRP, &port_fops}, |
| 917 | #endif | 917 | #endif |
| 918 | {5, "zero", S_IRUGO | S_IWUGO, &zero_fops}, | 918 | {5, "zero", S_IRUGO | S_IWUGO, &zero_fops}, |
diff --git a/include/asm-powerpc/iseries/iseries_io.h b/include/asm-powerpc/iseries/iseries_io.h index d1c317c6c3d0..496aa852b617 100644 --- a/include/asm-powerpc/iseries/iseries_io.h +++ b/include/asm-powerpc/iseries/iseries_io.h | |||
| @@ -32,6 +32,7 @@ | |||
| 32 | * End Change Activity | 32 | * End Change Activity |
| 33 | */ | 33 | */ |
| 34 | 34 | ||
| 35 | #ifdef CONFIG_PCI | ||
| 35 | extern u8 iSeries_Read_Byte(const volatile void __iomem * IoAddress); | 36 | extern u8 iSeries_Read_Byte(const volatile void __iomem * IoAddress); |
| 36 | extern u16 iSeries_Read_Word(const volatile void __iomem * IoAddress); | 37 | extern u16 iSeries_Read_Word(const volatile void __iomem * IoAddress); |
| 37 | extern u32 iSeries_Read_Long(const volatile void __iomem * IoAddress); | 38 | extern u32 iSeries_Read_Long(const volatile void __iomem * IoAddress); |
| @@ -44,6 +45,17 @@ extern void iSeries_memcpy_toio(volatile void __iomem *dest, void *source, | |||
| 44 | size_t n); | 45 | size_t n); |
| 45 | extern void iSeries_memcpy_fromio(void *dest, | 46 | extern void iSeries_memcpy_fromio(void *dest, |
| 46 | const volatile void __iomem *source, size_t n); | 47 | const volatile void __iomem *source, size_t n); |
| 48 | #else | ||
| 49 | static inline u8 iSeries_Read_Byte(const volatile void __iomem *IoAddress) | ||
| 50 | { | ||
| 51 | return 0xff; | ||
| 52 | } | ||
| 53 | |||
| 54 | static inline void iSeries_Write_Byte(u8 IoData, | ||
| 55 | volatile void __iomem *IoAddress) | ||
| 56 | { | ||
| 57 | } | ||
| 58 | #endif /* CONFIG_PCI */ | ||
| 47 | 59 | ||
| 48 | #endif /* CONFIG_PPC_ISERIES */ | 60 | #endif /* CONFIG_PPC_ISERIES */ |
| 49 | #endif /* _ASM_POWERPC_ISERIES_ISERIES_IO_H */ | 61 | #endif /* _ASM_POWERPC_ISERIES_ISERIES_IO_H */ |
