* [PATCH v2 22/22] powerpc: wii: allow ioremap within the memory hole
From: Albert Herranz @ 2009-12-12 16:31 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Albert Herranz
In-Reply-To: <1260635515-7478-1-git-send-email-albert_herranz@yahoo.es>
Enable the flag that allows a platform to ioremap memory marked
as reserved.
This is currently needed on the Nintendo Wii video game console
due to the workaround introduced in "wii: use both mem1 and mem2 as ram".
This will no longer be needed when proper discontig memory support
for 32-bit PowerPC is added to the kernel.
Signed-off-by: Albert Herranz <albert_herranz@yahoo.es>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
arch/powerpc/platforms/embedded6xx/wii.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/platforms/embedded6xx/wii.c b/arch/powerpc/platforms/embedded6xx/wii.c
index de0c1e3..57e5b60 100644
--- a/arch/powerpc/platforms/embedded6xx/wii.c
+++ b/arch/powerpc/platforms/embedded6xx/wii.c
@@ -97,6 +97,9 @@ void __init wii_memory_fixups(void)
/* reserve the hole */
lmb_reserve(wii_hole_start, wii_hole_size);
+
+ /* allow ioremapping the address space in the hole */
+ __allow_ioremap_reserved = 1;
}
unsigned long __init wii_mmu_mapin_mem2(unsigned long top)
--
1.6.3.3
^ permalink raw reply related
* [git pull] Please pull powerpc.git next branch
From: Benjamin Herrenschmidt @ 2009-12-12 21:51 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Andrew Morton, linuxppc-dev list, Linux Kernel list
Hi Linus !
So here's finally the powerpc merge for this window. I was waiting to
sort out some stuff with the Nintendo Gamecube and Wii patches but in
the end, I may as well have them in a separate pull request rather than
waiting longer.
Among the highlights this time around, there's Alex new 64-bit ppc KVM
which uses the same technique as MacOnLinux to run 32 or 64-bit
"classic" kernels in userspace and emulate all supervisor operations.
There's some hugetlb support rework by David that's preliminary to get
hugetlb implemented on BookE (the later will probably come in the next
merge window). I finally did a libata variant of the "macio" powermac
IDE controller so that's one less thing blocking a full transition to
libata. Many embedded updates, some new pSeries kernel infrastructure
for dynamic partitionning, some improvements to CPU hotplug, etc...
Most changes are to arch/powerpc or powerpc specific drivers. There's a
few things elsewhere, such as a libata bug fix that you should also get
via Jeff, a small KVM bit that we need and should also be in Avi tree,
some sysfs additions to drivers/base/cpu that nobody objected to (Greg
explicitely said "no objections" though I couldn't extract an actual
Acked-by from anybody either). And that should be about it.
Cheers,
Ben.
The following changes since commit 3ff6a468b45b5dfeb0e903e56f4eb27d34b2437c:
Linus Torvalds (1):
Merge branch 'x86-xen-for-linus' of git://git.kernel.org/.../tip/linux-2.6-tip
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git next
Albrecht Dreß (5):
powerpc: tiny memcpy_(to|from)io optimisation
mpc5200/gpt: tiny fix for gpt period limitation
mpc52xx/wdt: OF property to enable the WDT on boot
mpc52xx/wdt: merge WDT code into the GPT driver
mpc52xx/wdt: remove obsolete old WDT implementation
Alexander Graf (28):
Move dirty logging code to sub-arch
Pass PVR in sregs
Add Book3s definitions
Add Book3s fields to vcpu structs
Add asm/kvm_book3s.h
Add Book3s_64 intercept helpers
Add book3s_64 highmem asm code
Add SLB switching code for entry/exit
Add interrupt handling code
Add book3s.c
Add book3s_64 Host MMU handling
Add book3s_64 guest MMU
Add book3s_32 guest MMU
Add book3s_64 specific opcode emulation
Add mfdec emulation
Add desktop PowerPC specific emulation
Make head_64.S aware of KVM real mode code
Add Book3s_64 offsets to asm-offsets.c
Export symbols for KVM module
Split init_new_context and destroy_context
Export KVM symbols for module
Add fields to PACA
Export new PACA constants in asm-offsets
Include Book3s_64 target in buildsystem
Fix trace.h
Use Little Endian for Dirty Bitmap
Use hrtimers for the decrementer
powerpc/kvm: Sync guest visible MMU state
Alexey Dobriyan (2):
Convert /proc/device-tree/ to seq_file
powerpc/via-pmu: Convert to proc_fops/seq_file
Amit Shah (1):
hvc_console: Export (GPL'ed) hvc_remove
Anton Blanchard (1):
powerpc: Move ehea hcall definitions into hvcall.h
Anton Vorontsov (20):
powerpc: Make it possible to select hibernation on all PowerPCs
of/platform: Implement support for dev_pm_ops
powerpc/qe: Increase MAX_QE_RISC to 4
powerpc/qe: Add qe_upload_firmware() stub for non-QE builds
powerpc/qe: Make qe_reset() code path safe for repeated invocation
powerpc/qe: QE also shuts down on MPC8568
powerpc/cpm: Remove SPI defines and spi structs
powerpc/qe&cpm2: Avoid redefinitions in CPM2 and QE headers
powerpc/cpm: Move CPMFCR_* defines into cpm.h
powerpc/qe&cpm: Implement static inline stubs for non-QE/CPM builds
spi_mpc8xxx: Fix uninitialized variable
spi_mpc8xxx: Factor out SPI mode change steps into a call
spi_mpc8xxx: Turn qe_mode into flags
spi_mpc8xxx: Add support for QE DMA mode and CPM1/CPM2 chips
powerpc/qe: Implement QE driver for handling resume on MPC85xx
powerpc/85xx/86xx: Add suspend/resume support
powerpc/85xx: Add power management support for MPC85xxMDS boards
powerpc/86xx: Add power management support for MPC8610HPCD boards
powerpc/83xx: Add power management support for MPC83xx QE boards
powerpc/fsl: Make fsl_deep_sleep() usable w/ modules and non-83xx builds
Arnd Bergmann (1):
powerpc: Fix wrong error code from ppc32 select syscall
Becky Bruce (1):
powerpc: Fix DEBUG_HIGHMEM build break from d4515646699
Benjamin Herrenschmidt (21):
powerpc: Move /proc/ppc64 to /proc/powerpc and add symlink
powerpc/chrp: Use the same RTAS daemon as pSeries
powerpc/8xx: Fix build breakage with sparse irq changes
powerpc/kvm: Remove problematic BUILD_BUG_ON statement
Merge branch 'kvm' into next
powerpc/kvm: Fix non-modular build
Merge commit 'origin/master' into next
Merge commit 'jwb/next' into next
powerpc: kill the obsolete code under is_global_init()
powerpc: Fix build of some FSL platforms
Merge commit 'origin/master' into next
Revert "powerpc/mm: Fix bug in pagetable cache cleanup with CONFIG_PPC_SUBPAGE_PROT"
powerpc/macio: Add devres support to macio_device
powerpc/macio: Add dma_parms support to macio
powerpc/macio: Rework hotplug media bay support
libata/sff: Use ops->bmdma_stop instead of ata_bmdma_stop()
libata/drivers: Add driver for Apple "MacIO" IDE controller
Merge commit 'gcl/next' into next
Merge commit 'jwb/next' into next
Merge commit 'origin/master' into next
powerpc: Fix usage of 64-bit instruction in 32-bit altivec code
Bolko Maass (1):
powerpc/windfarm: Add detection for second cpu pump
Brian King (1):
powerpc: Add kdump support to Collaborative Memory Manager
Curtis Wald (1):
powerpc/44x: Fix PCI node in Yosemite DTS
Darrick J. Wong (1):
powerpc/therm_adt746x: Record pwm invert bit at module load time]
Dave Airlie (1):
offb: Add support for framebuffer handoff to offb.
Dave Mitchell (1):
powerpc/4xx: Add 16K FIFO size DTS entries on supported platforms
David Gibson (9):
powerpc/mm: Make hpte_need_flush() correctly mask for multiple page sizes
powerpc/mm: Cleanup management of kmem_caches for pagetables
powerpc/mm: Allow more flexible layouts for hugepage pagetables
powerpc/mm: Cleanup initialization of hugepages on powerpc
powerpc/mm: Split hash MMU specific hugepage code into a new file
powerpc/mm: Bring hugepage PTE accessor functions back into sync with normal accessors
powerpc/mm: Fix bug in pagetable cache cleanup with CONFIG_PPC_SUBPAGE_PROT
powerpc/mm: Fix bug in gup_hugepd()
powerpc/mm: Fix pgtable cache cleanup with CONFIG_PPC_SUBPAGE_PROT
FUJITA Tomonori (1):
powerpc: Kill unused swiotlb variable
Gautham R Shenoy (4):
powerpc/pseries: Add extended_cede_processor() helper function.
powerpc/pseries: Add hooks to put the CPU into an appropriate offline state
pseries/pseries: Add code to online/offline CPUs of a DLPAR node
powerpc/pseries: Serialize cpu hotplug operations during deactivate Vs deallocate
Grant Likely (4):
spi/mpc5200: Register SPI devices described in device tree
powerpc/5200: Add mpc5200-spi (non-PSC) device driver
powerpc/5200: add general purpose timer API for the MPC5200
mmc: fix missing module license declaration in of_mmc_spi.c
Jean Delvare (1):
powerpc/therm_adt746x: Don't access non-existing register
Joakim Tjernlund (9):
powerpc/8xx: Invalidate non present TLBs
powerpc/8xx: Update TLB asm so it behaves as linux mm expects.
powerpc/8xx: Tag DAR with 0x00f0 to catch buggy instructions.
powerpc/8xx: Fixup DAR from buggy dcbX instructions.
powerpc/8xx: Add missing Guarded setting in DTLB Error.
powerpc/8xx: Restore _PAGE_WRITETHRU
powerpc/8xx: Start using dcbX instructions in various copy routines
powerpc/8xx: Remove DIRTY pte handling in DTLB Error.
powerpc/8xx: DTLB Miss cleanup
Joe Perches (1):
MAINTAINERS: Add PowerPC patterns
John Bonesio (1):
powerpc/5200: add LocalPlus bus FIFO device driver
John Linn (1):
Xilinx: SPI: Fix bits_per_word for transfers
Kumar Gala (4):
powerpc/85xx: Kconfig cleanup
powerpc/fsl-booke: Rework TLB CAM code
powerpc/fsl: Add PCI device ids for new QoirQ chips
powerpc/p4080: Add basic support for p4080ds platform
Mark Nelson (1):
powerpc/pseries: Track previous CPPR values to correctly EOI interrupts
Martyn Welch (3):
powerpc/86xx: Enable NVRAM on GE Fanuc's SBC610
powerpc/86xx: Support for NVRAM on GE Fanuc's SBC310
powerpc/86xx: Support for NVRAM on GE Fanuc's PPC9A
Michael Ellerman (7):
powerpc/ps3: Use pr_devel() in ps3/mm.c
powerpc: Make NR_IRQS a CONFIG option
powerpc/pseries: Use irq_has_action() in eeh_disable_irq()
powerpc: Remove get_irq_desc()
powerpc: Make virq_debug_show() cope with sparse irq_descs
powerpc: Rearrange and fix show_interrupts() for sparse irq_descs
powerpc: Enable sparse irq_descs on powerpc
Michael Neuling (1):
powerpc: Fix potential compile error irqs_disabled_flags
Michal Simek (1):
powerpc/of_serial: Add missing ns16550a id
Michel Dänzer (2):
agp/uninorth: Also handle user memory types in u3_remove_memory().
agp/uninorth: Unify U3 and pre-U3 insert_memory and remove_memory hooks.
Nathan Fontenot (4):
powerpc/pseries: Kernel DLPAR Infrastructure
sysfs/cpu: Add probe/release files
powerpc/pseries: Add kernel based CPU DLPAR handling
powerpc/pseries: Correct pseries/dlpar.c build break without CONFIG_SMP
Olof Johansson (1):
powerpc: pasemi_defconfig update
Poonam Aggrwal (2):
powerpc/85xx: Create dts for each core in CAMP mode for P2020RDB
powerpc/85xx: Added P1020RDB Platform support.
Roman Fietze (1):
powerpc: Make "intspec" pointers in irq_host->xlate() const
Stefan Roese (1):
powerpc/44x: Enable 64bit (>= 4GB) memory size in Katmai dts
Stephen Rothwell (1):
powerpc: do not export pci_alloc/free_consistent
Thomas Gleixner (7):
powerpc/nvram_64: Remove unused code
powerpc/nvram_64: Check nvram_error_log_index in nvram_clear_error_log()
powerpc/nvram_64: Mark init code __init
powerpc: Use unlocked ioctl in nvram_64
macintosh: Remove BKL from nvram driver
powerpc: Replace old style lock initializer
powerpc: Fixup last users of irq_chip->typename
Valentine Barshak (1):
powerpc: stop_this_cpu: remove the cpu from the online map.
Wolfram Sang (2):
spi/mpc52xx-psc-spi: check for valid PSC
spi/mpc52xx: replace printk with dev_err
pbathija@amcc.com (1):
powerpc/44x: Fix DMA ranges in DTS file for Katmai board.
roel kluin (1):
powerpc/spufs: Fix test in spufs_switch_log_read()
Documentation/ABI/testing/sysfs-devices-system-cpu | 15 +
Documentation/cpu-hotplug.txt | 6 +
Documentation/powerpc/dts-bindings/fsl/board.txt | 4 +
Documentation/powerpc/dts-bindings/fsl/mpc5200.txt | 17 +-
MAINTAINERS | 15 +
arch/powerpc/Kconfig | 49 +-
arch/powerpc/boot/dts/canyonlands.dts | 2 +
arch/powerpc/boot/dts/eiger.dts | 6 +
arch/powerpc/boot/dts/gef_ppc9a.dts | 6 +
arch/powerpc/boot/dts/gef_sbc310.dts | 6 +
arch/powerpc/boot/dts/gef_sbc610.dts | 6 +
arch/powerpc/boot/dts/glacier.dts | 6 +
arch/powerpc/boot/dts/haleakala.dts | 2 +
arch/powerpc/boot/dts/katmai.dts | 36 +-
arch/powerpc/boot/dts/kilauea.dts | 4 +
arch/powerpc/boot/dts/kmeter1.dts | 7 +
arch/powerpc/boot/dts/makalu.dts | 4 +
arch/powerpc/boot/dts/mpc832x_mds.dts | 9 +
arch/powerpc/boot/dts/mpc832x_rdb.dts | 9 +
arch/powerpc/boot/dts/mpc836x_mds.dts | 9 +
arch/powerpc/boot/dts/mpc836x_rdk.dts | 9 +
arch/powerpc/boot/dts/mpc8568mds.dts | 119 ++-
arch/powerpc/boot/dts/mpc8569mds.dts | 111 +-
arch/powerpc/boot/dts/mpc8610_hpcd.dts | 26 +
arch/powerpc/boot/dts/p1020rdb.dts | 477 +++++++
arch/powerpc/boot/dts/p2020rdb_camp_core0.dts | 363 +++++
arch/powerpc/boot/dts/p2020rdb_camp_core1.dts | 184 +++
arch/powerpc/boot/dts/p4080ds.dts | 554 ++++++++
arch/powerpc/boot/dts/redwood.dts | 1 +
arch/powerpc/boot/dts/yosemite.dts | 14 +-
arch/powerpc/configs/86xx/gef_ppc9a_defconfig | 2 +-
arch/powerpc/configs/86xx/gef_sbc310_defconfig | 2 +-
arch/powerpc/configs/86xx/gef_sbc610_defconfig | 4 +-
arch/powerpc/include/asm/cpm.h | 82 ++
arch/powerpc/include/asm/cpm1.h | 45 -
arch/powerpc/include/asm/cpm2.h | 47 -
arch/powerpc/include/asm/exception-64s.h | 2 +
arch/powerpc/include/asm/hugetlb.h | 27 +-
arch/powerpc/include/asm/hvcall.h | 13 +
arch/powerpc/include/asm/hw_irq.h | 5 -
arch/powerpc/include/asm/immap_cpm2.h | 2 +-
arch/powerpc/include/asm/immap_qe.h | 8 +-
arch/powerpc/include/asm/irq.h | 13 +-
arch/powerpc/include/asm/kvm.h | 18 +
arch/powerpc/include/asm/kvm_asm.h | 40 +
arch/powerpc/include/asm/kvm_book3s.h | 139 ++
arch/powerpc/include/asm/kvm_book3s_64_asm.h | 58 +
arch/powerpc/include/asm/kvm_host.h | 79 +-
arch/powerpc/include/asm/kvm_ppc.h | 1 +
arch/powerpc/include/asm/lppaca.h | 9 +-
arch/powerpc/include/asm/machdep.h | 5 +
arch/powerpc/include/asm/macio.h | 6 +
arch/powerpc/include/asm/mediabay.h | 27 +-
arch/powerpc/include/asm/mmu-hash64.h | 50 +-
arch/powerpc/include/asm/mmu_context.h | 2 +
arch/powerpc/include/asm/mpc52xx.h | 47 +
arch/powerpc/include/asm/nvram.h | 1 -
arch/powerpc/include/asm/pSeries_reconfig.h | 1 +
arch/powerpc/include/asm/paca.h | 9 +
arch/powerpc/include/asm/page.h | 14 +
arch/powerpc/include/asm/page_64.h | 2 +-
arch/powerpc/include/asm/pgalloc-32.h | 10 +-
arch/powerpc/include/asm/pgalloc-64.h | 63 +-
arch/powerpc/include/asm/pgalloc.h | 30 +-
arch/powerpc/include/asm/pgtable-ppc64.h | 14 +-
arch/powerpc/include/asm/pgtable.h | 3 +
arch/powerpc/include/asm/pte-8xx.h | 14 +-
arch/powerpc/include/asm/pte-hash64-64k.h | 37 -
arch/powerpc/include/asm/qe.h | 43 +-
arch/powerpc/include/asm/systbl.h | 2 +-
arch/powerpc/kernel/Makefile | 3 +-
arch/powerpc/kernel/asm-offsets.c | 21 +-
arch/powerpc/kernel/crash.c | 2 +-
arch/powerpc/kernel/dma-swiotlb.c | 1 -
arch/powerpc/kernel/exceptions-64s.S | 8 +
arch/powerpc/kernel/head_64.S | 7 +
arch/powerpc/kernel/head_8xx.S | 313 +++--
arch/powerpc/kernel/head_fsl_booke.S | 22 -
arch/powerpc/kernel/io.c | 4 +-
arch/powerpc/kernel/irq.c | 137 ++-
arch/powerpc/kernel/lparcfg.c | 4 +-
arch/powerpc/kernel/misc_32.S | 18 -
arch/powerpc/kernel/nvram_64.c | 56 +-
arch/powerpc/kernel/perf_callchain.c | 20 +-
arch/powerpc/kernel/ppc_ksyms.c | 3 -
.../kernel/{proc_ppc64.c => proc_powerpc.c} | 102 +-
arch/powerpc/kernel/rtas_flash.c | 10 +-
arch/powerpc/{platforms/pseries => kernel}/rtasd.c | 48 +-
arch/powerpc/kernel/setup_64.c | 5 -
arch/powerpc/kernel/smp.c | 3 +
arch/powerpc/kernel/sysfs.c | 19 +
arch/powerpc/kernel/time.c | 1 +
arch/powerpc/kernel/traps.c | 22 -
arch/powerpc/kernel/vector.S | 2 +-
arch/powerpc/kvm/Kconfig | 17 +
arch/powerpc/kvm/Makefile | 27 +-
arch/powerpc/kvm/book3s.c | 974 +++++++++++++
arch/powerpc/kvm/book3s_32_mmu.c | 372 +++++
arch/powerpc/kvm/book3s_64_emulate.c | 345 +++++
arch/powerpc/kvm/book3s_64_exports.c | 24 +
arch/powerpc/kvm/book3s_64_interrupts.S | 392 ++++++
arch/powerpc/kvm/book3s_64_mmu.c | 478 +++++++
arch/powerpc/kvm/book3s_64_mmu_host.c | 408 ++++++
arch/powerpc/kvm/book3s_64_rmhandlers.S | 131 ++
arch/powerpc/kvm/book3s_64_slb.S | 262 ++++
arch/powerpc/kvm/booke.c | 5 +
arch/powerpc/kvm/emulate.c | 66 +-
arch/powerpc/kvm/powerpc.c | 28 +-
arch/powerpc/kvm/timing.c | 1 +
arch/powerpc/kvm/trace.h | 6 +-
arch/powerpc/lib/copy_32.S | 24 -
arch/powerpc/mm/Makefile | 5 +-
arch/powerpc/mm/fault.c | 8 +-
arch/powerpc/mm/fsl_booke_mmu.c | 132 +-
arch/powerpc/mm/gup.c | 149 +--
arch/powerpc/mm/hash_utils_64.c | 46 +-
arch/powerpc/mm/hugetlbpage-hash64.c | 139 ++
arch/powerpc/mm/hugetlbpage.c | 792 ++++-------
arch/powerpc/mm/init_64.c | 76 +-
arch/powerpc/mm/mem.c | 17 +-
arch/powerpc/mm/mmu_context_hash64.c | 26 +-
arch/powerpc/mm/mmu_decl.h | 11 -
arch/powerpc/mm/pgtable.c | 25 +-
arch/powerpc/mm/subpage-prot.c | 15 +-
arch/powerpc/mm/tlb_hash64.c | 8 +-
arch/powerpc/platforms/512x/mpc5121_ads_cpld.c | 4 +-
arch/powerpc/platforms/52xx/Kconfig | 5 +
arch/powerpc/platforms/52xx/Makefile | 1 +
arch/powerpc/platforms/52xx/media5200.c | 6 +-
arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 432 ++++++-
arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | 560 ++++++++
arch/powerpc/platforms/52xx/mpc52xx_pic.c | 10 +-
arch/powerpc/platforms/82xx/pq2ads-pci-pic.c | 3 +-
arch/powerpc/platforms/83xx/mpc832x_rdb.c | 2 +-
arch/powerpc/platforms/83xx/suspend.c | 1 +
arch/powerpc/platforms/85xx/Kconfig | 23 +-
arch/powerpc/platforms/85xx/Makefile | 1 +
arch/powerpc/platforms/85xx/corenet_ds.c | 125 ++
arch/powerpc/platforms/85xx/corenet_ds.h | 19 +
arch/powerpc/platforms/85xx/mpc85xx_mds.c | 1 +
arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 34 +-
arch/powerpc/platforms/85xx/p4080_ds.c | 74 +
arch/powerpc/platforms/85xx/socrates_fpga_pic.c | 6 +-
arch/powerpc/platforms/86xx/Kconfig | 3 +
arch/powerpc/platforms/86xx/gef_pic.c | 6 +-
arch/powerpc/platforms/86xx/gef_ppc9a.c | 5 +
arch/powerpc/platforms/86xx/gef_sbc310.c | 5 +
arch/powerpc/platforms/86xx/gef_sbc610.c | 5 +
arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 48 +-
arch/powerpc/platforms/8xx/m8xx_setup.c | 2 +-
arch/powerpc/platforms/Kconfig | 9 +-
arch/powerpc/platforms/Kconfig.cputype | 17 +-
arch/powerpc/platforms/Makefile | 2 +-
arch/powerpc/platforms/cell/axon_msi.c | 2 +-
arch/powerpc/platforms/cell/beat_interrupt.c | 8 +-
arch/powerpc/platforms/cell/interrupt.c | 6 +-
arch/powerpc/platforms/cell/spider-pic.c | 8 +-
arch/powerpc/platforms/cell/spufs/file.c | 2 +-
arch/powerpc/platforms/chrp/Kconfig | 2 +
arch/powerpc/platforms/chrp/setup.c | 50 -
arch/powerpc/platforms/iseries/htab.c | 8 +-
arch/powerpc/platforms/iseries/irq.c | 4 +-
arch/powerpc/platforms/powermac/pic.c | 12 +-
arch/powerpc/platforms/ps3/interrupt.c | 2 +-
arch/powerpc/platforms/ps3/mm.c | 2 +-
arch/powerpc/platforms/pseries/Kconfig | 3 +-
arch/powerpc/platforms/pseries/Makefile | 4 +-
arch/powerpc/platforms/pseries/cmm.c | 29 +-
arch/powerpc/platforms/pseries/dlpar.c | 558 ++++++++
arch/powerpc/platforms/pseries/eeh_driver.c | 18 +-
arch/powerpc/platforms/pseries/hotplug-cpu.c | 182 +++-
arch/powerpc/platforms/pseries/offline_states.h | 18 +
arch/powerpc/platforms/pseries/plpar_wrappers.h | 22 +
arch/powerpc/platforms/pseries/reconfig.c | 8 +-
arch/powerpc/platforms/pseries/scanlog.c | 4 +-
arch/powerpc/platforms/pseries/smp.c | 19 +
arch/powerpc/platforms/pseries/xics.c | 70 +-
arch/powerpc/sysdev/Makefile | 1 +
arch/powerpc/sysdev/cpm1.c | 4 +-
arch/powerpc/sysdev/cpm2_pic.c | 14 +-
arch/powerpc/sysdev/cpm_common.c | 5 +-
arch/powerpc/sysdev/fsl_msi.c | 4 +-
arch/powerpc/sysdev/fsl_pci.c | 18 +-
arch/powerpc/sysdev/fsl_pmc.c | 88 ++
arch/powerpc/sysdev/fsl_soc.c | 2 +-
arch/powerpc/sysdev/i8259.c | 8 +-
arch/powerpc/sysdev/ipic.c | 8 +-
arch/powerpc/sysdev/mpc8xx_pic.c | 6 +-
arch/powerpc/sysdev/mpic.c | 26 +-
arch/powerpc/sysdev/mpic_pasemi_msi.c | 2 +-
arch/powerpc/sysdev/mpic_u3msi.c | 2 +-
arch/powerpc/sysdev/mv64x60_pic.c | 2 +-
arch/powerpc/sysdev/qe_lib/qe.c | 61 +-
arch/powerpc/sysdev/qe_lib/qe_ic.c | 8 +-
arch/powerpc/sysdev/tsi108_pci.c | 6 +-
arch/powerpc/sysdev/uic.c | 10 +-
arch/powerpc/sysdev/xilinx_intc.c | 8 +-
arch/powerpc/xmon/xmon.c | 3 +-
drivers/ata/Kconfig | 10 +
drivers/ata/Makefile | 1 +
drivers/ata/pata_macio.c | 1427 ++++++++++++++++++++
drivers/base/cpu.c | 34 +
drivers/block/swim3.c | 39 +-
drivers/char/agp/uninorth-agp.c | 77 +-
drivers/char/hvc_console.c | 1 +
drivers/ide/pmac.c | 92 +-
drivers/macintosh/macio_asic.c | 52 +
drivers/macintosh/mediabay.c | 328 ++---
drivers/macintosh/nvram.c | 11 +-
drivers/macintosh/therm_adt746x.c | 15 +-
drivers/macintosh/via-pmu.c | 160 ++-
drivers/macintosh/windfarm_smu_controls.c | 2 +
drivers/mmc/host/of_mmc_spi.c | 2 +
drivers/net/ehea/ehea_hcall.h | 51 -
drivers/net/ehea/ehea_phyp.h | 1 -
drivers/of/platform.c | 305 ++++-
drivers/spi/Kconfig | 11 +-
drivers/spi/Makefile | 1 +
drivers/spi/mpc52xx_psc_spi.c | 25 +-
drivers/spi/mpc52xx_spi.c | 520 +++++++
drivers/spi/spi_mpc8xxx.c | 618 ++++++++--
drivers/spi/xilinx_spi.c | 3 +-
drivers/usb/gadget/fsl_qe_udc.h | 15 -
drivers/video/offb.c | 15 +-
drivers/watchdog/Kconfig | 4 +-
drivers/watchdog/Makefile | 1 -
drivers/watchdog/mpc5200_wdt.c | 293 ----
fs/proc/proc_devtree.c | 41 +-
include/linux/cpu.h | 15 +
include/linux/fsl_devices.h | 11 +-
include/linux/kvm.h | 1 +
include/linux/pci_ids.h | 14 +
include/linux/spi/mpc52xx_spi.h | 10 +
virt/kvm/kvm_main.c | 5 +-
234 files changed, 13126 insertions(+), 2713 deletions(-)
create mode 100644 arch/powerpc/boot/dts/p1020rdb.dts
create mode 100644 arch/powerpc/boot/dts/p2020rdb_camp_core0.dts
create mode 100644 arch/powerpc/boot/dts/p2020rdb_camp_core1.dts
create mode 100644 arch/powerpc/boot/dts/p4080ds.dts
create mode 100644 arch/powerpc/include/asm/kvm_book3s.h
create mode 100644 arch/powerpc/include/asm/kvm_book3s_64_asm.h
rename arch/powerpc/kernel/{proc_ppc64.c => proc_powerpc.c} (87%)
rename arch/powerpc/{platforms/pseries => kernel}/rtasd.c (95%)
create mode 100644 arch/powerpc/kvm/book3s.c
create mode 100644 arch/powerpc/kvm/book3s_32_mmu.c
create mode 100644 arch/powerpc/kvm/book3s_64_emulate.c
create mode 100644 arch/powerpc/kvm/book3s_64_exports.c
create mode 100644 arch/powerpc/kvm/book3s_64_interrupts.S
create mode 100644 arch/powerpc/kvm/book3s_64_mmu.c
create mode 100644 arch/powerpc/kvm/book3s_64_mmu_host.c
create mode 100644 arch/powerpc/kvm/book3s_64_rmhandlers.S
create mode 100644 arch/powerpc/kvm/book3s_64_slb.S
create mode 100644 arch/powerpc/mm/hugetlbpage-hash64.c
create mode 100644 arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
create mode 100644 arch/powerpc/platforms/85xx/corenet_ds.c
create mode 100644 arch/powerpc/platforms/85xx/corenet_ds.h
create mode 100644 arch/powerpc/platforms/85xx/p4080_ds.c
create mode 100644 arch/powerpc/platforms/pseries/dlpar.c
create mode 100644 arch/powerpc/platforms/pseries/offline_states.h
create mode 100644 arch/powerpc/sysdev/fsl_pmc.c
create mode 100644 drivers/ata/pata_macio.c
delete mode 100644 drivers/net/ehea/ehea_hcall.h
create mode 100644 drivers/spi/mpc52xx_spi.c
delete mode 100644 drivers/watchdog/mpc5200_wdt.c
create mode 100644 include/linux/spi/mpc52xx_spi.h
^ permalink raw reply
* Re: EP440XS board boot problem(Note:similart to Sequoia)
From: Allan Wang @ 2009-12-13 7:18 UTC (permalink / raw)
To: Wolfgang Denk; +Cc: linuxppc-dev
In-Reply-To: <20091202200942.506BF4C025@gemini.denx.de>
[-- Attachment #1: Type: text/plain, Size: 1929 bytes --]
Hello, Mr. Denk,
I forgot to give you the uboot printenv output.
=> printenv
bootcmd=run flash_self
bootdelay=5
baudrate=115200
loads_echo=1
preboot=run setup_phys;echo;echo Type "run flash_nfs" to mount root filesystem over NFS;echo
netdev=eth0
hostname=ep440xs
nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=$(serverip):$(rootpath)
ramargs=setenv bootargs ramdisk=65536 root=/dev/ram rw
addip=setenv bootargs $(bootargs) ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname):$(netdev):off panic=1
addtty=setenv bootargs $(bootargs) console=ttyS0,$(baudrate)
flash_nfs=run nfsargs addip addtty;bootm $(kernel_addr)
flash_self=run ramargs addip addtty;bootm $(kernel_addr) $(ramdisk_addr)
net_nfs=tftp 200000 $(bootfile);run nfsargs addip addtty;bootm
kernel_addr=fe000000
ramdisk_addr=fe180000
load=tftp 0x200000 u-boot.bin
update=protect off 0xfff60000 0xffffffff;era 0xfffa0000 0xffffffff;cp.b 0x200000 fffa0000 60000
upd=run load;run update
usbact=hostdev
fixedip=setenv bootargs $(bootargs) ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname):$(netdev):off panic=1
dhcp=setenv bootargs $(bootargs) ip=dhcp
initphy=mii w ${phy} 14 e3;mii w ${phy} 18 4101;mii w ${phy} 9 e00;mii w ${phy} 4 1e1;mii w ${phy} 0 9140;mii w ${phy} 0 1140
setup_phys=setenv phy 0;run initphy;setenv phy 1;run initphy;setenv phy
progee=mw 0x100000 0x87788252;mw 0x100004 0x0957a030;mw 0x100008 0x40082350;mw 0x10000c 0x0d050000;eeprom write 0x54 0x100000 0x0 0x10
diags=cp.b 0xFFF40000 0x40000 0x20000;go 0x40004
dhcp_user-class-id=u-boot_test
rootpath=/opt/ppc/ppc_4xx
bootfile=cuImage.ep440xs
ipaddr=192.168.0.201
netmask=255.255.255.0
ethaddr=00:01:ec:01:12:83
eth1addr=00:01:ec:81:12:83
ethact=ppc_4xx_eth0
gateway=192.168.0.1
bootargs=$(bootargs) console=ttyS0,$(baudrate)
serverip=192.168.0.196
gatewayip=192.168.0.1
stdin=serial
stdout=serial
stderr=serial
ver=U-Boot 1.1.6 (Oct 25 2009 - 13:26:41)
Thanks,
Allan
[-- Attachment #2: Type: text/html, Size: 2347 bytes --]
^ permalink raw reply
* Please pull nintendo wii/gamecube support
From: Grant Likely @ 2009-12-13 7:18 UTC (permalink / raw)
To: Benjamin Herrenschmidt, linuxppc-dev, Albert Herranz
Hi Ben,
I've picked up the Nintendo Gamecube & Wii support patch series and
compile tested it. Looks all good to me. Please pull.
Cheers,
g.
The following changes since commit 22763c5cf3690a681551162c15d34d935308c8d7:
Linus Torvalds (1):
Linux 2.6.32
are available in the git repository at:
git://git.secretlab.ca/git/linux-2.6 next
Albert Herranz (22):
powerpc: gamecube/wii: usbgecko bootwrapper console support
powerpc: gamecube: device tree
powerpc: gamecube: bootwrapper bits
powerpc: gamecube/wii: introduce GAMECUBE_COMMON
powerpc: gamecube/wii: declare as non-coherent platforms
powerpc: gamecube/wii: do not include PCI support
powerpc: gamecube/wii: udbg support for usbgecko
powerpc: gamecube/wii: flipper interrupt controller support
powerpc: gamecube: platform support
powerpc: gamecube: default config
powerpc: wii: device tree
powerpc: wii: bootwrapper bits
powerpc: broadway processor support
powerpc: wii: hollywood interrupt controller support
powerpc: wii: platform support
powerpc: wii: default config
powerpc: reserve fixmap entries for early debug
powerpc: gamecube/wii: early debugging using usbgecko
wii: bootwrapper: add fixup to calc useable mem2
wii: use both mem1 and mem2 as ram
powerpc: allow ioremap within reserved memory regions
powerpc: wii: allow ioremap within the memory hole
.../powerpc/dts-bindings/nintendo/gamecube.txt | 109 ++
.../powerpc/dts-bindings/nintendo/wii.txt | 184 +++
arch/powerpc/Kconfig | 2 +-
arch/powerpc/Kconfig.debug | 8 +
arch/powerpc/boot/Makefile | 7 +-
arch/powerpc/boot/dts/gamecube.dts | 114 ++
arch/powerpc/boot/dts/wii.dts | 218 +++
arch/powerpc/boot/gamecube-head.S | 111 ++
arch/powerpc/boot/gamecube.c | 35 +
arch/powerpc/boot/ugecon.c | 147 ++
arch/powerpc/boot/ugecon.h | 24 +
arch/powerpc/boot/wii-head.S | 142 ++
arch/powerpc/boot/wii.c | 158 +++
arch/powerpc/boot/wrapper | 4 +
arch/powerpc/configs/gamecube_defconfig | 1061 +++++++++++++++
arch/powerpc/configs/wii_defconfig | 1406 ++++++++++++++++++++
arch/powerpc/include/asm/fixmap.h | 3 +
arch/powerpc/include/asm/udbg.h | 1 +
arch/powerpc/kernel/cputable.c | 6 +-
arch/powerpc/kernel/head_32.S | 25 +
arch/powerpc/kernel/udbg.c | 2 +
arch/powerpc/mm/init_32.c | 9 +
arch/powerpc/mm/mmu_decl.h | 11 +-
arch/powerpc/mm/pgtable_32.c | 36 +-
arch/powerpc/mm/ppc_mmu_32.c | 4 +-
arch/powerpc/platforms/Kconfig.cputype | 2 +-
arch/powerpc/platforms/embedded6xx/Kconfig | 33 +
arch/powerpc/platforms/embedded6xx/Makefile | 4 +
arch/powerpc/platforms/embedded6xx/flipper-pic.c | 263 ++++
arch/powerpc/platforms/embedded6xx/flipper-pic.h | 25 +
arch/powerpc/platforms/embedded6xx/gamecube.c | 118 ++
arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 241 ++++
arch/powerpc/platforms/embedded6xx/hlwd-pic.h | 22 +
arch/powerpc/platforms/embedded6xx/usbgecko_udbg.c | 328 +++++
arch/powerpc/platforms/embedded6xx/usbgecko_udbg.h | 32 +
arch/powerpc/platforms/embedded6xx/wii.c | 268 ++++
include/linux/lmb.h | 1 +
lib/lmb.c | 7 +-
38 files changed, 5155 insertions(+), 16 deletions(-)
create mode 100644 Documentation/powerpc/dts-bindings/nintendo/gamecube.txt
create mode 100644 Documentation/powerpc/dts-bindings/nintendo/wii.txt
create mode 100644 arch/powerpc/boot/dts/gamecube.dts
create mode 100644 arch/powerpc/boot/dts/wii.dts
create mode 100644 arch/powerpc/boot/gamecube-head.S
create mode 100644 arch/powerpc/boot/gamecube.c
create mode 100644 arch/powerpc/boot/ugecon.c
create mode 100644 arch/powerpc/boot/ugecon.h
create mode 100644 arch/powerpc/boot/wii-head.S
create mode 100644 arch/powerpc/boot/wii.c
create mode 100644 arch/powerpc/configs/gamecube_defconfig
create mode 100644 arch/powerpc/configs/wii_defconfig
create mode 100644 arch/powerpc/platforms/embedded6xx/flipper-pic.c
create mode 100644 arch/powerpc/platforms/embedded6xx/flipper-pic.h
create mode 100644 arch/powerpc/platforms/embedded6xx/gamecube.c
create mode 100644 arch/powerpc/platforms/embedded6xx/hlwd-pic.c
create mode 100644 arch/powerpc/platforms/embedded6xx/hlwd-pic.h
create mode 100644 arch/powerpc/platforms/embedded6xx/usbgecko_udbg.c
create mode 100644 arch/powerpc/platforms/embedded6xx/usbgecko_udbg.h
create mode 100644 arch/powerpc/platforms/embedded6xx/wii.c
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply
* Re: [Patch 1/1] PPC64-HWBKPT: Implement hw-breakpoints for PPC64
From: Roland McGrath @ 2009-12-14 0:56 UTC (permalink / raw)
To: prasad
Cc: Michael Neuling, Benjamin Herrenschmidt, Frederic Weisbecker,
David Gibson, linuxppc-dev, Alan Stern, paulus
In-Reply-To: <20091211160409.GB23156@in.ibm.com>
I can't see anything you've done to keep this use of MSR_SE in the
user-mode register state from interfering with user_enable_single_step().
It looks to me like you'd swallow the normal step indications.
Likewise I'm not very clear on the interaction with kprobes, kgdb,
or whatnot for kernel-mode cases. But I'll leave those concerns to
others, since I know more about the user-mode situations.
Back to the user-mode case, is it really reasonable to disable
preemption in hw_breakpoint_handler and leave it so across returning
to user mode? (Is that even possible? I thought user mode was
always preemptible.) That is done very casually with little comment
in hw_breakpoint_handler and single_step_dabr_instruction, but it
seems like an extremely deep and magical thing that merits more
explanation. I guess the need for it has to do with the per_cpu
variable you're using, but the whole situation is not very clear on
first reading. Even for kernel mode, what does this mean when the
stepped instruction does a page fault?
Thanks,
Roland
^ permalink raw reply
* Re: [RFC:PATCH 02/03] powerpc: Add definitions for Debug Registers on BookE Platforms
From: David Gibson @ 2009-12-14 1:16 UTC (permalink / raw)
To: Kumar Gala
Cc: linuxppc-dev list, Sergio Durigan Junior, Dave Kleikamp,
Thiago Jung Bauermann, Torez Smith
In-Reply-To: <509EFABE-E123-48EA-9416-6FC22A00A6F5@kernel.crashing.org>
On Fri, Dec 11, 2009 at 08:35:35AM -0600, Kumar Gala wrote:
>
> On Dec 10, 2009, at 9:28 PM, David Gibson wrote:
>
> > On Thu, Dec 10, 2009 at 08:41:53PM -0600, Kumar Gala wrote:
> > [snip]
> >>> +#define DBCR1_USER_DEBUG (DBCR1_IAC12M | DBCR1_IAC34M)
> >>> +#define DBCR1_BASE_REG_VALUE (DBCR1_IAC1US | DBCR1_IAC1ER_10 | \
> >>> + DBCR1_IAC2US | DBCR1_IAC2ER_10 | \
> >>> + DBCR1_IAC3US | DBCR1_IAC3ER_10 | \
> >>> + DBCR1_IAC4US | DBCR1_IAC4ER_10)
> >>
> >> We are we using MSR[IS] IS=0, why not just any Eff address? In the
> >> future we might have user as IS = 1, and kernel as IS = 0.
> >
> > Since the user can't control that directly, we can update this when
> > and if we change our use of address spaces.
>
> That's such a subtle issue (easy to forgot about and miss in the
> future). Why do we need this now?
Um.. I guess we don't really. I was thinking of this default value a)
in the context of the old explicit register setting interface, where
we wanted to force what userspace could and could not set here and b)
half in the context of a system with real mode, in which we certainly
wouldn't want userspace to be able to set real address breakpoints.
I don't think it matters that much. And, if we use AS1 for userspace
in the future, we arguably still want to change this to make it _01,
so that userspace can't set breakpoints in the kernel AS (although I
guess as long as we force the PR state in which the breakpoint
triggers, it doesn't really matter).
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: [Next] CPU Hotplug test failures on powerpc
From: Benjamin Herrenschmidt @ 2009-12-14 2:48 UTC (permalink / raw)
To: Sachin Sant
Cc: Peter Zijlstra, Linux/PPC Development, Ingo Molnar, linux-next,
linux-kernel
In-Reply-To: <4B2224C7.1020908@in.ibm.com>
On Fri, 2009-12-11 at 16:23 +0530, Sachin Sant wrote:
> While executing cpu_hotplug(from autotest) tests against latest
> next on a power6 box, the machine locks up. A soft reset shows
> the following trace
Have you heard anything about that one yet or it's still to be
debugged ? It probably hit upstream by now.
Cheers,
Ben.
> cpu 0x0: Vector: 100 (System Reset) at [c00000000c9333d0]
> pc: c0000000003433d8: .find_next_bit+0x54/0xc4
> lr: c000000000342f10: .cpumask_next_and+0x4c/0x94
> sp: c00000000c933650
> msr: 8000000000089032
> current = 0xc00000000c173840
> paca = 0xc000000000bc2600
> pid = 2602, comm = hotplug06.top.s
> enter ? for help
> [link register ] c000000000342f10 .cpumask_next_and+0x4c/0x94
> [c00000000c933650] c0000000000e9f34 .cpuset_cpus_allowed_locked+0x38/0x74 (unreliable)
> [c00000000c9336e0] c000000000090074 .move_task_off_dead_cpu+0xc4/0x1ac
> [c00000000c9337a0] c0000000005e4e5c .migration_call+0x304/0x830
> [c00000000c933880] c0000000005e0880 .notifier_call_chain+0x68/0xe0
> [c00000000c933920] c00000000012a92c ._cpu_down+0x210/0x34c
> [c00000000c933a90] c00000000012aad8 .cpu_down+0x70/0xa8
> [c00000000c933b20] c000000000525940 .store_online+0x54/0x894
> [c00000000c933bb0] c000000000463430 .sysdev_store+0x3c/0x50
> [c00000000c933c20] c0000000001f8320 .sysfs_write_file+0x124/0x18c
> [c00000000c933ce0] c00000000017edac .vfs_write+0xd4/0x1fc
> [c00000000c933d80] c00000000017efdc .SyS_write+0x58/0xa0
> [c00000000c933e30] c0000000000085b4 syscall_exit+0x0/0x40
> --- Exception: c01 (System Call) at 00000fff9fa8a8f8
> SP (fffe7aef200) is in userspace
> 0:mon> e
> cpu 0x0: Vector: 100 (System Reset) at [c00000000c9333d0]
> pc: c0000000003433d8: .find_next_bit+0x54/0xc4
> lr: c000000000342f10: .cpumask_next_and+0x4c/0x94
> sp: c00000000c933650
> msr: 8000000000089032
> current = 0xc00000000c173840
> paca = 0xc000000000bc2600
> pid = 2602, comm = hotplug06.top.s
>
> Last few messages from the dmesg log shows
>
> 0:mon>
> <4>IRQ 17 affinity broken off cpu 0
> <4>IRQ 18 affinity broken off cpu 0
> <4>IRQ 19 affinity broken off cpu 0
> <4>IRQ 264 affinity broken off cpu 0
> <4>cpu 0 (hwid 0) Ready to die...
> <7>clockevent: decrementer mult[83126e97] shift[32] cpu[0]
> <4>Processor 0 found.
> <4>IRQ 17 affinity broken off cpu 1
> <4>IRQ 18 affinity broken off cpu 1
> <4>IRQ 19 affinity broken off cpu 1
> <4>IRQ 264 affinity broken off cpu 1
> <4>cpu 1 (hwid 1) Ready to die...
> <7>clockevent: decrementer mult[83126e97] shift[32] cpu[1]
> <4>Processor 1 found.
> <4>cpu 1 (hwid 1) Ready to die...
> <7>clockevent: decrementer mult[83126e97] shift[32] cpu[1]
> <4>Processor 1 found.
> <4>cpu 1 (hwid 1) Ready to die...
> <6>process 2423 (bash) no longer affine to cpu1
> <7>clockevent: decrementer mult[83126e97] shift[32] cpu[1]
> <4>Processor 1 found.
> <4>cpu 1 (hwid 1) Ready to die...
> <7>clockevent: decrementer mult[83126e97] shift[32] cpu[1]
> <4>Processor 1 found.
> <4>cpu 1 (hwid 1) Ready to die...
> <7>clockevent: decrementer mult[83126e97] shift[32] cpu[1]
> <4>Processor 1 found.
> <4>cpu 1 (hwid 1) Ready to die...
> <3>INFO: RCU detected CPU 0 stall (t=1000 jiffies)
> <3>INFO: RCU detected CPU 0 stall (t=4000 jiffies)
> 0:mon>
>
> After some debugging a possible suspect seems to be commit
> 6ad4c18.. : sched: Fix balance vs hotplug race
>
> If i revert this patch i am able to execute the tests on this
> power6 without any issues.
>
> But at the same time the above patch is required to solve the
> cpu hotplug related race on x86_64(as a side note this same
> x86_64 issue can be recreated against latest Linus git as well)
> that i reported here :
>
> http://marc.info/?l=linux-kernel&m=125802682922299&w=2
>
> I will try few more iterations with and without the above
> patch just to make sure i have the correct results.
>
> If someone has a suggestion let me know.
>
> Thanks
> -Sachin
>
>
^ permalink raw reply
* [PATCH] nouveau: Fix endianness with new context program loader
From: Benjamin Herrenschmidt @ 2009-12-14 3:31 UTC (permalink / raw)
To: Ben Skeggs; +Cc: nouveau, Dave Airlie, linuxppc-dev
When switching to request_firmware() to load the context programs,
some endian fixes need to be applied. This makes it work again on
my quad g5 nvidia 6600.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
drivers/gpu/drm/nouveau/nv40_graph.c | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nv40_graph.c b/drivers/gpu/drm/nouveau/nv40_graph.c
index d3e0a2a..7e8547c 100644
--- a/drivers/gpu/drm/nouveau/nv40_graph.c
+++ b/drivers/gpu/drm/nouveau/nv40_graph.c
@@ -252,8 +252,9 @@ nv40_grctx_init(struct drm_device *dev)
memcpy(pgraph->ctxprog, fw->data, fw->size);
cp = pgraph->ctxprog;
- if (cp->signature != 0x5043564e || cp->version != 0 ||
- cp->length != ((fw->size - 7) / 4)) {
+ if (le32_to_cpu(cp->signature) != 0x5043564e ||
+ cp->version != 0 ||
+ le16_to_cpu(cp->length) != ((fw->size - 7) / 4)) {
NV_ERROR(dev, "ctxprog invalid\n");
release_firmware(fw);
nv40_grctx_fini(dev);
@@ -281,8 +282,9 @@ nv40_grctx_init(struct drm_device *dev)
memcpy(pgraph->ctxvals, fw->data, fw->size);
cv = (void *)pgraph->ctxvals;
- if (cv->signature != 0x5643564e || cv->version != 0 ||
- cv->length != ((fw->size - 9) / 8)) {
+ if (le32_to_cpu(cv->signature) != 0x5643564e ||
+ cv->version != 0 ||
+ le32_to_cpu(cv->length) != ((fw->size - 9) / 8)) {
NV_ERROR(dev, "ctxvals invalid\n");
release_firmware(fw);
nv40_grctx_fini(dev);
@@ -294,8 +296,9 @@ nv40_grctx_init(struct drm_device *dev)
cp = pgraph->ctxprog;
nv_wr32(dev, NV40_PGRAPH_CTXCTL_UCODE_INDEX, 0);
- for (i = 0; i < cp->length; i++)
- nv_wr32(dev, NV40_PGRAPH_CTXCTL_UCODE_DATA, cp->data[i]);
+ for (i = 0; i < le16_to_cpu(cp->length); i++)
+ nv_wr32(dev, NV40_PGRAPH_CTXCTL_UCODE_DATA,
+ le32_to_cpu(cp->data[i]));
pgraph->accel_blocked = false;
return 0;
@@ -329,8 +332,9 @@ nv40_grctx_vals_load(struct drm_device *dev, struct nouveau_gpuobj *ctx)
if (!cv)
return;
- for (i = 0; i < cv->length; i++)
- nv_wo32(dev, ctx, cv->data[i].offset, cv->data[i].value);
+ for (i = 0; i < le32_to_cpu(cv->length); i++)
+ nv_wo32(dev, ctx, le32_to_cpu(cv->data[i].offset),
+ le32_to_cpu(cv->data[i].value));
}
/*
^ permalink raw reply related
* Re: [Next] CPU Hotplug test failures on powerpc
From: Sachin Sant @ 2009-12-14 4:37 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: Peter Zijlstra, Linux/PPC Development, Ingo Molnar, linux-next,
linux-kernel
In-Reply-To: <1260758933.2217.7.camel@pasglop>
Benjamin Herrenschmidt wrote:
> On Fri, 2009-12-11 at 16:23 +0530, Sachin Sant wrote:
>
>> While executing cpu_hotplug(from autotest) tests against latest
>> next on a power6 box, the machine locks up. A soft reset shows
>> the following trace
>>
>
> Have you heard anything about that one yet or it's still to be
> debugged ? It probably hit upstream by now.
>
Haven't received any response yet.
As you mentioned that patch went upstream and so did the problem.
thanks
-Sachin
> Cheers,
> Ben.
>
>
>> cpu 0x0: Vector: 100 (System Reset) at [c00000000c9333d0]
>> pc: c0000000003433d8: .find_next_bit+0x54/0xc4
>> lr: c000000000342f10: .cpumask_next_and+0x4c/0x94
>> sp: c00000000c933650
>> msr: 8000000000089032
>> current = 0xc00000000c173840
>> paca = 0xc000000000bc2600
>> pid = 2602, comm = hotplug06.top.s
>> enter ? for help
>> [link register ] c000000000342f10 .cpumask_next_and+0x4c/0x94
>> [c00000000c933650] c0000000000e9f34 .cpuset_cpus_allowed_locked+0x38/0x74 (unreliable)
>> [c00000000c9336e0] c000000000090074 .move_task_off_dead_cpu+0xc4/0x1ac
>> [c00000000c9337a0] c0000000005e4e5c .migration_call+0x304/0x830
>> [c00000000c933880] c0000000005e0880 .notifier_call_chain+0x68/0xe0
>> [c00000000c933920] c00000000012a92c ._cpu_down+0x210/0x34c
>> [c00000000c933a90] c00000000012aad8 .cpu_down+0x70/0xa8
>> [c00000000c933b20] c000000000525940 .store_online+0x54/0x894
>> [c00000000c933bb0] c000000000463430 .sysdev_store+0x3c/0x50
>> [c00000000c933c20] c0000000001f8320 .sysfs_write_file+0x124/0x18c
>> [c00000000c933ce0] c00000000017edac .vfs_write+0xd4/0x1fc
>> [c00000000c933d80] c00000000017efdc .SyS_write+0x58/0xa0
>> [c00000000c933e30] c0000000000085b4 syscall_exit+0x0/0x40
>> --- Exception: c01 (System Call) at 00000fff9fa8a8f8
>> SP (fffe7aef200) is in userspace
>> 0:mon> e
>> cpu 0x0: Vector: 100 (System Reset) at [c00000000c9333d0]
>> pc: c0000000003433d8: .find_next_bit+0x54/0xc4
>> lr: c000000000342f10: .cpumask_next_and+0x4c/0x94
>> sp: c00000000c933650
>> msr: 8000000000089032
>> current = 0xc00000000c173840
>> paca = 0xc000000000bc2600
>> pid = 2602, comm = hotplug06.top.s
>>
>> Last few messages from the dmesg log shows
>>
>> 0:mon>
>> <4>IRQ 17 affinity broken off cpu 0
>> <4>IRQ 18 affinity broken off cpu 0
>> <4>IRQ 19 affinity broken off cpu 0
>> <4>IRQ 264 affinity broken off cpu 0
>> <4>cpu 0 (hwid 0) Ready to die...
>> <7>clockevent: decrementer mult[83126e97] shift[32] cpu[0]
>> <4>Processor 0 found.
>> <4>IRQ 17 affinity broken off cpu 1
>> <4>IRQ 18 affinity broken off cpu 1
>> <4>IRQ 19 affinity broken off cpu 1
>> <4>IRQ 264 affinity broken off cpu 1
>> <4>cpu 1 (hwid 1) Ready to die...
>> <7>clockevent: decrementer mult[83126e97] shift[32] cpu[1]
>> <4>Processor 1 found.
>> <4>cpu 1 (hwid 1) Ready to die...
>> <7>clockevent: decrementer mult[83126e97] shift[32] cpu[1]
>> <4>Processor 1 found.
>> <4>cpu 1 (hwid 1) Ready to die...
>> <6>process 2423 (bash) no longer affine to cpu1
>> <7>clockevent: decrementer mult[83126e97] shift[32] cpu[1]
>> <4>Processor 1 found.
>> <4>cpu 1 (hwid 1) Ready to die...
>> <7>clockevent: decrementer mult[83126e97] shift[32] cpu[1]
>> <4>Processor 1 found.
>> <4>cpu 1 (hwid 1) Ready to die...
>> <7>clockevent: decrementer mult[83126e97] shift[32] cpu[1]
>> <4>Processor 1 found.
>> <4>cpu 1 (hwid 1) Ready to die...
>> <3>INFO: RCU detected CPU 0 stall (t=1000 jiffies)
>> <3>INFO: RCU detected CPU 0 stall (t=4000 jiffies)
>> 0:mon>
>>
>> After some debugging a possible suspect seems to be commit
>> 6ad4c18.. : sched: Fix balance vs hotplug race
>>
>> If i revert this patch i am able to execute the tests on this
>> power6 without any issues.
>>
>> But at the same time the above patch is required to solve the
>> cpu hotplug related race on x86_64(as a side note this same
>> x86_64 issue can be recreated against latest Linus git as well)
>> that i reported here :
>>
>> http://marc.info/?l=linux-kernel&m=125802682922299&w=2
>>
>> I will try few more iterations with and without the above
>> patch just to make sure i have the correct results.
>>
>> If someone has a suggestion let me know.
>>
>> Thanks
>> -Sachin
>>
>>
>>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-next" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
--
---------------------------------
Sachin Sant
IBM Linux Technology Center
India Systems and Technology Labs
Bangalore, India
---------------------------------
^ permalink raw reply
* linux-next: 52xx-and-virtex tree build failure
From: Stephen Rothwell @ 2009-12-14 5:34 UTC (permalink / raw)
To: Grant Likely
Cc: Albert Herranz, linux-kernel, linuxppc-dev, linux-next,
Paul Mackerras
Hi Grant,
Today's linux-next build (powerpc ppc44x_defconfig) failed like this:
arch/powerpc/mm/pgtable_32.c: In function 'mapin_ram':
arch/powerpc/mm/pgtable_32.c:318: error: too many arguments to function 'mmu_mapin_ram'
Casued by commit de32400dd26e743c5d500aa42d8d6818b79edb73 ("wii: use both
mem1 and mem2 as ram").
I applied the following patch for today, but this may be too much or
there may be a better solution.
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 14 Dec 2009 16:04:15 +1100
Subject: [PATCH] powerpc: fix up for mmu_mapin_ram api change
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/mm/40x_mmu.c | 2 +-
arch/powerpc/mm/44x_mmu.c | 2 +-
arch/powerpc/mm/fsl_booke_mmu.c | 2 +-
arch/powerpc/mm/mmu_decl.h | 6 +++---
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/mm/40x_mmu.c b/arch/powerpc/mm/40x_mmu.c
index f5e7b9c..08dfa8e 100644
--- a/arch/powerpc/mm/40x_mmu.c
+++ b/arch/powerpc/mm/40x_mmu.c
@@ -91,7 +91,7 @@ void __init MMU_init_hw(void)
#define LARGE_PAGE_SIZE_16M (1<<24)
#define LARGE_PAGE_SIZE_4M (1<<22)
-unsigned long __init mmu_mapin_ram(void)
+unsigned long __init mmu_mapin_ram(unsigned long top)
{
unsigned long v, s, mapped;
phys_addr_t p;
diff --git a/arch/powerpc/mm/44x_mmu.c b/arch/powerpc/mm/44x_mmu.c
index 98052ac..3986264 100644
--- a/arch/powerpc/mm/44x_mmu.c
+++ b/arch/powerpc/mm/44x_mmu.c
@@ -88,7 +88,7 @@ void __init MMU_init_hw(void)
flush_instruction_cache();
}
-unsigned long __init mmu_mapin_ram(void)
+unsigned long __init mmu_mapin_ram(unsigned long top)
{
unsigned long addr;
diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/fsl_booke_mmu.c
index fcfcb6e..c539472 100644
--- a/arch/powerpc/mm/fsl_booke_mmu.c
+++ b/arch/powerpc/mm/fsl_booke_mmu.c
@@ -207,7 +207,7 @@ unsigned long map_mem_in_cams(unsigned long ram, int max_cam_idx)
return amount_mapped;
}
-unsigned long __init mmu_mapin_ram(void)
+unsigned long __init mmu_mapin_ram(unsigned long top)
{
return tlbcam_addrs[tlbcam_index - 1].limit - PAGE_OFFSET + 1;
}
diff --git a/arch/powerpc/mm/mmu_decl.h b/arch/powerpc/mm/mmu_decl.h
index eef7aaf..d49a775 100644
--- a/arch/powerpc/mm/mmu_decl.h
+++ b/arch/powerpc/mm/mmu_decl.h
@@ -139,15 +139,15 @@ extern void wii_memory_fixups(void);
*/
#if defined(CONFIG_8xx)
#define MMU_init_hw() do { } while(0)
-#define mmu_mapin_ram() (0UL)
+#define mmu_mapin_ram(top) (0UL)
#elif defined(CONFIG_4xx)
extern void MMU_init_hw(void);
-extern unsigned long mmu_mapin_ram(void);
+extern unsigned long mmu_mapin_ram(unsigned long top);
#elif defined(CONFIG_FSL_BOOKE)
extern void MMU_init_hw(void);
-extern unsigned long mmu_mapin_ram(void);
+extern unsigned long mmu_mapin_ram(unsigned long top);
extern void adjust_total_lowmem(void);
#elif defined(CONFIG_PPC32)
--
1.6.5.4
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
^ permalink raw reply related
* linux-next: devicetree tree build failure
From: Stephen Rothwell @ 2009-12-14 5:38 UTC (permalink / raw)
To: Grant Likely; +Cc: linux-kernel, linuxppc-dev, linux-next, Paul Mackerras
[-- Attachment #1: Type: text/plain, Size: 711 bytes --]
Hi Grant,
Today's linux-next build (powerpc allyesconfig) failed like this:
drivers/of/fdt.c: In function 'early_init_devtree':
drivers/of/fdt.c:530: error: 'early_init_dt_scan_phyp_dump' undeclared (first use in this function)
Caused by commit 825b073d40b34e331d49e727b9e208744ad26259 ("of/flattree:
merge early_init_devtree() and early_init_move_devtree()").
I have reverted that commit (and all later commits) from the devicetree
tree for today.
Grant, are these commits really intended for v2.6.33? If not, please just
remove them from your tree until after v2.6.33-rc1, thanks.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply
* powerpc/kvm tree build failure
From: Stephen Rothwell @ 2009-12-14 6:35 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev
Cc: linuxppc-dev, Alexander Graf, Hollis Blanchard
[-- Attachment #1: Type: text/plain, Size: 489 bytes --]
Hi all,
A powerpc allmodconfig fails like this:
arch/powerpc/kvm/built-in.o:(.toc1+0x18): undefined reference to `kvm_debugfs_dir'
This is because CONFIG_KVM_EXIT_TIMING is a bool while
CONFIG_KVM_BOOK3S_64 is tristate. This causes arch/powerpc/kvm/timing.o
(which references kvm_debugfs_dir) to be built in, but
virt/kvm/kvm_main.o (which defines it) to be modular.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply
* Fix hash_utils_64.c compile errors with DEBUG enabled.
From: Sachin Sant @ 2009-12-14 7:00 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2187 bytes --]
Fix following build errors generated with DEBUG=1
cc1: warnings being treated as errors
arch/powerpc/mm/hash_utils_64.c: In function ‘htab_dt_scan_page_sizes’:
arch/powerpc/mm/hash_utils_64.c:345: error: format ‘%04x’ expects type ‘unsigned int’, but argument 4 has type ‘long unsigned int’
arch/powerpc/mm/hash_utils_64.c:345: error: format ‘%08x’ expects type ‘unsigned int’, but argument 5 has type ‘long unsigned int’
arch/powerpc/mm/hash_utils_64.c: In function ‘htab_initialize’:
... SNIP ...
Signed-off-by: Sachin Sant <sachinp@in.ibm.com>
---
diff -Naurp a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
--- a/arch/powerpc/mm/hash_utils_64.c 2009-12-14 11:14:01.000000000 +0530
+++ b/arch/powerpc/mm/hash_utils_64.c 2009-12-14 11:16:37.000000000 +0530
@@ -340,7 +340,7 @@ static int __init htab_dt_scan_page_size
else
def->tlbiel = 0;
- DBG(" %d: shift=%02x, sllp=%04x, avpnm=%08x, "
+ DBG(" %d: shift=%02x, sllp=%04lx, avpnm=%08lx, "
"tlbiel=%d, penc=%d\n",
idx, shift, def->sllp, def->avpnm, def->tlbiel,
def->penc);
@@ -663,7 +663,7 @@ static void __init htab_initialize(void)
base = (unsigned long)__va(lmb.memory.region[i].base);
size = lmb.memory.region[i].size;
- DBG("creating mapping for region: %lx..%lx (prot: %x)\n",
+ DBG("creating mapping for region: %lx..%lx (prot: %lx)\n",
base, size, prot);
#ifdef CONFIG_U3_DART
@@ -1115,7 +1115,7 @@ void flush_hash_page(unsigned long va, r
{
unsigned long hash, index, shift, hidx, slot;
- DBG_LOW("flush_hash_page(va=%016x)\n", va);
+ DBG_LOW("flush_hash_page(va=%016lx)\n", va);
pte_iterate_hashed_subpages(pte, psize, va, index, shift) {
hash = hpt_hash(va, shift, ssize);
hidx = __rpte_to_hidx(pte, index);
@@ -1123,7 +1123,7 @@ void flush_hash_page(unsigned long va, r
hash = ~hash;
slot = (hash & htab_hash_mask) * HPTES_PER_GROUP;
slot += hidx & _PTEIDX_GROUP_IX;
- DBG_LOW(" sub %d: hash=%x, hidx=%x\n", index, slot, hidx);
+ DBG_LOW(" sub %ld: hash=%lx, hidx=%lx\n", index, slot, hidx);
ppc_md.hpte_invalidate(slot, va, psize, ssize, local);
} pte_iterate_hashed_end();
}
^ permalink raw reply
* [RESEND]Fix hash_utils_64.c compile errors with DEBUG enabled.
From: Sachin Sant @ 2009-12-14 7:15 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev
This time without the funny characters.
Fix following build errors generated with DEBUG=1
cc1: warnings being treated as errors
arch/powerpc/mm/hash_utils_64.c: In function 'htab_dt_scan_page_sizes':
arch/powerpc/mm/hash_utils_64.c:343: error: format '%04x' expects type 'unsigned int', but argument 4 has type 'long unsigned int'
arch/powerpc/mm/hash_utils_64.c:343: error: format '%08x' expects type 'unsigned int', but argument 5 has type 'long unsigned int'
arch/powerpc/mm/hash_utils_64.c: In function 'htab_initialize':
arch/powerpc/mm/hash_utils_64.c:666: error: format '%x' expects type 'unsigned int', but argument 4 has type 'long unsigned int'
... SNIP ...
Signed-off-by: Sachin Sant <sachinp@in.ibm.com>
---
diff -Naurp a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
--- a/arch/powerpc/mm/hash_utils_64.c 2009-12-14 11:14:01.000000000 +0530
+++ b/arch/powerpc/mm/hash_utils_64.c 2009-12-14 11:16:37.000000000 +0530
@@ -340,7 +340,7 @@ static int __init htab_dt_scan_page_size
else
def->tlbiel = 0;
- DBG(" %d: shift=%02x, sllp=%04x, avpnm=%08x, "
+ DBG(" %d: shift=%02x, sllp=%04lx, avpnm=%08lx, "
"tlbiel=%d, penc=%d\n",
idx, shift, def->sllp, def->avpnm, def->tlbiel,
def->penc);
@@ -663,7 +663,7 @@ static void __init htab_initialize(void)
base = (unsigned long)__va(lmb.memory.region[i].base);
size = lmb.memory.region[i].size;
- DBG("creating mapping for region: %lx..%lx (prot: %x)\n",
+ DBG("creating mapping for region: %lx..%lx (prot: %lx)\n",
base, size, prot);
#ifdef CONFIG_U3_DART
@@ -1115,7 +1115,7 @@ void flush_hash_page(unsigned long va, r
{
unsigned long hash, index, shift, hidx, slot;
- DBG_LOW("flush_hash_page(va=%016x)\n", va);
+ DBG_LOW("flush_hash_page(va=%016lx)\n", va);
pte_iterate_hashed_subpages(pte, psize, va, index, shift) {
hash = hpt_hash(va, shift, ssize);
hidx = __rpte_to_hidx(pte, index);
@@ -1123,7 +1123,7 @@ void flush_hash_page(unsigned long va, r
hash = ~hash;
slot = (hash & htab_hash_mask) * HPTES_PER_GROUP;
slot += hidx & _PTEIDX_GROUP_IX;
- DBG_LOW(" sub %d: hash=%x, hidx=%x\n", index, slot, hidx);
+ DBG_LOW(" sub %ld: hash=%lx, hidx=%lx\n", index, slot, hidx);
ppc_md.hpte_invalidate(slot, va, psize, ssize, local);
} pte_iterate_hashed_end();
}
^ permalink raw reply
* Re: linux-next: 52xx-and-virtex tree build failure
From: Benjamin Herrenschmidt @ 2009-12-14 9:08 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Albert Herranz, linux-kernel, linuxppc-dev, linux-next,
Paul Mackerras
In-Reply-To: <20091214163456.e2e948cc.sfr@canb.auug.org.au>
On Mon, 2009-12-14 at 16:34 +1100, Stephen Rothwell wrote:
> Hi Grant,
>
> Today's linux-next build (powerpc ppc44x_defconfig) failed like this:
>
> arch/powerpc/mm/pgtable_32.c: In function 'mapin_ram':
> arch/powerpc/mm/pgtable_32.c:318: error: too many arguments to function 'mmu_mapin_ram'
>
> Casued by commit de32400dd26e743c5d500aa42d8d6818b79edb73 ("wii: use both
> mem1 and mem2 as ram").
>
> I applied the following patch for today, but this may be too much or
> there may be a better solution.
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 14 Dec 2009 16:04:15 +1100
> Subject: [PATCH] powerpc: fix up for mmu_mapin_ram api change
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
Grant, please add to your tree along with the Nintendo stuff.
Cheers,
Ben.
> ---
> arch/powerpc/mm/40x_mmu.c | 2 +-
> arch/powerpc/mm/44x_mmu.c | 2 +-
> arch/powerpc/mm/fsl_booke_mmu.c | 2 +-
> arch/powerpc/mm/mmu_decl.h | 6 +++---
> 4 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/powerpc/mm/40x_mmu.c b/arch/powerpc/mm/40x_mmu.c
> index f5e7b9c..08dfa8e 100644
> --- a/arch/powerpc/mm/40x_mmu.c
> +++ b/arch/powerpc/mm/40x_mmu.c
> @@ -91,7 +91,7 @@ void __init MMU_init_hw(void)
> #define LARGE_PAGE_SIZE_16M (1<<24)
> #define LARGE_PAGE_SIZE_4M (1<<22)
>
> -unsigned long __init mmu_mapin_ram(void)
> +unsigned long __init mmu_mapin_ram(unsigned long top)
> {
> unsigned long v, s, mapped;
> phys_addr_t p;
> diff --git a/arch/powerpc/mm/44x_mmu.c b/arch/powerpc/mm/44x_mmu.c
> index 98052ac..3986264 100644
> --- a/arch/powerpc/mm/44x_mmu.c
> +++ b/arch/powerpc/mm/44x_mmu.c
> @@ -88,7 +88,7 @@ void __init MMU_init_hw(void)
> flush_instruction_cache();
> }
>
> -unsigned long __init mmu_mapin_ram(void)
> +unsigned long __init mmu_mapin_ram(unsigned long top)
> {
> unsigned long addr;
>
> diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/fsl_booke_mmu.c
> index fcfcb6e..c539472 100644
> --- a/arch/powerpc/mm/fsl_booke_mmu.c
> +++ b/arch/powerpc/mm/fsl_booke_mmu.c
> @@ -207,7 +207,7 @@ unsigned long map_mem_in_cams(unsigned long ram, int max_cam_idx)
> return amount_mapped;
> }
>
> -unsigned long __init mmu_mapin_ram(void)
> +unsigned long __init mmu_mapin_ram(unsigned long top)
> {
> return tlbcam_addrs[tlbcam_index - 1].limit - PAGE_OFFSET + 1;
> }
> diff --git a/arch/powerpc/mm/mmu_decl.h b/arch/powerpc/mm/mmu_decl.h
> index eef7aaf..d49a775 100644
> --- a/arch/powerpc/mm/mmu_decl.h
> +++ b/arch/powerpc/mm/mmu_decl.h
> @@ -139,15 +139,15 @@ extern void wii_memory_fixups(void);
> */
> #if defined(CONFIG_8xx)
> #define MMU_init_hw() do { } while(0)
> -#define mmu_mapin_ram() (0UL)
> +#define mmu_mapin_ram(top) (0UL)
>
> #elif defined(CONFIG_4xx)
> extern void MMU_init_hw(void);
> -extern unsigned long mmu_mapin_ram(void);
> +extern unsigned long mmu_mapin_ram(unsigned long top);
>
> #elif defined(CONFIG_FSL_BOOKE)
> extern void MMU_init_hw(void);
> -extern unsigned long mmu_mapin_ram(void);
> +extern unsigned long mmu_mapin_ram(unsigned long top);
> extern void adjust_total_lowmem(void);
>
> #elif defined(CONFIG_PPC32)
> --
> 1.6.5.4
>
^ permalink raw reply
* Re: powerpc/kvm tree build failure
From: Alexander Graf @ 2009-12-14 10:03 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Paul Mackerras, linuxppc-dev, Hollis Blanchard, linuxppc-dev
In-Reply-To: <20091214173512.91e4e39a.sfr@canb.auug.org.au>
On 14.12.2009, at 07:35, Stephen Rothwell wrote:
> Hi all,
>=20
> A powerpc allmodconfig fails like this:
>=20
> arch/powerpc/kvm/built-in.o:(.toc1+0x18): undefined reference to =
`kvm_debugfs_dir'
>=20
> This is because CONFIG_KVM_EXIT_TIMING is a bool while
> CONFIG_KVM_BOOK3S_64 is tristate. This causes =
arch/powerpc/kvm/timing.o
> (which references kvm_debugfs_dir) to be built in, but
> virt/kvm/kvm_main.o (which defines it) to be modular.
Ouch.
EXIT_TIMING could be used by BookE and Book3S KVM support. BookE can't =
be built as a module, while Book3S can.
So what's the usual / best way to fix this? Make EXIT_TIMING a tristate =
too, but only on Book3S? Maybe by defining it as dependent on Book3S or =
BookE KVM support?
The easiest thing for now would probably be to just make it depend on =
BookE support, since we don't have support for exit timing in Book3S =
yet. But I'm not sure which approach is the best to take :-).
Alex=
^ permalink raw reply
* Re: [Next] CPU Hotplug test failures on powerpc
From: Peter Zijlstra @ 2009-12-14 10:22 UTC (permalink / raw)
To: Sachin Sant; +Cc: Linux/PPC Development, Ingo Molnar, linux-next, linux-kernel
In-Reply-To: <4B2224C7.1020908@in.ibm.com>
On Fri, 2009-12-11 at 16:23 +0530, Sachin Sant wrote:
> While executing cpu_hotplug(from autotest) tests against latest
> next on a power6 box, the machine locks up. A soft reset shows
> the following trace
>=20
> cpu 0x0: Vector: 100 (System Reset) at [c00000000c9333d0]
> pc: c0000000003433d8: .find_next_bit+0x54/0xc4
> lr: c000000000342f10: .cpumask_next_and+0x4c/0x94
> sp: c00000000c933650
> msr: 8000000000089032
> current =3D 0xc00000000c173840
> paca =3D 0xc000000000bc2600
> pid =3D 2602, comm =3D hotplug06.top.s
> enter ? for help
> [link register ] c000000000342f10 .cpumask_next_and+0x4c/0x94
> [c00000000c933650] c0000000000e9f34 .cpuset_cpus_allowed_locked+0x38/0x74=
(unreliable)
> [c00000000c9336e0] c000000000090074 .move_task_off_dead_cpu+0xc4/0x1ac
> [c00000000c9337a0] c0000000005e4e5c .migration_call+0x304/0x830
> [c00000000c933880] c0000000005e0880 .notifier_call_chain+0x68/0xe0
> [c00000000c933920] c00000000012a92c ._cpu_down+0x210/0x34c
> [c00000000c933a90] c00000000012aad8 .cpu_down+0x70/0xa8
> [c00000000c933b20] c000000000525940 .store_online+0x54/0x894
> [c00000000c933bb0] c000000000463430 .sysdev_store+0x3c/0x50
> [c00000000c933c20] c0000000001f8320 .sysfs_write_file+0x124/0x18c
> [c00000000c933ce0] c00000000017edac .vfs_write+0xd4/0x1fc
> [c00000000c933d80] c00000000017efdc .SyS_write+0x58/0xa0
> [c00000000c933e30] c0000000000085b4 syscall_exit+0x0/0x40
> --- Exception: c01 (System Call) at 00000fff9fa8a8f8
> SP (fffe7aef200) is in userspace
> 0:mon> e
> cpu 0x0: Vector: 100 (System Reset) at [c00000000c9333d0]
> pc: c0000000003433d8: .find_next_bit+0x54/0xc4
> lr: c000000000342f10: .cpumask_next_and+0x4c/0x94
> sp: c00000000c933650
> msr: 8000000000089032
> current =3D 0xc00000000c173840
> paca =3D 0xc000000000bc2600
> pid =3D 2602, comm =3D hotplug06.top.s
>=20
> Last few messages from the dmesg log shows
> After some debugging a possible suspect seems to be commit
> 6ad4c18.. : sched: Fix balance vs hotplug race
Oh, wonderful :-/
So what is that thing whining about? Not being able to read a cpumask or
something?
Does your .config have cpusets enabled (there's a different
cpuset_cpus_allowed_locked implementation depending on that)?
I know of at least one remaining race and am working on closing that,
but I'm not sure I can explain this crash with that.
^ permalink raw reply
* Re: [Next] CPU Hotplug test failures on powerpc
From: Sachin Sant @ 2009-12-14 11:11 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Linux/PPC Development, Ingo Molnar, linux-next, linux-kernel
In-Reply-To: <1260786122.4165.142.camel@twins>
[-- Attachment #1: Type: text/plain, Size: 2723 bytes --]
Peter Zijlstra wrote:
> On Fri, 2009-12-11 at 16:23 +0530, Sachin Sant wrote:
>
>> While executing cpu_hotplug(from autotest) tests against latest
>> next on a power6 box, the machine locks up. A soft reset shows
>> the following trace
>>
>> cpu 0x0: Vector: 100 (System Reset) at [c00000000c9333d0]
>> pc: c0000000003433d8: .find_next_bit+0x54/0xc4
>> lr: c000000000342f10: .cpumask_next_and+0x4c/0x94
>> sp: c00000000c933650
>> msr: 8000000000089032
>> current = 0xc00000000c173840
>> paca = 0xc000000000bc2600
>> pid = 2602, comm = hotplug06.top.s
>> enter ? for help
>> [link register ] c000000000342f10 .cpumask_next_and+0x4c/0x94
>> [c00000000c933650] c0000000000e9f34 .cpuset_cpus_allowed_locked+0x38/0x74 (unreliable)
>> [c00000000c9336e0] c000000000090074 .move_task_off_dead_cpu+0xc4/0x1ac
>> [c00000000c9337a0] c0000000005e4e5c .migration_call+0x304/0x830
>> [c00000000c933880] c0000000005e0880 .notifier_call_chain+0x68/0xe0
>> [c00000000c933920] c00000000012a92c ._cpu_down+0x210/0x34c
>> [c00000000c933a90] c00000000012aad8 .cpu_down+0x70/0xa8
>> [c00000000c933b20] c000000000525940 .store_online+0x54/0x894
>> [c00000000c933bb0] c000000000463430 .sysdev_store+0x3c/0x50
>> [c00000000c933c20] c0000000001f8320 .sysfs_write_file+0x124/0x18c
>> [c00000000c933ce0] c00000000017edac .vfs_write+0xd4/0x1fc
>> [c00000000c933d80] c00000000017efdc .SyS_write+0x58/0xa0
>> [c00000000c933e30] c0000000000085b4 syscall_exit+0x0/0x40
>> --- Exception: c01 (System Call) at 00000fff9fa8a8f8
>> SP (fffe7aef200) is in userspace
>> 0:mon> e
>> cpu 0x0: Vector: 100 (System Reset) at [c00000000c9333d0]
>> pc: c0000000003433d8: .find_next_bit+0x54/0xc4
>> lr: c000000000342f10: .cpumask_next_and+0x4c/0x94
>> sp: c00000000c933650
>> msr: 8000000000089032
>> current = 0xc00000000c173840
>> paca = 0xc000000000bc2600
>> pid = 2602, comm = hotplug06.top.s
>>
>> Last few messages from the dmesg log shows
>>
>
>
>
>> After some debugging a possible suspect seems to be commit
>> 6ad4c18.. : sched: Fix balance vs hotplug race
>>
>
>
> Oh, wonderful :-/
>
> So what is that thing whining about? Not being able to read a cpumask or
> something?
>
> Does your .config have cpusets enabled (there's a different
> cpuset_cpus_allowed_locked implementation depending on that)?
>
Yes CPUSETS config is enabled. I have attached the config.
Thanks
-Sachin
> I know of at least one remaining race and am working on closing that,
> but I'm not sure I can explain this crash with that.
>
>
--
---------------------------------
Sachin Sant
IBM Linux Technology Center
India Systems and Technology Labs
Bangalore, India
---------------------------------
[-- Attachment #2: config_cpu_hotplug.gz --]
[-- Type: application/x-gzip, Size: 19832 bytes --]
^ permalink raw reply
* Re: [Next] CPU Hotplug test failures on powerpc
From: Peter Zijlstra @ 2009-12-14 12:19 UTC (permalink / raw)
To: Sachin Sant; +Cc: Linux/PPC Development, Ingo Molnar, linux-next, linux-kernel
In-Reply-To: <4B261D7A.9040802@in.ibm.com>
On Mon, 2009-12-14 at 16:41 +0530, Sachin Sant wrote:
> Peter Zijlstra wrote:
> > On Fri, 2009-12-11 at 16:23 +0530, Sachin Sant wrote:
> > =20
> >> While executing cpu_hotplug(from autotest) tests against latest
> >> next on a power6 box, the machine locks up. A soft reset shows
> >> the following trace
> >>
> >> cpu 0x0: Vector: 100 (System Reset) at [c00000000c9333d0]
> >> pc: c0000000003433d8: .find_next_bit+0x54/0xc4
> >> lr: c000000000342f10: .cpumask_next_and+0x4c/0x94
> >> sp: c00000000c933650
> >> msr: 8000000000089032
> >> current =3D 0xc00000000c173840
> >> paca =3D 0xc000000000bc2600
> >> pid =3D 2602, comm =3D hotplug06.top.s
> >> enter ? for help
> >> [link register ] c000000000342f10 .cpumask_next_and+0x4c/0x94
> >> [c00000000c933650] c0000000000e9f34 .cpuset_cpus_allowed_locked+0x38/0=
x74 (unreliable)
> >> [c00000000c9336e0] c000000000090074 .move_task_off_dead_cpu+0xc4/0x1ac
> >> [c00000000c9337a0] c0000000005e4e5c .migration_call+0x304/0x830
> >> [c00000000c933880] c0000000005e0880 .notifier_call_chain+0x68/0xe0
> >> [c00000000c933920] c00000000012a92c ._cpu_down+0x210/0x34c
> >> [c00000000c933a90] c00000000012aad8 .cpu_down+0x70/0xa8
> >> [c00000000c933b20] c000000000525940 .store_online+0x54/0x894
> >> [c00000000c933bb0] c000000000463430 .sysdev_store+0x3c/0x50
> >> [c00000000c933c20] c0000000001f8320 .sysfs_write_file+0x124/0x18c
> >> [c00000000c933ce0] c00000000017edac .vfs_write+0xd4/0x1fc
> >> [c00000000c933d80] c00000000017efdc .SyS_write+0x58/0xa0
> >> [c00000000c933e30] c0000000000085b4 syscall_exit+0x0/0x40
> >> --- Exception: c01 (System Call) at 00000fff9fa8a8f8
> >> SP (fffe7aef200) is in userspace
> >> 0:mon> e
> >> cpu 0x0: Vector: 100 (System Reset) at [c00000000c9333d0]
> >> pc: c0000000003433d8: .find_next_bit+0x54/0xc4
> >> lr: c000000000342f10: .cpumask_next_and+0x4c/0x94
> >> sp: c00000000c933650
> >> msr: 8000000000089032
> >> current =3D 0xc00000000c173840
> >> paca =3D 0xc000000000bc2600
> >> pid =3D 2602, comm =3D hotplug06.top.s
> >>
OK so how do I read that above thing? What's a System Reset? Is that
like the x86 triple fault thing?
>From what I can make of it, its in move_task_off_dead_cpu(), right after
having called cpuset_cpus_allowed_locked(), doing that cpumask_any_and()
call.
static void move_task_off_dead_cpu(int dead_cpu, struct task_struct *p)
{
int dest_cpu;
const struct cpumask *nodemask =3D cpumask_of_node(cpu_to_node(dead=
_cpu));
again:
/* Look for allowed, online CPU in same node. */
for_each_cpu_and(dest_cpu, nodemask, cpu_active_mask)
if (cpumask_test_cpu(dest_cpu, &p->cpus_allowed))
goto move;
/* Any allowed, online CPU? */
dest_cpu =3D cpumask_any_and(&p->cpus_allowed, cpu_active_mask);
if (dest_cpu < nr_cpu_ids)
goto move;
/* No more Mr. Nice Guy. */
if (dest_cpu >=3D nr_cpu_ids) {
cpuset_cpus_allowed_locked(p, &p->cpus_allowed);
=3D=3D=3D=3D> dest_cpu =3D cpumask_any_and(cpu_active_mask, &p->c=
pus_allowed);
/*
* Don't tell them about moving exiting tasks or
* kernel threads (both mm NULL), since they never
* leave kernel.
*/
if (p->mm && printk_ratelimit()) {
pr_info("process %d (%s) no longer affine to cpu%d\=
n",
task_pid_nr(p), p->comm, dead_cpu);
}
}
move:
/* It can have affinity changed while we were choosing. */
if (unlikely(!__migrate_task_irq(p, dead_cpu, dest_cpu)))
goto again;
}
Both masks, p->cpus_allowed and cpu_active_mask are stable in that p
won't go away since we hold the tasklist_lock (in migrate_list_tasks),
and cpu_active_mask is static storage, so WTH is it going funny on?
^ permalink raw reply
* [PATCH] powerpc/mm: fix typo of cpumask_clear_cpu()
From: Li Yang @ 2009-12-14 13:01 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev
The function name of cpumask_clear_cpu was not correct.
Reported-by: Jin Qing <b24347@freescale.com>
Signed-off-by: Li Yang <leoli@freescale.com>
---
This also implies that the CONFIG_HOTPLUG_CPU was never tested.
We are trying to add cpu hotplug for SMP suspend, but seeing the
following error(on 2.6.31 with context patches applied).
Any idea or suggestion?
------------[ cut here ]------------
Badness at c00161b0 [verbose debug info unavailable]
NIP: c00161b0 LR: c0016190 CTR: c0038f7c
REGS: eec61e10 TRAP: 0700 Not tainted (2.6.31-00040-g7c92556-dirty)
MSR: 00021000 <ME,CE> CR: 22280028 XER: 00000000
TASK = eec54980[0] 'swapper' THREAD: eec60000 CPU: 1
GPR00: 00000001 eec61ec0 eec54980 c0562ea0 eecad500 00000000 00000000 00000001
GPR08: 00eed000 00000000 00000001 eecad67c 00001ca8 00000000 00021000 eec60040
GPR16: eec54b0c c05208a0 c055fbe8 00000001 ffffffff c0560000 c0562ea0 00000004
GPR24: eec60000 00000001 00000000 c0562e80 eec60000 c05291f8 eecad500 c05291f8
NIP [c00161b0] switch_mmu_context+0x54/0x520
LR [c0016190] switch_mmu_context+0x34/0x520
Call Trace:
[eec61ec0] [c00709c8] tick_program_event+0x50/0x60 (unreliable)
[eec61f20] [c03beb54] schedule+0x2bc/0x7bc
[eec61fa0] [c0008a8c] cpu_idle+0x160/0x170
[eec61fc0] [c03c4be0] start_secondary+0x2d0/0x2e8
[eec61ff0] [c0001c9c] __secondary_start+0x30/0x84
Instruction dump:
543c0024 7ec3b378 833c0008 483ab1bd 813e0184 2f9d0000 39290001 913e0184
419e001c 813d0184 7d200034 5400d97e <0f000000> 3929ffff 913d0184 3d20c055
MMU: More active contexts than CPUs ! (3 vs 2)
MMU: More active contexts than CPUs ! (3 vs 2)
arch/powerpc/mm/mmu_context_nohash.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/mm/mmu_context_nohash.c b/arch/powerpc/mm/mmu_context_nohash.c
index be4f34c..1044a63 100644
--- a/arch/powerpc/mm/mmu_context_nohash.c
+++ b/arch/powerpc/mm/mmu_context_nohash.c
@@ -353,7 +353,7 @@ static int __cpuinit mmu_context_cpu_notify(struct notifier_block *self,
read_lock(&tasklist_lock);
for_each_process(p) {
if (p->mm)
- cpu_mask_clear_cpu(cpu, mm_cpumask(p->mm));
+ cpumask_clear_cpu(cpu, mm_cpumask(p->mm));
}
read_unlock(&tasklist_lock);
break;
--
1.6.6-rc1.GIT
^ permalink raw reply related
* [PATCH v1] fsldma: Delete DMA_INTERRUPT capability
From: Vishnu Suresh @ 2009-12-14 13:30 UTC (permalink / raw)
To: linuxppc-dev, linux-kernel, linux-raid, dan.j.williams
Cc: Vishnu Suresh, B04825, R58472
The DMA_INTERRUPT is a NULL transfer, triggering a
Programming Error. Though this Error is handled in
the driver with the fix given in "fsldma: Fix the DMA
halt when using DMA_INTERRUPT async_tx transfer."
<f79abb627f033c85a6088231f20c85bc4a9bd757>,
the RAID5 operation, which initiated the transaction
via Async_tx, hangs.
Hence, this patch removes the DMA_INTERRUPT capability
and the associated code from the driver.
Signed-off-by: Vishnu Suresh <Vishnu@freescale.com>
---
Changes with respect to v0
o. The functionality is removed instead of disabling as
per comments
o. Rebased to linux-next as of 20091214
drivers/dma/fsldma.c | 31 -------------------------------
1 files changed, 0 insertions(+), 31 deletions(-)
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index 296f9e7..272097a 100644
--- a/drivers/dma/fsldma.c
+++ b/drivers/dma/fsldma.c
@@ -449,35 +449,6 @@ static void fsl_dma_free_chan_resources(struct dma_chan *chan)
fsl_chan->desc_pool = NULL;
}
-static struct dma_async_tx_descriptor *
-fsl_dma_prep_interrupt(struct dma_chan *chan, unsigned long flags)
-{
- struct fsl_dma_chan *fsl_chan;
- struct fsl_desc_sw *new;
-
- if (!chan)
- return NULL;
-
- fsl_chan = to_fsl_chan(chan);
-
- new = fsl_dma_alloc_descriptor(fsl_chan);
- if (!new) {
- dev_err(fsl_chan->dev, "No free memory for link descriptor\n");
- return NULL;
- }
-
- new->async_tx.cookie = -EBUSY;
- new->async_tx.flags = flags;
-
- /* Insert the link descriptor to the LD ring */
- list_add_tail(&new->node, &new->tx_list);
-
- /* Set End-of-link to the last link descriptor of new list*/
- set_ld_eol(fsl_chan, new);
-
- return &new->async_tx;
-}
-
static struct dma_async_tx_descriptor *fsl_dma_prep_memcpy(
struct dma_chan *chan, dma_addr_t dma_dest, dma_addr_t dma_src,
size_t len, unsigned long flags)
@@ -1200,11 +1171,9 @@ static int __devinit of_fsl_dma_probe(struct of_device *dev,
- fdev->reg.start + 1);
dma_cap_set(DMA_MEMCPY, fdev->common.cap_mask);
- dma_cap_set(DMA_INTERRUPT, fdev->common.cap_mask);
dma_cap_set(DMA_SLAVE, fdev->common.cap_mask);
fdev->common.device_alloc_chan_resources = fsl_dma_alloc_chan_resources;
fdev->common.device_free_chan_resources = fsl_dma_free_chan_resources;
- fdev->common.device_prep_dma_interrupt = fsl_dma_prep_interrupt;
fdev->common.device_prep_dma_memcpy = fsl_dma_prep_memcpy;
fdev->common.device_is_tx_complete = fsl_dma_is_complete;
fdev->common.device_issue_pending = fsl_dma_memcpy_issue_pending;
--
1.6.4.2
^ permalink raw reply related
* [PATCH v0] fsldma: re-initialize async_tx descriptors
From: Vishnu Suresh @ 2009-12-14 13:30 UTC (permalink / raw)
To: linuxppc-dev, linux-kernel, linux-raid, dan.j.williams
Cc: Vishnu Suresh, B04825, R58472
The async_tx descriptors contains dangling pointers.
Hence, re-initialize them to NULL before use.
Signed-off-by: Vishnu Suresh <Vishnu@freescale.com>
---
o. Rebased to linux-next as of 20091214
drivers/dma/fsldma.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index 272097a..779c2b6 100644
--- a/drivers/dma/fsldma.c
+++ b/drivers/dma/fsldma.c
@@ -384,6 +384,8 @@ static struct fsl_desc_sw *fsl_dma_alloc_descriptor(
dma_async_tx_descriptor_init(&desc_sw->async_tx,
&fsl_chan->common);
desc_sw->async_tx.tx_submit = fsl_dma_tx_submit;
+ desc_sw->async_tx.parent = NULL;
+ desc_sw->async_tx.next = NULL;
desc_sw->async_tx.phys = pdesc;
}
--
1.6.4.2
^ permalink raw reply related
* [PATCH v1] Crypto: Talitos: Support for Async_tx XOR offload
From: Vishnu Suresh @ 2009-12-14 13:32 UTC (permalink / raw)
To: linuxppc-dev, linux-kernel, linux-raid, dan.j.williams,
linux-crypto, herbert
Cc: R58472, B04825, Vishnu Suresh, Dipen Dudhat, Maneesh Gupta
Expose Talitos's XOR functionality to be used for
RAID Parity calculation via the Async_tx layer.
Thanks to Surender Kumar and Lee Nipper for their help in
realising this driver
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Dipen Dudhat <Dipen.Dudhat@freescale.com>
Signed-off-by: Maneesh Gupta <Maneesh.Gupta@freescale.com>
Signed-off-by: Vishnu Suresh <Vishnu@freescale.com>
---
Changes with respect to v0 as per comments received
o. Removed ASYNC_XOR selection from Kconfig
o. Use dma_run_dependencies API instead of scheduling directly
from release path
o. Change spinlock_irqsave to spin_lock_bh
o. Removed setting async_tx_ack
o. Removed unnecessary initialization.
o. Rebased to linux-next as of 20091214
drivers/crypto/Kconfig | 1 +
drivers/crypto/talitos.c | 397 +++++++++++++++++++++++++++++++++++++++++++++-
drivers/crypto/talitos.h | 2 +
3 files changed, 399 insertions(+), 1 deletions(-)
diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
index b08403d..fe406b2 100644
--- a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -192,6 +192,7 @@ config CRYPTO_DEV_TALITOS
select CRYPTO_ALGAPI
select CRYPTO_AUTHENC
select HW_RANDOM
+ select DMA_ENGINE
depends on FSL_SOC
help
Say 'Y' here to use the Freescale Security Engine (SEC)
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
index c47ffe8..87f06be 100644
--- a/drivers/crypto/talitos.c
+++ b/drivers/crypto/talitos.c
@@ -1,7 +1,7 @@
/*
* talitos - Freescale Integrated Security Engine (SEC) device driver
*
- * Copyright (c) 2008 Freescale Semiconductor, Inc.
+ * Copyright (c) 2008-2009 Freescale Semiconductor, Inc.
*
* Scatterlist Crypto API glue code copied from files with the following:
* Copyright (c) 2006-2007 Herbert Xu <herbert@gondor.apana.org.au>
@@ -37,6 +37,8 @@
#include <linux/io.h>
#include <linux/spinlock.h>
#include <linux/rtnetlink.h>
+#include <linux/dmaengine.h>
+#include <linux/raid/xor.h>
#include <crypto/algapi.h>
#include <crypto/aes.h>
@@ -140,6 +142,9 @@ struct talitos_private {
/* hwrng device */
struct hwrng rng;
+
+ /* XOR Device */
+ struct dma_device dma_dev_common;
};
/* .features flag */
@@ -685,6 +690,375 @@ static void talitos_unregister_rng(struct device *dev)
}
/*
+ * async_tx interface for XOR-capable SECs
+ *
+ * Dipen Dudhat <Dipen.Dudhat@freescale.com>
+ * Maneesh Gupta <Maneesh.Gupta@freescale.com>
+ * Vishnu Suresh <Vishnu@freescale.com>
+ */
+
+/**
+ * talitos_xor_chan - context management for the async_tx channel
+ * @completed_cookie: the last completed cookie
+ * @desc_lock: lock for tx queue
+ * @total_desc: number of descriptors allocated
+ * @submit_q: queue of submitted descriptors
+ * @pending_q: queue of pending descriptors
+ * @in_progress_q: queue of descriptors in progress
+ * @free_desc: queue of unused descriptors
+ * @dev: talitos device implementing this channel
+ * @common: the corresponding xor channel in async_tx
+ */
+struct talitos_xor_chan {
+ dma_cookie_t completed_cookie;
+ spinlock_t desc_lock;
+ unsigned int total_desc;
+ struct list_head submit_q;
+ struct list_head pending_q;
+ struct list_head in_progress_q;
+ struct list_head free_desc;
+ struct device *dev;
+ struct dma_chan common;
+};
+
+/**
+ * talitos_xor_desc - software xor descriptor
+ * @async_tx: the referring async_tx descriptor
+ * @node:
+ * @hwdesc: h/w descriptor
+ */
+struct talitos_xor_desc {
+ struct dma_async_tx_descriptor async_tx;
+ struct list_head tx_list;
+ struct list_head node;
+ struct talitos_desc hwdesc;
+};
+
+static void talitos_release_xor(struct device *dev, struct talitos_desc *hwdesc,
+ void *context, int error);
+
+static enum dma_status talitos_is_tx_complete(struct dma_chan *chan,
+ dma_cookie_t cookie,
+ dma_cookie_t *done,
+ dma_cookie_t *used)
+{
+ struct talitos_xor_chan *xor_chan;
+ dma_cookie_t last_used;
+ dma_cookie_t last_complete;
+
+ xor_chan = container_of(chan, struct talitos_xor_chan, common);
+
+ last_used = chan->cookie;
+ last_complete = xor_chan->completed_cookie;
+
+ if (done)
+ *done = last_complete;
+
+ if (used)
+ *used = last_used;
+
+ return dma_async_is_complete(cookie, last_complete, last_used);
+}
+
+static void talitos_process_pending(struct talitos_xor_chan *xor_chan)
+{
+ struct talitos_xor_desc *desc, *_desc;
+
+ spin_lock_bh(&xor_chan->desc_lock);
+ list_for_each_entry_safe(desc, _desc, &xor_chan->pending_q, node) {
+ if (talitos_submit(xor_chan->dev, &desc->hwdesc,
+ talitos_release_xor, desc) != -EINPROGRESS)
+ break;
+
+ list_del(&desc->node);
+ list_add_tail(&desc->node, &xor_chan->in_progress_q);
+ }
+ spin_unlock_bh(&xor_chan->desc_lock);
+}
+
+static void talitos_release_xor(struct device *dev, struct talitos_desc *hwdesc,
+ void *context, int error)
+{
+ struct talitos_xor_desc *desc = context;
+ struct talitos_xor_chan *xor_chan;
+ dma_async_tx_callback callback;
+ void *callback_param;
+
+ if (unlikely(error)) {
+ dev_err(dev, "xor operation: talitos error %d\n", error);
+ BUG();
+ }
+
+ xor_chan = container_of(desc->async_tx.chan, struct talitos_xor_chan,
+ common);
+ spin_lock_bh(&xor_chan->desc_lock);
+ if (xor_chan->completed_cookie < desc->async_tx.cookie)
+ xor_chan->completed_cookie = desc->async_tx.cookie;
+
+ callback = desc->async_tx.callback;
+ callback_param = desc->async_tx.callback_param;
+ list_del(&desc->node);
+ list_add_tail(&desc->node, &xor_chan->free_desc);
+ spin_unlock_bh(&xor_chan->desc_lock);
+
+ if (callback)
+ callback(callback_param);
+
+ /* run dependent operations */
+ dma_run_dependencies(&desc->async_tx);
+}
+
+/**
+ * talitos_issue_pending - move the descriptors in submit
+ * queue to pending queue and submit them for processing
+ * @chan: DMA channel
+ */
+static void talitos_issue_pending(struct dma_chan *chan)
+{
+ struct talitos_xor_chan *xor_chan;
+
+ xor_chan = container_of(chan, struct talitos_xor_chan, common);
+ spin_lock_bh(&xor_chan->desc_lock);
+ list_splice_tail_init(&xor_chan->submit_q,
+ &xor_chan->pending_q);
+ spin_unlock_bh(&xor_chan->desc_lock);
+ talitos_process_pending(xor_chan);
+}
+
+static dma_cookie_t talitos_async_tx_submit(struct dma_async_tx_descriptor *tx)
+{
+ struct talitos_xor_desc *desc;
+ struct talitos_xor_chan *xor_chan;
+ dma_cookie_t cookie;
+
+ desc = container_of(tx, struct talitos_xor_desc, async_tx);
+ xor_chan = container_of(tx->chan, struct talitos_xor_chan, common);
+
+ cookie = xor_chan->common.cookie + 1;
+ if (cookie < 0)
+ cookie = 1;
+
+ desc->async_tx.cookie = cookie;
+ xor_chan->common.cookie = desc->async_tx.cookie;
+
+ list_splice_tail_init(&desc->tx_list,
+ &xor_chan->submit_q);
+
+ return cookie;
+}
+
+static struct talitos_xor_desc *talitos_xor_alloc_descriptor(
+ struct talitos_xor_chan *xor_chan, gfp_t flags)
+{
+ struct talitos_xor_desc *desc;
+
+ desc = kmalloc(sizeof(*desc), flags);
+ if (desc) {
+ xor_chan->total_desc++;
+ desc->async_tx.tx_submit = talitos_async_tx_submit;
+ INIT_LIST_HEAD(&desc->node);
+ INIT_LIST_HEAD(&desc->tx_list);
+ }
+
+ return desc;
+}
+
+static void talitos_free_chan_resources(struct dma_chan *chan)
+{
+ struct talitos_xor_chan *xor_chan;
+ struct talitos_xor_desc *desc, *_desc;
+
+ xor_chan = container_of(chan, struct talitos_xor_chan, common);
+
+ list_for_each_entry_safe(desc, _desc, &xor_chan->submit_q, node) {
+ list_del(&desc->node);
+ xor_chan->total_desc--;
+ kfree(desc);
+ }
+ list_for_each_entry_safe(desc, _desc, &xor_chan->pending_q, node) {
+ list_del(&desc->node);
+ xor_chan->total_desc--;
+ kfree(desc);
+ }
+ list_for_each_entry_safe(desc, _desc, &xor_chan->in_progress_q, node) {
+ list_del(&desc->node);
+ xor_chan->total_desc--;
+ kfree(desc);
+ }
+ list_for_each_entry_safe(desc, _desc, &xor_chan->free_desc, node) {
+ list_del(&desc->node);
+ xor_chan->total_desc--;
+ kfree(desc);
+ }
+ BUG_ON(unlikely(xor_chan->total_desc)); /* Some descriptor not freed? */
+}
+
+static int talitos_alloc_chan_resources(struct dma_chan *chan)
+{
+ struct talitos_xor_chan *xor_chan;
+ struct talitos_xor_desc *desc;
+ LIST_HEAD(tmp_list);
+ int i;
+
+ xor_chan = container_of(chan, struct talitos_xor_chan, common);
+
+ if (!list_empty(&xor_chan->free_desc))
+ return xor_chan->total_desc;
+
+ /* 256 initial descriptors */
+ for (i = 0; i < 256; i++) {
+ desc = talitos_xor_alloc_descriptor(xor_chan, GFP_KERNEL);
+ if (!desc) {
+ dev_err(xor_chan->common.device->dev,
+ "Only %d initial descriptors\n", i);
+ break;
+ }
+ list_add_tail(&desc->node, &tmp_list);
+ }
+
+ if (!i)
+ return -ENOMEM;
+
+ /* At least one desc is allocated */
+ list_splice_init(&tmp_list, &xor_chan->free_desc);
+
+ return xor_chan->total_desc;
+}
+
+static struct dma_async_tx_descriptor * talitos_prep_dma_xor(
+ struct dma_chan *chan, dma_addr_t dest, dma_addr_t *src,
+ unsigned int src_cnt, size_t len, unsigned long flags)
+{
+ struct talitos_xor_chan *xor_chan;
+ struct talitos_xor_desc *new;
+ struct talitos_desc *desc;
+ int i, j;
+
+ BUG_ON(unlikely(len > TALITOS_MAX_DATA_LEN));
+
+ xor_chan = container_of(chan, struct talitos_xor_chan, common);
+
+ if (!list_empty(&xor_chan->free_desc)) {
+ new = container_of(xor_chan->free_desc.next,
+ struct talitos_xor_desc, node);
+ list_del(&new->node);
+ } else {
+ new = talitos_xor_alloc_descriptor(xor_chan, GFP_KERNEL);
+ }
+
+ if (!new) {
+ dev_err(xor_chan->common.device->dev,
+ "No free memory for XOR DMA descriptor\n");
+ return NULL;
+ }
+ dma_async_tx_descriptor_init(&new->async_tx, &xor_chan->common);
+
+ desc = &new->hwdesc;
+ /* Set destination: Last pointer pair */
+ to_talitos_ptr(&desc->ptr[6], dest);
+ desc->ptr[6].len = cpu_to_be16(len);
+ desc->ptr[6].j_extent = 0;
+
+ /* Set Sources: End loading from second-last pointer pair */
+ for (i = 5, j = 0; (j < src_cnt) && (i > 0); i--, j++) {
+ to_talitos_ptr(&desc->ptr[i], src[j]);
+ desc->ptr[i].len = cpu_to_be16(len);
+ desc->ptr[i].j_extent = 0;
+ }
+
+ /*
+ * documentation states first 0 ptr/len combo marks end of sources
+ * yet device produces scatter boundary error unless all subsequent
+ * sources are zeroed out
+ */
+ for (; i >= 0; i--) {
+ to_talitos_ptr(&desc->ptr[i], 0);
+ desc->ptr[i].len = 0;
+ desc->ptr[i].j_extent = 0;
+ }
+
+ desc->hdr = DESC_HDR_SEL0_AESU | DESC_HDR_MODE0_AESU_XOR
+ | DESC_HDR_TYPE_RAID_XOR;
+
+ list_add_tail(&new->node, &new->tx_list);
+
+ new->async_tx.flags = flags;
+ new->async_tx.cookie = -EBUSY;
+
+ return &new->async_tx;
+}
+
+static void talitos_unregister_async_xor(struct device *dev)
+{
+ struct talitos_private *priv = dev_get_drvdata(dev);
+ struct talitos_xor_chan *xor_chan;
+ struct dma_chan *chan;
+
+ if (priv->dma_dev_common.chancnt)
+ dma_async_device_unregister(&priv->dma_dev_common);
+
+ list_for_each_entry(chan, &priv->dma_dev_common.channels, device_node) {
+ xor_chan = container_of(chan, struct talitos_xor_chan, common);
+ list_del(&chan->device_node);
+ priv->dma_dev_common.chancnt--;
+ kfree(xor_chan);
+ }
+}
+
+/**
+ * talitos_register_dma_async - Initialize the Freescale XOR ADMA device
+ * It is registered as a DMA device with the capability to perform
+ * XOR operation with the Async_tx layer.
+ * The various queues and channel resources are also allocated.
+ */
+static int talitos_register_async_tx(struct device *dev, int max_xor_srcs)
+{
+ struct talitos_private *priv = dev_get_drvdata(dev);
+ struct dma_device *dma_dev = &priv->dma_dev_common;
+ struct talitos_xor_chan *xor_chan;
+ int err;
+
+ xor_chan = kzalloc(sizeof(struct talitos_xor_chan), GFP_KERNEL);
+ if (!xor_chan) {
+ dev_err(dev, "unable to allocate xor channel\n");
+ return -ENOMEM;
+ }
+
+ dma_dev->dev = dev;
+ dma_dev->device_alloc_chan_resources = talitos_alloc_chan_resources;
+ dma_dev->device_free_chan_resources = talitos_free_chan_resources;
+ dma_dev->device_prep_dma_xor = talitos_prep_dma_xor;
+ dma_dev->max_xor = max_xor_srcs;
+ dma_dev->device_is_tx_complete = talitos_is_tx_complete;
+ dma_dev->device_issue_pending = talitos_issue_pending;
+ INIT_LIST_HEAD(&dma_dev->channels);
+ dma_cap_set(DMA_XOR, dma_dev->cap_mask);
+
+ xor_chan->dev = dev;
+ xor_chan->common.device = dma_dev;
+ xor_chan->total_desc = 0;
+ INIT_LIST_HEAD(&xor_chan->submit_q);
+ INIT_LIST_HEAD(&xor_chan->pending_q);
+ INIT_LIST_HEAD(&xor_chan->in_progress_q);
+ INIT_LIST_HEAD(&xor_chan->free_desc);
+ spin_lock_init(&xor_chan->desc_lock);
+
+ list_add_tail(&xor_chan->common.device_node, &dma_dev->channels);
+ dma_dev->chancnt++;
+
+ err = dma_async_device_register(dma_dev);
+ if (err) {
+ dev_err(dev, "Unable to register XOR with Async_tx\n");
+ goto err_out;
+ }
+
+ return err;
+
+err_out:
+ talitos_unregister_async_xor(dev);
+ return err;
+}
+/*
* crypto alg
*/
#define TALITOS_CRA_PRIORITY 3000
@@ -1768,6 +2142,8 @@ static int talitos_remove(struct of_device *ofdev)
tasklet_kill(&priv->done_task);
iounmap(priv->reg);
+ if (priv->dma_dev_common.chancnt)
+ talitos_unregister_async_xor(dev);
dev_set_drvdata(dev, NULL);
@@ -1926,6 +2302,25 @@ static int talitos_probe(struct of_device *ofdev,
dev_info(dev, "hwrng\n");
}
+ /*
+ * register with async_tx xor, if capable
+ * SEC 2.x support up to 3 RAID sources,
+ * SEC 3.x support up to 6
+ */
+ if (hw_supports(dev, DESC_HDR_SEL0_AESU | DESC_HDR_TYPE_RAID_XOR)) {
+ int max_xor_srcs = 3;
+ if (of_device_is_compatible(np, "fsl,sec3.0"))
+ max_xor_srcs = 6;
+
+ err = talitos_register_async_tx(dev, max_xor_srcs);
+ if (err) {
+ dev_err(dev, "failed to register async_tx xor: %d\n",
+ err);
+ goto err_out;
+ }
+ dev_info(dev, "max_xor_srcs %d\n", max_xor_srcs);
+ }
+
/* register crypto algorithms the device supports */
for (i = 0; i < ARRAY_SIZE(driver_algs); i++) {
if (hw_supports(dev, driver_algs[i].desc_hdr_template)) {
diff --git a/drivers/crypto/talitos.h b/drivers/crypto/talitos.h
index ff5a145..b6197bc 100644
--- a/drivers/crypto/talitos.h
+++ b/drivers/crypto/talitos.h
@@ -155,6 +155,7 @@
/* primary execution unit mode (MODE0) and derivatives */
#define DESC_HDR_MODE0_ENCRYPT cpu_to_be32(0x00100000)
#define DESC_HDR_MODE0_AESU_CBC cpu_to_be32(0x00200000)
+#define DESC_HDR_MODE0_AESU_XOR cpu_to_be32(0x0c600000)
#define DESC_HDR_MODE0_DEU_CBC cpu_to_be32(0x00400000)
#define DESC_HDR_MODE0_DEU_3DES cpu_to_be32(0x00200000)
#define DESC_HDR_MODE0_MDEU_INIT cpu_to_be32(0x01000000)
@@ -202,6 +203,7 @@
#define DESC_HDR_TYPE_IPSEC_ESP cpu_to_be32(1 << 3)
#define DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU cpu_to_be32(2 << 3)
#define DESC_HDR_TYPE_HMAC_SNOOP_NO_AFEU cpu_to_be32(4 << 3)
+#define DESC_HDR_TYPE_RAID_XOR cpu_to_be32(21 << 3)
/* link table extent field bits */
#define DESC_PTR_LNKTBL_JUMP 0x80
--
1.6.4.2
^ permalink raw reply related
* [PATCH v0] Crypto: Talitos: re-initialize async_tx descriptors
From: Vishnu Suresh @ 2009-12-14 13:33 UTC (permalink / raw)
To: linuxppc-dev, linux-kernel, linux-raid, dan.j.williams,
linux-crypto, herbert
Cc: Vishnu Suresh, B04825, R58472
The async_tx descriptors contains dangling pointers.
Hence, re-initialize them to NULL before use.
Signed-off-by: Vishnu Suresh <Vishnu@freescale.com>
---
o. Rebased to linux-next as of 20091214
drivers/crypto/talitos.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
index 87f06be..9e261c6 100644
--- a/drivers/crypto/talitos.c
+++ b/drivers/crypto/talitos.c
@@ -952,6 +952,9 @@ static struct dma_async_tx_descriptor * talitos_prep_dma_xor(
return NULL;
}
dma_async_tx_descriptor_init(&new->async_tx, &xor_chan->common);
+ new->async_tx.parent = NULL;
+ new->async_tx.next = NULL;
+
desc = &new->hwdesc;
/* Set destination: Last pointer pair */
--
1.6.4.2
^ permalink raw reply related
* [PATCH] powerpc: handle VSX alignment faults correctly in little-endian mode
From: Neil Campbell @ 2009-12-14 14:08 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev, Michael Neuling
This patch fixes the handling of VSX alignment faults in little-endian
mode (the current code assumes the processor is in big-endian mode).
The patch also makes the handlers clear the top 8 bytes of the register
when handling an 8 byte VSX load.
This is based on 2.6.32.
Signed-off-by: Neil Campbell <neilc@linux.vnet.ibm.com>
Cc: <stable@kernel.org>
---
diff --git a/arch/powerpc/kernel/align.c b/arch/powerpc/kernel/align.c
index a5b632e..f0c624f 100644
--- a/arch/powerpc/kernel/align.c
+++ b/arch/powerpc/kernel/align.c
@@ -642,10 +642,14 @@ static int emulate_spe(struct pt_regs *regs, unsigned int reg,
*/
static int emulate_vsx(unsigned char __user *addr, unsigned int reg,
unsigned int areg, struct pt_regs *regs,
- unsigned int flags, unsigned int length)
+ unsigned int flags, unsigned int length,
+ unsigned int elsize)
{
char *ptr;
+ unsigned long *lptr;
int ret = 0;
+ int sw = 0;
+ int i, j;
flush_vsx_to_thread(current);
@@ -654,19 +658,35 @@ static int emulate_vsx(unsigned char __user *addr, unsigned int reg,
else
ptr = (char *) ¤t->thread.vr[reg - 32];
- if (flags & ST)
- ret = __copy_to_user(addr, ptr, length);
- else {
- if (flags & SPLT){
- ret = __copy_from_user(ptr, addr, length);
- ptr += length;
+ lptr = (unsigned long *) ptr;
+
+ if (flags & SW)
+ sw = elsize-1;
+
+ for (j = 0; j < length; j += elsize) {
+ for (i = 0; i < elsize; ++i) {
+ if (flags & ST)
+ ret |= __put_user(ptr[i^sw], addr + i);
+ else
+ ret |= __get_user(ptr[i^sw], addr + i);
}
- ret |= __copy_from_user(ptr, addr, length);
+ ptr += elsize;
+ addr += elsize;
}
- if (flags & U)
- regs->gpr[areg] = regs->dar;
- if (ret)
+
+ if (!ret) {
+ if (flags & U)
+ regs->gpr[areg] = regs->dar;
+
+ /* Splat load copies the same data to top and bottom 8 bytes */
+ if (flags & SPLT)
+ lptr[1] = lptr[0];
+ /* For 8 byte loads, zero the top 8 bytes */
+ else if (!(flags & ST) && (8 == length))
+ lptr[1] = 0;
+ } else
return -EFAULT;
+
return 1;
}
#endif
@@ -767,16 +787,25 @@ int fix_alignment(struct pt_regs *regs)
#ifdef CONFIG_VSX
if ((instruction & 0xfc00003e) == 0x7c000018) {
- /* Additional register addressing bit (64 VSX vs 32 FPR/GPR */
+ unsigned int elsize;
+
+ /* Additional register addressing bit (64 VSX vs 32 FPR/GPR) */
reg |= (instruction & 0x1) << 5;
/* Simple inline decoder instead of a table */
+ /* VSX has only 8 and 16 byte memory accesses */
+ nb = 8;
if (instruction & 0x200)
nb = 16;
- else if (instruction & 0x080)
- nb = 8;
- else
- nb = 4;
+
+ /* Vector stores in little-endian mode swap individual
+ elements, so process them separately */
+ elsize = 4;
+ if (instruction & 0x80)
+ elsize = 8;
+
flags = 0;
+ if (regs->msr & MSR_LE)
+ flags |= SW;
if (instruction & 0x100)
flags |= ST;
if (instruction & 0x040)
@@ -787,7 +816,7 @@ int fix_alignment(struct pt_regs *regs)
nb = 8;
}
PPC_WARN_EMULATED(vsx);
- return emulate_vsx(addr, reg, areg, regs, flags, nb);
+ return emulate_vsx(addr, reg, areg, regs, flags, nb, elsize);
}
#endif
/* A size of 0 indicates an instruction we don't support, with
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox