15 Jul, 2013
1 commit
-
The __cpuinit type of throwaway sections might have made sense
some time ago when RAM was more constrained, but now the savings
do not offset the cost and complications. For example, the fix in
commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time")
is a good example of the nasty type of bugs that can be created
with improper use of the various __init prefixes.After a discussion on LKML[1] it was decided that cpuinit should go
the way of devinit and be phased out. Once all the users are gone,
we can then finally remove the macros themselves from linux/init.h.Note that some harmless section mismatch warnings may result, since
notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
are flagged as __cpuinit -- so if we remove the __cpuinit from
arch specific callers, we will also get section mismatch warnings.
As an intermediate step, we intend to turn the linux/init.h cpuinit
content into no-ops as early as possible, since that will get rid
of these warnings. In any case, they are temporary and harmless.This removes all the arch/sparc uses of the __cpuinit macros from
C files and removes __CPUINIT from assembly files. Note that even
though arch/sparc/kernel/trampoline_64.S has instances of ".previous"
in it, they are all paired off against explicit ".section" directives,
and not implicitly paired with __CPUINIT (unlike mips and arm were).[1] https://lkml.org/lkml/2013/5/20/589
Cc: "David S. Miller"
Cc: sparclinux@vger.kernel.org
Signed-off-by: Paul Gortmaker
01 Apr, 2013
1 commit
-
srmmu_nocache_bitmap is cleared by bit_map_init(). But bit_map_init()
attempts to clear by memset(), so it can't clear the trailing edge of
bitmap properly on big-endian architecture if the number of bits is not
a multiple of BITS_PER_LONG.Actually, the number of bits in srmmu_nocache_bitmap is not always
a multiple of BITS_PER_LONG. It is calculated as below:bitmap_bits = srmmu_nocache_size >> SRMMU_NOCACHE_BITMAP_SHIFT;
srmmu_nocache_size is decided proportionally by the amount of system RAM
and it is rounded to a multiple of PAGE_SIZE. SRMMU_NOCACHE_BITMAP_SHIFT
is defined as (PAGE_SHIFT - 4). So it can only be said that bitmap_bits
is a multiple of 16.This fixes the problem by using bitmap_clear() instead of memset()
in bit_map_init() and this also uses BITS_TO_LONGS() to calculate correct
size at bitmap allocation time.Signed-off-by: Akinobu Mita
Cc: "David S. Miller"
Cc: sparclinux@vger.kernel.org
Signed-off-by: David S. Miller
27 Jul, 2012
7 commits
-
Only one user so move it to the file using it.
It had nothing to do in fault_32.Signed-off-by: Sam Ravnborg
Signed-off-by: David S. Miller -
Signed-off-by: Sam Ravnborg
Signed-off-by: David S. Miller -
Signed-off-by: Sam Ravnborg
Signed-off-by: David S. Miller -
This allowed to us to kill a lot of casts,
with no loss of readability in any placesSigned-off-by: Sam Ravnborg
Signed-off-by: David S. Miller -
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
Signed-off-by: David S. Miller -
Signed-off-by: Sam Ravnborg
Signed-off-by: David S. Miller -
They are only used during early init so lets get rid of them
after init to save some RAM.Signed-off-by: Sam Ravnborg
Signed-off-by: David S. Miller
28 May, 2012
1 commit
-
Signed-off-by: Sam Ravnborg
Cc: Daniel Hellstrom
Cc: Konrad Eisele
23 May, 2012
1 commit
-
With sun4c removed we can fall-back to the common implementation.
Signed-off-by: Sam Ravnborg
Cc: Thomas Gleixner
Acked-by: Thomas Gleixner
Signed-off-by: David S. Miller
20 May, 2012
2 commits
-
When decelared inline the compiler does not warn
about unused functions.
But they are not used so drop them.Signed-off-by: Sam Ravnborg
Signed-off-by: David S. Miller -
We already have a leaon specific file - so
keep all the laon stuff in one place.Signed-off-by: Sam Ravnborg
Cc: Konrad Eisele
Signed-off-by: David S. Miller
16 May, 2012
1 commit
-
It's the one aberration in v8, the only cpu that
didn't actually have hardware multiply and divide
instructions.Signed-off-by: David S. Miller
Acked-by: Sam Ravnborg
15 May, 2012
1 commit
-
- remove all uses of btfixup header
- remove the btfixup header
- remove the btfixup codeSigned-off-by: Sam Ravnborg
Signed-off-by: David S. Miller
14 May, 2012
7 commits
-
This eliminated most of the remaining users of btfixup.
There are some complications because of the special cases we
have for sun4d, leon, and some flavors of viking.It was found that there are no cases where a flush_page_for_dma
method was not hooked up to something, so the "noflush" iommu
methods were removed.Add some documentation to the viking_sun4d_smp_ops to describe exactly
the hardware bug which causes us to need special TLB flushing on
sun4d.Signed-off-by: David S. Miller
-
Uses of these went away with the sun4c removal.
Signed-off-by: David S. Miller
-
The magic Swift SRMMU code in question has not been enabled for
something on the order of a decade, and it as well as it's comment
is there in the history in case we ever need it again.Therefore all implementations are NOPs and we can kill this stuff
off.Signed-off-by: David S. Miller
-
We always have this instruction available, so no need to use
btfixup for it any more.This also eradicates the whole of atomic_32.S and thus the
__atomic_begin and __atomic_end symbols completely.Signed-off-by: David S. Miller
-
Signed-off-by: Sam Ravnborg
Signed-off-by: David S. Miller -
Only one function left using btfixup.
Signed-off-by: Sam Ravnborg
Signed-off-by: David S. Miller -
Signed-off-by: Sam Ravnborg
Signed-off-by: David S. Miller
13 May, 2012
12 commits
-
pte_{filei,wrprotecti,mkcleani,mkoldi}
pte_{mkwrite,mkdirty,mkyoung}Signed-off-by: David S. Miller
-
And we can certainly get rid of the const function attributes, there
is no way that's needed any longer and no other arch uses this kind
of annotation here.Signed-off-by: David S. Miller
-
Signed-off-by: David S. Miller
-
Signed-off-by: Sam Ravnborg
Signed-off-by: David S. Miller -
Signed-off-by: David S. Miller
-
Signed-off-by: David S. Miller
-
That lets us also get rid of the run-time initialization of
protection_map[] and all the ugly module workarounds for
PAGE_KERNEL and PAGE_SHARED to deal with the fact that we
can't do btfixups for modular code.Signed-off-by: David S. Miller
-
Signed-off-by: David S. Miller
-
Also we can remove BTFIXUPCALL_SWAPO0G0 as that is no longer
used.This was rather amusing, we were setting the btfixup vectors
based upon cpu type but all to the same exact generic srmmu
routines.Furthermore, we were inconsistently marking the fixup as
either BTFIXUPCALL_SWAPO0G0 or BTFIXUPCALL_NORM.What a mess, glad we could untangle this stuff.
Signed-off-by: David S. Miller
-
Only one set of values exist, the SRMMU ones.
Signed-off-by: David S. Miller
-
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
Signed-off-by: David S. Miller -
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
Signed-off-by: David S. Miller
12 May, 2012
6 commits
-
I left some around, like the ones in the openprom headers, since
we need to think about which pieces of those datastructures and
code we can completely toss now.Signed-off-by: David S. Miller
-
We no longer have different versions of these so use a few simple
static inline functions.Signed-off-by: Sam Ravnborg
Signed-off-by: David S. Miller -
Signed-off-by: Sam Ravnborg
Signed-off-by: David S. Miller -
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
Signed-off-by: David S. Miller -
And drop run-time patching too.
Signed-off-by: Sam Ravnborg
Signed-off-by: David S. Miller -
Also drop run-time patching for srmmu
Signed-off-by: Sam Ravnborg
Signed-off-by: David S. Miller