Merge branches 'slab/fixes', 'slob/fixes', 'slub/cleanups' and 'slub/fixes' into...
authorPekka Enberg <penberg@cs.helsinki.fi>
Wed, 4 Aug 2010 19:04:43 +0000 (22:04 +0300)
committerPekka Enberg <penberg@cs.helsinki.fi>
Wed, 4 Aug 2010 19:04:43 +0000 (22:04 +0300)
442 files changed:
Documentation/00-INDEX
Documentation/bus-virt-phys-mapping.txt [moved from Documentation/IO-mapping.txt with 100% similarity]
Documentation/credentials.txt
Documentation/feature-removal-schedule.txt
Documentation/kernel-parameters.txt
MAINTAINERS
Makefile
arch/arm/boot/compressed/Makefile
arch/arm/common/sa1111.c
arch/arm/include/asm/atomic.h
arch/arm/include/asm/io.h
arch/arm/kernel/entry-armv.S
arch/arm/kernel/kprobes-decode.c
arch/arm/kernel/process.c
arch/arm/lib/csumpartialcopyuser.S
arch/arm/mach-clps711x/include/mach/debug-macro.S
arch/arm/mach-davinci/board-da850-evm.c
arch/arm/mach-footbridge/common.c
arch/arm/mach-h720x/include/mach/debug-macro.S
arch/arm/mach-kirkwood/tsx1x-common.c
arch/arm/mach-kirkwood/tsx1x-common.h
arch/arm/mach-ns9xxx/include/mach/debug-macro.S
arch/arm/mach-ns9xxx/include/mach/uncompress.h
arch/arm/mach-omap2/board-rx51-peripherals.c
arch/arm/mach-pxa/colibri-pxa300.c
arch/arm/mach-pxa/corgi.c
arch/arm/mach-pxa/cpufreq-pxa2xx.c
arch/arm/mach-pxa/pxa27x.c
arch/arm/mach-realview/core.c
arch/arm/mach-shark/include/mach/debug-macro.S
arch/arm/mach-ux500/clock.c
arch/arm/mach-ux500/cpu-db5500.c
arch/arm/mach-ux500/include/mach/uncompress.h
arch/arm/mach-vexpress/v2m.c
arch/arm/mach-w90x900/cpu.c
arch/arm/mm/cache-l2x0.c
arch/arm/mm/highmem.c
arch/arm/plat-spear/include/plat/debug-macro.S
arch/arm/tools/mach-types
arch/avr32/include/asm/ioctls.h
arch/avr32/mach-at32ap/include/mach/board.h
arch/microblaze/Kconfig
arch/microblaze/include/asm/memblock.h [moved from arch/microblaze/include/asm/lmb.h with 57% similarity]
arch/microblaze/kernel/prom.c
arch/microblaze/mm/init.c
arch/mips/alchemy/common/platform.c
arch/mips/alchemy/mtx-1/board_setup.c
arch/mips/bcm63xx/dev-enet.c
arch/mips/include/asm/atomic.h
arch/mips/include/asm/unistd.h
arch/mips/kernel/scall64-n32.S
arch/mips/kernel/vdso.c
arch/mips/mti-malta/malta-pci.c
arch/mips/nxp/pnx8550/common/pci.c
arch/mips/nxp/pnx8550/common/setup.c
arch/mips/pci/ops-pmcmsp.c
arch/mips/pci/pci-yosemite.c
arch/mips/powertv/asic/asic_devices.c
arch/powerpc/Kconfig
arch/powerpc/include/asm/abs_addr.h
arch/powerpc/include/asm/cpm.h
arch/powerpc/include/asm/cpm1.h
arch/powerpc/include/asm/kexec.h
arch/powerpc/include/asm/lmb.h [deleted file]
arch/powerpc/include/asm/memblock.h [new file with mode: 0644]
arch/powerpc/include/asm/mmu-hash64.h
arch/powerpc/kernel/btext.c
arch/powerpc/kernel/crash.c
arch/powerpc/kernel/crash_dump.c
arch/powerpc/kernel/dma-swiotlb.c
arch/powerpc/kernel/dma.c
arch/powerpc/kernel/fsl_booke_entry_mapping.S
arch/powerpc/kernel/machine_kexec.c
arch/powerpc/kernel/paca.c
arch/powerpc/kernel/perf_event_fsl_emb.c
arch/powerpc/kernel/prom.c
arch/powerpc/kernel/rtas.c
arch/powerpc/kernel/setup-common.c
arch/powerpc/kernel/setup_32.c
arch/powerpc/kernel/setup_64.c
arch/powerpc/kernel/vdso.c
arch/powerpc/mm/40x_mmu.c
arch/powerpc/mm/hash_low_64.S
arch/powerpc/mm/hash_utils_64.c
arch/powerpc/mm/hugetlbpage-hash64.c
arch/powerpc/mm/init_32.c
arch/powerpc/mm/init_64.c
arch/powerpc/mm/mem.c
arch/powerpc/mm/numa.c
arch/powerpc/mm/pgtable_32.c
arch/powerpc/mm/pgtable_64.c
arch/powerpc/mm/ppc_mmu_32.c
arch/powerpc/mm/stab.c
arch/powerpc/mm/tlb_nohash.c
arch/powerpc/platforms/85xx/corenet_ds.c
arch/powerpc/platforms/85xx/mpc8536_ds.c
arch/powerpc/platforms/85xx/mpc85xx_ds.c
arch/powerpc/platforms/85xx/mpc85xx_mds.c
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
arch/powerpc/platforms/cell/iommu.c
arch/powerpc/platforms/embedded6xx/wii.c
arch/powerpc/platforms/maple/setup.c
arch/powerpc/platforms/pasemi/iommu.c
arch/powerpc/platforms/powermac/setup.c
arch/powerpc/platforms/ps3/htab.c
arch/powerpc/platforms/ps3/mm.c
arch/powerpc/platforms/ps3/os-area.c
arch/powerpc/platforms/pseries/hotplug-memory.c
arch/powerpc/platforms/pseries/iommu.c
arch/powerpc/platforms/pseries/phyp_dump.c
arch/powerpc/sysdev/dart_iommu.c
arch/powerpc/sysdev/fsl_pci.c
arch/powerpc/sysdev/micropatch.c
arch/s390/kernel/entry.S
arch/s390/kernel/entry64.S
arch/s390/kernel/time.c
arch/sh/Kconfig
arch/sh/include/asm/lmb.h [deleted file]
arch/sh/include/asm/memblock.h [new file with mode: 0644]
arch/sh/kernel/machine_kexec.c
arch/sh/kernel/setup.c
arch/sh/mm/init.c
arch/sh/mm/numa.c
arch/sparc/Kconfig
arch/sparc/configs/sparc64_defconfig
arch/sparc/include/asm/cache.h
arch/sparc/include/asm/lmb.h [deleted file]
arch/sparc/include/asm/memblock.h [new file with mode: 0644]
arch/sparc/include/asm/pgtable_32.h
arch/sparc/kernel/mdesc.c
arch/sparc/kernel/perf_event.c
arch/sparc/kernel/prom_64.c
arch/sparc/kernel/sun4d_irq.c
arch/sparc/kernel/ttable.S
arch/sparc/mm/init_64.c
arch/sparc/mm/srmmu.c
arch/sparc/mm/sun4c.c
arch/x86/include/asm/x86_init.h
arch/x86/kernel/acpi/cstate.c
arch/x86/kernel/acpi/sleep.c
arch/x86/kernel/apic/apic.c
arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c
arch/x86/kernel/cpu/cpufreq/powernow-k8.c
arch/x86/kernel/early-quirks.c
arch/x86/kernel/entry_64.S
arch/x86/kernel/hpet.c
arch/x86/kernel/i8259.c
arch/x86/kernel/kgdb.c
arch/x86/kernel/kprobes.c
arch/x86/kernel/mrst.c
arch/x86/kernel/quirks.c
arch/x86/kernel/setup_percpu.c
arch/x86/kernel/x86_init.c
arch/x86/kvm/mmu.c
arch/x86/kvm/paging_tmpl.h
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c
arch/x86/pci/i386.c
arch/x86/pci/mrst.c
crypto/ablkcipher.c
drivers/acpi/acpica/evxfevnt.c
drivers/acpi/battery.c
drivers/acpi/blacklist.c
drivers/acpi/processor_core.c
drivers/acpi/processor_idle.c
drivers/acpi/sleep.c
drivers/base/core.c
drivers/char/agp/intel-gtt.c
drivers/char/sysrq.c
drivers/char/tpm/tpm_tis.c
drivers/clocksource/cs5535-clockevt.c
drivers/cpufreq/cpufreq.c
drivers/crypto/talitos.c
drivers/edac/Kconfig
drivers/edac/i7core_edac.c
drivers/edac/mpc85xx_edac.c
drivers/gpio/cs5535-gpio.c
drivers/gpio/gpiolib.c
drivers/gpu/drm/drm_edid.c
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_dp.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_fb.c
drivers/gpu/drm/i915/intel_lvds.c
drivers/gpu/drm/nouveau/nouveau_bios.c
drivers/gpu/drm/nouveau/nouveau_fbcon.c
drivers/gpu/drm/radeon/evergreen_cs.c
drivers/gpu/drm/radeon/r100.c
drivers/gpu/drm/radeon/r300.c
drivers/gpu/drm/radeon/r520.c
drivers/gpu/drm/radeon/r600.c
drivers/gpu/drm/radeon/r600_blit.c
drivers/gpu/drm/radeon/r600_cs.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_device.c
drivers/gpu/drm/radeon/radeon_kms.c
drivers/gpu/drm/radeon/radeon_legacy_encoders.c
drivers/gpu/drm/radeon/radeon_legacy_tv.c
drivers/gpu/drm/radeon/radeon_pm.c
drivers/gpu/drm/radeon/rs400.c
drivers/gpu/drm/radeon/rs600.c
drivers/gpu/drm/radeon/rs690.c
drivers/gpu/drm/radeon/rv515.c
drivers/gpu/drm/ttm/ttm_page_alloc.c
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
drivers/input/joystick/gamecon.c
drivers/input/keyboard/Kconfig
drivers/input/keyboard/twl4030_keypad.c
drivers/input/keyboard/w90p910_keypad.c
drivers/input/mouse/Kconfig
drivers/input/mouse/synaptics.c
drivers/input/mouse/synaptics.h
drivers/input/serio/Kconfig
drivers/input/serio/i8042-x86ia64io.h
drivers/input/touchscreen/w90p910_ts.c
drivers/misc/cs5535-mfgpt.c
drivers/mmc/host/mmci.c
drivers/mmc/host/sdhci-s3c.c
drivers/net/bnx2x.h
drivers/net/bnx2x_main.c
drivers/net/bonding/bond_alb.c
drivers/net/declance.c
drivers/net/ibmveth.c
drivers/net/igb/igb_main.c
drivers/net/ixgbe/ixgbe_main.c
drivers/net/macvlan.c
drivers/net/macvtap.c
drivers/net/pcmcia/axnet_cs.c
drivers/net/r8169.c
drivers/net/s2io.h
drivers/net/tun.c
drivers/net/wimax/i2400m/i2400m-usb.h
drivers/net/wimax/i2400m/usb.c
drivers/net/wireless/ath/ath9k/hif_usb.c
drivers/net/wireless/ath/ath9k/recv.c
drivers/net/wireless/hostap/hostap_pci.c
drivers/net/wireless/iwlwifi/iwl-sta.h
drivers/net/wireless/rt2x00/rt2x00dev.c
drivers/pci/setup-res.c
drivers/pcmcia/pcmcia_resource.c
drivers/pcmcia/pxa2xx_base.c
drivers/platform/x86/intel_scu_ipc.c
drivers/power/ds2782_battery.c
drivers/regulator/ab3100.c
drivers/regulator/tps6507x-regulator.c
drivers/regulator/wm8350-regulator.c
drivers/rtc/rtc-rx8581.c
drivers/s390/block/dasd_devmap.c
drivers/s390/cio/chsc.c
drivers/s390/scsi/zfcp_erp.c
drivers/s390/scsi/zfcp_fsf.c
drivers/s390/scsi/zfcp_qdio.c
drivers/sbus/char/openprom.c
drivers/scsi/ibmvscsi/rpa_vscsi.c
drivers/scsi/ipr.c
drivers/scsi/ipr.h
drivers/serial/atmel_serial.c
drivers/serial/suncore.c
drivers/serial/sunsu.c
drivers/spi/spi_mpc8xxx.c
drivers/usb/class/cdc-acm.c
drivers/usb/core/hub.c
drivers/usb/core/quirks.c
drivers/usb/gadget/f_fs.c
drivers/usb/gadget/pxa27x_udc.c
drivers/usb/gadget/s3c2410_udc.c
drivers/usb/host/ohci-pxa27x.c
drivers/usb/host/xhci-mem.c
drivers/usb/host/xhci-ring.c
drivers/usb/host/xhci.c
drivers/usb/host/xhci.h
drivers/usb/misc/sisusbvga/sisusb.c
drivers/usb/musb/tusb6010.c
drivers/usb/serial/ftdi_sio.c
drivers/usb/serial/ftdi_sio_ids.h
drivers/usb/serial/option.c
drivers/usb/serial/qcserial.c
drivers/usb/serial/sierra.c
drivers/usb/storage/transport.c
drivers/vhost/net.c
drivers/video/aty/radeon_pm.c
drivers/video/au1100fb.c
drivers/video/cyber2000fb.c
drivers/video/gbefb.c
drivers/video/pmag-ba-fb.c
drivers/video/pmagb-b-fb.c
drivers/virtio/virtio_ring.c
fs/9p/vfs_dir.c
fs/btrfs/ctree.c
fs/btrfs/ioctl.c
fs/ceph/Kconfig
fs/ceph/auth_x.c
fs/ceph/caps.c
fs/ceph/dir.c
fs/ceph/file.c
fs/ceph/inode.c
fs/ceph/mds_client.c
fs/ceph/mds_client.h
fs/ceph/messenger.c
fs/ceph/mon_client.c
fs/ceph/osd_client.c
fs/ceph/osdmap.c
fs/cifs/cifsfs.c
fs/cifs/dns_resolve.c
fs/cifs/dns_resolve.h
fs/dcache.c
fs/ecryptfs/messaging.c
fs/gfs2/bmap.c
fs/gfs2/dir.c
fs/gfs2/glock.c
fs/gfs2/inode.c
fs/gfs2/quota.c
fs/gfs2/quota.h
fs/inode.c
fs/jbd2/journal.c
fs/jbd2/transaction.c
fs/jffs2/xattr.c
fs/mbcache.c
fs/nfs/dir.c
fs/nfs/file.c
fs/nfs/internal.h
fs/nfs/nfsroot.c
fs/nfs/write.c
fs/ocfs2/aops.c
fs/ocfs2/dlm/dlmdomain.c
fs/ocfs2/dlm/dlmmaster.c
fs/ocfs2/dlm/dlmrecovery.c
fs/ocfs2/file.c
fs/ocfs2/file.h
fs/ocfs2/journal.c
fs/ocfs2/localalloc.c
fs/ocfs2/quota_global.c
fs/ocfs2/quota_local.c
fs/ocfs2/refcounttree.c
fs/ocfs2/suballoc.c
fs/ocfs2/xattr.c
fs/partitions/ibm.c
fs/proc/array.c
fs/quota/dquot.c
fs/sysfs/symlink.c
fs/ubifs/shrinker.c
fs/ubifs/ubifs.h
fs/xfs/linux-2.6/xfs_buf.c
fs/xfs/linux-2.6/xfs_super.c
fs/xfs/linux-2.6/xfs_sync.c
fs/xfs/linux-2.6/xfs_sync.h
fs/xfs/linux-2.6/xfs_trace.h
fs/xfs/quota/xfs_qm.c
fs/xfs/xfs_mount.h
include/acpi/processor.h
include/asm-generic/vmlinux.lds.h
include/linux/acpi.h
include/linux/cred.h
include/linux/fb.h
include/linux/fdtable.h
include/linux/i8042.h
include/linux/if_macvlan.h
include/linux/jbd2.h
include/linux/lmb.h [deleted file]
include/linux/memblock.h [new file with mode: 0644]
include/linux/mm.h
include/linux/nfs_fs.h
include/linux/page-flags.h
include/linux/pci.h
include/linux/regulator/tps6507x.h [new file with mode: 0644]
include/linux/sched.h
include/linux/slab.h
include/linux/syscalls.h
include/linux/sysrq.h
include/linux/vgaarb.h
include/math-emu/op-common.h
include/net/sock.h
include/net/tc_act/tc_mirred.h
ipc/sem.c
kernel/cred.c
kernel/debug/debug_core.c
kernel/debug/gdbstub.c
kernel/debug/kdb/kdb_main.c
kernel/early_res.c
kernel/module.c
lib/Kconfig
lib/Makefile
lib/lmb.c [deleted file]
mm/Kconfig
mm/Makefile
mm/bootmem.c
mm/memblock.c [new file with mode: 0644]
mm/memory.c
mm/page_alloc.c
mm/page_cgroup.c
mm/slab.c
mm/slub.c
mm/vmscan.c
net/bluetooth/hci_conn.c
net/bluetooth/hci_event.c
net/bluetooth/l2cap.c
net/bridge/br_device.c
net/bridge/br_forward.c
net/core/dev.c
net/core/neighbour.c
net/core/skbuff.c
net/dsa/Kconfig
net/ipv4/ipmr.c
net/ipv4/tcp.c
net/ipv4/tcp_output.c
net/ipv6/addrconf.c
net/ipv6/mip6.c
net/mac80211/cfg.c
net/phonet/pep.c
net/sched/act_mirred.c
net/sched/act_nat.c
net/sunrpc/auth.c
net/xfrm/xfrm_policy.c
scripts/kconfig/nconf.gui.c
scripts/package/Makefile
scripts/setlocalversion
sound/pci/hda/patch_hdmi.c
sound/pci/hda/patch_nvhdmi.c
sound/pci/hda/patch_realtek.c
sound/soc/au1x/psc-i2s.c
sound/soc/codecs/Kconfig
sound/soc/codecs/wm8727.c
sound/soc/codecs/wm8776.c
sound/soc/codecs/wm8988.c
sound/soc/sh/fsi.c
tools/perf/Makefile
tools/perf/arch/sparc/Makefile [new file with mode: 0644]
tools/perf/arch/sparc/util/dwarf-regs.c [new file with mode: 0644]
tools/perf/builtin-report.c
tools/perf/util/PERF-VERSION-GEN
tools/perf/util/callchain.c
tools/perf/util/callchain.h
tools/perf/util/hist.c
tools/perf/util/symbol.c

index dd10b51b4e652570df9a6575ac2df654bbaca15d..5405f7aecefc334b7d16c0f2764a8757e845ad43 100644 (file)
@@ -32,8 +32,6 @@ DocBook/
        - directory with DocBook templates etc. for kernel documentation.
 HOWTO
        - the process and procedures of how to do Linux kernel development.
-IO-mapping.txt
-       - how to access I/O mapped memory from within device drivers.
 IPMI.txt
        - info on Linux Intelligent Platform Management Interface (IPMI) Driver.
 IRQ-affinity.txt
@@ -84,6 +82,8 @@ blockdev/
        - info on block devices & drivers
 btmrvl.txt
        - info on Marvell Bluetooth driver usage.
+bus-virt-phys-mapping.txt
+       - how to access I/O mapped memory from within device drivers.
 cachetlb.txt
        - describes the cache/TLB flushing interfaces Linux uses.
 cdrom/
@@ -168,6 +168,8 @@ initrd.txt
        - how to use the RAM disk as an initial/temporary root filesystem.
 input/
        - info on Linux input device support.
+io-mapping.txt
+       - description of io_mapping functions in linux/io-mapping.h
 io_ordering.txt
        - info on ordering I/O writes to memory-mapped addresses.
 ioctl/
index a2db352870036ba062aa177ce450d0d491f7d8c8..995baf379c076770962a84268fde19b527caa0be 100644 (file)
@@ -417,6 +417,9 @@ reference on them using:
 This does all the RCU magic inside of it.  The caller must call put_cred() on
 the credentials so obtained when they're finished with.
 
+ [*] Note: The result of __task_cred() should not be passed directly to
+     get_cred() as this may race with commit_cred().
+
 There are a couple of convenience functions to access bits of another task's
 credentials, hiding the RCU magic from the caller:
 
index c268783bc4e7c18c2e4db792c3fba83d6bc44c71..1571c0c83dba0b0876ea52e4ff85ff69a56dab87 100644 (file)
@@ -647,3 +647,10 @@ Who:       Stefan Richter <stefanr@s5r6.in-berlin.de>
 
 ----------------------------
 
+What:  The acpi_sleep=s4_nonvs command line option
+When:  2.6.37
+Files: arch/x86/kernel/acpi/sleep.c
+Why:   superseded by acpi_sleep=nonvs
+Who:   Rafael J. Wysocki <rjw@sisk.pl>
+
+----------------------------
index 82d6aeb5228ff62d71a64e04519c24f35a6116e0..2b2407d9a6d025a8451605b104a35daa7da59b47 100644 (file)
@@ -254,8 +254,8 @@ and is between 256 and 4096 characters. It is defined in the file
                        control method, with respect to putting devices into
                        low power states, to be enforced (the ACPI 2.0 ordering
                        of _PTS is used by default).
-                       s4_nonvs prevents the kernel from saving/restoring the
-                       ACPI NVS memory during hibernation.
+                       nonvs prevents the kernel from saving/restoring the
+                       ACPI NVS memory during suspend/hibernation and resume.
                        sci_force_enable causes the kernel to set SCI_EN directly
                        on resume from S1/S3 (which is against the ACPI spec,
                        but some broken systems don't work without it).
@@ -1265,7 +1265,7 @@ and is between 256 and 4096 characters. It is defined in the file
                        If there are multiple matching configurations changing
                        the same attribute, the last one is used.
 
-       lmb=debug       [KNL] Enable lmb debug messages.
+       memblock=debug  [KNL] Enable memblock debug messages.
 
        load_ramdisk=   [RAM] List of ramdisks to load from floppy
                        See Documentation/blockdev/ramdisk.txt.
index 58848125b8bfadcc70f9b37ac68d77d6aee0794b..02f75fccac20915ae4c7aad6b333ed0061f90e44 100644 (file)
@@ -5336,6 +5336,7 @@ T:        git git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6.git
 T:     git git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6.git
 S:     Maintained
 F:     arch/sparc/
+F:     drivers/sbus
 
 SPARC SERIAL DRIVERS
 M:     "David S. Miller" <davem@davemloft.net>
@@ -6242,6 +6243,8 @@ F:        drivers/mmc/host/wbsd.*
 
 WATCHDOG DEVICE DRIVERS
 M:     Wim Van Sebroeck <wim@iguana.be>
+L:     linux-watchdog@vger.kernel.org
+W:     http://www.linux-watchdog.org/
 T:     git git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git
 S:     Maintained
 F:     Documentation/watchdog/
index 037ff4e62ca0ac605c2d63cdaa1cda79220f3cb4..141da26fda4b87870ba19237f61ced915d0cebcb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 35
-EXTRAVERSION = -rc5
+EXTRAVERSION =
 NAME = Sheep on Meth
 
 # *DOCUMENTATION*
index 53faa9063a035be790c3aef7c5f32c4f48eb8025..864a002137fed0bbc42efe7b4f2dc787a06ba48a 100644 (file)
@@ -71,6 +71,9 @@ targets       := vmlinux vmlinux.lds \
                 piggy.$(suffix_y) piggy.$(suffix_y).o \
                 font.o font.c head.o misc.o $(OBJS)
 
+# Make sure files are removed during clean
+extra-y       += piggy.gzip piggy.lzo piggy.lzma lib1funcs.S
+
 ifeq ($(CONFIG_FUNCTION_TRACER),y)
 ORIG_CFLAGS := $(KBUILD_CFLAGS)
 KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
index 6f80665f477e70b0acad4d6ead228295446863c3..9eaf65f43642e6886b3ab4bae43e7821aad285b6 100644 (file)
@@ -1028,13 +1028,12 @@ static int sa1111_remove(struct platform_device *pdev)
        struct sa1111 *sachip = platform_get_drvdata(pdev);
 
        if (sachip) {
-               __sa1111_remove(sachip);
-               platform_set_drvdata(pdev, NULL);
-
 #ifdef CONFIG_PM
                kfree(sachip->saved_state);
                sachip->saved_state = NULL;
 #endif
+               __sa1111_remove(sachip);
+               platform_set_drvdata(pdev, NULL);
        }
 
        return 0;
index a0162fa9456496662adb28898fcb44776e628414..7e79503ab89b5d395e634fda206e1e97d6262d04 100644 (file)
@@ -40,12 +40,12 @@ static inline void atomic_add(int i, atomic_t *v)
        int result;
 
        __asm__ __volatile__("@ atomic_add\n"
-"1:    ldrex   %0, [%2]\n"
-"      add     %0, %0, %3\n"
-"      strex   %1, %0, [%2]\n"
+"1:    ldrex   %0, [%3]\n"
+"      add     %0, %0, %4\n"
+"      strex   %1, %0, [%3]\n"
 "      teq     %1, #0\n"
 "      bne     1b"
-       : "=&r" (result), "=&r" (tmp)
+       : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
        : "r" (&v->counter), "Ir" (i)
        : "cc");
 }
@@ -58,12 +58,12 @@ static inline int atomic_add_return(int i, atomic_t *v)
        smp_mb();
 
        __asm__ __volatile__("@ atomic_add_return\n"
-"1:    ldrex   %0, [%2]\n"
-"      add     %0, %0, %3\n"
-"      strex   %1, %0, [%2]\n"
+"1:    ldrex   %0, [%3]\n"
+"      add     %0, %0, %4\n"
+"      strex   %1, %0, [%3]\n"
 "      teq     %1, #0\n"
 "      bne     1b"
-       : "=&r" (result), "=&r" (tmp)
+       : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
        : "r" (&v->counter), "Ir" (i)
        : "cc");
 
@@ -78,12 +78,12 @@ static inline void atomic_sub(int i, atomic_t *v)
        int result;
 
        __asm__ __volatile__("@ atomic_sub\n"
-"1:    ldrex   %0, [%2]\n"
-"      sub     %0, %0, %3\n"
-"      strex   %1, %0, [%2]\n"
+"1:    ldrex   %0, [%3]\n"
+"      sub     %0, %0, %4\n"
+"      strex   %1, %0, [%3]\n"
 "      teq     %1, #0\n"
 "      bne     1b"
-       : "=&r" (result), "=&r" (tmp)
+       : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
        : "r" (&v->counter), "Ir" (i)
        : "cc");
 }
@@ -96,12 +96,12 @@ static inline int atomic_sub_return(int i, atomic_t *v)
        smp_mb();
 
        __asm__ __volatile__("@ atomic_sub_return\n"
-"1:    ldrex   %0, [%2]\n"
-"      sub     %0, %0, %3\n"
-"      strex   %1, %0, [%2]\n"
+"1:    ldrex   %0, [%3]\n"
+"      sub     %0, %0, %4\n"
+"      strex   %1, %0, [%3]\n"
 "      teq     %1, #0\n"
 "      bne     1b"
-       : "=&r" (result), "=&r" (tmp)
+       : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
        : "r" (&v->counter), "Ir" (i)
        : "cc");
 
@@ -118,11 +118,11 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
 
        do {
                __asm__ __volatile__("@ atomic_cmpxchg\n"
-               "ldrex  %1, [%2]\n"
+               "ldrex  %1, [%3]\n"
                "mov    %0, #0\n"
-               "teq    %1, %3\n"
-               "strexeq %0, %4, [%2]\n"
-                   : "=&r" (res), "=&r" (oldval)
+               "teq    %1, %4\n"
+               "strexeq %0, %5, [%3]\n"
+                   : "=&r" (res), "=&r" (oldval), "+Qo" (ptr->counter)
                    : "r" (&ptr->counter), "Ir" (old), "r" (new)
                    : "cc");
        } while (res);
@@ -137,12 +137,12 @@ static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
        unsigned long tmp, tmp2;
 
        __asm__ __volatile__("@ atomic_clear_mask\n"
-"1:    ldrex   %0, [%2]\n"
-"      bic     %0, %0, %3\n"
-"      strex   %1, %0, [%2]\n"
+"1:    ldrex   %0, [%3]\n"
+"      bic     %0, %0, %4\n"
+"      strex   %1, %0, [%3]\n"
 "      teq     %1, #0\n"
 "      bne     1b"
-       : "=&r" (tmp), "=&r" (tmp2)
+       : "=&r" (tmp), "=&r" (tmp2), "+Qo" (*addr)
        : "r" (addr), "Ir" (mask)
        : "cc");
 }
@@ -249,7 +249,7 @@ static inline u64 atomic64_read(atomic64_t *v)
        __asm__ __volatile__("@ atomic64_read\n"
 "      ldrexd  %0, %H0, [%1]"
        : "=&r" (result)
-       : "r" (&v->counter)
+       : "r" (&v->counter), "Qo" (v->counter)
        );
 
        return result;
@@ -260,11 +260,11 @@ static inline void atomic64_set(atomic64_t *v, u64 i)
        u64 tmp;
 
        __asm__ __volatile__("@ atomic64_set\n"
-"1:    ldrexd  %0, %H0, [%1]\n"
-"      strexd  %0, %2, %H2, [%1]\n"
+"1:    ldrexd  %0, %H0, [%2]\n"
+"      strexd  %0, %3, %H3, [%2]\n"
 "      teq     %0, #0\n"
 "      bne     1b"
-       : "=&r" (tmp)
+       : "=&r" (tmp), "=Qo" (v->counter)
        : "r" (&v->counter), "r" (i)
        : "cc");
 }
@@ -275,13 +275,13 @@ static inline void atomic64_add(u64 i, atomic64_t *v)
        unsigned long tmp;
 
        __asm__ __volatile__("@ atomic64_add\n"
-"1:    ldrexd  %0, %H0, [%2]\n"
-"      adds    %0, %0, %3\n"
-"      adc     %H0, %H0, %H3\n"
-"      strexd  %1, %0, %H0, [%2]\n"
+"1:    ldrexd  %0, %H0, [%3]\n"
+"      adds    %0, %0, %4\n"
+"      adc     %H0, %H0, %H4\n"
+"      strexd  %1, %0, %H0, [%3]\n"
 "      teq     %1, #0\n"
 "      bne     1b"
-       : "=&r" (result), "=&r" (tmp)
+       : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
        : "r" (&v->counter), "r" (i)
        : "cc");
 }
@@ -294,13 +294,13 @@ static inline u64 atomic64_add_return(u64 i, atomic64_t *v)
        smp_mb();
 
        __asm__ __volatile__("@ atomic64_add_return\n"
-"1:    ldrexd  %0, %H0, [%2]\n"
-"      adds    %0, %0, %3\n"
-"      adc     %H0, %H0, %H3\n"
-"      strexd  %1, %0, %H0, [%2]\n"
+"1:    ldrexd  %0, %H0, [%3]\n"
+"      adds    %0, %0, %4\n"
+"      adc     %H0, %H0, %H4\n"
+"      strexd  %1, %0, %H0, [%3]\n"
 "      teq     %1, #0\n"
 "      bne     1b"
-       : "=&r" (result), "=&r" (tmp)
+       : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
        : "r" (&v->counter), "r" (i)
        : "cc");
 
@@ -315,13 +315,13 @@ static inline void atomic64_sub(u64 i, atomic64_t *v)
        unsigned long tmp;
 
        __asm__ __volatile__("@ atomic64_sub\n"
-"1:    ldrexd  %0, %H0, [%2]\n"
-"      subs    %0, %0, %3\n"
-"      sbc     %H0, %H0, %H3\n"
-"      strexd  %1, %0, %H0, [%2]\n"
+"1:    ldrexd  %0, %H0, [%3]\n"
+"      subs    %0, %0, %4\n"
+"      sbc     %H0, %H0, %H4\n"
+"      strexd  %1, %0, %H0, [%3]\n"
 "      teq     %1, #0\n"
 "      bne     1b"
-       : "=&r" (result), "=&r" (tmp)
+       : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
        : "r" (&v->counter), "r" (i)
        : "cc");
 }
@@ -334,13 +334,13 @@ static inline u64 atomic64_sub_return(u64 i, atomic64_t *v)
        smp_mb();
 
        __asm__ __volatile__("@ atomic64_sub_return\n"
-"1:    ldrexd  %0, %H0, [%2]\n"
-"      subs    %0, %0, %3\n"
-"      sbc     %H0, %H0, %H3\n"
-"      strexd  %1, %0, %H0, [%2]\n"
+"1:    ldrexd  %0, %H0, [%3]\n"
+"      subs    %0, %0, %4\n"
+"      sbc     %H0, %H0, %H4\n"
+"      strexd  %1, %0, %H0, [%3]\n"
 "      teq     %1, #0\n"
 "      bne     1b"
-       : "=&r" (result), "=&r" (tmp)
+       : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
        : "r" (&v->counter), "r" (i)
        : "cc");
 
@@ -358,12 +358,12 @@ static inline u64 atomic64_cmpxchg(atomic64_t *ptr, u64 old, u64 new)
 
        do {
                __asm__ __volatile__("@ atomic64_cmpxchg\n"
-               "ldrexd         %1, %H1, [%2]\n"
+               "ldrexd         %1, %H1, [%3]\n"
                "mov            %0, #0\n"
-               "teq            %1, %3\n"
-               "teqeq          %H1, %H3\n"
-               "strexdeq       %0, %4, %H4, [%2]"
-               : "=&r" (res), "=&r" (oldval)
+               "teq            %1, %4\n"
+               "teqeq          %H1, %H4\n"
+               "strexdeq       %0, %5, %H5, [%3]"
+               : "=&r" (res), "=&r" (oldval), "+Qo" (ptr->counter)
                : "r" (&ptr->counter), "r" (old), "r" (new)
                : "cc");
        } while (res);
@@ -381,11 +381,11 @@ static inline u64 atomic64_xchg(atomic64_t *ptr, u64 new)
        smp_mb();
 
        __asm__ __volatile__("@ atomic64_xchg\n"
-"1:    ldrexd  %0, %H0, [%2]\n"
-"      strexd  %1, %3, %H3, [%2]\n"
+"1:    ldrexd  %0, %H0, [%3]\n"
+"      strexd  %1, %4, %H4, [%3]\n"
 "      teq     %1, #0\n"
 "      bne     1b"
-       : "=&r" (result), "=&r" (tmp)
+       : "=&r" (result), "=&r" (tmp), "+Qo" (ptr->counter)
        : "r" (&ptr->counter), "r" (new)
        : "cc");
 
@@ -402,16 +402,16 @@ static inline u64 atomic64_dec_if_positive(atomic64_t *v)
        smp_mb();
 
        __asm__ __volatile__("@ atomic64_dec_if_positive\n"
-"1:    ldrexd  %0, %H0, [%2]\n"
+"1:    ldrexd  %0, %H0, [%3]\n"
 "      subs    %0, %0, #1\n"
 "      sbc     %H0, %H0, #0\n"
 "      teq     %H0, #0\n"
 "      bmi     2f\n"
-"      strexd  %1, %0, %H0, [%2]\n"
+"      strexd  %1, %0, %H0, [%3]\n"
 "      teq     %1, #0\n"
 "      bne     1b\n"
 "2:"
-       : "=&r" (result), "=&r" (tmp)
+       : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
        : "r" (&v->counter)
        : "cc");
 
@@ -429,18 +429,18 @@ static inline int atomic64_add_unless(atomic64_t *v, u64 a, u64 u)
        smp_mb();
 
        __asm__ __volatile__("@ atomic64_add_unless\n"
-"1:    ldrexd  %0, %H0, [%3]\n"
-"      teq     %0, %4\n"
-"      teqeq   %H0, %H4\n"
+"1:    ldrexd  %0, %H0, [%4]\n"
+"      teq     %0, %5\n"
+"      teqeq   %H0, %H5\n"
 "      moveq   %1, #0\n"
 "      beq     2f\n"
-"      adds    %0, %0, %5\n"
-"      adc     %H0, %H0, %H5\n"
-"      strexd  %2, %0, %H0, [%3]\n"
+"      adds    %0, %0, %6\n"
+"      adc     %H0, %H0, %H6\n"
+"      strexd  %2, %0, %H0, [%4]\n"
 "      teq     %2, #0\n"
 "      bne     1b\n"
 "2:"
-       : "=&r" (val), "=&r" (ret), "=&r" (tmp)
+       : "=&r" (val), "+r" (ret), "=&r" (tmp), "+Qo" (v->counter)
        : "r" (&v->counter), "r" (u), "r" (a)
        : "cc");
 
index c980156f32638f8f031b93e730d0c2e8396aec40..1261b1f928d95a9ac1cf374148208415c4dc248d 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/types.h>
 #include <asm/byteorder.h>
 #include <asm/memory.h>
+#include <asm/system.h>
 
 /*
  * ISA I/O bus memory addresses are 1:1 with the physical address.
@@ -179,25 +180,38 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
  * IO port primitives for more information.
  */
 #ifdef __mem_pci
-#define readb(c) ({ __u8  __v = __raw_readb(__mem_pci(c)); __v; })
-#define readw(c) ({ __u16 __v = le16_to_cpu((__force __le16) \
+#define readb_relaxed(c) ({ u8  __v = __raw_readb(__mem_pci(c)); __v; })
+#define readw_relaxed(c) ({ u16 __v = le16_to_cpu((__force __le16) \
                                        __raw_readw(__mem_pci(c))); __v; })
-#define readl(c) ({ __u32 __v = le32_to_cpu((__force __le32) \
+#define readl_relaxed(c) ({ u32 __v = le32_to_cpu((__force __le32) \
                                        __raw_readl(__mem_pci(c))); __v; })
-#define readb_relaxed(addr) readb(addr)
-#define readw_relaxed(addr) readw(addr)
-#define readl_relaxed(addr) readl(addr)
+
+#define writeb_relaxed(v,c)    ((void)__raw_writeb(v,__mem_pci(c)))
+#define writew_relaxed(v,c)    ((void)__raw_writew((__force u16) \
+                                       cpu_to_le16(v),__mem_pci(c)))
+#define writel_relaxed(v,c)    ((void)__raw_writel((__force u32) \
+                                       cpu_to_le32(v),__mem_pci(c)))
+
+#ifdef CONFIG_ARM_DMA_MEM_BUFFERABLE
+#define __iormb()              rmb()
+#define __iowmb()              wmb()
+#else
+#define __iormb()              do { } while (0)
+#define __iowmb()              do { } while (0)
+#endif
+
+#define readb(c)               ({ u8  __v = readb_relaxed(c); __iormb(); __v; })
+#define readw(c)               ({ u16 __v = readw_relaxed(c); __iormb(); __v; })
+#define readl(c)               ({ u32 __v = readl_relaxed(c); __iormb(); __v; })
+
+#define writeb(v,c)            ({ __iowmb(); writeb_relaxed(v,c); })
+#define writew(v,c)            ({ __iowmb(); writew_relaxed(v,c); })
+#define writel(v,c)            ({ __iowmb(); writel_relaxed(v,c); })
 
 #define readsb(p,d,l)          __raw_readsb(__mem_pci(p),d,l)
 #define readsw(p,d,l)          __raw_readsw(__mem_pci(p),d,l)
 #define readsl(p,d,l)          __raw_readsl(__mem_pci(p),d,l)
 
-#define writeb(v,c)            __raw_writeb(v,__mem_pci(c))
-#define writew(v,c)            __raw_writew((__force __u16) \
-                                       cpu_to_le16(v),__mem_pci(c))
-#define writel(v,c)            __raw_writel((__force __u32) \
-                                       cpu_to_le32(v),__mem_pci(c))
-
 #define writesb(p,d,l)         __raw_writesb(__mem_pci(p),d,l)
 #define writesw(p,d,l)         __raw_writesw(__mem_pci(p),d,l)
 #define writesl(p,d,l)         __raw_writesl(__mem_pci(p),d,l)
@@ -244,13 +258,13 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
  * io{read,write}{8,16,32} macros
  */
 #ifndef ioread8
-#define ioread8(p)     ({ unsigned int __v = __raw_readb(p); __v; })
-#define ioread16(p)    ({ unsigned int __v = le16_to_cpu((__force __le16)__raw_readw(p)); __v; })
-#define ioread32(p)    ({ unsigned int __v = le32_to_cpu((__force __le32)__raw_readl(p)); __v; })
+#define ioread8(p)     ({ unsigned int __v = __raw_readb(p); __iormb(); __v; })
+#define ioread16(p)    ({ unsigned int __v = le16_to_cpu((__force __le16)__raw_readw(p)); __iormb(); __v; })
+#define ioread32(p)    ({ unsigned int __v = le32_to_cpu((__force __le32)__raw_readl(p)); __iormb(); __v; })
 
-#define iowrite8(v,p)  __raw_writeb(v, p)
-#define iowrite16(v,p) __raw_writew((__force __u16)cpu_to_le16(v), p)
-#define iowrite32(v,p) __raw_writel((__force __u32)cpu_to_le32(v), p)
+#define iowrite8(v,p)  ({ __iowmb(); (void)__raw_writeb(v, p); })
+#define iowrite16(v,p) ({ __iowmb(); (void)__raw_writew((__force __u16)cpu_to_le16(v), p); })
+#define iowrite32(v,p) ({ __iowmb(); (void)__raw_writel((__force __u32)cpu_to_le32(v), p); })
 
 #define ioread8_rep(p,d,c)     __raw_readsb(p,d,c)
 #define ioread16_rep(p,d,c)    __raw_readsw(p,d,c)
index 7ee48e7f8f318a7b453e12849b60a6832bb85770..3fd7861de4d16c508ee424e52281de0dc39a4db7 100644 (file)
@@ -162,8 +162,6 @@ ENDPROC(__und_invalid)
        @  r4 - orig_r0 (see pt_regs definition in ptrace.h)
        @
        stmia   r5, {r0 - r4}
-
-       asm_trace_hardirqs_off
        .endm
 
        .align  5
@@ -204,7 +202,7 @@ __dabt_svc:
        @
        @ IRQs off again before pulling preserved data off the stack
        @
-       disable_irq
+       disable_irq_notrace
 
        @
        @ restore SPSR and restart the instruction
@@ -218,6 +216,9 @@ ENDPROC(__dabt_svc)
 __irq_svc:
        svc_entry
 
+#ifdef CONFIG_TRACE_IRQFLAGS
+       bl      trace_hardirqs_off
+#endif
 #ifdef CONFIG_PREEMPT
        get_thread_info tsk
        ldr     r8, [tsk, #TI_PREEMPT]          @ get preempt count
@@ -291,7 +292,7 @@ __und_svc:
        @
        @ IRQs off again before pulling preserved data off the stack
        @
-1:     disable_irq
+1:     disable_irq_notrace
 
        @
        @ restore SPSR and restart the instruction
@@ -327,7 +328,7 @@ __pabt_svc:
        @
        @ IRQs off again before pulling preserved data off the stack
        @
-       disable_irq
+       disable_irq_notrace
 
        @
        @ restore SPSR and restart the instruction
@@ -393,8 +394,6 @@ ENDPROC(__pabt_svc)
        @ Clear FP to mark the first stack frame
        @
        zero_fp
-
-       asm_trace_hardirqs_off
        .endm
 
        .macro  kuser_cmpxchg_check
@@ -465,9 +464,6 @@ __irq_usr:
  THUMB(        movne   r0, #0          )
  THUMB(        strne   r0, [r0]        )
 #endif
-#ifdef CONFIG_TRACE_IRQFLAGS
-       bl      trace_hardirqs_on
-#endif
 
        mov     why, #0
        b       ret_to_user
index da1f94906a4e2a35881bde99510760180bdba9e2..8bccbfa693ffc359dc55d6004837d2a149e2c5cd 100644 (file)
@@ -583,13 +583,14 @@ static void __kprobes emulate_ldr(struct kprobe *p, struct pt_regs *regs)
 {
        insn_llret_3arg_fn_t *i_fn = (insn_llret_3arg_fn_t *)&p->ainsn.insn[0];
        kprobe_opcode_t insn = p->opcode;
+       long ppc = (long)p->addr + 8;
        union reg_pair fnr;
        int rd = (insn >> 12) & 0xf;
        int rn = (insn >> 16) & 0xf;
        int rm = insn & 0xf;
        long rdv;
-       long rnv  = regs->uregs[rn];
-       long rmv  = regs->uregs[rm]; /* rm/rmv may be invalid, don't care. */
+       long rnv = (rn == 15) ? ppc : regs->uregs[rn];
+       long rmv = (rm == 15) ? ppc : regs->uregs[rm];
        long cpsr = regs->ARM_cpsr;
 
        fnr.dr = insnslot_llret_3arg_rflags(rnv, 0, rmv, cpsr, i_fn);
index acf5e6fdb6dcbe991d7bed5d63c7a77f38c16e34..a4a9cc88bec73a525a9edd4bdc7db94cea370ce9 100644 (file)
@@ -351,17 +351,21 @@ EXPORT_SYMBOL(dump_fpu);
 
 /*
  * Shuffle the argument into the correct register before calling the
- * thread function.  r1 is the thread argument, r2 is the pointer to
- * the thread function, and r3 points to the exit function.
+ * thread function.  r4 is the thread argument, r5 is the pointer to
+ * the thread function, and r6 points to the exit function.
  */
 extern void kernel_thread_helper(void);
 asm(   ".pushsection .text\n"
 "      .align\n"
 "      .type   kernel_thread_helper, #function\n"
 "kernel_thread_helper:\n"
-"      mov     r0, r1\n"
-"      mov     lr, r3\n"
-"      mov     pc, r2\n"
+#ifdef CONFIG_TRACE_IRQFLAGS
+"      bl      trace_hardirqs_on\n"
+#endif
+"      msr     cpsr_c, r7\n"
+"      mov     r0, r4\n"
+"      mov     lr, r6\n"
+"      mov     pc, r5\n"
 "      .size   kernel_thread_helper, . - kernel_thread_helper\n"
 "      .popsection");
 
@@ -391,11 +395,12 @@ pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
 
        memset(&regs, 0, sizeof(regs));
 
-       regs.ARM_r1 = (unsigned long)arg;
-       regs.ARM_r2 = (unsigned long)fn;
-       regs.ARM_r3 = (unsigned long)kernel_thread_exit;
+       regs.ARM_r4 = (unsigned long)arg;
+       regs.ARM_r5 = (unsigned long)fn;
+       regs.ARM_r6 = (unsigned long)kernel_thread_exit;
+       regs.ARM_r7 = SVC_MODE | PSR_ENDSTATE | PSR_ISETSTATE;
        regs.ARM_pc = (unsigned long)kernel_thread_helper;
-       regs.ARM_cpsr = SVC_MODE | PSR_ENDSTATE | PSR_ISETSTATE;
+       regs.ARM_cpsr = regs.ARM_r7 | PSR_I_BIT;
 
        return do_fork(flags|CLONE_VM|CLONE_UNTRACED, 0, &regs, 0, NULL, NULL);
 }
index 59ff6fdc1e634835575846693fb0828a05c66a55..7d08b43d2c0e496fc704378301b82d3b34d93f3a 100644 (file)
@@ -71,7 +71,7 @@
                .pushsection .fixup,"ax"
                .align  4
 9001:          mov     r4, #-EFAULT
-               ldr     r5, [fp, #4]            @ *err_ptr
+               ldr     r5, [sp, #8*4]          @ *err_ptr
                str     r4, [r5]
                ldmia   sp, {r1, r2}            @ retrieve dst, len
                add     r2, r2, r1
index fedd8076a689a3555a986b5e96bc9348cf4ae77f..072cc6b61ba30b7b6e363040b40d409e8a43e38f 100644 (file)
@@ -11,6 +11,7 @@
  *
 */
 
+#include <mach/hardware.h>
 #include <asm/hardware/clps7111.h>
 
                .macro  addruart, rx, tmp
index 2ec3095ffb7b564e61a54bcc4e366f32b87e671c..b280efb1fa120806b1cfe85bdea1f90d1bc0caaf 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
 #include <linux/regulator/machine.h>
+#include <linux/regulator/tps6507x.h>
 #include <linux/mfd/tps6507x.h>
 #include <linux/input/tps6507x-ts.h>
 
@@ -469,6 +470,11 @@ struct regulator_consumer_supply tps65070_ldo2_consumers[] = {
        },
 };
 
+/* We take advantage of the fact that both defdcdc{2,3} are tied high */
+static struct tps6507x_reg_platform_data tps6507x_platform_data = {
+       .defdcdc_default = true,
+};
+
 struct regulator_init_data tps65070_regulator_data[] = {
        /* dcdc1 */
        {
@@ -494,6 +500,7 @@ struct regulator_init_data tps65070_regulator_data[] = {
                },
                .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc2_consumers),
                .consumer_supplies = tps65070_dcdc2_consumers,
+               .driver_data = &tps6507x_platform_data,
        },
 
        /* dcdc3 */
@@ -507,6 +514,7 @@ struct regulator_init_data tps65070_regulator_data[] = {
                },
                .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc3_consumers),
                .consumer_supplies = tps65070_dcdc3_consumers,
+               .driver_data = &tps6507x_platform_data,
        },
 
        /* ldo1 */
index e3bc3f6f6b105d42c8d4f73d33b4d5f92fc15a81..88b3dd89be89a20b65761de100c7799798ccb1df 100644 (file)
@@ -232,7 +232,7 @@ EXPORT_SYMBOL(__bus_to_virt);
 
 unsigned long __pfn_to_bus(unsigned long pfn)
 {
-       return __pfn_to_phys(pfn) + (fb_bus_sdram_offset() - PHYS_OFFSET));
+       return __pfn_to_phys(pfn) + (fb_bus_sdram_offset() - PHYS_OFFSET);
 }
 EXPORT_SYMBOL(__pfn_to_bus);
 
index a9ee8f0d48b7f6792ea5004844649c3acb3a5bd0..27cafd12f033cbba19bd507e5a90ac198c1db8e1 100644 (file)
  *
 */
 
-               .equ    io_virt, IO_BASE
-               .equ    io_phys, IO_START
+#include <mach/hardware.h>
+
+               .equ    io_virt, IO_VIRT
+               .equ    io_phys, IO_PHYS
 
                .macro  addruart, rx, tmp
                mrc     p15, 0, \rx, c1, c0
index 7221c20b2afa241b5854c90b90f24352b73572c8..f781164e623fc89e7a4362b3d039f9e58688fd0d 100644 (file)
@@ -77,7 +77,7 @@ struct spi_board_info __initdata qnap_tsx1x_spi_slave_info[] = {
        },
 };
 
-void qnap_tsx1x_register_flash(void)
+void __init qnap_tsx1x_register_flash(void)
 {
        spi_register_board_info(qnap_tsx1x_spi_slave_info,
                                ARRAY_SIZE(qnap_tsx1x_spi_slave_info));
index 9a592962a6ea0df6f7546d847a50b150d45243c1..7fa037361b55a5e23738f9a37c8637f64d91b56e 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __ARCH_KIRKWOOD_TSX1X_COMMON_H
 #define __ARCH_KIRKWOOD_TSX1X_COMMON_H
 
-extern void qnap_tsx1x_register_flash(void);
+extern void __init qnap_tsx1x_register_flash(void);
 extern void qnap_tsx1x_power_off(void);
 
 #endif
index 0859336a8e6d1be71a8090c1e8ef53b1640c87bc..5c934bdb71583e037c59fdadc3490e43838ff425 100644 (file)
@@ -8,6 +8,7 @@
  * the Free Software Foundation.
  */
 #include <mach/hardware.h>
+#include <asm/memory.h>
 
 #include <mach/regs-board-a9m9750dev.h>
 
index 1b12d324b087d1528c87d828bebec3308be1dbaa..770a68c46e8114f4a7360b559e0ddecd15cfdc57 100644 (file)
@@ -20,50 +20,49 @@ static void putc_dummy(char c, void __iomem *base)
        /* nothing */
 }
 
+static int timeout;
+
 static void putc_ns9360(char c, void __iomem *base)
 {
-       static int t = 0x10000;
        do {
-               if (t)
-                       --t;
+               if (timeout)
+                       --timeout;
 
                if (__raw_readl(base + 8) & (1 << 3)) {
                        __raw_writeb(c, base + 16);
-                       t = 0x10000;
+                       timeout = 0x10000;
                        break;
                }
-       } while (t);
+       } while (timeout);
 }
 
 static void putc_a9m9750dev(char c, void __iomem *base)
 {
-       static int t = 0x10000;
        do {
-               if (t)
-                       --t;
+               if (timeout)
+                       --timeout;
 
                if (__raw_readb(base + 5) & (1 << 5)) {
                        __raw_writeb(c, base);
-                       t = 0x10000;
+                       timeout = 0x10000;
                        break;
                }
-       } while (t);
+       } while (timeout);
 
 }
 
 static void putc_ns921x(char c, void __iomem *base)
 {
-       static int t = 0x10000;
        do {
-               if (t)
-                       --t;
+               if (timeout)
+                       --timeout;
 
                if (!(__raw_readl(base) & (1 << 11))) {
                        __raw_writeb(c, base + 0x0028);
-                       t = 0x10000;
+                       timeout = 0x10000;
                        break;
                }
-       } while (t);
+       } while (timeout);
 }
 
 #define MSCS __REG(0xA0900184)
@@ -89,6 +88,7 @@ static void putc_ns921x(char c, void __iomem *base)
 
 static void autodetect(void (**putc)(char, void __iomem *), void __iomem **base)
 {
+       timeout = 0x10000;
        if (((__raw_readl(MSCS) >> 16) & 0xfe) == 0x00) {
                /* ns9360 or ns9750 */
                if (NS9360_UART_ENABLED(NS9360_UARTA)) {
index abdf321c2d4155b1d7b021722b37026d2ab60a81..03483920ed6e0b12fa007c3438d3ea4401f8ec7f 100644 (file)
@@ -175,6 +175,10 @@ static void __init rx51_add_gpio_keys(void)
 #endif /* CONFIG_KEYBOARD_GPIO || CONFIG_KEYBOARD_GPIO_MODULE */
 
 static int board_keymap[] = {
+       /*
+        * Note that KEY(x, 8, KEY_XXX) entries represent "entrire row
+        * connected to the ground" matrix state.
+        */
        KEY(0, 0, KEY_Q),
        KEY(0, 1, KEY_O),
        KEY(0, 2, KEY_P),
@@ -182,6 +186,7 @@ static int board_keymap[] = {
        KEY(0, 4, KEY_BACKSPACE),
        KEY(0, 6, KEY_A),
        KEY(0, 7, KEY_S),
+
        KEY(1, 0, KEY_W),
        KEY(1, 1, KEY_D),
        KEY(1, 2, KEY_F),
@@ -190,6 +195,7 @@ static int board_keymap[] = {
        KEY(1, 5, KEY_J),
        KEY(1, 6, KEY_K),
        KEY(1, 7, KEY_L),
+
        KEY(2, 0, KEY_E),
        KEY(2, 1, KEY_DOT),
        KEY(2, 2, KEY_UP),
@@ -197,6 +203,8 @@ static int board_keymap[] = {
        KEY(2, 5, KEY_Z),
        KEY(2, 6, KEY_X),
        KEY(2, 7, KEY_C),
+       KEY(2, 8, KEY_F9),
+
        KEY(3, 0, KEY_R),
        KEY(3, 1, KEY_V),
        KEY(3, 2, KEY_B),
@@ -205,20 +213,23 @@ static int board_keymap[] = {
        KEY(3, 5, KEY_SPACE),
        KEY(3, 6, KEY_SPACE),
        KEY(3, 7, KEY_LEFT),
+
        KEY(4, 0, KEY_T),
        KEY(4, 1, KEY_DOWN),
        KEY(4, 2, KEY_RIGHT),
        KEY(4, 4, KEY_LEFTCTRL),
        KEY(4, 5, KEY_RIGHTALT),
        KEY(4, 6, KEY_LEFTSHIFT),
+       KEY(4, 8, KEY_F10),
+
        KEY(5, 0, KEY_Y),
+       KEY(5, 8, KEY_F11),
+
        KEY(6, 0, KEY_U),
+
        KEY(7, 0, KEY_I),
        KEY(7, 1, KEY_F7),
        KEY(7, 2, KEY_F8),
-       KEY(0xff, 2, KEY_F9),
-       KEY(0xff, 4, KEY_F10),
-       KEY(0xff, 5, KEY_F11),
 };
 
 static struct matrix_keymap_data board_map_data = {
index 45c23fd6df31e9696d2b0c42be0752cba1683217..40b6ac2de876cf8dcc4c0328b72b086e15253eb8 100644 (file)
@@ -26,6 +26,7 @@
 #include <mach/colibri.h>
 #include <mach/ohci.h>
 #include <mach/pxafb.h>
+#include <mach/audio.h>
 
 #include "generic.h"
 #include "devices.h"
@@ -145,7 +146,7 @@ static void __init colibri_pxa300_init_lcd(void)
 static inline void colibri_pxa300_init_lcd(void) {}
 #endif /* CONFIG_FB_PXA || CONFIG_FB_PXA_MODULE */
 
-#if defined(SND_AC97_CODEC) || defined(SND_AC97_CODEC_MODULE)
+#if defined(CONFIG_SND_AC97_CODEC) || defined(CONFIG_SND_AC97_CODEC_MODULE)
 static mfp_cfg_t colibri_pxa310_ac97_pin_config[] __initdata = {
        GPIO24_AC97_SYSCLK,
        GPIO23_AC97_nACRESET,
index 3d1dcb9ac08f497fc63e333ee6d20438f20d0d28..51ffa6afb67530e5cde74659319584ac52646593 100644 (file)
@@ -446,7 +446,7 @@ static struct platform_device corgiled_device = {
 static struct pxamci_platform_data corgi_mci_platform_data = {
        .detect_delay_ms        = 250,
        .ocr_mask               = MMC_VDD_32_33|MMC_VDD_33_34,
-       .gpio_card_detect       = -1,
+       .gpio_card_detect       = CORGI_GPIO_nSD_DETECT,
        .gpio_card_ro           = CORGI_GPIO_nSD_WP,
        .gpio_power             = CORGI_GPIO_SD_PWR,
 };
index 9e4d9816726ad5d75c0657f9a32d0b36c0ec3aa7..268a9bc6be8a22a4ca0ac4fed742d035753581a3 100644 (file)
@@ -256,13 +256,9 @@ static void init_sdram_rows(void)
 
 static u32 mdrefr_dri(unsigned int freq)
 {
-       u32 dri = 0;
+       u32 interval = freq * SDRAM_TREF / sdram_rows;
 
-       if (cpu_is_pxa25x())
-               dri = ((freq * SDRAM_TREF) / (sdram_rows * 32));
-       if (cpu_is_pxa27x())
-               dri = ((freq * SDRAM_TREF) / (sdram_rows - 31)) / 32;
-       return dri;
+       return (interval - (cpu_is_pxa27x() ? 31 : 0)) / 32;
 }
 
 /* find a valid frequency point */
index 0af36177ff085c92f34cd729bd5775f25d948a2f..c059dac02b61412b64b22f869d2e8913404236ed 100644 (file)
@@ -41,10 +41,10 @@ void pxa27x_clear_otgph(void)
 EXPORT_SYMBOL(pxa27x_clear_otgph);
 
 static unsigned long ac97_reset_config[] = {
-       GPIO95_AC97_nRESET,
-       GPIO95_GPIO,
-       GPIO113_AC97_nRESET,
        GPIO113_GPIO,
+       GPIO113_AC97_nRESET,
+       GPIO95_GPIO,
+       GPIO95_AC97_nRESET,
 };
 
 void pxa27x_assert_ac97reset(int reset_gpio, int on)
index 595be19f8ad5027e29daed72bbe0fb2c5d2d1a04..02e9fdeb8faf26891bdf43cb5846ae717fb720ea 100644 (file)
@@ -237,7 +237,7 @@ static unsigned int realview_mmc_status(struct device *dev)
        else
                mask = 2;
 
-       return !(readl(REALVIEW_SYSMCI) & mask);
+       return readl(REALVIEW_SYSMCI) & mask;
 }
 
 struct mmci_platform_data realview_mmc0_plat_data = {
index 50f071c5bf4d603656a01a9c8c2865bf07ee2eb9..5ea24d4d1ba6e176985b16076b48412952de9aec 100644 (file)
@@ -20,6 +20,9 @@
                strb    \rd, [\rx]
                .endm
 
+               .macro waituart,rd,rx
+               .endm
+
                .macro  busyuart,rd,rx
                mov     \rd, #0
 1001:          add     \rd, \rd, #1
index fe84b9021c7adee213fdb94c7639c7f77e2dfaa5..0a1318fc8e2bd6c29774bcf1ab8cc48f6a5cfa0c 100644 (file)
@@ -131,7 +131,7 @@ EXPORT_SYMBOL(clk_disable);
  */
 static unsigned long clk_mtu_get_rate(struct clk *clk)
 {
-       void __iomem *addr = __io_address(U8500_PRCMU_BASE)
+       void __iomem *addr = __io_address(UX500_PRCMU_BASE)
                + PRCM_TCR;
        u32 tcr = readl(addr);
        int mtu = (int) clk->data;
index 6a3ac4539f164e23f7109896e8bab431ff9392bf..e9278f6d67aa7529f2408fd15fd5eab1bfecdb20 100644 (file)
@@ -21,6 +21,7 @@ static struct map_desc u5500_io_desc[] __initdata = {
        __IO_DEV_DESC(U5500_GPIO2_BASE, SZ_4K),
        __IO_DEV_DESC(U5500_GPIO3_BASE, SZ_4K),
        __IO_DEV_DESC(U5500_GPIO4_BASE, SZ_4K),
+       __IO_DEV_DESC(U5500_PRCMU_BASE, SZ_4K),
 };
 
 static struct platform_device *u5500_platform_devs[] __initdata = {
index 8552eb188b50274c7ed4b18ccf48e743192652de..0271ca0a83df86c4fb43eb37b3c93754414d706d 100644 (file)
 static void putc(const char c)
 {
        /* Do nothing if the UART is not enabled. */
-       if (!(readb(U8500_UART_CR) & 0x1))
+       if (!(__raw_readb(U8500_UART_CR) & 0x1))
                return;
 
        if (c == '\n')
                putc('\r');
 
-       while (readb(U8500_UART_FR) & (1 << 5))
+       while (__raw_readb(U8500_UART_FR) & (1 << 5))
                barrier();
-       writeb(c, U8500_UART_DR);
+       __raw_writeb(c, U8500_UART_DR);
 }
 
 static void flush(void)
 {
-       if (!(readb(U8500_UART_CR) & 0x1))
+       if (!(__raw_readb(U8500_UART_CR) & 0x1))
                return;
-       while (readb(U8500_UART_FR) & (1 << 3))
+       while (__raw_readb(U8500_UART_FR) & (1 << 3))
                barrier();
 }
 
index d250711b8c7a4e3c17ee2ddcc53ad5b2e24ee420..c84239761cb4a2881d226f6f82b3acb694d30dae 100644 (file)
@@ -241,7 +241,7 @@ static struct platform_device v2m_flash_device = {
 
 static unsigned int v2m_mmci_status(struct device *dev)
 {
-       return !(readl(MMIO_P2V(V2M_SYS_MCI)) & (1 << 0));
+       return readl(MMIO_P2V(V2M_SYS_MCI)) & (1 << 0);
 }
 
 static struct mmci_platform_data v2m_mmci_data = {
index 642207e18198db20777ef475a27ada0bd2ae0c3d..83c56324a472f16a5f155df056b4cc29ba9e562d 100644 (file)
@@ -93,7 +93,7 @@ static struct clk_lookup nuc900_clkregs[] = {
        DEF_CLKLOOK(&clk_kpi, "nuc900-kpi", NULL),
        DEF_CLKLOOK(&clk_wdt, "nuc900-wdt", NULL),
        DEF_CLKLOOK(&clk_gdma, "nuc900-gdma", NULL),
-       DEF_CLKLOOK(&clk_adc, "nuc900-adc", NULL),
+       DEF_CLKLOOK(&clk_adc, "nuc900-ts", NULL),
        DEF_CLKLOOK(&clk_usi, "nuc900-spi", NULL),
        DEF_CLKLOOK(&clk_ext, NULL, "ext"),
        DEF_CLKLOOK(&clk_timer0, NULL, "timer0"),
index 9819869d2bc90954967a5a1ca0e636c883c09e2f..9982eb385c0f9844d70f53d45c7377fcf5fa2887 100644 (file)
@@ -32,14 +32,14 @@ static uint32_t l2x0_way_mask;      /* Bitmask of active ways */
 static inline void cache_wait(void __iomem *reg, unsigned long mask)
 {
        /* wait for the operation to complete */
-       while (readl(reg) & mask)
+       while (readl_relaxed(reg) & mask)
                ;
 }
 
 static inline void cache_sync(void)
 {
        void __iomem *base = l2x0_base;
-       writel(0, base + L2X0_CACHE_SYNC);
+       writel_relaxed(0, base + L2X0_CACHE_SYNC);
        cache_wait(base + L2X0_CACHE_SYNC, 1);
 }
 
@@ -47,14 +47,14 @@ static inline void l2x0_clean_line(unsigned long addr)
 {
        void __iomem *base = l2x0_base;
        cache_wait(base + L2X0_CLEAN_LINE_PA, 1);
-       writel(addr, base + L2X0_CLEAN_LINE_PA);
+       writel_relaxed(addr, base + L2X0_CLEAN_LINE_PA);
 }
 
 static inline void l2x0_inv_line(unsigned long addr)
 {
        void __iomem *base = l2x0_base;
        cache_wait(base + L2X0_INV_LINE_PA, 1);
-       writel(addr, base + L2X0_INV_LINE_PA);
+       writel_relaxed(addr, base + L2X0_INV_LINE_PA);
 }
 
 #ifdef CONFIG_PL310_ERRATA_588369
@@ -75,9 +75,9 @@ static inline void l2x0_flush_line(unsigned long addr)
 
        /* Clean by PA followed by Invalidate by PA */
        cache_wait(base + L2X0_CLEAN_LINE_PA, 1);
-       writel(addr, base + L2X0_CLEAN_LINE_PA);
+       writel_relaxed(addr, base + L2X0_CLEAN_LINE_PA);
        cache_wait(base + L2X0_INV_LINE_PA, 1);
-       writel(addr, base + L2X0_INV_LINE_PA);
+       writel_relaxed(addr, base + L2X0_INV_LINE_PA);
 }
 #else
 
@@ -90,7 +90,7 @@ static inline void l2x0_flush_line(unsigned long addr)
 {
        void __iomem *base = l2x0_base;
        cache_wait(base + L2X0_CLEAN_INV_LINE_PA, 1);
-       writel(addr, base + L2X0_CLEAN_INV_LINE_PA);
+       writel_relaxed(addr, base + L2X0_CLEAN_INV_LINE_PA);
 }
 #endif
 
@@ -109,7 +109,7 @@ static inline void l2x0_inv_all(void)
 
        /* invalidate all ways */
        spin_lock_irqsave(&l2x0_lock, flags);
-       writel(l2x0_way_mask, l2x0_base + L2X0_INV_WAY);
+       writel_relaxed(l2x0_way_mask, l2x0_base + L2X0_INV_WAY);
        cache_wait(l2x0_base + L2X0_INV_WAY, l2x0_way_mask);
        cache_sync();
        spin_unlock_irqrestore(&l2x0_lock, flags);
@@ -215,8 +215,11 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
 
        l2x0_base = base;
 
-       cache_id = readl(l2x0_base + L2X0_CACHE_ID);
-       aux = readl(l2x0_base + L2X0_AUX_CTRL);
+       cache_id = readl_relaxed(l2x0_base + L2X0_CACHE_ID);
+       aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL);
+
+       aux &= aux_mask;
+       aux |= aux_val;
 
        /* Determine the number of ways */
        switch (cache_id & L2X0_CACHE_ID_PART_MASK) {
@@ -245,17 +248,15 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
         * If you are booting from non-secure mode
         * accessing the below registers will fault.
         */
-       if (!(readl(l2x0_base + L2X0_CTRL) & 1)) {
+       if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & 1)) {
 
                /* l2x0 controller is disabled */
-               aux &= aux_mask;
-               aux |= aux_val;
-               writel(aux, l2x0_base + L2X0_AUX_CTRL);
+               writel_relaxed(aux, l2x0_base + L2X0_AUX_CTRL);
 
                l2x0_inv_all();
 
                /* enable L2X0 */
-               writel(1, l2x0_base + L2X0_CTRL);
+               writel_relaxed(1, l2x0_base + L2X0_CTRL);
        }
 
        outer_cache.inv_range = l2x0_inv_range;
index 086816b205b8cf25c9d178c9d56c44a654e2ff9f..6ab244062b4ab2f720e84d870011faac64878c81 100644 (file)
@@ -163,19 +163,22 @@ static DEFINE_PER_CPU(int, kmap_high_l1_vipt_depth);
 
 void *kmap_high_l1_vipt(struct page *page, pte_t *saved_pte)
 {
-       unsigned int idx, cpu = smp_processor_id();
-       int *depth = &per_cpu(kmap_high_l1_vipt_depth, cpu);
+       unsigned int idx, cpu;
+       int *depth;
        unsigned long vaddr, flags;
        pte_t pte, *ptep;
 
+       if (!in_interrupt())
+               preempt_disable();
+
+       cpu = smp_processor_id();
+       depth = &per_cpu(kmap_high_l1_vipt_depth, cpu);
+
        idx = KM_L1_CACHE + KM_TYPE_NR * cpu;
        vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
        ptep = TOP_PTE(vaddr);
        pte = mk_pte(page, kmap_prot);
 
-       if (!in_interrupt())
-               preempt_disable();
-
        raw_local_irq_save(flags);
        (*depth)++;
        if (pte_val(*ptep) == pte_val(pte)) {
index 1670734b7e5159d34ada41710c0dc5381fcc4c3a..37fa593884ee64d345add30e2ca9738e238e3511 100644 (file)
@@ -17,8 +17,8 @@
                .macro  addruart, rx
                mrc     p15, 0, \rx, c1, c0
                tst     \rx, #1                                 @ MMU enabled?
-               moveq   \rx, =SPEAR_DBG_UART_BASE               @ Physical base
-               movne   \rx, =VA_SPEAR_DBG_UART_BASE            @ Virtual base
+               moveq   \rx, #SPEAR_DBG_UART_BASE               @ Physical base
+               movne   \rx, #VA_SPEAR_DBG_UART_BASE            @ Virtual base
                .endm
 
                .macro  senduart, rd, rx
index 8f10d24ae62540c5460eaf4b8e249c6ccd4ceac8..48cbdcb6bbd4288929f31bef94da3691b160a489 100644 (file)
@@ -12,7 +12,7 @@
 #
 #   http://www.arm.linux.org.uk/developer/machines/?action=new
 #
-# Last update: Sat May 1 10:36:42 2010
+# Last update: Mon Jul 12 21:10:14 2010
 #
 # machine_is_xxx       CONFIG_xxxx             MACH_TYPE_xxx           number
 #
@@ -1994,7 +1994,7 @@ spark                     MACH_SPARK              SPARK                   2002
 benzina                        MACH_BENZINA            BENZINA                 2003
 blaze                  MACH_BLAZE              BLAZE                   2004
 linkstation_ls_hgl     MACH_LINKSTATION_LS_HGL LINKSTATION_LS_HGL      2005
-htckovsky              MACH_HTCVENUS           HTCVENUS                2006
+htckovsky              MACH_HTCKOVSKY          HTCKOVSKY               2006
 sony_prs505            MACH_SONY_PRS505        SONY_PRS505             2007
 hanlin_v3              MACH_HANLIN_V3          HANLIN_V3               2008
 sapphira               MACH_SAPPHIRA           SAPPHIRA                2009
@@ -2609,7 +2609,7 @@ fujitsu_tvstbsoc1 MACH_FUJITSU_TVSTBSOC1  FUJITSU_TVSTBSOC1       2621
 lexikon                        MACH_LEXIKON            LEXIKON                 2622
 mini2440v2             MACH_MINI2440V2         MINI2440V2              2623
 icontrol               MACH_ICONTROL           ICONTROL                2624
-sheevad                        MACH_SHEEVAD            SHEEVAD                 2625
+gplugd                 MACH_SHEEVAD            SHEEVAD                 2625
 qsd8x50a_st1_1         MACH_QSD8X50A_ST1_1     QSD8X50A_ST1_1          2626
 qsd8x50a_st1_5         MACH_QSD8X50A_ST1_5     QSD8X50A_ST1_5          2627
 bee                    MACH_BEE                BEE                     2628
@@ -2804,3 +2804,149 @@ teton_bga               MACH_TETON_BGA          TETON_BGA               2816
 snapper9g45            MACH_SNAPPER9G45        SNAPPER9G45             2817
 tam3517                        MACH_TAM3517            TAM3517                 2818
 pdc100                 MACH_PDC100             PDC100                  2819
+eukrea_cpuimx25sd      MACH_EUKREA_CPUIMX25    EUKREA_CPUIMX25         2820
+eukrea_cpuimx35sd      MACH_EUKREA_CPUIMX35    EUKREA_CPUIMX35         2821
+eukrea_cpuimx51sd      MACH_EUKREA_CPUIMX51SD  EUKREA_CPUIMX51SD       2822
+eukrea_cpuimx51                MACH_EUKREA_CPUIMX51    EUKREA_CPUIMX51         2823
+p565                   MACH_P565               P565                    2824
+acer_a4                        MACH_ACER_A4            ACER_A4                 2825
+davinci_dm368_bip      MACH_DAVINCI_DM368_BIP  DAVINCI_DM368_BIP       2826
+eshare                 MACH_ESHARE             ESHARE                  2827
+hw_omapl138_europa     MACH_HW_OMAPL138_EUROPA HW_OMAPL138_EUROPA      2828
+wlbargn                        MACH_WLBARGN            WLBARGN                 2829
+bm170                  MACH_BM170              BM170                   2830
+netspace_mini_v2       MACH_NETSPACE_MINI_V2   NETSPACE_MINI_V2        2831
+netspace_plug_v2       MACH_NETSPACE_PLUG_V2   NETSPACE_PLUG_V2        2832
+siemens_l1             MACH_SIEMENS_L1         SIEMENS_L1              2833
+elv_lcu1               MACH_ELV_LCU1           ELV_LCU1                2834
+mcu1                   MACH_MCU1               MCU1                    2835
+omap3_tao3530          MACH_OMAP3_TAO3530      OMAP3_TAO3530           2836
+omap3_pcutouch         MACH_OMAP3_PCUTOUCH     OMAP3_PCUTOUCH          2837
+smdkc210               MACH_SMDKC210           SMDKC210                2838
+omap3_braillo          MACH_OMAP3_BRAILLO      OMAP3_BRAILLO           2839
+spyplug                        MACH_SPYPLUG            SPYPLUG                 2840
+ginger                 MACH_GINGER             GINGER                  2841
+tny_t3530              MACH_TNY_T3530          TNY_T3530               2842
+pca102                 MACH_PCA102             PCA102                  2843
+spade                  MACH_SPADE              SPADE                   2844
+mxc25_topaz            MACH_MXC25_TOPAZ        MXC25_TOPAZ             2845
+t5325                  MACH_T5325              T5325                   2846
+gw2361                 MACH_GW2361             GW2361                  2847
+elog                   MACH_ELOG               ELOG                    2848
+income                 MACH_INCOME             INCOME                  2849
+bcm589x                        MACH_BCM589X            BCM589X                 2850
+etna                   MACH_ETNA               ETNA                    2851
+hawks                  MACH_HAWKS              HAWKS                   2852
+meson                  MACH_MESON              MESON                   2853
+xsbase255              MACH_XSBASE255          XSBASE255               2854
+pvm2030                        MACH_PVM2030            PVM2030                 2855
+mioa502                        MACH_MIOA502            MIOA502                 2856
+vvbox_sdorig2          MACH_VVBOX_SDORIG2      VVBOX_SDORIG2           2857
+vvbox_sdlite2          MACH_VVBOX_SDLITE2      VVBOX_SDLITE2           2858
+vvbox_sdpro4           MACH_VVBOX_SDPRO4       VVBOX_SDPRO4            2859
+htc_spv_m700           MACH_HTC_SPV_M700       HTC_SPV_M700            2860
+mx257sx                        MACH_MX257SX            MX257SX                 2861
+goni                   MACH_GONI               GONI                    2862
+msm8x55_svlte_ffa      MACH_MSM8X55_SVLTE_FFA  MSM8X55_SVLTE_FFA       2863
+msm8x55_svlte_surf     MACH_MSM8X55_SVLTE_SURF MSM8X55_SVLTE_SURF      2864
+quickstep              MACH_QUICKSTEP          QUICKSTEP               2865
+dmw96                  MACH_DMW96              DMW96                   2866
+hammerhead             MACH_HAMMERHEAD         HAMMERHEAD              2867
+trident                        MACH_TRIDENT            TRIDENT                 2868
+lightning              MACH_LIGHTNING          LIGHTNING               2869
+iconnect               MACH_ICONNECT           ICONNECT                2870
+autobot                        MACH_AUTOBOT            AUTOBOT                 2871
+coconut                        MACH_COCONUT            COCONUT                 2872
+durian                 MACH_DURIAN             DURIAN                  2873
+cayenne                        MACH_CAYENNE            CAYENNE                 2874
+fuji                   MACH_FUJI               FUJI                    2875
+synology_6282          MACH_SYNOLOGY_6282      SYNOLOGY_6282           2876
+em1sy                  MACH_EM1SY              EM1SY                   2877
+m502                   MACH_M502               M502                    2878
+matrix518              MACH_MATRIX518          MATRIX518               2879
+tiny_gurnard           MACH_TINY_GURNARD       TINY_GURNARD            2880
+spear1310              MACH_SPEAR1310          SPEAR1310               2881
+bv07                   MACH_BV07               BV07                    2882
+mxt_td61               MACH_MXT_TD61           MXT_TD61                2883
+openrd_ultimate                MACH_OPENRD_ULTIMATE    OPENRD_ULTIMATE         2884
+devixp                 MACH_DEVIXP             DEVIXP                  2885
+miccpt                 MACH_MICCPT             MICCPT                  2886
+mic256                 MACH_MIC256             MIC256                  2887
+as1167                 MACH_AS1167             AS1167                  2888
+omap3_ibiza            MACH_OMAP3_IBIZA        OMAP3_IBIZA             2889
+u5500                  MACH_U5500              U5500                   2890
+davinci_picto          MACH_DAVINCI_PICTO      DAVINCI_PICTO           2891
+mecha                  MACH_MECHA              MECHA                   2892
+bubba3                 MACH_BUBBA3             BUBBA3                  2893
+pupitre                        MACH_PUPITRE            PUPITRE                 2894
+tegra_harmony          MACH_TEGRA_HARMONY      TEGRA_HARMONY           2895
+tegra_vogue            MACH_TEGRA_VOGUE        TEGRA_VOGUE             2896
+tegra_e1165            MACH_TEGRA_E1165        TEGRA_E1165             2897
+simplenet              MACH_SIMPLENET          SIMPLENET               2898
+ec4350tbm              MACH_EC4350TBM          EC4350TBM               2899
+pec_tc                 MACH_PEC_TC             PEC_TC                  2900
+pec_hc2                        MACH_PEC_HC2            PEC_HC2                 2901
+esl_mobilis_a          MACH_ESL_MOBILIS_A      ESL_MOBILIS_A           2902
+esl_mobilis_b          MACH_ESL_MOBILIS_B      ESL_MOBILIS_B           2903
+esl_wave_a             MACH_ESL_WAVE_A         ESL_WAVE_A              2904
+esl_wave_b             MACH_ESL_WAVE_B         ESL_WAVE_B              2905
+unisense_mmm           MACH_UNISENSE_MMM       UNISENSE_MMM            2906
+blueshark              MACH_BLUESHARK          BLUESHARK               2907
+e10                    MACH_E10                E10                     2908
+app3k_robin            MACH_APP3K_ROBIN        APP3K_ROBIN             2909
+pov15hd                        MACH_POV15HD            POV15HD                 2910
+stella                 MACH_STELLA             STELLA                  2911
+linkstation_lschl      MACH_LINKSTATION_LSCHL  LINKSTATION_LSCHL       2913
+netwalker              MACH_NETWALKER          NETWALKER               2914
+acsx106                        MACH_ACSX106            ACSX106                 2915
+atlas5_c1              MACH_ATLAS5_C1          ATLAS5_C1               2916
+nsb3ast                        MACH_NSB3AST            NSB3AST                 2917
+gnet_slc               MACH_GNET_SLC           GNET_SLC                2918
+af4000                 MACH_AF4000             AF4000                  2919
+ark9431                        MACH_ARK9431            ARK9431                 2920
+fs_s5pc100             MACH_FS_S5PC100         FS_S5PC100              2921
+omap3505nova8          MACH_OMAP3505NOVA8      OMAP3505NOVA8           2922
+omap3621_edp1          MACH_OMAP3621_EDP1      OMAP3621_EDP1           2923
+oratisaes              MACH_ORATISAES          ORATISAES               2924
+smdkv310               MACH_SMDKV310           SMDKV310                2925
+siemens_l0             MACH_SIEMENS_L0         SIEMENS_L0              2926
+ventana                        MACH_VENTANA            VENTANA                 2927
+wm8505_7in_netbook     MACH_WM8505_7IN_NETBOOK WM8505_7IN_NETBOOK      2928
+ec4350sdb              MACH_EC4350SDB          EC4350SDB               2929
+mimas                  MACH_MIMAS              MIMAS                   2930
+titan                  MACH_TITAN              TITAN                   2931
+craneboard             MACH_CRANEBOARD         CRANEBOARD              2932
+es2440                 MACH_ES2440             ES2440                  2933
+najay_a9263            MACH_NAJAY_A9263        NAJAY_A9263             2934
+htctornado             MACH_HTCTORNADO         HTCTORNADO              2935
+dimm_mx257             MACH_DIMM_MX257         DIMM_MX257              2936
+jigen301               MACH_JIGEN              JIGEN                   2937
+smdk6450               MACH_SMDK6450           SMDK6450                2938
+meno_qng               MACH_MENO_QNG           MENO_QNG                2939
+ns2416                 MACH_NS2416             NS2416                  2940
+rpc353                 MACH_RPC353             RPC353                  2941
+tq6410                 MACH_TQ6410             TQ6410                  2942
+sky6410                        MACH_SKY6410            SKY6410                 2943
+dynasty                        MACH_DYNASTY            DYNASTY                 2944
+vivo                   MACH_VIVO               VIVO                    2945
+bury_bl7582            MACH_BURY_BL7582        BURY_BL7582             2946
+bury_bps5270           MACH_BURY_BPS5270       BURY_BPS5270            2947
+basi                   MACH_BASI               BASI                    2948
+tn200                  MACH_TN200              TN200                   2949
+c2mmi                  MACH_C2MMI              C2MMI                   2950
+meson_6236m            MACH_MESON_6236M        MESON_6236M             2951
+meson_8626m            MACH_MESON_8626M        MESON_8626M             2952
+tube                   MACH_TUBE               TUBE                    2953
+messina                        MACH_MESSINA            MESSINA                 2954
+mx50_arm2              MACH_MX50_ARM2          MX50_ARM2               2955
+cetus9263              MACH_CETUS9263          CETUS9263               2956
+brownstone             MACH_BROWNSTONE         BROWNSTONE              2957
+vmx25                  MACH_VMX25              VMX25                   2958
+vmx51                  MACH_VMX51              VMX51                   2959
+abacus                 MACH_ABACUS             ABACUS                  2960
+cm4745                 MACH_CM4745             CM4745                  2961
+oratislink             MACH_ORATISLINK         ORATISLINK              2962
+davinci_dm365_dvr      MACH_DAVINCI_DM365_DVR  DAVINCI_DM365_DVR       2963
+netviz                 MACH_NETVIZ             NETVIZ                  2964
+flexibity              MACH_FLEXIBITY          FLEXIBITY               2965
+wlan_computer          MACH_WLAN_COMPUTER      WLAN_COMPUTER           2966
index 0cf2c0a4502bd55769edf2166899a2c47d833f8a..e6ac0b6610763e6a51c30d64c607691c4fe869fe 100644 (file)
@@ -54,6 +54,9 @@
 #define TIOCGPTN       _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
 #define TIOCSPTLCK     _IOW('T',0x31, int)  /* Lock/unlock Pty */
 
+#define TIOCGRS485      0x542E
+#define TIOCSRS485      0x542F
+
 #define FIONCLEX       0x5450
 #define FIOCLEX                0x5451
 #define FIOASYNC       0x5452
index c7f25bb1d068e0de55c8d2eeeb9ea817d5232328..61740201b3115eb7988ff3eca6728195f5d90d8b 100644 (file)
@@ -5,6 +5,7 @@
 #define __ASM_ARCH_BOARD_H
 
 #include <linux/types.h>
+#include <linux/serial.h>
 
 #define GPIO_PIN_NONE  (-1)
 
@@ -35,6 +36,7 @@ struct atmel_uart_data {
        short           use_dma_tx;     /* use transmit DMA? */
        short           use_dma_rx;     /* use receive DMA? */
        void __iomem    *regs;          /* virtual base address, if any */
+       struct serial_rs485     rs485;          /* rs485 settings */
 };
 void at32_map_usart(unsigned int hw_id, unsigned int line, int flags);
 struct platform_device *at32_add_device_usart(unsigned int id);
index 76818f926539bf444c8aa577d12dc1af1296d665..505a08592423dbd17b7168a2782247c2d401f52e 100644 (file)
@@ -5,7 +5,7 @@ mainmenu "Linux/Microblaze Kernel Configuration"
 
 config MICROBLAZE
        def_bool y
-       select HAVE_LMB
+       select HAVE_MEMBLOCK
        select HAVE_FUNCTION_TRACER
        select HAVE_FUNCTION_TRACE_MCOUNT_TEST
        select HAVE_FUNCTION_GRAPH_TRACER
similarity index 57%
rename from arch/microblaze/include/asm/lmb.h
rename to arch/microblaze/include/asm/memblock.h
index a0a0a929c293b8fd4df06d3e9563b718a08d2725..f9c2fa331d2ad92e675aad399befb989cc575fbc 100644 (file)
@@ -6,12 +6,12 @@
  * for more details.
  */
 
-#ifndef _ASM_MICROBLAZE_LMB_H
-#define _ASM_MICROBLAZE_LMB_H
+#ifndef _ASM_MICROBLAZE_MEMBLOCK_H
+#define _ASM_MICROBLAZE_MEMBLOCK_H
 
-/* LMB limit is OFF */
-#define LMB_REAL_LIMIT 0xFFFFFFFF
+/* MEMBLOCK limit is OFF */
+#define MEMBLOCK_REAL_LIMIT    0xFFFFFFFF
 
-#endif /* _ASM_MICROBLAZE_LMB_H */
+#endif /* _ASM_MICROBLAZE_MEMBLOCK_H */
 
 
index a15ef6d67ca92e037628f1c9808db4f5cd55e5ad..427b13b4740f822c95362f10a2510359e75fbd0a 100644 (file)
@@ -29,7 +29,7 @@
 #include <linux/kexec.h>
 #include <linux/debugfs.h>
 #include <linux/irq.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 
 #include <asm/prom.h>
 #include <asm/page.h>
@@ -49,12 +49,12 @@ void __init early_init_dt_scan_chosen_arch(unsigned long node)
 
 void __init early_init_dt_add_memory_arch(u64 base, u64 size)
 {
-       lmb_add(base, size);
+       memblock_add(base, size);
 }
 
 u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
 {
-       return lmb_alloc(size, align);
+       return memblock_alloc(size, align);
 }
 
 #ifdef CONFIG_EARLY_PRINTK
@@ -104,8 +104,8 @@ void __init early_init_devtree(void *params)
         */
        of_scan_flat_dt(early_init_dt_scan_chosen, NULL);
 
-       /* Scan memory nodes and rebuild LMBs */
-       lmb_init();
+       /* Scan memory nodes and rebuild MEMBLOCKs */
+       memblock_init();
        of_scan_flat_dt(early_init_dt_scan_root, NULL);
        of_scan_flat_dt(early_init_dt_scan_memory, NULL);
 
@@ -113,9 +113,9 @@ void __init early_init_devtree(void *params)
        strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE);
        parse_early_param();
 
-       lmb_analyze();
+       memblock_analyze();
 
-       pr_debug("Phys. mem: %lx\n", (unsigned long) lmb_phys_mem_size());
+       pr_debug("Phys. mem: %lx\n", (unsigned long) memblock_phys_mem_size());
 
        pr_debug(" <- early_init_devtree()\n");
 }
index cca3579d4268d07aab1910a463180f9dd271a4e6..db5934989926d583d837ec51c752ac90eccba6ff 100644 (file)
@@ -10,7 +10,7 @@
 #include <linux/bootmem.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 #include <linux/mm.h> /* mem_init */
 #include <linux/initrd.h>
 #include <linux/pagemap.h>
@@ -76,10 +76,10 @@ void __init setup_memory(void)
        u32 kernel_align_start, kernel_align_size;
 
        /* Find main memory where is the kernel */
-       for (i = 0; i < lmb.memory.cnt; i++) {
-               memory_start = (u32) lmb.memory.region[i].base;
-               memory_end = (u32) lmb.memory.region[i].base
-                               + (u32) lmb.memory.region[i].size;
+       for (i = 0; i < memblock.memory.cnt; i++) {
+               memory_start = (u32) memblock.memory.region[i].base;
+               memory_end = (u32) memblock.memory.region[i].base
+                               + (u32) memblock.memory.region[i].size;
                if ((memory_start <= (u32)_text) &&
                                        ((u32)_text <= memory_end)) {
                        memory_size = memory_end - memory_start;
@@ -100,7 +100,7 @@ void __init setup_memory(void)
        kernel_align_start = PAGE_DOWN((u32)_text);
        /* ALIGN can be remove because _end in vmlinux.lds.S is align */
        kernel_align_size = PAGE_UP((u32)klimit) - kernel_align_start;
-       lmb_reserve(kernel_align_start, kernel_align_size);
+       memblock_reserve(kernel_align_start, kernel_align_size);
        printk(KERN_INFO "%s: kernel addr=0x%08x-0x%08x size=0x%08x\n",
                __func__, kernel_align_start, kernel_align_start
                        + kernel_align_size, kernel_align_size);
@@ -141,18 +141,18 @@ void __init setup_memory(void)
        map_size = init_bootmem_node(&contig_page_data,
                PFN_UP(TOPHYS((u32)klimit)), min_low_pfn, max_low_pfn);
 #endif
-       lmb_reserve(PFN_UP(TOPHYS((u32)klimit)) << PAGE_SHIFT, map_size);
+       memblock_reserve(PFN_UP(TOPHYS((u32)klimit)) << PAGE_SHIFT, map_size);
 
        /* free bootmem is whole main memory */
        free_bootmem(memory_start, memory_size);
 
        /* reserve allocate blocks */
-       for (i = 0; i < lmb.reserved.cnt; i++) {
+       for (i = 0; i < memblock.reserved.cnt; i++) {
                pr_debug("reserved %d - 0x%08x-0x%08x\n", i,
-                       (u32) lmb.reserved.region[i].base,
-                       (u32) lmb_size_bytes(&lmb.reserved, i));
-               reserve_bootmem(lmb.reserved.region[i].base,
-                       lmb_size_bytes(&lmb.reserved, i) - 1, BOOTMEM_DEFAULT);
+                       (u32) memblock.reserved.region[i].base,
+                       (u32) memblock_size_bytes(&memblock.reserved, i));
+               reserve_bootmem(memblock.reserved.region[i].base,
+                       memblock_size_bytes(&memblock.reserved, i) - 1, BOOTMEM_DEFAULT);
        }
 #ifdef CONFIG_MMU
        init_bootmem_done = 1;
@@ -235,7 +235,7 @@ static void mm_cmdline_setup(void)
                if (maxmem && memory_size > maxmem) {
                        memory_size = maxmem;
                        memory_end = memory_start + memory_size;
-                       lmb.memory.region[0].size = memory_size;
+                       memblock.memory.region[0].size = memory_size;
                }
        }
 }
@@ -273,19 +273,19 @@ asmlinkage void __init mmu_init(void)
 {
        unsigned int kstart, ksize;
 
-       if (!lmb.reserved.cnt) {
+       if (!memblock.reserved.cnt) {
                printk(KERN_EMERG "Error memory count\n");
                machine_restart(NULL);
        }
 
-       if ((u32) lmb.memory.region[0].size < 0x1000000) {
+       if ((u32) memblock.memory.region[0].size < 0x1000000) {
                printk(KERN_EMERG "Memory must be greater than 16MB\n");
                machine_restart(NULL);
        }
        /* Find main memory where the kernel is */
-       memory_start = (u32) lmb.memory.region[0].base;
-       memory_end = (u32) lmb.memory.region[0].base +
-                               (u32) lmb.memory.region[0].size;
+       memory_start = (u32) memblock.memory.region[0].base;
+       memory_end = (u32) memblock.memory.region[0].base +
+                               (u32) memblock.memory.region[0].size;
        memory_size = memory_end - memory_start;
 
        mm_cmdline_setup(); /* FIXME parse args from command line - not used */
@@ -297,7 +297,7 @@ asmlinkage void __init mmu_init(void)
        kstart = __pa(CONFIG_KERNEL_START); /* kernel start */
        /* kernel size */
        ksize = PAGE_ALIGN(((u32)_end - (u32)CONFIG_KERNEL_START));
-       lmb_reserve(kstart, ksize);
+       memblock_reserve(kstart, ksize);
 
 #if defined(CONFIG_BLK_DEV_INITRD)
        /* Remove the init RAM disk from the available memory. */
@@ -335,7 +335,7 @@ void __init *early_get_page(void)
                 * Mem start + 32MB -> here is limit
                 * because of mem mapping from head.S
                 */
-               p = __va(lmb_alloc_base(PAGE_SIZE, PAGE_SIZE,
+               p = __va(memblock_alloc_base(PAGE_SIZE, PAGE_SIZE,
                                        memory_start + 0x2000000));
        }
        return p;
index 2580e77624d2072b4637b28eb32f5deb5053c1c0..f9e5622ebc95b8e37a42ac96d3556176c44b11c9 100644 (file)
@@ -435,20 +435,21 @@ static struct platform_device *au1xxx_platform_devices[] __initdata = {
 static int __init au1xxx_platform_init(void)
 {
        unsigned int uartclk = get_au1x00_uart_baud_base() * 16;
-       int i;
+       int err, i;
 
        /* Fill up uartclk. */
        for (i = 0; au1x00_uart_data[i].flags; i++)
                au1x00_uart_data[i].uartclk = uartclk;
 
+       err = platform_add_devices(au1xxx_platform_devices,
+                                  ARRAY_SIZE(au1xxx_platform_devices));
 #ifndef CONFIG_SOC_AU1100
        /* Register second MAC if enabled in pinfunc */
-       if (!(au_readl(SYS_PINFUNC) & (u32)SYS_PF_NI2))
+       if (!err && !(au_readl(SYS_PINFUNC) & (u32)SYS_PF_NI2))
                platform_device_register(&au1xxx_eth1_device);
 #endif
 
-       return platform_add_devices(au1xxx_platform_devices,
-                                   ARRAY_SIZE(au1xxx_platform_devices));
+       return err;
 }
 
 arch_initcall(au1xxx_platform_init);
index a9f0336e1f1fd626cca60c57748c1430be64c8f4..52d883d37dd7e4b69a82ab89e724c7b0c2cca7d4 100644 (file)
@@ -67,8 +67,6 @@ static void mtx1_power_off(void)
 
 void __init board_setup(void)
 {
-       alchemy_gpio2_enable();
-
 #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
        /* Enable USB power switch */
        alchemy_gpio_direction_output(204, 0);
@@ -117,11 +115,11 @@ mtx1_pci_idsel(unsigned int devsel, int assert)
 
        if (assert && devsel != 0)
                /* Suppress signal to Cardbus */
-               gpio_set_value(1, 0);   /* set EXT_IO3 OFF */
+               alchemy_gpio_set_value(1, 0);   /* set EXT_IO3 OFF */
        else
-               gpio_set_value(1, 1);   /* set EXT_IO3 ON */
+               alchemy_gpio_set_value(1, 1);   /* set EXT_IO3 ON */
 
-       au_sync_udelay(1);
+       udelay(1);
        return 1;
 }
 
index 9f544badd0b4d5dddc25701a690bb63b797cf8f8..39c23366c5c7ea4bcbe6c272fe0279aca4d82aba 100644 (file)
@@ -104,6 +104,9 @@ int __init bcm63xx_enet_register(int unit,
        if (unit > 1)
                return -ENODEV;
 
+       if (unit == 1 && BCMCPU_IS_6338())
+               return -ENODEV;
+
        if (!shared_device_registered) {
                shared_res[0].start = bcm63xx_regset_address(RSET_ENETDMA);
                shared_res[0].end = shared_res[0].start;
index 59dc0c7ef7334b2e28e4b508e03f84e8f2ea2aca..c63c56bfd18461b558e0cba7380d6297fc47115e 100644 (file)
@@ -434,7 +434,7 @@ static __inline__ void atomic64_add(long i, atomic64_t * v)
                __asm__ __volatile__(
                "       .set    mips3                                   \n"
                "1:     lld     %0, %1          # atomic64_add          \n"
-               "       addu    %0, %2                                  \n"
+               "       daddu   %0, %2                                  \n"
                "       scd     %0, %1                                  \n"
                "       beqzl   %0, 1b                                  \n"
                "       .set    mips0                                   \n"
@@ -446,7 +446,7 @@ static __inline__ void atomic64_add(long i, atomic64_t * v)
                __asm__ __volatile__(
                "       .set    mips3                                   \n"
                "1:     lld     %0, %1          # atomic64_add          \n"
-               "       addu    %0, %2                                  \n"
+               "       daddu   %0, %2                                  \n"
                "       scd     %0, %1                                  \n"
                "       beqz    %0, 2f                                  \n"
                "       .subsection 2                                   \n"
@@ -479,7 +479,7 @@ static __inline__ void atomic64_sub(long i, atomic64_t * v)
                __asm__ __volatile__(
                "       .set    mips3                                   \n"
                "1:     lld     %0, %1          # atomic64_sub          \n"
-               "       subu    %0, %2                                  \n"
+               "       dsubu   %0, %2                                  \n"
                "       scd     %0, %1                                  \n"
                "       beqzl   %0, 1b                                  \n"
                "       .set    mips0                                   \n"
@@ -491,7 +491,7 @@ static __inline__ void atomic64_sub(long i, atomic64_t * v)
                __asm__ __volatile__(
                "       .set    mips3                                   \n"
                "1:     lld     %0, %1          # atomic64_sub          \n"
-               "       subu    %0, %2                                  \n"
+               "       dsubu   %0, %2                                  \n"
                "       scd     %0, %1                                  \n"
                "       beqz    %0, 2f                                  \n"
                "       .subsection 2                                   \n"
@@ -524,10 +524,10 @@ static __inline__ long atomic64_add_return(long i, atomic64_t * v)
                __asm__ __volatile__(
                "       .set    mips3                                   \n"
                "1:     lld     %1, %2          # atomic64_add_return   \n"
-               "       addu    %0, %1, %3                              \n"
+               "       daddu   %0, %1, %3                              \n"
                "       scd     %0, %2                                  \n"
                "       beqzl   %0, 1b                                  \n"
-               "       addu    %0, %1, %3                              \n"
+               "       daddu   %0, %1, %3                              \n"
                "       .set    mips0                                   \n"
                : "=&r" (result), "=&r" (temp), "=m" (v->counter)
                : "Ir" (i), "m" (v->counter)
@@ -538,10 +538,10 @@ static __inline__ long atomic64_add_return(long i, atomic64_t * v)
                __asm__ __volatile__(
                "       .set    mips3                                   \n"
                "1:     lld     %1, %2          # atomic64_add_return   \n"
-               "       addu    %0, %1, %3                              \n"
+               "       daddu   %0, %1, %3                              \n"
                "       scd     %0, %2                                  \n"
                "       beqz    %0, 2f                                  \n"
-               "       addu    %0, %1, %3                              \n"
+               "       daddu   %0, %1, %3                              \n"
                "       .subsection 2                                   \n"
                "2:     b       1b                                      \n"
                "       .previous                                       \n"
@@ -576,10 +576,10 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v)
                __asm__ __volatile__(
                "       .set    mips3                                   \n"
                "1:     lld     %1, %2          # atomic64_sub_return   \n"
-               "       subu    %0, %1, %3                              \n"
+               "       dsubu   %0, %1, %3                              \n"
                "       scd     %0, %2                                  \n"
                "       beqzl   %0, 1b                                  \n"
-               "       subu    %0, %1, %3                              \n"
+               "       dsubu   %0, %1, %3                              \n"
                "       .set    mips0                                   \n"
                : "=&r" (result), "=&r" (temp), "=m" (v->counter)
                : "Ir" (i), "m" (v->counter)
@@ -590,10 +590,10 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v)
                __asm__ __volatile__(
                "       .set    mips3                                   \n"
                "1:     lld     %1, %2          # atomic64_sub_return   \n"
-               "       subu    %0, %1, %3                              \n"
+               "       dsubu   %0, %1, %3                              \n"
                "       scd     %0, %2                                  \n"
                "       beqz    %0, 2f                                  \n"
-               "       subu    %0, %1, %3                              \n"
+               "       dsubu   %0, %1, %3                              \n"
                "       .subsection 2                                   \n"
                "2:     b       1b                                      \n"
                "       .previous                                       \n"
index 1b5a6648eb86dda1598877acf8fd4a9ac9b301c1..baa318a59c97f8c2791842df809c1218796c7492 100644 (file)
 #define __NR_perf_event_open           (__NR_Linux + 296)
 #define __NR_accept4                   (__NR_Linux + 297)
 #define __NR_recvmmsg                  (__NR_Linux + 298)
+#define __NR_getdents64                        (__NR_Linux + 299)
 
 /*
  * Offset of the last N32 flavoured syscall
  */
-#define __NR_Linux_syscalls            298
+#define __NR_Linux_syscalls            299
 
 #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
 
 #define __NR_N32_Linux                 6000
-#define __NR_N32_Linux_syscalls                298
+#define __NR_N32_Linux_syscalls                299
 
 #ifdef __KERNEL__
 
index a5297e2a353aede2279664446611de8100bf1f98..a4faceea9d885043a0628afcf649d6b957c9b7a3 100644 (file)
@@ -419,4 +419,5 @@ EXPORT(sysn32_call_table)
        PTR     sys_perf_event_open
        PTR     sys_accept4
        PTR     compat_sys_recvmmsg
+       PTR     sys_getdents
        .size   sysn32_call_table,.-sysn32_call_table
index b773c1112b140f0f976139a3f57a9e69b2ee4bde..e5cdfd603f8fb6dabbdf22051b043604c8ad6496 100644 (file)
@@ -61,11 +61,9 @@ static int __init init_vdso(void)
 
        vunmap(vdso);
 
-       pr_notice("init_vdso successfull\n");
-
        return 0;
 }
-device_initcall(init_vdso);
+subsys_initcall(init_vdso);
 
 static unsigned long vdso_addr(unsigned long start)
 {
index 2fbfa1a8c3a9a96a4a2bc159a9eb8c986bc4297e..bf80921f2f56c0b145e698fa2c673ff49c7c0636 100644 (file)
@@ -247,6 +247,8 @@ void __init mips_pcibios_init(void)
        iomem_resource.end &= 0xfffffffffULL;                   /* 64 GB */
        ioport_resource.end = controller->io_resource->end;
 
+       controller->io_map_base = mips_io_port_base;
+
        register_pci_controller(controller);
 }
 
index eee4f3dfc410e248d5caf1e625b14dcbbb273ff3..98e86ddb86ccd6e07766d53a04998d7f3a413cc4 100644 (file)
@@ -44,6 +44,7 @@ extern struct pci_ops pnx8550_pci_ops;
 
 static struct pci_controller pnx8550_controller = {
        .pci_ops        = &pnx8550_pci_ops,
+       .io_map_base    = PNX8550_PORT_BASE,
        .io_resource    = &pci_io_resource,
        .mem_resource   = &pci_mem_resource,
 };
index 2aed50fef10ff8b800a58c8cdc0551d654b8fbf8..64246c9c875c51d09e5c3861ca0e6f1096d50ac5 100644 (file)
@@ -113,7 +113,7 @@ void __init plat_mem_setup(void)
        PNX8550_GLB2_ENAB_INTA_O = 0;
 
        /* IO/MEM resources. */
-       set_io_port_base(KSEG1);
+       set_io_port_base(PNX8550_PORT_BASE);
        ioport_resource.start = 0;
        ioport_resource.end = ~0;
        iomem_resource.start = 0;
index 04b31478a6d7d6631ad3faa684be6f41e66e2a09..b7c03d80c88c80e1a54af4254d42522b95e9f76a 100644 (file)
@@ -944,6 +944,7 @@ static struct pci_controller msp_pci_controller = {
        .pci_ops        = &msp_pci_ops,
        .mem_resource   = &pci_mem_resource,
        .mem_offset     = 0,
+       .io_map_base    = MSP_PCI_IOSPACE_BASE,
        .io_resource    = &pci_io_resource,
        .io_offset      = 0
 };
index 0357946f30e6ec5d2719446eaf68a9b86e980b98..cf5e1a25cb7d7fb942c3d0ebe53e9b3c6e5e14c1 100644 (file)
@@ -54,6 +54,7 @@ static int __init pmc_yosemite_setup(void)
                panic(ioremap_failed);
 
        set_io_port_base(io_v_base);
+       py_controller.io_map_base = io_v_base;
        TITAN_WRITE(RM9000x2_OCD_LKM7, TITAN_READ(RM9000x2_OCD_LKM7) | 1);
 
        ioport_resource.end = TITAN_IO_SIZE - 1;
index 8ee77887306a24986a54b27af1b3dc009011273a..9ec523e4dd060afb93ebd5fea93c07450daf933f 100644 (file)
@@ -472,6 +472,9 @@ void __init configure_platform(void)
                 * it*/
                platform_features = FFS_CAPABLE | DISPLAY_CAPABLE;
 
+               /* Cronus and Cronus Lite have the same register map */
+               set_register_map(CRONUS_IO_BASE, &cronus_register_map);
+
                /* ASIC version will determine if this is a real CronusLite or
                 * Castrati(Cronus) */
                chipversion  = asic_read(chipver3) << 24;
@@ -484,8 +487,6 @@ void __init configure_platform(void)
                else
                        asic = ASIC_CRONUSLITE;
 
-               /* Cronus and Cronus Lite have the same register map */
-               set_register_map(CRONUS_IO_BASE, &cronus_register_map);
                gp_resources = non_dvr_cronuslite_resources;
                pr_info("Platform: 4600 - %s, NON_DVR_CAPABLE, "
                        "chipversion=0x%08X\n",
index 6506bf4fbff13d82d1c66b629638efe435882b3d..2031a2846865e51bb3889742fe3fc60125532a4c 100644 (file)
@@ -132,7 +132,7 @@ config PPC
        select HAVE_ARCH_KGDB
        select HAVE_KRETPROBES
        select HAVE_ARCH_TRACEHOOK
-       select HAVE_LMB
+       select HAVE_MEMBLOCK
        select HAVE_DMA_ATTRS
        select HAVE_DMA_API_DEBUG
        select USE_GENERIC_SMP_HELPERS if SMP
index 98324c5a82867cfa5ace5179de635220ab5d01a4..9a846efe6382026d3f093988ac1b64be76894809 100644 (file)
@@ -12,7 +12,7 @@
  * 2 of the License, or (at your option) any later version.
  */
 
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 
 #include <asm/types.h>
 #include <asm/page.h>
index 0835eb977ba9c31b5536e3e714545d2528f7a876..e50323fe941f96d92e68ce246dad172fa58507c3 100644 (file)
@@ -6,6 +6,30 @@
 #include <linux/errno.h>
 #include <linux/of.h>
 
+/*
+ * SPI Parameter RAM common to QE and CPM.
+ */
+struct spi_pram {
+       __be16  rbase;  /* Rx Buffer descriptor base address */
+       __be16  tbase;  /* Tx Buffer descriptor base address */
+       u8      rfcr;   /* Rx function code */
+       u8      tfcr;   /* Tx function code */
+       __be16  mrblr;  /* Max receive buffer length */
+       __be32  rstate; /* Internal */
+       __be32  rdp;    /* Internal */
+       __be16  rbptr;  /* Internal */
+       __be16  rbc;    /* Internal */
+       __be32  rxtmp;  /* Internal */
+       __be32  tstate; /* Internal */
+       __be32  tdp;    /* Internal */
+       __be16  tbptr;  /* Internal */
+       __be16  tbc;    /* Internal */
+       __be32  txtmp;  /* Internal */
+       __be32  res;    /* Tx temp. */
+       __be16  rpbase; /* Relocation pointer (CPM1 only) */
+       __be16  res1;   /* Reserved */
+};
+
 /*
  * USB Controller pram common to QE and CPM.
  */
index 81b01192f4408f01c7da9553a49c5fb01ee31c10..bd07650dca56b0489b5518ccaaaa6eaf5f6de73a 100644 (file)
@@ -17,6 +17,7 @@
 #ifndef __CPM1__
 #define __CPM1__
 
+#include <linux/init.h>
 #include <asm/8xx_immap.h>
 #include <asm/ptrace.h>
 #include <asm/cpm.h>
@@ -54,7 +55,7 @@ extern cpm8xx_t __iomem *cpmp; /* Pointer to comm processor */
 
 extern void cpm_setbrg(uint brg, uint rate);
 
-extern void cpm_load_patch(cpm8xx_t *cp);
+extern void __init cpm_load_patch(cpm8xx_t *cp);
 
 extern void cpm_reset(void);
 
index 2a9cd74a841e3e234b6d1a4bb6beb8e5cd1b207b..076327f2eff777b2cdbd4e15de8336ce7b03faa6 100644 (file)
@@ -8,9 +8,9 @@
  * On FSL-BookE we setup a 1:1 mapping which covers the first 2GiB of memory
  * and therefore we can only deal with memory within this range
  */
-#define KEXEC_SOURCE_MEMORY_LIMIT      (2 * 1024 * 1024 * 1024UL)
-#define KEXEC_DESTINATION_MEMORY_LIMIT (2 * 1024 * 1024 * 1024UL)
-#define KEXEC_CONTROL_MEMORY_LIMIT     (2 * 1024 * 1024 * 1024UL)
+#define KEXEC_SOURCE_MEMORY_LIMIT      (2 * 1024 * 1024 * 1024UL - 1)
+#define KEXEC_DESTINATION_MEMORY_LIMIT (2 * 1024 * 1024 * 1024UL - 1)
+#define KEXEC_CONTROL_MEMORY_LIMIT     (2 * 1024 * 1024 * 1024UL - 1)
 
 #else
 
diff --git a/arch/powerpc/include/asm/lmb.h b/arch/powerpc/include/asm/lmb.h
deleted file mode 100644 (file)
index 6f5fdf0..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef _ASM_POWERPC_LMB_H
-#define _ASM_POWERPC_LMB_H
-
-#include <asm/udbg.h>
-
-#define LMB_DBG(fmt...) udbg_printf(fmt)
-
-#ifdef CONFIG_PPC32
-extern phys_addr_t lowmem_end_addr;
-#define LMB_REAL_LIMIT lowmem_end_addr
-#else
-#define LMB_REAL_LIMIT 0
-#endif
-
-#endif /* _ASM_POWERPC_LMB_H */
diff --git a/arch/powerpc/include/asm/memblock.h b/arch/powerpc/include/asm/memblock.h
new file mode 100644 (file)
index 0000000..3c29728
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef _ASM_POWERPC_MEMBLOCK_H
+#define _ASM_POWERPC_MEMBLOCK_H
+
+#include <asm/udbg.h>
+
+#define MEMBLOCK_DBG(fmt...) udbg_printf(fmt)
+
+#ifdef CONFIG_PPC32
+extern phys_addr_t lowmem_end_addr;
+#define MEMBLOCK_REAL_LIMIT    lowmem_end_addr
+#else
+#define MEMBLOCK_REAL_LIMIT    0
+#endif
+
+#endif /* _ASM_POWERPC_MEMBLOCK_H */
index 2102b214a87c9ab49b7540962c2faef15251f55c..0e398cfee2c82826b6abad1eb8ece6330df6b0b4 100644 (file)
@@ -250,7 +250,9 @@ extern int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
 int __hash_page_huge(unsigned long ea, unsigned long access, unsigned long vsid,
                     pte_t *ptep, unsigned long trap, int local, int ssize,
                     unsigned int shift, unsigned int mmu_psize);
-
+extern void hash_failure_debug(unsigned long ea, unsigned long access,
+                              unsigned long vsid, unsigned long trap,
+                              int ssize, int psize, unsigned long pte);
 extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
                             unsigned long pstart, unsigned long prot,
                             int psize, int ssize);
index 26e58630ed7bf3d2f618abae3f6a74d7f4350e4b..625942ae55856f8788011bc88f35781b3f178a1b 100644 (file)
@@ -7,7 +7,7 @@
 #include <linux/string.h>
 #include <linux/init.h>
 #include <linux/module.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 
 #include <asm/sections.h>
 #include <asm/prom.h>
index 29df48f2b61a45d27f33301fe350439a94e384f4..417f7b05a9cebc6e10acfaf41eec88d17a2f7e89 100644 (file)
@@ -24,7 +24,7 @@
 #include <linux/init.h>
 #include <linux/irq.h>
 #include <linux/types.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 
 #include <asm/processor.h>
 #include <asm/machdep.h>
index 5fb667a60894dd6238b51db9c13b1caf93fc0253..40f524643ba6f76ed7aa3065ebc053e96f1ad27f 100644 (file)
@@ -13,7 +13,7 @@
 
 #include <linux/crash_dump.h>
 #include <linux/bootmem.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 #include <asm/code-patching.h>
 #include <asm/kdump.h>
 #include <asm/prom.h>
@@ -33,7 +33,7 @@ unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX;
 #ifndef CONFIG_RELOCATABLE
 void __init reserve_kdump_trampoline(void)
 {
-       lmb_reserve(0, KDUMP_RESERVE_LIMIT);
+       memblock_reserve(0, KDUMP_RESERVE_LIMIT);
 }
 
 static void __init create_trampoline(unsigned long addr)
index e7fe218b86978e52b2ff50f9d34c6efbd4b64790..02f724f367533ee60f6512a7453cb0f0e3024fbc 100644 (file)
@@ -71,7 +71,7 @@ static int ppc_swiotlb_bus_notify(struct notifier_block *nb,
        sd->max_direct_dma_addr = 0;
 
        /* May need to bounce if the device can't address all of DRAM */
-       if ((dma_get_mask(dev) + 1) < lmb_end_of_DRAM())
+       if ((dma_get_mask(dev) + 1) < memblock_end_of_DRAM())
                set_dma_ops(dev, &swiotlb_dma_ops);
 
        return NOTIFY_DONE;
index 8d1de6f31d5a6befad3d93715d4ddf338b027b55..84d6367ec0030c6611782902321d39871b9fe278 100644 (file)
@@ -9,7 +9,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/dma-debug.h>
 #include <linux/gfp.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 #include <asm/bug.h>
 #include <asm/abs_addr.h>
 
@@ -89,7 +89,7 @@ static int dma_direct_dma_supported(struct device *dev, u64 mask)
        /* Could be improved so platforms can set the limit in case
         * they have limited DMA windows
         */
-       return mask >= (lmb_end_of_DRAM() - 1);
+       return mask >= (memblock_end_of_DRAM() - 1);
 #else
        return 1;
 #endif
index beb4d78a23049603a7806b1ad2bdbd0c0787226b..a92c79be2728e97bb54433e6c7d49b5917a2dcde 100644 (file)
@@ -205,8 +205,7 @@ next_tlb_setup:
        bdnz+   next_tlb_setup
 
 /* 7. Jump to our 1:1 mapping */
-       li      r6, 0
-
+       mr      r6, r25
 #else
        #error You need to specify the mapping or not use this at all.
 #endif
@@ -217,7 +216,6 @@ next_tlb_setup:
 1:     mflr    r9
        rlwimi  r6,r9,0,20,31
        addi    r6,r6,(2f - 1b)
-       add     r6, r6, r25
        mtspr   SPRN_SRR0,r6
        mtspr   SPRN_SRR1,r7
        rfi                             /* start execution out of TLB1[0] entry */
index bb3d893a8353e99ea751c48a5f369e3f33b74413..89f005116aac941aa28b2792fc212ba95e2122d7 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/kexec.h>
 #include <linux/reboot.h>
 #include <linux/threads.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 #include <linux/of.h>
 #include <asm/machdep.h>
 #include <asm/prom.h>
@@ -66,11 +66,11 @@ void __init reserve_crashkernel(void)
        unsigned long long crash_size, crash_base;
        int ret;
 
-       /* this is necessary because of lmb_phys_mem_size() */
-       lmb_analyze();
+       /* this is necessary because of memblock_phys_mem_size() */
+       memblock_analyze();
 
        /* use common parsing */
-       ret = parse_crashkernel(boot_command_line, lmb_phys_mem_size(),
+       ret = parse_crashkernel(boot_command_line, memblock_phys_mem_size(),
                        &crash_size, &crash_base);
        if (ret == 0 && crash_size > 0) {
                crashk_res.start = crash_base;
@@ -133,9 +133,9 @@ void __init reserve_crashkernel(void)
                        "for crashkernel (System RAM: %ldMB)\n",
                        (unsigned long)(crash_size >> 20),
                        (unsigned long)(crashk_res.start >> 20),
-                       (unsigned long)(lmb_phys_mem_size() >> 20));
+                       (unsigned long)(memblock_phys_mem_size() >> 20));
 
-       lmb_reserve(crashk_res.start, crash_size);
+       memblock_reserve(crashk_res.start, crash_size);
 }
 
 int overlaps_crashkernel(unsigned long start, unsigned long size)
index f88acf0218dbfdbe30dc0f65f20326ae5a38ee7d..139a773853f408dddefffc96b1c6f41debdd421d 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <linux/threads.h>
 #include <linux/module.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 
 #include <asm/firmware.h>
 #include <asm/lppaca.h>
@@ -117,7 +117,7 @@ void __init allocate_pacas(void)
         * the first segment. On iSeries they must be within the area mapped
         * by the HV, which is HvPagesToMap * HVPAGESIZE bytes.
         */
-       limit = min(0x10000000ULL, lmb.rmo_size);
+       limit = min(0x10000000ULL, memblock.rmo_size);
        if (firmware_has_feature(FW_FEATURE_ISERIES))
                limit = min(limit, HvPagesToMap * HVPAGESIZE);
 
@@ -128,7 +128,7 @@ void __init allocate_pacas(void)
 
        paca_size = PAGE_ALIGN(sizeof(struct paca_struct) * nr_cpus);
 
-       paca = __va(lmb_alloc_base(paca_size, PAGE_SIZE, limit));
+       paca = __va(memblock_alloc_base(paca_size, PAGE_SIZE, limit));
        memset(paca, 0, paca_size);
 
        printk(KERN_DEBUG "Allocated %u bytes for %d pacas at %p\n",
@@ -148,7 +148,7 @@ void __init free_unused_pacas(void)
        if (new_size >= paca_size)
                return;
 
-       lmb_free(__pa(paca) + new_size, paca_size - new_size);
+       memblock_free(__pa(paca) + new_size, paca_size - new_size);
 
        printk(KERN_DEBUG "Freed %u bytes for unused pacas\n",
                paca_size - new_size);
index 369872f6cf78aa139564275b714af2f6901af85a..babcceecd2eab6335217d2434c6e91e5c7fe5884 100644 (file)
@@ -566,9 +566,9 @@ static void record_and_restart(struct perf_event *event, unsigned long val,
         * Finally record data if requested.
         */
        if (record) {
-               struct perf_sample_data data = {
-                       .period = event->hw.last_period,
-               };
+               struct perf_sample_data data;
+
+               perf_sample_data_init(&data, 0);
 
                if (perf_event_overflow(event, nmi, &data, regs)) {
                        /*
index 05131d634e7395c6ba4d9599a4f7b68734fe174d..fed9bf6187d1a514e88677b144c5ad1273be8505 100644 (file)
@@ -31,7 +31,7 @@
 #include <linux/kexec.h>
 #include <linux/debugfs.h>
 #include <linux/irq.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 
 #include <asm/prom.h>
 #include <asm/rtas.h>
@@ -98,7 +98,7 @@ static void __init move_device_tree(void)
 
        if ((memory_limit && (start + size) > memory_limit) ||
                        overlaps_crashkernel(start, size)) {
-               p = __va(lmb_alloc_base(size, PAGE_SIZE, lmb.rmo_size));
+               p = __va(memblock_alloc_base(size, PAGE_SIZE, memblock.rmo_size));
                memcpy(p, initial_boot_params, size);
                initial_boot_params = (struct boot_param_header *)p;
                DBG("Moved device tree to 0x%p\n", p);
@@ -411,13 +411,13 @@ static int __init early_init_dt_scan_drconf_memory(unsigned long node)
 {
        __be32 *dm, *ls, *usm;
        unsigned long l, n, flags;
-       u64 base, size, lmb_size;
+       u64 base, size, memblock_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(__be32))
                return 0;
-       lmb_size = dt_mem_next_cell(dt_root_size_cells, &ls);
+       memblock_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(__be32))
@@ -442,11 +442,11 @@ static int __init early_init_dt_scan_drconf_memory(unsigned long node)
                   or if the block is not assigned to this partition (0x8) */
                if ((flags & 0x80) || !(flags & 0x8))
                        continue;
-               size = lmb_size;
+               size = memblock_size;
                rngs = 1;
                if (is_kexec_kdump) {
                        /*
-                        * For each lmb in ibm,dynamic-memory, a corresponding
+                        * For each memblock in ibm,dynamic-memory, a corresponding
                         * entry in linux,drconf-usable-memory property contains
                         * a counter 'p' followed by 'p' (base, size) duple.
                         * Now read the counter from
@@ -469,10 +469,10 @@ static int __init early_init_dt_scan_drconf_memory(unsigned long node)
                                if ((base + size) > 0x80000000ul)
                                        size = 0x80000000ul - base;
                        }
-                       lmb_add(base, size);
+                       memblock_add(base, size);
                } while (--rngs);
        }
-       lmb_dump_all();
+       memblock_dump_all();
        return 0;
 }
 #else
@@ -501,14 +501,14 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
        }
 #endif
 
-       lmb_add(base, size);
+       memblock_add(base, size);
 
        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 memblock_alloc(size, align);
 }
 
 #ifdef CONFIG_BLK_DEV_INITRD
@@ -534,12 +534,12 @@ static void __init early_reserve_mem(void)
        /* before we do anything, lets reserve the dt blob */
        self_base = __pa((unsigned long)initial_boot_params);
        self_size = initial_boot_params->totalsize;
-       lmb_reserve(self_base, self_size);
+       memblock_reserve(self_base, self_size);
 
 #ifdef CONFIG_BLK_DEV_INITRD
        /* then reserve the initrd, if any */
        if (initrd_start && (initrd_end > initrd_start))
-               lmb_reserve(__pa(initrd_start), initrd_end - initrd_start);
+               memblock_reserve(__pa(initrd_start), initrd_end - initrd_start);
 #endif /* CONFIG_BLK_DEV_INITRD */
 
 #ifdef CONFIG_PPC32
@@ -560,7 +560,7 @@ static void __init early_reserve_mem(void)
                        if (base_32 == self_base && size_32 == self_size)
                                continue;
                        DBG("reserving: %x -> %x\n", base_32, size_32);
-                       lmb_reserve(base_32, size_32);
+                       memblock_reserve(base_32, size_32);
                }
                return;
        }
@@ -571,7 +571,7 @@ static void __init early_reserve_mem(void)
                if (size == 0)
                        break;
                DBG("reserving: %llx -> %llx\n", base, size);
-               lmb_reserve(base, size);
+               memblock_reserve(base, size);
        }
 }
 
@@ -594,7 +594,7 @@ static inline unsigned long phyp_dump_calculate_reserve_size(void)
                return phyp_dump_info->reserve_bootvar;
 
        /* divide by 20 to get 5% of value */
-       tmp = lmb_end_of_DRAM();
+       tmp = memblock_end_of_DRAM();
        do_div(tmp, 20);
 
        /* round it down in multiples of 256 */
@@ -633,11 +633,11 @@ static void __init phyp_dump_reserve_mem(void)
        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;
+               size = memblock_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);
+               memblock_reserve(base, size);
 
                phyp_dump_info->init_reserve_start = base;
                phyp_dump_info->init_reserve_size = size;
@@ -645,8 +645,8 @@ static void __init phyp_dump_reserve_mem(void)
                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);
+               base = memblock_end_of_DRAM() - size;
+               memblock_reserve(base, size);
                phyp_dump_info->init_reserve_start = base;
                phyp_dump_info->init_reserve_size = size;
        }
@@ -681,8 +681,8 @@ void __init early_init_devtree(void *params)
         */
        of_scan_flat_dt(early_init_dt_scan_chosen, NULL);
 
-       /* Scan memory nodes and rebuild LMBs */
-       lmb_init();
+       /* Scan memory nodes and rebuild MEMBLOCKs */
+       memblock_init();
        of_scan_flat_dt(early_init_dt_scan_root, NULL);
        of_scan_flat_dt(early_init_dt_scan_memory_ppc, NULL);
 
@@ -690,11 +690,11 @@ void __init early_init_devtree(void *params)
        strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE);
        parse_early_param();
 
-       /* Reserve LMB regions used by kernel, initrd, dt, etc... */
-       lmb_reserve(PHYSICAL_START, __pa(klimit) - PHYSICAL_START);
+       /* Reserve MEMBLOCK regions used by kernel, initrd, dt, etc... */
+       memblock_reserve(PHYSICAL_START, __pa(klimit) - PHYSICAL_START);
        /* If relocatable, reserve first 32k for interrupt vectors etc. */
        if (PHYSICAL_START > MEMORY_START)
-               lmb_reserve(MEMORY_START, 0x8000);
+               memblock_reserve(MEMORY_START, 0x8000);
        reserve_kdump_trampoline();
        reserve_crashkernel();
        early_reserve_mem();
@@ -706,17 +706,17 @@ void __init early_init_devtree(void *params)
 
                /* Ensure that total memory size is page-aligned, because
                 * otherwise mark_bootmem() gets upset. */
-               lmb_analyze();
-               memsize = lmb_phys_mem_size();
+               memblock_analyze();
+               memsize = memblock_phys_mem_size();
                if ((memsize & PAGE_MASK) != memsize)
                        limit = memsize & PAGE_MASK;
        }
-       lmb_enforce_memory_limit(limit);
+       memblock_enforce_memory_limit(limit);
 
-       lmb_analyze();
-       lmb_dump_all();
+       memblock_analyze();
+       memblock_dump_all();
 
-       DBG("Phys. mem: %llx\n", lmb_phys_mem_size());
+       DBG("Phys. mem: %llx\n", memblock_phys_mem_size());
 
        /* We may need to relocate the flat tree, do it now.
         * FIXME .. and the initrd too? */
index 0e1ec6f746f653d568e4b00999ec4453c0e4bc5d..d0516dbee7621a2374f5d34131a74673d17e8a24 100644 (file)
@@ -22,7 +22,7 @@
 #include <linux/smp.h>
 #include <linux/completion.h>
 #include <linux/cpumask.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 #include <linux/slab.h>
 
 #include <asm/prom.h>
@@ -934,11 +934,11 @@ void __init rtas_initialize(void)
         */
 #ifdef CONFIG_PPC64
        if (machine_is(pseries) && firmware_has_feature(FW_FEATURE_LPAR)) {
-               rtas_region = min(lmb.rmo_size, RTAS_INSTANTIATE_MAX);
+               rtas_region = min(memblock.rmo_size, RTAS_INSTANTIATE_MAX);
                ibm_suspend_me_token = rtas_token("ibm,suspend-me");
        }
 #endif
-       rtas_rmo_buf = lmb_alloc_base(RTAS_RMOBUF_MAX, PAGE_SIZE, rtas_region);
+       rtas_rmo_buf = memblock_alloc_base(RTAS_RMOBUF_MAX, PAGE_SIZE, rtas_region);
 
 #ifdef CONFIG_RTAS_ERROR_LOGGING
        rtas_last_error_token = rtas_token("rtas-last-error");
index 5e4d852f640c7f5c6535b9e420ae74da94e942cb..b7e6c7e193ae9141cc0aa6b1c7beb3394240c937 100644 (file)
@@ -33,7 +33,7 @@
 #include <linux/serial_8250.h>
 #include <linux/debugfs.h>
 #include <linux/percpu.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 #include <linux/of_platform.h>
 #include <asm/io.h>
 #include <asm/paca.h>
index 7d84b210f1680de8a41fb23d0ad09a7e19ce905b..a10ffc85ada77cfa802f371725a8d1b86bc7475b 100644 (file)
@@ -16,7 +16,7 @@
 #include <linux/root_dev.h>
 #include <linux/cpu.h>
 #include <linux/console.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 
 #include <asm/io.h>
 #include <asm/prom.h>
@@ -246,12 +246,12 @@ static void __init irqstack_early_init(void)
        unsigned int i;
 
        /* interrupt stacks must be in lowmem, we get that for free on ppc32
-        * as the lmb is limited to lowmem by LMB_REAL_LIMIT */
+        * as the memblock is limited to lowmem by MEMBLOCK_REAL_LIMIT */
        for_each_possible_cpu(i) {
                softirq_ctx[i] = (struct thread_info *)
-                       __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE));
+                       __va(memblock_alloc(THREAD_SIZE, THREAD_SIZE));
                hardirq_ctx[i] = (struct thread_info *)
-                       __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE));
+                       __va(memblock_alloc(THREAD_SIZE, THREAD_SIZE));
        }
 }
 
@@ -261,15 +261,15 @@ static void __init exc_lvl_early_init(void)
        unsigned int i;
 
        /* interrupt stacks must be in lowmem, we get that for free on ppc32
-        * as the lmb is limited to lowmem by LMB_REAL_LIMIT */
+        * as the memblock is limited to lowmem by MEMBLOCK_REAL_LIMIT */
        for_each_possible_cpu(i) {
                critirq_ctx[i] = (struct thread_info *)
-                       __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE));
+                       __va(memblock_alloc(THREAD_SIZE, THREAD_SIZE));
 #ifdef CONFIG_BOOKE
                dbgirq_ctx[i] = (struct thread_info *)
-                       __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE));
+                       __va(memblock_alloc(THREAD_SIZE, THREAD_SIZE));
                mcheckirq_ctx[i] = (struct thread_info *)
-                       __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE));
+                       __va(memblock_alloc(THREAD_SIZE, THREAD_SIZE));
 #endif
        }
 }
index 643dcac40fcbc56c8cc3102a74e76a6aae4381eb..d135f93cb0f63b5d6f52350c4252a94b103f6018 100644 (file)
@@ -34,7 +34,7 @@
 #include <linux/bootmem.h>
 #include <linux/pci.h>
 #include <linux/lockdep.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 #include <asm/io.h>
 #include <asm/kdump.h>
 #include <asm/prom.h>
@@ -158,7 +158,7 @@ static void __init setup_paca(struct paca_struct *new_paca)
  * the CPU that ignores the top 2 bits of the address in real
  * mode so we can access kernel globals normally provided we
  * only toy with things in the RMO region. From here, we do
- * some early parsing of the device-tree to setup out LMB
+ * some early parsing of the device-tree to setup out MEMBLOCK
  * data structures, and allocate & initialize the hash table
  * and segment tables so we can start running with translation
  * enabled.
@@ -404,7 +404,7 @@ void __init setup_system(void)
 
        printk("-----------------------------------------------------\n");
        printk("ppc64_pft_size                = 0x%llx\n", ppc64_pft_size);
-       printk("physicalMemorySize            = 0x%llx\n", lmb_phys_mem_size());
+       printk("physicalMemorySize            = 0x%llx\n", memblock_phys_mem_size());
        if (ppc64_caches.dline_size != 0x80)
                printk("ppc64_caches.dcache_line_size = 0x%x\n",
                       ppc64_caches.dline_size);
@@ -443,10 +443,10 @@ static void __init irqstack_early_init(void)
         */
        for_each_possible_cpu(i) {
                softirq_ctx[i] = (struct thread_info *)
-                       __va(lmb_alloc_base(THREAD_SIZE,
+                       __va(memblock_alloc_base(THREAD_SIZE,
                                            THREAD_SIZE, limit));
                hardirq_ctx[i] = (struct thread_info *)
-                       __va(lmb_alloc_base(THREAD_SIZE,
+                       __va(memblock_alloc_base(THREAD_SIZE,
                                            THREAD_SIZE, limit));
        }
 }
@@ -458,11 +458,11 @@ static void __init exc_lvl_early_init(void)
 
        for_each_possible_cpu(i) {
                critirq_ctx[i] = (struct thread_info *)
-                       __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE));
+                       __va(memblock_alloc(THREAD_SIZE, THREAD_SIZE));
                dbgirq_ctx[i] = (struct thread_info *)
-                       __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE));
+                       __va(memblock_alloc(THREAD_SIZE, THREAD_SIZE));
                mcheckirq_ctx[i] = (struct thread_info *)
-                       __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE));
+                       __va(memblock_alloc(THREAD_SIZE, THREAD_SIZE));
        }
 }
 #else
@@ -487,11 +487,11 @@ static void __init emergency_stack_init(void)
         * bringup, we need to get at them in real mode. This means they
         * must also be within the RMO region.
         */
-       limit = min(slb0_limit(), lmb.rmo_size);
+       limit = min(slb0_limit(), memblock.rmo_size);
 
        for_each_possible_cpu(i) {
                unsigned long sp;
-               sp  = lmb_alloc_base(THREAD_SIZE, THREAD_SIZE, limit);
+               sp  = memblock_alloc_base(THREAD_SIZE, THREAD_SIZE, limit);
                sp += THREAD_SIZE;
                paca[i].emergency_sp = __va(sp);
        }
index d84d19224a95d1338a11fd389ad47acfbfb7f248..13002fe206e7ce16ed79f5ad31e5aec58bc329cb 100644 (file)
@@ -22,7 +22,7 @@
 #include <linux/elf.h>
 #include <linux/security.h>
 #include <linux/bootmem.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 
 #include <asm/pgtable.h>
 #include <asm/system.h>
@@ -734,7 +734,7 @@ static int __init vdso_init(void)
        vdso_data->platform = machine_is(iseries) ? 0x200 : 0x100;
        if (firmware_has_feature(FW_FEATURE_LPAR))
                vdso_data->platform |= 1;
-       vdso_data->physicalMemorySize = lmb_phys_mem_size();
+       vdso_data->physicalMemorySize = memblock_phys_mem_size();
        vdso_data->dcache_size = ppc64_caches.dsize;
        vdso_data->dcache_line_size = ppc64_caches.dline_size;
        vdso_data->icache_size = ppc64_caches.isize;
index 65abfcfaaa9e72be187902357b3d29577fd06d28..1dc2fa5ce1bda72b05df8db2e4d249cfcc8642ab 100644 (file)
@@ -135,7 +135,7 @@ unsigned long __init mmu_mapin_ram(unsigned long top)
        /* If the size of RAM is not an exact power of two, we may not
         * have covered RAM in its entirety with 16 and 4 MiB
         * pages. Consequently, restrict the top end of RAM currently
-        * allocable so that calls to the LMB to allocate PTEs for "tail"
+        * allocable so that calls to the MEMBLOCK to allocate PTEs for "tail"
         * coverage with normal-sized pages (or other reasons) do not
         * attempt to allocate outside the allowed range.
         */
index a719f53921a57c390503b708c38cb4e1146a176b..3079f6b44cf531e5f1dafc8fa9e9a9e38e59dc15 100644 (file)
@@ -68,9 +68,6 @@ _GLOBAL(__hash_page_4K)
        std     r8,STK_PARM(r8)(r1)
        std     r9,STK_PARM(r9)(r1)
        
-       /* Add _PAGE_PRESENT to access */
-       ori     r4,r4,_PAGE_PRESENT
-
        /* Save non-volatile registers.
         * r31 will hold "old PTE"
         * r30 is "new PTE"
@@ -347,9 +344,6 @@ _GLOBAL(__hash_page_4K)
        std     r8,STK_PARM(r8)(r1)
        std     r9,STK_PARM(r9)(r1)
 
-       /* Add _PAGE_PRESENT to access */
-       ori     r4,r4,_PAGE_PRESENT
-
        /* Save non-volatile registers.
         * r31 will hold "old PTE"
         * r30 is "new PTE"
@@ -687,9 +681,6 @@ _GLOBAL(__hash_page_64K)
        std     r8,STK_PARM(r8)(r1)
        std     r9,STK_PARM(r9)(r1)
 
-       /* Add _PAGE_PRESENT to access */
-       ori     r4,r4,_PAGE_PRESENT
-
        /* Save non-volatile registers.
         * r31 will hold "old PTE"
         * r30 is "new PTE"
index 3ecdcec0a39e11403c792b66740c5a87648bb765..09dffe6efa46aeae84d62a922215f87fe0a8ca2d 100644 (file)
@@ -31,7 +31,7 @@
 #include <linux/cache.h>
 #include <linux/init.h>
 #include <linux/signal.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 
 #include <asm/processor.h>
 #include <asm/pgtable.h>
@@ -384,8 +384,8 @@ static int __init htab_dt_scan_hugepage_blocks(unsigned long node,
        printk(KERN_INFO "Huge page(16GB) memory: "
                        "addr = 0x%lX size = 0x%lX pages = %d\n",
                        phys_addr, block_size, expected_pages);
-       if (phys_addr + (16 * GB) <= lmb_end_of_DRAM()) {
-               lmb_reserve(phys_addr, block_size * expected_pages);
+       if (phys_addr + (16 * GB) <= memblock_end_of_DRAM()) {
+               memblock_reserve(phys_addr, block_size * expected_pages);
                add_gpage(phys_addr, block_size, expected_pages);
        }
        return 0;
@@ -458,7 +458,7 @@ static void __init htab_init_page_sizes(void)
         * and we have at least 1G of RAM at boot
         */
        if (mmu_psize_defs[MMU_PAGE_16M].shift &&
-           lmb_phys_mem_size() >= 0x40000000)
+           memblock_phys_mem_size() >= 0x40000000)
                mmu_vmemmap_psize = MMU_PAGE_16M;
        else if (mmu_psize_defs[MMU_PAGE_64K].shift)
                mmu_vmemmap_psize = MMU_PAGE_64K;
@@ -520,7 +520,7 @@ static unsigned long __init htab_get_table_size(void)
                return 1UL << ppc64_pft_size;
 
        /* round mem_size up to next power of 2 */
-       mem_size = lmb_phys_mem_size();
+       mem_size = memblock_phys_mem_size();
        rnd_mem_size = 1UL << __ilog2(mem_size);
        if (rnd_mem_size < mem_size)
                rnd_mem_size <<= 1;
@@ -627,7 +627,7 @@ static void __init htab_initialize(void)
                else
                        limit = 0;
 
-               table = lmb_alloc_base(htab_size_bytes, htab_size_bytes, limit);
+               table = memblock_alloc_base(htab_size_bytes, htab_size_bytes, limit);
 
                DBG("Hash table allocated at %lx, size: %lx\n", table,
                    htab_size_bytes);
@@ -647,9 +647,9 @@ static void __init htab_initialize(void)
        prot = pgprot_val(PAGE_KERNEL);
 
 #ifdef CONFIG_DEBUG_PAGEALLOC
-       linear_map_hash_count = lmb_end_of_DRAM() >> PAGE_SHIFT;
-       linear_map_hash_slots = __va(lmb_alloc_base(linear_map_hash_count,
-                                                   1, lmb.rmo_size));
+       linear_map_hash_count = memblock_end_of_DRAM() >> PAGE_SHIFT;
+       linear_map_hash_slots = __va(memblock_alloc_base(linear_map_hash_count,
+                                                   1, memblock.rmo_size));
        memset(linear_map_hash_slots, 0, linear_map_hash_count);
 #endif /* CONFIG_DEBUG_PAGEALLOC */
 
@@ -659,16 +659,16 @@ static void __init htab_initialize(void)
         */
 
        /* create bolted the linear mapping in the hash table */
-       for (i=0; i < lmb.memory.cnt; i++) {
-               base = (unsigned long)__va(lmb.memory.region[i].base);
-               size = lmb.memory.region[i].size;
+       for (i=0; i < memblock.memory.cnt; i++) {
+               base = (unsigned long)__va(memblock.memory.region[i].base);
+               size = memblock.memory.region[i].size;
 
                DBG("creating mapping for region: %lx..%lx (prot: %lx)\n",
                    base, size, prot);
 
 #ifdef CONFIG_U3_DART
                /* Do not map the DART space. Fortunately, it will be aligned
-                * in such a way that it will not cross two lmb regions and
+                * in such a way that it will not cross two memblock regions and
                 * will fit within a single 16Mb page.
                 * The DART space is assumed to be a full 16Mb region even if
                 * we only use 2Mb of that space. We will use more of it later
@@ -871,6 +871,18 @@ static inline int subpage_protection(struct mm_struct *mm, unsigned long ea)
 }
 #endif
 
+void hash_failure_debug(unsigned long ea, unsigned long access,
+                       unsigned long vsid, unsigned long trap,
+                       int ssize, int psize, unsigned long pte)
+{
+       if (!printk_ratelimit())
+               return;
+       pr_info("mm: Hashing failure ! EA=0x%lx access=0x%lx current=%s\n",
+               ea, access, current->comm);
+       pr_info("    trap=0x%lx vsid=0x%lx ssize=%d psize=%d pte=0x%lx\n",
+               trap, vsid, ssize, psize, pte);
+}
+
 /* Result code is:
  *  0 - handled
  *  1 - normal page fault
@@ -955,6 +967,17 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
                return 1;
        }
 
+       /* Add _PAGE_PRESENT to the required access perm */
+       access |= _PAGE_PRESENT;
+
+       /* Pre-check access permissions (will be re-checked atomically
+        * in __hash_page_XX but this pre-check is a fast path
+        */
+       if (access & ~pte_val(*ptep)) {
+               DBG_LOW(" no access !\n");
+               return 1;
+       }
+
 #ifdef CONFIG_HUGETLB_PAGE
        if (hugeshift)
                return __hash_page_huge(ea, access, vsid, ptep, trap, local,
@@ -967,14 +990,6 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
        DBG_LOW(" i-pte: %016lx %016lx\n", pte_val(*ptep),
                pte_val(*(ptep + PTRS_PER_PTE)));
 #endif
-       /* Pre-check access permissions (will be re-checked atomically
-        * in __hash_page_XX but this pre-check is a fast path
-        */
-       if (access & ~pte_val(*ptep)) {
-               DBG_LOW(" no access !\n");
-               return 1;
-       }
-
        /* Do actual hashing */
 #ifdef CONFIG_PPC_64K_PAGES
        /* If _PAGE_4K_PFN is set, make sure this is a 4k segment */
@@ -1033,6 +1048,12 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
                                            local, ssize, spp);
        }
 
+       /* Dump some info in case of hash insertion failure, they should
+        * never happen so it is really useful to know if/when they do
+        */
+       if (rc == -1)
+               hash_failure_debug(ea, access, vsid, trap, ssize, psize,
+                                  pte_val(*ptep));
 #ifndef CONFIG_PPC_64K_PAGES
        DBG_LOW(" o-pte: %016lx\n", pte_val(*ptep));
 #else
@@ -1051,8 +1072,7 @@ void hash_preload(struct mm_struct *mm, unsigned long ea,
        void *pgdir;
        pte_t *ptep;
        unsigned long flags;
-       int local = 0;
-       int ssize;
+       int rc, ssize, local = 0;
 
        BUG_ON(REGION_ID(ea) != USER_REGION_ID);
 
@@ -1098,11 +1118,18 @@ void hash_preload(struct mm_struct *mm, unsigned long ea,
        /* Hash it in */
 #ifdef CONFIG_PPC_HAS_HASH_64K
        if (mm->context.user_psize == MMU_PAGE_64K)
-               __hash_page_64K(ea, access, vsid, ptep, trap, local, ssize);
+               rc = __hash_page_64K(ea, access, vsid, ptep, trap, local, ssize);
        else
 #endif /* CONFIG_PPC_HAS_HASH_64K */
-               __hash_page_4K(ea, access, vsid, ptep, trap, local, ssize,
-                              subpage_protection(pgdir, ea));
+               rc = __hash_page_4K(ea, access, vsid, ptep, trap, local, ssize,
+                                   subpage_protection(pgdir, ea));
+
+       /* Dump some info in case of hash insertion failure, they should
+        * never happen so it is really useful to know if/when they do
+        */
+       if (rc == -1)
+               hash_failure_debug(ea, access, vsid, trap, ssize,
+                                  mm->context.user_psize, pte_val(*ptep));
 
        local_irq_restore(flags);
 }
index 199539882f927620d6a435b92241e1f08f9aa4a1..cc5c273086cf833e28bc89a91bb814b09c16a4e4 100644 (file)
@@ -21,21 +21,13 @@ int __hash_page_huge(unsigned long ea, unsigned long access, unsigned long vsid,
        unsigned long old_pte, new_pte;
        unsigned long va, rflags, pa, sz;
        long slot;
-       int err = 1;
 
        BUG_ON(shift != mmu_psize_defs[mmu_psize].shift);
 
        /* Search the Linux page table for a match with va */
        va = hpt_va(ea, vsid, ssize);
 
-       /*
-        * Check the user's access rights to the page.  If access should be
-        * prevented then send the problem up to do_page_fault.
-        */
-       if (unlikely(access & ~pte_val(*ptep)))
-               goto out;
-       /*
-        * At this point, we have a pte (old_pte) which can be used to build
+       /* At this point, we have a pte (old_pte) which can be used to build
         * or update an HPTE. There are 2 cases:
         *
         * 1. There is a valid (present) pte with no associated HPTE (this is
@@ -49,9 +41,17 @@ int __hash_page_huge(unsigned long ea, unsigned long access, unsigned long vsid,
 
        do {
                old_pte = pte_val(*ptep);
-               if (old_pte & _PAGE_BUSY)
-                       goto out;
+               /* If PTE busy, retry the access */
+               if (unlikely(old_pte & _PAGE_BUSY))
+                       return 0;
+               /* If PTE permissions don't match, take page fault */
+               if (unlikely(access & ~old_pte))
+                       return 1;
+               /* Try to lock the PTE, add ACCESSED and DIRTY if it was
+                * a write access */
                new_pte = old_pte | _PAGE_BUSY | _PAGE_ACCESSED;
+               if (access & _PAGE_RW)
+                       new_pte |= _PAGE_DIRTY;
        } while(old_pte != __cmpxchg_u64((unsigned long *)ptep,
                                         old_pte, new_pte));
 
@@ -121,8 +121,16 @@ repeat:
                         }
                }
 
-               if (unlikely(slot == -2))
-                       panic("hash_huge_page: pte_insert failed\n");
+               /*
+                * Hypervisor failure. Restore old pte and return -1
+                * similar to __hash_page_*
+                */
+               if (unlikely(slot == -2)) {
+                       *ptep = __pte(old_pte);
+                       hash_failure_debug(ea, access, vsid, trap, ssize,
+                                          mmu_psize, old_pte);
+                       return -1;
+               }
 
                new_pte |= (slot << 12) & (_PAGE_F_SECOND | _PAGE_F_GIX);
        }
@@ -131,9 +139,5 @@ repeat:
         * No need to use ldarx/stdcx here
         */
        *ptep = __pte(new_pte & ~_PAGE_BUSY);
-
-       err = 0;
-
- out:
-       return err;
+       return 0;
 }
index 767333005eb46e1d1075dbfe6674d5ef7eca3fbe..6a6975dc265427bf39c15979374c52501755aa3c 100644 (file)
@@ -30,7 +30,7 @@
 #include <linux/highmem.h>
 #include <linux/initrd.h>
 #include <linux/pagemap.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 #include <linux/gfp.h>
 
 #include <asm/pgalloc.h>
@@ -136,17 +136,17 @@ void __init MMU_init(void)
        /* parse args from command line */
        MMU_setup();
 
-       if (lmb.memory.cnt > 1) {
+       if (memblock.memory.cnt > 1) {
 #ifndef CONFIG_WII
-               lmb.memory.cnt = 1;
-               lmb_analyze();
+               memblock.memory.cnt = 1;
+               memblock_analyze();
                printk(KERN_WARNING "Only using first contiguous memory region");
 #else
                wii_memory_fixups();
 #endif
        }
 
-       total_lowmem = total_memory = lmb_end_of_DRAM() - memstart_addr;
+       total_lowmem = total_memory = memblock_end_of_DRAM() - memstart_addr;
        lowmem_end_addr = memstart_addr + total_lowmem;
 
 #ifdef CONFIG_FSL_BOOKE
@@ -161,8 +161,8 @@ void __init MMU_init(void)
                lowmem_end_addr = memstart_addr + total_lowmem;
 #ifndef CONFIG_HIGHMEM
                total_memory = total_lowmem;
-               lmb_enforce_memory_limit(lowmem_end_addr);
-               lmb_analyze();
+               memblock_enforce_memory_limit(lowmem_end_addr);
+               memblock_analyze();
 #endif /* CONFIG_HIGHMEM */
        }
 
@@ -200,7 +200,7 @@ void __init *early_get_page(void)
        if (init_bootmem_done) {
                p = alloc_bootmem_pages(PAGE_SIZE);
        } else {
-               p = __va(lmb_alloc_base(PAGE_SIZE, PAGE_SIZE,
+               p = __va(memblock_alloc_base(PAGE_SIZE, PAGE_SIZE,
                                        __initial_memory_limit_addr));
        }
        return p;
index e267f223fdffbb42f83511bb8da6f878b3382821..71f1415e2472399049a2273eded9c4fb8d173265 100644 (file)
@@ -40,7 +40,7 @@
 #include <linux/nodemask.h>
 #include <linux/module.h>
 #include <linux/poison.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 #include <linux/hugetlb.h>
 #include <linux/slab.h>
 
index 0f594d774bf7c034975ab4f20bcdf7199981aba3..1a84a8d0000503b495ff2d79355f4f756e80591a 100644 (file)
@@ -32,7 +32,7 @@
 #include <linux/initrd.h>
 #include <linux/pagemap.h>
 #include <linux/suspend.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 #include <linux/hugetlb.h>
 
 #include <asm/pgalloc.h>
@@ -83,13 +83,13 @@ int page_is_ram(unsigned long pfn)
 #else
        unsigned long paddr = (pfn << PAGE_SHIFT);
        int i;
-       for (i=0; i < lmb.memory.cnt; i++) {
+       for (i=0; i < memblock.memory.cnt; i++) {
                unsigned long base;
 
-               base = lmb.memory.region[i].base;
+               base = memblock.memory.region[i].base;
 
                if ((paddr >= base) &&
-                       (paddr < (base + lmb.memory.region[i].size))) {
+                       (paddr < (base + memblock.memory.region[i].size))) {
                        return 1;
                }
        }
@@ -142,14 +142,14 @@ int arch_add_memory(int nid, u64 start, u64 size)
 /*
  * walk_memory_resource() needs to make sure there is no holes in a given
  * memory range.  PPC64 does not maintain the memory layout in /proc/iomem.
- * Instead it maintains it in lmb.memory structures.  Walk through the
+ * Instead it maintains it in memblock.memory structures.  Walk through the
  * memory regions, find holes and callback for contiguous regions.
  */
 int
 walk_system_ram_range(unsigned long start_pfn, unsigned long nr_pages,
                void *arg, int (*func)(unsigned long, unsigned long, void *))
 {
-       struct lmb_property res;
+       struct memblock_property res;
        unsigned long pfn, len;
        u64 end;
        int ret = -1;
@@ -158,7 +158,7 @@ walk_system_ram_range(unsigned long start_pfn, unsigned long nr_pages,
        res.size = (u64) nr_pages << PAGE_SHIFT;
 
        end = res.base + res.size - 1;
-       while ((res.base < end) && (lmb_find(&res) >= 0)) {
+       while ((res.base < end) && (memblock_find(&res) >= 0)) {
                pfn = (unsigned long)(res.base >> PAGE_SHIFT);
                len = (unsigned long)(res.size >> PAGE_SHIFT);
                ret = (*func)(pfn, len, arg);
@@ -184,8 +184,8 @@ void __init do_init_bootmem(void)
        unsigned long total_pages;
        int boot_mapsize;
 
-       max_low_pfn = max_pfn = lmb_end_of_DRAM() >> PAGE_SHIFT;
-       total_pages = (lmb_end_of_DRAM() - memstart_addr) >> PAGE_SHIFT;
+       max_low_pfn = max_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT;
+       total_pages = (memblock_end_of_DRAM() - memstart_addr) >> PAGE_SHIFT;
 #ifdef CONFIG_HIGHMEM
        total_pages = total_lowmem >> PAGE_SHIFT;
        max_low_pfn = lowmem_end_addr >> PAGE_SHIFT;
@@ -198,16 +198,16 @@ void __init do_init_bootmem(void)
         */
        bootmap_pages = bootmem_bootmap_pages(total_pages);
 
-       start = lmb_alloc(bootmap_pages << PAGE_SHIFT, PAGE_SIZE);
+       start = memblock_alloc(bootmap_pages << PAGE_SHIFT, PAGE_SIZE);
 
        min_low_pfn = MEMORY_START >> PAGE_SHIFT;
        boot_mapsize = init_bootmem_node(NODE_DATA(0), start >> PAGE_SHIFT, min_low_pfn, max_low_pfn);
 
        /* Add active regions with valid PFNs */
-       for (i = 0; i < lmb.memory.cnt; i++) {
+       for (i = 0; i < memblock.memory.cnt; i++) {
                unsigned long start_pfn, end_pfn;
-               start_pfn = lmb.memory.region[i].base >> PAGE_SHIFT;
-               end_pfn = start_pfn + lmb_size_pages(&lmb.memory, i);
+               start_pfn = memblock.memory.region[i].base >> PAGE_SHIFT;
+               end_pfn = start_pfn + memblock_size_pages(&memblock.memory, i);
                add_active_range(0, start_pfn, end_pfn);
        }
 
@@ -218,17 +218,17 @@ void __init do_init_bootmem(void)
        free_bootmem_with_active_regions(0, lowmem_end_addr >> PAGE_SHIFT);
 
        /* reserve the sections we're already using */
-       for (i = 0; i < lmb.reserved.cnt; i++) {
-               unsigned long addr = lmb.reserved.region[i].base +
-                                    lmb_size_bytes(&lmb.reserved, i) - 1;
+       for (i = 0; i < memblock.reserved.cnt; i++) {
+               unsigned long addr = memblock.reserved.region[i].base +
+                                    memblock_size_bytes(&memblock.reserved, i) - 1;
                if (addr < lowmem_end_addr)
-                       reserve_bootmem(lmb.reserved.region[i].base,
-                                       lmb_size_bytes(&lmb.reserved, i),
+                       reserve_bootmem(memblock.reserved.region[i].base,
+                                       memblock_size_bytes(&memblock.reserved, i),
                                        BOOTMEM_DEFAULT);
-               else if (lmb.reserved.region[i].base < lowmem_end_addr) {
+               else if (memblock.reserved.region[i].base < lowmem_end_addr) {
                        unsigned long adjusted_size = lowmem_end_addr -
-                                     lmb.reserved.region[i].base;
-                       reserve_bootmem(lmb.reserved.region[i].base,
+                                     memblock.reserved.region[i].base;
+                       reserve_bootmem(memblock.reserved.region[i].base,
                                        adjusted_size, BOOTMEM_DEFAULT);
                }
        }
@@ -236,9 +236,9 @@ void __init do_init_bootmem(void)
        free_bootmem_with_active_regions(0, max_pfn);
 
        /* reserve the sections we're already using */
-       for (i = 0; i < lmb.reserved.cnt; i++)
-               reserve_bootmem(lmb.reserved.region[i].base,
-                               lmb_size_bytes(&lmb.reserved, i),
+       for (i = 0; i < memblock.reserved.cnt; i++)
+               reserve_bootmem(memblock.reserved.region[i].base,
+                               memblock_size_bytes(&memblock.reserved, i),
                                BOOTMEM_DEFAULT);
 
 #endif
@@ -251,20 +251,20 @@ void __init do_init_bootmem(void)
 /* mark pages that don't exist as nosave */
 static int __init mark_nonram_nosave(void)
 {
-       unsigned long lmb_next_region_start_pfn,
-                     lmb_region_max_pfn;
+       unsigned long memblock_next_region_start_pfn,
+                     memblock_region_max_pfn;
        int i;
 
-       for (i = 0; i < lmb.memory.cnt - 1; i++) {
-               lmb_region_max_pfn =
-                       (lmb.memory.region[i].base >> PAGE_SHIFT) +
-                       (lmb.memory.region[i].size >> PAGE_SHIFT);
-               lmb_next_region_start_pfn =
-                       lmb.memory.region[i+1].base >> PAGE_SHIFT;
+       for (i = 0; i < memblock.memory.cnt - 1; i++) {
+               memblock_region_max_pfn =
+                       (memblock.memory.region[i].base >> PAGE_SHIFT) +
+                       (memblock.memory.region[i].size >> PAGE_SHIFT);
+               memblock_next_region_start_pfn =
+                       memblock.memory.region[i+1].base >> PAGE_SHIFT;
 
-               if (lmb_region_max_pfn < lmb_next_region_start_pfn)
-                       register_nosave_region(lmb_region_max_pfn,
-                                              lmb_next_region_start_pfn);
+               if (memblock_region_max_pfn < memblock_next_region_start_pfn)
+                       register_nosave_region(memblock_region_max_pfn,
+                                              memblock_next_region_start_pfn);
        }
 
        return 0;
@@ -275,8 +275,8 @@ static int __init mark_nonram_nosave(void)
  */
 void __init paging_init(void)
 {
-       unsigned long total_ram = lmb_phys_mem_size();
-       phys_addr_t top_of_ram = lmb_end_of_DRAM();
+       unsigned long total_ram = memblock_phys_mem_size();
+       phys_addr_t top_of_ram = memblock_end_of_DRAM();
        unsigned long max_zone_pfns[MAX_NR_ZONES];
 
 #ifdef CONFIG_PPC32
@@ -327,7 +327,7 @@ void __init mem_init(void)
                swiotlb_init(1);
 #endif
 
-       num_physpages = lmb.memory.size >> PAGE_SHIFT;
+       num_physpages = memblock.memory.size >> PAGE_SHIFT;
        high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
 
 #ifdef CONFIG_NEED_MULTIPLE_NODES
@@ -364,7 +364,7 @@ void __init mem_init(void)
                highmem_mapnr = lowmem_end_addr >> PAGE_SHIFT;
                for (pfn = highmem_mapnr; pfn < max_mapnr; ++pfn) {
                        struct page *page = pfn_to_page(pfn);
-                       if (lmb_is_reserved(pfn << PAGE_SHIFT))
+                       if (memblock_is_reserved(pfn << PAGE_SHIFT))
                                continue;
                        ClearPageReserved(page);
                        init_page_count(page);
index 80d110635d24a106d7c6f0ee204438abaf56025e..aa731af720c04e4816f0e9826d7f05109631bccb 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/nodemask.h>
 #include <linux/cpu.h>
 #include <linux/notifier.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 #include <linux/of.h>
 #include <linux/pfn.h>
 #include <asm/sparsemem.h>
@@ -351,7 +351,7 @@ struct of_drconf_cell {
 #define DRCONF_MEM_RESERVED    0x00000080
 
 /*
- * Read the next lmb list entry from the ibm,dynamic-memory property
+ * Read the next memblock list entry from the ibm,dynamic-memory property
  * and return the information in the provided of_drconf_cell structure.
  */
 static void read_drconf_cell(struct of_drconf_cell *drmem, const u32 **cellp)
@@ -372,8 +372,8 @@ static void read_drconf_cell(struct of_drconf_cell *drmem, const u32 **cellp)
 /*
  * Retreive and validate the ibm,dynamic-memory property of the device tree.
  *
- * The layout of the ibm,dynamic-memory property is a number N of lmb
- * list entries followed by N lmb list entries.  Each lmb list entry
+ * The layout of the ibm,dynamic-memory property is a number N of memblock
+ * list entries followed by N memblock list entries.  Each memblock list entry
  * contains information as layed out in the of_drconf_cell struct above.
  */
 static int of_get_drconf_memory(struct device_node *memory, const u32 **dm)
@@ -540,19 +540,19 @@ static unsigned long __init numa_enforce_memory_limit(unsigned long start,
                                                      unsigned long size)
 {
        /*
-        * We use lmb_end_of_DRAM() in here instead of memory_limit because
+        * We use memblock_end_of_DRAM() in here instead of memory_limit because
         * we've already adjusted it for the limit and it takes care of
         * having memory holes below the limit.  Also, in the case of
         * iommu_is_off, memory_limit is not set but is implicitly enforced.
         */
 
-       if (start + size <= lmb_end_of_DRAM())
+       if (start + size <= memblock_end_of_DRAM())
                return size;
 
-       if (start >= lmb_end_of_DRAM())
+       if (start >= memblock_end_of_DRAM())
                return 0;
 
-       return lmb_end_of_DRAM() - start;
+       return memblock_end_of_DRAM() - start;
 }
 
 /*
@@ -731,7 +731,7 @@ new_range:
        }
 
        /*
-        * Now do the same thing for each LMB listed in the ibm,dynamic-memory
+        * Now do the same thing for each MEMBLOCK listed in the ibm,dynamic-memory
         * property in the ibm,dynamic-reconfiguration-memory node.
         */
        memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory");
@@ -743,8 +743,8 @@ new_range:
 
 static void __init setup_nonnuma(void)
 {
-       unsigned long top_of_ram = lmb_end_of_DRAM();
-       unsigned long total_ram = lmb_phys_mem_size();
+       unsigned long top_of_ram = memblock_end_of_DRAM();
+       unsigned long total_ram = memblock_phys_mem_size();
        unsigned long start_pfn, end_pfn;
        unsigned int i, nid = 0;
 
@@ -753,9 +753,9 @@ static void __init setup_nonnuma(void)
        printk(KERN_DEBUG "Memory hole size: %ldMB\n",
               (top_of_ram - total_ram) >> 20);
 
-       for (i = 0; i < lmb.memory.cnt; ++i) {
-               start_pfn = lmb.memory.region[i].base >> PAGE_SHIFT;
-               end_pfn = start_pfn + lmb_size_pages(&lmb.memory, i);
+       for (i = 0; i < memblock.memory.cnt; ++i) {
+               start_pfn = memblock.memory.region[i].base >> PAGE_SHIFT;
+               end_pfn = start_pfn + memblock_size_pages(&memblock.memory, i);
 
                fake_numa_create_new_node(end_pfn, &nid);
                add_active_range(nid, start_pfn, end_pfn);
@@ -813,7 +813,7 @@ static void __init dump_numa_memory_topology(void)
 
                count = 0;
 
-               for (i = 0; i < lmb_end_of_DRAM();
+               for (i = 0; i < memblock_end_of_DRAM();
                     i += (1 << SECTION_SIZE_BITS)) {
                        if (early_pfn_to_nid(i >> PAGE_SHIFT) == node) {
                                if (count == 0)
@@ -833,7 +833,7 @@ static void __init dump_numa_memory_topology(void)
 }
 
 /*
- * Allocate some memory, satisfying the lmb or bootmem allocator where
+ * Allocate some memory, satisfying the memblock or bootmem allocator where
  * required. nid is the preferred node and end is the physical address of
  * the highest address in the node.
  *
@@ -847,11 +847,11 @@ static void __init *careful_zallocation(int nid, unsigned long size,
        int new_nid;
        unsigned long ret_paddr;
 
-       ret_paddr = __lmb_alloc_base(size, align, end_pfn << PAGE_SHIFT);
+       ret_paddr = __memblock_alloc_base(size, align, end_pfn << PAGE_SHIFT);
 
        /* retry over all memory */
        if (!ret_paddr)
-               ret_paddr = __lmb_alloc_base(size, align, lmb_end_of_DRAM());
+               ret_paddr = __memblock_alloc_base(size, align, memblock_end_of_DRAM());
 
        if (!ret_paddr)
                panic("numa.c: cannot allocate %lu bytes for node %d",
@@ -861,14 +861,14 @@ static void __init *careful_zallocation(int nid, unsigned long size,
 
        /*
         * We initialize the nodes in numeric order: 0, 1, 2...
-        * and hand over control from the LMB allocator to the
+        * and hand over control from the MEMBLOCK allocator to the
         * bootmem allocator.  If this function is called for
         * node 5, then we know that all nodes <5 are using the
-        * bootmem allocator instead of the LMB allocator.
+        * bootmem allocator instead of the MEMBLOCK allocator.
         *
         * So, check the nid from which this allocation came
         * and double check to see if we need to use bootmem
-        * instead of the LMB.  We don't free the LMB memory
+        * instead of the MEMBLOCK.  We don't free the MEMBLOCK memory
         * since it would be useless.
         */
        new_nid = early_pfn_to_nid(ret_paddr >> PAGE_SHIFT);
@@ -893,9 +893,9 @@ static void mark_reserved_regions_for_nid(int nid)
        struct pglist_data *node = NODE_DATA(nid);
        int i;
 
-       for (i = 0; i < lmb.reserved.cnt; i++) {
-               unsigned long physbase = lmb.reserved.region[i].base;
-               unsigned long size = lmb.reserved.region[i].size;
+       for (i = 0; i < memblock.reserved.cnt; i++) {
+               unsigned long physbase = memblock.reserved.region[i].base;
+               unsigned long size = memblock.reserved.region[i].size;
                unsigned long start_pfn = physbase >> PAGE_SHIFT;
                unsigned long end_pfn = PFN_UP(physbase + size);
                struct node_active_region node_ar;
@@ -903,7 +903,7 @@ static void mark_reserved_regions_for_nid(int nid)
                                             node->node_spanned_pages;
 
                /*
-                * Check to make sure that this lmb.reserved area is
+                * Check to make sure that this memblock.reserved area is
                 * within the bounds of the node that we care about.
                 * Checking the nid of the start and end points is not
                 * sufficient because the reserved area could span the
@@ -961,7 +961,7 @@ void __init do_init_bootmem(void)
        int nid;
 
        min_low_pfn = 0;
-       max_low_pfn = lmb_end_of_DRAM() >> PAGE_SHIFT;
+       max_low_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT;
        max_pfn = max_low_pfn;
 
        if (parse_numa_properties())
@@ -1038,7 +1038,7 @@ void __init paging_init(void)
 {
        unsigned long max_zone_pfns[MAX_NR_ZONES];
        memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
-       max_zone_pfns[ZONE_DMA] = lmb_end_of_DRAM() >> PAGE_SHIFT;
+       max_zone_pfns[ZONE_DMA] = memblock_end_of_DRAM() >> PAGE_SHIFT;
        free_area_init_nodes(max_zone_pfns);
 }
 
@@ -1113,7 +1113,7 @@ static int hot_add_drconf_scn_to_nid(struct device_node *memory,
 /*
  * Find the node associated with a hot added memory section for memory
  * represented in the device tree as a node (i.e. memory@XXXX) for
- * each lmb.
+ * each memblock.
  */
 int hot_add_node_scn_to_nid(unsigned long scn_addr)
 {
@@ -1154,8 +1154,8 @@ int hot_add_node_scn_to_nid(unsigned long scn_addr)
 
 /*
  * Find the node associated with a hot added memory section.  Section
- * corresponds to a SPARSEMEM section, not an LMB.  It is assumed that
- * sections are fully contained within a single LMB.
+ * corresponds to a SPARSEMEM section, not an MEMBLOCK.  It is assumed that
+ * sections are fully contained within a single MEMBLOCK.
  */
 int hot_add_scn_to_nid(unsigned long scn_addr)
 {
index 34347b2e7e313995c803d34c847034dff7a9c1cf..a87ead0138b45b3203128b81718be17c4a7158bf 100644 (file)
@@ -26,7 +26,7 @@
 #include <linux/vmalloc.h>
 #include <linux/init.h>
 #include <linux/highmem.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 #include <linux/slab.h>
 
 #include <asm/pgtable.h>
@@ -198,7 +198,7 @@ __ioremap_caller(phys_addr_t addr, unsigned long size, unsigned long flags,
         * mem_init() sets high_memory so only do the check after that.
         */
        if (mem_init_done && (p < virt_to_phys(high_memory)) &&
-           !(__allow_ioremap_reserved && lmb_is_region_reserved(p, size))) {
+           !(__allow_ioremap_reserved && memblock_is_region_reserved(p, size))) {
                printk("__ioremap(): phys addr 0x%llx is RAM lr %p\n",
                       (unsigned long long)p, __builtin_return_address(0));
                return NULL;
@@ -331,7 +331,7 @@ void __init mapin_ram(void)
                s = mmu_mapin_ram(top);
                __mapin_ram_chunk(s, top);
 
-               top = lmb_end_of_DRAM();
+               top = memblock_end_of_DRAM();
                s = wii_mmu_mapin_mem2(top);
                __mapin_ram_chunk(s, top);
        }
index d050fc8d9714830ce3cea027465f794864a8a830..21d6dfab7942f73e345a22c418ec4a5ee526edc6 100644 (file)
@@ -34,7 +34,7 @@
 #include <linux/vmalloc.h>
 #include <linux/init.h>
 #include <linux/bootmem.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 #include <linux/slab.h>
 
 #include <asm/pgalloc.h>
@@ -67,7 +67,7 @@ static void *early_alloc_pgtable(unsigned long size)
        if (init_bootmem_done)
                pt = __alloc_bootmem(size, size, __pa(MAX_DMA_ADDRESS));
        else
-               pt = __va(lmb_alloc_base(size, size,
+               pt = __va(memblock_alloc_base(size, size,
                                         __pa(MAX_DMA_ADDRESS)));
        memset(pt, 0, size);
 
index f11c2cdcb0fedd9a1afb89222ed4e6f6a9037116..f8a01829d64fd4820921f3148a17c32b98e74b67 100644 (file)
@@ -26,7 +26,7 @@
 #include <linux/mm.h>
 #include <linux/init.h>
 #include <linux/highmem.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 
 #include <asm/prom.h>
 #include <asm/mmu.h>
@@ -223,7 +223,7 @@ void __init MMU_init_hw(void)
         * Find some memory for the hash table.
         */
        if ( ppc_md.progress ) ppc_md.progress("hash:find piece", 0x322);
-       Hash = __va(lmb_alloc_base(Hash_size, Hash_size,
+       Hash = __va(memblock_alloc_base(Hash_size, Hash_size,
                                   __initial_memory_limit_addr));
        cacheable_memzero(Hash, Hash_size);
        _SDR1 = __pa(Hash) | SDR1_LOW_BITS;
index 687fddaa24c564fb19491b146525ba2ffc58ac67..446a01842a73eff71046e558bd71ea37677ce254 100644 (file)
@@ -12,7 +12,7 @@
  *      2 of the License, or (at your option) any later version.
  */
 
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 
 #include <asm/pgtable.h>
 #include <asm/mmu.h>
@@ -252,7 +252,7 @@ void __init stabs_alloc(void)
                if (cpu == 0)
                        continue; /* stab for CPU 0 is statically allocated */
 
-               newstab = lmb_alloc_base(HW_PAGE_SIZE, HW_PAGE_SIZE,
+               newstab = memblock_alloc_base(HW_PAGE_SIZE, HW_PAGE_SIZE,
                                         1<<SID_SHIFT);
                newstab = (unsigned long)__va(newstab);
 
index e81d5d67f834021c9304e9c35ab2030864a027a9..d8695b02a96895fbad4c002224d0e4c25c316aa0 100644 (file)
@@ -34,7 +34,7 @@
 #include <linux/pagemap.h>
 #include <linux/preempt.h>
 #include <linux/spinlock.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 
 #include <asm/tlbflush.h>
 #include <asm/tlb.h>
@@ -426,7 +426,7 @@ static void __early_init_mmu(int boot_cpu)
        /* Set the global containing the top of the linear mapping
         * for use by the TLB miss code
         */
-       linear_map_top = lmb_end_of_DRAM();
+       linear_map_top = memblock_end_of_DRAM();
 
        /* A sync won't hurt us after mucking around with
         * the MMU configuration
index 534c2ecc89d904dfeff5448009f24405624522d4..2ab338c9ac37fb7cfdd6ba4554877e17ec0552c5 100644 (file)
@@ -16,7 +16,7 @@
 #include <linux/kdev_t.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 
 #include <asm/system.h>
 #include <asm/time.h>
@@ -100,7 +100,7 @@ void __init corenet_ds_setup_arch(void)
 #endif
 
 #ifdef CONFIG_SWIOTLB
-       if (lmb_end_of_DRAM() > max) {
+       if (memblock_end_of_DRAM() > max) {
                ppc_swiotlb_enable = 1;
                set_pci_dma_ops(&swiotlb_dma_ops);
                ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb;
index 004b7d36cdb7512e33b8b774b25057d0b6230e2c..f79f2f1021416c5a4e1f6a97ebe4cab9ff02d57b 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/seq_file.h>
 #include <linux/interrupt.h>
 #include <linux/of_platform.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 
 #include <asm/system.h>
 #include <asm/time.h>
@@ -94,7 +94,7 @@ static void __init mpc8536_ds_setup_arch(void)
 #endif
 
 #ifdef CONFIG_SWIOTLB
-       if (lmb_end_of_DRAM() > max) {
+       if (memblock_end_of_DRAM() > max) {
                ppc_swiotlb_enable = 1;
                set_pci_dma_ops(&swiotlb_dma_ops);
                ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb;
index 544011a562fb283c64b864b295fe17ff046d4f40..8190bc25bf27327e762e798e0902cf83c20c3c8d 100644 (file)
@@ -20,7 +20,7 @@
 #include <linux/seq_file.h>
 #include <linux/interrupt.h>
 #include <linux/of_platform.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 
 #include <asm/system.h>
 #include <asm/time.h>
@@ -190,7 +190,7 @@ static void __init mpc85xx_ds_setup_arch(void)
 #endif
 
 #ifdef CONFIG_SWIOTLB
-       if (lmb_end_of_DRAM() > max) {
+       if (memblock_end_of_DRAM() > max) {
                ppc_swiotlb_enable = 1;
                set_pci_dma_ops(&swiotlb_dma_ops);
                ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb;
index 8fe87fc61485bdc1c48c4bf430ed626933ce8b22..494513682d708d3356ea376339be8bf577f2333a 100644 (file)
@@ -33,7 +33,7 @@
 #include <linux/of_platform.h>
 #include <linux/of_device.h>
 #include <linux/phy.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 
 #include <asm/system.h>
 #include <asm/atomic.h>
@@ -325,7 +325,7 @@ static void __init mpc85xx_mds_setup_arch(void)
 #endif /* CONFIG_QUICC_ENGINE */
 
 #ifdef CONFIG_SWIOTLB
-       if (lmb_end_of_DRAM() > max) {
+       if (memblock_end_of_DRAM() > max) {
                ppc_swiotlb_enable = 1;
                set_pci_dma_ops(&swiotlb_dma_ops);
                ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb;
index 2aa69a69bcc8b3147e7c16b82b5a74ea35777316..b11c3535f3509cac28e2baf7fd5e999001ab0709 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/delay.h>
 #include <linux/seq_file.h>
 #include <linux/of_platform.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 
 #include <asm/system.h>
 #include <asm/time.h>
@@ -103,7 +103,7 @@ mpc86xx_hpcn_setup_arch(void)
 #endif
 
 #ifdef CONFIG_SWIOTLB
-       if (lmb_end_of_DRAM() > max) {
+       if (memblock_end_of_DRAM() > max) {
                ppc_swiotlb_enable = 1;
                set_pci_dma_ops(&swiotlb_dma_ops);
                ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb;
index 4326b737d913e02d4541320c5bb3cecc45f7220b..3712900471ba2e9033419ab31d620ab8d2a983b2 100644 (file)
@@ -29,7 +29,7 @@
 #include <linux/of.h>
 #include <linux/of_platform.h>
 #include <linux/slab.h>
-#include <linux/lmb.h>
+#include <linux/memblock.h>
 
 #include <asm/prom.h>
 #include <asm/iommu.h>
@@ -845,10 +845,10 @@ static int __init cell_iommu_init_disabled(void)
        /* If we found a DMA window, we check if it's big enough to enclose
         * all of physical memory. If not, we force enable IOMMU
         */
-       if (np && size < lmb_end_of_DRAM()) {
+       if (np && size < memblock_end_of_DRAM()) {
                printk(KERN_WARNING "iommu: force-enabled, dma window"
                       " (%ldMB) smaller than total memory (%lldMB)\n",
-                      size >> 20, lmb_end_of_DRAM() >> 20);
+                      size >> 20, memblock_end_of_DRAM() >> 20);
                return -ENODEV;
        }
 
@@ -1064,7 +1064,7 @@ static int __init cell_iommu_fixed_mapping_init(void)
        }
 
        fbase = _ALIGN_UP(fbase, 1 << IO_SEGMENT_SHIFT);
-       fsize = lmb_phys_mem_size();
+       fsize = memblock_phys_mem_size();
 
        if ((fbase + fsize) <= 0x800000000ul)
                hbase = 0; /* use the device tree window */
@@ -1169,7 +1169,7 @@ static int __init cell_iommu_init(void)
         * Note: should we make sure we have the IOMMU actually disabled ?
         */
        if (iommu_is_off ||
-           (!iommu_force_on && lmb_end_of_DRAM() <= 0x80000000ull))
+  &nb