Olaf Hering [Sat, 29 Oct 2005 00:46:47 +0000 (17:46 -0700)]
[PATCH] ppc64 boot: remove global initializers
No need to initialize global variables.
Signed-off-by: Olaf Hering <olh@suse.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Olaf Hering [Sat, 29 Oct 2005 00:46:46 +0000 (17:46 -0700)]
[PATCH] ppc64 boot: fix typo in asm comments
Update comment in memcpy, r7 contains the byte count.
Signed-off-by: Olaf Hering <olh@suse.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Olaf Hering [Sat, 29 Oct 2005 00:46:45 +0000 (17:46 -0700)]
[PATCH] ppc64 boot: use memset to clear bss
Use memset to clear bss, instead of own version.
Signed-off-by: Olaf Hering <olh@suse.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Olaf Hering [Sat, 29 Oct 2005 00:46:44 +0000 (17:46 -0700)]
[PATCH] ppc64 boot: cleanup linker script
Remove userland related stuff from ld.script, they are not required for zImage
use wildcards for some sections.
Signed-off-by: Olaf Hering <olh@suse.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Olaf Hering [Sat, 29 Oct 2005 00:46:43 +0000 (17:46 -0700)]
[PATCH] ppc64 boot: bootfiles depend on linker script
bootfiles must be relinked if linker script changes
Signed-off-by: Olaf Hering <olh@suse.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Olaf Hering [Sat, 29 Oct 2005 00:46:41 +0000 (17:46 -0700)]
[PATCH] ppc64 boot: move gunzip function before use
Move the gunzip function up.
Signed-off-by: Olaf Hering <olh@suse.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Olaf Hering [Sat, 29 Oct 2005 00:46:40 +0000 (17:46 -0700)]
[PATCH] ppc64 boot: remove need for imagesize.c
Compute the vmlinux size at runtime.
Use Z_FULL_FLUSH instead of Z_FINISH, to extract only the ELF header
and ELF program header.
->p_memsz is the required memory range for the executable, including bss
->p_filesz is the size of .text, .data and other runtime sections
These values must be used for the claim call.
All additional memory needed by the kernel is claimed in prom_init, remove
the extra Mb.
Pass the full memsize as target area to gunzip, otherwise not everything
will be uncompressed.
flush_cache has to flush all runtime sections, do not reduce the memrange
by the ->p_offset value because its just that: an offset.
Remove the Makefile code to produce an imagesize.c, its not needed anymore.
Remove all FORCE flags, to not rebuild the zImage if vmlinux was not changed.
Signed-off-by: Olaf Hering <olh@suse.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Olaf Hering [Sat, 29 Oct 2005 00:46:38 +0000 (17:46 -0700)]
[PATCH] ppc64 boot: remove zlib
Switch ppc64 to the in-kernel zlib, it has less bugs than the current one.
The code in arch/ppc64/boot is compiled as 32bit, so it can not use the
includes from include/asm.
Copy all zlib related header files and convert them with sed.
Reduce the scratch size to 47k, check possible changes at runtime.
Signed-off-by: Olaf Hering <olh@suse.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Olaf Hering [Sat, 29 Oct 2005 00:46:37 +0000 (17:46 -0700)]
[PATCH] ppc64 boot: missing include for size_t
string.h needs definition of size_t, but not the one from linux/include
Signed-off-by: Olaf Hering <olh@suse.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Olaf Hering [Sat, 29 Oct 2005 00:46:37 +0000 (17:46 -0700)]
[PATCH] ppc64 boot: remove include from include/linux/zutil.h
zutil.h does not need errno.h
Signed-off-by: Olaf Hering <olh@suse.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Olaf Hering [Sat, 29 Oct 2005 00:46:35 +0000 (17:46 -0700)]
[PATCH] ppc64 boot: remove include from lib/zlib_inflate/inflate.c
There is no need to include module.h in inflate.c
Signed-off-by: Olaf Hering <olh@suse.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Nicolas DET [Sat, 29 Oct 2005 00:46:30 +0000 (17:46 -0700)]
[PATCH] mv643xx_eth_showsram: Added information message when using the SRAM
Added information message when using the SRAM in mv643xx_eth_probe()
Signed-off-by: Nicolas DET <det.nicolas@free.fr> Signed-off-by: Sven Luther <sl@bplan-gmbh.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Vitaly Bordug [Sat, 29 Oct 2005 00:46:28 +0000 (17:46 -0700)]
[PATCH] ppc32: ppc_sys fixes for 8xx and 82xx
This patch fixes a numbers of issues regarding to that both 8xx and 82xx
began to use ppc_sys model:
- Platform is now identified by default deviceless SOC, if no
BOARD_CHIP_NAME is specified in the bard-specific header. For the list
of supported names refer to (arch/ppc/syslib/) mpc8xx_sys.c and
mpc82xx_sys.c for 8xx and 82xx respectively.
- Fixed a bug in identification by name - if the name was not found,
it returned -1 instead of default deviceless ppc_spec.
- fixed devices amount in the 8xx platform system descriptions
Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com> Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com> Signed-off-by: Kumar Gala <kumar.gala@freescale.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Andy Fleming [Sat, 29 Oct 2005 00:46:27 +0000 (17:46 -0700)]
[PATCH] ppc32: 85xx PHY Platform Update
This patch updates the 85xx platform code to support the new PHY Layer.
Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Kumar Gala <Kumar.gala@freescale.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Olaf Hering [Sat, 29 Oct 2005 00:46:21 +0000 (17:46 -0700)]
[PATCH] Add modalias for pmac network drivers
mesh, mac53c94 and airport already have an entry. Add the network drivers
for pmac.
Signed-off-by: Olaf Hering <olh@suse.de> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
scwhab@suse.de [Sat, 29 Oct 2005 00:46:20 +0000 (17:46 -0700)]
[PATCH] Add modalias to macio sysfs attributes
Provide a "compatible" entry in /sys/bus/macio/devices/*/ This can be used
to load drivers via the modules.alias file.
Signed-off-by: Olaf Hering <olh@suse.de> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Olaf Hering [Sat, 29 Oct 2005 00:46:19 +0000 (17:46 -0700)]
[PATCH] ppc32: nvram driver for chrp
This implements a nvram acccess method, similar to
arch/ppc64/kernel/pSeries_nvram.c tested on CHRP B50.
Signed-off-by: Olaf Hering <olh@suse.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Roland Dreier [Sat, 29 Oct 2005 00:46:18 +0000 (17:46 -0700)]
[PATCH] ppc: make phys_mem_access_prot() work with pfns instead of addresses
Change the phys_mem_access_prot() function to take a pfn instead of an
address. This allows mmap64() to work on /dev/mem for addresses above 4G
on 32-bit architectures. We start with a pfn in mmap_mem(), so there's no
need to convert to an address; in fact, it's actively bad, since the
conversion can overflow when the address is above 4G.
Similarly fix the ppc32 page_is_ram() function to avoid a conversion to an
address by directly comparing to max_pfn. Working with max_pfn instead of
high_memory fixes page_is_ram() to give the right answer for highmem pages.
Signed-off-by: Roland Dreier <rolandd@cisco.com> Cc: Anton Blanchard <anton@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Matt Porter [Sat, 29 Oct 2005 00:46:14 +0000 (17:46 -0700)]
[PATCH] ppc32: Cleanup AMCC PPC44x eval board U-Boot support
Cleanup PPC440 eval boards (bamboo, ebony, luan and ocotea) to better
support U-Boot as bootloader.
Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Matt Porter <mporter@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Marcelo Tosatti [Sat, 29 Oct 2005 00:46:10 +0000 (17:46 -0700)]
[PATCH] ppc32 8xx: use io accessor macros instead of direct memory reference
Convert core 8xx drivers to use in_xxxbe/in_xxx macros instead of direct
memory references.
Other than making IO accesses explicit (which is a plus for readability), a
common set of macros provides a unified place for the volatile flag to
constraint compiler code reordering.
There are several unlucky places at the moment which lack the volatile
flag.
Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Lee Nicks [Sat, 29 Oct 2005 00:46:09 +0000 (17:46 -0700)]
[PATCH] ppc: prevent GCC 4 from generating AltiVec instructions in kernel
Depending on how GCC is built, GCC 4 may generate altivec instructions without
user explicitly requesting vector operations in the code. Although this is a
performance booster for user applications, it is a problem for kernel.
This patch explicitly instruct GCC to NOT generate altivec instructions while
building the kernel.
Here are some test cases I ran.
(1) build gcc 4.0.1 with '--with-cpu=7450 --enable-altivec
--enable-cxx-flags=-mcpu=7450', and use this gcc to build kernel WITHOUT
this kernel patch. Kernel fail to boot up on a 7450 board because of
altivec instructions in kernel.
(2) build gcc 4.0.1 with "--with-cpu=7450 --enable-altivec
--enable-cxx-flags=-mcpu=7450", and use this gcc to build kernel WITH this
kernel patch. Kernel boot up on a 7450 board without any problem.
(3) build gcc 4.0.1 with "--with-cpu=750 --enable-cxx-flags=-mcpu=750",
and use this gcc to build kernel with or without this kernel patch.
Kernel boot up on a 7450 board without any problem.
This patch should also work with GCC 3 or even earlier GCC 2.95.3.
Signed-off-by: Lee Nicks <allinux@gmail.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Fri, 28 Oct 2005 12:53:37 +0000 (22:53 +1000)]
powerpc: Merge xmon
The merged version follows the ppc64 version pretty closely mostly,
and in fact ARCH=ppc64 now uses the arch/powerpc/xmon version.
The main difference for ppc64 is that the 'p' command to call
show_state (which was always pretty dodgy) has been replaced by
the ppc32 'p' command, which calls a given procedure (so in fact
the old 'p' command behaviour can be achieved with 'p $show_state').
David Gibson [Fri, 28 Oct 2005 05:35:50 +0000 (15:35 +1000)]
[PATCH] powerpc: Move xics.[ch] into platforms/pseries
This patch moves the XICS interrupt controller code into the
platforms/pseries directory, since it only appears on pSeries
machines. If it ever appears on some other machine we can move it to
sysdev, although xics.c itself will need a bunch of changes in that
case to remove pSeries specific assumptions.
Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
David Gibson [Fri, 28 Oct 2005 00:31:49 +0000 (10:31 +1000)]
[PATCH] powerpc: Remove dregs of bootinfo.h
Since I sent the patch to purge bootinfo.h from ARCH=powerpc and
ARCH=ppc64, setup-common.c has come into existence, and another
#include of bootinfo.h slipped in. This patch removes it. It also
removes include/asm-ppc64/bootinfo.h, which somehow survived the
previous patch which was supposed to remove it.
Herbert Xu [Thu, 27 Oct 2005 08:47:46 +0000 (18:47 +1000)]
[TCP]: Clear stale pred_flags when snd_wnd changes
This bug is responsible for causing the infamous "Treason uncloaked"
messages that's been popping up everywhere since the printk was added.
It has usually been blamed on foreign operating systems. However,
some of those reports implicate Linux as both systems are running
Linux or the TCP connection is going across the loopback interface.
In fact, there really is a bug in the Linux TCP header prediction code
that's been there since at least 2.1.8. This bug was tracked down with
help from Dale Blount.
The effect of this bug ranges from harmless "Treason uncloaked"
messages to hung/aborted TCP connections. The details of the bug
and fix is as follows.
When snd_wnd is updated, we only update pred_flags if
tcp_fast_path_check succeeds. When it fails (for example,
when our rcvbuf is used up), we will leave pred_flags with
an out-of-date snd_wnd value.
When the out-of-date pred_flags happens to match the next incoming
packet we will again hit the fast path and use the current snd_wnd
which will be wrong.
In the case of the treason messages, it just happens that the snd_wnd
cached in pred_flags is zero while tp->snd_wnd is non-zero. Therefore
when a zero-window packet comes in we incorrectly conclude that the
window is non-zero.
In fact if the peer continues to send us zero-window pure ACKs we
will continue making the same mistake. It's only when the peer
transmits a zero-window packet with data attached that we get a
chance to snap out of it. This is what triggers the treason
message at the next retransmit timeout.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
On 32-bit platforms, these convert from kernel virtual addresses
to real (physical addresses), like tophys/tovirt but they use
the same register for the source and destination. On 64-bit
platforms, they do nothing because the hardware ignores the top
two bits of the address in real mode.
David Gibson [Mon, 24 Oct 2005 04:05:38 +0000 (14:05 +1000)]
[PATCH] powerpc: Don't use kmalloc() for kernel stacks
In readiness for 64k pages, when THREAD_SIZE will be less than
PAGE_SIZE, ppc64 uses kmalloc() rather than __get_free_pages() to
allocate kernel stacks, and since thread_info.h was merged, so does
ppc32. However that adds some overhead which we don't really want
when PAGE_SIZE <= THREAD_SIZE (including all ppc32 machines), so this
patch avoids it.
Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
David Gibson [Mon, 24 Oct 2005 01:41:33 +0000 (11:41 +1000)]
[PATCH] powerpc: Purge bootinfo.h
With ARCH=powerpc we assume the presence of a device tree, so we don't
require any support for the old bi_recs method of passing boot
parameters. Likewise, we've never needed it for ppc64, but we still
had an include/asm-ppc64/bootinfo.h from which nothing was used. This
patch removes that file, and all references to it in arch/ppc64 and
arch/powerpc. A related, unused variable 'boot_mem_size' is also
removed from setup_32.c. The bootinfo stuff remains in ARCH=ppc for
the time being.
Built and booted on Power5 (ARCH=ppc64 and ARCH=powerpc), built for
32-bit powermac (ARCH=powerpc and ARCH=ppc).
Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
David Gibson [Thu, 27 Oct 2005 06:27:25 +0000 (16:27 +1000)]
[PATCH] powerpc: Fix handling of fpscr on 64-bit
The recent merge of fpu.S broken the handling of fpscr for
ARCH=powerpc and CONFIG_PPC64=y. FP registers could be corrupted,
leading to strange random application crashes.
The confusion arises, because the thread_struct has (and requires) a
64-bit area to save the fpscr, because we use load/store double
instructions to get it in to/out of the FPU. However, only the low
32-bits are actually used, so we want to treat it as a 32-bit quantity
when manipulating its bits to avoid extra load/stores on 32-bit. This
patch replaces the current definition with a structure of two 32-bit
quantities (pad and val), to clarify things as much as is possible.
The 'val' field is used when manipulating bits, the structure itself
is used when obtaining the address for loading/unloading the value
from the FPU.
While we're at it, consolidate the 4 (!) almost identical versions of
cvt_fd() and cvt_df() (arch/ppc/kernel/misc.S,
arch/ppc64/kernel/misc.S, arch/powerpc/kernel/misc_32.S,
arch/powerpc/kernel/misc_64.S) into a single version in fpu.S. The
new version takes a pointer to thread_struct and applies the correct
offset itself, rather than a pointer to the fpscr field itself, again
to avoid confusion as to which is the correct field to use.
Finally, this patch makes ARCH=ppc64 also use the consolidated fpu.S
code, which it previously did not.
Built for G5 (ARCH=ppc64 and ARCH=powerpc), 32-bit powermac (ARCH=ppc
and ARCH=powerpc) and Walnut (ARCH=ppc, CONFIG_MATH_EMULATION=y).
Booted on G5 (ARCH=powerpc) and things which previously fell over no
longer do.
Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Thu, 27 Oct 2005 06:45:29 +0000 (16:45 +1000)]
powerpc: undeprecate the old OF device tree accessors for now
The recent addition of __deprecated to the declarations for
find_devices etc. produces a whole pile of warnings from the
ppc32 code. Since those functions still work perfectly well on
ppc32, which doesn't have hotplug support for anything in the
OF device tree, and we don't have time to fix that code now,
remove the __deprecated markings for now.
Oleg Nesterov [Wed, 26 Oct 2005 16:26:53 +0000 (20:26 +0400)]
[PATCH] Fix cpu timers expiration time
There's a silly off-by-one error in the code that updates the expiration
of posix CPU timers, causing them to not be properly updated when they
hit exactly on their expiration time (which should be the normal case).
This causes them to then fire immediately again, and only _then_ get
properly updated.
Peter Wainwright [Wed, 26 Oct 2005 08:59:02 +0000 (01:59 -0700)]
[PATCH] Fix HFS+ to free up the space when a file is deleted.
fsck_hfs reveals lots of temporary files accumulating in the hidden
directory "\000\000\000HFS+ Private Data". According to the HFS+
documentation these are files which are unlinked while in use. However,
there may be a bug in the Linux hfsplus implementation which causes this to
happen even when the files are not in use. It looks like the "opencnt"
field is never initialized as (I think) it should be in hfsplus_read_inode.
This means that a file can appear to be still in use when in fact it has
been closed. This patch seems to fix it for me.
Signed-off-by: Anton Altaparmakov <aia21@cantab.net> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Garzik [Wed, 26 Oct 2005 08:59:01 +0000 (01:59 -0700)]
[PATCH] kill massive wireless-related log spam
Although this message is having the intended effect of causing wireless
driver maintainers to upgrade their code, I never should have merged this
patch in its present form. Leading to tons of bug reports and unhappy
users.
Some wireless apps poll for statistics regularly, which leads to a printk()
every single time they ask for stats. That's a little bit _too_ much of a
reminder that the driver is using an old API.
Change this to printing out the message once, per kernel boot.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] ppc64: Fix wrong register mapping in mpic driver
The mpic interrupt controller driver (used on G5 and early pSeries among
others) has a bug where it doesn't get the right virtual address for the
timer registers. It causes the driver to poke at the MMIO space of
whatever has been mapped just next to it (ouch !) when initializing and
causes boot failures on some IBM machines.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Magnus Damm [Wed, 26 Oct 2005 08:58:59 +0000 (01:58 -0700)]
[PATCH] NUMA: broken per cpu pageset counters
The NUMA counters in struct per_cpu_pageset (linux/mmzone.h) are never
cleared today. This works ok for CPU 0 on NUMA machines because
boot_pageset[] is already zero, but for other CPU:s this results in
uninitialized counters.
Signed-off-by: Magnus Damm <magnus@valinux.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Wed, 26 Oct 2005 08:58:58 +0000 (01:58 -0700)]
[PATCH] md: make sure mdthreads will always respond to kthread_stop
There are still a couple of cases where md threads (the resync/recovery
thread) is not interruptible since the change to use kthreads. All places
there it tests "signal_pending", it should also test kthread_should_stop,
as with this patch.
Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ian Campbell [Wed, 26 Oct 2005 14:04:21 +0000 (15:04 +0100)]
[ARM] 3032/1: sparse: complains about generic_fls() prototype in asm-arm/bitops.h
Patch from Ian Campbell
Sparse complains about the definition of generic_fls in asm-arm/bitops.h:
CHECK /home/icampbell/devel/kernel/2.6/arch/arm/mach-pxa/viper.c
include2/asm/bitops.h:350:34: error: marked inline, but without a definition
The definition is unnecessary since linux/bitops.h defines generic_fls before including asm/bitops.h and asm/bitops.h should not be included directly. There are still some places where asm/bitops.h is directly included, but I think that code should be fixed. I was a little wary of the patch for this reason but lubbock, mainstone and assabet all build OK and so do my in house boards...
ARM is the only arch with the generic_fls prototype in this way.
Signed-off-by: Ian Campbell <icampbell@arcom.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Paul Mackerras [Wed, 26 Oct 2005 11:55:33 +0000 (21:55 +1000)]
powerpc: Fix incorrect timer register addresses in mpic.c
We were computing the wrong address for the MPIC timer registers,
so when we went to initialize them we would have been hitting some
unrelated ioremap... oops.
Paul Mackerras [Wed, 26 Oct 2005 11:52:53 +0000 (21:52 +1000)]
powerpc: Fixes to get the Longtrail CHRP a bit further
Talk about buggy firmware... the OF on the Longtrail returns 0
from the claim client service rather than -1 when the claim fails.
It also has no device_type on the /memory node and blows up if
the output buffer for package-to-path is too big.
This also fixes a bug with calling alloc_up with align == 0, where
we did _ALIGN_UP(alloc_bottom, 0) which will end up as 0.
Lastly, we now check the return value (in r3) from calling the
prom, and return -1 from call_prom if we get a negative value back.
That is supposed to indicate that the requested client service
doesn't exist.
Paul Mackerras [Wed, 26 Oct 2005 07:22:33 +0000 (17:22 +1000)]
powerpc: Don't limit pmac_get_rtc_time to return only positive values
If the machine's clock is set to a bogus value, this check resulted
in userland waiting effectively forever for the RTC value to change,
so remove the check.
Paul Mackerras [Wed, 26 Oct 2005 07:19:06 +0000 (17:19 +1000)]
powerpc: Fix interrupt-tree parsing
The interrupt-tree parsing code wasn't offsetting interrupt numbers
by 16 on 32-bit platforms with an i8259 interrupt controller, and
it was confused about the encoding of interrupt sense and level
(which is different for i8259 and openpic interrupt controllers,
just to make things interesting).
Paul Mackerras [Wed, 26 Oct 2005 07:16:38 +0000 (17:16 +1000)]
powerpc: Pull out MPC106 (grackle) initialization code into its own file
This is so that the 32-bit CHRP code can use it. The MPC106
initialization code is now in arch/powerpc/sysdev/grackle.c and
is controlled by CONFIG_PPC_MPC106.
Paul Mackerras [Wed, 26 Oct 2005 07:11:18 +0000 (17:11 +1000)]
powerpc: Pull common bits of setup_{32,64}.c into setup-common.c
This creates a new arch/powerpc/kernel/setup-common.c with various
bits that setup_32.c and setup_64.c had in common - functions like
machine_shutdown/restart/power_off, show_cpuinfo, set_preferred_console
etc.
Paul Mackerras [Wed, 26 Oct 2005 07:05:24 +0000 (17:05 +1000)]
powerpc: Merge rtas.c into arch/powerpc/kernel
This splits arch/ppc64/kernel/rtas.c into arch/powerpc/kernel/rtas.c,
which contains generic RTAS functions useful on any CHRP platform,
and arch/powerpc/platforms/pseries/rtas-fw.[ch], which contain
some pSeries-specific firmware flashing bits. The parts of rtas.c
that are to do with pSeries-specific error logging are protected
by a new CONFIG_RTAS_ERROR_LOGGING symbol. The inclusion of rtas.o
is controlled by the CONFIG_PPC_RTAS symbol, and the relevant
platforms select that.
Paul Mackerras [Wed, 26 Oct 2005 06:47:42 +0000 (16:47 +1000)]
powerpc: Merge i8259.c into arch/powerpc/sysdev
This changes the parameters for i8259_init so that it takes two
parameters: a physical address for generating an interrupt
acknowledge cycle, and an interrupt number offset. i8259_init
now sets the irq_desc[] for its interrupts; all the callers
were doing this, and that code is gone now. This also defines
a CONFIG_PPC_I8259 symbol to select i8259.o for inclusion, and
makes the platforms that need it select that symbol.
Paul Mackerras [Wed, 26 Oct 2005 06:36:55 +0000 (16:36 +1000)]
ppc: Use the indirect_pci.c from arch/powerpc/sysdev
This defines a CONFIG_INDIRECT_PCI symbol to control whether it
gets used or not, and fixes the Kconfig to select that symbol for
platforms that need it.
Michael Ellerman [Mon, 24 Oct 2005 05:07:26 +0000 (15:07 +1000)]
[PATCH] powerpc: Remove duplicate definition of set_tb()
Somewhere along the line we got two definitions of set_tb(). They look to
be identical although they're not textually identical. So remove the #ifdef
CONFIG_PPC64 version, leaving the common version in time.h.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Kumar Gala [Wed, 26 Oct 2005 04:57:33 +0000 (23:57 -0500)]
[PATCH] powerpc: Some minor cleanups to setup_32.c
* Removed of_show_percpuinfo and just report CPU frequency in generic
show_cpuinfo code.
* Killed OCP and PPC_SYS related code which doesn't belong in the
merge tree
Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>