22 Jun, 2009
1 commit
-
This allows the callers to now pass down the full set of FAULT_FLAG_xyz
flags to handle_mm_fault(). All callers have been (mechanically)
converted to the new calling convention, there's almost certainly room
for architectures to clean up their code and then add FAULT_FLAG_RETRY
when that support is added.Signed-off-by: Linus Torvalds
19 Jun, 2009
1 commit
-
Commit b696fdc259f0d94348a9327bed352fac44d4883d ("sparc64: Defer
cpu_data() setup until end of per-cpu data initialization.") broke
bootup for UP builds because the cpu_data() initialization only
occurs in setup_per_cpu_areas() which is never compiled in nor
called in UP builds.Fix this up by calling the setups directly from init_64.c when
non-SMP.Reported-by: Alexander Beregalov
Tested-by: Alexander Beregalov
Signed-off-by: David S. Miller
16 Jun, 2009
6 commits
-
CPU_MASK_ALL is the (deprecated) "all bits set" cpumask, defined as so:
#define CPU_MASK_ALL (cpumask_t) { { ... } }
Taking the address of such a temporary is questionable at best,
unfortunately 321a8e9d (cpumask: add CPU_MASK_ALL_PTR macro) added
CPU_MASK_ALL_PTR:#define CPU_MASK_ALL_PTR (&CPU_MASK_ALL)
Which formalizes this practice. One day gcc could bite us over this
usage (though we seem to have gotten away with it so far).[Description by Rusty Russell]
Signed-off-by: Stephen Rothwell
Signed-off-by: David S. Miller -
Signed-off-by: Robert P. J. Day
Signed-off-by: David S. Miller -
Now that we defer the cpu_data() initializations to the end of per-cpu
setup, we can get rid of this local hack we had to setup the per-cpu
areas eary.This is a necessary step in order to support HAVE_DYNAMIC_PER_CPU_AREA
since the per-cpu setup must run when page structs are available.Signed-off-by: David S. Miller
-
Signed-off-by: David S. Miller
-
Signed-off-by: David S. Miller
-
We need to split up the cpu present mask setup from the cpu_data
initialization, and this is a first step towards that.Signed-off-by: David S. Miller
12 Jun, 2009
1 commit
-
It's theoretically possible that there are exception table entries
which point into the (freed) init text of modules. These could cause
future problems if other modules get loaded into that memory and cause
an exception as we'd see the wrong fixup. The only case I know of is
kvm-intel.ko (when CONFIG_CC_OPTIMIZE_FOR_SIZE=n).Amerigo fixed this long-standing FIXME in the x86 version, but this
patch is more general.This implements trim_init_extable(); most archs are simple since they
use the standard lib/extable.c sort code. Alpha and IA64 use relative
addresses in their fixups, so thier trimming is a slight variation.Sparc32 is unique; it doesn't seem to define ARCH_HAS_SORT_EXTABLE,
yet it defines its own sort_extable() which overrides the one in lib.
It doesn't sort, so we have to mark deleted entries instead of
actually trimming them.Inspired-by: Amerigo Wang
Signed-off-by: Rusty Russell
Cc: linux-alpha@vger.kernel.org
Cc: sparclinux@vger.kernel.org
Cc: linux-ia64@vger.kernel.org
08 Apr, 2009
2 commits
-
Signed-off-by: David S. Miller
-
Signed-off-by: David S. Miller
01 Apr, 2009
1 commit
-
Use debug_kmap_atomic in kmap_atomic, kmap_atomic_pfn, and
iomap_atomic_prot_pfn.Signed-off-by: Akinobu Mita
Cc: Thomas Gleixner
Cc: Ingo Molnar
Cc: "H. Peter Anvin"
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
30 Mar, 2009
1 commit
-
…it/rusty/linux-2.6-cpumask-for-sparc
Conflicts:
arch/sparc/kernel/smp_64.c
19 Mar, 2009
1 commit
-
Otherwise it might interrupt switch_to() midstream and use
half-cooked register window state.Reported-by: Chris Torek
Signed-off-by: David S. Miller
16 Mar, 2009
2 commits
-
Impact: cleanup, futureproof
In fact, all cpumask ops will only be valid (in general) for bit
numbers < nr_cpu_ids. So use that instead of NR_CPUS in various
places.This is always safe: no cpu number can be >= nr_cpu_ids, and
nr_cpu_ids is initialized to NR_CPUS at boot.Signed-off-by: Rusty Russell
Signed-off-by: Mike Travis
Acked-by: Ingo Molnar -
Impact: cleanup, futureproof
In fact, all cpumask ops will only be valid (in general) for bit
numbers < nr_cpu_ids. So use that instead of NR_CPUS in various
places.This is always safe: no cpu number can be >= nr_cpu_ids, and
nr_cpu_ids is initialized to NR_CPUS at boot.Signed-off-by: Rusty Russell
Signed-off-by: Mike Travis
Acked-by: Ingo Molnar
04 Feb, 2009
1 commit
-
This builds upon eeabac7386ca13bfe1a58afeb04326a9e1a3a20e
("sparc64: Validate kernel generated fault addresses on sparc64.")Upon further consideration, we actually should never see any
fault addresses for 32-bit tasks with the upper 32-bits set.If it does every happen, by definition it's a bug. Whatever
context created that fault would only have that fault satisfied
if we used the full 64-bit address. If we truncate it, we'll
always fault the wrong address and we'll always loop faulting
forever.So catch such conditions and mark them as errors always. Log
the error and fail the fault.Signed-off-by: David S. Miller
03 Feb, 2009
1 commit
-
In order to handle all of the cases of address calculation overflow
properly, we run sparc 32-bit processes in "address masking" mode
when running on a 64-bit kernel.Address masking mode zeros out the top 32-bits of the address
calculated for every load and store instruction.However, when we're in privileged mode we have to run with that
address masking mode disabled even when accessing userspace from
the kernel.To "simulate" the address masking mode we clear the top-bits by
hand for 32-bit processes in the fault handler.It is the responsibility of code in the compat layer to properly
zero extend addresses used to access userspace. If this isn't
followed properly we can get into a fault loop.Say that the user address is 0xf0000000 but for whatever reason
the kernel code sign extends this to 64-bit, and then the kernel
tries to access the result.In such a case we'll fault on address 0xfffffffff0000000 but the fault
handler will process that fault as if it were to address 0xf0000000.
We'll loop faulting forever because the fault never gets satisfied.So add a check specifically for this case, when the kernel is faulting
on a user address access and the addresses don't match up.This code path is sufficiently slow path, and this bug is sufficiently
painful to diagnose, that this kind of bug check is warranted.Signed-off-by: David S. Miller
09 Jan, 2009
2 commits
-
Move all applicable EXPORT_SYMBOL()s to the file where the respective
symbol is defined.Removed all the includes that are no longer needed in sparc_ksyms_64.c
Comment all remaining EXPORT_SYMBOL()s in sparc_ksyms_64.c
Signed-off-by: Sam Ravnborg
Additions by Julian Calaby:
* Moved EXPORT_SYMBOL()s for prom functions to their rightful places.
* Made some minor cleanups to the includes and comments of sparc_ksyms_64.c
* Updated and tidied commit message.
* Rebased patch over sparc-2.6.git HEAD.
* Ensured that all modified files have the correct includes.Signed-off-by: Julian Calaby
Signed-off-by: David S. Miller -
Move all applicable EXPORT_SYMBOL()s to the file where the respective
symbol is defined.Removed all the includes that are no longer needed in sparc_ksyms_32.c
Comment all remaining EXPORT_SYMBOL()s in sparc_ksyms_32.c
Two symbols are shared with sparc64 thus the exports were removed from
the sparc_ksyms_64.c too, along with the include their ommission made
redundant.Signed-off-by: Sam Ravnborg
Additions by Julian Calaby:
* Moved EXPORT_SYMBOL()s for prom functions to their rightful places.
* Made some minor cleanups to the includes and comments of sparc_ksyms_32.c
* Made another subtraction from sparc_ksyms_64.c
* Updated and tidied commit message.
* Rebased patch over sparc-2.6.git HEAD.
* Ensured that all modified files have the correct includes.Signed-off-by: Julian Calaby
Signed-off-by: David S. Miller
07 Jan, 2009
3 commits
-
Andrew Morton wrote:
People keep on doing
printk("%llu", some_u64);
testing it only on x86_64 and this generates a warning storm on
powerpc, sparc64, etc. Because they use `long', not `long long'.Quite a few 64-bit architectures are using `long' for their
s64/u64 types. We should convert them all to `long long'.Update types.h so we use unsigned long long for u64 and
fix all warnings in sparc64 code.
Tested with an allnoconfig, defconfig and allmodconfig builds.This patch introduces additional warnings in several drivers.
These will be dealt with in separate patches.Signed-off-by: Sam Ravnborg
Signed-off-by: Andrew Morton
Signed-off-by: David S. Miller -
The sparc allmodconfig build broke due to enabling of the
branch_tracer that does some very clever things with
all if conditions. This caused my gcc 3.4.5 to be so confused that
it emitted a warning:arch/sparc/mm/fault_32.c: In function `do_sparc_fault':
arch/sparc/mm/fault_32.c:176: warning: 'fixup' might be used uninitialized in this functionAnd with -Werror this broke the build.
Refactor code so it:
1) becomes more readable
2) no longer emit a warning with the branch_tracer enabledSigned-off-by: Sam Ravnborg
Signed-off-by: David S. Miller -
The sparc64 allmodconfig build broke due to enabling of the
branch_tracer that does some very clever things with
all if conditions. This caused my gcc 3.4.5 to be so confused that
it emitted two warnings:arch/sparc/mm/init_64.c: In function `update_mmu_cache':
arch/sparc/mm/init_64.c:271: warning: 'pg_flags' might be used uninitialized in this function
arch/sparc/mm/init_64.c:272: warning: 'page' might be used uninitialized in this functionAnd with -Werror this broke the build.
Refactor code so it:
1) becomes more readable
2) no longer emit a warning with the branch_tracer enabledThe refactoring uses a small helper function (flush_dcache()).
Signed-off-by: Sam Ravnborg
Signed-off-by: David S. Miller
27 Dec, 2008
2 commits
-
SUN_IO is always 'y' so drop it and thus killing an ifdef/endif pair
Signed-off-by: Sam Ravnborg
Signed-off-by: David S. Miller -
While doing this use standard names for start/end
so we could use definitions straight from asm-generic
for all the typical symbols.This also allowed us to drop the use of PROVIDE in the linker
script so sprc is less non-standard on this area.Signed-off-by: Sam Ravnborg
Signed-off-by: David S. Miller
12 Dec, 2008
1 commit
-
Use sparc64 version of scatterlist.h.
There are three main differences:
dma_addr_t replaces __u32
dma_address replaces dvma_address
dma_length replaces dvma_lengthdma_addr_t is a u32 on sparc32.
Boot tested on sparc32.
Signed-off-by: Robert Reif
Signed-off-by: David S. Miller
05 Dec, 2008
6 commits
-
It is always equals y so no need to test for it
Signed-off-by: Sam Ravnborg
Signed-off-by: David S. Miller -
Just do it once.
Pointed out by Al Viro.
Signed-off-by: David S. Miller
-
So that we can profile code even in a local_irq_disable() section,
only write 14 (instead of 15) into the %pil register to disable IRQs.This allows PIL level 15 to serve as a pseudo NMI.
Signed-off-by: David S. Miller
-
Add a sysctl to tweak the RSS limit used to decide when to grow
the TSB for an address space.In order to avoid expensive divides and multiplies only simply
positive and negative powers of two are supported.The function computed takes the number of TSB translations that will
fit at one time in the TSB of a given size, and either adds or
subtracts a percentage of entries. This final value is the
RSS limit.See tsb_size_to_rss_limit().
Signed-off-by: David S. Miller
-
- move all sparc64/mm/ files to arch/sparc/mm/
- commonly named files are named _64.c
- add files to sparc/mm/Makefile preserving link order
- delete now unused sparc64/mm/Makefile
- sparc64 now finds mm/ in sparcSigned-off-by: Sam Ravnborg
Signed-off-by: David S. Miller -
- rename files where sparc64 has similar files to _32.c
- Restructure Makefile
- Sneak in -Werror as we have for sparc64Signed-off-by: Sam Ravnborg
Signed-off-by: David S. Miller
01 Dec, 2008
1 commit
-
All noise since we don't have CPU hotplug there. However, they
did expose something very odd-looking in there - poke_viking()
does a bunch of identical btfixup each time it's called (i.e.
for each CPU). That one is left alone for now; just the trivial
misannotation fixes.Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds
04 Sep, 2008
1 commit
-
This patch adds init memory poisoning. It looks like
totalram_pages was not updated properly in free_initrd_mem
so I fixed that as well.Signed-off-by: Robert Reif
Signed-off-by: David S. Miller
02 Sep, 2008
1 commit
-
Reported by Stephen Rothwell.
Signed-off-by: David S. Miller
01 Sep, 2008
1 commit
-
While doing some easy cleanups on the sparc code I noticed that the
CONFIG_SUN4 code seems to be worse than the rest - there were some
"I don't know how it should work, but the current code definitely cannot
work." places.And while I have seen people running Linux on machines like a
SPARCstation 5 a few years ago I don't recall having seen sun4
machines, even less ones running Linux.Signed-off-by: Adrian Bunk
Signed-off-by: David S. Miller
29 Aug, 2008
4 commits
-
In order to make this week I also had to add an include
of linux/dma-mapping.h to asm/pci_32.h because drivers/pci/pci.c
really depends upon getting this header somehow.Signed-off-by: David S. Miller
-
Unused.
Signed-off-by: David S. Miller
-
The individual SBUS IOMMU arch code now sets the IOMMU information
directly into the OF device objects.Signed-off-by: David S. Miller
-
This lets us kill this "map it in every IOMMU" crazy code, and also
some of the final references to sbus_root.Signed-off-by: David S. Miller