* [PATCH 10/14] PM / MIPS: Use struct syscore_ops instead of sysdevs for PM
From: Rafael J. Wysocki @ 2011-04-17 21:12 UTC (permalink / raw)
To: LKML
Cc: Kevin Hilman, Guan Xuetao, Russell King, Konrad Rzeszutek Wilk,
Greg KH, Ralf Baechle, Jeremy Fitzhardinge, Ben Dooks,
Jiri Kosina, Kay Sievers, Mike Frysinger, Linux PM mailing list,
linux-omap, linuxppc-dev, Hans-Christian Egtvedt,
linux-arm-kernel
In-Reply-To: <201104172301.54115.rjw@sisk.pl>
From: Rafael J. Wysocki <rjw@sisk.pl>
Convert some MIPS architecture's code to using struct syscore_ops
objects for power management instead of sysdev classes and sysdevs.
This simplifies the code and reduces the kernel's memory footprint.
It also is necessary for removing sysdevs from the kernel entirely in
the future.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
arch/mips/alchemy/common/dbdma.c | 92 +++++++++++----------------------------
arch/mips/alchemy/common/irq.c | 62 +++++++++-----------------
arch/mips/jz4740/gpio.c | 52 +++++++++-------------
arch/mips/kernel/i8259.c | 26 +++--------
4 files changed, 80 insertions(+), 152 deletions(-)
Index: linux-2.6/arch/mips/alchemy/common/irq.c
===================================================================
--- linux-2.6.orig/arch/mips/alchemy/common/irq.c
+++ linux-2.6/arch/mips/alchemy/common/irq.c
@@ -30,7 +30,7 @@
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/slab.h>
-#include <linux/sysdev.h>
+#include <linux/syscore_ops.h>
#include <asm/irq_cpu.h>
#include <asm/mipsregs.h>
@@ -556,17 +556,15 @@ void __init arch_init_irq(void)
}
}
-struct alchemy_ic_sysdev {
- struct sys_device sysdev;
+struct alchemy_ic {
void __iomem *base;
unsigned long pmdata[7];
};
-static int alchemy_ic_suspend(struct sys_device *dev, pm_message_t state)
-{
- struct alchemy_ic_sysdev *icdev =
- container_of(dev, struct alchemy_ic_sysdev, sysdev);
+static struct alchemy_ic alchemy_ic_data[2];
+static void alchemy_suspend_one_ic(struct alchemy_ic *icdev)
+{
icdev->pmdata[0] = __raw_readl(icdev->base + IC_CFG0RD);
icdev->pmdata[1] = __raw_readl(icdev->base + IC_CFG1RD);
icdev->pmdata[2] = __raw_readl(icdev->base + IC_CFG2RD);
@@ -574,15 +572,17 @@ static int alchemy_ic_suspend(struct sys
icdev->pmdata[4] = __raw_readl(icdev->base + IC_ASSIGNRD);
icdev->pmdata[5] = __raw_readl(icdev->base + IC_WAKERD);
icdev->pmdata[6] = __raw_readl(icdev->base + IC_MASKRD);
+}
+static int alchemy_ic_suspend(void)
+{
+ alchemy_suspend_one_ic(alchemy_ic_data);
+ alchemy_suspend_one_ic(alchemy_ic_data + 1);
return 0;
}
-static int alchemy_ic_resume(struct sys_device *dev)
+static void alchemy_resume_one_ic(struct alchemy_ic *icdev)
{
- struct alchemy_ic_sysdev *icdev =
- container_of(dev, struct alchemy_ic_sysdev, sysdev);
-
__raw_writel(0xffffffff, icdev->base + IC_MASKCLR);
__raw_writel(0xffffffff, icdev->base + IC_CFG0CLR);
__raw_writel(0xffffffff, icdev->base + IC_CFG1CLR);
@@ -604,42 +604,26 @@ static int alchemy_ic_resume(struct sys_
__raw_writel(icdev->pmdata[6], icdev->base + IC_MASKSET);
wmb();
+}
- return 0;
+static void alchemy_ic_resume(void)
+{
+ alchemy_resume_one_ic(alchemy_ic_data + 1);
+ alchemy_resume_one_ic(alchemy_ic_data);
}
-static struct sysdev_class alchemy_ic_sysdev_class = {
- .name = "ic",
+static struct syscore_ops alchemy_ic_syscore_ops = {
.suspend = alchemy_ic_suspend,
.resume = alchemy_ic_resume,
};
-static int __init alchemy_ic_sysdev_init(void)
+static int __init alchemy_ic_syscore_init(void)
{
- struct alchemy_ic_sysdev *icdev;
- unsigned long icbase[2] = { IC0_PHYS_ADDR, IC1_PHYS_ADDR };
- int err, i;
-
- err = sysdev_class_register(&alchemy_ic_sysdev_class);
- if (err)
- return err;
-
- for (i = 0; i < 2; i++) {
- icdev = kzalloc(sizeof(struct alchemy_ic_sysdev), GFP_KERNEL);
- if (!icdev)
- return -ENOMEM;
-
- icdev->base = ioremap(icbase[i], 0x1000);
-
- icdev->sysdev.id = i;
- icdev->sysdev.cls = &alchemy_ic_sysdev_class;
- err = sysdev_register(&icdev->sysdev);
- if (err) {
- kfree(icdev);
- return err;
- }
- }
+ alchemy_ic_data[0].base = ioremap(icbase[IC0_PHYS_ADDR], 0x1000);
+ alchemy_ic_data[1].base = ioremap(icbase[IC1_PHYS_ADDR], 0x1000);
+
+ register_syscore_ops(&alchemy_ic_syscore_ops);
return 0;
}
-device_initcall(alchemy_ic_sysdev_init);
+device_initcall(alchemy_ic_syscore_init);
Index: linux-2.6/arch/mips/alchemy/common/dbdma.c
===================================================================
--- linux-2.6.orig/arch/mips/alchemy/common/dbdma.c
+++ linux-2.6/arch/mips/alchemy/common/dbdma.c
@@ -36,7 +36,7 @@
#include <linux/spinlock.h>
#include <linux/interrupt.h>
#include <linux/module.h>
-#include <linux/sysdev.h>
+#include <linux/syscore_ops.h>
#include <asm/mach-au1x00/au1000.h>
#include <asm/mach-au1x00/au1xxx_dbdma.h>
@@ -957,37 +957,30 @@ u32 au1xxx_dbdma_put_dscr(u32 chanid, au
return nbytes;
}
+static u32 alchemy_dbdma_pm_regs[NUM_DBDMA_CHANS + 1][6];
-struct alchemy_dbdma_sysdev {
- struct sys_device sysdev;
- u32 pm_regs[NUM_DBDMA_CHANS + 1][6];
-};
-
-static int alchemy_dbdma_suspend(struct sys_device *dev,
- pm_message_t state)
+static int alchemy_dbdma_suspend(void)
{
- struct alchemy_dbdma_sysdev *sdev =
- container_of(dev, struct alchemy_dbdma_sysdev, sysdev);
int i;
u32 addr;
addr = DDMA_GLOBAL_BASE;
- sdev->pm_regs[0][0] = au_readl(addr + 0x00);
- sdev->pm_regs[0][1] = au_readl(addr + 0x04);
- sdev->pm_regs[0][2] = au_readl(addr + 0x08);
- sdev->pm_regs[0][3] = au_readl(addr + 0x0c);
+ alchemy_dbdma_pm_regs[0][0] = au_readl(addr + 0x00);
+ alchemy_dbdma_pm_regs[0][1] = au_readl(addr + 0x04);
+ alchemy_dbdma_pm_regs[0][2] = au_readl(addr + 0x08);
+ alchemy_dbdma_pm_regs[0][3] = au_readl(addr + 0x0c);
/* save channel configurations */
for (i = 1, addr = DDMA_CHANNEL_BASE; i <= NUM_DBDMA_CHANS; i++) {
- sdev->pm_regs[i][0] = au_readl(addr + 0x00);
- sdev->pm_regs[i][1] = au_readl(addr + 0x04);
- sdev->pm_regs[i][2] = au_readl(addr + 0x08);
- sdev->pm_regs[i][3] = au_readl(addr + 0x0c);
- sdev->pm_regs[i][4] = au_readl(addr + 0x10);
- sdev->pm_regs[i][5] = au_readl(addr + 0x14);
+ alchemy_dbdma_pm_regs[i][0] = au_readl(addr + 0x00);
+ alchemy_dbdma_pm_regs[i][1] = au_readl(addr + 0x04);
+ alchemy_dbdma_pm_regs[i][2] = au_readl(addr + 0x08);
+ alchemy_dbdma_pm_regs[i][3] = au_readl(addr + 0x0c);
+ alchemy_dbdma_pm_regs[i][4] = au_readl(addr + 0x10);
+ alchemy_dbdma_pm_regs[i][5] = au_readl(addr + 0x14);
/* halt channel */
- au_writel(sdev->pm_regs[i][0] & ~1, addr + 0x00);
+ au_writel(alchemy_dbdma_pm_regs[i][0] & ~1, addr + 0x00);
au_sync();
while (!(au_readl(addr + 0x14) & 1))
au_sync();
@@ -1001,62 +994,35 @@ static int alchemy_dbdma_suspend(struct
return 0;
}
-static int alchemy_dbdma_resume(struct sys_device *dev)
+static void alchemy_dbdma_resume(void)
{
- struct alchemy_dbdma_sysdev *sdev =
- container_of(dev, struct alchemy_dbdma_sysdev, sysdev);
int i;
u32 addr;
addr = DDMA_GLOBAL_BASE;
- au_writel(sdev->pm_regs[0][0], addr + 0x00);
- au_writel(sdev->pm_regs[0][1], addr + 0x04);
- au_writel(sdev->pm_regs[0][2], addr + 0x08);
- au_writel(sdev->pm_regs[0][3], addr + 0x0c);
+ au_writel(alchemy_dbdma_pm_regs[0][0], addr + 0x00);
+ au_writel(alchemy_dbdma_pm_regs[0][1], addr + 0x04);
+ au_writel(alchemy_dbdma_pm_regs[0][2], addr + 0x08);
+ au_writel(alchemy_dbdma_pm_regs[0][3], addr + 0x0c);
/* restore channel configurations */
for (i = 1, addr = DDMA_CHANNEL_BASE; i <= NUM_DBDMA_CHANS; i++) {
- au_writel(sdev->pm_regs[i][0], addr + 0x00);
- au_writel(sdev->pm_regs[i][1], addr + 0x04);
- au_writel(sdev->pm_regs[i][2], addr + 0x08);
- au_writel(sdev->pm_regs[i][3], addr + 0x0c);
- au_writel(sdev->pm_regs[i][4], addr + 0x10);
- au_writel(sdev->pm_regs[i][5], addr + 0x14);
+ au_writel(alchemy_dbdma_pm_regs[i][0], addr + 0x00);
+ au_writel(alchemy_dbdma_pm_regs[i][1], addr + 0x04);
+ au_writel(alchemy_dbdma_pm_regs[i][2], addr + 0x08);
+ au_writel(alchemy_dbdma_pm_regs[i][3], addr + 0x0c);
+ au_writel(alchemy_dbdma_pm_regs[i][4], addr + 0x10);
+ au_writel(alchemy_dbdma_pm_regs[i][5], addr + 0x14);
au_sync();
addr += 0x100; /* next channel base */
}
-
- return 0;
}
-static struct sysdev_class alchemy_dbdma_sysdev_class = {
- .name = "dbdma",
+static struct syscore_ops alchemy_dbdma_syscore_ops = {
.suspend = alchemy_dbdma_suspend,
.resume = alchemy_dbdma_resume,
};
-static int __init alchemy_dbdma_sysdev_init(void)
-{
- struct alchemy_dbdma_sysdev *sdev;
- int ret;
-
- ret = sysdev_class_register(&alchemy_dbdma_sysdev_class);
- if (ret)
- return ret;
-
- sdev = kzalloc(sizeof(struct alchemy_dbdma_sysdev), GFP_KERNEL);
- if (!sdev)
- return -ENOMEM;
-
- sdev->sysdev.id = -1;
- sdev->sysdev.cls = &alchemy_dbdma_sysdev_class;
- ret = sysdev_register(&sdev->sysdev);
- if (ret)
- kfree(sdev);
-
- return ret;
-}
-
static int __init au1xxx_dbdma_init(void)
{
int irq_nr, ret;
@@ -1084,11 +1050,7 @@ static int __init au1xxx_dbdma_init(void
else {
dbdma_initialized = 1;
printk(KERN_INFO "Alchemy DBDMA initialized\n");
- ret = alchemy_dbdma_sysdev_init();
- if (ret) {
- printk(KERN_ERR "DBDMA PM init failed\n");
- ret = 0;
- }
+ register_syscore_ops(&alchemy_dbdma_syscore_ops);
}
return ret;
Index: linux-2.6/arch/mips/jz4740/gpio.c
===================================================================
--- linux-2.6.orig/arch/mips/jz4740/gpio.c
+++ linux-2.6/arch/mips/jz4740/gpio.c
@@ -18,7 +18,7 @@
#include <linux/init.h>
#include <linux/spinlock.h>
-#include <linux/sysdev.h>
+#include <linux/syscore_ops.h>
#include <linux/io.h>
#include <linux/gpio.h>
#include <linux/delay.h>
@@ -86,7 +86,6 @@ struct jz_gpio_chip {
spinlock_t lock;
struct gpio_chip gpio_chip;
- struct sys_device sysdev;
};
static struct jz_gpio_chip jz4740_gpio_chips[];
@@ -459,49 +458,47 @@ static struct jz_gpio_chip jz4740_gpio_c
JZ4740_GPIO_CHIP(D),
};
-static inline struct jz_gpio_chip *sysdev_to_chip(struct sys_device *dev)
+static void jz4740_gpio_suspend_chip(struct jz_gpio_chip *chip)
{
- return container_of(dev, struct jz_gpio_chip, sysdev);
+ chip->suspend_mask = readl(chip->base + JZ_REG_GPIO_MASK);
+ writel(~(chip->wakeup), chip->base + JZ_REG_GPIO_MASK_SET);
+ writel(chip->wakeup, chip->base + JZ_REG_GPIO_MASK_CLEAR);
}
-static int jz4740_gpio_suspend(struct sys_device *dev, pm_message_t state)
+static int jz4740_gpio_suspend(void)
{
- struct jz_gpio_chip *chip = sysdev_to_chip(dev);
+ int i;
- chip->suspend_mask = readl(chip->base + JZ_REG_GPIO_MASK);
- writel(~(chip->wakeup), chip->base + JZ_REG_GPIO_MASK_SET);
- writel(chip->wakeup, chip->base + JZ_REG_GPIO_MASK_CLEAR);
+ for (i = 0; i < ARRAY_SIZE(jz4740_gpio_chips); i++)
+ jz4740_gpio_suspend_chip(&jz4740_gpio_chips[i]);
return 0;
}
-static int jz4740_gpio_resume(struct sys_device *dev)
+static void jz4740_gpio_resume_chip(struct jz_gpio_chip *chip)
{
- struct jz_gpio_chip *chip = sysdev_to_chip(dev);
uint32_t mask = chip->suspend_mask;
writel(~mask, chip->base + JZ_REG_GPIO_MASK_CLEAR);
writel(mask, chip->base + JZ_REG_GPIO_MASK_SET);
+}
- return 0;
+static void jz4740_gpio_resume(void)
+{
+ int i;
+
+ for (i = ARRAY_SIZE(jz4740_gpio_chips) - 1; i >= 0 ; i--)
+ jz4740_gpio_resume_chip(&jz4740_gpio_chips[i]);
}
-static struct sysdev_class jz4740_gpio_sysdev_class = {
- .name = "gpio",
+static struct syscore_ops jz4740_gpio_syscore_ops = {
.suspend = jz4740_gpio_suspend,
.resume = jz4740_gpio_resume,
};
-static int jz4740_gpio_chip_init(struct jz_gpio_chip *chip, unsigned int id)
+static void jz4740_gpio_chip_init(struct jz_gpio_chip *chip, unsigned int id)
{
- int ret, irq;
-
- chip->sysdev.id = id;
- chip->sysdev.cls = &jz4740_gpio_sysdev_class;
- ret = sysdev_register(&chip->sysdev);
-
- if (ret)
- return ret;
+ int irq;
spin_lock_init(&chip->lock);
@@ -519,22 +516,17 @@ static int jz4740_gpio_chip_init(struct
irq_set_chip_and_handler(irq, &jz_gpio_irq_chip,
handle_level_irq);
}
-
- return 0;
}
static int __init jz4740_gpio_init(void)
{
unsigned int i;
- int ret;
-
- ret = sysdev_class_register(&jz4740_gpio_sysdev_class);
- if (ret)
- return ret;
for (i = 0; i < ARRAY_SIZE(jz4740_gpio_chips); ++i)
jz4740_gpio_chip_init(&jz4740_gpio_chips[i], i);
+ register_syscore_ops(&jz4740_gpio_syscore_ops);
+
printk(KERN_INFO "JZ4740 GPIO initialized\n");
return 0;
Index: linux-2.6/arch/mips/kernel/i8259.c
===================================================================
--- linux-2.6.orig/arch/mips/kernel/i8259.c
+++ linux-2.6/arch/mips/kernel/i8259.c
@@ -14,7 +14,7 @@
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/spinlock.h>
-#include <linux/sysdev.h>
+#include <linux/syscore_ops.h>
#include <linux/irq.h>
#include <asm/i8259.h>
@@ -215,14 +215,13 @@ spurious_8259A_irq:
}
}
-static int i8259A_resume(struct sys_device *dev)
+static void i8259A_resume(void)
{
if (i8259A_auto_eoi >= 0)
init_8259A(i8259A_auto_eoi);
- return 0;
}
-static int i8259A_shutdown(struct sys_device *dev)
+static void i8259A_shutdown(void)
{
/* Put the i8259A into a quiescent state that
* the kernel initialization code can get it
@@ -232,29 +231,20 @@ static int i8259A_shutdown(struct sys_de
outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */
outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-1 */
}
- return 0;
}
-static struct sysdev_class i8259_sysdev_class = {
- .name = "i8259",
+static struct syscore_ops i8259_syscore_ops = {
.resume = i8259A_resume,
.shutdown = i8259A_shutdown,
};
-static struct sys_device device_i8259A = {
- .id = 0,
- .cls = &i8259_sysdev_class,
-};
-
-static int __init i8259A_init_sysfs(void)
+static int __init i8259A_init_syscore(void)
{
- int error = sysdev_class_register(&i8259_sysdev_class);
- if (!error)
- error = sysdev_register(&device_i8259A);
- return error;
+ register_syscore_ops(&i8259_syscore_ops);
+ return 0;
}
-device_initcall(i8259A_init_sysfs);
+device_initcall(i8259A_init_syscore);
static void init_8259A(int auto_eoi)
{
^ permalink raw reply
* [PATCH 3/14] ARM: Use struct syscore_ops instead of sysdevs for PM in common code
From: Rafael J. Wysocki @ 2011-04-17 21:07 UTC (permalink / raw)
To: LKML
Cc: Kevin Hilman, Guan Xuetao, Russell King, Konrad Rzeszutek Wilk,
Greg KH, Ralf Baechle, Jeremy Fitzhardinge, Ben Dooks,
Jiri Kosina, Kay Sievers, Mike Frysinger, Linux PM mailing list,
linux-omap, linuxppc-dev, Hans-Christian Egtvedt,
linux-arm-kernel
In-Reply-To: <201104172301.54115.rjw@sisk.pl>
From: Rafael J. Wysocki <rjw@sisk.pl>
Convert some ARM architecture's common code to using
struct syscore_ops objects for power management instead of sysdev
classes and sysdevs.
This simplifies the code and reduces the kernel's memory footprint.
It also is necessary for removing sysdevs from the kernel entirely in
the future.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
arch/arm/common/vic.c | 69 ++++++++++++++-------------------------
arch/arm/include/asm/mach/time.h | 1
arch/arm/kernel/leds.c | 28 +++++++++------
arch/arm/kernel/time.c | 35 ++++++-------------
arch/arm/vfp/vfpmodule.c | 19 ++--------
5 files changed, 58 insertions(+), 94 deletions(-)
Index: linux-2.6/arch/arm/kernel/time.c
===================================================================
--- linux-2.6.orig/arch/arm/kernel/time.c
+++ linux-2.6/arch/arm/kernel/time.c
@@ -21,7 +21,7 @@
#include <linux/timex.h>
#include <linux/errno.h>
#include <linux/profile.h>
-#include <linux/sysdev.h>
+#include <linux/syscore_ops.h>
#include <linux/timer.h>
#include <linux/irq.h>
@@ -115,48 +115,37 @@ void timer_tick(void)
#endif
#if defined(CONFIG_PM) && !defined(CONFIG_GENERIC_CLOCKEVENTS)
-static int timer_suspend(struct sys_device *dev, pm_message_t state)
+static int timer_suspend(void)
{
- struct sys_timer *timer = container_of(dev, struct sys_timer, dev);
-
- if (timer->suspend != NULL)
- timer->suspend();
+ if (system_timer->suspend)
+ system_timer->suspend();
return 0;
}
-static int timer_resume(struct sys_device *dev)
+static void timer_resume(void)
{
- struct sys_timer *timer = container_of(dev, struct sys_timer, dev);
-
- if (timer->resume != NULL)
- timer->resume();
-
- return 0;
+ if (system_timer->resume)
+ system_timer->resume();
}
#else
#define timer_suspend NULL
#define timer_resume NULL
#endif
-static struct sysdev_class timer_sysclass = {
- .name = "timer",
+static struct syscore_ops timer_syscore_ops = {
.suspend = timer_suspend,
.resume = timer_resume,
};
-static int __init timer_init_sysfs(void)
+static int __init timer_init_syscore_ops(void)
{
- int ret = sysdev_class_register(&timer_sysclass);
- if (ret == 0) {
- system_timer->dev.cls = &timer_sysclass;
- ret = sysdev_register(&system_timer->dev);
- }
+ register_syscore_ops(&timer_syscore_ops);
- return ret;
+ return 0;
}
-device_initcall(timer_init_sysfs);
+device_initcall(timer_init_syscore_ops);
void __init time_init(void)
{
Index: linux-2.6/arch/arm/include/asm/mach/time.h
===================================================================
--- linux-2.6.orig/arch/arm/include/asm/mach/time.h
+++ linux-2.6/arch/arm/include/asm/mach/time.h
@@ -34,7 +34,6 @@
* timer interrupt which may be pending.
*/
struct sys_timer {
- struct sys_device dev;
void (*init)(void);
void (*suspend)(void);
void (*resume)(void);
Index: linux-2.6/arch/arm/kernel/leds.c
===================================================================
--- linux-2.6.orig/arch/arm/kernel/leds.c
+++ linux-2.6/arch/arm/kernel/leds.c
@@ -10,6 +10,7 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/sysdev.h>
+#include <linux/syscore_ops.h>
#include <asm/leds.h>
@@ -69,36 +70,37 @@ static ssize_t leds_store(struct sys_dev
static SYSDEV_ATTR(event, 0200, NULL, leds_store);
-static int leds_suspend(struct sys_device *dev, pm_message_t state)
+static struct sysdev_class leds_sysclass = {
+ .name = "leds",
+};
+
+static struct sys_device leds_device = {
+ .id = 0,
+ .cls = &leds_sysclass,
+};
+
+static int leds_suspend(void)
{
leds_event(led_stop);
return 0;
}
-static int leds_resume(struct sys_device *dev)
+static void leds_resume(void)
{
leds_event(led_start);
- return 0;
}
-static int leds_shutdown(struct sys_device *dev)
+static void leds_shutdown(void)
{
leds_event(led_halted);
- return 0;
}
-static struct sysdev_class leds_sysclass = {
- .name = "leds",
+static struct syscore_ops leds_syscore_ops = {
.shutdown = leds_shutdown,
.suspend = leds_suspend,
.resume = leds_resume,
};
-static struct sys_device leds_device = {
- .id = 0,
- .cls = &leds_sysclass,
-};
-
static int __init leds_init(void)
{
int ret;
@@ -107,6 +109,8 @@ static int __init leds_init(void)
ret = sysdev_register(&leds_device);
if (ret == 0)
ret = sysdev_create_file(&leds_device, &attr_event);
+ if (ret == 0)
+ register_syscore_ops(&leds_syscore_ops);
return ret;
}
Index: linux-2.6/arch/arm/common/vic.c
===================================================================
--- linux-2.6.orig/arch/arm/common/vic.c
+++ linux-2.6/arch/arm/common/vic.c
@@ -22,17 +22,16 @@
#include <linux/init.h>
#include <linux/list.h>
#include <linux/io.h>
-#include <linux/sysdev.h>
+#include <linux/syscore_ops.h>
#include <linux/device.h>
#include <linux/amba/bus.h>
#include <asm/mach/irq.h>
#include <asm/hardware/vic.h>
-#if defined(CONFIG_PM)
+#ifdef CONFIG_PM
/**
* struct vic_device - VIC PM device
- * @sysdev: The system device which is registered.
* @irq: The IRQ number for the base of the VIC.
* @base: The register base for the VIC.
* @resume_sources: A bitmask of interrupts for resume.
@@ -43,8 +42,6 @@
* @protect: Save for VIC_PROTECT.
*/
struct vic_device {
- struct sys_device sysdev;
-
void __iomem *base;
int irq;
u32 resume_sources;
@@ -59,11 +56,6 @@ struct vic_device {
static struct vic_device vic_devices[CONFIG_ARM_VIC_NR];
static int vic_id;
-
-static inline struct vic_device *to_vic(struct sys_device *sys)
-{
- return container_of(sys, struct vic_device, sysdev);
-}
#endif /* CONFIG_PM */
/**
@@ -85,10 +77,9 @@ static void vic_init2(void __iomem *base
writel(32, base + VIC_PL190_DEF_VECT_ADDR);
}
-#if defined(CONFIG_PM)
-static int vic_class_resume(struct sys_device *dev)
+#ifdef CONFIG_PM
+static void resume_one_vic(struct vic_device *vic)
{
- struct vic_device *vic = to_vic(dev);
void __iomem *base = vic->base;
printk(KERN_DEBUG "%s: resuming vic at %p\n", __func__, base);
@@ -107,13 +98,18 @@ static int vic_class_resume(struct sys_d
writel(vic->soft_int, base + VIC_INT_SOFT);
writel(~vic->soft_int, base + VIC_INT_SOFT_CLEAR);
+}
- return 0;
+static void vic_resume(void)
+{
+ int id;
+
+ for (id = vic_id - 1; id >= 0; id--)
+ resume_one_vic(vic_devices + id);
}
-static int vic_class_suspend(struct sys_device *dev, pm_message_t state)
+static void suspend_one_vic(struct vic_device *vic)
{
- struct vic_device *vic = to_vic(dev);
void __iomem *base = vic->base;
printk(KERN_DEBUG "%s: suspending vic at %p\n", __func__, base);
@@ -128,14 +124,21 @@ static int vic_class_suspend(struct sys_
writel(vic->resume_irqs, base + VIC_INT_ENABLE);
writel(~vic->resume_irqs, base + VIC_INT_ENABLE_CLEAR);
+}
+
+static int vic_suspend(void)
+{
+ int id;
+
+ for (id = 0; id < vic_id; id++)
+ suspend_one_vic(vic_devices + id);
return 0;
}
-struct sysdev_class vic_class = {
- .name = "vic",
- .suspend = vic_class_suspend,
- .resume = vic_class_resume,
+struct syscore_ops vic_syscore_ops = {
+ .suspend = vic_suspend,
+ .resume = vic_resume,
};
/**
@@ -147,30 +150,8 @@ struct sysdev_class vic_class = {
*/
static int __init vic_pm_init(void)
{
- struct vic_device *dev = vic_devices;
- int err;
- int id;
-
- if (vic_id == 0)
- return 0;
-
- err = sysdev_class_register(&vic_class);
- if (err) {
- printk(KERN_ERR "%s: cannot register class\n", __func__);
- return err;
- }
-
- for (id = 0; id < vic_id; id++, dev++) {
- dev->sysdev.id = id;
- dev->sysdev.cls = &vic_class;
-
- err = sysdev_register(&dev->sysdev);
- if (err) {
- printk(KERN_ERR "%s: failed to register device\n",
- __func__);
- return err;
- }
- }
+ if (vic_id > 0)
+ register_syscore_ops(&vic_syscore_ops);
return 0;
}
Index: linux-2.6/arch/arm/vfp/vfpmodule.c
===================================================================
--- linux-2.6.orig/arch/arm/vfp/vfpmodule.c
+++ linux-2.6/arch/arm/vfp/vfpmodule.c
@@ -398,9 +398,9 @@ static void vfp_enable(void *unused)
}
#ifdef CONFIG_PM
-#include <linux/sysdev.h>
+#include <linux/syscore_ops.h>
-static int vfp_pm_suspend(struct sys_device *dev, pm_message_t state)
+static int vfp_pm_suspend(void)
{
struct thread_info *ti = current_thread_info();
u32 fpexc = fmrx(FPEXC);
@@ -420,34 +420,25 @@ static int vfp_pm_suspend(struct sys_dev
return 0;
}
-static int vfp_pm_resume(struct sys_device *dev)
+static void vfp_pm_resume(void)
{
/* ensure we have access to the vfp */
vfp_enable(NULL);
/* and disable it to ensure the next usage restores the state */
fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN);
-
- return 0;
}
-static struct sysdev_class vfp_pm_sysclass = {
- .name = "vfp",
+static struct syscore_ops vfp_pm_syscore_ops = {
.suspend = vfp_pm_suspend,
.resume = vfp_pm_resume,
};
-static struct sys_device vfp_pm_sysdev = {
- .cls = &vfp_pm_sysclass,
-};
-
static void vfp_pm_init(void)
{
- sysdev_class_register(&vfp_pm_sysclass);
- sysdev_register(&vfp_pm_sysdev);
+ register_syscore_ops(&vfp_pm_syscore_ops);
}
-
#else
static inline void vfp_pm_init(void) { }
#endif /* CONFIG_PM */
^ permalink raw reply
* [PATCH 12/14] PM / UNICORE32: Use struct syscore_ops instead of sysdevs for PM
From: Rafael J. Wysocki @ 2011-04-17 21:13 UTC (permalink / raw)
To: LKML
Cc: Kevin Hilman, Guan Xuetao, Russell King, Konrad Rzeszutek Wilk,
Greg KH, Ralf Baechle, Jeremy Fitzhardinge, Ben Dooks,
Jiri Kosina, Kay Sievers, Mike Frysinger, Linux PM mailing list,
linux-omap, linuxppc-dev, Hans-Christian Egtvedt,
linux-arm-kernel
In-Reply-To: <201104172301.54115.rjw@sisk.pl>
From: Rafael J. Wysocki <rjw@sisk.pl>
Make some UNICORE32 architecture's code use struct syscore_ops
objects for power management instead of sysdev classes and sysdevs.
This simplifies the code and reduces the kernel's memory footprint.
It also is necessary for removing sysdevs from the kernel entirely in
the future.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
arch/unicore32/kernel/irq.c | 23 ++++++++---------------
1 file changed, 8 insertions(+), 15 deletions(-)
Index: linux-2.6/arch/unicore32/kernel/irq.c
===================================================================
--- linux-2.6.orig/arch/unicore32/kernel/irq.c
+++ linux-2.6/arch/unicore32/kernel/irq.c
@@ -23,7 +23,7 @@
#include <linux/list.h>
#include <linux/kallsyms.h>
#include <linux/proc_fs.h>
-#include <linux/sysdev.h>
+#include <linux/syscore_ops.h>
#include <linux/gpio.h>
#include <asm/system.h>
@@ -237,7 +237,7 @@ static struct puv3_irq_state {
unsigned int iccr;
} puv3_irq_state;
-static int puv3_irq_suspend(struct sys_device *dev, pm_message_t state)
+static int puv3_irq_suspend(void)
{
struct puv3_irq_state *st = &puv3_irq_state;
@@ -265,7 +265,7 @@ static int puv3_irq_suspend(struct sys_d
return 0;
}
-static int puv3_irq_resume(struct sys_device *dev)
+static void puv3_irq_resume(void)
{
struct puv3_irq_state *st = &puv3_irq_state;
@@ -278,27 +278,20 @@ static int puv3_irq_resume(struct sys_de
writel(st->icmr, INTC_ICMR);
}
- return 0;
}
-static struct sysdev_class puv3_irq_sysclass = {
- .name = "pkunity-irq",
+static struct syscore_ops puv3_irq_syscore_ops = {
.suspend = puv3_irq_suspend,
.resume = puv3_irq_resume,
};
-static struct sys_device puv3_irq_device = {
- .id = 0,
- .cls = &puv3_irq_sysclass,
-};
-
-static int __init puv3_irq_init_devicefs(void)
+static int __init puv3_irq_init_syscore(void)
{
- sysdev_class_register(&puv3_irq_sysclass);
- return sysdev_register(&puv3_irq_device);
+ register_syscore_ops(&puv3_irq_syscore_ops);
+ return 0;
}
-device_initcall(puv3_irq_init_devicefs);
+device_initcall(puv3_irq_init_syscore);
void __init init_IRQ(void)
{
^ permalink raw reply
* [PATCH 5/14] ARM / Integrator: Use struct syscore_ops for core PM
From: Rafael J. Wysocki @ 2011-04-17 21:09 UTC (permalink / raw)
To: LKML
Cc: Kevin Hilman, Guan Xuetao, Russell King, Konrad Rzeszutek Wilk,
Greg KH, Ralf Baechle, Jeremy Fitzhardinge, Ben Dooks,
Jiri Kosina, Kay Sievers, Mike Frysinger, Linux PM mailing list,
linux-omap, linuxppc-dev, Hans-Christian Egtvedt,
linux-arm-kernel
In-Reply-To: <201104172301.54115.rjw@sisk.pl>
From: Rafael J. Wysocki <rjw@sisk.pl>
Replace the sysdev class and struct sys_device used for power
management by the Integrator interrupt-handling code with a
struct syscore_ops object which is simpler.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
arch/arm/mach-integrator/integrator_ap.c | 26 +++++++++-----------------
1 file changed, 9 insertions(+), 17 deletions(-)
Index: linux-2.6/arch/arm/mach-integrator/integrator_ap.c
===================================================================
--- linux-2.6.orig/arch/arm/mach-integrator/integrator_ap.c
+++ linux-2.6/arch/arm/mach-integrator/integrator_ap.c
@@ -24,7 +24,7 @@
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/string.h>
-#include <linux/sysdev.h>
+#include <linux/syscore_ops.h>
#include <linux/amba/bus.h>
#include <linux/amba/kmi.h>
#include <linux/clocksource.h>
@@ -180,13 +180,13 @@ static void __init ap_init_irq(void)
#ifdef CONFIG_PM
static unsigned long ic_irq_enable;
-static int irq_suspend(struct sys_device *dev, pm_message_t state)
+static int irq_suspend(void)
{
ic_irq_enable = readl(VA_IC_BASE + IRQ_ENABLE);
return 0;
}
-static int irq_resume(struct sys_device *dev)
+static void irq_resume(void)
{
/* disable all irq sources */
writel(-1, VA_CMIC_BASE + IRQ_ENABLE_CLEAR);
@@ -194,33 +194,25 @@ static int irq_resume(struct sys_device
writel(-1, VA_IC_BASE + FIQ_ENABLE_CLEAR);
writel(ic_irq_enable, VA_IC_BASE + IRQ_ENABLE_SET);
- return 0;
}
#else
#define irq_suspend NULL
#define irq_resume NULL
#endif
-static struct sysdev_class irq_class = {
- .name = "irq",
+static struct syscore_ops irq_syscore_ops = {
.suspend = irq_suspend,
.resume = irq_resume,
};
-static struct sys_device irq_device = {
- .id = 0,
- .cls = &irq_class,
-};
-
-static int __init irq_init_sysfs(void)
+static int __init irq_syscore_init(void)
{
- int ret = sysdev_class_register(&irq_class);
- if (ret == 0)
- ret = sysdev_register(&irq_device);
- return ret;
+ register_syscore_ops(&irq_syscore_ops);
+
+ return 0;
}
-device_initcall(irq_init_sysfs);
+device_initcall(irq_syscore_init);
/*
* Flash handling.
^ permalink raw reply
* [PATCH 6/14] ARM / SA1100: Use struct syscore_ops for "core" power management
From: Rafael J. Wysocki @ 2011-04-17 21:10 UTC (permalink / raw)
To: LKML
Cc: Kevin Hilman, Guan Xuetao, Russell King, Konrad Rzeszutek Wilk,
Greg KH, Ralf Baechle, Jeremy Fitzhardinge, Ben Dooks,
Jiri Kosina, Kay Sievers, Mike Frysinger, Linux PM mailing list,
linux-omap, linuxppc-dev, Hans-Christian Egtvedt,
linux-arm-kernel
In-Reply-To: <201104172301.54115.rjw@sisk.pl>
From: Rafael J. Wysocki <rjw@sisk.pl>
Replace the sysdev class and struct sys_device used for power
management by the SA1100 interrupt-handling code with a
struct syscore_ops object which is simpler.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
arch/arm/mach-sa1100/irq.c | 19 ++++++-------------
1 file changed, 6 insertions(+), 13 deletions(-)
Index: linux-2.6/arch/arm/mach-sa1100/irq.c
===================================================================
--- linux-2.6.orig/arch/arm/mach-sa1100/irq.c
+++ linux-2.6/arch/arm/mach-sa1100/irq.c
@@ -14,7 +14,7 @@
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/ioport.h>
-#include <linux/sysdev.h>
+#include <linux/syscore_ops.h>
#include <mach/hardware.h>
#include <asm/mach/irq.h>
@@ -234,7 +234,7 @@ static struct sa1100irq_state {
unsigned int iccr;
} sa1100irq_state;
-static int sa1100irq_suspend(struct sys_device *dev, pm_message_t state)
+static int sa1100irq_suspend(void)
{
struct sa1100irq_state *st = &sa1100irq_state;
@@ -264,7 +264,7 @@ static int sa1100irq_suspend(struct sys_
return 0;
}
-static int sa1100irq_resume(struct sys_device *dev)
+static void sa1100irq_resume(void)
{
struct sa1100irq_state *st = &sa1100irq_state;
@@ -277,24 +277,17 @@ static int sa1100irq_resume(struct sys_d
ICMR = st->icmr;
}
- return 0;
}
-static struct sysdev_class sa1100irq_sysclass = {
- .name = "sa11x0-irq",
+static struct syscore_ops sa1100irq_syscore_ops = {
.suspend = sa1100irq_suspend,
.resume = sa1100irq_resume,
};
-static struct sys_device sa1100irq_device = {
- .id = 0,
- .cls = &sa1100irq_sysclass,
-};
-
static int __init sa1100irq_init_devicefs(void)
{
- sysdev_class_register(&sa1100irq_sysclass);
- return sysdev_register(&sa1100irq_device);
+ register_syscore_ops(&sa1100irq_syscore_ops);
+ return 0;
}
device_initcall(sa1100irq_init_devicefs);
^ permalink raw reply
* Re: [regression] 2.6.39-rc[1-3] fail to boot on G5 PowerMac
From: Hugh Dickins @ 2011-04-17 17:47 UTC (permalink / raw)
To: Jens Axboe
Cc: Mikael Pettersson, linux-kernel@vger.kernel.org, kevin diggs,
linuxppc-dev@lists.ozlabs.org
In-Reply-To: <4DAA9001.6050203@fusionio.com>
On Sun, Apr 17, 2011 at 12:00 AM, Jens Axboe <jaxboe@fusionio.com> wrote:
> On 2011-04-17 05:16, Hugh Dickins wrote:
>> On Thu, Apr 14, 2011 at 2:54 PM, Benjamin Herrenschmidt
>> <benh@kernel.crashing.org> wrote:
>>> On Thu, 2011-04-14 at 14:25 -0700, Hugh Dickins wrote:
>>>>
>>>> Something worth trying: turn off CONFIG_IDE. =C2=A0That's what I need =
to
>>>> boot 2.6.39-rc[1-3] on PowerPC G5.
>>>>
>>>> I know Jens has been fixing problems with IDE versus his plug/unplug
>>>> changes, but it's still not fixed for me in rc3.
>>>>
>>>> In other mail http://lkml.org/lkml/2011/4/14/614
>>>> I see Linus recommending his post-rc3 commit 6631e635c65d
>>>> but I've not tried that myself yet.
>>>
>>> Well, the disk is SATA so it's CONFIG_ATA/libata, which works fine here=
,
>>> unless you somewhat replaced your CD-ROM with a legacy IDE disk :-) Or
>>> maybe the problem is related to the CD-ROM drive. There's a libata
>>> driver for it nowadays, so you can use PATA_MACIO instead of IDE_PMAC
>>
>> Thanks for that, Ben: I remember you were brewing up such a driver,
>> but I missed when it actually went in. =C2=A0I can confirm that switchin=
g
>> off CONFIG_IDE and switching on CONFIG_PATA_MACIO and
>> CONFIG_BLK_DEV_SR now gives me a booting system with a working CD-ROM
>> (though I've not yet tried burning).
>>
>> Whereas CONFIG_IDE=3Dy with current git still does not boot: hangs for a
>> minute or three around the windfarm announcements, then an endless
>> splurge of hda error messages - sorry, I'm not being helpful, other
>> worries...
>
> It's the media event notification that goes crazy. Try and comment out
> this line:
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0drive->dev_flags |=3D IDE_DFLAG_MEDIA_CHANGED;
>
> in drivers/ide/ide-cd.c:cdrom_saw_media_change() and see if it boots.
Yes, that also boots, with a working CD-ROM: thanks.
Hugh
^ permalink raw reply
* Re: [regression] 2.6.39-rc[1-3] fail to boot on G5 PowerMac
From: Jens Axboe @ 2011-04-17 7:00 UTC (permalink / raw)
To: Hugh Dickins
Cc: Mikael Pettersson, linux-kernel@vger.kernel.org, kevin diggs,
linuxppc-dev@lists.ozlabs.org
In-Reply-To: <BANLkTimGLmQjCNFOy5z64Zg=R2FX--LF9A@mail.gmail.com>
On 2011-04-17 05:16, Hugh Dickins wrote:
> On Thu, Apr 14, 2011 at 2:54 PM, Benjamin Herrenschmidt
> <benh@kernel.crashing.org> wrote:
>> On Thu, 2011-04-14 at 14:25 -0700, Hugh Dickins wrote:
>>>
>>> Something worth trying: turn off CONFIG_IDE. That's what I need to
>>> boot 2.6.39-rc[1-3] on PowerPC G5.
>>>
>>> I know Jens has been fixing problems with IDE versus his plug/unplug
>>> changes, but it's still not fixed for me in rc3.
>>>
>>> In other mail http://lkml.org/lkml/2011/4/14/614
>>> I see Linus recommending his post-rc3 commit 6631e635c65d
>>> but I've not tried that myself yet.
>>
>> Well, the disk is SATA so it's CONFIG_ATA/libata, which works fine here,
>> unless you somewhat replaced your CD-ROM with a legacy IDE disk :-) Or
>> maybe the problem is related to the CD-ROM drive. There's a libata
>> driver for it nowadays, so you can use PATA_MACIO instead of IDE_PMAC
>
> Thanks for that, Ben: I remember you were brewing up such a driver,
> but I missed when it actually went in. I can confirm that switching
> off CONFIG_IDE and switching on CONFIG_PATA_MACIO and
> CONFIG_BLK_DEV_SR now gives me a booting system with a working CD-ROM
> (though I've not yet tried burning).
>
> Whereas CONFIG_IDE=y with current git still does not boot: hangs for a
> minute or three around the windfarm announcements, then an endless
> splurge of hda error messages - sorry, I'm not being helpful, other
> worries...
It's the media event notification that goes crazy. Try and comment out
this line:
drive->dev_flags |= IDE_DFLAG_MEDIA_CHANGED;
in drivers/ide/ide-cd.c:cdrom_saw_media_change() and see if it boots.
--
Jens Axboe
^ permalink raw reply
* Re: [PATCH 10/15] powerpc: Define slb0_limit() for BOOK3E
From: Olof Johansson @ 2011-04-17 5:58 UTC (permalink / raw)
To: Michael Ellerman
Cc: Jimi Xenidis, jack, kumar.gala, imunsie, linuxppc-dev,
David Gibson
In-Reply-To: <021a5af117537ce9f7c6c3b27310f15851ab5034.1302856271.git.michael@ellerman.id.au>
Hi,
On Fri, Apr 15, 2011 at 1:32 AM, Michael Ellerman <michael@ozlabs.org> wrot=
e:
> From: Michael Ellerman <michael@ellerman.id.au>
>
> On BOOK3E we don't have an SLB 0, but the equivalent concept is the
> bolted entry mapping the kernel. Currently this is a 1G entry, so
> for now hardcode that. This will probably need to be reworked in
> future.
A year from now when someone sees the ifdef, the above comment would
be nice to have in the code instead of running a git annotate/log to
find out why it's hardcoded the way it is. :)
-Olof
>
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
> ---
> =A0arch/powerpc/kernel/setup_64.c | =A0 =A04 ++++
> =A01 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_6=
4.c
> index 91a5cc5..3d0daf4 100644
> --- a/arch/powerpc/kernel/setup_64.c
> +++ b/arch/powerpc/kernel/setup_64.c
> @@ -436,10 +436,14 @@ void __init setup_system(void)
>
> =A0static u64 slb0_limit(void)
> =A0{
> +#ifdef CONFIG_PPC_BOOK3E
> + =A0 =A0 =A0 return 1 << 30;
> +#else
> =A0 =A0 =A0 =A0if (cpu_has_feature(CPU_FTR_1T_SEGMENT)) {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return 1UL << SID_SHIFT_1T;
> =A0 =A0 =A0 =A0}
> =A0 =A0 =A0 =A0return 1UL << SID_SHIFT;
> +#endif
> =A0}
>
> =A0static void __init irqstack_early_init(void)
> --
> 1.7.1
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>
^ permalink raw reply
* [Help] MPC8377 2.6.18 PCI-E doesn't work well
From: Ginger Xiao @ 2011-04-17 5:56 UTC (permalink / raw)
To: Linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 1805 bytes --]
Hi All
My board is MPC8377 with linux 2.6.18.
When using the PCI-E device PCE9901, there is one serial can't work.
The following is the message:
/myapp # insmod 9900.ko
0001:02:00.0: ttyT0 at I/O 0x0 (irq = 22) is a starex-serial
starex-serial: probe of 0001:02:00.1 failed with error -12
>From the kernel logs, I found that:
PCI: Assigning unassigned resouces...
PCI: Failed to allocate I/O resource #0:8@1000 for 0001:02:00.1
All the PCI devices are as follows:
~ # lspci
0000:00:00.0 Power PC: Freescale Semiconductor Inc Unknown device 00c7 (rev
21)
0000:00:0f.0 Serial controller: Unknown device 4348:3253 (rev 10)
0001:01:00.0 PCI bridge: Freescale Semiconductor Inc Unknown device 00c7
(rev 21)
0001:02:00.0 Serial controller: NetMos Technology Unknown device 9901
0001:02:00.1 Serial controller: NetMos Technology Unknown device 9901
Parts Kernel booting message is :
Found MPC83xx PCI host bridge at 0x00000000e0008500. Firmware bus number:
0->0
->Hose at 0xc0417000, cfg_addr=0xfdffd300,cfg_data=0xfdffd304
PCI host bridge /pci@e0008500 (primary) ranges:
MEM 0x0000000090000000..0x000000009fffffff -> 0x0000000090000000
MEM 0x0000000080000000..0x000000008fffffff -> 0x0000000080000000 Prefetch
IO 0x00000000e0300000..0x00000000e03fffff -> 0x0000000000000000
mpc83xx_add_bridge():Adding PCI host bridge /pcie@e0009000.
Found MPC83xx PCI host bridge at 0x00000000e0009000. Firmware bus number:
0->0
->Hose at 0xc04170c0, cfg_addr=0xf5efc000,cfg_data=0xfdefc000
PCI host bridge /pcie@e0009000 (primary) ranges:
MEM 0x00000000a8000000..0x00000000b7ffffff -> 0x00000000a8000000
IO 0x00000000b8000000..0x00000000b87fffff -> 0x0000000000000000
I fount that because the "0001:02:00.1" does not have the IO map.
How can I configure it?
[-- Attachment #2: Type: text/html, Size: 1993 bytes --]
^ permalink raw reply
* Re: [regression] 2.6.39-rc[1-3] fail to boot on G5 PowerMac
From: Hugh Dickins @ 2011-04-17 3:16 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: Mikael Pettersson, Jens Axboe, linux-kernel, kevin diggs,
linuxppc-dev
In-Reply-To: <1302818089.28876.134.camel@pasglop>
On Thu, Apr 14, 2011 at 2:54 PM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> On Thu, 2011-04-14 at 14:25 -0700, Hugh Dickins wrote:
>>
>> Something worth trying: turn off CONFIG_IDE. =C2=A0That's what I need to
>> boot 2.6.39-rc[1-3] on PowerPC G5.
>>
>> I know Jens has been fixing problems with IDE versus his plug/unplug
>> changes, but it's still not fixed for me in rc3.
>>
>> In other mail http://lkml.org/lkml/2011/4/14/614
>> I see Linus recommending his post-rc3 commit 6631e635c65d
>> but I've not tried that myself yet.
>
> Well, the disk is SATA so it's CONFIG_ATA/libata, which works fine here,
> unless you somewhat replaced your CD-ROM with a legacy IDE disk :-) Or
> maybe the problem is related to the CD-ROM drive. There's a libata
> driver for it nowadays, so you can use PATA_MACIO instead of IDE_PMAC
Thanks for that, Ben: I remember you were brewing up such a driver,
but I missed when it actually went in. I can confirm that switching
off CONFIG_IDE and switching on CONFIG_PATA_MACIO and
CONFIG_BLK_DEV_SR now gives me a booting system with a working CD-ROM
(though I've not yet tried burning).
Whereas CONFIG_IDE=3Dy with current git still does not boot: hangs for a
minute or three around the windfarm announcements, then an endless
splurge of hda error messages - sorry, I'm not being helpful, other
worries...
Hugh
^ permalink raw reply
* regression: 2.6.39-rc2,3 compile failure on p2020 (repost)
From: Richard Cochran @ 2011-04-16 7:54 UTC (permalink / raw)
To: linuxppc-dev
When compiling mpc85xx_smp_defconfig, the kernel fails to link with:
arch/powerpc/kernel/built-in.o: In function `cpu_die':
arch/powerpc/kernel/smp.c:702: undefined reference to `start_secondary_resume'
I suspect:
commit fa3f82c8bb7acbe049ea71f258b3ae0a33d9d40b
powerpc/smp: soft-replugged CPUs must go back to start_secondary
The symbol start_secondary_resume is provided by head_32.S, but it is
not present in head_fsl_booke.S.
I don't now how to fix this and would appreciate any help.
Thanks,
Richard
^ permalink raw reply
* Re: regression: 2.6.39-rc2,3 compile failure on p2020
From: Benjamin Herrenschmidt @ 2011-04-16 7:39 UTC (permalink / raw)
To: Richard Cochran; +Cc: linuxppc-dev
In-Reply-To: <20110416072856.GA3542@riccoc20.at.omicron.at>
On Sat, 2011-04-16 at 09:28 +0200, Richard Cochran wrote:
> When compiling mpc85xx_smp_defconfig, the kernel fails to link with:
>
> arch/powerpc/kernel/built-in.o: In function `cpu_die':
> arch/powerpc/kernel/smp.c:702: undefined reference to
> `start_secondary_resume'
>
> I suspect:
>
> commit fa3f82c8bb7acbe049ea71f258b3ae0a33d9d40b
> powerpc/smp: soft-replugged CPUs must go back to start_secondary
>
> The symbol start_secondary_resume is provided by head_32.S, but it is
> not present in head_fsl_booke.S.
>
> I don't now how to fix this and would appreciate any help.
I'll fix it. Basically copy the code from head_32.S to head_fsl_booke.S
Thanks,
Cheers,
Ben.
^ permalink raw reply
* regression: 2.6.39-rc2,3 compile failure on p2020
From: Richard Cochran @ 2011-04-16 7:28 UTC (permalink / raw)
To: linuxppc-dev
When compiling mpc85xx_smp_defconfig, the kernel fails to link with:
arch/powerpc/kernel/built-in.o: In function `cpu_die':
arch/powerpc/kernel/smp.c:702: undefined reference to `start_secondary_resume'
I suspect:
commit fa3f82c8bb7acbe049ea71f258b3ae0a33d9d40b
powerpc/smp: soft-replugged CPUs must go back to start_secondary
The symbol start_secondary_resume is provided by head_32.S, but it is
not present in head_fsl_booke.S.
I don't now how to fix this and would appreciate any help.
Thanks,
Richard
^ permalink raw reply
* Re: Non-console UART issues with 8xx
From: Eran Duchan @ 2011-04-16 6:40 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20110415154110.1b523da0@schlenkerla.am.freescale.net>
[-- Attachment #1: Type: text/plain, Size: 1782 bytes --]
Thanks for the pointers, Scott.
Looks like some elbow grease is in order. I will post any results I have
once I get to this :-/
Eran
On Fri, Apr 15, 2011 at 11:41 PM, Scott Wood <scottwood@freescale.com>wrote:
> On Fri, 15 Apr 2011 02:52:22 +0300
> Eran Duchan <pavius@gmail.com> wrote:
>
> > Hey list
> >
> > I have a custom MPC875 board running 2.6.37. SMC1 is the console, SCC4 is
> a
> > general purpose UART (DTS is set up accordingly). No hardware or software
> > flow control for either.
> >
> > The issue is simple: the non-console UART transmits garbled characters at
> > the end of the transmission.
>
> Hmm, there's a wait_closing field in uart_cpm_port that doesn't seem to be
> initialized anywhere.
>
> The driver should also be sending the STOP_TX/GRA_STOP_TX command *before*
> clearing the transmit enable bits, rather than after.
>
> > For example, set up SMC1 to console (works
> > perfect) and SCC4 as non-console, run stty -F /dev/ttyCPM1 19200 raw and
> > then echo -n 1234567890 > /dev/ttyCPM1 - transmission may be something
> like
> > "1234567ø". Set the SCC4 as console (same baud rates) and the problem is
> > reversed (SCC4 works perfect, SMC1 transmit garbled).
> >
> > Rx direction seems fine, after some rudementary testing.
> >
> > I dived into the code and see that the console UART has a completely
> > different initialization sequence than the non-console UART. Short of
> diving
> > into this ancient CPM architecture - does anyone have an idea?
>
> The console is a bit different because it has a user that isn't tied to an
> open file-handle -- which doesn't interact well with the driver's
> (possibly misguided) desire to actually deconfigure the hardware when not
> open.
>
> -Scott
>
>
[-- Attachment #2: Type: text/html, Size: 2343 bytes --]
^ permalink raw reply
* Re: PowerMacintosh B&W G3 boot failure - linux-2.6.36.x
From: Benjamin Herrenschmidt @ 2011-04-16 0:52 UTC (permalink / raw)
To: acrux; +Cc: linuxppc-dev
In-Reply-To: <20110416023346.03bb75fe.acrux_it@libero.it>
On Sat, 2011-04-16 at 02:33 +0200, acrux wrote:
> On Thu, 14 Apr 2011 12:49:16 +1000
> Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
>
> > What video driver are you trying to use ? Have you tried plain offb ?
> > (disabling whatever is the native driver for your video card, ie,
> > radeonfb or aty128fb or even atyfb, dunno what you have in there).
> >
> > You can also try something like "udbg-immortal" on the kernel command
> > line see if that brings you more debug output.
> >
>
> i asked for more tests and it seems "udbg-immortal" maybe helped.
> Here a new screenshot:
> http://cruxppc.org/~acrux/DSC_0002_modified.jpg
> and the bootkernel (config was attached in the previus mail) was
> compiled with CONFIG_SMP=y
Does the problem happens if you compile it without CONFIG_SMP ?
Cheers,
Ben.
^ permalink raw reply
* Re: PowerMacintosh B&W G3 boot failure - linux-2.6.36.x
From: acrux @ 2011-04-16 0:33 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <1302749356.28876.105.camel@pasglop>
On Thu, 14 Apr 2011 12:49:16 +1000
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> What video driver are you trying to use ? Have you tried plain offb ?
> (disabling whatever is the native driver for your video card, ie,
> radeonfb or aty128fb or even atyfb, dunno what you have in there).
>
> You can also try something like "udbg-immortal" on the kernel command
> line see if that brings you more debug output.
>
i asked for more tests and it seems "udbg-immortal" maybe helped.
Here a new screenshot:
http://cruxppc.org/~acrux/DSC_0002_modified.jpg
and the bootkernel (config was attached in the previus mail) was
compiled with CONFIG_SMP=y
my regards,
--nico
--
GNU/Linux on Power Architecture
CRUX PPC - http://cruxppc.org/
^ permalink raw reply
* Re: [PATCH] powerpc: Fix kexec-related UP build error
From: Paul E. McKenney @ 2011-04-15 21:08 UTC (permalink / raw)
To: Nishanth Aravamudan; +Cc: paulus, linuxppc-dev, ebiederm, kexec, linux-kernel
In-Reply-To: <20110415210051.GA31245@us.ibm.com>
On Fri, Apr 15, 2011 at 02:00:51PM -0700, Nishanth Aravamudan wrote:
> Hi Paul,
>
> On 15.04.2011 [13:29:16 -0700], Paul E. McKenney wrote:
> > Hello!
> >
> > The following patch fixes a UP build problem for kexec() on powerpc.
> > When the crash_kexec_wait_realmode() function was added, it was
> > placed in only two of the three required locations.
>
> I believe the fix has already been posted as
>
> http://lists.ozlabs.org/pipermail/linuxppc-dev/2011-April/089559.html
So it has! Thank you for the pointer.
Thanx, Paul
^ permalink raw reply
* Re: [PATCH] powerpc: Fix kexec-related UP build error
From: Nishanth Aravamudan @ 2011-04-15 21:00 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: paulus, linuxppc-dev, ebiederm, kexec, linux-kernel
In-Reply-To: <20110415202916.GA6758@linux.vnet.ibm.com>
Hi Paul,
On 15.04.2011 [13:29:16 -0700], Paul E. McKenney wrote:
> Hello!
>
> The following patch fixes a UP build problem for kexec() on powerpc.
> When the crash_kexec_wait_realmode() function was added, it was
> placed in only two of the three required locations.
I believe the fix has already been posted as
http://lists.ozlabs.org/pipermail/linuxppc-dev/2011-April/089559.html
Thanks,
Nish
^ permalink raw reply
* Re: Non-console UART issues with 8xx
From: Scott Wood @ 2011-04-15 20:41 UTC (permalink / raw)
To: Eran Duchan; +Cc: linuxppc-dev
In-Reply-To: <BANLkTik=ivFpWQEhqrVnYfr2LS4HSnTDuA@mail.gmail.com>
On Fri, 15 Apr 2011 02:52:22 +0300
Eran Duchan <pavius@gmail.com> wrote:
> Hey list
>=20
> I have a custom MPC875 board running 2.6.37. SMC1 is the console, SCC4 is=
a
> general purpose UART (DTS is set up accordingly). No hardware or software
> flow control for either.
>=20
> The issue is simple: the non-console UART transmits garbled characters at
> the end of the transmission.
Hmm, there's a wait_closing field in uart_cpm_port that doesn't seem to be
initialized anywhere.
The driver should also be sending the STOP_TX/GRA_STOP_TX command *before*
clearing the transmit enable bits, rather than after.
> For example, set up SMC1 to console (works
> perfect) and SCC4 as non-console, run stty -F /dev/ttyCPM1 19200 raw and
> then echo -n 1234567890 > /dev/ttyCPM1 - transmission may be something li=
ke
> "1234567=C3=B8". Set the SCC4 as console (same baud rates) and the proble=
m is
> reversed (SCC4 works perfect, SMC1 transmit garbled).
>=20
> Rx direction seems fine, after some rudementary testing.
>=20
> I dived into the code and see that the console UART has a completely
> different initialization sequence than the non-console UART. Short of div=
ing
> into this ancient CPM architecture - does anyone have an idea?
The console is a bit different because it has a user that isn't tied to an
open file-handle -- which doesn't interact well with the driver's
(possibly misguided) desire to actually deconfigure the hardware when not
open.
-Scott
^ permalink raw reply
* [PATCH] powerpc: Fix kexec-related UP build error
From: Paul E. McKenney @ 2011-04-15 20:29 UTC (permalink / raw)
To: linuxppc-dev; +Cc: ebiederm, paulus, linux-kernel, kexec
Hello!
The following patch fixes a UP build problem for kexec() on powerpc.
When the crash_kexec_wait_realmode() function was added, it was
placed in only two of the three required locations.
Thoughts?
Thanx, Paul
------------------------------------------------------------------------
The function crash_kexec_wait_realmode() is defined only if SMP, but is
called in UP builds. Create an empty function to keep the compiler happy
in UP builds.
Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c
index 3d3d416..6f964ef 100644
--- a/arch/powerpc/kernel/crash.c
+++ b/arch/powerpc/kernel/crash.c
@@ -251,6 +251,10 @@ static void crash_kexec_prepare_cpus(int cpu)
#endif
}
+static void crash_kexec_wait_realmode(int cpu)
+{
+}
+
void crash_kexec_secondary(struct pt_regs *regs)
{
cpus_in_sr = CPU_MASK_NONE;
^ permalink raw reply related
* [PATCH V4] POWER: perf_event: Skip updating kernel counters if register value shrinks
From: Eric B Munson @ 2011-04-15 18:12 UTC (permalink / raw)
To: benh
Cc: a.p.zijlstra, linux-kernel, David.Laight, paulus, anton, acme,
mingo, linuxppc-dev, stable, Eric B Munson
Because of speculative event roll back, it is possible for some event coutners
to decrease between reads on POWER7. This causes a problem with the way that
counters are updated. Delta calues are calculated in a 64 bit value and the
top 32 bits are masked. If the register value has decreased, this leaves us
with a very large positive value added to the kernel counters. This patch
protects against this by skipping the update if the delta would be negative.
This can lead to a lack of precision in the coutner values, but from my testing
the value is typcially fewer than 10 samples at a time.
Signed-off-by: Eric B Munson <emunson@mgebm.net>
Cc: stable@kernel.org
---
Changes from V3:
Fix delta checking so that only roll backs are discarded
Changes from V2:
Create a helper that should handle counter roll back as well as registers that
might be allowed to roll over
Changes from V1:
Updated patch leader
Added stable CC
Use an s32 to hold delta values and discard any values that are less than 0
arch/powerpc/kernel/perf_event.c | 37 ++++++++++++++++++++++++++++++-------
1 files changed, 30 insertions(+), 7 deletions(-)
diff --git a/arch/powerpc/kernel/perf_event.c b/arch/powerpc/kernel/perf_event.c
index c4063b7..822f630 100644
--- a/arch/powerpc/kernel/perf_event.c
+++ b/arch/powerpc/kernel/perf_event.c
@@ -398,6 +398,25 @@ static int check_excludes(struct perf_event **ctrs, unsigned int cflags[],
return 0;
}
+static u64 check_and_compute_delta(u64 prev, u64 val)
+{
+ u64 delta = (val - prev) & 0xfffffffful;
+
+ /*
+ * POWER7 can roll back counter values, if the new value is smaller
+ * than the previous value it will cause the delta and the counter to
+ * have bogus values unless we rolled a counter over. If a coutner is
+ * rolled back, it will be smaller, but within 256, which is the maximum
+ * number of events to rollback at once. If we dectect a rollback
+ * return 0. This can lead to a small lack of precision in the
+ * counters.
+ */
+ if (prev > val && (prev - val) < 256)
+ delta = 0;
+
+ return delta;
+}
+
static void power_pmu_read(struct perf_event *event)
{
s64 val, delta, prev;
@@ -416,10 +435,11 @@ static void power_pmu_read(struct perf_event *event)
prev = local64_read(&event->hw.prev_count);
barrier();
val = read_pmc(event->hw.idx);
+ delta = check_and_compute_delta(prev, val);
+ if (!delta)
+ return;
} while (local64_cmpxchg(&event->hw.prev_count, prev, val) != prev);
- /* The counters are only 32 bits wide */
- delta = (val - prev) & 0xfffffffful;
local64_add(delta, &event->count);
local64_sub(delta, &event->hw.period_left);
}
@@ -449,8 +469,9 @@ static void freeze_limited_counters(struct cpu_hw_events *cpuhw,
val = (event->hw.idx == 5) ? pmc5 : pmc6;
prev = local64_read(&event->hw.prev_count);
event->hw.idx = 0;
- delta = (val - prev) & 0xfffffffful;
- local64_add(delta, &event->count);
+ delta = check_and_compute_delta(prev, val);
+ if (delta)
+ local64_add(delta, &event->count);
}
}
@@ -458,14 +479,16 @@ static void thaw_limited_counters(struct cpu_hw_events *cpuhw,
unsigned long pmc5, unsigned long pmc6)
{
struct perf_event *event;
- u64 val;
+ u64 val, prev;
int i;
for (i = 0; i < cpuhw->n_limited; ++i) {
event = cpuhw->limited_counter[i];
event->hw.idx = cpuhw->limited_hwidx[i];
val = (event->hw.idx == 5) ? pmc5 : pmc6;
- local64_set(&event->hw.prev_count, val);
+ prev = local64_read(&event->hw.prev_count);
+ if (check_and_compute_delta(prev, val))
+ local64_set(&event->hw.prev_count, val);
perf_event_update_userpage(event);
}
}
@@ -1197,7 +1220,7 @@ static void record_and_restart(struct perf_event *event, unsigned long val,
/* we don't have to worry about interrupts here */
prev = local64_read(&event->hw.prev_count);
- delta = (val - prev) & 0xfffffffful;
+ delta = check_and_compute_delta(prev, val);
local64_add(delta, &event->count);
/*
--
1.7.1
^ permalink raw reply related
* Re: [PATCH] cxgb4: use pgprot_writecombine() on powerpc
From: Nishanth Aravamudan @ 2011-04-15 17:27 UTC (permalink / raw)
To: Steve Wise; +Cc: linuxppc-dev, Anton Blanchard
In-Reply-To: <4D7E7FCE.3000703@opengridcomputing.com>
On 14.03.2011 [15:51:26 -0500], Steve Wise wrote:
> On 03/14/2011 03:36 PM, Nishanth Aravamudan wrote:
> >Commit fe3cc0d99de6a9bf99b6c279a8afb5833888c1f7 ("powerpc: Add
> >pgprot_writecombine") in benh's tree exposes the pgprot_writecombine()
> >API to drivers on powerpc. cxgb4 has an open-coded version of the same,
> >so use the common API now that it's available.
> >
> >Signed-off-by: Nishanth Aravamudan<nacc@us.ibm.com>
> >Cc: Steve Wise<swise@opengridcomputing.com>
> >Cc: Anton Blanchard<anton@samba.org>
> >
> >---
> >
> >Given that this depends on a patch in Ben's tree, should this go in via
> >the powerpc tree? Presuming Steve acks it, of course.
> >
> > drivers/infiniband/hw/cxgb4/t4.h | 5 +----
> > 1 files changed, 1 insertions(+), 4 deletions(-)
> >
>
> Acked-by: Steve Wise <swise@opengridcomputing.com>
>
> I suppose it should go into the same tree with the commit that adds this function.
Ben, I don't think this is in your tree yet, will you be taking it?
Thanks,
Nish
^ permalink raw reply
* Re: [PATCH] powerpc: Don't write protect kernel text with CONFIG_DYNAMIC_FTRACE enabled
From: Steven Rostedt @ 2011-04-15 14:51 UTC (permalink / raw)
To: Stefan Roese, linuxppc-dev
In-Reply-To: <1302860993-28829-1-git-send-email-sr@denx.de>
[-- Attachment #1: Type: text/plain, Size: 1270 bytes --]
Stefan Roese <sr@denx.de> wrote:
This problem was noticed on an MPC855T platform. Ftrace did oops when trying to write to the kernel text segment. Many thanks to Joakim for finding the root cause of this problem. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Joakim Tjernlund <joakim.tjernlund@transmode.se> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Steven Rostedt <rostedt@goodmis.org> --- arch/powerpc/include/asm/pte-common.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/include/asm/pte-common.h b/arch/powerpc/include/asm/pte-common.h index 811f04a..8d1569c 100644 --- a/arch/powerpc/include/asm/pte-common.h +++ b/arch/powerpc/include/asm/pte-common.h @@ -162,7 +162,7 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void); * on platforms where such control is possible. */ #if defined(CONFIG_KGDB) || defined(CONFIG_XMON) || defined(CONFIG_BDI_SWITCH) ||\ - defined(CONFIG_KPROBES) + defined(CONFIG_KPROBES) || defined(CONFIG_DYNAMIC_FTRACE) #define
PAGE_KERNEL_TEXT PAGE_KERNEL_X #else #define PAGE_KERNEL_TEXT PAGE_KERNEL_ROX -- 1.7.4.4
This is fine for a work around but you should take a look at what x86 does for this.
-- Steve
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
[-- Attachment #2: Type: text/html, Size: 1651 bytes --]
^ permalink raw reply
* [PATCH] powerpc: Don't write protect kernel text with CONFIG_DYNAMIC_FTRACE enabled
From: Stefan Roese @ 2011-04-15 9:49 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Steven Rostedt
This problem was noticed on an MPC855T platform. Ftrace did oops
when trying to write to the kernel text segment.
Many thanks to Joakim for finding the root cause of this problem.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
---
arch/powerpc/include/asm/pte-common.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/include/asm/pte-common.h b/arch/powerpc/include/asm/pte-common.h
index 811f04a..8d1569c 100644
--- a/arch/powerpc/include/asm/pte-common.h
+++ b/arch/powerpc/include/asm/pte-common.h
@@ -162,7 +162,7 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void);
* on platforms where such control is possible.
*/
#if defined(CONFIG_KGDB) || defined(CONFIG_XMON) || defined(CONFIG_BDI_SWITCH) ||\
- defined(CONFIG_KPROBES)
+ defined(CONFIG_KPROBES) || defined(CONFIG_DYNAMIC_FTRACE)
#define PAGE_KERNEL_TEXT PAGE_KERNEL_X
#else
#define PAGE_KERNEL_TEXT PAGE_KERNEL_ROX
--
1.7.4.4
^ permalink raw reply related
* Re: [PATCH 1/4] crypto: caam - handle interrupt lines shared across rings
From: Herbert Xu @ 2011-04-15 9:50 UTC (permalink / raw)
To: Kim Phillips; +Cc: Steve Cornelius, linuxppc-dev, linux-crypto
In-Reply-To: <20110411191516.bae0454e.kim.phillips@freescale.com>
On Mon, Apr 11, 2011 at 07:15:16PM -0500, Kim Phillips wrote:
> - add IRQF_SHARED to request_irq flags to support parts such as
> the p1023 that has one IRQ line per couple of rings.
>
> - resetting a job ring triggers an interrupt, so move request_irq
> prior to jr_reset to avoid 'got IRQ but nobody cared' messages.
>
> - disable IRQs in h/w to avoid contention between reset and
> interrupt status
>
> - delete invalid comment - if there were incomplete jobs,
> module would be in use, preventing an unload.
>
> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
> ---
> this, and the remaining patches in this series, tested on p1023, p3041,
> p4080, and 32- and 64-bit p5020.
All four patches applied. Thanks Kim!
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox