/* Save, Step 28:
* Poll MFC_CNTL[Ps] until value '11' is
* read
* (purge complete).
*/
POLL_WHILE_FALSE(in_be64(&priv2->mfc_control_RW)
& MFC_CNTL_PURGE_DMA_COMPLETE);
}
This will exit as soon as _one_ of the 2 bits that compose
MFC_CNTL_PURGE_DMA_COMPLETE is set, and one of them happens to be
"purge in progress"... which means that we'll happily continue
restoring the MFC while it's being purged at the same time.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
[POWERPC] spufs: map mmio space as guarded into user space
This fixes a bug where we don't properly map SPE MMIO space as guarded,
causing various test cases to fail, probably due to write combining and other
niceties caused by the lack of the G bit.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Michael Ellerman [Fri, 23 Jun 2006 08:20:16 +0000 (18:20 +1000)]
[POWERPC] Add udbg support for RTAS console
Add udbg hooks for the RTAS console, based on the RTAS put-term-char
and get-term-char calls. Along with my previous patches, this should
enable debugging as soon as early_init_dt_scan_rtas() is called.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Michael Ellerman [Fri, 23 Jun 2006 08:20:13 +0000 (18:20 +1000)]
[POWERPC] Setup RTAS values earlier, to enable rtas_call() earlier
Althought RTAS is instantiated when we enter the kernel, we can't actually
call into it until we know its entry point address. Currently we grab that
in rtas_initialize(), however that's quite late in the boot sequence.
To enable rtas_call() earlier, we can grab the RTAS entry etc. values while
we're scanning the flattened device tree. There's existing code to retrieve
the values from /chosen, however we don't store them there anymore, so remove
that code.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Michael Ellerman [Fri, 23 Jun 2006 08:20:10 +0000 (18:20 +1000)]
[POWERPC] Make rtas_call() safe if RTAS hasn't been initialised
Currently it's unsafe to call rtas_call() prior to rtas_initialize(). This
is because the rtas.entry value hasn't been setup and so we don't know
where to enter, but we just try anyway.
We can't do anything intelligent without rtas.entry, so if it's not set, just
return. Code that calls rtas_call() early needs to be aware that the call
might fail.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Initialise the ppc_md htab callbacks earlier, in the probe routines. This
allows us to call htab_finish_init() from htab_initialize(), and makes it
private to hash_utils_64.c. Move htab_finish_init() and make_bl() above
htab_initialize() to avoid forward declarations.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Michael Ellerman [Fri, 23 Jun 2006 08:16:03 +0000 (18:16 +1000)]
[POWERPC] Export flat device tree via debugfs for debugging
If DEBUG is turned on in prom.c, export the flat device tree via debugfs.
This has been handy on several occasions.
To look at it:
# mount -t debugfs none /sys/kernel/debug
# od -a /sys/kernel/debug/powerpc/flat-device-tree
and/or
# dtc -fI dtb /sys/kernel/debug/powerpc/flat-device-tree -O dts
Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Haren Myneni [Fri, 23 Jun 2006 06:35:10 +0000 (23:35 -0700)]
[POWERPC] kdump: Reserve the existing TCE mappings left by the first kernel
During kdump boot, noticed some machines checkstop on dma protection
fault for ongoing DMA left in the first kernel. Instead of initializing
TCE entries in iommu_init() for the kdump boot, this patch fixes this
issue by walking through the each TCE table and checks whether the
entries are in use by the first kernel. If so, reserve those entries by
setting the corresponding bit in tbl->it_map such that these entries
will not be available for the kdump boot.
However it could be possible that all TCE entries might be used up due
to the driver bug that does continuous mapping. My observation is around
1700 TCE entries are used on some systems (Ex: P4) at some point of
time during kdump boot and saving dump (either write into the disk or
sending to remote machine). Hence, this patch will make sure that
minimum of 2048 entries will be available such that kdump boot could be
successful in some cases.
Signed-off-by: Haren Myneni <haren@us.ibm.com> Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
Johannes Berg [Wed, 21 Jun 2006 10:11:16 +0000 (12:11 +0200)]
[POWERPC] Convert powermac ide blink to new led infrastructure
This patch removes the old pmac ide led blink code and
adds generic LED subsystem support for the LED.
It maintains backward compatibility with the old
BLK_DEV_IDE_PMAC_BLINK Kconfig option which now
simply selects the new code and influences the
default trigger.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
David Brownell [Tue, 27 Jun 2006 19:59:15 +0000 (12:59 -0700)]
[PATCH] fix static linking of NFS
Builds on ARM report link problems with common configurations like
statically linked NFS (for nfsroot). The symptom is that __init
section code references __exit section code; that won't work since
the exit sections are discarded (since they can never be called).
The best fix for these particular cases would be an "__init_or_exit"
section annotation.
Dmitry Torokhov [Tue, 27 Jun 2006 12:30:31 +0000 (08:30 -0400)]
Input: fix resetting name, phys and uniq when unregistering device
It should be done before calling class_device_unregister() because
it will destroy the device and free memory if there are no other
references to the device.
Thanks to Daniel Ritz and Michal Piotrowski for noticing the problem.
Daniel says:
"[The] reason is a recent change that made modules always shows as
module.mod. it breaks modprobe and probably many scripts..besides
lsmod looking horrible
stuff like this in modprobe.conf:
install pcmcia_core /sbin/modprobe --ignore-install pcmcia_core; /sbin/modprobe pcmcia
makes modprobe fork/exec endlessly calling itself...until oom
interrupts it"
Linus Torvalds [Mon, 26 Jun 2006 23:06:08 +0000 (16:06 -0700)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2: (56 commits)
[PATCH] fs/ocfs2/dlm/: cleanups
ocfs2: fix compiler warnings in dlm_convert_lock_handler()
ocfs2: dlm_print_one_mle() needs to be defined
ocfs2: remove whitespace in dlmunlock.c
ocfs2: move dlm work to a private work queue
ocfs2: fix incorrect error returns
ocfs2: tune down some noisy messages during dlm recovery
ocfs2: display message before waiting for recovery to complete
ocfs2: mlog in dlm_convert_lock_handler() should be ML_ERROR
ocfs2: retry operations when a lock is marked in recovery
ocfs2: use cond_resched() in dlm_thread()
ocfs2: use GFP_NOFS in some dlm operations
ocfs2: wait for recovery when starting lock mastery
ocfs2: continue recovery when a dead node is encountered
ocfs2: remove unneccesary spin_unlock() in dlm_remaster_locks()
ocfs2: dlm_remaster_locks() should never exit without completing
ocfs2: special case recovery lock in dlmlock_remote()
ocfs2: pending mastery asserts and migrations should block each other
ocfs2: temporarily disable automatic lock migration
ocfs2: do not unconditionally purge the lockres in dlmlock_remote()
...
Kurt Hackel [Mon, 1 May 2006 21:29:28 +0000 (14:29 -0700)]
ocfs2: retry operations when a lock is marked in recovery
Before checking for a nonexistent lock, make sure the lockres is not marked
RECOVERING. The caller will just retry and the state should be fixed up when
recovery completes.
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Kurt Hackel [Mon, 1 May 2006 20:49:20 +0000 (13:49 -0700)]
ocfs2: dlm_remaster_locks() should never exit without completing
We cannot restart recovery. Once we begin to recover a node, keep the state
of the recovery intact and follow through, regardless of any other node
deaths that may occur.
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Kurt Hackel [Mon, 1 May 2006 20:47:50 +0000 (13:47 -0700)]
ocfs2: special case recovery lock in dlmlock_remote()
If the previous master of the recovery lock dies, let calc_usage take it
down completely and let the caller completely redo the dlmlock() call.
Otherwise, there will never be an opportunity to re-master the lockres and
recovery wont be able to progress.
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Kurt Hackel [Mon, 1 May 2006 20:32:27 +0000 (13:32 -0700)]
ocfs2: pending mastery asserts and migrations should block each other
Use the existing structure for blocking migrations when ASTs are pending to
achieve the same result. If we can catch the assert before it goes on the
wire, just cancel it and let the migration continue.
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Now we never change the owner of a lock resource until unmount or node
death. This will be re-enabled once some issues in the algorithm used have
been resolved.
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Kurt Hackel [Mon, 1 May 2006 20:27:10 +0000 (13:27 -0700)]
ocfs2: do not unconditionally purge the lockres in dlmlock_remote()
In dlmlock_remote(), do not call purge_lockres until the lock resource
actually changes. otherwise, the mastery info on the lockres will go away
underneath the caller.
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Kurt Hackel [Mon, 1 May 2006 19:02:07 +0000 (12:02 -0700)]
ocfs2: increase backoff before waiting for recovery
When mastering non-recovery lock resources, additional time was frequently
needed to allow the disk heartbeat to catch up with the network timeout. the
recovery lock resource is time critical and avoids this path.
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Joel Becker [Fri, 17 Mar 2006 01:40:37 +0000 (17:40 -0800)]
[PATCH] ocfs2: Alloc at least a page for the DLM hash
The OCFS2 DLM allocates a number of pages for a hash to lookup locks.
There was a bug where a PAGE_SIZE bigger than the hash size (eg, 64K
pages) would result in zero pages allocated.
Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial:
typo fixes
Clean up 'inline is not at beginning' warnings for usb storage
Storage class should be first
i386: Trivial typo fixes
ixj: make ixj_set_tone_off() static
spelling fixes
fix paniced->panicked typos
Spelling fixes for Documentation/atomic_ops.txt
move acknowledgment for Mark Adler to CREDITS
remove the bouncing email address of David Campbell
Karsten Keil [Mon, 26 Jun 2006 18:21:01 +0000 (20:21 +0200)]
[PATCH] fix processing of the last byte in isdn_readbchan_tty()
The changes in the tty handling contain a bug while accessing
the last byte in the skb. Since special sequence for control of
DTMF and FAX via ttyI* devices handled via this path, these services
do not work anymore.
"It seems too little tested: "losetup -d /dev/loop0" fails with
EINVAL because nothing sets lo_thread; but even when you patch
loop_thread() to set lo->lo_thread = current, it can't survive
more than a few dozen iterations of the loop below (with a tmpfs
mounted on /tst):
j=0
cp /dev/zero /tst
while :
do
let j=j+1
echo "Doing pass $j"
losetup /dev/loop0 /tst/zero
mkfs -t ext2 -b 1024 /dev/loop0 >/dev/null 2>&1
mount -t ext2 /dev/loop0 /mnt
umount /mnt
losetup -d /dev/loop0
done
it collapses with failed ioctl then BUG_ON(!bio).
I think the original lo_done completion was more subtle and safe
than the kthread conversion has allowed for."
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (40 commits)
kbuild: trivial fixes in Makefile
kbuild: adding symbols in Kconfig and defconfig to TAGS
kbuild: replace abort() with exit(1)
kbuild: support for %.symtypes files
kbuild: fix silentoldconfig recursion
kbuild: add option for stripping modules while installing them
kbuild: kill some false positives from modpost
kbuild: export-symbol usage report generator
kbuild: fix make -rR breakage
kbuild: append -dirty for updated but uncommited changes
kbuild: append git revision for all untagged commits
kbuild: fix module.symvers parsing in modpost
kbuild: ignore make's built-in rules & variables
kbuild: bugfix with initramfs
kbuild: modpost build fix
kbuild: check license compatibility when building modules
kbuild: export-type enhancement to modpost.c
kbuild: add dependency on kernel.release to the package targets
kbuild: `make kernelrelease' speedup
kconfig: KCONFIG_OVERWRITECONFIG
...
Greg Ungerer [Mon, 26 Jun 2006 06:33:15 +0000 (16:33 +1000)]
[PATCH] m68knommu: use configurable RAM setup page_offset.h
Remove board specific base RAM conditionals from page_offset.h
With the Kconfig time configurable RAM setup none of this is required.
It is all based on the Kconfig (CONFIG_RAMBASE) option now.
Greg Ungerer [Mon, 26 Jun 2006 06:33:05 +0000 (16:33 +1000)]
[PATCH] m68knommu: use configurable RAM setup in linker script
Remove the fixed RAM configurations for each board type from the
linker script. Replace with simple defines usng the flexible RAM
configuration options. This cleans out of lot of board specific
munging of addresses.
Greg Ungerer [Mon, 26 Jun 2006 06:32:59 +0000 (16:32 +1000)]
[PATCH] m68knommu: create configurable RAM setup
Reworked the way RAM regions are defined. Instead of coding all the
variations for each board type we now just configure RAM base and size
in the usual Kconfig setup. This much simplifies the code, and makes it
a lot more flexible when setting up new boards or board varients.
Greg Ungerer [Mon, 26 Jun 2006 06:34:09 +0000 (16:34 +1000)]
[PATCH] m68knommu: remove unused vars from generic 68328 start code
Clean out unused variable definitions from 68328 start up code.
Also use a more appropriate start address for the case of relocating
the kernel code to RAM (from ROM/flash).
Greg Ungerer [Mon, 26 Jun 2006 06:34:04 +0000 (16:34 +1000)]
[PATCH] m68knommu: remove __ramvec from 68328/pilot start code
__ramvec has been removed from the linker script. The vector base
address is defined as a configurable option, use that. Remove its
use from the 68328/pilot startup code.