* Re: [PATCH 1/2] gpio: move mpc8xxx/512x gpio driver to drivers/gpio
From: Grant Likely @ 2011-09-20 17:59 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linuxppc-dev, Anatolij Gustschin
In-Reply-To: <1316539941-14092-1-git-send-email-w.sang@pengutronix.de>
On Tue, Sep 20, 2011 at 07:32:20PM +0200, Wolfram Sang wrote:
> Move the driver to the place where it is expected to be nowadays. Also
> rename its CONFIG-name to match the rest and adapt the defconfigs.
> Finally, move selection of REQUIRE_GPIOLIB or WANTS_OPTIONAL_GPIOLIB to
> the platforms, because this option is per-platform and not per-driver.
>
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> Cc: Anatolij Gustschin <agust@denx.de>
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> I'd think this should go via ppc, so it is in sync with the defconfig update of
> patch 2/2.
>
> arch/powerpc/configs/85xx/p1023rds_defconfig | 2 +-
> arch/powerpc/configs/85xx/xes_mpc85xx_defconfig | 2 +-
> arch/powerpc/configs/mpc85xx_defconfig | 2 +-
> arch/powerpc/configs/mpc85xx_smp_defconfig | 2 +-
> arch/powerpc/configs/ppc6xx_defconfig | 2 +-
> arch/powerpc/platforms/512x/Kconfig | 1 +
> arch/powerpc/platforms/83xx/Kconfig | 9 +-
> arch/powerpc/platforms/85xx/Kconfig | 12 +-
> arch/powerpc/platforms/86xx/Kconfig | 1 +
> arch/powerpc/platforms/Kconfig | 10 -
> arch/powerpc/sysdev/Makefile | 1 -
> arch/powerpc/sysdev/mpc8xxx_gpio.c | 395 -----------------------
> drivers/gpio/Kconfig | 8 +
> drivers/gpio/Makefile | 1 +
> drivers/gpio/gpio-mpc8xxx.c | 395 +++++++++++++++++++++++
Please resubmit and use the --find-renames flag so to keep the diff
showing only the actual changes.
g.
> 15 files changed, 425 insertions(+), 418 deletions(-)
> delete mode 100644 arch/powerpc/sysdev/mpc8xxx_gpio.c
> create mode 100644 drivers/gpio/gpio-mpc8xxx.c
>
> diff --git a/arch/powerpc/configs/85xx/p1023rds_defconfig b/arch/powerpc/configs/85xx/p1023rds_defconfig
> index 3ff5a81..c091aaf 100644
> --- a/arch/powerpc/configs/85xx/p1023rds_defconfig
> +++ b/arch/powerpc/configs/85xx/p1023rds_defconfig
> @@ -24,7 +24,7 @@ CONFIG_P1023_RDS=y
> CONFIG_QUICC_ENGINE=y
> CONFIG_QE_GPIO=y
> CONFIG_CPM2=y
> -CONFIG_MPC8xxx_GPIO=y
> +CONFIG_GPIO_MPC8XXX=y
> CONFIG_HIGHMEM=y
> CONFIG_NO_HZ=y
> CONFIG_HIGH_RES_TIMERS=y
> diff --git a/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig b/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig
> index 5ea3124..1cd6fcb 100644
> --- a/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig
> +++ b/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig
> @@ -20,7 +20,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y
> CONFIG_MODVERSIONS=y
> # CONFIG_BLK_DEV_BSG is not set
> CONFIG_XES_MPC85xx=y
> -CONFIG_MPC8xxx_GPIO=y
> +CONFIG_GPIO_MPC8XXX=y
> CONFIG_HIGHMEM=y
> CONFIG_MATH_EMULATION=y
> CONFIG_SPARSE_IRQ=y
> diff --git a/arch/powerpc/configs/mpc85xx_defconfig b/arch/powerpc/configs/mpc85xx_defconfig
> index a3467bf..2500912 100644
> --- a/arch/powerpc/configs/mpc85xx_defconfig
> +++ b/arch/powerpc/configs/mpc85xx_defconfig
> @@ -41,7 +41,7 @@ CONFIG_TQM8560=y
> CONFIG_SBC8548=y
> CONFIG_QUICC_ENGINE=y
> CONFIG_QE_GPIO=y
> -CONFIG_MPC8xxx_GPIO=y
> +CONFIG_GPIO_MPC8XXX=y
> CONFIG_HIGHMEM=y
> CONFIG_NO_HZ=y
> CONFIG_HIGH_RES_TIMERS=y
> diff --git a/arch/powerpc/configs/mpc85xx_smp_defconfig b/arch/powerpc/configs/mpc85xx_smp_defconfig
> index 9693f6e..a4ba13b 100644
> --- a/arch/powerpc/configs/mpc85xx_smp_defconfig
> +++ b/arch/powerpc/configs/mpc85xx_smp_defconfig
> @@ -42,7 +42,7 @@ CONFIG_TQM8560=y
> CONFIG_SBC8548=y
> CONFIG_QUICC_ENGINE=y
> CONFIG_QE_GPIO=y
> -CONFIG_MPC8xxx_GPIO=y
> +CONFIG_GPIO_MPC8XXX=y
> CONFIG_HIGHMEM=y
> CONFIG_NO_HZ=y
> CONFIG_HIGH_RES_TIMERS=y
> diff --git a/arch/powerpc/configs/ppc6xx_defconfig b/arch/powerpc/configs/ppc6xx_defconfig
> index 04360f9..c47f2be 100644
> --- a/arch/powerpc/configs/ppc6xx_defconfig
> +++ b/arch/powerpc/configs/ppc6xx_defconfig
> @@ -70,7 +70,7 @@ CONFIG_TAU_AVERAGE=y
> CONFIG_QUICC_ENGINE=y
> CONFIG_QE_GPIO=y
> CONFIG_PPC_BESTCOMM=y
> -CONFIG_MPC8xxx_GPIO=y
> +CONFIG_GPIO_MPC8XXX=y
> CONFIG_MCU_MPC8349EMITX=m
> CONFIG_HIGHMEM=y
> CONFIG_NO_HZ=y
> diff --git a/arch/powerpc/platforms/512x/Kconfig b/arch/powerpc/platforms/512x/Kconfig
> index 27b0651..b3ebce1 100644
> --- a/arch/powerpc/platforms/512x/Kconfig
> +++ b/arch/powerpc/platforms/512x/Kconfig
> @@ -6,6 +6,7 @@ config PPC_MPC512x
> select PPC_CLOCK
> select PPC_PCI_CHOICE
> select FSL_PCI if PCI
> + select ARCH_WANT_OPTIONAL_GPIOLIB
>
> config MPC5121_ADS
> bool "Freescale MPC5121E ADS"
> diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig
> index 73f4135..670a033 100644
> --- a/arch/powerpc/platforms/83xx/Kconfig
> +++ b/arch/powerpc/platforms/83xx/Kconfig
> @@ -114,18 +114,21 @@ config KMETER1
>
> endif
>
> -# used for usb
> +# used for usb & gpio
> config PPC_MPC831x
> bool
> + select ARCH_WANT_OPTIONAL_GPIOLIB
>
> # used for math-emu
> config PPC_MPC832x
> bool
>
> -# used for usb
> +# used for usb & gpio
> config PPC_MPC834x
> bool
> + select ARCH_WANT_OPTIONAL_GPIOLIB
>
> -# used for usb
> +# used for usb & gpio
> config PPC_MPC837x
> bool
> + select ARCH_WANT_OPTIONAL_GPIOLIB
> diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
> index 498534c..1b393f4 100644
> --- a/arch/powerpc/platforms/85xx/Kconfig
> +++ b/arch/powerpc/platforms/85xx/Kconfig
> @@ -177,7 +177,8 @@ config P2040_RDB
> select PPC_E500MC
> select PHYS_64BIT
> select SWIOTLB
> - select MPC8xxx_GPIO
> + select ARCH_REQUIRE_GPIOLIB
> + select GPIO_MPC8XXX
> select HAS_RAPIDIO
> select PPC_EPAPR_HV_PIC
> help
> @@ -189,7 +190,8 @@ config P3041_DS
> select PPC_E500MC
> select PHYS_64BIT
> select SWIOTLB
> - select MPC8xxx_GPIO
> + select ARCH_REQUIRE_GPIOLIB
> + select GPIO_MPC8XXX
> select HAS_RAPIDIO
> select PPC_EPAPR_HV_PIC
> help
> @@ -201,7 +203,8 @@ config P4080_DS
> select PPC_E500MC
> select PHYS_64BIT
> select SWIOTLB
> - select MPC8xxx_GPIO
> + select ARCH_REQUIRE_GPIOLIB
> + select GPIO_MPC8XXX
> select HAS_RAPIDIO
> select PPC_EPAPR_HV_PIC
> help
> @@ -216,7 +219,8 @@ config P5020_DS
> select PPC_E500MC
> select PHYS_64BIT
> select SWIOTLB
> - select MPC8xxx_GPIO
> + select ARCH_REQUIRE_GPIOLIB
> + select GPIO_MPC8XXX
> select HAS_RAPIDIO
> select PPC_EPAPR_HV_PIC
> help
> diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig
> index a0b5638..8d6599d 100644
> --- a/arch/powerpc/platforms/86xx/Kconfig
> +++ b/arch/powerpc/platforms/86xx/Kconfig
> @@ -4,6 +4,7 @@ menuconfig PPC_86xx
> depends on 6xx
> select FSL_SOC
> select ALTIVEC
> + select ARCH_WANT_OPTIONAL_GPIOLIB
> help
> The Freescale E600 SoCs have 74xx cores.
>
> diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
> index b9ba861..c0cb1ea 100644
> --- a/arch/powerpc/platforms/Kconfig
> +++ b/arch/powerpc/platforms/Kconfig
> @@ -333,16 +333,6 @@ config OF_RTC
>
> source "arch/powerpc/sysdev/bestcomm/Kconfig"
>
> -config MPC8xxx_GPIO
> - bool "MPC512x/MPC8xxx GPIO support"
> - depends on PPC_MPC512x || PPC_MPC831x || PPC_MPC834x || PPC_MPC837x || \
> - FSL_SOC_BOOKE || PPC_86xx
> - select GENERIC_GPIO
> - select ARCH_REQUIRE_GPIOLIB
> - help
> - Say Y here if you're going to use hardware that connects to the
> - MPC512x/831x/834x/837x/8572/8610 GPIOs.
> -
> config SIMPLE_GPIO
> bool "Support for simple, memory-mapped GPIO controllers"
> depends on PPC
> diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
> index cf736ca..84e1325 100644
> --- a/arch/powerpc/sysdev/Makefile
> +++ b/arch/powerpc/sysdev/Makefile
> @@ -18,7 +18,6 @@ obj-$(CONFIG_FSL_PCI) += fsl_pci.o $(fsl-msi-obj-y)
> obj-$(CONFIG_FSL_PMC) += fsl_pmc.o
> obj-$(CONFIG_FSL_LBC) += fsl_lbc.o
> obj-$(CONFIG_FSL_GTM) += fsl_gtm.o
> -obj-$(CONFIG_MPC8xxx_GPIO) += mpc8xxx_gpio.o
> obj-$(CONFIG_FSL_85XX_CACHE_SRAM) += fsl_85xx_l2ctlr.o fsl_85xx_cache_sram.o
> obj-$(CONFIG_SIMPLE_GPIO) += simple_gpio.o
> obj-$(CONFIG_FSL_RIO) += fsl_rio.o
> diff --git a/arch/powerpc/sysdev/mpc8xxx_gpio.c b/arch/powerpc/sysdev/mpc8xxx_gpio.c
> deleted file mode 100644
> index fb4963a..0000000
> --- a/arch/powerpc/sysdev/mpc8xxx_gpio.c
> +++ /dev/null
> @@ -1,395 +0,0 @@
> -/*
> - * GPIOs on MPC512x/8349/8572/8610 and compatible
> - *
> - * Copyright (C) 2008 Peter Korsgaard <jacmet@sunsite.dk>
> - *
> - * This file is licensed under the terms of the GNU General Public License
> - * version 2. This program is licensed "as is" without any warranty of any
> - * kind, whether express or implied.
> - */
> -
> -#include <linux/kernel.h>
> -#include <linux/init.h>
> -#include <linux/spinlock.h>
> -#include <linux/io.h>
> -#include <linux/of.h>
> -#include <linux/of_gpio.h>
> -#include <linux/gpio.h>
> -#include <linux/slab.h>
> -#include <linux/irq.h>
> -
> -#define MPC8XXX_GPIO_PINS 32
> -
> -#define GPIO_DIR 0x00
> -#define GPIO_ODR 0x04
> -#define GPIO_DAT 0x08
> -#define GPIO_IER 0x0c
> -#define GPIO_IMR 0x10
> -#define GPIO_ICR 0x14
> -#define GPIO_ICR2 0x18
> -
> -struct mpc8xxx_gpio_chip {
> - struct of_mm_gpio_chip mm_gc;
> - spinlock_t lock;
> -
> - /*
> - * shadowed data register to be able to clear/set output pins in
> - * open drain mode safely
> - */
> - u32 data;
> - struct irq_host *irq;
> - void *of_dev_id_data;
> -};
> -
> -static inline u32 mpc8xxx_gpio2mask(unsigned int gpio)
> -{
> - return 1u << (MPC8XXX_GPIO_PINS - 1 - gpio);
> -}
> -
> -static inline struct mpc8xxx_gpio_chip *
> -to_mpc8xxx_gpio_chip(struct of_mm_gpio_chip *mm)
> -{
> - return container_of(mm, struct mpc8xxx_gpio_chip, mm_gc);
> -}
> -
> -static void mpc8xxx_gpio_save_regs(struct of_mm_gpio_chip *mm)
> -{
> - struct mpc8xxx_gpio_chip *mpc8xxx_gc = to_mpc8xxx_gpio_chip(mm);
> -
> - mpc8xxx_gc->data = in_be32(mm->regs + GPIO_DAT);
> -}
> -
> -/* Workaround GPIO 1 errata on MPC8572/MPC8536. The status of GPIOs
> - * defined as output cannot be determined by reading GPDAT register,
> - * so we use shadow data register instead. The status of input pins
> - * is determined by reading GPDAT register.
> - */
> -static int mpc8572_gpio_get(struct gpio_chip *gc, unsigned int gpio)
> -{
> - u32 val;
> - struct of_mm_gpio_chip *mm = to_of_mm_gpio_chip(gc);
> - struct mpc8xxx_gpio_chip *mpc8xxx_gc = to_mpc8xxx_gpio_chip(mm);
> -
> - val = in_be32(mm->regs + GPIO_DAT) & ~in_be32(mm->regs + GPIO_DIR);
> -
> - return (val | mpc8xxx_gc->data) & mpc8xxx_gpio2mask(gpio);
> -}
> -
> -static int mpc8xxx_gpio_get(struct gpio_chip *gc, unsigned int gpio)
> -{
> - struct of_mm_gpio_chip *mm = to_of_mm_gpio_chip(gc);
> -
> - return in_be32(mm->regs + GPIO_DAT) & mpc8xxx_gpio2mask(gpio);
> -}
> -
> -static void mpc8xxx_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
> -{
> - struct of_mm_gpio_chip *mm = to_of_mm_gpio_chip(gc);
> - struct mpc8xxx_gpio_chip *mpc8xxx_gc = to_mpc8xxx_gpio_chip(mm);
> - unsigned long flags;
> -
> - spin_lock_irqsave(&mpc8xxx_gc->lock, flags);
> -
> - if (val)
> - mpc8xxx_gc->data |= mpc8xxx_gpio2mask(gpio);
> - else
> - mpc8xxx_gc->data &= ~mpc8xxx_gpio2mask(gpio);
> -
> - out_be32(mm->regs + GPIO_DAT, mpc8xxx_gc->data);
> -
> - spin_unlock_irqrestore(&mpc8xxx_gc->lock, flags);
> -}
> -
> -static int mpc8xxx_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio)
> -{
> - struct of_mm_gpio_chip *mm = to_of_mm_gpio_chip(gc);
> - struct mpc8xxx_gpio_chip *mpc8xxx_gc = to_mpc8xxx_gpio_chip(mm);
> - unsigned long flags;
> -
> - spin_lock_irqsave(&mpc8xxx_gc->lock, flags);
> -
> - clrbits32(mm->regs + GPIO_DIR, mpc8xxx_gpio2mask(gpio));
> -
> - spin_unlock_irqrestore(&mpc8xxx_gc->lock, flags);
> -
> - return 0;
> -}
> -
> -static int mpc8xxx_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
> -{
> - struct of_mm_gpio_chip *mm = to_of_mm_gpio_chip(gc);
> - struct mpc8xxx_gpio_chip *mpc8xxx_gc = to_mpc8xxx_gpio_chip(mm);
> - unsigned long flags;
> -
> - mpc8xxx_gpio_set(gc, gpio, val);
> -
> - spin_lock_irqsave(&mpc8xxx_gc->lock, flags);
> -
> - setbits32(mm->regs + GPIO_DIR, mpc8xxx_gpio2mask(gpio));
> -
> - spin_unlock_irqrestore(&mpc8xxx_gc->lock, flags);
> -
> - return 0;
> -}
> -
> -static int mpc8xxx_gpio_to_irq(struct gpio_chip *gc, unsigned offset)
> -{
> - struct of_mm_gpio_chip *mm = to_of_mm_gpio_chip(gc);
> - struct mpc8xxx_gpio_chip *mpc8xxx_gc = to_mpc8xxx_gpio_chip(mm);
> -
> - if (mpc8xxx_gc->irq && offset < MPC8XXX_GPIO_PINS)
> - return irq_create_mapping(mpc8xxx_gc->irq, offset);
> - else
> - return -ENXIO;
> -}
> -
> -static void mpc8xxx_gpio_irq_cascade(unsigned int irq, struct irq_desc *desc)
> -{
> - struct mpc8xxx_gpio_chip *mpc8xxx_gc = irq_desc_get_handler_data(desc);
> - struct of_mm_gpio_chip *mm = &mpc8xxx_gc->mm_gc;
> - unsigned int mask;
> -
> - mask = in_be32(mm->regs + GPIO_IER) & in_be32(mm->regs + GPIO_IMR);
> - if (mask)
> - generic_handle_irq(irq_linear_revmap(mpc8xxx_gc->irq,
> - 32 - ffs(mask)));
> -}
> -
> -static void mpc8xxx_irq_unmask(struct irq_data *d)
> -{
> - struct mpc8xxx_gpio_chip *mpc8xxx_gc = irq_data_get_irq_chip_data(d);
> - struct of_mm_gpio_chip *mm = &mpc8xxx_gc->mm_gc;
> - unsigned long flags;
> -
> - spin_lock_irqsave(&mpc8xxx_gc->lock, flags);
> -
> - setbits32(mm->regs + GPIO_IMR, mpc8xxx_gpio2mask(irqd_to_hwirq(d)));
> -
> - spin_unlock_irqrestore(&mpc8xxx_gc->lock, flags);
> -}
> -
> -static void mpc8xxx_irq_mask(struct irq_data *d)
> -{
> - struct mpc8xxx_gpio_chip *mpc8xxx_gc = irq_data_get_irq_chip_data(d);
> - struct of_mm_gpio_chip *mm = &mpc8xxx_gc->mm_gc;
> - unsigned long flags;
> -
> - spin_lock_irqsave(&mpc8xxx_gc->lock, flags);
> -
> - clrbits32(mm->regs + GPIO_IMR, mpc8xxx_gpio2mask(irqd_to_hwirq(d)));
> -
> - spin_unlock_irqrestore(&mpc8xxx_gc->lock, flags);
> -}
> -
> -static void mpc8xxx_irq_ack(struct irq_data *d)
> -{
> - struct mpc8xxx_gpio_chip *mpc8xxx_gc = irq_data_get_irq_chip_data(d);
> - struct of_mm_gpio_chip *mm = &mpc8xxx_gc->mm_gc;
> -
> - out_be32(mm->regs + GPIO_IER, mpc8xxx_gpio2mask(irqd_to_hwirq(d)));
> -}
> -
> -static int mpc8xxx_irq_set_type(struct irq_data *d, unsigned int flow_type)
> -{
> - struct mpc8xxx_gpio_chip *mpc8xxx_gc = irq_data_get_irq_chip_data(d);
> - struct of_mm_gpio_chip *mm = &mpc8xxx_gc->mm_gc;
> - unsigned long flags;
> -
> - switch (flow_type) {
> - case IRQ_TYPE_EDGE_FALLING:
> - spin_lock_irqsave(&mpc8xxx_gc->lock, flags);
> - setbits32(mm->regs + GPIO_ICR,
> - mpc8xxx_gpio2mask(irqd_to_hwirq(d)));
> - spin_unlock_irqrestore(&mpc8xxx_gc->lock, flags);
> - break;
> -
> - case IRQ_TYPE_EDGE_BOTH:
> - spin_lock_irqsave(&mpc8xxx_gc->lock, flags);
> - clrbits32(mm->regs + GPIO_ICR,
> - mpc8xxx_gpio2mask(irqd_to_hwirq(d)));
> - spin_unlock_irqrestore(&mpc8xxx_gc->lock, flags);
> - break;
> -
> - default:
> - return -EINVAL;
> - }
> -
> - return 0;
> -}
> -
> -static int mpc512x_irq_set_type(struct irq_data *d, unsigned int flow_type)
> -{
> - struct mpc8xxx_gpio_chip *mpc8xxx_gc = irq_data_get_irq_chip_data(d);
> - struct of_mm_gpio_chip *mm = &mpc8xxx_gc->mm_gc;
> - unsigned long gpio = irqd_to_hwirq(d);
> - void __iomem *reg;
> - unsigned int shift;
> - unsigned long flags;
> -
> - if (gpio < 16) {
> - reg = mm->regs + GPIO_ICR;
> - shift = (15 - gpio) * 2;
> - } else {
> - reg = mm->regs + GPIO_ICR2;
> - shift = (15 - (gpio % 16)) * 2;
> - }
> -
> - switch (flow_type) {
> - case IRQ_TYPE_EDGE_FALLING:
> - case IRQ_TYPE_LEVEL_LOW:
> - spin_lock_irqsave(&mpc8xxx_gc->lock, flags);
> - clrsetbits_be32(reg, 3 << shift, 2 << shift);
> - spin_unlock_irqrestore(&mpc8xxx_gc->lock, flags);
> - break;
> -
> - case IRQ_TYPE_EDGE_RISING:
> - case IRQ_TYPE_LEVEL_HIGH:
> - spin_lock_irqsave(&mpc8xxx_gc->lock, flags);
> - clrsetbits_be32(reg, 3 << shift, 1 << shift);
> - spin_unlock_irqrestore(&mpc8xxx_gc->lock, flags);
> - break;
> -
> - case IRQ_TYPE_EDGE_BOTH:
> - spin_lock_irqsave(&mpc8xxx_gc->lock, flags);
> - clrbits32(reg, 3 << shift);
> - spin_unlock_irqrestore(&mpc8xxx_gc->lock, flags);
> - break;
> -
> - default:
> - return -EINVAL;
> - }
> -
> - return 0;
> -}
> -
> -static struct irq_chip mpc8xxx_irq_chip = {
> - .name = "mpc8xxx-gpio",
> - .irq_unmask = mpc8xxx_irq_unmask,
> - .irq_mask = mpc8xxx_irq_mask,
> - .irq_ack = mpc8xxx_irq_ack,
> - .irq_set_type = mpc8xxx_irq_set_type,
> -};
> -
> -static int mpc8xxx_gpio_irq_map(struct irq_host *h, unsigned int virq,
> - irq_hw_number_t hw)
> -{
> - struct mpc8xxx_gpio_chip *mpc8xxx_gc = h->host_data;
> -
> - if (mpc8xxx_gc->of_dev_id_data)
> - mpc8xxx_irq_chip.irq_set_type = mpc8xxx_gc->of_dev_id_data;
> -
> - irq_set_chip_data(virq, h->host_data);
> - irq_set_chip_and_handler(virq, &mpc8xxx_irq_chip, handle_level_irq);
> - irq_set_irq_type(virq, IRQ_TYPE_NONE);
> -
> - return 0;
> -}
> -
> -static int mpc8xxx_gpio_irq_xlate(struct irq_host *h, struct device_node *ct,
> - const u32 *intspec, unsigned int intsize,
> - irq_hw_number_t *out_hwirq,
> - unsigned int *out_flags)
> -
> -{
> - /* interrupt sense values coming from the device tree equal either
> - * EDGE_FALLING or EDGE_BOTH
> - */
> - *out_hwirq = intspec[0];
> - *out_flags = intspec[1];
> -
> - return 0;
> -}
> -
> -static struct irq_host_ops mpc8xxx_gpio_irq_ops = {
> - .map = mpc8xxx_gpio_irq_map,
> - .xlate = mpc8xxx_gpio_irq_xlate,
> -};
> -
> -static struct of_device_id mpc8xxx_gpio_ids[] __initdata = {
> - { .compatible = "fsl,mpc8349-gpio", },
> - { .compatible = "fsl,mpc8572-gpio", },
> - { .compatible = "fsl,mpc8610-gpio", },
> - { .compatible = "fsl,mpc5121-gpio", .data = mpc512x_irq_set_type, },
> - { .compatible = "fsl,qoriq-gpio", },
> - {}
> -};
> -
> -static void __init mpc8xxx_add_controller(struct device_node *np)
> -{
> - struct mpc8xxx_gpio_chip *mpc8xxx_gc;
> - struct of_mm_gpio_chip *mm_gc;
> - struct gpio_chip *gc;
> - const struct of_device_id *id;
> - unsigned hwirq;
> - int ret;
> -
> - mpc8xxx_gc = kzalloc(sizeof(*mpc8xxx_gc), GFP_KERNEL);
> - if (!mpc8xxx_gc) {
> - ret = -ENOMEM;
> - goto err;
> - }
> -
> - spin_lock_init(&mpc8xxx_gc->lock);
> -
> - mm_gc = &mpc8xxx_gc->mm_gc;
> - gc = &mm_gc->gc;
> -
> - mm_gc->save_regs = mpc8xxx_gpio_save_regs;
> - gc->ngpio = MPC8XXX_GPIO_PINS;
> - gc->direction_input = mpc8xxx_gpio_dir_in;
> - gc->direction_output = mpc8xxx_gpio_dir_out;
> - if (of_device_is_compatible(np, "fsl,mpc8572-gpio"))
> - gc->get = mpc8572_gpio_get;
> - else
> - gc->get = mpc8xxx_gpio_get;
> - gc->set = mpc8xxx_gpio_set;
> - gc->to_irq = mpc8xxx_gpio_to_irq;
> -
> - ret = of_mm_gpiochip_add(np, mm_gc);
> - if (ret)
> - goto err;
> -
> - hwirq = irq_of_parse_and_map(np, 0);
> - if (hwirq == NO_IRQ)
> - goto skip_irq;
> -
> - mpc8xxx_gc->irq =
> - irq_alloc_host(np, IRQ_HOST_MAP_LINEAR, MPC8XXX_GPIO_PINS,
> - &mpc8xxx_gpio_irq_ops, MPC8XXX_GPIO_PINS);
> - if (!mpc8xxx_gc->irq)
> - goto skip_irq;
> -
> - id = of_match_node(mpc8xxx_gpio_ids, np);
> - if (id)
> - mpc8xxx_gc->of_dev_id_data = id->data;
> -
> - mpc8xxx_gc->irq->host_data = mpc8xxx_gc;
> -
> - /* ack and mask all irqs */
> - out_be32(mm_gc->regs + GPIO_IER, 0xffffffff);
> - out_be32(mm_gc->regs + GPIO_IMR, 0);
> -
> - irq_set_handler_data(hwirq, mpc8xxx_gc);
> - irq_set_chained_handler(hwirq, mpc8xxx_gpio_irq_cascade);
> -
> -skip_irq:
> - return;
> -
> -err:
> - pr_err("%s: registration failed with status %d\n",
> - np->full_name, ret);
> - kfree(mpc8xxx_gc);
> -
> - return;
> -}
> -
> -static int __init mpc8xxx_add_gpiochips(void)
> -{
> - struct device_node *np;
> -
> - for_each_matching_node(np, mpc8xxx_gpio_ids)
> - mpc8xxx_add_controller(np);
> -
> - return 0;
> -}
> -arch_initcall(mpc8xxx_add_gpiochips);
> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> index d539efd..4744cf2 100644
> --- a/drivers/gpio/Kconfig
> +++ b/drivers/gpio/Kconfig
> @@ -103,6 +103,14 @@ config GPIO_MPC5200
> def_bool y
> depends on PPC_MPC52xx
>
> +config GPIO_MPC8XXX
> + bool "MPC512x/MPC8xxx GPIO support"
> + depends on PPC_MPC512x || PPC_MPC831x || PPC_MPC834x || PPC_MPC837x || \
> + FSL_SOC_BOOKE || PPC_86xx
> + help
> + Say Y here if you're going to use hardware that connects to the
> + MPC512x/831x/834x/837x/8572/8610 GPIOs.
> +
> config GPIO_MSM_V1
> tristate "Qualcomm MSM GPIO v1"
> depends on GPIOLIB && ARCH_MSM
> diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
> index 9588948..828bba9 100644
> --- a/drivers/gpio/Makefile
> +++ b/drivers/gpio/Makefile
> @@ -27,6 +27,7 @@ obj-$(CONFIG_GPIO_MC33880) += gpio-mc33880.o
> obj-$(CONFIG_GPIO_MCP23S08) += gpio-mcp23s08.o
> obj-$(CONFIG_GPIO_ML_IOH) += gpio-ml-ioh.o
> obj-$(CONFIG_GPIO_MPC5200) += gpio-mpc5200.o
> +obj-$(CONFIG_GPIO_MPC8XXX) += gpio-mpc8xxx.o
> obj-$(CONFIG_GPIO_MSM_V1) += gpio-msm-v1.o
> obj-$(CONFIG_GPIO_MSM_V2) += gpio-msm-v2.o
> obj-$(CONFIG_GPIO_MXC) += gpio-mxc.o
> diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c
> new file mode 100644
> index 0000000..fb4963a
> --- /dev/null
> +++ b/drivers/gpio/gpio-mpc8xxx.c
> @@ -0,0 +1,395 @@
> +/*
> + * GPIOs on MPC512x/8349/8572/8610 and compatible
> + *
> + * Copyright (C) 2008 Peter Korsgaard <jacmet@sunsite.dk>
> + *
> + * This file is licensed under the terms of the GNU General Public License
> + * version 2. This program is licensed "as is" without any warranty of any
> + * kind, whether express or implied.
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/init.h>
> +#include <linux/spinlock.h>
> +#include <linux/io.h>
> +#include <linux/of.h>
> +#include <linux/of_gpio.h>
> +#include <linux/gpio.h>
> +#include <linux/slab.h>
> +#include <linux/irq.h>
> +
> +#define MPC8XXX_GPIO_PINS 32
> +
> +#define GPIO_DIR 0x00
> +#define GPIO_ODR 0x04
> +#define GPIO_DAT 0x08
> +#define GPIO_IER 0x0c
> +#define GPIO_IMR 0x10
> +#define GPIO_ICR 0x14
> +#define GPIO_ICR2 0x18
> +
> +struct mpc8xxx_gpio_chip {
> + struct of_mm_gpio_chip mm_gc;
> + spinlock_t lock;
> +
> + /*
> + * shadowed data register to be able to clear/set output pins in
> + * open drain mode safely
> + */
> + u32 data;
> + struct irq_host *irq;
> + void *of_dev_id_data;
> +};
> +
> +static inline u32 mpc8xxx_gpio2mask(unsigned int gpio)
> +{
> + return 1u << (MPC8XXX_GPIO_PINS - 1 - gpio);
> +}
> +
> +static inline struct mpc8xxx_gpio_chip *
> +to_mpc8xxx_gpio_chip(struct of_mm_gpio_chip *mm)
> +{
> + return container_of(mm, struct mpc8xxx_gpio_chip, mm_gc);
> +}
> +
> +static void mpc8xxx_gpio_save_regs(struct of_mm_gpio_chip *mm)
> +{
> + struct mpc8xxx_gpio_chip *mpc8xxx_gc = to_mpc8xxx_gpio_chip(mm);
> +
> + mpc8xxx_gc->data = in_be32(mm->regs + GPIO_DAT);
> +}
> +
> +/* Workaround GPIO 1 errata on MPC8572/MPC8536. The status of GPIOs
> + * defined as output cannot be determined by reading GPDAT register,
> + * so we use shadow data register instead. The status of input pins
> + * is determined by reading GPDAT register.
> + */
> +static int mpc8572_gpio_get(struct gpio_chip *gc, unsigned int gpio)
> +{
> + u32 val;
> + struct of_mm_gpio_chip *mm = to_of_mm_gpio_chip(gc);
> + struct mpc8xxx_gpio_chip *mpc8xxx_gc = to_mpc8xxx_gpio_chip(mm);
> +
> + val = in_be32(mm->regs + GPIO_DAT) & ~in_be32(mm->regs + GPIO_DIR);
> +
> + return (val | mpc8xxx_gc->data) & mpc8xxx_gpio2mask(gpio);
> +}
> +
> +static int mpc8xxx_gpio_get(struct gpio_chip *gc, unsigned int gpio)
> +{
> + struct of_mm_gpio_chip *mm = to_of_mm_gpio_chip(gc);
> +
> + return in_be32(mm->regs + GPIO_DAT) & mpc8xxx_gpio2mask(gpio);
> +}
> +
> +static void mpc8xxx_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
> +{
> + struct of_mm_gpio_chip *mm = to_of_mm_gpio_chip(gc);
> + struct mpc8xxx_gpio_chip *mpc8xxx_gc = to_mpc8xxx_gpio_chip(mm);
> + unsigned long flags;
> +
> + spin_lock_irqsave(&mpc8xxx_gc->lock, flags);
> +
> + if (val)
> + mpc8xxx_gc->data |= mpc8xxx_gpio2mask(gpio);
> + else
> + mpc8xxx_gc->data &= ~mpc8xxx_gpio2mask(gpio);
> +
> + out_be32(mm->regs + GPIO_DAT, mpc8xxx_gc->data);
> +
> + spin_unlock_irqrestore(&mpc8xxx_gc->lock, flags);
> +}
> +
> +static int mpc8xxx_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio)
> +{
> + struct of_mm_gpio_chip *mm = to_of_mm_gpio_chip(gc);
> + struct mpc8xxx_gpio_chip *mpc8xxx_gc = to_mpc8xxx_gpio_chip(mm);
> + unsigned long flags;
> +
> + spin_lock_irqsave(&mpc8xxx_gc->lock, flags);
> +
> + clrbits32(mm->regs + GPIO_DIR, mpc8xxx_gpio2mask(gpio));
> +
> + spin_unlock_irqrestore(&mpc8xxx_gc->lock, flags);
> +
> + return 0;
> +}
> +
> +static int mpc8xxx_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
> +{
> + struct of_mm_gpio_chip *mm = to_of_mm_gpio_chip(gc);
> + struct mpc8xxx_gpio_chip *mpc8xxx_gc = to_mpc8xxx_gpio_chip(mm);
> + unsigned long flags;
> +
> + mpc8xxx_gpio_set(gc, gpio, val);
> +
> + spin_lock_irqsave(&mpc8xxx_gc->lock, flags);
> +
> + setbits32(mm->regs + GPIO_DIR, mpc8xxx_gpio2mask(gpio));
> +
> + spin_unlock_irqrestore(&mpc8xxx_gc->lock, flags);
> +
> + return 0;
> +}
> +
> +static int mpc8xxx_gpio_to_irq(struct gpio_chip *gc, unsigned offset)
> +{
> + struct of_mm_gpio_chip *mm = to_of_mm_gpio_chip(gc);
> + struct mpc8xxx_gpio_chip *mpc8xxx_gc = to_mpc8xxx_gpio_chip(mm);
> +
> + if (mpc8xxx_gc->irq && offset < MPC8XXX_GPIO_PINS)
> + return irq_create_mapping(mpc8xxx_gc->irq, offset);
> + else
> + return -ENXIO;
> +}
> +
> +static void mpc8xxx_gpio_irq_cascade(unsigned int irq, struct irq_desc *desc)
> +{
> + struct mpc8xxx_gpio_chip *mpc8xxx_gc = irq_desc_get_handler_data(desc);
> + struct of_mm_gpio_chip *mm = &mpc8xxx_gc->mm_gc;
> + unsigned int mask;
> +
> + mask = in_be32(mm->regs + GPIO_IER) & in_be32(mm->regs + GPIO_IMR);
> + if (mask)
> + generic_handle_irq(irq_linear_revmap(mpc8xxx_gc->irq,
> + 32 - ffs(mask)));
> +}
> +
> +static void mpc8xxx_irq_unmask(struct irq_data *d)
> +{
> + struct mpc8xxx_gpio_chip *mpc8xxx_gc = irq_data_get_irq_chip_data(d);
> + struct of_mm_gpio_chip *mm = &mpc8xxx_gc->mm_gc;
> + unsigned long flags;
> +
> + spin_lock_irqsave(&mpc8xxx_gc->lock, flags);
> +
> + setbits32(mm->regs + GPIO_IMR, mpc8xxx_gpio2mask(irqd_to_hwirq(d)));
> +
> + spin_unlock_irqrestore(&mpc8xxx_gc->lock, flags);
> +}
> +
> +static void mpc8xxx_irq_mask(struct irq_data *d)
> +{
> + struct mpc8xxx_gpio_chip *mpc8xxx_gc = irq_data_get_irq_chip_data(d);
> + struct of_mm_gpio_chip *mm = &mpc8xxx_gc->mm_gc;
> + unsigned long flags;
> +
> + spin_lock_irqsave(&mpc8xxx_gc->lock, flags);
> +
> + clrbits32(mm->regs + GPIO_IMR, mpc8xxx_gpio2mask(irqd_to_hwirq(d)));
> +
> + spin_unlock_irqrestore(&mpc8xxx_gc->lock, flags);
> +}
> +
> +static void mpc8xxx_irq_ack(struct irq_data *d)
> +{
> + struct mpc8xxx_gpio_chip *mpc8xxx_gc = irq_data_get_irq_chip_data(d);
> + struct of_mm_gpio_chip *mm = &mpc8xxx_gc->mm_gc;
> +
> + out_be32(mm->regs + GPIO_IER, mpc8xxx_gpio2mask(irqd_to_hwirq(d)));
> +}
> +
> +static int mpc8xxx_irq_set_type(struct irq_data *d, unsigned int flow_type)
> +{
> + struct mpc8xxx_gpio_chip *mpc8xxx_gc = irq_data_get_irq_chip_data(d);
> + struct of_mm_gpio_chip *mm = &mpc8xxx_gc->mm_gc;
> + unsigned long flags;
> +
> + switch (flow_type) {
> + case IRQ_TYPE_EDGE_FALLING:
> + spin_lock_irqsave(&mpc8xxx_gc->lock, flags);
> + setbits32(mm->regs + GPIO_ICR,
> + mpc8xxx_gpio2mask(irqd_to_hwirq(d)));
> + spin_unlock_irqrestore(&mpc8xxx_gc->lock, flags);
> + break;
> +
> + case IRQ_TYPE_EDGE_BOTH:
> + spin_lock_irqsave(&mpc8xxx_gc->lock, flags);
> + clrbits32(mm->regs + GPIO_ICR,
> + mpc8xxx_gpio2mask(irqd_to_hwirq(d)));
> + spin_unlock_irqrestore(&mpc8xxx_gc->lock, flags);
> + break;
> +
> + default:
> + return -EINVAL;
> + }
> +
> + return 0;
> +}
> +
> +static int mpc512x_irq_set_type(struct irq_data *d, unsigned int flow_type)
> +{
> + struct mpc8xxx_gpio_chip *mpc8xxx_gc = irq_data_get_irq_chip_data(d);
> + struct of_mm_gpio_chip *mm = &mpc8xxx_gc->mm_gc;
> + unsigned long gpio = irqd_to_hwirq(d);
> + void __iomem *reg;
> + unsigned int shift;
> + unsigned long flags;
> +
> + if (gpio < 16) {
> + reg = mm->regs + GPIO_ICR;
> + shift = (15 - gpio) * 2;
> + } else {
> + reg = mm->regs + GPIO_ICR2;
> + shift = (15 - (gpio % 16)) * 2;
> + }
> +
> + switch (flow_type) {
> + case IRQ_TYPE_EDGE_FALLING:
> + case IRQ_TYPE_LEVEL_LOW:
> + spin_lock_irqsave(&mpc8xxx_gc->lock, flags);
> + clrsetbits_be32(reg, 3 << shift, 2 << shift);
> + spin_unlock_irqrestore(&mpc8xxx_gc->lock, flags);
> + break;
> +
> + case IRQ_TYPE_EDGE_RISING:
> + case IRQ_TYPE_LEVEL_HIGH:
> + spin_lock_irqsave(&mpc8xxx_gc->lock, flags);
> + clrsetbits_be32(reg, 3 << shift, 1 << shift);
> + spin_unlock_irqrestore(&mpc8xxx_gc->lock, flags);
> + break;
> +
> + case IRQ_TYPE_EDGE_BOTH:
> + spin_lock_irqsave(&mpc8xxx_gc->lock, flags);
> + clrbits32(reg, 3 << shift);
> + spin_unlock_irqrestore(&mpc8xxx_gc->lock, flags);
> + break;
> +
> + default:
> + return -EINVAL;
> + }
> +
> + return 0;
> +}
> +
> +static struct irq_chip mpc8xxx_irq_chip = {
> + .name = "mpc8xxx-gpio",
> + .irq_unmask = mpc8xxx_irq_unmask,
> + .irq_mask = mpc8xxx_irq_mask,
> + .irq_ack = mpc8xxx_irq_ack,
> + .irq_set_type = mpc8xxx_irq_set_type,
> +};
> +
> +static int mpc8xxx_gpio_irq_map(struct irq_host *h, unsigned int virq,
> + irq_hw_number_t hw)
> +{
> + struct mpc8xxx_gpio_chip *mpc8xxx_gc = h->host_data;
> +
> + if (mpc8xxx_gc->of_dev_id_data)
> + mpc8xxx_irq_chip.irq_set_type = mpc8xxx_gc->of_dev_id_data;
> +
> + irq_set_chip_data(virq, h->host_data);
> + irq_set_chip_and_handler(virq, &mpc8xxx_irq_chip, handle_level_irq);
> + irq_set_irq_type(virq, IRQ_TYPE_NONE);
> +
> + return 0;
> +}
> +
> +static int mpc8xxx_gpio_irq_xlate(struct irq_host *h, struct device_node *ct,
> + const u32 *intspec, unsigned int intsize,
> + irq_hw_number_t *out_hwirq,
> + unsigned int *out_flags)
> +
> +{
> + /* interrupt sense values coming from the device tree equal either
> + * EDGE_FALLING or EDGE_BOTH
> + */
> + *out_hwirq = intspec[0];
> + *out_flags = intspec[1];
> +
> + return 0;
> +}
> +
> +static struct irq_host_ops mpc8xxx_gpio_irq_ops = {
> + .map = mpc8xxx_gpio_irq_map,
> + .xlate = mpc8xxx_gpio_irq_xlate,
> +};
> +
> +static struct of_device_id mpc8xxx_gpio_ids[] __initdata = {
> + { .compatible = "fsl,mpc8349-gpio", },
> + { .compatible = "fsl,mpc8572-gpio", },
> + { .compatible = "fsl,mpc8610-gpio", },
> + { .compatible = "fsl,mpc5121-gpio", .data = mpc512x_irq_set_type, },
> + { .compatible = "fsl,qoriq-gpio", },
> + {}
> +};
> +
> +static void __init mpc8xxx_add_controller(struct device_node *np)
> +{
> + struct mpc8xxx_gpio_chip *mpc8xxx_gc;
> + struct of_mm_gpio_chip *mm_gc;
> + struct gpio_chip *gc;
> + const struct of_device_id *id;
> + unsigned hwirq;
> + int ret;
> +
> + mpc8xxx_gc = kzalloc(sizeof(*mpc8xxx_gc), GFP_KERNEL);
> + if (!mpc8xxx_gc) {
> + ret = -ENOMEM;
> + goto err;
> + }
> +
> + spin_lock_init(&mpc8xxx_gc->lock);
> +
> + mm_gc = &mpc8xxx_gc->mm_gc;
> + gc = &mm_gc->gc;
> +
> + mm_gc->save_regs = mpc8xxx_gpio_save_regs;
> + gc->ngpio = MPC8XXX_GPIO_PINS;
> + gc->direction_input = mpc8xxx_gpio_dir_in;
> + gc->direction_output = mpc8xxx_gpio_dir_out;
> + if (of_device_is_compatible(np, "fsl,mpc8572-gpio"))
> + gc->get = mpc8572_gpio_get;
> + else
> + gc->get = mpc8xxx_gpio_get;
> + gc->set = mpc8xxx_gpio_set;
> + gc->to_irq = mpc8xxx_gpio_to_irq;
> +
> + ret = of_mm_gpiochip_add(np, mm_gc);
> + if (ret)
> + goto err;
> +
> + hwirq = irq_of_parse_and_map(np, 0);
> + if (hwirq == NO_IRQ)
> + goto skip_irq;
> +
> + mpc8xxx_gc->irq =
> + irq_alloc_host(np, IRQ_HOST_MAP_LINEAR, MPC8XXX_GPIO_PINS,
> + &mpc8xxx_gpio_irq_ops, MPC8XXX_GPIO_PINS);
> + if (!mpc8xxx_gc->irq)
> + goto skip_irq;
> +
> + id = of_match_node(mpc8xxx_gpio_ids, np);
> + if (id)
> + mpc8xxx_gc->of_dev_id_data = id->data;
> +
> + mpc8xxx_gc->irq->host_data = mpc8xxx_gc;
> +
> + /* ack and mask all irqs */
> + out_be32(mm_gc->regs + GPIO_IER, 0xffffffff);
> + out_be32(mm_gc->regs + GPIO_IMR, 0);
> +
> + irq_set_handler_data(hwirq, mpc8xxx_gc);
> + irq_set_chained_handler(hwirq, mpc8xxx_gpio_irq_cascade);
> +
> +skip_irq:
> + return;
> +
> +err:
> + pr_err("%s: registration failed with status %d\n",
> + np->full_name, ret);
> + kfree(mpc8xxx_gc);
> +
> + return;
> +}
> +
> +static int __init mpc8xxx_add_gpiochips(void)
> +{
> + struct device_node *np;
> +
> + for_each_matching_node(np, mpc8xxx_gpio_ids)
> + mpc8xxx_add_controller(np);
> +
> + return 0;
> +}
> +arch_initcall(mpc8xxx_add_gpiochips);
> --
> 1.7.5.4
>
^ permalink raw reply
* [PATCH] drivers/tty: don't use the byte channel handle as a parameter in ehv_bytechan.c
From: Timur Tabi @ 2011-09-20 18:26 UTC (permalink / raw)
To: greg, linux-kernel, linuxppc-dev, linux-console
The ePAPR hypervisor byte channel console driver only supports one byte
channel as a console, and the byte channel handle is stored in a global
variable. It doesn't make any sense to pass that handle as a parameter
to the console functions, since these functions already have access to the
global variable.
This change also fixes this compilation warning on a 64-bit kernel:
CC drivers/tty/ehv_bytechan.o
drivers/tty/ehv_bytechan.c: In function 'ehv_bc_console_write':
drivers/tty/ehv_bytechan.c:289:24: warning: cast from pointer to integer of different size
drivers/tty/ehv_bytechan.c: In function 'ehv_bc_console_init':
drivers/tty/ehv_bytechan.c:355:24: warning: cast to pointer from integer of different size
This warning is because the driver is converting the integer byte channel
handle to/from the void* 'data' field of struct console. Rather than fix
the warning, we just eliminate the code altogether.
Signed-off-by: Timur Tabi <timur@freescale.com>
---
drivers/tty/ehv_bytechan.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/tty/ehv_bytechan.c b/drivers/tty/ehv_bytechan.c
index e67f70b..b24e6f7 100644
--- a/drivers/tty/ehv_bytechan.c
+++ b/drivers/tty/ehv_bytechan.c
@@ -286,7 +286,6 @@ static int ehv_bc_console_byte_channel_send(unsigned int handle, const char *s,
static void ehv_bc_console_write(struct console *co, const char *s,
unsigned int count)
{
- unsigned int handle = (unsigned int)co->data;
char s2[EV_BYTE_CHANNEL_MAX_BYTES];
unsigned int i, j = 0;
char c;
@@ -299,14 +298,14 @@ static void ehv_bc_console_write(struct console *co, const char *s,
s2[j++] = c;
if (j >= (EV_BYTE_CHANNEL_MAX_BYTES - 1)) {
- if (ehv_bc_console_byte_channel_send(handle, s2, j))
+ if (ehv_bc_console_byte_channel_send(stdout_bc, s2, j))
return;
j = 0;
}
}
if (j)
- ehv_bc_console_byte_channel_send(handle, s2, j);
+ ehv_bc_console_byte_channel_send(stdout_bc, s2, j);
}
/*
@@ -352,8 +351,6 @@ static int __init ehv_bc_console_init(void)
CONFIG_PPC_EARLY_DEBUG_EHV_BC_HANDLE);
#endif
- ehv_bc_console.data = (void *)stdout_bc;
-
/* add_preferred_console() must be called before register_console(),
otherwise it won't work. However, we don't want to enumerate all the
byte channels here, either, since we only care about one. */
--
1.7.3.4
^ permalink raw reply related
* Re: power-next
From: Benjamin Herrenschmidt @ 2011-09-20 18:45 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev
In-Reply-To: <20110920203039.930cb5e60e3f0743b2d43cd8@canb.auug.org.au>
On Tue, 2011-09-20 at 20:30 +1000, Stephen Rothwell wrote:
> Hi Ben,
>
> On Tue, 20 Sep 2011 16:46:14 +1000 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> >
> > Hi folks !
> >
> > So I've finally got to setup a branch on github for powerpc next.
> >
> > I've also committed a bunch of stuff to it, so here it is. I'll go back
> > to kernel.org as soon as it's been fixed.
> >
> > https://github.com/ozbenh/linux/commits/next
>
> OK, tomorrow I will switch to the "next" branch of
> git://github.com/ozbenh/linux.git ... are you also going to create a
> "merge" branch?
Only if/when I need it.
Cheers,
Ben.
^ permalink raw reply
* Re: [PATCH] fsl-diu-fb: remove the ioctl interface
From: Tabi Timur-B04825 @ 2011-09-21 2:10 UTC (permalink / raw)
To: Anatolij Gustschin; +Cc: linuxppc-dev@ozlabs.org, linux-fbdev@vger.kernel.org
In-Reply-To: <20110622221143.503add74@wker>
Anatolij,
I'm sorry to resurrect an old thread, but ...
On Wed, Jun 22, 2011 at 3:11 PM, Anatolij Gustschin <agust@denx.de> wrote:
> On Tue, 21 Jun 2011 23:13:11 +0000
> Tabi Timur-B04825 <B04825@freescale.com> wrote:
>
>> Anatolij Gustschin wrote:
>> > No! We are using ioctl interface of this driver in many video
>> > rendering applications on overlay planes on huge number of boards.
>> > So, please don't remove it.
>>
>> Ok, I had no idea anyone was using it.
>>
>> Can you email me details about how you use the ioctl interface? =A0If I =
can't
>> remove it, maybe I can clean it up.
>
> Following DIU specific ioctls are used:
>
> MFB_SET_CHROMA_KEY
> MFB_SET_PIXFMT
> MFB_GET_PIXFMT
> MFB_SET_AOID
> MFB_GET_AOID
> MFB_GET_ALPHA
> MFB_SET_ALPHA
The definitions of MFB_SET_PIXFMT and MFB_GET_PIXFMT are wrong:
#define MFB_SET_PIXFMT 0x80014d08
#define MFB_GET_PIXFMT 0x40014d08
The "01" is the size. However, these ioctls take a __u32 as a parameter.
This means that I have to fix the definitions to this:
#define MFB_SET_PIXFMT _IOW('M', 8, __u32)
#define MFB_GET_PIXFMT _IOR('M', 8, __u32)
This will change the values and break binary compatibility with your
applications. Are you okay with that?
> Other ioctls can be removed. I'm not sure if someone
> uses FBIOGET_GWINFO. If there are no objections from
> other people, it can also be dropped.
I'm going to remove FBIOGET_GWINFO because no one is using it, and the
ioctl value is malformed (it doesn't define a direction or size).
--=20
Timur Tabi
Linux kernel developer at Freescale=
^ permalink raw reply
* linux-next: manual merge of the tty tree with the powerpc tree
From: Stephen Rothwell @ 2011-09-21 5:01 UTC (permalink / raw)
To: Greg KH
Cc: Geoff Levand, Andre Heider, linux-kernel, linux-next,
Paul Mackerras, Hector Martin, linuxppc-dev
Hi Greg,
Today's linux-next merge of the tty tree got conflicts in
arch/powerpc/include/asm/udbg.h and arch/powerpc/kernel/udbg.c between
commit c26afe9e8591 ("powerpc/ps3: Add gelic udbg driver") from the
powerpc tree and commit dcd83aaff1c8 ("tty/powerpc: introduce the ePAPR
embedded hypervisor byte channel driver") from the tty tree.
Just context changes. I fixed it up (see below) and can carry the fix as
necessary.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc arch/powerpc/include/asm/udbg.h
index 6587ec7,5354ae9..0000000
--- a/arch/powerpc/include/asm/udbg.h
+++ b/arch/powerpc/include/asm/udbg.h
@@@ -54,9 -54,7 +54,10 @@@ extern void __init udbg_init_40x_realmo
extern void __init udbg_init_cpm(void);
extern void __init udbg_init_usbgecko(void);
extern void __init udbg_init_wsp(void);
+extern void __init udbg_init_ps3gelic(void);
+extern void __init udbg_init_debug_opal_raw(void);
+extern void __init udbg_init_debug_opal_hvsi(void);
+ extern void __init udbg_init_ehv_bc(void);
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_UDBG_H */
diff --cc arch/powerpc/kernel/udbg.c
index 35f9482,b4607a9..0000000
--- a/arch/powerpc/kernel/udbg.c
+++ b/arch/powerpc/kernel/udbg.c
@@@ -67,12 -67,8 +67,14 @@@ void __init udbg_early_init(void
udbg_init_usbgecko();
#elif defined(CONFIG_PPC_EARLY_DEBUG_WSP)
udbg_init_wsp();
+#elif defined(CONFIG_PPC_EARLY_DEBUG_PS3GELIC)
+ udbg_init_ps3gelic();
+#elif defined(CONFIG_PPC_EARLY_DEBUG_OPAL_RAW)
+ udbg_init_debug_opal_raw();
+#elif defined(CONFIG_PPC_EARLY_DEBUG_OPAL_HVSI)
+ udbg_init_debug_opal_hvsi();
+ #elif defined(CONFIG_PPC_EARLY_DEBUG_EHV_BC)
+ udbg_init_ehv_bc();
#endif
#ifdef CONFIG_PPC_EARLY_DEBUG
^ permalink raw reply
* linux-next: manual merge of the moduleh tree with the powerpc tree
From: Stephen Rothwell @ 2011-09-21 5:04 UTC (permalink / raw)
To: Paul Gortmaker; +Cc: linux-kernel, linux-next, Paul Mackerras, linuxppc-dev
Hi Paul,
Today's linux-next merge of the moduleh tree got a conflict in
arch/powerpc/mm/tlb_nohash.c between commit 41151e77a4d9 ("powerpc:
Hugetlb for BookE") from the powerpc tree and commit 09773e3bc0e4
("powerpc: include export.h for files using EXPORT_SYMBOL/THIS_MODULE")
from the moduleh tree.
Just context changes. I fixed it up (see below) and can carry the fix as
necessary.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc arch/powerpc/mm/tlb_nohash.c
index afc95c7,ab06aea..0000000
--- a/arch/powerpc/mm/tlb_nohash.c
+++ b/arch/powerpc/mm/tlb_nohash.c
@@@ -36,7 -36,7 +36,8 @@@
#include <linux/spinlock.h>
#include <linux/memblock.h>
#include <linux/of_fdt.h>
+#include <linux/hugetlb.h>
+ #include <linux/export.h>
#include <asm/tlbflush.h>
#include <asm/tlb.h>
^ permalink raw reply
* [PATCH] powerpc: Fix hugetlb with CONFIG_PPC_MM_SLICES=y
From: Paul Mackerras @ 2011-09-21 5:58 UTC (permalink / raw)
To: linuxppc-dev
Commit 41151e77a4 ("powerpc: Hugetlb for BookE") added some
#ifdef CONFIG_MM_SLICES conditionals to hugetlb_get_unmapped_area()
and vma_mmu_pagesize(). Unfortunately this is not the correct config
symbol; it should be CONFIG_PPC_MM_SLICES. The result is that
attempting to use hugetlbfs on 64-bit Power server processors results
in an infinite stack recursion between get_unmapped_area() and
hugetlb_get_unmapped_area().
This fixes it by changing the #ifdef to use CONFIG_PPC_MM_SLICES
in those functions and also in book3e_hugetlb_preload().
Signed-off-by: Paul Mackerras <paulus@samba.org>
---
arch/powerpc/mm/hugetlbpage-book3e.c | 2 +-
arch/powerpc/mm/hugetlbpage.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/mm/hugetlbpage-book3e.c b/arch/powerpc/mm/hugetlbpage-book3e.c
index 1295b7c..343ad0b 100644
--- a/arch/powerpc/mm/hugetlbpage-book3e.c
+++ b/arch/powerpc/mm/hugetlbpage-book3e.c
@@ -52,7 +52,7 @@ void book3e_hugetlb_preload(struct mm_struct *mm, unsigned long ea, pte_t pte)
if (unlikely(is_kernel_addr(ea)))
return;
-#ifdef CONFIG_MM_SLICES
+#ifdef CONFIG_PPC_MM_SLICES
psize = mmu_get_tsize(get_slice_psize(mm, ea));
tsize = mmu_get_psize(psize);
shift = mmu_psize_defs[psize].shift;
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index 3a5f59d..48b65be 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -690,7 +690,7 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
unsigned long len, unsigned long pgoff,
unsigned long flags)
{
-#ifdef CONFIG_MM_SLICES
+#ifdef CONFIG_PPC_MM_SLICES
struct hstate *hstate = hstate_file(file);
int mmu_psize = shift_to_mmu_psize(huge_page_shift(hstate));
@@ -702,7 +702,7 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
unsigned long vma_mmu_pagesize(struct vm_area_struct *vma)
{
-#ifdef CONFIG_MM_SLICES
+#ifdef CONFIG_PPC_MM_SLICES
unsigned int psize = get_slice_psize(vma->vm_mm, vma->vm_start);
return 1UL << mmu_psize_to_shift(psize);
--
1.7.5.4
^ permalink raw reply related
* Re: Timer interrupt on Linux 3.0.3
From: Vineeth @ 2011-09-21 6:56 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev, linux-embedded
In-Reply-To: <4E73816C.6000304@freescale.com>
[-- Attachment #1: Type: text/plain, Size: 1453 bytes --]
>> What was the issue? You really should try to make this work rather than
>> hack around it.
what we found was the decrementer is not generating an exception when it
becomes 0. and the timebase registers are not getting incremented too. The
exceptions are enabled in MSR registers.
we are using embedded60x port of linux3.0.3; we've written the dts file with
proper clock-frequency/timebase-frequency values.
Do you think we might've missed some configuration in the timer perspective
?
On Fri, Sep 16, 2011 at 10:33 PM, Scott Wood <scottwood@freescale.com>wrote:
> On 09/16/2011 06:43 AM, Vineeth wrote:
> > Hi,
> >
> > We are porting Linux on MPC7410 based board. As there was some issue
> > with the processor DECrementer and timebase registers,
>
> What was the issue? You really should try to make this work rather than
> hack around it.
>
> > lately we moved to Linux 3.0.3. What we found was even without a proper
> > timer, the kernel with initramfs worked (except the calls like
> > sleep,delay ofcourse); Is there any major difference in the scheduler ?
> > or the way context switch happens ? is it not depended on the timer
> > interrupt or the timer ??
>
> If your timer is broken then you won't get timeslice expiration, but
> basic scheduling should still work. Most scheduling (depending on type
> of load, of course) will be triggered by processes blocking or being
> woken up by I/O, not timeslice expiration.
>
> -Scott
>
>
[-- Attachment #2: Type: text/html, Size: 1918 bytes --]
^ permalink raw reply
* Re: [PATCH] fsl-diu-fb: remove the ioctl interface
From: Anatolij Gustschin @ 2011-09-21 8:29 UTC (permalink / raw)
To: Tabi Timur-B04825; +Cc: linuxppc-dev@ozlabs.org, linux-fbdev@vger.kernel.org
In-Reply-To: <CAOZdJXUZsByLorWZNtDRMzsezF_qVX62+8zfiMKJqMMhCD2i3g@mail.gmail.com>
On Wed, 21 Sep 2011 02:10:42 +0000
Tabi Timur-B04825 <B04825@freescale.com> wrote:
...
> The definitions of MFB_SET_PIXFMT and MFB_GET_PIXFMT are wrong:
>
> #define MFB_SET_PIXFMT 0x80014d08
> #define MFB_GET_PIXFMT 0x40014d08
>
> The "01" is the size. However, these ioctls take a __u32 as a parameter.
>
> This means that I have to fix the definitions to this:
>
> #define MFB_SET_PIXFMT _IOW('M', 8, __u32)
> #define MFB_GET_PIXFMT _IOR('M', 8, __u32)
>
> This will change the values and break binary compatibility with your
> applications. Are you okay with that?
yes. the app will be fixed for updated kernel.
> > Other ioctls can be removed. I'm not sure if someone
> > uses FBIOGET_GWINFO. If there are no objections from
> > other people, it can also be dropped.
>
> I'm going to remove FBIOGET_GWINFO because no one is using it, and the
> ioctl value is malformed (it doesn't define a direction or size).
okay.
Thanks,
Anatolij
^ permalink raw reply
* [PATCH 15/57] powerpc: irq: Remove IRQF_DISABLED
From: Yong Zhang @ 2011-09-21 9:28 UTC (permalink / raw)
To: linux-arch, linux-kernel
Cc: Meador Inge, cbe-oss-dev, Arnd Bergmann, Geoff Levand,
Milton Miller, Michael Ellerman, yong.zhang0, Paul Mackerras,
Scott Wood, tglx, linuxppc-dev
In-Reply-To: <1316597339-29861-1-git-send-email-yong.zhang0@gmail.com>
Since commit [c58543c8: genirq: Run irq handlers with interrupts disabled],
We run all interrupt handlers with interrupts disabled
and we even check and yell when an interrupt handler
returns with interrupts enabled (see commit [b738a50a:
genirq: Warn when handler enables interrupts]).
So now this flag is a NOOP and can be removed.
Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
arch/powerpc/include/asm/floppy.h | 4 ++--
arch/powerpc/include/asm/xics.h | 4 ++--
arch/powerpc/kernel/smp.c | 2 +-
arch/powerpc/platforms/cell/beat.c | 2 +-
arch/powerpc/platforms/cell/celleb_scc_pciex.c | 2 +-
arch/powerpc/platforms/cell/iommu.c | 3 +--
arch/powerpc/platforms/cell/pmu.c | 2 +-
arch/powerpc/platforms/cell/spu_base.c | 9 +++------
arch/powerpc/platforms/powermac/pic.c | 1 -
arch/powerpc/platforms/powermac/smp.c | 4 ++--
arch/powerpc/platforms/ps3/device-init.c | 2 +-
arch/powerpc/sysdev/mpic.c | 2 --
arch/powerpc/sysdev/ppc4xx_soc.c | 2 +-
arch/powerpc/sysdev/xics/xics-common.c | 5 ++---
14 files changed, 18 insertions(+), 26 deletions(-)
diff --git a/arch/powerpc/include/asm/floppy.h b/arch/powerpc/include/asm/floppy.h
index 24bd34c..936a904 100644
--- a/arch/powerpc/include/asm/floppy.h
+++ b/arch/powerpc/include/asm/floppy.h
@@ -108,10 +108,10 @@ static int fd_request_irq(void)
{
if (can_use_virtual_dma)
return request_irq(FLOPPY_IRQ, floppy_hardint,
- IRQF_DISABLED, "floppy", NULL);
+ 0, "floppy", NULL);
else
return request_irq(FLOPPY_IRQ, floppy_interrupt,
- IRQF_DISABLED, "floppy", NULL);
+ 0, "floppy", NULL);
}
static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io)
diff --git a/arch/powerpc/include/asm/xics.h b/arch/powerpc/include/asm/xics.h
index b183a40..c78e58a 100644
--- a/arch/powerpc/include/asm/xics.h
+++ b/arch/powerpc/include/asm/xics.h
@@ -15,8 +15,8 @@
#define DEFAULT_PRIORITY 5
/*
- * Mark IPIs as higher priority so we can take them inside interrupts that
- * arent marked IRQF_DISABLED
+ * Mark IPIs as higher priority so we can take them inside interrupts
+ * FIXME: still true now?
*/
#define IPI_PRIORITY 4
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 37f4c98..e1195a2 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -170,7 +170,7 @@ int smp_request_message_ipi(int virq, int msg)
return 1;
}
#endif
- err = request_irq(virq, smp_ipi_action[msg], IRQF_DISABLED|IRQF_PERCPU,
+ err = request_irq(virq, smp_ipi_action[msg], IRQF_PERCPU,
smp_ipi_name[msg], 0);
WARN(err < 0, "unable to request_irq %d for %s (rc %d)\n",
virq, smp_ipi_name[msg], err);
diff --git a/arch/powerpc/platforms/cell/beat.c b/arch/powerpc/platforms/cell/beat.c
index 232fc38..852592b 100644
--- a/arch/powerpc/platforms/cell/beat.c
+++ b/arch/powerpc/platforms/cell/beat.c
@@ -230,7 +230,7 @@ static int __init beat_register_event(void)
}
ev->virq = virq;
- rc = request_irq(virq, ev->handler, IRQF_DISABLED,
+ rc = request_irq(virq, ev->handler, 0,
ev->typecode, NULL);
if (rc != 0) {
printk(KERN_ERR "Beat: failed to request virtual IRQ"
diff --git a/arch/powerpc/platforms/cell/celleb_scc_pciex.c b/arch/powerpc/platforms/cell/celleb_scc_pciex.c
index ae790ac..14be2bd 100644
--- a/arch/powerpc/platforms/cell/celleb_scc_pciex.c
+++ b/arch/powerpc/platforms/cell/celleb_scc_pciex.c
@@ -514,7 +514,7 @@ static __init int celleb_setup_pciex(struct device_node *node,
virq = irq_create_of_mapping(oirq.controller, oirq.specifier,
oirq.size);
if (request_irq(virq, pciex_handle_internal_irq,
- IRQF_DISABLED, "pciex", (void *)phb)) {
+ 0, "pciex", (void *)phb)) {
pr_err("PCIEXC:Failed to request irq\n");
goto error;
}
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
index 26a0671..afdcd5b 100644
--- a/arch/powerpc/platforms/cell/iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -412,8 +412,7 @@ static void cell_iommu_enable_hardware(struct cbe_iommu *iommu)
IIC_IRQ_IOEX_ATI | (iommu->nid << IIC_IRQ_NODE_SHIFT));
BUG_ON(virq == NO_IRQ);
- ret = request_irq(virq, ioc_interrupt, IRQF_DISABLED,
- iommu->name, iommu);
+ ret = request_irq(virq, ioc_interrupt, 0, iommu->name, iommu);
BUG_ON(ret);
/* set the IOC segment table origin register (and turn on the iommu) */
diff --git a/arch/powerpc/platforms/cell/pmu.c b/arch/powerpc/platforms/cell/pmu.c
index 1acf360..59c1a16 100644
--- a/arch/powerpc/platforms/cell/pmu.c
+++ b/arch/powerpc/platforms/cell/pmu.c
@@ -392,7 +392,7 @@ static int __init cbe_init_pm_irq(void)
}
rc = request_irq(irq, cbe_pm_irq,
- IRQF_DISABLED, "cbe-pmu-0", NULL);
+ 0, "cbe-pmu-0", NULL);
if (rc) {
printk("ERROR: Request for irq on node %d failed\n",
node);
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c
index 3675da7..e94d3ec 100644
--- a/arch/powerpc/platforms/cell/spu_base.c
+++ b/arch/powerpc/platforms/cell/spu_base.c
@@ -442,8 +442,7 @@ static int spu_request_irqs(struct spu *spu)
snprintf(spu->irq_c0, sizeof (spu->irq_c0), "spe%02d.0",
spu->number);
ret = request_irq(spu->irqs[0], spu_irq_class_0,
- IRQF_DISABLED,
- spu->irq_c0, spu);
+ 0, spu->irq_c0, spu);
if (ret)
goto bail0;
}
@@ -451,8 +450,7 @@ static int spu_request_irqs(struct spu *spu)
snprintf(spu->irq_c1, sizeof (spu->irq_c1), "spe%02d.1",
spu->number);
ret = request_irq(spu->irqs[1], spu_irq_class_1,
- IRQF_DISABLED,
- spu->irq_c1, spu);
+ 0, spu->irq_c1, spu);
if (ret)
goto bail1;
}
@@ -460,8 +458,7 @@ static int spu_request_irqs(struct spu *spu)
snprintf(spu->irq_c2, sizeof (spu->irq_c2), "spe%02d.2",
spu->number);
ret = request_irq(spu->irqs[2], spu_irq_class_2,
- IRQF_DISABLED,
- spu->irq_c2, spu);
+ 0, spu->irq_c2, spu);
if (ret)
goto bail2;
}
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c
index cb40e92..901bfbd 100644
--- a/arch/powerpc/platforms/powermac/pic.c
+++ b/arch/powerpc/platforms/powermac/pic.c
@@ -272,7 +272,6 @@ static struct irqaction xmon_action = {
static struct irqaction gatwick_cascade_action = {
.handler = gatwick_action,
- .flags = IRQF_DISABLED,
.name = "cascade",
};
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
index 9a521dc..9b6a820 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -200,7 +200,7 @@ static int psurge_secondary_ipi_init(void)
if (psurge_secondary_virq)
rc = request_irq(psurge_secondary_virq, psurge_ipi_intr,
- IRQF_DISABLED|IRQF_PERCPU, "IPI", NULL);
+ IRQF_PERCPU, "IPI", NULL);
if (rc)
pr_err("Failed to setup secondary cpu IPI\n");
@@ -408,7 +408,7 @@ static int __init smp_psurge_kick_cpu(int nr)
static struct irqaction psurge_irqaction = {
.handler = psurge_ipi_intr,
- .flags = IRQF_DISABLED|IRQF_PERCPU,
+ .flags = IRQF_PERCPU,
.name = "primary IPI",
};
diff --git a/arch/powerpc/platforms/ps3/device-init.c b/arch/powerpc/platforms/ps3/device-init.c
index 6c4b583..3f175e8 100644
--- a/arch/powerpc/platforms/ps3/device-init.c
+++ b/arch/powerpc/platforms/ps3/device-init.c
@@ -825,7 +825,7 @@ static int ps3_probe_thread(void *data)
spin_lock_init(&dev.lock);
- res = request_irq(irq, ps3_notification_interrupt, IRQF_DISABLED,
+ res = request_irq(irq, ps3_notification_interrupt, 0,
"ps3_notification", &dev);
if (res) {
pr_err("%s:%u: request_irq failed %d\n", __func__, __LINE__,
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index d5d3ff3..5216d3e 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -800,8 +800,6 @@ static void mpic_end_ipi(struct irq_data *d)
* IPIs are marked IRQ_PER_CPU. This has the side effect of
* preventing the IRQ_PENDING/IRQ_INPROGRESS logic from
* applying to them. We EOI them late to avoid re-entering.
- * We mark IPI's with IRQF_DISABLED as they must run with
- * irqs disabled.
*/
mpic_eoi(mpic);
}
diff --git a/arch/powerpc/sysdev/ppc4xx_soc.c b/arch/powerpc/sysdev/ppc4xx_soc.c
index d3d6ce3..0debcc3 100644
--- a/arch/powerpc/sysdev/ppc4xx_soc.c
+++ b/arch/powerpc/sysdev/ppc4xx_soc.c
@@ -115,7 +115,7 @@ static int __init ppc4xx_l2c_probe(void)
}
/* Install error handler */
- if (request_irq(irq, l2c_error_handler, IRQF_DISABLED, "L2C", 0) < 0) {
+ if (request_irq(irq, l2c_error_handler, 0, "L2C", 0) < 0) {
printk(KERN_ERR "Cannot install L2C error handler"
", cache is not enabled\n");
of_node_put(np);
diff --git a/arch/powerpc/sysdev/xics/xics-common.c b/arch/powerpc/sysdev/xics/xics-common.c
index 445c5a0..ae5cdc3 100644
--- a/arch/powerpc/sysdev/xics/xics-common.c
+++ b/arch/powerpc/sysdev/xics/xics-common.c
@@ -134,11 +134,10 @@ static void xics_request_ipi(void)
BUG_ON(ipi == NO_IRQ);
/*
- * IPIs are marked IRQF_DISABLED as they must run with irqs
- * disabled, and PERCPU. The handler was set in map.
+ * IPIs are marked IRQF_PERCPU. The handler was set in map.
*/
BUG_ON(request_irq(ipi, icp_ops->ipi_action,
- IRQF_DISABLED|IRQF_PERCPU, "IPI", NULL));
+ IRQF_PERCPU, "IPI", NULL));
}
int __init xics_smp_probe(void)
--
1.7.4.1
^ permalink raw reply related
* [PATCH 45/57] powerpc/ps3: irq: Remove IRQF_DISABLED
From: Yong Zhang @ 2011-09-21 9:28 UTC (permalink / raw)
To: linux-arch, linux-kernel
Cc: Geoff Levand, yong.zhang0, tglx, linuxppc-dev, cbe-oss-dev
In-Reply-To: <1316597339-29861-1-git-send-email-yong.zhang0@gmail.com>
Since commit [c58543c8: genirq: Run irq handlers with interrupts disabled],
We run all interrupt handlers with interrupts disabled
and we even check and yell when an interrupt handler
returns with interrupts enabled (see commit [b738a50a:
genirq: Warn when handler enables interrupts]).
So now this flag is a NOOP and can be removed.
Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Acked-by: Geoff Levand <geoff@infradead.org>
---
drivers/ps3/ps3-vuart.c | 2 +-
drivers/ps3/ps3stor_lib.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/ps3/ps3-vuart.c b/drivers/ps3/ps3-vuart.c
index d9fb729..fb73008 100644
--- a/drivers/ps3/ps3-vuart.c
+++ b/drivers/ps3/ps3-vuart.c
@@ -952,7 +952,7 @@ static int ps3_vuart_bus_interrupt_get(void)
}
result = request_irq(vuart_bus_priv.virq, ps3_vuart_irq_handler,
- IRQF_DISABLED, "vuart", &vuart_bus_priv);
+ 0, "vuart", &vuart_bus_priv);
if (result) {
pr_debug("%s:%d: request_irq failed (%d)\n",
diff --git a/drivers/ps3/ps3stor_lib.c b/drivers/ps3/ps3stor_lib.c
index cc328de..8c3f5ad 100644
--- a/drivers/ps3/ps3stor_lib.c
+++ b/drivers/ps3/ps3stor_lib.c
@@ -167,7 +167,7 @@ int ps3stor_setup(struct ps3_storage_device *dev, irq_handler_t handler)
goto fail_close_device;
}
- error = request_irq(dev->irq, handler, IRQF_DISABLED,
+ error = request_irq(dev->irq, handler, 0,
dev->sbd.core.driver->name, dev);
if (error) {
dev_err(&dev->sbd.core, "%s:%u: request_irq failed %d\n",
--
1.7.4.1
^ permalink raw reply related
* [PATCH 49/57] video: irq: Remove IRQF_DISABLED
From: Yong Zhang @ 2011-09-21 9:28 UTC (permalink / raw)
To: linux-arch, linux-kernel
Cc: linux-fbdev, Paul Gortmaker, Laurent Pinchart, Daniel Walker,
Kukjin Kim, Florian Tobias Schandinat, Tomi Valkeinen,
Archit Taneja, David Brown, Anatolij Gustschin, cbe-oss-dev,
Wan ZongShun, linux-arm-msm, yong.zhang0, Ben Dooks, tglx,
linux-omap, linux-arm-kernel, Geoff Levand, Jiri Kosina,
Bryan Huntsman, Andrew Morton, linuxppc-dev
In-Reply-To: <1316597339-29861-1-git-send-email-yong.zhang0@gmail.com>
Since commit [c58543c8: genirq: Run irq handlers with interrupts disabled],
We run all interrupt handlers with interrupts disabled
and we even check and yell when an interrupt handler
returns with interrupts enabled (see commit [b738a50a:
genirq: Warn when handler enables interrupts]).
So now this flag is a NOOP and can be removed.
Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
---
drivers/video/au1200fb.c | 2 +-
drivers/video/bf54x-lq043fb.c | 2 +-
drivers/video/bfin-lq035q1-fb.c | 2 +-
drivers/video/bfin-t350mcqb-fb.c | 2 +-
drivers/video/bfin_adv7393fb.c | 2 +-
drivers/video/mb862xx/mb862xxfbdrv.c | 4 ++--
drivers/video/msm/mddi.c | 2 +-
drivers/video/msm/mdp.c | 2 +-
drivers/video/nuc900fb.c | 2 +-
drivers/video/omap2/displays/panel-taal.c | 2 +-
drivers/video/ps3fb.c | 2 +-
drivers/video/pxa3xx-gcu.c | 2 +-
drivers/video/pxafb.c | 2 +-
drivers/video/s3c2410fb.c | 2 +-
drivers/video/sa1100fb.c | 3 +--
drivers/video/sh_mobile_lcdcfb.c | 2 +-
drivers/video/tmiofb.c | 2 +-
drivers/video/vt8500lcdfb.c | 2 +-
18 files changed, 19 insertions(+), 20 deletions(-)
diff --git a/drivers/video/au1200fb.c b/drivers/video/au1200fb.c
index a19a40e..7200559 100644
--- a/drivers/video/au1200fb.c
+++ b/drivers/video/au1200fb.c
@@ -1673,7 +1673,7 @@ static int __devinit au1200fb_drv_probe(struct platform_device *dev)
/* Now hook interrupt too */
irq = platform_get_irq(dev, 0);
ret = request_irq(irq, au1200fb_handle_irq,
- IRQF_DISABLED | IRQF_SHARED, "lcd", (void *)dev);
+ IRQF_SHARED, "lcd", (void *)dev);
if (ret) {
print_err("fail to request interrupt line %d (err: %d)",
irq, ret);
diff --git a/drivers/video/bf54x-lq043fb.c b/drivers/video/bf54x-lq043fb.c
index 2464b91..56720fb 100644
--- a/drivers/video/bf54x-lq043fb.c
+++ b/drivers/video/bf54x-lq043fb.c
@@ -633,7 +633,7 @@ static int __devinit bfin_bf54x_probe(struct platform_device *pdev)
goto out7;
}
- if (request_irq(info->irq, bfin_bf54x_irq_error, IRQF_DISABLED,
+ if (request_irq(info->irq, bfin_bf54x_irq_error, 0,
"PPI ERROR", info) < 0) {
printk(KERN_ERR DRIVER_NAME
": unable to request PPI ERROR IRQ\n");
diff --git a/drivers/video/bfin-lq035q1-fb.c b/drivers/video/bfin-lq035q1-fb.c
index 23b6c4b..c633068 100644
--- a/drivers/video/bfin-lq035q1-fb.c
+++ b/drivers/video/bfin-lq035q1-fb.c
@@ -695,7 +695,7 @@ static int __devinit bfin_lq035q1_probe(struct platform_device *pdev)
goto out7;
}
- ret = request_irq(info->irq, bfin_lq035q1_irq_error, IRQF_DISABLED,
+ ret = request_irq(info->irq, bfin_lq035q1_irq_error, 0,
DRIVER_NAME" PPI ERROR", info);
if (ret < 0) {
dev_err(&pdev->dev, "unable to request PPI ERROR IRQ\n");
diff --git a/drivers/video/bfin-t350mcqb-fb.c b/drivers/video/bfin-t350mcqb-fb.c
index d8de29f..d5e1267 100644
--- a/drivers/video/bfin-t350mcqb-fb.c
+++ b/drivers/video/bfin-t350mcqb-fb.c
@@ -529,7 +529,7 @@ static int __devinit bfin_t350mcqb_probe(struct platform_device *pdev)
goto out7;
}
- ret = request_irq(info->irq, bfin_t350mcqb_irq_error, IRQF_DISABLED,
+ ret = request_irq(info->irq, bfin_t350mcqb_irq_error, 0,
"PPI ERROR", info);
if (ret < 0) {
printk(KERN_ERR DRIVER_NAME
diff --git a/drivers/video/bfin_adv7393fb.c b/drivers/video/bfin_adv7393fb.c
index 8486f54..811dd7f 100644
--- a/drivers/video/bfin_adv7393fb.c
+++ b/drivers/video/bfin_adv7393fb.c
@@ -481,7 +481,7 @@ static int __devinit bfin_adv7393_fb_probe(struct i2c_client *client,
goto out_4;
}
- if (request_irq(IRQ_PPI_ERROR, ppi_irq_error, IRQF_DISABLED,
+ if (request_irq(IRQ_PPI_ERROR, ppi_irq_error, 0,
"PPI ERROR", fbdev) < 0) {
dev_err(&client->dev, "unable to request PPI ERROR IRQ\n");
ret = -EFAULT;
diff --git a/drivers/video/mb862xx/mb862xxfbdrv.c b/drivers/video/mb862xx/mb862xxfbdrv.c
index 12a634a..11a7a33 100644
--- a/drivers/video/mb862xx/mb862xxfbdrv.c
+++ b/drivers/video/mb862xx/mb862xxfbdrv.c
@@ -738,7 +738,7 @@ static int __devinit of_platform_mb862xx_probe(struct platform_device *ofdev)
if (mb862xx_gdc_init(par))
goto io_unmap;
- if (request_irq(par->irq, mb862xx_intr, IRQF_DISABLED,
+ if (request_irq(par->irq, mb862xx_intr, 0,
DRV_NAME, (void *)par)) {
dev_err(dev, "Cannot request irq\n");
goto io_unmap;
@@ -1074,7 +1074,7 @@ static int __devinit mb862xx_pci_probe(struct pci_dev *pdev,
if (mb862xx_pci_gdc_init(par))
goto io_unmap;
- if (request_irq(par->irq, mb862xx_intr, IRQF_DISABLED | IRQF_SHARED,
+ if (request_irq(par->irq, mb862xx_intr, IRQF_SHARED,
DRV_NAME, (void *)par)) {
dev_err(dev, "Cannot request irq\n");
goto io_unmap;
diff --git a/drivers/video/msm/mddi.c b/drivers/video/msm/mddi.c
index 178b072..4527cbf 100644
--- a/drivers/video/msm/mddi.c
+++ b/drivers/video/msm/mddi.c
@@ -715,7 +715,7 @@ static int __devinit mddi_probe(struct platform_device *pdev)
mddi->int_enable = 0;
mddi_writel(mddi->int_enable, INTEN);
- ret = request_irq(mddi->irq, mddi_isr, IRQF_DISABLED, "mddi",
+ ret = request_irq(mddi->irq, mddi_isr, 0, "mddi",
&mddi->client_data);
if (ret) {
printk(KERN_ERR "mddi: failed to request enable irq!\n");
diff --git a/drivers/video/msm/mdp.c b/drivers/video/msm/mdp.c
index 2750ed2..cb2ddf1 100644
--- a/drivers/video/msm/mdp.c
+++ b/drivers/video/msm/mdp.c
@@ -426,7 +426,7 @@ int mdp_probe(struct platform_device *pdev)
goto error_get_clk;
}
- ret = request_irq(mdp->irq, mdp_isr, IRQF_DISABLED, "msm_mdp", mdp);
+ ret = request_irq(mdp->irq, mdp_isr, 0, "msm_mdp", mdp);
if (ret)
goto error_request_irq;
disable_irq(mdp->irq);
diff --git a/drivers/video/nuc900fb.c b/drivers/video/nuc900fb.c
index 37dd850..d1fbbd8 100644
--- a/drivers/video/nuc900fb.c
+++ b/drivers/video/nuc900fb.c
@@ -587,7 +587,7 @@ static int __devinit nuc900fb_probe(struct platform_device *pdev)
fbinfo->flags = FBINFO_FLAG_DEFAULT;
fbinfo->pseudo_palette = &fbi->pseudo_pal;
- ret = request_irq(irq, nuc900fb_irqhandler, IRQF_DISABLED,
+ ret = request_irq(irq, nuc900fb_irqhandler, 0,
pdev->name, fbinfo);
if (ret) {
dev_err(&pdev->dev, "cannot register irq handler %d -err %d\n",
diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c
index ddc696d..20d9968 100644
--- a/drivers/video/omap2/displays/panel-taal.c
+++ b/drivers/video/omap2/displays/panel-taal.c
@@ -1053,7 +1053,7 @@ static int taal_probe(struct omap_dss_device *dssdev)
gpio_direction_input(gpio);
r = request_irq(gpio_to_irq(gpio), taal_te_isr,
- IRQF_DISABLED | IRQF_TRIGGER_RISING,
+ IRQF_TRIGGER_RISING,
"taal vsync", dssdev);
if (r) {
diff --git a/drivers/video/ps3fb.c b/drivers/video/ps3fb.c
index 65560a1..213fbbc 100644
--- a/drivers/video/ps3fb.c
+++ b/drivers/video/ps3fb.c
@@ -1082,7 +1082,7 @@ static int __devinit ps3fb_probe(struct ps3_system_bus_device *dev)
}
retval = request_irq(ps3fb.irq_no, ps3fb_vsync_interrupt,
- IRQF_DISABLED, DEVICE_NAME, &dev->core);
+ 0, DEVICE_NAME, &dev->core);
if (retval) {
dev_err(&dev->core, "%s: request_irq failed %d\n", __func__,
retval);
diff --git a/drivers/video/pxa3xx-gcu.c b/drivers/video/pxa3xx-gcu.c
index d8de557..1ed8b36 100644
--- a/drivers/video/pxa3xx-gcu.c
+++ b/drivers/video/pxa3xx-gcu.c
@@ -676,7 +676,7 @@ pxa3xx_gcu_probe(struct platform_device *dev)
}
ret = request_irq(irq, pxa3xx_gcu_handle_irq,
- IRQF_DISABLED, DRV_NAME, priv);
+ 0, DRV_NAME, priv);
if (ret) {
dev_err(&dev->dev, "request_irq failed\n");
ret = -EBUSY;
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index 0f4e8c9..e89778f 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -2191,7 +2191,7 @@ static int __devinit pxafb_probe(struct platform_device *dev)
goto failed_free_mem;
}
- ret = request_irq(irq, pxafb_handle_irq, IRQF_DISABLED, "LCD", fbi);
+ ret = request_irq(irq, pxafb_handle_irq, 0, "LCD", fbi);
if (ret) {
dev_err(&dev->dev, "request_irq failed: %d\n", ret);
ret = -EBUSY;
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c
index 798144a..ee4c0df 100644
--- a/drivers/video/s3c2410fb.c
+++ b/drivers/video/s3c2410fb.c
@@ -910,7 +910,7 @@ static int __devinit s3c24xxfb_probe(struct platform_device *pdev,
for (i = 0; i < 256; i++)
info->palette_buffer[i] = PALETTE_BUFF_CLEAR;
- ret = request_irq(irq, s3c2410fb_irq, IRQF_DISABLED, pdev->name, info);
+ ret = request_irq(irq, s3c2410fb_irq, 0, pdev->name, info);
if (ret) {
dev_err(&pdev->dev, "cannot get irq %d - err %d\n", irq, ret);
ret = -EBUSY;
diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c
index e8b76d6..98d55d0 100644
--- a/drivers/video/sa1100fb.c
+++ b/drivers/video/sa1100fb.c
@@ -1457,8 +1457,7 @@ static int __devinit sa1100fb_probe(struct platform_device *pdev)
if (ret)
goto failed;
- ret = request_irq(irq, sa1100fb_handle_irq, IRQF_DISABLED,
- "LCD", fbi);
+ ret = request_irq(irq, sa1100fb_handle_irq, 0, "LCD", fbi);
if (ret) {
printk(KERN_ERR "sa1100fb: request_irq failed: %d\n", ret);
goto failed;
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index 4636f9d..facffc2 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -1577,7 +1577,7 @@ static int __devinit sh_mobile_lcdc_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, priv);
- error = request_irq(i, sh_mobile_lcdc_irq, IRQF_DISABLED,
+ error = request_irq(i, sh_mobile_lcdc_irq, 0,
dev_name(&pdev->dev), priv);
if (error) {
dev_err(&pdev->dev, "unable to request irq\n");
diff --git a/drivers/video/tmiofb.c b/drivers/video/tmiofb.c
index cd1c4dc..8e4a446 100644
--- a/drivers/video/tmiofb.c
+++ b/drivers/video/tmiofb.c
@@ -744,7 +744,7 @@ static int __devinit tmiofb_probe(struct platform_device *dev)
goto err_ioremap_vram;
}
- retval = request_irq(irq, &tmiofb_irq, IRQF_DISABLED,
+ retval = request_irq(irq, &tmiofb_irq, 0,
dev_name(&dev->dev), info);
if (retval)
diff --git a/drivers/video/vt8500lcdfb.c b/drivers/video/vt8500lcdfb.c
index c13c246..777c21d 100644
--- a/drivers/video/vt8500lcdfb.c
+++ b/drivers/video/vt8500lcdfb.c
@@ -355,7 +355,7 @@ static int __devinit vt8500lcd_probe(struct platform_device *pdev)
goto failed_free_palette;
}
- ret = request_irq(irq, vt8500lcd_handle_irq, IRQF_DISABLED, "LCD", fbi);
+ ret = request_irq(irq, vt8500lcd_handle_irq, 0, "LCD", fbi);
if (ret) {
dev_err(&pdev->dev, "request_irq failed: %d\n", ret);
ret = -EBUSY;
--
1.7.4.1
^ permalink raw reply related
* [PATCH 53/57] sound: irq: Remove IRQF_DISABLED
From: Yong Zhang @ 2011-09-21 9:28 UTC (permalink / raw)
To: linux-arch, linux-kernel
Cc: alsa-devel, Kuninori Morimoto, Takashi Iwai, Clemens Ladisch,
Jaroslav Kysela, Peter Ujfalusi, Paul Gortmaker, Russell King,
Jassi Brar, Manuel Lauss, Uwe Kleine-König, Axel Lin,
Liam Girdwood, cbe-oss-dev, Wan ZongShun, Lucas De Marchi,
yong.zhang0, tglx, linux-arm-kernel, Eric Miao, Geoff Levand,
Jiri Kosina, Mark Brown, Sangbeom Kim, Paul Mundt, Simon Horman,
Joe Perches, Jarkko Nikula, linuxppc-dev
In-Reply-To: <1316597339-29861-1-git-send-email-yong.zhang0@gmail.com>
Since commit [c58543c8: genirq: Run irq handlers with interrupts disabled],
We run all interrupt handlers with interrupts disabled
and we even check and yell when an interrupt handler
returns with interrupts enabled (see commit [b738a50a:
genirq: Warn when handler enables interrupts]).
So now this flag is a NOOP and can be removed.
Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
include/sound/initval.h | 2 +-
sound/arm/aaci.c | 2 +-
sound/arm/pxa2xx-ac97-lib.c | 2 +-
sound/drivers/ml403-ac97cr.c | 4 ++--
sound/drivers/mpu401/mpu401_uart.c | 2 +-
sound/drivers/mtpav.c | 2 +-
sound/drivers/serial-u16550.c | 2 +-
sound/isa/ad1816a/ad1816a_lib.c | 2 +-
sound/isa/es1688/es1688_lib.c | 2 +-
sound/isa/es18xx.c | 2 +-
sound/isa/gus/gus_main.c | 2 +-
sound/isa/gus/gusmax.c | 2 +-
sound/isa/gus/interwave.c | 2 +-
sound/isa/opl3sa2.c | 2 +-
sound/isa/opti9xx/opti92x-ad1848.c | 2 +-
sound/isa/sb/sb_common.c | 2 +-
sound/isa/wavefront/wavefront.c | 2 +-
sound/isa/wss/wss_lib.c | 2 +-
sound/mips/au1x00.c | 4 ++--
sound/pci/sis7019.c | 4 ++--
sound/ppc/snd_ps3.c | 2 +-
sound/soc/au1x/dma.c | 2 +-
sound/soc/codecs/tlv320dac33.c | 2 +-
sound/soc/nuc900/nuc900-pcm.c | 2 +-
sound/soc/samsung/ac97.c | 2 +-
sound/soc/sh/fsi.c | 2 +-
sound/soc/txx9/txx9aclc-ac97.c | 2 +-
sound/sparc/amd7930.c | 2 +-
28 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/include/sound/initval.h b/include/sound/initval.h
index 1daa6df..f99a0d2 100644
--- a/include/sound/initval.h
+++ b/include/sound/initval.h
@@ -62,7 +62,7 @@ static int snd_legacy_find_free_irq(int *irq_table)
{
while (*irq_table != -1) {
if (!request_irq(*irq_table, snd_legacy_empty_irq_handler,
- IRQF_DISABLED | IRQF_PROBE_SHARED, "ALSA Test IRQ",
+ IRQF_PROBE_SHARED, "ALSA Test IRQ",
(void *) irq_table)) {
free_irq(*irq_table, (void *) irq_table);
return *irq_table;
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c
index d0cead3..e518d38 100644
--- a/sound/arm/aaci.c
+++ b/sound/arm/aaci.c
@@ -443,7 +443,7 @@ static int aaci_pcm_open(struct snd_pcm_substream *substream)
mutex_lock(&aaci->irq_lock);
if (!aaci->users++) {
ret = request_irq(aaci->dev->irq[0], aaci_irq,
- IRQF_SHARED | IRQF_DISABLED, DRIVER_NAME, aaci);
+ IRQF_SHARED, DRIVER_NAME, aaci);
if (ret != 0)
aaci->users--;
}
diff --git a/sound/arm/pxa2xx-ac97-lib.c b/sound/arm/pxa2xx-ac97-lib.c
index 88eec38..8ad6535 100644
--- a/sound/arm/pxa2xx-ac97-lib.c
+++ b/sound/arm/pxa2xx-ac97-lib.c
@@ -359,7 +359,7 @@ int __devinit pxa2xx_ac97_hw_probe(struct platform_device *dev)
if (ret)
goto err_clk2;
- ret = request_irq(IRQ_AC97, pxa2xx_ac97_irq, IRQF_DISABLED, "AC97", NULL);
+ ret = request_irq(IRQ_AC97, pxa2xx_ac97_irq, 0, "AC97", NULL);
if (ret < 0)
goto err_irq;
diff --git a/sound/drivers/ml403-ac97cr.c b/sound/drivers/ml403-ac97cr.c
index 5cfcb90..2c7a763 100644
--- a/sound/drivers/ml403-ac97cr.c
+++ b/sound/drivers/ml403-ac97cr.c
@@ -1153,7 +1153,7 @@ snd_ml403_ac97cr_create(struct snd_card *card, struct platform_device *pfdev,
"0x%x done\n", (unsigned int)ml403_ac97cr->port);
/* get irq */
irq = platform_get_irq(pfdev, 0);
- if (request_irq(irq, snd_ml403_ac97cr_irq, IRQF_DISABLED,
+ if (request_irq(irq, snd_ml403_ac97cr_irq, 0,
dev_name(&pfdev->dev), (void *)ml403_ac97cr)) {
snd_printk(KERN_ERR SND_ML403_AC97CR_DRIVER ": "
"unable to grab IRQ %d\n",
@@ -1166,7 +1166,7 @@ snd_ml403_ac97cr_create(struct snd_card *card, struct platform_device *pfdev,
"request (playback) irq %d done\n",
ml403_ac97cr->irq);
irq = platform_get_irq(pfdev, 1);
- if (request_irq(irq, snd_ml403_ac97cr_irq, IRQF_DISABLED,
+ if (request_irq(irq, snd_ml403_ac97cr_irq, 0,
dev_name(&pfdev->dev), (void *)ml403_ac97cr)) {
snd_printk(KERN_ERR SND_ML403_AC97CR_DRIVER ": "
"unable to grab IRQ %d\n",
diff --git a/sound/drivers/mpu401/mpu401_uart.c b/sound/drivers/mpu401/mpu401_uart.c
index 34df505..1cff331 100644
--- a/sound/drivers/mpu401/mpu401_uart.c
+++ b/sound/drivers/mpu401/mpu401_uart.c
@@ -578,7 +578,7 @@ int snd_mpu401_uart_new(struct snd_card *card, int device,
else
mpu->cport = port + 1;
if (irq >= 0) {
- if (request_irq(irq, snd_mpu401_uart_interrupt, IRQF_DISABLED,
+ if (request_irq(irq, snd_mpu401_uart_interrupt, 0,
"MPU401 UART", (void *) mpu)) {
snd_printk(KERN_ERR "mpu401_uart: "
"unable to grab IRQ %d\n", irq);
diff --git a/sound/drivers/mtpav.c b/sound/drivers/mtpav.c
index f50021c..7693079 100644
--- a/sound/drivers/mtpav.c
+++ b/sound/drivers/mtpav.c
@@ -590,7 +590,7 @@ static int __devinit snd_mtpav_get_ISA(struct mtpav * mcard)
return -EBUSY;
}
mcard->port = port;
- if (request_irq(irq, snd_mtpav_irqh, IRQF_DISABLED, "MOTU MTPAV", mcard)) {
+ if (request_irq(irq, snd_mtpav_irqh, 0, "MOTU MTPAV", mcard)) {
snd_printk(KERN_ERR "MTVAP IRQ %d busy\n", irq);
return -EBUSY;
}
diff --git a/sound/drivers/serial-u16550.c b/sound/drivers/serial-u16550.c
index 6c5bf58..85aad43 100644
--- a/sound/drivers/serial-u16550.c
+++ b/sound/drivers/serial-u16550.c
@@ -816,7 +816,7 @@ static int __devinit snd_uart16550_create(struct snd_card *card,
if (irq >= 0 && irq != SNDRV_AUTO_IRQ) {
if (request_irq(irq, snd_uart16550_interrupt,
- IRQF_DISABLED, "Serial MIDI", uart)) {
+ 0, "Serial MIDI", uart)) {
snd_printk(KERN_WARNING
"irq %d busy. Using Polling.\n", irq);
} else {
diff --git a/sound/isa/ad1816a/ad1816a_lib.c b/sound/isa/ad1816a/ad1816a_lib.c
index 05aef8b..177eed3 100644
--- a/sound/isa/ad1816a/ad1816a_lib.c
+++ b/sound/isa/ad1816a/ad1816a_lib.c
@@ -595,7 +595,7 @@ int __devinit snd_ad1816a_create(struct snd_card *card,
snd_ad1816a_free(chip);
return -EBUSY;
}
- if (request_irq(irq, snd_ad1816a_interrupt, IRQF_DISABLED, "AD1816A", (void *) chip)) {
+ if (request_irq(irq, snd_ad1816a_interrupt, 0, "AD1816A", (void *) chip)) {
snd_printk(KERN_ERR "ad1816a: can't grab IRQ %d\n", irq);
snd_ad1816a_free(chip);
return -EBUSY;
diff --git a/sound/isa/es1688/es1688_lib.c b/sound/isa/es1688/es1688_lib.c
index 0767620..d3eab6f 100644
--- a/sound/isa/es1688/es1688_lib.c
+++ b/sound/isa/es1688/es1688_lib.c
@@ -661,7 +661,7 @@ int snd_es1688_create(struct snd_card *card,
snd_printk(KERN_ERR "es1688: can't grab port 0x%lx\n", port + 4);
return -EBUSY;
}
- if (request_irq(irq, snd_es1688_interrupt, IRQF_DISABLED, "ES1688", (void *) chip)) {
+ if (request_irq(irq, snd_es1688_interrupt, 0, "ES1688", (void *) chip)) {
snd_printk(KERN_ERR "es1688: can't grab IRQ %d\n", irq);
return -EBUSY;
}
diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c
index aeee8f8..bf6ad0b 100644
--- a/sound/isa/es18xx.c
+++ b/sound/isa/es18xx.c
@@ -1805,7 +1805,7 @@ static int __devinit snd_es18xx_new_device(struct snd_card *card,
return -EBUSY;
}
- if (request_irq(irq, snd_es18xx_interrupt, IRQF_DISABLED, "ES18xx",
+ if (request_irq(irq, snd_es18xx_interrupt, 0, "ES18xx",
(void *) card)) {
snd_es18xx_free(card);
snd_printk(KERN_ERR PFX "unable to grap IRQ %d\n", irq);
diff --git a/sound/isa/gus/gus_main.c b/sound/isa/gus/gus_main.c
index 12eb98f..3167e5a 100644
--- a/sound/isa/gus/gus_main.c
+++ b/sound/isa/gus/gus_main.c
@@ -180,7 +180,7 @@ int snd_gus_create(struct snd_card *card,
snd_gus_free(gus);
return -EBUSY;
}
- if (irq >= 0 && request_irq(irq, snd_gus_interrupt, IRQF_DISABLED, "GUS GF1", (void *) gus)) {
+ if (irq >= 0 && request_irq(irq, snd_gus_interrupt, 0, "GUS GF1", (void *) gus)) {
snd_printk(KERN_ERR "gus: can't grab irq %d\n", irq);
snd_gus_free(gus);
return -EBUSY;
diff --git a/sound/isa/gus/gusmax.c b/sound/isa/gus/gusmax.c
index 3e4a58b..c43faa0 100644
--- a/sound/isa/gus/gusmax.c
+++ b/sound/isa/gus/gusmax.c
@@ -291,7 +291,7 @@ static int __devinit snd_gusmax_probe(struct device *pdev, unsigned int dev)
goto _err;
}
- if (request_irq(xirq, snd_gusmax_interrupt, IRQF_DISABLED, "GUS MAX", (void *)maxcard)) {
+ if (request_irq(xirq, snd_gusmax_interrupt, 0, "GUS MAX", (void *)maxcard)) {
snd_printk(KERN_ERR PFX "unable to grab IRQ %d\n", xirq);
err = -EBUSY;
goto _err;
diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c
index c7b80e4..5f869a3 100644
--- a/sound/isa/gus/interwave.c
+++ b/sound/isa/gus/interwave.c
@@ -684,7 +684,7 @@ static int __devinit snd_interwave_probe(struct snd_card *card, int dev)
if ((err = snd_gus_initialize(gus)) < 0)
return err;
- if (request_irq(xirq, snd_interwave_interrupt, IRQF_DISABLED,
+ if (request_irq(xirq, snd_interwave_interrupt, 0,
"InterWave", iwcard)) {
snd_printk(KERN_ERR PFX "unable to grab IRQ %d\n", xirq);
return -EBUSY;
diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c
index de99f47..bbafb0b 100644
--- a/sound/isa/opl3sa2.c
+++ b/sound/isa/opl3sa2.c
@@ -667,7 +667,7 @@ static int __devinit snd_opl3sa2_probe(struct snd_card *card, int dev)
err = snd_opl3sa2_detect(card);
if (err < 0)
return err;
- err = request_irq(xirq, snd_opl3sa2_interrupt, IRQF_DISABLED,
+ err = request_irq(xirq, snd_opl3sa2_interrupt, 0,
"OPL3-SA2", card);
if (err) {
snd_printk(KERN_ERR PFX "can't grab IRQ %d\n", xirq);
diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c
index 346e12b..6dbbfa7 100644
--- a/sound/isa/opti9xx/opti92x-ad1848.c
+++ b/sound/isa/opti9xx/opti92x-ad1848.c
@@ -892,7 +892,7 @@ static int __devinit snd_opti9xx_probe(struct snd_card *card)
#endif
#ifdef OPTi93X
error = request_irq(irq, snd_opti93x_interrupt,
- IRQF_DISABLED, DEV_NAME" - WSS", chip);
+ 0, DEV_NAME" - WSS", chip);
if (error < 0) {
snd_printk(KERN_ERR "opti9xx: can't grab IRQ %d\n", irq);
return error;
diff --git a/sound/isa/sb/sb_common.c b/sound/isa/sb/sb_common.c
index eae6c1c..d2e1921 100644
--- a/sound/isa/sb/sb_common.c
+++ b/sound/isa/sb/sb_common.c
@@ -240,7 +240,7 @@ int snd_sbdsp_create(struct snd_card *card,
if (request_irq(irq, irq_handler,
(hardware == SB_HW_ALS4000 ||
hardware == SB_HW_CS5530) ?
- IRQF_SHARED : IRQF_DISABLED,
+ IRQF_SHARED : 0,
"SoundBlaster", (void *) chip)) {
snd_printk(KERN_ERR "sb: can't grab irq %d\n", irq);
snd_sbdsp_free(chip);
diff --git a/sound/isa/wavefront/wavefront.c b/sound/isa/wavefront/wavefront.c
index 83f291d..8714297 100644
--- a/sound/isa/wavefront/wavefront.c
+++ b/sound/isa/wavefront/wavefront.c
@@ -418,7 +418,7 @@ snd_wavefront_probe (struct snd_card *card, int dev)
return -EBUSY;
}
if (request_irq(ics2115_irq[dev], snd_wavefront_ics2115_interrupt,
- IRQF_DISABLED, "ICS2115", acard)) {
+ 0, "ICS2115", acard)) {
snd_printk(KERN_ERR "unable to use ICS2115 IRQ %d\n", ics2115_irq[dev]);
return -EBUSY;
}
diff --git a/sound/isa/wss/wss_lib.c b/sound/isa/wss/wss_lib.c
index 2a42cc3..7277c5b 100644
--- a/sound/isa/wss/wss_lib.c
+++ b/sound/isa/wss/wss_lib.c
@@ -1833,7 +1833,7 @@ int snd_wss_create(struct snd_card *card,
}
chip->cport = cport;
if (!(hwshare & WSS_HWSHARE_IRQ))
- if (request_irq(irq, snd_wss_interrupt, IRQF_DISABLED,
+ if (request_irq(irq, snd_wss_interrupt, 0,
"WSS", (void *) chip)) {
snd_printk(KERN_ERR "wss: can't grab IRQ %d\n", irq);
snd_wss_free(chip);
diff --git a/sound/mips/au1x00.c b/sound/mips/au1x00.c
index 446cf97..7567ebd 100644
--- a/sound/mips/au1x00.c
+++ b/sound/mips/au1x00.c
@@ -465,13 +465,13 @@ snd_au1000_pcm_new(struct snd_au1000 *au1000)
flags = claim_dma_lock();
if ((au1000->stream[PLAYBACK]->dma = request_au1000_dma(DMA_ID_AC97C_TX,
- "AC97 TX", au1000_dma_interrupt, IRQF_DISABLED,
+ "AC97 TX", au1000_dma_interrupt, 0,
au1000->stream[PLAYBACK])) < 0) {
release_dma_lock(flags);
return -EBUSY;
}
if ((au1000->stream[CAPTURE]->dma = request_au1000_dma(DMA_ID_AC97C_RX,
- "AC97 RX", au1000_dma_interrupt, IRQF_DISABLED,
+ "AC97 RX", au1000_dma_interrupt, 0,
au1000->stream[CAPTURE])) < 0){
release_dma_lock(flags);
return -EBUSY;
diff --git a/sound/pci/sis7019.c b/sound/pci/sis7019.c
index bcf6152..5ffb20b 100644
--- a/sound/pci/sis7019.c
+++ b/sound/pci/sis7019.c
@@ -1234,7 +1234,7 @@ static int sis_resume(struct pci_dev *pci)
goto error;
}
- if (request_irq(pci->irq, sis_interrupt, IRQF_DISABLED|IRQF_SHARED,
+ if (request_irq(pci->irq, sis_interrupt, IRQF_SHARED,
KBUILD_MODNAME, sis)) {
printk(KERN_ERR "sis7019: unable to regain IRQ %d\n", pci->irq);
goto error;
@@ -1340,7 +1340,7 @@ static int __devinit sis_chip_create(struct snd_card *card,
if (rc)
goto error_out_cleanup;
- if (request_irq(pci->irq, sis_interrupt, IRQF_DISABLED|IRQF_SHARED,
+ if (request_irq(pci->irq, sis_interrupt, IRQF_SHARED,
KBUILD_MODNAME, sis)) {
printk(KERN_ERR "unable to allocate irq %d\n", sis->irq);
goto error_out_cleanup;
diff --git a/sound/ppc/snd_ps3.c b/sound/ppc/snd_ps3.c
index bc823a5..775bd95 100644
--- a/sound/ppc/snd_ps3.c
+++ b/sound/ppc/snd_ps3.c
@@ -845,7 +845,7 @@ static int __devinit snd_ps3_allocate_irq(void)
return ret;
}
- ret = request_irq(the_card.irq_no, snd_ps3_interrupt, IRQF_DISABLED,
+ ret = request_irq(the_card.irq_no, snd_ps3_interrupt, 0,
SND_PS3_DRIVER_NAME, &the_card);
if (ret) {
pr_info("%s: request_irq failed (%d)\n", __func__, ret);
diff --git a/sound/soc/au1x/dma.c b/sound/soc/au1x/dma.c
index 7aa5b76..177f713 100644
--- a/sound/soc/au1x/dma.c
+++ b/sound/soc/au1x/dma.c
@@ -211,7 +211,7 @@ static int alchemy_pcm_open(struct snd_pcm_substream *substream)
/* DMA setup */
name = (s == SNDRV_PCM_STREAM_PLAYBACK) ? "audio-tx" : "audio-rx";
ctx->stream[s].dma = request_au1000_dma(dmaids[s], name,
- au1000_dma_interrupt, IRQF_DISABLED,
+ au1000_dma_interrupt, 0,
&ctx->stream[s]);
set_dma_mode(ctx->stream[s].dma,
get_dma_mode(ctx->stream[s].dma) & ~DMA_NC);
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c
index faa5e9f..243d177 100644
--- a/sound/soc/codecs/tlv320dac33.c
+++ b/sound/soc/codecs/tlv320dac33.c
@@ -1431,7 +1431,7 @@ static int dac33_soc_probe(struct snd_soc_codec *codec)
/* Check if the IRQ number is valid and request it */
if (dac33->irq >= 0) {
ret = request_irq(dac33->irq, dac33_interrupt_handler,
- IRQF_TRIGGER_RISING | IRQF_DISABLED,
+ IRQF_TRIGGER_RISING,
codec->name, codec);
if (ret < 0) {
dev_err(codec->dev, "Could not request IRQ%d (%d)\n",
diff --git a/sound/soc/nuc900/nuc900-pcm.c b/sound/soc/nuc900/nuc900-pcm.c
index e46d551..865b288 100644
--- a/sound/soc/nuc900/nuc900-pcm.c
+++ b/sound/soc/nuc900/nuc900-pcm.c
@@ -268,7 +268,7 @@ static int nuc900_dma_open(struct snd_pcm_substream *substream)
nuc900_audio = nuc900_ac97_data;
if (request_irq(nuc900_audio->irq_num, nuc900_dma_interrupt,
- IRQF_DISABLED, "nuc900-dma", substream))
+ 0, "nuc900-dma", substream))
return -EBUSY;
runtime->private_data = nuc900_audio;
diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c
index b4f9b00..41b387b 100644
--- a/sound/soc/samsung/ac97.c
+++ b/sound/soc/samsung/ac97.c
@@ -450,7 +450,7 @@ static __devinit int s3c_ac97_probe(struct platform_device *pdev)
}
ret = request_irq(irq_res->start, s3c_ac97_irq,
- IRQF_DISABLED, "AC97", NULL);
+ 0, "AC97", NULL);
if (ret < 0) {
dev_err(&pdev->dev, "ac97: interrupt request failed.\n");
goto err4;
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index 8e112cc..1493ebf 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -1285,7 +1285,7 @@ static int fsi_probe(struct platform_device *pdev)
pm_runtime_enable(&pdev->dev);
dev_set_drvdata(&pdev->dev, master);
- ret = request_irq(irq, &fsi_interrupt, IRQF_DISABLED,
+ ret = request_irq(irq, &fsi_interrupt, 0,
id_entry->name, master);
if (ret) {
dev_err(&pdev->dev, "irq request err\n");
diff --git a/sound/soc/txx9/txx9aclc-ac97.c b/sound/soc/txx9/txx9aclc-ac97.c
index 743d07b..a4e3f55 100644
--- a/sound/soc/txx9/txx9aclc-ac97.c
+++ b/sound/soc/txx9/txx9aclc-ac97.c
@@ -201,7 +201,7 @@ static int __devinit txx9aclc_ac97_dev_probe(struct platform_device *pdev)
if (!drvdata->base)
return -EBUSY;
err = devm_request_irq(&pdev->dev, irq, txx9aclc_ac97_irq,
- IRQF_DISABLED, dev_name(&pdev->dev), drvdata);
+ 0, dev_name(&pdev->dev), drvdata);
if (err < 0)
return err;
diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c
index ad7d4d7..f036776 100644
--- a/sound/sparc/amd7930.c
+++ b/sound/sparc/amd7930.c
@@ -962,7 +962,7 @@ static int __devinit snd_amd7930_create(struct snd_card *card,
amd7930_idle(amd);
if (request_irq(irq, snd_amd7930_interrupt,
- IRQF_DISABLED | IRQF_SHARED, "amd7930", amd)) {
+ IRQF_SHARED, "amd7930", amd)) {
snd_printk(KERN_ERR "amd7930-%d: Unable to grab IRQ %d\n",
dev, irq);
snd_amd7930_free(amd);
--
1.7.4.1
^ permalink raw reply related
* [PATCH 48/57] TTY: irq: Remove IRQF_DISABLED
From: Yong Zhang @ 2011-09-21 9:28 UTC (permalink / raw)
To: linux-arch, linux-kernel
Cc: Jesper Nilsson, linuxppc-dev, linux-cris-kernel, nios2-dev,
Greg Kroah-Hartman, Paul Bolle, Mikael Starvik, yong.zhang0,
linux-serial, Jiri Kosina, tglx, Jiri Slaby, Tobias Klauser,
Alan Cox
In-Reply-To: <1316597339-29861-1-git-send-email-yong.zhang0@gmail.com>
Since commit [c58543c8: genirq: Run irq handlers with interrupts disabled],
We run all interrupt handlers with interrupts disabled
and we even check and yell when an interrupt handler
returns with interrupts enabled (see commit [b738a50a:
genirq: Warn when handler enables interrupts]).
So now this flag is a NOOP and can be removed.
Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Acked-by: Tobias Klauser <tklauser@distanz.ch>
---
drivers/tty/amiserial.c | 2 +-
drivers/tty/cyclades.c | 2 +-
drivers/tty/hvc/hvc_irq.c | 2 +-
drivers/tty/hvc/hvcs.c | 2 +-
drivers/tty/hvc/hvsi.c | 2 +-
drivers/tty/isicom.c | 2 +-
drivers/tty/serial/68328serial.c | 2 +-
drivers/tty/serial/altera_jtaguart.c | 2 +-
drivers/tty/serial/altera_uart.c | 2 +-
drivers/tty/serial/bfin_sport_uart.c | 2 +-
drivers/tty/serial/bfin_uart.c | 8 ++++----
drivers/tty/serial/crisv10.c | 18 +++++++++---------
drivers/tty/serial/icom.c | 2 +-
drivers/tty/serial/lantiq.c | 6 +++---
drivers/tty/serial/mcf.c | 2 +-
drivers/tty/serial/mpc52xx_uart.c | 2 +-
drivers/tty/serial/serial_ks8695.c | 8 ++++----
drivers/tty/serial/sh-sci.c | 2 +-
drivers/tty/serial/sn_console.c | 2 +-
19 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c
index 6d43f55..b84c834 100644
--- a/drivers/tty/amiserial.c
+++ b/drivers/tty/amiserial.c
@@ -2017,7 +2017,7 @@ static int __init amiga_serial_probe(struct platform_device *pdev)
if (error)
goto fail_unregister;
- error = request_irq(IRQ_AMIGA_RBF, ser_rx_int, IRQF_DISABLED,
+ error = request_irq(IRQ_AMIGA_RBF, ser_rx_int, 0,
"serial RX", state);
if (error)
goto fail_free_irq;
diff --git a/drivers/tty/cyclades.c b/drivers/tty/cyclades.c
index 5beef49..c9bf779 100644
--- a/drivers/tty/cyclades.c
+++ b/drivers/tty/cyclades.c
@@ -3367,7 +3367,7 @@ static int __init cy_detect_isa(void)
/* allocate IRQ */
if (request_irq(cy_isa_irq, cyy_interrupt,
- IRQF_DISABLED, "Cyclom-Y", &cy_card[j])) {
+ 0, "Cyclom-Y", &cy_card[j])) {
printk(KERN_ERR "Cyclom-Y/ISA found at 0x%lx, but "
"could not allocate IRQ#%d.\n",
(unsigned long)cy_isa_address, cy_isa_irq);
diff --git a/drivers/tty/hvc/hvc_irq.c b/drivers/tty/hvc/hvc_irq.c
index 2623e17..c9adb05 100644
--- a/drivers/tty/hvc/hvc_irq.c
+++ b/drivers/tty/hvc/hvc_irq.c
@@ -28,7 +28,7 @@ int notifier_add_irq(struct hvc_struct *hp, int irq)
hp->irq_requested = 0;
return 0;
}
- rc = request_irq(irq, hvc_handle_interrupt, IRQF_DISABLED,
+ rc = request_irq(irq, hvc_handle_interrupt, 0,
"hvc_console", hp);
if (!rc)
hp->irq_requested = 1;
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
index e523773..55882b5 100644
--- a/drivers/tty/hvc/hvcs.c
+++ b/drivers/tty/hvc/hvcs.c
@@ -1057,7 +1057,7 @@ static int hvcs_enable_device(struct hvcs_struct *hvcsd, uint32_t unit_address,
* the conn was registered and now.
*/
if (!(rc = request_irq(irq, &hvcs_handle_interrupt,
- IRQF_DISABLED, "ibmhvcs", hvcsd))) {
+ 0, "ibmhvcs", hvcsd))) {
/*
* It is possible the vty-server was removed after the irq was
* requested but before we have time to enable interrupts.
diff --git a/drivers/tty/hvc/hvsi.c b/drivers/tty/hvc/hvsi.c
index c94e2f5..cdfa3e0 100644
--- a/drivers/tty/hvc/hvsi.c
+++ b/drivers/tty/hvc/hvsi.c
@@ -1105,7 +1105,7 @@ static int __init hvsi_init(void)
struct hvsi_struct *hp = &hvsi_ports[i];
int ret = 1;
- ret = request_irq(hp->virq, hvsi_interrupt, IRQF_DISABLED, "hvsi", hp);
+ ret = request_irq(hp->virq, hvsi_interrupt, 0, "hvsi", hp);
if (ret)
printk(KERN_ERR "HVSI: couldn't reserve irq 0x%x (error %i)\n",
hp->virq, ret);
diff --git a/drivers/tty/isicom.c b/drivers/tty/isicom.c
index db1cf9c..e5c295a 100644
--- a/drivers/tty/isicom.c
+++ b/drivers/tty/isicom.c
@@ -1598,7 +1598,7 @@ static int __devinit isicom_probe(struct pci_dev *pdev,
}
retval = request_irq(board->irq, isicom_interrupt,
- IRQF_SHARED | IRQF_DISABLED, ISICOM_NAME, board);
+ IRQF_SHARED, ISICOM_NAME, board);
if (retval < 0) {
dev_err(&pdev->dev, "Could not install handler at Irq %d. "
"Card%d will be disabled.\n", board->irq, index + 1);
diff --git a/drivers/tty/serial/68328serial.c b/drivers/tty/serial/68328serial.c
index e0a7754..84a822e 100644
--- a/drivers/tty/serial/68328serial.c
+++ b/drivers/tty/serial/68328serial.c
@@ -1341,7 +1341,7 @@ rs68328_init(void)
if (request_irq(uart_irqs[i],
rs_interrupt,
- IRQF_DISABLED,
+ 0,
"M68328_UART", info))
panic("Unable to attach 68328 serial interrupt\n");
}
diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c
index 60e049b..00a73ec 100644
--- a/drivers/tty/serial/altera_jtaguart.c
+++ b/drivers/tty/serial/altera_jtaguart.c
@@ -218,7 +218,7 @@ static int altera_jtaguart_startup(struct uart_port *port)
unsigned long flags;
int ret;
- ret = request_irq(port->irq, altera_jtaguart_interrupt, IRQF_DISABLED,
+ ret = request_irq(port->irq, altera_jtaguart_interrupt, 0,
DRV_NAME, port);
if (ret) {
pr_err(DRV_NAME ": unable to attach Altera JTAG UART %d "
diff --git a/drivers/tty/serial/altera_uart.c b/drivers/tty/serial/altera_uart.c
index 50bc5a5..d902558 100644
--- a/drivers/tty/serial/altera_uart.c
+++ b/drivers/tty/serial/altera_uart.c
@@ -315,7 +315,7 @@ static int altera_uart_startup(struct uart_port *port)
return 0;
}
- ret = request_irq(port->irq, altera_uart_interrupt, IRQF_DISABLED,
+ ret = request_irq(port->irq, altera_uart_interrupt, 0,
DRV_NAME, port);
if (ret) {
pr_err(DRV_NAME ": unable to attach Altera UART %d "
diff --git a/drivers/tty/serial/bfin_sport_uart.c b/drivers/tty/serial/bfin_sport_uart.c
index 891d194..ee101c0 100644
--- a/drivers/tty/serial/bfin_sport_uart.c
+++ b/drivers/tty/serial/bfin_sport_uart.c
@@ -294,7 +294,7 @@ static int sport_startup(struct uart_port *port)
if (request_irq(gpio_to_irq(up->cts_pin),
sport_mctrl_cts_int,
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING |
- IRQF_DISABLED, "BFIN_SPORT_UART_CTS", up)) {
+ 0, "BFIN_SPORT_UART_CTS", up)) {
up->cts_pin = -1;
dev_info(port->dev, "Unable to attach BlackFin UART over SPORT CTS interrupt. So, disable it.\n");
}
diff --git a/drivers/tty/serial/bfin_uart.c b/drivers/tty/serial/bfin_uart.c
index c7e592d..66afb98 100644
--- a/drivers/tty/serial/bfin_uart.c
+++ b/drivers/tty/serial/bfin_uart.c
@@ -667,14 +667,14 @@ static int bfin_serial_startup(struct uart_port *port)
kgdboc_break_enabled = 0;
else {
# endif
- if (request_irq(uart->rx_irq, bfin_serial_rx_int, IRQF_DISABLED,
+ if (request_irq(uart->rx_irq, bfin_serial_rx_int, 0,
"BFIN_UART_RX", uart)) {
printk(KERN_NOTICE "Unable to attach BlackFin UART RX interrupt\n");
return -EBUSY;
}
if (request_irq
- (uart->tx_irq, bfin_serial_tx_int, IRQF_DISABLED,
+ (uart->tx_irq, bfin_serial_tx_int, 0,
"BFIN_UART_TX", uart)) {
printk(KERN_NOTICE "Unable to attach BlackFin UART TX interrupt\n");
free_irq(uart->rx_irq, uart);
@@ -734,7 +734,7 @@ static int bfin_serial_startup(struct uart_port *port)
if (request_irq(gpio_to_irq(uart->cts_pin),
bfin_serial_mctrl_cts_int,
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING |
- IRQF_DISABLED, "BFIN_UART_CTS", uart)) {
+ 0, "BFIN_UART_CTS", uart)) {
uart->cts_pin = -1;
pr_info("Unable to attach BlackFin UART CTS interrupt. So, disable it.\n");
}
@@ -745,7 +745,7 @@ static int bfin_serial_startup(struct uart_port *port)
#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
if (uart->cts_pin >= 0 && request_irq(uart->status_irq,
bfin_serial_mctrl_cts_int,
- IRQF_DISABLED, "BFIN_UART_MODEM_STATUS", uart)) {
+ 0, "BFIN_UART_MODEM_STATUS", uart)) {
uart->cts_pin = -1;
pr_info("Unable to attach BlackFin UART Modem Status interrupt.\n");
}
diff --git a/drivers/tty/serial/crisv10.c b/drivers/tty/serial/crisv10.c
index 58be715..a39e189 100644
--- a/drivers/tty/serial/crisv10.c
+++ b/drivers/tty/serial/crisv10.c
@@ -258,7 +258,7 @@ static struct e100_serial rs_table[] = {
.dma_out_enabled = 1,
.dma_out_nbr = SER0_TX_DMA_NBR,
.dma_out_irq_nbr = SER0_DMA_TX_IRQ_NBR,
- .dma_out_irq_flags = IRQF_DISABLED,
+ .dma_out_irq_flags = 0,
.dma_out_irq_description = "serial 0 dma tr",
#else
.dma_out_enabled = 0,
@@ -271,7 +271,7 @@ static struct e100_serial rs_table[] = {
.dma_in_enabled = 1,
.dma_in_nbr = SER0_RX_DMA_NBR,
.dma_in_irq_nbr = SER0_DMA_RX_IRQ_NBR,
- .dma_in_irq_flags = IRQF_DISABLED,
+ .dma_in_irq_flags = 0,
.dma_in_irq_description = "serial 0 dma rec",
#else
.dma_in_enabled = 0,
@@ -313,7 +313,7 @@ static struct e100_serial rs_table[] = {
.dma_out_enabled = 1,
.dma_out_nbr = SER1_TX_DMA_NBR,
.dma_out_irq_nbr = SER1_DMA_TX_IRQ_NBR,
- .dma_out_irq_flags = IRQF_DISABLED,
+ .dma_out_irq_flags = 0,
.dma_out_irq_description = "serial 1 dma tr",
#else
.dma_out_enabled = 0,
@@ -326,7 +326,7 @@ static struct e100_serial rs_table[] = {
.dma_in_enabled = 1,
.dma_in_nbr = SER1_RX_DMA_NBR,
.dma_in_irq_nbr = SER1_DMA_RX_IRQ_NBR,
- .dma_in_irq_flags = IRQF_DISABLED,
+ .dma_in_irq_flags = 0,
.dma_in_irq_description = "serial 1 dma rec",
#else
.dma_in_enabled = 0,
@@ -369,7 +369,7 @@ static struct e100_serial rs_table[] = {
.dma_out_enabled = 1,
.dma_out_nbr = SER2_TX_DMA_NBR,
.dma_out_irq_nbr = SER2_DMA_TX_IRQ_NBR,
- .dma_out_irq_flags = IRQF_DISABLED,
+ .dma_out_irq_flags = 0,
.dma_out_irq_description = "serial 2 dma tr",
#else
.dma_out_enabled = 0,
@@ -382,7 +382,7 @@ static struct e100_serial rs_table[] = {
.dma_in_enabled = 1,
.dma_in_nbr = SER2_RX_DMA_NBR,
.dma_in_irq_nbr = SER2_DMA_RX_IRQ_NBR,
- .dma_in_irq_flags = IRQF_DISABLED,
+ .dma_in_irq_flags = 0,
.dma_in_irq_description = "serial 2 dma rec",
#else
.dma_in_enabled = 0,
@@ -423,7 +423,7 @@ static struct e100_serial rs_table[] = {
.dma_out_enabled = 1,
.dma_out_nbr = SER3_TX_DMA_NBR,
.dma_out_irq_nbr = SER3_DMA_TX_IRQ_NBR,
- .dma_out_irq_flags = IRQF_DISABLED,
+ .dma_out_irq_flags = 0,
.dma_out_irq_description = "serial 3 dma tr",
#else
.dma_out_enabled = 0,
@@ -436,7 +436,7 @@ static struct e100_serial rs_table[] = {
.dma_in_enabled = 1,
.dma_in_nbr = SER3_RX_DMA_NBR,
.dma_in_irq_nbr = SER3_DMA_RX_IRQ_NBR,
- .dma_in_irq_flags = IRQF_DISABLED,
+ .dma_in_irq_flags = 0,
.dma_in_irq_description = "serial 3 dma rec",
#else
.dma_in_enabled = 0,
@@ -4558,7 +4558,7 @@ static int __init rs_init(void)
/* hook the irq's for DMA channel 6 and 7, serial output and input, and some more... */
if (request_irq(SERIAL_IRQ_NBR, ser_interrupt,
- IRQF_SHARED | IRQF_DISABLED, "serial ", driver))
+ IRQF_SHARED, "serial ", driver))
panic("%s: Failed to request irq8", __func__);
#endif
diff --git a/drivers/tty/serial/icom.c b/drivers/tty/serial/icom.c
index 8a869e5..d55709a 100644
--- a/drivers/tty/serial/icom.c
+++ b/drivers/tty/serial/icom.c
@@ -1554,7 +1554,7 @@ static int __devinit icom_probe(struct pci_dev *dev,
/* save off irq and request irq line */
if ( (retval = request_irq(dev->irq, icom_interrupt,
- IRQF_DISABLED | IRQF_SHARED, ICOM_DRIVER_NAME,
+ IRQF_SHARED, ICOM_DRIVER_NAME,
(void *) icom_adapter))) {
goto probe_exit2;
}
diff --git a/drivers/tty/serial/lantiq.c b/drivers/tty/serial/lantiq.c
index bc95f52..96c1cac 100644
--- a/drivers/tty/serial/lantiq.c
+++ b/drivers/tty/serial/lantiq.c
@@ -338,21 +338,21 @@ lqasc_startup(struct uart_port *port)
ASCCON_ROEN, port->membase + LTQ_ASC_CON);
retval = request_irq(ltq_port->tx_irq, lqasc_tx_int,
- IRQF_DISABLED, "asc_tx", port);
+ 0, "asc_tx", port);
if (retval) {
pr_err("failed to request lqasc_tx_int\n");
return retval;
}
retval = request_irq(ltq_port->rx_irq, lqasc_rx_int,
- IRQF_DISABLED, "asc_rx", port);
+ 0, "asc_rx", port);
if (retval) {
pr_err("failed to request lqasc_rx_int\n");
goto err1;
}
retval = request_irq(ltq_port->err_irq, lqasc_err_int,
- IRQF_DISABLED, "asc_err", port);
+ 0, "asc_err", port);
if (retval) {
pr_err("failed to request lqasc_err_int\n");
goto err2;
diff --git a/drivers/tty/serial/mcf.c b/drivers/tty/serial/mcf.c
index 3394b7c..9afca09 100644
--- a/drivers/tty/serial/mcf.c
+++ b/drivers/tty/serial/mcf.c
@@ -380,7 +380,7 @@ static void mcf_config_port(struct uart_port *port, int flags)
/* Clear mask, so no surprise interrupts. */
writeb(0, port->membase + MCFUART_UIMR);
- if (request_irq(port->irq, mcf_interrupt, IRQF_DISABLED, "UART", port))
+ if (request_irq(port->irq, mcf_interrupt, 0, "UART", port))
printk(KERN_ERR "MCF: unable to attach ColdFire UART %d "
"interrupt vector=%d\n", port->line, port->irq);
}
diff --git a/drivers/tty/serial/mpc52xx_uart.c b/drivers/tty/serial/mpc52xx_uart.c
index a0bcd8a..a0d02ef 100644
--- a/drivers/tty/serial/mpc52xx_uart.c
+++ b/drivers/tty/serial/mpc52xx_uart.c
@@ -273,7 +273,7 @@ static unsigned int mpc5200b_psc_set_baudrate(struct uart_port *port,
static void mpc52xx_psc_get_irq(struct uart_port *port, struct device_node *np)
{
- port->irqflags = IRQF_DISABLED;
+ port->irqflags = 0;
port->irq = irq_of_parse_and_map(np, 0);
}
diff --git a/drivers/tty/serial/serial_ks8695.c b/drivers/tty/serial/serial_ks8695.c
index 2430319..01949af 100644
--- a/drivers/tty/serial/serial_ks8695.c
+++ b/drivers/tty/serial/serial_ks8695.c
@@ -336,19 +336,19 @@ static int ks8695uart_startup(struct uart_port *port)
/*
* Allocate the IRQ
*/
- retval = request_irq(KS8695_IRQ_UART_TX, ks8695uart_tx_chars, IRQF_DISABLED, "UART TX", port);
+ retval = request_irq(KS8695_IRQ_UART_TX, ks8695uart_tx_chars, 0, "UART TX", port);
if (retval)
goto err_tx;
- retval = request_irq(KS8695_IRQ_UART_RX, ks8695uart_rx_chars, IRQF_DISABLED, "UART RX", port);
+ retval = request_irq(KS8695_IRQ_UART_RX, ks8695uart_rx_chars, 0, "UART RX", port);
if (retval)
goto err_rx;
- retval = request_irq(KS8695_IRQ_UART_LINE_STATUS, ks8695uart_rx_chars, IRQF_DISABLED, "UART LineStatus", port);
+ retval = request_irq(KS8695_IRQ_UART_LINE_STATUS, ks8695uart_rx_chars, 0, "UART LineStatus", port);
if (retval)
goto err_ls;
- retval = request_irq(KS8695_IRQ_UART_MODEM_STATUS, ks8695uart_modem_status, IRQF_DISABLED, "UART ModemStatus", port);
+ retval = request_irq(KS8695_IRQ_UART_MODEM_STATUS, ks8695uart_modem_status, 0, "UART ModemStatus", port);
if (retval)
goto err_ms;
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 25c3549..1945c70 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -1967,7 +1967,7 @@ static int __devinit sci_init_single(struct platform_device *dev,
* For the muxed case there's nothing more to do.
*/
port->irq = p->irqs[SCIx_RXI_IRQ];
- port->irqflags = IRQF_DISABLED;
+ port->irqflags = 0;
port->serial_in = sci_serial_in;
port->serial_out = sci_serial_out;
diff --git a/drivers/tty/serial/sn_console.c b/drivers/tty/serial/sn_console.c
index 377ae74..2969c86 100644
--- a/drivers/tty/serial/sn_console.c
+++ b/drivers/tty/serial/sn_console.c
@@ -737,7 +737,7 @@ static void __init sn_sal_switch_to_interrupts(struct sn_cons_port *port)
DPRINTF("sn_console: switching to interrupt driven console\n");
if (request_irq(SGI_UART_VECTOR, sn_sal_interrupt,
- IRQF_DISABLED | IRQF_SHARED,
+ IRQF_SHARED,
"SAL console driver", port) >= 0) {
spin_lock_irqsave(&port->sc_port.lock, flags);
port->sc_port.irq = SGI_UART_VECTOR;
--
1.7.4.1
^ permalink raw reply related
* Re: [PATCH 53/57] sound: irq: Remove IRQF_DISABLED
From: Takashi Iwai @ 2011-09-21 9:52 UTC (permalink / raw)
To: Yong Zhang
Cc: alsa-devel, Kuninori Morimoto, Clemens Ladisch, Jaroslav Kysela,
Peter Ujfalusi, Paul Gortmaker, linux-arch, Russell King,
Jassi Brar, Manuel Lauss, Uwe Kleine-König, Axel Lin,
Liam Girdwood, cbe-oss-dev, Wan ZongShun, Lucas De Marchi, tglx,
linux-arm-kernel, Eric Miao, Geoff Levand, Jiri Kosina,
Mark Brown, linux-kernel, Sangbeom Kim, Paul Mundt, Simon Horman,
Joe Perches, Jarkko Nikula, linuxppc-dev
In-Reply-To: <1316597339-29861-54-git-send-email-yong.zhang0@gmail.com>
At Wed, 21 Sep 2011 17:28:54 +0800,
Yong Zhang wrote:
>
> Since commit [c58543c8: genirq: Run irq handlers with interrupts disabled],
Hm, this id hits a different commit:
commit c58543c869606532c2382f027d6466f4672ea756
Author: David S. Miller <davem@davemloft.net>
Date: Tue Oct 13 00:49:09 2009 -0700
sparc64: Set IRQF_DISABLED on LDC channel IRQs.
You mean commit e58aa3d2d0cc01ad8d6f7f640a0670433f794922?
> We run all interrupt handlers with interrupts disabled
> and we even check and yell when an interrupt handler
> returns with interrupts enabled (see commit [b738a50a:
> genirq: Warn when handler enables interrupts]).
>
> So now this flag is a NOOP and can be removed.
>
> Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Do you want to merge by yourself or shall I take it to sound git tree?
Since IRQF_DISABLED isn't used, it can be applied safely in 3.1-based
tree, right?
Anyway, if needed, take my ack:
Acked-by: Takashi Iwai <tiwai@suse.de>
thanks,
Takashi
> ---
> include/sound/initval.h | 2 +-
> sound/arm/aaci.c | 2 +-
> sound/arm/pxa2xx-ac97-lib.c | 2 +-
> sound/drivers/ml403-ac97cr.c | 4 ++--
> sound/drivers/mpu401/mpu401_uart.c | 2 +-
> sound/drivers/mtpav.c | 2 +-
> sound/drivers/serial-u16550.c | 2 +-
> sound/isa/ad1816a/ad1816a_lib.c | 2 +-
> sound/isa/es1688/es1688_lib.c | 2 +-
> sound/isa/es18xx.c | 2 +-
> sound/isa/gus/gus_main.c | 2 +-
> sound/isa/gus/gusmax.c | 2 +-
> sound/isa/gus/interwave.c | 2 +-
> sound/isa/opl3sa2.c | 2 +-
> sound/isa/opti9xx/opti92x-ad1848.c | 2 +-
> sound/isa/sb/sb_common.c | 2 +-
> sound/isa/wavefront/wavefront.c | 2 +-
> sound/isa/wss/wss_lib.c | 2 +-
> sound/mips/au1x00.c | 4 ++--
> sound/pci/sis7019.c | 4 ++--
> sound/ppc/snd_ps3.c | 2 +-
> sound/soc/au1x/dma.c | 2 +-
> sound/soc/codecs/tlv320dac33.c | 2 +-
> sound/soc/nuc900/nuc900-pcm.c | 2 +-
> sound/soc/samsung/ac97.c | 2 +-
> sound/soc/sh/fsi.c | 2 +-
> sound/soc/txx9/txx9aclc-ac97.c | 2 +-
> sound/sparc/amd7930.c | 2 +-
> 28 files changed, 31 insertions(+), 31 deletions(-)
>
> diff --git a/include/sound/initval.h b/include/sound/initval.h
> index 1daa6df..f99a0d2 100644
> --- a/include/sound/initval.h
> +++ b/include/sound/initval.h
> @@ -62,7 +62,7 @@ static int snd_legacy_find_free_irq(int *irq_table)
> {
> while (*irq_table != -1) {
> if (!request_irq(*irq_table, snd_legacy_empty_irq_handler,
> - IRQF_DISABLED | IRQF_PROBE_SHARED, "ALSA Test IRQ",
> + IRQF_PROBE_SHARED, "ALSA Test IRQ",
> (void *) irq_table)) {
> free_irq(*irq_table, (void *) irq_table);
> return *irq_table;
> diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c
> index d0cead3..e518d38 100644
> --- a/sound/arm/aaci.c
> +++ b/sound/arm/aaci.c
> @@ -443,7 +443,7 @@ static int aaci_pcm_open(struct snd_pcm_substream *substream)
> mutex_lock(&aaci->irq_lock);
> if (!aaci->users++) {
> ret = request_irq(aaci->dev->irq[0], aaci_irq,
> - IRQF_SHARED | IRQF_DISABLED, DRIVER_NAME, aaci);
> + IRQF_SHARED, DRIVER_NAME, aaci);
> if (ret != 0)
> aaci->users--;
> }
> diff --git a/sound/arm/pxa2xx-ac97-lib.c b/sound/arm/pxa2xx-ac97-lib.c
> index 88eec38..8ad6535 100644
> --- a/sound/arm/pxa2xx-ac97-lib.c
> +++ b/sound/arm/pxa2xx-ac97-lib.c
> @@ -359,7 +359,7 @@ int __devinit pxa2xx_ac97_hw_probe(struct platform_device *dev)
> if (ret)
> goto err_clk2;
>
> - ret = request_irq(IRQ_AC97, pxa2xx_ac97_irq, IRQF_DISABLED, "AC97", NULL);
> + ret = request_irq(IRQ_AC97, pxa2xx_ac97_irq, 0, "AC97", NULL);
> if (ret < 0)
> goto err_irq;
>
> diff --git a/sound/drivers/ml403-ac97cr.c b/sound/drivers/ml403-ac97cr.c
> index 5cfcb90..2c7a763 100644
> --- a/sound/drivers/ml403-ac97cr.c
> +++ b/sound/drivers/ml403-ac97cr.c
> @@ -1153,7 +1153,7 @@ snd_ml403_ac97cr_create(struct snd_card *card, struct platform_device *pfdev,
> "0x%x done\n", (unsigned int)ml403_ac97cr->port);
> /* get irq */
> irq = platform_get_irq(pfdev, 0);
> - if (request_irq(irq, snd_ml403_ac97cr_irq, IRQF_DISABLED,
> + if (request_irq(irq, snd_ml403_ac97cr_irq, 0,
> dev_name(&pfdev->dev), (void *)ml403_ac97cr)) {
> snd_printk(KERN_ERR SND_ML403_AC97CR_DRIVER ": "
> "unable to grab IRQ %d\n",
> @@ -1166,7 +1166,7 @@ snd_ml403_ac97cr_create(struct snd_card *card, struct platform_device *pfdev,
> "request (playback) irq %d done\n",
> ml403_ac97cr->irq);
> irq = platform_get_irq(pfdev, 1);
> - if (request_irq(irq, snd_ml403_ac97cr_irq, IRQF_DISABLED,
> + if (request_irq(irq, snd_ml403_ac97cr_irq, 0,
> dev_name(&pfdev->dev), (void *)ml403_ac97cr)) {
> snd_printk(KERN_ERR SND_ML403_AC97CR_DRIVER ": "
> "unable to grab IRQ %d\n",
> diff --git a/sound/drivers/mpu401/mpu401_uart.c b/sound/drivers/mpu401/mpu401_uart.c
> index 34df505..1cff331 100644
> --- a/sound/drivers/mpu401/mpu401_uart.c
> +++ b/sound/drivers/mpu401/mpu401_uart.c
> @@ -578,7 +578,7 @@ int snd_mpu401_uart_new(struct snd_card *card, int device,
> else
> mpu->cport = port + 1;
> if (irq >= 0) {
> - if (request_irq(irq, snd_mpu401_uart_interrupt, IRQF_DISABLED,
> + if (request_irq(irq, snd_mpu401_uart_interrupt, 0,
> "MPU401 UART", (void *) mpu)) {
> snd_printk(KERN_ERR "mpu401_uart: "
> "unable to grab IRQ %d\n", irq);
> diff --git a/sound/drivers/mtpav.c b/sound/drivers/mtpav.c
> index f50021c..7693079 100644
> --- a/sound/drivers/mtpav.c
> +++ b/sound/drivers/mtpav.c
> @@ -590,7 +590,7 @@ static int __devinit snd_mtpav_get_ISA(struct mtpav * mcard)
> return -EBUSY;
> }
> mcard->port = port;
> - if (request_irq(irq, snd_mtpav_irqh, IRQF_DISABLED, "MOTU MTPAV", mcard)) {
> + if (request_irq(irq, snd_mtpav_irqh, 0, "MOTU MTPAV", mcard)) {
> snd_printk(KERN_ERR "MTVAP IRQ %d busy\n", irq);
> return -EBUSY;
> }
> diff --git a/sound/drivers/serial-u16550.c b/sound/drivers/serial-u16550.c
> index 6c5bf58..85aad43 100644
> --- a/sound/drivers/serial-u16550.c
> +++ b/sound/drivers/serial-u16550.c
> @@ -816,7 +816,7 @@ static int __devinit snd_uart16550_create(struct snd_card *card,
>
> if (irq >= 0 && irq != SNDRV_AUTO_IRQ) {
> if (request_irq(irq, snd_uart16550_interrupt,
> - IRQF_DISABLED, "Serial MIDI", uart)) {
> + 0, "Serial MIDI", uart)) {
> snd_printk(KERN_WARNING
> "irq %d busy. Using Polling.\n", irq);
> } else {
> diff --git a/sound/isa/ad1816a/ad1816a_lib.c b/sound/isa/ad1816a/ad1816a_lib.c
> index 05aef8b..177eed3 100644
> --- a/sound/isa/ad1816a/ad1816a_lib.c
> +++ b/sound/isa/ad1816a/ad1816a_lib.c
> @@ -595,7 +595,7 @@ int __devinit snd_ad1816a_create(struct snd_card *card,
> snd_ad1816a_free(chip);
> return -EBUSY;
> }
> - if (request_irq(irq, snd_ad1816a_interrupt, IRQF_DISABLED, "AD1816A", (void *) chip)) {
> + if (request_irq(irq, snd_ad1816a_interrupt, 0, "AD1816A", (void *) chip)) {
> snd_printk(KERN_ERR "ad1816a: can't grab IRQ %d\n", irq);
> snd_ad1816a_free(chip);
> return -EBUSY;
> diff --git a/sound/isa/es1688/es1688_lib.c b/sound/isa/es1688/es1688_lib.c
> index 0767620..d3eab6f 100644
> --- a/sound/isa/es1688/es1688_lib.c
> +++ b/sound/isa/es1688/es1688_lib.c
> @@ -661,7 +661,7 @@ int snd_es1688_create(struct snd_card *card,
> snd_printk(KERN_ERR "es1688: can't grab port 0x%lx\n", port + 4);
> return -EBUSY;
> }
> - if (request_irq(irq, snd_es1688_interrupt, IRQF_DISABLED, "ES1688", (void *) chip)) {
> + if (request_irq(irq, snd_es1688_interrupt, 0, "ES1688", (void *) chip)) {
> snd_printk(KERN_ERR "es1688: can't grab IRQ %d\n", irq);
> return -EBUSY;
> }
> diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c
> index aeee8f8..bf6ad0b 100644
> --- a/sound/isa/es18xx.c
> +++ b/sound/isa/es18xx.c
> @@ -1805,7 +1805,7 @@ static int __devinit snd_es18xx_new_device(struct snd_card *card,
> return -EBUSY;
> }
>
> - if (request_irq(irq, snd_es18xx_interrupt, IRQF_DISABLED, "ES18xx",
> + if (request_irq(irq, snd_es18xx_interrupt, 0, "ES18xx",
> (void *) card)) {
> snd_es18xx_free(card);
> snd_printk(KERN_ERR PFX "unable to grap IRQ %d\n", irq);
> diff --git a/sound/isa/gus/gus_main.c b/sound/isa/gus/gus_main.c
> index 12eb98f..3167e5a 100644
> --- a/sound/isa/gus/gus_main.c
> +++ b/sound/isa/gus/gus_main.c
> @@ -180,7 +180,7 @@ int snd_gus_create(struct snd_card *card,
> snd_gus_free(gus);
> return -EBUSY;
> }
> - if (irq >= 0 && request_irq(irq, snd_gus_interrupt, IRQF_DISABLED, "GUS GF1", (void *) gus)) {
> + if (irq >= 0 && request_irq(irq, snd_gus_interrupt, 0, "GUS GF1", (void *) gus)) {
> snd_printk(KERN_ERR "gus: can't grab irq %d\n", irq);
> snd_gus_free(gus);
> return -EBUSY;
> diff --git a/sound/isa/gus/gusmax.c b/sound/isa/gus/gusmax.c
> index 3e4a58b..c43faa0 100644
> --- a/sound/isa/gus/gusmax.c
> +++ b/sound/isa/gus/gusmax.c
> @@ -291,7 +291,7 @@ static int __devinit snd_gusmax_probe(struct device *pdev, unsigned int dev)
> goto _err;
> }
>
> - if (request_irq(xirq, snd_gusmax_interrupt, IRQF_DISABLED, "GUS MAX", (void *)maxcard)) {
> + if (request_irq(xirq, snd_gusmax_interrupt, 0, "GUS MAX", (void *)maxcard)) {
> snd_printk(KERN_ERR PFX "unable to grab IRQ %d\n", xirq);
> err = -EBUSY;
> goto _err;
> diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c
> index c7b80e4..5f869a3 100644
> --- a/sound/isa/gus/interwave.c
> +++ b/sound/isa/gus/interwave.c
> @@ -684,7 +684,7 @@ static int __devinit snd_interwave_probe(struct snd_card *card, int dev)
> if ((err = snd_gus_initialize(gus)) < 0)
> return err;
>
> - if (request_irq(xirq, snd_interwave_interrupt, IRQF_DISABLED,
> + if (request_irq(xirq, snd_interwave_interrupt, 0,
> "InterWave", iwcard)) {
> snd_printk(KERN_ERR PFX "unable to grab IRQ %d\n", xirq);
> return -EBUSY;
> diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c
> index de99f47..bbafb0b 100644
> --- a/sound/isa/opl3sa2.c
> +++ b/sound/isa/opl3sa2.c
> @@ -667,7 +667,7 @@ static int __devinit snd_opl3sa2_probe(struct snd_card *card, int dev)
> err = snd_opl3sa2_detect(card);
> if (err < 0)
> return err;
> - err = request_irq(xirq, snd_opl3sa2_interrupt, IRQF_DISABLED,
> + err = request_irq(xirq, snd_opl3sa2_interrupt, 0,
> "OPL3-SA2", card);
> if (err) {
> snd_printk(KERN_ERR PFX "can't grab IRQ %d\n", xirq);
> diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c
> index 346e12b..6dbbfa7 100644
> --- a/sound/isa/opti9xx/opti92x-ad1848.c
> +++ b/sound/isa/opti9xx/opti92x-ad1848.c
> @@ -892,7 +892,7 @@ static int __devinit snd_opti9xx_probe(struct snd_card *card)
> #endif
> #ifdef OPTi93X
> error = request_irq(irq, snd_opti93x_interrupt,
> - IRQF_DISABLED, DEV_NAME" - WSS", chip);
> + 0, DEV_NAME" - WSS", chip);
> if (error < 0) {
> snd_printk(KERN_ERR "opti9xx: can't grab IRQ %d\n", irq);
> return error;
> diff --git a/sound/isa/sb/sb_common.c b/sound/isa/sb/sb_common.c
> index eae6c1c..d2e1921 100644
> --- a/sound/isa/sb/sb_common.c
> +++ b/sound/isa/sb/sb_common.c
> @@ -240,7 +240,7 @@ int snd_sbdsp_create(struct snd_card *card,
> if (request_irq(irq, irq_handler,
> (hardware == SB_HW_ALS4000 ||
> hardware == SB_HW_CS5530) ?
> - IRQF_SHARED : IRQF_DISABLED,
> + IRQF_SHARED : 0,
> "SoundBlaster", (void *) chip)) {
> snd_printk(KERN_ERR "sb: can't grab irq %d\n", irq);
> snd_sbdsp_free(chip);
> diff --git a/sound/isa/wavefront/wavefront.c b/sound/isa/wavefront/wavefront.c
> index 83f291d..8714297 100644
> --- a/sound/isa/wavefront/wavefront.c
> +++ b/sound/isa/wavefront/wavefront.c
> @@ -418,7 +418,7 @@ snd_wavefront_probe (struct snd_card *card, int dev)
> return -EBUSY;
> }
> if (request_irq(ics2115_irq[dev], snd_wavefront_ics2115_interrupt,
> - IRQF_DISABLED, "ICS2115", acard)) {
> + 0, "ICS2115", acard)) {
> snd_printk(KERN_ERR "unable to use ICS2115 IRQ %d\n", ics2115_irq[dev]);
> return -EBUSY;
> }
> diff --git a/sound/isa/wss/wss_lib.c b/sound/isa/wss/wss_lib.c
> index 2a42cc3..7277c5b 100644
> --- a/sound/isa/wss/wss_lib.c
> +++ b/sound/isa/wss/wss_lib.c
> @@ -1833,7 +1833,7 @@ int snd_wss_create(struct snd_card *card,
> }
> chip->cport = cport;
> if (!(hwshare & WSS_HWSHARE_IRQ))
> - if (request_irq(irq, snd_wss_interrupt, IRQF_DISABLED,
> + if (request_irq(irq, snd_wss_interrupt, 0,
> "WSS", (void *) chip)) {
> snd_printk(KERN_ERR "wss: can't grab IRQ %d\n", irq);
> snd_wss_free(chip);
> diff --git a/sound/mips/au1x00.c b/sound/mips/au1x00.c
> index 446cf97..7567ebd 100644
> --- a/sound/mips/au1x00.c
> +++ b/sound/mips/au1x00.c
> @@ -465,13 +465,13 @@ snd_au1000_pcm_new(struct snd_au1000 *au1000)
>
> flags = claim_dma_lock();
> if ((au1000->stream[PLAYBACK]->dma = request_au1000_dma(DMA_ID_AC97C_TX,
> - "AC97 TX", au1000_dma_interrupt, IRQF_DISABLED,
> + "AC97 TX", au1000_dma_interrupt, 0,
> au1000->stream[PLAYBACK])) < 0) {
> release_dma_lock(flags);
> return -EBUSY;
> }
> if ((au1000->stream[CAPTURE]->dma = request_au1000_dma(DMA_ID_AC97C_RX,
> - "AC97 RX", au1000_dma_interrupt, IRQF_DISABLED,
> + "AC97 RX", au1000_dma_interrupt, 0,
> au1000->stream[CAPTURE])) < 0){
> release_dma_lock(flags);
> return -EBUSY;
> diff --git a/sound/pci/sis7019.c b/sound/pci/sis7019.c
> index bcf6152..5ffb20b 100644
> --- a/sound/pci/sis7019.c
> +++ b/sound/pci/sis7019.c
> @@ -1234,7 +1234,7 @@ static int sis_resume(struct pci_dev *pci)
> goto error;
> }
>
> - if (request_irq(pci->irq, sis_interrupt, IRQF_DISABLED|IRQF_SHARED,
> + if (request_irq(pci->irq, sis_interrupt, IRQF_SHARED,
> KBUILD_MODNAME, sis)) {
> printk(KERN_ERR "sis7019: unable to regain IRQ %d\n", pci->irq);
> goto error;
> @@ -1340,7 +1340,7 @@ static int __devinit sis_chip_create(struct snd_card *card,
> if (rc)
> goto error_out_cleanup;
>
> - if (request_irq(pci->irq, sis_interrupt, IRQF_DISABLED|IRQF_SHARED,
> + if (request_irq(pci->irq, sis_interrupt, IRQF_SHARED,
> KBUILD_MODNAME, sis)) {
> printk(KERN_ERR "unable to allocate irq %d\n", sis->irq);
> goto error_out_cleanup;
> diff --git a/sound/ppc/snd_ps3.c b/sound/ppc/snd_ps3.c
> index bc823a5..775bd95 100644
> --- a/sound/ppc/snd_ps3.c
> +++ b/sound/ppc/snd_ps3.c
> @@ -845,7 +845,7 @@ static int __devinit snd_ps3_allocate_irq(void)
> return ret;
> }
>
> - ret = request_irq(the_card.irq_no, snd_ps3_interrupt, IRQF_DISABLED,
> + ret = request_irq(the_card.irq_no, snd_ps3_interrupt, 0,
> SND_PS3_DRIVER_NAME, &the_card);
> if (ret) {
> pr_info("%s: request_irq failed (%d)\n", __func__, ret);
> diff --git a/sound/soc/au1x/dma.c b/sound/soc/au1x/dma.c
> index 7aa5b76..177f713 100644
> --- a/sound/soc/au1x/dma.c
> +++ b/sound/soc/au1x/dma.c
> @@ -211,7 +211,7 @@ static int alchemy_pcm_open(struct snd_pcm_substream *substream)
> /* DMA setup */
> name = (s == SNDRV_PCM_STREAM_PLAYBACK) ? "audio-tx" : "audio-rx";
> ctx->stream[s].dma = request_au1000_dma(dmaids[s], name,
> - au1000_dma_interrupt, IRQF_DISABLED,
> + au1000_dma_interrupt, 0,
> &ctx->stream[s]);
> set_dma_mode(ctx->stream[s].dma,
> get_dma_mode(ctx->stream[s].dma) & ~DMA_NC);
> diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c
> index faa5e9f..243d177 100644
> --- a/sound/soc/codecs/tlv320dac33.c
> +++ b/sound/soc/codecs/tlv320dac33.c
> @@ -1431,7 +1431,7 @@ static int dac33_soc_probe(struct snd_soc_codec *codec)
> /* Check if the IRQ number is valid and request it */
> if (dac33->irq >= 0) {
> ret = request_irq(dac33->irq, dac33_interrupt_handler,
> - IRQF_TRIGGER_RISING | IRQF_DISABLED,
> + IRQF_TRIGGER_RISING,
> codec->name, codec);
> if (ret < 0) {
> dev_err(codec->dev, "Could not request IRQ%d (%d)\n",
> diff --git a/sound/soc/nuc900/nuc900-pcm.c b/sound/soc/nuc900/nuc900-pcm.c
> index e46d551..865b288 100644
> --- a/sound/soc/nuc900/nuc900-pcm.c
> +++ b/sound/soc/nuc900/nuc900-pcm.c
> @@ -268,7 +268,7 @@ static int nuc900_dma_open(struct snd_pcm_substream *substream)
> nuc900_audio = nuc900_ac97_data;
>
> if (request_irq(nuc900_audio->irq_num, nuc900_dma_interrupt,
> - IRQF_DISABLED, "nuc900-dma", substream))
> + 0, "nuc900-dma", substream))
> return -EBUSY;
>
> runtime->private_data = nuc900_audio;
> diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c
> index b4f9b00..41b387b 100644
> --- a/sound/soc/samsung/ac97.c
> +++ b/sound/soc/samsung/ac97.c
> @@ -450,7 +450,7 @@ static __devinit int s3c_ac97_probe(struct platform_device *pdev)
> }
>
> ret = request_irq(irq_res->start, s3c_ac97_irq,
> - IRQF_DISABLED, "AC97", NULL);
> + 0, "AC97", NULL);
> if (ret < 0) {
> dev_err(&pdev->dev, "ac97: interrupt request failed.\n");
> goto err4;
> diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
> index 8e112cc..1493ebf 100644
> --- a/sound/soc/sh/fsi.c
> +++ b/sound/soc/sh/fsi.c
> @@ -1285,7 +1285,7 @@ static int fsi_probe(struct platform_device *pdev)
> pm_runtime_enable(&pdev->dev);
> dev_set_drvdata(&pdev->dev, master);
>
> - ret = request_irq(irq, &fsi_interrupt, IRQF_DISABLED,
> + ret = request_irq(irq, &fsi_interrupt, 0,
> id_entry->name, master);
> if (ret) {
> dev_err(&pdev->dev, "irq request err\n");
> diff --git a/sound/soc/txx9/txx9aclc-ac97.c b/sound/soc/txx9/txx9aclc-ac97.c
> index 743d07b..a4e3f55 100644
> --- a/sound/soc/txx9/txx9aclc-ac97.c
> +++ b/sound/soc/txx9/txx9aclc-ac97.c
> @@ -201,7 +201,7 @@ static int __devinit txx9aclc_ac97_dev_probe(struct platform_device *pdev)
> if (!drvdata->base)
> return -EBUSY;
> err = devm_request_irq(&pdev->dev, irq, txx9aclc_ac97_irq,
> - IRQF_DISABLED, dev_name(&pdev->dev), drvdata);
> + 0, dev_name(&pdev->dev), drvdata);
> if (err < 0)
> return err;
>
> diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c
> index ad7d4d7..f036776 100644
> --- a/sound/sparc/amd7930.c
> +++ b/sound/sparc/amd7930.c
> @@ -962,7 +962,7 @@ static int __devinit snd_amd7930_create(struct snd_card *card,
> amd7930_idle(amd);
>
> if (request_irq(irq, snd_amd7930_interrupt,
> - IRQF_DISABLED | IRQF_SHARED, "amd7930", amd)) {
> + IRQF_SHARED, "amd7930", amd)) {
> snd_printk(KERN_ERR "amd7930-%d: Unable to grab IRQ %d\n",
> dev, irq);
> snd_amd7930_free(amd);
> --
> 1.7.4.1
>
^ permalink raw reply
* Re: [PATCH 53/57] sound: irq: Remove IRQF_DISABLED
From: Thomas Gleixner @ 2011-09-21 9:55 UTC (permalink / raw)
To: Takashi Iwai
Cc: alsa-devel, Kuninori Morimoto, Clemens Ladisch, Jaroslav Kysela,
Peter Ujfalusi, Paul Gortmaker, linux-arch, Russell King,
Jassi Brar, Manuel Lauss, Uwe Kleine-König, Axel Lin,
Liam Girdwood, cbe-oss-dev, Wan ZongShun, Lucas De Marchi,
Yong Zhang, linux-arm-kernel, Eric Miao, Geoff Levand,
Jiri Kosina, Mark Brown, linux-kernel, Sangbeom Kim, Paul Mundt,
Simon Horman, Joe Perches, Jarkko Nikula, linuxppc-dev
In-Reply-To: <s5hsjnqxlxb.wl%tiwai@suse.de>
On Wed, 21 Sep 2011, Takashi Iwai wrote:
> At Wed, 21 Sep 2011 17:28:54 +0800,
> Yong Zhang wrote:
> >
> > Since commit [c58543c8: genirq: Run irq handlers with interrupts disabled],
>
> Hm, this id hits a different commit:
> commit c58543c869606532c2382f027d6466f4672ea756
> Author: David S. Miller <davem@davemloft.net>
> Date: Tue Oct 13 00:49:09 2009 -0700
>
> sparc64: Set IRQF_DISABLED on LDC channel IRQs.
>
> You mean commit e58aa3d2d0cc01ad8d6f7f640a0670433f794922?
Yeah.
> > We run all interrupt handlers with interrupts disabled
> > and we even check and yell when an interrupt handler
> > returns with interrupts enabled (see commit [b738a50a:
> > genirq: Warn when handler enables interrupts]).
> >
> > So now this flag is a NOOP and can be removed.
> >
> > Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
> > Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
>
> Do you want to merge by yourself or shall I take it to sound git tree?
> Since IRQF_DISABLED isn't used, it can be applied safely in 3.1-based
> tree, right?
Yes, please go ahead. I'll pick up the leftovers.
Thanks,
tglx
^ permalink raw reply
* Re: [PATCH 53/57] sound: irq: Remove IRQF_DISABLED
From: Ujfalusi, Peter @ 2011-09-21 10:21 UTC (permalink / raw)
To: Yong Zhang
Cc: alsa-devel, Kuninori Morimoto, Takashi Iwai, Clemens Ladisch,
Jaroslav Kysela, Paul Gortmaker, linux-arch, Russell King,
Jassi Brar, Manuel Lauss, Uwe Kleine-König, Axel Lin,
Liam Girdwood, cbe-oss-dev, Wan ZongShun, Lucas De Marchi, tglx,
linux-arm-kernel, Eric Miao, Sangbeom Kim, Jiri Kosina,
Mark Brown, linux-kernel, Geoff Levand, Paul Mundt, Simon Horman,
Joe Perches, Jarkko Nikula, linuxppc-dev
In-Reply-To: <1316597339-29861-54-git-send-email-yong.zhang0@gmail.com>
On Wed, Sep 21, 2011 at 12:28 PM, Yong Zhang <yong.zhang0@gmail.com> wrote:
> Since commit [c58543c8: genirq: Run irq handlers with interrupts disabled],
> We run all interrupt handlers with interrupts disabled
> and we even check and yell when an interrupt handler
> returns with interrupts enabled (see commit [b738a50a:
> genirq: Warn when handler enables interrupts]).
>
> So now this flag is a NOOP and can be removed.
>
> Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
^ permalink raw reply
* [PATCH] PSeries: Cancel RTAS event scan before firmware flash
From: Ravi K Nittala @ 2011-09-21 10:29 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev
The RTAS firmware flash update is conducted using an RTAS call that is
serialized by lock_rtas() which uses spin_lock. While the flash is in
progress, rtasd performs scan for any RTAS events that are generated by
the system. rtasd keeps scanning for the RTAS events generated on the
machine. This is performed via workqueue mechanism. The rtas_event_scan()
also uses an RTAS call to scan the events, eventually trying to acquire
the spin_lock before issuing the request.
The flash update takes a while to complete and during this time, any other
RTAS call has to wait. In this case, rtas_event_scan() waits for a long time
on the spin_lock resulting in a soft lockup.
Fix: Just before the flash update is performed, the queued rtas_event_scan()
work item is cancelled from the work queue so that there is no other RTAS
call issued while the flash is in progress. After the flash completes, the
system reboots and the rtas_event_scan() is rescheduled.
Signed-off-by: Suzuki Poulose <suzuki@in.ibm.com>
Signed-off-by: Ravi Nittala <ravi.nittala@in.ibm.com>
---
arch/powerpc/include/asm/rtas.h | 4 ++++
arch/powerpc/kernel/rtas_flash.c | 8 ++++++++
arch/powerpc/kernel/rtasd.c | 6 ++++++
3 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h
index 58625d1..b5cbd9f 100644
--- a/arch/powerpc/include/asm/rtas.h
+++ b/arch/powerpc/include/asm/rtas.h
@@ -245,6 +245,10 @@ extern int early_init_dt_scan_rtas(unsigned long node,
extern void pSeries_log_error(char *buf, unsigned int err_type, int fatal);
+#ifdef CONFIG_PPC_RTAS_DAEMON
+extern bool rtas_cancel_event_scan(void);
+#endif
+
/* Error types logged. */
#define ERR_FLAG_ALREADY_LOGGED 0x0
#define ERR_FLAG_BOOT 0x1 /* log was pulled from NVRAM on boot */
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c
index e037c74..a9cceff 100644
--- a/arch/powerpc/kernel/rtas_flash.c
+++ b/arch/powerpc/kernel/rtas_flash.c
@@ -567,6 +567,14 @@ static void rtas_flash_firmware(int reboot_type)
return;
}
+#ifdef CONFIG_PPC_RTAS_DAEMON
+ /*
+ * Just before starting the firmware flash, cancel the event scan work
+ * to avoid any soft lockup issues.
+ */
+ rtas_cancel_event_scan();
+#endif
+
/*
* NOTE: the "first" block must be under 4GB, so we create
* an entry with no data blocks in the reserved buffer in
diff --git a/arch/powerpc/kernel/rtasd.c b/arch/powerpc/kernel/rtasd.c
index 481ef06..e8f03fa 100644
--- a/arch/powerpc/kernel/rtasd.c
+++ b/arch/powerpc/kernel/rtasd.c
@@ -472,6 +472,12 @@ static void start_event_scan(void)
&event_scan_work, event_scan_delay);
}
+/* Cancel the rtas event scan work */
+bool rtas_cancel_event_scan(void)
+{
+ return cancel_delayed_work_sync(&event_scan_work);
+}
+
static int __init rtas_init(void)
{
struct proc_dir_entry *entry;
^ permalink raw reply related
* [PATCH V2 2/2] powerpc: update 512x-defconfig
From: Wolfram Sang @ 2011-09-21 10:49 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Anatolij Gustschin
In-Reply-To: <1316602161-12546-1-git-send-email-w.sang@pengutronix.de>
Activate all MPC512x related boards. Also enable GPIO-driver, SPI driver
and at25 to test SPI. Enable DEVTMPFS. Bump to 3.1-rc6.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
arch/powerpc/configs/mpc512x_defconfig | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/arch/powerpc/configs/mpc512x_defconfig b/arch/powerpc/configs/mpc512x_defconfig
index c02bbb2..211fcc9 100644
--- a/arch/powerpc/configs/mpc512x_defconfig
+++ b/arch/powerpc/configs/mpc512x_defconfig
@@ -1,9 +1,9 @@
CONFIG_EXPERIMENTAL=y
# CONFIG_SWAP is not set
CONFIG_SYSVIPC=y
+CONFIG_SPARSE_IRQ=y
CONFIG_LOG_BUF_SHIFT=16
CONFIG_BLK_DEV_INITRD=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
# CONFIG_COMPAT_BRK is not set
CONFIG_SLAB=y
CONFIG_MODULES=y
@@ -13,10 +13,11 @@ CONFIG_MODULE_UNLOAD=y
# CONFIG_PPC_CHRP is not set
CONFIG_PPC_MPC512x=y
CONFIG_MPC5121_ADS=y
+CONFIG_MPC5121_GENERIC=y
+CONFIG_PDM360NG=y
# CONFIG_PPC_PMAC is not set
CONFIG_NO_HZ=y
CONFIG_HZ_1000=y
-CONFIG_SPARSE_IRQ=y
# CONFIG_MIGRATION is not set
# CONFIG_SECCOMP is not set
# CONFIG_PCI is not set
@@ -35,18 +36,16 @@ CONFIG_CAN=y
CONFIG_CAN_RAW=y
CONFIG_CAN_BCM=y
CONFIG_CAN_VCAN=y
-CONFIG_CAN_DEV=y
CONFIG_CAN_MSCAN=y
CONFIG_CAN_DEBUG_DEVICES=y
# CONFIG_WIRELESS is not set
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
# CONFIG_PREVENT_FIRMWARE_BUILD is not set
# CONFIG_FIRMWARE_IN_KERNEL is not set
CONFIG_MTD=y
-CONFIG_MTD_CONCAT=y
-CONFIG_MTD_PARTITIONS=y
CONFIG_MTD_CMDLINE_PARTS=y
-CONFIG_MTD_OF_PARTS=y
CONFIG_MTD_CHAR=y
CONFIG_MTD_BLOCK=y
CONFIG_MTD_CFI=y
@@ -63,6 +62,7 @@ CONFIG_BLK_DEV_RAM_SIZE=8192
CONFIG_BLK_DEV_XIP=y
CONFIG_MISC_DEVICES=y
CONFIG_EEPROM_AT24=y
+CONFIG_EEPROM_AT25=y
CONFIG_SCSI=y
# CONFIG_SCSI_PROC_FS is not set
CONFIG_BLK_DEV_SD=y
@@ -99,10 +99,14 @@ CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200
CONFIG_I2C=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_MPC=y
+CONFIG_SPI=y
+CONFIG_SPI_MPC512x_PSC=y
+CONFIG_GPIOLIB=y
+CONFIG_GPIO_SYSFS=y
+CONFIG_GPIO_MPC8XXX=y
# CONFIG_HWMON is not set
CONFIG_MEDIA_SUPPORT=y
CONFIG_VIDEO_DEV=y
-# CONFIG_VIDEO_ALLOW_V4L1 is not set
CONFIG_VIDEO_ADV_DEBUG=y
# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set
CONFIG_VIDEO_SAA711X=y
@@ -132,6 +136,5 @@ CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_ISO8859_1=y
# CONFIG_ENABLE_WARN_DEPRECATED is not set
# CONFIG_ENABLE_MUST_CHECK is not set
-# CONFIG_RCU_CPU_STALL_DETECTOR is not set
# CONFIG_CRYPTO_ANSI_CPRNG is not set
# CONFIG_CRYPTO_HW is not set
--
1.7.5.4
^ permalink raw reply related
* [PATCH V2 1/2] gpio: move mpc8xxx/512x gpio driver to drivers/gpio
From: Wolfram Sang @ 2011-09-21 10:49 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Anatolij Gustschin
Move the driver to the place where it is expected to be nowadays. Also
rename its CONFIG-name to match the rest and adapt the defconfigs.
Finally, move selection of REQUIRE_GPIOLIB or WANTS_OPTIONAL_GPIOLIB to
the platforms, because this option is per-platform and not per-driver.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
I'd think this should go via ppc, so it is in sync with the defconfig update of
patch 2/2.
Changes since V1: Use -C in format-patch to show the rename.
arch/powerpc/configs/85xx/p1023rds_defconfig | 2 +-
arch/powerpc/configs/85xx/xes_mpc85xx_defconfig | 2 +-
arch/powerpc/configs/mpc85xx_defconfig | 2 +-
arch/powerpc/configs/mpc85xx_smp_defconfig | 2 +-
arch/powerpc/configs/ppc6xx_defconfig | 2 +-
arch/powerpc/platforms/512x/Kconfig | 1 +
arch/powerpc/platforms/83xx/Kconfig | 9 ++++++---
arch/powerpc/platforms/85xx/Kconfig | 12 ++++++++----
arch/powerpc/platforms/86xx/Kconfig | 1 +
arch/powerpc/platforms/Kconfig | 10 ----------
arch/powerpc/sysdev/Makefile | 1 -
drivers/gpio/Kconfig | 8 ++++++++
drivers/gpio/Makefile | 1 +
.../mpc8xxx_gpio.c => drivers/gpio/gpio-mpc8xxx.c | 0
14 files changed, 30 insertions(+), 23 deletions(-)
rename arch/powerpc/sysdev/mpc8xxx_gpio.c => drivers/gpio/gpio-mpc8xxx.c (100%)
diff --git a/arch/powerpc/configs/85xx/p1023rds_defconfig b/arch/powerpc/configs/85xx/p1023rds_defconfig
index 3ff5a81..c091aaf 100644
--- a/arch/powerpc/configs/85xx/p1023rds_defconfig
+++ b/arch/powerpc/configs/85xx/p1023rds_defconfig
@@ -24,7 +24,7 @@ CONFIG_P1023_RDS=y
CONFIG_QUICC_ENGINE=y
CONFIG_QE_GPIO=y
CONFIG_CPM2=y
-CONFIG_MPC8xxx_GPIO=y
+CONFIG_GPIO_MPC8XXX=y
CONFIG_HIGHMEM=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
diff --git a/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig b/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig
index 5ea3124..1cd6fcb 100644
--- a/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig
+++ b/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig
@@ -20,7 +20,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_MODVERSIONS=y
# CONFIG_BLK_DEV_BSG is not set
CONFIG_XES_MPC85xx=y
-CONFIG_MPC8xxx_GPIO=y
+CONFIG_GPIO_MPC8XXX=y
CONFIG_HIGHMEM=y
CONFIG_MATH_EMULATION=y
CONFIG_SPARSE_IRQ=y
diff --git a/arch/powerpc/configs/mpc85xx_defconfig b/arch/powerpc/configs/mpc85xx_defconfig
index a3467bf..2500912 100644
--- a/arch/powerpc/configs/mpc85xx_defconfig
+++ b/arch/powerpc/configs/mpc85xx_defconfig
@@ -41,7 +41,7 @@ CONFIG_TQM8560=y
CONFIG_SBC8548=y
CONFIG_QUICC_ENGINE=y
CONFIG_QE_GPIO=y
-CONFIG_MPC8xxx_GPIO=y
+CONFIG_GPIO_MPC8XXX=y
CONFIG_HIGHMEM=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
diff --git a/arch/powerpc/configs/mpc85xx_smp_defconfig b/arch/powerpc/configs/mpc85xx_smp_defconfig
index 9693f6e..a4ba13b 100644
--- a/arch/powerpc/configs/mpc85xx_smp_defconfig
+++ b/arch/powerpc/configs/mpc85xx_smp_defconfig
@@ -42,7 +42,7 @@ CONFIG_TQM8560=y
CONFIG_SBC8548=y
CONFIG_QUICC_ENGINE=y
CONFIG_QE_GPIO=y
-CONFIG_MPC8xxx_GPIO=y
+CONFIG_GPIO_MPC8XXX=y
CONFIG_HIGHMEM=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
diff --git a/arch/powerpc/configs/ppc6xx_defconfig b/arch/powerpc/configs/ppc6xx_defconfig
index 04360f9..c47f2be 100644
--- a/arch/powerpc/configs/ppc6xx_defconfig
+++ b/arch/powerpc/configs/ppc6xx_defconfig
@@ -70,7 +70,7 @@ CONFIG_TAU_AVERAGE=y
CONFIG_QUICC_ENGINE=y
CONFIG_QE_GPIO=y
CONFIG_PPC_BESTCOMM=y
-CONFIG_MPC8xxx_GPIO=y
+CONFIG_GPIO_MPC8XXX=y
CONFIG_MCU_MPC8349EMITX=m
CONFIG_HIGHMEM=y
CONFIG_NO_HZ=y
diff --git a/arch/powerpc/platforms/512x/Kconfig b/arch/powerpc/platforms/512x/Kconfig
index 27b0651..b3ebce1 100644
--- a/arch/powerpc/platforms/512x/Kconfig
+++ b/arch/powerpc/platforms/512x/Kconfig
@@ -6,6 +6,7 @@ config PPC_MPC512x
select PPC_CLOCK
select PPC_PCI_CHOICE
select FSL_PCI if PCI
+ select ARCH_WANT_OPTIONAL_GPIOLIB
config MPC5121_ADS
bool "Freescale MPC5121E ADS"
diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig
index 73f4135..670a033 100644
--- a/arch/powerpc/platforms/83xx/Kconfig
+++ b/arch/powerpc/platforms/83xx/Kconfig
@@ -114,18 +114,21 @@ config KMETER1
endif
-# used for usb
+# used for usb & gpio
config PPC_MPC831x
bool
+ select ARCH_WANT_OPTIONAL_GPIOLIB
# used for math-emu
config PPC_MPC832x
bool
-# used for usb
+# used for usb & gpio
config PPC_MPC834x
bool
+ select ARCH_WANT_OPTIONAL_GPIOLIB
-# used for usb
+# used for usb & gpio
config PPC_MPC837x
bool
+ select ARCH_WANT_OPTIONAL_GPIOLIB
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index 498534c..1b393f4 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -177,7 +177,8 @@ config P2040_RDB
select PPC_E500MC
select PHYS_64BIT
select SWIOTLB
- select MPC8xxx_GPIO
+ select ARCH_REQUIRE_GPIOLIB
+ select GPIO_MPC8XXX
select HAS_RAPIDIO
select PPC_EPAPR_HV_PIC
help
@@ -189,7 +190,8 @@ config P3041_DS
select PPC_E500MC
select PHYS_64BIT
select SWIOTLB
- select MPC8xxx_GPIO
+ select ARCH_REQUIRE_GPIOLIB
+ select GPIO_MPC8XXX
select HAS_RAPIDIO
select PPC_EPAPR_HV_PIC
help
@@ -201,7 +203,8 @@ config P4080_DS
select PPC_E500MC
select PHYS_64BIT
select SWIOTLB
- select MPC8xxx_GPIO
+ select ARCH_REQUIRE_GPIOLIB
+ select GPIO_MPC8XXX
select HAS_RAPIDIO
select PPC_EPAPR_HV_PIC
help
@@ -216,7 +219,8 @@ config P5020_DS
select PPC_E500MC
select PHYS_64BIT
select SWIOTLB
- select MPC8xxx_GPIO
+ select ARCH_REQUIRE_GPIOLIB
+ select GPIO_MPC8XXX
select HAS_RAPIDIO
select PPC_EPAPR_HV_PIC
help
diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig
index a0b5638..8d6599d 100644
--- a/arch/powerpc/platforms/86xx/Kconfig
+++ b/arch/powerpc/platforms/86xx/Kconfig
@@ -4,6 +4,7 @@ menuconfig PPC_86xx
depends on 6xx
select FSL_SOC
select ALTIVEC
+ select ARCH_WANT_OPTIONAL_GPIOLIB
help
The Freescale E600 SoCs have 74xx cores.
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index b9ba861..c0cb1ea 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -333,16 +333,6 @@ config OF_RTC
source "arch/powerpc/sysdev/bestcomm/Kconfig"
-config MPC8xxx_GPIO
- bool "MPC512x/MPC8xxx GPIO support"
- depends on PPC_MPC512x || PPC_MPC831x || PPC_MPC834x || PPC_MPC837x || \
- FSL_SOC_BOOKE || PPC_86xx
- select GENERIC_GPIO
- select ARCH_REQUIRE_GPIOLIB
- help
- Say Y here if you're going to use hardware that connects to the
- MPC512x/831x/834x/837x/8572/8610 GPIOs.
-
config SIMPLE_GPIO
bool "Support for simple, memory-mapped GPIO controllers"
depends on PPC
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
index cf736ca..84e1325 100644
--- a/arch/powerpc/sysdev/Makefile
+++ b/arch/powerpc/sysdev/Makefile
@@ -18,7 +18,6 @@ obj-$(CONFIG_FSL_PCI) += fsl_pci.o $(fsl-msi-obj-y)
obj-$(CONFIG_FSL_PMC) += fsl_pmc.o
obj-$(CONFIG_FSL_LBC) += fsl_lbc.o
obj-$(CONFIG_FSL_GTM) += fsl_gtm.o
-obj-$(CONFIG_MPC8xxx_GPIO) += mpc8xxx_gpio.o
obj-$(CONFIG_FSL_85XX_CACHE_SRAM) += fsl_85xx_l2ctlr.o fsl_85xx_cache_sram.o
obj-$(CONFIG_SIMPLE_GPIO) += simple_gpio.o
obj-$(CONFIG_FSL_RIO) += fsl_rio.o
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index d539efd..4744cf2 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -103,6 +103,14 @@ config GPIO_MPC5200
def_bool y
depends on PPC_MPC52xx
+config GPIO_MPC8XXX
+ bool "MPC512x/MPC8xxx GPIO support"
+ depends on PPC_MPC512x || PPC_MPC831x || PPC_MPC834x || PPC_MPC837x || \
+ FSL_SOC_BOOKE || PPC_86xx
+ help
+ Say Y here if you're going to use hardware that connects to the
+ MPC512x/831x/834x/837x/8572/8610 GPIOs.
+
config GPIO_MSM_V1
tristate "Qualcomm MSM GPIO v1"
depends on GPIOLIB && ARCH_MSM
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index 9588948..828bba9 100644
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -27,6 +27,7 @@ obj-$(CONFIG_GPIO_MC33880) += gpio-mc33880.o
obj-$(CONFIG_GPIO_MCP23S08) += gpio-mcp23s08.o
obj-$(CONFIG_GPIO_ML_IOH) += gpio-ml-ioh.o
obj-$(CONFIG_GPIO_MPC5200) += gpio-mpc5200.o
+obj-$(CONFIG_GPIO_MPC8XXX) += gpio-mpc8xxx.o
obj-$(CONFIG_GPIO_MSM_V1) += gpio-msm-v1.o
obj-$(CONFIG_GPIO_MSM_V2) += gpio-msm-v2.o
obj-$(CONFIG_GPIO_MXC) += gpio-mxc.o
diff --git a/arch/powerpc/sysdev/mpc8xxx_gpio.c b/drivers/gpio/gpio-mpc8xxx.c
similarity index 100%
rename from arch/powerpc/sysdev/mpc8xxx_gpio.c
rename to drivers/gpio/gpio-mpc8xxx.c
--
1.7.5.4
^ permalink raw reply related
* Re: [PATCH 53/57] sound: irq: Remove IRQF_DISABLED
From: Yong Zhang @ 2011-09-21 12:10 UTC (permalink / raw)
To: Takashi Iwai
Cc: alsa-devel, Kuninori Morimoto, Clemens Ladisch, Jaroslav Kysela,
Peter Ujfalusi, Paul Gortmaker, linux-arch, Russell King,
Jassi Brar, Manuel Lauss, Uwe Kleine-König, Axel Lin,
Liam Girdwood, cbe-oss-dev, Wan ZongShun, Lucas De Marchi, tglx,
linux-arm-kernel, Eric Miao, Geoff Levand, Jiri Kosina,
Mark Brown, linux-kernel, Sangbeom Kim, Paul Mundt, Simon Horman,
Joe Perches, Jarkko Nikula, linuxppc-dev
In-Reply-To: <s5hsjnqxlxb.wl%tiwai@suse.de>
On Wed, Sep 21, 2011 at 11:52:00AM +0200, Takashi Iwai wrote:
> At Wed, 21 Sep 2011 17:28:54 +0800,
> Yong Zhang wrote:
> >
> > Since commit [c58543c8: genirq: Run irq handlers with interrupts disabled],
>
> Hm, this id hits a different commit:
> commit c58543c869606532c2382f027d6466f4672ea756
> Author: David S. Miller <davem@davemloft.net>
> Date: Tue Oct 13 00:49:09 2009 -0700
>
> sparc64: Set IRQF_DISABLED on LDC channel IRQs.
>
> You mean commit e58aa3d2d0cc01ad8d6f7f640a0670433f794922?
Oh, yes. No idea how I made it wrong :(
Thanks,
Yong
>
> > We run all interrupt handlers with interrupts disabled
> > and we even check and yell when an interrupt handler
> > returns with interrupts enabled (see commit [b738a50a:
> > genirq: Warn when handler enables interrupts]).
> >
> > So now this flag is a NOOP and can be removed.
> >
> > Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
> > Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
>
> Do you want to merge by yourself or shall I take it to sound git tree?
> Since IRQF_DISABLED isn't used, it can be applied safely in 3.1-based
> tree, right?
>
> Anyway, if needed, take my ack:
> Acked-by: Takashi Iwai <tiwai@suse.de>
>
>
> thanks,
>
> Takashi
>
> > ---
> > include/sound/initval.h | 2 +-
> > sound/arm/aaci.c | 2 +-
> > sound/arm/pxa2xx-ac97-lib.c | 2 +-
> > sound/drivers/ml403-ac97cr.c | 4 ++--
> > sound/drivers/mpu401/mpu401_uart.c | 2 +-
> > sound/drivers/mtpav.c | 2 +-
> > sound/drivers/serial-u16550.c | 2 +-
> > sound/isa/ad1816a/ad1816a_lib.c | 2 +-
> > sound/isa/es1688/es1688_lib.c | 2 +-
> > sound/isa/es18xx.c | 2 +-
> > sound/isa/gus/gus_main.c | 2 +-
> > sound/isa/gus/gusmax.c | 2 +-
> > sound/isa/gus/interwave.c | 2 +-
> > sound/isa/opl3sa2.c | 2 +-
> > sound/isa/opti9xx/opti92x-ad1848.c | 2 +-
> > sound/isa/sb/sb_common.c | 2 +-
> > sound/isa/wavefront/wavefront.c | 2 +-
> > sound/isa/wss/wss_lib.c | 2 +-
> > sound/mips/au1x00.c | 4 ++--
> > sound/pci/sis7019.c | 4 ++--
> > sound/ppc/snd_ps3.c | 2 +-
> > sound/soc/au1x/dma.c | 2 +-
> > sound/soc/codecs/tlv320dac33.c | 2 +-
> > sound/soc/nuc900/nuc900-pcm.c | 2 +-
> > sound/soc/samsung/ac97.c | 2 +-
> > sound/soc/sh/fsi.c | 2 +-
> > sound/soc/txx9/txx9aclc-ac97.c | 2 +-
> > sound/sparc/amd7930.c | 2 +-
> > 28 files changed, 31 insertions(+), 31 deletions(-)
> >
> > diff --git a/include/sound/initval.h b/include/sound/initval.h
> > index 1daa6df..f99a0d2 100644
> > --- a/include/sound/initval.h
> > +++ b/include/sound/initval.h
> > @@ -62,7 +62,7 @@ static int snd_legacy_find_free_irq(int *irq_table)
> > {
> > while (*irq_table != -1) {
> > if (!request_irq(*irq_table, snd_legacy_empty_irq_handler,
> > - IRQF_DISABLED | IRQF_PROBE_SHARED, "ALSA Test IRQ",
> > + IRQF_PROBE_SHARED, "ALSA Test IRQ",
> > (void *) irq_table)) {
> > free_irq(*irq_table, (void *) irq_table);
> > return *irq_table;
> > diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c
> > index d0cead3..e518d38 100644
> > --- a/sound/arm/aaci.c
> > +++ b/sound/arm/aaci.c
> > @@ -443,7 +443,7 @@ static int aaci_pcm_open(struct snd_pcm_substream *substream)
> > mutex_lock(&aaci->irq_lock);
> > if (!aaci->users++) {
> > ret = request_irq(aaci->dev->irq[0], aaci_irq,
> > - IRQF_SHARED | IRQF_DISABLED, DRIVER_NAME, aaci);
> > + IRQF_SHARED, DRIVER_NAME, aaci);
> > if (ret != 0)
> > aaci->users--;
> > }
> > diff --git a/sound/arm/pxa2xx-ac97-lib.c b/sound/arm/pxa2xx-ac97-lib.c
> > index 88eec38..8ad6535 100644
> > --- a/sound/arm/pxa2xx-ac97-lib.c
> > +++ b/sound/arm/pxa2xx-ac97-lib.c
> > @@ -359,7 +359,7 @@ int __devinit pxa2xx_ac97_hw_probe(struct platform_device *dev)
> > if (ret)
> > goto err_clk2;
> >
> > - ret = request_irq(IRQ_AC97, pxa2xx_ac97_irq, IRQF_DISABLED, "AC97", NULL);
> > + ret = request_irq(IRQ_AC97, pxa2xx_ac97_irq, 0, "AC97", NULL);
> > if (ret < 0)
> > goto err_irq;
> >
> > diff --git a/sound/drivers/ml403-ac97cr.c b/sound/drivers/ml403-ac97cr.c
> > index 5cfcb90..2c7a763 100644
> > --- a/sound/drivers/ml403-ac97cr.c
> > +++ b/sound/drivers/ml403-ac97cr.c
> > @@ -1153,7 +1153,7 @@ snd_ml403_ac97cr_create(struct snd_card *card, struct platform_device *pfdev,
> > "0x%x done\n", (unsigned int)ml403_ac97cr->port);
> > /* get irq */
> > irq = platform_get_irq(pfdev, 0);
> > - if (request_irq(irq, snd_ml403_ac97cr_irq, IRQF_DISABLED,
> > + if (request_irq(irq, snd_ml403_ac97cr_irq, 0,
> > dev_name(&pfdev->dev), (void *)ml403_ac97cr)) {
> > snd_printk(KERN_ERR SND_ML403_AC97CR_DRIVER ": "
> > "unable to grab IRQ %d\n",
> > @@ -1166,7 +1166,7 @@ snd_ml403_ac97cr_create(struct snd_card *card, struct platform_device *pfdev,
> > "request (playback) irq %d done\n",
> > ml403_ac97cr->irq);
> > irq = platform_get_irq(pfdev, 1);
> > - if (request_irq(irq, snd_ml403_ac97cr_irq, IRQF_DISABLED,
> > + if (request_irq(irq, snd_ml403_ac97cr_irq, 0,
> > dev_name(&pfdev->dev), (void *)ml403_ac97cr)) {
> > snd_printk(KERN_ERR SND_ML403_AC97CR_DRIVER ": "
> > "unable to grab IRQ %d\n",
> > diff --git a/sound/drivers/mpu401/mpu401_uart.c b/sound/drivers/mpu401/mpu401_uart.c
> > index 34df505..1cff331 100644
> > --- a/sound/drivers/mpu401/mpu401_uart.c
> > +++ b/sound/drivers/mpu401/mpu401_uart.c
> > @@ -578,7 +578,7 @@ int snd_mpu401_uart_new(struct snd_card *card, int device,
> > else
> > mpu->cport = port + 1;
> > if (irq >= 0) {
> > - if (request_irq(irq, snd_mpu401_uart_interrupt, IRQF_DISABLED,
> > + if (request_irq(irq, snd_mpu401_uart_interrupt, 0,
> > "MPU401 UART", (void *) mpu)) {
> > snd_printk(KERN_ERR "mpu401_uart: "
> > "unable to grab IRQ %d\n", irq);
> > diff --git a/sound/drivers/mtpav.c b/sound/drivers/mtpav.c
> > index f50021c..7693079 100644
> > --- a/sound/drivers/mtpav.c
> > +++ b/sound/drivers/mtpav.c
> > @@ -590,7 +590,7 @@ static int __devinit snd_mtpav_get_ISA(struct mtpav * mcard)
> > return -EBUSY;
> > }
> > mcard->port = port;
> > - if (request_irq(irq, snd_mtpav_irqh, IRQF_DISABLED, "MOTU MTPAV", mcard)) {
> > + if (request_irq(irq, snd_mtpav_irqh, 0, "MOTU MTPAV", mcard)) {
> > snd_printk(KERN_ERR "MTVAP IRQ %d busy\n", irq);
> > return -EBUSY;
> > }
> > diff --git a/sound/drivers/serial-u16550.c b/sound/drivers/serial-u16550.c
> > index 6c5bf58..85aad43 100644
> > --- a/sound/drivers/serial-u16550.c
> > +++ b/sound/drivers/serial-u16550.c
> > @@ -816,7 +816,7 @@ static int __devinit snd_uart16550_create(struct snd_card *card,
> >
> > if (irq >= 0 && irq != SNDRV_AUTO_IRQ) {
> > if (request_irq(irq, snd_uart16550_interrupt,
> > - IRQF_DISABLED, "Serial MIDI", uart)) {
> > + 0, "Serial MIDI", uart)) {
> > snd_printk(KERN_WARNING
> > "irq %d busy. Using Polling.\n", irq);
> > } else {
> > diff --git a/sound/isa/ad1816a/ad1816a_lib.c b/sound/isa/ad1816a/ad1816a_lib.c
> > index 05aef8b..177eed3 100644
> > --- a/sound/isa/ad1816a/ad1816a_lib.c
> > +++ b/sound/isa/ad1816a/ad1816a_lib.c
> > @@ -595,7 +595,7 @@ int __devinit snd_ad1816a_create(struct snd_card *card,
> > snd_ad1816a_free(chip);
> > return -EBUSY;
> > }
> > - if (request_irq(irq, snd_ad1816a_interrupt, IRQF_DISABLED, "AD1816A", (void *) chip)) {
> > + if (request_irq(irq, snd_ad1816a_interrupt, 0, "AD1816A", (void *) chip)) {
> > snd_printk(KERN_ERR "ad1816a: can't grab IRQ %d\n", irq);
> > snd_ad1816a_free(chip);
> > return -EBUSY;
> > diff --git a/sound/isa/es1688/es1688_lib.c b/sound/isa/es1688/es1688_lib.c
> > index 0767620..d3eab6f 100644
> > --- a/sound/isa/es1688/es1688_lib.c
> > +++ b/sound/isa/es1688/es1688_lib.c
> > @@ -661,7 +661,7 @@ int snd_es1688_create(struct snd_card *card,
> > snd_printk(KERN_ERR "es1688: can't grab port 0x%lx\n", port + 4);
> > return -EBUSY;
> > }
> > - if (request_irq(irq, snd_es1688_interrupt, IRQF_DISABLED, "ES1688", (void *) chip)) {
> > + if (request_irq(irq, snd_es1688_interrupt, 0, "ES1688", (void *) chip)) {
> > snd_printk(KERN_ERR "es1688: can't grab IRQ %d\n", irq);
> > return -EBUSY;
> > }
> > diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c
> > index aeee8f8..bf6ad0b 100644
> > --- a/sound/isa/es18xx.c
> > +++ b/sound/isa/es18xx.c
> > @@ -1805,7 +1805,7 @@ static int __devinit snd_es18xx_new_device(struct snd_card *card,
> > return -EBUSY;
> > }
> >
> > - if (request_irq(irq, snd_es18xx_interrupt, IRQF_DISABLED, "ES18xx",
> > + if (request_irq(irq, snd_es18xx_interrupt, 0, "ES18xx",
> > (void *) card)) {
> > snd_es18xx_free(card);
> > snd_printk(KERN_ERR PFX "unable to grap IRQ %d\n", irq);
> > diff --git a/sound/isa/gus/gus_main.c b/sound/isa/gus/gus_main.c
> > index 12eb98f..3167e5a 100644
> > --- a/sound/isa/gus/gus_main.c
> > +++ b/sound/isa/gus/gus_main.c
> > @@ -180,7 +180,7 @@ int snd_gus_create(struct snd_card *card,
> > snd_gus_free(gus);
> > return -EBUSY;
> > }
> > - if (irq >= 0 && request_irq(irq, snd_gus_interrupt, IRQF_DISABLED, "GUS GF1", (void *) gus)) {
> > + if (irq >= 0 && request_irq(irq, snd_gus_interrupt, 0, "GUS GF1", (void *) gus)) {
> > snd_printk(KERN_ERR "gus: can't grab irq %d\n", irq);
> > snd_gus_free(gus);
> > return -EBUSY;
> > diff --git a/sound/isa/gus/gusmax.c b/sound/isa/gus/gusmax.c
> > index 3e4a58b..c43faa0 100644
> > --- a/sound/isa/gus/gusmax.c
> > +++ b/sound/isa/gus/gusmax.c
> > @@ -291,7 +291,7 @@ static int __devinit snd_gusmax_probe(struct device *pdev, unsigned int dev)
> > goto _err;
> > }
> >
> > - if (request_irq(xirq, snd_gusmax_interrupt, IRQF_DISABLED, "GUS MAX", (void *)maxcard)) {
> > + if (request_irq(xirq, snd_gusmax_interrupt, 0, "GUS MAX", (void *)maxcard)) {
> > snd_printk(KERN_ERR PFX "unable to grab IRQ %d\n", xirq);
> > err = -EBUSY;
> > goto _err;
> > diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c
> > index c7b80e4..5f869a3 100644
> > --- a/sound/isa/gus/interwave.c
> > +++ b/sound/isa/gus/interwave.c
> > @@ -684,7 +684,7 @@ static int __devinit snd_interwave_probe(struct snd_card *card, int dev)
> > if ((err = snd_gus_initialize(gus)) < 0)
> > return err;
> >
> > - if (request_irq(xirq, snd_interwave_interrupt, IRQF_DISABLED,
> > + if (request_irq(xirq, snd_interwave_interrupt, 0,
> > "InterWave", iwcard)) {
> > snd_printk(KERN_ERR PFX "unable to grab IRQ %d\n", xirq);
> > return -EBUSY;
> > diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c
> > index de99f47..bbafb0b 100644
> > --- a/sound/isa/opl3sa2.c
> > +++ b/sound/isa/opl3sa2.c
> > @@ -667,7 +667,7 @@ static int __devinit snd_opl3sa2_probe(struct snd_card *card, int dev)
> > err = snd_opl3sa2_detect(card);
> > if (err < 0)
> > return err;
> > - err = request_irq(xirq, snd_opl3sa2_interrupt, IRQF_DISABLED,
> > + err = request_irq(xirq, snd_opl3sa2_interrupt, 0,
> > "OPL3-SA2", card);
> > if (err) {
> > snd_printk(KERN_ERR PFX "can't grab IRQ %d\n", xirq);
> > diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c
> > index 346e12b..6dbbfa7 100644
> > --- a/sound/isa/opti9xx/opti92x-ad1848.c
> > +++ b/sound/isa/opti9xx/opti92x-ad1848.c
> > @@ -892,7 +892,7 @@ static int __devinit snd_opti9xx_probe(struct snd_card *card)
> > #endif
> > #ifdef OPTi93X
> > error = request_irq(irq, snd_opti93x_interrupt,
> > - IRQF_DISABLED, DEV_NAME" - WSS", chip);
> > + 0, DEV_NAME" - WSS", chip);
> > if (error < 0) {
> > snd_printk(KERN_ERR "opti9xx: can't grab IRQ %d\n", irq);
> > return error;
> > diff --git a/sound/isa/sb/sb_common.c b/sound/isa/sb/sb_common.c
> > index eae6c1c..d2e1921 100644
> > --- a/sound/isa/sb/sb_common.c
> > +++ b/sound/isa/sb/sb_common.c
> > @@ -240,7 +240,7 @@ int snd_sbdsp_create(struct snd_card *card,
> > if (request_irq(irq, irq_handler,
> > (hardware == SB_HW_ALS4000 ||
> > hardware == SB_HW_CS5530) ?
> > - IRQF_SHARED : IRQF_DISABLED,
> > + IRQF_SHARED : 0,
> > "SoundBlaster", (void *) chip)) {
> > snd_printk(KERN_ERR "sb: can't grab irq %d\n", irq);
> > snd_sbdsp_free(chip);
> > diff --git a/sound/isa/wavefront/wavefront.c b/sound/isa/wavefront/wavefront.c
> > index 83f291d..8714297 100644
> > --- a/sound/isa/wavefront/wavefront.c
> > +++ b/sound/isa/wavefront/wavefront.c
> > @@ -418,7 +418,7 @@ snd_wavefront_probe (struct snd_card *card, int dev)
> > return -EBUSY;
> > }
> > if (request_irq(ics2115_irq[dev], snd_wavefront_ics2115_interrupt,
> > - IRQF_DISABLED, "ICS2115", acard)) {
> > + 0, "ICS2115", acard)) {
> > snd_printk(KERN_ERR "unable to use ICS2115 IRQ %d\n", ics2115_irq[dev]);
> > return -EBUSY;
> > }
> > diff --git a/sound/isa/wss/wss_lib.c b/sound/isa/wss/wss_lib.c
> > index 2a42cc3..7277c5b 100644
> > --- a/sound/isa/wss/wss_lib.c
> > +++ b/sound/isa/wss/wss_lib.c
> > @@ -1833,7 +1833,7 @@ int snd_wss_create(struct snd_card *card,
> > }
> > chip->cport = cport;
> > if (!(hwshare & WSS_HWSHARE_IRQ))
> > - if (request_irq(irq, snd_wss_interrupt, IRQF_DISABLED,
> > + if (request_irq(irq, snd_wss_interrupt, 0,
> > "WSS", (void *) chip)) {
> > snd_printk(KERN_ERR "wss: can't grab IRQ %d\n", irq);
> > snd_wss_free(chip);
> > diff --git a/sound/mips/au1x00.c b/sound/mips/au1x00.c
> > index 446cf97..7567ebd 100644
> > --- a/sound/mips/au1x00.c
> > +++ b/sound/mips/au1x00.c
> > @@ -465,13 +465,13 @@ snd_au1000_pcm_new(struct snd_au1000 *au1000)
> >
> > flags = claim_dma_lock();
> > if ((au1000->stream[PLAYBACK]->dma = request_au1000_dma(DMA_ID_AC97C_TX,
> > - "AC97 TX", au1000_dma_interrupt, IRQF_DISABLED,
> > + "AC97 TX", au1000_dma_interrupt, 0,
> > au1000->stream[PLAYBACK])) < 0) {
> > release_dma_lock(flags);
> > return -EBUSY;
> > }
> > if ((au1000->stream[CAPTURE]->dma = request_au1000_dma(DMA_ID_AC97C_RX,
> > - "AC97 RX", au1000_dma_interrupt, IRQF_DISABLED,
> > + "AC97 RX", au1000_dma_interrupt, 0,
> > au1000->stream[CAPTURE])) < 0){
> > release_dma_lock(flags);
> > return -EBUSY;
> > diff --git a/sound/pci/sis7019.c b/sound/pci/sis7019.c
> > index bcf6152..5ffb20b 100644
> > --- a/sound/pci/sis7019.c
> > +++ b/sound/pci/sis7019.c
> > @@ -1234,7 +1234,7 @@ static int sis_resume(struct pci_dev *pci)
> > goto error;
> > }
> >
> > - if (request_irq(pci->irq, sis_interrupt, IRQF_DISABLED|IRQF_SHARED,
> > + if (request_irq(pci->irq, sis_interrupt, IRQF_SHARED,
> > KBUILD_MODNAME, sis)) {
> > printk(KERN_ERR "sis7019: unable to regain IRQ %d\n", pci->irq);
> > goto error;
> > @@ -1340,7 +1340,7 @@ static int __devinit sis_chip_create(struct snd_card *card,
> > if (rc)
> > goto error_out_cleanup;
> >
> > - if (request_irq(pci->irq, sis_interrupt, IRQF_DISABLED|IRQF_SHARED,
> > + if (request_irq(pci->irq, sis_interrupt, IRQF_SHARED,
> > KBUILD_MODNAME, sis)) {
> > printk(KERN_ERR "unable to allocate irq %d\n", sis->irq);
> > goto error_out_cleanup;
> > diff --git a/sound/ppc/snd_ps3.c b/sound/ppc/snd_ps3.c
> > index bc823a5..775bd95 100644
> > --- a/sound/ppc/snd_ps3.c
> > +++ b/sound/ppc/snd_ps3.c
> > @@ -845,7 +845,7 @@ static int __devinit snd_ps3_allocate_irq(void)
> > return ret;
> > }
> >
> > - ret = request_irq(the_card.irq_no, snd_ps3_interrupt, IRQF_DISABLED,
> > + ret = request_irq(the_card.irq_no, snd_ps3_interrupt, 0,
> > SND_PS3_DRIVER_NAME, &the_card);
> > if (ret) {
> > pr_info("%s: request_irq failed (%d)\n", __func__, ret);
> > diff --git a/sound/soc/au1x/dma.c b/sound/soc/au1x/dma.c
> > index 7aa5b76..177f713 100644
> > --- a/sound/soc/au1x/dma.c
> > +++ b/sound/soc/au1x/dma.c
> > @@ -211,7 +211,7 @@ static int alchemy_pcm_open(struct snd_pcm_substream *substream)
> > /* DMA setup */
> > name = (s == SNDRV_PCM_STREAM_PLAYBACK) ? "audio-tx" : "audio-rx";
> > ctx->stream[s].dma = request_au1000_dma(dmaids[s], name,
> > - au1000_dma_interrupt, IRQF_DISABLED,
> > + au1000_dma_interrupt, 0,
> > &ctx->stream[s]);
> > set_dma_mode(ctx->stream[s].dma,
> > get_dma_mode(ctx->stream[s].dma) & ~DMA_NC);
> > diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c
> > index faa5e9f..243d177 100644
> > --- a/sound/soc/codecs/tlv320dac33.c
> > +++ b/sound/soc/codecs/tlv320dac33.c
> > @@ -1431,7 +1431,7 @@ static int dac33_soc_probe(struct snd_soc_codec *codec)
> > /* Check if the IRQ number is valid and request it */
> > if (dac33->irq >= 0) {
> > ret = request_irq(dac33->irq, dac33_interrupt_handler,
> > - IRQF_TRIGGER_RISING | IRQF_DISABLED,
> > + IRQF_TRIGGER_RISING,
> > codec->name, codec);
> > if (ret < 0) {
> > dev_err(codec->dev, "Could not request IRQ%d (%d)\n",
> > diff --git a/sound/soc/nuc900/nuc900-pcm.c b/sound/soc/nuc900/nuc900-pcm.c
> > index e46d551..865b288 100644
> > --- a/sound/soc/nuc900/nuc900-pcm.c
> > +++ b/sound/soc/nuc900/nuc900-pcm.c
> > @@ -268,7 +268,7 @@ static int nuc900_dma_open(struct snd_pcm_substream *substream)
> > nuc900_audio = nuc900_ac97_data;
> >
> > if (request_irq(nuc900_audio->irq_num, nuc900_dma_interrupt,
> > - IRQF_DISABLED, "nuc900-dma", substream))
> > + 0, "nuc900-dma", substream))
> > return -EBUSY;
> >
> > runtime->private_data = nuc900_audio;
> > diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c
> > index b4f9b00..41b387b 100644
> > --- a/sound/soc/samsung/ac97.c
> > +++ b/sound/soc/samsung/ac97.c
> > @@ -450,7 +450,7 @@ static __devinit int s3c_ac97_probe(struct platform_device *pdev)
> > }
> >
> > ret = request_irq(irq_res->start, s3c_ac97_irq,
> > - IRQF_DISABLED, "AC97", NULL);
> > + 0, "AC97", NULL);
> > if (ret < 0) {
> > dev_err(&pdev->dev, "ac97: interrupt request failed.\n");
> > goto err4;
> > diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
> > index 8e112cc..1493ebf 100644
> > --- a/sound/soc/sh/fsi.c
> > +++ b/sound/soc/sh/fsi.c
> > @@ -1285,7 +1285,7 @@ static int fsi_probe(struct platform_device *pdev)
> > pm_runtime_enable(&pdev->dev);
> > dev_set_drvdata(&pdev->dev, master);
> >
> > - ret = request_irq(irq, &fsi_interrupt, IRQF_DISABLED,
> > + ret = request_irq(irq, &fsi_interrupt, 0,
> > id_entry->name, master);
> > if (ret) {
> > dev_err(&pdev->dev, "irq request err\n");
> > diff --git a/sound/soc/txx9/txx9aclc-ac97.c b/sound/soc/txx9/txx9aclc-ac97.c
> > index 743d07b..a4e3f55 100644
> > --- a/sound/soc/txx9/txx9aclc-ac97.c
> > +++ b/sound/soc/txx9/txx9aclc-ac97.c
> > @@ -201,7 +201,7 @@ static int __devinit txx9aclc_ac97_dev_probe(struct platform_device *pdev)
> > if (!drvdata->base)
> > return -EBUSY;
> > err = devm_request_irq(&pdev->dev, irq, txx9aclc_ac97_irq,
> > - IRQF_DISABLED, dev_name(&pdev->dev), drvdata);
> > + 0, dev_name(&pdev->dev), drvdata);
> > if (err < 0)
> > return err;
> >
> > diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c
> > index ad7d4d7..f036776 100644
> > --- a/sound/sparc/amd7930.c
> > +++ b/sound/sparc/amd7930.c
> > @@ -962,7 +962,7 @@ static int __devinit snd_amd7930_create(struct snd_card *card,
> > amd7930_idle(amd);
> >
> > if (request_irq(irq, snd_amd7930_interrupt,
> > - IRQF_DISABLED | IRQF_SHARED, "amd7930", amd)) {
> > + IRQF_SHARED, "amd7930", amd)) {
> > snd_printk(KERN_ERR "amd7930-%d: Unable to grab IRQ %d\n",
> > dev, irq);
> > snd_amd7930_free(amd);
> > --
> > 1.7.4.1
> >
^ permalink raw reply
* Re: [PATCH 53/57] sound: irq: Remove IRQF_DISABLED
From: Yong Zhang @ 2011-09-21 12:12 UTC (permalink / raw)
To: Thomas Gleixner
Cc: alsa-devel, Kuninori Morimoto, Takashi Iwai, Clemens Ladisch,
Jaroslav Kysela, Peter Ujfalusi, Paul Gortmaker, linux-arch,
Russell King, Jassi Brar, Manuel Lauss, Uwe Kleine-K�nig,
Axel Lin, Liam Girdwood, cbe-oss-dev, Wan ZongShun,
Lucas De Marchi, linux-arm-kernel, Eric Miao, Sangbeom Kim,
Jiri Kosina, Mark Brown, linux-kernel, Geoff Levand, Paul Mundt,
Simon Horman, Joe Perches, Jarkko Nikula, linuxppc-dev
In-Reply-To: <alpine.LFD.2.02.1109211154280.2723@ionos>
On Wed, Sep 21, 2011 at 11:55:36AM +0200, Thomas Gleixner wrote:
> On Wed, 21 Sep 2011, Takashi Iwai wrote:
>
> > At Wed, 21 Sep 2011 17:28:54 +0800,
> > Yong Zhang wrote:
> > >
> > > Since commit [c58543c8: genirq: Run irq handlers with interrupts disabled],
> >
> > Hm, this id hits a different commit:
> > commit c58543c869606532c2382f027d6466f4672ea756
> > Author: David S. Miller <davem@davemloft.net>
> > Date: Tue Oct 13 00:49:09 2009 -0700
> >
> > sparc64: Set IRQF_DISABLED on LDC channel IRQs.
> >
> > You mean commit e58aa3d2d0cc01ad8d6f7f640a0670433f794922?
>
> Yeah.
>
> > > We run all interrupt handlers with interrupts disabled
> > > and we even check and yell when an interrupt handler
> > > returns with interrupts enabled (see commit [b738a50a:
> > > genirq: Warn when handler enables interrupts]).
> > >
> > > So now this flag is a NOOP and can be removed.
> > >
> > > Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
> > > Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> >
> > Do you want to merge by yourself or shall I take it to sound git tree?
> > Since IRQF_DISABLED isn't used, it can be applied safely in 3.1-based
> > tree, right?
>
> Yes, please go ahead. I'll pick up the leftovers.
Takashi, if you take it, could you please modify that commit id to the
right one?
Otherwise I could change it when I refresh this patchset.
Thanks,
Yong
^ permalink raw reply
* [PATCH v2] powerpc: reserve iommu page 0
From: Thadeu Lima de Souza Cascardo @ 2011-09-21 13:06 UTC (permalink / raw)
To: benh
Cc: alexander.h.duyck, nhorman, linux-kernel, jesse.brandeburg,
Paul Mackerras, Thadeu Lima de Souza Cascardo, linuxppc-dev
Some devices have a dma-window that starts at the address 0. This allows
DMA addresses to be mapped to this address and returned to drivers as a
valid DMA address. Some drivers may not behave well in this case, since
the address 0 is considered an error or not allocated.
The solution to avoid this kind of error from happening is reserve the
page addressed as 0 so it cannot be allocated for a DMA mapping.
Ben Herrenschmidt deserves the credit for this patch. He pointed out the
solution and what code would do the job.
v2:
Add a comment in the code.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@lists.ozlabs.org
---
Resending, since it was recommended to add a comment about this
particular code.
---
arch/powerpc/kernel/iommu.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index 961bb03..8395301 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -501,6 +501,14 @@ struct iommu_table *iommu_init_table(struct iommu_table *tbl, int nid)
tbl->it_map = page_address(page);
memset(tbl->it_map, 0, sz);
+ /*
+ * Reserve page 0 so it will not be used for any mappings.
+ * This avoids buggy drivers that consider page 0 to be invalid
+ * to crash the machine or even lose data.
+ */
+ if (tbl->it_offset == 0)
+ set_bit(0, tbl->it_map);
+
tbl->it_hint = 0;
tbl->it_largehint = tbl->it_halfpoint;
spin_lock_init(&tbl->it_lock);
--
1.7.4.4
^ permalink raw reply related
* Re: linux-next: manual merge of the tty tree with the powerpc tree
From: Greg KH @ 2011-09-21 14:06 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Geoff Levand, Andre Heider, linux-kernel, linux-next,
Paul Mackerras, Hector Martin, linuxppc-dev
In-Reply-To: <20110921150121.9f530384bc0bb6c2268fd9ea@canb.auug.org.au>
On Wed, Sep 21, 2011 at 03:01:21PM +1000, Stephen Rothwell wrote:
> Hi Greg,
>
> Today's linux-next merge of the tty tree got conflicts in
> arch/powerpc/include/asm/udbg.h and arch/powerpc/kernel/udbg.c between
> commit c26afe9e8591 ("powerpc/ps3: Add gelic udbg driver") from the
> powerpc tree and commit dcd83aaff1c8 ("tty/powerpc: introduce the ePAPR
> embedded hypervisor byte channel driver") from the tty tree.
>
> Just context changes. I fixed it up (see below) and can carry the fix as
> necessary.
Thanks, that looks fine to me.
greg k-h
^ permalink raw reply
* Re: [PATCH V2 1/2] gpio: move mpc8xxx/512x gpio driver to drivers/gpio
From: Grant Likely @ 2011-09-21 16:33 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linuxppc-dev, Anatolij Gustschin
In-Reply-To: <1316602161-12546-1-git-send-email-w.sang@pengutronix.de>
On Wed, Sep 21, 2011 at 12:49:20PM +0200, Wolfram Sang wrote:
> Move the driver to the place where it is expected to be nowadays. Also
> rename its CONFIG-name to match the rest and adapt the defconfigs.
> Finally, move selection of REQUIRE_GPIOLIB or WANTS_OPTIONAL_GPIOLIB to
> the platforms, because this option is per-platform and not per-driver.
>
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> Cc: Anatolij Gustschin <agust@denx.de>
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> I'd think this should go via ppc, so it is in sync with the defconfig update of
> patch 2/2.
>
> Changes since V1: Use -C in format-patch to show the rename.
Nit: I prefer to see the changelog before the s-o-b lines so that it
gets included in the final commit text. Helps when trying to identify
exactly which version of a patch got merged.
>
> arch/powerpc/configs/85xx/p1023rds_defconfig | 2 +-
> arch/powerpc/configs/85xx/xes_mpc85xx_defconfig | 2 +-
> arch/powerpc/configs/mpc85xx_defconfig | 2 +-
> arch/powerpc/configs/mpc85xx_smp_defconfig | 2 +-
> arch/powerpc/configs/ppc6xx_defconfig | 2 +-
> arch/powerpc/platforms/512x/Kconfig | 1 +
> arch/powerpc/platforms/83xx/Kconfig | 9 ++++++---
> arch/powerpc/platforms/85xx/Kconfig | 12 ++++++++----
> arch/powerpc/platforms/86xx/Kconfig | 1 +
> arch/powerpc/platforms/Kconfig | 10 ----------
> arch/powerpc/sysdev/Makefile | 1 -
> drivers/gpio/Kconfig | 8 ++++++++
> drivers/gpio/Makefile | 1 +
> .../mpc8xxx_gpio.c => drivers/gpio/gpio-mpc8xxx.c | 0
> 14 files changed, 30 insertions(+), 23 deletions(-)
> rename arch/powerpc/sysdev/mpc8xxx_gpio.c => drivers/gpio/gpio-mpc8xxx.c (100%)
Looks good to me. Acked-by: Grant Likely <grant.likely@secretlab.ca>
Yes, it probably should go via the ppc tree. I don't foresee any conflict
issues with the gpio tree.
g.
^ 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