mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00
[PATCH] powerpc: iSeries fixes for build with no PCI
This reverts part of "ppc64 iSeries: allow build with no PCI"
(145d01e428
) which affected generic code
and applies a fix in the arch specific code.
Commit "partly merge iseries do_IRQ"
(5fee9b3b39eb55c7e3619a3b36ceeabffeb8f144) introduced iSeries_get_irq
which was only available if CONFIG_PCI is set.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
parent
511061049b
commit
ee2cdecec4
4 changed files with 24 additions and 6 deletions
|
@ -1,8 +1,8 @@
|
||||||
EXTRA_CFLAGS += -mno-minimal-toc
|
EXTRA_CFLAGS += -mno-minimal-toc
|
||||||
|
|
||||||
obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o mf.o lpevents.o \
|
obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o mf.o lpevents.o \
|
||||||
hvcall.o proc.o htab.o iommu.o misc.o
|
hvcall.o proc.o htab.o iommu.o misc.o irq.o
|
||||||
obj-$(CONFIG_PCI) += pci.o irq.o vpdinfo.o
|
obj-$(CONFIG_PCI) += pci.o vpdinfo.o
|
||||||
obj-$(CONFIG_IBMVIO) += vio.o
|
obj-$(CONFIG_IBMVIO) += vio.o
|
||||||
obj-$(CONFIG_SMP) += smp.o
|
obj-$(CONFIG_SMP) += smp.o
|
||||||
obj-$(CONFIG_VIOPATH) += viopath.o
|
obj-$(CONFIG_VIOPATH) += viopath.o
|
||||||
|
|
|
@ -48,6 +48,8 @@
|
||||||
extern void iSeries_smp_message_recv(struct pt_regs *);
|
extern void iSeries_smp_message_recv(struct pt_regs *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_PCI
|
||||||
|
|
||||||
enum pci_event_type {
|
enum pci_event_type {
|
||||||
pe_bus_created = 0, /* PHB has been created */
|
pe_bus_created = 0, /* PHB has been created */
|
||||||
pe_bus_error = 1, /* PHB has failed */
|
pe_bus_error = 1, /* PHB has failed */
|
||||||
|
@ -325,6 +327,8 @@ int __init iSeries_allocate_IRQ(HvBusNumber bus,
|
||||||
return virtirq;
|
return virtirq;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* CONFIG_PCI */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get the next pending IRQ.
|
* Get the next pending IRQ.
|
||||||
*/
|
*/
|
||||||
|
@ -344,6 +348,7 @@ int iSeries_get_irq(struct pt_regs *regs)
|
||||||
if (hvlpevent_is_pending())
|
if (hvlpevent_is_pending())
|
||||||
process_hvlpevents(regs);
|
process_hvlpevents(regs);
|
||||||
|
|
||||||
|
#ifdef CONFIG_PCI
|
||||||
if (num_pending_irqs) {
|
if (num_pending_irqs) {
|
||||||
spin_lock(&pending_irqs_lock);
|
spin_lock(&pending_irqs_lock);
|
||||||
for (irq = 0; irq < NR_IRQS; irq++) {
|
for (irq = 0; irq < NR_IRQS; irq++) {
|
||||||
|
@ -357,6 +362,7 @@ int iSeries_get_irq(struct pt_regs *regs)
|
||||||
if (irq >= NR_IRQS)
|
if (irq >= NR_IRQS)
|
||||||
irq = -2;
|
irq = -2;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return irq;
|
return irq;
|
||||||
}
|
}
|
||||||
|
|
|
@ -534,7 +534,7 @@ static ssize_t write_kmem(struct file * file, const char __user * buf,
|
||||||
return virtr + wrote;
|
return virtr + wrote;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (defined(CONFIG_ISA) || !defined(__mc68000__)) && (!defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI))
|
#if defined(CONFIG_ISA) || !defined(__mc68000__)
|
||||||
static ssize_t read_port(struct file * file, char __user * buf,
|
static ssize_t read_port(struct file * file, char __user * buf,
|
||||||
size_t count, loff_t *ppos)
|
size_t count, loff_t *ppos)
|
||||||
{
|
{
|
||||||
|
@ -795,7 +795,7 @@ static struct file_operations null_fops = {
|
||||||
.write = write_null,
|
.write = write_null,
|
||||||
};
|
};
|
||||||
|
|
||||||
#if (defined(CONFIG_ISA) || !defined(__mc68000__)) && (!defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI))
|
#if defined(CONFIG_ISA) || !defined(__mc68000__)
|
||||||
static struct file_operations port_fops = {
|
static struct file_operations port_fops = {
|
||||||
.llseek = memory_lseek,
|
.llseek = memory_lseek,
|
||||||
.read = read_port,
|
.read = read_port,
|
||||||
|
@ -865,7 +865,7 @@ static int memory_open(struct inode * inode, struct file * filp)
|
||||||
case 3:
|
case 3:
|
||||||
filp->f_op = &null_fops;
|
filp->f_op = &null_fops;
|
||||||
break;
|
break;
|
||||||
#if (defined(CONFIG_ISA) || !defined(__mc68000__)) && (!defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI))
|
#if defined(CONFIG_ISA) || !defined(__mc68000__)
|
||||||
case 4:
|
case 4:
|
||||||
filp->f_op = &port_fops;
|
filp->f_op = &port_fops;
|
||||||
break;
|
break;
|
||||||
|
@ -912,7 +912,7 @@ static const struct {
|
||||||
{1, "mem", S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops},
|
{1, "mem", S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops},
|
||||||
{2, "kmem", S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops},
|
{2, "kmem", S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops},
|
||||||
{3, "null", S_IRUGO | S_IWUGO, &null_fops},
|
{3, "null", S_IRUGO | S_IWUGO, &null_fops},
|
||||||
#if (defined(CONFIG_ISA) || !defined(__mc68000__)) && (!defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI))
|
#if defined(CONFIG_ISA) || !defined(__mc68000__)
|
||||||
{4, "port", S_IRUSR | S_IWUSR | S_IRGRP, &port_fops},
|
{4, "port", S_IRUSR | S_IWUSR | S_IRGRP, &port_fops},
|
||||||
#endif
|
#endif
|
||||||
{5, "zero", S_IRUGO | S_IWUGO, &zero_fops},
|
{5, "zero", S_IRUGO | S_IWUGO, &zero_fops},
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
* End Change Activity
|
* End Change Activity
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef CONFIG_PCI
|
||||||
extern u8 iSeries_Read_Byte(const volatile void __iomem * IoAddress);
|
extern u8 iSeries_Read_Byte(const volatile void __iomem * IoAddress);
|
||||||
extern u16 iSeries_Read_Word(const volatile void __iomem * IoAddress);
|
extern u16 iSeries_Read_Word(const volatile void __iomem * IoAddress);
|
||||||
extern u32 iSeries_Read_Long(const volatile void __iomem * IoAddress);
|
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,
|
||||||
size_t n);
|
size_t n);
|
||||||
extern void iSeries_memcpy_fromio(void *dest,
|
extern void iSeries_memcpy_fromio(void *dest,
|
||||||
const volatile void __iomem *source, size_t n);
|
const volatile void __iomem *source, size_t n);
|
||||||
|
#else
|
||||||
|
static inline u8 iSeries_Read_Byte(const volatile void __iomem *IoAddress)
|
||||||
|
{
|
||||||
|
return 0xff;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void iSeries_Write_Byte(u8 IoData,
|
||||||
|
volatile void __iomem *IoAddress)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_PCI */
|
||||||
|
|
||||||
#endif /* CONFIG_PPC_ISERIES */
|
#endif /* CONFIG_PPC_ISERIES */
|
||||||
#endif /* _ASM_POWERPC_ISERIES_ISERIES_IO_H */
|
#endif /* _ASM_POWERPC_ISERIES_ISERIES_IO_H */
|
||||||
|
|
Loading…
Add table
Reference in a new issue