Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k

Pull m68k fixes from Geert Uytterhoeven:
"These are two critical fixes, needed by distro kernels, and thus also
destined for stable:

- The do_div() commit fixes a crash in mounting btrfs volumes, which
was a regression from 3.2,

- The ARAnyM fix allows to have NatFeat drivers as loadable modules,
which is needed for initrds"

* 'for-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
m68k: Truncate base in do_div()
m68k/atari: ARAnyM - Fix NatFeat module support

+24 -8
+19 -4
arch/m68k/emu/natfeat.c
··· 18 18 #include <asm/machdep.h> 19 19 #include <asm/natfeat.h> 20 20 21 + extern long nf_get_id2(const char *feature_name); 22 + 21 23 asm("\n" 22 - " .global nf_get_id,nf_call\n" 23 - "nf_get_id:\n" 24 + " .global nf_get_id2,nf_call\n" 25 + "nf_get_id2:\n" 24 26 " .short 0x7300\n" 25 27 " rts\n" 26 28 "nf_call:\n" ··· 31 29 "1: moveq.l #0,%d0\n" 32 30 " rts\n" 33 31 " .section __ex_table,\"a\"\n" 34 - " .long nf_get_id,1b\n" 32 + " .long nf_get_id2,1b\n" 35 33 " .long nf_call,1b\n" 36 34 " .previous"); 37 - EXPORT_SYMBOL_GPL(nf_get_id); 38 35 EXPORT_SYMBOL_GPL(nf_call); 36 + 37 + long nf_get_id(const char *feature_name) 38 + { 39 + /* feature_name may be in vmalloc()ed memory, so make a copy */ 40 + char name_copy[32]; 41 + size_t n; 42 + 43 + n = strlcpy(name_copy, feature_name, sizeof(name_copy)); 44 + if (n >= sizeof(name_copy)) 45 + return 0; 46 + 47 + return nf_get_id2(name_copy); 48 + } 49 + EXPORT_SYMBOL_GPL(nf_get_id); 39 50 40 51 void nfprint(const char *fmt, ...) 41 52 {
+5 -4
arch/m68k/include/asm/div64.h
··· 15 15 unsigned long long n64; \ 16 16 } __n; \ 17 17 unsigned long __rem, __upper; \ 18 + unsigned long __base = (base); \ 18 19 \ 19 20 __n.n64 = (n); \ 20 21 if ((__upper = __n.n32[0])) { \ 21 22 asm ("divul.l %2,%1:%0" \ 22 - : "=d" (__n.n32[0]), "=d" (__upper) \ 23 - : "d" (base), "0" (__n.n32[0])); \ 23 + : "=d" (__n.n32[0]), "=d" (__upper) \ 24 + : "d" (__base), "0" (__n.n32[0])); \ 24 25 } \ 25 26 asm ("divu.l %2,%1:%0" \ 26 - : "=d" (__n.n32[1]), "=d" (__rem) \ 27 - : "d" (base), "1" (__upper), "0" (__n.n32[1])); \ 27 + : "=d" (__n.n32[1]), "=d" (__rem) \ 28 + : "d" (__base), "1" (__upper), "0" (__n.n32[1])); \ 28 29 (n) = __n.n64; \ 29 30 __rem; \ 30 31 })