All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 45/49] watchdog: irq: Remove IRQF_DISABLED
From: Yong Zhang @ 2011-10-22  9:56 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1319277421-9203-1-git-send-email-yong.zhang0@gmail.com>

Since commit [e58aa3d2: 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: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/watchdog/coh901327_wdt.c   |    2 +-
 drivers/watchdog/eurotechwdt.c     |    2 +-
 drivers/watchdog/mpcore_wdt.c      |    3 +--
 drivers/watchdog/octeon-wdt-main.c |    2 +-
 drivers/watchdog/sb_wdog.c         |    4 ++--
 drivers/watchdog/wdt.c             |    2 +-
 drivers/watchdog/wdt_pci.c         |    2 +-
 7 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/watchdog/coh901327_wdt.c b/drivers/watchdog/coh901327_wdt.c
index 9291506..03f449a 100644
--- a/drivers/watchdog/coh901327_wdt.c
+++ b/drivers/watchdog/coh901327_wdt.c
@@ -429,7 +429,7 @@ static int __init coh901327_probe(struct platform_device *pdev)
 	writew(U300_WDOG_SR_RESET_STATUS_RESET, virtbase + U300_WDOG_SR);
 
 	irq = platform_get_irq(pdev, 0);
-	if (request_irq(irq, coh901327_interrupt, IRQF_DISABLED,
+	if (request_irq(irq, coh901327_interrupt, 0,
 			DRV_NAME " Bark", pdev)) {
 		ret = -EIO;
 		goto out_no_irq;
diff --git a/drivers/watchdog/eurotechwdt.c b/drivers/watchdog/eurotechwdt.c
index f1d1da6..41018d4 100644
--- a/drivers/watchdog/eurotechwdt.c
+++ b/drivers/watchdog/eurotechwdt.c
@@ -427,7 +427,7 @@ static int __init eurwdt_init(void)
 {
 	int ret;
 
-	ret = request_irq(irq, eurwdt_interrupt, IRQF_DISABLED, "eurwdt", NULL);
+	ret = request_irq(irq, eurwdt_interrupt, 0, "eurwdt", NULL);
 	if (ret) {
 		printk(KERN_ERR "eurwdt: IRQ %d is not free.\n", irq);
 		goto out;
diff --git a/drivers/watchdog/mpcore_wdt.c b/drivers/watchdog/mpcore_wdt.c
index 4dc3102..82ccd36 100644
--- a/drivers/watchdog/mpcore_wdt.c
+++ b/drivers/watchdog/mpcore_wdt.c
@@ -367,8 +367,7 @@ static int __devinit mpcore_wdt_probe(struct platform_device *dev)
 		goto err_misc;
 	}
 
-	ret = request_irq(wdt->irq, mpcore_wdt_fire, IRQF_DISABLED,
-							"mpcore_wdt", wdt);
+	ret = request_irq(wdt->irq, mpcore_wdt_fire, 0, "mpcore_wdt", wdt);
 	if (ret) {
 		dev_printk(KERN_ERR, wdt->dev,
 			"cannot register IRQ%d for watchdog\n", wdt->irq);
diff --git a/drivers/watchdog/octeon-wdt-main.c b/drivers/watchdog/octeon-wdt-main.c
index 945ee83..6019087 100644
--- a/drivers/watchdog/octeon-wdt-main.c
+++ b/drivers/watchdog/octeon-wdt-main.c
@@ -402,7 +402,7 @@ static void octeon_wdt_setup_interrupt(int cpu)
 	irq = OCTEON_IRQ_WDOG0 + core;
 
 	if (request_irq(irq, octeon_wdt_poke_irq,
-			IRQF_DISABLED, "octeon_wdt", octeon_wdt_poke_irq))
+			0, "octeon_wdt", octeon_wdt_poke_irq))
 		panic("octeon_wdt: Couldn't obtain irq %d", irq);
 
 	cpumask_set_cpu(cpu, &irq_enabled_cpus);
diff --git a/drivers/watchdog/sb_wdog.c b/drivers/watchdog/sb_wdog.c
index f31493e..b01a30e 100644
--- a/drivers/watchdog/sb_wdog.c
+++ b/drivers/watchdog/sb_wdog.c
@@ -300,7 +300,7 @@ static int __init sbwdog_init(void)
 	 * get the resources
 	 */
 
-	ret = request_irq(1, sbwdog_interrupt, IRQF_DISABLED | IRQF_SHARED,
+	ret = request_irq(1, sbwdog_interrupt, IRQF_SHARED,
 		ident.identity, (void *)user_dog);
 	if (ret) {
 		printk(KERN_ERR "%s: failed to request irq 1 - %d\n",
@@ -350,7 +350,7 @@ void platform_wd_setup(void)
 {
 	int ret;
 
-	ret = request_irq(1, sbwdog_interrupt, IRQF_DISABLED | IRQF_SHARED,
+	ret = request_irq(1, sbwdog_interrupt, IRQF_SHARED,
 		"Kernel Watchdog", IOADDR(A_SCD_WDOG_CFG_0));
 	if (ret) {
 		printk(KERN_CRIT
diff --git a/drivers/watchdog/wdt.c b/drivers/watchdog/wdt.c
index bb03e15..d2ef002 100644
--- a/drivers/watchdog/wdt.c
+++ b/drivers/watchdog/wdt.c
@@ -612,7 +612,7 @@ static int __init wdt_init(void)
 		goto out;
 	}
 
-	ret = request_irq(irq, wdt_interrupt, IRQF_DISABLED, "wdt501p", NULL);
+	ret = request_irq(irq, wdt_interrupt, 0, "wdt501p", NULL);
 	if (ret) {
 		printk(KERN_ERR "wdt: IRQ %d is not free.\n", irq);
 		goto outreg;
diff --git a/drivers/watchdog/wdt_pci.c b/drivers/watchdog/wdt_pci.c
index 172dad6..e0fc3ba 100644
--- a/drivers/watchdog/wdt_pci.c
+++ b/drivers/watchdog/wdt_pci.c
@@ -643,7 +643,7 @@ static int __devinit wdtpci_init_one(struct pci_dev *dev,
 	irq = dev->irq;
 	io = pci_resource_start(dev, 2);
 
-	if (request_irq(irq, wdtpci_interrupt, IRQF_DISABLED | IRQF_SHARED,
+	if (request_irq(irq, wdtpci_interrupt, IRQF_SHARED,
 			 "wdt_pci", &wdtpci_miscdev)) {
 		printk(KERN_ERR PFX "IRQ %d is not free\n", irq);
 		goto out_reg;
-- 
1.7.1

^ permalink raw reply related

* [PATCH V3 00/49] Tree wide: cleanup IRQF_DISABLED
From: Yong Zhang @ 2011-10-22  9:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: tglx

Hi Thomas,

Since the merge window will open soon, and the following patches
are the loftovers, Could you please pick them up?

Thanks,
Yong

------------------changelog from V2 to V3------------------------
Changelog V3 < V2:
  -- Refresh the patches based on next-20111014

  -- Drop below patches since it's been taken:
       ata-irq-Remove-IRQF_DISABLED.patch
       i2c-irq-Remove-IRQF_DISABLED.patch
       infiniband-irq-Remove-IRQF_DISABLED.patch
       mmc-irq-Remove-IRQF_DISABLED.patch
       TTY-irq-Remove-IRQF_DISABLED.patch
       video-irq-Remove-IRQF_DISABLED.patch
       sound-irq-Remove-IRQF_DISABLED.patch

  -- Collect more Acks.

  -- Add one more patches which do more cleanup on USB.
       USB-pxa168-xls-irq-Remove-IRQF_DISABLED.patch
         When I made the patch which has been picked up by Greg,
         ehci-pxa168 and ohci-xls is not included in the tree yet.
         So now we have this additional patch.

------------------changelog from V1 to V2------------------------
Changelog V2 < V1:
  -- Change c58543c8 to e58aa3d2 to reflect the correct commit

  -- Drop below patches since it's been taken:
       hexagon-irq-Remove-IRQF_DISABLED.patch (Richard Kuo)
       hwmon-irq-Remove-IRQF_DISABLED.patch   (Guenter Roeck)

  -- Collect more Acks.

------------------changelog from V0 to V1------------------------
Changelog V1 < V0:
  -- Show more info in the commit log, thus make the patch more
     easy to review (Required by David Miller)
  
  -- Drop below pathces since they are not needed any more:
       mpu401-snd_mpu401_uart_new-split-semantic-of-irq_fla.patch
       gpio-irq-Remove-IRQF_DISABLED.patch

  -- Drop below patches since they are picked by individual maintainer:
       Blackfin-irq-Remove-IRQF_DISABLED.patch (Bob Liu)
       staging-irq-Remove-IRQF_DISABLED.patch  (Greg KH)
       USB-irq-Remove-IRQF_DISABLED.patch      (Greg KH)
       Input-irq-Remove-IRQF_DISABLED.patch    (Dmitry Torokhov)
       mfd-irq-Remove-IRQF_DISABLED.patch      (Samuel Ortiz)

  -- Collect some Acks.
     Almost half of the patches get Acks(for the whole patch or part).

  -- Refresh this patchset based on next-20110920 (commit 8c024a21).
  
  -- Add two more patches:
       hexagon-irq-Remove-IRQF_DISABLED.patch
       hwmon-irq-Remove-IRQF_DISABLED.patch
         The two new add patches make me think that we should push this
         patches to upstream ASAP.

------------------------base log(in V0)-------------------------
IRQF_DISABLED has been marked 'removal' for some time, now this
trival patchset achive the goal.
Most of the patch is one-line change/remove IRQF_DISABLED
except patch-0001.

patch-0001 just remove the workround which live with IRQF_DISABLED
is not NOOP, say before v2.6.35.

Others just do:
  --if IRQF_DISABLED is combined with other irq_flags,just remove
    IRQF_DISABLED;
  --if IRQF_DISABLED is the only irq_flags of request_irq(),
    change IRQF_DISABLED to 0 like some callers of request_irq()
    have done.
  --if IRQF_DISABLED is the only flags if irq_action, just remove
    that item.

And I make the patches based on subdirs, so it's more easy to be
reviewed/taken by relevant trees than one-big-patch.

---
Yong Zhang (49):
  usb/hcd: Remove tricky code dealing with IRQF_DISABLED && IRQF_SHARED
  alpha: irq: Remove IRQF_DISABLED
  arm: irq: Remove IRQF_DISABLED
  avr32: irq: Remove IRQF_DISABLED
  cris: irq: Remove IRQF_DISABLED
  frv: irq: Remove IRQF_DISABLED
  h8300: irq: Remove IRQF_DISABLED
  ia64: irq: Remove IRQF_DISABLED
  m32r: irq: Remove IRQF_DISABLED
  m68k: irq: Remove IRQF_DISABLED
  microblaze: irq: Remove IRQF_DISABLED
  MIPS: irq: Remove IRQF_DISABLED
  mn10300: irq: Remove IRQF_DISABLED
  parisc: irq: remove IRQF_DISABLED
  powerpc: irq: Remove IRQF_DISABLED
  SH: irq: Remove IRQF_DISABLED
  sparc: irq: Remove IRQF_DISABLED
  um: irq: Remove IRQF_DISABLED
  unicore32: Remove IRQF_DISABLED
  x86: irq: Remove IRQF_DISABLED
  xtensa: irq: Remove IRQF_DISABLED
  score: irq: Remove IRQF_DISABLED
  clocksource: irq: Remove IRQF_DISABLED
  SCSI: irq: Remove IRQF_DISABLED
  block: irq: Remove IRQF_DISABLED
  cdrom: irq: Remove IRQF_DISABLED
  driver/char: irq: Remove IRQF_DISABLED
  crypto: irq: Remove IRQF_DISABLED
  dmaengine: irq: Remove IRQF_DISABLED
  EDAC: irq: Remove IRQF_DISABLED
  ISDN: irq: Remove IRQF_DISABLED
  media: irq: Remove IRQF_DISABLED
  drivers:misc:irq: Remove IRQF_DISABLED
  mtd: irq: Remove IRQF_DISABLED
  net: irq: Remove IRQF_DISABLED
  dirvers/parisc: irq: Remove IRQF_DISABLED
  pcmcia: irq: Remove IRQF_DISABLED
  sony-laptop:irq: Remove IRQF_DISABLED
  PNP: irq: Remove IRQF_DISABLED
  power_supply:irq: Remove IRQF_DISABLED
  powerpc/ps3: irq: Remove IRQF_DISABLED
  rtc: irq: Remove IRQF_DISABLED
  spi: irq: Remove IRQF_DISABLED
  w1: irq: Remove IRQF_DISABLED
  watchdog: irq: Remove IRQF_DISABLED
  xen: irq: Remove IRQF_DISABLED
  Documentation: irq: Change documents related to IRQF_DISABLED
  USB: pxa168: xls: irq: Remove IRQF_DISABLED
  genirq: Remove IRQF_DISABLED

 Documentation/PCI/MSI-HOWTO.txt                 |   21 ---------------------
 Documentation/feature-removal-schedule.txt      |    7 -------
 Documentation/scsi/ncr53c8xx.txt                |    3 ++-
 Documentation/scsi/tmscsim.txt                  |    4 ++--
 arch/alpha/include/asm/floppy.h                 |    2 +-
 arch/alpha/kernel/irq_alpha.c                   |    1 -
 arch/alpha/kernel/sys_titan.c                   |   14 +++++++-------
 arch/arm/common/time-acorn.c                    |    1 -
 arch/arm/common/timer-sp.c                      |    2 +-
 arch/arm/include/asm/floppy.h                   |    2 +-
 arch/arm/kernel/perf_event.c                    |    2 +-
 arch/arm/mach-at91/at91rm9200_time.c            |    2 +-
 arch/arm/mach-at91/at91sam926x_time.c           |    2 +-
 arch/arm/mach-at91/at91x40_time.c               |    2 +-
 arch/arm/mach-bcmring/dma.c                     |    2 +-
 arch/arm/mach-clps711x/time.c                   |    2 +-
 arch/arm/mach-cns3xxx/core.c                    |    2 +-
 arch/arm/mach-davinci/board-da830-evm.c         |    2 +-
 arch/arm/mach-davinci/board-omapl138-hawk.c     |    2 +-
 arch/arm/mach-davinci/time.c                    |    4 ++--
 arch/arm/mach-ebsa110/core.c                    |    2 +-
 arch/arm/mach-ep93xx/core.c                     |    2 +-
 arch/arm/mach-footbridge/dc21285-timer.c        |    2 +-
 arch/arm/mach-footbridge/dc21285.c              |   10 +++++-----
 arch/arm/mach-footbridge/isa-timer.c            |    2 +-
 arch/arm/mach-gemini/time.c                     |    2 +-
 arch/arm/mach-h720x/cpu-h7201.c                 |    2 +-
 arch/arm/mach-h720x/cpu-h7202.c                 |    2 +-
 arch/arm/mach-imx/mach-armadillo5x0.c           |    2 +-
 arch/arm/mach-imx/mach-mx31_3ds.c               |    2 +-
 arch/arm/mach-imx/mach-pca100.c                 |    2 +-
 arch/arm/mach-imx/mach-pcm037.c                 |    2 +-
 arch/arm/mach-imx/mx31lilly-db.c                |    2 +-
 arch/arm/mach-integrator/integrator_ap.c        |    2 +-
 arch/arm/mach-ixp2000/core.c                    |    2 +-
 arch/arm/mach-ixp23xx/core.c                    |    2 +-
 arch/arm/mach-ixp4xx/common.c                   |    2 +-
 arch/arm/mach-ixp4xx/dsmg600-setup.c            |    2 +-
 arch/arm/mach-ixp4xx/fsg-setup.c                |    4 ++--
 arch/arm/mach-ixp4xx/nas100d-setup.c            |    2 +-
 arch/arm/mach-ixp4xx/nslu2-setup.c              |    4 ++--
 arch/arm/mach-ks8695/time.c                     |    2 +-
 arch/arm/mach-lpc32xx/timer.c                   |    2 +-
 arch/arm/mach-mmp/time.c                        |    2 +-
 arch/arm/mach-msm/timer.c                       |    4 ++--
 arch/arm/mach-netx/time.c                       |    2 +-
 arch/arm/mach-omap1/fpga.c                      |    4 ++--
 arch/arm/mach-omap1/pm.c                        |    1 -
 arch/arm/mach-omap1/time.c                      |    2 +-
 arch/arm/mach-omap1/timer32k.c                  |    2 +-
 arch/arm/mach-omap2/omap_l3_noc.c               |    4 ++--
 arch/arm/mach-omap2/omap_l3_smx.c               |    4 ++--
 arch/arm/mach-omap2/pm34xx.c                    |    2 +-
 arch/arm/mach-omap2/timer.c                     |    2 +-
 arch/arm/mach-pnx4008/time.c                    |    2 +-
 arch/arm/mach-pxa/am200epd.c                    |    2 +-
 arch/arm/mach-pxa/am300epd.c                    |    2 +-
 arch/arm/mach-pxa/em-x270.c                     |    2 +-
 arch/arm/mach-pxa/magician.c                    |    2 +-
 arch/arm/mach-pxa/mainstone.c                   |    2 +-
 arch/arm/mach-pxa/pcm990-baseboard.c            |    2 +-
 arch/arm/mach-pxa/sharpsl_pm.c                  |    8 ++++----
 arch/arm/mach-pxa/time.c                        |    2 +-
 arch/arm/mach-pxa/trizeps4.c                    |    2 +-
 arch/arm/mach-rpc/dma.c                         |    2 +-
 arch/arm/mach-s3c2410/usb-simtec.c              |    2 +-
 arch/arm/mach-s3c64xx/mach-smartq.c             |    2 +-
 arch/arm/mach-sa1100/dma.c                      |    2 +-
 arch/arm/mach-sa1100/time.c                     |    2 +-
 arch/arm/mach-shark/core.c                      |    2 +-
 arch/arm/mach-tcc8k/time.c                      |    2 +-
 arch/arm/mach-tegra/timer.c                     |    2 +-
 arch/arm/mach-u300/timer.c                      |    2 +-
 arch/arm/mach-vt8500/timer.c                    |    2 +-
 arch/arm/mach-w90x900/time.c                    |    2 +-
 arch/arm/mach-zynq/timer.c                      |    2 +-
 arch/arm/plat-iop/time.c                        |    2 +-
 arch/arm/plat-mxc/Kconfig                       |    2 +-
 arch/arm/plat-mxc/epit.c                        |    2 +-
 arch/arm/plat-mxc/time.c                        |    2 +-
 arch/arm/plat-nomadik/timer.c                   |    2 +-
 arch/arm/plat-omap/dma.c                        |    1 -
 arch/arm/plat-orion/time.c                      |    2 +-
 arch/arm/plat-pxa/dma.c                         |    2 +-
 arch/arm/plat-s3c24xx/dma.c                     |    2 +-
 arch/arm/plat-s5p/s5p-time.c                    |    2 +-
 arch/arm/plat-s5p/sysmmu.c                      |    2 +-
 arch/arm/plat-samsung/time.c                    |    2 +-
 arch/arm/plat-spear/time.c                      |    2 +-
 arch/avr32/kernel/time.c                        |    2 +-
 arch/cris/arch-v10/drivers/gpio.c               |    4 ++--
 arch/cris/arch-v10/drivers/sync_serial.c        |    4 ++--
 arch/cris/arch-v10/kernel/time.c                |    4 ++--
 arch/cris/arch-v32/drivers/mach-a3/gpio.c       |    2 +-
 arch/cris/arch-v32/drivers/mach-fs/gpio.c       |    4 ++--
 arch/cris/arch-v32/kernel/fasttimer.c           |    2 +-
 arch/cris/arch-v32/kernel/irq.c                 |    4 ++--
 arch/cris/arch-v32/kernel/smp.c                 |    1 -
 arch/cris/arch-v32/kernel/time.c                |    4 ++--
 arch/cris/arch-v32/mach-a3/arbiter.c            |    4 ++--
 arch/cris/arch-v32/mach-fs/arbiter.c            |    2 +-
 arch/cris/include/arch-v10/arch/irq.h           |    5 +++--
 arch/cris/include/arch-v32/arch/irq.h           |    5 +++--
 arch/cris/kernel/irq.c                          |    3 +--
 arch/frv/kernel/irq-mb93091.c                   |    8 ++++----
 arch/frv/kernel/irq-mb93093.c                   |    1 -
 arch/frv/kernel/irq-mb93493.c                   |    4 ++--
 arch/frv/kernel/time.c                          |    1 -
 arch/h8300/kernel/timer/itu.c                   |    2 +-
 arch/h8300/kernel/timer/timer16.c               |    2 +-
 arch/h8300/kernel/timer/timer8.c                |    2 +-
 arch/h8300/kernel/timer/tpu.c                   |    2 +-
 arch/ia64/hp/sim/simserial.c                    |    2 +-
 arch/ia64/kernel/irq_ia64.c                     |    4 ----
 arch/ia64/kernel/mca.c                          |    6 ------
 arch/ia64/kernel/perfmon.c                      |    1 -
 arch/ia64/kernel/time.c                         |    2 +-
 arch/ia64/xen/irq_xen.c                         |    3 ---
 arch/m32r/kernel/time.c                         |    1 -
 arch/m68k/include/asm/floppy.h                  |    2 +-
 arch/m68k/include/asm/irq.h                     |    4 ++--
 arch/m68k/include/asm/sun3xflop.h               |    2 +-
 arch/m68k/platform/68328/timers.c               |    2 +-
 arch/m68k/platform/68360/config.c               |    2 +-
 arch/m68k/platform/coldfire/pit.c               |    2 +-
 arch/m68k/platform/coldfire/sltimers.c          |    4 ++--
 arch/m68k/platform/coldfire/timers.c            |    4 ++--
 arch/microblaze/kernel/timer.c                  |    2 +-
 arch/mips/alchemy/common/dbdma.c                |    2 +-
 arch/mips/alchemy/common/time.c                 |    2 +-
 arch/mips/alchemy/devboards/db1200/platform.c   |    4 ++--
 arch/mips/cavium-octeon/smp.c                   |    2 +-
 arch/mips/dec/setup.c                           |    1 -
 arch/mips/include/asm/mach-generic/floppy.h     |    2 +-
 arch/mips/include/asm/mach-jazz/floppy.h        |    2 +-
 arch/mips/jazz/irq.c                            |    2 +-
 arch/mips/kernel/cevt-bcm1480.c                 |    2 +-
 arch/mips/kernel/cevt-ds1287.c                  |    2 +-
 arch/mips/kernel/cevt-gt641xx.c                 |    2 +-
 arch/mips/kernel/cevt-r4k.c                     |    2 +-
 arch/mips/kernel/cevt-sb1250.c                  |    2 +-
 arch/mips/kernel/cevt-txx9.c                    |    2 +-
 arch/mips/kernel/i8253.c                        |    2 +-
 arch/mips/kernel/rtlx.c                         |    1 -
 arch/mips/kernel/smtc.c                         |    2 +-
 arch/mips/lantiq/irq.c                          |    1 -
 arch/mips/loongson/common/cs5536/cs5536_mfgpt.c |    2 +-
 arch/mips/mti-malta/malta-int.c                 |    4 ++--
 arch/mips/pci/ops-pmcmsp.c                      |    2 +-
 arch/mips/pci/ops-tx3927.c                      |    2 +-
 arch/mips/pci/pci-tx4927.c                      |    2 +-
 arch/mips/pci/pci-tx4938.c                      |    2 +-
 arch/mips/pci/pci-tx4939.c                      |    2 +-
 arch/mips/pmc-sierra/msp71xx/msp_hwbutton.c     |    2 +-
 arch/mips/pmc-sierra/msp71xx/msp_smp.c          |    4 ++--
 arch/mips/pnx8550/common/int.c                  |    4 ++--
 arch/mips/pnx8550/common/time.c                 |    4 ++--
 arch/mips/sgi-ip22/ip22-int.c                   |   10 +++++-----
 arch/mips/sgi-ip27/ip27-irq.c                   |    2 +-
 arch/mips/sgi-ip27/ip27-timer.c                 |    2 +-
 arch/mips/sgi-ip32/ip32-irq.c                   |    2 --
 arch/mips/sni/irq.c                             |    2 +-
 arch/mips/sni/time.c                            |    2 +-
 arch/mips/txx9/generic/pci.c                    |    2 +-
 arch/mn10300/kernel/cevt-mn10300.c              |    2 +-
 arch/mn10300/kernel/mn10300-serial.c            |    6 +++---
 arch/mn10300/kernel/smp.c                       |    1 -
 arch/mn10300/unit-asb2364/irq-fpga.c            |    2 +-
 arch/parisc/include/asm/floppy.h                |    4 ++--
 arch/parisc/kernel/irq.c                        |    4 ++--
 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 ++---
 arch/score/kernel/time.c                        |    2 +-
 arch/sh/boards/board-secureedge5410.c           |    3 +--
 arch/sh/boards/mach-cayman/irq.c                |    2 --
 arch/sh/boards/mach-hp6xx/hp6xx_apm.c           |    2 +-
 arch/sh/drivers/dma/dma-g2.c                    |    2 +-
 arch/sh/drivers/dma/dma-pvr2.c                  |    1 -
 arch/sh/drivers/dma/dma-sh.c                    |    4 ++--
 arch/sh/drivers/dma/dmabrg.c                    |    6 +++---
 arch/sh/drivers/pci/pci-sh5.c                   |    4 ++--
 arch/sh/drivers/pci/pci-sh7780.c                |    2 +-
 arch/sh/drivers/push-switch.c                   |    2 +-
 arch/sh/kernel/cpu/sh4a/smp-shx3.c              |    2 +-
 arch/sparc/include/asm/floppy_64.h              |    2 +-
 arch/sparc/kernel/ldc.c                         |    4 ++--
 arch/um/drivers/line.c                          |    8 ++++----
 arch/um/drivers/mconsole_kern.c                 |    2 +-
 arch/um/drivers/net_kern.c                      |    2 +-
 arch/um/drivers/port_kern.c                     |    4 ++--
 arch/um/drivers/random.c                        |    2 +-
 arch/um/drivers/ubd_kern.c                      |    2 +-
 arch/um/drivers/xterm_kern.c                    |    2 +-
 arch/um/kernel/sigio.c                          |    2 +-
 arch/um/kernel/time.c                           |    2 +-
 arch/unicore32/kernel/puv3-nb0916.c             |    4 ++--
 arch/unicore32/kernel/time.c                    |    2 +-
 arch/x86/include/asm/floppy.h                   |    4 ++--
 arch/x86/kernel/hpet.c                          |    2 +-
 arch/x86/kernel/time.c                          |    2 +-
 arch/x86/xen/smp.c                              |    8 ++++----
 arch/x86/xen/spinlock.c                         |    2 +-
 arch/x86/xen/time.c                             |    5 ++---
 arch/xtensa/kernel/time.c                       |    1 -
 drivers/block/cciss.c                           |    4 ++--
 drivers/block/cpqarray.c                        |    2 +-
 drivers/block/hd.c                              |    7 +------
 drivers/block/mg_disk.c                         |    2 +-
 drivers/cdrom/gdrom.c                           |    4 ++--
 drivers/char/hpet.c                             |    2 +-
 drivers/char/ipmi/ipmi_si_intf.c                |    4 ++--
 drivers/char/nwbutton.c                         |    2 +-
 drivers/char/rtc.c                              |    4 ++--
 drivers/char/snsc.c                             |    2 +-
 drivers/char/snsc_event.c                       |    2 +-
 drivers/char/tlclk.c                            |    2 +-
 drivers/clocksource/cs5535-clockevt.c           |    2 +-
 drivers/clocksource/dw_apb_timer.c              |    3 +--
 drivers/clocksource/sh_cmt.c                    |    2 +-
 drivers/clocksource/sh_mtu2.c                   |    2 +-
 drivers/clocksource/sh_tmu.c                    |    2 +-
 drivers/clocksource/tcb_clksrc.c                |    2 +-
 drivers/crypto/mv_cesa.c                        |    3 +--
 drivers/dma/amba-pl08x.c                        |    2 +-
 drivers/dma/coh901318.c                         |    2 +-
 drivers/dma/shdma.c                             |    4 ++--
 drivers/edac/mpc85xx_edac.c                     |    6 +++---
 drivers/edac/mv64x60_edac.c                     |    8 ++++----
 drivers/edac/ppc4xx_edac.c                      |    4 ++--
 drivers/isdn/hardware/eicon/divasmain.c         |    2 +-
 drivers/isdn/sc/init.c                          |    2 +-
 drivers/media/common/saa7146_core.c             |    2 +-
 drivers/media/dvb/bt8xx/bt878.c                 |    2 +-
 drivers/media/radio/si4713-i2c.c                |    2 +-
 drivers/media/rc/winbond-cir.c                  |    2 +-
 drivers/media/video/bt8xx/bttv-driver.c         |    2 +-
 drivers/media/video/cx18/cx18-driver.c          |    2 +-
 drivers/media/video/cx23885/cx23885-core.c      |    2 +-
 drivers/media/video/cx88/cx88-alsa.c            |    2 +-
 drivers/media/video/cx88/cx88-mpeg.c            |    2 +-
 drivers/media/video/cx88/cx88-video.c           |    2 +-
 drivers/media/video/davinci/vpbe_display.c      |    2 +-
 drivers/media/video/davinci/vpfe_capture.c      |    4 ++--
 drivers/media/video/davinci/vpif_capture.c      |    2 +-
 drivers/media/video/davinci/vpif_display.c      |    2 +-
 drivers/media/video/ivtv/ivtv-driver.c          |    2 +-
 drivers/media/video/meye.c                      |    2 +-
 drivers/media/video/s5p-mfc/s5p_mfc.c           |    3 +--
 drivers/media/video/saa7134/saa7134-alsa.c      |    2 +-
 drivers/media/video/saa7134/saa7134-core.c      |    2 +-
 drivers/media/video/saa7164/saa7164-core.c      |    2 +-
 drivers/media/video/sh_mobile_ceu_camera.c      |    2 +-
 drivers/media/video/zoran/zoran_card.c          |    2 +-
 drivers/misc/arm-charlcd.c                      |    2 +-
 drivers/misc/phantom.c                          |    2 +-
 drivers/mtd/nand/mxc_nand.c                     |    2 +-
 drivers/mtd/nand/pxa3xx_nand.c                  |    3 +--
 drivers/mtd/nand/tmio_nand.c                    |    2 +-
 drivers/net/ethernet/adi/bfin_mac.c             |    4 ++--
 drivers/net/ethernet/amd/sun3lance.c            |    2 +-
 drivers/net/ethernet/broadcom/bcm63xx_enet.c    |    4 ++--
 drivers/net/ethernet/dec/tulip/de4x5.c          |    2 +-
 drivers/net/ethernet/freescale/fec.c            |    2 +-
 drivers/net/ethernet/hp/hp100.c                 |    2 +-
 drivers/net/ethernet/ibm/ehea/ehea_main.c       |    6 +++---
 drivers/net/ethernet/korina.c                   |    8 ++++----
 drivers/net/ethernet/lantiq_etop.c              |    4 ++--
 drivers/net/ethernet/marvell/pxa168_eth.c       |    2 +-
 drivers/net/ethernet/micrel/ks8851_mll.c        |    2 +-
 drivers/net/ethernet/natsemi/jazzsonic.c        |    2 +-
 drivers/net/ethernet/natsemi/xtsonic.c          |    2 +-
 drivers/net/ethernet/pasemi/pasemi_mac.c        |    4 ++--
 drivers/net/ethernet/smsc/smc91x.h              |    2 +-
 drivers/net/ethernet/smsc/smsc9420.c            |    2 +-
 drivers/net/ethernet/ti/davinci_emac.c          |    2 +-
 drivers/net/ethernet/toshiba/ps3_gelic_net.c    |    2 +-
 drivers/net/hamradio/baycom_ser_fdx.c           |    2 +-
 drivers/net/hamradio/baycom_ser_hdx.c           |    2 +-
 drivers/net/hamradio/scc.c                      |    2 +-
 drivers/net/hamradio/yam.c                      |    2 +-
 drivers/net/irda/bfin_sir.c                     |    4 ++--
 drivers/net/irda/donauboe.c                     |    4 ++--
 drivers/net/irda/sh_irda.c                      |    2 +-
 drivers/net/irda/sh_sir.c                       |    2 +-
 drivers/net/wan/hostess_sv11.c                  |    2 +-
 drivers/net/wan/sealevel.c                      |    2 +-
 drivers/net/wireless/p54/p54spi.c               |    2 +-
 drivers/parisc/superio.c                        |    2 +-
 drivers/pcmcia/db1xxx_ss.c                      |    4 ++--
 drivers/pcmcia/soc_common.c                     |    2 +-
 drivers/platform/x86/sony-laptop.c              |    2 +-
 drivers/pnp/resource.c                          |    2 +-
 drivers/power/wm97xx_battery.c                  |    2 +-
 drivers/power/z2_battery.c                      |    2 +-
 drivers/ps3/ps3-vuart.c                         |    2 +-
 drivers/ps3/ps3stor_lib.c                       |    2 +-
 drivers/rtc/rtc-at91sam9.c                      |    2 +-
 drivers/rtc/rtc-cmos.c                          |    2 +-
 drivers/rtc/rtc-coh901331.c                     |    2 +-
 drivers/rtc/rtc-davinci.c                       |    2 +-
 drivers/rtc/rtc-ds1511.c                        |    2 +-
 drivers/rtc/rtc-ds1553.c                        |    2 +-
 drivers/rtc/rtc-lpc32xx.c                       |    2 +-
 drivers/rtc/rtc-mpc5121.c                       |    4 ++--
 drivers/rtc/rtc-mrst.c                          |    2 +-
 drivers/rtc/rtc-mv.c                            |    2 +-
 drivers/rtc/rtc-nuc900.c                        |    2 +-
 drivers/rtc/rtc-omap.c                          |    4 ++--
 drivers/rtc/rtc-pl030.c                         |    2 +-
 drivers/rtc/rtc-pl031.c                         |    2 +-
 drivers/rtc/rtc-puv3.c                          |    4 ++--
 drivers/rtc/rtc-pxa.c                           |    4 ++--
 drivers/rtc/rtc-s3c.c                           |    4 ++--
 drivers/rtc/rtc-sa1100.c                        |    4 ++--
 drivers/rtc/rtc-sh.c                            |    8 ++++----
 drivers/rtc/rtc-stk17ta8.c                      |    2 +-
 drivers/rtc/rtc-tx4939.c                        |    2 +-
 drivers/rtc/rtc-vr41xx.c                        |    4 ++--
 drivers/scsi/NCR5380.c                          |    2 +-
 drivers/scsi/aacraid/rx.c                       |    2 +-
 drivers/scsi/aacraid/sa.c                       |    2 +-
 drivers/scsi/aacraid/src.c                      |    2 +-
 drivers/scsi/aha152x.c                          |    4 ++--
 drivers/scsi/aic7xxx_old.c                      |    2 +-
 drivers/scsi/arm/acornscsi.c                    |    2 +-
 drivers/scsi/arm/cumana_1.c                     |    2 +-
 drivers/scsi/arm/cumana_2.c                     |    2 +-
 drivers/scsi/arm/powertec.c                     |    2 +-
 drivers/scsi/dtc.c                              |    2 +-
 drivers/scsi/eata.c                             |    2 +-
 drivers/scsi/eata_pio.c                         |    4 ++--
 drivers/scsi/g_NCR5380.c                        |    2 +-
 drivers/scsi/gdth.c                             |    6 +++---
 drivers/scsi/hpsa.c                             |    4 ++--
 drivers/scsi/ibmvscsi/ibmvstgt.c                |    2 +-
 drivers/scsi/in2000.c                           |    2 +-
 drivers/scsi/initio.c                           |    2 +-
 drivers/scsi/pas16.c                            |    2 +-
 drivers/scsi/pm8001/pm8001_init.c               |    4 +---
 drivers/scsi/t128.c                             |    2 +-
 drivers/scsi/u14-34f.c                          |    2 +-
 drivers/scsi/wd7000.c                           |    2 +-
 drivers/spi/spi-bfin5xx.c                       |    2 +-
 drivers/spi/spi-coldfire-qspi.c                 |    2 +-
 drivers/spi/spi-ppc4xx.c                        |    2 +-
 drivers/spi/spi-sh-msiof.c                      |    2 +-
 drivers/spi/spi-sh.c                            |    2 +-
 drivers/usb/core/hcd.c                          |   15 ---------------
 drivers/usb/host/ehci-pxa168.c                  |    2 +-
 drivers/usb/host/ohci-xls.c                     |    2 +-
 drivers/w1/masters/ds1wm.c                      |    2 +-
 drivers/w1/masters/omap_hdq.c                   |    2 +-
 drivers/watchdog/coh901327_wdt.c                |    2 +-
 drivers/watchdog/eurotechwdt.c                  |    2 +-
 drivers/watchdog/mpcore_wdt.c                   |    3 +--
 drivers/watchdog/octeon-wdt-main.c              |    2 +-
 drivers/watchdog/sb_wdog.c                      |    4 ++--
 drivers/watchdog/wdt.c                          |    2 +-
 drivers/watchdog/wdt_pci.c                      |    2 +-
 drivers/xen/evtchn.c                            |    2 +-
 drivers/xen/platform-pci.c                      |    2 +-
 include/linux/interrupt.h                       |    3 ---
 include/net/irda/irda_device.h                  |    2 +-
 375 files changed, 463 insertions(+), 561 deletions(-)


^ permalink raw reply

* [PATCH 01/49] usb/hcd: Remove tricky code dealing with IRQF_DISABLED && IRQF_SHARED
From: Yong Zhang @ 2011-10-22  9:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: tglx, Greg Kroah-Hartman, linux-usb
In-Reply-To: <1319277421-9203-1-git-send-email-yong.zhang0@gmail.com>

Now, genirq keep irqs disabled when calling the action handler,
we don't need to disable irq by ourselves anymore.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
---
 drivers/usb/core/hcd.c |   15 ---------------
 1 files changed, 0 insertions(+), 15 deletions(-)

diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index c9eb4e5..e98f605 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -2125,15 +2125,8 @@ EXPORT_SYMBOL_GPL(usb_bus_start_enum);
 irqreturn_t usb_hcd_irq (int irq, void *__hcd)
 {
 	struct usb_hcd		*hcd = __hcd;
-	unsigned long		flags;
 	irqreturn_t		rc;
 
-	/* IRQF_DISABLED doesn't work correctly with shared IRQs
-	 * when the first handler doesn't use it.  So let's just
-	 * assume it's never used.
-	 */
-	local_irq_save(flags);
-
 	if (unlikely(HCD_DEAD(hcd) || !HCD_HW_ACCESSIBLE(hcd))) {
 		rc = IRQ_NONE;
 	} else if (hcd->driver->irq(hcd) == IRQ_NONE) {
@@ -2145,7 +2138,6 @@ irqreturn_t usb_hcd_irq (int irq, void *__hcd)
 		rc = IRQ_HANDLED;
 	}
 
-	local_irq_restore(flags);
 	return rc;
 }
 EXPORT_SYMBOL_GPL(usb_hcd_irq);
@@ -2334,13 +2326,6 @@ static int usb_hcd_request_irqs(struct usb_hcd *hcd,
 
 	if (hcd->driver->irq) {
 
-		/* IRQF_DISABLED doesn't work as advertised when used together
-		 * with IRQF_SHARED. As usb_hcd_irq() will always disable
-		 * interrupts we can remove it here.
-		 */
-		if (irqflags & IRQF_SHARED)
-			irqflags &= ~IRQF_DISABLED;
-
 		snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d",
 				hcd->driver->description, hcd->self.busnum);
 		retval = request_irq(irqnum, &usb_hcd_irq, irqflags,
-- 
1.7.1


^ permalink raw reply related

* [PATCH 04/49] avr32: irq: Remove IRQF_DISABLED
From: Yong Zhang @ 2011-10-22  9:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: tglx, Haavard Skinnemoen, Hans-Christian Egtvedt
In-Reply-To: <1319277421-9203-1-git-send-email-yong.zhang0@gmail.com>

Since commit [e58aa3d2: 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: Hans-Christian Egtvedt <egtvedt@samfundet.no>
---
 arch/avr32/kernel/time.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/avr32/kernel/time.c b/arch/avr32/kernel/time.c
index 05ad291..cfc9778 100644
--- a/arch/avr32/kernel/time.c
+++ b/arch/avr32/kernel/time.c
@@ -58,7 +58,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
 static struct irqaction timer_irqaction = {
 	.handler	= timer_interrupt,
 	/* Oprofile uses the same irq as the timer, so allow it to be shared */
-	.flags		= IRQF_TIMER | IRQF_DISABLED | IRQF_SHARED,
+	.flags		= IRQF_TIMER | IRQF_SHARED,
 	.name		= "avr32_comparator",
 };
 
-- 
1.7.1


^ permalink raw reply related

* [Qemu-devel] [PATCH v3 0/6] MIPS64 user mode emulation in QEMU with Cavium specific instruction support
From: khansa @ 2011-10-22 10:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, riku.voipio, Khansa Butt, aurelien

From: Khansa Butt <khansa@kics.edu.pk>

This is the team work of Ehsan-ul-Haq, Abdul Qadeer, Abdul Waheed, Khansa Butt
from HPCN Lab KICS UET Lahore.

Sorry Richard! gen_set was missed.
v1 contains:
* SEQI and SEQ related changes specified by Richard Henderson
* Fix issues related to coding style, typos and misleading comments
* Cavium specific change in set_thread_area syscall has been removed
*  as it corresponds to modified libc and kernel.

This Patch series add support of MIPS64 user mode emulation in QEMU.
Along with we implemented Cavium specific instructions which We will use 
in SME (in sysem mode emulation of Octeon processor)

If you have any objection regarding the Implementation of
Cavium instructions please read following notes.

Notes
*****

The detail of some instructions are as follows
1)seq rd,rs,rt
seq-->rd = 1 if rs = rt
is equivalent to
xor rd,rs,rt
sltiu rd,rd,1
2)exts rt,rs,p,lenm1
rt = sign-extend(rs<p+lenm1:p>,lenm1)
>From reference manual of Cavium Networks
"Bit locations p + lenm1 to p are extracted from rs and the result is written into the
lowest bits of destination register rt. The remaining bits in rt are a sign-extension of
the most-significant bit of the bit field (i.e. rt<63:lenm1> are all duplicates of the
source-register bit rs<p+lenm1>)." so we can't use any of 8,16 or 32 bit
sign extention tcg function. To sign extend according to msb of bit field
we have our own implementation
3)dmul rd,rs,rt
This instruction is included in gen_arith() because it is three operand
double word multiply instruction.
 configure                             |    1 +
 default-configs/mips64-linux-user.mak |    1 +
 linux-user/main.c                     |   21 ++-
 linux-user/mips64/syscall.h           |    2 +
 linux-user/signal.c                   |  438 ++++++++++++++++++++++++++++++++-
 mips-dis.c                            |   53 ++++
 target-mips/cpu.h                     |    7 +
 target-mips/helper.h                  |    5 +
 target-mips/machine.c                 |   12 +
 target-mips/mips-defs.h               |    2 +
 target-mips/op_helper.c               |   73 ++++++
 target-mips/translate.c               |  430 ++++++++++++++++++++++++++++++++-
 target-mips/translate_init.c          |   24 ++
 13 files changed, 1049 insertions(+), 20 deletions(-)
 create mode 100644 default-configs/mips64-linux-user.mak

-- 
1.7.3.4

^ permalink raw reply

* [Qemu-devel] [PATCH v3 1/6] linux-user:Support for MIPS64 user mode emulation in QEMU
From: khansa @ 2011-10-22 10:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, riku.voipio, Khansa Butt, aurelien
In-Reply-To: <1319278273-32437-1-git-send-email-khansa@kics.edu.pk>

From: Khansa Butt <khansa@kics.edu.pk>


Signed-off-by: Khansa Butt <khansa@kics.edu.pk>
---
 configure                             |    1 +
 default-configs/mips64-linux-user.mak |    1 +
 linux-user/main.c                     |   21 +++++++++++++++++++--
 linux-user/mips64/syscall.h           |    2 ++
 linux-user/signal.c                   |    2 --
 5 files changed, 23 insertions(+), 4 deletions(-)
 create mode 100644 default-configs/mips64-linux-user.mak

diff --git a/configure b/configure
index 9ab3ab4..5e45a43 100755
--- a/configure
+++ b/configure
@@ -891,6 +891,7 @@ m68k-linux-user \
 microblaze-linux-user \
 microblazeel-linux-user \
 mips-linux-user \
+mips64-linux-user \
 mipsel-linux-user \
 ppc-linux-user \
 ppc64-linux-user \
diff --git a/default-configs/mips64-linux-user.mak b/default-configs/mips64-linux-user.mak
new file mode 100644
index 0000000..1598bfc
--- /dev/null
+++ b/default-configs/mips64-linux-user.mak
@@ -0,0 +1 @@
+# Default configuration for mips64-linux-user
diff --git a/linux-user/main.c b/linux-user/main.c
index 89a51d7..1cc564d 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -2068,7 +2068,8 @@ static int do_store_exclusive(CPUMIPSState *env)
 void cpu_loop(CPUMIPSState *env)
 {
     target_siginfo_t info;
-    int trapnr, ret;
+    int trapnr;
+    abi_long ret;
     unsigned int syscall_num;
 
     for(;;) {
@@ -2077,8 +2078,23 @@ void cpu_loop(CPUMIPSState *env)
         cpu_exec_end(env);
         switch(trapnr) {
         case EXCP_SYSCALL:
-            syscall_num = env->active_tc.gpr[2] - 4000;
             env->active_tc.PC += 4;
+#if defined(TARGET_MIPS64)
+            syscall_num = env->active_tc.gpr[2] - 5000;
+            /* MIPS64 has eight argument registers so there is
+             * no need to get arguments from stack
+             */
+            ret = do_syscall(env, env->active_tc.gpr[2],
+                             env->active_tc.gpr[4],
+                             env->active_tc.gpr[5],
+                             env->active_tc.gpr[6],
+                             env->active_tc.gpr[7],
+                             env->active_tc.gpr[8],
+                             env->active_tc.gpr[9],
+                             env->active_tc.gpr[10],
+                             env->active_tc.gpr[11]);
+#else
+            syscall_num = env->active_tc.gpr[2] - 4000;
             if (syscall_num >= sizeof(mips_syscall_args)) {
                 ret = -TARGET_ENOSYS;
             } else {
@@ -2105,6 +2121,7 @@ void cpu_loop(CPUMIPSState *env)
                                  env->active_tc.gpr[7],
                                  arg5, arg6, arg7, arg8);
             }
+#endif
             if (ret == -TARGET_QEMU_ESIGRETURN) {
                 /* Returning from a successful sigreturn syscall.
                    Avoid clobbering register state.  */
diff --git a/linux-user/mips64/syscall.h b/linux-user/mips64/syscall.h
index 668a2b9..96f03da 100644
--- a/linux-user/mips64/syscall.h
+++ b/linux-user/mips64/syscall.h
@@ -218,4 +218,6 @@ struct target_pt_regs {
 
 
 
+#define TARGET_QEMU_ESIGRETURN 255
+
 #define UNAME_MACHINE "mips64"
diff --git a/linux-user/signal.c b/linux-user/signal.c
index 89276eb..59c3c88 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -2415,8 +2415,6 @@ void sparc64_get_context(CPUSPARCState *env)
 #endif
 #elif defined(TARGET_ABI_MIPSN64)
 
-# warning signal handling not implemented
-
 static void setup_frame(int sig, struct target_sigaction *ka,
 			target_sigset_t *set, CPUState *env)
 {
-- 
1.7.3.4

^ permalink raw reply related

* [PATCH 05/49] cris: irq: Remove IRQF_DISABLED
From: Yong Zhang @ 2011-10-22  9:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: tglx, Mikael Starvik, Jesper Nilsson, linux-cris-kernel
In-Reply-To: <1319277421-9203-1-git-send-email-yong.zhang0@gmail.com>

Since commit [e58aa3d2: 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: Jesper Nilsson <jesper.nilsson@axis.com>
---
 arch/cris/arch-v10/drivers/gpio.c         |    4 ++--
 arch/cris/arch-v10/drivers/sync_serial.c  |    4 ++--
 arch/cris/arch-v10/kernel/time.c          |    4 ++--
 arch/cris/arch-v32/drivers/mach-a3/gpio.c |    2 +-
 arch/cris/arch-v32/drivers/mach-fs/gpio.c |    4 ++--
 arch/cris/arch-v32/kernel/fasttimer.c     |    2 +-
 arch/cris/arch-v32/kernel/irq.c           |    4 ++--
 arch/cris/arch-v32/kernel/smp.c           |    1 -
 arch/cris/arch-v32/kernel/time.c          |    4 ++--
 arch/cris/arch-v32/mach-a3/arbiter.c      |    4 ++--
 arch/cris/arch-v32/mach-fs/arbiter.c      |    2 +-
 arch/cris/include/arch-v10/arch/irq.h     |    5 +++--
 arch/cris/include/arch-v32/arch/irq.h     |    5 +++--
 arch/cris/kernel/irq.c                    |    3 +--
 14 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/arch/cris/arch-v10/drivers/gpio.c b/arch/cris/arch-v10/drivers/gpio.c
index a276f08..c19bc55 100644
--- a/arch/cris/arch-v10/drivers/gpio.c
+++ b/arch/cris/arch-v10/drivers/gpio.c
@@ -839,13 +839,13 @@ static int __init gpio_init(void)
 	 * in some tests.
 	 */
 	res = request_irq(TIMER0_IRQ_NBR, gpio_poll_timer_interrupt,
-		IRQF_SHARED | IRQF_DISABLED, "gpio poll", gpio_name);
+		IRQF_SHARED, "gpio poll", gpio_name);
 	if (res) {
 		printk(KERN_CRIT "err: timer0 irq for gpio\n");
 		return res;
 	}
 	res = request_irq(PA_IRQ_NBR, gpio_interrupt,
-		IRQF_SHARED | IRQF_DISABLED, "gpio PA", gpio_name);
+		IRQF_SHARED, "gpio PA", gpio_name);
 	if (res)
 		printk(KERN_CRIT "err: PA irq for gpio\n");
 
diff --git a/arch/cris/arch-v10/drivers/sync_serial.c b/arch/cris/arch-v10/drivers/sync_serial.c
index 466af40..c25fe35 100644
--- a/arch/cris/arch-v10/drivers/sync_serial.c
+++ b/arch/cris/arch-v10/drivers/sync_serial.c
@@ -581,7 +581,7 @@ static int sync_serial_open(struct inode *inode, struct file *file)
 			if (port == &ports[0]) {
 				if (request_irq(8,
 						manual_interrupt,
-						IRQF_SHARED | IRQF_DISABLED,
+						IRQF_SHARED,
 						"synchronous serial manual irq",
 						&ports[0])) {
 					printk(KERN_CRIT "Can't alloc "
@@ -591,7 +591,7 @@ static int sync_serial_open(struct inode *inode, struct file *file)
 			} else if (port == &ports[1]) {
 				if (request_irq(8,
 						manual_interrupt,
-						IRQF_SHARED | IRQF_DISABLED,
+						IRQF_SHARED,
 						"synchronous serial manual irq",
 						&ports[1])) {
 					printk(KERN_CRIT "Can't alloc "
diff --git a/arch/cris/arch-v10/kernel/time.c b/arch/cris/arch-v10/kernel/time.c
index 20c85b5..7d40c18 100644
--- a/arch/cris/arch-v10/kernel/time.c
+++ b/arch/cris/arch-v10/kernel/time.c
@@ -183,12 +183,12 @@ timer_interrupt(int irq, void *dev_id)
 }
 
 /* timer is IRQF_SHARED so drivers can add stuff to the timer irq chain
- * it needs to be IRQF_DISABLED to make the jiffies update work properly
+ * it needs irqs to be disabled to make the jiffies update work properly
  */
 
 static struct irqaction irq2  = {
 	.handler = timer_interrupt,
-	.flags = IRQF_SHARED | IRQF_DISABLED,
+	.flags = IRQF_SHARED,
 	.name = "timer",
 };
 
diff --git a/arch/cris/arch-v32/drivers/mach-a3/gpio.c b/arch/cris/arch-v32/drivers/mach-a3/gpio.c
index c845831..50402d6 100644
--- a/arch/cris/arch-v32/drivers/mach-a3/gpio.c
+++ b/arch/cris/arch-v32/drivers/mach-a3/gpio.c
@@ -979,7 +979,7 @@ static int __init gpio_init(void)
 	CRIS_LED_DISK_WRITE(0);
 
 	int res2 = request_irq(GIO_INTR_VECT, gpio_interrupt,
-		IRQF_SHARED | IRQF_DISABLED, "gpio", &alarmlist);
+		IRQF_SHARED, "gpio", &alarmlist);
 	if (res2) {
 		printk(KERN_ERR "err: irq for gpio\n");
 		return res2;
diff --git a/arch/cris/arch-v32/drivers/mach-fs/gpio.c b/arch/cris/arch-v32/drivers/mach-fs/gpio.c
index ee90d26..77b7c49 100644
--- a/arch/cris/arch-v32/drivers/mach-fs/gpio.c
+++ b/arch/cris/arch-v32/drivers/mach-fs/gpio.c
@@ -965,11 +965,11 @@ gpio_init(void)
 	 * in some tests.
 	 */
 	if (request_irq(TIMER0_INTR_VECT, gpio_poll_timer_interrupt,
-			IRQF_SHARED | IRQF_DISABLED, "gpio poll", &alarmlist))
+			IRQF_SHARED, "gpio poll", &alarmlist))
 		printk(KERN_ERR "timer0 irq for gpio\n");
 
 	if (request_irq(GIO_INTR_VECT, gpio_pa_interrupt,
-			IRQF_SHARED | IRQF_DISABLED, "gpio PA", &alarmlist))
+			IRQF_SHARED, "gpio PA", &alarmlist))
 		printk(KERN_ERR "PA irq for gpio\n");
 
 #ifdef CONFIG_ETRAX_VIRTUAL_GPIO
diff --git a/arch/cris/arch-v32/kernel/fasttimer.c b/arch/cris/arch-v32/kernel/fasttimer.c
index 111caa1..a75114c 100644
--- a/arch/cris/arch-v32/kernel/fasttimer.c
+++ b/arch/cris/arch-v32/kernel/fasttimer.c
@@ -822,7 +822,7 @@ int fast_timer_init(void)
       fasttimer_proc_entry->read_proc = proc_fasttimer_read;
 #endif /* PROC_FS */
 		if (request_irq(TIMER0_INTR_VECT, timer_trig_interrupt,
-				IRQF_SHARED | IRQF_DISABLED,
+				IRQF_SHARED,
 				"fast timer int", &fast_timer_list))
 			printk(KERN_ERR "err: fasttimer irq\n");
     fast_timer_is_init = 1;
diff --git a/arch/cris/arch-v32/kernel/irq.c b/arch/cris/arch-v32/kernel/irq.c
index 5ebe6e8..3b718f2 100644
--- a/arch/cris/arch-v32/kernel/irq.c
+++ b/arch/cris/arch-v32/kernel/irq.c
@@ -331,8 +331,8 @@ extern void do_IRQ(int irq, struct pt_regs * regs);
 void
 crisv32_do_IRQ(int irq, int block, struct pt_regs* regs)
 {
-	/* Interrupts that may not be moved to another CPU and
-         * are IRQF_DISABLED may skip blocking. This is currently
+	/* Interrupts that may not be moved to another CPU may
+	 * skip blocking. This is currently
          * only valid for the timer IRQ and the IPI and is used
          * for the timer interrupt to avoid watchdog starvation.
          */
diff --git a/arch/cris/arch-v32/kernel/smp.c b/arch/cris/arch-v32/kernel/smp.c
index 0b99df7..553de03 100644
--- a/arch/cris/arch-v32/kernel/smp.c
+++ b/arch/cris/arch-v32/kernel/smp.c
@@ -64,7 +64,6 @@ static irqreturn_t crisv32_ipi_interrupt(int irq, void *dev_id);
 static int send_ipi(int vector, int wait, cpumask_t cpu_mask);
 static struct irqaction irq_ipi  = {
 	.handler = crisv32_ipi_interrupt,
-	.flags = IRQF_DISABLED,
 	.name = "ipi",
 };
 
diff --git a/arch/cris/arch-v32/kernel/time.c b/arch/cris/arch-v32/kernel/time.c
index bb978ed..d1f02ff 100644
--- a/arch/cris/arch-v32/kernel/time.c
+++ b/arch/cris/arch-v32/kernel/time.c
@@ -221,11 +221,11 @@ static inline irqreturn_t timer_interrupt(int irq, void *dev_id)
 }
 
 /* Timer is IRQF_SHARED so drivers can add stuff to the timer irq chain.
- * It needs to be IRQF_DISABLED to make the jiffies update work properly.
+ * It needs irqs to be disabled to make the jiffies update work properly.
  */
 static struct irqaction irq_timer = {
 	.handler = timer_interrupt,
-	.flags = IRQF_SHARED | IRQF_DISABLED,
+	.flags = IRQF_SHARED,
 	.name = "timer"
 };
 
diff --git a/arch/cris/arch-v32/mach-a3/arbiter.c b/arch/cris/arch-v32/mach-a3/arbiter.c
index 15f5c9d..ab5c421 100644
--- a/arch/cris/arch-v32/mach-a3/arbiter.c
+++ b/arch/cris/arch-v32/mach-a3/arbiter.c
@@ -256,11 +256,11 @@ static void crisv32_arbiter_init(void)
 	crisv32_arbiter_config(1, EXT_REGION, 0);
 
 	if (request_irq(MEMARB_FOO_INTR_VECT, crisv32_foo_arbiter_irq,
-			IRQF_DISABLED, "arbiter", NULL))
+			0, "arbiter", NULL))
 		printk(KERN_ERR "Couldn't allocate arbiter IRQ\n");
 
 	if (request_irq(MEMARB_BAR_INTR_VECT, crisv32_bar_arbiter_irq,
-			IRQF_DISABLED, "arbiter", NULL))
+			0, "arbiter", NULL))
 		printk(KERN_ERR "Couldn't allocate arbiter IRQ\n");
 
 #ifndef CONFIG_ETRAX_KGDB
diff --git a/arch/cris/arch-v32/mach-fs/arbiter.c b/arch/cris/arch-v32/mach-fs/arbiter.c
index 3f8ebb5..c97f4d8 100644
--- a/arch/cris/arch-v32/mach-fs/arbiter.c
+++ b/arch/cris/arch-v32/mach-fs/arbiter.c
@@ -184,7 +184,7 @@ static void crisv32_arbiter_init(void)
 	crisv32_arbiter_config(EXT_REGION, 0);
 	crisv32_arbiter_config(INT_REGION, 0);
 
-	if (request_irq(MEMARB_INTR_VECT, crisv32_arbiter_irq, IRQF_DISABLED,
+	if (request_irq(MEMARB_INTR_VECT, crisv32_arbiter_irq, 0,
 			"arbiter", NULL))
 		printk(KERN_ERR "Couldn't allocate arbiter IRQ\n");
 
diff --git a/arch/cris/include/arch-v10/arch/irq.h b/arch/cris/include/arch-v10/arch/irq.h
index 7d34594..4f20ed7 100644
--- a/arch/cris/include/arch-v10/arch/irq.h
+++ b/arch/cris/include/arch-v10/arch/irq.h
@@ -142,8 +142,9 @@ __asm__ ( \
  * it here, we would not get the multiple_irq at all.
  *
  * The non-blocking here is based on the knowledge that the timer interrupt is 
- * registred as a fast interrupt (IRQF_DISABLED) so that we _know_ there will not
- * be an sti() before the timer irq handler is run to acknowledge the interrupt.
+ * registred as a fast interrupt (called with irqs disabled) so that we _know_
+ * there will not be an sti() before the timer irq handler is run to acknowledge
+ * the interrupt.
  */
 
 #define BUILD_TIMER_IRQ(nr,mask) \
diff --git a/arch/cris/include/arch-v32/arch/irq.h b/arch/cris/include/arch-v32/arch/irq.h
index b31e998..8076d81 100644
--- a/arch/cris/include/arch-v32/arch/irq.h
+++ b/arch/cris/include/arch-v32/arch/irq.h
@@ -103,8 +103,9 @@ __asm__ (				\
  * if we had BLOCK'edit here, we would not get the multiple_irq at all.
  *
  * The non-blocking here is based on the knowledge that the timer interrupt is
- * registred as a fast interrupt (IRQF_DISABLED) so that we _know_ there will not
- * be an sti() before the timer irq handler is run to acknowledge the interrupt.
+ * registred as a fast interrupt (called with irqs disabled) so that we _know_
+ * there will not be an sti() before the timer irq handler is run to acknowledge
+ * the interrupt.
  */
 #define BUILD_TIMER_IRQ(nr, mask) 	\
 void IRQ_NAME(nr);			\
diff --git a/arch/cris/kernel/irq.c b/arch/cris/kernel/irq.c
index 788eb22..9fa8e45 100644
--- a/arch/cris/kernel/irq.c
+++ b/arch/cris/kernel/irq.c
@@ -40,8 +40,7 @@
 /* called by the assembler IRQ entry functions defined in irq.h
  * to dispatch the interrupts to registered handlers
  * interrupts are disabled upon entry - depending on if the
- * interrupt was registered with IRQF_DISABLED or not, interrupts
- * are re-enabled or not.
+ * interrupts are re-enabled or not.
  */
 
 asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
-- 
1.7.1


^ permalink raw reply related

* [Qemu-devel] [PATCH v3 2/6] target-mips:enabling of 64 bit user mode and floating point operations
From: khansa @ 2011-10-22 10:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, riku.voipio, Khansa Butt, aurelien
In-Reply-To: <1319278273-32437-1-git-send-email-khansa@kics.edu.pk>

From: Khansa Butt <khansa@kics.edu.pk>


Signed-off-by: Khansa Butt <khansa@kics.edu.pk>
---
 target-mips/translate.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/target-mips/translate.c b/target-mips/translate.c
index d5b1c76..0550333 100644
--- a/target-mips/translate.c
+++ b/target-mips/translate.c
@@ -12779,6 +12779,8 @@ void cpu_reset (CPUMIPSState *env)
         env->hflags |= MIPS_HFLAG_FPU;
     }
 #ifdef TARGET_MIPS64
+    env->hflags |=  MIPS_HFLAG_UX;
+    env->active_fpu.fcr0 = env->cpu_model->CP1_fcr0;
     if (env->active_fpu.fcr0 & (1 << FCR0_F64)) {
         env->hflags |= MIPS_HFLAG_F64;
     }
-- 
1.7.3.4

^ permalink raw reply related

* [Qemu-devel] [PATCH v3 4/6] target-mips:Octeon cpu definition
From: khansa @ 2011-10-22 10:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, riku.voipio, Khansa Butt, aurelien
In-Reply-To: <1319278273-32437-1-git-send-email-khansa@kics.edu.pk>

From: Khansa Butt <khansa@kics.edu.pk>


Signed-off-by: Khansa Butt <khansa@kics.edu.pk>
---
 target-mips/mips-defs.h      |    2 ++
 target-mips/translate_init.c |   24 ++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/target-mips/mips-defs.h b/target-mips/mips-defs.h
index bf094a3..e1ec2b2 100644
--- a/target-mips/mips-defs.h
+++ b/target-mips/mips-defs.h
@@ -41,6 +41,7 @@
 #define 	ASE_MICROMIPS	0x00080000
 
 /* Chip specific instructions. */
+#define         INSN_OCTEON  0x10000000
 #define		INSN_LOONGSON2E  0x20000000
 #define		INSN_LOONGSON2F  0x40000000
 #define		INSN_VR54XX	0x80000000
@@ -53,6 +54,7 @@
 #define		CPU_VR54XX	(CPU_MIPS4 | INSN_VR54XX)
 #define		CPU_LOONGSON2E  (CPU_MIPS3 | INSN_LOONGSON2E)
 #define		CPU_LOONGSON2F  (CPU_MIPS3 | INSN_LOONGSON2F)
+#define         CPU_OCTEON      (CPU_MIPS64R2 | INSN_OCTEON)
 
 #define		CPU_MIPS5	(CPU_MIPS4 | ISA_MIPS5)
 
diff --git a/target-mips/translate_init.c b/target-mips/translate_init.c
index c39138f..09d2605 100644
--- a/target-mips/translate_init.c
+++ b/target-mips/translate_init.c
@@ -451,6 +451,30 @@ static const mips_def_t mips_defs[] =
         .mmu_type = MMU_TYPE_R4000,
     },
     {
+        .name = "octeon",
+        .CP0_PRid = 0x0d30,
+        .CP0_Config0 = MIPS_CONFIG0 | (0x1 << CP0C0_AR) | (0x2 << CP0C0_AT) |
+                       (MMU_TYPE_R4000 << CP0C0_MT),
+        .CP0_Config1 = MIPS_CONFIG1 | (63 << CP0C1_MMU) |
+                       (2 << CP0C1_IS) | (4 << CP0C1_IL) | (3 << CP0C1_IA) |
+                       (2 << CP0C1_DS) | (4 << CP0C1_DL) | (3 << CP0C1_DA) |
+                       (1 << CP0C1_PC) | (1 << CP0C1_WR) | (1 << CP0C1_EP),
+        .CP0_Config2 = MIPS_CONFIG2,
+        .CP0_Config3 = MIPS_CONFIG3 | (1 << CP0C3_LPA),
+        .CP0_LLAddr_rw_bitmask = 0,
+        .CP0_LLAddr_shift = 0,
+        .SYNCI_Step = 32,
+        .CCRes = 2,
+        .CP0_Status_rw_bitmask = 0x36FBFFFF,
+        .CP1_fcr0 = (1 << FCR0_F64) | (1 << FCR0_3D) | (1 << FCR0_PS) |
+                    (1 << FCR0_L) | (1 << FCR0_W) | (1 << FCR0_D) |
+                    (1 << FCR0_S) | (0x00 << FCR0_PRID) | (0x0 << FCR0_REV),
+        .SEGBITS = 49,
+        .PABITS = 49,
+        .insn_flags = CPU_OCTEON | ASE_MIPS3D,
+        .mmu_type = MMU_TYPE_R4000,
+    },
+    {
         .name = "Loongson-2E",
         .CP0_PRid = 0x6302,
         /*64KB I-cache and d-cache. 4 way with 32 bit cache line size*/
-- 
1.7.3.4

^ permalink raw reply related

* [Qemu-devel] [PATCH v3 3/6] linux-user:Signal handling for MIPS64
From: khansa @ 2011-10-22 10:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, riku.voipio, Khansa Butt, aurelien
In-Reply-To: <1319278273-32437-1-git-send-email-khansa@kics.edu.pk>

From: Khansa Butt <khansa@kics.edu.pk>


Signed-off-by: Khansa Butt <khansa@kics.edu.pk>
---
 linux-user/signal.c |  438 +++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 426 insertions(+), 12 deletions(-)

diff --git a/linux-user/signal.c b/linux-user/signal.c
index 59c3c88..f5f8bba 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -30,6 +30,8 @@
 #include "qemu-common.h"
 #include "target_signal.h"
 
+int sigrt;
+
 //#define DEBUG_SIGNAL
 
 static struct target_sigaltstack target_sigaltstack_used = {
@@ -596,7 +598,11 @@ int do_sigaction(int sig, const struct target_sigaction *act,
     if (act) {
         /* FIXME: This is not threadsafe.  */
         k->_sa_handler = tswapl(act->_sa_handler);
+#if defined(TARGET_MIPS64)
+        k->sa_flags = bswap32(act->sa_flags);
+#else
         k->sa_flags = tswapl(act->sa_flags);
+#endif
 #if !defined(TARGET_MIPS)
         k->sa_restorer = tswapl(act->sa_restorer);
 #endif
@@ -2415,29 +2421,435 @@ void sparc64_get_context(CPUSPARCState *env)
 #endif
 #elif defined(TARGET_ABI_MIPSN64)
 
+struct target_sigcontext {
+    uint32_t   sc_regmask;     /* Unused */
+    uint32_t   sc_status;
+    uint64_t   sc_pc;
+    uint64_t   sc_regs[32];
+    uint64_t   sc_fpregs[32];
+    uint32_t   sc_ownedfp;     /* Unused */
+    uint32_t   sc_fpc_csr;
+    uint32_t   sc_fpc_eir;     /* Unused */
+    uint32_t   sc_used_math;
+    uint32_t   sc_dsp;         /* dsp status, was sc_ssflags */
+    uint32_t   pad0;
+    uint64_t   sc_mdhi;
+    uint64_t   sc_mdlo;
+    target_ulong   sc_hi1;         /* Was sc_cause */
+    target_ulong   sc_lo1;         /* Was sc_badvaddr */
+    target_ulong   sc_hi2;         /* Was sc_sigset[4] */
+    target_ulong   sc_lo2;
+    target_ulong   sc_hi3;
+    target_ulong   sc_lo3;
+};
+
+struct sigframe {
+    uint32_t sf_ass[4];         /* argument save space for o32 */
+    uint32_t sf_code[2];            /* signal trampoline */
+    struct target_sigcontext sf_sc;
+    target_sigset_t sf_mask;
+};
+
+struct target_ucontext {
+    target_ulong tuc_flags;
+    target_ulong tuc_link;
+    target_stack_t tuc_stack;
+    target_ulong pad0;
+    struct target_sigcontext tuc_mcontext;
+    target_sigset_t tuc_sigmask;
+};
+
+struct target_rt_sigframe {
+    uint32_t rs_ass[4];               /* argument save space for o32 */
+    uint32_t rs_code[2];              /* signal trampoline */
+    struct target_siginfo rs_info;
+    struct target_ucontext rs_uc;
+};
+
+/* Install trampoline to jump back from signal handler */
+static inline int install_sigtramp(unsigned int *tramp,   unsigned int syscall)
+{
+    int err;
+
+    /*
+     * Set up the return code ...
+     *
+     *         li      v0, __NR__foo_sigreturn
+     *         syscall
+     */
+
+    err = __put_user(0x24020000 + syscall, tramp + 0);
+    err |= __put_user(0x0000000c          , tramp + 1);
+    /* flush_cache_sigtramp((unsigned long) tramp); */
+    return err;
+}
+
+static inline int
+setup_sigcontext(CPUState *regs, struct target_sigcontext *sc)
+{
+    int err = 0;
+
+    err |= __put_user(regs->active_tc.PC, &sc->sc_pc);
+
+#define save_gp_reg(i) do {                         \
+        err |= __put_user(regs->active_tc.gpr[i], &sc->sc_regs[i]); \
+} while (0)
+    __put_user(0, &sc->sc_regs[0]); save_gp_reg(1); save_gp_reg(2);
+    save_gp_reg(3); save_gp_reg(4); save_gp_reg(5); save_gp_reg(6);
+    save_gp_reg(7); save_gp_reg(8); save_gp_reg(9); save_gp_reg(10);
+    save_gp_reg(11); save_gp_reg(12); save_gp_reg(13); save_gp_reg(14);
+    save_gp_reg(15); save_gp_reg(16); save_gp_reg(17); save_gp_reg(18);
+    save_gp_reg(19); save_gp_reg(20); save_gp_reg(21); save_gp_reg(22);
+    save_gp_reg(23); save_gp_reg(24); save_gp_reg(25); save_gp_reg(26);
+    save_gp_reg(27); save_gp_reg(28); save_gp_reg(29); save_gp_reg(30);
+    save_gp_reg(31);
+#undef save_gp_reg
+
+    err |= __put_user(regs->active_tc.HI[0], &sc->sc_mdhi);
+    err |= __put_user(regs->active_tc.LO[0], &sc->sc_mdlo);
+
+    /* Not used yet, but might be useful if we ever have DSP suppport */
+#if 0
+    if (cpu_has_dsp) {
+        err |= __put_user(mfhi1(), &sc->sc_hi1);
+        err |= __put_user(mflo1(), &sc->sc_lo1);
+        err |= __put_user(mfhi2(), &sc->sc_hi2);
+        err |= __put_user(mflo2(), &sc->sc_lo2);
+        err |= __put_user(mfhi3(), &sc->sc_hi3);
+        err |= __put_user(mflo3(), &sc->sc_lo3);
+        err |= __put_user(rddsp(DSP_MASK), &sc->sc_dsp);
+    }
+    /* same with 64 bit */
+#ifdef CONFIG_64BIT
+    err |= __put_user(regs->hi, &sc->sc_hi[0]);
+    err |= __put_user(regs->lo, &sc->sc_lo[0]);
+    if (cpu_has_dsp) {
+        err |= __put_user(mfhi1(), &sc->sc_hi[1]);
+        err |= __put_user(mflo1(), &sc->sc_lo[1]);
+        err |= __put_user(mfhi2(), &sc->sc_hi[2]);
+        err |= __put_user(mflo2(), &sc->sc_lo[2]);
+        err |= __put_user(mfhi3(), &sc->sc_hi[3]);
+        err |= __put_user(mflo3(), &sc->sc_lo[3]);
+        err |= __put_user(rddsp(DSP_MASK), &sc->sc_dsp);
+    }
+#endif
+#endif
+
+#if 0
+    err |= __put_user(!!used_math(), &sc->sc_used_math);
+
+    if (!used_math())
+        goto out;
+
+    /*
+     * Save FPU state to signal context.  Signal handler will "inherit"
+     * current FPU state.
+     */
+    preempt_disable();
+
+    if (!is_fpu_owner()) {
+        own_fpu();
+        restore_fp(current);
+    }
+    err |= save_fp_context(sc);
+
+    preempt_enable();
+    out:
+#endif
+    return err;
+}
+
+static inline int
+restore_sigcontext(CPUState *regs, struct target_sigcontext *sc)
+{
+    int err = 0;
+
+    err |= __get_user(regs->CP0_EPC, &sc->sc_pc);
+
+    err |= __get_user(regs->active_tc.HI[0], &sc->sc_mdhi);
+    err |= __get_user(regs->active_tc.LO[0], &sc->sc_mdlo);
+
+#define restore_gp_reg(i) do {                               \
+        err |= __get_user(regs->active_tc.gpr[i], &sc->sc_regs[i]);     \
+} while (0)
+    restore_gp_reg(1); restore_gp_reg(2); restore_gp_reg(3);
+    restore_gp_reg(4); restore_gp_reg(5); restore_gp_reg(6);
+    restore_gp_reg(7); restore_gp_reg(8); restore_gp_reg(9);
+    restore_gp_reg(10); restore_gp_reg(11); restore_gp_reg(12);
+    restore_gp_reg(13); restore_gp_reg(14); restore_gp_reg(15);
+    restore_gp_reg(16); restore_gp_reg(17); restore_gp_reg(18);
+    restore_gp_reg(19); restore_gp_reg(20); restore_gp_reg(21);
+    restore_gp_reg(22); restore_gp_reg(23); restore_gp_reg(24);
+    restore_gp_reg(25); restore_gp_reg(26); restore_gp_reg(27);
+    restore_gp_reg(28); restore_gp_reg(29); restore_gp_reg(30);
+    restore_gp_reg(31);
+#undef restore_gp_reg
+
+#if 0
+    if (cpu_has_dsp) {
+        err |= __get_user(treg, &sc->sc_hi1); mthi1(treg);
+        err |= __get_user(treg, &sc->sc_lo1); mtlo1(treg);
+        err |= __get_user(treg, &sc->sc_hi2); mthi2(treg);
+        err |= __get_user(treg, &sc->sc_lo2); mtlo2(treg);
+        err |= __get_user(treg, &sc->sc_hi3); mthi3(treg);
+        err |= __get_user(treg, &sc->sc_lo3); mtlo3(treg);
+        err |= __get_user(treg, &sc->sc_dsp); wrdsp(treg, DSP_MASK);
+    }
+#ifdef CONFIG_64BIT
+    err |= __get_user(regs->hi, &sc->sc_hi[0]);
+    err |= __get_user(regs->lo, &sc->sc_lo[0]);
+    if (cpu_has_dsp) {
+        err |= __get_user(treg, &sc->sc_hi[1]); mthi1(treg);
+        err |= __get_user(treg, &sc->sc_lo[1]); mthi1(treg);
+        err |= __get_user(treg, &sc->sc_hi[2]); mthi2(treg);
+        err |= __get_user(treg, &sc->sc_lo[2]); mthi2(treg);
+        err |= __get_user(treg, &sc->sc_hi[3]); mthi3(treg);
+        err |= __get_user(treg, &sc->sc_lo[3]); mthi3(treg);
+        err |= __get_user(treg, &sc->sc_dsp); wrdsp(treg, DSP_MASK);
+    }
+#endif
+
+    err |= __get_user(used_math, &sc->sc_used_math);
+    conditional_used_math(used_math);
+
+    preempt_disable();
+
+    if (used_math()) {
+        /* restore fpu context if we have used it before */
+        own_fpu();
+        err |= restore_fp_context(sc);
+    } else {
+        /* signal handler may have used FPU.  Give it up. */
+        lose_fpu();
+    }
+
+    preempt_enable();
+#endif
+    return err;
+}
+/*
+ * Determine which stack to use..
+ */
+static inline abi_ulong
+get_sigframe(struct target_sigaction *ka, CPUState *regs, size_t frame_size)
+{
+    unsigned long sp;
+
+    /* Default to using normal stack */
+    sp = regs->active_tc.gpr[29];
+
+    /*
+     * FPU emulator may have it's own trampoline active just
+     * above the user stack, 16-bytes before the next lowest
+     * 16 byte boundary.  Try to avoid trashing it.
+     */
+    sp -= 32;
+
+    /* This is the X/Open sanctioned signal stack switching.  */
+    if ((ka->sa_flags & TARGET_SA_ONSTACK) && (sas_ss_flags(sp) == 0)) {
+        sp = target_sigaltstack_used.ss_sp + target_sigaltstack_used.ss_size;
+    }
+
+    return (sp - frame_size) & ~7;
+}
+
+/* compare linux/arch/mips/kernel/signal.c:setup_frame() */
 static void setup_frame(int sig, struct target_sigaction *ka,
-			target_sigset_t *set, CPUState *env)
+        target_sigset_t *set, CPUState *regs)
 {
-    fprintf(stderr, "setup_frame: not implemented\n");
+    struct sigframe *frame;
+    abi_ulong frame_addr;
+    int i;
+
+    frame_addr = get_sigframe(ka, regs, sizeof(*frame));
+    if (!lock_user_struct(VERIFY_WRITE, frame, frame_addr, 0))
+        goto give_sigsegv;
+
+    install_sigtramp(frame->sf_code, TARGET_NR_rt_sigreturn);
+
+    if (setup_sigcontext(regs, &frame->sf_sc))
+        goto give_sigsegv;
+
+    for (i = 0; i < TARGET_NSIG_WORDS; i++) {
+        if (__put_user(set->sig[i], &frame->sf_mask.sig[i]))
+            goto give_sigsegv;
+    }
+
+    /*
+     * Arguments to signal handler:
+     *
+     *   a0 = signal number
+     *   a1 = 0 (should be cause)
+     *   a2 = pointer to struct sigcontext
+     *
+     * $25 and PC point to the signal handler, $29 points to the
+     * struct sigframe.
+     */
+    regs->active_tc.gpr[4] = sig;
+    regs->active_tc.gpr[5] = 0;
+    regs->active_tc.gpr[6] = frame_addr + offsetof(struct sigframe, sf_sc);
+    regs->active_tc.gpr[29] = frame_addr;
+    regs->active_tc.gpr[31] = frame_addr + offsetof(struct sigframe, sf_code);
+    /* The original kernel code sets CP0_EPC to the handler
+     * since it returns to userland using eret
+     * we cannot do this here, and we must set PC directly */
+    regs->active_tc.PC = regs->active_tc.gpr[25] = ka->_sa_handler;
+    unlock_user_struct(frame, frame_addr, 1);
+    return;
+
+    give_sigsegv:
+    unlock_user_struct(frame, frame_addr, 1);
+    force_sig(TARGET_SIGSEGV/*, current*/);
+    return;
 }
 
-static void setup_rt_frame(int sig, struct target_sigaction *ka,
-                           target_siginfo_t *info,
-			   target_sigset_t *set, CPUState *env)
+long do_sigreturn(CPUState *regs)
 {
-    fprintf(stderr, "setup_rt_frame: not implemented\n");
+    struct sigframe *frame;
+    abi_ulong frame_addr;
+    sigset_t blocked;
+    target_sigset_t target_set;
+    int i;
+
+#if defined(DEBUG_SIGNAL)
+    fprintf(stderr, "do_sigreturn\n");
+#endif
+    frame_addr = regs->active_tc.gpr[29];
+    if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1))
+        goto badframe;
+
+    for (i = 0; i < TARGET_NSIG_WORDS; i++) {
+        if (__get_user(target_set.sig[i], &frame->sf_mask.sig[i]))
+            goto badframe;
+    }
+
+    target_to_host_sigset_internal(&blocked, &target_set);
+    sigprocmask(SIG_SETMASK, &blocked, NULL);
+
+    if (restore_sigcontext(regs, &frame->sf_sc))
+        goto badframe;
+
+#if 0
+    /*
+     * Don't let your children do this ...
+     */
+    __asm__ __volatile__(
+            "move\t$29, %0\n\t"
+            "j\tsyscall_exit"
+            :/* no outputs */
+            : "r" (&regs));
+    /* Unreached */
+#endif
+
+    regs->active_tc.PC = regs->CP0_EPC;
+    /* I am not sure this is right, but it seems to work
+     * maybe a problem with nested signals ? */
+    regs->CP0_EPC = 0;
+    return -TARGET_QEMU_ESIGRETURN;
+
+    badframe:
+    force_sig(TARGET_SIGSEGV/*, current*/);
+    return 0;
 }
 
-long do_sigreturn(CPUState *env)
+static void setup_rt_frame(int sig, struct target_sigaction *ka,
+        target_siginfo_t *info,
+        target_sigset_t *set, CPUState *env)
 {
-    fprintf(stderr, "do_sigreturn: not implemented\n");
-    return -TARGET_ENOSYS;
+    struct target_rt_sigframe *frame;
+    abi_ulong frame_addr;
+    int i;
+
+    frame_addr = get_sigframe(ka, env, sizeof(*frame));
+    if (!lock_user_struct(VERIFY_WRITE, frame, frame_addr, 0))
+        goto give_sigsegv;
+
+    install_sigtramp(frame->rs_code, TARGET_NR_rt_sigreturn);
+
+    copy_siginfo_to_user(&frame->rs_info, info);
+
+    __put_user(0, &frame->rs_uc.tuc_flags);
+    __put_user(0, &frame->rs_uc.tuc_link);
+    __put_user(target_sigaltstack_used.ss_sp, &frame->rs_uc.tuc_stack.ss_sp);
+    __put_user(target_sigaltstack_used.ss_size, &frame->rs_uc.tuc_stack.ss_size);
+    __put_user(sas_ss_flags(get_sp_from_cpustate(env)),
+            &frame->rs_uc.tuc_stack.ss_flags);
+
+    setup_sigcontext(env, &frame->rs_uc.tuc_mcontext);
+
+    for (i = 0; i < TARGET_NSIG_WORDS; i++) {
+        __put_user(set->sig[i], &frame->rs_uc.tuc_sigmask.sig[i]);
+    }
+
+    /*
+     * Arguments to signal handler:
+     *
+     *   a0 = signal number
+     *   a1 = pointer to struct siginfo
+     *   a2 = pointer to struct ucontext
+     *
+     * $25 and PC point to the signal handler, $29 points to the
+     * struct sigframe.
+     */
+    env->active_tc.gpr[4] = sig;
+    env->active_tc.gpr[5] = frame_addr
+            + offsetof(struct target_rt_sigframe, rs_info);
+    env->active_tc.gpr[6] = frame_addr
+            + offsetof(struct target_rt_sigframe, rs_uc);
+    env->active_tc.gpr[29] = frame_addr;
+    env->active_tc.gpr[31] = frame_addr
+            + offsetof(struct target_rt_sigframe, rs_code);
+    /* The original kernel code sets CP0_EPC to the handler
+     * since it returns to userland using eret
+     * we cannot do this here, and we must set PC directly */
+    env->active_tc.PC = env->active_tc.gpr[25] = ka->_sa_handler;
+    unlock_user_struct(frame, frame_addr, 1);
+    return;
+
+    give_sigsegv:
+    unlock_user_struct(frame, frame_addr, 1);
+    force_sig(TARGET_SIGSEGV/*, current*/);
+    return;
 }
 
 long do_rt_sigreturn(CPUState *env)
 {
-    fprintf(stderr, "do_rt_sigreturn: not implemented\n");
-    return -TARGET_ENOSYS;
+    /* This has been done to successfully run signal syscall */
+    if (sigrt == 1)
+        return do_sigreturn(env);
+    else {
+        struct target_rt_sigframe *frame;
+        abi_ulong frame_addr;
+        sigset_t blocked;
+
+#if defined(DEBUG_SIGNAL)
+        fprintf(stderr, "do_rt_sigreturn\n");
+#endif
+        frame_addr = env->active_tc.gpr[29];
+        if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1))
+            goto badframe;
+
+        target_to_host_sigset(&blocked, &frame->rs_uc.tuc_sigmask);
+        sigprocmask(SIG_SETMASK, &blocked, NULL);
+
+        if (restore_sigcontext(env, &frame->rs_uc.tuc_mcontext))
+            goto badframe;
+
+        if (do_sigaltstack(frame_addr +
+                offsetof(struct target_rt_sigframe, rs_uc.tuc_stack),
+                0, get_sp_from_cpustate(env)) == -EFAULT)
+            goto badframe;
+
+        env->active_tc.PC = env->CP0_EPC;
+        /* I am not sure this is right, but it seems to work
+         * maybe a problem with nested signals ? */
+        env->CP0_EPC = 0;
+        return -TARGET_QEMU_ESIGRETURN;
+
+        badframe:
+        force_sig(TARGET_SIGSEGV/*, current*/);
+        return 0;
+    }
 }
 
 #elif defined(TARGET_ABI_MIPSN32)
@@ -5305,8 +5717,10 @@ void process_pending_signals(CPUState *cpu_env)
         /* prepare the stack frame of the virtual CPU */
         if (sa->sa_flags & TARGET_SA_SIGINFO)
             setup_rt_frame(sig, sa, &q->info, &target_old_set, cpu_env);
-        else
+        else {
+            sigrt = 1;
             setup_frame(sig, sa, &target_old_set, cpu_env);
+        }
 	if (sa->sa_flags & TARGET_SA_RESETHAND)
             sa->_sa_handler = TARGET_SIG_DFL;
     }
-- 
1.7.3.4

^ permalink raw reply related

* Re: [PATCH 06/11] ttm/driver: Expand ttm_backend_func to include two overrides for TTM page pool.
From: Thomas Hellstrom @ 2011-10-22  9:40 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk
  Cc: linux-kernel, dri-devel, thellstrom, airlied, xen-devel, j.glisse,
	bskeggs
In-Reply-To: <1319062772-2793-7-git-send-email-konrad.wilk@oracle.com>

Konrad,

I was hoping that we could get rid of the dma_address shuffling into 
core TTM,
like I mentioned in the review. From what I can tell it's now only used 
in the backend and
core ttm doesn't care about it.

Is there a particular reason we're still passing it around?

Thanks,
/Thomas




On 10/20/2011 12:19 AM, Konrad Rzeszutek Wilk wrote:
> The two overrides will be choosen by the backends whether they
> want to use a different TTM page pool than the default.
>
> If the backend does not choose a new override, the default one
> will be used.
>
> Signed-off-by: Konrad Rzeszutek Wilk<konrad.wilk@oracle.com>
> ---
>   drivers/gpu/drm/ttm/ttm_page_alloc.c |   10 +++++++---
>   include/drm/ttm/ttm_bo_driver.h      |   31 +++++++++++++++++++++++++++++++
>   2 files changed, 38 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c
> index 24c0340..360afb3 100644
> --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c
> +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c
> @@ -861,13 +861,17 @@ EXPORT_SYMBOL(ttm_page_alloc_debugfs);
>   int ttm_get_pages(struct ttm_tt *ttm, struct list_head *pages,
>   		  unsigned count, dma_addr_t *dma_address)
>   {
> +	if (ttm->be&&  ttm->be->func&&  ttm->be->func->get_pages)
> +		return ttm->be->func->get_pages(ttm, pages, count, dma_address);
>   	return __ttm_get_pages(pages, ttm->page_flags, ttm->caching_state,
>   				count, dma_address);
>   }
> -{
>   void ttm_put_pages(struct ttm_tt *ttm, struct list_head *pages,
>   		   unsigned page_count, dma_addr_t *dma_address)
>   {
> -	__ttm_put_pages(pages, page_count, ttm->page_flags, ttm->caching_state,
> -			dma_address);
> +	if (ttm->be&&  ttm->be->func&&  ttm->be->func->put_pages)
> +		ttm->be->func->put_pages(ttm, pages, page_count, dma_address);
> +	else
> +		__ttm_put_pages(pages, page_count, ttm->page_flags,
> +				ttm->caching_state, dma_address);
>   }
> diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
> index 09af2d7..1826c3b 100644
> --- a/include/drm/ttm/ttm_bo_driver.h
> +++ b/include/drm/ttm/ttm_bo_driver.h
> @@ -100,6 +100,34 @@ struct ttm_backend_func {
>   	 * Destroy the backend.
>   	 */
>   	void (*destroy) (struct ttm_backend *backend);
> +
> +	/**
> +	 * ttm_get_pages override. The backend can override the default
> +	 * TTM page pool code with a different one.
> +	 *
> +	 * Get count number of pages from pool to pages list.
> +	 *
> +	 * @ttm: ttm which contains flags for page allocation and caching state.
> +	 * @pages: head of empty linked list where pages are filled.
> +	 * @dma_address: The DMA (bus) address of pages
> +	 */
> +	int (*get_pages) (struct ttm_tt *ttm, struct list_head *pages,
> +			  unsigned count, dma_addr_t *dma_address);
> +
> +	/**
> +	 * ttm_put_pages override. The backend can override the default
> +	 * TTM page pool code with a different implementation.
> +	 *
> +	 * Put linked list of pages to pool.
> +	 *
> +	 * @ttm: ttm which contains flags for page allocation and caching state.
> +	 * @pages: list of pages to free.
> +	 * @page_count: number of pages in the list. Zero can be passed for
> +	 * unknown count.
> +	 * @dma_address: The DMA (bus) address of pages
> +	 */
> +	void (*put_pages) (struct ttm_tt *ttm, struct list_head *pages,
> +			   unsigned page_count, dma_addr_t *dma_address);
>   };
>
>   /**
> @@ -109,6 +137,8 @@ struct ttm_backend_func {
>    * @flags: For driver use.
>    * @func: Pointer to a struct ttm_backend_func that describes
>    * the backend methods.
> + * @dev: Pointer to a struct device which can be used by the TTM
> + *  [get|put)_pages overrides in 'struct ttm_backend_func'.
>    *
>    */
>
> @@ -116,6 +146,7 @@ struct ttm_backend {
>   	struct ttm_bo_device *bdev;
>   	uint32_t flags;
>   	struct ttm_backend_func *func;
> +	struct device *dev;
>   };
>
>   #define TTM_PAGE_FLAG_USER            (1<<  1)
>    




^ permalink raw reply

* [Qemu-devel] [PATCH v3 5/6] target-mips: Adding support for Cavium specific instructions
From: khansa @ 2011-10-22 10:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, riku.voipio, Khansa Butt, aurelien
In-Reply-To: <1319278273-32437-1-git-send-email-khansa@kics.edu.pk>

From: Khansa Butt <khansa@kics.edu.pk>


Signed-off-by: Khansa Butt <khansa@kics.edu.pk>
Signed-off-by: Ehsan Ul Haq <ehsan.ulhaq@kics.edu.pk>
Signed-off-by: Abdul Qadeer <qadeer@kics.edu.pk>
Signed-off-by: Abdul Waheed <awaheed@kics.edu.pk>
---
 target-mips/cpu.h       |    7 +
 target-mips/helper.h    |    5 +
 target-mips/machine.c   |   12 ++
 target-mips/op_helper.c |   73 ++++++++
 target-mips/translate.c |  428 ++++++++++++++++++++++++++++++++++++++++++++++-
 5 files changed, 520 insertions(+), 5 deletions(-)

diff --git a/target-mips/cpu.h b/target-mips/cpu.h
index 79e2558..9180ee9 100644
--- a/target-mips/cpu.h
+++ b/target-mips/cpu.h
@@ -173,6 +173,13 @@ struct TCState {
     target_ulong CP0_TCSchedule;
     target_ulong CP0_TCScheFBack;
     int32_t CP0_Debug_tcstatus;
+    /* Multiplier registers for Octeon */
+    target_ulong MPL0;
+    target_ulong MPL1;
+    target_ulong MPL2;
+    target_ulong P0;
+    target_ulong P1;
+    target_ulong P2;
 };
 
 typedef struct CPUMIPSState CPUMIPSState;
diff --git a/target-mips/helper.h b/target-mips/helper.h
index 442f684..7ba5d9f 100644
--- a/target-mips/helper.h
+++ b/target-mips/helper.h
@@ -8,7 +8,12 @@ DEF_HELPER_3(ldl, tl, tl, tl, int)
 DEF_HELPER_3(ldr, tl, tl, tl, int)
 DEF_HELPER_3(sdl, void, tl, tl, int)
 DEF_HELPER_3(sdr, void, tl, tl, int)
+DEF_HELPER_2(v3mulu, tl, tl, tl)
+DEF_HELPER_2(vmulu, tl, tl, tl)
+DEF_HELPER_1(dpop, tl, tl)
 #endif
+DEF_HELPER_1(pop, tl, tl)
+
 DEF_HELPER_3(lwl, tl, tl, tl, int)
 DEF_HELPER_3(lwr, tl, tl, tl, int)
 DEF_HELPER_3(swl, void, tl, tl, int)
diff --git a/target-mips/machine.c b/target-mips/machine.c
index be72b36..a274ce2 100644
--- a/target-mips/machine.c
+++ b/target-mips/machine.c
@@ -25,6 +25,12 @@ static void save_tc(QEMUFile *f, TCState *tc)
     qemu_put_betls(f, &tc->CP0_TCSchedule);
     qemu_put_betls(f, &tc->CP0_TCScheFBack);
     qemu_put_sbe32s(f, &tc->CP0_Debug_tcstatus);
+    qemu_put_betls(f, &tc->MPL0);
+    qemu_put_betls(f, &tc->MPL1);
+    qemu_put_betls(f, &tc->P0);
+    qemu_put_betls(f, &tc->P1);
+    qemu_put_betls(f, &tc->P2);
+
 }
 
 static void save_fpu(QEMUFile *f, CPUMIPSFPUContext *fpu)
@@ -173,6 +179,12 @@ static void load_tc(QEMUFile *f, TCState *tc)
     qemu_get_betls(f, &tc->CP0_TCSchedule);
     qemu_get_betls(f, &tc->CP0_TCScheFBack);
     qemu_get_sbe32s(f, &tc->CP0_Debug_tcstatus);
+    qemu_get_betls(f, &tc->MPL0);
+    qemu_get_betls(f, &tc->MPL1);
+    qemu_get_betls(f, &tc->MPL2);
+    qemu_get_betls(f, &tc->P0);
+    qemu_get_betls(f, &tc->P1);
+    qemu_get_betls(f, &tc->P2);
 }
 
 static void load_fpu(QEMUFile *f, CPUMIPSFPUContext *fpu)
diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c
index 96e40c6..4565d17 100644
--- a/target-mips/op_helper.c
+++ b/target-mips/op_helper.c
@@ -320,8 +320,81 @@ void helper_dmultu (target_ulong arg1, target_ulong arg2)
 {
     mulu64(&(env->active_tc.LO[0]), &(env->active_tc.HI[0]), arg1, arg2);
 }
+
+static void addc(uint64_t res[], uint64_t a, int i)
+{
+    uint64_t c = res[i];
+    for (; i < 4; i++) {
+        res[i] = c + a;
+        if (res[i] < a) {
+            c = 1;
+            a = res[i+1];
+        } else {
+            break;
+        }
+    }
+}
+
+target_ulong helper_v3mulu(target_ulong arg1, target_ulong arg2)
+{
+    uint64_t hi, lo, res[4];
+    int i;
+    for (i = 0; i < 4; i++) {
+        res[i] = 0;
+    }
+    mulu64(&res[0], &res[1], env->active_tc.MPL0, arg1);
+    mulu64(&lo, &hi, env->active_tc.MPL1, arg1);
+    res[1] = res[1] + lo;
+    if (res[1] < lo) {
+        res[2]++;
+    }
+    res[2] = res[2] + hi;
+    if (res[2] < hi) {
+        res[3]++;
+    }
+    mulu64(&lo, &hi, env->active_tc.MPL2, arg1);
+    res[2] = res[2] + lo;
+    if (res[2] < lo) {
+        res[3]++;
+    }
+    res[3] = res[3] + hi;
+    addc(res, arg2, 0);
+    addc(res, env->active_tc.P0, 0);
+    addc(res, env->active_tc.P1, 1);
+    addc(res, env->active_tc.P2, 2);
+    env->active_tc.P0 = res[1];
+    env->active_tc.P1 = res[2];
+    env->active_tc.P2 = res[3];
+    return res[0];
+}
+
+target_ulong helper_vmulu(target_ulong arg1, target_ulong arg2)
+{
+    uint64_t hi, lo;
+    mulu64(&lo, &hi, env->active_tc.MPL0, arg1);
+    lo = lo + arg2;
+    if (lo < arg2) {
+        hi++;
+    }
+    lo = lo + env->active_tc.P0;
+    if (lo < env->active_tc.P0) {
+        hi++;
+    }
+    env->active_tc.P0 = hi;
+    return lo;
+}
+
+target_ulong helper_dpop(target_ulong arg)
+{
+    return ctpop64(arg);
+}
 #endif
 
+target_ulong helper_pop(target_ulong arg)
+{
+    return ctpop32((uint32_t)arg);
+}
+
 #ifndef CONFIG_USER_ONLY
 
 static inline target_phys_addr_t do_translate_address(target_ulong address, int rw)
diff --git a/target-mips/translate.c b/target-mips/translate.c
index 0550333..e57f3fe 100644
--- a/target-mips/translate.c
+++ b/target-mips/translate.c
@@ -78,6 +78,11 @@ enum {
     OPC_BGTZL    = (0x17 << 26),
     OPC_JALX     = (0x1D << 26),  /* MIPS 16 only */
     OPC_JALXS    = OPC_JALX | 0x5,
+    /* Cavium Specific branches */
+    OPC_BBIT1    = (0x3a << 26),  /* jump on bit set */
+    OPC_BBIT132  = (0x3e << 26),  /* jump on bit set (for upper 32 bits) */
+    OPC_BBIT0    = (0x32 << 26),  /* jump on bit clear */
+    OPC_BBIT032  = (0x36 << 26),  /* jump on bit clear (for upper 32 bits) */
     /* Load and stores */
     OPC_LDL      = (0x1A << 26),
     OPC_LDR      = (0x1B << 26),
@@ -286,6 +291,30 @@ enum {
     OPC_DCLO     = 0x25 | OPC_SPECIAL2,
     /* Special */
     OPC_SDBBP    = 0x3F | OPC_SPECIAL2,
+    /* Cavium Specific Instructions */
+    OPC_BADDU    = 0x28 | OPC_SPECIAL2,
+    OPC_DMUL     = 0x03 | OPC_SPECIAL2,
+    OPC_EXTS     = 0x3a | OPC_SPECIAL2,
+    OPC_EXTS32   = 0x3b | OPC_SPECIAL2,
+    OPC_CINS     = 0x32 | OPC_SPECIAL2,
+    OPC_CINS32   = 0x33 | OPC_SPECIAL2,
+    OPC_SEQI     = 0x2e | OPC_SPECIAL2,
+    OPC_SNEI     = 0x2f | OPC_SPECIAL2,
+    OPC_MTM0     = 0x08 | OPC_SPECIAL2,
+    OPC_MTM1     = 0x0c | OPC_SPECIAL2,
+    OPC_MTM2     = 0x0d | OPC_SPECIAL2,
+    OPC_MTP0     = 0x09 | OPC_SPECIAL2,
+    OPC_MTP1     = 0x0a | OPC_SPECIAL2,
+    OPC_MTP2     = 0x0b | OPC_SPECIAL2,
+    OPC_V3MULU   = 0x11 | OPC_SPECIAL2,
+    OPC_VMM0     = 0x10 | OPC_SPECIAL2,
+    OPC_VMULU    = 0x0f | OPC_SPECIAL2,
+    OPC_POP      = 0X2C | OPC_SPECIAL2,
+    OPC_DPOP     = 0X2D | OPC_SPECIAL2,
+    OPC_SEQ      = 0x2a | OPC_SPECIAL2,
+    OPC_SNE      = 0x2b | OPC_SPECIAL2,
+    OPC_SAA      = 0x18 | OPC_SPECIAL2,
+    OPC_SAAD     = 0x19 | OPC_SPECIAL2,
 };
 
 /* Special3 opcodes */
@@ -1419,6 +1448,224 @@ static void gen_arith_imm (CPUState *env, DisasContext *ctx, uint32_t opc,
     MIPS_DEBUG("%s %s, %s, " TARGET_FMT_lx, opn, regnames[rt], regnames[rs], uimm);
 }
 
+#if defined(TARGET_MIPS64)
+/* set on equal/not equal immediate */
+static void gen_set_imm(CPUState *env, uint32_t opc,
+                        int rt, int rs, int16_t imm)
+{
+    target_ulong uimm = (target_long)imm;
+    TCGv t0;
+    const char *opn = "imm set";
+    if (rt == 0) {
+        /* If no destination, treat it as a NOP. */
+        MIPS_DEBUG("NOP");
+        return;
+    }
+    t0 = tcg_temp_new();
+    gen_load_gpr(t0, rs);
+    switch (opc) {
+    case OPC_SEQI:
+        tcg_gen_setcondi_tl(TCG_COND_EQ, cpu_gpr[rt], t0, uimm);
+        opn = "seqi";
+        break;
+    case OPC_SNEI:
+        tcg_gen_setcondi_tl(TCG_COND_NE, cpu_gpr[rt], t0, uimm);
+        opn = "snei";
+        break;
+    }
+    tcg_temp_free(t0);
+}
+
+/* Cavium specific Large Multiply Instructions */
+static void gen_LMI(DisasContext *ctx, uint32_t opc, int rs, int rt, int rd)
+{
+    const char *opn = "LMI";
+    TCGv t0, t1;
+    t0 = tcg_temp_new();
+    t1 = tcg_temp_new();
+    gen_load_gpr(t0, rs);
+    gen_load_gpr(t1, rt);
+    switch (opc) {
+    case OPC_MTM0:
+        tcg_gen_st_tl(t0, cpu_env, offsetof(CPUState, active_tc.MPL0));
+        tcg_gen_movi_tl(t0, 0);
+        tcg_gen_st_tl(t0, cpu_env, offsetof(CPUState, active_tc.P0));
+        tcg_gen_st_tl(t0, cpu_env, offsetof(CPUState, active_tc.P1));
+        tcg_gen_st_tl(t0, cpu_env, offsetof(CPUState, active_tc.P2));
+        opn = "mtm0";
+        break;
+    case OPC_MTM1:
+        tcg_gen_st_tl(t0, cpu_env, offsetof(CPUState, active_tc.MPL1));
+        tcg_gen_movi_tl(t0, 0);
+        tcg_gen_st_tl(t0, cpu_env, offsetof(CPUState, active_tc.P0));
+        tcg_gen_st_tl(t0, cpu_env, offsetof(CPUState, active_tc.P1));
+        tcg_gen_st_tl(t0, cpu_env, offsetof(CPUState, active_tc.P2));
+        opn = "mtm1";
+        break;
+    case OPC_MTM2:
+        tcg_gen_st_tl(t0, cpu_env, offsetof(CPUState, active_tc.MPL2));
+        tcg_gen_movi_tl(t0, 0);
+        tcg_gen_st_tl(t0, cpu_env, offsetof(CPUState, active_tc.P0));
+        tcg_gen_st_tl(t0, cpu_env, offsetof(CPUState, active_tc.P1));
+        tcg_gen_st_tl(t0, cpu_env, offsetof(CPUState, active_tc.P2));
+        break;
+    case OPC_MTP0:
+        tcg_gen_st_tl(t0, cpu_env, offsetof(CPUState, active_tc.P0));
+        opn = "mtp0";
+        break;
+    case OPC_MTP1:
+        tcg_gen_st_tl(t0, cpu_env, offsetof(CPUState, active_tc.P1));
+        opn = "mtp1";
+        break;
+    case OPC_MTP2:
+        tcg_gen_st_tl(t0, cpu_env, offsetof(CPUState, active_tc.P2));
+        opn = "mtp2";
+        break;
+    case OPC_VMM0:
+        {
+            TCGv t2, t3;
+            t2 = tcg_temp_new();
+            t3 = tcg_temp_new();
+            tcg_gen_ld_tl(t2, cpu_env, offsetof(CPUState, active_tc.MPL0));
+            tcg_gen_ld_tl(t3, cpu_env, offsetof(CPUState, active_tc.P0));
+            tcg_gen_mul_i64(t0, t0, t2);
+            tcg_gen_add_tl(t1, t1, t0);
+            tcg_gen_add_tl(t1, t1, t3);
+            gen_store_gpr(t1, rd);
+            tcg_gen_movi_tl(t0, 0);
+            tcg_gen_st_tl(t1, cpu_env, offsetof(CPUState, active_tc.MPL0));
+            tcg_gen_st_tl(t0, cpu_env, offsetof(CPUState, active_tc.P0));
+            tcg_gen_st_tl(t0, cpu_env, offsetof(CPUState, active_tc.P1));
+            tcg_gen_st_tl(t0, cpu_env, offsetof(CPUState, active_tc.P2));
+            tcg_temp_free(t2);
+            tcg_temp_free(t3);
+            opn = "vmm0";
+            break;
+        }
+    case OPC_VMULU:
+        gen_helper_vmulu(t0, t0, t1);
+        gen_store_gpr(t0, rd);
+        opn = "vmulu";
+        break;
+    case OPC_V3MULU:
+        gen_helper_v3mulu(t0, t0, t1);
+        gen_store_gpr(t0, rd);
+        opn = "v3mulu";
+        break;
+    }
+    tcg_temp_free(t0);
+    tcg_temp_free(t1);
+}
+
+/* set if equal/not equal */
+static void gen_set(DisasContext *ctx, uint32_t opc,
+                        int rd, int rs, int rt)
+{
+    const char *opn = "seq/sne";
+    TCGv t0, t1;
+    t0 = tcg_temp_new();
+    t1 = tcg_temp_new();
+    gen_load_gpr(t0, rs);
+    gen_load_gpr(t1, rt);
+    switch (opc) {
+    case OPC_SEQ:
+        tcg_gen_setcond_tl(TCG_COND_EQ, cpu_gpr[rd], t0, t1);
+        opn = "seq";
+        break;
+    case OPC_SNE:
+        tcg_gen_setcond_tl(TCG_COND_NE, cpu_gpr[rd], t0, t1);
+        opn = "sne";
+        break;
+    default:
+        MIPS_INVAL(opn);
+        generate_exception(ctx, EXCP_RI);
+    }
+    tcg_temp_free(t0);
+    tcg_temp_free(t1);
+
+}
+
+/* Store atomic add */
+static void gen_saa(CPUState *env, DisasContext *ctx, uint32_t opc,
+                     int rt, int base)
+{
+    const char *opn = "saa";
+    TCGv t0, t1, temp;
+    t0 = tcg_temp_new();
+    t1 = tcg_temp_new();
+    temp = tcg_temp_new();
+    gen_load_gpr(t1, rt);
+    gen_base_offset_addr(ctx, t0, base, 0);
+    switch (opc) {
+    case OPC_SAA:
+        save_cpu_state(ctx, 1);
+        op_ld_ll(temp, t0, ctx);
+        tcg_gen_add_tl(temp, temp, t1);
+        op_st_sc(temp, t0, rt, ctx);
+        opn = "saa";
+        break;
+    case OPC_SAAD:
+        save_cpu_state(ctx, 0);
+        op_ld_lld(temp, t0, ctx);
+        tcg_gen_add_tl(temp, temp, t1);
+        op_st_scd(temp, t0, rt, ctx);
+        opn = "saad";
+        break;
+    }
+
+    tcg_temp_free(t0);
+    tcg_temp_free(t1);
+}
+
+static void gen_pop_count(DisasContext *ctx, uint32_t opc, int rd, int rs)
+{
+    const char *opn = "pop";
+        TCGv t0;
+        t0 = tcg_temp_new();
+        gen_load_gpr(t0, rs);
+        switch (opc) {
+        case OPC_DPOP:
+            gen_helper_dpop(t0, t0);
+            gen_store_gpr(t0, rd);
+            opn = "dpop";
+            break;
+        case OPC_POP:
+            gen_helper_pop(t0, t0);
+            gen_store_gpr(t0, rd);
+            opn = "pop";
+            break;
+        }
+        tcg_temp_free(t0);
+}
+
+/* Cavium specific extract instructions */
+static void gen_exts(CPUState *env, DisasContext *ctx, uint32_t opc, int rt,
+                      int rs, int lsb, int msb)
+{
+    TCGv t0 = tcg_temp_new();
+    uint32_t lshft, rshft;
+    gen_load_gpr(t0, rs);
+    switch (opc) {
+    case OPC_EXTS:
+        lshft = 64 - msb - 1 - lsb;
+        rshft = lshft + lsb;
+        tcg_gen_shli_tl(t0, t0, lshft);
+        tcg_gen_sari_tl(t0, t0, rshft);
+        gen_store_gpr(t0, rt);
+        break;
+    case OPC_EXTS32:
+        lshft = 32 - msb - 1 - lsb;
+        rshft = 64 - msb - 1;
+        tcg_gen_shli_tl(t0, t0, lshft);
+        tcg_gen_sari_tl(t0, t0, rshft);
+        gen_store_gpr(t0, rt);
+        break;
+
+    }
+    tcg_temp_free(t0);
+}
+#endif
+
 /* Logic with immediate operand */
 static void gen_logic_imm (CPUState *env, uint32_t opc, int rt, int rs, int16_t imm)
 {
@@ -1636,6 +1883,32 @@ static void gen_arith (CPUState *env, DisasContext *ctx, uint32_t opc,
         }
         opn = "addu";
         break;
+    case OPC_BADDU:
+        {
+            TCGv t0 = tcg_temp_new();
+            TCGv t1 = tcg_temp_new();
+            gen_load_gpr(t0, rs);
+            gen_load_gpr(t1, rt);
+            tcg_gen_add_tl(t0, t1, t0);
+            tcg_gen_ext8u_tl(t0, t0);
+            gen_store_gpr(t0, rd);
+            tcg_temp_free(t0);
+            tcg_temp_free(t1);
+            opn = "baddu";
+            break;
+        }
+    case OPC_DMUL:
+        {
+            TCGv t0 = tcg_temp_new();
+            TCGv t1 = tcg_temp_new();
+            gen_load_gpr(t0, rs);
+            gen_load_gpr(t1, rt);
+            tcg_gen_mul_i64(cpu_gpr[rd], t0, t1);
+            tcg_temp_free(t0);
+            tcg_temp_free(t1);
+            opn = "dmul";
+            break;
+        }
     case OPC_SUB:
         {
             TCGv t0 = tcg_temp_local_new();
@@ -2729,6 +3002,28 @@ static void gen_compute_branch (DisasContext *ctx, uint32_t opc,
         }
         btgt = ctx->pc + insn_bytes + offset;
         break;
+    case OPC_BBIT0:
+    case OPC_BBIT1:
+        {
+            target_ulong maskb;
+            gen_load_gpr(t0, rs);
+            maskb = 1ULL << rt;
+            tcg_gen_andi_tl(t0, t0, maskb);
+            bcond_compute = 1;
+            btgt = ctx->pc + insn_bytes + offset;
+            break;
+        }
+    case OPC_BBIT032:
+    case OPC_BBIT132:
+        {
+            target_ulong maskb;
+            gen_load_gpr(t0, rs);
+            maskb = 1ULL << (rt + 32);
+            tcg_gen_andi_tl(t0, t0, maskb);
+            bcond_compute = 1;
+            btgt = ctx->pc + insn_bytes + offset;
+            break;
+        }
     case OPC_BGEZ:
     case OPC_BGEZAL:
     case OPC_BGEZALS:
@@ -2887,6 +3182,14 @@ static void gen_compute_branch (DisasContext *ctx, uint32_t opc,
             MIPS_DEBUG("bne %s, %s, " TARGET_FMT_lx,
                        regnames[rs], regnames[rt], btgt);
             goto not_likely;
+        case OPC_BBIT1:
+        case OPC_BBIT132:
+            tcg_gen_setcondi_tl(TCG_COND_NE, bcond, t0, 0);
+            goto not_likely;
+        case OPC_BBIT0:
+        case OPC_BBIT032:
+            tcg_gen_setcondi_tl(TCG_COND_EQ, bcond, t0, 0);
+            goto not_likely;
         case OPC_BNEL:
             tcg_gen_setcond_tl(TCG_COND_NE, bcond, t0, t1);
             MIPS_DEBUG("bnel %s, %s, " TARGET_FMT_lx,
@@ -3062,6 +3365,22 @@ static void gen_bitops (DisasContext *ctx, uint32_t opc, int rt,
         tcg_gen_andi_tl(t1, t1, mask);
         tcg_gen_or_tl(t0, t0, t1);
         break;
+    case OPC_CINS:
+        mask =  (1ULL << (msb+1))-1;
+        gen_load_gpr(t0, rt);
+        tcg_gen_andi_tl(t0, t0, 0);
+        tcg_gen_andi_tl(t1, t1, mask);
+        tcg_gen_shli_tl(t1, t1, lsb);
+        tcg_gen_or_tl(t0, t0, t1);
+        break;
+    case OPC_CINS32:
+        mask =  (1ULL << (msb+1))-1;
+        gen_load_gpr(t0, rt);
+        tcg_gen_andi_tl(t0, t0, 0);
+        tcg_gen_andi_tl(t1, t1, mask);
+        tcg_gen_shli_tl(t1, t1, (lsb+32));
+        tcg_gen_or_tl(t0, t0, t1);
+        break;
 #endif
     default:
 fail:
@@ -11948,6 +12267,57 @@ static void decode_opc (CPUState *env, DisasContext *ctx, int *is_branch)
         case OPC_MUL:
             gen_arith(env, ctx, op1, rd, rs, rt);
             break;
+#if defined(TARGET_MIPS64)
+        case OPC_DMUL:
+            check_mips_64(ctx);
+            check_insn(env, ctx, INSN_OCTEON);
+            gen_arith(env, ctx, op1, rd, rs, rt);
+            break;
+        case OPC_CINS:
+            check_mips_64(ctx);
+            check_insn(env, ctx, INSN_OCTEON);
+            gen_bitops(ctx, op1, rt, rs, sa, rd);
+            break;
+        case OPC_CINS32:
+            check_mips_64(ctx);
+            check_insn(env, ctx, INSN_OCTEON);
+            gen_bitops(ctx, op1, rt, rs, sa, rd);
+            break;
+        case OPC_MTM0:
+        case OPC_MTM1:
+        case OPC_MTM2:
+        case OPC_MTP0:
+        case OPC_MTP1:
+        case OPC_MTP2:
+        case OPC_VMULU:
+            check_mips_64(ctx);
+            check_insn(env, ctx, INSN_OCTEON);
+            gen_LMI(ctx, op1, rs, rt, rd);
+            break;
+        case OPC_BADDU:
+            check_insn(env, ctx, INSN_OCTEON);
+            gen_arith(env, ctx, op1, rd, rs, rt);
+            break;
+        case OPC_EXTS:
+            check_mips_64(ctx);
+            check_insn(env, ctx, INSN_OCTEON);
+            gen_exts(env, ctx, op1, rt, rs, sa, rd);
+            break;
+        case OPC_EXTS32:
+            check_mips_64(ctx);
+            check_insn(env, ctx, INSN_OCTEON);
+            gen_exts(env, ctx, op1, rt, rs, sa, rd);
+            break;
+        case OPC_SAA:
+            check_insn(env, ctx, INSN_OCTEON);
+            gen_saa(env, ctx, op1, rt, rs);
+            break;
+        case OPC_SAAD:
+            check_insn(env, ctx, INSN_OCTEON);
+            check_mips_64(ctx);
+            gen_saa(env, ctx, op1, rt, rs);
+            break;
+#endif
         case OPC_CLO:
         case OPC_CLZ:
             check_insn(env, ctx, ISA_MIPS32);
@@ -11965,9 +12335,18 @@ static void decode_opc (CPUState *env, DisasContext *ctx, int *is_branch)
             }
             /* Treat as NOP. */
             break;
+        case OPC_MULT_G_2F:
+#if defined(TARGET_MIPS64)
+             /* Is Cavium Specific vmm0? */
+             if ((env->insn_flags & CPU_OCTEON)) {
+                check_mips_64(ctx);
+                gen_LMI(ctx, op1, rs, rt, rd);
+                break;
+             }
+#endif
+        /* Otherwise fall through */
         case OPC_DIV_G_2F:
         case OPC_DIVU_G_2F:
-        case OPC_MULT_G_2F:
         case OPC_MULTU_G_2F:
         case OPC_MOD_G_2F:
         case OPC_MODU_G_2F:
@@ -11982,6 +12361,12 @@ static void decode_opc (CPUState *env, DisasContext *ctx, int *is_branch)
             gen_cl(ctx, op1, rd, rs);
             break;
         case OPC_DMULT_G_2F:
+            /* Is Cavium Specific instruction v3mulu? */
+            if ((env->insn_flags & CPU_OCTEON)) {
+                check_mips_64(ctx);
+                gen_LMI(ctx, op1, rs, rt, rd);
+                break;
+            }
         case OPC_DMULTU_G_2F:
         case OPC_DDIV_G_2F:
         case OPC_DDIVU_G_2F:
@@ -11990,6 +12375,31 @@ static void decode_opc (CPUState *env, DisasContext *ctx, int *is_branch)
             check_insn(env, ctx, INSN_LOONGSON2F);
             gen_loongson_integer(ctx, op1, rd, rs, rt);
             break;
+        case OPC_SEQ:
+        case OPC_SNE:
+            check_mips_64(ctx);
+            check_insn(env, ctx, INSN_OCTEON);
+            gen_set(ctx, op1, rd, rs, rt);
+            break;
+        case OPC_SEQI:
+        case OPC_SNEI:
+            {
+                int16_t imm10;
+                imm10 = (ctx->opcode >> 6) & 0x3ff;
+                check_mips_64(ctx);
+                check_insn(env, ctx, INSN_OCTEON);
+                gen_set_imm(env, op1, rt, rs, imm10);
+                break;
+            }
+        case OPC_POP:
+            check_insn(env, ctx, INSN_OCTEON);
+            gen_pop_count(ctx, op1, rd, rs);
+            break;
+        case OPC_DPOP:
+            check_mips_64(ctx);
+            check_insn(env, ctx, INSN_OCTEON);
+            gen_pop_count(ctx, op1, rd, rs);
+            break;
 #endif
         default:            /* Invalid */
             MIPS_INVAL("special2");
@@ -12281,10 +12691,18 @@ static void decode_opc (CPUState *env, DisasContext *ctx, int *is_branch)
         break;
 
     /* COP2.  */
-    case OPC_LWC2:
-    case OPC_LDC2:
-    case OPC_SWC2:
-    case OPC_SDC2:
+    /* Conflicting opcodes with Cavium specific branch instructions
+       if cpu_model is set to Octeon these opcodes will
+       belong to INSN_OCTEON */
+    case OPC_LWC2: /* BBIT0 */
+    case OPC_LDC2: /* BBIT032 */
+    case OPC_SWC2: /* BBIT1 */
+    case OPC_SDC2: /* BBIT132 */
+        if (env->insn_flags & INSN_OCTEON) {
+            gen_compute_branch(ctx, op, 4, rs, rt, imm << 2);
+            *is_branch = 1;
+            break;
+        }
     case OPC_CP2:
         /* COP2: Not implemented. */
         generate_exception_err(ctx, EXCP_CpU, 2);
-- 
1.7.3.4

^ permalink raw reply related

* [PATCH 06/49] frv: irq: Remove IRQF_DISABLED
From: Yong Zhang @ 2011-10-22  9:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: tglx, David Howells
In-Reply-To: <1319277421-9203-1-git-send-email-yong.zhang0@gmail.com>

Since commit [e58aa3d2: 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: David Howells <dhowells@redhat.com>
---
 arch/frv/kernel/irq-mb93091.c |    8 ++++----
 arch/frv/kernel/irq-mb93093.c |    1 -
 arch/frv/kernel/irq-mb93493.c |    4 ++--
 arch/frv/kernel/time.c        |    1 -
 4 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/arch/frv/kernel/irq-mb93091.c b/arch/frv/kernel/irq-mb93091.c
index 9afc2ea..f4dfc0b 100644
--- a/arch/frv/kernel/irq-mb93091.c
+++ b/arch/frv/kernel/irq-mb93091.c
@@ -108,25 +108,25 @@ static irqreturn_t fpga_interrupt(int irq, void *_mask)
 static struct irqaction fpga_irq[4]  = {
 	[0] = {
 		.handler	= fpga_interrupt,
-		.flags		= IRQF_DISABLED | IRQF_SHARED,
+		.flags		= IRQF_SHARED,
 		.name		= "fpga.0",
 		.dev_id		= (void *) 0x0028UL,
 	},
 	[1] = {
 		.handler	= fpga_interrupt,
-		.flags		= IRQF_DISABLED | IRQF_SHARED,
+		.flags		= IRQF_SHARED,
 		.name		= "fpga.1",
 		.dev_id		= (void *) 0x0050UL,
 	},
 	[2] = {
 		.handler	= fpga_interrupt,
-		.flags		= IRQF_DISABLED | IRQF_SHARED,
+		.flags		= IRQF_SHARED,
 		.name		= "fpga.2",
 		.dev_id		= (void *) 0x1c00UL,
 	},
 	[3] = {
 		.handler	= fpga_interrupt,
-		.flags		= IRQF_DISABLED | IRQF_SHARED,
+		.flags		= IRQF_SHARED,
 		.name		= "fpga.3",
 		.dev_id		= (void *) 0x6386UL,
 	}
diff --git a/arch/frv/kernel/irq-mb93093.c b/arch/frv/kernel/irq-mb93093.c
index 4d4ad09..bac526d 100644
--- a/arch/frv/kernel/irq-mb93093.c
+++ b/arch/frv/kernel/irq-mb93093.c
@@ -106,7 +106,6 @@ static irqreturn_t fpga_interrupt(int irq, void *_mask)
 static struct irqaction fpga_irq[1]  = {
 	[0] = {
 		.handler	= fpga_interrupt,
-		.flags		= IRQF_DISABLED,
 		.name		= "fpga.0",
 		.dev_id		= (void *) 0x0700UL,
 	}
diff --git a/arch/frv/kernel/irq-mb93493.c b/arch/frv/kernel/irq-mb93493.c
index 4d034c7..b632726 100644
--- a/arch/frv/kernel/irq-mb93493.c
+++ b/arch/frv/kernel/irq-mb93493.c
@@ -119,13 +119,13 @@ static irqreturn_t mb93493_interrupt(int irq, void *_piqsr)
 static struct irqaction mb93493_irq[2]  = {
 	[0] = {
 		.handler	= mb93493_interrupt,
-		.flags		= IRQF_DISABLED | IRQF_SHARED,
+		.flags		= IRQF_SHARED,
 		.name		= "mb93493.0",
 		.dev_id		= (void *) __addr_MB93493_IQSR(0),
 	},
 	[1] = {
 		.handler	= mb93493_interrupt,
-		.flags		= IRQF_DISABLED | IRQF_SHARED,
+		.flags		= IRQF_SHARED,
 		.name		= "mb93493.1",
 		.dev_id		= (void *) __addr_MB93493_IQSR(1),
 	}
diff --git a/arch/frv/kernel/time.c b/arch/frv/kernel/time.c
index b457de4..332e00b 100644
--- a/arch/frv/kernel/time.c
+++ b/arch/frv/kernel/time.c
@@ -44,7 +44,6 @@ static irqreturn_t timer_interrupt(int irq, void *dummy);
 
 static struct irqaction timer_irq  = {
 	.handler = timer_interrupt,
-	.flags = IRQF_DISABLED,
 	.name = "timer",
 };
 
-- 
1.7.1


^ permalink raw reply related

* [Qemu-devel] [PATCH v3 6/6] Addition of Cavium instructions in disassembler
From: khansa @ 2011-10-22 10:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, riku.voipio, Khansa Butt, aurelien
In-Reply-To: <1319278273-32437-1-git-send-email-khansa@kics.edu.pk>

From: Khansa Butt <khansa@kics.edu.pk>


Signed-off-by: Khansa Butt <khansa@kics.edu.pk>
---
 mips-dis.c |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 53 insertions(+), 0 deletions(-)

diff --git a/mips-dis.c b/mips-dis.c
index e3a6e0b..96ab1e8 100644
--- a/mips-dis.c
+++ b/mips-dis.c
@@ -300,6 +300,7 @@ struct mips_opcode
        Also used for immediate operands in vr5400 vector insns.
    "o" 16 bit signed offset (OP_*_DELTA)
    "p" 16 bit PC relative branch target address (OP_*_DELTA)
+   "+p" 5 bit unsigned constant describing bit position, for Octeon (OP_*_RT)
    "q" 10 bit extra breakpoint code (OP_*_CODE2)
    "r" 5 bit same register used as both source and target (OP_*_RS)
    "s" 5 bit source register specifier (OP_*_RS)
@@ -491,6 +492,13 @@ struct mips_opcode
 #define INSN_MULT                   0x40000000
 /* Instruction synchronize shared memory.  */
 #define INSN_SYNC		    0x80000000
+/* Load Cavium specific multiplier registers. */
+#define INSN_WRITE_MPL0             0x100000000
+#define INSN_WRITE_MPL1             0x200000000
+#define INSN_WRITE_MPL2             0x400000000
+#define INSN_WRITE_P0               0x800000000
+#define INSN_WRITE_P1               0x1000000000
+#define INSN_WRITE_P2               0x2000000000
 
 /* These are the bits which may be set in the pinfo2 field of an
    instruction. */
@@ -569,6 +577,8 @@ struct mips_opcode
 #define INSN_LOONGSON_2E          0x40000000
 /* ST Microelectronics Loongson 2F.  */
 #define INSN_LOONGSON_2F          0x80000000
+/* Cavium Network's Octeon processor */
+#define INSN_CVM_OCTEON           0x100000000
 
 /* MIPS ISA defines, use instead of hardcoding ISA level.  */
 
@@ -1099,6 +1109,13 @@ extern const int bfd_mips16_num_opcodes;
 #define RD_HI	INSN_READ_HI
 #define MOD_HI  WR_HI|RD_HI
 
+#define WR_MPL0 INSN_WRITE_MPL0
+#define WR_MPL1 INSN_WRITE_MPL1
+#define WR_MPL2 INSN_WRITE_MPL2
+#define WR_P0 INSN_WRITE_P0
+#define WR_P1 INSN_WRITE_P1
+#define WR_P2 INSN_WRITE_P2
+
 #define WR_LO	INSN_WRITE_LO
 #define RD_LO	INSN_READ_LO
 #define MOD_LO  WR_LO|RD_LO
@@ -1137,6 +1154,8 @@ extern const int bfd_mips16_num_opcodes;
 #define IL2E	(INSN_LOONGSON_2E)
 #define IL2F	(INSN_LOONGSON_2F)
 
+#define ICVM    (INSN_CVM_OCTEON)
+
 #define P3	INSN_4650
 #define L1	INSN_4010
 #define V1	(INSN_4100 | INSN_4111 | INSN_4120)
@@ -2435,6 +2454,34 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"cop1",     "C",	0,    (int) M_COP1,	INSN_MACRO,		0,		I1	},
 {"cop2",     "C",	0,    (int) M_COP2,	INSN_MACRO,		0,		I1	},
 {"cop3",     "C",	0,    (int) M_COP3,	INSN_MACRO,		0,		I1	},
+/* Cavium specific instructions */
+{"baddu",   "d,s,t",    0x70000028, 0xfc0007ff, RD_s|RD_t|WR_d, 0,  ICVM    },
+{"dmul",    "d,s,t",    0x70000003, 0xfc0007ff, RD_s|RD_t|WR_d, 0,  ICVM    },
+{"v3mulu",  "d,s,t",    0x70000011, 0xfc0007ff, RD_s|RD_t|WR_d, 0,  ICVM    },
+{"vmm0",    "d,s,t",    0x70000010, 0xfc0007ff, RD_s|RD_t|WR_d, 0,  ICVM    },
+{"vmulu",   "d,s,t",    0x7000000f, 0xfc0007ff, RD_s|RD_t|WR_d, 0,  ICVM    },
+{"seq",     "d,s,t",    0x7000002a, 0xfc0007ff, RD_s|RD_t|WR_d, 0,  ICVM    },
+{"seqi",   "t,r,j",     0x7000002e, 0xfc00003f,  WR_t|RD_s,     0,  ICVM    },
+{"sne",     "d,s,t",    0x7000002b, 0xfc0007ff, RD_s|RD_t|WR_d, 0,  ICVM    },
+{"snei",    "t,r,j",    0x7000002f, 0xfc00003f, WR_t|RD_s,      0,  ICVM    },
+{"bbit0",    "s,+p,p",   0xc8000000,     0xfc000000, CBD|RD_s,  0,  ICVM    },
+{"bbit032",    "s,+p,p",   0xd8000000,     0xfc000000, CBD|RD_s, 0, ICVM    },
+{"bbit1",    "s,+p,p",   0xe8000000,     0xfc000000, CBD|RD_s,   0, ICVM    },
+{"bbit132",    "s,+p,p",   0xf8000000,     0xfc000000, CBD|RD_s, 0, ICVM    },
+{"saa",    "t,(b)", 0x70000018, 0xfc00ffff, SM|RD_t|RD_b,        0, ICVM    },
+{"saad",   "t,(b)", 0x70000019, 0xfc00ffff, SM|RD_t|RD_b,        0, ICVM    },
+{"exts",   "t,r,+A,+C", 0x7000003a, 0xfc00003f, WR_t|RD_s,       0, ICVM    },
+{"exts32", "t,r,+A,+C", 0x7c00003b, 0xfc00003f, WR_t|RD_s,       0, ICVM    },
+{"cins",   "t,r,+A,+B", 0x70000032, 0xfc00003f, WR_t|RD_s,       0, ICVM    },
+{"cins32", "t,r,+A,+B", 0x70000033, 0xfc00003f, WR_t|RD_s,       0, ICVM    },
+{"mtm0",    "s",    0x70000008, 0xfc1fffff, RD_s|WR_MPL0,   0,      ICVM    },
+{"mtm1",    "s",    0x7000000c, 0xfc1fffff, RD_s|WR_MPL1,   0,      ICVM    },
+{"mtm2",    "s",    0x7000000d, 0xfc1fffff, RD_s|WR_MPL2,   0,      ICVM    },
+{"mtp0",    "s",    0x70000009, 0xfc1fffff, RD_s|WR_P0,     0,      ICVM    },
+{"mtp1",    "s",    0x7000000a, 0xfc1fffff, RD_s|WR_P1,     0,      ICVM    },
+{"mtp2",    "s",    0x7000000b, 0xfc1fffff, RD_s|WR_P2,     0,      ICVM    },
+{"dpop",    "d,s",  0x7000002d, 0xfc1f07ff, RD_s|WR_d,  0,          ICVM    },
+{"pop",     "d,s",  0x7000002c, 0xfc1f07ff, RD_s|WR_d,  0,          ICVM    },
   /* Conflicts with the 4650's "mul" instruction.  Nobody's using the
      4010 any more, so move this insn out of the way.  If the object
      format gave us more info, we could do this right.  */
@@ -3603,6 +3650,12 @@ print_insn_args (const char *d,
 		break;
 	      }
 
+        case 'p':
+            /* Cavium specific 5 bit value describing bit position. */
+            (*info->fprintf_func) (info->stream, "0x%x",
+                       (unsigned int)(l >> OP_SH_RT) & OP_MASK_RT);
+            break;
+
 	    default:
 	      /* xgettext:c-format */
 	      (*info->fprintf_func) (info->stream,
-- 
1.7.3.4

^ permalink raw reply related

* [PATCH 07/49] h8300: irq: Remove IRQF_DISABLED
From: Yong Zhang @ 2011-10-22  9:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: tglx, Yoshinori Sato
In-Reply-To: <1319277421-9203-1-git-send-email-yong.zhang0@gmail.com>

Since commit [e58aa3d2: 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>
---
 arch/h8300/kernel/timer/itu.c     |    2 +-
 arch/h8300/kernel/timer/timer16.c |    2 +-
 arch/h8300/kernel/timer/timer8.c  |    2 +-
 arch/h8300/kernel/timer/tpu.c     |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/h8300/kernel/timer/itu.c b/arch/h8300/kernel/timer/itu.c
index a2ae5e9..21afa64 100644
--- a/arch/h8300/kernel/timer/itu.c
+++ b/arch/h8300/kernel/timer/itu.c
@@ -59,7 +59,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
 static struct irqaction itu_irq = {
 	.name		= "itu",
 	.handler	= timer_interrupt,
-	.flags		= IRQF_DISABLED | IRQF_TIMER,
+	.flags		= IRQF_TIMER,
 };
 
 static const int __initdata divide_rate[] = {1, 2, 4, 8};
diff --git a/arch/h8300/kernel/timer/timer16.c b/arch/h8300/kernel/timer/timer16.c
index ae0d381..3864531 100644
--- a/arch/h8300/kernel/timer/timer16.c
+++ b/arch/h8300/kernel/timer/timer16.c
@@ -54,7 +54,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
 static struct irqaction timer16_irq = {
 	.name		= "timer-16",
 	.handler	= timer_interrupt,
-	.flags		= IRQF_DISABLED | IRQF_TIMER,
+	.flags		= IRQF_TIMER,
 };
 
 static const int __initdata divide_rate[] = {1, 2, 4, 8};
diff --git a/arch/h8300/kernel/timer/timer8.c b/arch/h8300/kernel/timer/timer8.c
index 7a1533f..13617fb 100644
--- a/arch/h8300/kernel/timer/timer8.c
+++ b/arch/h8300/kernel/timer/timer8.c
@@ -74,7 +74,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
 static struct irqaction timer8_irq = {
 	.name		= "timer-8",
 	.handler	= timer_interrupt,
-	.flags		= IRQF_DISABLED | IRQF_TIMER,
+	.flags		= IRQF_TIMER,
 };
 
 static const int __initdata divide_rate[] = {8, 64, 8192};
diff --git a/arch/h8300/kernel/timer/tpu.c b/arch/h8300/kernel/timer/tpu.c
index 2193a2e..aa5707e 100644
--- a/arch/h8300/kernel/timer/tpu.c
+++ b/arch/h8300/kernel/timer/tpu.c
@@ -63,7 +63,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
 static struct irqaction tpu_irq = {
 	.name		= "tpu",
 	.handler	= timer_interrupt,
-	.flags		= IRQF_DISABLED | IRQF_TIMER,
+	.flags		= IRQF_TIMER,
 };
 
 static const int __initdata divide_rate[] = {
-- 
1.7.1


^ permalink raw reply related

* [PATCH 08/49] ia64: irq: Remove IRQF_DISABLED
From: Yong Zhang @ 2011-10-22  9:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: tglx, Tony Luck, Fenghua Yu, linux-ia64
In-Reply-To: <1319277421-9203-1-git-send-email-yong.zhang0@gmail.com>

Since commit [e58aa3d2: 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>
---
 arch/ia64/hp/sim/simserial.c |    2 +-
 arch/ia64/kernel/irq_ia64.c  |    4 ----
 arch/ia64/kernel/mca.c       |    6 ------
 arch/ia64/kernel/perfmon.c   |    1 -
 arch/ia64/kernel/time.c      |    2 +-
 arch/ia64/xen/irq_xen.c      |    3 ---
 6 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c
index bff0824..2fa31be 100644
--- a/arch/ia64/hp/sim/simserial.c
+++ b/arch/ia64/hp/sim/simserial.c
@@ -43,7 +43,7 @@
 
 #define NR_PORTS	1	/* only one port for now */
 
-#define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? IRQF_SHARED : IRQF_DISABLED)
+#define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? IRQF_SHARED : 0)
 
 #define SSC_GETCHAR	21
 
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
index 782c3a3..80b07ad 100644
--- a/arch/ia64/kernel/irq_ia64.c
+++ b/arch/ia64/kernel/irq_ia64.c
@@ -366,7 +366,6 @@ static irqreturn_t smp_irq_move_cleanup_interrupt(int irq, void *dev_id)
 
 static struct irqaction irq_move_irqaction = {
 	.handler =	smp_irq_move_cleanup_interrupt,
-	.flags =	IRQF_DISABLED,
 	.name =		"irq_move"
 };
 
@@ -604,7 +603,6 @@ static irqreturn_t dummy_handler (int irq, void *dev_id)
 
 static struct irqaction ipi_irqaction = {
 	.handler =	handle_IPI,
-	.flags =	IRQF_DISABLED,
 	.name =		"IPI"
 };
 
@@ -613,13 +611,11 @@ static struct irqaction ipi_irqaction = {
  */
 static struct irqaction resched_irqaction = {
 	.handler =	dummy_handler,
-	.flags =	IRQF_DISABLED,
 	.name =		"resched"
 };
 
 static struct irqaction tlb_irqaction = {
 	.handler =	dummy_handler,
-	.flags =	IRQF_DISABLED,
 	.name =		"tlb_flush"
 };
 
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index 84fb405..3df4fe0 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -1769,38 +1769,32 @@ __setup("disable_cpe_poll", ia64_mca_disable_cpe_polling);
 
 static struct irqaction cmci_irqaction = {
 	.handler =	ia64_mca_cmc_int_handler,
-	.flags =	IRQF_DISABLED,
 	.name =		"cmc_hndlr"
 };
 
 static struct irqaction cmcp_irqaction = {
 	.handler =	ia64_mca_cmc_int_caller,
-	.flags =	IRQF_DISABLED,
 	.name =		"cmc_poll"
 };
 
 static struct irqaction mca_rdzv_irqaction = {
 	.handler =	ia64_mca_rendez_int_handler,
-	.flags =	IRQF_DISABLED,
 	.name =		"mca_rdzv"
 };
 
 static struct irqaction mca_wkup_irqaction = {
 	.handler =	ia64_mca_wakeup_int_handler,
-	.flags =	IRQF_DISABLED,
 	.name =		"mca_wkup"
 };
 
 #ifdef CONFIG_ACPI
 static struct irqaction mca_cpe_irqaction = {
 	.handler =	ia64_mca_cpe_int_handler,
-	.flags =	IRQF_DISABLED,
 	.name =		"cpe_hndlr"
 };
 
 static struct irqaction mca_cpep_irqaction = {
 	.handler =	ia64_mca_cpe_int_caller,
-	.flags =	IRQF_DISABLED,
 	.name =		"cpe_poll"
 };
 #endif /* CONFIG_ACPI */
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index 89accc6..e807a57 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -6432,7 +6432,6 @@ pfm_flush_pmds(struct task_struct *task, pfm_context_t *ctx)
 
 static struct irqaction perfmon_irqaction = {
 	.handler = pfm_interrupt_handler,
-	.flags   = IRQF_DISABLED,
 	.name    = "perfmon"
 };
 
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c
index 43920de..ef64514 100644
--- a/arch/ia64/kernel/time.c
+++ b/arch/ia64/kernel/time.c
@@ -397,7 +397,7 @@ static cycle_t itc_get_cycles(struct clocksource *cs)
 
 static struct irqaction timer_irqaction = {
 	.handler =	timer_interrupt,
-	.flags =	IRQF_DISABLED | IRQF_IRQPOLL,
+	.flags =	IRQF_IRQPOLL,
 	.name =		"timer"
 };
 
diff --git a/arch/ia64/xen/irq_xen.c b/arch/ia64/xen/irq_xen.c
index b279e14..d794270 100644
--- a/arch/ia64/xen/irq_xen.c
+++ b/arch/ia64/xen/irq_xen.c
@@ -113,19 +113,16 @@ xen_resched_handler(int irq, void *dev_id)
 
 static struct irqaction xen_ipi_irqaction = {
 	.handler =	handle_IPI,
-	.flags =	IRQF_DISABLED,
 	.name =		"IPI"
 };
 
 static struct irqaction xen_resched_irqaction = {
 	.handler =	xen_resched_handler,
-	.flags =	IRQF_DISABLED,
 	.name =		"resched"
 };
 
 static struct irqaction xen_tlb_irqaction = {
 	.handler =	xen_dummy_handler,
-	.flags =	IRQF_DISABLED,
 	.name =		"tlb_flush"
 };
 #endif
-- 
1.7.1


^ permalink raw reply related

* [PATCH 09/49] m32r: irq: Remove IRQF_DISABLED
From: Yong Zhang @ 2011-10-22  9:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: tglx, Hirokazu Takata, linux-m32r, linux-m32r-ja
In-Reply-To: <1319277421-9203-1-git-send-email-yong.zhang0@gmail.com>

Since commit [e58aa3d2: 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>
---
 arch/m32r/kernel/time.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/arch/m32r/kernel/time.c b/arch/m32r/kernel/time.c
index 84dd040..b3b5b32 100644
--- a/arch/m32r/kernel/time.c
+++ b/arch/m32r/kernel/time.c
@@ -134,7 +134,6 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
 
 static struct irqaction irq0 = {
 	.handler = timer_interrupt,
-	.flags = IRQF_DISABLED,
 	.name = "MFT2",
 };
 
-- 
1.7.1


^ permalink raw reply related

* [PATCH 10/49] m68k: irq: Remove IRQF_DISABLED
From: Yong Zhang @ 2011-10-22  9:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: tglx, Geert Uytterhoeven, Sam Creasey, linux-m68k
In-Reply-To: <1319277421-9203-1-git-send-email-yong.zhang0@gmail.com>

Since commit [e58aa3d2: 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: Greg Ungerer <gerg@uclinux.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 arch/m68k/include/asm/floppy.h         |    2 +-
 arch/m68k/include/asm/irq.h            |    4 ++--
 arch/m68k/include/asm/sun3xflop.h      |    2 +-
 arch/m68k/platform/68328/timers.c      |    2 +-
 arch/m68k/platform/68360/config.c      |    2 +-
 arch/m68k/platform/coldfire/pit.c      |    2 +-
 arch/m68k/platform/coldfire/sltimers.c |    4 ++--
 arch/m68k/platform/coldfire/timers.c   |    4 ++--
 8 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/arch/m68k/include/asm/floppy.h b/arch/m68k/include/asm/floppy.h
index 697d503..47365b1 100644
--- a/arch/m68k/include/asm/floppy.h
+++ b/arch/m68k/include/asm/floppy.h
@@ -85,7 +85,7 @@ static int fd_request_irq(void)
 {
 	if(MACH_IS_Q40)
 		return request_irq(FLOPPY_IRQ, floppy_hardint,
-				   IRQF_DISABLED, "floppy", floppy_hardint);
+				   0, "floppy", floppy_hardint);
 	else if(MACH_IS_SUN3X)
 		return sun3xflop_request_irq();
 	return -ENXIO;
diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index 69ed0d7..35de598 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -60,8 +60,8 @@ struct pt_regs;
 
 /*
  * various flags for request_irq() - the Amiga now uses the standard
- * mechanism like all other architectures - IRQF_DISABLED and
- * IRQF_SHARED are your friends.
+ * mechanism like all other architectures - IRQF_SHARED etc.
+ * are your friends.
  */
 #ifndef MACH_AMIGA_ONLY
 #define IRQ_FLG_LOCK	(0x0001)	/* handler is not replaceable	*/
diff --git a/arch/m68k/include/asm/sun3xflop.h b/arch/m68k/include/asm/sun3xflop.h
index 32c45f8..80f8f9f 100644
--- a/arch/m68k/include/asm/sun3xflop.h
+++ b/arch/m68k/include/asm/sun3xflop.h
@@ -208,7 +208,7 @@ static int sun3xflop_request_irq(void)
 	if(!once) {
 		once = 1;
 		error = request_irq(FLOPPY_IRQ, sun3xflop_hardint,
-				    IRQF_DISABLED, "floppy", NULL);
+				    0, "floppy", NULL);
 		return ((error == 0) ? 0 : -1);
 	} else return 0;
 }
diff --git a/arch/m68k/platform/68328/timers.c b/arch/m68k/platform/68328/timers.c
index 309f725..d135b26 100644
--- a/arch/m68k/platform/68328/timers.c
+++ b/arch/m68k/platform/68328/timers.c
@@ -69,7 +69,7 @@ static irqreturn_t hw_tick(int irq, void *dummy)
 
 static struct irqaction m68328_timer_irq = {
 	.name	 = "timer",
-	.flags	 = IRQF_DISABLED | IRQF_TIMER,
+	.flags	 = IRQF_TIMER,
 	.handler = hw_tick,
 };
 
diff --git a/arch/m68k/platform/68360/config.c b/arch/m68k/platform/68360/config.c
index 9dd5bca..c67f1c3 100644
--- a/arch/m68k/platform/68360/config.c
+++ b/arch/m68k/platform/68360/config.c
@@ -58,7 +58,7 @@ static irqreturn_t hw_tick(int irq, void *dummy)
 
 static struct irqaction m68360_timer_irq = {
 	.name	 = "timer",
-	.flags	 = IRQF_DISABLED | IRQF_TIMER,
+	.flags	 = IRQF_TIMER,
 	.handler = hw_tick,
 };
 
diff --git a/arch/m68k/platform/coldfire/pit.c b/arch/m68k/platform/coldfire/pit.c
index c2b9809..c69b71a 100644
--- a/arch/m68k/platform/coldfire/pit.c
+++ b/arch/m68k/platform/coldfire/pit.c
@@ -118,7 +118,7 @@ static irqreturn_t pit_tick(int irq, void *dummy)
 
 static struct irqaction pit_irq = {
 	.name	 = "timer",
-	.flags	 = IRQF_DISABLED | IRQF_TIMER,
+	.flags	 = IRQF_TIMER,
 	.handler = pit_tick,
 };
 
diff --git a/arch/m68k/platform/coldfire/sltimers.c b/arch/m68k/platform/coldfire/sltimers.c
index 6a85daf..2168dda 100644
--- a/arch/m68k/platform/coldfire/sltimers.c
+++ b/arch/m68k/platform/coldfire/sltimers.c
@@ -51,7 +51,7 @@ irqreturn_t mcfslt_profile_tick(int irq, void *dummy)
 
 static struct irqaction mcfslt_profile_irq = {
 	.name	 = "profile timer",
-	.flags	 = IRQF_DISABLED | IRQF_TIMER,
+	.flags	 = IRQF_TIMER,
 	.handler = mcfslt_profile_tick,
 };
 
@@ -91,7 +91,7 @@ static irqreturn_t mcfslt_tick(int irq, void *dummy)
 
 static struct irqaction mcfslt_timer_irq = {
 	.name	 = "timer",
-	.flags	 = IRQF_DISABLED | IRQF_TIMER,
+	.flags	 = IRQF_TIMER,
 	.handler = mcfslt_tick,
 };
 
diff --git a/arch/m68k/platform/coldfire/timers.c b/arch/m68k/platform/coldfire/timers.c
index 60242f6..687a38f 100644
--- a/arch/m68k/platform/coldfire/timers.c
+++ b/arch/m68k/platform/coldfire/timers.c
@@ -62,7 +62,7 @@ static irqreturn_t mcftmr_tick(int irq, void *dummy)
 
 static struct irqaction mcftmr_timer_irq = {
 	.name	 = "timer",
-	.flags	 = IRQF_DISABLED | IRQF_TIMER,
+	.flags	 = IRQF_TIMER,
 	.handler = mcftmr_tick,
 };
 
@@ -150,7 +150,7 @@ irqreturn_t coldfire_profile_tick(int irq, void *dummy)
 
 static struct irqaction coldfire_profile_irq = {
 	.name	 = "profile timer",
-	.flags	 = IRQF_DISABLED | IRQF_TIMER,
+	.flags	 = IRQF_TIMER,
 	.handler = coldfire_profile_tick,
 };
 
-- 
1.7.1


^ permalink raw reply related

* [PATCH 11/49] microblaze: irq: Remove IRQF_DISABLED
From: Yong Zhang @ 2011-10-22  9:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: tglx, Michal Simek, microblaze-uclinux
In-Reply-To: <1319277421-9203-1-git-send-email-yong.zhang0@gmail.com>

Since commit [e58aa3d2: 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>
---
 arch/microblaze/kernel/timer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/microblaze/kernel/timer.c b/arch/microblaze/kernel/timer.c
index e5550ce..bb86351 100644
--- a/arch/microblaze/kernel/timer.c
+++ b/arch/microblaze/kernel/timer.c
@@ -163,7 +163,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
 
 static struct irqaction timer_irqaction = {
 	.handler = timer_interrupt,
-	.flags = IRQF_DISABLED | IRQF_TIMER,
+	.flags = IRQF_TIMER,
 	.name = "timer",
 	.dev_id = &clockevent_microblaze_timer,
 };
-- 
1.7.1


^ permalink raw reply related

* [PATCH 12/49] MIPS: irq: Remove IRQF_DISABLED
From: Yong Zhang @ 2011-10-22  9:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: tglx, Ralf Baechle, linux-mips
In-Reply-To: <1319277421-9203-1-git-send-email-yong.zhang0@gmail.com>

Since commit [e58aa3d2: 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: Ralf Baechle <ralf@linux-mips.org>
---
 arch/mips/alchemy/common/dbdma.c                |    2 +-
 arch/mips/alchemy/common/time.c                 |    2 +-
 arch/mips/alchemy/devboards/db1200/platform.c   |    4 ++--
 arch/mips/cavium-octeon/smp.c                   |    2 +-
 arch/mips/dec/setup.c                           |    1 -
 arch/mips/include/asm/mach-generic/floppy.h     |    2 +-
 arch/mips/include/asm/mach-jazz/floppy.h        |    2 +-
 arch/mips/jazz/irq.c                            |    2 +-
 arch/mips/kernel/cevt-bcm1480.c                 |    2 +-
 arch/mips/kernel/cevt-ds1287.c                  |    2 +-
 arch/mips/kernel/cevt-gt641xx.c                 |    2 +-
 arch/mips/kernel/cevt-r4k.c                     |    2 +-
 arch/mips/kernel/cevt-sb1250.c                  |    2 +-
 arch/mips/kernel/cevt-txx9.c                    |    2 +-
 arch/mips/kernel/i8253.c                        |    2 +-
 arch/mips/kernel/rtlx.c                         |    1 -
 arch/mips/kernel/smtc.c                         |    2 +-
 arch/mips/lantiq/irq.c                          |    1 -
 arch/mips/loongson/common/cs5536/cs5536_mfgpt.c |    2 +-
 arch/mips/mti-malta/malta-int.c                 |    4 ++--
 arch/mips/pci/ops-pmcmsp.c                      |    2 +-
 arch/mips/pci/ops-tx3927.c                      |    2 +-
 arch/mips/pci/pci-tx4927.c                      |    2 +-
 arch/mips/pci/pci-tx4938.c                      |    2 +-
 arch/mips/pci/pci-tx4939.c                      |    2 +-
 arch/mips/pmc-sierra/msp71xx/msp_hwbutton.c     |    2 +-
 arch/mips/pmc-sierra/msp71xx/msp_smp.c          |    4 ++--
 arch/mips/pnx8550/common/int.c                  |    4 ++--
 arch/mips/pnx8550/common/time.c                 |    4 ++--
 arch/mips/sgi-ip22/ip22-int.c                   |   10 +++++-----
 arch/mips/sgi-ip27/ip27-irq.c                   |    2 +-
 arch/mips/sgi-ip27/ip27-timer.c                 |    2 +-
 arch/mips/sgi-ip32/ip32-irq.c                   |    2 --
 arch/mips/sni/irq.c                             |    2 +-
 arch/mips/sni/time.c                            |    2 +-
 arch/mips/txx9/generic/pci.c                    |    2 +-
 36 files changed, 41 insertions(+), 46 deletions(-)

diff --git a/arch/mips/alchemy/common/dbdma.c b/arch/mips/alchemy/common/dbdma.c
index 0e63ee4..d185b89 100644
--- a/arch/mips/alchemy/common/dbdma.c
+++ b/arch/mips/alchemy/common/dbdma.c
@@ -1019,7 +1019,7 @@ static int __init dbdma_setup(unsigned int irq, dbdev_tab_t *idtable)
 	dbdma_gptr->ddma_inten = 0xffff;
 	au_sync();
 
-	ret = request_irq(irq, dbdma_interrupt, IRQF_DISABLED, "dbdma",
+	ret = request_irq(irq, dbdma_interrupt, 0, "dbdma",
 			  (void *)dbdma_gptr);
 	if (ret)
 		printk(KERN_ERR "Cannot grab DBDMA interrupt!\n");
diff --git a/arch/mips/alchemy/common/time.c b/arch/mips/alchemy/common/time.c
index d5da6ad..146a5fa 100644
--- a/arch/mips/alchemy/common/time.c
+++ b/arch/mips/alchemy/common/time.c
@@ -92,7 +92,7 @@ static struct clock_event_device au1x_rtcmatch2_clockdev = {
 
 static struct irqaction au1x_rtcmatch2_irqaction = {
 	.handler	= au1x_rtcmatch2_irq,
-	.flags		= IRQF_DISABLED | IRQF_TIMER,
+	.flags		= IRQF_TIMER,
 	.name		= "timer",
 	.dev_id		= &au1x_rtcmatch2_clockdev,
 };
diff --git a/arch/mips/alchemy/devboards/db1200/platform.c b/arch/mips/alchemy/devboards/db1200/platform.c
index c61867c..78459c1 100644
--- a/arch/mips/alchemy/devboards/db1200/platform.c
+++ b/arch/mips/alchemy/devboards/db1200/platform.c
@@ -276,12 +276,12 @@ static int db1200_mmc_cd_setup(void *mmc_host, int en)
 
 	if (en) {
 		ret = request_irq(DB1200_SD0_INSERT_INT, db1200_mmc_cd,
-				  IRQF_DISABLED, "sd_insert", mmc_host);
+				  0, "sd_insert", mmc_host);
 		if (ret)
 			goto out;
 
 		ret = request_irq(DB1200_SD0_EJECT_INT, db1200_mmc_cd,
-				  IRQF_DISABLED, "sd_eject", mmc_host);
+				  0, "sd_eject", mmc_host);
 		if (ret) {
 			free_irq(DB1200_SD0_INSERT_INT, mmc_host);
 			goto out;
diff --git a/arch/mips/cavium-octeon/smp.c b/arch/mips/cavium-octeon/smp.c
index 8b60642..b6a0807 100644
--- a/arch/mips/cavium-octeon/smp.c
+++ b/arch/mips/cavium-octeon/smp.c
@@ -207,7 +207,7 @@ void octeon_prepare_cpus(unsigned int max_cpus)
 	 * the other bits alone.
 	 */
 	cvmx_write_csr(CVMX_CIU_MBOX_CLRX(cvmx_get_core_num()), 0xffff);
-	if (request_irq(OCTEON_IRQ_MBOX0, mailbox_interrupt, IRQF_DISABLED,
+	if (request_irq(OCTEON_IRQ_MBOX0, mailbox_interrupt, 0,
 			"SMP-IPI", mailbox_interrupt)) {
 		panic("Cannot request_irq(OCTEON_IRQ_MBOX0)\n");
 	}
diff --git a/arch/mips/dec/setup.c b/arch/mips/dec/setup.c
index f7b7ba6..b874acc 100644
--- a/arch/mips/dec/setup.c
+++ b/arch/mips/dec/setup.c
@@ -110,7 +110,6 @@ static struct irqaction fpuirq = {
 };
 
 static struct irqaction busirq = {
-	.flags = IRQF_DISABLED,
 	.name = "bus error",
 	.flags = IRQF_NO_THREAD,
 };
diff --git a/arch/mips/include/asm/mach-generic/floppy.h b/arch/mips/include/asm/mach-generic/floppy.h
index 001a8ce..a38f4d4 100644
--- a/arch/mips/include/asm/mach-generic/floppy.h
+++ b/arch/mips/include/asm/mach-generic/floppy.h
@@ -98,7 +98,7 @@ static inline void fd_disable_irq(void)
 static inline int fd_request_irq(void)
 {
 	return request_irq(FLOPPY_IRQ, floppy_interrupt,
-	                   IRQF_DISABLED, "floppy", NULL);
+	                   0, "floppy", NULL);
 }
 
 static inline void fd_free_irq(void)
diff --git a/arch/mips/include/asm/mach-jazz/floppy.h b/arch/mips/include/asm/mach-jazz/floppy.h
index 56e9ca6..88b5acb 100644
--- a/arch/mips/include/asm/mach-jazz/floppy.h
+++ b/arch/mips/include/asm/mach-jazz/floppy.h
@@ -90,7 +90,7 @@ static inline void fd_disable_irq(void)
 static inline int fd_request_irq(void)
 {
 	return request_irq(FLOPPY_IRQ, floppy_interrupt,
-	                   IRQF_DISABLED, "floppy", NULL);
+	                   0, "floppy", NULL);
 }
 
 static inline void fd_free_irq(void)
diff --git a/arch/mips/jazz/irq.c b/arch/mips/jazz/irq.c
index ca9bd20..0f4a147 100644
--- a/arch/mips/jazz/irq.c
+++ b/arch/mips/jazz/irq.c
@@ -133,7 +133,7 @@ static irqreturn_t r4030_timer_interrupt(int irq, void *dev_id)
 
 static struct irqaction r4030_timer_irqaction = {
 	.handler	= r4030_timer_interrupt,
-	.flags		= IRQF_DISABLED | IRQF_TIMER,
+	.flags		= IRQF_TIMER,
 	.name		= "R4030 timer",
 };
 
diff --git a/arch/mips/kernel/cevt-bcm1480.c b/arch/mips/kernel/cevt-bcm1480.c
index 36c3898..69bbfae 100644
--- a/arch/mips/kernel/cevt-bcm1480.c
+++ b/arch/mips/kernel/cevt-bcm1480.c
@@ -145,7 +145,7 @@ void __cpuinit sb1480_clockevent_init(void)
 	bcm1480_unmask_irq(cpu, irq);
 
 	action->handler	= sibyte_counter_handler;
-	action->flags	= IRQF_DISABLED | IRQF_PERCPU | IRQF_TIMER;
+	action->flags	= IRQF_PERCPU | IRQF_TIMER;
 	action->name	= name;
 	action->dev_id	= cd;
 
diff --git a/arch/mips/kernel/cevt-ds1287.c b/arch/mips/kernel/cevt-ds1287.c
index 939157e..ed648cb 100644
--- a/arch/mips/kernel/cevt-ds1287.c
+++ b/arch/mips/kernel/cevt-ds1287.c
@@ -108,7 +108,7 @@ static irqreturn_t ds1287_interrupt(int irq, void *dev_id)
 
 static struct irqaction ds1287_irqaction = {
 	.handler	= ds1287_interrupt,
-	.flags		= IRQF_DISABLED | IRQF_PERCPU | IRQF_TIMER,
+	.flags		= IRQF_PERCPU | IRQF_TIMER,
 	.name		= "ds1287",
 };
 
diff --git a/arch/mips/kernel/cevt-gt641xx.c b/arch/mips/kernel/cevt-gt641xx.c
index 339f363..831b475 100644
--- a/arch/mips/kernel/cevt-gt641xx.c
+++ b/arch/mips/kernel/cevt-gt641xx.c
@@ -114,7 +114,7 @@ static irqreturn_t gt641xx_timer0_interrupt(int irq, void *dev_id)
 
 static struct irqaction gt641xx_timer0_irqaction = {
 	.handler	= gt641xx_timer0_interrupt,
-	.flags		= IRQF_DISABLED | IRQF_PERCPU | IRQF_TIMER,
+	.flags		= IRQF_PERCPU | IRQF_TIMER,
 	.name		= "gt641xx_timer0",
 };
 
diff --git a/arch/mips/kernel/cevt-r4k.c b/arch/mips/kernel/cevt-r4k.c
index 98c5a97..4a3a1af 100644
--- a/arch/mips/kernel/cevt-r4k.c
+++ b/arch/mips/kernel/cevt-r4k.c
@@ -84,7 +84,7 @@ out:
 
 struct irqaction c0_compare_irqaction = {
 	.handler = c0_compare_interrupt,
-	.flags = IRQF_DISABLED | IRQF_PERCPU | IRQF_TIMER,
+	.flags = IRQF_PERCPU | IRQF_TIMER,
 	.name = "timer",
 };
 
diff --git a/arch/mips/kernel/cevt-sb1250.c b/arch/mips/kernel/cevt-sb1250.c
index 590c54f..e73439f 100644
--- a/arch/mips/kernel/cevt-sb1250.c
+++ b/arch/mips/kernel/cevt-sb1250.c
@@ -144,7 +144,7 @@ void __cpuinit sb1250_clockevent_init(void)
 	sb1250_unmask_irq(cpu, irq);
 
 	action->handler	= sibyte_counter_handler;
-	action->flags	= IRQF_DISABLED | IRQF_PERCPU | IRQF_TIMER;
+	action->flags	= IRQF_PERCPU | IRQF_TIMER;
 	action->name	= name;
 	action->dev_id	= cd;
 
diff --git a/arch/mips/kernel/cevt-txx9.c b/arch/mips/kernel/cevt-txx9.c
index f0ab92a..e5c30b1 100644
--- a/arch/mips/kernel/cevt-txx9.c
+++ b/arch/mips/kernel/cevt-txx9.c
@@ -146,7 +146,7 @@ static irqreturn_t txx9tmr_interrupt(int irq, void *dev_id)
 
 static struct irqaction txx9tmr_irq = {
 	.handler	= txx9tmr_interrupt,
-	.flags		= IRQF_DISABLED | IRQF_PERCPU | IRQF_TIMER,
+	.flags		= IRQF_PERCPU | IRQF_TIMER,
 	.name		= "txx9tmr",
 	.dev_id		= &txx9_clock_event_device,
 };
diff --git a/arch/mips/kernel/i8253.c b/arch/mips/kernel/i8253.c
index 7047bff..c5bc344 100644
--- a/arch/mips/kernel/i8253.c
+++ b/arch/mips/kernel/i8253.c
@@ -19,7 +19,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
 
 static struct irqaction irq0  = {
 	.handler = timer_interrupt,
-	.flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_TIMER,
+	.flags = IRQF_NOBALANCING | IRQF_TIMER,
 	.name = "timer"
 };
 
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c
index 933166f..a9d801d 100644
--- a/arch/mips/kernel/rtlx.c
+++ b/arch/mips/kernel/rtlx.c
@@ -473,7 +473,6 @@ static const struct file_operations rtlx_fops = {
 
 static struct irqaction rtlx_irq = {
 	.handler	= rtlx_interrupt,
-	.flags		= IRQF_DISABLED,
 	.name		= "RTLX",
 };
 
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c
index f0895e7..17c9412 100644
--- a/arch/mips/kernel/smtc.c
+++ b/arch/mips/kernel/smtc.c
@@ -1130,7 +1130,7 @@ static void ipi_irq_dispatch(void)
 
 static struct irqaction irq_ipi = {
 	.handler	= ipi_interrupt,
-	.flags		= IRQF_DISABLED | IRQF_PERCPU,
+	.flags		= IRQF_PERCPU,
 	.name		= "SMTC_IPI"
 };
 
diff --git a/arch/mips/lantiq/irq.c b/arch/mips/lantiq/irq.c
index f9737bb..3c56179 100644
--- a/arch/mips/lantiq/irq.c
+++ b/arch/mips/lantiq/irq.c
@@ -240,7 +240,6 @@ out:
 
 static struct irqaction cascade = {
 	.handler = no_action,
-	.flags = IRQF_DISABLED,
 	.name = "cascade",
 };
 
diff --git a/arch/mips/loongson/common/cs5536/cs5536_mfgpt.c b/arch/mips/loongson/common/cs5536/cs5536_mfgpt.c
index 0cb1b97..5d1f48f 100644
--- a/arch/mips/loongson/common/cs5536/cs5536_mfgpt.c
+++ b/arch/mips/loongson/common/cs5536/cs5536_mfgpt.c
@@ -111,7 +111,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
 
 static struct irqaction irq5 = {
 	.handler = timer_interrupt,
-	.flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_TIMER,
+	.flags = IRQF_NOBALANCING | IRQF_TIMER,
 	.name = "timer"
 };
 
diff --git a/arch/mips/mti-malta/malta-int.c b/arch/mips/mti-malta/malta-int.c
index d53ff91..a588b5c 100644
--- a/arch/mips/mti-malta/malta-int.c
+++ b/arch/mips/mti-malta/malta-int.c
@@ -322,13 +322,13 @@ static irqreturn_t ipi_call_interrupt(int irq, void *dev_id)
 
 static struct irqaction irq_resched = {
 	.handler	= ipi_resched_interrupt,
-	.flags		= IRQF_DISABLED|IRQF_PERCPU,
+	.flags		= IRQF_PERCPU,
 	.name		= "IPI_resched"
 };
 
 static struct irqaction irq_call = {
 	.handler	= ipi_call_interrupt,
-	.flags		= IRQF_DISABLED|IRQF_PERCPU,
+	.flags		= IRQF_PERCPU,
 	.name		= "IPI_call"
 };
 #endif /* CONFIG_MIPS_MT_SMP */
diff --git a/arch/mips/pci/ops-pmcmsp.c b/arch/mips/pci/ops-pmcmsp.c
index 8fbfbf2..389bf66 100644
--- a/arch/mips/pci/ops-pmcmsp.c
+++ b/arch/mips/pci/ops-pmcmsp.c
@@ -405,7 +405,7 @@ int msp_pcibios_config_access(unsigned char access_type,
 	if (pciirqflag == 0) {
 		ret = request_irq(MSP_INT_PCI,/* Hardcoded internal MSP7120 wiring */
 				bpci_interrupt,
-				IRQF_SHARED | IRQF_DISABLED,
+				IRQF_SHARED,
 				"PMC MSP PCI Host",
 				preg);
 		if (ret != 0)
diff --git a/arch/mips/pci/ops-tx3927.c b/arch/mips/pci/ops-tx3927.c
index 6a3bdb5..02d64f7 100644
--- a/arch/mips/pci/ops-tx3927.c
+++ b/arch/mips/pci/ops-tx3927.c
@@ -225,7 +225,7 @@ void __init tx3927_setup_pcierr_irq(void)
 {
 	if (request_irq(TXX9_IRQ_BASE + TX3927_IR_PCI,
 			tx3927_pcierr_interrupt,
-			IRQF_DISABLED, "PCI error",
+			0, "PCI error",
 			(void *)TX3927_PCIC_REG))
 		printk(KERN_WARNING "Failed to request irq for PCIERR\n");
 }
diff --git a/arch/mips/pci/pci-tx4927.c b/arch/mips/pci/pci-tx4927.c
index a580740..a032ae0 100644
--- a/arch/mips/pci/pci-tx4927.c
+++ b/arch/mips/pci/pci-tx4927.c
@@ -85,7 +85,7 @@ void __init tx4927_setup_pcierr_irq(void)
 {
 	if (request_irq(TXX9_IRQ_BASE + TX4927_IR_PCIERR,
 			tx4927_pcierr_interrupt,
-			IRQF_DISABLED, "PCI error",
+			0, "PCI error",
 			(void *)TX4927_PCIC_REG))
 		printk(KERN_WARNING "Failed to request irq for PCIERR\n");
 }
diff --git a/arch/mips/pci/pci-tx4938.c b/arch/mips/pci/pci-tx4938.c
index 20e45f3..141bba5 100644
--- a/arch/mips/pci/pci-tx4938.c
+++ b/arch/mips/pci/pci-tx4938.c
@@ -136,7 +136,7 @@ void __init tx4938_setup_pcierr_irq(void)
 {
 	if (request_irq(TXX9_IRQ_BASE + TX4938_IR_PCIERR,
 			tx4927_pcierr_interrupt,
-			IRQF_DISABLED, "PCI error",
+			0, "PCI error",
 			(void *)TX4927_PCIC_REG))
 		printk(KERN_WARNING "Failed to request irq for PCIERR\n");
 }
diff --git a/arch/mips/pci/pci-tx4939.c b/arch/mips/pci/pci-tx4939.c
index 9ef8406..c10fbf2 100644
--- a/arch/mips/pci/pci-tx4939.c
+++ b/arch/mips/pci/pci-tx4939.c
@@ -101,7 +101,7 @@ void __init tx4939_setup_pcierr_irq(void)
 {
 	if (request_irq(TXX9_IRQ_BASE + TX4939_IR_PCIERR,
 			tx4927_pcierr_interrupt,
-			IRQF_DISABLED, "PCI error",
+			0, "PCI error",
 			(void *)TX4939_PCIC_REG))
 		pr_warning("Failed to request irq for PCIERR\n");
 }
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_hwbutton.c b/arch/mips/pmc-sierra/msp71xx/msp_hwbutton.c
index c841f08..bb57ed9 100644
--- a/arch/mips/pmc-sierra/msp71xx/msp_hwbutton.c
+++ b/arch/mips/pmc-sierra/msp71xx/msp_hwbutton.c
@@ -149,7 +149,7 @@ static int msp_hwbutton_register(struct hwbutton_interrupt *hirq)
 		CIC_EXT_SET_ACTIVE_HI(cic_ext, hirq->eirq);
 	*CIC_EXT_CFG_REG = cic_ext;
 
-	return request_irq(hirq->irq, hwbutton_handler, IRQF_DISABLED,
+	return request_irq(hirq->irq, hwbutton_handler, 0,
 			   hirq->name, hirq);
 }
 
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_smp.c b/arch/mips/pmc-sierra/msp71xx/msp_smp.c
index bec1790..1017058 100644
--- a/arch/mips/pmc-sierra/msp71xx/msp_smp.c
+++ b/arch/mips/pmc-sierra/msp71xx/msp_smp.c
@@ -51,13 +51,13 @@ static irqreturn_t ipi_call_interrupt(int irq, void *dev_id)
 
 static struct irqaction irq_resched = {
 	.handler	= ipi_resched_interrupt,
-	.flags		= IRQF_DISABLED | IRQF_PERCPU,
+	.flags		= IRQF_PERCPU,
 	.name		= "IPI_resched"
 };
 
 static struct irqaction irq_call = {
 	.handler	= ipi_call_interrupt,
-	.flags		= IRQF_DISABLED | IRQF_PERCPU,
+	.flags		= IRQF_PERCPU,
 	.name		= "IPI_call"
 };
 
diff --git a/arch/mips/pnx8550/common/int.c b/arch/mips/pnx8550/common/int.c
index 1ebe22b..ec684b8 100644
--- a/arch/mips/pnx8550/common/int.c
+++ b/arch/mips/pnx8550/common/int.c
@@ -167,13 +167,13 @@ static struct irq_chip level_irq_type = {
 
 static struct irqaction gic_action = {
 	.handler =	no_action,
-	.flags =	IRQF_DISABLED | IRQF_NO_THREAD,
+	.flags =	IRQF_NO_THREAD,
 	.name =		"GIC",
 };
 
 static struct irqaction timer_action = {
 	.handler =	no_action,
-	.flags =	IRQF_DISABLED | IRQF_TIMER,
+	.flags =	IRQF_TIMER,
 	.name =		"Timer",
 };
 
diff --git a/arch/mips/pnx8550/common/time.c b/arch/mips/pnx8550/common/time.c
index 8836c62..831d6b3 100644
--- a/arch/mips/pnx8550/common/time.c
+++ b/arch/mips/pnx8550/common/time.c
@@ -59,7 +59,7 @@ static irqreturn_t pnx8xxx_timer_interrupt(int irq, void *dev_id)
 
 static struct irqaction pnx8xxx_timer_irq = {
 	.handler	= pnx8xxx_timer_interrupt,
-	.flags		= IRQF_DISABLED | IRQF_PERCPU | IRQF_TIMER,
+	.flags		= IRQF_PERCPU | IRQF_TIMER,
 	.name		= "pnx8xxx_timer",
 };
 
@@ -72,7 +72,7 @@ static irqreturn_t monotonic_interrupt(int irq, void *dev_id)
 
 static struct irqaction monotonic_irqaction = {
 	.handler = monotonic_interrupt,
-	.flags = IRQF_DISABLED | IRQF_TIMER,
+	.flags = IRQF_TIMER,
 	.name = "Monotonic timer",
 };
 
diff --git a/arch/mips/sgi-ip22/ip22-int.c b/arch/mips/sgi-ip22/ip22-int.c
index f72c336..3f2b763 100644
--- a/arch/mips/sgi-ip22/ip22-int.c
+++ b/arch/mips/sgi-ip22/ip22-int.c
@@ -155,32 +155,32 @@ static void __irq_entry indy_buserror_irq(void)
 
 static struct irqaction local0_cascade = {
 	.handler	= no_action,
-	.flags		= IRQF_DISABLED | IRQF_NO_THREAD,
+	.flags		= IRQF_NO_THREAD,
 	.name		= "local0 cascade",
 };
 
 static struct irqaction local1_cascade = {
 	.handler	= no_action,
-	.flags		= IRQF_DISABLED | IRQF_NO_THREAD,
+	.flags		= IRQF_NO_THREAD,
 	.name		= "local1 cascade",
 };
 
 static struct irqaction buserr = {
 	.handler	= no_action,
-	.flags		= IRQF_DISABLED | IRQF_NO_THREAD,
+	.flags		= IRQF_NO_THREAD,
 	.name		= "Bus Error",
 };
 
 static struct irqaction map0_cascade = {
 	.handler	= no_action,
-	.flags		= IRQF_DISABLED | IRQF_NO_THREAD,
+	.flags		= IRQF_NO_THREAD,
 	.name		= "mapable0 cascade",
 };
 
 #ifdef USE_LIO3_IRQ
 static struct irqaction map1_cascade = {
 	.handler	= no_action,
-	.flags		= IRQF_DISABLED | IRQF_NO_THREAD,
+	.flags		= IRQF_NO_THREAD,
 	.name		= "mapable1 cascade",
 };
 #define SGI_INTERRUPTS	SGINT_END
diff --git a/arch/mips/sgi-ip27/ip27-irq.c b/arch/mips/sgi-ip27/ip27-irq.c
index f90dce3..888eac1 100644
--- a/arch/mips/sgi-ip27/ip27-irq.c
+++ b/arch/mips/sgi-ip27/ip27-irq.c
@@ -116,7 +116,7 @@ static int ms1bit(unsigned long x)
 }
 
 /*
- * This code is unnecessarily complex, because we do IRQF_DISABLED
+ * This code is unnecessarily complex, because we do
  * intr enabling. Basically, once we grab the set of intrs we need
  * to service, we must mask _all_ these interrupts; firstly, to make
  * sure the same intr does not intr again, causing recursion that
diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c
index ef74f32..13cfeab 100644
--- a/arch/mips/sgi-ip27/ip27-timer.c
+++ b/arch/mips/sgi-ip27/ip27-timer.c
@@ -91,7 +91,7 @@ static irqreturn_t hub_rt_counter_handler(int irq, void *dev_id)
 
 struct irqaction hub_rt_irqaction = {
 	.handler	= hub_rt_counter_handler,
-	.flags		= IRQF_DISABLED | IRQF_PERCPU | IRQF_TIMER,
+	.flags		= IRQF_PERCPU | IRQF_TIMER,
 	.name		= "hub-rt",
 };
 
diff --git a/arch/mips/sgi-ip32/ip32-irq.c b/arch/mips/sgi-ip32/ip32-irq.c
index c65ea76..a092860 100644
--- a/arch/mips/sgi-ip32/ip32-irq.c
+++ b/arch/mips/sgi-ip32/ip32-irq.c
@@ -113,13 +113,11 @@ extern irqreturn_t crime_cpuerr_intr(int irq, void *dev_id);
 
 static struct irqaction memerr_irq = {
 	.handler = crime_memerr_intr,
-	.flags = IRQF_DISABLED,
 	.name = "CRIME memory error",
 };
 
 static struct irqaction cpuerr_irq = {
 	.handler = crime_cpuerr_intr,
-	.flags = IRQF_DISABLED,
 	.name = "CRIME CPU error",
 };
 
diff --git a/arch/mips/sni/irq.c b/arch/mips/sni/irq.c
index e8e72bb..5a4ec75 100644
--- a/arch/mips/sni/irq.c
+++ b/arch/mips/sni/irq.c
@@ -42,7 +42,7 @@ static irqreturn_t sni_isa_irq_handler(int dummy, void *p)
 struct irqaction sni_isa_irq = {
 	.handler = sni_isa_irq_handler,
 	.name = "ISA",
-	.flags = IRQF_SHARED | IRQF_DISABLED
+	.flags = IRQF_SHARED
 };
 
 /*
diff --git a/arch/mips/sni/time.c b/arch/mips/sni/time.c
index ec0be14..494c9e7 100644
--- a/arch/mips/sni/time.c
+++ b/arch/mips/sni/time.c
@@ -68,7 +68,7 @@ static irqreturn_t a20r_interrupt(int irq, void *dev_id)
 
 static struct irqaction a20r_irqaction = {
 	.handler	= a20r_interrupt,
-	.flags		= IRQF_DISABLED | IRQF_PERCPU | IRQF_TIMER,
+	.flags		= IRQF_PERCPU | IRQF_TIMER,
 	.name		= "a20r-timer",
 };
 
diff --git a/arch/mips/txx9/generic/pci.c b/arch/mips/txx9/generic/pci.c
index 85a87de..682efb0 100644
--- a/arch/mips/txx9/generic/pci.c
+++ b/arch/mips/txx9/generic/pci.c
@@ -262,7 +262,7 @@ txx9_i8259_irq_setup(int irq)
 	int err;
 
 	init_i8259_irqs();
-	err = request_irq(irq, &i8259_interrupt, IRQF_DISABLED|IRQF_SHARED,
+	err = request_irq(irq, &i8259_interrupt, IRQF_SHARED,
 			  "cascade(i8259)", (void *)(long)irq);
 	if (!err)
 		printk(KERN_INFO "PCI-ISA bridge PIC (irq %d)\n", irq);
-- 
1.7.1

^ permalink raw reply related

* [PATCH 13/49] mn10300: irq: Remove IRQF_DISABLED
From: Yong Zhang @ 2011-10-22  9:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: tglx, David Howells, Koichi Yasutake, linux-am33-list
In-Reply-To: <1319277421-9203-1-git-send-email-yong.zhang0@gmail.com>

Since commit [e58aa3d2: 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: David Howells <dhowells@redhat.com>
---
 arch/mn10300/kernel/cevt-mn10300.c   |    2 +-
 arch/mn10300/kernel/mn10300-serial.c |    6 +++---
 arch/mn10300/kernel/smp.c            |    1 -
 arch/mn10300/unit-asb2364/irq-fpga.c |    2 +-
 4 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/arch/mn10300/kernel/cevt-mn10300.c b/arch/mn10300/kernel/cevt-mn10300.c
index 69cae02..2415b76 100644
--- a/arch/mn10300/kernel/cevt-mn10300.c
+++ b/arch/mn10300/kernel/cevt-mn10300.c
@@ -103,7 +103,7 @@ int __init init_clockevents(void)
 	cd->set_next_event	= next_event;
 
 	iact = &per_cpu(timer_irq, cpu);
-	iact->flags = IRQF_DISABLED | IRQF_SHARED | IRQF_TIMER;
+	iact->flags = IRQF_SHARED | IRQF_TIMER;
 	iact->handler = timer_interrupt;
 
 	clockevents_register_device(cd);
diff --git a/arch/mn10300/kernel/mn10300-serial.c b/arch/mn10300/kernel/mn10300-serial.c
index 94901c5..6644c0d 100644
--- a/arch/mn10300/kernel/mn10300-serial.c
+++ b/arch/mn10300/kernel/mn10300-serial.c
@@ -936,15 +936,15 @@ static int mn10300_serial_startup(struct uart_port *_port)
 	irq_set_chip(port->tm_irq, &mn10300_serial_pic);
 
 	if (request_irq(port->rx_irq, mn10300_serial_interrupt,
-			IRQF_DISABLED, port->rx_name, port) < 0)
+			0, port->rx_name, port) < 0)
 		goto error;
 
 	if (request_irq(port->tx_irq, mn10300_serial_interrupt,
-			IRQF_DISABLED, port->tx_name, port) < 0)
+			0, port->tx_name, port) < 0)
 		goto error2;
 
 	if (request_irq(port->tm_irq, mn10300_serial_interrupt,
-			IRQF_DISABLED, port->tm_name, port) < 0)
+			0, port->tm_name, port) < 0)
 		goto error3;
 	mn10300_serial_mask_ack(port->tm_irq);
 
diff --git a/arch/mn10300/kernel/smp.c b/arch/mn10300/kernel/smp.c
index 9242e9f..6159ad8 100644
--- a/arch/mn10300/kernel/smp.c
+++ b/arch/mn10300/kernel/smp.c
@@ -142,7 +142,6 @@ static struct irqaction call_function_ipi = {
 static irqreturn_t smp_ipi_timer_interrupt(int irq, void *dev_id);
 static struct irqaction local_timer_ipi = {
 	.handler	= smp_ipi_timer_interrupt,
-	.flags		= IRQF_DISABLED,
 	.name		= "smp local timer IPI"
 };
 #endif
diff --git a/arch/mn10300/unit-asb2364/irq-fpga.c b/arch/mn10300/unit-asb2364/irq-fpga.c
index e16c216..073e2cc 100644
--- a/arch/mn10300/unit-asb2364/irq-fpga.c
+++ b/arch/mn10300/unit-asb2364/irq-fpga.c
@@ -76,7 +76,7 @@ static irqreturn_t fpga_interrupt(int irq, void *_mask)
 static struct irqaction fpga_irq[]  = {
 	[0] = {
 		.handler	= fpga_interrupt,
-		.flags		= IRQF_DISABLED | IRQF_SHARED,
+		.flags		= IRQF_SHARED,
 		.name		= "fpga",
 	},
 };
-- 
1.7.1


^ permalink raw reply related

* [PATCH 15/49] powerpc: irq: Remove IRQF_DISABLED
From: Yong Zhang @ 2011-10-22  9:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: tglx, Benjamin Herrenschmidt, Paul Mackerras, Arnd Bergmann,
	Geoff Levand, linuxppc-dev, cbe-oss-dev
In-Reply-To: <1319277421-9203-1-git-send-email-yong.zhang0@gmail.com>

Since commit [e58aa3d2: 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 bd6c401..c48de98 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 25ddbfc..6df7090 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -187,7 +187,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 fc46fca..592c3d5 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 9678081..1b0493d 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 3d93a8d..63762c6 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.1


^ permalink raw reply related

* [PATCH 16/49] SH: irq: Remove IRQF_DISABLED
From: Yong Zhang @ 2011-10-22  9:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: tglx, Paul Mundt, linux-sh
In-Reply-To: <1319277421-9203-1-git-send-email-yong.zhang0@gmail.com>

Since commit [e58aa3d2: 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>
---
 arch/sh/boards/board-secureedge5410.c |    3 +--
 arch/sh/boards/mach-cayman/irq.c      |    2 --
 arch/sh/boards/mach-hp6xx/hp6xx_apm.c |    2 +-
 arch/sh/drivers/dma/dma-g2.c          |    2 +-
 arch/sh/drivers/dma/dma-pvr2.c        |    1 -
 arch/sh/drivers/dma/dma-sh.c          |    4 ++--
 arch/sh/drivers/dma/dmabrg.c          |    6 +++---
 arch/sh/drivers/pci/pci-sh5.c         |    4 ++--
 arch/sh/drivers/pci/pci-sh7780.c      |    2 +-
 arch/sh/drivers/push-switch.c         |    2 +-
 arch/sh/kernel/cpu/sh4a/smp-shx3.c    |    2 +-
 11 files changed, 13 insertions(+), 17 deletions(-)

diff --git a/arch/sh/boards/board-secureedge5410.c b/arch/sh/boards/board-secureedge5410.c
index f968f17..03820c3 100644
--- a/arch/sh/boards/board-secureedge5410.c
+++ b/arch/sh/boards/board-secureedge5410.c
@@ -41,8 +41,7 @@ static int __init eraseconfig_init(void)
 	printk("SnapGear: EraseConfig init\n");
 
 	/* Setup "EraseConfig" switch on external IRQ 0 */
-	if (request_irq(irq, eraseconfig_interrupt, IRQF_DISABLED,
-				"Erase Config", NULL))
+	if (request_irq(irq, eraseconfig_interrupt, 0, "Erase Config", NULL))
 		printk("SnapGear: failed to register IRQ%d for Reset witch\n",
 				irq);
 	else
diff --git a/arch/sh/boards/mach-cayman/irq.c b/arch/sh/boards/mach-cayman/irq.c
index 311bceb..724e8b7 100644
--- a/arch/sh/boards/mach-cayman/irq.c
+++ b/arch/sh/boards/mach-cayman/irq.c
@@ -46,13 +46,11 @@ static irqreturn_t cayman_interrupt_pci2(int irq, void *dev_id)
 static struct irqaction cayman_action_smsc = {
 	.name		= "Cayman SMSC Mux",
 	.handler	= cayman_interrupt_smsc,
-	.flags		= IRQF_DISABLED,
 };
 
 static struct irqaction cayman_action_pci2 = {
 	.name		= "Cayman PCI2 Mux",
 	.handler	= cayman_interrupt_pci2,
-	.flags		= IRQF_DISABLED,
 };
 
 static void enable_cayman_irq(struct irq_data *data)
diff --git a/arch/sh/boards/mach-hp6xx/hp6xx_apm.c b/arch/sh/boards/mach-hp6xx/hp6xx_apm.c
index b49535c..865d8d6 100644
--- a/arch/sh/boards/mach-hp6xx/hp6xx_apm.c
+++ b/arch/sh/boards/mach-hp6xx/hp6xx_apm.c
@@ -86,7 +86,7 @@ static int __init hp6x0_apm_init(void)
 	int ret;
 
 	ret = request_irq(HP680_BTN_IRQ, hp6x0_apm_interrupt,
-			  IRQF_DISABLED, MODNAME, NULL);
+			  0, MODNAME, NULL);
 	if (unlikely(ret < 0)) {
 		printk(KERN_ERR MODNAME ": IRQ %d request failed\n",
 		       HP680_BTN_IRQ);
diff --git a/arch/sh/drivers/dma/dma-g2.c b/arch/sh/drivers/dma/dma-g2.c
index af7bb58..be9ca7c 100644
--- a/arch/sh/drivers/dma/dma-g2.c
+++ b/arch/sh/drivers/dma/dma-g2.c
@@ -170,7 +170,7 @@ static int __init g2_dma_init(void)
 {
 	int ret;
 
-	ret = request_irq(HW_EVENT_G2_DMA, g2_dma_interrupt, IRQF_DISABLED,
+	ret = request_irq(HW_EVENT_G2_DMA, g2_dma_interrupt, 0,
 			  "g2 DMA handler", &g2_dma_info);
 	if (unlikely(ret))
 		return -EINVAL;
diff --git a/arch/sh/drivers/dma/dma-pvr2.c b/arch/sh/drivers/dma/dma-pvr2.c
index 3cee58e..706a343 100644
--- a/arch/sh/drivers/dma/dma-pvr2.c
+++ b/arch/sh/drivers/dma/dma-pvr2.c
@@ -70,7 +70,6 @@ static int pvr2_xfer_dma(struct dma_channel *chan)
 static struct irqaction pvr2_dma_irq = {
 	.name		= "pvr2 DMA handler",
 	.handler	= pvr2_dma_interrupt,
-	.flags		= IRQF_DISABLED,
 };
 
 static struct dma_ops pvr2_dma_ops = {
diff --git a/arch/sh/drivers/dma/dma-sh.c b/arch/sh/drivers/dma/dma-sh.c
index 8272087..a60da6d 100644
--- a/arch/sh/drivers/dma/dma-sh.c
+++ b/arch/sh/drivers/dma/dma-sh.c
@@ -95,7 +95,7 @@ static int sh_dmac_request_dma(struct dma_channel *chan)
 #if defined(CONFIG_SH_DMA_IRQ_MULTI)
 				IRQF_SHARED,
 #else
-				IRQF_DISABLED,
+				0,
 #endif
 				chan->dev_id, chan);
 }
@@ -305,7 +305,7 @@ static int __init sh_dmac_init(void)
 #if defined(CONFIG_SH_DMA_IRQ_MULTI)
 				IRQF_SHARED,
 #else
-				IRQF_DISABLED,
+				0,
 #endif
 				dmae_name[n], (void *)dmae_name[n]);
 		if (unlikely(i < 0)) {
diff --git a/arch/sh/drivers/dma/dmabrg.c b/arch/sh/drivers/dma/dmabrg.c
index 6ab9c4a..3d66a32 100644
--- a/arch/sh/drivers/dma/dmabrg.c
+++ b/arch/sh/drivers/dma/dmabrg.c
@@ -174,17 +174,17 @@ static int __init dmabrg_init(void)
 	or = __raw_readl(DMAOR);
 	__raw_writel(or | DMAOR_BRG | DMAOR_DMEN, DMAOR);
 
-	ret = request_irq(DMABRGI0, dmabrg_irq, IRQF_DISABLED,
+	ret = request_irq(DMABRGI0, dmabrg_irq, 0,
 			"DMABRG USB address error", NULL);
 	if (ret)
 		goto out0;
 
-	ret = request_irq(DMABRGI1, dmabrg_irq, IRQF_DISABLED,
+	ret = request_irq(DMABRGI1, dmabrg_irq, 0,
 			"DMABRG Transfer End", NULL);
 	if (ret)
 		goto out1;
 
-	ret = request_irq(DMABRGI2, dmabrg_irq, IRQF_DISABLED,
+	ret = request_irq(DMABRGI2, dmabrg_irq, 0,
 			"DMABRG Transfer Half", NULL);
 	if (ret == 0)
 		return ret;
diff --git a/arch/sh/drivers/pci/pci-sh5.c b/arch/sh/drivers/pci/pci-sh5.c
index 0bf296c..16c1e72 100644
--- a/arch/sh/drivers/pci/pci-sh5.c
+++ b/arch/sh/drivers/pci/pci-sh5.c
@@ -107,13 +107,13 @@ static int __init sh5pci_init(void)
 	u32 uval;
 
         if (request_irq(IRQ_ERR, pcish5_err_irq,
-                        IRQF_DISABLED, "PCI Error",NULL) < 0) {
+                        0, "PCI Error",NULL) < 0) {
                 printk(KERN_ERR "PCISH5: Cannot hook PCI_PERR interrupt\n");
                 return -EINVAL;
         }
 
         if (request_irq(IRQ_SERR, pcish5_serr_irq,
-                        IRQF_DISABLED, "PCI SERR interrupt", NULL) < 0) {
+                        0, "PCI SERR interrupt", NULL) < 0) {
                 printk(KERN_ERR "PCISH5: Cannot hook PCI_SERR interrupt\n");
                 return -EINVAL;
         }
diff --git a/arch/sh/drivers/pci/pci-sh7780.c b/arch/sh/drivers/pci/pci-sh7780.c
index edb7cca..fa7b978 100644
--- a/arch/sh/drivers/pci/pci-sh7780.c
+++ b/arch/sh/drivers/pci/pci-sh7780.c
@@ -172,7 +172,7 @@ static int __init sh7780_pci_setup_irqs(struct pci_channel *hose)
 		     PCI_STATUS_SIG_TARGET_ABORT | \
 		     PCI_STATUS_PARITY, hose->reg_base + PCI_STATUS);
 
-	ret = request_irq(hose->serr_irq, sh7780_pci_serr_irq, IRQF_DISABLED,
+	ret = request_irq(hose->serr_irq, sh7780_pci_serr_irq, 0,
 			  "PCI SERR interrupt", hose);
 	if (unlikely(ret)) {
 		printk(KERN_ERR "PCI: Failed hooking SERR IRQ\n");
diff --git a/arch/sh/drivers/push-switch.c b/arch/sh/drivers/push-switch.c
index afc2455..637b79b 100644
--- a/arch/sh/drivers/push-switch.c
+++ b/arch/sh/drivers/push-switch.c
@@ -63,7 +63,7 @@ static int switch_drv_probe(struct platform_device *pdev)
 	BUG_ON(!psw_info);
 
 	ret = request_irq(irq, psw_info->irq_handler,
-			  IRQF_DISABLED | psw_info->irq_flags,
+			  psw_info->irq_flags,
 			  psw_info->name ? psw_info->name : DRV_NAME, pdev);
 	if (unlikely(ret < 0))
 		goto err;
diff --git a/arch/sh/kernel/cpu/sh4a/smp-shx3.c b/arch/sh/kernel/cpu/sh4a/smp-shx3.c
index de865ca..03f2b55 100644
--- a/arch/sh/kernel/cpu/sh4a/smp-shx3.c
+++ b/arch/sh/kernel/cpu/sh4a/smp-shx3.c
@@ -79,7 +79,7 @@ static void shx3_prepare_cpus(unsigned int max_cpus)
 
 	for (i = 0; i < SMP_MSG_NR; i++)
 		request_irq(104 + i, ipi_interrupt_handler,
-			    IRQF_DISABLED | IRQF_PERCPU, "IPI", (void *)(long)i);
+			    IRQF_PERCPU, "IPI", (void *)(long)i);
 
 	for (i = 0; i < max_cpus; i++)
 		set_cpu_present(i, true);
-- 
1.7.1


^ permalink raw reply related

* [PATCH 17/49] sparc: irq: Remove IRQF_DISABLED
From: Yong Zhang @ 2011-10-22  9:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: tglx, David S. Miller, sparclinux
In-Reply-To: <1319277421-9203-1-git-send-email-yong.zhang0@gmail.com>

Since commit [e58aa3d2: 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: David S. Miller <davem@davemloft.net>
---
 arch/sparc/include/asm/floppy_64.h |    2 +-
 arch/sparc/kernel/ldc.c            |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/sparc/include/asm/floppy_64.h b/arch/sparc/include/asm/floppy_64.h
index bcef1f5..7f27d2e 100644
--- a/arch/sparc/include/asm/floppy_64.h
+++ b/arch/sparc/include/asm/floppy_64.h
@@ -258,7 +258,7 @@ static int sun_fd_request_irq(void)
 		once = 1;
 
 		error = request_irq(FLOPPY_IRQ, sparc_floppy_irq,
-				    IRQF_DISABLED, "floppy", NULL);
+				    0, "floppy", NULL);
 
 		return ((error == 0) ? 0 : -1);
 	}
diff --git a/arch/sparc/kernel/ldc.c b/arch/sparc/kernel/ldc.c
index 435e406..b96cd54 100644
--- a/arch/sparc/kernel/ldc.c
+++ b/arch/sparc/kernel/ldc.c
@@ -1251,13 +1251,13 @@ int ldc_bind(struct ldc_channel *lp, const char *name)
 	snprintf(lp->tx_irq_name, LDC_IRQ_NAME_MAX, "%s TX", name);
 
 	err = request_irq(lp->cfg.rx_irq, ldc_rx,
-			  IRQF_SAMPLE_RANDOM | IRQF_DISABLED,
+			  IRQF_SAMPLE_RANDOM,
 			  lp->rx_irq_name, lp);
 	if (err)
 		return err;
 
 	err = request_irq(lp->cfg.tx_irq, ldc_tx,
-			  IRQF_SAMPLE_RANDOM | IRQF_DISABLED,
+			  IRQF_SAMPLE_RANDOM,
 			  lp->tx_irq_name, lp);
 	if (err) {
 		free_irq(lp->cfg.rx_irq, lp);
-- 
1.7.1


^ permalink raw reply related

* [PATCH 19/49] unicore32: Remove IRQF_DISABLED
From: Yong Zhang @ 2011-10-22  9:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: tglx, Guan Xuetao
In-Reply-To: <1319277421-9203-1-git-send-email-yong.zhang0@gmail.com>

Since commit [e58aa3d2: 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>
---
 arch/unicore32/kernel/puv3-nb0916.c |    4 ++--
 arch/unicore32/kernel/time.c        |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/unicore32/kernel/puv3-nb0916.c b/arch/unicore32/kernel/puv3-nb0916.c
index e731c56..951826a 100644
--- a/arch/unicore32/kernel/puv3-nb0916.c
+++ b/arch/unicore32/kernel/puv3-nb0916.c
@@ -124,7 +124,7 @@ int __init mach_nb0916_init(void)
 
 	if (request_irq(gpio_to_irq(GPI_LCD_CASE_OFF),
 		&nb0916_lcdcaseoff_handler,
-		IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+		IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
 		"NB0916 lcd case off", NULL) < 0) {
 
 		printk(KERN_DEBUG "LCD-Case-OFF IRQ %d not available\n",
@@ -132,7 +132,7 @@ int __init mach_nb0916_init(void)
 	}
 
 	if (request_irq(gpio_to_irq(GPI_OTP_INT), &nb0916_overheat_handler,
-		IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+		IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
 		"NB0916 overheating protection", NULL) < 0) {
 
 		printk(KERN_DEBUG "Overheating Protection IRQ %d not available\n",
diff --git a/arch/unicore32/kernel/time.c b/arch/unicore32/kernel/time.c
index 080710c..d3824b2 100644
--- a/arch/unicore32/kernel/time.c
+++ b/arch/unicore32/kernel/time.c
@@ -86,7 +86,7 @@ static struct clocksource cksrc_puv3_oscr = {
 
 static struct irqaction puv3_timer_irq = {
 	.name		= "ost0",
-	.flags		= IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
+	.flags		= IRQF_TIMER | IRQF_IRQPOLL,
 	.handler	= puv3_ost0_interrupt,
 	.dev_id		= &ckevt_puv3_osmr0,
 };
-- 
1.7.1


^ permalink raw reply related


This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.