]> nv-tegra.nvidia Code Review - linux-2.6.git/commitdiff
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney...
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 27 Nov 2007 03:40:27 +0000 (19:40 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 27 Nov 2007 03:40:27 +0000 (19:40 -0800)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6: (56 commits)
  Blackfin arch: fix bug when enable uart1 with uart0 disabled => no initial console
  Blackfin arch: split apart dump_bfin_regs and merge/remove show_regs from process.c, which was largely duplicated
  Blackfin arch: use common __INIT/__FINIT defines rather than setting the .section ourselves to .init.text
  Blackfin arch: fix bug when sending signals with the wrong PC, cause gdb get confused
  Blackfin arch: Ensure we printk out strings with the proper loglevel
  Blackfin arch: Need to specify ax with the .init.text section,
  Blackfin arch: Update Kconfig to latest Blackfin silicon datasheets
  Blackfin arch: update defconfig files
  Blackfin arch: Fix typo, and add ENDPROC - no functional changes
  Blackfin arch: convert READY to DMA_READY as it causes build errors in common sound code otherwise
  Blackfin arch: add defines for the on-chip L1 ROM of BF54x
  Blackfin arch: cplb and map header file cleanup
  Blackfin arch: cleanup the cplb declares
  Blackfin arch: fix broken on BF52x, remove silly checks on processors for L1_SCRATCH defines
  Blackfin arch: add support for working around anomaly 05000312
  Blackfin arch: cleanup BF54x header file and add BF547 definition
  Blackfin arch: fix building for BF542 processors which only have 1 TWI
  Blackfin arch: rename _return_from_exception to _bfin_return_from_exception and export it
  Blackfin arch: move EXPORT_SYMBOL() to C files where the symbol is actually defined
  Blackfin arch: fix bug NOR Flash MTD mount fail
  ...

181 files changed:
Documentation/lguest/lguest.c
Documentation/parport-lowlevel.txt
Documentation/powerpc/booting-without-of.txt
Documentation/thinkpad-acpi.txt
MAINTAINERS
arch/m68k/atari/atakeyb.c
arch/mips/Kconfig
arch/mips/au1000/Kconfig
arch/mips/kernel/Makefile
arch/mips/kernel/cevt-r4k.c
arch/mips/kernel/csrc-r4k.c [new file with mode: 0644]
arch/mips/kernel/setup.c
arch/mips/kernel/smp-up.c [new file with mode: 0644]
arch/mips/kernel/time.c
arch/mips/kernel/vpe.c
arch/mips/math-emu/ieee754.c
arch/mips/math-emu/ieee754dp.c
arch/mips/math-emu/ieee754sp.c
arch/mips/mipssim/sim_time.c
arch/mips/mm/dma-default.c
arch/mips/mm/init.c
arch/mips/pmc-sierra/Kconfig
arch/mips/sgi-ip22/ip22-eisa.c
arch/mips/sgi-ip22/ip22-nvram.c
arch/mips/sgi-ip32/ip32-irq.c
arch/mips/vr41xx/Kconfig
arch/powerpc/boot/dts/mpc832x_mds.dts
arch/powerpc/boot/dts/mpc834x_mds.dts
arch/powerpc/boot/dts/mpc836x_mds.dts
arch/powerpc/boot/dts/mpc8544ds.dts
arch/powerpc/boot/dts/mpc8572ds.dts
arch/powerpc/boot/dts/mpc8641_hpcn.dts
arch/powerpc/configs/mpc832x_mds_defconfig
arch/powerpc/configs/mpc832x_rdb_defconfig
arch/powerpc/configs/mpc834x_itx_defconfig
arch/powerpc/configs/mpc834x_itxgp_defconfig
arch/powerpc/configs/mpc834x_mds_defconfig
arch/powerpc/configs/mpc836x_mds_defconfig
arch/powerpc/configs/mpc8568mds_defconfig
arch/powerpc/kernel/asm-offsets.c
arch/powerpc/kernel/rtas.c
arch/powerpc/kernel/time.c
arch/powerpc/kernel/vdso.c
arch/powerpc/kernel/vdso32/cacheflush.S
arch/powerpc/kernel/vdso64/cacheflush.S
arch/powerpc/mm/mem.c
arch/powerpc/mm/mmu_decl.h
arch/powerpc/mm/stab.c
arch/powerpc/platforms/40x/walnut.c
arch/powerpc/platforms/44x/bamboo.c
arch/powerpc/platforms/44x/ebony.c
arch/powerpc/platforms/44x/sequoia.c
arch/powerpc/platforms/83xx/mpc832x_mds.c
arch/powerpc/platforms/83xx/mpc832x_rdb.c
arch/powerpc/platforms/83xx/mpc834x_mds.c
arch/powerpc/platforms/83xx/mpc836x_mds.c
arch/powerpc/platforms/83xx/usb.c
arch/powerpc/platforms/cell/spufs/inode.c
arch/powerpc/platforms/embedded6xx/prpmc2800.c
arch/powerpc/platforms/pasemi/setup.c
arch/powerpc/platforms/pseries/Kconfig
arch/powerpc/platforms/pseries/setup.c
arch/powerpc/sysdev/uic.c
arch/ppc/kernel/setup.c
arch/ppc/mm/init.c
arch/ppc/mm/mmu_decl.h
arch/ppc/platforms/4xx/yucca.c
arch/ppc/syslib/virtex_devices.c
arch/s390/appldata/appldata.h
arch/s390/appldata/appldata_base.c
arch/s390/appldata/appldata_mem.c
arch/s390/appldata/appldata_net_sum.c
arch/s390/appldata/appldata_os.c
arch/s390/kernel/early.c
arch/s390/kernel/entry.S
arch/s390/kernel/entry64.S
arch/s390/kernel/setup.c
arch/s390/kernel/smp.c
arch/s390/kernel/traps.c
arch/s390/mm/cmm.c
arch/sh/boards/renesas/rts7751r2d/setup.c
arch/sh/configs/r7780mp_defconfig
arch/sh/configs/r7785rp_defconfig
arch/sh/mm/fault.c
arch/x86/Makefile
arch/x86/kernel/acpi/processor.c
arch/x86/kernel/acpi/sleep_64.c
arch/x86/kernel/io_apic_32.c
arch/x86/kernel/io_apic_64.c
arch/x86/pci/acpi.c
drivers/acpi/Kconfig
drivers/acpi/Makefile
drivers/acpi/ac.c
drivers/acpi/battery.c
drivers/acpi/ec.c
drivers/acpi/osl.c
drivers/acpi/processor_core.c
drivers/acpi/processor_idle.c
drivers/acpi/processor_throttling.c
drivers/acpi/sbs.c
drivers/acpi/tables/tbutils.c
drivers/acpi/video.c
drivers/ata/ata_piix.c
drivers/ata/libata-core.c
drivers/ata/libata-eh.c
drivers/ata/libata-scsi.c
drivers/ata/pata_ali.c
drivers/ata/pata_bf54x.c
drivers/ata/pata_hpt37x.c
drivers/ata/pata_isapnp.c
drivers/ata/pata_jmicron.c
drivers/ata/pata_sil680.c
drivers/ata/pata_sis.c
drivers/ata/sata_sil24.c
drivers/block/virtio_blk.c
drivers/isdn/i4l/isdn_net.c
drivers/lguest/lguest_device.c
drivers/misc/thinkpad_acpi.c
drivers/misc/thinkpad_acpi.h
drivers/mmc/card/block.c
drivers/mmc/host/tifm_sd.c
drivers/net/plip.c
drivers/net/virtio_net.c
drivers/pnp/pnpacpi/rsparser.c
drivers/s390/cio/css.c
drivers/s390/cio/device_fsm.c
drivers/s390/cio/device_id.c
drivers/video/aty/radeon_base.c
drivers/virtio/virtio.c
drivers/zorro/zorro-driver.c
fs/cifs/CHANGES
fs/cifs/README
fs/cifs/TODO
fs/cifs/cifs_spnego.c
fs/cifs/cifs_spnego.h
fs/cifs/cifsacl.c
fs/cifs/cifsfs.c
fs/cifs/cifsglob.h
fs/cifs/cifsproto.h
fs/cifs/cifssmb.c
fs/cifs/connect.c
fs/cifs/file.c
fs/cifs/inode.c
fs/cifs/sess.c
fs/cifs/transport.c
include/acpi/processor.h
include/asm-mips/8253pit.h [deleted file]
include/asm-mips/dma.h
include/asm-mips/futex.h
include/asm-mips/i8253.h
include/asm-mips/ip32/ip32_ints.h
include/asm-mips/system.h
include/asm-mips/time.h
include/asm-powerpc/page_32.h
include/asm-powerpc/pci-bridge.h
include/asm-powerpc/rtas.h
include/asm-powerpc/vdso_datapage.h
include/asm-s390/system.h
include/asm-sh/cacheflush.h
include/linux/acpi.h
include/linux/cpuidle.h
include/linux/libata.h
include/linux/sysctl.h
include/sound/version.h
kernel/module.c
kernel/sysctl_check.c
mm/rmap.c
net/iucv/iucv.c
sound/drivers/mpu401/mpu401_uart.c
sound/drivers/portman2x4.c
sound/pci/ca0106/ca0106_mixer.c
sound/pci/ca0106/ca0106_proc.c
sound/pci/cmipci.c
sound/pci/emu10k1/emumixer.c
sound/pci/emu10k1/p16v.c
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_local.h
sound/pci/hda/patch_analog.c
sound/pci/hda/patch_sigmatel.c
sound/soc/codecs/cs4270.c
sound/soc/s3c24xx/s3c2443-ac97.c

index 42008395534d67c39dfc1da086ee9f35eaa95c3a..9b0e322118b5402eb83868c70266f8afdf420ed1 100644 (file)
@@ -1040,6 +1040,11 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs,
                / getpagesize();
        p = get_pages(pages);
 
+       /* Initialize the virtqueue */
+       vq->next = NULL;
+       vq->last_avail_idx = 0;
+       vq->dev = dev;
+
        /* Initialize the configuration. */
        vq->config.num = num_descs;
        vq->config.irq = devices.next_irq++;
@@ -1057,9 +1062,6 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs,
        for (i = &dev->vq; *i; i = &(*i)->next);
        *i = vq;
 
-       /* Link virtqueue back to device. */
-       vq->dev = dev;
-
        /* Set the routine to call when the Guest does something to this
         * virtqueue. */
        vq->handle_output = handle_output;
@@ -1093,6 +1095,7 @@ static struct device *new_device(const char *name, u16 type, int fd,
        dev->desc = new_dev_desc(type);
        dev->handle_input = handle_input;
        dev->name = name;
+       dev->vq = NULL;
        return dev;
 }
 
index 265fcdcb8e5f3cdc4a0826697be57ae7ebda3c54..120eb20dbb09199afc1628a2ca1187812789bde9 100644 (file)
@@ -339,6 +339,10 @@ Use this function to register your device driver on a parallel port
 ('port').  Once you have done that, you will be able to use
 parport_claim and parport_release in order to use the port.
 
+The ('name') argument is the name of the device that appears in /proc
+filesystem. The string must be valid for the whole lifetime of the
+device (until parport_unregister_device is called).
+
 This function will register three callbacks into your driver:
 'preempt', 'wakeup' and 'irq'.  Each of these may be NULL in order to
 indicate that you do not want a callback.
index ac1be25c1e253e7711ecfeb5d542f471fe7eba69..e9a3cb1d6b06b18a3e0bba0d5a0bf85dc3fde77f 100644 (file)
@@ -1645,8 +1645,9 @@ platforms are moved over to use the flattened-device-tree model.
      MAC addresses passed by the firmware when no information other
      than indices is available to associate an address with a device.
    - phy-connection-type : a string naming the controller/PHY interface type,
-     i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id", "tbi",
-     or "rtbi".
+     i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id" (Internal
+     Delay), "rgmii-txid" (delay on TX only), "rgmii-rxid" (delay on RX only),
+     "tbi", or "rtbi".
 
    Example:
        ucc@2000 {
index ec499265decaa45b7c2495e51bdc660f1959dc6f..10c041ca13c70c8f0e8d9c44a1e3118f34e9d793 100644 (file)
@@ -1,7 +1,7 @@
                     ThinkPad ACPI Extras Driver
 
-                            Version 0.16
-                          August 2nd, 2007
+                            Version 0.17
+                         October 04th, 2007
 
                Borislav Deianov <borislav@users.sf.net>
              Henrique de Moraes Holschuh <hmh@hmh.eng.br>
@@ -923,19 +923,34 @@ sysfs backlight device "thinkpad_screen"
 This feature allows software control of the LCD brightness on ThinkPad
 models which don't have a hardware brightness slider.
 
-It has some limitations: the LCD backlight cannot be actually turned on or off
-by this interface, and in many ThinkPad models, the "dim while on battery"
-functionality will be enabled by the BIOS when this interface is used, and
-cannot be controlled.
-
-The backlight control has eight levels, ranging from 0 to 7.  Some of the
-levels may not be distinct.
-
-There are two interfaces to the firmware for brightness control, EC and CMOS.
-To select which one should be used, use the brightness_mode module parameter:
-brightness_mode=1 selects EC mode, brightness_mode=2 selects CMOS mode,
-brightness_mode=3 selects both EC and CMOS.  The driver tries to autodetect
-which interface to use.
+It has some limitations: the LCD backlight cannot be actually turned on or
+off by this interface, and in many ThinkPad models, the "dim while on
+battery" functionality will be enabled by the BIOS when this interface is
+used, and cannot be controlled.
+
+On IBM (and some of the earlier Lenovo) ThinkPads, the backlight control
+has eight brightness levels, ranging from 0 to 7.  Some of the levels
+may not be distinct.  Later Lenovo models that implement the ACPI
+display backlight brightness control methods have 16 levels, ranging
+from 0 to 15.
+
+There are two interfaces to the firmware for direct brightness control,
+EC and CMOS.  To select which one should be used, use the
+brightness_mode module parameter: brightness_mode=1 selects EC mode,
+brightness_mode=2 selects CMOS mode, brightness_mode=3 selects both EC
+and CMOS.  The driver tries to autodetect which interface to use.
+
+When display backlight brightness controls are available through the
+standard ACPI interface, it is best to use it instead of this direct
+ThinkPad-specific interface.  The driver will disable its native
+backlight brightness control interface if it detects that the standard
+ACPI interface is available in the ThinkPad.
+
+The brightness_enable module parameter can be used to control whether
+the LCD brightness control feature will be enabled when available.
+brightness_enable=0 forces it to be disabled.  brightness_enable=1
+forces it to be enabled when available, even if the standard ACPI
+interface is also available.
 
 Procfs notes:
 
@@ -947,11 +962,11 @@ Procfs notes:
 
 Sysfs notes:
 
-The interface is implemented through the backlight sysfs class, which is poorly
-documented at this time.
+The interface is implemented through the backlight sysfs class, which is
+poorly documented at this time.
 
-Locate the thinkpad_screen device under /sys/class/backlight, and inside it
-there will be the following attributes:
+Locate the thinkpad_screen device under /sys/class/backlight, and inside
+it there will be the following attributes:
 
        max_brightness:
                Reads the maximum brightness the hardware can be set to.
@@ -961,17 +976,19 @@ there will be the following attributes:
                Reads what brightness the screen is set to at this instant.
 
        brightness:
-               Writes request the driver to change brightness to the given
-               value.  Reads will tell you what brightness the driver is trying
-               to set the display to when "power" is set to zero and the display
-               has not been dimmed by a kernel power management event.
+               Writes request the driver to change brightness to the
+               given value.  Reads will tell you what brightness the
+               driver is trying to set the display to when "power" is set
+               to zero and the display has not been dimmed by a kernel
+               power management event.
 
        power:
-               power management mode, where 0 is "display on", and 1 to 3 will
-               dim the display backlight to brightness level 0 because
-               thinkpad-acpi cannot really turn the backlight off.  Kernel
-               power management events can temporarily increase the current
-               power management level, i.e. they can dim the display.
+               power management mode, where 0 is "display on", and 1 to 3
+               will dim the display backlight to brightness level 0
+               because thinkpad-acpi cannot really turn the backlight
+               off.  Kernel power management events can temporarily
+               increase the current power management level, i.e. they can
+               dim the display.
 
 
 Volume control -- /proc/acpi/ibm/volume
index cad0882754a68ebee704d42e2ec34cb1155a6b14..b21a911193e8e9737e097b54a8d8e6a90cc7a96f 100644 (file)
@@ -1914,10 +1914,8 @@ L:       linux1394-devel@lists.sourceforge.net
 S:     Maintained
 
 IMS TWINTURBO FRAMEBUFFER DRIVER
-P:     Paul Mundt
-M:     lethal@chaoticdreams.org
 L:     linux-fbdev-devel@lists.sourceforge.net (subscribers-only)
-S:     Maintained
+S:     Orphan
 
 INFINIBAND SUBSYSTEM
 P:     Roland Dreier
@@ -2446,7 +2444,7 @@ M68K ON APPLE MACINTOSH
 P:     Joshua Thompson
 M:     funaho@jurai.org
 W:     http://www.mac.linux-m68k.org/
-L:     linux-mac68k@mac.linux-m68k.org
+L:     linux-m68k@lists.linux-m68k.org
 S:     Maintained
 
 M68K ON HP9000/300
@@ -3636,18 +3634,12 @@ M:      laredo@gnu.org
 W:     http://www.stradis.com/
 S:     Maintained
 
-SUPERH (sh)
-P:     Paul Mundt
-M:     lethal@linux-sh.org
-L:     linuxsh-dev@lists.sourceforge.net (subscribers-only)
-W:     http://www.linux-sh.org
-S:     Maintained
-
-SUPERH64 (sh64)
+SUPERH
 P:     Paul Mundt
 M:     lethal@linux-sh.org
-L:     linuxsh-shmedia-dev@lists.sourceforge.net
+L:     linux-sh@vger.kernel.org
 W:     http://www.linux-sh.org
+T:     git kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6.git
 S:     Maintained
 
 SUN3/3X
index 880add120eb3208715cb51a82bbd286ccbed877b..8a2a53b33616708a7bbe6815bfd9d58dce42bf98 100644 (file)
@@ -565,7 +565,7 @@ void atari_kbd_leds(unsigned int leds)
 
 static int atari_keyb_done = 0;
 
-int __init atari_keyb_init(void)
+int atari_keyb_init(void)
 {
        if (atari_keyb_done)
                return 0;
@@ -631,6 +631,7 @@ int __init atari_keyb_init(void)
        atari_keyb_done = 1;
        return 0;
 }
+EXPORT_SYMBOL_GPL(atari_keyb_init);
 
 int atari_kbd_translate(unsigned char keycode, unsigned char *keycodep, char raw_mode)
 {
index 2f2ce0c28bc082b0d8d2a9c65ef224ac3509630a..455bd1f560aa2adc80cfc2891665c93acdb9ec4f 100644 (file)
@@ -22,6 +22,7 @@ config MACH_ALCHEMY
 config BASLER_EXCITE
        bool "Basler eXcite smart camera"
        select CEVT_R4K
+       select CSRC_R4K
        select DMA_COHERENT
        select HW_HAS_PCI
        select IRQ_CPU
@@ -49,6 +50,7 @@ config BASLER_EXCITE_PROTOTYPE
 config BCM47XX
        bool "BCM47XX based boards"
        select CEVT_R4K
+       select CSRC_R4K
        select DMA_NONCOHERENT
        select HW_HAS_PCI
        select IRQ_CPU
@@ -66,6 +68,7 @@ config BCM47XX
 config MIPS_COBALT
        bool "Cobalt Server"
        select CEVT_R4K
+       select CSRC_R4K
        select CEVT_GT641XX
        select DMA_NONCOHERENT
        select HW_HAS_PCI
@@ -85,6 +88,7 @@ config MACH_DECSTATION
        bool "DECstations"
        select BOOT_ELF32
        select CEVT_R4K
+       select CSRC_R4K
        select DMA_NONCOHERENT
        select NO_IOPORT
        select IRQ_CPU
@@ -117,6 +121,7 @@ config MACH_JAZZ
        select ARC32
        select ARCH_MAY_HAVE_PC_FDC
        select CEVT_R4K
+       select CSRC_R4K
        select GENERIC_ISA_DMA
        select IRQ_CPU
        select I8253
@@ -137,6 +142,7 @@ config MACH_JAZZ
 config LASAT
        bool "LASAT Networks platforms"
        select CEVT_R4K
+       select CSRC_R4K
        select DMA_NONCOHERENT
        select SYS_HAS_EARLY_PRINTK
        select HW_HAS_PCI
@@ -154,6 +160,7 @@ config LEMOTE_FULONG
        bool "Lemote Fulong mini-PC"
        select ARCH_SPARSEMEM_ENABLE
        select CEVT_R4K
+       select CSRC_R4K
        select SYS_HAS_CPU_LOONGSON2
        select DMA_NONCOHERENT
        select BOOT_ELF32
@@ -179,6 +186,7 @@ config MIPS_ATLAS
        bool "MIPS Atlas board"
        select BOOT_ELF32
        select CEVT_R4K
+       select CSRC_R4K
        select DMA_NONCOHERENT
        select SYS_HAS_EARLY_PRINTK
        select IRQ_CPU
@@ -210,6 +218,7 @@ config MIPS_MALTA
        select ARCH_MAY_HAVE_PC_FDC
        select BOOT_ELF32
        select CEVT_R4K
+       select CSRC_R4K
        select DMA_NONCOHERENT
        select GENERIC_ISA_DMA
        select IRQ_CPU
@@ -241,6 +250,7 @@ config MIPS_MALTA
 config MIPS_SEAD
        bool "MIPS SEAD board"
        select CEVT_R4K
+       select CSRC_R4K
        select IRQ_CPU
        select DMA_NONCOHERENT
        select SYS_HAS_EARLY_PRINTK
@@ -260,6 +270,7 @@ config MIPS_SEAD
 config MIPS_SIM
        bool 'MIPS simulator (MIPSsim)'
        select CEVT_R4K
+       select CSRC_R4K
        select DMA_NONCOHERENT
        select SYS_HAS_EARLY_PRINTK
        select IRQ_CPU
@@ -278,6 +289,7 @@ config MIPS_SIM
 config MARKEINS
        bool "NEC EMMA2RH Mark-eins"
        select CEVT_R4K
+       select CSRC_R4K
        select DMA_NONCOHERENT
        select HW_HAS_PCI
        select IRQ_CPU
@@ -293,6 +305,7 @@ config MARKEINS
 config MACH_VR41XX
        bool "NEC VR4100 series based machines"
        select CEVT_R4K
+       select CSRC_R4K
        select SYS_HAS_CPU_VR41XX
        select GENERIC_HARDIRQS_NO__DO_IRQ
 
@@ -330,6 +343,7 @@ config PMC_MSP
 config PMC_YOSEMITE
        bool "PMC-Sierra Yosemite eval board"
        select CEVT_R4K
+       select CSRC_R4K
        select DMA_COHERENT
        select HW_HAS_PCI
        select IRQ_CPU
@@ -351,6 +365,7 @@ config PMC_YOSEMITE
 config QEMU
        bool "Qemu"
        select CEVT_R4K
+       select CSRC_R4K
        select DMA_COHERENT
        select GENERIC_ISA_DMA
        select HAVE_STD_PC_SERIAL_PORT
@@ -382,9 +397,11 @@ config SGI_IP22
        select ARC32
        select BOOT_ELF32
        select CEVT_R4K
+       select CSRC_R4K
        select DMA_NONCOHERENT
        select HW_HAS_EISA
        select I8253
+       select I8259
        select IP22_CPU_SCACHE
        select IRQ_CPU
        select GENERIC_ISA_DMA_SUPPORT_BROKEN
@@ -427,6 +444,7 @@ config SGI_IP32
        select ARC32
        select BOOT_ELF32
        select CEVT_R4K
+       select CSRC_R4K
        select DMA_NONCOHERENT
        select HW_HAS_PCI
        select IRQ_CPU
@@ -498,6 +516,7 @@ config SIBYTE_SWARM
        select SYS_SUPPORTS_HIGHMEM
        select SYS_SUPPORTS_KGDB
        select SYS_SUPPORTS_LITTLE_ENDIAN
+       select ZONE_DMA32 if 64BIT
 
 config SIBYTE_LITTLESUR
        bool "Sibyte BCM91250C2-LittleSur"
@@ -548,6 +567,7 @@ config SIBYTE_BIGSUR
        select SYS_SUPPORTS_BIG_ENDIAN
        select SYS_SUPPORTS_HIGHMEM
        select SYS_SUPPORTS_LITTLE_ENDIAN
+       select ZONE_DMA32 if 64BIT
 
 config SNI_RM
        bool "SNI RM200/300/400"
@@ -556,6 +576,7 @@ config SNI_RM
        select ARCH_MAY_HAVE_PC_FDC
        select BOOT_ELF32
        select CEVT_R4K
+       select CSRC_R4K
        select DMA_NONCOHERENT
        select GENERIC_ISA_DMA
        select HW_HAS_EISA
@@ -599,6 +620,7 @@ config TOSHIBA_JMR3927
 config TOSHIBA_RBTX4927
        bool "Toshiba RBTX49[23]7 board"
        select CEVT_R4K
+       select CSRC_R4K
        select CEVT_TXX9
        select DMA_NONCOHERENT
        select HAS_TXX9_SERIAL
@@ -621,6 +643,7 @@ config TOSHIBA_RBTX4927
 config TOSHIBA_RBTX4938
        bool "Toshiba RBTX4938 board"
        select CEVT_R4K
+       select CSRC_R4K
        select CEVT_TXX9
        select DMA_NONCOHERENT
        select HAS_TXX9_SERIAL
@@ -642,6 +665,7 @@ config TOSHIBA_RBTX4938
 config WR_PPMC
        bool "Wind River PPMC board"
        select CEVT_R4K
+       select CSRC_R4K
        select IRQ_CPU
        select BOOT_ELF32
        select DMA_NONCOHERENT
@@ -752,6 +776,9 @@ config CEVT_TXX9
 config CSRC_BCM1480
        bool
 
+config CSRC_R4K
+       bool
+
 config CSRC_SB1250
        bool
 
@@ -1640,6 +1667,9 @@ config ARCH_DISCONTIGMEM_ENABLE
          or have huge holes in the physical address space for other reasons.
          See <file:Documentation/vm/numa> for more.
 
+config ARCH_POPULATES_NODE_MAP
+       def_bool y
+
 config ARCH_SPARSEMEM_ENABLE
        bool
        select SPARSEMEM_STATIC
@@ -1945,6 +1975,9 @@ config I8253
 config PCSPEAKER
        bool
 
+config ZONE_DMA32
+       bool
+
 source "drivers/pcmcia/Kconfig"
 
 source "drivers/pci/hotplug/Kconfig"
index b36cec58a9a848df2e7be884d85c23c9adb71da1..05d1354aad3a5dca791a46bd017de81a42ff68d8 100644 (file)
@@ -138,6 +138,7 @@ config SOC_AU1X00
        bool
        select 64BIT_PHYS_ADDR
        select CEVT_R4K
+       select CSRC_R4K
        select IRQ_CPU
        select SYS_HAS_CPU_MIPS32_R1
        select SYS_SUPPORTS_32BIT_KERNEL
index b551535b7e48143dfd437b72d26cf442d1c674b3..ffa08362de170d3c09790b4511c6cdd5f973f6bc 100644 (file)
@@ -14,6 +14,7 @@ obj-$(CONFIG_CEVT_GT641XX)    += cevt-gt641xx.o
 obj-$(CONFIG_CEVT_SB1250)      += cevt-sb1250.o
 obj-$(CONFIG_CEVT_TXX9)                += cevt-txx9.o
 obj-$(CONFIG_CSRC_BCM1480)     += csrc-bcm1480.o
+obj-$(CONFIG_CSRC_R4K)         += csrc-r4k.o
 obj-$(CONFIG_CSRC_SB1250)      += csrc-sb1250.o
 
 binfmt_irix-objs       := irixelf.o irixinv.o irixioctl.o irixsig.o    \
@@ -43,6 +44,7 @@ obj-$(CONFIG_CPU_TX49XX)      += r4k_fpu.o r4k_switch.o
 obj-$(CONFIG_CPU_VR41XX)       += r4k_fpu.o r4k_switch.o
 
 obj-$(CONFIG_SMP)              += smp.o
+obj-$(CONFIG_SMP_UP)           += smp-up.o
 
 obj-$(CONFIG_MIPS_MT)          += mips-mt.o
 obj-$(CONFIG_MIPS_MT_FPAFF)    += mips-mt-fpaff.o
index bab935a3d74b4941216a213d146aea13ab772c5d..24a2d907aa0de4c022c0d5e89227dceae2a8a572 100644 (file)
@@ -219,7 +219,7 @@ static int c0_compare_int_usable(void)
        return 1;
 }
 
-void __cpuinit mips_clockevent_init(void)
+int __cpuinit mips_clockevent_init(void)
 {
        uint64_t mips_freq = mips_hpt_frequency;
        unsigned int cpu = smp_processor_id();
@@ -227,7 +227,7 @@ void __cpuinit mips_clockevent_init(void)
        unsigned int irq;
 
        if (!cpu_has_counter || !mips_hpt_frequency)
-               return;
+               return -ENXIO;
 
 #ifdef CONFIG_MIPS_MT_SMTC
        setup_smtc_dummy_clockevent_device();
@@ -237,11 +237,11 @@ void __cpuinit mips_clockevent_init(void)
         * device.
         */
        if (cpu)
-               return;
+               return 0;
 #endif
 
        if (!c0_compare_int_usable())
-               return;
+               return -ENXIO;
 
        /*
         * With vectored interrupts things are getting platform specific.
@@ -276,8 +276,8 @@ void __cpuinit mips_clockevent_init(void)
 
        clockevents_register_device(cd);
 
-       if (!cp0_timer_irq_installed)
-               return;
+       if (cp0_timer_irq_installed)
+               return 0;
 
        cp0_timer_irq_installed = 1;
 
@@ -287,4 +287,6 @@ void __cpuinit mips_clockevent_init(void)
 #else
        setup_irq(irq, &c0_compare_irqaction);
 #endif
+
+       return 0;
 }
diff --git a/arch/mips/kernel/csrc-r4k.c b/arch/mips/kernel/csrc-r4k.c
new file mode 100644 (file)
index 0000000..74c5c62
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2007 by Ralf Baechle
+ */
+
+static cycle_t c0_hpt_read(void)
+{
+       return read_c0_count();
+}
+
+static struct clocksource clocksource_mips = {
+       .name           = "MIPS",
+       .read           = c0_hpt_read,
+       .mask           = CLOCKSOURCE_MASK(32),
+       .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
+};
+
+static void __init init_mips_clocksource(void)
+{
+       /* Calclate a somewhat reasonable rating value */
+       clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000;
+
+       clocksource_set_clock(&clocksource_mips, mips_hpt_frequency);
+
+       clocksource_register(&clocksource_mips);
+}
index a06a27d6cfcdef8050f57f48d31d933c00b9ddbc..7f6ddcb5d48532657a52b80461644dd05c467551 100644 (file)
@@ -269,7 +269,7 @@ static void __init bootmem_init(void)
 
 static void __init bootmem_init(void)
 {
-       unsigned long reserved_end;
+       unsigned long init_begin, reserved_end;
        unsigned long mapstart = ~0UL;
        unsigned long bootmap_size;
        int i;
@@ -342,6 +342,35 @@ static void __init bootmem_init(void)
         */
        bootmap_size = init_bootmem_node(NODE_DATA(0), mapstart,
                                         min_low_pfn, max_low_pfn);
+
+
+       init_begin = PFN_UP(__pa_symbol(&__init_begin));
+       for (i = 0; i < boot_mem_map.nr_map; i++) {
+               unsigned long start, end;
+
+               start = PFN_UP(boot_mem_map.map[i].addr);
+               end = PFN_DOWN(boot_mem_map.map[i].addr
+                               + boot_mem_map.map[i].size);
+
+               if (start <= init_begin)
+                       start = init_begin;
+               if (start >= end)
+                       continue;
+
+#ifndef CONFIG_HIGHMEM
+               if (end > max_low_pfn)
+                       end = max_low_pfn;
+
+               /*
+                * ... finally, is the area going away?
+                */
+               if (end <= start)
+                       continue;
+#endif
+
+               add_active_range(0, start, end);
+       }
+
        /*
         * Register fully available low RAM pages with the bootmem allocator.
         */
diff --git a/arch/mips/kernel/smp-up.c b/arch/mips/kernel/smp-up.c
new file mode 100644 (file)
index 0000000..ead6c30
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2006, 07 by Ralf Baechle (ralf@linux-mips.org)
+ *
+ * Symmetric Uniprocessor (TM) Support
+ */
+#include <linux/kernel.h>
+#include <linux/sched.h>
+
+/*
+ * Send inter-processor interrupt
+ */
+void up_send_ipi_single(int cpu, unsigned int action)
+{
+       panic(KERN_ERR "%s called", __func__);
+}
+
+static inline void up_send_ipi_mask(cpumask_t mask, unsigned int action)
+{
+       panic(KERN_ERR "%s called", __func__);
+}
+
+/*
+ *  After we've done initial boot, this function is called to allow the
+ *  board code to clean up state, if needed
+ */
+void __cpuinit up_init_secondary(void)
+{
+}
+
+void __cpuinit up_smp_finish(void)
+{
+}
+
+/* Hook for after all CPUs are online */
+void up_cpus_done(void)
+{
+}
+
+/*
+ * Firmware CPU startup hook
+ */
+void __cpuinit up_boot_secondary(int cpu, struct task_struct *idle)
+{
+}
+
+void __init up_smp_setup(void)
+{
+}
+
+void __init up_prepare_cpus(unsigned int max_cpus)
+{
+}
+
+struct plat_smp_ops up_smp_ops = {
+       .send_ipi_single        = up_send_ipi_single,
+       .send_ipi_mask          = up_send_ipi_mask,
+       .init_secondary         = up_init_secondary,
+       .smp_finish             = up_smp_finish,
+       .cpus_done              = up_cpus_done,
+       .boot_secondary         = up_boot_secondary,
+       .smp_setup              = up_smp_setup,
+       .prepare_cpus           = up_prepare_cpus,
+};
index 3284b9b4ecac95d6f31bdae2f829f98d5a7eebcb..52075426c37338a46f7ab3f1990c41030d23ed45 100644 (file)
@@ -50,14 +50,6 @@ int update_persistent_clock(struct timespec now)
        return rtc_mips_set_mmss(now.tv_sec);
 }
 
-/*
- * High precision timer functions for a R4k-compatible timer.
- */
-static cycle_t c0_hpt_read(void)
-{
-       return read_c0_count();
-}
-
 int (*mips_timer_state)(void);
 
 int null_perf_irq(void)
@@ -84,55 +76,6 @@ EXPORT_SYMBOL(perf_irq);
 
 unsigned int mips_hpt_frequency;
 
-static struct clocksource clocksource_mips = {
-       .name           = "MIPS",
-       .read           = c0_hpt_read,
-       .mask           = CLOCKSOURCE_MASK(32),
-       .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
-};
-
-static unsigned int __init calibrate_hpt(void)
-{
-       cycle_t frequency, hpt_start, hpt_end, hpt_count, hz;
-
-       const int loops = HZ / 10;
-       int log_2_loops = 0;
-       int i;
-
-       /*
-        * We want to calibrate for 0.1s, but to avoid a 64-bit
-        * division we round the number of loops up to the nearest
-        * power of 2.
-        */
-       while (loops > 1 << log_2_loops)
-               log_2_loops++;
-       i = 1 << log_2_loops;
-
-       /*
-        * Wait for a rising edge of the timer interrupt.
-        */
-       while (mips_timer_state());
-       while (!mips_timer_state());
-
-       /*
-        * Now see how many high precision timer ticks happen
-        * during the calculated number of periods between timer
-        * interrupts.
-        */
-       hpt_start = clocksource_mips.read();
-       do {
-               while (mips_timer_state());
-               while (!mips_timer_state());
-       } while (--i);
-       hpt_end = clocksource_mips.read();
-
-       hpt_count = (hpt_end - hpt_start) & clocksource_mips.mask;
-       hz = HZ;
-       frequency = hpt_count * hz;
-
-       return frequency >> log_2_loops;
-}
-
 void __init clocksource_set_clock(struct clocksource *cs, unsigned int clock)
 {
        u64 temp;
@@ -166,16 +109,6 @@ void __cpuinit clockevent_set_clock(struct clock_event_device *cd,
        cd->mult = (u32) temp;
 }
 
-static void __init init_mips_clocksource(void)
-{
-       /* Calclate a somewhat reasonable rating value */
-       clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000;
-
-       clocksource_set_clock(&clocksource_mips, mips_hpt_frequency);
-
-       clocksource_register(&clocksource_mips);
-}
-
 void __init __weak plat_time_init(void)
 {
 }
@@ -194,21 +127,42 @@ void __init plat_timer_setup(void)
        BUG();
 }
 
+static __init int cpu_has_mfc0_count_bug(void)
+{
+       switch (current_cpu_type()) {
+       case CPU_R4000PC:
+       case CPU_R4000SC:
+       case CPU_R4000MC:
+               /*
+                * V3.0 is documented as suffering from the mfc0 from count bug.
+                * Afaik this is the last version of the R4000.  Later versions
+                * were marketed as R4400.
+                */
+               return 1;
+
+       case CPU_R4400PC:
+       case CPU_R4400SC:
+       case CPU_R4400MC:
+               /*
+                * The published errata for the R4400 upto 3.0 say the CPU
+                * has the mfc0 from count bug.
+                */
+               if ((current_cpu_data.processor_id & 0xff) <= 0x30)
+                       return 1;
+
+               /*
+                * I don't have erratas for newer R4400 so be paranoid.
+                */
+               return 1;
+       }
+
+       return 0;
+}
+
 void __init time_init(void)
 {
        plat_time_init();
 
-       if (cpu_has_counter && (mips_hpt_frequency || mips_timer_state)) {
-               /* We know counter frequency.  Or we can get it.  */
-               if (!mips_hpt_frequency)
-                       mips_hpt_frequency = calibrate_hpt();
-
-               /* Report the high precision timer rate for a reference.  */
-               printk("Using %u.%03u MHz high precision timer.\n",
-                      ((mips_hpt_frequency + 500) / 1000) / 1000,
-                      ((mips_hpt_frequency + 500) / 1000) % 1000);
+       if (mips_clockevent_init() || !cpu_has_mfc0_count_bug())
                init_mips_clocksource();
-       }
-
-       mips_clockevent_init();
 }
index 38bd33fa2a23ae123a6bb725a58197115d3cc281..c06eb812a95e1dc3d096926ed8ffeac58d900c5e 100644 (file)
@@ -470,7 +470,7 @@ static int apply_r_mips_lo16(struct module *me, uint32_t *location,
                         */
                        if (v != l->value) {
                                printk(KERN_DEBUG "VPE loader: "
-                                      "apply_r_mips_lo16/hi16:         "
+                                      "apply_r_mips_lo16/hi16: \t"
                                       "inconsistent value information\n");
                                return -ENOEXEC;
                        }
@@ -629,7 +629,7 @@ static void simplify_symbols(Elf_Shdr * sechdrs,
                        break;
 
                case SHN_MIPS_SCOMMON:
-                       printk(KERN_DEBUG "simplify_symbols: ignoring SHN_MIPS_SCOMMON"
+                       printk(KERN_DEBUG "simplify_symbols: ignoring SHN_MIPS_SCOMMON "
                               "symbol <%s> st_shndx %d\n", strtab + sym[i].st_name,
                               sym[i].st_shndx);
                        // .sbss section
index 946aee331788a12734bf87bba2b709c23d166a56..cb1b6822711ab90c04591d84e8dc2570f16ba8ec 100644 (file)
@@ -108,6 +108,7 @@ int ieee754si_xcpt(int r, const char *op, ...)
        ax.rv.si = r;
        va_start(ax.ap, op);
        ieee754_xcpt(&ax);
+       va_end(ax.ap);
        return ax.rv.si;
 }
 
@@ -122,5 +123,6 @@ s64 ieee754di_xcpt(s64 r, const char *op, ...)
        ax.rv.di = r;
        va_start(ax.ap, op);
        ieee754_xcpt(&ax);
+       va_end(ax.ap);
        return ax.rv.di;
 }
index 3e214aac4b12f51bd103aca37d0a545395434849..6d2d89f324721115a6577d8726f1f38404d08c9d 100644 (file)
@@ -57,6 +57,7 @@ ieee754dp ieee754dp_xcpt(ieee754dp r, const char *op, ...)
        ax.rv.dp = r;
        va_start(ax.ap, op);
        ieee754_xcpt(&ax);
+       va_end(ax.ap);
        return ax.rv.dp;
 }
 
@@ -83,6 +84,7 @@ ieee754dp ieee754dp_nanxcpt(ieee754dp r, const char *op, ...)
        ax.rv.dp = r;
        va_start(ax.ap, op);
        ieee754_xcpt(&ax);
+       va_end(ax.ap);
        return ax.rv.dp;
 }
 
index adda851cd04f5e19f7b84ad26b9244cc0791622d..463534045ab60ac68243b1bf5a2b104b77ccad83 100644 (file)
@@ -58,6 +58,7 @@ ieee754sp ieee754sp_xcpt(ieee754sp r, const char *op, ...)
        ax.rv.sp = r;
        va_start(ax.ap, op);
        ieee754_xcpt(&ax);
+       va_end(ax.ap);
        return ax.rv.sp;
 }
 
@@ -84,6 +85,7 @@ ieee754sp ieee754sp_nanxcpt(ieee754sp r, const char *op, ...)
        ax.rv.sp = r;
        va_start(ax.ap, op);
        ieee754_xcpt(&ax);
+       va_end(ax.ap);
        return ax.rv.sp;
 }
 
index bfaafa38846f7f2650815ffd845066901efa91d0..e39bbe989da34b85a0ec7dbe703efdbef4e5270a 100644 (file)
@@ -101,9 +101,7 @@ unsigned __init get_c0_compare_int(void)
 
 void __init plat_time_init(void)
 {
-       unsigned int est_freq, flags;
-
-       local_irq_save(flags);
+       unsigned int est_freq;
 
        /* Set Data mode - binary. */
        CMOS_WRITE(CMOS_READ(RTC_CONTROL) | RTC_DM_BINARY, RTC_CONTROL);
@@ -114,6 +112,4 @@ void __init plat_time_init(void)
               (est_freq % 1000000) * 100 / 1000000);
 
        cpu_khz = est_freq / 1000;
-
-       local_irq_restore(flags);
 }
index 33519ce4954043c8c16683ce88fa1b82be36b5e1..ae76795685cc2ee2789596dfbdfeba6c40b47808 100644 (file)
@@ -40,16 +40,38 @@ static inline int cpu_is_noncoherent_r10000(struct device *dev)
               current_cpu_type() == CPU_R12000);
 }
 
+static gfp_t massage_gfp_flags(const struct device *dev, gfp_t gfp)
+{
+       /* ignore region specifiers */
+       gfp &= ~(__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM);
+
+#ifdef CONFIG_ZONE_DMA32
+       if (dev == NULL)
+               gfp |= __GFP_DMA;
+       else if (dev->coherent_dma_mask < DMA_BIT_MASK(24))
+               gfp |= __GFP_DMA;
+       else
+#endif
+#ifdef CONFIG_ZONE_DMA32
+            if (dev->coherent_dma_mask < DMA_BIT_MASK(32))
+               gfp |= __GFP_DMA32;
+       else
+#endif
+               ;
+
+       /* Don't invoke OOM killer */
+       gfp |= __GFP_NORETRY;
+
+       return gfp;
+}
+
 void *dma_alloc_noncoherent(struct device *dev, size_t size,
        dma_addr_t * dma_handle, gfp_t gfp)
 {
        void *ret;
 
-       /* ignore region specifiers */
-       gfp &= ~(__GFP_DMA | __GFP_HIGHMEM);
+       gfp = massage_gfp_flags(dev, gfp);
 
-       if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff))
-               gfp |= GFP_DMA;
        ret = (void *) __get_free_pages(gfp, get_order(size));
 
        if (ret != NULL) {
@@ -67,11 +89,8 @@ void *dma_alloc_coherent(struct device *dev, size_t size,
 {
        void *ret;
 
-       /* ignore region specifiers */
-       gfp &= ~(__GFP_DMA | __GFP_HIGHMEM);
+       gfp = massage_gfp_flags(dev, gfp);
 
-       if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff))
-               gfp |= GFP_DMA;
        ret = (void *) __get_free_pages(gfp, get_order(size));
 
        if (ret) {
@@ -343,7 +362,7 @@ int dma_supported(struct device *dev, u64 mask)
         * so we can't guarantee allocations that must be
         * within a tighter range than GFP_DMA..
         */
-       if (mask < 0x00ffffff)
+       if (mask < DMA_BIT_MASK(24))
                return 0;
 
        return 1;
index ec3b9e9f30f4fd2ae5ad9edc9951564889eae58a..480dec04f552cbe086f6fa96aedbaf73ff09ff7c 100644 (file)
@@ -347,11 +347,8 @@ static int __init page_is_ram(unsigned long pagenr)
 
 void __init paging_init(void)
 {
-       unsigned long zones_size[MAX_NR_ZONES] = { 0, };
-#ifndef CONFIG_FLATMEM
-       unsigned long zholes_size[MAX_NR_ZONES] = { 0, };
-       unsigned long i, j, pfn;
-#endif
+       unsigned long max_zone_pfns[MAX_NR_ZONES];
+       unsigned long lastpfn;
 
        pagetable_init();
 
@@ -361,35 +358,27 @@ void __init paging_init(void)
        kmap_coherent_init();
 
 #ifdef CONFIG_ZONE_DMA
-       if (min_low_pfn < MAX_DMA_PFN && MAX_DMA_PFN <= max_low_pfn) {
-               zones_size[ZONE_DMA] = MAX_DMA_PFN - min_low_pfn;
-               zones_size[ZONE_NORMAL] = max_low_pfn - MAX_DMA_PFN;
-       } else if (max_low_pfn < MAX_DMA_PFN)
-               zones_size[ZONE_DMA] = max_low_pfn - min_low_pfn;
-       else
+       max_zone_pfns[ZONE_DMA] = MAX_DMA_PFN;
 #endif
-       zones_size[ZONE_NORMAL] = max_low_pfn - min_low_pfn;
-
+#ifdef CONFIG_ZONE_DMA32
+       max_zone_pfns[ZONE_DMA32] = MAX_DMA32_PFN;
+#endif
+       max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
+       lastpfn = max_low_pfn;
 #ifdef CONFIG_HIGHMEM
-       zones_size[ZONE_HIGHMEM] = highend_pfn - highstart_pfn;
+       max_zone_pfns[ZONE_HIGHMEM] = highend_pfn;
+       lastpfn = highend_pfn;
 
-       if (cpu_has_dc_aliases && zones_size[ZONE_HIGHMEM]) {
+       if (cpu_has_dc_aliases && max_low_pfn != highend_pfn) {
                printk(KERN_WARNING "This processor doesn't support highmem."
-                      " %ldk highmem ignored\n", zones_size[ZONE_HIGHMEM]);
-               zones_size[ZONE_HIGHMEM] = 0;
+                      " %ldk highmem ignored\n",
+                      (highend_pfn - max_low_pfn) << (PAGE_SHIFT - 10));
+               max_zone_pfns[ZONE_HIGHMEM] = max_low_pfn;
+               lastpfn = max_low_pfn;
        }
 #endif
 
-#ifdef CONFIG_FLATMEM
-       free_area_init(zones_size);
-#else
-       pfn = min_low_pfn;
-       for (i = 0; i < MAX_NR_ZONES; i++)
-               for (j = 0; j < zones_size[i]; j++, pfn++)
-                       if (!page_is_ram(pfn))
-                               zholes_size[i]++;
-       free_area_init_node(0, NODE_DATA(0), zones_size, 0, zholes_size);
-#endif
+       free_area_init_nodes(max_zone_pfns);
 }
 
 static struct kcore_list kcore_mem, kcore_vmalloc;
index 6b293ce0935f020552490de88a0165f9cbb253f1..90261b83db04d492c7839c139a722f43766f7ea5 100644 (file)
@@ -5,12 +5,14 @@ choice
 config PMC_MSP4200_EVAL
        bool "PMC-Sierra MSP4200 Eval Board"
        select CEVT_R4K
+       select CSRC_R4K
        select IRQ_MSP_SLP
        select HW_HAS_PCI
 
 config PMC_MSP4200_GW
        bool "PMC-Sierra MSP4200 VoIP Gateway"
        select CEVT_R4K
+       select CSRC_R4K
        select IRQ_MSP_SLP
        select HW_HAS_PCI
 
index 26854fb11e7cefea9b007fb3d992517e7944a9d6..1617241d2737e79acbf4fe3684797cb751c83b02 100644 (file)
@@ -36,6 +36,7 @@
 #include <asm/sgi/ioc.h>
 #include <asm/sgi/mc.h>
 #include <asm/sgi/ip22.h>
+#include <asm/i8259.h>
 
 /* I2 has four EISA slots. */
 #define IP22_EISA_MAX_SLOTS      4
@@ -93,126 +94,11 @@ static irqreturn_t ip22_eisa_intr(int irq, void *dev_id)
        return IRQ_NONE;
 }
 
-static void enable_eisa1_irq(unsigned int irq)
-{
-       u8 mask;
-
-       mask = inb(EISA_INT1_MASK);
-       mask &= ~((u8) (1 << irq));
-       outb(mask, EISA_INT1_MASK);
-}
-
-static unsigned int startup_eisa1_irq(unsigned int irq)
-{
-       u8 edge;
-
-       /* Only use edge interrupts for EISA */
-
-       edge = inb(EISA_INT1_EDGE_LEVEL);
-       edge &= ~((u8) (1 << irq));
-       outb(edge, EISA_INT1_EDGE_LEVEL);
-
-       enable_eisa1_irq(irq);
-       return 0;
-}
-
-static void disable_eisa1_irq(unsigned int irq)
-{
-       u8 mask;
-
-       mask = inb(EISA_INT1_MASK);
-       mask |= ((u8) (1 << irq));
-       outb(mask, EISA_INT1_MASK);
-}
-
-static void mask_and_ack_eisa1_irq(unsigned int irq)
-{
-       disable_eisa1_irq(irq);
-
-       outb(0x20, EISA_INT1_CTRL);
-}
-
-static void end_eisa1_irq(unsigned int irq)
-{
-       if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS)))
-               enable_eisa1_irq(irq);
-}
-
-static struct irq_chip ip22_eisa1_irq_type = {
-       .name           = "IP22 EISA",
-       .startup        = startup_eisa1_irq,
-       .ack            = mask_and_ack_eisa1_irq,
-       .mask           = disable_eisa1_irq,
-       .mask_ack       = mask_and_ack_eisa1_irq,
-       .unmask         = enable_eisa1_irq,
-       .end            = end_eisa1_irq,
-};
-
-static void enable_eisa2_irq(unsigned int irq)
-{
-       u8 mask;
-
-       mask = inb(EISA_INT2_MASK);
-       mask &= ~((u8) (1 << (irq - 8)));
-       outb(mask, EISA_INT2_MASK);
-}
-
-static unsigned int startup_eisa2_irq(unsigned int irq)
-{
-       u8 edge;
-
-       /* Only use edge interrupts for EISA */
-
-       edge = inb(EISA_INT2_EDGE_LEVEL);
-       edge &= ~((u8) (1 << (irq - 8)));
-       outb(edge, EISA_INT2_EDGE_LEVEL);
-
-       enable_eisa2_irq(irq);
-       return 0;
-}
-
-static void disable_eisa2_irq(unsigned int irq)
-{
-       u8 mask;
-
-       mask = inb(EISA_INT2_MASK);
-       mask |= ((u8) (1 << (irq - 8)));
-       outb(mask, EISA_INT2_MASK);
-}
-
-static void mask_and_ack_eisa2_irq(unsigned int irq)
-{
-       disable_eisa2_irq(irq);
-
-       outb(0x20, EISA_INT2_CTRL);
-}
-
-static void end_eisa2_irq(unsigned int irq)
-{
-       if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS)))
-               enable_eisa2_irq(irq);
-}
-
-static struct irq_chip ip22_eisa2_irq_type = {
-       .name           = "IP22 EISA",
-       .startup        = startup_eisa2_irq,
-       .ack            = mask_and_ack_eisa2_irq,
-       .mask           = disable_eisa2_irq,
-       .mask_ack       = mask_and_ack_eisa2_irq,
-       .unmask         = enable_eisa2_irq,
-       .end            = end_eisa2_irq,
-};
-
 static struct irqaction eisa_action = {
        .handler        = ip22_eisa_intr,
        .name           = "EISA",
 };
 
-static struct irqaction cascade_action = {
-       .handler        = no_action,
-       .name           = "EISA cascade",
-};
-
 int __init ip22_eisa_init(void)
 {
        int i, c;
@@ -248,29 +134,13 @@ int __init ip22_eisa_init(void)
        outb(1, EISA_EXT_NMI_RESET_CTRL);
        udelay(50);     /* Wait long enough for the dust to settle */
        outb(0, EISA_EXT_NMI_RESET_CTRL);
-       outb(0x11, EISA_INT1_CTRL);
-       outb(0x11, EISA_INT2_CTRL);
-       outb(0, EISA_INT1_MASK);
-       outb(8, EISA_INT2_MASK);
-       outb(4, EISA_INT1_MASK);
-       outb(2, EISA_INT2_MASK);
-       outb(1, EISA_INT1_MASK);
-       outb(1, EISA_INT2_MASK);
-       outb(0xfb, EISA_INT1_MASK);
-       outb(0xff, EISA_INT2_MASK);
        outb(0, EISA_DMA2_WRITE_SINGLE);
 
-       for (i = SGINT_EISA; i < (SGINT_EISA + EISA_MAX_IRQ); i++) {
-               if (i < (SGINT_EISA + 8))
-                       set_irq_chip(i, &ip22_eisa1_irq_type);
-               else
-                       set_irq_chip(i, &ip22_eisa2_irq_type);
-       }
+       init_i8259_irqs();
 
        /* Cannot use request_irq because of kmalloc not being ready at such
         * an early stage. Yes, I've been bitten... */
        setup_irq(SGI_EISA_IRQ, &eisa_action);
-       setup_irq(SGINT_EISA + 2, &cascade_action);
 
        EISA_bus = 1;
        return 0;
index e19d60d5fcc1b9dbdcef9267d98d21b0818f0f92..0177566475d4cd42ae3a68d2eb1c73a4c39789c9 100644 (file)
        for (x=0; x<100000; x++) __asm__ __volatile__(""); })
 
 #define eeprom_cs_on(ptr) ({   \
-       *ptr &= ~EEPROM_DATO;   \
-       *ptr &= ~EEPROM_ECLK;   \
-       *ptr &= ~EEPROM_EPROT;  \
-       delay();                \
-       *ptr |= EEPROM_CSEL;    \
-       *ptr |= EEPROM_ECLK; })
+       __raw_writel(__raw_readl(ptr) & ~EEPROM_DATO, ptr);     \
+       __raw_writel(__raw_readl(ptr) & ~EEPROM_ECLK, ptr);     \
+       __raw_writel(__raw_readl(ptr) & ~EEPROM_EPROT, ptr);    \
+       delay();                                                \
+       __raw_writel(__raw_readl(ptr) | EEPROM_CSEL, ptr);      \
+       __raw_writel(__raw_readl(ptr) | EEPROM_ECLK, ptr); })
 
 
 #define eeprom_cs_off(ptr) ({  \
-       *ptr &= ~EEPROM_ECLK;   \
-       *ptr &= ~EEPROM_CSEL;   \
-       *ptr |= EEPROM_EPROT;   \
-       *ptr |= EEPROM_ECLK; })
+       __raw_writel(__raw_readl(ptr) & ~EEPROM_ECLK, ptr);     \
+       __raw_writel(__raw_readl(ptr) & ~EEPROM_CSEL, ptr);     \
+       __raw_writel(__raw_readl(ptr) | EEPROM_EPROT, ptr);     \
+       __raw_writel(__raw_readl(ptr) | EEPROM_ECLK, ptr); })
 
 #define        BITS_IN_COMMAND 11
 /*
@@ -60,15 +60,17 @@ static inline void eeprom_cmd(unsigned int *ctrl, unsigned cmd, unsigned reg)
        ser_cmd = cmd | (reg << (16 - BITS_IN_COMMAND));
        for (i = 0; i < BITS_IN_COMMAND; i++) {
                if (ser_cmd & (1<<15))  /* if high order bit set */
-                       writel(readl(ctrl) | EEPROM_DATO, ctrl);
+                       __raw_writel(__raw_readl(ctrl) | EEPROM_DATO, ctrl);
                else
-                       writel(readl(ctrl) & ~EEPROM_DATO, ctrl);
-               writel(readl(ctrl) & ~EEPROM_ECLK, ctrl);
-               writel(readl(ctrl) | EEPROM_ECLK, ctrl);
+                       __raw_writel(__raw_readl(ctrl) & ~EEPROM_DATO, ctrl);
+               __raw_writel(__raw_readl(ctrl) & ~EEPROM_ECLK, ctrl);
+               delay();
+               __raw_writel(__raw_readl(ctrl) | EEPROM_ECLK, ctrl);
+               delay();
                ser_cmd <<= 1;
        }
        /* see data sheet timing diagram */
-       writel(readl(ctrl) & ~EEPROM_DATO, ctrl);
+       __raw_writel(__raw_readl(ctrl) & ~EEPROM_DATO, ctrl);
 }
 
 unsigned short ip22_eeprom_read(unsigned int *ctrl, int reg)
@@ -76,18 +78,18 @@ unsigned short ip22_eeprom_read(unsigned int *ctrl, int reg)
        unsigned short res = 0;
        int i;
 
-       writel(readl(ctrl) & ~EEPROM_EPROT, ctrl);
+       __raw_writel(__raw_readl(ctrl) & ~EEPROM_EPROT, ctrl);
        eeprom_cs_on(ctrl);
        eeprom_cmd(ctrl, EEPROM_READ, reg);
 
        /* clock the data ouf of serial mem */
        for (i = 0; i < 16; i++) {
-               writel(readl(ctrl) & ~EEPROM_ECLK, ctrl);
+               __raw_writel(__raw_readl(ctrl) & ~EEPROM_ECLK, ctrl);
                delay();
-               writel(readl(ctrl) | EEPROM_ECLK, ctrl);
+               __raw_writel(__raw_readl(ctrl) | EEPROM_ECLK, ctrl);
                delay();
                res <<= 1;
-               if (readl(ctrl) & EEPROM_DATI)
+               if (__raw_readl(ctrl) & EEPROM_DATI)
                        res |= 1;
        }
 
index aab17ddd2f3012bfde1ecd847d2f6683f7205c6c..cab7cc22ab67407a8f2f37d4706a574c303ed3fb 100644 (file)
@@ -209,18 +209,18 @@ static unsigned long macepci_mask;
 
 static void enable_macepci_irq(unsigned int irq)
 {
-       macepci_mask |= MACEPCI_CONTROL_INT(irq - 9);
+       macepci_mask |= MACEPCI_CONTROL_INT(irq - MACEPCI_SCSI0_IRQ);
        mace->pci.control = macepci_mask;
-       crime_mask |= 1 << (irq - 1);
+       crime_mask |= 1 << (irq - CRIME_IRQ_BASE);
        crime->imask = crime_mask;
 }
 
 static void disable_macepci_irq(unsigned int irq)
 {
-       crime_mask &= ~(1 << (irq - 1));
+       crime_mask &= ~(1 << (irq - CRIME_IRQ_BASE));
        crime->imask = crime_mask;
        flush_crime_bus();
-       macepci_mask &= ~MACEPCI_CONTROL_INT(irq - 9);
+       macepci_mask &= ~MACEPCI_CONTROL_INT(irq - MACEPCI_SCSI0_IRQ);
        mace->pci.control = macepci_mask;
        flush_mace_bus();
 }
@@ -299,7 +299,7 @@ static void enable_maceisa_irq(unsigned int irq)
        pr_debug("crime_int %08x enabled\n", crime_int);
        crime_mask |= crime_int;
        crime->imask = crime_mask;
-       maceisa_mask |= 1 << (irq - 33);
+       maceisa_mask |= 1 << (irq - MACEISA_AUDIO_SW_IRQ);
        mace->perif.ctrl.imask = maceisa_mask;
 }
 
@@ -307,7 +307,7 @@ static void disable_maceisa_irq(unsigned int irq)
 {
        unsigned int crime_int = 0;
 
-       maceisa_mask &= ~(1 << (irq - 33));
+       maceisa_mask &= ~(1 << (irq - MACEISA_AUDIO_SW_IRQ));
         if (!(maceisa_mask & MACEISA_AUDIO_INT))
                crime_int |= MACE_AUDIO_INT;
         if (!(maceisa_mask & MACEISA_MISC_INT))
@@ -331,7 +331,7 @@ static void mask_and_ack_maceisa_irq(unsigned int irq)
        case MACEISA_SERIAL2_TDMAPR_IRQ:
                /* edge triggered */
                mace_int = mace->perif.ctrl.istat;
-               mace_int &= ~(1 << (irq - 33));
+               mace_int &= ~(1 << (irq - MACEISA_AUDIO_SW_IRQ));
                mace->perif.ctrl.istat = mace_int;
                break;
        }
@@ -359,13 +359,17 @@ static struct irq_chip ip32_maceisa_interrupt = {
 
 static void enable_mace_irq(unsigned int irq)
 {
-       crime_mask |= 1 << (irq - 1);
+       unsigned int bit = irq - CRIME_IRQ_BASE;
+
+       crime_mask |= (1 << bit);
        crime->imask = crime_mask;
 }
 
 static void disable_mace_irq(unsigned int irq)
 {
-       crime_mask &= ~(1 << (irq - 1));
+       unsigned int bit = irq - CRIME_IRQ_BASE;
+
+       crime_mask &= ~(1 << bit);
        crime->imask = crime_mask;
        flush_crime_bus();
 }
@@ -489,7 +493,7 @@ void __init arch_init_irq(void)
        mace->perif.ctrl.imask = 0;
 
        mips_cpu_irq_init();
-       for (irq = MIPS_CPU_IRQ_BASE + 8; irq <= IP32_IRQ_MAX; irq++) {
+       for (irq = CRIME_IRQ_BASE; irq <= IP32_IRQ_MAX; irq++) {
                switch (irq) {
                case MACE_VID_IN1_IRQ ... MACE_PCI_BRIDGE_IRQ:
                        set_irq_chip(irq, &ip32_mace_interrupt);
index eeb089f20c0db183902a47faa22c217aee4765ee..559acc09c819f3c53efbc8327514368f41b5af2e 100644 (file)
@@ -6,6 +6,7 @@ choice
 config CASIO_E55
        bool "CASIO CASSIOPEIA E-10/15/55/65"
        select CEVT_R4K
+       select CSRC_R4K
        select DMA_NONCOHERENT
        select IRQ_CPU
        select ISA
@@ -15,6 +16,7 @@ config CASIO_E55
 config IBM_WORKPAD
        bool "IBM WorkPad z50"
        select CEVT_R4K
+       select CSRC_R4K
        select DMA_NONCOHERENT
        select IRQ_CPU
        select ISA
@@ -24,6 +26,7 @@ config IBM_WORKPAD
 config NEC_CMBVR4133
        bool "NEC CMB-VR4133"
        select CEVT_R4K
+       select CSRC_R4K
        select DMA_NONCOHERENT
        select IRQ_CPU
        select HW_HAS_PCI
@@ -33,6 +36,7 @@ config NEC_CMBVR4133
 config TANBAC_TB022X
        bool "TANBAC VR4131 multichip module and TANBAC VR4131DIMM"
        select CEVT_R4K
+       select CSRC_R4K
        select DMA_NONCOHERENT
        select IRQ_CPU
        select HW_HAS_PCI
@@ -48,6 +52,7 @@ config TANBAC_TB022X
 config VICTOR_MPC30X
        bool "Victor MP-C303/304"
        select CEVT_R4K
+       select CSRC_R4K
        select DMA_NONCOHERENT
        select IRQ_CPU
        select HW_HAS_PCI
@@ -58,6 +63,7 @@ config VICTOR_MPC30X
 config ZAO_CAPCELLA
        bool "ZAO Networks Capcella"
        select CEVT_R4K
+       select CSRC_R4K
        select DMA_NONCOHERENT
        select IRQ_CPU
        select HW_HAS_PCI
index fcd333c391ec15c285b1c23e370b5c24cf289c0d..c64f3037a13b4a0fd33fc1faec3ab106bf13e8e2 100644 (file)
                };
 
                i2c@3000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
                        device_type = "i2c";
                        compatible = "fsl-i2c";
                        reg = <3000 100>;
                        interrupts = <e 8>;
                        interrupt-parent = < &ipic >;
                        dfsrr;
+
+                       rtc@68 {
+                               compatible = "dallas,ds1374";
+                               reg = <68>;
+                       };
                };
 
                serial@4500 {
                        reg = <700 100>;
                        device_type = "ipic";
                };
-               
+
                par_io@1400 {
                        reg = <1400 100>;
                        device_type = "par_io";
                                        3  5  1  0  2  0  /* MDC */
                                        0  d  2  0  1  0        /* RX_CLK (CLK9) */
                                        3 18  2  0  1  0        /* TX_CLK (CLK10) */
-                                       1  1  1  0  1  0        /* TxD1 */
                                        1  0  1  0  1  0        /* TxD0 */
                                        1  1  1  0  1  0        /* TxD1 */
                                        1  2  1  0  1  0        /* TxD2 */
                reg = <e0100000 480>;
                brg-frequency = <0>;
                bus-frequency = <BCD3D80>;
-               
+
                muram@10000 {
                        device_type = "muram";
                        ranges = <0 00010000 00004000>;
-       
+
                        data-only@0 {
                                reg = <0 4000>;
                        };
                        compatible = "ucc_geth";
                        model = "UCC";
                        device-id = <4>;
-                       reg = <3000 200>;
+                       reg = <3200 200>;
                        interrupts = <23>;
                        interrupt-parent = < &qeic >;
                        /*
index e5a84ef9f4b074318bf14e41fef517261a13d7c0..49363f89cb712494e64db301eafb7ebbbbfac187 100644 (file)
                };
 
                i2c@3000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
                        device_type = "i2c";
                        compatible = "fsl-i2c";
                        reg = <3000 100>;
                        interrupts = <e 8>;
                        interrupt-parent = < &ipic >;
                        dfsrr;
+
+                       rtc@68 {
+                               compatible = "dallas,ds1374";
+                               reg = <68>;
+                       };
                };
 
                i2c@3100 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
                        device_type = "i2c";
                        compatible = "fsl-i2c";
                        reg = <3100 100>;
index fbd1573c348b5601bab89a5cbca5b15d7b1521ca..0b2d2b588daa0c907523bb258e8aa11ec628fb25 100644 (file)
                };
 
                i2c@3000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
                        device_type = "i2c";
                        compatible = "fsl-i2c";
                        reg = <3000 100>;
                        interrupts = <e 8>;
                        interrupt-parent = < &ipic >;
                        dfsrr;
+
+                       rtc@68 {
+                               compatible = "dallas,ds1374";
+                               reg = <68>;
+                       };
                };
 
                i2c@3100 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
                        device_type = "i2c";
                        compatible = "fsl-i2c";
                        reg = <3100 100>;
index 3f9d15cf13e0121e919a037b8d686ea6425b9360..6c608de1fc1b53e499bf972a9d6dd48dc2a613db 100644 (file)
                clock-frequency = <1fca055>;
                interrupt-parent = <&mpic>;
                interrupts = <1b 2>;
-               interrupt-map-mask = <fb00 0 0 0>;
+               interrupt-map-mask = <ff00 0 0 1>;
                interrupt-map = <
                        // IDSEL 0x1c  USB
-                       e000 0 0 0 &i8259 c 2
-                       e100 0 0 0 &i8259 9 2
-                       e200 0 0 0 &i8259 a 2
-                       e300 0 0 0 &i8259 b 2
+                       e000 0 0 1 &i8259 c 2
+                       e100 0 0 1 &i8259 9 2
+                       e200 0 0 1 &i8259 a 2
+                       e300 0 0 1 &i8259 b 2
 
                        // IDSEL 0x1d  Audio
-                       e800 0 0 0 &i8259 6 2
+                       e800 0 0 1 &i8259 6 2
 
                        // IDSEL 0x1e Legacy
-                       f000 0 0 0 &i8259 7 2
-                       f100 0 0 0 &i8259 7 2
+                       f000 0 0 1 &i8259 7 2
+                       f100 0 0 1 &i8259 7 2
 
                        // IDSEL 0x1f IDE/SATA
-                       f800 0 0 0 &i8259 e 2
-                       f900 0 0 0 &i8259 5 2
+                       f800 0 0 1 &i8259 e 2
+                       f900 0 0 1 &i8259 5 2
                >;
 
                pcie@0 {
index d638deec76529720f39ad73b630cf45a73a1566e..0eb44fb9647dbccf50177d452d0486af529b51ae 100644 (file)
                clock-frequency = <1fca055>;
                interrupt-parent = <&mpic>;
                interrupts = <18 2>;
-               interrupt-map-mask = <fb00 0 0 0>;
+               interrupt-map-mask = <ff00 0 0 7>;
                interrupt-map = <
-                       /* IDSEL 0x11 - PCI slot 1 */
+                       /* IDSEL 0x11 func 0 - PCI slot 1 */
                        8800 0 0 1 &mpic 2 1
                        8800 0 0 2 &mpic 3 1
                        8800 0 0 3 &mpic 4 1
                        8800 0 0 4 &mpic 1 1
 
-                       /* IDSEL 0x12 - PCI slot 2 */
+                       /* IDSEL 0x11 func 1 - PCI slot 1 */
+                       8900 0 0 1 &mpic 2 1
+                       8900 0 0 2 &mpic 3 1
+                       8900 0 0 3 &mpic 4 1
+                       8900 0 0 4 &mpic 1 1
+
+                       /* IDSEL 0x11 func 2 - PCI slot 1 */
+                       8a00 0 0 1 &mpic 2 1
+                       8a00 0 0 2 &mpic 3 1
+                       8a00 0 0 3 &mpic 4 1
+                       8a00 0 0 4 &mpic 1 1
+
+                       /* IDSEL 0x11 func 3 - PCI slot 1 */
+                       8b00 0 0 1 &mpic 2 1
+                       8b00 0 0 2 &mpic 3 1
+                       8b00 0 0 3 &mpic 4 1
+                       8b00 0 0 4 &mpic 1 1
+
+                       /* IDSEL 0x11 func 4 - PCI slot 1 */
+                       8c00 0 0 1 &mpic 2 1
+                       8c00 0 0 2 &mpic 3 1
+                       8c00 0 0 3 &mpic 4 1
+                       8c00 0 0 4 &mpic 1 1
+
+                       /* IDSEL 0x11 func 5 - PCI slot 1 */
+                       8d00 0 0 1 &mpic 2 1
+                       8d00 0 0 2 &mpic 3 1
+                       8d00 0 0 3 &mpic 4 1
+                       8d00 0 0 4 &mpic 1 1
+
+                       /* IDSEL 0x11 func 6 - PCI slot 1 */
+                       8e00 0 0 1 &mpic 2 1
+                       8e00 0 0 2 &mpic 3 1
+                       8e00 0 0 3 &mpic 4 1
+                       8e00 0 0 4 &mpic 1 1
+
+                       /* IDSEL 0x11 func 7 - PCI slot 1 */
+                       8f00 0 0 1 &mpic 2 1
+                       8f00 0 0 2 &mpic 3 1
+                       8f00 0 0 3 &mpic 4 1
+                       8f00 0 0 4 &mpic 1 1
+
+                       /* IDSEL 0x12 func 0 - PCI slot 2 */
                        9000 0 0 1 &mpic 3 1
                        9000 0 0 2 &mpic 4 1
                        9000 0 0 3 &mpic 1 1
                        9000 0 0 4 &mpic 2 1
 
+                       /* IDSEL 0x12 func 1 - PCI slot 2 */
+                       9100 0 0 1 &mpic 3 1
+                       9100 0 0 2 &mpic 4 1
+                       9100 0 0 3 &mpic 1 1
+                       9100 0 0 4 &mpic 2 1
+
+                       /* IDSEL 0x12 func 2 - PCI slot 2 */
+                       9200 0 0 1 &mpic 3 1
+                       9200 0 0 2 &mpic 4 1
+                       9200 0 0 3 &mpic 1 1
+                       9200 0 0 4 &mpic 2 1
+
+                       /* IDSEL 0x12 func 3 - PCI slot 2 */
+                       9300 0 0 1 &mpic 3 1
+                       9300 0 0 2 &mpic 4 1
+                       9300 0 0 3 &mpic 1 1
+                       9300 0 0 4 &mpic 2 1
+
+                       /* IDSEL 0x12 func 4 - PCI slot 2 */
+                       9400 0 0 1 &mpic 3 1
+                       9400 0 0 2 &mpic 4 1
+                       9400 0 0 3 &mpic 1 1
+                       9400 0 0 4 &mpic 2 1
+
+                       /* IDSEL 0x12 func 5 - PCI slot 2 */
+                       9500 0 0 1 &mpic 3 1
+                       9500 0 0 2 &mpic 4 1
+                       9500 0 0 3 &mpic 1 1
+                       9500 0 0 4 &mpic 2 1
+
+                       /* IDSEL 0x12 func 6 - PCI slot 2 */
+                       9600 0 0 1 &mpic 3 1
+                       9600 0 0 2 &mpic 4 1
+                       9600 0 0 3 &mpic 1 1
+                       9600 0 0 4 &mpic 2 1
+
+                       /* IDSEL 0x12 func 7 - PCI slot 2 */
+                       9700 0 0 1 &mpic 3 1
+                       9700 0 0 2 &mpic 4 1
+                       9700 0 0 3 &mpic 1 1
+                       9700 0 0 4 &mpic 2 1
+
                        // IDSEL 0x1c  USB
-                       e000 0 0 0 &i8259 c 2
-                       e100 0 0 0 &i8259 9 2
-                       e200 0 0 0 &i8259 a 2
-                       e300 0 0 0 &i8259 b 2
+                       e000 0 0 1 &i8259 c 2
+                       e100 0 0 1 &i8259 9 2
+                       e200 0 0 1 &i8259 a 2
+                       e300 0 0 1 &i8259 b 2
 
                        // IDSEL 0x1d  Audio
-                       e800 0 0 0 &i8259 6 2
+                       e800 0 0 1 &i8259 6 2
 
                        // IDSEL 0x1e Legacy
-                       f000 0 0 0 &i8259 7 2
-                       f100 0 0 0 &i8259 7 2
+                       f000 0 0 1 &i8259 7 2
+                       f100 0 0 1 &i8259 7 2
 
                        // IDSEL 0x1f IDE/SATA
-                       f800 0 0 0 &i8259 e 2
-                       f900 0 0 0 &i8259 5 2
+                       f800 0 0 1 &i8259 e 2
+                       f900 0 0 1 &i8259 5 2
 
                        >;
 
index 367765937a06eb37c0aa026344911e58a7d76209..abb26dc425588aeb38782d7a1a0b459224568000 100644 (file)
                clock-frequency = <1fca055>;
                interrupt-parent = <&mpic>;
                interrupts = <18 2>;
-               interrupt-map-mask = <fb00 0 0 0>;
+               interrupt-map-mask = <ff00 0 0 7>;
                interrupt-map = <
-                       /* IDSEL 0x11 */
-                       8800 0 0 1 &i8259 9 2
-                       8800 0 0 2 &i8259 a 2
-                       8800 0 0 3 &i8259 b 2
-                       8800 0 0 4 &i8259 c 2
-
-                       /* IDSEL 0x12 */
-                       9000 0 0 1 &i8259 a 2
-                       9000 0 0 2 &i8259 b 2
-                       9000 0 0 3 &i8259 c 2
-                       9000 0 0 4 &i8259 9 2
+                       /* IDSEL 0x11 func 0 - PCI slot 1 */
+                       8800 0 0 1 &mpic 2 1
+                       8800 0 0 2 &mpic 3 1
+                       8800 0 0 3 &mpic 4 1
+                       8800 0 0 4 &mpic 1 1
+
+                       /* IDSEL 0x11 func 1 - PCI slot 1 */
+                       8900 0 0 1 &mpic 2 1
+                       8900 0 0 2 &mpic 3 1
+                       8900 0 0 3 &mpic 4 1
+                       8900 0 0 4 &mpic 1 1
+
+                       /* IDSEL 0x11 func 2 - PCI slot 1 */
+                       8a00 0 0 1 &mpic 2 1
+                       8a00 0 0 2 &mpic 3 1
+                       8a00 0 0 3 &mpic 4 1
+                       8a00 0 0 4 &mpic 1 1
+
+                       /* IDSEL 0x11 func 3 - PCI slot 1 */
+                       8b00 0 0 1 &mpic 2 1
+                       8b00 0 0 2 &mpic 3 1
+                       8b00 0 0 3 &mpic 4 1
+                       8b00 0 0 4 &mpic 1 1
+
+                       /* IDSEL 0x11 func 4 - PCI slot 1 */
+                       8c00 0 0 1 &mpic 2 1
+                       8c00 0 0 2 &mpic 3 1
+                       8c00 0 0 3 &mpic 4 1
+                       8c00 0 0 4 &mpic 1 1
+
+                       /* IDSEL 0x11 func 5 - PCI slot 1 */
+                       8d00 0 0 1 &mpic 2 1
+                       8d00 0 0 2 &mpic 3 1
+                       8d00 0 0 3 &mpic 4 1
+                       8d00 0 0 4 &mpic 1 1
+
+                       /* IDSEL 0x11 func 6 - PCI slot 1 */
+                       8e00 0 0 1 &mpic 2 1
+                       8e00 0 0 2 &mpic 3 1
+                       8e00 0 0 3 &mpic 4 1
+                       8e00 0 0 4 &mpic 1 1
+
+                       /* IDSEL 0x11 func 7 - PCI slot 1 */
+                       8f00 0 0 1 &mpic 2 1
+                       8f00 0 0 2 &mpic 3 1
+                       8f00 0 0 3 &mpic 4 1
+                       8f00 0 0 4 &mpic 1 1
+
+                       /* IDSEL 0x12 func 0 - PCI slot 2 */
+                       9000 0 0 1 &mpic 3 1
+                       9000 0 0 2 &mpic 4 1
+                       9000 0 0 3 &mpic 1 1
+                       9000 0 0 4 &mpic 2 1
+
+                       /* IDSEL 0x12 func 1 - PCI slot 2 */
+                       9100 0 0 1 &mpic 3 1
+                       9100 0 0 2 &mpic 4 1
+                       9100 0 0 3 &mpic 1 1
+                       9100 0 0 4 &mpic 2 1
+
+                       /* IDSEL 0x12 func 2 - PCI slot 2 */
+                       9200 0 0 1 &mpic 3 1
+                       9200 0 0 2 &mpic 4 1
+                       9200 0 0 3 &mpic 1 1
+                       9200 0 0 4 &mpic 2 1
+
+                       /* IDSEL 0x12 func 3 - PCI slot 2 */
+                       9300 0 0 1 &mpic 3 1
+                       9300 0 0 2 &mpic 4 1
+                       9300 0 0 3 &mpic 1 1
+                       9300 0 0 4 &mpic 2 1
+
+                       /* IDSEL 0x12 func 4 - PCI slot 2 */
+                       9400 0 0 1 &mpic 3 1
+                       9400 0 0 2 &mpic 4 1
+                       9400 0 0 3 &mpic 1 1
+                       9400 0 0 4 &mpic 2 1
+
+                       /* IDSEL 0x12 func 5 - PCI slot 2 */
+                       9500 0 0 1 &mpic 3 1
+                       9500 0 0 2 &mpic 4 1
+                       9500 0 0 3 &mpic 1 1
+                       9500 0 0 4 &mpic 2 1
+
+                       /* IDSEL 0x12 func 6 - PCI slot 2 */
+                       9600 0 0 1 &mpic 3 1
+                       9600 0 0 2 &mpic 4 1
+                       9600 0 0 3 &mpic 1 1
+                       9600 0 0 4 &mpic 2 1
+
+                       /* IDSEL 0x12 func 7 - PCI slot 2 */
+                       9700 0 0 1 &mpic 3 1
+                       9700 0 0 2 &mpic 4 1
+                       9700 0 0 3 &mpic 1 1
+                       9700 0 0 4 &mpic 2 1
 
                        // IDSEL 0x1c  USB
-                       e000 0 0 0 &i8259 c 2
-                       e100 0 0 0 &i8259 9 2
-                       e200 0 0 0 &i8259 a 2
-                       e300 0 0 0 &i8259 b 2
+                       e000 0 0 1 &i8259 c 2
+                       e100 0 0 1 &i8259 9 2
+                       e200 0 0 1 &i8259 a 2
+                       e300 0 0 1 &i8259 b 2
 
                        // IDSEL 0x1d  Audio
-                       e800 0 0 0 &i8259 6 2
+                       e800 0 0 1 &i8259 6 2
 
                        // IDSEL 0x1e Legacy
-                       f000 0 0 0 &i8259 7 2
-                       f100 0 0 0 &i8259 7 2
+                       f000 0 0 1 &i8259 7 2
+                       f100 0 0 1 &i8259 7 2
 
                        // IDSEL 0x1f IDE/SATA
-                       f800 0 0 0 &i8259 e 2
-                       f900 0 0 0 &i8259 5 2
+                       f800 0 0 1 &i8259 e 2
+                       f900 0 0 1 &i8259 5 2
                        >;
 
                pcie@0 {
index dd68d1818d6b3ce0fa55eec1c82936e731f4a56d..e069018276ca2e8f5f8ed35c4f61141bb7e8b8d0 100644 (file)
@@ -774,7 +774,53 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 # CONFIG_NEW_LEDS is not set
 # CONFIG_INFINIBAND is not set
 # CONFIG_EDAC is not set
-# CONFIG_RTC_CLASS is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+CONFIG_RTC_DRV_DS1374=y
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
 
 #
 # DMA Engine support
index 4f391028c79c5414cc964001f6feb8d464af706f..7a5b13f4140f66c3e55d0b5eb8ec501bdfb6a3cf 100644 (file)
@@ -685,8 +685,21 @@ CONFIG_I2C_MPC=y
 #
 # SPI support
 #
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+CONFIG_SPI_BITBANG=y
+CONFIG_SPI_MPC83xx=y
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_AT25 is not set
+# CONFIG_SPI_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 is not set
 # CONFIG_W1 is not set
 # CONFIG_POWER_SUPPLY is not set
 CONFIG_HWMON=y
@@ -710,6 +723,7 @@ CONFIG_HWMON=y
 # CONFIG_SENSORS_GL520SM is not set
 # CONFIG_SENSORS_IT87 is not set
 # CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM70 is not set
 # CONFIG_SENSORS_LM75 is not set
 # CONFIG_SENSORS_LM77 is not set
 # CONFIG_SENSORS_LM78 is not set
@@ -896,7 +910,24 @@ CONFIG_USB_MON=y
 # USB Gadget Support
 #
 # CONFIG_USB_GADGET is not set
-# CONFIG_MMC is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+# CONFIG_MMC_UNSAFE_RESUME is not set
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+# CONFIG_MMC_SDHCI is not set
+# CONFIG_MMC_WBSD is not set
+# CONFIG_MMC_TIFM_SD is not set
+CONFIG_MMC_SPI=y
 # CONFIG_NEW_LEDS is not set
 # CONFIG_INFINIBAND is not set
 # CONFIG_EDAC is not set
@@ -1101,9 +1132,9 @@ CONFIG_UCC=y
 CONFIG_BITREVERSE=y
 # CONFIG_CRC_CCITT is not set
 # CONFIG_CRC16 is not set
-# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC_ITU_T=y
 CONFIG_CRC32=y
-# CONFIG_CRC7 is not set
+CONFIG_CRC7=y
 # CONFIG_LIBCRC32C is not set
 CONFIG_PLIST=y
 CONFIG_HAS_IOMEM=y
index eb28dd85cb2b6b0b1f5b665f3aed6ecf3e416275..ba512d13f3a3ed4496ecd3f58fd7b8562778279c 100644 (file)
@@ -867,7 +867,7 @@ CONFIG_USB_EHCI_ROOT_HUB_TT=y
 CONFIG_USB_EHCI_FSL=y
 # CONFIG_USB_ISP116X_HCD is not set
 # CONFIG_USB_OHCI_HCD is not set
-# CONFIG_USB_UHCI_HCD is not set
+CONFIG_USB_UHCI_HCD=y
 # CONFIG_USB_SL811_HCD is not set
 # CONFIG_USB_R8A66597_HCD is not set
 
index 22b95462c9138c1726448ad21ec60e60b69cfe3e..9faa948c22ad71d5f9a631964942f57940aa0fc6 100644 (file)
@@ -760,14 +760,100 @@ CONFIG_USB_SUPPORT=y
 CONFIG_USB_ARCH_HAS_HCD=y
 CONFIG_USB_ARCH_HAS_OHCI=y
 CONFIG_USB_ARCH_HAS_EHCI=y
-# CONFIG_USB is not set
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+# CONFIG_USB_DEVICEFS is not set
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+CONFIG_USB_EHCI_HCD=y
+# CONFIG_USB_EHCI_SPLIT_ISO is not set
 CONFIG_USB_EHCI_ROOT_HUB_TT=y
+# CONFIG_USB_EHCI_TT_NEWSCHED is not set
 CONFIG_USB_EHCI_FSL=y
+# CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_OHCI_HCD is not set
+CONFIG_USB_UHCI_HCD=y
+# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
+
+#
+# USB Device Class drivers
+#
+# CONFIG_USB_ACM is not set
+# CONFIG_USB_PRINTER is not set
 
 #
 # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
 #
 
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=y
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_AUERSWALD is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGET is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_SISUSBVGA is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+
+#
+# USB DSL modem support
+#
+
 #
 # USB Gadget Support
 #
index e59a88e954865597775bcfcd0bf49fa846dea700..356f736a5d3d2875e58fd00fcf9c51ff84a247da 100644 (file)
@@ -721,7 +721,53 @@ CONFIG_USB_EHCI_FSL=y
 # CONFIG_NEW_LEDS is not set
 # CONFIG_INFINIBAND is not set
 # CONFIG_EDAC is not set
-# CONFIG_RTC_CLASS is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+CONFIG_RTC_DRV_DS1374=y
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
 
 #
 # DMA Engine support
index 75657528518e7339ab9bd72aeefff5120692f838..1b4d37570eb1f3891cac9f655a21fa5d44d980af 100644 (file)
@@ -773,7 +773,53 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 # CONFIG_NEW_LEDS is not set
 # CONFIG_INFINIBAND is not set
 # CONFIG_EDAC is not set
-# CONFIG_RTC_CLASS is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+CONFIG_RTC_DRV_DS1374=y
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
 
 #
 # DMA Engine support
index 883d8af9debd1549f653862324d10eefa382ab50..d665e7a797c0dc1e9f784096fd4b15d3058292fd 100644 (file)
@@ -768,7 +768,53 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 # CONFIG_NEW_LEDS is not set
 # CONFIG_INFINIBAND is not set
 # CONFIG_EDAC is not set
-# CONFIG_RTC_CLASS is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+CONFIG_RTC_DRV_DS1374=y
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
 
 #
 # DMA Engine support
index 2c8e756d19a39846db6f9c986dcce7ebbd099c39..d67bcd84f32966b50e9745cb847d092dee415556 100644 (file)
@@ -284,6 +284,10 @@ int main(void)
        DEFINE(CFG_SYSCALL_MAP32, offsetof(struct vdso_data, syscall_map_32));
        DEFINE(WTOM_CLOCK_SEC, offsetof(struct vdso_data, wtom_clock_sec));
        DEFINE(WTOM_CLOCK_NSEC, offsetof(struct vdso_data, wtom_clock_nsec));
+       DEFINE(CFG_ICACHE_BLOCKSZ, offsetof(struct vdso_data, icache_block_size));
+       DEFINE(CFG_DCACHE_BLOCKSZ, offsetof(struct vdso_data, dcache_block_size));
+       DEFINE(CFG_ICACHE_LOGBLOCKSZ, offsetof(struct vdso_data, icache_log_block_size));
+       DEFINE(CFG_DCACHE_LOGBLOCKSZ, offsetof(struct vdso_data, dcache_log_block_size));
 #ifdef CONFIG_PPC64
        DEFINE(CFG_SYSCALL_MAP64, offsetof(struct vdso_data, syscall_map_64));
        DEFINE(TVAL64_TV_SEC, offsetof(struct timeval, tv_sec));
index 214780798289212eda799ebcbdde8025602e7c53..053cac19f71414f3ac4956cdf4c66cb903af8294 100644 (file)
@@ -19,6 +19,9 @@
 #include <linux/init.h>
 #include <linux/capability.h>
 #include <linux/delay.h>
+#include <linux/smp.h>
+#include <linux/completion.h>
+#include <linux/cpumask.h>
 
 #include <asm/prom.h>
 #include <asm/rtas.h>
@@ -34,6 +37,8 @@
 #include <asm/lmb.h>
 #include <asm/udbg.h>
 #include <asm/syscalls.h>
+#include <asm/smp.h>
+#include <asm/atomic.h>
 
 struct rtas_t rtas = {
        .lock = SPIN_LOCK_UNLOCKED
@@ -41,8 +46,10 @@ struct rtas_t rtas = {
 EXPORT_SYMBOL(rtas);
 
 struct rtas_suspend_me_data {
-       long waiting;
-       struct rtas_args *args;
+       atomic_t working; /* number of cpus accessing this struct */
+       int token; /* ibm,suspend-me */
+       int error;
+       struct completion *complete; /* wait on this until working == 0 */
 };
 
 DEFINE_SPINLOCK(rtas_data_buf_lock);
@@ -631,18 +638,18 @@ void rtas_halt(void)
 /* Must be in the RMO region, so we place it here */
 static char rtas_os_term_buf[2048];
 
-void rtas_os_term(char *str)
+void rtas_panic_msg(char *str)
 {
-       int status;
+       snprintf(rtas_os_term_buf, 2048, "OS panic: %s", str);
+}
 
-       if (panic_timeout)
-               return;
+void rtas_os_term(void)
+{
+       int status;
 
        if (RTAS_UNKNOWN_SERVICE == rtas_token("ibm,os-term"))
                return;
 
-       snprintf(rtas_os_term_buf, 2048, "OS panic: %s", str);
-
        do {
                status = rtas_call(rtas_token("ibm,os-term"), 1, 1, NULL,
                                   __pa(rtas_os_term_buf));
@@ -657,50 +664,62 @@ static int ibm_suspend_me_token = RTAS_UNKNOWN_SERVICE;
 #ifdef CONFIG_PPC_PSERIES
 static void rtas_percpu_suspend_me(void *info)
 {
-       int i;
        long rc;
-       long flags;
+       unsigned long msr_save;
+       int cpu;
        struct rtas_suspend_me_data *data =
                (struct rtas_suspend_me_data *)info;
 
-       /*
-        * We use "waiting" to indicate our state.  As long
-        * as it is >0, we are still trying to all join up.
-        * If it goes to 0, we have successfully joined up and
-        * one thread got H_CONTINUE.  If any error happens,
-        * we set it to <0.
-        */
-       local_irq_save(flags);
-       do {
-               rc = plpar_hcall_norets(H_JOIN);
-               smp_rmb();
-       } while (rc == H_SUCCESS && data->waiting > 0);
-       if (rc == H_SUCCESS)
-               goto out;
+       atomic_inc(&data->working);
+
+       /* really need to ensure MSR.EE is off for H_JOIN */
+       msr_save = mfmsr();
+       mtmsr(msr_save & ~(MSR_EE));
+
+       rc = plpar_hcall_norets(H_JOIN);
 
-       if (rc == H_CONTINUE) {
-               data->waiting = 0;
-               data->args->args[data->args->nargs] =
-                       rtas_call(ibm_suspend_me_token, 0, 1, NULL);
-               for_each_possible_cpu(i)
-                       plpar_hcall_norets(H_PROD,i);
+       mtmsr(msr_save);
+
+       if (rc == H_SUCCESS) {
+               /* This cpu was prodded and the suspend is complete. */
+               goto out;
+       } else if (rc == H_CONTINUE) {
+               /* All other cpus are in H_JOIN, this cpu does
+                * the suspend.
+                */
+               printk(KERN_DEBUG "calling ibm,suspend-me on cpu %i\n",
+                      smp_processor_id());
+               data->error = rtas_call(data->token, 0, 1, NULL);
+
+               if (data->error)
+                       printk(KERN_DEBUG "ibm,suspend-me returned %d\n",
+                              data->error);
        } else {
-               data->waiting = -EBUSY;
-               printk(KERN_ERR "Error on H_JOIN hypervisor call\n");
+               printk(KERN_ERR "H_JOIN on cpu %i failed with rc = %ld\n",
+                      smp_processor_id(), rc);
+               data->error = rc;
        }
-
+       /* This cpu did the suspend or got an error; in either case,
+        * we need to prod all other other cpus out of join state.
+        * Extra prods are harmless.
+        */
+       for_each_online_cpu(cpu)
+               plpar_hcall_norets(H_PROD, get_hard_smp_processor_id(cpu));
 out:
-       local_irq_restore(flags);
-       return;
+       if (atomic_dec_return(&data->working) == 0)
+               complete(data->complete);
 }
 
 static int rtas_ibm_suspend_me(struct rtas_args *args)
 {
-       int i;
        long state;
        long rc;
        unsigned long retbuf[PLPAR_HCALL_BUFSIZE];
        struct rtas_suspend_me_data data;
+       DECLARE_COMPLETION_ONSTACK(done);
+
+       if (!rtas_service_present("ibm,suspend-me"))
+               return -ENOSYS;
 
        /* Make sure the state is valid */
        rc = plpar_hcall(H_VASI_STATE, retbuf,
@@ -721,25 +740,23 @@ static int rtas_ibm_suspend_me(struct rtas_args *args)
                return 0;
        }
 
-       data.waiting = 1;
-       data.args = args;
+       atomic_set(&data.working, 0);
+       data.token = rtas_token("ibm,suspend-me");
+       data.error = 0;
+       data.complete = &done;
 
        /* Call function on all CPUs.  One of us will make the
         * rtas call
         */
        if (on_each_cpu(rtas_percpu_suspend_me, &data, 1, 0))
-               data.waiting = -EINVAL;
+               data.error = -EINVAL;
 
-       if (data.waiting != 0)
-               printk(KERN_ERR "Error doing global join\n");
+       wait_for_completion(&done);
 
-       /* Prod each CPU.  This won't hurt, and will wake
-        * anyone we successfully put to sleep with H_JOIN.
-        */
-       for_each_possible_cpu(i)
-               plpar_hcall_norets(H_PROD, i);
+       if (data.error != 0)
+               printk(KERN_ERR "Error doing global join\n");
 
-       return data.waiting;
+       return data.error;
 }
 #else /* CONFIG_PPC_PSERIES */
 static int rtas_ibm_suspend_me(struct rtas_args *args)
index c0d77723ba1141124733e05ab64b93343957a7fe..a925a8eae121e1946c8d39959775b4b07de1c561 100644 (file)
@@ -241,8 +241,9 @@ void account_system_vtime(struct task_struct *tsk)
                /* deltascaled includes both user and system time.
                 * Hence scale it based on the purr ratio to estimate
                 * the system time */
-               deltascaled = deltascaled * get_paca()->system_time /
-                       (get_paca()->system_time + get_paca()->user_time);
+               if (get_paca()->user_time)
+                       deltascaled = deltascaled * get_paca()->system_time /
+                            (get_paca()->system_time + get_paca()->user_time);
                delta += get_paca()->system_time;
                get_paca()->system_time = 0;
        }
index 2322ba5cce4ce23c3eca48336686518671d05283..3702df7dc567e160f08cfe09b5b825b5298a0f94 100644 (file)
@@ -699,11 +699,22 @@ static int __init vdso_init(void)
        vdso_data->icache_size = ppc64_caches.isize;
        vdso_data->icache_line_size = ppc64_caches.iline_size;
 
+       /* XXXOJN: Blocks should be added to ppc64_caches and used instead */
+       vdso_data->dcache_block_size = ppc64_caches.dline_size;
+       vdso_data->icache_block_size = ppc64_caches.iline_size;
+       vdso_data->dcache_log_block_size = ppc64_caches.log_dline_size;
+       vdso_data->icache_log_block_size = ppc64_caches.log_iline_size;
+
        /*
         * Calculate the size of the 64 bits vDSO
         */
        vdso64_pages = (&vdso64_end - &vdso64_start) >> PAGE_SHIFT;
        DBG("vdso64_kbase: %p, 0x%x pages\n", vdso64_kbase, vdso64_pages);
+#else
+       vdso_data->dcache_block_size = L1_CACHE_BYTES;
+       vdso_data->dcache_log_block_size = L1_CACHE_SHIFT;
+       vdso_data->icache_block_size = L1_CACHE_BYTES;
+       vdso_data->icache_log_block_size = L1_CACHE_SHIFT;
 #endif /* CONFIG_PPC64 */
 
 
index 9cb319992c3888dab15552977dab9dd4e0c4ec6e..1ba6feb71b313fd1b1208cc827f617a8f2692390 100644 (file)
  *
  * Flushes the data cache & invalidate the instruction cache for the
  * provided range [start, end[
- *
- * Note: all CPUs supported by this kernel have a 128 bytes cache
- * line size so we don't have to peek that info from the datapage
  */
 V_FUNCTION_BEGIN(__kernel_sync_dicache)
   .cfi_startproc
-       li      r5,127
-       andc    r6,r3,r5                /* round low to line bdy */
+       mflr    r12
+  .cfi_register lr,r12
+       mr      r11,r3
+       bl      __get_datapage@local
+       mtlr    r12
+       mr      r10,r3
+
+       lwz     r7,CFG_DCACHE_BLOCKSZ(r10)
+       addi    r5,r7,-1
+       andc    r6,r11,r5               /* round low to line bdy */
        subf    r8,r6,r4                /* compute length */
        add     r8,r8,r5                /* ensure we get enough */
-       srwi.   r8,r8,7                 /* compute line count */
+       lwz     r9,CFG_DCACHE_LOGBLOCKSZ(r10)
+       srw.    r8,r8,r9                /* compute line count */
        crclr   cr0*4+so
        beqlr                           /* nothing to do? */
        mtctr   r8
-       mr      r3,r6
-1:     dcbst   0,r3
-       addi    r3,r3,128
+1:     dcbst   0,r6
+       add     r6,r6,r7
        bdnz    1b
        sync
+
+/* Now invalidate the instruction cache */
+
+       lwz     r7,CFG_ICACHE_BLOCKSZ(r10)
+       addi    r5,r7,-1
+       andc    r6,r11,r5               /* round low to line bdy */
+       subf    r8,r6,r4                /* compute length */
+       add     r8,r8,r5
+       lwz     r9,CFG_ICACHE_LOGBLOCKSZ(r10)
+       srw.    r8,r8,r9                /* compute line count */
+       crclr   cr0*4+so
+       beqlr                           /* nothing to do? */
        mtctr   r8
-1:     icbi    0,r6
-       addi    r6,r6,128
-       bdnz    1b
+2:     icbi    0,r6
+       add     r6,r6,r7
+       bdnz    2b
        isync
        li      r3,0
        blr
index 66a36d3cc6ad13ae02173f6b41a52fba3e043086..69c5af2b3c96cfd46a85a2c250a9727e585fcabf 100644 (file)
  *
  * Flushes the data cache & invalidate the instruction cache for the
  * provided range [start, end[
- *
- * Note: all CPUs supported by this kernel have a 128 bytes cache
- * line size so we don't have to peek that info from the datapage
  */
 V_FUNCTION_BEGIN(__kernel_sync_dicache)
   .cfi_startproc
-       li      r5,127
-       andc    r6,r3,r5                /* round low to line bdy */
+       mflr    r12
+  .cfi_register lr,r12
+       mr      r11,r3
+       bl      V_LOCAL_FUNC(__get_datapage)
+       mtlr    r12
+       mr      r10,r3
+
+       lwz     r7,CFG_DCACHE_BLOCKSZ(r10)
+       addi    r5,r7,-1
+       andc    r6,r11,r5               /* round low to line bdy */
        subf    r8,r6,r4                /* compute length */
        add     r8,r8,r5                /* ensure we get enough */
-       srwi.   r8,r8,7                 /* compute line count */
+       lwz     r9,CFG_DCACHE_LOGBLOCKSZ(r10)
+       srw.    r8,r8,r9                /* compute line count */
        crclr   cr0*4+so
        beqlr                           /* nothing to do? */
        mtctr   r8
-       mr      r3,r6
-1:     dcbst   0,r3
-       addi    r3,r3,128
+1:     dcbst   0,r6
+       add     r6,r6,r7
        bdnz    1b
        sync
+
+/* Now invalidate the instruction cache */
+
+       lwz     r7,CFG_ICACHE_BLOCKSZ(r10)
+       addi    r5,r7,-1
+       andc    r6,r11,r5               /* round low to line bdy */
+       subf    r8,r6,r4                /* compute length */
+       add     r8,r8,r5
+       lwz     r9,CFG_ICACHE_LOGBLOCKSZ(r10)
+       srw.    r8,r8,r9                /* compute line count */
+       crclr   cr0*4+so
+       beqlr                           /* nothing to do? */
        mtctr   r8
-1:     icbi    0,r6
-       addi    r6,r6,128
-       bdnz    1b
+2:     icbi    0,r6
+       add     r6,r6,r7
+       bdnz    2b
        isync
        li      r3,0
        blr
index 81eb96ec13b2de917bb8d12666aeed587f4b8838..5402fb6b3aae2b49377d56016996e02e7ded55b8 100644 (file)
@@ -464,7 +464,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
                 * we invalidate the TLB here, thus avoiding dcbst
                 * misbehaviour.
                 */
-               _tlbie(address);
+               _tlbie(address, 0 /* 8xx doesn't care about PID */);
 #endif
                if (!PageReserved(page)
                    && !test_bit(PG_arch_1, &page->flags)) {
index eb3a732e91db28a5bb17b2c1711992906e597ae4..ebfd13dc9d19f1a8d437d12adb06269a385855b4 100644 (file)
@@ -56,7 +56,7 @@ extern unsigned long total_lowmem;
  * architectures.  -- Dan
  */
 #if defined(CONFIG_8xx)
-#define flush_HPTE(X, va, pg)  _tlbie(va)
+#define flush_HPTE(X, va, pg)  _tlbie(va, 0 /* 8xx doesn't care about PID */)
 #define MMU_init_hw()          do { } while(0)
 #define mmu_mapin_ram()                (0UL)
 
index 9e85bda762166a7c16e54cabcab97114815fbbf7..50448d5de9d247c9657c66a85e76f225483fc4f4 100644 (file)
@@ -20,6 +20,7 @@
 #include <asm/lmb.h>
 #include <asm/abs_addr.h>
 #include <asm/firmware.h>
+#include <asm/iseries/hv_call.h>
 
 struct stab_entry {
        unsigned long esid_data;
index eb0c136b1c4408f2bd64fe8c403389a17a7c8440..ff6db243179887cccc3f5da9da5c564e2b1fb418 100644 (file)
  */
 
 #include <linux/init.h>
+#include <linux/of_platform.h>
+
 #include <asm/machdep.h>
 #include <asm/prom.h>
 #include <asm/udbg.h>
 #include <asm/time.h>
 #include <asm/uic.h>
-#include <asm/of_platform.h>
 
 static struct of_device_id walnut_of_bus[] = {
        { .compatible = "ibm,plb3", },
index 470e1a3fd755cced07b812f6507908daab22fcd1..be23f112184f66be1b175cc612f5a7ae2e142ec1 100644 (file)
  * option) any later version.
  */
 #include <linux/init.h>
+#include <linux/of_platform.h>
+
 #include <asm/machdep.h>
 #include <asm/prom.h>
 #include <asm/udbg.h>
 #include <asm/time.h>
 #include <asm/uic.h>
-#include <asm/of_platform.h>
 #include "44x.h"
 
 static struct of_device_id bamboo_of_bus[] = {
index 40e18fcb666c09ba0f1d7822ded77d560182cc5c..6cd3476767cc3b8583332dd8e351166ebc761d97 100644 (file)
  */
 
 #include <linux/init.h>
+#include <linux/of_platform.h>
+
 #include <asm/machdep.h>
 #include <asm/prom.h>
 #include <asm/udbg.h>
 #include <asm/time.h>
 #include <asm/uic.h>
-#include <asm/of_platform.h>
 
 #include "44x.h"
 
index 30700b31d43b7687d94495e0653fffb0e7c88a9c..21a9dd14f297c87175e81d88c1b6f997aed03ab7 100644 (file)
  * option) any later version.
  */
 #include <linux/init.h>
+#include <linux/of_platform.h>
+
 #include <asm/machdep.h>
 #include <asm/prom.h>
 #include <asm/udbg.h>
 #include <asm/time.h>
 #include <asm/uic.h>
-#include <asm/of_platform.h>
 #include "44x.h"
 
 static struct of_device_id sequoia_of_bus[] = {
index 972fa8528a8c606614767ec12f2539c8c001cad6..39ee7a13b25a61622dab10bf9f95c75f9299b03b 100644 (file)
@@ -90,10 +90,11 @@ static void __init mpc832x_sys_setup_arch(void)
 
        if ((np = of_find_compatible_node(NULL, "network", "ucc_geth"))
                        != NULL){
-               /* Reset the Ethernet PHY */
-               bcsr_regs[9] &= ~0x20;
+               /* Reset the Ethernet PHYs */
+#define BCSR8_FETH_RST 0x50
+               bcsr_regs[8] &= ~BCSR8_FETH_RST;
                udelay(1000);
-               bcsr_regs[9] |= 0x20;
+               bcsr_regs[8] |= BCSR8_FETH_RST;
                iounmap(bcsr_regs);
                of_node_put(np);
        }
@@ -145,30 +146,6 @@ static void __init mpc832x_sys_init_IRQ(void)
 #endif                         /* CONFIG_QUICC_ENGINE */
 }
 
-#if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374)
-extern ulong ds1374_get_rtc_time(void);
-extern int ds1374_set_rtc_time(ulong);
-
-static int __init mpc832x_rtc_hookup(void)
-{
-       struct timespec tv;
-
-       if (!machine_is(mpc832x_mds))
-               return 0;
-
-       ppc_md.get_rtc_time = ds1374_get_rtc_time;
-       ppc_md.set_rtc_time = ds1374_set_rtc_time;
-
-       tv.tv_nsec = 0;
-       tv.tv_sec = (ppc_md.get_rtc_time) ();
-       do_settimeofday(&tv);
-
-       return 0;
-}
-
-late_initcall(mpc832x_rtc_hookup);
-#endif
-
 /*
  * Called very early, MMU is off, device-tree isn't unflattened
  */
index fbca336aa0ae8466f0b94cd0c96adf57bca636f3..d4bd04001b99567035247758b1d22919955b56ae 100644 (file)
  */
 
 #include <linux/pci.h>
+#include <linux/interrupt.h>
 #include <linux/spi/spi.h>
+#include <linux/spi/mmc_spi.h>
+#include <linux/mmc/host.h>
 
 #include <asm/of_platform.h>
 #include <asm/time.h>
@@ -46,15 +49,16 @@ static void mpc83xx_spi_deactivate_cs(u8 cs, u8 polarity)
        par_io_data_set(3, 13, !polarity);
 }
 
+static struct mmc_spi_platform_data mpc832x_mmc_pdata = {
+       .ocr_mask = MMC_VDD_33_34,
+};
+
 static struct spi_board_info mpc832x_spi_boardinfo = {
        .bus_num = 0x4c0,
        .chip_select = 0,
        .max_speed_hz = 50000000,
-       /*
-        * XXX: This is spidev (spi in userspace) stub, should
-        * be replaced by "mmc_spi" when mmc_spi will hit mainline.
-        */
-       .modalias = "spidev",
+       .modalias = "mmc_spi",
+       .platform_data = &mpc832x_mmc_pdata,
 };
 
 static int __init mpc832x_spi_init(void)
index 00aed7c2269ea4e56cc74950cb3ccf92736d04a8..a81bb3ce6b94460faf95cffe7f8a88e45696e289 100644 (file)
@@ -106,30 +106,6 @@ static void __init mpc834x_mds_init_IRQ(void)
        ipic_set_default_priority();
 }
 
-#if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374)
-extern ulong ds1374_get_rtc_time(void);
-extern int ds1374_set_rtc_time(ulong);
-
-static int __init mpc834x_rtc_hookup(void)
-{
-       struct timespec tv;
-
-       if (!machine_is(mpc834x_mds))
-               return 0;
-
-       ppc_md.get_rtc_time = ds1374_get_rtc_time;
-       ppc_md.set_rtc_time = ds1374_set_rtc_time;
-
-       tv.tv_nsec = 0;
-       tv.tv_sec = (ppc_md.get_rtc_time) ();
-       do_settimeofday(&tv);
-
-       return 0;
-}
-
-late_initcall(mpc834x_rtc_hookup);
-#endif
-
 /*
  * Called very early, MMU is off, device-tree isn't unflattened
  */
index 0f3855c95ff5c6c0a4bc5d1caf78bfb2d6561be0..e40012f8f4886b323a83442baabf5dc720185d8a 100644 (file)
@@ -96,14 +96,39 @@ static void __init mpc836x_mds_setup_arch(void)
 
        if ((np = of_find_compatible_node(NULL, "network", "ucc_geth"))
                        != NULL){
+               uint svid;
+
                /* Reset the Ethernet PHY */
-               bcsr_regs[9] &= ~0x20;
+#define BCSR9_GETHRST 0x20
+               clrbits8(&bcsr_regs[9], BCSR9_GETHRST);
                udelay(1000);
-               bcsr_regs[9] |= 0x20;
+               setbits8(&bcsr_regs[9], BCSR9_GETHRST);
+
+               /* handle mpc8360ea rev.2.1 erratum 2: RGMII Timing */
+               svid = mfspr(SPRN_SVR);
+               if (svid == 0x80480021) {
+                       void __iomem *immap;
+
+                       immap = ioremap(get_immrbase() + 0x14a8, 8);
+
+                       /*
+                        * IMMR + 0x14A8[4:5] = 11 (clk delay for UCC 2)
+                        * IMMR + 0x14A8[18:19] = 11 (clk delay for UCC 1)
+                        */
+                       setbits32(immap, 0x0c003000);
+
+                       /*
+                        * IMMR + 0x14AC[20:27] = 10101010
+                        * (data delay for both UCC's)
+                        */
+                       clrsetbits_be32(immap + 4, 0xff0, 0xaa0);
+
+                       iounmap(immap);
+               }
+
                iounmap(bcsr_regs);
                of_node_put(np);
        }
-
 #endif                         /* CONFIG_QUICC_ENGINE */
 }
 
@@ -152,30 +177,6 @@ static void __init mpc836x_mds_init_IRQ(void)
 #endif                         /* CONFIG_QUICC_ENGINE */
 }
 
-#if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374)
-extern ulong ds1374_get_rtc_time(void);
-extern int ds1374_set_rtc_time(ulong);
-
-static int __init mpc8360_rtc_hookup(void)
-{
-       struct timespec tv;
-
-       if (!machine_is(mpc836x_mds))
-               return 0;
-
-       ppc_md.get_rtc_time = ds1374_get_rtc_time;
-       ppc_md.set_rtc_time = ds1374_set_rtc_time;
-
-       tv.tv_nsec = 0;
-       tv.tv_sec = (ppc_md.get_rtc_time) ();
-       do_settimeofday(&tv);
-
-       return 0;
-}
-
-late_initcall(mpc8360_rtc_hookup);
-#endif
-
 /*
  * Called very early, MMU is off, device-tree isn't unflattened
  */
index eafe7605cdaca6f3d10b8966c8682ceeec0167c3..b45160f8d084b3e248abfeaa1853b6dabfa2cb7e 100644 (file)
@@ -130,7 +130,7 @@ int mpc831x_usb_cfg(void)
        out_be32(immap + MPC83XX_SCCR_OFFS, temp);
 
        /* Configure pin mux for ULPI.  There is no pin mux for UTMI */
-       if (!strcmp(prop, "ulpi")) {
+       if (prop && !strcmp(prop, "ulpi")) {
                temp = in_be32(immap + MPC83XX_SICRL_OFFS);
                temp &= ~MPC831X_SICRL_USB_MASK;
                temp |= MPC831X_SICRL_USB_ULPI;
@@ -153,13 +153,13 @@ int mpc831x_usb_cfg(void)
        usb_regs = ioremap(res.start, res.end - res.start + 1);
 
        /* Using on-chip PHY */
-       if (!strcmp(prop, "utmi_wide") ||
-                       !strcmp(prop, "utmi")) {
+       if (prop && (!strcmp(prop, "utmi_wide") ||
+                    !strcmp(prop, "utmi"))) {
                /* Set UTMI_PHY_EN, REFSEL to 48MHZ */
                out_be32(usb_regs + FSL_USB2_CONTROL_OFFS,
                                CONTROL_UTMI_PHY_EN | CONTROL_REFSEL_48MHZ);
        /* Using external UPLI PHY */
-       } else if (!strcmp(prop, "ulpi")) {
+       } else if (prop && !strcmp(prop, "ulpi")) {
                /* Set PHY_CLK_SEL to ULPI */
                temp = CONTROL_PHY_CLK_SEL_ULPI;
 #ifdef CONFIG_USB_OTG
index 0966d093db4321925baf4fb6057c1760c01a1bf6..c0e968a4c21116d5ffd4a8bfb8ed7182cc79f15d 100644 (file)
@@ -171,6 +171,7 @@ static int spufs_rmdir(struct inode *parent, struct dentry *dir)
 {
        /* remove all entries */
        spufs_prune_dir(dir);
+       d_drop(dir);
 
        return simple_rmdir(parent, dir);
 }
index e484cac750955bbdec66800ab00fb832136dfc81..653a5eb91c905049610d7168044c26da5f9e642e 100644 (file)
@@ -144,6 +144,7 @@ static int __init prpmc2800_probe(void)
                strncpy(prpmc2800_platform_name, m,
                        min((int)len, PLATFORM_NAME_MAX - 1));
 
+       _set_L2CR(_get_L2CR() | L2CR_L2E);
        return 1;
 }
 
index 3a5d112af5e096632657e59dce37252ef5b7a243..3d62060498b4256151a3e63aa28e94350552fcec 100644 (file)
@@ -214,7 +214,7 @@ static __init void pas_init_IRQ(void)
        printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr);
 
        mpic = mpic_alloc(mpic_node, openpic_addr,
-                         MPIC_PRIMARY|MPIC_LARGE_VECTORS|MPIC_WANTS_RESET,
+                         MPIC_PRIMARY|MPIC_LARGE_VECTORS,
                          0, 0, " PAS-OPIC  ");
        BUG_ON(!mpic);
 
index 16e4e401b8203f1668dd83c0c0ee0d1bfb8b54d5..306a9d07491de3ea786695ba205472c1155589d0 100644 (file)
@@ -21,7 +21,7 @@ config PPC_SPLPAR
 
 config EEH
        bool "PCI Extended Error Handling (EEH)" if EMBEDDED
-       depends on PPC_PSERIES
+       depends on PPC_PSERIES && PCI
        default y if !EMBEDDED
 
 config SCANLOG
index fdb9b1c8f977e06704c714ff5d0c54366923fef4..fdeefe54ea91356fa4ad9d3526577a751a4fc022 100644 (file)
@@ -507,7 +507,8 @@ define_machine(pseries) {
        .restart                = rtas_restart,
        .power_off              = pSeries_power_off,
        .halt                   = rtas_halt,
-       .panic                  = rtas_os_term,
+       .panic                  = rtas_panic_msg,
+       .machine_shutdown       = rtas_os_term,
        .get_boot_time          = rtas_get_boot_time,
        .get_rtc_time           = rtas_get_rtc_time,
        .set_rtc_time           = rtas_set_rtc_time,
index 5149716c734d9cf605ed9d8cc2cff65f7c7cee9b..847a5496b86985b194c1c46fbd8dcd26ccdfa89f 100644 (file)
@@ -97,6 +97,22 @@ static void uic_ack_irq(unsigned int virq)
        spin_unlock_irqrestore(&uic->lock, flags);
 }
 
+static void uic_mask_ack_irq(unsigned int virq)
+{
+       struct uic *uic = get_irq_chip_data(virq);
+       unsigned int src = uic_irq_to_hw(virq);
+       unsigned long flags;
+       u32 er, sr;
+
+       sr = 1 << (31-src);
+       spin_lock_irqsave(&uic->lock, flags);
+       er = mfdcr(uic->dcrbase + UIC_ER);
+       er &= ~sr;
+       mtdcr(uic->dcrbase + UIC_ER, er);
+       mtdcr(uic->dcrbase + UIC_SR, sr);
+       spin_unlock_irqrestore(&uic->lock, flags);
+}
+
 static int uic_set_irq_type(unsigned int virq, unsigned int flow_type)
 {
        struct uic *uic = get_irq_chip_data(virq);
@@ -152,7 +168,7 @@ static struct irq_chip uic_irq_chip = {
        .typename       = " UIC  ",
        .unmask         = uic_unmask_irq,
        .mask           = uic_mask_irq,
-/*     .mask_ack       = uic_mask_irq_and_ack, */
+       .mask_ack       = uic_mask_ack_irq,
        .ack            = uic_ack_irq,
        .set_type       = uic_set_irq_type,
 };
index aac88c2f3db9d7d07b9b6e63e431f4fdb6a328b1..5255bd80aa6b2ec10fd7cb2c6aa5bd5d978368f7 100644 (file)
@@ -312,7 +312,14 @@ early_init(int r3, int r4, int r5)
         * Identify the CPU type and fix up code sections
         * that depend on which cpu we have.
         */
+#if defined(CONFIG_440EP) && defined(CONFIG_PPC_FPU)
+       /* We pass the virtual PVR here for 440EP as 440EP and 440GR have
+        * identical PVRs and there is no reliable way to check for the FPU
+        */
+       spec = identify_cpu(offset, (mfspr(SPRN_PVR) | 0x8));
+#else
        spec = identify_cpu(offset, mfspr(SPRN_PVR));
+#endif
        do_feature_fixups(spec->cpu_features,
                          PTRRELOC(&__start___ftr_fixup),
                          PTRRELOC(&__stop___ftr_fixup));
index 390dd1995c2a4ee2e7cbe4267227b76069e02eba..dd898d32480ef981d65267637da2bfecfa083641 100644 (file)
@@ -561,7 +561,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
                 * That means the zeroed TLB has to be invalidated
                 * whenever a page miss occurs.
                 */
-               _tlbie(address);
+               _tlbie(address, 0 /* 8xx doesn't care about PID */);
 #endif
                if (!PageReserved(page)
                    && !test_bit(PG_arch_1, &page->flags)) {
index f1d4f2109a994a44eada0c0736f58c1143ff819a..b298b60c202f814281ea68b21dc6c5464b3b48c9 100644 (file)
@@ -49,7 +49,7 @@ extern unsigned int num_tlbcam_entries;
  * architectures.  -- Dan
  */
 #if defined(CONFIG_8xx)
-#define flush_HPTE(X, va, pg)  _tlbie(va)
+#define flush_HPTE(X, va, pg)  _tlbie(va, 0 /* 8xx doesn't care about PID */)
 #define MMU_init_hw()          do { } while(0)
 #define mmu_mapin_ram()                (0UL)
 
index a83b0baea011f17811cda760540dab989e1f631c..66a44ff0d9263acdc1732e358ab82f60ddf2ecf6 100644 (file)
@@ -211,6 +211,7 @@ static void __init yucca_setup_pcie_fpga_rootpoint(int port)
                break;
 
        default:
+               iounmap(pcie_reg_fpga_base);
                return;
        }
 
index ace4ec08de5118f5e68fc4286f19ec8f5b27d094..f658ff3b3890ef0e474edc9017bb89ad94df631a 100644 (file)
        }, \
 }
 
+#define XPAR_AC97_CONTROLLER_REFERENCE(num) { \
+       .name = "ml403_ac97cr", \
+       .id = num, \
+       .num_resources = 3, \
+       .resource = (struct resource[]) { \
+               { \
+                       .start = XPAR_OPB_AC97_CONTROLLER_REF_##num##_BASEADDR, \
+                       .end = XPAR_OPB_AC97_CONTROLLER_REF_##num##_HIGHADDR, \
+                       .flags = IORESOURCE_MEM, \
+               }, \
+               { \
+                       .start = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_PLAYBACK_INTERRUPT_INTR, \
+                       .end = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_PLAYBACK_INTERRUPT_INTR, \
+                       .flags = IORESOURCE_IRQ, \
+               }, \
+               { \
+                       .start = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_RECORD_INTERRUPT_INTR, \
+                       .end = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_RECORD_INTERRUPT_INTR, \
+                       .flags = IORESOURCE_IRQ, \
+               }, \
+       }, \
+}
+
 /* UART 8250 driver platform data table */
 struct plat_serial8250_port virtex_serial_platform_data[] = {
 #if defined(XPAR_UARTNS550_0_BASEADDR)
@@ -173,6 +196,14 @@ struct platform_device virtex_platform_devices[] = {
 #if defined(XPAR_TFT_3_BASEADDR)
        XPAR_TFT(3),
 #endif
+
+       /* AC97 Controller Reference instances */
+#if defined(XPAR_OPB_AC97_CONTROLLER_REF_0_BASEADDR)
+       XPAR_AC97_CONTROLLER_REFERENCE(0),
+#endif
+#if defined(XPAR_OPB_AC97_CONTROLLER_REF_1_BASEADDR)
+       XPAR_AC97_CONTROLLER_REFERENCE(1),
+#endif
 };
 
 /* Early serial support functions */
index 4069b81f7f1d159f1fb2b6fc1bc6b9f7d788a8a0..db3ae8505103812a49b0d7e5a675251ec005f928 100644 (file)
@@ -45,7 +45,6 @@ struct appldata_ops {
        int    active;                          /* monitoring status */
 
        /* fill in from here */
-       unsigned int ctl_nr;                    /* sysctl ID */
        char name[APPLDATA_PROC_NAME_LENGTH];   /* name of /proc fs node */
        unsigned char record_nr;                /* Record Nr. for Product ID */
        void (*callback)(void *data);           /* callback function */
index ac61cf43a7d950b36cf1316165ea499c63c6283d..655d52543e2d24b1d12d168c037feaeb0b660c84 100644 (file)
@@ -53,29 +53,26 @@ static int appldata_interval_handler(ctl_table *ctl, int write,
 static struct ctl_table_header *appldata_sysctl_header;
 static struct ctl_table appldata_table[] = {
        {
-               .ctl_name       = CTL_APPLDATA_TIMER,
                .procname       = "timer",
                .mode           = S_IRUGO | S_IWUSR,
                .proc_handler   = &appldata_timer_handler,
        },
        {
-               .ctl_name       = CTL_APPLDATA_INTERVAL,
                .procname       = "interval",
                .mode           = S_IRUGO | S_IWUSR,
                .proc_handler   = &appldata_interval_handler,
        },
-       { .ctl_name = 0 }
+       { },
 };
 
 static struct ctl_table appldata_dir_table[] = {
        {
-               .ctl_name       = CTL_APPLDATA,
                .procname       = appldata_proc_name,
                .maxlen         = 0,
                .mode           = S_IRUGO | S_IXUGO,
                .child          = appldata_table,
        },
-       { .ctl_name = 0 }
+       { },
 };
 
 /*
@@ -441,75 +438,38 @@ out:
  */
 int appldata_register_ops(struct appldata_ops *ops)
 {
-       struct list_head *lh;
-       struct appldata_ops *tmp_ops;
-       int i;
-
-       i = 0;
+       if ((ops->size > APPLDATA_MAX_REC_SIZE) || (ops->size < 0))
+               return -EINVAL;
 
-       if ((ops->size > APPLDATA_MAX_REC_SIZE) ||
-               (ops->size < 0)){
-               P_ERROR("Invalid size of %s record = %i, maximum = %i!\n",
-                       ops->name, ops->size, APPLDATA_MAX_REC_SIZE);
-               return -ENOMEM;
-       }
-       if ((ops->ctl_nr == CTL_APPLDATA) ||
-           (ops->ctl_nr == CTL_APPLDATA_TIMER) ||
-           (ops->ctl_nr == CTL_APPLDATA_INTERVAL)) {
-               P_ERROR("ctl_nr %i already in use!\n", ops->ctl_nr);
-               return -EBUSY;
-       }
-       ops->ctl_table = kzalloc(4*sizeof(struct ctl_table), GFP_KERNEL);
-       if (ops->ctl_table == NULL) {
-               P_ERROR("Not enough memory for %s ctl_table!\n", ops->name);
+       ops->ctl_table = kzalloc(4 * sizeof(struct ctl_table), GFP_KERNEL);
+       if (!ops->ctl_table)
                return -ENOMEM;
-       }
 
        spin_lock(&appldata_ops_lock);
-       list_for_each(lh, &appldata_ops_list) {
-               tmp_ops = list_entry(lh, struct appldata_ops, list);
-               P_DEBUG("register_ops loop: %i) name = %s, ctl = %i\n",
-                       ++i, tmp_ops->name, tmp_ops->ctl_nr);
-               P_DEBUG("Comparing %s (ctl %i) with %s (ctl %i)\n",
-                       tmp_ops->name, tmp_ops->ctl_nr, ops->name,
-                       ops->ctl_nr);
-               if (strncmp(tmp_ops->name, ops->name,
-                               APPLDATA_PROC_NAME_LENGTH) == 0) {
-                       P_ERROR("Name \"%s\" already registered!\n", ops->name);
-                       kfree(ops->ctl_table);
-                       spin_unlock(&appldata_ops_lock);
-                       return -EBUSY;
-               }
-               if (tmp_ops->ctl_nr == ops->ctl_nr) {
-                       P_ERROR("ctl_nr %i already registered!\n", ops->ctl_nr);
-                       kfree(ops->ctl_table);
-                       spin_unlock(&appldata_ops_lock);
-                       return -EBUSY;
-               }
-       }
        list_add(&ops->list, &appldata_ops_list);
        spin_unlock(&appldata_ops_lock);
 
-       ops->ctl_table[0].ctl_name = CTL_APPLDATA;
        ops->ctl_table[0].procname = appldata_proc_name;
        ops->ctl_table[0].maxlen   = 0;
        ops->ctl_table[0].mode     = S_IRUGO | S_IXUGO;
        ops->ctl_table[0].child    = &ops->ctl_table[2];
 
-       ops->ctl_table[1].ctl_name = 0;
-
-       ops->ctl_table[2].ctl_name = ops->ctl_nr;
        ops->ctl_table[2].procname = ops->name;
        ops->ctl_table[2].mode     = S_IRUGO | S_IWUSR;
        ops->ctl_table[2].proc_handler = appldata_generic_handler;
        ops->ctl_table[2].data = ops;
 
-       ops->ctl_table[3].ctl_name = 0;
-
        ops->sysctl_header = register_sysctl_table(ops->ctl_table);
-
+       if (!ops->sysctl_header)
+               goto out;
        P_INFO("%s-ops registered!\n", ops->name);
        return 0;
+out:
+       spin_lock(&appldata_ops_lock);
+       list_del(&ops->list);
+       spin_unlock(&appldata_ops_lock);
+       kfree(ops->ctl_table);
+       return -ENOMEM;
 }
 
 /*
@@ -519,15 +479,11 @@ int appldata_register_ops(struct appldata_ops *ops)
  */
 void appldata_unregister_ops(struct appldata_ops *ops)
 {
-       void *table;
        spin_lock(&appldata_ops_lock);
        list_del(&ops->list);
-       /* at that point any incoming access will fail */
-       table = ops->ctl_table;
-       ops->ctl_table = NULL;
        spin_unlock(&appldata_ops_lock);
        unregister_sysctl_table(ops->sysctl_header);
-       kfree(table);
+       kfree(ops->ctl_table);
        P_INFO("%s-ops unregistered!\n", ops->name);
 }
 /********************** module-ops management <END> **************************/
index 697eb30a68a329dd6bfdb842efd037503bbe42bb..51181ccdb87b255699a3857f24d0ddac80e45699 100644 (file)
@@ -147,7 +147,6 @@ static void appldata_get_mem_data(void *data)
 
 
 static struct appldata_ops ops = {
-       .ctl_nr    = CTL_APPLDATA_MEM,
        .name      = "mem",
        .record_nr = APPLDATA_RECORD_MEM_ID,
        .size      = sizeof(struct appldata_mem_data),
index 6c1815a47714389e0f6664722e7c3563907a930a..4d8344336001c8d90edeb7b731fd6558a726d016 100644 (file)
@@ -142,7 +142,6 @@ static void appldata_get_net_sum_data(void *data)
 
 
 static struct appldata_ops ops = {
-       .ctl_nr    = CTL_APPLDATA_NET_SUM,
        .name      = "net_sum",
        .record_nr = APPLDATA_RECORD_NET_SUM_ID,
        .size      = sizeof(struct appldata_net_sum_data),
index 76a15523ae9e0e4c81f3bb3ce4dd7ed88c9880db..6b3eafe104533587e9e439a5852d5020164959ca 100644 (file)
@@ -82,7 +82,6 @@ struct appldata_os_data {
 static struct appldata_os_data *appldata_os_data;
 
 static struct appldata_ops ops = {
-       .ctl_nr    = CTL_APPLDATA_OS,
        .name      = "os",
        .record_nr = APPLDATA_RECORD_OS_ID,
        .owner     = THIS_MODULE,
index 8bf4ae1150be6775b2c348af2ee56a2786dd320c..1b3af7dab8161bf08ec6fd3d5110170b2c89f914 100644 (file)
@@ -200,7 +200,7 @@ static noinline __init void find_memory_chunks(unsigned long memsize)
                cc = __tprot(addr);
                while (cc == old_cc) {
                        addr += CHUNK_INCR;
-                       if (addr >= memsize)
+                       if (memsize && addr >= memsize)
                                break;
 #ifndef CONFIG_64BIT
                        if (addr == ADDR2G)
index 139ca153d5cc1dece7d4ac3679946d29a9baada9..b2b2edc40eb111e05232ca8303d8b92bd2da5743 100644 (file)
@@ -69,13 +69,31 @@ STACK_SIZE  = 1 << STACK_SHIFT
        basr    %r14,%r1
        .endm
 
-       .macro  LOCKDEP_SYS_EXIT
-       l       %r1,BASED(.Llockdep_sys_exit)
+       .macro  TRACE_IRQS_CHECK
+       tm      SP_PSW(%r15),0x03       # irqs enabled?
+       jz      0f
+       l       %r1,BASED(.Ltrace_irq_on)
        basr    %r14,%r1
+       j       1f
+0:     l       %r1,BASED(.Ltrace_irq_off)
+       basr    %r14,%r1
+1:
        .endm
 #else
 #define TRACE_IRQS_ON
 #define TRACE_IRQS_OFF
+#define TRACE_IRQS_CHECK
+#endif
+
+#ifdef CONFIG_LOCKDEP
+       .macro  LOCKDEP_SYS_EXIT
+       tm      SP_PSW+1(%r15),0x01     # returning to user ?
+       jz      0f
+       l       %r1,BASED(.Llockdep_sys_exit)
+       basr    %r14,%r1
+0:
+       .endm
+#else
 #define LOCKDEP_SYS_EXIT
 #endif
 
@@ -234,8 +252,6 @@ sysc_saveall:
        lh      %r7,0x8a          # get svc number from lowcore
 #ifdef CONFIG_VIRT_CPU_ACCOUNTING
 sysc_vtime:
-       tm      SP_PSW+1(%r15),0x01     # interrupting from user ?
-       bz      BASED(sysc_do_svc)
        UPDATE_VTIME __LC_EXIT_TIMER,__LC_SYNC_ENTER_TIMER,__LC_USER_TIMER
 sysc_stime:
        UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER
@@ -263,19 +279,34 @@ sysc_do_restart:
 
 sysc_return:
        tm      SP_PSW+1(%r15),0x01     # returning to user ?
-       bno     BASED(sysc_leave)
+       bno     BASED(sysc_restore)
        tm      __TI_flags+3(%r9),_TIF_WORK_SVC
        bnz     BASED(sysc_work)  # there is work to do (signals etc.)
+sysc_restore:
+#ifdef CONFIG_TRACE_IRQFLAGS
+       la      %r1,BASED(sysc_restore_trace_psw)
+       lpsw    0(%r1)
+sysc_restore_trace:
+       TRACE_IRQS_CHECK
        LOCKDEP_SYS_EXIT
+#endif
 sysc_leave:
        RESTORE_ALL __LC_RETURN_PSW,1
+sysc_done:
+
+#ifdef CONFIG_TRACE_IRQFLAGS
+       .align  8
+       .globl  sysc_restore_trace_psw
+sysc_restore_trace_psw:
+       .long   0, sysc_restore_trace + 0x80000000
+#endif
 
 #
 # recheck if there is more work to do
 #
 sysc_work_loop:
        tm      __TI_flags+3(%r9),_TIF_WORK_SVC
-       bz      BASED(sysc_leave)       # there is no work to do
+       bz      BASED(sysc_restore)     # there is no work to do
 #
 # One of the work bits is on. Find out which one.
 #
@@ -290,8 +321,8 @@ sysc_work:
        bo      BASED(sysc_restart)
        tm      __TI_flags+3(%r9),_TIF_SINGLE_STEP
        bo      BASED(sysc_singlestep)
-       LOCKDEP_SYS_EXIT
-       b       BASED(sysc_leave)
+       b       BASED(sysc_restore)
+sysc_work_done:
 
 #
 # _TIF_NEED_RESCHED is set, call schedule
@@ -458,6 +489,7 @@ pgm_check_handler:
 pgm_no_vtime:
 #endif
        l       %r9,__LC_THREAD_INFO    # load pointer to thread_info struct
+       TRACE_IRQS_OFF
        l       %r3,__LC_PGM_ILC        # load program interruption code
        la      %r8,0x7f
        nr      %r8,%r3
@@ -497,6 +529,7 @@ pgm_per_std:
 pgm_no_vtime2:
 #endif
        l       %r9,__LC_THREAD_INFO    # load pointer to thread_info struct
+       TRACE_IRQS_OFF
        l       %r1,__TI_task(%r9)
        mvc     __THREAD_per+__PER_atmid(2,%r1),__LC_PER_ATMID
        mvc     __THREAD_per+__PER_address(4,%r1),__LC_PER_ADDRESS
@@ -517,15 +550,13 @@ pgm_svcper:
        SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA
        CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA
 #ifdef CONFIG_VIRT_CPU_ACCOUNTING
-       tm      SP_PSW+1(%r15),0x01     # interrupting from user ?
-       bz      BASED(pgm_no_vtime3)
        UPDATE_VTIME __LC_EXIT_TIMER,__LC_SYNC_ENTER_TIMER,__LC_USER_TIMER
        UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER
        mvc     __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER
-pgm_no_vtime3:
 #endif
        lh      %r7,0x8a                # get svc number from lowcore
        l       %r9,__LC_THREAD_INFO    # load pointer to thread_info struct
+       TRACE_IRQS_OFF
        l       %r1,__TI_task(%r9)
        mvc     __THREAD_per+__PER_atmid(2,%r1),__LC_PER_ATMID
        mvc     __THREAD_per+__PER_address(4,%r1),__LC_PER_ADDRESS
@@ -542,7 +573,7 @@ kernel_per:
        mvi     SP_TRAP+1(%r15),0x28    # set trap indication to pgm check
        la      %r2,SP_PTREGS(%r15)     # address of register-save area
        l       %r1,BASED(.Lhandle_per) # load adr. of per handler
-       la      %r14,BASED(sysc_leave)  # load adr. of system return
+       la      %r14,BASED(sysc_restore)# load adr. of system return
        br      %r1                     # branch to do_single_step
 
 /*
@@ -569,26 +600,38 @@ io_no_vtime:
        l       %r1,BASED(.Ldo_IRQ)     # load address of do_IRQ
        la      %r2,SP_PTREGS(%r15)     # address of register-save area
        basr    %r14,%r1                # branch to standard irq handler
-       TRACE_IRQS_ON
-
 io_return:
        tm      SP_PSW+1(%r15),0x01     # returning to user ?
 #ifdef CONFIG_PREEMPT
        bno     BASED(io_preempt)       # no -> check for preemptive scheduling
 #else
-       bno     BASED(io_leave)         # no-> skip resched & signal
+       bno     BASED(io_restore)       # no-> skip resched & signal
 #endif
        tm      __TI_flags+3(%r9),_TIF_WORK_INT
        bnz     BASED(io_work)          # there is work to do (signals etc.)
+io_restore:
+#ifdef CONFIG_TRACE_IRQFLAGS
+       la      %r1,BASED(io_restore_trace_psw)
+       lpsw    0(%r1)
+io_restore_trace:
+       TRACE_IRQS_CHECK
        LOCKDEP_SYS_EXIT
+#endif
 io_leave:
        RESTORE_ALL __LC_RETURN_PSW,0
 io_done:
 
+#ifdef CONFIG_TRACE_IRQFLAGS
+       .align  8
+       .globl  io_restore_trace_psw
+io_restore_trace_psw:
+       .long   0, io_restore_trace + 0x80000000
+#endif
+
 #ifdef CONFIG_PREEMPT
 io_preempt:
        icm     %r0,15,__TI_precount(%r9)
-       bnz     BASED(io_leave)
+       bnz     BASED(io_restore)
        l       %r1,SP_R15(%r15)
        s       %r1,BASED(.Lc_spsize)
        mvc     SP_PTREGS(__PT_SIZE,%r1),SP_PTREGS(%r15)
@@ -596,14 +639,10 @@ io_preempt:
        lr      %r15,%r1
 io_resume_loop:
        tm      __TI_flags+3(%r9),_TIF_NEED_RESCHED
-       bno     BASED(io_leave)
-       mvc     __TI_precount(4,%r9),BASED(.Lc_pactive)
-       stosm   __SF_EMPTY(%r15),0x03  # reenable interrupts
-       l       %r1,BASED(.Lschedule)
-       basr    %r14,%r1               # call schedule
-       stnsm   __SF_EMPTY(%r15),0xfc  # disable I/O and ext. interrupts
-       xc      __TI_precount(4,%r9),__TI_precount(%r9)
-       b       BASED(io_resume_loop)
+       bno     BASED(io_restore)
+       l       %r1,BASED(.Lpreempt_schedule_irq)
+       la      %r14,BASED(io_resume_loop)
+       br      %r1                     # call schedule
 #endif
 
 #
@@ -627,40 +666,42 @@ io_work_loop:
        bo      BASED(io_reschedule)
        tm      __TI_flags+3(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)
        bnz     BASED(io_sigpending)
-       LOCKDEP_SYS_EXIT
-       b       BASED(io_leave)
+       b       BASED(io_restore)
+io_work_done:
 
 #
 # _TIF_MCCK_PENDING is set, call handler
 #
 io_mcck_pending:
-       TRACE_IRQS_OFF
        l       %r1,BASED(.Ls390_handle_mcck)
        basr    %r14,%r1                # TIF bit will be cleared by handler
-       TRACE_IRQS_ON
        b       BASED(io_work_loop)
 
 #
 # _TIF_NEED_RESCHED is set, call schedule
 #
 io_reschedule:
+       TRACE_IRQS_ON
        l       %r1,BASED(.Lschedule)
        stosm   __SF_EMPTY(%r15),0x03   # reenable interrupts
        basr    %r14,%r1                # call scheduler
        stnsm   __SF_EMPTY(%r15),0xfc   # disable I/O and ext. interrupts
+       TRACE_IRQS_OFF
        tm      __TI_flags+3(%r9),_TIF_WORK_INT
-       bz      BASED(io_leave)         # there is no work to do
+       bz      BASED(io_restore)       # there is no work to do
        b       BASED(io_work_loop)
 
 #
 # _TIF_SIGPENDING or _TIF_RESTORE_SIGMASK is set, call do_signal
 #
 io_sigpending:
+       TRACE_IRQS_ON
        stosm   __SF_EMPTY(%r15),0x03   # reenable interrupts
        la      %r2,SP_PTREGS(%r15)     # load pt_regs
        l       %r1,BASED(.Ldo_signal)
        basr    %r14,%r1                # call do_signal
        stnsm   __SF_EMPTY(%r15),0xfc   # disable I/O and ext. interrupts
+       TRACE_IRQS_OFF
        b       BASED(io_work_loop)
 
 /*
@@ -688,7 +729,6 @@ ext_no_vtime:
        lh      %r3,__LC_EXT_INT_CODE   # get interruption code
        l       %r1,BASED(.Ldo_extint)
        basr    %r14,%r1
-       TRACE_IRQS_ON
        b       BASED(io_return)
 
 __critical_end:
@@ -853,15 +893,15 @@ cleanup_table_system_call:
 cleanup_table_sysc_return:
        .long   sysc_return + 0x80000000, sysc_leave + 0x80000000
 cleanup_table_sysc_leave:
-       .long   sysc_leave + 0x80000000, sysc_work_loop + 0x80000000
+       .long   sysc_leave + 0x80000000, sysc_done + 0x80000000
 cleanup_table_sysc_work_loop:
-       .long   sysc_work_loop + 0x80000000, sysc_reschedule + 0x80000000
+       .long   sysc_work_loop + 0x80000000, sysc_work_done + 0x80000000
 cleanup_table_io_return:
        .long   io_return + 0x80000000, io_leave + 0x80000000
 cleanup_table_io_leave:
        .long   io_leave + 0x80000000, io_done + 0x80000000
 cleanup_table_io_work_loop:
-       .long   io_work_loop + 0x80000000, io_mcck_pending + 0x80000000
+       .long   io_work_loop + 0x80000000, io_work_done + 0x80000000
 
 cleanup_critical:
        clc     4(4,%r12),BASED(cleanup_table_system_call)
@@ -930,8 +970,6 @@ cleanup_system_call:
 cleanup_vtime:
        clc     __LC_RETURN_PSW+4(4),BASED(cleanup_system_call_insn+12)
        bhe     BASED(cleanup_stime)
-       tm      SP_PSW+1(%r15),0x01     # interrupting from user ?
-       bz      BASED(cleanup_novtime)
        UPDATE_VTIME __LC_EXIT_TIMER,__LC_SYNC_ENTER_TIMER,__LC_USER_TIMER
 cleanup_stime:
        clc     __LC_RETURN_PSW+4(4),BASED(cleanup_system_call_insn+16)
@@ -939,7 +977,6 @@ cleanup_stime:
        UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER
 cleanup_update:
        mvc     __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER
-cleanup_novtime:
 #endif
        mvc     __LC_RETURN_PSW+4(4),BASED(cleanup_table_system_call+4)
        la      %r12,__LC_RETURN_PSW
@@ -978,10 +1015,10 @@ cleanup_sysc_leave:
 2:     la      %r12,__LC_RETURN_PSW
        br      %r14
 cleanup_sysc_leave_insn:
+       .long   sysc_done - 4 + 0x80000000
 #ifdef CONFIG_VIRT_CPU_ACCOUNTING
-       .long   sysc_leave + 14 + 0x80000000
+       .long   sysc_done - 8 + 0x80000000
 #endif
-       .long   sysc_leave + 10 + 0x80000000
 
 cleanup_io_return:
        mvc     __LC_RETURN_PSW(4),0(%r12)
@@ -1008,10 +1045,10 @@ cleanup_io_leave:
 2:     la      %r12,__LC_RETURN_PSW
        br      %r14
 cleanup_io_leave_insn:
+       .long   io_done - 4 + 0x80000000
 #ifdef CONFIG_VIRT_CPU_ACCOUNTING
-       .long   io_leave + 18 + 0x80000000
+       .long   io_done - 8 + 0x80000000
 #endif
-       .long   io_leave + 14 + 0x80000000
 
 /*
  * Integer constants
@@ -1019,7 +1056,6 @@ cleanup_io_leave_insn:
                .align  4
 .Lc_spsize:    .long   SP_SIZE
 .Lc_overhead:  .long   STACK_FRAME_OVERHEAD
-.Lc_pactive:   .long   PREEMPT_ACTIVE
 .Lnr_syscalls: .long   NR_syscalls
 .L0x018:       .short  0x018
 .L0x020:       .short  0x020
@@ -1043,6 +1079,8 @@ cleanup_io_leave_insn:
 .Lexecve_tail: .long   execve_tail
 .Ljump_table:  .long   pgm_check_table
 .Lschedule:    .long   schedule
+.Lpreempt_schedule_irq:
+               .long   preempt_schedule_irq
 .Ltrace:       .long   syscall_trace
 .Lschedtail:   .long   schedule_tail
 .Lsysc_table:  .long   sys_call_table
index 05e26d1fdf405dc21696b35aabb0217a6164d8d4..a3e47b893f079ca812c54b727f4b3dd4b2a6a6c2 100644 (file)
@@ -67,12 +67,28 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NEED_RESCHED | \
         brasl  %r14,trace_hardirqs_off
        .endm
 
-       .macro  LOCKDEP_SYS_EXIT
-        brasl  %r14,lockdep_sys_exit
+       .macro TRACE_IRQS_CHECK
+       tm      SP_PSW(%r15),0x03       # irqs enabled?
+       jz      0f
+       brasl   %r14,trace_hardirqs_on
+       j       1f
+0:     brasl   %r14,trace_hardirqs_off
+1:
        .endm
 #else
 #define TRACE_IRQS_ON
 #define TRACE_IRQS_OFF
+#define TRACE_IRQS_CHECK
+#endif
+
+#ifdef CONFIG_LOCKDEP
+       .macro  LOCKDEP_SYS_EXIT
+       tm      SP_PSW+1(%r15),0x01     # returning to user ?
+       jz      0f
+       brasl   %r14,lockdep_sys_exit
+0:
+       .endm
+#else
 #define LOCKDEP_SYS_EXIT
 #endif
 
@@ -222,8 +238,6 @@ sysc_saveall:
        llgh    %r7,__LC_SVC_INT_CODE   # get svc number from lowcore
 #ifdef CONFIG_VIRT_CPU_ACCOUNTING
 sysc_vtime:
-       tm      SP_PSW+1(%r15),0x01     # interrupting from user ?
-       jz      sysc_do_svc
        UPDATE_VTIME __LC_EXIT_TIMER,__LC_SYNC_ENTER_TIMER,__LC_USER_TIMER
 sysc_stime:
        UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER
@@ -257,19 +271,34 @@ sysc_noemu:
 
 sysc_return:
        tm      SP_PSW+1(%r15),0x01     # returning to user ?
-       jno     sysc_leave
+       jno     sysc_restore
        tm      __TI_flags+7(%r9),_TIF_WORK_SVC
        jnz     sysc_work       # there is work to do (signals etc.)
+sysc_restore:
+#ifdef CONFIG_TRACE_IRQFLAGS
+       larl    %r1,sysc_restore_trace_psw
+       lpswe   0(%r1)
+sysc_restore_trace:
+       TRACE_IRQS_CHECK
        LOCKDEP_SYS_EXIT
+#endif
 sysc_leave:
        RESTORE_ALL __LC_RETURN_PSW,1
+sysc_done:
+
+#ifdef CONFIG_TRACE_IRQFLAGS
+       .align  8
+       .globl sysc_restore_trace_psw
+sysc_restore_trace_psw:
+       .quad   0, sysc_restore_trace
+#endif
 
 #
 # recheck if there is more work to do
 #
 sysc_work_loop:
        tm      __TI_flags+7(%r9),_TIF_WORK_SVC
-       jz      sysc_leave        # there is no work to do
+       jz      sysc_restore      # there is no work to do
 #
 # One of the work bits is on. Find out which one.
 #
@@ -284,8 +313,8 @@ sysc_work:
        jo      sysc_restart
        tm      __TI_flags+7(%r9),_TIF_SINGLE_STEP
        jo      sysc_singlestep
-       LOCKDEP_SYS_EXIT
-       j       sysc_leave
+       j       sysc_restore
+sysc_work_done:
 
 #
 # _TIF_NEED_RESCHED is set, call schedule
@@ -445,6 +474,7 @@ pgm_check_handler:
 pgm_no_vtime:
 #endif
        lg      %r9,__LC_THREAD_INFO    # load pointer to thread_info struct
+       TRACE_IRQS_OFF
        lgf     %r3,__LC_PGM_ILC        # load program interruption code
        lghi    %r8,0x7f
        ngr     %r8,%r3
@@ -484,6 +514,7 @@ pgm_per_std:
 pgm_no_vtime2:
 #endif
        lg      %r9,__LC_THREAD_INFO    # load pointer to thread_info struct
+       TRACE_IRQS_OFF
        lg      %r1,__TI_task(%r9)
        tm      SP_PSW+1(%r15),0x01     # kernel per event ?
        jz      kernel_per
@@ -504,12 +535,9 @@ pgm_svcper:
        SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA
        CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA
 #ifdef CONFIG_VIRT_CPU_ACCOUNTING
-       tm      SP_PSW+1(%r15),0x01     # interrupting from user ?
-       jz      pgm_no_vtime3
        UPDATE_VTIME __LC_EXIT_TIMER,__LC_SYNC_ENTER_TIMER,__LC_USER_TIMER
        UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER
        mvc     __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER
-pgm_no_vtime3:
 #endif
        llgh    %r7,__LC_SVC_INT_CODE   # get svc number from lowcore
        lg      %r9,__LC_THREAD_INFO    # load pointer to thread_info struct
@@ -529,7 +557,7 @@ kernel_per:
        lhi     %r0,__LC_PGM_OLD_PSW
        sth     %r0,SP_TRAP(%r15)       # set trap indication to pgm check
        la      %r2,SP_PTREGS(%r15)     # address of register-save area
-       larl    %r14,sysc_leave         # load adr. of system ret, no work
+       larl    %r14,sysc_restore       # load adr. of system ret, no work
        jg      do_single_step          # branch to do_single_step
 
 /*
@@ -554,26 +582,38 @@ io_no_vtime:
        TRACE_IRQS_OFF
        la      %r2,SP_PTREGS(%r15)     # address of register-save area
        brasl   %r14,do_IRQ             # call standard irq handler
-       TRACE_IRQS_ON
-
 io_return:
        tm      SP_PSW+1(%r15),0x01     # returning to user ?
 #ifdef CONFIG_PREEMPT
        jno     io_preempt              # no -> check for preemptive scheduling
 #else
-       jno     io_leave                # no-> skip resched & signal
+       jno     io_restore              # no-> skip resched & signal
 #endif
        tm      __TI_flags+7(%r9),_TIF_WORK_INT
        jnz     io_work                 # there is work to do (signals etc.)
+io_restore:
+#ifdef CONFIG_TRACE_IRQFLAGS
+       larl    %r1,io_restore_trace_psw
+       lpswe   0(%r1)
+io_restore_trace:
+       TRACE_IRQS_CHECK
        LOCKDEP_SYS_EXIT
+#endif
 io_leave:
        RESTORE_ALL __LC_RETURN_PSW,0
 io_done:
 
+#ifdef CONFIG_TRACE_IRQFLAGS
+       .align  8
+       .globl io_restore_trace_psw
+io_restore_trace_psw:
+       .quad   0, io_restore_trace
+#endif
+
 #ifdef CONFIG_PREEMPT
 io_preempt:
        icm     %r0,15,__TI_precount(%r9)
-       jnz     io_leave
+       jnz     io_restore
        # switch to kernel stack
        lg      %r1,SP_R15(%r15)
        aghi    %r1,-SP_SIZE
@@ -582,14 +622,9 @@ io_preempt:
        lgr     %r15,%r1
 io_resume_loop:
        tm      __TI_flags+7(%r9),_TIF_NEED_RESCHED
-       jno     io_leave
-       larl    %r1,.Lc_pactive
-       mvc     __TI_precount(4,%r9),0(%r1)
-       stosm   __SF_EMPTY(%r15),0x03   # reenable interrupts
-       brasl   %r14,schedule           # call schedule
-       stnsm   __SF_EMPTY(%r15),0xfc   # disable I/O and ext. interrupts
-       xc      __TI_precount(4,%r9),__TI_precount(%r9)
-       j       io_resume_loop
+       jno     io_restore
+       larl    %r14,io_resume_loop
+       jg      preempt_schedule_irq
 #endif
 
 #
@@ -613,37 +648,39 @@ io_work_loop:
        jo      io_reschedule
        tm      __TI_flags+7(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)
        jnz     io_sigpending
-       LOCKDEP_SYS_EXIT
-       j       io_leave
+       j       io_restore
+io_work_done:
 
 #
 # _TIF_MCCK_PENDING is set, call handler
 #
 io_mcck_pending:
-       TRACE_IRQS_OFF
        brasl   %r14,s390_handle_mcck   # TIF bit will be cleared by handler
-       TRACE_IRQS_ON
        j       io_work_loop
 
 #
 # _TIF_NEED_RESCHED is set, call schedule
 #
 io_reschedule:
+       TRACE_IRQS_ON
        stosm   __SF_EMPTY(%r15),0x03   # reenable interrupts
        brasl   %r14,schedule           # call scheduler
        stnsm   __SF_EMPTY(%r15),0xfc   # disable I/O and ext. interrupts
+       TRACE_IRQS_OFF
        tm      __TI_flags+7(%r9),_TIF_WORK_INT
-       jz      io_leave                # there is no work to do
+       jz      io_restore              # there is no work to do
        j       io_work_loop
 
 #
 # _TIF_SIGPENDING or _TIF_RESTORE_SIGMASK is set, call do_signal
 #
 io_sigpending:
+       TRACE_IRQS_ON
        stosm   __SF_EMPTY(%r15),0x03   # reenable interrupts
        la      %r2,SP_PTREGS(%r15)     # load pt_regs
        brasl   %r14,do_signal          # call do_signal
        stnsm   __SF_EMPTY(%r15),0xfc   # disable I/O and ext. interrupts
+       TRACE_IRQS_OFF
        j       io_work_loop
 
 /*
@@ -669,7 +706,6 @@ ext_no_vtime:
        la      %r2,SP_PTREGS(%r15)     # address of register-save area
        llgh    %r3,__LC_EXT_INT_CODE   # get interruption code
        brasl   %r14,do_extint
-       TRACE_IRQS_ON
        j       io_return
 
 __critical_end:
@@ -824,15 +860,15 @@ cleanup_table_system_call:
 cleanup_table_sysc_return:
        .quad   sysc_return, sysc_leave
 cleanup_table_sysc_leave:
-       .quad   sysc_leave, sysc_work_loop
+       .quad   sysc_leave, sysc_done
 cleanup_table_sysc_work_loop:
-       .quad   sysc_work_loop, sysc_reschedule
+       .quad   sysc_work_loop, sysc_work_done
 cleanup_table_io_return:
        .quad   io_return, io_leave
 cleanup_table_io_leave:
        .quad   io_leave, io_done
 cleanup_table_io_work_loop:
-       .quad   io_work_loop, io_mcck_pending
+       .quad   io_work_loop, io_work_done
 
 cleanup_critical:
        clc     8(8,%r12),BASED(cleanup_table_system_call)
@@ -901,8 +937,6 @@ cleanup_system_call:
 cleanup_vtime:
        clc     __LC_RETURN_PSW+8(8),BASED(cleanup_system_call_insn+24)
        jhe     cleanup_stime
-       tm      SP_PSW+1(%r15),0x01     # interrupting from user ?
-       jz      cleanup_novtime
        UPDATE_VTIME __LC_EXIT_TIMER,__LC_SYNC_ENTER_TIMER,__LC_USER_TIMER
 cleanup_stime:
        clc     __LC_RETURN_PSW+8(8),BASED(cleanup_system_call_insn+32)
@@ -910,7 +944,6 @@ cleanup_stime:
        UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER
 cleanup_update:
        mvc     __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER
-cleanup_novtime:
 #endif
        mvc     __LC_RETURN_PSW+8(8),BASED(cleanup_table_system_call+8)
        la      %r12,__LC_RETURN_PSW
@@ -949,10 +982,10 @@ cleanup_sysc_leave:
 2:     la      %r12,__LC_RETURN_PSW
        br      %r14
 cleanup_sysc_leave_insn:
+       .quad   sysc_done - 4
 #ifdef CONFIG_VIRT_CPU_ACCOUNTING
-       .quad   sysc_leave + 16
+       .quad   sysc_done - 8
 #endif
-       .quad   sysc_leave + 12
 
 cleanup_io_return:
        mvc     __LC_RETURN_PSW(8),0(%r12)
@@ -979,17 +1012,16 @@ cleanup_io_leave:
 2:     la      %r12,__LC_RETURN_PSW
        br      %r14
 cleanup_io_leave_insn:
+       .quad   io_done - 4
 #ifdef CONFIG_VIRT_CPU_ACCOUNTING
-       .quad   io_leave + 20
+       .quad   io_done - 8
 #endif
-       .quad   io_leave + 16
 
 /*
  * Integer constants
  */
                .align  4
 .Lconst:
-.Lc_pactive:   .long   PREEMPT_ACTIVE
 .Lnr_syscalls: .long   NR_syscalls
 .L0x0130:      .short  0x130
 .L0x0140:      .short  0x140
index 7e1bfb98406404c87bd290b2fe4d9a181980ebe0..50f8f1e3760e0689ae0564fc1ce7ca0bfc63b1b1 100644 (file)
@@ -347,7 +347,7 @@ void (*_machine_power_off)(void) = do_machine_power_off_nonsmp;
 
 void machine_restart(char *command)
 {
-       if (!in_interrupt() || oops_in_progress)
+       if ((!in_interrupt() && !in_atomic()) || oops_in_progress)
                /*
                 * Only unblank the console if we are called in enabled
                 * context or a bust_spinlocks cleared the way for us.
@@ -492,6 +492,10 @@ static void setup_addressing_mode(void)
                printk("S390 address spaces switched, ");
                set_amode_and_uaccess(PSW_ASC_PRIMARY, PSW32_ASC_PRIMARY);
        }
+#ifdef CONFIG_TRACE_IRQFLAGS
+       sysc_restore_trace_psw.mask = psw_kernel_bits & ~PSW_MASK_MCHECK;
+       io_restore_trace_psw.mask = psw_kernel_bits & ~PSW_MASK_MCHECK;
+#endif
 }
 
 static void __init
index b05ae8584258e3f9081da0e60f2733d8fea54436..264ea906db4c1cb2b8c5258b4d448e18e9293de9 100644 (file)
@@ -193,71 +193,29 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
 }
 EXPORT_SYMBOL(smp_call_function_single);
 
-static void do_send_stop(void)
+void smp_send_stop(void)
 {
        int cpu, rc;
 
-       /* stop all processors */
-       for_each_online_cpu(cpu) {
-               if (cpu == smp_processor_id())
-                       continue;
-               do {
-                       rc = signal_processor(cpu, sigp_stop);
-               } while (rc == sigp_busy);
-       }
-}
+       /* Disable all interrupts/machine checks */
+       __load_psw_mask(psw_kernel_bits & ~PSW_MASK_MCHECK);
 
-static void do_store_status(void)
-{
-       int cpu, rc;
+       /* write magic number to zero page (absolute 0) */
+       lowcore_ptr[smp_processor_id()]->panic_magic = __PANIC_MAGIC;
 
-       /* store status of all processors in their lowcores (real 0) */
+       /* stop all processors */
        for_each_online_cpu(cpu) {
                if (cpu == smp_processor_id())
                        continue;
                do {
-                       rc = signal_processor_p(
-                               (__u32)(unsigned long) lowcore_ptr[cpu], cpu,
-                               sigp_store_status_at_address);
+                       rc = signal_processor(cpu, sigp_stop);
                } while (rc == sigp_busy);
-       }
-}
 
-static void do_wait_for_stop(void)
-{
-       int cpu;
-
-       /* Wait for all other cpus to enter stopped state */
-       for_each_online_cpu(cpu) {
-               if (cpu == smp_processor_id())
-                       continue;
                while (!smp_cpu_not_running(cpu))
                        cpu_relax();
        }
 }
 
-/*
- * this function sends a 'stop' sigp to all other CPUs in the system.
- * it goes straight through.
- */
-void smp_send_stop(void)
-{
-       /* Disable all interrupts/machine checks */
-       __load_psw_mask(psw_kernel_bits & ~PSW_MASK_MCHECK);
-
-       /* write magic number to zero page (absolute 0) */
-       lowcore_ptr[smp_processor_id()]->panic_magic = __PANIC_MAGIC;
-
-       /* stop other processors. */
-       do_send_stop();
-
-       /* wait until other processors are stopped */
-       do_wait_for_stop();
-
-       /* store status of other processors. */
-       do_store_status();
-}
-
 /*
  * Reboot, halt and power_off routines for SMP.
  */
index 8ec9def83ccbd401f336ee74e36461b25e07048a..8ed16a83fba756932ee6bf16aa3d3b927cdcca89 100644 (file)
@@ -260,6 +260,7 @@ void die(const char * str, struct pt_regs * regs, long err)
        bust_spinlocks(1);
        printk("%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter);
        print_modules();
+       notify_die(DIE_OOPS, str, regs, err, current->thread.trap_no, SIGSEGV);
        show_regs(regs);
        bust_spinlocks(0);
        add_taint(TAINT_DIE);
index d4ed93dfb9c7fba3eada5ccbcf4cdf66c39ebc8a..413c240cbca773bb964b01cfc75506d0345180e1 100644 (file)
@@ -341,19 +341,16 @@ cmm_timeout_handler(ctl_table *ctl, int write, struct file *filp,
 
 static struct ctl_table cmm_table[] = {
        {
-               .ctl_name       = VM_CMM_PAGES,
                .procname       = "cmm_pages",
                .mode           = 0644,
                .proc_handler   = &cmm_pages_handler,
        },
        {
-               .ctl_name       = VM_CMM_TIMED_PAGES,
                .procname       = "cmm_timed_pages",
                .mode           = 0644,
                .proc_handler   = &cmm_pages_handler,
        },
        {
-               .ctl_name       = VM_CMM_TIMEOUT,
                .procname       = "cmm_timeout",
                .mode           = 0644,
                .proc_handler   = &cmm_timeout_handler,
index 37f2c0b447fe48798b64e07fd2a28d626bcfea02..8125d20fdbd8695e722ae848c71a87db29e4d7dc 100644 (file)
@@ -53,10 +53,12 @@ static struct resource cf_ide_resources[] = {
                .end    = PA_AREA5_IO + 0x80c,
                .flags  = IORESOURCE_MEM,
        },
+#ifndef CONFIG_RTS7751R2D_1 /* For R2D-1 polling is preferred */
        [2] = {
                .start  = IRQ_CF_IDE,
                .flags  = IORESOURCE_IRQ,
        },
+#endif
 };
 
 static struct pata_platform_info pata_info = {
index ac4de4973b60c74b73a39b5ec8ec6a4a1955eb69..2ad804ec920a62d6f3373f74955f595f2dc138f0 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.22-rc4
-# Mon Jun 11 10:24:57 2007
+# Linux kernel version: 2.6.24-rc2
+# Tue Nov 13 20:32:39 2007
 #
 CONFIG_SUPERH=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
@@ -13,38 +13,39 @@ CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_TIME=y
 CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_SYS_SUPPORTS_PCI=y
 CONFIG_STACKTRACE_SUPPORT=y
 CONFIG_LOCKDEP_SUPPORT=y
 # CONFIG_ARCH_HAS_ILOG2_U32 is not set
 # CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_ARCH_NO_VIRT_TO_BUS=y
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
-# Code maturity level options
+# General setup
 #
 CONFIG_EXPERIMENTAL=y
 CONFIG_BROKEN_ON_SMP=y
 CONFIG_LOCK_KERNEL=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
 CONFIG_LOCALVERSION=""
 CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
-# CONFIG_IPC_NS is not set
 CONFIG_SYSVIPC_SYSCTL=y
 # CONFIG_POSIX_MQUEUE is not set
 CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
 # CONFIG_TASKSTATS is not set
-# CONFIG_UTS_NS is not set
+# CONFIG_USER_NS is not set
 # CONFIG_AUDIT is not set
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
 # CONFIG_SYSFS_DEPRECATED is not set
 # CONFIG_RELAY is not set
 # CONFIG_BLK_DEV_INITRD is not set
@@ -65,7 +66,6 @@ CONFIG_BASE_FULL=y
 CONFIG_ANON_INODES=y
 # CONFIG_EPOLL is not set
 CONFIG_SIGNALFD=y
-CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
 CONFIG_VM_EVENT_COUNTERS=y
@@ -74,24 +74,17 @@ CONFIG_SLAB=y
 # CONFIG_SLOB is not set
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
-
-#
-# Loadable module support
-#
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODULE_FORCE_UNLOAD is not set
 # CONFIG_MODVERSIONS is not set
 # CONFIG_MODULE_SRCVERSION_ALL is not set
 CONFIG_KMOD=y
-
-#
-# Block layer
-#
 CONFIG_BLOCK=y
 # CONFIG_LBD is not set
 # CONFIG_BLK_DEV_IO_TRACE is not set
 # CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
 
 #
 # IO Schedulers
@@ -113,7 +106,6 @@ CONFIG_CPU_SH4=y
 CONFIG_CPU_SH4A=y
 # CONFIG_CPU_SUBTYPE_SH7619 is not set
 # CONFIG_CPU_SUBTYPE_SH7206 is not set
-# CONFIG_CPU_SUBTYPE_SH7300 is not set
 # CONFIG_CPU_SUBTYPE_SH7705 is not set
 # CONFIG_CPU_SUBTYPE_SH7706 is not set
 # CONFIG_CPU_SUBTYPE_SH7707 is not set
@@ -121,6 +113,7 @@ CONFIG_CPU_SH4A=y
 # CONFIG_CPU_SUBTYPE_SH7709 is not set
 # CONFIG_CPU_SUBTYPE_SH7710 is not set
 # CONFIG_CPU_SUBTYPE_SH7712 is not set
+# CONFIG_CPU_SUBTYPE_SH7720 is not set
 # CONFIG_CPU_SUBTYPE_SH7750 is not set
 # CONFIG_CPU_SUBTYPE_SH7091 is not set
 # CONFIG_CPU_SUBTYPE_SH7750R is not set
@@ -129,12 +122,10 @@ CONFIG_CPU_SH4A=y
 # CONFIG_CPU_SUBTYPE_SH7751R is not set
 # CONFIG_CPU_SUBTYPE_SH7760 is not set
 # CONFIG_CPU_SUBTYPE_SH4_202 is not set
-# CONFIG_CPU_SUBTYPE_ST40STB1 is not set
-# CONFIG_CPU_SUBTYPE_ST40GX1 is not set
 # CONFIG_CPU_SUBTYPE_SH7770 is not set
 CONFIG_CPU_SUBTYPE_SH7780=y
 # CONFIG_CPU_SUBTYPE_SH7785 is not set
-# CONFIG_CPU_SUBTYPE_SH73180 is not set
+# CONFIG_CPU_SUBTYPE_SHX3 is not set
 # CONFIG_CPU_SUBTYPE_SH7343 is not set
 # CONFIG_CPU_SUBTYPE_SH7722 is not set
 
@@ -169,6 +160,7 @@ CONFIG_FLATMEM_MANUAL=y
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_SPARSEMEM_STATIC=y
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_RESOURCES_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=0
@@ -178,8 +170,9 @@ CONFIG_NR_QUICK=2
 # Cache configuration
 #
 # CONFIG_SH_DIRECT_MAPPED is not set
-# CONFIG_SH_WRITETHROUGH is not set
-# CONFIG_SH_OCRAM is not set
+CONFIG_CACHE_WRITEBACK=y
+# CONFIG_CACHE_WRITETHROUGH is not set
+# CONFIG_CACHE_OFF is not set
 
 #
 # Processor features
@@ -187,12 +180,11 @@ CONFIG_NR_QUICK=2
 CONFIG_CPU_LITTLE_ENDIAN=y
 # CONFIG_CPU_BIG_ENDIAN is not set
 CONFIG_SH_FPU=y
-# CONFIG_SH_DSP is not set
 CONFIG_SH_STORE_QUEUES=y
 CONFIG_SPECULATIVE_EXECUTION=y
 CONFIG_CPU_HAS_INTEVT=y
-CONFIG_CPU_HAS_INTC_IRQ=y
 CONFIG_CPU_HAS_SR_RB=y
+CONFIG_CPU_HAS_FPU=y
 
 #
 # Board support
@@ -212,6 +204,7 @@ CONFIG_SH_PCLK_FREQ=32000000
 # CONFIG_TICK_ONESHOT is not set
 # CONFIG_NO_HZ is not set
 # CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
 
 #
 # CPU Frequency scaling
@@ -226,7 +219,6 @@ CONFIG_SH_PCLK_FREQ=32000000
 #
 # Companion Chips
 #
-# CONFIG_HD6446X_SERIES is not set
 
 #
 # Additional SuperH Device Drivers
@@ -244,18 +236,17 @@ CONFIG_HZ_250=y
 CONFIG_HZ=250
 CONFIG_KEXEC=y
 # CONFIG_CRASH_DUMP is not set
-# CONFIG_SMP is not set
 # CONFIG_PREEMPT_NONE is not set
 # CONFIG_PREEMPT_VOLUNTARY is not set
 CONFIG_PREEMPT=y
 CONFIG_PREEMPT_BKL=y
+CONFIG_GUSA=y
 
 #
 # Boot options
 #
 CONFIG_ZERO_PAGE_OFFSET=0x00001000
 CONFIG_BOOT_LINK_OFFSET=0x00800000
-# CONFIG_UBC_WAKEUP is not set
 CONFIG_CMDLINE_BOOL=y
 CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda1"
 
@@ -267,11 +258,8 @@ CONFIG_SH_PCIDMA_NONCOHERENT=y
 CONFIG_PCI_AUTO=y
 CONFIG_PCI_AUTO_UPDATE_RESOURCES=y
 # CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCI_LEGACY=y
 # CONFIG_PCI_DEBUG is not set
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
 # CONFIG_PCCARD is not set
 # CONFIG_HOTPLUG_PCI is not set
 
@@ -281,11 +269,6 @@ CONFIG_PCI_AUTO_UPDATE_RESOURCES=y
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
 
-#
-# Power management options (EXPERIMENTAL)
-#
-# CONFIG_PM is not set
-
 #
 # Networking
 #
@@ -327,6 +310,7 @@ CONFIG_IP_PNP_DHCP=y
 CONFIG_INET_XFRM_MODE_TRANSPORT=y
 CONFIG_INET_XFRM_MODE_TUNNEL=y
 CONFIG_INET_XFRM_MODE_BEET=y
+# CONFIG_INET_LRO is not set
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -353,10 +337,6 @@ CONFIG_LLC=m
 # CONFIG_LAPB is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
 # CONFIG_NET_SCHED is not set
 
 #
@@ -376,6 +356,7 @@ CONFIG_WIRELESS_EXT=y
 # CONFIG_MAC80211 is not set
 # CONFIG_IEEE80211 is not set
 # CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
 
 #
 # Device Drivers
@@ -384,33 +365,17 @@ CONFIG_WIRELESS_EXT=y
 #
 # Generic Driver Options
 #
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=m
 # CONFIG_DEBUG_DRIVER is not set
 # CONFIG_DEBUG_DEVRES is not set
 # CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
 # CONFIG_CONNECTOR is not set
 # CONFIG_MTD is not set
-
-#
-# Parallel port support
-#
 # CONFIG_PARPORT is not set
-
-#
-# Plug and Play support
-#
-# CONFIG_PNPACPI is not set
-
-#
-# Block devices
-#
-# CONFIG_BLK_CPQ_DA is not set
+CONFIG_BLK_DEV=y
 # CONFIG_BLK_CPQ_CISS_DA is not set
 # CONFIG_BLK_DEV_DAC960 is not set
 # CONFIG_BLK_DEV_UMEM is not set
@@ -424,14 +389,11 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
-
-#
-# Misc devices
-#
+CONFIG_MISC_DEVICES=y
 # CONFIG_PHANTOM is not set
+CONFIG_EEPROM_93CX6=y
 # CONFIG_SGI_IOC4 is not set
 # CONFIG_TIFM_CORE is not set
-# CONFIG_BLINK is not set
 # CONFIG_IDE is not set
 
 #
@@ -439,6 +401,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
 #
 # CONFIG_RAID_ATTRS is not set
 CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
 # CONFIG_SCSI_TGT is not set
 # CONFIG_SCSI_NETLINK is not set
 CONFIG_SCSI_PROC_FS=y
@@ -468,12 +431,9 @@ CONFIG_SCSI_WAIT_SCAN=m
 # CONFIG_SCSI_SPI_ATTRS is not set
 # CONFIG_SCSI_FC_ATTRS is not set
 # CONFIG_SCSI_ISCSI_ATTRS is not set
-# CONFIG_SCSI_SAS_ATTRS is not set
 # CONFIG_SCSI_SAS_LIBSAS is not set
-
-#
-# SCSI low-level drivers
-#
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
 # CONFIG_ISCSI_TCP is not set
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
 # CONFIG_SCSI_3W_9XXX is not set
@@ -483,7 +443,6 @@ CONFIG_SCSI_WAIT_SCAN=m
 # CONFIG_SCSI_AIC7XXX_OLD is not set
 # CONFIG_SCSI_AIC79XX is not set
 # CONFIG_SCSI_AIC94XX is not set
-# CONFIG_SCSI_DPT_I2O is not set
 # CONFIG_SCSI_ARCMSR is not set
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_LEGACY is not set
@@ -548,6 +507,7 @@ CONFIG_SATA_SIL=y
 # CONFIG_PATA_OLDPIIX is not set
 # CONFIG_PATA_NETCELL is not set
 # CONFIG_PATA_NS87410 is not set
+# CONFIG_PATA_NS87415 is not set
 # CONFIG_PATA_OPTI is not set
 # CONFIG_PATA_OPTIDMA is not set
 # CONFIG_PATA_PDC_OLD is not set
@@ -561,59 +521,43 @@ CONFIG_SATA_SIL=y
 # CONFIG_PATA_VIA is not set
 # CONFIG_PATA_WINBOND is not set
 CONFIG_PATA_PLATFORM=y
-
-#
-# Multi-device support (RAID and LVM)
-#
 # CONFIG_MD is not set
-
-#
-# Fusion MPT device support
-#
 # CONFIG_FUSION is not set
-# CONFIG_FUSION_SPI is not set
-# CONFIG_FUSION_FC is not set
-# CONFIG_FUSION_SAS is not set
 
 #
 # IEEE 1394 (FireWire) support
 #
 # CONFIG_FIREWIRE is not set
 # CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
 # CONFIG_I2O is not set
-
-#
-# Network device support
-#
 CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_IP1000 is not set
 # CONFIG_ARCNET is not set
 # CONFIG_PHYLIB is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
 CONFIG_NET_ETHERNET=y
 CONFIG_MII=y
+CONFIG_AX88796=y
+CONFIG_AX88796_93CX6=y
 # CONFIG_STNIC is not set
 # CONFIG_HAPPYMEAL is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_CASSINI is not set
 # CONFIG_NET_VENDOR_3COM is not set
 # CONFIG_SMC91X is not set
-
-#
-# Tulip family network device support
-#
+# CONFIG_SMC911X is not set
 # CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
 CONFIG_NET_PCI=y
 CONFIG_PCNET32=m
 # CONFIG_PCNET32_NAPI is not set
@@ -621,7 +565,6 @@ CONFIG_PCNET32=m
 # CONFIG_ADAPTEC_STARFIRE is not set
 # CONFIG_B44 is not set
 # CONFIG_FORCEDETH is not set
-# CONFIG_DGRS is not set
 # CONFIG_EEPRO100 is not set
 # CONFIG_E100 is not set
 # CONFIG_FEALNX is not set
@@ -647,6 +590,7 @@ CONFIG_NETDEV_1000=y
 CONFIG_E1000=m
 # CONFIG_E1000_NAPI is not set
 # CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
+# CONFIG_E1000E is not set
 # CONFIG_NS83820 is not set
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
@@ -664,11 +608,14 @@ CONFIG_R8169=y
 CONFIG_NETDEV_10000=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_CHELSIO_T3 is not set
+# CONFIG_IXGBE is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
 # CONFIG_MYRI10GE is not set
 # CONFIG_NETXEN_NIC is not set
+# CONFIG_NIU is not set
 # CONFIG_MLX4_CORE is not set
+# CONFIG_TEHUTI is not set
 # CONFIG_TR is not set
 
 #
@@ -686,15 +633,7 @@ CONFIG_NETDEV_10000=y
 # CONFIG_NETCONSOLE is not set
 # CONFIG_NETPOLL is not set
 # CONFIG_NET_POLL_CONTROLLER is not set
-
-#
-# ISDN subsystem
-#
 # CONFIG_ISDN is not set
-
-#
-# Telephony Support
-#
 # CONFIG_PHONE is not set
 
 #
@@ -702,6 +641,7 @@ CONFIG_NETDEV_10000=y
 #
 CONFIG_INPUT=y
 # CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
 
 #
 # Userland interfaces
@@ -711,7 +651,6 @@ CONFIG_INPUT_MOUSEDEV=y
 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_TSDEV is not set
 # CONFIG_INPUT_EVDEV is not set
 # CONFIG_INPUT_EVBUG is not set
 
@@ -765,21 +704,11 @@ CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
-
-#
-# IPMI
-#
 # CONFIG_IPMI_HANDLER is not set
-# CONFIG_WATCHDOG is not set
 CONFIG_HW_RANDOM=y
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
-# CONFIG_DRM is not set
 # CONFIG_RAW_DRIVER is not set
-
-#
-# TPM devices
-#
 # CONFIG_TCG_TPM is not set
 CONFIG_DEVPORT=y
 # CONFIG_I2C is not set
@@ -789,21 +718,31 @@ CONFIG_DEVPORT=y
 #
 # CONFIG_SPI is not set
 # CONFIG_SPI_MASTER is not set
-
-#
-# Dallas's 1-wire bus
-#
 # CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
 CONFIG_HWMON=y
 # CONFIG_HWMON_VID is not set
-# CONFIG_SENSORS_ABITUGURU is not set
 # CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_F71882FG is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_PC87360 is not set
 # CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_SIS5595 is not set
 # CONFIG_SENSORS_SMSC47M1 is not set
 # CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_VIA686A is not set
 # CONFIG_SENSORS_VT1211 is not set
+# CONFIG_SENSORS_VT8231 is not set
 # CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
 # CONFIG_HWMON_DEBUG_CHIP is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
 
 #
 # Multifunction device drivers
@@ -820,14 +759,16 @@ CONFIG_DAB=y
 #
 # Graphics support
 #
+# CONFIG_DRM is not set
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+# CONFIG_FB is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Display device support
 #
 # CONFIG_DISPLAY_SUPPORT is not set
-# CONFIG_VGASTATE is not set
-# CONFIG_FB is not set
 
 #
 # Sound
@@ -843,20 +784,14 @@ CONFIG_SOUND=m
 # Open Sound System
 #
 CONFIG_SOUND_PRIME=m
-# CONFIG_OSS_OBSOLETE is not set
 # CONFIG_SOUND_TRIDENT is not set
 # CONFIG_SOUND_MSNDCLAS is not set
 # CONFIG_SOUND_MSNDPIN is not set
-
-#
-# HID Devices
-#
+CONFIG_HID_SUPPORT=y
 CONFIG_HID=y
 # CONFIG_HID_DEBUG is not set
-
-#
-# USB support
-#
+# CONFIG_HIDRAW is not set
+CONFIG_USB_SUPPORT=y
 CONFIG_USB_ARCH_HAS_HCD=y
 CONFIG_USB_ARCH_HAS_OHCI=y
 CONFIG_USB_ARCH_HAS_EHCI=y
@@ -871,32 +806,8 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 #
 # CONFIG_USB_GADGET is not set
 # CONFIG_MMC is not set
-
-#
-# LED devices
-#
 # CONFIG_NEW_LEDS is not set
-
-#
-# LED drivers
-#
-
-#
-# LED Triggers
-#
-
-#
-# InfiniBand support
-#
 # CONFIG_INFINIBAND is not set
-
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
-
-#
-# Real Time Clock
-#
 CONFIG_RTC_LIB=y
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_HCTOSYS=y
@@ -912,10 +823,6 @@ CONFIG_RTC_INTF_DEV=y
 # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
 # CONFIG_RTC_DRV_TEST is not set
 
-#
-# I2C RTC drivers
-#
-
 #
 # SPI RTC drivers
 #
@@ -924,8 +831,10 @@ CONFIG_RTC_INTF_DEV=y
 # Platform RTC drivers
 #
 # CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
 # CONFIG_RTC_DRV_DS1742 is not set
 # CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
 # CONFIG_RTC_DRV_V3020 is not set
 
 #
@@ -934,17 +843,9 @@ CONFIG_RTC_INTF_DEV=y
 CONFIG_RTC_DRV_SH=y
 
 #
-# DMA Engine support
-#
-# CONFIG_DMA_ENGINE is not set
-
-#
-# DMA Clients
-#
-
-#
-# DMA Devices
+# Userspace I/O
 #
+# CONFIG_UIO is not set
 
 #
 # File systems
@@ -1005,7 +906,6 @@ CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
 CONFIG_HUGETLBFS=y
 CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
 CONFIG_CONFIGFS_FS=m
 
 #
@@ -1024,10 +924,7 @@ CONFIG_CONFIGFS_FS=m
 # CONFIG_QNX4FS_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
+CONFIG_NETWORK_FILESYSTEMS=y
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
 # CONFIG_NFS_V3_ACL is not set
@@ -1053,17 +950,12 @@ CONFIG_RPCSEC_GSS_KRB5=y
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
 
 #
 # Partition Types
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-
-#
-# Native Language Support
-#
 CONFIG_NLS=y
 CONFIG_NLS_DEFAULT="iso8859-1"
 CONFIG_NLS_CODEPAGE_437=y
@@ -1104,23 +996,18 @@ CONFIG_NLS_ISO8859_1=y
 # CONFIG_NLS_KOI8_R is not set
 # CONFIG_NLS_KOI8_U is not set
 # CONFIG_NLS_UTF8 is not set
-
-#
-# Distributed Lock Manager
-#
 # CONFIG_DLM is not set
-
-#
-# Profiling support
-#
+CONFIG_INSTRUMENTATION=y
 CONFIG_PROFILING=y
 CONFIG_OPROFILE=m
+# CONFIG_MARKERS is not set
 
 #
 # Kernel hacking
 #
 CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
 CONFIG_ENABLE_MUST_CHECK=y
 CONFIG_MAGIC_SYSRQ=y
 # CONFIG_UNUSED_SYMBOLS is not set
@@ -1129,6 +1016,7 @@ CONFIG_DEBUG_FS=y
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_SHIRQ is not set
 CONFIG_DETECT_SOFTLOCKUP=y
+CONFIG_SCHED_DEBUG=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_TIMER_STATS is not set
 # CONFIG_DEBUG_SLAB is not set
@@ -1137,6 +1025,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_DEBUG_MUTEXES is not set
 # CONFIG_DEBUG_LOCK_ALLOC is not set
 # CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
@@ -1144,10 +1033,13 @@ CONFIG_DEBUG_BUGVERBOSE=y
 CONFIG_DEBUG_INFO=y
 # CONFIG_DEBUG_VM is not set
 # CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
 # CONFIG_FRAME_POINTER is not set
 CONFIG_FORCED_INLINING=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
 # CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
 CONFIG_SH_STANDARD_BIOS=y
 # CONFIG_EARLY_SCIF_CONSOLE is not set
 CONFIG_EARLY_PRINTK=y
@@ -1155,6 +1047,7 @@ CONFIG_EARLY_PRINTK=y
 CONFIG_DEBUG_STACKOVERFLOW=y
 # CONFIG_DEBUG_STACK_USAGE is not set
 # CONFIG_4KSTACKS is not set
+# CONFIG_IRQSTACKS is not set
 # CONFIG_SH_KGDB is not set
 
 #
@@ -1162,10 +1055,7 @@ CONFIG_DEBUG_STACKOVERFLOW=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
-
-#
-# Cryptographic options
-#
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_CRYPTO=y
 CONFIG_CRYPTO_ALGAPI=y
 CONFIG_CRYPTO_BLKCIPHER=y
@@ -1186,6 +1076,7 @@ CONFIG_CRYPTO_ECB=m
 CONFIG_CRYPTO_CBC=y
 CONFIG_CRYPTO_PCBC=m
 # CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
 # CONFIG_CRYPTO_CRYPTD is not set
 CONFIG_CRYPTO_DES=y
 # CONFIG_CRYPTO_FCRYPT is not set
@@ -1199,15 +1090,14 @@ CONFIG_CRYPTO_DES=y
 # CONFIG_CRYPTO_ARC4 is not set
 # CONFIG_CRYPTO_KHAZAD is not set
 # CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_SEED is not set
 # CONFIG_CRYPTO_DEFLATE is not set
 # CONFIG_CRYPTO_MICHAEL_MIC is not set
 # CONFIG_CRYPTO_CRC32C is not set
 # CONFIG_CRYPTO_CAMELLIA is not set
 # CONFIG_CRYPTO_TEST is not set
-
-#
-# Hardware crypto devices
-#
+# CONFIG_CRYPTO_AUTHENC is not set
+CONFIG_CRYPTO_HW=y
 
 #
 # Library routines
@@ -1217,6 +1107,7 @@ CONFIG_BITREVERSE=y
 # CONFIG_CRC16 is not set
 # CONFIG_CRC_ITU_T is not set
 CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
 # CONFIG_LIBCRC32C is not set
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT=y
index 158e03f0b1ef9b33c69d3c889f2730bcdc2649b4..2e43a2a971a927f450680a41988c491ee3e42449 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.24-rc1
-# Fri Nov  2 14:30:49 2007
+# Linux kernel version: 2.6.24-rc2
+# Tue Nov 13 20:34:57 2007
 #
 CONFIG_SUPERH=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
@@ -124,8 +124,6 @@ CONFIG_CPU_SHX2=y
 # CONFIG_CPU_SUBTYPE_SH7751R is not set
 # CONFIG_CPU_SUBTYPE_SH7760 is not set
 # CONFIG_CPU_SUBTYPE_SH4_202 is not set
-# CONFIG_CPU_SUBTYPE_ST40STB1 is not set
-# CONFIG_CPU_SUBTYPE_ST40GX1 is not set
 # CONFIG_CPU_SUBTYPE_SH7770 is not set
 # CONFIG_CPU_SUBTYPE_SH7780 is not set
 CONFIG_CPU_SUBTYPE_SH7785=y
@@ -254,7 +252,6 @@ CONFIG_GUSA=y
 #
 CONFIG_ZERO_PAGE_OFFSET=0x00001000
 CONFIG_BOOT_LINK_OFFSET=0x00800000
-# CONFIG_UBC_WAKEUP is not set
 CONFIG_CMDLINE_BOOL=y
 CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda1"
 
@@ -266,6 +263,7 @@ CONFIG_SH_PCIDMA_NONCOHERENT=y
 CONFIG_PCI_AUTO=y
 CONFIG_PCI_AUTO_UPDATE_RESOURCES=y
 # CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCI_LEGACY=y
 # CONFIG_PCI_DEBUG is not set
 # CONFIG_PCCARD is not set
 # CONFIG_HOTPLUG_PCI is not set
@@ -550,6 +548,8 @@ CONFIG_NETDEVICES=y
 # CONFIG_PHYLIB is not set
 CONFIG_NET_ETHERNET=y
 CONFIG_MII=y
+CONFIG_AX88796=y
+CONFIG_AX88796_93CX6=y
 # CONFIG_STNIC is not set
 # CONFIG_HAPPYMEAL is not set
 # CONFIG_SUNGEM is not set
index f33cedb353fc6af215bc7f86b37120553d8e7532..60d74f793a1d33969a68d6c303b37dda4f4cd214 100644 (file)
@@ -258,9 +258,6 @@ asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs,
        pmd_t *pmd;
        pte_t *pte;
        pte_t entry;
-       struct mm_struct *mm = current->mm;
-       spinlock_t *ptl = NULL;
-       int ret = 1;
 
 #ifdef CONFIG_SH_KGDB
        if (kgdb_nofault && kgdb_bus_err_hook)
@@ -274,12 +271,11 @@ asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs,
         */
        if (address >= P3SEG && address < P3_ADDR_MAX) {
                pgd = pgd_offset_k(address);
-               mm = NULL;
        } else {
-               if (unlikely(address >= TASK_SIZE || !mm))
+               if (unlikely(address >= TASK_SIZE || !current->mm))
                        return 1;
 
-               pgd = pgd_offset(mm, address);
+               pgd = pgd_offset(current->mm, address);
        }
 
        pud = pud_offset(pgd, address);
@@ -289,34 +285,19 @@ asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs,
        if (pmd_none_or_clear_bad(pmd))
                return 1;
 
-       if (mm)
-               pte = pte_offset_map_lock(mm, pmd, address, &ptl);
-       else
-               pte = pte_offset_kernel(pmd, address);
-
+       pte = pte_offset_kernel(pmd, address);
        entry = *pte;
        if (unlikely(pte_none(entry) || pte_not_present(entry)))
-               goto unlock;
+               return 1;
        if (unlikely(writeaccess && !pte_write(entry)))
-               goto unlock;
+               return 1;
 
        if (writeaccess)
                entry = pte_mkdirty(entry);
        entry = pte_mkyoung(entry);
 
-#ifdef CONFIG_CPU_SH4
-       /*
-        * ITLB is not affected by "ldtlb" instruction.
-        * So, we need to flush the entry by ourselves.
-        */
-       local_flush_tlb_one(get_asid(), address & PAGE_MASK);
-#endif
-
        set_pte(pte, entry);
        update_mmu_cache(NULL, address, entry);
-       ret = 0;
-unlock:
-       if (mm)
-               pte_unmap_unlock(pte, ptl);
-       return ret;
+
+       return 0;
 }
index 116b03a4563608b00077707ae303106852374d8b..7aa1dc6d67c88f73067ff4be2ab6bf7ee204c9c1 100644 (file)
@@ -11,10 +11,9 @@ endif
 $(srctree)/arch/x86/Makefile%: ;
 
 ifeq ($(CONFIG_X86_32),y)
+        UTS_MACHINE := i386
         include $(srctree)/arch/x86/Makefile_32
 else
+        UTS_MACHINE := x86_64
         include $(srctree)/arch/x86/Makefile_64
 endif
-
-
-
index f63e5ff0aca12ac5e386076772a6ea90f44a2e2d..a25db514c719ef939bbb9e8069339a50e39c4dbc 100644 (file)
@@ -49,6 +49,9 @@ static void init_intel_pdc(struct acpi_processor *pr, struct cpuinfo_x86 *c)
        if (cpu_has(c, X86_FEATURE_EST))
                buf[2] |= ACPI_PDC_EST_CAPABILITY_SWSMP;
 
+       if (cpu_has(c, X86_FEATURE_ACPI))
+               buf[2] |= ACPI_PDC_T_FFH;
+
        obj->type = ACPI_TYPE_BUFFER;
        obj->buffer.length = 12;
        obj->buffer.pointer = (u8 *) buf;
index 79475d2370713a96cff45a1cc5aada1a4eedc093..da42de261ba8d7b4394b319a46aa04ebea5dbeea 100644 (file)
@@ -115,6 +115,3 @@ static int __init acpi_sleep_setup(char *str)
 
 __setup("acpi_sleep=", acpi_sleep_setup);
 
-void acpi_pci_link_exit(void)
-{
-}
index f35c6eb33da9b7a5e0caa1dee4f0e075121349af..6bb80ea5f4eecbdee2206a1b04cd07278f0924e0 100644 (file)
@@ -962,7 +962,7 @@ static int EISA_ELCR(unsigned int irq)
 #define default_MCA_trigger(idx)       (1)
 #define default_MCA_polarity(idx)      (0)
 
-static int __init MPBIOS_polarity(int idx)
+static int MPBIOS_polarity(int idx)
 {
        int bus = mp_irqs[idx].mpc_srcbus;
        int polarity;
@@ -2830,6 +2830,25 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int a
        return 0;
 }
 
+int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity)
+{
+       int i;
+
+       if (skip_ioapic_setup)
+               return -1;
+
+       for (i = 0; i < mp_irq_entries; i++)
+               if (mp_irqs[i].mpc_irqtype == mp_INT &&
+                   mp_irqs[i].mpc_srcbusirq == bus_irq)
+                       break;
+       if (i >= mp_irq_entries)
+               return -1;
+
+       *trigger = irq_trigger(i);
+       *polarity = irq_polarity(i);
+       return 0;
+}
+
 #endif /* CONFIG_ACPI */
 
 static int __init parse_disable_timer_pin_1(char *arg)
index 953328b55a30503c58f2f8b3ed0f30939ff4047c..435a8c9b55f854bce24e145f20e5cc04ff7b1509 100644 (file)
@@ -546,7 +546,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin)
 #define default_PCI_trigger(idx)       (1)
 #define default_PCI_polarity(idx)      (1)
 
-static int __init MPBIOS_polarity(int idx)
+static int MPBIOS_polarity(int idx)
 {
        int bus = mp_irqs[idx].mpc_srcbus;
        int polarity;
@@ -2222,8 +2222,27 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int triggering, int p
        return 0;
 }
 
-#endif /* CONFIG_ACPI */
 
+int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity)
+{
+       int i;
+
+       if (skip_ioapic_setup)
+               return -1;
+
+       for (i = 0; i < mp_irq_entries; i++)
+               if (mp_irqs[i].mpc_irqtype == mp_INT &&
+                   mp_irqs[i].mpc_srcbusirq == bus_irq)
+                       break;
+       if (i >= mp_irq_entries)
+               return -1;
+
+       *trigger = irq_trigger(i);
+       *polarity = irq_polarity(i);
+       return 0;
+}
+
+#endif /* CONFIG_ACPI */
 
 /*
  * This function currently is only a helper for the i386 smp boot process where
@@ -2260,3 +2279,4 @@ void __init setup_ioapic_dest(void)
        }
 }
 #endif
+
index 7e35078673a4a43f83fb70143cfb131eeb1e88c9..0234f2831bf371194f69779753ce2fb017570984 100644 (file)
@@ -13,7 +13,7 @@ static int __devinit can_skip_ioresource_align(const struct dmi_system_id *d)
        return 0;
 }
 
-static struct dmi_system_id acpi_pciprobe_dmi_table[] = {
+static struct dmi_system_id acpi_pciprobe_dmi_table[] __devinitdata = {
 /*
  * Systems where PCI IO resource ISA alignment can be skipped
  * when the ISA enable bit in the bridge control is not set
index 087a7028ae84ece99cd42676a585c43802fa573c..b9f923ef173d8fc283e2122bc600e59039f0f396 100644 (file)
@@ -50,7 +50,6 @@ config ACPI_SLEEP
 config ACPI_PROCFS
        bool "Deprecated /proc/acpi files"
        depends on PROC_FS
-       default y
        ---help---
          For backwards compatibility, this option allows
          deprecated /proc/acpi/ files to exist, even when
@@ -61,7 +60,6 @@ config ACPI_PROCFS
          /proc/acpi/info (/sys/modules/acpi/parameters/acpica_version)
          /proc/acpi/dsdt (/sys/firmware/acpi/tables/DSDT)
          /proc/acpi/fadt (/sys/firmware/acpi/tables/FACP)
-         /proc/acpi/battery (/sys/class/power_supply)
          /proc/acpi/debug_layer (/sys/module/acpi/parameters/debug_layer)
          /proc/acpi/debug_level (/sys/module/acpi/parameters/debug_level)
 
@@ -69,7 +67,21 @@ config ACPI_PROCFS
          and functions which do not yet exist in /sys.
 
          Say N to delete /proc/acpi/ files that have moved to /sys/
-
+config ACPI_PROCFS_POWER
+       bool "Deprecated power /proc/acpi folders"
+       depends on PROC_FS
+       default y
+       ---help---
+         For backwards compatibility, this option allows
+          deprecated power /proc/acpi/ folders to exist, even when
+          they have been replaced by functions in /sys.
+          The deprecated folders (and their replacements) include:
+         /proc/acpi/battery/* (/sys/class/power_supply/*)
+         /proc/acpi/ac_adapter/* (sys/class/power_supply/*)
+         This option has no effect on /proc/acpi/ folders
+         and functions, which do not yet exist in /sys
+
+         Say N to delete power /proc/acpi/ folders that have moved to /sys/
 config ACPI_PROC_EVENT
        bool "Deprecated /proc/acpi/event support"
        depends on PROC_FS
index 54e3ab0e5fc011e3a807eec08304a2603251fbbb..456446f9007780eac345479b5fc9d173ddfdbe7c 100644 (file)
@@ -58,6 +58,6 @@ obj-$(CONFIG_ACPI_NUMA)               += numa.o
 obj-$(CONFIG_ACPI_ASUS)                += asus_acpi.o
 obj-$(CONFIG_ACPI_TOSHIBA)     += toshiba_acpi.o
 obj-$(CONFIG_ACPI_HOTPLUG_MEMORY)      += acpi_memhotplug.o
-obj-y                          += cm_sbs.o
+obj-$(CONFIG_ACPI_PROCFS_POWER)        += cm_sbs.o
 obj-$(CONFIG_ACPI_SBS)         += sbs.o
 obj-$(CONFIG_ACPI_SBS)         += sbshc.o
index 30238f6ff232218bc46c34450d04d3d0f7ddc12c..76ed4f52bebd6df84be95abc388fa45a8d5e35d0 100644 (file)
@@ -27,7 +27,7 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/types.h>
-#ifdef CONFIG_ACPI_PROCFS
+#ifdef CONFIG_ACPI_PROCFS_POWER
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 #endif
@@ -51,7 +51,7 @@ MODULE_AUTHOR("Paul Diefenbaugh");
 MODULE_DESCRIPTION("ACPI AC Adapter Driver");
 MODULE_LICENSE("GPL");
 
-#ifdef CONFIG_ACPI_PROCFS
+#ifdef CONFIG_ACPI_PROCFS_POWER
 extern struct proc_dir_entry *acpi_lock_ac_dir(void);
 extern void *acpi_unlock_ac_dir(struct proc_dir_entry *acpi_ac_dir);
 static int acpi_ac_open_fs(struct inode *inode, struct file *file);
@@ -86,7 +86,7 @@ struct acpi_ac {
 
 #define to_acpi_ac(x) container_of(x, struct acpi_ac, charger);
 
-#ifdef CONFIG_ACPI_PROCFS
+#ifdef CONFIG_ACPI_PROCFS_POWER
 static const struct file_operations acpi_ac_fops = {
        .open = acpi_ac_open_fs,
        .read = seq_read,
@@ -136,7 +136,7 @@ static int acpi_ac_get_state(struct acpi_ac *ac)
        return 0;
 }
 
-#ifdef CONFIG_ACPI_PROCFS
+#ifdef CONFIG_ACPI_PROCFS_POWER
 /* --------------------------------------------------------------------------
                               FS Interface (/proc)
    -------------------------------------------------------------------------- */
@@ -275,7 +275,7 @@ static int acpi_ac_add(struct acpi_device *device)
        if (result)
                goto end;
 
-#ifdef CONFIG_ACPI_PROCFS
+#ifdef CONFIG_ACPI_PROCFS_POWER
        result = acpi_ac_add_fs(device);
 #endif
        if (result)
@@ -300,7 +300,7 @@ static int acpi_ac_add(struct acpi_device *device)
 
       end:
        if (result) {
-#ifdef CONFIG_ACPI_PROCFS
+#ifdef CONFIG_ACPI_PROCFS_POWER
                acpi_ac_remove_fs(device);
 #endif
                kfree(ac);
@@ -339,7 +339,7 @@ static int acpi_ac_remove(struct acpi_device *device, int type)
                                            ACPI_ALL_NOTIFY, acpi_ac_notify);
        if (ac->charger.dev)
                power_supply_unregister(&ac->charger);
-#ifdef CONFIG_ACPI_PROCFS
+#ifdef CONFIG_ACPI_PROCFS_POWER
        acpi_ac_remove_fs(device);
 #endif
 
@@ -355,7 +355,7 @@ static int __init acpi_ac_init(void)
        if (acpi_disabled)
                return -ENODEV;
 
-#ifdef CONFIG_ACPI_PROCFS
+#ifdef CONFIG_ACPI_PROCFS_POWER
        acpi_ac_dir = acpi_lock_ac_dir();
        if (!acpi_ac_dir)
                return -ENODEV;
@@ -363,7 +363,7 @@ static int __init acpi_ac_init(void)
 
        result = acpi_bus_register_driver(&acpi_ac_driver);
        if (result < 0) {
-#ifdef CONFIG_ACPI_PROCFS
+#ifdef CONFIG_ACPI_PROCFS_POWER
                acpi_unlock_ac_dir(acpi_ac_dir);
 #endif
                return -ENODEV;
@@ -377,7 +377,7 @@ static void __exit acpi_ac_exit(void)
 
        acpi_bus_unregister_driver(&acpi_ac_driver);
 
-#ifdef CONFIG_ACPI_PROCFS
+#ifdef CONFIG_ACPI_PROCFS_POWER
        acpi_unlock_ac_dir(acpi_ac_dir);
 #endif
 
index 192c244f61902b1e510c41780cd3655d9c7a1756..7d6be23eff89f49a81b5ce55c3f44596bd7e4d8c 100644 (file)
@@ -31,7 +31,7 @@
 #include <linux/types.h>
 #include <linux/jiffies.h>
 
-#ifdef CONFIG_ACPI_PROCFS
+#ifdef CONFIG_ACPI_PROCFS_POWER
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 #include <asm/uaccess.h>
@@ -63,7 +63,7 @@ static unsigned int cache_time = 1000;
 module_param(cache_time, uint, 0644);
 MODULE_PARM_DESC(cache_time, "cache time in milliseconds");
 
-#ifdef CONFIG_ACPI_PROCFS
+#ifdef CONFIG_ACPI_PROCFS_POWER
 extern struct proc_dir_entry *acpi_lock_battery_dir(void);
 extern void *acpi_unlock_battery_dir(struct proc_dir_entry *acpi_battery_dir);
 
@@ -153,6 +153,8 @@ static int acpi_battery_get_property(struct power_supply *psy,
                        val->intval = POWER_SUPPLY_STATUS_CHARGING;
                else if (battery->state == 0)
                        val->intval = POWER_SUPPLY_STATUS_FULL;
+               else
+                       val->intval = POWER_SUPPLY_STATUS_UNKNOWN;
                break;
        case POWER_SUPPLY_PROP_PRESENT:
                val->intval = acpi_battery_present(battery);
@@ -221,7 +223,7 @@ static enum power_supply_property energy_battery_props[] = {
        POWER_SUPPLY_PROP_MANUFACTURER,
 };
 
-#ifdef CONFIG_ACPI_PROCFS
+#ifdef CONFIG_ACPI_PROCFS_POWER
 inline char *acpi_battery_units(struct acpi_battery *battery)
 {
        return (battery->power_unit)?"mA":"mW";
@@ -479,7 +481,7 @@ static int acpi_battery_update(struct acpi_battery *battery)
                               FS Interface (/proc)
    -------------------------------------------------------------------------- */
 
-#ifdef CONFIG_ACPI_PROCFS
+#ifdef CONFIG_ACPI_PROCFS_POWER
 static struct proc_dir_entry *acpi_battery_dir;
 
 static int acpi_battery_print_info(struct seq_file *seq, int result)
@@ -786,7 +788,7 @@ static int acpi_battery_add(struct acpi_device *device)
        acpi_driver_data(device) = battery;
        mutex_init(&battery->lock);
        acpi_battery_update(battery);
-#ifdef CONFIG_ACPI_PROCFS
+#ifdef CONFIG_ACPI_PROCFS_POWER
        result = acpi_battery_add_fs(device);
        if (result)
                goto end;
@@ -804,7 +806,7 @@ static int acpi_battery_add(struct acpi_device *device)
               device->status.battery_present ? "present" : "absent");
       end:
        if (result) {
-#ifdef CONFIG_ACPI_PROCFS
+#ifdef CONFIG_ACPI_PROCFS_POWER
                acpi_battery_remove_fs(device);
 #endif
                kfree(battery);
@@ -823,7 +825,7 @@ static int acpi_battery_remove(struct acpi_device *device, int type)
        status = acpi_remove_notify_handler(device->handle,
                                            ACPI_ALL_NOTIFY,
                                            acpi_battery_notify);
-#ifdef CONFIG_ACPI_PROCFS
+#ifdef CONFIG_ACPI_PROCFS_POWER
        acpi_battery_remove_fs(device);
 #endif
        sysfs_remove_battery(battery);
@@ -859,13 +861,13 @@ static int __init acpi_battery_init(void)
 {
        if (acpi_disabled)
                return -ENODEV;
-#ifdef CONFIG_ACPI_PROCFS
+#ifdef CONFIG_ACPI_PROCFS_POWER
        acpi_battery_dir = acpi_lock_battery_dir();
        if (!acpi_battery_dir)
                return -ENODEV;
 #endif
        if (acpi_bus_register_driver(&acpi_battery_driver) < 0) {
-#ifdef CONFIG_ACPI_PROCFS
+#ifdef CONFIG_ACPI_PROCFS_POWER
                acpi_unlock_battery_dir(acpi_battery_dir);
 #endif
                return -ENODEV;
@@ -876,7 +878,7 @@ static int __init acpi_battery_init(void)
 static void __exit acpi_battery_exit(void)
 {
        acpi_bus_unregister_driver(&acpi_battery_driver);
-#ifdef CONFIG_ACPI_PROCFS
+#ifdef CONFIG_ACPI_PROCFS_POWER
        acpi_unlock_battery_dir(acpi_battery_dir);
 #endif
 }
index 06b78e5e33a11b8a13a0b0874311f2bb7faf075a..d411017f8c066994cc0c06065a0776b9105397d6 100644 (file)
@@ -47,6 +47,9 @@
 #undef PREFIX
 #define PREFIX                         "ACPI: EC: "
 
+/* Uncomment next line to get verbose print outs*/
+/* #define DEBUG */
+
 /* EC status register */
 #define ACPI_EC_FLAG_OBF       0x01    /* Output buffer full */
 #define ACPI_EC_FLAG_IBF       0x02    /* Input buffer full */
@@ -75,7 +78,10 @@ enum {
        EC_FLAGS_WAIT_GPE = 0,          /* Don't check status until GPE arrives */
        EC_FLAGS_QUERY_PENDING,         /* Query is pending */
        EC_FLAGS_GPE_MODE,              /* Expect GPE to be sent for status change */
-       EC_FLAGS_ONLY_IBF_GPE,          /* Expect GPE only for IBF = 0 event */
+       EC_FLAGS_NO_ADDRESS_GPE,        /* Expect GPE only for non-address event */
+       EC_FLAGS_ADDRESS,               /* Address is being written */
+       EC_FLAGS_NO_WDATA_GPE,          /* Don't expect WDATA GPE event */
+       EC_FLAGS_WDATA,                 /* Data is being written */
 };
 
 static int acpi_ec_remove(struct acpi_device *device, int type);
@@ -131,21 +137,27 @@ static struct acpi_ec {
 
 static inline u8 acpi_ec_read_status(struct acpi_ec *ec)
 {
-       return inb(ec->command_addr);
+       u8 x = inb(ec->command_addr);
+       pr_debug(PREFIX "---> status = 0x%2x\n", x);
+       return x;
 }
 
 static inline u8 acpi_ec_read_data(struct acpi_ec *ec)
 {
+       u8 x = inb(ec->data_addr);
+       pr_debug(PREFIX "---> data = 0x%2x\n", x);
        return inb(ec->data_addr);
 }
 
 static inline void acpi_ec_write_cmd(struct acpi_ec *ec, u8 command)
 {
+       pr_debug(PREFIX "<--- command = 0x%2x\n", command);
        outb(command, ec->command_addr);
 }
 
 static inline void acpi_ec_write_data(struct acpi_ec *ec, u8 data)
 {
+       pr_debug(PREFIX "<--- data = 0x%2x\n", data);
        outb(data, ec->data_addr);
 }
 
@@ -166,38 +178,54 @@ static inline int acpi_ec_check_status(struct acpi_ec *ec, enum ec_event event)
 
 static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll)
 {
+       int ret = 0;
+       if (unlikely(test_bit(EC_FLAGS_ADDRESS, &ec->flags) &&
+                    test_bit(EC_FLAGS_NO_ADDRESS_GPE, &ec->flags)))
+               force_poll = 1;
+       if (unlikely(test_bit(EC_FLAGS_WDATA, &ec->flags) &&
+                    test_bit(EC_FLAGS_NO_WDATA_GPE, &ec->flags)))
+               force_poll = 1;
        if (likely(test_bit(EC_FLAGS_GPE_MODE, &ec->flags)) &&
            likely(!force_poll)) {
                if (wait_event_timeout(ec->wait, acpi_ec_check_status(ec, event),
                                       msecs_to_jiffies(ACPI_EC_DELAY)))
-                       return 0;
+                       goto end;
                clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags);
                if (acpi_ec_check_status(ec, event)) {
-                       if (event == ACPI_EC_EVENT_OBF_1) {
-                               /* miss OBF = 1 GPE, don't expect it anymore */
-                               printk(KERN_INFO PREFIX "missing OBF_1 confirmation,"
-                                       "switching to degraded mode.\n");
-                               set_bit(EC_FLAGS_ONLY_IBF_GPE, &ec->flags);
+                       if (test_bit(EC_FLAGS_ADDRESS, &ec->flags)) {
+                               /* miss address GPE, don't expect it anymore */
+                               pr_info(PREFIX "missing address confirmation, "
+                                       "don't expect it any longer.\n");
+                               set_bit(EC_FLAGS_NO_ADDRESS_GPE, &ec->flags);
+                       } else if (test_bit(EC_FLAGS_WDATA, &ec->flags)) {
+                               /* miss write data GPE, don't expect it */
+                               pr_info(PREFIX "missing write data confirmation, "
+                                       "don't expect it any longer.\n");
+                               set_bit(EC_FLAGS_NO_WDATA_GPE, &ec->flags);
                        } else {
                                /* missing GPEs, switch back to poll mode */
-                               printk(KERN_INFO PREFIX "missing IBF_1 confirmations,"
-                                       "switch off interrupt mode.\n");
+                               if (printk_ratelimit())
+                                       pr_info(PREFIX "missing confirmations, "
+                                               "switch off interrupt mode.\n");
                                clear_bit(EC_FLAGS_GPE_MODE, &ec->flags);
                        }
-                       return 0;
+                       goto end;
                }
        } else {
                unsigned long delay = jiffies + msecs_to_jiffies(ACPI_EC_DELAY);
                clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags);
                while (time_before(jiffies, delay)) {
                        if (acpi_ec_check_status(ec, event))
-                               return 0;
+                               goto end;
                }
        }
-       printk(KERN_ERR PREFIX "acpi_ec_wait timeout,"
+       pr_err(PREFIX "acpi_ec_wait timeout,"
                               " status = %d, expect_event = %d\n",
                               acpi_ec_read_status(ec), event);
-       return -ETIME;
+       ret = -ETIME;
+      end:
+       clear_bit(EC_FLAGS_ADDRESS, &ec->flags);
+       return ret;
 }
 
 static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, u8 command,
@@ -208,22 +236,26 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, u8 command,
        int result = 0;
        set_bit(EC_FLAGS_WAIT_GPE, &ec->flags);
        acpi_ec_write_cmd(ec, command);
-
+       pr_debug(PREFIX "transaction start\n");
        for (; wdata_len > 0; --wdata_len) {
                result = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0, force_poll);
                if (result) {
-                       printk(KERN_ERR PREFIX
+                       pr_err(PREFIX
                               "write_cmd timeout, command = %d\n", command);
                        goto end;
                }
+               /* mark the address byte written to EC */
+               if (rdata_len + wdata_len > 1)
+                       set_bit(EC_FLAGS_ADDRESS, &ec->flags);
                set_bit(EC_FLAGS_WAIT_GPE, &ec->flags);
                acpi_ec_write_data(ec, *(wdata++));
        }
 
        if (!rdata_len) {
+               set_bit(EC_FLAGS_WDATA, &ec->flags);
                result = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0, force_poll);
                if (result) {
-                       printk(KERN_ERR PREFIX
+                       pr_err(PREFIX
                               "finish-write timeout, command = %d\n", command);
                        goto end;
                }
@@ -231,12 +263,9 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, u8 command,
                clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags);
 
        for (; rdata_len > 0; --rdata_len) {
-               if (test_bit(EC_FLAGS_ONLY_IBF_GPE, &ec->flags))
-                       force_poll = 1;
                result = acpi_ec_wait(ec, ACPI_EC_EVENT_OBF_1, force_poll);
                if (result) {
-                       printk(KERN_ERR PREFIX "read timeout, command = %d\n",
-                              command);
+                       pr_err(PREFIX "read timeout, command = %d\n", command);
                        goto end;
                }
                /* Don't expect GPE after last read */
@@ -245,6 +274,7 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, u8 command,
                *(rdata++) = acpi_ec_read_data(ec);
        }
       end:
+       pr_debug(PREFIX "transaction end\n");
        return result;
 }
 
@@ -273,8 +303,8 @@ static int acpi_ec_transaction(struct acpi_ec *ec, u8 command,
 
        status = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0, 0);
        if (status) {
-               printk(KERN_ERR PREFIX
-                      "input buffer is not empty, aborting transaction\n");
+               pr_err(PREFIX "input buffer is not empty, "
+                               "aborting transaction\n");
                goto end;
        }
 
@@ -488,6 +518,7 @@ static u32 acpi_ec_gpe_handler(void *data)
        acpi_status status = AE_OK;
        struct acpi_ec *ec = data;
 
+       pr_debug(PREFIX "~~~> interrupt\n");
        clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags);
        if (test_bit(EC_FLAGS_GPE_MODE, &ec->flags))
                wake_up(&ec->wait);
@@ -498,8 +529,9 @@ static u32 acpi_ec_gpe_handler(void *data)
                                acpi_ec_gpe_query, ec);
        } else if (unlikely(!test_bit(EC_FLAGS_GPE_MODE, &ec->flags))) {
                /* this is non-query, must be confirmation */
-               printk(KERN_INFO PREFIX "non-query interrupt received,"
-                       " switching to interrupt mode\n");
+               if (printk_ratelimit())
+                       pr_info(PREFIX "non-query interrupt received,"
+                               " switching to interrupt mode\n");
                set_bit(EC_FLAGS_GPE_MODE, &ec->flags);
        }
 
@@ -701,10 +733,10 @@ static void ec_remove_handlers(struct acpi_ec *ec)
 {
        if (ACPI_FAILURE(acpi_remove_address_space_handler(ec->handle,
                                ACPI_ADR_SPACE_EC, &acpi_ec_space_handler)))
-               printk(KERN_ERR PREFIX "failed to remove space handler\n");
+               pr_err(PREFIX "failed to remove space handler\n");
        if (ACPI_FAILURE(acpi_remove_gpe_handler(NULL, ec->gpe,
                                &acpi_ec_gpe_handler)))
-               printk(KERN_ERR PREFIX "failed to remove gpe handler\n");
+               pr_err(PREFIX "failed to remove gpe handler\n");
        ec->handlers_installed = 0;
 }
 
@@ -747,9 +779,9 @@ static int acpi_ec_add(struct acpi_device *device)
                first_ec = ec;
        acpi_driver_data(device) = ec;
        acpi_ec_add_fs(device);
-       printk(KERN_INFO PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx\n",
+       pr_info(PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx\n",
                          ec->gpe, ec->command_addr, ec->data_addr);
-       printk(KERN_INFO PREFIX "driver started in %s mode\n",
+       pr_info(PREFIX "driver started in %s mode\n",
                (test_bit(EC_FLAGS_GPE_MODE, &ec->flags))?"interrupt":"poll");
        return 0;
 }
@@ -875,18 +907,26 @@ int __init acpi_ec_ecdt_probe(void)
        status = acpi_get_table(ACPI_SIG_ECDT, 1,
                                (struct acpi_table_header **)&ecdt_ptr);
        if (ACPI_SUCCESS(status)) {
-               printk(KERN_INFO PREFIX "EC description table is found, configuring boot EC\n");
+               pr_info(PREFIX "EC description table is found, configuring boot EC\n");
                boot_ec->command_addr = ecdt_ptr->control.address;
                boot_ec->data_addr = ecdt_ptr->data.address;
                boot_ec->gpe = ecdt_ptr->gpe;
                boot_ec->handle = ACPI_ROOT_OBJECT;
        } else {
+               /* This workaround is needed only on some broken machines,
+                * which require early EC, but fail to provide ECDT */
+               acpi_handle x;
                printk(KERN_DEBUG PREFIX "Look up EC in DSDT\n");
                status = acpi_get_devices(ec_device_ids[0].id, ec_parse_device,
                                                boot_ec, NULL);
                /* Check that acpi_get_devices actually find something */
                if (ACPI_FAILURE(status) || !boot_ec->handle)
                        goto error;
+               /* We really need to limit this workaround, the only ASUS,
+                * which needs it, has fake EC._INI method, so use it as flag.
+                */
+               if (ACPI_FAILURE(acpi_get_handle(boot_ec->handle, "_INI", &x)))
+                       goto error;
        }
 
        ret = ec_install_handlers(boot_ec);
index aabc6ca4a81c72463529c3e711b012f8b6e909a7..e3a673a008453dfda694aab503dad0c89b19cb1e 100644 (file)
@@ -387,17 +387,14 @@ acpi_status acpi_os_read_port(acpi_io_address port, u32 * value, u32 width)
        if (!value)
                value = &dummy;
 
-       switch (width) {
-       case 8:
+       *value = 0;
+       if (width <= 8) {
                *(u8 *) value = inb(port);
-               break;
-       case 16:
+       } else if (width <= 16) {
                *(u16 *) value = inw(port);
-               break;
-       case 32:
+       } else if (width <= 32) {
                *(u32 *) value = inl(port);
-               break;
-       default:
+       } else {
                BUG();
        }
 
@@ -408,17 +405,13 @@ EXPORT_SYMBOL(acpi_os_read_port);
 
 acpi_status acpi_os_write_port(acpi_io_address port, u32 value, u32 width)
 {
-       switch (width) {
-       case 8:
+       if (width <= 8) {
                outb(value, port);
-               break;
-       case 16:
+       } else if (width <= 16) {
                outw(value, port);
-               break;
-       case 32:
+       } else if (width <= 32) {
                outl(value, port);
-               break;
-       default:
+       } else {
                BUG();
        }
 
index 235a51e328c3467522e16ac1d4bb26c5a7227537..015689d295c7289b38db8bfa08a87b111d64bf2d 100644 (file)
@@ -612,12 +612,6 @@ static int acpi_processor_get_info(struct acpi_processor *pr, unsigned has_uid)
                request_region(pr->throttling.address, 6, "ACPI CPU throttle");
        }
 
-#ifdef CONFIG_CPU_FREQ
-       acpi_processor_ppc_has_changed(pr);
-#endif
-       acpi_processor_get_throttling_info(pr);
-       acpi_processor_get_limit_info(pr);
-
        return 0;
 }
 
@@ -647,7 +641,7 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device)
         */
        if (processor_device_array[pr->id] != NULL &&
            processor_device_array[pr->id] != device) {
-               printk(KERN_WARNING "BIOS reported wrong ACPI id"
+               printk(KERN_WARNING "BIOS reported wrong ACPI id "
                        "for the processor\n");
                return -ENODEV;
        }
@@ -665,6 +659,12 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device)
        /* _PDC call should be done before doing anything else (if reqd.). */
        arch_acpi_processor_init_pdc(pr);
        acpi_processor_set_pdc(pr);
+#ifdef CONFIG_CPU_FREQ
+       acpi_processor_ppc_has_changed(pr);
+#endif
+       acpi_processor_get_throttling_info(pr);
+       acpi_processor_get_limit_info(pr);
+
 
        acpi_processor_power_init(pr, device);
 
@@ -684,7 +684,7 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data)
 {
        struct acpi_processor *pr = data;
        struct acpi_device *device = NULL;
-
+       int saved;
 
        if (!pr)
                return;
@@ -694,7 +694,10 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data)
 
        switch (event) {
        case ACPI_PROCESSOR_NOTIFY_PERFORMANCE:
+               saved = pr->performance_platform_limit;
                acpi_processor_ppc_has_changed(pr);
+               if (saved == pr->performance_platform_limit)
+                       break;
                acpi_bus_generate_proc_event(device, event,
                                        pr->performance_platform_limit);
                acpi_bus_generate_netlink_event(device->pnp.device_class,
index f996d0e37689c402642a0c884b0126ad15a505bc..7b6c20eeeaffd738a673ac294c15b4d3f4a629ec 100644 (file)
@@ -197,6 +197,19 @@ static inline u32 ticks_elapsed_in_us(u32 t1, u32 t2)
                return PM_TIMER_TICKS_TO_US((0xFFFFFFFF - t1) + t2);
 }
 
+static void acpi_safe_halt(void)
+{
+       current_thread_info()->status &= ~TS_POLLING;
+       /*
+        * TS_POLLING-cleared state must be visible before we
+        * test NEED_RESCHED:
+        */
+       smp_mb();
+       if (!need_resched())
+               safe_halt();
+       current_thread_info()->status |= TS_POLLING;
+}
+
 #ifndef CONFIG_CPU_IDLE
 
 static void
@@ -239,19 +252,6 @@ acpi_processor_power_activate(struct acpi_processor *pr,
        return;
 }
 
-static void acpi_safe_halt(void)
-{
-       current_thread_info()->status &= ~TS_POLLING;
-       /*
-        * TS_POLLING-cleared state must be visible before we
-        * test NEED_RESCHED:
-        */
-       smp_mb();
-       if (!need_resched())
-               safe_halt();
-       current_thread_info()->status |= TS_POLLING;
-}
-
 static atomic_t c3_cpu_count;
 
 /* Common C-state entry for C2, C3, .. */
@@ -1373,15 +1373,7 @@ static int acpi_idle_enter_c1(struct cpuidle_device *dev,
        if (pr->flags.bm_check)
                acpi_idle_update_bm_rld(pr, cx);
 
-       current_thread_info()->status &= ~TS_POLLING;
-       /*
-        * TS_POLLING-cleared state must be visible before we test
-        * NEED_RESCHED:
-        */
-       smp_mb();
-       if (!need_resched())
-               safe_halt();
-       current_thread_info()->status |= TS_POLLING;
+       acpi_safe_halt();
 
        cx->usage++;
 
@@ -1399,6 +1391,8 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
        struct acpi_processor *pr;
        struct acpi_processor_cx *cx = cpuidle_get_statedata(state);
        u32 t1, t2;
+       int sleep_ticks = 0;
+
        pr = processors[smp_processor_id()];
 
        if (unlikely(!pr))
@@ -1428,6 +1422,8 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
                ACPI_FLUSH_CPU_CACHE();
 
        t1 = inl(acpi_gbl_FADT.xpm_timer_block.address);
+       /* Tell the scheduler that we are going deep-idle: */
+       sched_clock_idle_sleep_event();
        acpi_state_timer_broadcast(pr, cx, 1);
        acpi_idle_do_entry(cx);
        t2 = inl(acpi_gbl_FADT.xpm_timer_block.address);
@@ -1436,6 +1432,10 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
        /* TSC could halt in idle, so notify users */
        mark_tsc_unstable("TSC halts in idle");;
 #endif
+       sleep_ticks = ticks_elapsed(t1, t2);
+
+       /* Tell the scheduler how much we idled: */
+       sched_clock_idle_wakeup_event(sleep_ticks*PM_TIMER_TICK_NS);
 
        local_irq_enable();
        current_thread_info()->status |= TS_POLLING;
@@ -1443,7 +1443,7 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
        cx->usage++;
 
        acpi_state_timer_broadcast(pr, cx, 0);
-       cx->time += ticks_elapsed(t1, t2);
+       cx->time += sleep_ticks;
        return ticks_elapsed_in_us(t1, t2);
 }
 
@@ -1463,6 +1463,8 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
        struct acpi_processor *pr;
        struct acpi_processor_cx *cx = cpuidle_get_statedata(state);
        u32 t1, t2;
+       int sleep_ticks = 0;
+
        pr = processors[smp_processor_id()];
 
        if (unlikely(!pr))
@@ -1471,6 +1473,15 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
        if (acpi_idle_suspend)
                return(acpi_idle_enter_c1(dev, state));
 
+       if (acpi_idle_bm_check()) {
+               if (dev->safe_state) {
+                       return dev->safe_state->enter(dev, dev->safe_state);
+               } else {
+                       acpi_safe_halt();
+                       return 0;
+               }
+       }
+
        local_irq_disable();
        current_thread_info()->status &= ~TS_POLLING;
        /*
@@ -1485,38 +1496,45 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
                return 0;
        }
 
+       /* Tell the scheduler that we are going deep-idle: */
+       sched_clock_idle_sleep_event();
        /*
         * Must be done before busmaster disable as we might need to
         * access HPET !
         */
        acpi_state_timer_broadcast(pr, cx, 1);
 
-       if (acpi_idle_bm_check()) {
-               cx = pr->power.bm_state;
-
-               acpi_idle_update_bm_rld(pr, cx);
-
-               t1 = inl(acpi_gbl_FADT.xpm_timer_block.address);
-               acpi_idle_do_entry(cx);
-               t2 = inl(acpi_gbl_FADT.xpm_timer_block.address);
-       } else {
-               acpi_idle_update_bm_rld(pr, cx);
+       acpi_idle_update_bm_rld(pr, cx);
 
+       /*
+        * disable bus master
+        * bm_check implies we need ARB_DIS
+        * !bm_check implies we need cache flush
+        * bm_control implies whether we can do ARB_DIS
+        *
+        * That leaves a case where bm_check is set and bm_control is
+        * not set. In that case we cannot do much, we enter C3
+        * without doing anything.
+        */
+       if (pr->flags.bm_check && pr->flags.bm_control) {
                spin_lock(&c3_lock);
                c3_cpu_count++;
                /* Disable bus master arbitration when all CPUs are in C3 */
                if (c3_cpu_count == num_online_cpus())
                        acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1);
                spin_unlock(&c3_lock);
+       } else if (!pr->flags.bm_check) {
+               ACPI_FLUSH_CPU_CACHE();
+       }
 
-               t1 = inl(acpi_gbl_FADT.xpm_timer_block.address);
-               acpi_idle_do_entry(cx);
-               t2 = inl(acpi_gbl_FADT.xpm_timer_block.address);
+       t1 = inl(acpi_gbl_FADT.xpm_timer_block.address);
+       acpi_idle_do_entry(cx);
+       t2 = inl(acpi_gbl_FADT.xpm_timer_block.address);
 
+       /* Re-enable bus master arbitration */
+       if (pr->flags.bm_check && pr->flags.bm_control) {
                spin_lock(&c3_lock);
-               /* Re-enable bus master arbitration */
-               if (c3_cpu_count == num_online_cpus())
-                       acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0);
+               acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0);
                c3_cpu_count--;
                spin_unlock(&c3_lock);
        }
@@ -1525,6 +1543,9 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
        /* TSC could halt in idle, so notify users */
        mark_tsc_unstable("TSC halts in idle");
 #endif
+       sleep_ticks = ticks_elapsed(t1, t2);
+       /* Tell the scheduler how much we idled: */
+       sched_clock_idle_wakeup_event(sleep_ticks*PM_TIMER_TICK_NS);
 
        local_irq_enable();
        current_thread_info()->status |= TS_POLLING;
@@ -1532,7 +1553,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
        cx->usage++;
 
        acpi_state_timer_broadcast(pr, cx, 0);
-       cx->time += ticks_elapsed(t1, t2);
+       cx->time += sleep_ticks;
        return ticks_elapsed_in_us(t1, t2);
 }
 
@@ -1584,12 +1605,14 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr)
                        case ACPI_STATE_C1:
                        state->flags |= CPUIDLE_FLAG_SHALLOW;
                        state->enter = acpi_idle_enter_c1;
+                       dev->safe_state = state;
                        break;
 
                        case ACPI_STATE_C2:
                        state->flags |= CPUIDLE_FLAG_BALANCED;
                        state->flags |= CPUIDLE_FLAG_TIME_VALID;
                        state->enter = acpi_idle_enter_simple;
+                       dev->safe_state = state;
                        break;
 
                        case ACPI_STATE_C3:
@@ -1610,14 +1633,6 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr)
        if (!count)
                return -EINVAL;
 
-       /* find the deepest state that can handle active BM */
-       if (pr->flags.bm_check) {
-               for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++)
-                       if (pr->power.states[i].type == ACPI_STATE_C3)
-                               break;
-               pr->power.bm_state = &pr->power.states[i-1];
-       }
-
        return 0;
 }
 
index 0b8204e7082a366232b3d29121926ff0892f57cd..c26c61fb36c3ac0a16f719016f1a8634bfda71db 100644 (file)
@@ -70,7 +70,55 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
 
 int acpi_processor_tstate_has_changed(struct acpi_processor *pr)
 {
-       return acpi_processor_get_platform_limit(pr);
+       int result = 0;
+       int throttling_limit;
+       int current_state;
+       struct acpi_processor_limit *limit;
+       int target_state;
+
+       result = acpi_processor_get_platform_limit(pr);
+       if (result) {
+               /* Throttling Limit is unsupported */
+               return result;
+       }
+
+       throttling_limit = pr->throttling_platform_limit;
+       if (throttling_limit >= pr->throttling.state_count) {
+               /* Uncorrect Throttling Limit */
+               return -EINVAL;
+       }
+
+       current_state = pr->throttling.state;
+       if (current_state > throttling_limit) {
+               /*
+                * The current state can meet the requirement of
+                * _TPC limit. But it is reasonable that OSPM changes
+                * t-states from high to low for better performance.
+                * Of course the limit condition of thermal
+                * and user should be considered.
+                */
+               limit = &pr->limit;
+               target_state = throttling_limit;
+               if (limit->thermal.tx > target_state)
+                       target_state = limit->thermal.tx;
+               if (limit->user.tx > target_state)
+                       target_state = limit->user.tx;
+       } else if (current_state == throttling_limit) {
+               /*
+                * Unnecessary to change the throttling state
+                */
+               return 0;
+       } else {
+               /*
+                * If the current state is lower than the limit of _TPC, it
+                * will be forced to switch to the throttling state defined
+                * by throttling_platfor_limit.
+                * Because the previous state meets with the limit condition
+                * of thermal and user, it is unnecessary to check it again.
+                */
+               target_state = throttling_limit;
+       }
+       return acpi_processor_set_throttling(pr, target_state);
 }
 
 /*
@@ -83,6 +131,7 @@ static int acpi_processor_get_throttling_control(struct acpi_processor *pr)
        struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
        union acpi_object *ptc = NULL;
        union acpi_object obj = { 0 };
+       struct acpi_processor_throttling *throttling;
 
        status = acpi_evaluate_object(pr->handle, "_PTC", NULL, &buffer);
        if (ACPI_FAILURE(status)) {
@@ -134,6 +183,22 @@ static int acpi_processor_get_throttling_control(struct acpi_processor *pr)
        memcpy(&pr->throttling.status_register, obj.buffer.pointer,
               sizeof(struct acpi_ptc_register));
 
+       throttling = &pr->throttling;
+
+       if ((throttling->control_register.bit_width +
+               throttling->control_register.bit_offset) > 32) {
+               printk(KERN_ERR PREFIX "Invalid _PTC control register\n");
+               result = -EFAULT;
+               goto end;
+       }
+
+       if ((throttling->status_register.bit_width +
+               throttling->status_register.bit_offset) > 32) {
+               printk(KERN_ERR PREFIX "Invalid _PTC status register\n");
+               result = -EFAULT;
+               goto end;
+       }
+
       end:
        kfree(buffer.pointer);
 
@@ -328,44 +393,132 @@ static int acpi_processor_get_throttling_fadt(struct acpi_processor *pr)
        return 0;
 }
 
-static int acpi_read_throttling_status(struct acpi_processor_throttling
-                                      *throttling)
+#ifdef CONFIG_X86
+static int acpi_throttling_rdmsr(struct acpi_processor *pr,
+                                       acpi_integer * value)
 {
-       int value = -1;
+       struct cpuinfo_x86 *c;
+       u64 msr_high, msr_low;
+       unsigned int cpu;
+       u64 msr = 0;
+       int ret = -1;
+
+       cpu = pr->id;
+       c = &cpu_data(cpu);
+
+       if ((c->x86_vendor != X86_VENDOR_INTEL) ||
+               !cpu_has(c, X86_FEATURE_ACPI)) {
+               printk(KERN_ERR PREFIX
+                       "HARDWARE addr space,NOT supported yet\n");
+       } else {
+               msr_low = 0;
+               msr_high = 0;
+               rdmsr_on_cpu(cpu, MSR_IA32_THERM_CONTROL,
+                       (u32 *)&msr_low , (u32 *) &msr_high);
+               msr = (msr_high << 32) | msr_low;
+               *value = (acpi_integer) msr;
+               ret = 0;
+       }
+       return ret;
+}
+
+static int acpi_throttling_wrmsr(struct acpi_processor *pr, acpi_integer value)
+{
+       struct cpuinfo_x86 *c;
+       unsigned int cpu;
+       int ret = -1;
+       u64 msr;
+
+       cpu = pr->id;
+       c = &cpu_data(cpu);
+
+       if ((c->x86_vendor != X86_VENDOR_INTEL) ||
+               !cpu_has(c, X86_FEATURE_ACPI)) {
+               printk(KERN_ERR PREFIX
+                       "HARDWARE addr space,NOT supported yet\n");
+       } else {
+               msr = value;
+               wrmsr_on_cpu(cpu, MSR_IA32_THERM_CONTROL,
+                       msr & 0xffffffff, msr >> 32);
+               ret = 0;
+       }
+       return ret;
+}
+#else
+static int acpi_throttling_rdmsr(struct acpi_processor *pr,
+                               acpi_integer * value)
+{
+       printk(KERN_ERR PREFIX
+               "HARDWARE addr space,NOT supported yet\n");
+       return -1;
+}
+
+static int acpi_throttling_wrmsr(struct acpi_processor *pr, acpi_integer value)
+{
+       printk(KERN_ERR PREFIX
+               "HARDWARE addr space,NOT supported yet\n");
+       return -1;
+}
+#endif
+
+static int acpi_read_throttling_status(struct acpi_processor *pr,
+                                       acpi_integer *value)
+{
+       u32 bit_width, bit_offset;
+       u64 ptc_value;
+       u64 ptc_mask;
+       struct acpi_processor_throttling *throttling;
+       int ret = -1;
+
+       throttling = &pr->throttling;
        switch (throttling->status_register.space_id) {
        case ACPI_ADR_SPACE_SYSTEM_IO:
+               ptc_value = 0;
+               bit_width = throttling->status_register.bit_width;
+               bit_offset = throttling->status_register.bit_offset;
+
                acpi_os_read_port((acpi_io_address) throttling->status_register.
-                                 address, &value,
-                                 (u32) throttling->status_register.bit_width *
-                                 8);
+                                 address, (u32 *) &ptc_value,
+                                 (u32) (bit_width + bit_offset));
+               ptc_mask = (1 << bit_width) - 1;
+               *value = (acpi_integer) ((ptc_value >> bit_offset) & ptc_mask);
+               ret = 0;
                break;
        case ACPI_ADR_SPACE_FIXED_HARDWARE:
-               printk(KERN_ERR PREFIX
-                      "HARDWARE addr space,NOT supported yet\n");
+               ret = acpi_throttling_rdmsr(pr, value);
                break;
        default:
                printk(KERN_ERR PREFIX "Unknown addr space %d\n",
                       (u32) (throttling->status_register.space_id));
        }
-       return value;
+       return ret;
 }
 
-static int acpi_write_throttling_state(struct acpi_processor_throttling
-           &nb