20 Jul, 2007
1 commit
-
per cpu data section contains two types of data. One set which is
exclusively accessed by the local cpu and the other set which is per cpu,
but also shared by remote cpus. In the current kernel, these two sets are
not clearely separated out. This can potentially cause the same data
cacheline shared between the two sets of data, which will result in
unnecessary bouncing of the cacheline between cpus.One way to fix the problem is to cacheline align the remotely accessed per
cpu data, both at the beginning and at the end. Because of the padding at
both ends, this will likely cause some memory wastage and also the
interface to achieve this is not clean.This patch:
Moves the remotely accessed per cpu data (which is currently marked
as ____cacheline_aligned_in_smp) into a different section, where all the data
elements are cacheline aligned. And as such, this differentiates the local
only data and remotely accessed data cleanly.Signed-off-by: Fenghua Yu
Acked-by: Suresh Siddha
Cc: Rusty Russell
Cc: Christoph Lameter
Cc:
Cc: "Luck, Tony"
Cc: Andi Kleen
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
18 Jul, 2007
1 commit
-
If the kernel OOPSed or BUGed then it probably should be considered as
tainted. Thus, all subsequent OOPSes and SysRq dumps will report the
tainted kernel. This saves a lot of time explaining oddities in the
calltraces.Signed-off-by: Pavel Emelianov
Acked-by: Randy Dunlap
Cc:
Signed-off-by: Andrew Morton
[ Added parisc patch from Matthew Wilson -Linus ]
Signed-off-by: Linus Torvalds
17 Jul, 2007
2 commits
-
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (209 commits)
[POWERPC] Create add_rtc() function to enable the RTC CMOS driver
[POWERPC] Add H_ILLAN_ATTRIBUTES hcall number
[POWERPC] xilinxfb: Parameterize xilinxfb platform device registration
[POWERPC] Oprofile support for Power 5++
[POWERPC] Enable arbitary speed tty ioctls and split input/output speed
[POWERPC] Make drivers/char/hvc_console.c:khvcd() static
[POWERPC] Remove dead code for preventing pread() and pwrite() calls
[POWERPC] Remove unnecessary #undef printk from prom.c
[POWERPC] Fix typo in Ebony default DTS
[POWERPC] Check for NULL ppc_md.init_IRQ() before calling
[POWERPC] Remove extra return statement
[POWERPC] pasemi: Don't auto-select CONFIG_EMBEDDED
[POWERPC] pasemi: Rename platform
[POWERPC] arch/powerpc/kernel/sysfs.c: Move NUMA exports
[POWERPC] Add __read_mostly support for powerpc
[POWERPC] Modify sched_clock() to make CONFIG_PRINTK_TIME more sane
[POWERPC] Create a dummy zImage if no valid platform has been selected
[POWERPC] PS3: Bootwrapper support.
[POWERPC] powermac i2c: Use mutex
[POWERPC] Schedule removal of arch/ppc
...Fixed up conflicts manually in:
Documentation/feature-removal-schedule.txt
arch/powerpc/kernel/pci_32.c
arch/powerpc/kernel/pci_64.c
include/asm-powerpc/pci.hand asked the powerpc people to double-check the result..
-
The current generic bug implementation has a call to dump_stack() in case a
WARN_ON(whatever) gets hit. Since report_bug(), which calls dump_stack(),
gets called from an exception handler we can do better: just pass the
pt_regs structure to report_bug() and pass it to show_regs() in case of a
warning. This will give more debug informations like register contents,
etc... In addition this avoids some pointless lines that dump_stack()
emits, since it includes a stack backtrace of the exception handler which
is of no interest in case of a warning. E.g. on s390 the following lines
are currently always present in a stack backtrace if dump_stack() gets
called from report_bug():[] show_trace+0x92/0xe8)
[] show_stack+0xa0/0xd0
[] dump_stack+0x2e/0x3c
[] report_bug+0x98/0xf8
[] illegal_op+0x1fc/0x21c
[] sysc_return+0x0/0x10Acked-by: Jeremy Fitzhardinge
Acked-by: Haavard Skinnemoen
Cc: Andi Kleen
Cc: Kyle McMartin
Cc: Paul Mackerras
Cc: Paul Mundt
Cc: Martin Schwidefsky
Signed-off-by: Heiko Carstens
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
12 Jul, 2007
1 commit
-
I'm not sure if this is going to fly, weak symbols work on the compilers I'm
using, but whether they work for all of the affected architectures I can't say.
I've cc'ed as many arch maintainers/lists as I could find.But assuming they do, we can use a weak empty definition of
pcibios_add_platform_entries() to avoid having an empty definition on every
arch.Signed-off-by: Michael Ellerman
Signed-off-by: Greg Kroah-Hartman
10 Jul, 2007
1 commit
-
do_signal is never used in modular code (obviously), and no other
architecture exports it either.Signed-off-by: Christoph Hellwig
Signed-off-by: Paul Mackerras
14 Jun, 2007
1 commit
-
Currently the powerpc kernel has a 64-bit only feature,
COHERENT_ICACHE used for those CPUS which maintain icache/dcache
coherency in hardware (POWER5, essentially). It also has a feature,
SPLIT_ID_CACHE, which is used on CPUs which have separate i and
d-caches, which is to say everything except 601 and Freescale E200.In nearly all the places we check the SPLIT_ID_CACHE, what we actually
care about is whether the i and d-caches are coherent (which they will
be, trivially, if they're the same cache).This tries to clarify the situation a little. The COHERENT_ICACHE
feature becomes availble on 32-bit and is set for all CPUs where i and
d-cache are effectively coherent, whether this is due to special logic
(POWER5) or because they're unified. We check this, instead of
SPLIT_ID_CACHE nearly everywhere.The SPLIT_ID_CACHE feature itself is replaced by a UNIFIED_ID_CACHE
feature with reversed sense, set only on 601 and Freescale E200. In
the two places (one Freescale BookE specific) where we really care
whether it's a unified cache, not whether they're coherent, we check
this feature. The CPUs with unified cache are so few, we could
consider replacing this feature bit with explicit checks against the
PVR.This will make unifying the 32-bit and 64-bit cache flush code a
little more straightforward.Signed-off-by: David Gibson
Signed-off-by: Paul Mackerras
23 May, 2007
2 commits
-
We now get the export of __div64_32 from lib/div64.c and can drop the one
in ppc_ksysm.cSigned-off-by: Kumar Gala
-
We get the following warnings in various ARCH=ppc builds:
WARNING: "ee_restarts" [arch/ppc/kernel/built-in] is COMMON symbol
WARNING: "fee_restarts" [arch/ppc/kernel/built-in] is COMMON symbol
WARNING: "htab_hash_searches" [arch/ppc/mm/built-in] is COMMON symbol
WARNING: "next_slot" [arch/ppc/mm/built-in] is COMMON symbol
WARNING: "mmu_hash_lock" [arch/ppc/mm/built-in] is COMMON symbol
WARNING: "primary_pteg_full" [arch/ppc/mm/built-in] is COMMON symbol
WARNING: "global_dbcr0" [arch/ppc/kernel/built-in] is COMMON symbolSwitch to local symbols for ee_restarts, fee_restarts, and global_dbcr0 and
global symbols for mmu_hash_lock, next_slot, primary_pteg_full, and
htab_hash_searches.(except mmu_hash_lock which is global) and
space directive instead.Signed-off-by: Kumar Gala
19 May, 2007
2 commits
-
With this consolidation we can now modify the .data
section definition in one spot for all archs.Signed-off-by: Sam Ravnborg
-
Move definition of .text section to asm-generic.
Signed-off-by: Sam Ravnborg
12 May, 2007
1 commit
-
Spelling fixes in arch/ppc/.
Signed-off-by: Simon Arlott
Signed-off-by: Paul Mackerras
10 May, 2007
1 commit
-
This finally renames the thread_info field in task structure to stack, so that
the assumptions about this field are gone and archs have more freedom about
placing the thread_info structure.Nonbroken archs which have a proper thread pointer can do the access to both
current thread and task structure via a single pointer.It'll allow for a few more cleanups of the fork code, from which e.g. ia64
could benefit.Signed-off-by: Roman Zippel
[akpm@linux-foundation.org: build fix]
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Cc: Russell King
Cc: Ian Molton
Cc: Haavard Skinnemoen
Cc: Mikael Starvik
Cc: David Howells
Cc: Yoshinori Sato
Cc: "Luck, Tony"
Cc: Hirokazu Takata
Cc: Geert Uytterhoeven
Cc: Roman Zippel
Cc: Greg Ungerer
Cc: Ralf Baechle
Cc: Ralf Baechle
Cc: Paul Mackerras
Cc: Benjamin Herrenschmidt
Cc: Heiko Carstens
Cc: Martin Schwidefsky
Cc: Paul Mundt
Cc: Kazumoto Kojima
Cc: Richard Curnow
Cc: William Lee Irwin III
Cc: "David S. Miller"
Cc: Jeff Dike
Cc: Paolo 'Blaisorblade' Giarrusso
Cc: Miles Bader
Cc: Andi Kleen
Cc: Chris Zankel
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
09 May, 2007
1 commit
-
Remove includes of where it is not used/needed.
Suggested by Al Viro.Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc,
sparc64, and arm (all 59 defconfigs).Signed-off-by: Randy Dunlap
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
03 May, 2007
1 commit
-
Let's allow page-alignment in general for per-cpu data (wanted by Xen, and
Ingo suggested KVM as well).Because larger alignments can use more room, we increase the max per-cpu
memory to 64k rather than 32k: it's getting a little tight.Signed-off-by: Rusty Russell
Signed-off-by: Jeremy Fitzhardinge
Signed-off-by: Andi Kleen
Acked-by: Ingo Molnar
Cc: Andi Kleen
Signed-off-by: Andrew Morton
30 Apr, 2007
1 commit
26 Apr, 2007
1 commit
-
We have several platforms using local copies of identical
code.Signed-off-by: David S. Miller
22 Mar, 2007
1 commit
-
Remove last_syscall from 32bit powerpc, its been gone in 64bit for years.
Signed-off-by: Anton Blanchard
Signed-off-by: Paul Mackerras
15 Feb, 2007
2 commits
-
The semantic effect of insert_at_head is that it would allow new registered
sysctl entries to override existing sysctl entries of the same name. Which is
pain for caching and the proc interface never implemented.I have done an audit and discovered that none of the current users of
register_sysctl care as (excpet for directories) they do not register
duplicate sysctl entries.So this patch simply removes the support for overriding existing entries in
the sys_sysctl interface since no one uses it or cares and it makes future
enhancments harder.Signed-off-by: Eric W. Biederman
Acked-by: Ralf Baechle
Acked-by: Martin Schwidefsky
Cc: Russell King
Cc: David Howells
Cc: "Luck, Tony"
Cc: Ralf Baechle
Cc: Paul Mackerras
Cc: Martin Schwidefsky
Cc: Andi Kleen
Cc: Jens Axboe
Cc: Corey Minyard
Cc: Neil Brown
Cc: "John W. Linville"
Cc: James Bottomley
Cc: Jan Kara
Cc: Trond Myklebust
Cc: Mark Fasheh
Cc: David Chinner
Cc: "David S. Miller"
Cc: Patrick McHardy
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
And make the mode of the kernel directory 0555 no one is allowed to write to
sysctl directories.Signed-off-by: Eric W. Biederman
Acked-by: Benjamin Herrenschmidt
Cc: Paul Mackerras
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
14 Feb, 2007
1 commit
-
Eliminate needless invocation of the SYNC macro (which always evaluates to
nothing on BookE) from head_fsl_booke.S (for both arch/ppc & arch/powerpc).Signed-off-by: Becky Bruce
Signed-off-by: Kumar Gala
13 Feb, 2007
4 commits
-
Some of the current tlbwe instructions early on in head_fsl_booke.S take
advantage of unarchitected behavior that allows the writing of reserved
values to the TSIZE field. This patch corrects that, as well as an error
where an uninitialized (by linux) value was written into a MAS register and
used for a tlbwe.Correct this for both arch/ppc and arch/powerpc.
Signed-off-by: Becky Bruce
Signed-off-by: Kumar Gala -
Rename saved_command_line into boot_command_line.
Signed-off-by: Alon Bar-Lev
Cc: Paul Mackerras
Cc: Benjamin Herrenschmidt
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
12 Feb, 2007
1 commit
-
Update all arch/*/kernel/vmlinux.lds.S to not include space for initramfs
when CONFIG_BLK_DEV_INITRAMFS is not selected. This saves another 4 kbytes
on most platfoms (some reserve PAGE_SIZE for initramfs).Signed-off-by: Jean-Paul Saman
Cc: Al Viro
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
09 Feb, 2007
1 commit
-
We get the following compiler error:
CC arch/ppc/kernel/ppc_ksyms.o
arch/ppc/kernel/ppc_ksyms.c:275: error: '__mtdcr' undeclared here (not in a function)
arch/ppc/kernel/ppc_ksyms.c:275: warning: type defaults to 'int' in declaration of '__mtdcr'
arch/ppc/kernel/ppc_ksyms.c:276: error: '__mfdcr' undeclared here (not in a function)
arch/ppc/kernel/ppc_ksyms.c:276: warning: type defaults to 'int' in declaration of '__mfdcr'
make[1]: *** [arch/ppc/kernel/ppc_ksyms.o] Error 1This is due to the EXPORT_SYMBOL for __mtdcr/__mfdcr not having the proper CONFIG protection
Signed-off-by: Rojhalat Ibrahim
Signed-off-by: Kumar Gala
07 Feb, 2007
2 commits
-
The new dcr code does not currently compile when configured for native
DCR access on ARCH=powerpc. This patch fixes the problems.Signed-off-by: David Gibson
Signed-off-by: Paul Mackerras -
Including support for non-coherent cache, some mm-related things +
relevant field in Kconfig and Makefiles. Also included rheap.o compilation
if 8xx is defined.Non-coherent mapping were refined and renamed according to Cristoph
Hellwig. Orphaned functions were cleaned up.[Also removed arch/ppc/kernel/dma-mapping.c, because otherwise
compiling with ARCH=ppc for a non DMA-cache-coherent platform ends up
with two copies of __dma_alloc_coherent etc.
-- paulus.]Signed-off-by: Vitaly Bordug
Signed-off-by: Paul Mackerras
24 Jan, 2007
1 commit
-
Signed-off-by: Adrian Bunk
Signed-off-by: Paul Mackerras
12 Dec, 2006
1 commit
-
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (36 commits)
[POWERPC] Generic BUG for powerpc
[PPC] Fix compile failure do to introduction of PHY_POLL
[POWERPC] Only export __mtdcr/__mfdcr if CONFIG_PPC_DCR is set
[POWERPC] Remove old dcr.S
[POWERPC] Fix SPU coredump code for max_fdset removal
[POWERPC] Fix irq routing on some 32-bit PowerMacs
[POWERPC] ps3: Add vuart support
[POWERPC] Support ibm,dynamic-reconfiguration-memory nodes
[POWERPC] dont allow pSeries_probe to succeed without initialising MMU
[POWERPC] micro optimise pSeries_probe
[POWERPC] Add SPURR SPR to sysfs
[POWERPC] Add DSCR SPR to sysfs
[POWERPC] Fix 440SPe CPU table entry
[POWERPC] Add support for FP emulation for the e300c2 core
[POWERPC] of_device_register: propagate device_create_file return code
[POWERPC] Fix mmap of PCI resource with hack for X
[POWERPC] iSeries: head_64.o needs to depend on lparmap.s
[POWERPC] cbe_thermal: Fix initialization of sysfs attribute_group
[POWERPC] Remove QE header files from lite5200.c
[POWERPC] of_platform_make_bus_id(): make `magic' int
...
09 Dec, 2006
1 commit
-
Switch ppc over to using the generic BUG implementation.
Signed-off-by: Judith Lebzelter
Cc: Jeremy Fitzhardinge
Cc: Michael Ellerman
Cc: Paul Mackerras
Cc: Benjamin Herrenschmidt
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
08 Dec, 2006
1 commit
-
The powerpc version of pci_resource_to_user() and associated hooks
used by /proc/bus/pci and /sys/bus/pci mmap have been broken for some
time on machines that don't have a 1:1 mapping of devices (basically
on non-PowerMacs) and have PCI devices above 32 bits.This attempts to fix it as well as possible.
The rule is supposed to be that pci_resource_to_user() always converts
the resources back into a BAR values since that's what the /proc
interface was supposed to deal with. However, for X to work on
platforms where PCI MMIO is not mapped 1:1, it became a habit of
platforms like powerpc to pass "fixed up" values there since X expects
to be able to use values from /proc/bus/pci/devices as offsets to mmap
of /dev/mem...So we keep that contraption here, causing also /sys/*/resource to
expose fully absolute MMIO addresses instead of BAR values, which is
ugly, but should still work as long as those are only used to calculate
alignment within a page.X is still broken when built 32 bits on machines where PCI MMIO can be
above 32-bit space unfortunately.Signed-off-by: Benjamin Herrenschmidt
Signed-off-by: Paul Mackerras
07 Dec, 2006
1 commit
-
Print the addresses of non-absolute symbols relative to _text
so that ld will generate relocations. Allowing a relocatable
kernel to relocate them. We can't actually use the symbol names
because kallsyms includes static symbols that are not exported
from their object files.Add the _text symbol definitions to the architectures which don't
define it otherwise linker will fail.Signed-off-by: Eric W. Biederman
Signed-off-by: Vivek Goyal
Signed-off-by: Andi Kleen
04 Dec, 2006
2 commits
-
This adds code to look at the properties firmware puts in the device
tree to determine what compatibility mode the partition is in on
POWER6 machines, and set the ELF aux vector AT_HWCAP and AT_PLATFORM
entries appropriately.Specifically, we look at the cpu-version property in the cpu node(s).
If that contains a "logical" PVR value (of the form 0x0f00000x), we
call identify_cpu again with this PVR value. A value of 0x0f000001
indicates the partition is in POWER5+ compatibility mode, and a value
of 0x0f000002 indicates "POWER6 architected" mode, with various
extensions disabled. We also look for various other properties:
ibm,dfp, ibm,purr and ibm,spurr.Signed-off-by: Paul Mackerras
-
PPC/booke reg MCSR value misquoted
Signed-off-by: nkalmala
Cc: Benjamin Herrenschmidt
Signed-off-by: Andrew Morton
Acked-by: Kumar Gala
Signed-off-by: Paul Mackerras
01 Nov, 2006
1 commit
-
The alignment exception used to only check the exception table for
-EFAULT, not for other errors. That opens an oops window if we can
coerce the kernel into getting an alignment exception for other reasons
in what would normally be a user-protected accessor, which can be done
via some of the futex ops. This fixes it by always checking the
exception tables.Signed-off-by: Benjamin Herrenschmidt
Signed-off-by: Paul Mackerras
28 Oct, 2006
1 commit
-
Add a vmlinux.lds.h helper macro for defining the eight-level initcall table,
teach all the architectures to use it.This is a prerequisite for a patch which performs initcall synchronisation for
multithreaded-probing.Cc: Greg KH
Signed-off-by: Andrew Morton
[ Added AVR32 as well ]
Signed-off-by: Haavard Skinnemoen
Signed-off-by: Linus Torvalds
25 Oct, 2006
2 commits
-
This patch reworks the feature fixup mecanism so vdso's can be fixed up.
The main issue was that the construct:.long label (or .llong on 64 bits)
will not work in the case of a shared library like the vdso. It will
generate an empty placeholder in the fixup table along with a reloc,
which is not something we can deal with in the vdso.The idea here (thanks Alan Modra !) is to instead use something like:
1:
.long label - 1bThat is, the feature fixup tables no longer contain addresses of bits of
code to patch, but offsets of such code from the fixup table entry
itself. That is properly resolved by ld when building the .so's. I've
modified the fixup mecanism generically to use that method for the rest
of the kernel as well.Another trick is that the 32 bits vDSO included in the 64 bits kernel
need to have a table in the 64 bits format. However, gas does not
support 32 bits code with a statement of the form:.llong label - 1b (Or even just .llong label)
That is, it cannot emit the right fixup/relocation for the linker to use
to assign a 32 bits address to an .llong field. Thus, in the specific
case of the 32 bits vdso built as part of the 64 bits kernel, we are
using a modified macro that generates:.long 0xffffffff
.llong label - 1bNote that is assumes that the value is negative which is enforced by
the .lds (those offsets are always negative as the .text is always
before the fixup table and gas doesn't support emiting the reloc the
other way around).Signed-off-by: Benjamin Herrenschmidt
Signed-off-by: Paul Mackerras -
There are currently two versions of the functions for applying the
feature fixups, one for CPU features and one for firmware features. In
addition, they are both in assembly and with separate implementations
for 32 and 64 bits. identify_cpu() is also implemented in assembly and
separately for 32 and 64 bits.This patch replaces them with a pair of C functions. The call sites are
slightly moved on ppc64 as well to be called from C instead of from
assembly, though it's a very small change, and thus shouldn't cause any
problem.Signed-off-by: Benjamin Herrenschmidt
Acked-by: Olof Johansson
Signed-off-by: Paul Mackerras