In sparc headers we use the following pattern:
#if defined(__sparc__) && defined(__arch64__)
sparc64 specific stuff
#else
sparc32 specific stuff
#endif
In types.h this pattern was not followed and here
we only checked for __sparc__ for no good reason.
It was a left-over from long time ago.
I checked other architectures - and most of them
do not have any such checks. And all the recently
merged versions uses the asm-generic version.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Fix following warning:
WARNING: drivers/sbus/char/bbc.o(.text+0x674): Section mismatch in reference from the function bbc_i2c_probe() to the function .init.text:T.463()
The function bbc_i2c_probe() references the function __init T.463().
This is often because bbc_i2c_probe lacks a __init
annotation or the annotation of T.463 is wrong.
bbc_i2c_probe() referenced the inlined attach_one_i2c().
As probe may be called after init drop __init annotations
on all functions used by bbc_i2c_probe()
The warning was seen with a sparc64 defconfig build
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Use "generic-y" to add generic headers where possible
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Commit 10b63956 ("UAPI: Plumb the UAPI Kbuilds into the user header
installation and checking") introduced a dependency of make 3.81
due to use of $(or ...)
We do not want to lift the requirement to gmake 3.81 just yet...
Included are a straightforward conversion to $(if ...)
Bisected-and-tested-by: Tetsuo Handa <[email protected]>
Cc: David Howells <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
Cc: <[email protected]> [v3.7+]
Signed-off-by: Michal Marek <[email protected]>
Introduce a common smp_callin() function to call
from trampoline_32.S.
Add platform specific functions to handle the
platform details.
This is in preparation for a patch that will
unify the smp boot stuff for all architectures.
sparc32 was significantly different to warrant
this patch in preparation.
Signed-off-by: Sam Ravnborg <[email protected]>
Acked-by: David S. Miller <[email protected]>
Cc: "Srivatsa S. Bhat" <[email protected]>
Acked-by: Srivatsa S. Bhat <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
__devinit, __devexit annotations are nops - so drop them.
Likewise for __devexit_p.
Adjusted alignment of arguments when needed.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Try to keep highmem support in a more central place.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Only one user so move it to the file using it.
It had nothing to do in fault_32.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
We already check the model in head_32.S so no need to
repeat the check here
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
The base is always the same so no need to use a variable for this.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This function was only used to set of_pdt_build_more to leon_node_init().
But the leon_node_init() was a nop as prom_amba_init was never assigned.
Cc: Daniel Hellstrom <[email protected]>
Cc: Konrad Eisele <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
sparc32 does not support fixmaps - so do not pretend so by
having the fixmap.h file.
Move relevant parts to vaddrs.h.
I looked at simplifying this even more but failed to understand
the reasoning behind the extra guard page involved and due to
missing testing possibilities only the trivial conversion was done.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Remove all unused stuff from fixmap.h
It is only used for highmem - sparc32 has no fixmap support.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
We save one page of RAM dropping swapper_pg_dir.
It was only used for an assignment in init-mm.c and we
redid this later in srmmu.c anyway.
This is likely a left-over from the sun4c removal.
To avoid a dummy variable we use a simple #define swapper_pg_dir NULL
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This allowed to us to kill a lot of casts,
with no loss of readability in any places
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Fix the most annoying issues that distracts me:
- whitespace
- missing space after "if" and "while"
- spaces around operators
and similar simple things.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
They are only used during early init so lets get rid of them
after init to save some RAM.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Stephen Rothwell <[email protected]> reported following error:
In file included from arch/sparc/kernel/prom_common.c:26:0:
arch/sparc/include/asm/leon.h:221:9: error: unknown type name 'irq_flow_handler_t'
arch/sparc/include/asm/leon.h:224:10: error: unknown type name 'irq_flow_handler_t'
Fix this by:
1) Avoid including leon.h in prom_commen.h (not needed)
2) Include irq.h in leon.h to avoid the missing symbol error
Signed-off-by: Sam Ravnborg <[email protected]>
Cc: Stephen Rothwell <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
head_32.S failed to set cputypval for leon, causing boot to fail.
The boot failed because we failed to recognize this was a LEON
cpu so we did not preoperly run-time patch the the kernel.
This resulted in an early crash.
Reported-by: Daniel Hellstrom <[email protected]>
Tested-by: Daniel Hellstrom <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
Cc: Konrad Eisele <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
With the removal of sun4c we can use the same cpu_idle()
implementation on UP and SMP.
This also fix it so we use the same version independent on LEON
enabled or not.
V2: Fixed whitespace issue pointed out by Josip Rodin.
Signed-off-by: Sam Ravnborg <[email protected]>
Cc: Josip Rodin <[email protected]>
Cc: Daniel Hellstrom <[email protected]>
Cc: Konrad Eisele <[email protected]>
All users of MMUREGS ASI is now LEON/SUN aware,
so this is no longer required.
Signed-off-by: Sam Ravnborg <[email protected]>
Cc: Daniel Hellstrom <[email protected]>
Cc: Konrad Eisele <[email protected]>
Fix following warning:
WARNING: arch/sparc/kernel/built-in.o(.cpuinit.text+0x9f4): Section mismatch in reference from the function leon_callin() to the function .init.text:leon_configure_cache_smp()
The function __cpuinit leon_callin() references
a function __init leon_configure_cache_smp().
If leon_configure_cache_smp is only used by leon_callin then
annotate leon_configure_cache_smp with a matching annotation.
Signed-off-by: Sam Ravnborg <[email protected]>
Cc: Daniel Hellstrom <[email protected]>
Cc: Konrad Eisele <[email protected]>
- Drop unused stuff accumulated over time
- Drop non-leon stuff
- Include almost all of the header unconditionally
Signed-off-by: Sam Ravnborg <[email protected]>
Cc: Daniel Hellstrom <[email protected]>
Cc: Konrad Eisele <[email protected]>
A few hardcoded constant were replaced by symbolic
versions to improve readability
Signed-off-by: Sam Ravnborg <[email protected]>
Cc: Daniel Hellstrom <[email protected]>
Cc: Konrad Eisele <[email protected]>
This will be used to handle that MMUREGS has different ASI for SUN and LEON.
This is the infrastructure only - users will come later.
Signed-off-by: Sam Ravnborg <[email protected]>
Cc: Daniel Hellstrom <[email protected]>
Cc: Konrad Eisele <[email protected]>
We use the compatibility property to determine the
sun models. For leon we use psr.impl and ignore the
result of the getprops call.
Include a hack to allow build as the support code
is not yet converted.
Signed-off-by: Sam Ravnborg <[email protected]>
Cc: Daniel Hellstrom <[email protected]>
Cc: Konrad Eisele <[email protected]>
Use PSR to check if the CPU is LEON and jump to
LEON specific code in this case.
Added a few constants to psr.h to increase readability.
Signed-off-by: Sam Ravnborg <[email protected]>
Cc: Daniel Hellstrom <[email protected]>
Cc: Konrad Eisele <[email protected]>
A few strings have been adopted to show more relevant info.
Julian Calaby <[email protected]> pointed out one
that I would otherwise have missed.
Signed-off-by: Sam Ravnborg <[email protected]>
There is no point having the NET dependency on the select target, as it
forces all users to depend on NET to tell they support BPF_JIT. Move
the config option to the bottom of the file - this could be a nice place
also for future "selectable" config symbols.
Fix up all users to drop the dependency on NET now that it is not
required to supress warnings for non-NET builds.
Reported-by: Linus Torvalds <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
Acked-by: David Miller <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Davis S. Miller wrote:
"
The way we do that now is overkill. We only needed to use the MMU
cache ops when we had sun4c around because sun4c lacked support for
the "flush" instruction.
But all sun4m and later chips have it so we can use it
unconditionally.
So in the per_cpu_patch() code, get rid of the cache ops invocation,
and instead execute a "flush %reg" after each of the instruction patch
assignments, where %reg is set to the address of the instruction that
was stored into.
Perhaps take the flushi() definition from asm/cacheflush_64.h and
place it into asm/cacheflush.h, then you can simply use that.
"
Implemented as per suggestion.
Moved run-time patching before we call paging_init(),
so helper methods in paging_init() may utilise run-time patching too.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
We hang forever when trying to do run-time patching of instructions
identified by the cpuid_patch section
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
When decelared inline the compiler does not warn
about unused functions.
But they are not used so drop them.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
One function was only used by leon - move it to a leon specific file.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
We already have a leaon specific file - so
keep all the laon stuff in one place.
Signed-off-by: Sam Ravnborg <[email protected]>
Cc: Konrad Eisele <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Based on copy from microblaze add ucmpdi2 implementation.
This fixes build of niu driver which failed with:
drivers/built-in.o: In function `niu_get_nfc':
niu.c:(.text+0x91494): undefined reference to `__ucmpdi2'
This driver will never be used on a sparc32 system,
but patch added to fix build breakage with all*config builds.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This allows us to do:
make arch/sparc/
to build the core part of the sparc kernel.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
When we killed btfixup this readme no longer has any value.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
- delete unused variables
- align assignments
- drop stale comments
- kill use of "\" for line continuation
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
- remove unused variables
- fix coding style issues that hurts my eyes
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
- remove all uses of btfixup header
- remove the btfixup header
- remove the btfixup code
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Use sparc_config to hold the last two function pointers. There was no
point generating dedicated _ops structures only for these.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
I ended up renaming set_cpu_int to send_ipi to
be consistent all way around.
send_ipi was moved to the *_smp.c files so
we could call the relevant method direct,
without any _ops indirection.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
It is commented out using #ifdef 0 / #endif,
and has been so for a long time.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
It is a noop for srmmu - so use a define as sparc64 does.
And drop all sparc callers - no need to confuse our-self
be calling a noop function.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This revealed that the implementation of switch_mm
had a bogus extra argument.
No harm as said argument was never used - but confusing.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Small cleanup to improve readability.
Dropped one test for sparc_cpu_model -
we already know that only sun4m support floppy.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Fix following warning:
arch/sparc/include/asm/floppy_32.h:342:5: warning: 'op' may be used uninitialized in this function
The warning are legitimite and we can end up using op uninitialized.
This fixes build with my gcc on UP.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
We know this is not a sun4/sun4c - as we checked earlier.
So no need to repeat the check.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
It was present only to support the sun4, sun4c boxes which
do not have the "compatible" property in the root-node
of the device tree.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
We already sorted out if we are a sun4/sun4c and halted.
So no need to check the prom version as we know this is
a v2 or v3 as sun4m, sun4d etc. does not use a v1 prom.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
We no longer have different versions of these so use a few simple
static inline functions.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
As we no longer support sun4c we can remove all the code to
support remapping the kernel in head_32.S.
We also try to tell the user that the machine is not support,
in case someone try to boot the kernel on a sun4c one day
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
With this we no longer do any run-time patchings of traps.
So drop the function + macro to support this.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This allows us to kill run-time patching for this function too
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
We used to runtime patch the trap table for srmmu.
With the removal of sun4c support this is no longer required.
With the sun4c trap removed we can remove all the referenced
trap handling which is sun4c specific.
This also allows us to get rid of the nosun4c.c file that
contained only dummy functions/data.
Signed-off-by: Sam Ravnborg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>