Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
Linus Torvalds [Sat, 27 Feb 2010 00:54:27 +0000 (16:54 -0800)]
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (187 commits)
  sh: remove dead LED code for migo-r and ms7724se
  sh: ecovec build fix for CONFIG_I2C=n
  sh: ecovec r-standby support
  sh: ms7724se r-standby support
  sh: SH-Mobile R-standby register save/restore
  clocksource: Fix up a registration/IRQ race in the sh drivers.
  sh: ms7724: modify scan_timing for KEYSC
  sh: ms7724: Add sh_sir support
  sh: mach-ecovec24: Add sh_sir support
  sh: wire up SET/GET_UNALIGN_CTL.
  sh: allow alignment fault mode to be configured at kernel boot.
  sh: sh7724: Update FSI/SPU2 clock
  sh: always enable sh7724 vpu_clk and set to 166MHz on Ecovec
  sh: add sh7724 kick callback to clk_div4_table
  sh: introduce struct clk_div4_table
  sh: clock-cpg div4 set_rate() shift fix
  sh: Turn on speculative return for SH7785 and SH7786
  sh: Merge legacy and dynamic PMB modes.
  sh: Use uncached I/O helpers in PMB setup.
  sh: Provide uncached I/O helpers.
  ...

472 files changed:
Documentation/dontdiff
Documentation/kernel-parameters.txt
Documentation/lguest/lguest.c
Documentation/networking/ip-sysctl.txt
MAINTAINERS
Makefile
arch/alpha/kernel/pci.c
arch/arm/include/asm/cacheflush.h
arch/arm/kernel/bios32.c
arch/arm/kernel/setup.c
arch/arm/mach-gemini/gpio.c
arch/arm/mach-nomadik/cpu-8815.c
arch/arm/mach-omap2/mux.c
arch/arm/mm/alignment.c
arch/arm/tools/mach-types
arch/cris/arch-v32/drivers/pci/bios.c
arch/frv/mb93090-mb00/pci-frv.c
arch/ia64/include/asm/acpi.h
arch/ia64/include/asm/elf.h
arch/ia64/pci/pci.c
arch/ia64/sn/kernel/setup.c
arch/microblaze/Kconfig
arch/microblaze/include/asm/io.h
arch/microblaze/include/asm/prom.h
arch/microblaze/kernel/cpu/cache.c
arch/microblaze/kernel/of_platform.c
arch/microblaze/kernel/prom.c
arch/mips/bcm47xx/prom.c
arch/mips/mm/highmem.c
arch/mips/pci/pci.c
arch/mips/pmc-sierra/yosemite/ht.c
arch/mn10300/unit-asb2305/pci-asb2305.c
arch/mn10300/unit-asb2305/pci.c
arch/parisc/Kconfig
arch/parisc/kernel/pci.c
arch/powerpc/Kconfig
arch/powerpc/include/asm/prom.h
arch/powerpc/kernel/of_platform.c
arch/powerpc/kernel/pci-common.c
arch/powerpc/kernel/pci_64.c
arch/powerpc/kernel/prom.c
arch/powerpc/platforms/85xx/mpc85xx_mds.c
arch/powerpc/platforms/85xx/smp.c
arch/powerpc/platforms/85xx/xes_mpc85xx.c
arch/powerpc/platforms/cell/cbe_powerbutton.c
arch/powerpc/platforms/cell/ras.c
arch/powerpc/platforms/cell/spu_manage.c
arch/powerpc/platforms/fsl_uli1575.c
arch/powerpc/platforms/pasemi/cpufreq.c
arch/powerpc/platforms/powermac/cpufreq_32.c
arch/powerpc/platforms/powermac/cpufreq_64.c
arch/powerpc/platforms/powermac/feature.c
arch/powerpc/platforms/powermac/pfunc_core.c
arch/powerpc/platforms/powermac/smp.c
arch/powerpc/platforms/powermac/time.c
arch/powerpc/platforms/powermac/udbg_scc.c
arch/powerpc/sysdev/grackle.c
arch/s390/crypto/aes_s390.c
arch/sh/drivers/pci/pci.c
arch/sparc/include/asm/stat.h
arch/sparc/kernel/devices.c
arch/sparc/kernel/kstack.h
arch/sparc/kernel/of_device_32.c
arch/sparc/kernel/of_device_64.c
arch/sparc/kernel/pci.c
arch/sparc/kernel/pcic.c
arch/sparc/kernel/prom.h
arch/sparc/kernel/prom_common.c
arch/sparc/kernel/smp_64.c
arch/sparc/kernel/tsb.S
arch/x86/include/asm/elf.h
arch/x86/include/asm/pci_x86.h
arch/x86/include/asm/processor.h
arch/x86/kernel/acpi/boot.c
arch/x86/kernel/hw_breakpoint.c
arch/x86/kernel/process_64.c
arch/x86/kernel/ptrace.c
arch/x86/pci/acpi.c
arch/x86/pci/bus_numa.c
arch/x86/pci/bus_numa.h
arch/x86/pci/common.c
arch/x86/pci/i386.c
arch/x86/pci/irq.c
arch/x86/pci/mmconfig-shared.c
arch/xtensa/kernel/pci.c
block/blk-core.c
crypto/Kconfig
crypto/Makefile
crypto/ablkcipher.c
crypto/aead.c
crypto/aes_generic.c
crypto/algapi.c
crypto/anubis.c
crypto/api.c
crypto/authenc.c
crypto/blowfish.c
crypto/camellia.c
crypto/cast5.c
crypto/cast6.c
crypto/cipher.c
crypto/compress.c
crypto/crc32c.c
crypto/crypto_null.c
crypto/deflate.c
crypto/des_generic.c
crypto/ecb.c
crypto/fcrypt.c
crypto/gcm.c
crypto/md5.c
crypto/pcrypt.c [new file with mode: 0644]
crypto/testmgr.c
drivers/acpi/acpica/acevents.h
drivers/acpi/acpica/aclocal.h
drivers/acpi/acpica/acobject.h
drivers/acpi/acpica/evgpe.c
drivers/acpi/acpica/evgpeblk.c
drivers/acpi/acpica/evmisc.c
drivers/acpi/acpica/evxface.c
drivers/acpi/acpica/evxfevnt.c
drivers/acpi/button.c
drivers/acpi/dock.c
drivers/acpi/ec.c
drivers/acpi/internal.h
drivers/acpi/pci_bind.c
drivers/acpi/pci_root.c
drivers/acpi/processor_idle.c
drivers/acpi/processor_pdc.c
drivers/acpi/processor_perflib.c
drivers/acpi/scan.c
drivers/acpi/sleep.c
drivers/acpi/system.c
drivers/acpi/tables.c
drivers/acpi/wakeup.c
drivers/ata/ahci.c
drivers/base/class.c
drivers/block/virtio_blk.c
drivers/char/Kconfig
drivers/char/hvc_beat.c
drivers/char/hvc_console.c
drivers/char/hvc_console.h
drivers/char/hvc_iseries.c
drivers/char/hvc_iucv.c
drivers/char/hvc_rtas.c
drivers/char/hvc_udbg.c
drivers/char/hvc_vio.c
drivers/char/hvc_xen.c
drivers/char/hw_random/Kconfig
drivers/char/hw_random/Makefile
drivers/char/hw_random/nomadik-rng.c [new file with mode: 0644]
drivers/char/virtio_console.c
drivers/clocksource/cs5535-clockevt.c
drivers/crypto/amcc/crypto4xx_core.c
drivers/crypto/geode-aes.c
drivers/crypto/talitos.c
drivers/firewire/net.c
drivers/firewire/ohci.c
drivers/gpu/drm/drm_edid.c
drivers/gpu/drm/drm_mm.c
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/intel_lvds.c
drivers/gpu/drm/nouveau/nouveau_bios.c
drivers/gpu/drm/nouveau/nouveau_bios.h
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_mem.c
drivers/gpu/drm/nouveau/nv04_dac.c
drivers/gpu/drm/nouveau/nv17_tv.c
drivers/gpu/drm/nouveau/nv50_instmem.c
drivers/gpu/drm/radeon/atom.c
drivers/gpu/drm/radeon/atombios_dp.c
drivers/gpu/drm/radeon/r600_blit_kms.c
drivers/gpu/drm/radeon/r600_cp.c
drivers/gpu/drm/radeon/radeon.h
drivers/gpu/drm/radeon/radeon_atombios.c
drivers/gpu/drm/radeon/radeon_combios.c
drivers/gpu/drm/radeon/radeon_connectors.c
drivers/gpu/drm/radeon/radeon_cs.c
drivers/gpu/drm/radeon/radeon_drv.h
drivers/gpu/drm/radeon/radeon_object.c
drivers/gpu/drm/radeon/radeon_object.h
drivers/gpu/drm/radeon/radeon_ring.c
drivers/gpu/drm/radeon/rv770.c
drivers/gpu/drm/ttm/ttm_bo.c
drivers/gpu/drm/ttm/ttm_tt.c
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
drivers/gpu/vga/vgaarb.c
drivers/hid/Kconfig
drivers/hid/Makefile
drivers/hid/hid-3m-pct.c [new file with mode: 0644]
drivers/hid/hid-apple.c
drivers/hid/hid-core.c
drivers/hid/hid-debug.c
drivers/hid/hid-ids.h
drivers/hid/hid-input.c
drivers/hid/hid-lg.c
drivers/hid/hid-lg.h
drivers/hid/hid-lg3ff.c [new file with mode: 0644]
drivers/hid/hid-lgff.c
drivers/hid/hid-magicmouse.c [new file with mode: 0644]
drivers/hid/hid-mosart.c [new file with mode: 0644]
drivers/hid/hid-ntrig.c
drivers/hid/hid-ortek.c [new file with mode: 0644]
drivers/hid/hid-quanta.c [new file with mode: 0644]
drivers/hid/hid-sony.c
drivers/hid/hid-stantum.c [new file with mode: 0644]
drivers/hid/hid-wacom.c
drivers/hid/hidraw.c
drivers/hid/usbhid/hid-core.c
drivers/hid/usbhid/hid-quirks.c
drivers/hid/usbhid/usbhid.h
drivers/input/input-polldev.c
drivers/input/serio/i8042.c
drivers/input/touchscreen/usbtouchscreen.c
drivers/isdn/hisax/Kconfig
drivers/isdn/hisax/avm_pci.c
drivers/isdn/hisax/bkm_a4t.c
drivers/isdn/hisax/bkm_a8.c
drivers/isdn/hisax/diva.c
drivers/isdn/hisax/elsa.c
drivers/isdn/hisax/enternow_pci.c
drivers/isdn/hisax/gazel.c
drivers/isdn/hisax/hfc_pci.c
drivers/isdn/hisax/hisax.h
drivers/isdn/hisax/niccy.c
drivers/isdn/hisax/nj_s.c
drivers/isdn/hisax/nj_u.c
drivers/isdn/hisax/sedlbauer.c
drivers/isdn/hisax/telespci.c
drivers/isdn/hisax/w6692.c
drivers/macintosh/adb.c
drivers/macintosh/therm_pm72.c
drivers/macintosh/therm_windtunnel.c
drivers/macintosh/via-pmu-backlight.c
drivers/macintosh/via-pmu.c
drivers/macintosh/windfarm_core.c
drivers/macintosh/windfarm_cpufreq_clamp.c
drivers/macintosh/windfarm_lm75_sensor.c
drivers/macintosh/windfarm_max6690_sensor.c
drivers/macintosh/windfarm_pm112.c
drivers/macintosh/windfarm_pm121.c
drivers/macintosh/windfarm_pm81.c
drivers/macintosh/windfarm_pm91.c
drivers/macintosh/windfarm_smu_sensors.c
drivers/md/dm-log-userspace-transfer.c
drivers/md/dm-raid1.c
drivers/md/dm-region-hash.c
drivers/md/dm-snap-persistent.c
drivers/md/dm-stripe.c
drivers/md/dm-sysfs.c
drivers/md/dm.c
drivers/media/dvb/dvb-usb/Kconfig
drivers/media/dvb/frontends/l64781.c
drivers/media/video/bt8xx/bttv-driver.c
drivers/media/video/bt8xx/bttv-i2c.c
drivers/media/video/bt8xx/bttvp.h
drivers/media/video/mt9t112.c
drivers/media/video/pwc/pwc-ctrl.c
drivers/net/benet/be_cmds.c
drivers/net/e1000/e1000_main.c
drivers/net/ixgbe/ixgbe_82598.c
drivers/net/ixgbe/ixgbe_main.c
drivers/net/mace.c
drivers/net/sfc/efx.c
drivers/net/sfc/falcon_boards.c
drivers/net/sfc/mcdi.c
drivers/net/sfc/qt202x_phy.c
drivers/net/tc35815.c
drivers/net/usb/cdc_ether.c
drivers/net/via-velocity.c
drivers/net/wireless/ath/ath9k/xmit.c
drivers/net/wireless/b43/b43.h
drivers/net/wireless/b43/main.c
drivers/net/wireless/iwlwifi/iwl-4965.c
drivers/net/wireless/iwlwifi/iwl-5000.c
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-core.h
drivers/net/wireless/iwlwifi/iwl-rx.c
drivers/net/wireless/iwlwifi/iwl-tx.c
drivers/net/wireless/iwmc3200wifi/rx.c
drivers/net/wireless/rtl818x/rtl8187_dev.c
drivers/of/Kconfig
drivers/of/Makefile
drivers/of/base.c
drivers/of/fdt.c [new file with mode: 0644]
drivers/of/gpio.c
drivers/of/of_i2c.c
drivers/of/of_mdio.c
drivers/of/of_spi.c
drivers/pci/Kconfig
drivers/pci/Makefile
drivers/pci/bus.c
drivers/pci/hotplug/acpiphp_core.c
drivers/pci/hotplug/acpiphp_glue.c
drivers/pci/hotplug/cpcihp_generic.c
drivers/pci/hotplug/cpqphp.h
drivers/pci/hotplug/cpqphp_core.c
drivers/pci/hotplug/cpqphp_ctrl.c
drivers/pci/hotplug/ibmphp_core.c
drivers/pci/hotplug/ibmphp_ebda.c
drivers/pci/hotplug/ibmphp_hpc.c
drivers/pci/hotplug/pci_hotplug_core.c
drivers/pci/hotplug/pciehp_core.c
drivers/pci/hotplug/pciehp_ctrl.c
drivers/pci/hotplug/pciehp_hpc.c
drivers/pci/hotplug/pciehp_pci.c
drivers/pci/hotplug/rpaphp_core.c
drivers/pci/hotplug/shpchp.h
drivers/pci/hotplug/shpchp_core.c
drivers/pci/hotplug/shpchp_ctrl.c
drivers/pci/hotplug/shpchp_hpc.c
drivers/pci/hotplug/shpchp_sysfs.c
drivers/pci/legacy.c [deleted file]
drivers/pci/pci-acpi.c
drivers/pci/pci-driver.c
drivers/pci/pci.c
drivers/pci/pci.h
drivers/pci/pcie/Kconfig
drivers/pci/pcie/Makefile
drivers/pci/pcie/pme/Makefile [new file with mode: 0644]
drivers/pci/pcie/pme/pcie_pme.c [new file with mode: 0644]
drivers/pci/pcie/pme/pcie_pme.h [new file with mode: 0644]
drivers/pci/pcie/pme/pcie_pme_acpi.c [new file with mode: 0644]
drivers/pci/pcie/portdrv.h
drivers/pci/pcie/portdrv_core.c
drivers/pci/pcie/portdrv_pci.c
drivers/pci/probe.c
drivers/pci/quirks.c
drivers/pci/setup-bus.c
drivers/pci/slot.c
drivers/pcmcia/rsrc_mgr.c
drivers/pcmcia/rsrc_nonstatic.c
drivers/pcmcia/yenta_socket.c
drivers/platform/x86/acer-wmi.c
drivers/platform/x86/thinkpad_acpi.c
drivers/sbus/char/openprom.c
drivers/scsi/arm/fas216.c
drivers/scsi/fcoe/fcoe.c
drivers/scsi/fcoe/libfcoe.c
drivers/scsi/libfc/fc_exch.c
drivers/scsi/libfc/fc_fcp.c
drivers/scsi/libfc/fc_lport.c
drivers/scsi/libfc/fc_rport.c
drivers/scsi/libiscsi_tcp.c
drivers/scsi/megaraid/megaraid_sas.c
drivers/serial/8250.c
drivers/serial/pmac_zilog.c
drivers/spi/Kconfig
drivers/spi/Makefile
drivers/spi/coldfire_qspi.c [new file with mode: 0644]
drivers/spi/davinci_spi.c [new file with mode: 0644]
drivers/spi/dw_spi.c
drivers/spi/dw_spi_mmio.c [new file with mode: 0644]
drivers/spi/dw_spi_pci.c
drivers/spi/mpc52xx_psc_spi.c
drivers/spi/mpc52xx_spi.c
drivers/spi/spi_imx.c
drivers/spi/spi_mpc8xxx.c
drivers/spi/spi_ppc4xx.c
drivers/spi/spi_s3c64xx.c
drivers/spi/spi_sh_msiof.c
drivers/spi/spi_stmp.c
drivers/spi/xilinx_spi.c
drivers/spi/xilinx_spi_of.c
drivers/ssb/main.c
drivers/usb/core/devio.c
drivers/usb/gadget/f_eem.c
drivers/usb/gadget/multi.c
drivers/usb/gadget/r8a66597-udc.c
drivers/usb/gadget/s3c-hsotg.c
drivers/usb/host/ehci-hub.c
drivers/usb/host/fhci-tds.c
drivers/usb/misc/sisusbvga/sisusb.c
drivers/usb/otg/Kconfig
drivers/usb/serial/ftdi_sio.c
drivers/usb/serial/ftdi_sio_ids.h
drivers/usb/serial/sierra.c
drivers/usb/storage/unusual_devs.h
drivers/usb/storage/usb.c
drivers/video/aty/aty128fb.c
drivers/video/aty/atyfb_base.c
drivers/video/aty/radeon_backlight.c
drivers/video/efifb.c
drivers/virtio/virtio_balloon.c
drivers/virtio/virtio_pci.c
drivers/virtio/virtio_ring.c
drivers/watchdog/bfin_wdt.c
fs/btrfs/file.c
fs/cachefiles/namei.c
fs/exec.c
fs/namei.c
fs/nfs/direct.c
fs/nfsd/vfs.c
fs/proc/base.c
fs/proc/proc_devtree.c
fs/reiserfs/inode.c
fs/sysfs/inode.c
include/acpi/acpi_bus.h
include/acpi/acpi_drivers.h
include/acpi/acpixf.h
include/acpi/actypes.h
include/crypto/md5.h [new file with mode: 0644]
include/crypto/pcrypt.h [new file with mode: 0644]
include/linux/amba/bus.h
include/linux/blkdev.h
include/linux/fs.h
include/linux/hid.h
include/linux/hw_breakpoint.h
include/linux/input.h
include/linux/ioport.h
include/linux/kfifo.h
include/linux/of.h
include/linux/of_fdt.h
include/linux/padata.h [new file with mode: 0644]
include/linux/pci-acpi.h
include/linux/pci.h
include/linux/pci_hotplug.h
include/linux/pci_ids.h
include/linux/perf_event.h
include/linux/pfkeyv2.h
include/linux/spi/dw_spi.h
include/linux/virtio.h
include/linux/virtio_balloon.h
include/linux/virtio_blk.h
include/linux/virtio_console.h
init/Kconfig
kernel/Makefile
kernel/hw_breakpoint.c
kernel/kfifo.c
kernel/padata.c [new file with mode: 0644]
kernel/perf_event.c
kernel/power/Kconfig
kernel/resource.c
kernel/softirq.c
kernel/sys.c
kernel/trace/trace_kprobe.c
kernel/trace/trace_stack.c
lib/idr.c
mm/migrate.c
mm/oom_kill.c
net/bluetooth/hidp/core.c
net/core/dev.c
net/core/ethtool.c
net/core/net-sysfs.c
net/ipv4/devinet.c
net/ipv4/igmp.c
net/ipv4/ipcomp.c
net/ipv4/tcp_input.c
net/ipv6/addrconf.c
net/ipv6/ipcomp6.c
net/mac80211/ibss.c
net/mac80211/rate.c
net/mac80211/scan.c
net/xfrm/xfrm_algo.c
net/xfrm/xfrm_state.c
scripts/.gitignore
scripts/binoffset.c [deleted file]
scripts/extract-ikconfig
scripts/kconfig/Makefile
scripts/kconfig/streamline_config.pl
security/integrity/ima/ima_iint.c
security/selinux/ss/ebitmap.c
sound/aoa/fabrics/layout.c
sound/pci/hda/hda_intel.c
sound/ppc/awacs.c
sound/ppc/burgundy.c
sound/ppc/pmac.c
sound/soc/fsl/efika-audio-fabric.c
sound/soc/fsl/pcm030-audio-fabric.c
tools/perf/builtin-top.c
tools/perf/util/event.c
tools/perf/util/probe-event.c

index 3ad6ace..d9bcffd 100644 (file)
@@ -69,7 +69,6 @@ av_permissions.h
 bbootsect
 bin2c
 binkernel.spec
-binoffset
 bootsect
 bounds.h
 bsetup
index 736d456..3e69c1c 100644 (file)
@@ -199,6 +199,10 @@ and is between 256 and 4096 characters. It is defined in the file
                        acpi_display_output=video
                        See above.
 
+       acpi_early_pdc_eval     [HW,ACPI] Evaluate processor _PDC methods
+                               early. Needed on some platforms to properly
+                               initialize the EC.
+
        acpi_irq_balance [HW,ACPI]
                        ACPI will balance active IRQs
                        default in APIC mode
@@ -311,6 +315,11 @@ and is between 256 and 4096 characters. It is defined in the file
        aic79xx=        [HW,SCSI]
                        See Documentation/scsi/aic79xx.txt.
 
+       alignment=      [KNL,ARM]
+                       Allow the default userspace alignment fault handler
+                       behaviour to be specified.  Bit 0 enables warnings,
+                       bit 1 enables fixups, and bit 2 sends a segfault.
+
        amd_iommu=      [HW,X86-84]
                        Pass parameters to the AMD IOMMU driver in the system.
                        Possible values are:
@@ -1939,8 +1948,12 @@ and is between 256 and 4096 characters. It is defined in the file
                                IRQ routing is enabled.
                noacpi          [X86] Do not use ACPI for IRQ routing
                                or for PCI scanning.
-               use_crs         [X86] Use _CRS for PCI resource
-                               allocation.
+               use_crs         [X86] Use PCI host bridge window information
+                               from ACPI.  On BIOSes from 2008 or later, this
+                               is enabled by default.  If you need to use this,
+                               please report a bug.
+               nocrs           [X86] Ignore PCI host bridge windows from ACPI.
+                               If you need to use this, please report a bug.
                routeirq        Do IRQ routing for all PCI devices.
                                This is normally done in pci_enable_device(),
                                so this option is a temporary workaround
@@ -1989,6 +2002,14 @@ and is between 256 and 4096 characters. It is defined in the file
                force   Enable ASPM even on devices that claim not to support it.
                        WARNING: Forcing ASPM on may cause system lockups.
 
+       pcie_pme=       [PCIE,PM] Native PCIe PME signaling options:
+               off     Do not use native PCIe PME signaling.
+               force   Use native PCIe PME signaling even if the BIOS refuses
+                       to allow the kernel to control the relevant PCIe config
+                       registers.
+               nomsi   Do not use MSI for native PCIe PME signaling (this makes
+                       all PCIe root ports use INTx for everything).
+
        pcmv=           [HW,PCMCIA] BadgePAD 4
 
        pd.             [PARIDE]
index 4220851..3119f5d 100644 (file)
@@ -34,7 +34,6 @@
 #include <sys/uio.h>
 #include <termios.h>
 #include <getopt.h>
-#include <zlib.h>
 #include <assert.h>
 #include <sched.h>
 #include <limits.h>
index 006b39d..e87f3cd 100644 (file)
@@ -1074,10 +1074,10 @@ regen_max_retry - INTEGER
        Default: 5
 
 max_addresses - INTEGER
-       Number of maximum addresses per interface.  0 disables limitation.
-       It is recommended not set too large value (or 0) because it would
-       be too easy way to crash kernel to allow to create too much of
-       autoconfigured addresses.
+       Maximum number of autoconfigured addresses per interface.  Setting
+       to zero disables the limitation.  It is not recommended to set this
+       value too large (or to zero) because it would be an easy way to
+       crash the kernel by allowing too many addresses to be created.
        Default: 16
 
 disable_ipv6 - BOOLEAN
index 412eff6..317ed38 100644 (file)
@@ -616,10 +616,10 @@ M:        Richard Purdie <rpurdie@rpsys.net>
 S:     Maintained
 
 ARM/CORTINA SYSTEMS GEMINI ARM ARCHITECTURE
-M:     Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
+M:     Paulius Zaleckas <paulius.zaleckas@gmail.com>
 L:     linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 T:     git git://gitorious.org/linux-gemini/mainline.git
-S:     Maintained
+S:     Odd Fixes
 F:     arch/arm/mach-gemini/
 
 ARM/EBSA110 MACHINE SUPPORT
@@ -641,9 +641,9 @@ T:  topgit git://git.openezx.org/openezx.git
 F:     arch/arm/mach-pxa/ezx.c
 
 ARM/FARADAY FA526 PORT
-M:     Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
+M:     Paulius Zaleckas <paulius.zaleckas@gmail.com>
 L:     linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
-S:     Maintained
+S:     Odd Fixes
 F:     arch/arm/mm/*-fa*
 
 ARM/FOOTBRIDGE ARCHITECTURE
@@ -1733,10 +1733,9 @@ F:       include/linux/tfrc.h
 F:     net/dccp/
 
 DECnet NETWORK LAYER
-M:     Christine Caulfield <christine.caulfield@googlemail.com>
 W:     http://linux-decnet.sourceforge.net
 L:     linux-decnet-user@lists.sourceforge.net
-S:     Maintained
+S:     Orphan
 F:     Documentation/networking/decnet.txt
 F:     net/decnet/
 
@@ -2394,6 +2393,12 @@ L:       linuxppc-dev@ozlabs.org
 S:     Odd Fixes
 F:     drivers/char/hvc_*
 
+VIRTIO CONSOLE DRIVER
+M:     Amit Shah <amit.shah@redhat.com>
+L:     virtualization@lists.linux-foundation.org
+S:     Maintained
+F:     drivers/char/virtio_console.c
+
 GSPCA FINEPIX SUBDRIVER
 M:     Frank Zago <frank@zago.net>
 L:     linux-media@vger.kernel.org
@@ -3490,9 +3495,9 @@ S:        Maintained
 F:     drivers/net/wireless/libertas/
 
 MARVELL MV643XX ETHERNET DRIVER
-M:     Lennert Buytenhek <buytenh@marvell.com>
+M:     Lennert Buytenhek <buytenh@wantstofly.org>
 L:     netdev@vger.kernel.org
-S:     Supported
+S:     Maintained
 F:     drivers/net/mv643xx_eth.*
 F:     include/linux/mv643xx.h
 
index 12b1aa1..1b24895 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 33
-EXTRAVERSION = -rc8
+EXTRAVERSION =
 NAME = Man-Eating Seals of Antiquity
 
 # *DOCUMENTATION*
index a91ba28..c9ab94e 100644 (file)
@@ -126,8 +126,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_final);
 #define MB                     (1024*KB)
 #define GB                     (1024*MB)
 
-void
-pcibios_align_resource(void *data, struct resource *res,
+resource_size_t
+pcibios_align_resource(void *data, const struct resource *res,
                       resource_size_t size, resource_size_t align)
 {
        struct pci_dev *dev = data;
@@ -184,7 +184,7 @@ pcibios_align_resource(void *data, struct resource *res,
                }
        }
 
-       res->start = start;
+       return start;
 }
 #undef KB
 #undef MB
index c77d2fa..8113bb5 100644 (file)
@@ -42,7 +42,8 @@
 #endif
 
 #if defined(CONFIG_CPU_ARM920T) || defined(CONFIG_CPU_ARM922T) || \
-    defined(CONFIG_CPU_ARM925T) || defined(CONFIG_CPU_ARM1020)
+    defined(CONFIG_CPU_ARM925T) || defined(CONFIG_CPU_ARM1020) || \
+    defined(CONFIG_CPU_ARM1026)
 # define MULTI_CACHE 1
 #endif
 
index 8096819..bd397e0 100644 (file)
@@ -616,15 +616,17 @@ char * __init pcibios_setup(char *str)
  * but we want to try to avoid allocating at 0x2900-0x2bff
  * which might be mirrored at 0x0100-0x03ff..
  */
-void pcibios_align_resource(void *data, struct resource *res,
-                           resource_size_t size, resource_size_t align)
+resource_size_t pcibios_align_resource(void *data, const struct resource *res,
+                               resource_size_t size, resource_size_t align)
 {
        resource_size_t start = res->start;
 
        if (res->flags & IORESOURCE_IO && start & 0x300)
                start = (start + 0x3ff) & ~0x3ff;
 
-       res->start = (start + align - 1) & ~(align - 1);
+       start = (start + align - 1) & ~(align - 1);
+
+       return start;
 }
 
 /**
index c6c57b6..621acad 100644 (file)
@@ -102,6 +102,7 @@ struct cpu_cache_fns cpu_cache;
 #endif
 #ifdef CONFIG_OUTER_CACHE
 struct outer_cache_fns outer_cache;
+EXPORT_SYMBOL(outer_cache);
 #endif
 
 struct stack {
index e726385..fe3bd5a 100644 (file)
@@ -86,7 +86,7 @@ static int gpio_set_irq_type(unsigned int irq, unsigned int type)
        unsigned int reg_both, reg_level, reg_type;
 
        reg_type = __raw_readl(base + GPIO_INT_TYPE);
-       reg_level = __raw_readl(base + GPIO_INT_BOTH_EDGE);
+       reg_level = __raw_readl(base + GPIO_INT_LEVEL);
        reg_both = __raw_readl(base + GPIO_INT_BOTH_EDGE);
 
        switch (type) {
@@ -117,7 +117,7 @@ static int gpio_set_irq_type(unsigned int irq, unsigned int type)
        }
 
        __raw_writel(reg_type, base + GPIO_INT_TYPE);
-       __raw_writel(reg_level, base + GPIO_INT_BOTH_EDGE);
+       __raw_writel(reg_level, base + GPIO_INT_LEVEL);
        __raw_writel(reg_both, base + GPIO_INT_BOTH_EDGE);
 
        gpio_ack_irq(irq);
index f93c596..9bf33b3 100644 (file)
@@ -86,11 +86,19 @@ static struct amba_device cpu8815_amba_gpio[] = {
        },
 };
 
+static struct amba_device cpu8815_amba_rng = {
+       .dev = {
+               .init_name = "rng",
+       },
+       __MEM_4K_RESOURCE(NOMADIK_RNG_BASE),
+};
+
 static struct amba_device *amba_devs[] __initdata = {
        cpu8815_amba_gpio + 0,
        cpu8815_amba_gpio + 1,
        cpu8815_amba_gpio + 2,
        cpu8815_amba_gpio + 3,
+       &cpu8815_amba_rng
 };
 
 static int __init cpu8815_init(void)
index 5fedc50..5fef73f 100644 (file)
@@ -961,16 +961,14 @@ static void __init omap_mux_init_list(struct omap_mux *superset)
        while (superset->reg_offset !=  OMAP_MUX_TERMINATOR) {
                struct omap_mux *entry;
 
-#ifndef CONFIG_OMAP_MUX
-               /* Skip pins that are not muxed as GPIO by bootloader */
-               if (!OMAP_MODE_GPIO(omap_mux_read(superset->reg_offset))) {
+#ifdef CONFIG_OMAP_MUX
+               if (!superset->muxnames || !superset->muxnames[0]) {
                        superset++;
                        continue;
                }
-#endif
-
-#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS)
-               if (!superset->muxnames || !superset->muxnames[0]) {
+#else
+               /* Skip pins that are not muxed as GPIO by bootloader */
+               if (!OMAP_MODE_GPIO(omap_mux_read(superset->reg_offset))) {
                        superset++;
                        continue;
                }
index b270d62..62820ed 100644 (file)
@@ -11,6 +11,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#include <linux/moduleparam.h>
 #include <linux/compiler.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
@@ -77,6 +78,8 @@ static unsigned long ai_dword;
 static unsigned long ai_multi;
 static int ai_usermode;
 
+core_param(alignment, ai_usermode, int, 0600);
+
 #define UM_WARN                (1 << 0)
 #define UM_FIXUP       (1 << 1)
 #define UM_SIGNAL      (1 << 2)
index 5a79fc6..31c2f4c 100644 (file)
@@ -12,7 +12,7 @@
 #
 #   http://www.arm.linux.org.uk/developer/machines/?action=new
 #
-# Last update: Thu Jan 28 22:15:54 2010
+# Last update: Sat Feb 20 14:16:15 2010
 #
 # machine_is_xxx       CONFIG_xxxx             MACH_TYPE_xxx           number
 #
@@ -2257,7 +2257,7 @@ oratisalog                MACH_ORATISALOG         ORATISALOG              2268
 oratismadi             MACH_ORATISMADI         ORATISMADI              2269
 oratisot16             MACH_ORATISOT16         ORATISOT16              2270
 oratisdesk             MACH_ORATISDESK         ORATISDESK              2271
-v2_ca9                 MACH_V2P_CA9            V2P_CA9                 2272
+vexpress               MACH_VEXPRESS           VEXPRESS                2272
 sintexo                        MACH_SINTEXO            SINTEXO                 2273
 cm3389                 MACH_CM3389             CM3389                  2274
 omap3_cio              MACH_OMAP3_CIO          OMAP3_CIO               2275
@@ -2636,3 +2636,45 @@ hw90240                  MACH_HW90240            HW90240                 2648
 dm365_leopard          MACH_DM365_LEOPARD      DM365_LEOPARD           2649
 mityomapl138           MACH_MITYOMAPL138       MITYOMAPL138            2650
 scat110                        MACH_SCAT110            SCAT110                 2651
+acer_a1                        MACH_ACER_A1            ACER_A1                 2652
+cmcontrol              MACH_CMCONTROL          CMCONTROL               2653
+pelco_lamar            MACH_PELCO_LAMAR        PELCO_LAMAR             2654
+rfp43                  MACH_RFP43              RFP43                   2655
+sk86r0301              MACH_SK86R0301          SK86R0301               2656
+ctpxa                  MACH_CTPXA              CTPXA                   2657
+epb_arm9_a             MACH_EPB_ARM9_A         EPB_ARM9_A              2658
+guruplug               MACH_GURUPLUG           GURUPLUG                2659
+spear310               MACH_SPEAR310           SPEAR310                2660
+spear320               MACH_SPEAR320           SPEAR320                2661
+robotx                 MACH_ROBOTX             ROBOTX                  2662
+lsxhl                  MACH_LSXHL              LSXHL                   2663
+smartlite              MACH_SMARTLITE          SMARTLITE               2664
+cws2                   MACH_CWS2               CWS2                    2665
+m619                   MACH_M619               M619                    2666
+smartview              MACH_SMARTVIEW          SMARTVIEW               2667
+lsa_salsa              MACH_LSA_SALSA          LSA_SALSA               2668
+kizbox                 MACH_KIZBOX             KIZBOX                  2669
+htccharmer             MACH_HTCCHARMER         HTCCHARMER              2670
+guf_neso_lt            MACH_GUF_NESO_LT        GUF_NESO_LT             2671
+pm9g45                 MACH_PM9G45             PM9G45                  2672
+htcpanther             MACH_HTCPANTHER         HTCPANTHER              2673
+htcpanther_cdma                MACH_HTCPANTHER_CDMA    HTCPANTHER_CDMA         2674
+reb01                  MACH_REB01              REB01                   2675
+aquila                 MACH_AQUILA             AQUILA                  2676
+spark_sls_hw2          MACH_SPARK_SLS_HW2      SPARK_SLS_HW2           2677
+sheeva_esata           MACH_ESATA_SHEEVAPLUG   ESATA_SHEEVAPLUG        2678
+surf7x30               MACH_SURF7X30           SURF7X30                2679
+micro2440              MACH_MICRO2440          MICRO2440               2680
+am2440                 MACH_AM2440             AM2440                  2681
+tq2440                 MACH_TQ2440             TQ2440                  2682
+lpc2478oem             MACH_LPC2478OEM         LPC2478OEM              2683
+ak880x                 MACH_AK880X             AK880X                  2684
+cobra3530              MACH_COBRA3530          COBRA3530               2685
+pmppb                  MACH_PMPPB              PMPPB                   2686
+u6715                  MACH_U6715              U6715                   2687
+axar1500_sender                MACH_AXAR1500_SENDER    AXAR1500_SENDER         2688
+g30_dvb                        MACH_G30_DVB            G30_DVB                 2689
+vc088x                 MACH_VC088X             VC088X                  2690
+mioa702                        MACH_MIOA702            MIOA702                 2691
+hpmin                  MACH_HPMIN              HPMIN                   2692
+ak880xak               MACH_AK880XAK           AK880XAK                2693
index 77ee319..d4b9c36 100644 (file)
@@ -41,18 +41,16 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
        return 0;
 }
 
-void
-pcibios_align_resource(void *data, struct resource *res,
+resource_size_t
+pcibios_align_resource(void *data, const struct resource *res,
                       resource_size_t size, resource_size_t align)
 {
-       if (res->flags & IORESOURCE_IO) {
-               resource_size_t start = res->start;
+       resource_size_t start = res->start;
 
-               if (start & 0x300) {
-                       start = (start + 0x3ff) & ~0x3ff;
-                       res->start = start;
-               }
-       }
+       if ((res->flags & IORESOURCE_IO) && (start & 0x300))
+               start = (start + 0x3ff) & ~0x3ff;
+
+       return start
 }
 
 int pcibios_enable_resources(struct pci_dev *dev, int mask)
index 566bdeb..1ed15d7 100644 (file)
  * but we want to try to avoid allocating at 0x2900-0x2bff
  * which might have be mirrored at 0x0100-0x03ff..
  */
-void
-pcibios_align_resource(void *data, struct resource *res,
+resource_size_t
+pcibios_align_resource(void *data, const struct resource *res,
                       resource_size_t size, resource_size_t align)
 {
-       if (res->flags & IORESOURCE_IO) {
-               resource_size_t start = res->start;
+       resource_size_t start = res->start;
 
-               if (start & 0x300) {
-                       start = (start + 0x3ff) & ~0x3ff;
-                       res->start = start;
-               }
-       }
+       if ((res->flags & IORESOURCE_IO) && (start & 0x300))
+               start = (start + 0x3ff) & ~0x3ff;
+
+       return start
 }
 
 
index 7ae5889..93997bd 100644 (file)
@@ -94,9 +94,11 @@ ia64_acpi_release_global_lock (unsigned int *lock)
 #define acpi_noirq 0   /* ACPI always enabled on IA64 */
 #define acpi_pci_disabled 0 /* ACPI PCI always enabled on IA64 */
 #define acpi_strict 1  /* no ACPI spec workarounds on IA64 */
+#define acpi_ht 0      /* no HT-only mode on IA64 */
 #endif
 #define acpi_processor_cstate_check(x) (x) /* no idle limits on IA64 :) */
 static inline void disable_acpi(void) { }
+static inline void pci_acpi_crs_quirks(void) { }
 
 const char *acpi_get_sysname (void);
 int acpi_request_vector (u32 int_type);
index e14108b..4c41656 100644 (file)
@@ -201,7 +201,9 @@ extern void ia64_elf_core_copy_regs (struct pt_regs *src, elf_gregset_t dst);
    relevant until we have real hardware to play with... */
 #define ELF_PLATFORM   NULL
 
-#define SET_PERSONALITY(ex)    set_personality(PER_LINUX)
+#define SET_PERSONALITY(ex)    \
+       set_personality((current->personality & ~PER_MASK) | PER_LINUX)
+
 #define elf_read_implies_exec(ex, executable_stack)                                    \
        ((executable_stack!=EXSTACK_DISABLE_X) && ((ex).e_flags & EF_IA_64_LINUX_EXECUTABLE_STACK) != 0)
 
index df639db..64aff52 100644 (file)
@@ -320,9 +320,9 @@ static __devinit acpi_status add_window(struct acpi_resource *res, void *data)
 static void __devinit
 pcibios_setup_root_windows(struct pci_bus *bus, struct pci_controller *ctrl)
 {
-       int i, j;
+       int i;
 
-       j = 0;
+       pci_bus_remove_resources(bus);
        for (i = 0; i < ctrl->windows; i++) {
                struct resource *res = &ctrl->window[i].resource;
                /* HP's firmware has a hack to work around a Windows bug.
@@ -330,13 +330,7 @@ pcibios_setup_root_windows(struct pci_bus *bus, struct pci_controller *ctrl)
                if ((res->flags & IORESOURCE_MEM) &&
                    (res->end - res->start < 16))
                        continue;
-               if (j >= PCI_BUS_NUM_RESOURCES) {
-                       dev_warn(&bus->dev,
-                                "ignoring host bridge window %pR (no space)\n",
-                                res);
-                       continue;
-               }
-               bus->resource[j++] = res;
+               pci_bus_add_resource(bus, res, 0);
        }
 }
 
@@ -452,13 +446,12 @@ EXPORT_SYMBOL(pcibios_bus_to_resource);
 static int __devinit is_valid_resource(struct pci_dev *dev, int idx)
 {
        unsigned int i, type_mask = IORESOURCE_IO | IORESOURCE_MEM;
-       struct resource *devr = &dev->resource[idx];
+       struct resource *devr = &dev->resource[idx], *busr;
 
        if (!dev->bus)
                return 0;
-       for (i=0; i<PCI_BUS_NUM_RESOURCES; i++) {
-               struct resource *busr = dev->bus->resource[i];
 
+       pci_bus_for_each_resource(dev->bus, busr, i) {
                if (!busr || ((busr->flags ^ devr->flags) & type_mask))
                        continue;
                if ((devr->start) && (devr->start >= busr->start) &&
@@ -547,10 +540,11 @@ pcibios_disable_device (struct pci_dev *dev)
                acpi_pci_irq_disable(dev);
 }
 
-void
-pcibios_align_resource (void *data, struct resource *res,
+resource_size_t
+pcibios_align_resource (void *data, const struct resource *res,
                        resource_size_t size, resource_size_t align)
 {
+       return res->start;
 }
 
 /*
index ece1bf9..e456f06 100644 (file)
@@ -71,7 +71,7 @@ EXPORT_SYMBOL(sn_rtc_cycles_per_second);
 DEFINE_PER_CPU(struct sn_hub_info_s, __sn_hub_info);
 EXPORT_PER_CPU_SYMBOL(__sn_hub_info);
 
-DEFINE_PER_CPU(short [MAX_COMPACT_NODES], __sn_cnodeid_to_nasid);
+DEFINE_PER_CPU(short, __sn_cnodeid_to_nasid[MAX_COMPACT_NODES]);
 EXPORT_PER_CPU_SYMBOL(__sn_cnodeid_to_nasid);
 
 DEFINE_PER_CPU(struct nodepda_s *, __sn_nodepda);
index cd5837e..b008168 100644 (file)
@@ -130,6 +130,7 @@ config CMDLINE_FORCE
 
 config OF
        def_bool y
+       select OF_FLATTREE
 
 config PROC_DEVICETREE
        bool "Support for device tree in /proc"
index fc9997b..267c7c7 100644 (file)
@@ -217,7 +217,7 @@ static inline void __iomem *__ioremap(phys_addr_t address, unsigned long size,
  * Little endian
  */
 
-#define out_le32(a, v) __raw_writel(__cpu_to_le32(v), (a));
+#define out_le32(a, v) __raw_writel(__cpu_to_le32(v), (a))
 #define out_le16(a, v) __raw_writew(__cpu_to_le16(v), (a))
 
 #define in_le32(a) __le32_to_cpu(__raw_readl(a))
index ef3ec1d..03f45a9 100644 (file)
 #include <asm/irq.h>
 #include <asm/atomic.h>
 
-#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT        1
-#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT        1
-
-#define of_compat_cmp(s1, s2, l)       strncasecmp((s1), (s2), (l))
-#define of_prop_cmp(s1, s2)            strcmp((s1), (s2))
-#define of_node_cmp(s1, s2)            strcasecmp((s1), (s2))
-
-extern struct device_node *of_chosen;
-
 #define HAVE_ARCH_DEVTREE_FIXUPS
 
-extern struct device_node *allnodes;   /* temporary while merging */
-extern rwlock_t devtree_lock;  /* temporary while merging */
-
-/* For updating the device tree at runtime */
-extern void of_attach_node(struct device_node *);
-extern void of_detach_node(struct device_node *);
-
 /* Other Prototypes */
 extern int early_uartlite_console(void);
 
-extern struct resource *request_OF_resource(struct device_node *node,
-                               int index, const char *name_postfix);
-extern int release_OF_resource(struct device_node *node, int index);
-
 /*
  * OF address retreival & translation
  */
index d9d6383..2a56bcc 100644 (file)
@@ -172,16 +172,15 @@ do {                                                                      \
 /* It is used only first parameter for OP - for wic, wdc */
 #define CACHE_RANGE_LOOP_1(start, end, line_length, op)                        \
 do {                                                                   \
-       int step = -line_length;                                        \
-       int count = end - start;                                        \
-       BUG_ON(count <= 0);                                             \
+       int volatile temp;                                              \
+       BUG_ON(end - start <= 0);                                       \
                                                                        \
-       __asm__ __volatile__ (" 1:      addk    %0, %0, %1;             \
-                                       " #op " %0, r0;                 \
-                                       bgtid   %1, 1b;                 \
-                                       addk    %1, %1, %2;             \
-                                       " : : "r" (start), "r" (count), \
-                                       "r" (step) : "memory");         \
+       __asm__ __volatile__ (" 1:      " #op " %1, r0;                 \
+                                       cmpu    %0, %1, %2;             \
+                                       bgtid   %0, 1b;                 \
+                                       addk    %1, %1, %3;             \
+                               " : : "r" (temp), "r" (start), "r" (end),\
+                                       "r" (line_length) : "memory");  \
 } while (0);
 
 static void __flush_icache_range_msr_irq(unsigned long start, unsigned long end)
@@ -313,16 +312,6 @@ static void __invalidate_dcache_all_wb(void)
        pr_debug("%s\n", __func__);
        CACHE_ALL_LOOP2(cpuinfo.dcache_size, cpuinfo.dcache_line_length,
                                        wdc.clear)
-
-#if 0
-       unsigned int i;
-
-       pr_debug("%s\n", __func__);
-
-       /* Just loop through cache size and invalidate it */
-       for (i = 0; i < cpuinfo.dcache_size; i += cpuinfo.dcache_line_length)
-                       __invalidate_dcache(0, i);
-#endif
 }
 
 static void __invalidate_dcache_range_wb(unsigned long start,
index acf4574..1c6d684 100644 (file)
@@ -185,7 +185,7 @@ EXPORT_SYMBOL(of_find_device_by_node);
 static int of_dev_phandle_match(struct device *dev, void *data)
 {
        phandle *ph = data;
-       return to_of_device(dev)->node->linux_phandle == *ph;
+       return to_of_device(dev)->node->phandle == *ph;
 }
 
 struct of_device *of_find_device_by_phandle(phandle ph)
index b817df1..a15ef6d 100644 (file)
 #include <asm/sections.h>
 #include <asm/pci-bridge.h>
 
-static int __initdata dt_root_addr_cells;
-static int __initdata dt_root_size_cells;
-
-typedef u32 cell_t;
-
-static struct boot_param_header *initial_boot_params;
-
-/* export that to outside world */
-struct device_node *of_chosen;
-
-static inline char *find_flat_dt_string(u32 offset)
-{
-       return ((char *)initial_boot_params) +
-               initial_boot_params->off_dt_strings + offset;
-}
-
-/**
- * This function is used to scan the flattened device-tree, it is
- * used to extract the memory informations at boot before we can
- * unflatten the tree
- */
-int __init of_scan_flat_dt(int (*it)(unsigned long node,
-                                    const char *uname, int depth,
-                                    void *data),
-                          void *data)
-{
-       unsigned long p = ((unsigned long)initial_boot_params) +
-               initial_boot_params->off_dt_struct;
-       int rc = 0;
-       int depth = -1;
-
-       do {
-               u32 tag = *((u32 *)p);
-               char *pathp;
-
-               p += 4;
-               if (tag == OF_DT_END_NODE) {
-                       depth--;
-                       continue;
-               }
-               if (tag == OF_DT_NOP)
-                       continue;
-               if (tag == OF_DT_END)
-                       break;
-               if (tag == OF_DT_PROP) {
-                       u32 sz = *((u32 *)p);
-                       p += 8;
-                       if (initial_boot_params->version < 0x10)
-                               p = _ALIGN(p, sz >= 8 ? 8 : 4);
-                       p += sz;
-                       p = _ALIGN(p, 4);
-                       continue;
-               }
-               if (tag != OF_DT_BEGIN_NODE) {
-                       printk(KERN_WARNING "Invalid tag %x scanning flattened"
-                               " device tree !\n", tag);
-                       return -EINVAL;
-               }
-               depth++;
-               pathp = (char *)p;
-               p = _ALIGN(p + strlen(pathp) + 1, 4);
-               if ((*pathp) == '/') {
-                       char *lp, *np;
-                       for (lp = NULL, np = pathp; *np; np++)
-                               if ((*np) == '/')
-                                       lp = np+1;
-                       if (lp != NULL)
-                               pathp = lp;
-               }
-               rc = it(p, pathp, depth, data);
-               if (rc != 0)
-                       break;
-       } while (1);
-
-       return rc;
-}
-
-unsigned long __init of_get_flat_dt_root(void)
-{
-       unsigned long p = ((unsigned long)initial_boot_params) +
-               initial_boot_params->off_dt_struct;
-
-       while (*((u32 *)p) == OF_DT_NOP)
-               p += 4;
-       BUG_ON(*((u32 *)p) != OF_DT_BEGIN_NODE);
-       p += 4;
-       return _ALIGN(p + strlen((char *)p) + 1, 4);
-}
-
-/**
- * This function can be used within scan_flattened_dt callback to get
- * access to properties
- */
-void *__init of_get_flat_dt_prop(unsigned long node, const char *name,
-                               unsigned long *size)
-{
-       unsigned long p = node;
-
-       do {
-               u32 tag = *((u32 *)p);
-               u32 sz, noff;
-               const char *nstr;
-
-               p += 4;
-               if (tag == OF_DT_NOP)
-                       continue;
-               if (tag != OF_DT_PROP)
-                       return NULL;
-
-               sz = *((u32 *)p);
-               noff = *((u32 *)(p + 4));
-               p += 8;
-               if (initial_boot_params->version < 0x10)
-                       p = _ALIGN(p, sz >= 8 ? 8 : 4);
-
-               nstr = find_flat_dt_string(noff);
-               if (nstr == NULL) {
-                       printk(KERN_WARNING "Can't find property index"
-                               " name !\n");
-                       return NULL;
-               }
-               if (strcmp(name, nstr) == 0) {
-                       if (size)
-                               *size = sz;
-                       return (void *)p;
-               }
-               p += sz;
-               p = _ALIGN(p, 4);
-       } while (1);
-}
-
-int __init of_flat_dt_is_compatible(unsigned long node, const char *compat)
-{
-       const char *cp;
-       unsigned long cplen, l;
-
-       cp = of_get_flat_dt_prop(node, "compatible", &cplen);
-       if (cp == NULL)
-               return 0;
-       while (cplen > 0) {
-               if (strncasecmp(cp, compat, strlen(compat)) == 0)
-                       return 1;
-               l = strlen(cp) + 1;
-               cp += l;
-               cplen -= l;
-       }
-
-       return 0;
-}
-
-static void *__init unflatten_dt_alloc(unsigned long *mem, unsigned long size,
-                                       unsigned long align)
-{
-       void *res;
-
-       *mem = _ALIGN(*mem, align);
-       res = (void *)*mem;
-       *mem += size;
-
-       return res;
-}
-
-static unsigned long __init unflatten_dt_node(unsigned long mem,
-                                       unsigned long *p,
-                                       struct device_node *dad,
-                                       struct device_node ***allnextpp,
-                                       unsigned long fpsize)
-{
-       struct device_node *np;
-       struct property *pp, **prev_pp = NULL;
-       char *pathp;
-       u32 tag;
-       unsigned int l, allocl;
-       int has_name = 0;
-       int new_format = 0;
-
-       tag = *((u32 *)(*p));
-       if (tag != OF_DT_BEGIN_NODE) {
-               printk("Weird tag at start of node: %x\n", tag);
-               return mem;
-       }
-       *p += 4;
-       pathp = (char *)*p;
-       l = allocl = strlen(pathp) + 1;
-       *p = _ALIGN(*p + l, 4);
-
-       /* version 0x10 has a more compact unit name here instead of the full
-        * path. we accumulate the full path size using "fpsize", we'll rebuild
-        * it later. We detect this because the first character of the name is
-        * not '/'.
-        */
-       if ((*pathp) != '/') {
-               new_format = 1;
-               if (fpsize == 0) {
-                       /* root node: special case. fpsize accounts for path
-                        * plus terminating zero. root node only has '/', so
-                        * fpsize should be 2, but we want to avoid the first
-                        * level nodes to have two '/' so we use fpsize 1 here
-                        */
-                       fpsize = 1;
-                       allocl = 2;
-               } else {
-                       /* account for '/' and path size minus terminal 0
-                        * already in 'l'
-                        */
-                       fpsize += l;
-                       allocl = fpsize;
-               }
-       }
-
-       np = unflatten_dt_alloc(&mem, sizeof(struct device_node) + allocl,
-                               __alignof__(struct device_node));
-       if (allnextpp) {
-               memset(np, 0, sizeof(*np));
-               np->full_name = ((char *)np) + sizeof(struct device_node);
-               if (new_format) {
-                       char *p2 = np->full_name;
-                       /* rebuild full path for new format */
-                       if (dad && dad->parent) {
-                               strcpy(p2, dad->full_name);
-#ifdef DEBUG
-                               if ((strlen(p2) + l + 1) != allocl) {
-                                       pr_debug("%s: p: %d, l: %d, a: %d\n",
-                                               pathp, (int)strlen(p2),
-                                               l, allocl);
-                               }
-#endif
-                               p2 += strlen(p2);
-                       }
-                       *(p2++) = '/';
-                       memcpy(p2, pathp, l);
-               } else
-                       memcpy(np->full_name, pathp, l);
-               prev_pp = &np->properties;
-               **allnextpp = np;
-               *allnextpp = &np->allnext;
-               if (dad != NULL) {
-                       np->parent = dad;
-                       /* we temporarily use the next field as `last_child'*/
-                       if (dad->next == NULL)
-                               dad->child = np;
-                       else
-                               dad->next->sibling = np;
-                       dad->next = np;
-               }
-               kref_init(&np->kref);
-       }
-       while (1) {
-               u32 sz, noff;
-               char *pname;
-
-               tag = *((u32 *)(*p));
-               if (tag == OF_DT_NOP) {
-                       *p += 4;
-                       continue;
-               }
-               if (tag != OF_DT_PROP)
-                       break;
-               *p += 4;
-               sz = *((u32 *)(*p));
-               noff = *((u32 *)((*p) + 4));
-               *p += 8;
-               if (initial_boot_params->version < 0x10)
-                       *p = _ALIGN(*p, sz >= 8 ? 8 : 4);
-
-               pname = find_flat_dt_string(noff);
-               if (pname == NULL) {
-                       printk(KERN_INFO
-                               "Can't find property name in list !\n");
-                       break;
-               }
-               if (strcmp(pname, "name") == 0)
-                       has_name = 1;
-               l = strlen(pname) + 1;
-               pp = unflatten_dt_alloc(&mem, sizeof(struct property),
-                                       __alignof__(struct property));
-               if (allnextpp) {
-                       if (strcmp(pname, "linux,phandle") == 0) {
-                               np->node = *((u32 *)*p);
-                               if (np->linux_phandle == 0)
-                                       np->linux_phandle = np->node;
-                       }
-                       if (strcmp(pname, "ibm,phandle") == 0)
-                               np->linux_phandle = *((u32 *)*p);
-                       pp->name = pname;
-                       pp->length = sz;
-                       pp->value = (void *)*p;
-                       *prev_pp = pp;
-                       prev_pp = &pp->next;
-               }
-               *p = _ALIGN((*p) + sz, 4);
-       }
-       /* with version 0x10 we may not have the name property, recreate
-        * it here from the unit name if absent
-        */
-       if (!has_name) {
-               char *p1 = pathp, *ps = pathp, *pa = NULL;
-               int sz;
-
-               while (*p1) {
-                       if ((*p1) == '@')
-                               pa = p1;
-                       if ((*p1) == '/')
-                               ps = p1 + 1;
-                       p1++;
-               }
-               if (pa < ps)
-                       pa = p1;
-               sz = (pa - ps) + 1;
-               pp = unflatten_dt_alloc(&mem, sizeof(struct property) + sz,
-                                       __alignof__(struct property));
-               if (allnextpp) {
-                       pp->name = "name";
-                       pp->length = sz;
-                       pp->value = pp + 1;
-                       *prev_pp = pp;
-                       prev_pp = &pp->next;
-                       memcpy(pp->value, ps, sz - 1);
-                       ((char *)pp->value)[sz - 1] = 0;
-                       pr_debug("fixed up name for %s -> %s\n", pathp,
-                               (char *)pp->value);
-               }
-       }
-       if (allnextpp) {
-               *prev_pp = NULL;
-               np->name = of_get_property(np, "name", NULL);
-               np->type = of_get_property(np, "device_type", NULL);
-
-               if (!np->name)
-                       np->name = "<NULL>";
-               if (!np->type)
-                       np->type = "<NULL>";
-       }
-       while (tag == OF_DT_BEGIN_NODE) {
-               mem = unflatten_dt_node(mem, p, np, allnextpp, fpsize);
-               tag = *((u32 *)(*p));
-       }
-       if (tag != OF_DT_END_NODE) {
-               printk(KERN_INFO "Weird tag at end of node: %x\n", tag);
-               return mem;
-       }
-       *p += 4;
-       return mem;
-}
-
-/**
- * unflattens the device-tree passed by the firmware, creating the
- * tree of struct device_node. It also fills the "name" and "type"
- * pointers of the nodes so the normal device-tree walking functions
- * can be used (this used to be done by finish_device_tree)
- */
-void __init unflatten_device_tree(void)
-{
-       unsigned long start, mem, size;
-       struct device_node **allnextp = &allnodes;
-
-       pr_debug(" -> unflatten_device_tree()\n");
-
-       /* First pass, scan for size */
-       start = ((unsigned long)initial_boot_params) +
-               initial_boot_params->off_dt_struct;
-       size = unflatten_dt_node(0, &start, NULL, NULL, 0);
-       size = (size | 3) + 1;
-
-       pr_debug("  size is %lx, allocating...\n", size);
-
-       /* Allocate memory for the expanded device tree */
-       mem = lmb_alloc(size + 4, __alignof__(struct device_node));
-       mem = (unsigned long) __va(mem);
-
-       ((u32 *)mem)[size / 4] = 0xdeadbeef;
-
-       pr_debug("  unflattening %lx...\n", mem);
-
-       /* Second pass, do actual unflattening */
-       start = ((unsigned long)initial_boot_params) +
-               initial_boot_params->off_dt_struct;
-       unflatten_dt_node(mem, &start, NULL, &allnextp, 0);
-       if (*((u32 *)start) != OF_DT_END)
-               printk(KERN_WARNING "Weird tag at end of tree: %08x\n",
-                       *((u32 *)start));
-       if (((u32 *)mem)[size / 4] != 0xdeadbeef)
-               printk(KERN_WARNING "End of tree marker overwritten: %08x\n",
-                       ((u32 *)mem)[size / 4]);
-       *allnextp = NULL;
-
-       /* Get pointer to OF "/chosen" node for use everywhere */
-       of_chosen = of_find_node_by_path("/chosen");
-       if (of_chosen == NULL)
-               of_chosen = of_find_node_by_path("/chosen@0");
-
-       pr_debug(" <- unflatten_device_tree()\n");
-}
-
-#define early_init_dt_scan_drconf_memory(node) 0
-
-static int __init early_init_dt_scan_cpus(unsigned long node,
-                                         const char *uname, int depth,
-                                         void *data)
-{
-       static int logical_cpuid;
-       char *type = of_get_flat_dt_prop(node, "device_type", NULL);
-       const u32 *intserv;
-       int i, nthreads;
-       int found = 0;
-
-       /* We are scanning "cpu" nodes only */
-       if (type == NULL || strcmp(type, "cpu") != 0)
-               return 0;
-
-       /* Get physical cpuid */
-       intserv = of_get_flat_dt_prop(node, "reg", NULL);
-       nthreads = 1;
-
-       /*
-        * Now see if any of these threads match our boot cpu.
-        * NOTE: This must match the parsing done in smp_setup_cpu_maps.
-        */
-       for (i = 0; i < nthreads; i++) {
-               /*
-                * version 2 of the kexec param format adds the phys cpuid of
-                * booted proc.
-                */
-               if (initial_boot_params && initial_boot_params->version >= 2) {
-                       if (intserv[i] ==
-                                       initial_boot_params->boot_cpuid_phys) {
-                               found = 1;
-                               break;
-                       }
-               } else {
-                       /*
-                        * Check if it's the boot-cpu, set it's hw index now,
-                        * unfortunately this format did not support booting
-                        * off secondary threads.
-                        */
-                       if (of_get_flat_dt_prop(node,
-                                       "linux,boot-cpu", NULL) != NULL) {
-                               found = 1;
-                               break;
-                       }
-               }
-
-#ifdef CONFIG_SMP
-               /* logical cpu id is always 0 on UP kernels */
-               logical_cpuid++;
-#endif
-       }
-
-       if (found) {
-               pr_debug("boot cpu: logical %d physical %d\n", logical_cpuid,
-                       intserv[i]);
-               boot_cpuid = logical_cpuid;
-       }
-
-       return 0;
-}
-
-#ifdef CONFIG_BLK_DEV_INITRD
-static void __init early_init_dt_check_for_initrd(unsigned long node)
-{
-       unsigned long l;
-       u32 *prop;
-
-       pr_debug("Looking for initrd properties... ");
-
-       prop = of_get_flat_dt_prop(node, "linux,initrd-start", &l);
-       if (prop) {
-               initrd_start = (unsigned long)
-                                       __va((u32)of_read_ulong(prop, l/4));
-
-               prop = of_get_flat_dt_prop(node, "linux,initrd-end", &l);
-               if (prop) {
-                       initrd_end = (unsigned long)
-                                       __va((u32)of_read_ulong(prop, 1/4));
-                       initrd_below_start_ok = 1;
-               } else {
-                       initrd_start = 0;
-               }
-       }
-
-       pr_debug("initrd_start=0x%lx  initrd_end=0x%lx\n",
-                                       initrd_start, initrd_end);
-}
-#else
-static inline void early_init_dt_check_for_initrd(unsigned long node)
-{
-}
-#endif /* CONFIG_BLK_DEV_INITRD */
-
-static int __init early_init_dt_scan_chosen(unsigned long node,
-                               const char *uname, int depth, void *data)
-{
-       unsigned long l;
-       char *p;
-
-       pr_debug("search \"chosen\", depth: %d, uname: %s\n", depth, uname);
-
-       if (depth != 1 ||
-               (strcmp(uname, "chosen") != 0 &&
-                               strcmp(uname, "chosen@0") != 0))
-               return 0;
-
-#ifdef CONFIG_KEXEC
-       lprop = (u64 *)of_get_flat_dt_prop(node,
-                               "linux,crashkernel-base", NULL);
-       if (lprop)
-               crashk_res.start = *lprop;
-
-       lprop = (u64 *)of_get_flat_dt_prop(node,
-                               "linux,crashkernel-size", NULL);
-       if (lprop)
-               crashk_res.end = crashk_res.start + *lprop - 1;
-#endif
-
-       early_init_dt_check_for_initrd(node);
-
-       /* Retreive command line */
-       p = of_get_flat_dt_prop(node, "bootargs", &l);
-       if (p != NULL && l > 0)
-               strlcpy(cmd_line, p, min((int)l, COMMAND_LINE_SIZE));
-
-#ifdef CONFIG_CMDLINE
-#ifndef CONFIG_CMDLINE_FORCE
-       if (p == NULL || l == 0 || (l == 1 && (*p) == 0))
-#endif
-               strlcpy(cmd_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
-#endif /* CONFIG_CMDLINE */
-
-       pr_debug("Command line is: %s\n", cmd_line);
-
-       /* break now */
-       return 1;
-}
-
-static int __init early_init_dt_scan_root(unsigned long node,
-                               const char *uname, int depth, void *data)
-{
-       u32 *prop;
-
-       if (depth != 0)
-               return 0;
-
-       prop = of_get_flat_dt_prop(node, "#size-cells", NULL);
-       dt_root_size_cells = (prop == NULL) ? 1 : *prop;
-       pr_debug("dt_root_size_cells = %x\n", dt_root_size_cells);
-
-       prop = of_get_flat_dt_prop(node, "#address-cells", NULL);
-       dt_root_addr_cells = (prop == NULL) ? 2 : *prop;
-       pr_debug("dt_root_addr_cells = %x\n", dt_root_addr_cells);
-
-       /* break now */
-       return 1;
-}
-
-static u64 __init dt_mem_next_cell(int s, cell_t **cellp)
+void __init early_init_dt_scan_chosen_arch(unsigned long node)
 {
-       cell_t *p = *cellp;
-
-       *cellp = p + s;
-       return of_read_number(p, s);
+       /* No Microblaze specific code here */
 }
 
-static int __init early_init_dt_scan_memory(unsigned long node,
-                               const char *uname, int depth, void *data)
+void __init early_init_dt_add_memory_arch(u64 base, u64 size)
 {
-       char *type = of_get_flat_dt_prop(node, "device_type", NULL);
-       cell_t *reg, *endp;
-       unsigned long l;
-
-       /* Look for the ibm,dynamic-reconfiguration-memory node */
-/*     if (depth == 1 &&
-               strcmp(uname, "ibm,dynamic-reconfiguration-memory") == 0)
-               return early_init_dt_scan_drconf_memory(node);
-*/
-       /* We are scanning "memory" nodes only */
-       if (type == NULL) {
-               /*
-                * The longtrail doesn't have a device_type on the
-                * /memory node, so look for the node called /memory@0.
-                */
-               if (depth != 1 || strcmp(uname, "memory@0") != 0)
-                       return 0;
-       } else if (strcmp(type, "memory") != 0)
-               return 0;
-
-       reg = (cell_t *)of_get_flat_dt_prop(node, "linux,usable-memory", &l);
-       if (reg == NULL)
-               reg = (cell_t *)of_get_flat_dt_prop(node, "reg", &l);
-       if (reg == NULL)
-               return 0;
-
-       endp = reg + (l / sizeof(cell_t));
-
-       pr_debug("memory scan node %s, reg size %ld, data: %x %x %x %x,\n",
-               uname, l, reg[0], reg[1], reg[2], reg[3]);
-
-       while ((endp - reg) >= (dt_root_addr_cells + dt_root_size_cells)) {
-               u64 base, size;
-
-               base = dt_mem_next_cell(dt_root_addr_cells, &reg);
-               size = dt_mem_next_cell(dt_root_size_cells, &reg);
-
-               if (size == 0)
-                       continue;
-               pr_debug(" - %llx ,  %llx\n", (unsigned long long)base,
-                       (unsigned long long)size);
-
-               lmb_add(base, size);
-       }
-       return 0;
+       lmb_add(base, size);
 }
 
-#ifdef CONFIG_PHYP_DUMP
-/**
- * phyp_dump_calculate_reserve_size() - reserve variable boot area 5% or arg
- *
- * Function to find the largest size we need to reserve
- * during early boot process.
- *
- * It either looks for boot param and returns that OR
- * returns larger of 256 or 5% rounded down to multiples of 256MB.
- *
- */
-static inline unsigned long phyp_dump_calculate_reserve_size(void)
+u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
 {
-       unsigned long tmp;
-
-       if (phyp_dump_info->reserve_bootvar)
-               return phyp_dump_info->reserve_bootvar;
-
-       /* divide by 20 to get 5% of value */
-       tmp = lmb_end_of_DRAM();
-       do_div(tmp, 20);
-
-       /* round it down in multiples of 256 */
-       tmp = tmp & ~0x0FFFFFFFUL;
-
-       return (tmp > PHYP_DUMP_RMR_END ? tmp : PHYP_DUMP_RMR_END);
+       return lmb_alloc(size, align);
 }
 
-/**
- * phyp_dump_reserve_mem() - reserve all not-yet-dumped mmemory
- *
- * This routine may reserve memory regions in the kernel only
- * if the system is supported and a dump was taken in last
- * boot instance or if the hardware is supported and the
- * scratch area needs to be setup. In other instances it returns
- * without reserving anything. The memory in case of dump being
- * active is freed when the dump is collected (by userland tools).
- */
-static void __init phyp_dump_reserve_mem(void)
-{
-       unsigned long base, size;
-       unsigned long variable_reserve_size;
-
-       if (!phyp_dump_info->phyp_dump_configured) {
-               printk(KERN_ERR "Phyp-dump not supported on this hardware\n");
-               return;
-       }
-
-       if (!phyp_dump_info->phyp_dump_at_boot) {
-               printk(KERN_INFO "Phyp-dump disabled at boot time\n");
-               return;
-       }
-
-       variable_reserve_size = phyp_dump_calculate_reserve_size();
-
-       if (phyp_dump_info->phyp_dump_is_active) {
-               /* Reserve *everything* above RMR.Area freed by userland tools*/
-               base = variable_reserve_size;
-               size = lmb_end_of_DRAM() - base;
-
-               /* XXX crashed_ram_end is wrong, since it may be beyond
-                * the memory_limit, it will need to be adjusted. */
-               lmb_reserve(base, size);
-
-               phyp_dump_info->init_reserve_start = base;
-               phyp_dump_info->init_reserve_size = size;
-       } else {
-               size = phyp_dump_info->cpu_state_size +
-                       phyp_dump_info->hpte_region_size +
-                       variable_reserve_size;
-               base = lmb_end_of_DRAM() - size;
-               lmb_reserve(base, size);
-               phyp_dump_info->init_reserve_start = base;
-               phyp_dump_info->init_reserve_size = size;
-       }
-}
-#else
-static inline void __init phyp_dump_reserve_mem(void) {}
-#endif /* CONFIG_PHYP_DUMP  && CONFIG_PPC_RTAS */
-
 #ifdef CONFIG_EARLY_PRINTK
 /* MS this is Microblaze specifig function */
 static int __init early_init_dt_scan_serial(unsigned long node,
@@ -775,11 +98,6 @@ void __init early_init_devtree(void *params)
        /* Setup flat device-tree pointer */
        initial_boot_params = params;
 
-#ifdef CONFIG_PHYP_DUMP
-       /* scan tree to see if dump occured during last boot */
-       of_scan_flat_dt(early_init_dt_scan_phyp_dump, NULL);
-#endif
-
        /* Retrieve various informations from the /chosen node of the
         * device-tree, including the platform type, initrd location and
         * size, TCE reserve, and more ...
@@ -799,33 +117,18 @@ void __init early_init_devtree(void *params)
 
        pr_debug("Phys. mem: %lx\n", (unsigned long) lmb_phys_mem_size());
 
-       pr_debug("Scanning CPUs ...\n");
-
-       /* Retreive CPU related informations from the flat tree
-        * (altivec support, boot CPU ID, ...)
-        */
-       of_scan_flat_dt(early_init_dt_scan_cpus, NULL);
-
        pr_debug(" <- early_init_devtree()\n");
 }
 
-/**
- * Indicates whether the root node has a given value in its
- * compatible property.
- */
-int machine_is_compatible(const char *compat)
+#ifdef CONFIG_BLK_DEV_INITRD
+void __init early_init_dt_setup_initrd_arch(unsigned long start,
+               unsigned long end)
 {
-       struct device_node *root;
-       int rc = 0;
-
-       root = of_find_node_by_path("/");
-       if (root) {
-               rc = of_device_is_compatible(root, compat);
-               of_node_put(root);
-       }
-       return rc;
+       initrd_start = (unsigned long)__va(start);
+       initrd_end = (unsigned long)__va(end);
+       initrd_below_start_ok = 1;
 }
-EXPORT_SYMBOL(machine_is_compatible);
+#endif
 
 /*******
  *
@@ -838,273 +141,6 @@ EXPORT_SYMBOL(machine_is_compatible);
  *
  *******/
 
-/**
- *     of_find_node_by_phandle - Find a node given a phandle
- *     @handle:        phandle of the node to find
- *
- *     Returns a node pointer with refcount incremented, use
- *     of_node_put() on it when done.
- */
-struct device_node *of_find_node_by_phandle(phandle handle)
-{
-       struct device_node *np;
-
-       read_lock(&devtree_lock);
-       for (np = allnodes; np != NULL; np = np->allnext)
-               if (np->linux_phandle == handle)
-                       break;
-       of_node_get(np);
-       read_unlock(&devtree_lock);
-       return np;
-}
-EXPORT_SYMBOL(of_find_node_by_phandle);
-
-/**
- *     of_node_get - Increment refcount of a node
- *     @node:  Node to inc refcount, NULL is supported to
- *             simplify writing of callers
- *
- *     Returns node.
- */
-struct device_node *of_node_get(struct device_node *node)
-{
-       if (node)
-               kref_get(&node->kref);
-       return node;
-}
-EXPORT_SYMBOL(of_node_get);
-
-static inline struct device_node *kref_to_device_node(struct kref *kref)
-{
-       return container_of(kref, struct device_node, kref);
-}
-
-/**
- *     of_node_release - release a dynamically allocated node
- *     @kref:  kref element of the node to be released
- *
- *     In of_node_put() this function is passed to kref_put()
- *     as the destructor.
- */
-static void of_node_release(struct kref *kref)
-{
-       struct device_node *node = kref_to_device_node(kref);
-       struct property *prop = node->properties;
-
-       /* We should never be releasing nodes that haven't been detached. */
-       if (!of_node_check_flag(node, OF_DETACHED)) {
-               printk(KERN_INFO "WARNING: Bad of_node_put() on %s\n",
-                       node->full_name);
-               dump_stack();
-               kref_init(&node->kref);
-               return;
-       }
-
-       if (!of_node_check_flag(node, OF_DYNAMIC))
-               return;
-
-       while (prop) {
-               struct property *next = prop->next;
-               kfree(prop->name);
-               kfree(prop->value);
-               kfree(prop);
-               prop = next;
-
-               if (!prop) {
-                       prop = node->deadprops;
-                       node->deadprops = NULL;
-               }
-       }
-       kfree(node->full_name);
-       kfree(node->data);
-       kfree(node);
-}
-
-/**
- *     of_node_put - Decrement refcount of a node
- *     @node:  Node to dec refcount, NULL is supported to
- *             simplify writing of callers
- *
- */
-void of_node_put(struct device_node *node)
-{
-       if (node)
-               kref_put(&node->kref, of_node_release);
-}
-EXPORT_SYMBOL(of_node_put);
-
-/*
- * Plug a device node into the tree and global list.
- */
-void of_attach_node(struct device_node *np)
-{
-       unsigned long flags;
-
-       write_lock_irqsave(&devtree_lock, flags);
-       np->sibling = np->parent->child;
-       np->allnext = allnodes;
-       np->parent->child = np;
-       allnodes = np;
-       write_unlock_irqrestore(&devtree_lock, flags);
-}
-
-/*
- * "Unplug" a node from the device tree.  The caller must hold
- * a reference to the node.  The memory associated with the node
- * is not freed until its refcount goes to zero.
- */
-void of_detach_node(struct device_node *np)
-{
-       struct device_node *parent;
-       unsigned long flags;
-
-       write_lock_irqsave(&devtree_lock, flags);
-
-       parent = np->parent;
-       if (!parent)
-               goto out_unlock;
-
-       if (allnodes == np)
-               allnodes = np->allnext;
-       else {
-               struct device_node *prev;
-               for (prev = allnodes;
-                    prev->allnext != np;
-                    prev = prev->allnext)
-                       ;
-               prev->allnext = np->allnext;
-       }
-
-       if (parent->child == np)
-               parent->child = np->sibling;
-       else {
-               struct device_node *prevsib;
-               for (prevsib = np->parent->child;
-                    prevsib->sibling != np;
-                    prevsib = prevsib->sibling)
-                       ;
-               prevsib->sibling = np->sibling;
-       }
-
-       of_node_set_flag(np, OF_DETACHED);
-
-out_unlock:
-       write_unlock_irqrestore(&devtree_lock, flags);
-}
-
-/*
- * Add a property to a node
- */
-int prom_add_property(struct device_node *np, struct property *prop)
-{
-       struct property **next;
-       unsigned long flags;
-
-       prop->next = NULL;
-       write_lock_irqsave(&devtree_lock, flags);
-       next = &np->properties;
-       while (*next) {
-               if (strcmp(prop->name, (*next)->name) == 0) {
-                       /* duplicate ! don't insert it */
-                       write_unlock_irqrestore(&devtree_lock, flags);
-                       return -1;
-               }
-               next = &(*next)->next;
-       }
-       *next = prop;
-       write_unlock_irqrestore(&devtree_lock, flags);
-
-#ifdef CONFIG_PROC_DEVICETREE
-       /* try to add to proc as well if it was initialized */
-       if (np->pde)
-               proc_device_tree_add_prop(np->pde, prop);
-#endif /* CONFIG_PROC_DEVICETREE */
-
-       return 0;
-}
-
-/*
- * Remove a property from a node.  Note that we don't actually
- * remove it, since we have given out who-knows-how-many pointers
- * to the data using get-property.  Instead we just move the property
- * to the "dead properties" list, so it won't be found any more.
- */
-int prom_remove_property(struct device_node *np, struct property *prop)
-{
-       struct property **next;
-       unsigned long flags;
-       int found = 0;
-
-       write_lock_irqsave(&devtree_lock, flags);
-       next = &np->properties;
-       while (*next) {
-               if (*next == prop) {
-                       /* found the node */
-                       *next = prop->next;
-                       prop->next = np->deadprops;
-                       np->deadprops = prop;
-                       found = 1;
-                       break;
-               }
-               next = &(*next)->next;
-       }
-       write_unlock_irqrestore(&devtree_lock, flags);
-
-       if (!found)
-               return -ENODEV;
-
-#ifdef CONFIG_PROC_DEVICETREE
-       /* try to remove the proc node as well */
-       if (np->pde)
-               proc_device_tree_remove_prop(np->pde, prop);
-#endif /* CONFIG_PROC_DEVICETREE */
-
-       return 0;
-}
-
-/*
- * Update a property in a node.  Note that we don't actually
- * remove it, since we have given out who-knows-how-many pointers
- * to the data using get-property.  Instead we just move the property
- * to the "dead properties" list, and add the new property to the
- * property list
- */
-int prom_update_property(struct device_node *np,
-                        struct property *newprop,
-                        struct property *oldprop)
-{
-       struct property **next;
-       unsigned long flags;
-       int found = 0;
-
-       write_lock_irqsave(&devtree_lock, flags);
-       next = &np->properties;
-       while (*next) {
-               if (*next == oldprop) {
-                       /* found the node */
-                       newprop->next = oldprop->next;
-                       *next = newprop;
-                       oldprop->next = np->deadprops;
-                       np->deadprops = oldprop;
-                       found = 1;
-                       break;
-               }
-               next = &(*next)->next;
-       }
-       write_unlock_irqrestore(&devtree_lock, flags);
-
-       if (!found)
-               return -ENODEV;
-
-#ifdef CONFIG_PROC_DEVICETREE
-       /* try to add to proc as well if it was initialized */
-       if (np->pde)
-               proc_device_tree_update_prop(np->pde, newprop, oldprop);
-#endif /* CONFIG_PROC_DEVICETREE */
-
-       return 0;
-}
-
 #if defined(CONFIG_DEBUG_FS) && defined(DEBUG)
 static struct debugfs_blob_wrapper flat_dt_blob;
 
index c51405e..29d3cbf 100644 (file)
@@ -141,6 +141,14 @@ static __init void prom_init_mem(void)
                        break;
        }
 
+       /* Ignoring the last page when ddr size is 128M. Cached
+        * accesses to last page is causing the processor to prefetch
+        * using address above 128M stepping out of the ddr address
+        * space.
+        */
+       if (mem == 0x8000000)
+               mem -= 0x1000;
+
        add_memory_region(0, mem, BOOT_MEM_RAM);
 }
 
index e274fda..127d732 100644 (file)
@@ -1,5 +1,6 @@
 #include <linux/module.h>
 #include <linux/highmem.h>
+#include <linux/sched.h>
 #include <linux/smp.h>
 #include <asm/fixmap.h>
 #include <asm/tlbflush.h>
index 9a11c22..f87f5e1 100644 (file)
@@ -49,8 +49,8 @@ static int pci_initialized;
  * but we want to try to avoid allocating at 0x2900-0x2bff
  * which might have be mirrored at 0x0100-0x03ff..
  */
-void
-pcibios_align_resource(void *data, struct resource *res,
+resource_size_t
+pcibios_align_resource(void *data, const struct resource *res,
                       resource_size_t size, resource_size_t align)
 {
        struct pci_dev *dev = data;
@@ -73,7 +73,7 @@ pcibios_align_resource(void *data, struct resource *res,
                        start = PCIBIOS_MIN_MEM + hose->mem_resource->start;
        }
 
-       res->start = start;
+       return start;
 }
 
 static void __devinit pcibios_scanbus(struct pci_controller *hose)
index 678388f..fd22597 100644 (file)
@@ -345,14 +345,13 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
         return pcibios_enable_resources(dev);
 }
 
-void pcibios_align_resource(void *data, struct resource *res,
-                            resource_size_t size, resource_size_t align)
+resource_size_t pcibios_align_resource(void *data, const struct resource *res,
+                               resource_size_t size, resource_size_t align)
 {
         struct pci_dev *dev = data;
+       resource_size_t start = res->start;
 
         if (res->flags & IORESOURCE_IO) {
-                resource_size_t start = res->start;
-
                 /* We need to avoid collisions with `mirrored' VGA ports
                    and other strange ISA hardware, so we always want the
                    addresses kilobyte aligned.  */
@@ -363,8 +362,9 @@ void pcibios_align_resource(void *data, struct resource *res,
                 }
 
                 start = (start + 1024 - 1) & ~(1024 - 1);
-                res->start = start;
         }
+
+       return start;
 }
 
 struct pci_ops titan_pci_ops = {
index 78cd134..d6119b8 100644 (file)
  * but we want to try to avoid allocating at 0x2900-0x2bff
  * which might have be mirrored at 0x0100-0x03ff..
  */
-void pcibios_align_resource(void *data, struct resource *res,
-                           resource_size_t size, resource_size_t align)
+resource_size_t pcibios_align_resource(void *data, const struct resource *res,
+                               resource_size_t size, resource_size_t align)
 {
+       resource_size_t start = res->start;
+
 #if 0
        struct pci_dev *dev = data;
 
@@ -47,14 +49,10 @@ void pcibios_align_resource(void *data, struct resource *res,
               );
 #endif
 
-       if (res->flags & IORESOURCE_IO) {
-               unsigned long start = res->start;
+       if ((res->flags & IORESOURCE_IO) && (start & 0x300))
+               start = (start + 0x3ff) & ~0x3ff;
 
-               if (start & 0x300) {
-                       start = (start + 0x3ff) & ~0x3ff;
-                       res->start = start;
-               }
-       }
+       return start;
 }
 
 
index 2cb7e75..6d8720a 100644 (file)
@@ -331,12 +331,10 @@ static int __init pci_check_direct(void)
 static int __devinit is_valid_resource(struct pci_dev *dev, int idx)
 {
        unsigned int i, type_mask = IORESOURCE_IO | IORESOURCE_MEM;
-       struct resource *devr = &dev->resource[idx];
+       struct resource *devr = &dev->resource[idx], *busr;
 
        if (dev->bus) {
-               for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) {
-                       struct resource *busr = dev->bus->resource[i];
-
+               pci_bus_for_each_resource(dev->bus, busr, i) {
                        if (!busr || (busr->flags ^ devr->flags) & type_mask)
                                continue;
 
index 524d935..f388dc6 100644 (file)
@@ -18,7 +18,6 @@ config PARISC
        select BUG
        select HAVE_PERF_EVENTS
        select GENERIC_ATOMIC64 if !64BIT
-       select HAVE_ARCH_TRACEHOOK
        help
          The PA-RISC microprocessor is designed by Hewlett-Packard and used
          in many of their workstations & servers (HP9000 700 and 800 series,
index f7064ab..38372e7 100644 (file)
@@ -18,7 +18,6 @@
 
 #include <asm/io.h>
 #include <asm/system.h>
-#include <asm/cache.h>         /* for L1_CACHE_BYTES */
 #include <asm/superio.h>
 
 #define DEBUG_RESOURCES 0
@@ -123,6 +122,10 @@ static int __init pcibios_init(void)
        } else {
                printk(KERN_WARNING "pci_bios != NULL but init() is!\n");
        }
+
+       /* Set the CLS for PCI as early as possible. */
+       pci_cache_line_size = pci_dfl_cache_line_size;
+
        return 0;
 }
 
@@ -171,7 +174,7 @@ void pcibios_set_master(struct pci_dev *dev)
        ** upper byte is PCI_LATENCY_TIMER.
        */
        pci_write_config_word(dev, PCI_CACHE_LINE_SIZE,
-                               (0x80 << 8) | (L1_CACHE_BYTES / sizeof(u32)));
+                             (0x80 << 8) | pci_cache_line_size);
 }
 
 
@@ -254,10 +257,10 @@ EXPORT_SYMBOL(pcibios_bus_to_resource);
  * Since we are just checking candidates, don't use any fields other
  * than res->start.
  */
-void pcibios_align_resource(void *data, struct resource *res,
+resource_size_t pcibios_align_resource(void *data, const struct resource *res,
                                resource_size_t size, resource_size_t alignment)
 {
-       resource_size_t mask, align;
+       resource_size_t mask, align, start = res->start;
 
        DBG_RES("pcibios_align_resource(%s, (%p) [%lx,%lx]/%x, 0x%lx, 0x%lx)\n",
                pci_name(((struct pci_dev *) data)),
@@ -269,10 +272,10 @@ void pcibios_align_resource(void *data, struct resource *res,
 
        /* Align to largest of MIN or input size */
        mask = max(alignment, align) - 1;
-       res->start += mask;
-       res->start &= ~mask;
+       start += mask;
+       start &= ~mask;
 
-       /* The caller updates the end field, we don't.  */
+       return start;
 }
 
 
index ba3948c..50c9af4 100644 (file)
@@ -173,6 +173,7 @@ config PPC_OF
 
 config OF
        def_bool y
+       select OF_FLATTREE
 
 config PPC_UDBG_16550
        bool
index 2ab9cbd..ddd408a 100644 (file)
 #include <asm/irq.h>
 #include <asm/atomic.h>
 
-#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT        1
-#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT        1
-
-#define of_compat_cmp(s1, s2, l)       strcasecmp((s1), (s2))
-#define of_prop_cmp(s1, s2)            strcmp((s1), (s2))
-#define of_node_cmp(s1, s2)            strcasecmp((s1), (s2))
-
-extern struct device_node *of_chosen;
-
 #define HAVE_ARCH_DEVTREE_FIXUPS
 
-/* For updating the device tree at runtime */
-extern void of_attach_node(struct device_node *);
-extern void of_detach_node(struct device_node *);
-
 #ifdef CONFIG_PPC32
 /*
  * PCI <-> OF matching functions
@@ -52,11 +39,6 @@ extern struct device_node* pci_device_to_OF_node(struct pci_dev *);
 extern void pci_create_OF_bus_map(void);
 #endif
 
-extern struct resource *request_OF_resource(struct device_node* node,
-                               int index, const char* name_postfix);
-extern int release_OF_resource(struct device_node* node, int index);
-
-
 /*
  * OF address retreival & translation
  */
index 1a4fc0d..666d08d 100644 (file)
@@ -214,7 +214,7 @@ EXPORT_SYMBOL(of_find_device_by_node);
 static int of_dev_phandle_match(struct device *dev, void *data)
 {
        phandle *ph = data;
-       return to_of_device(dev)->node->linux_phandle == *ph;
+       return to_of_device(dev)->node->phandle == *ph;
 }
 
 struct of_device *of_find_device_by_phandle(phandle ph)
index cadbed6..2597f95 100644 (file)
@@ -1047,10 +1047,8 @@ static void __devinit pcibios_fixup_bridge(struct pci_bus *bus)
 
        struct pci_dev *dev = bus->self;
 
-       for (i = 0; i < PCI_BUS_NUM_RESOURCES; ++i) {
-               if ((res = bus->resource[i]) == NULL)
-                       continue;
-               if (!res->flags)
+       pci_bus_for_each_resource(bus, res, i) {
+               if (!res || !res->flags)
                        continue;
                if (i >= 3 && bus->self->transparent)
                        continue;
@@ -1181,21 +1179,20 @@ static int skip_isa_ioresource_align(struct pci_dev *dev)
  * but we want to try to avoid allocating at 0x2900-0x2bff
  * which might have be mirrored at 0x0100-0x03ff..
  */
-void pcibios_align_resource(void *data, struct resource *res,
+resource_size_t pcibios_align_resource(void *data, const struct resource *res,
                                resource_size_t size, resource_size_t align)
 {
        struct pci_dev *dev = data;
+       resource_size_t start = res->start;
 
        if (res->flags & IORESOURCE_IO) {
-               resource_size_t start = res->start;
-
                if (skip_isa_ioresource_align(dev))
-                       return;
-               if (start & 0x300) {
+                       return start;
+               if (start & 0x300)
                        start = (start + 0x3ff) & ~0x3ff;
-                       res->start = start;
-               }
        }
+
+       return start;
 }
 EXPORT_SYMBOL(pcibios_align_resource);
 
@@ -1278,9 +1275,8 @@ void pcibios_allocate_bus_resources(struct pci_bus *bus)
        pr_debug("PCI: Allocating bus resources for %04x:%02x...\n",
                 pci_domain_nr(bus), bus->number);
 
-       for (i = 0; i < PCI_BUS_NUM_RESOURCES; ++i) {
-               if ((res = bus->resource[i]) == NULL || !res->flags
-                   || res->start > res->end || res->parent)
+       pci_bus_for_each_resource(bus, res, i) {
+               if (!res || !res->flags || res->start > res->end || res->parent)
                        continue;
                if (bus->parent == NULL)
                        pr = (res->flags & IORESOURCE_IO) ?
index ccf56ac..d43fc65 100644 (file)
@@ -224,7 +224,7 @@ long sys_pciconfig_iobase(long which, unsigned long in_bus,
         * G5 machines... So when something asks for bus 0 io base
         * (bus 0 is HT root), we return the AGP one instead.
         */
-       if (in_bus == 0 && machine_is_compatible("MacRISC4")) {
+       if (in_bus == 0 && of_machine_is_compatible("MacRISC4")) {
                struct device_node *agp;
 
                agp = of_find_compatible_node(NULL, NULL, "u3-agp");
index 4ec3008..43238b2 100644 (file)
 #define DBG(fmt...)
 #endif
 
-
-static int __initdata dt_root_addr_cells;
-static int __initdata dt_root_size_cells;
-
 #ifdef CONFIG_PPC64
 int __initdata iommu_is_off;
 int __initdata iommu_force_on;
 unsigned long tce_alloc_start, tce_alloc_end;
 #endif
 
-typedef u32 cell_t;
-
-#if 0
-static struct boot_param_header *initial_boot_params __initdata;
-#else
-struct boot_param_header *initial_boot_params;
-#endif
-
-extern struct device_node *allnodes;   /* temporary while merging */
-
-extern rwlock_t devtree_lock;  /* temporary while merging */
-
-/* export that to outside world */
-struct device_node *of_chosen;
-
-static inline char *find_flat_dt_string(u32 offset)
-{
-       return ((char *)initial_boot_params) +
-               initial_boot_params->off_dt_strings + offset;
-}
-
-/**
- * This function is used to scan the flattened device-tree, it is
- * used to extract the memory informations at boot before we can
- * unflatten the tree
- */
-int __init of_scan_flat_dt(int (*it)(unsigned long node,
-                                    const char *uname, int depth,
-                                    void *data),
-                          void *data)
-{
-       unsigned long p = ((unsigned long)initial_boot_params) +
-               initial_boot_params->off_dt_struct;
-       int rc = 0;
-       int depth = -1;
-
-       do {
-               u32 tag = *((u32 *)p);
-               char *pathp;
-               
-               p += 4;
-               if (tag == OF_DT_END_NODE) {
-                       depth --;
-                       continue;
-               }
-               if (tag == OF_DT_NOP)
-                       continue;
-               if (tag == OF_DT_END)
-                       break;
-               if (tag == OF_DT_PROP) {
-                       u32 sz = *((u32 *)p);
-                       p += 8;
-                       if (initial_boot_params->version < 0x10)
-                               p = _ALIGN(p, sz >= 8 ? 8 : 4);
-                       p += sz;
-                       p = _ALIGN(p, 4);
-                       continue;
-               }
-               if (tag != OF_DT_BEGIN_NODE) {
-                       printk(KERN_WARNING "Invalid tag %x scanning flattened"
-                              " device tree !\n", tag);
-                       return -EINVAL;
-               }
-               depth++;
-               pathp = (char *)p;
-               p = _ALIGN(p + strlen(pathp) + 1, 4);
-               if ((*pathp) == '/') {
-                       char *lp, *np;
-                       for (lp = NULL, np = pathp; *np; np++)
-                               if ((*np) == '/')
-                                       lp = np+1;
-                       if (lp != NULL)
-                               pathp = lp;
-               }
-               rc = it(p, pathp, depth, data);
-               if (rc != 0)
-                       break;          
-       } while(1);
-
-       return rc;
-}
-
-unsigned long __init of_get_flat_dt_root(void)
-{
-       unsigned long p = ((unsigned long)initial_boot_params) +
-               initial_boot_params->off_dt_struct;
-
-       while(*((u32 *)p) == OF_DT_NOP)
-               p += 4;
-       BUG_ON (*((u32 *)p) != OF_DT_BEGIN_NODE);
-       p += 4;
-       return _ALIGN(p + strlen((char *)p) + 1, 4);
-}
-
-/**
- * This  function can be used within scan_flattened_dt callback to get
- * access to properties
- */
-void* __init of_get_flat_dt_prop(unsigned long node, const char *name,
-                                unsigned long *size)
-{
-       unsigned long p = node;
-
-       do {
-               u32 tag = *((u32 *)p);
-               u32 sz, noff;
-               const char *nstr;
-
-               p += 4;
-               if (tag == OF_DT_NOP)
-                       continue;
-               if (tag != OF_DT_PROP)
-                       return NULL;
-
-               sz = *((u32 *)p);
-               noff = *((u32 *)(p + 4));
-               p += 8;
-               if (initial_boot_params->version < 0x10)
-                       p = _ALIGN(p, sz >= 8 ? 8 : 4);
-
-               nstr = find_flat_dt_string(noff);
-               if (nstr == NULL) {
-                       printk(KERN_WARNING "Can't find property index"
-                              " name !\n");
-                       return NULL;
-               }
-               if (strcmp(name, nstr) == 0) {
-                       if (size)
-                               *size = sz;
-                       return (void *)p;
-               }
-               p += sz;
-               p = _ALIGN(p, 4);
-       } while(1);
-}
-
-int __init of_flat_dt_is_compatible(unsigned long node, const char *compat)
-{
-       const char* cp;
-       unsigned long cplen, l;
-
-       cp = of_get_flat_dt_prop(node, "compatible", &cplen);
-       if (cp == NULL)
-               return 0;
-       while (cplen > 0) {
-               if (strncasecmp(cp, compat, strlen(compat)) == 0)
-                       return 1;
-               l = strlen(cp) + 1;
-               cp += l;
-               cplen -= l;
-       }
-
-       return 0;
-}
-
-static void *__init unflatten_dt_alloc(unsigned long *mem, unsigned long size,
-                                      unsigned long align)
-{
-       void *res;
-
-       *mem = _ALIGN(*mem, align);
-       res = (void *)*mem;
-       *mem += size;
-
-       return res;
-}
-
-static unsigned long __init unflatten_dt_node(unsigned long mem,
-                                             unsigned long *p,
-                                             struct device_node *dad,
-                                             struct device_node ***allnextpp,
-                                             unsigned long fpsize)
-{
-       struct device_node *np;
-       struct property *pp, **prev_pp = NULL;
-       char *pathp;
-       u32 tag;
-       unsigned int l, allocl;
-       int has_name = 0;
-       int new_format = 0;
-
-       tag = *((u32 *)(*p));
-       if (tag != OF_DT_BEGIN_NODE) {
-               printk("Weird tag at start of node: %x\n", tag);
-               return mem;
-       }
-       *p += 4;
-       pathp = (char *)*p;
-       l = allocl = strlen(pathp) + 1;
-       *p = _ALIGN(*p + l, 4);
-
-       /* version 0x10 has a more compact unit name here instead of the full
-        * path. we accumulate the full path size using "fpsize", we'll rebuild
-        * it later. We detect this because the first character of the name is
-        * not '/'.
-        */
-       if ((*pathp) != '/') {
-               new_format = 1;
-               if (fpsize == 0) {
-                       /* root node: special case. fpsize accounts for path
-                        * plus terminating zero. root node only has '/', so
-                        * fpsize should be 2, but we want to avoid the first
-                        * level nodes to have two '/' so we use fpsize 1 here
-                        */
-                       fpsize = 1;
-                       allocl = 2;
-               } else {
-                       /* account for '/' and path size minus terminal 0
-                        * already in 'l'
-                        */
-                       fpsize += l;
-                       allocl = fpsize;
-               }
-       }
-
-
-       np = unflatten_dt_alloc(&mem, sizeof(struct device_node) + allocl,
-                               __alignof__(struct device_node));
-       if (allnextpp) {
-               memset(np, 0, sizeof(*np));
-               np->full_name = ((char*)np) + sizeof(struct device_node);
-               if (new_format) {
-                       char *p = np->full_name;
-                       /* rebuild full path for new format */
-                       if (dad && dad->parent) {
-                               strcpy(p, dad->full_name);
-#ifdef DEBUG
-                               if ((strlen(p) + l + 1) != allocl) {
-                                       DBG("%s: p: %d, l: %d, a: %d\n",
-                                           pathp, (int)strlen(p), l, allocl);
-                               }
-#endif
-                               p += strlen(p);
-                       }
-                       *(p++) = '/';
-                       memcpy(p, pathp, l);
-               } else
-                       memcpy(np->full_name, pathp, l);
-               prev_pp = &np->properties;
-               **allnextpp = np;
-               *allnextpp = &np->allnext;
-               if (dad != NULL) {
-                       np->parent = dad;
-                       /* we temporarily use the next field as `last_child'*/
-                       if (dad->next == 0)
-                               dad->child = np;
-                       else
-                               dad->next->sibling = np;
-                       dad->next = np;
-               }
-               kref_init(&np->kref);
-       }
-       while(1) {
-               u32 sz, noff;
-               char *pname;
-
-               tag = *((u32 *)(*p));
-               if (tag == OF_DT_NOP) {
-                       *p += 4;
-                       continue;
-               }
-               if (tag != OF_DT_PROP)
-                       break;
-               *p += 4;
-               sz = *((u32 *)(*p));
-               noff = *((u32 *)((*p) + 4));
-               *p += 8;
-               if (initial_boot_params->version < 0x10)
-                       *p = _ALIGN(*p, sz >= 8 ? 8 : 4);
-
-               pname = find_flat_dt_string(noff);
-               if (pname == NULL) {
-                       printk("Can't find property name in list !\n");
-                       break;
-               }
-               if (strcmp(pname, "name") == 0)
-                       has_name = 1;
-               l = strlen(pname) + 1;
-               pp = unflatten_dt_alloc(&mem, sizeof(struct property),
-                                       __alignof__(struct property));
-               if (allnextpp) {
-                       if (strcmp(pname, "linux,phandle") == 0) {
-                               np->node = *((u32 *)*p);
-                               if (np->linux_phandle == 0)
-                                       np->linux_phandle = np->node;
-                       }
-                       if (strcmp(pname, "ibm,phandle") == 0)
-                               np->linux_phandle = *((u32 *)*p);
-                       pp->name = pname;
-                       pp->length = sz;
-                       pp->value = (void *)*p;
-                       *prev_pp = pp;
-                       prev_pp = &pp->next;
-               }
-               *p = _ALIGN((*p) + sz, 4);
-       }
-       /* with version 0x10 we may not have the name property, recreate
-        * it here from the unit name if absent
-        */
-       if (!has_name) {
-               char *p = pathp, *ps = pathp, *pa = NULL;
-               int sz;
-
-               while (*p) {
-                       if ((*p) == '@')
-                               pa = p;
-                       if ((*p) == '/')
-                               ps = p + 1;
-                       p++;
-               }
-               if (pa < ps)
-                       pa = p;
-               sz = (pa - ps) + 1;
-               pp = unflatten_dt_alloc(&mem, sizeof(struct property) + sz,
-                                       __alignof__(struct property));
-               if (allnextpp) {
-                       pp->name = "name";
-                       pp->length = sz;
-                       pp->value = pp + 1;
-                       *prev_pp = pp;
-                       prev_pp = &pp->next;
-                       memcpy(pp->value, ps, sz - 1);
-                       ((char *)pp->value)[sz - 1] = 0;
-                       DBG("fixed up name for %s -> %s\n", pathp,
-                               (char *)pp->value);
-               }
-       }
-       if (allnextpp) {
-               *prev_pp = NULL;
-               np->name = of_get_property(np, "name", NULL);
-               np->type = of_get_property(np, "device_type", NULL);
-
-               if (!np->name)
-                       np->name = "<NULL>";
-               if (!np->type)
-                       np->type = "<NULL>";
-       }
-       while (tag == OF_DT_BEGIN_NODE) {
-               mem = unflatten_dt_node(mem, p, np, allnextpp, fpsize);
-               tag = *((u32 *)(*p));
-       }
-       if (tag != OF_DT_END_NODE) {
-               printk("Weird tag at end of node: %x\n", tag);
-               return mem;
-       }
-       *p += 4;
-       return mem;
-}
-
 static int __init early_parse_mem(char *p)
 {
        if (!p)
@@ -446,7 +93,7 @@ static void __init move_device_tree(void)
        DBG("-> move_device_tree\n");
 
        start = __pa(initial_boot_params);
-       size = initial_boot_params->totalsize;
+       size = be32_to_cpu(initial_boot_params->totalsize);
 
        if ((memory_limit && (start + size) > memory_limit) ||
                        overlaps_crashkernel(start, size)) {
@@ -459,54 +106,6 @@ static void __init move_device_tree(void)
        DBG("<- move_device_tree\n");
 }
 
-/**
- * unflattens the device-tree passed by the firmware, creating the
- * tree of struct device_node. It also fills the "name" and "type"
- * pointers of the nodes so the normal device-tree walking functions
- * can be used (this used to be done by finish_device_tree)
- */
-void __init unflatten_device_tree(void)
-{
-       unsigned long start, mem, size;
-       struct device_node **allnextp = &allnodes;
-
-       DBG(" -> unflatten_device_tree()\n");
-
-       /* First pass, scan for size */
-       start = ((unsigned long)initial_boot_params) +
-               initial_boot_params->off_dt_struct;
-       size = unflatten_dt_node(0, &start, NULL, NULL, 0);
-       size = (size | 3) + 1;
-
-       DBG("  size is %lx, allocating...\n", size);
-
-       /* Allocate memory for the expanded device tree */
-       mem = lmb_alloc(size + 4, __alignof__(struct device_node));
-       mem = (unsigned long) __va(mem);
-
-       ((u32 *)mem)[size / 4] = 0xdeadbeef;
-
-       DBG("  unflattening %lx...\n", mem);
-
-       /* Second pass, do actual unflattening */
-       start = ((unsigned long)initial_boot_params) +
-               initial_boot_params->off_dt_struct;
-       unflatten_dt_node(mem, &start, NULL, &allnextp, 0);
-       if (*((u32 *)start) != OF_DT_END)
-               printk(KERN_WARNING "Weird tag at end of tree: %08x\n", *((u32 *)start));
-       if (((u32 *)mem)[size / 4] != 0xdeadbeef)
-               printk(KERN_WARNING "End of tree marker overwritten: %08x\n",
-                      ((u32 *)mem)[size / 4] );
-       *allnextp = NULL;
-
-       /* Get pointer to OF "/chosen" node for use everywhere */
-       of_chosen = of_find_node_by_path("/chosen");
-       if (of_chosen == NULL)
-               of_chosen = of_find_node_by_path("/chosen@0");
-
-       DBG(" <- unflatten_device_tree()\n");
-}
-
 /*
  * ibm,pa-features is a per-cpu property that contains a string of
  * attribute descriptors, each of which has a 2 byte header plus up
@@ -763,48 +362,9 @@ static int __init early_init_dt_scan_cpus(unsigned long node,
        return 0;
 }
 
-#ifdef CONFIG_BLK_DEV_INITRD
-static void __init early_init_dt_check_for_initrd(unsigned long node)
-{
-       unsigned long l;
-       u32 *prop;
-
-       DBG("Looking for initrd properties... ");
-
-       prop = of_get_flat_dt_prop(node, "linux,initrd-start", &l);
-       if (prop) {
-               initrd_start = (unsigned long)__va(of_read_ulong(prop, l/4));
-
-               prop = of_get_flat_dt_prop(node, "linux,initrd-end", &l);
-               if (prop) {
-                       initrd_end = (unsigned long)
-                                       __va(of_read_ulong(prop, l/4));
-                       initrd_below_start_ok = 1;
-               } else {
-                       initrd_start = 0;
-               }
-       }
-
-       DBG("initrd_start=0x%lx  initrd_end=0x%lx\n", initrd_start, initrd_end);
-}
-#else
-static inline void early_init_dt_check_for_initrd(unsigned long node)
-{
-}
-#endif /* CONFIG_BLK_DEV_INITRD */
-
-static int __init early_init_dt_scan_chosen(unsigned long node,
-                                           const char *uname, int depth, void *data)
+void __init early_init_dt_scan_chosen_arch(unsigned long node)
 {
        unsigned long *lprop;
-       unsigned long l;
-       char *p;
-
-       DBG("search \"chosen\", depth: %d, uname: %s\n", depth, uname);
-
-       if (depth != 1 ||
-           (strcmp(uname, "chosen") != 0 && strcmp(uname, "chosen@0") != 0))
-               return 0;
 
 #ifdef CONFIG_PPC64
        /* check if iommu is forced on or off */
@@ -815,17 +375,17 @@ static int __init early_init_dt_scan_chosen(unsigned long node,
 #endif
 
        /* mem=x on the command line is the preferred mechanism */
-       lprop = of_get_flat_dt_prop(node, "linux,memory-limit", NULL);
-       if (lprop)
-               memory_limit = *lprop;
+       lprop = of_get_flat_dt_prop(node, "linux,memory-limit", NULL);
+       if (lprop)
+               memory_limit = *lprop;
 
 #ifdef CONFIG_PPC64
-       lprop = of_get_flat_dt_prop(node, "linux,tce-alloc-start", NULL);
-       if (lprop)
-               tce_alloc_start = *lprop;
-       lprop = of_get_flat_dt_prop(node, "linux,tce-alloc-end", NULL);
-       if (lprop)
-               tce_alloc_end = *lprop;
+       lprop = of_get_flat_dt_prop(node, "linux,tce-alloc-start", NULL);
+       if (lprop)
+               tce_alloc_start = *lprop;
+       lprop = of_get_flat_dt_prop(node, "linux,tce-alloc-end", NULL);
+       if (lprop)
+               tce_alloc_end = *lprop;
 #endif
 
 #ifdef CONFIG_KEXEC
@@ -837,51 +397,6 @@ static int __init early_init_dt_scan_chosen(unsigned long node,
        if (lprop)
                crashk_res.end = crashk_res.start + *lprop - 1;
 #endif
-
-       early_init_dt_check_for_initrd(node);
-
-       /* Retreive command line */
-       p = of_get_flat_dt_prop(node, "bootargs", &l);
-       if (p != NULL && l > 0)
-               strlcpy(cmd_line, p, min((int)l, COMMAND_LINE_SIZE));
-
-#ifdef CONFIG_CMDLINE
-       if (p == NULL || l == 0 || (l == 1 && (*p) == 0))
-               strlcpy(cmd_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
-#endif /* CONFIG_CMDLINE */
-
-       DBG("Command line is: %s\n", cmd_line);
-
-       /* break now */
-       return 1;
-}
-
-static int __init early_init_dt_scan_root(unsigned long node,
-                                         const char *uname, int depth, void *data)
-{
-       u32 *prop;
-
-       if (depth != 0)
-               return 0;
-
-       prop = of_get_flat_dt_prop(node, "#size-cells", NULL);
-       dt_root_size_cells = (prop == NULL) ? 1 : *prop;
-       DBG("dt_root_size_cells = %x\n", dt_root_size_cells);
-
-       prop = of_get_flat_dt_prop(node, "#address-cells", NULL);
-       dt_root_addr_cells = (prop == NULL) ? 2 : *prop;
-       DBG("dt_root_addr_cells = %x\n", dt_root_addr_cells);
-       
-       /* break now */
-       return 1;
-}
-
-static u64 __init dt_mem_next_cell(int s, cell_t **cellp)
-{
-       cell_t *p = *cellp;
-
-       *cellp = p + s;
-       return of_read_number(p, s);
 }
 
 #ifdef CONFIG_PPC_PSERIES
@@ -893,22 +408,22 @@ static u64 __init dt_mem_next_cell(int s, cell_t **cellp)
  */
 static int __init early_init_dt_scan_drconf_memory(unsigned long node)
 {
-       cell_t *dm, *ls, *usm;
+       __be32 *dm, *ls, *usm;
        unsigned long l, n, flags;
        u64 base, size, lmb_size;
        unsigned int is_kexec_kdump = 0, rngs;
 
        ls = of_get_flat_dt_prop(node, "ibm,lmb-size", &l);
-       if (ls == NULL || l < dt_root_size_cells * sizeof(cell_t))
+       if (ls == NULL || l < dt_root_size_cells * sizeof(__be32))
                return 0;
        lmb_size = dt_mem_next_cell(dt_root_size_cells, &ls);
 
        dm = of_get_flat_dt_prop(node, "ibm,dynamic-memory", &l);
-       if (dm == NULL || l < sizeof(cell_t))
+       if (dm == NULL || l < sizeof(__be32))
                return 0;
 
        n = *dm++;      /* number of entries */
-       if (l < (n * (dt_root_addr_cells + 4) + 1) * sizeof(cell_t))
+       if (l < (n * (dt_root_addr_cells + 4) + 1) * sizeof(__be32))
                return 0;
 
        /* check if this is a kexec/kdump kernel. */
@@ -963,65 +478,47 @@ static int __init early_init_dt_scan_drconf_memory(unsigned long node)
 #define early_init_dt_scan_drconf_memory(node) 0
 #endif /* CONFIG_PPC_PSERIES */
 
-static int __init early_init_dt_scan_memory(unsigned long node,
-                                           const char *uname, int depth, void *data)
+static int __init early_init_dt_scan_memory_ppc(unsigned long node,
+                                               const char *uname,
+                                               int depth, void *data)
 {
-       char *type = of_get_flat_dt_prop(node, "device_type", NULL);
-       cell_t *reg, *endp;
-       unsigned long l;
-
-       /* Look for the ibm,dynamic-reconfiguration-memory node */
        if (depth == 1 &&
            strcmp(uname, "ibm,dynamic-reconfiguration-memory") == 0)
                return early_init_dt_scan_drconf_memory(node);
+       
+       return early_init_dt_scan_memory(node, uname, depth, data);
+}
 
-       /* We are scanning "memory" nodes only */
-       if (type == NULL) {
-               /*
-                * The longtrail doesn't have a device_type on the
-                * /memory node, so look for the node called /memory@0.
-                */
-               if (depth != 1 || strcmp(uname, "memory@0") != 0)
-                       return 0;
-       } else if (strcmp(type, "memory") != 0)
-               return 0;
-
-       reg = of_get_flat_dt_prop(node, "linux,usable-memory", &l);
-       if (reg == NULL)
-               reg = of_get_flat_dt_prop(node, "reg", &l);
-       if (reg == NULL)
-               return 0;
-
-       endp = reg + (l / sizeof(cell_t));
-
-       DBG("memory scan node %s, reg size %ld, data: %x %x %x %x,\n",
-           uname, l, reg[0], reg[1], reg[2], reg[3]);
-
-       while ((endp - reg) >= (dt_root_addr_cells + dt_root_size_cells)) {
-               u64 base, size;
+void __init early_init_dt_add_memory_arch(u64 base, u64 size)
+{
+#if defined(CONFIG_PPC64)
+       if (iommu_is_off) {
+               if (base >= 0x80000000ul)
+                       return;
+               if ((base + size) > 0x80000000ul)
+                       size = 0x80000000ul - base;
+       }
+#endif
 
-               base = dt_mem_next_cell(dt_root_addr_cells, &reg);
-               size = dt_mem_next_cell(dt_root_size_cells, &reg);
+       lmb_add(base, size);
 
-               if (size == 0)
-                       continue;
-               DBG(" - %llx ,  %llx\n", (unsigned long long)base,
-                   (unsigned long long)size);
-#ifdef CONFIG_PPC64
-               if (iommu_is_off) {
-                       if (base >= 0x80000000ul)
-                               continue;
-                       if ((base + size) > 0x80000000ul)
-                               size = 0x80000000ul - base;
-               }
-#endif
-               lmb_add(base, size);
+       memstart_addr = min((u64)memstart_addr, base);
+}
 
-               memstart_addr = min((u64)memstart_addr, base);
-       }
+u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
+{
+       return lmb_alloc(size, align);
+}
 
-       return 0;
+#ifdef CONFIG_BLK_DEV_INITRD
+void __init early_init_dt_setup_initrd_arch(unsigned long start,
+               unsigned long end)
+{
+       initrd_start = (unsigned long)__va(start);
+       initrd_end = (unsigned long)__va(end);
+       initrd_below_start_ok = 1;
 }
+#endif
 
 static void __init early_reserve_mem(void)
 {
@@ -1186,7 +683,7 @@ void __init early_init_devtree(void *params)
        /* Scan memory nodes and rebuild LMBs */
        lmb_init();
        of_scan_flat_dt(early_init_dt_scan_root, NULL);
-       of_scan_flat_dt(early_init_dt_scan_memory, NULL);
+       of_scan_flat_dt(early_init_dt_scan_memory_ppc, NULL);
 
        /* Save command line for /proc/cmdline and then parse parameters */
        strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE);
@@ -1234,25 +731,6 @@ void __init early_init_devtree(void *params)
        DBG(" <- early_init_devtree()\n");
 }
 
-
-/**
- * Indicates whether the root node has a given value in its
- * compatible property.
- */
-int machine_is_compatible(const char *compat)
-{
-       struct device_node *root;
-       int rc = 0;
-
-       root = of_find_node_by_path("/");
-       if (root) {
-               rc = of_device_is_compatible(root, compat);
-               of_node_put(root);
-       }
-       return rc;
-}
-EXPORT_SYMBOL(machine_is_compatible);
-
 /*******
  *
  * New implementation of the OF "find" APIs, return a refcounted
@@ -1265,27 +743,6 @@ EXPORT_SYMBOL(machine_is_compatible);
  *******/
 
 /**
- *     of_find_node_by_phandle - Find a node given a phandle
- *     @handle:        phandle of the node to find
- *
- *     Returns a node pointer with refcount incremented, use
- *     of_node_put() on it when done.
- */
-struct device_node *of_find_node_by_phandle(phandle handle)
-{
-       struct device_node *np;
-
-       read_lock(&devtree_lock);
-       for (np = allnodes; np != 0; np = np->allnext)
-               if (np->linux_phandle == handle)
-                       break;
-       of_node_get(np);
-       read_unlock(&devtree_lock);
-       return np;
-}
-EXPORT_SYMBOL(of_find_node_by_phandle);
-
-/**
  *     of_find_next_cache_node - Find a node's subsidiary cache
  *     @np:    node of type "cpu" or "cache"
  *
@@ -1316,138 +773,6 @@ struct device_node *of_find_next_cache_node(struct device_node *np)
        return NULL;
 }
 
-/**
- *     of_node_get - Increment refcount of a node
- *     @node:  Node to inc refcount, NULL is supported to
- *             simplify writing of callers
- *
- *     Returns node.
- */
-struct device_node *of_node_get(struct device_node *node)
-{
-       if (node)
-               kref_get(&node->kref);
-       return node;
-}
-EXPORT_SYMBOL(of_node_get);
-
-static inline struct device_node * kref_to_device_node(struct kref *kref)
-{
-       return container_of(kref, struct device_node, kref);
-}
-
-/**
- *     of_node_release - release a dynamically allocated node
- *     @kref:  kref element of the node to be released
- *
- *     In of_node_put() this function is passed to kref_put()
- *     as the destructor.
- */
-static void of_node_release(struct kref *kref)
-{
-       struct device_node *node = kref_to_device_node(kref);
-       struct property *prop = node->properties;
-
-       /* We should never be releasing nodes that haven't been detached. */
-       if (!of_node_check_flag(node, OF_DETACHED)) {
-               printk("WARNING: Bad of_node_put() on %s\n", node->full_name);
-               dump_stack();
-               kref_init(&node->kref);
-               return;
-       }
-
-       if (!of_node_check_flag(node, OF_DYNAMIC))
-               return;
-
-       while (prop) {
-               struct property *next = prop->next;
-               kfree(prop->name);
-               kfree(prop->value);
-               kfree(prop);
-               prop = next;
-
-               if (!prop) {
-                       prop = node->deadprops;
-                       node->deadprops = NULL;
-               }
-       }
-       kfree(node->full_name);
-       kfree(node->data);
-       kfree(node);
-}
-
-/**
- *     of_node_put - Decrement refcount of a node
- *     @node:  Node to dec refcount, NULL is supported to
- *             simplify writing of callers
- *
- */
-void of_node_put(struct device_node *node)
-{
-       if (node)
-               kref_put(&node->kref, of_node_release);
-}
-EXPORT_SYMBOL(of_node_put);
-
-/*
- * Plug a device node into the tree and global list.
- */
-void of_attach_node(struct device_node *np)
-{
-       unsigned long flags;
-
-       write_lock_irqsave(&devtree_lock, flags);
-       np->sibling = np->parent->child;
-       np->allnext = allnodes;
-       np->parent->child = np;
-       allnodes = np;
-       write_unlock_irqrestore(&devtree_lock, flags);
-}
-
-/*
- * "Unplug" a node from the device tree.  The caller must hold
- * a reference to the node.  The memory associated with the node
- * is not freed until its refcount goes to zero.
- */
-void of_detach_node(struct device_node *np)
-{
-       struct device_node *parent;
-       unsigned long flags;
-
-       write_lock_irqsave(&devtree_lock, flags);
-
-       parent = np->parent;
-       if (!parent)
-               goto out_unlock;
-
-       if (allnodes == np)
-               allnodes = np->allnext;
-       else {
-               struct device_node *prev;
-               for (prev = allnodes;
-                    prev->allnext != np;
-                    prev = prev->allnext)
-                       ;
-               prev->allnext = np->allnext;
-       }
-
-       if (parent->child == np)
-               parent->child = np->sibling;
-       else {
-               struct device_node *prevsib;
-               for (prevsib = np->parent->child;
-                    prevsib->sibling != np;
-                    prevsib = prevsib->sibling)
-                       ;
-               prevsib->sibling = np->sibling;
-       }
-
-       of_node_set_flag(np, OF_DETACHED);
-
-out_unlock:
-       write_unlock_irqrestore(&devtree_lock, flags);
-}
-
 #ifdef CONFIG_PPC_PSERIES
 /*
  * Fix up the uninitialized fields in a new device node:
@@ -1479,9 +804,9 @@ static int of_finish_dynamic_node(struct device_node *node)
        if (machine_is(powermac))
                return -ENODEV;
 
-       /* fix up new node's linux_phandle field */
+       /* fix up new node's phandle field */
        if ((ibm_phandle = of_get_property(node, "ibm,phandle", NULL)))
-               node->linux_phandle = *ibm_phandle;
+               node->phandle = *ibm_phandle;
 
 out:
        of_node_put(parent);
@@ -1520,120 +845,6 @@ static int __init prom_reconfig_setup(void)
 __initcall(prom_reconfig_setup);
 #endif
 
-/*
- * Add a property to a node
- */
-int prom_add_property(struct device_node* np, struct property* prop)
-{
-       struct property **next;
-       unsigned long flags;
-
-       prop->next = NULL;      
-       write_lock_irqsave(&devtree_lock, flags);
-       next = &np->properties;
-       while (*next) {
-               if (strcmp(prop->name, (*next)->name) == 0) {
-                       /* duplicate ! don't insert it */
-                       write_unlock_irqrestore(&devtree_lock, flags);
-                       return -1;
-               }
-               next = &(*next)->next;
-       }
-       *next = prop;
-       write_unlock_irqrestore(&devtree_lock, flags);
-
-#ifdef CONFIG_PROC_DEVICETREE
-       /* try to add to proc as well if it was initialized */
-       if (np->pde)
-               proc_device_tree_add_prop(np->pde, prop);
-#endif /* CONFIG_PROC_DEVICETREE */
-
-       return 0;
-}
-
-/*
- * Remove a property from a node.  Note that we don't actually
- * remove it, since we have given out who-knows-how-many pointers
- * to the data using get-property.  Instead we just move the property
- * to the "dead properties" list, so it won't be found any more.
- */
-int prom_remove_property(struct device_node *np, struct property *prop)
-{
-       struct property **next;
-       unsigned long flags;
-       int found = 0;
-
-       write_lock_irqsave(&devtree_lock, flags);
-       next = &np->properties;
-       while (*next) {
-               if (*next == prop) {
-                       /* found the node */
-                       *next = prop->next;
-                       prop->next = np->deadprops;
-                       np->deadprops = prop;
-                       found = 1;
-                       break;
-               }
-               next = &(*next)->next;
-       }
-       write_unlock_irqrestore(&devtree_lock, flags);
-
-       if (!found)
-               return -ENODEV;
-
-#ifdef CONFIG_PROC_DEVICETREE
-       /* try to remove the proc node as well */
-       if (np->pde)
-               proc_device_tree_remove_prop(np->pde, prop);
-#endif /* CONFIG_PROC_DEVICETREE */
-
-       return 0;
-}
-
-/*
- * Update a property in a node.  Note that we don't actually
- * remove it, since we have given out who-knows-how-many pointers
- * to the data using get-property.  Instead we just move the property
- * to the "dead properties" list, and add the new property to the
- * property list
- */
-int prom_update_property(struct device_node *np,
-                        struct property *newprop,
-                        struct property *oldprop)
-{
-       struct property **next;
-       unsigned long flags;
-       int found = 0;
-
-       write_lock_irqsave(&devtree_lock, flags);
-       next = &np->properties;
-       while (*next) {
-               if (*next == oldprop) {
-                       /* found the node */
-                       newprop->next = oldprop->next;
-                       *next = newprop;
-                       oldprop->next = np->deadprops;
-                       np->deadprops = oldprop;
-                       found = 1;
-                       break;
-               }
-               next = &(*next)->next;
-       }
-       write_unlock_irqrestore(&devtree_lock, flags);
-
-       if (!found)
-               return -ENODEV;
-
-#ifdef CONFIG_PROC_DEVICETREE
-       /* try to add to proc as well if it was initialized */
-       if (np->pde)
-               proc_device_tree_update_prop(np->pde, newprop, oldprop);
-#endif /* CONFIG_PROC_DEVICETREE */
-
-       return 0;
-}
-
-
 /* Find the device node for a given logical cpu number, also returns the cpu
  * local thread number (index in ibm,interrupt-server#s) if relevant and
  * asked for (non NULL)
index 21f61b8..cc29c0f 100644 (file)
@@ -338,7 +338,8 @@ static void __init mpc85xx_mds_pic_init(void)
        }
 
        mpic = mpic_alloc(np, r.start,
-                       MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
+                       MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN |
+                       MPIC_BROKEN_FRR_NIRQS,
                        0, 256, " OpenPIC  ");
        BUG_ON(mpic == NULL);
        of_node_put(np);
index 04160a4..a15f582 100644 (file)
@@ -46,6 +46,7 @@ smp_85xx_kick_cpu(int nr)
        __iomem u32 *bptr_vaddr;
        struct device_node *np;
        int n = 0;
+       int ioremappable;
 
        WARN_ON (nr < 0 || nr >= NR_CPUS);
 
@@ -59,21 +60,37 @@ smp_85xx_kick_cpu(int nr)
                return;
        }
 
+       /*
+        * A secondary core could be in a spinloop in the bootpage
+        * (0xfffff000), somewhere in highmem, or somewhere in lowmem.
+        * The bootpage and highmem can be accessed via ioremap(), but
+        * we need to directly access the spinloop if its in lowmem.
+        */
+       ioremappable = *cpu_rel_addr > virt_to_phys(high_memory);
+
        /* Map the spin table */
-       bptr_vaddr = ioremap(*cpu_rel_addr, SIZE_BOOT_ENTRY);
+       if (ioremappable)
+               bptr_vaddr = ioremap(*cpu_rel_addr, SIZE_BOOT_ENTRY);
+       else
+               bptr_vaddr = phys_to_virt(*cpu_rel_addr);
 
        local_irq_save(flags);
 
        out_be32(bptr_vaddr + BOOT_ENTRY_PIR, nr);
        out_be32(bptr_vaddr + BOOT_ENTRY_ADDR_LOWER, __pa(__early_start));
 
+       if (!ioremappable)
+               flush_dcache_range((ulong)bptr_vaddr,
+                               (ulong)(bptr_vaddr + SIZE_BOOT_ENTRY));
+
        /* Wait a bit for the CPU to ack. */
        while ((__secondary_hold_acknowledge != nr) && (++n < 1000))
                mdelay(1);
 
        local_irq_restore(flags);
 
-       iounmap(bptr_vaddr);
+       if (ioremappable)
+               iounmap(bptr_vaddr);
 
        pr_debug("waited %d msecs for CPU #%d.\n", n, nr);
 }
index 1b42605..0125604 100644 (file)
@@ -80,8 +80,8 @@ static void xes_mpc85xx_configure_l2(void __iomem *l2_base)
        printk(KERN_INFO "xes_mpc85xx: Enabling L2 as cache\n");
 
        ctl = MPC85xx_L2CTL_L2E | MPC85xx_L2CTL_L2I;
-       if (machine_is_compatible("MPC8540") ||
-           machine_is_compatible("MPC8560"))
+       if (of_machine_is_compatible("MPC8540") ||
+           of_machine_is_compatible("MPC8560"))
                /*
                 * Assume L2 SRAM is used fully for cache, so set
                 * L2BLKSZ (bits 4:5) to match L2SIZ (bits 2:3).
index dcddaa5..f75a4da 100644 (file)
@@ -48,7 +48,7 @@ static int __init cbe_powerbutton_init(void)
        int ret = 0;
        struct input_dev *dev;
 
-       if (!machine_is_compatible("IBM,CBPLUS-1.0")) {
+       if (!of_machine_is_compatible("IBM,CBPLUS-1.0")) {
                printk(KERN_ERR "%s: Not a cell blade.\n", __func__);
                ret = -ENODEV;
                goto out;
index 5e0a191..608fd2b 100644 (file)
@@ -255,7 +255,7 @@ static int __init cbe_sysreset_init(void)
 {
        struct cbe_pmd_regs __iomem *regs;
 
-       sysreset_hack = machine_is_compatible("IBM,CBPLUS-1.0");
+       sysreset_hack = of_machine_is_compatible("IBM,CBPLUS-1.0");
        if (!sysreset_hack)
                return 0;
 
index 4c506c1..891f18e 100644 (file)
@@ -457,7 +457,7 @@ neighbour_spu(int cbe, struct device_node *target, struct device_node *avoid)
                        continue;
                vic_handles = of_get_property(spu_dn, "vicinity", &lenp);
                for (i=0; i < (lenp / sizeof(phandle)); i++) {
-                       if (vic_handles[i] == target->linux_phandle)
+                       if (vic_handles[i] == target->phandle)
                                return spu;
                }
        }
@@ -499,7 +499,7 @@ static void init_affinity_node(int cbe)
 
                        if (strcmp(name, "spe") == 0) {
                                spu = devnode_spu(cbe, vic_dn);
-                               avoid_ph = last_spu_dn->linux_phandle;
+                               avoid_ph = last_spu_dn->phandle;
                        } else {
                                /*
                                 * "mic-tm" and "bif0" nodes do not have
@@ -514,7 +514,7 @@ static void init_affinity_node(int cbe)
                                        last_spu->has_mem_affinity = 1;
                                        spu->has_mem_affinity = 1;
                                }
-                               avoid_ph = vic_dn->linux_phandle;
+                               avoid_ph = vic_dn->phandle;
                        }
 
                        list_add_tail(&spu->aff_list, &last_spu->aff_list);
index fd23a1d..8b0c208 100644 (file)
@@ -222,6 +222,7 @@ static void __devinit quirk_final_uli5249(struct pci_dev *dev)
        int i;
        u8 *dummy;
        struct pci_bus *bus = dev->bus;
+       struct resource *res;
        resource_size_t end = 0;
 
        for (i = PCI_BRIDGE_RESOURCES; i < PCI_BRIDGE_RESOURCES+3; i++) {
@@ -230,13 +231,12 @@ static void __devinit quirk_final_uli5249(struct pci_dev *dev)
                        end = pci_resource_end(dev, i);
        }
 
-       for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) {
-               if ((bus->resource[i]) &&
-                       (bus->resource[i]->flags & IORESOURCE_MEM)) {
-                       if (bus->resource[i]->end == end)
-                               dummy = ioremap(bus->resource[i]->start, 0x4);
+       pci_bus_for_each_resource(bus, res, i) {
+               if (res && res->flags & IORESOURCE_MEM) {
+                       if (res->end == end)
+                               dummy = ioremap(res->start, 0x4);
                        else
-                               dummy = ioremap(bus->resource[i]->end - 3, 0x4);
+                               dummy = ioremap(res->end - 3, 0x4);
                        if (dummy) {
                                in_8(dummy);
                                iounmap(dummy);
index be2527a..d35e052 100644 (file)
@@ -304,8 +304,8 @@ static struct cpufreq_driver pas_cpufreq_driver = {
 
 static int __init pas_cpufreq_init(void)
 {
-       if (!machine_is_compatible("PA6T-1682M") &&
-           !machine_is_compatible("pasemi,pwrficient"))
+       if (!of_machine_is_compatible("PA6T-1682M") &&
+           !of_machine_is_compatible("pasemi,pwrficient"))
                return -ENODEV;
 
        return cpufreq_register_driver(&pas_cpufreq_driver);
index 08d94e4..d4f127d 100644 (file)
@@ -657,31 +657,31 @@ static int __init pmac_cpufreq_setup(void)
        cur_freq = (*value) / 1000;
 
        /*  Check for 7447A based MacRISC3 */
-       if (machine_is_compatible("MacRISC3") &&
+       if (of_machine_is_compatible("MacRISC3") &&
            of_get_property(cpunode, "dynamic-power-step", NULL) &&
            PVR_VER(mfspr(SPRN_PVR)) == 0x8003) {
                pmac_cpufreq_init_7447A(cpunode);
        /* Check for other MacRISC3 machines */
-       } else if (machine_is_compatible("PowerBook3,4") ||
-                  machine_is_compatible("PowerBook3,5") ||
-                  machine_is_compatible("MacRISC3")) {
+       } else if (of_machine_is_compatible("PowerBook3,4") ||
+                  of_machine_is_compatible("PowerBook3,5") ||
+                  of_machine_is_compatible("MacRISC3")) {
                pmac_cpufreq_init_MacRISC3(cpunode);
        /* Else check for iBook2 500/600 */
-       } else if (machine_is_compatible("PowerBook4,1")) {
+       } else if (of_machine_is_compatible("PowerBook4,1")) {
                hi_freq = cur_freq;
                low_freq = 400000;
                set_speed_proc = pmu_set_cpu_speed;
                is_pmu_based = 1;
        }
        /* Else check for TiPb 550 */
-       else if (machine_is_compatible("PowerBook3,3") && cur_freq == 550000) {
+       else if (of_machine_is_compatible("PowerBook3,3") && cur_freq == 550000) {
                hi_freq = cur_freq;
                low_freq = 500000;
                set_speed_proc = pmu_set_cpu_speed;
                is_pmu_based = 1;
        }
        /* Else check for TiPb 400 & 500 */
-       else if (machine_is_compatible("PowerBook3,2")) {
+       else if (of_machine_is_compatible("PowerBook3,2")) {
                /* We only know about the 400 MHz and the 500Mhz model
                 * they both have 300 MHz as low frequency
                 */
index 708c751..3ed288e 100644 (file)
@@ -398,11 +398,11 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpus)
        int rc = -ENODEV;
 
        /* Check supported platforms */
-       if (machine_is_compatible("PowerMac8,1") ||
-           machine_is_compatible("PowerMac8,2") ||
-           machine_is_compatible("PowerMac9,1"))
+       if (of_machine_is_compatible("PowerMac8,1") ||
+           of_machine_is_compatible("PowerMac8,2") ||
+           of_machine_is_compatible("PowerMac9,1"))
                use_volts_smu = 1;
-       else if (machine_is_compatible("PowerMac11,2"))
+       else if (of_machine_is_compatible("PowerMac11,2"))
                use_volts_vdnap = 1;
        else
                return -ENODEV;
@@ -729,9 +729,9 @@ static int __init g5_cpufreq_init(void)
                return -ENODEV;
        }
 
-       if (machine_is_compatible("PowerMac7,2") ||
-           machine_is_compatible("PowerMac7,3") ||
-           machine_is_compatible("RackMac3,1"))
+       if (of_machine_is_compatible("PowerMac7,2") ||
+           of_machine_is_compatible("PowerMac7,3") ||
+           of_machine_is_compatible("RackMac3,1"))
                rc = g5_pm72_cpufreq_init(cpus);
 #ifdef CONFIG_PMAC_SMU
        else
index fbc9bbd..33e815f 100644 (file)
@@ -2426,7 +2426,7 @@ static int __init probe_motherboard(void)
            }
        }
        for(i=0; i<ARRAY_SIZE(pmac_mb_defs); i++) {
-           if (machine_is_compatible(pmac_mb_defs[i].model_string)) {
+           if (of_machine_is_compatible(pmac_mb_defs[i].model_string)) {
                pmac_mb = pmac_mb_defs[i];
                goto found;
            }
index 96d5ce5..ede49e7 100644 (file)
@@ -842,7 +842,7 @@ struct pmf_function *__pmf_find_function(struct device_node *target,
        list_for_each_entry(func, &dev->functions, link) {
                if (name && strcmp(name, func->name))
                        continue;
-               if (func->phandle && target->node != func->phandle)
+               if (func->phandle && target->phandle != func->phandle)
                        continue;
                if ((func->flags & flags) == 0)
                        continue;
index b40c22d..6898e82 100644 (file)
@@ -693,9 +693,9 @@ static void __init smp_core99_setup(int ncpus)
 #ifdef CONFIG_PPC64
 
        /* i2c based HW sync on some G5s */
-       if (machine_is_compatible("PowerMac7,2") ||
-           machine_is_compatible("PowerMac7,3") ||
-           machine_is_compatible("RackMac3,1"))
+       if (of_machine_is_compatible("PowerMac7,2") ||
+           of_machine_is_compatible("PowerMac7,3") ||
+           of_machine_is_compatible("RackMac3,1"))
                smp_core99_setup_i2c_hwsync(ncpus);
 
        /* pfunc based HW sync on recent G5s */
@@ -713,7 +713,7 @@ static void __init smp_core99_setup(int ncpus)
 #else /* CONFIG_PPC64 */
 
        /* GPIO based HW sync on ppc32 Core99 */
-       if (pmac_tb_freeze == NULL && !machine_is_compatible("MacRISC4")) {
+       if (pmac_tb_freeze == NULL && !of_machine_is_compatible("MacRISC4")) {
                struct device_node *cpu;
                const u32 *tbprop = NULL;
 
@@ -750,7 +750,7 @@ static void __init smp_core99_setup(int ncpus)
 #endif
 
        /* 32 bits SMP can't NAP */
-       if (!machine_is_compatible("MacRISC4"))
+       if (!of_machine_is_compatible("MacRISC4"))
                powersave_nap = 0;
 }
 
@@ -852,7 +852,7 @@ static void __devinit smp_core99_setup_cpu(int cpu_nr)
                /* If we didn't start the second CPU, we must take
                 * it off the bus
                 */
-               if (machine_is_compatible("MacRISC4") &&
+               if (of_machine_is_compatible("MacRISC4") &&
                    num_online_cpus() < 2)              
                        g5_phy_disable_cpu1();
 #endif /* CONFIG_PPC64 */
index 1810e42..48211ca 100644 (file)
@@ -317,9 +317,9 @@ void __init pmac_calibrate_decr(void)
         * calibration. That's better since the VIA itself seems
         * to be slightly off. --BenH
         */
-       if (!machine_is_compatible("MacRISC2") &&
-           !machine_is_compatible("MacRISC3") &&
-           !machine_is_compatible("MacRISC4"))
+       if (!of_machine_is_compatible("MacRISC2") &&
+           !of_machine_is_compatible("MacRISC3") &&
+           !of_machine_is_compatible("MacRISC4"))
                if (via_calibrate_decr())
                        return;
 
@@ -328,7 +328,7 @@ void __init pmac_calibrate_decr(void)
         * probably implement calibration based on the KL timer on these
         * machines anyway... -BenH
         */
-       if (machine_is_compatible("PowerMac3,5"))
+       if (of_machine_is_compatible("PowerMac3,5"))
                if (via_calibrate_decr())
                        return;
 #endif
index 9490157..d83135a 100644 (file)
@@ -132,9 +132,9 @@ void udbg_scc_init(int force_scc)
                scc_inittab[1] = in_8(sccc);
                out_8(sccc, 12);
                scc_inittab[3] = in_8(sccc);
-       } else if (machine_is_compatible("RackMac1,1")
-                  || machine_is_compatible("RackMac1,2")
-                  || machine_is_compatible("MacRISC4")) {
+       } else if (of_machine_is_compatible("RackMac1,1")
+                  || of_machine_is_compatible("RackMac1,2")
+                  || of_machine_is_compatible("MacRISC4")) {
                /* Xserves and G5s default to 57600 */
                scc_inittab[1] = 0;
                scc_inittab[3] = 0;
index 5da37c2..cf27df6 100644 (file)
@@ -56,9 +56,9 @@ static inline void grackle_set_loop_snoop(struct pci_controller *bp, int enable)
 void __init setup_grackle(struct pci_controller *hose)
 {
        setup_indirect_pci(hose, 0xfec00000, 0xfee00000, 0);
-       if (machine_is_compatible("PowerMac1,1"))
+       if (of_machine_is_compatible("PowerMac1,1"))
                ppc_pci_add_flags(PPC_PCI_REASSIGN_ALL_BUS);
-       if (machine_is_compatible("AAPL,PowerBook1998"))
+       if (of_machine_is_compatible("AAPL,PowerBook1998"))
                grackle_set_loop_snoop(hose, 1);
 #if 0  /* Disabled for now, HW problems ??? */
        grackle_set_stg(hose, 1);
index 6be4503..58f4673 100644 (file)
@@ -78,14 +78,14 @@ static int setkey_fallback_cip(struct crypto_tfm *tfm, const u8 *in_key,
        struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm);
        int ret;
 
-       sctx->fallback.blk->base.crt_flags &= ~CRYPTO_TFM_REQ_MASK;
-       sctx->fallback.blk->base.crt_flags |= (tfm->crt_flags &
+       sctx->fallback.cip->base.crt_flags &= ~CRYPTO_TFM_REQ_MASK;
+       sctx->fallback.cip->base.crt_flags |= (tfm->crt_flags &
                        CRYPTO_TFM_REQ_MASK);
 
        ret = crypto_cipher_setkey(sctx->fallback.cip, in_key, key_len);
        if (ret) {
                tfm->crt_flags &= ~CRYPTO_TFM_RES_MASK;
-               tfm->crt_flags |= (sctx->fallback.blk->base.crt_flags &
+               tfm->crt_flags |= (sctx->fallback.cip->base.crt_flags &
                                CRYPTO_TFM_RES_MASK);
        }
        return ret;
index 41d8f01..953af13 100644 (file)
@@ -182,8 +182,8 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
  * addresses to be allocated in the 0x000-0x0ff region
  * modulo 0x400.
  */
-void pcibios_align_resource(void *data, struct resource *res,
-                           resource_size_t size, resource_size_t align)
+resource_size_t pcibios_align_resource(void *data, const struct resource *res,
+                               resource_size_t size, resource_size_t align)
 {
        struct pci_dev *dev = data;
        struct pci_channel *hose = dev->sysdata;
@@ -200,7 +200,7 @@ void pcibios_align_resource(void *data, struct resource *res,
                        start = (start + 0x3ff) & ~0x3ff;
        }
 
-       res->start = start;
+       return start;
 }
 
 void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
index 55db5ec..39327d6 100644 (file)
@@ -53,8 +53,8 @@ struct stat {
        ino_t           st_ino;
        mode_t          st_mode;
        short           st_nlink;
-       uid_t           st_uid;
-       gid_t           st_gid;
+       uid16_t         st_uid;
+       gid16_t         st_gid;
        unsigned short  st_rdev;
        off_t           st_size;
        time_t          st_atime;
index b171ae8..b062de9 100644 (file)
@@ -59,7 +59,7 @@ static int __cpu_find_by(int (*compare)(int, int, void *), void *compare_arg,
 
        cur_inst = 0;
        for_each_node_by_type(dp, "cpu") {
-               int err = check_cpu_node(dp->node, &cur_inst,
+               int err = check_cpu_node(dp->phandle, &cur_inst,
                                         compare, compare_arg,
                                         prom_node, mid);
                if (!err) {
index 4248d96..5247283 100644 (file)
@@ -11,6 +11,10 @@ static inline bool kstack_valid(struct thread_info *tp, unsigned long sp)
 {
        unsigned long base = (unsigned long) tp;
 
+       /* Stack pointer must be 16-byte aligned.  */
+       if (sp & (16UL - 1))
+               return false;
+
        if (sp >= (base + sizeof(struct thread_info)) &&
            sp <= (base + THREAD_SIZE - sizeof(struct sparc_stackf)))
                return true;
index 4c26eb5..da527b3 100644 (file)
@@ -105,7 +105,7 @@ static unsigned long of_bus_sbus_get_flags(const u32 *addr, unsigned long flags)
 
 static int of_bus_ambapp_match(struct device_node *np)
 {
-       return !strcmp(np->name, "ambapp");
+       return !strcmp(np->type, "ambapp");
 }
 
 static void of_bus_ambapp_count_cells(struct device_node *child,
@@ -433,7 +433,7 @@ build_resources:
        if (!parent)
                dev_set_name(&op->dev, "root");
        else
-               dev_set_name(&op->dev, "%08x", dp->node);
+               dev_set_name(&op->dev, "%08x", dp->phandle);
 
        if (of_device_register(op)) {
                printk("%s: Could not register of device.\n",
index 0a6f2d1..b3d4cb5 100644 (file)
@@ -676,7 +676,7 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
        if (!parent)
                dev_set_name(&op->dev, "root");
        else
-               dev_set_name(&op->dev, "%08x", dp->node);
+               dev_set_name(&op->dev, "%08x", dp->phandle);
 
        if (of_device_register(op)) {
                printk("%s: Could not register of device.\n",
index 539e83f..37b66c6 100644 (file)
@@ -247,6 +247,7 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
                                         struct pci_bus *bus, int devfn)
 {
        struct dev_archdata *sd;
+       struct pci_slot *slot;
        struct of_device *op;
        struct pci_dev *dev;
        const char *type;
@@ -286,6 +287,11 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
        dev->dev.bus = &pci_bus_type;
        dev->devfn = devfn;
        dev->multifunction = 0;         /* maybe a lie? */
+       set_pcie_port_type(dev);
+
+       list_for_each_entry(slot, &dev->bus->slots, list)
+               if (PCI_SLOT(dev->devfn) == slot->number)
+                       dev->slot = slot;
 
        dev->vendor = of_getintprop_default(node, "vendor-id", 0xffff);
        dev->device = of_getintprop_default(node, "device-id", 0xffff);
@@ -322,6 +328,7 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
 
        dev->current_state = 4;         /* unknown power state */
        dev->error_state = pci_channel_io_normal;
+       dev->dma_mask = 0xffffffff;
 
        if (!strcmp(node->name, "pci")) {
                /* a PCI-PCI bridge */
@@ -715,9 +722,10 @@ void pcibios_update_irq(struct pci_dev *pdev, int irq)
 {
 }
 
-void pcibios_align_resource(void *data, struct resource *res,
-                           resource_size_t size, resource_size_t align)
+resource_size_t pcibios_align_resource(void *data, const struct resource *res,
+                               resource_size_t size, resource_size_t align)
 {
+       return res->start;
 }
 
 int pcibios_enable_device(struct pci_dev *dev, int mask)
index 4e2724e..75e88c0 100644 (file)
@@ -768,9 +768,10 @@ char * __devinit pcibios_setup(char *str)
        return str;
 }
 
-void pcibios_align_resource(void *data, struct resource *res,
-                           resource_size_t size, resource_size_t align)
+resource_size_t pcibios_align_resource(void *data, const struct resource *res,
+                               resource_size_t size, resource_size_t align)
 {
+       return res->start;
 }
 
 int pcibios_enable_device(struct pci_dev *pdev, int mask)
index 453397f..a8591ef 100644 (file)
@@ -4,9 +4,6 @@
 #include <linux/spinlock.h>
 #include <asm/prom.h>
 
-extern struct device_node *allnodes;   /* temporary while merging */
-extern rwlock_t devtree_lock;  /* temporary while merging */
-
 extern void * prom_early_alloc(unsigned long size);
 extern void irq_trans_init(struct device_node *dp);
 
index d80a65d..57ac9e2 100644 (file)
@@ -37,18 +37,6 @@ EXPORT_SYMBOL(of_console_path);
 char *of_console_options;
 EXPORT_SYMBOL(of_console_options);
 
-struct device_node *of_find_node_by_phandle(phandle handle)
-{
-       struct device_node *np;
-
-       for (np = allnodes; np; np = np->allnext)
-               if (np->node == handle)
-                       break;
-
-       return np;
-}
-EXPORT_SYMBOL(of_find_node_by_phandle);
-
 int of_getintprop_default(struct device_node *np, const char *name, int def)
 {
        struct property *prop;
@@ -89,7 +77,7 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len
                        void *old_val = prop->value;
                        int ret;
 
-                       ret = prom_setprop(dp->node, name, val, len);
+                       ret = prom_setprop(dp->phandle, name, val, len);
 
                        err = -EINVAL;
                        if (ret >= 0) {
@@ -236,7 +224,7 @@ static struct device_node * __init prom_create_node(phandle node,
 
        dp->name = get_one_property(node, "name");
        dp->type = get_one_property(node, "device_type");
-       dp->node = node;
+       dp->phandle = node;
 
        dp->properties = build_prop_list(node);
 
@@ -313,7 +301,7 @@ void __init prom_build_devicetree(void)
 
        nextp = &allnodes->allnext;
        allnodes->child = prom_build_tree(allnodes,
-                                         prom_getchild(allnodes->node),
+                                         prom_getchild(allnodes->phandle),
                                          &nextp);
        of_console_init();
 
index aa36223..eb14844 100644 (file)
@@ -370,7 +370,7 @@ static int __cpuinit smp_boot_one_cpu(unsigned int cpu)
        } else {
                struct device_node *dp = of_find_node_by_cpuid(cpu);
 
-               prom_startcpu(dp->node, entry, cookie);
+               prom_startcpu(dp->phandle, entry, cookie);
        }
 
        for (timeout = 0; timeout < 50000; timeout++) {
index 8c91d9b..db15d12 100644 (file)
@@ -191,10 +191,12 @@ tsb_dtlb_load:
 
 tsb_itlb_load:
        /* Executable bit must be set.  */
-661:   andcc           %g5, _PAGE_EXEC_4U, %g0
-       .section        .sun4v_1insn_patch, "ax"
+661:   sethi           %hi(_PAGE_EXEC_4U), %g4
+       andcc           %g5, %g4, %g0
+       .section        .sun4v_2insn_patch, "ax"
        .word           661b
        andcc           %g5, _PAGE_EXEC_4V, %g0
+       nop
        .previous
 
        be,pn           %xcc, tsb_do_fault
index 1994d3f..f2ad216 100644 (file)
@@ -170,10 +170,7 @@ static inline void elf_common_init(struct thread_struct *t,
 }
 
 #define ELF_PLAT_INIT(_r, load_addr)                   \
-do {                                                   \
-       elf_common_init(&current->thread, _r, 0);       \
-       clear_thread_flag(TIF_IA32);                    \
-} while (0)
+       elf_common_init(&current->thread, _r, 0)
 
 #define        COMPAT_ELF_PLAT_INIT(regs, load_addr)           \
        elf_common_init(&current->thread, regs, __USER_DS)
index b4bf9a9..05b58cc 100644 (file)
@@ -29,6 +29,7 @@
 #define PCI_CHECK_ENABLE_AMD_MMCONF    0x20000
 #define PCI_HAS_IO_ECS         0x40000
 #define PCI_NOASSIGN_ROMS      0x80000
+#define PCI_ROOT_NO_CRS                0x100000
 
 extern unsigned int pci_probe;
 extern unsigned long pirq_table_addr;
index fc801ba..b753ea5 100644 (file)
@@ -450,6 +450,8 @@ struct thread_struct {
        struct perf_event       *ptrace_bps[HBP_NUM];
        /* Debug status used for traps, single steps, etc... */
        unsigned long           debugreg6;
+       /* Keep track of the exact dr7 value set by the user */
+       unsigned long           ptrace_dr7;
        /* Fault info: */
        unsigned long           cr2;
        unsigned long           trap_no;
index 0acbcdf..af1c583 100644 (file)
@@ -1344,14 +1344,6 @@ static struct dmi_system_id __initdata acpi_dmi_table[] = {
         },
        {
         .callback = force_acpi_ht,
-        .ident = "ASUS P2B-DS",
-        .matches = {
-                    DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
-                    DMI_MATCH(DMI_BOARD_NAME, "P2B-DS"),
-                    },
-        },
-       {
-        .callback = force_acpi_ht,
         .ident = "ASUS CUR-DLS",
         .matches = {
                     DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
index 05d5fec..bb6006e 100644 (file)
@@ -212,25 +212,6 @@ static int arch_check_va_in_kernelspace(unsigned long va, u8 hbp_len)
        return (va >= TASK_SIZE) && ((va + len - 1) >= TASK_SIZE);
 }
 
-/*
- * Store a breakpoint's encoded address, length, and type.
- */
-static int arch_store_info(struct perf_event *bp)
-{
-       struct arch_hw_breakpoint *info = counter_arch_bp(bp);
-       /*
-        * For kernel-addresses, either the address or symbol name can be
-        * specified.
-        */
-       if (info->name)
-               info->address = (unsigned long)
-                               kallsyms_lookup_name(info->name);
-       if (info->address)
-               return 0;
-
-       return -EINVAL;
-}
-
 int arch_bp_generic_fields(int x86_len, int x86_type,
                           int *gen_len, int *gen_type)
 {
@@ -362,10 +343,13 @@ int arch_validate_hwbkpt_settings(struct perf_event *bp,
                return ret;
        }
 
-       ret = arch_store_info(bp);
-
-       if (ret < 0)
-               return ret;
+       /*
+        * For kernel-addresses, either the address or symbol name can be
+        * specified.
+        */
+       if (info->name)
+               info->address = (unsigned long)
+                               kallsyms_lookup_name(info->name);
        /*
         * Check that the low-order bits of the address are appropriate
         * for the alignment implied by len.
index 41a26a8..126f0b4 100644 (file)
@@ -527,6 +527,7 @@ void set_personality_ia32(void)
 
        /* Make sure to be in 32bit mode */
        set_thread_flag(TIF_IA32);
+       current->personality |= force_personality32;
 
        /* Prepare the first "return" to user space */
        current_thread_info()->status |= TS_COMPAT;
index 017d937..0c1033d 100644 (file)
@@ -702,7 +702,7 @@ static unsigned long ptrace_get_debugreg(struct task_struct *tsk, int n)
        } else if (n == 6) {
                val = thread->debugreg6;
         } else if (n == 7) {
-               val = ptrace_get_dr7(thread->ptrace_bps);
+               val = thread->ptrace_dr7;
        }
        return val;
 }
@@ -778,8 +778,11 @@ int ptrace_set_debugreg(struct task_struct *tsk, int n, unsigned long val)
                        return rc;
        }
        /* All that's left is DR7 */
-       if (n == 7)
+       if (n == 7) {
                rc = ptrace_write_dr7(tsk, val);
+               if (!rc)
+                       thread->ptrace_dr7 = val;
+       }
 
 ret_path:
        return rc;
index 959e548..5f11ff6 100644 (file)
@@ -15,6 +15,51 @@ struct pci_root_info {
        int busnum;
 };
 
+static bool pci_use_crs = true;
+
+static int __init set_use_crs(const struct dmi_system_id *id)
+{
+       pci_use_crs = true;
+       return 0;
+}
+
+static const struct dmi_system_id pci_use_crs_table[] __initconst = {
+       /* http://bugzilla.kernel.org/show_bug.cgi?id=14183 */
+       {
+               .callback = set_use_crs,
+               .ident = "IBM System x3800",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "x3800"),
+               },
+       },
+       {}
+};
+
+void __init pci_acpi_crs_quirks(void)
+{
+       int year;
+
+       if (dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL) && year < 2008)
+               pci_use_crs = false;
+
+       dmi_check_system(pci_use_crs_table);
+
+       /*
+        * If the user specifies "pci=use_crs" or "pci=nocrs" explicitly, that
+        * takes precedence over anything we figured out above.
+        */
+       if (pci_probe & PCI_ROOT_NO_CRS)
+               pci_use_crs = false;
+       else if (pci_probe & PCI_USE__CRS)
+               pci_use_crs = true;
+
+       printk(KERN_INFO "PCI: %s host bridge windows from ACPI; "
+              "if necessary, use \"pci=%s\" and report a bug\n",
+              pci_use_crs ? "Using" : "Ignoring",
+              pci_use_crs ? "nocrs" : "use_crs");
+}
+
 static acpi_status
 resource_to_addr(struct acpi_resource *resource,
                        struct acpi_resource_address64 *addr)
@@ -45,20 +90,6 @@ count_resource(struct acpi_resource *acpi_res, void *data)
        return AE_OK;
 }
 
-static int
-bus_has_transparent_bridge(struct pci_bus *bus)
-{
-       struct pci_dev *dev;
-
-       list_for_each_entry(dev, &bus->devices, bus_list) {
-               u16 class = dev->class >> 8;
-
-               if (class == PCI_CLASS_BRIDGE_PCI && dev->transparent)
-                       return true;
-       }
-       return false;
-}
-
 static void
 align_resource(struct acpi_device *bridge, struct resource *res)
 {
@@ -92,12 +123,8 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
        acpi_status status;
        unsigned long flags;
        struct resource *root;
-       int max_root_bus_resources = PCI_BUS_NUM_RESOURCES;
        u64 start, end;
 
-       if (bus_has_transparent_bridge(info->bus))
-               max_root_bus_resources -= 3;
-
        status = resource_to_addr(acpi_res, &addr);
        if (!ACPI_SUCCESS(status))
                return AE_OK;
@@ -115,15 +142,6 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
 
        start = addr.minimum + addr.translation_offset;
        end = start + addr.address_length - 1;
-       if (info->res_num >= max_root_bus_resources) {
-               if (pci_probe & PCI_USE__CRS)
-                       printk(KERN_WARNING "PCI: Failed to allocate "
-                              "0x%lx-0x%lx from %s for %s due to _CRS "
-                              "returning more than %d resource descriptors\n",
-                              (unsigned long) start, (unsigned long) end,
-                              root->name, info->name, max_root_bus_resources);
-               return AE_OK;
-       }
 
        res = &info->res[info->res_num];
        res->name = info->name;
@@ -133,7 +151,7 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
        res->child = NULL;
        align_resource(info->bridge, res);
 
-       if (!(pci_probe & PCI_USE__CRS)) {
+       if (!pci_use_crs) {
                dev_printk(KERN_DEBUG, &info->bridge->dev,
                           "host bridge window %pR (ignored)\n", res);
                return AE_OK;
@@ -143,7 +161,7 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
                dev_err(&info->bridge->dev,
                        "can't allocate host bridge window %pR\n", res);
        } else {
-               info->bus->resource[info->res_num] = res;
+               pci_bus_add_resource(info->bus, res, 0);
                info->res_num++;
                if (addr.translation_offset)
                        dev_info(&info->bridge->dev, "host bridge window %pR "
@@ -164,10 +182,8 @@ get_current_resources(struct acpi_device *device, int busnum,
        struct pci_root_info info;
        size_t size;
 
-       if (!(pci_probe & PCI_USE__CRS))
-               dev_info(&device->dev,
-                        "ignoring host bridge windows from ACPI; "
-                        "boot with \"pci=use_crs\" to use them\n");
+       if (pci_use_crs)
+               pci_bus_remove_resources(bus);
 
        info.bridge = device;
        info.bus = bus;
index f939d60..12d54ff 100644 (file)
@@ -36,13 +36,14 @@ void x86_pci_root_bus_res_quirks(struct pci_bus *b)
        printk(KERN_DEBUG "PCI: peer root bus %02x res updated from pci conf\n",
                        b->number);
 
+       pci_bus_remove_resources(b);
        info = &pci_root_info[i];
        for (j = 0; j < info->res_num; j++) {
                struct resource *res;
                struct resource *root;
 
                res = &info->res[j];
-               b->resource[j] = res;
+               pci_bus_add_resource(b, res, 0);
                if (res->flags & IORESOURCE_IO)
                        root = &ioport_resource;
                else
index adbc23f..731b64e 100644 (file)
@@ -2,8 +2,7 @@
 
 /*
  * sub bus (transparent) will use entres from 3 to store extra from
- * root, so need to make sure we have enough slot there, Should we
- * increase PCI_BUS_NUM_RESOURCES?
+ * root, so need to make sure we have enough slot there.
  */
 #define RES_NUM 16
 struct pci_root_info {
index d2552c6..3736176 100644 (file)
@@ -520,6 +520,9 @@ char * __devinit  pcibios_setup(char *str)
        } else if (!strcmp(str, "use_crs")) {
                pci_probe |= PCI_USE__CRS;
                return NULL;
+       } else if (!strcmp(str, "nocrs")) {
+               pci_probe |= PCI_ROOT_NO_CRS;
+               return NULL;
        } else if (!strcmp(str, "earlydump")) {
                pci_early_dump_regs = 1;
                return NULL;
index 5dc9e8c..5a8fbf8 100644 (file)
@@ -60,22 +60,20 @@ skip_isa_ioresource_align(struct pci_dev *dev) {
  * but we want to try to avoid allocating at 0x2900-0x2bff
  * which might have be mirrored at 0x0100-0x03ff..
  */
-void
-pcibios_align_resource(void *data, struct resource *res,
+resource_size_t
+pcibios_align_resource(void *data, const struct resource *res,
                        resource_size_t size, resource_size_t align)
 {
        struct pci_dev *dev = data;
+       resource_size_t start = res->start;
 
        if (res->flags & IORESOURCE_IO) {
-               resource_size_t start = res->start;
-
                if (skip_isa_ioresource_align(dev))
-                       return;
-               if (start & 0x300) {
+                       return start;
+               if (start & 0x300)
                        start = (start + 0x3ff) & ~0x3ff;
-                       res->start = start;
-               }
        }
+       return start;
 }
 EXPORT_SYMBOL(pcibios_align_resource);
 
index 0696d50..b02f6d8 100644 (file)
@@ -590,6 +590,8 @@ static __init int intel_router_probe(struct irq_router *r, struct pci_dev *route
        case PCI_DEVICE_ID_INTEL_ICH10_1:
        case PCI_DEVICE_ID_INTEL_ICH10_2:
        case PCI_DEVICE_ID_INTEL_ICH10_3:
+       case PCI_DEVICE_ID_INTEL_CPT_LPC1:
+       case PCI_DEVICE_ID_INTEL_CPT_LPC2:
                r->name = "PIIX/ICH";
                r->get = pirq_piix_get;
                r->set = pirq_piix_set;
index b19d1e5..8f3f9a5 100644 (file)
@@ -303,22 +303,17 @@ static void __init pci_mmcfg_check_end_bus_number(void)
 {
        struct pci_mmcfg_region *cfg, *cfgx;
 
-       /* last one*/
-       cfg = list_entry(pci_mmcfg_list.prev, typeof(*cfg), list);
-       if (cfg)
-               if (cfg->end_bus < cfg->start_bus)
-                       cfg->end_bus = 255;
-
-       if (list_is_singular(&pci_mmcfg_list))
-               return;
-
-       /* don't overlap please */
+       /* Fixup overlaps */
        list_for_each_entry(cfg, &pci_mmcfg_list, list) {
                if (cfg->end_bus < cfg->start_bus)
                        cfg->end_bus = 255;
 
+               /* Don't access the list head ! */
+               if (cfg->list.next == &pci_mmcfg_list)
+                       break;
+
                cfgx = list_entry(cfg->list.next, typeof(*cfg), list);
-               if (cfg != cfgx && cfg->end_bus >= cfgx->start_bus)
+               if (cfg->end_bus >= cfgx->start_bus)
                        cfg->end_bus = cfgx->start_bus - 1;
        }
 }
index b7c0734..cd10269 100644 (file)
@@ -69,26 +69,25 @@ static int pci_bus_count;
  * but we want to try to avoid allocating at 0x2900-0x2bff
  * which might have be mirrored at 0x0100-0x03ff..
  */
-void
-pcibios_align_resource(void *data, struct resource *res, resource_size_t size,
-                      resource_size_t align)
+resource_size_t
+pcibios_align_resource(void *data, const struct resource *res,
+                      resource_size_t size, resource_size_t align)
 {
        struct pci_dev *dev = data;
+       resource_size_t start = res->start;
 
        if (res->flags & IORESOURCE_IO) {
-               resource_size_t start = res->start;
-
                if (size > 0x100) {
                        printk(KERN_ERR "PCI: I/O Region %s/%d too large"
                               " (%ld bytes)\n", pci_name(dev),
                               dev->resource - res, size);
                }
 
-               if (start & 0x300) {
+               if (start & 0x300)
                        start = (start + 0x3ff) & ~0x3ff;
-                       res->start = start;
-               }
        }
+
+       return start;
 }
 
 int
index 718897e..d1a9a0a 100644 (file)
@@ -1147,7 +1147,7 @@ void init_request_from_bio(struct request *req, struct bio *bio)
  */
 static inline bool queue_should_plug(struct request_queue *q)
 {
-       return !(blk_queue_nonrot(q) && blk_queue_queuing(q));
+       return !(blk_queue_nonrot(q) && blk_queue_tagged(q));
 }
 
 static int __make_request(struct request_queue *q, struct bio *bio)
@@ -1859,15 +1859,8 @@ void blk_dequeue_request(struct request *rq)
         * and to it is freed is accounted as io that is in progress at
         * the driver side.
         */
-       if (blk_account_rq(rq)) {
+       if (blk_account_rq(rq))
                q->in_flight[rq_is_sync(rq)]++;
-               /*
-                * Mark this device as supporting hardware queuing, if
-                * we have more IOs in flight than 4.
-                */
-               if (!blk_queue_queuing(q) && queue_in_flight(q) > 4)
-                       set_bit(QUEUE_FLAG_CQ, &q->queue_flags);
-       }
 }
 
 /**
index 81c185a..6a2e295 100644 (file)
@@ -114,6 +114,16 @@ config CRYPTO_NULL
        help
          These are 'Null' algorithms, used by IPsec, which do nothing.
 
+config CRYPTO_PCRYPT
+       tristate "Parallel crypto engine (EXPERIMENTAL)"
+       depends on SMP && EXPERIMENTAL
+       select PADATA
+       select CRYPTO_MANAGER
+       select CRYPTO_AEAD
+       help
+         This converts an arbitrary crypto algorithm into a parallel
+         algorithm that executes in kernel threads.
+
 config CRYPTO_WORKQUEUE
        tristate
 
index 9e8f619..d7e6441 100644 (file)
@@ -56,6 +56,7 @@ obj-$(CONFIG_CRYPTO_XTS) += xts.o
 obj-$(CONFIG_CRYPTO_CTR) += ctr.o
 obj-$(CONFIG_CRYPTO_GCM) += gcm.o
 obj-$(CONFIG_CRYPTO_CCM) += ccm.o
+obj-$(CONFIG_CRYPTO_PCRYPT) += pcrypt.o
 obj-$(CONFIG_CRYPTO_CRYPTD) += cryptd.o
 obj-$(CONFIG_CRYPTO_DES) += des_generic.o
 obj-$(CONFIG_CRYPTO_FCRYPT) += fcrypt.o
index f6f0833..fe980da 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Asynchronous block chaining cipher operations.
- * 
+ *
  * This is the asynchronous version of blkcipher.c indicating completion
  * via a callback.
  *
@@ -8,7 +8,7 @@
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option) 
+ * Software Foundation; either version 2 of the License, or (at your option)
  * any later version.
  *
  */
index 0a55da7..6729e8f 100644 (file)
@@ -1,13 +1,13 @@
 /*
  * AEAD: Authenticated Encryption with Associated Data
- * 
+ *
  * This file provides API support for AEAD algorithms.
  *
  * Copyright (c) 2007 Herbert Xu <herbert@gondor.apana.org.au>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option) 
+ * Software Foundation; either version 2 of the License, or (at your option)
  * any later version.
  *
  */
index e78b7ee..a68c73d 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Cryptographic API.
  *
  * AES Cipher Algorithm.
@@ -1127,7 +1127,7 @@ EXPORT_SYMBOL_GPL(crypto_il_tab);
 
 #define star_x(x) (((x) & 0x7f7f7f7f) << 1) ^ ((((x) & 0x80808080) >> 7) * 0x1b)
 
-#define imix_col(y,x)  do {            \
+#define imix_col(y, x) do {            \
        u       = star_x(x);            \
        v       = star_x(u);            \
        w       = star_x(v);            \
index f149b1c..3e4524e 100644 (file)
@@ -230,7 +230,7 @@ static struct crypto_larval *__crypto_register_alg(struct crypto_alg *alg)
        list_add(&alg->cra_list, &crypto_alg_list);
        list_add(&larval->alg.cra_list, &crypto_alg_list);
 
-out:   
+out:
        return larval;
 
 free_larval:
@@ -388,7 +388,7 @@ int crypto_unregister_alg(struct crypto_alg *alg)
 {
        int ret;
        LIST_HEAD(list);
-       
+
        down_write(&crypto_alg_sem);
        ret = crypto_remove_alg(alg, &list);
        up_write(&crypto_alg_sem);
index e42c3a8..77530d5 100644 (file)
@@ -469,14 +469,13 @@ static int anubis_setkey(struct crypto_tfm *tfm, const u8 *in_key,
        u32 kappa[ANUBIS_MAX_N];
        u32 inter[ANUBIS_MAX_N];
 
-       switch (key_len)
-       {
+       switch (key_len) {
                case 16: case 20: case 24: case 28:
                case 32: case 36: case 40:
                        break;
                default:
                        *flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
-                       return - EINVAL;
+                       return -EINVAL;
        }
 
        ctx->key_len = key_len * 8;
@@ -530,23 +529,24 @@ static int anubis_setkey(struct crypto_tfm *tfm, const u8 *in_key,
                /*
                 * compute kappa^{r+1} from kappa^r:
                 */
-               if (r == R) {
+               if (r == R)
                        break;
-               }
                for (i = 0; i < N; i++) {
                        int j = i;
                        inter[i]  = T0[(kappa[j--] >> 24)       ];
-                       if (j < 0) j = N - 1;
+                       if (j < 0)
+                               j = N - 1;
                        inter[i] ^= T1[(kappa[j--] >> 16) & 0xff];
-                       if (j < 0) j = N - 1;
+                       if (j < 0)
+                               j = N - 1;
                        inter[i] ^= T2[(kappa[j--] >>  8) & 0xff];
-                       if (j < 0) j = N - 1;
+                       if (j < 0)
+                               j = N - 1;
                        inter[i] ^= T3[(kappa[j  ]      ) & 0xff];
                }
                kappa[0] = inter[0] ^ rc[r];
-               for (i = 1; i < N; i++) {
+               for (i = 1; i < N; i++)
                        kappa[i] = inter[i];
-               }
        }
 
        /*
@@ -690,7 +690,7 @@ static struct crypto_alg anubis_alg = {
 static int __init anubis_mod_init(void)
 {
        int ret = 0;
-       
+
        ret = crypto_register_alg(&anubis_alg);
        return ret;
 }
index 798526d..033a714 100644 (file)
@@ -10,7 +10,7 @@
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option) 
+ * Software Foundation; either version 2 of the License, or (at your option)
  * any later version.
  *
  */
@@ -288,11 +288,11 @@ static int crypto_init_ops(struct crypto_tfm *tfm, u32 type, u32 mask)
 
        case CRYPTO_ALG_TYPE_COMPRESS:
                return crypto_init_compress_ops(tfm);
-       
+
        default:
                break;
        }
-       
+
        BUG();
        return -EINVAL;
 }
@@ -315,10 +315,9 @@ static void crypto_exit_ops(struct crypto_tfm *tfm)
        case CRYPTO_ALG_TYPE_COMPRESS:
                crypto_exit_compress_ops(tfm);
                break;
-       
+
        default:
                BUG();
-               
        }
 }
 
@@ -593,12 +592,12 @@ int crypto_has_alg(const char *name, u32 type, u32 mask)
 {
        int ret = 0;
        struct crypto_alg *alg = crypto_alg_mod_lookup(name, type, mask);
-       
+
        if (!IS_ERR(alg)) {
                crypto_mod_put(alg);
                ret = 1;
        }
-       
+
        return ret;
 }
 EXPORT_SYMBOL_GPL(crypto_has_alg);
index 4d6f49a..1887090 100644 (file)
@@ -194,7 +194,7 @@ static void authenc_verify_ahash_update_done(struct crypto_async_request *areq,
        scatterwalk_map_and_copy(ihash, areq_ctx->sg, areq_ctx->cryptlen,
                                 authsize, 0);
 
-       err = memcmp(ihash, ahreq->result, authsize) ? -EBADMSG: 0;
+       err = memcmp(ihash, ahreq->result, authsize) ? -EBADMSG : 0;
        if (err)
                goto out;
 
@@ -231,7 +231,7 @@ static void authenc_verify_ahash_done(struct crypto_async_request *areq,
        scatterwalk_map_and_copy(ihash, areq_ctx->sg, areq_ctx->cryptlen,
                                 authsize, 0);
 
-       err = memcmp(ihash, ahreq->result, authsize) ? -EBADMSG: 0;
+       err = memcmp(ihash, ahreq->result, authsize) ? -EBADMSG : 0;
        if (err)
                goto out;
 
@@ -464,7 +464,7 @@ static int crypto_authenc_verify(struct aead_request *req,
        ihash = ohash + authsize;
        scatterwalk_map_and_copy(ihash, areq_ctx->sg, areq_ctx->cryptlen,
                                 authsize, 0);
-       return memcmp(ihash, ohash, authsize) ? -EBADMSG: 0;
+       return memcmp(ihash, ohash, authsize) ? -EBADMSG : 0;
 }
 
 static int crypto_authenc_iverify(struct aead_request *req, u8 *iv,
@@ -557,11 +557,11 @@ static int crypto_authenc_init_tfm(struct crypto_tfm *tfm)
 
        ctx->auth = auth;
        ctx->enc = enc;
-       
+
        tfm->crt_aead.reqsize = max_t(unsigned int,
                                crypto_ahash_reqsize(auth) + ctx->reqoff +
                                sizeof(struct authenc_request_ctx) +
-                               sizeof(struct ahash_request), 
+                               sizeof(struct ahash_request),
                                sizeof(struct skcipher_givcrypt_request) +
                                crypto_ablkcipher_reqsize(enc) +
                                crypto_ablkcipher_ivsize(enc));
index 6f5b487..a67d52e 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Cryptographic API.
  *
  * Blowfish Cipher Algorithm, by Bruce Schneier.
@@ -299,7 +299,7 @@ static const u32 bf_sbox[256 * 4] = {
        0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6,
 };
 
-/* 
+/*
  * Round loop unrolling macros, S is a pointer to a S-Box array
  * organized in 4 unsigned longs at a row.
  */
@@ -315,7 +315,7 @@ static const u32 bf_sbox[256 * 4] = {
 
 /*
  * The blowfish encipher, processes 64-bit blocks.
- * NOTE: This function MUSTN'T respect endianess 
+ * NOTE: This function MUSTN'T respect endianess
  */
 static void encrypt_block(struct bf_ctx *bctx, u32 *dst, u32 *src)
 {
@@ -395,7 +395,7 @@ static void bf_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src)
        out_blk[1] = cpu_to_be32(yl);
 }
 
-/* 
+/*
  * Calculates the blowfish S and P boxes for encryption and decryption.
  */
 static int bf_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen)
@@ -417,10 +417,10 @@ static int bf_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen)
 
        /* Actual subkey generation */
        for (j = 0, i = 0; i < 16 + 2; i++) {
-               temp = (((u32 )key[j] << 24) |
-                       ((u32 )key[(j + 1) % keylen] << 16) |
-                       ((u32 )key[(j + 2) % keylen] << 8) |
-                       ((u32 )key[(j + 3) % keylen]));
+               temp = (((u32)key[j] << 24) |
+                       ((u32)key[(j + 1) % keylen] << 16) |
+                       ((u32)key[(j + 2) % keylen] << 8) |
+                       ((u32)key[(j + 3) % keylen]));
 
                P[i] = P[i] ^ temp;
                j = (j + 4) % keylen;
@@ -444,7 +444,7 @@ static int bf_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen)
                        S[count + 1] = data[1];
                }
        }
-       
+
        /* Bruce says not to bother with the weak key check. */
        return 0;
 }
index 964635d..64cff46 100644 (file)
 #include <asm/unaligned.h>
 
 static const u32 camellia_sp1110[256] = {
-       0x70707000,0x82828200,0x2c2c2c00,0xececec00,
-       0xb3b3b300,0x27272700,0xc0c0c000,0xe5e5e500,
-       0xe4e4e400,0x85858500,0x57575700,0x35353500,
-       0xeaeaea00,0x0c0c0c00,0xaeaeae00,0x41414100,
-       0x23232300,0xefefef00,0x6b6b6b00,0x93939300,
-       0x45454500,0x19191900,0xa5a5a500,0x21212100,
-       0xededed00,0x0e0e0e00,0x4f4f4f00,0x4e4e4e00,
-       0x1d1d1d00,0x65656500,0x92929200,0xbdbdbd00,
-       0x86868600,0xb8b8b800,0xafafaf00,0x8f8f8f00,
-       0x7c7c7c00,0xebebeb00,0x1f1f1f00,0xcecece00,
-       0x3e3e3e00,0x30303000,0xdcdcdc00,0x5f5f5f00,
-       0x5e5e5e00,0xc5c5c500,0x0b0b0b00,0x1a1a1a00,
-       0xa6a6a600,0xe1e1e100,0x39393900,0xcacaca00,
-       0xd5d5d500,0x47474700,0x5d5d5d00,0x3d3d3d00,
-       0xd9d9d900,0x01010100,0x5a5a5a00,0xd6d6d600,
-       0x51515100,0x56565600,0x6c6c6c00,0x4d4d4d00,
-       0x8b8b8b00,0x0d0d0d00,0x9a9a9a00,0x66666600,
-       0xfbfbfb00,0xcccccc00,0xb0b0b000,0x2d2d2d00,
-       0x74747400,0x12121200,0x2b2b2b00,0x20202000,
-       0xf0f0f000,0xb1b1b100,0x84848400,0x99999900,
-       0xdfdfdf00,0x4c4c4c00,0xcbcbcb00,0xc2c2c200,
-       0x34343400,0x7e7e7e00,0x76767600,0x05050500,
-       0x6d6d6d00,0xb7b7b700,0xa9a9a900,0x31313100,
-       0xd1d1d100,0x17171700,0x04040400,0xd7d7d700,
-       0x14141400,0x58585800,0x3a3a3a00,0x61616100,
-       0xdedede00,0x1b1b1b00,0x11111100,0x1c1c1c00,
-       0x32323200,0x0f0f0f00,0x9c9c9c00,0x16161600,
-       0x53535300,0x18181800,0xf2f2f200,0x22222200,
-       0xfefefe00,0x44444400,0xcfcfcf00,0xb2b2b200,
-       0xc3c3c300,0xb5b5b500,0x7a7a7a00,0x91919100,
-       0x24242400,0x08080800,0xe8e8e800,0xa8a8a800,
-       0x60606000,0xfcfcfc00,0x69696900,0x50505000,
-       0xaaaaaa00,0xd0d0d000,0xa0a0a000,0x7d7d7d00,
-       0xa1a1a100,0x89898900,0x62626200,0x97979700,
-       0x54545400,0x5b5b5b00,0x1e1e1e00,0x95959500,
-       0xe0e0e000,0xffffff00,0x64646400,0xd2d2d200,
-       0x10101000,0xc4c4c400,0x00000000,0x48484800,
-       0xa3a3a300,0xf7f7f700,0x75757500,0xdbdbdb00,
-       0x8a8a8a00,0x03030300,0xe6e6e600,0xdadada00,
-       0x09090900,0x3f3f3f00,0xdddddd00,0x94949400,
-       0x87878700,0x5c5c5c00,0x83838300,0x02020200,
-       0xcdcdcd00,0x4a4a4a00,0x90909000,0x33333300,
-       0x73737300,0x67676700,0xf6f6f600,0xf3f3f300,
-       0x9d9d9d00,0x7f7f7f00,0xbfbfbf00,0xe2e2e200,
-       0x52525200,0x9b9b9b00,0xd8d8d800,0x26262600,
-       0xc8c8c800,0x37373700,0xc6c6c600,0x3b3b3b00,
-       0x81818100,0x96969600,0x6f6f6f00,0x4b4b4b00,
-       0x13131300,0xbebebe00,0x63636300,0x2e2e2e00,
-       0xe9e9e900,0x79797900,0xa7a7a700,0x8c8c8c00,
-       0x9f9f9f00,0x6e6e6e00,0xbcbcbc00,0x8e8e8e00,
-       0x29292900,0xf5f5f500,0xf9f9f900,0xb6b6b600,
-       0x2f2f2f00,0xfdfdfd00,0xb4b4b400,0x59595900,
-       0x78787800,0x98989800,0x06060600,0x6a6a6a00,
-       0xe7e7e700,0x46464600,0x71717100,0xbababa00,
-       0xd4d4d400,0x25252500,0xababab00,0x42424200,
-       0x88888800,0xa2a2a200,0x8d8d8d00,0xfafafa00,
-       0x72727200,0x07070700,0xb9b9b900,0x55555500,
-       0xf8f8f800,0xeeeeee00,0xacacac00,0x0a0a0a00,
-       0x36363600,0x49494900,0x2a2a2a00,0x68686800,
-       0x3c3c3c00,0x38383800,0xf1f1f100,0xa4a4a400,
-       0x40404000,0x28282800,0xd3d3d300,0x7b7b7b00,
-       0xbbbbbb00,0xc9c9c900,0x43434300,0xc1c1c100,
-       0x15151500,0xe3e3e300,0xadadad00,0xf4f4f400,
-       0x77777700,0xc7c7c700,0x80808000,0x9e9e9e00,
+       0x70707000, 0x82828200, 0x2c2c2c00, 0xececec00,
+       0xb3b3b300, 0x27272700, 0xc0c0c000, 0xe5e5e500,
+       0xe4e4e400, 0x85858500, 0x57575700, 0x35353500,
+       0xeaeaea00, 0x0c0c0c00, 0xaeaeae00, 0x41414100,
+       0x23232300, 0xefefef00, 0x6b6b6b00, 0x93939300,
+       0x45454500, 0x19191900, 0xa5a5a500, 0x21212100,
+       0xededed00, 0x0e0e0e00, 0x4f4f4f00, 0x4e4e4e00,
+       0x1d1d1d00, 0x65656500, 0x92929200, 0xbdbdbd00,
+       0x86868600, 0xb8b8b800, 0xafafaf00, 0x8f8f8f00,
+       0x7c7c7c00, 0xebebeb00, 0x1f1f1f00, 0xcecece00,
+       0x3e3e3e00, 0x30303000, 0xdcdcdc00, 0x5f5f5f00,
+       0x5e5e5e00, 0xc5c5c500, 0x0b0b0b00, 0x1a1a1a00,
+       0xa6a6a600, 0xe1e1e100, 0x39393900, 0xcacaca00,
+       0xd5d5d500, 0x47474700, 0x5d5d5d00, 0x3d3d3d00,
+       0xd9d9d900, 0x01010100, 0x5a5a5a00, 0xd6d6d600,
+       0x51515100, 0x56565600, 0x6c6c6c00, 0x4d4d4d00,
+       0x8b8b8b00, 0x0d0d0d00, 0x9a9a9a00, 0x66666600,
+       0xfbfbfb00, 0xcccccc00, 0xb0b0b000, 0x2d2d2d00,
+       0x74747400, 0x12121200, 0x2b2b2b00, 0x20202000,
+       0xf0f0f000, 0xb1b1b100, 0x84848400, 0x99999900,
+       0xdfdfdf00, 0x4c4c4c00, 0xcbcbcb00, 0xc2c2c200,
+       0x34343400, 0x7e7e7e00, 0x76767600, 0x05050500,
+       0x6d6d6d00, 0xb7b7b700, 0xa9a9a900, 0x31313100,
+       0xd1d1d100, 0x17171700, 0x04040400, 0xd7d7d700,
+       0x14141400, 0x58585800, 0x3a3a3a00, 0x61616100,
+       0xdedede00, 0x1b1b1b00, 0x11111100, 0x1c1c1c00,
+       0x32323200, 0x0f0f0f00, 0x9c9c9c00, 0x16161600,
+       0x53535300, 0x18181800, 0xf2f2f200, 0x22222200,
+       0xfefefe00, 0x44444400, 0xcfcfcf00, 0xb2b2b200,
+       0xc3c3c300, 0xb5b5b500, 0x7a7a7a00, 0x91919100,
+       0x24242400, 0x08080800, 0xe8e8e800, 0xa8a8a800,
+       0x60606000, 0xfcfcfc00, 0x69696900, 0x50505000,
+       0xaaaaaa00, 0xd0d0d000, 0xa0a0a000, 0x7d7d7d00,
+       0xa1a1a100, 0x89898900, 0x62626200, 0x97979700,
+       0x54545400, 0x5b5b5b00, 0x1e1e1e00, 0x95959500,
+       0xe0e0e000, 0xffffff00, 0x64646400, 0xd2d2d200,
+       0x10101000, 0xc4c4c400, 0x00000000, 0x48484800,
+       0xa3a3a300, 0xf7f7f700, 0x75757500, 0xdbdbdb00,
+       0x8a8a8a00, 0x03030300, 0xe6e6e600, 0xdadada00,
+       0x09090900, 0x3f3f3f00, 0xdddddd00, 0x94949400,
+       0x87878700, 0x5c5c5c00, 0x83838300, 0x02020200,
+       0xcdcdcd00, 0x4a4a4a00, 0x90909000, 0x33333300,
+       0x73737300, 0x67676700, 0xf6f6f600, 0xf3f3f300,
+       0x9d9d9d00, 0x7f7f7f00, 0xbfbfbf00, 0xe2e2e200,
+       0x52525200, 0x9b9b9b00, 0xd8d8d800, 0x26262600,
+       0xc8c8c800, 0x37373700, 0xc6c6c600, 0x3b3b3b00,
+       0x81818100, 0x96969600, 0x6f6f6f00, 0x4b4b4b00,
+       0x13131300, 0xbebebe00, 0x63636300, 0x2e2e2e00,
+       0xe9e9e900, 0x79797900, 0xa7a7a700, 0x8c8c8c00,
+       0x9f9f9f00, 0x6e6e6e00, 0xbcbcbc00, 0x8e8e8e00,
+       0x29292900, 0xf5f5f500, 0xf9f9f900, 0xb6b6b600,
+       0x2f2f2f00, 0xfdfdfd00, 0xb4b4b400, 0x59595900,
+       0x78787800, 0x98989800, 0x06060600, 0x6a6a6a00,
+       0xe7e7e700, 0x46464600, 0x71717100, 0xbababa00,
+       0xd4d4d400, 0x25252500, 0xababab00, 0x42424200,
+       0x88888800, 0xa2a2a200, 0x8d8d8d00, 0xfafafa00,
+       0x72727200, 0x07070700, 0xb9b9b900, 0x55555500,
+       0xf8f8f800, 0xeeeeee00, 0xacacac00, 0x0a0a0a00,
+       0x36363600, 0x49494900, 0x2a2a2a00, 0x68686800,
+       0x3c3c3c00, 0x38383800, 0xf1f1f100, 0xa4a4a400,
+       0x40404000, 0x28282800, 0xd3d3d300, 0x7b7b7b00,
+       0xbbbbbb00, 0xc9c9c900, 0x43434300, 0xc1c1c100,
+       0x15151500, 0xe3e3e300, 0xadadad00, 0xf4f4f400,
+       0x77777700, 0xc7c7c700, 0x80808000, 0x9e9e9e00,
 };
 
 static const u32 camellia_sp0222[256] = {
-       0x00e0e0e0,0x00050505,0x00585858,0x00d9d9d9,
-       0x00676767,0x004e4e4e,0x00818181,0x00cbcbcb,
-       0x00c9c9c9,0x000b0b0b,0x00aeaeae,0x006a6a6a,
-       0x00d5d5d5,0x00181818,0x005d5d5d,0x00828282,
-       0x00464646,0x00dfdfdf,0x00d6d6d6,0x00272727,
-       0x008a8a8a,0x00323232,0x004b4b4b,0x00424242,
-       0x00dbdbdb,0x001c1c1c,0x009e9e9e,0x009c9c9c,
-       0x003a3a3a,0x00cacaca,0x00252525,0x007b7b7b,
-       0x000d0d0d,0x00717171,0x005f5f5f,0x001f1f1f,
-       0x00f8f8f8,0x00d7d7d7,0x003e3e3e,0x009d9d9d,
-       0x007c7c7c,0x00606060,0x00b9b9b9,0x00bebebe,
-       0x00bcbcbc,0x008b8b8b,0x00161616,0x00343434,
-       0x004d4d4d,0x00c3c3c3,0x00727272,0x00959595,
-       0x00ababab,0x008e8e8e,0x00bababa,0x007a7a7a,
-       0x00b3b3b3,0x00020202,0x00b4b4b4,0x00adadad,
-       0x00a2a2a2,0x00acacac,0x00d8d8d8,0x009a9a9a,
-       0x00171717,0x001a1a1a,0x00353535,0x00cccccc,
-       0x00f7f7f7,0x00999999,0x00616161,0x005a5a5a,
-       0x00e8e8e8,0x00242424,0x00565656,0x00404040,
-       0x00e1e1e1,0x00636363,0x00090909,0x00333333,
-       0x00bfbfbf,0x00989898,0x00979797,0x00858585,
-       0x00686868,0x00fcfcfc,0x00ececec,0x000a0a0a,
-       0x00dadada,0x006f6f6f,0x00535353,0x00626262,
-       0x00a3a3a3,0x002e2e2e,0x00080808,0x00afafaf,
-       0x00282828,0x00b0b0b0,0x00747474,0x00c2c2c2,
-       0x00bdbdbd,0x00363636,0x00222222,0x00383838,
-       0x00646464,0x001e1e1e,0x00393939,0x002c2c2c,
-       0x00a6a6a6,0x00303030,0x00e5e5e5,0x00444444,
-       0x00fdfdfd,0x00888888,0x009f9f9f,0x00656565,
-       0x00878787,0x006b6b6b,0x00f4f4f4,0x00232323,
-       0x00484848,0x00101010,0x00d1d1d1,0x00515151,
-       0x00c0c0c0,0x00f9f9f9,0x00d2d2d2,0x00a0a0a0,
-       0x00555555,0x00a1a1a1,0x00414141,0x00fafafa,
-       0x00434343,0x00131313,0x00c4c4c4,0x002f2f2f,
-       0x00a8a8a8,0x00b6b6b6,0x003c3c3c,0x002b2b2b,
-       0x00c1c1c1,0x00ffffff,0x00c8c8c8,0x00a5a5a5,
-       0x00202020,0x00898989,0x00000000,0x00909090,
-       0x00474747,0x00efefef,0x00eaeaea,0x00b7b7b7,
-       0x00151515,0x00060606,0x00cdcdcd,0x00b5b5b5,
-       0x00121212,0x007e7e7e,0x00bbbbbb,0x00292929,
-       0x000f0f0f,0x00b8b8b8,0x00070707,0x00040404,
-       0x009b9b9b,0x00949494,0x00212121,0x00666666,
-       0x00e6e6e6,0x00cecece,0x00ededed,0x00e7e7e7,
-       0x003b3b3b,0x00fefefe,0x007f7f7f,0x00c5c5c5,
-       0x00a4a4a4,0x00373737,0x00b1b1b1,0x004c4c4c,
-       0x00919191,0x006e6e6e,0x008d8d8d,0x00767676,
-       0x00030303,0x002d2d2d,0x00dedede,0x00969696,
-       0x00262626,0x007d7d7d,0x00c6c6c6,0x005c5c5c,
-       0x00d3d3d3,0x00f2f2f2,0x004f4f4f,0x00191919,
-       0x003f3f3f,0x00dcdcdc,0x00797979,0x001d1d1d,
-       0x00525252,0x00ebebeb,0x00f3f3f3,0x006d6d6d,
-       0x005e5e5e,0x00fbfbfb,0x00696969,0x00b2b2b2,
-       0x00f0f0f0,0x00313131,0x000c0c0c,0x00d4d4d4,
-       0x00cfcfcf,0x008c8c8c,0x00e2e2e2,0x00757575,
-       0x00a9a9a9,0x004a4a4a,0x00575757,0x00848484,
-       0x00111111,0x00454545,0x001b1b1b,0x00f5f5f5,
-       0x00e4e4e4,0x000e0e0e,0x00737373,0x00aaaaaa,
-       0x00f1f1f1,0x00dddddd,0x00595959,0x00141414,
-       0x006c6c6c,0x00929292,0x00545454,0x00d0d0d0,
-       0x00787878,0x00707070,0x00e3e3e3,0x00494949,
-       0x00808080,0x00505050,0x00a7a7a7,0x00f6f6f6,
-       0x00777777,0x00939393,0x00868686,0x00838383,
-       0x002a2a2a,0x00c7c7c7,0x005b5b5b,0x00e9e9e9,
-       0x00eeeeee,0x008f8f8f,0x00010101,0x003d3d3d,
+       0x00e0e0e0, 0x00050505, 0x00585858, 0x00d9d9d9,
+       0x00676767, 0x004e4e4e, 0x00818181, 0x00cbcbcb,
+       0x00c9c9c9, 0x000b0b0b, 0x00aeaeae, 0x006a6a6a,
+       0x00d5d5d5, 0x00181818, 0x005d5d5d, 0x00828282,
+       0x00464646, 0x00dfdfdf, 0x00d6d6d6, 0x00272727,
+       0x008a8a8a, 0x00323232, 0x004b4b4b, 0x00424242,
+       0x00dbdbdb, 0x001c1c1c, 0x009e9e9e, 0x009c9c9c,
+       0x003a3a3a, 0x00cacaca, 0x00252525, 0x007b7b7b,
+       0x000d0d0d, 0x00717171, 0x005f5f5f, 0x001f1f1f,
+       0x00f8f8f8, 0x00d7d7d7, 0x003e3e3e, 0x009d9d9d,
+       0x007c7c7c, 0x00606060, 0x00b9b9b9, 0x00bebebe,
+       0x00bcbcbc, 0x008b8b8b, 0x00161616, 0x00343434,
+       0x004d4d4d, 0x00c3c3c3, 0x00727272, 0x00959595,
+    &nbs