14 Jun, 2011
3 commits
-
Older m68k-linux compilers will include pre-defined symbols that
confuse what processor it is being targeted for. For example gcc-4.1.2
will pre-define __mc68020__ even if you specify the target processor
as -m68000 on the gcc command line. Newer versions of gcc have this
corrected.In a few places the m68k code uses defined(__mc68020__) for optimizations
that include instructions that are specific to the CPU 68020 and above.
When compiling with older compilers this will be true even when we have
selected to compile for the older 68000 processors.Switch to using the kernel processor defines, CONFIG_M68020 and friends.
Signed-off-by: Greg Ungerer
-
There are 3 families of CPU core types that we support in the m68knommu
architecture branch. They are. traditional 68000
. CPU32 (a 68020 core derivative without MMU or bitfield instructions)
. ColdFireIt will be useful going forward to have a CONFIG_ option defined for
each type. We already have one for ColdFire (CONFIG_COLDFIRE), so add
for the other 2 families, CONFIG_M68000 and CONFIG_MCPU32.Signed-off-by: Greg Ungerer
-
The recent commit titled "module: Sort exported symbols" (f02e8a65)
changed the exported symbol name sections. Bring the m68knommu linker
script into line with those changes - including the sorting of the
symbol names.Signed-off-by: Greg Ungerer
29 May, 2011
2 commits
-
* setns:
ns: Wire up the setns system callDone as a merge to make it easier to fix up conflicts in arm due to
addition of sendmmsg system call -
32bit and 64bit on x86 are tested and working. The rest I have looked
at closely and I can't find any problems.setns is an easy system call to wire up. It just takes two ints so I
don't expect any weird architecture porting problems.While doing this I have noticed that we have some architectures that are
very slow to get new system calls. cris seems to be the slowest where
the last system calls wired up were preadv and pwritev. avr32 is weird
in that recvmmsg was wired up but never declared in unistd.h. frv is
behind with perf_event_open being the last syscall wired up. On h8300
the last system call wired up was epoll_wait. On m32r the last system
call wired up was fallocate. mn10300 has recvmmsg as the last system
call wired up. The rest seem to at least have syncfs wired up which was
new in the 2.6.39.v2: Most of the architecture support added by Daniel Lezcano
v3: ported to v2.6.36-rc4 by: Eric W. Biederman
v4: Moved wiring up of the system call to another patch
v5: ported to v2.6.39-rc6
v6: rebased onto parisc-next and net-next to avoid syscall conflicts.
v7: ported to Linus's latest post 2.6.39 tree.> arch/blackfin/include/asm/unistd.h | 3 ++-
> arch/blackfin/mach-common/entry.S | 1 +
Acked-by: Mike FrysingerOh - ia64 wiring looks good.
Acked-by: Tony LuckSigned-off-by: Eric W. Biederman
Signed-off-by: Linus Torvalds
27 May, 2011
4 commits
-
The implementation of find_next_bit_le() on m68knommu is identical with
the generic implementation of find_next_bit_le().Signed-off-by: Akinobu Mita
Cc: Greg Ungerer
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
By the previous style change, CONFIG_GENERIC_FIND_NEXT_BIT,
CONFIG_GENERIC_FIND_BIT_LE, and CONFIG_GENERIC_FIND_LAST_BIT are not used
to test for existence of find bitops anymore.Signed-off-by: Akinobu Mita
Acked-by: Greg Ungerer
Cc: Arnd Bergmann
Cc: Russell King
Cc: Martin Schwidefsky
Cc: Heiko Carstens
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The style that we normally use in asm-generic is to test the macro itself
for existence, so in asm-generic, do:#ifndef find_next_zero_bit_le
extern unsigned long find_next_zero_bit_le(const void *addr,
unsigned long size, unsigned long offset);
#endifand in the architectures, write
static inline unsigned long find_next_zero_bit_le(const void *addr,
unsigned long size, unsigned long offset)
#define find_next_zero_bit_le find_next_zero_bit_leThis adds the #define for each of the optimized find bitops in the
architectures.Suggested-by: Arnd Bergmann
Signed-off-by: Akinobu Mita
Acked-by: Hans-Christian Egtvedt
Acked-by: Russell King
Acked-by: Greg Ungerer
Cc: Martin Schwidefsky
Cc: Heiko Carstens
Acked-by: Geert Uytterhoeven
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
m68knommu can't build ext4, udf, and ocfs2 due to the lack of
find_next_bit_le().This implements find_next_bit_le() on m68knommu by duplicating the generic
find_next_bit_le() in lib/find_next_bit.c.Signed-off-by: Akinobu Mita
Acked-by: Greg Ungerer
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
25 May, 2011
1 commit
-
Fold all the mmu_gather rework patches into one for submission
Signed-off-by: Peter Zijlstra
Reported-by: Hugh Dickins
Cc: Benjamin Herrenschmidt
Cc: David Miller
Cc: Martin Schwidefsky
Cc: Russell King
Cc: Paul Mundt
Cc: Jeff Dike
Cc: Richard Weinberger
Cc: Tony Luck
Cc: KAMEZAWA Hiroyuki
Cc: Mel Gorman
Cc: KOSAKI Motohiro
Cc: Nick Piggin
Cc: Namhyung Kim
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
24 May, 2011
22 commits
-
Apart from whitespace differences, /proc/interrupts doesn't change by
enabling GENERIC_IRQ_SHOW.Signed-off-by: Geert Uytterhoeven
Signed-off-by: Greg Ungerer -
There is a lot of common code in the sys_m68k.c files. The mmu and non-mmu
versions can easily be merged into a single file.There is really only 2 functions that differ in the 2 cases. A single
ifdef on CONFIG_MMU can take care of this. Alternatively we could break
those 2 functions out and maintain sys_m68k_no.c and sys_m68k_mm.c with
just this code in it (Makefile could then just build the right one).
Does anyone have strong feelings on which way they want this done?Signed-off-by: Greg Ungerer
-
m68knommu can use generic implementation of ext2 atomic bitops.
Signed-off-by: Akinobu Mita
Signed-off-by: Greg Ungerer -
Signed-off-by: Geert Uytterhoeven
Signed-off-by: Greg Ungerer -
It is strait forward to merge the mmu and non-mmu versions of
asm-offstes.c. Some name changes are required for the preempt and
thread_info.flags in the non-mmu entry.S assembler to make them
consistent for both setups.Signed-off-by: Greg Ungerer
-
After cleaning up m68k_ksyms_no.c it is now strait forward to merge
the non-mmu and mmu versions of m68k_ksyms.c. The need for the extra
gcc functions is not strictly based on having an MMU or not. It is
based on the family the processor belongs too, so use an appropriate
conditional check.Signed-off-by: Greg Ungerer
-
There is no reason most of the symbols enclosed in a conditional
on CONFIG_COLDFIRE need to be exported. And they sure don't need to
be doing it in m68k_ksyms_no.c. Move the dma symbols export (which
are currently needed) to the definitions of those, and remove the
rest of the exporting here.Signed-off-by: Greg Ungerer
-
The EXPORT_SYMBOL(kernel_thread) belongs at the definition of that function,
not in some other random code file. So move it there.Signed-off-by: Greg Ungerer
-
The EXPORT_SYMBOL() of the local lib checksum functions belongs with
the definitions, not in some other random code file. So move then there.Signed-off-by: Greg Ungerer
-
The EXPORT_SYMBOL(dump_fpu) belongs at the definition of the function,
not in some other random code file. So move it there.Signed-off-by: Greg Ungerer
-
The memory initialization code for m68knommu has grown a bit crufty,
clean it up.. remove unused declaration for die_if_kernel()
. remove un-needed declaration of free_initmem()
. removed unused definitions of empty_bad_page and empty_bad_page_table
. removed unused DEBUG code
. make free_initmem() proper prototypeSigned-off-by: Greg Ungerer
-
Its is trivial to megre the mmu and non-mmu arch/m68k/mm/Makefile's back
into a single file. So do it.Signed-off-by: Greg Ungerer
-
The non-mmu kmap_no.c has been removed. So we can move kmap_mm.c
back to being the only kmap.c.Signed-off-by: Greg Ungerer
-
The implementation of iounmap() and __ioremap() for non-mmu m68k is
trivial. We can inline them in m68knommu headers and remove the trivial
implementations.Signed-off-by: Greg Ungerer
-
None of the m68knommu platforms will ever use kernel_set_cachemode().
And it is specific to a couple of m68k devices. So remove it.Signed-off-by: Greg Ungerer
-
We don't need an arch/m68k/lib/checksum.c wrapper to include the correct
mmu or non-mmu version of the checksum code. Let the Makefile just build
the appropriate one.Signed-off-by: Greg Ungerer
-
Merging the mmu and non-mmu directories we ended up with duplicate
implementations of memcpy(). One is a little more optimized for the
>= 68020 case, but that can easily be inserted into a single
implementation of memcpy(). Clean up the exporting of this symbol
too, otherwise we end up exporting it twice on a no-mmu build.Signed-off-by: Greg Ungerer
Acked-by: Geert Uytterhoeven -
Merging the mmu and non-mmu directories we ended up with duplicate
implementations of memset(). One is a little more optimized for the
>= 68020 case, but that can easily be inserted into a single
implementation of memset(). Clean up the exporting of this symbol
too, otherwise we end up exporting it twice on a no-mmu build.Signed-off-by: Greg Ungerer
Acked-by: Geert Uytterhoeven -
Merging the mmu and non-mmu directories we ended up with duplicate
(and identical) implementations of memmove(). Remove one of them.Signed-off-by: Greg Ungerer
Acked-by: Geert Uytterhoeven -
We can easily support the slight differences in libs needed by the
mmu and non-mmu builds in a single Makefile, so merge them back into
a single file again.Signed-off-by: Greg Ungerer
Acked-by: Geert Uytterhoeven -
The implementation of gcc's muldi3 support function differs only in
the use of the machine's 64 bit sized mul or not. (It isn't based
on using an MMU or not). Merge the current mmu and non-mmu versions
of arc/m68k/lib/muldi3 and use the appropriate pre-processor
conditionals to get the right version for all m68k processor types.Signed-off-by: Greg Ungerer
Acked-by: Geert Uytterhoeven -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
b43: fix comment typo reqest -> request
Haavard Skinnemoen has left Atmel
cris: typo in mach-fs Makefile
Kconfig: fix copy/paste-ism for dell-wmi-aio driver
doc: timers-howto: fix a typo ("unsgined")
perf: Only include annotate.h once in tools/perf/util/ui/browsers/annotate.c
md, raid5: Fix spelling error in comment ('Ofcourse' --> 'Of course').
treewide: fix a few typos in comments
regulator: change debug statement be consistent with the style of the rest
Revert "arm: mach-u300/gpio: Fix mem_region resource size miscalculations"
audit: acquire creds selectively to reduce atomic op overhead
rtlwifi: don't touch with treewide double semicolon removal
treewide: cleanup continuations and remove logging message whitespace
ath9k_hw: don't touch with treewide double semicolon removal
include/linux/leds-regulator.h: fix syntax in example code
tty: fix typo in descripton of tty_termios_encode_baud_rate
xtensa: remove obsolete BKL kernel option from defconfig
m68k: fix comment typo 'occcured'
arch:Kconfig.locks Remove unused config option.
treewide: remove extra semicolons
...
20 May, 2011
8 commits
-
A new utility function (core_kernel_data()) is used to determine if a
passed in address is part of core kernel data or not. It may or may not
return true for RO data, but this utility must work for RW data.Thus both _sdata and _edata must be defined and continuous,
without .init sections that may later be freed and replaced by
volatile memory (memory that can be freed).This utility function is used to determine if data is safe from
ever being freed. Thus it should return true for all RW global
data that is not in a module or has been allocated, or false
otherwise.Also change core_kernel_data() back to the more precise _sdata condition
and document the function.Signed-off-by: Steven Rostedt
Acked-by: Ralf Baechle
Acked-by: Hirokazu Takata
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Cc: Matt Turner
Cc: Geert Uytterhoeven
Cc: Roman Zippel
Cc: linux-m68k@lists.linux-m68k.org
Cc: Kyle McMartin
Cc: Helge Deller
Cc: JamesE.J.Bottomley
Link: http://lkml.kernel.org/r/1305855298.1465.19.camel@gandalf.stny.rr.com
Signed-off-by: Ingo Molnar
----
arch/alpha/kernel/vmlinux.lds.S | 1 +
arch/m32r/kernel/vmlinux.lds.S | 1 +
arch/m68k/kernel/vmlinux-std.lds | 2 ++
arch/m68k/kernel/vmlinux-sun3.lds | 1 +
arch/mips/kernel/vmlinux.lds.S | 1 +
arch/parisc/kernel/vmlinux.lds.S | 3 +++
kernel/extable.c | 12 +++++++++++-
7 files changed, 20 insertions(+), 1 deletion(-) -
The Atari keyboard driver calls atari_mouse_interrupt_hook if it's set, not
atari_input_mouse_interrupt_hook. Fix below.[geert] Killed off atari_mouse_interrupt_hook completely, after fixing another
incorrect assignment in atarimouse.c.Signed-off-by: Michael Schmitz
Signed-off-by: Geert Uytterhoeven -
It may trigger a warning in fs/proc/generic.c:__xlate_proc_name() when
trying to add an entry for the interrupt handler to sysfs.Signed-off-by: Geert Uytterhoeven
-
Suggested-by: Arnd Bergmann
Signed-off-by: Geert Uytterhoeven -
We reserved the numbers a long time ago, but never wired them up in the
syscall table as they need TIF_RESTORE_SIGMASK, which we only got last year
in commit cb6831d5d3099e772a510eb3e1ed0760ccffb45e ("m68k: Switch to saner
sigsuspend()")Signed-off-by: Geert Uytterhoeven
Acked-by: Greg Ungerer
Cc: stable@kernel.org -
Impact for nommu:
- Store table in .rodata instead of .text,
- Let kernel/sys_ni.c handle the stubbing of MMU-only syscalls,
- Implement sys_mremap and sys_nfsservct,
- Remove unused padding at the end of the table.Impact for mmu:
- Store table in .rodata instead of .data.Signed-off-by: Geert Uytterhoeven
Acked-by: Greg Ungerer -
find_next bitops on m68k (find_next_zero_bit, find_next_bit, and
find_next_bit_le) may cause out of bounds memory access
when the bitmap size in bits % 32 != 0 and offset (the bitnumber
to start searching at) is very close to the bitmap size.For example,
unsigned long bitmap[2] = { 0, 0 };
find_next_bit(bitmap, 63, 62);1. find_next_bit() tries to find any set bits in bitmap[1],
but no bits set.2. Then find_first_bit(bimap + 2, -1)
3. Unfortunately find_first_bit() takes unsigned int as the size argument.
4. find_first_bit will access bitmap[2~] until it find any set bits.
Add missing tests for stepping beyond the end of the bitmap to all
find_{first,next}_*() functions, and make sure they never return a value
larger than the bitmap size.Reported-by: Akinobu Mita
Cc: Andreas Schwab
Signed-off-by: Geert Uytterhoeven -
Hence use "offset" in find_next_{,zero_}bit(), like is already done for
find_next_{,zero_}bit_le()Signed-off-by: Geert Uytterhoeven
Cc: Akinobu Mita
Cc: Andreas Schwab
Signed-off-by: Geert Uytterhoeven