Re: UltraSPARC T3 kernel patches
On Fri, Aug 05, 2011 at 07:42:09PM -0700, David Miller wrote:
> From: Ben Hutchings <ben@decadent.org.uk>
> Date: Fri, 5 Aug 2011 23:04:08 +0100
>
> > On Fri, Aug 05, 2011 at 08:22:11PM +0100, Jurij Smakov wrote:
> >> On Fri, Aug 05, 2011 at 04:36:37AM -0700, David Miller wrote:
> >> >
> >> > Jurij, if I made a set of patches against the current wheezy kernel
> >> > for UltraSPARC T3 support, would you be able to make sure they get
> >> > submitted for inclusion?
> >> >
> >> > Thanks!
> >>
> >> Obviously, I would welcome such a contribution, but the final decision
> >> regarding including the out-of-tree patchsets lies with kernel team -
> >> CC'ing them.
> >
> > Any such patches would of course have to be accepted by the
> > upstream maintainer for SPARC. ;-)
>
> He's real difficult but I was finally able to get these patches
> accepted and merged upstream. :)))
>
> I posted a reply to my original request to Jurij that had the patches
> attached, I'll include them here for completeness and so that you get
> them explicitly.
David it looks like there is a problem with the first patch:
jurij@droopy:~/tmp$ tar xzf linux-2.6_3.0.0.orig.tar.gz
jurij@droopy:~/tmp$ cd linux-2.6-3.0.0/
jurij@droopy:~/tmp/linux-2.6-3.0.0$ patch -p1 <
~/debian_kernel_t3.diff
patching file arch/sparc/include/asm/bitops_64.h
patching file arch/sparc/include/asm/elf_64.h
patching file arch/sparc/include/asm/hypervisor.h
patching file arch/sparc/include/asm/spitfire.h
patching file arch/sparc/include/asm/tsb.h
patching file arch/sparc/include/asm/xor_64.h
patching file arch/sparc/kernel/cpu.c
Hunk #1 succeeded at 474 (offset 125 lines).
patching file arch/sparc/kernel/cpumap.c
patching file arch/sparc/kernel/ds.c
patching file arch/sparc/kernel/entry.h
patching file arch/sparc/kernel/head_64.S
patching file arch/sparc/kernel/hvapi.c
patching file arch/sparc/kernel/hvcalls.S
patching file arch/sparc/kernel/kernel.h
Hunk #1 succeeded at 4 with fuzz 1.
Hunk #2 succeeded at 12 with fuzz 2 (offset -2 lines).
patching file arch/sparc/kernel/ktlb.S
patching file arch/sparc/kernel/mdesc.c
patching file arch/sparc/kernel/pcr.c
patching file arch/sparc/kernel/perf_event.c
Hunk #1 succeeded at 1301 (offset 1 line).
patching file arch/sparc/kernel/setup_64.c
Hunk #5 succeeded at 522 with fuzz 1.
Hunk #6 FAILED at 567.
1 out of 6 hunks FAILED -- saving rejects to file
arch/sparc/kernel/setup_64.c.rej
patching file arch/sparc/kernel/sparc_ksyms_64.c
patching file arch/sparc/kernel/sstate.c
patching file arch/sparc/kernel/unaligned_64.c
patching file arch/sparc/kernel/vmlinux.lds.S
Hunk #1 FAILED at 107.
1 out of 1 hunk FAILED -- saving rejects to file
arch/sparc/kernel/vmlinux.lds.S.rej
patching file arch/sparc/lib/Makefile
Hunk #1 succeeded at 31 (offset -1 lines).
patching file arch/sparc/lib/NG2page.S
patching file arch/sparc/lib/NGpage.S
patching file arch/sparc/lib/ffs.S
patching file arch/sparc/lib/hweight.S
patching file arch/sparc/mm/init_64.c
jurij@droopy:~/tmp/linux-2.6-3.0.0$
The problem with vmlinux.lds.S appears to be trivial, I have simply
merged it in manually and rediffed. However, I can't quite understand
what's going on with setup_64.c. This is a hunk which causes trouble:
--- arch/sparc/kernel/setup_64.c.~1~ 2011-08-05 07:34:15.000000000 -0700
+++ arch/sparc/kernel/setup_64.c 2011-08-05 07:38:37.000000000 -0700
@@ -567,6 +753,7 @@
, cpu_data(0).clock_tick
#endif
);
+ cpucap_info(m);
#ifdef CONFIG_SMP
smp_bogo(m);
#endif
Looking at the upstream commit [0] for this change, it appears that it
should have been applied to cpu.c, but ended up somehow applied to
setup_64.c instead in your patch. I've manually moved it to cpu.c and
rediffed, however now we end up with cpucap_info() function defined in
setup_64.c, but used only in cpu.c, which generates a warning
(cpucap_info defined but not used) resulting in a build failure since
current Debian compiler treats warnings as errors by default (I
think).
Please clarify what's the right thing to do here. I'm attaching .rej
files, in case you are interested in looking at them.
[0] http://git.kernel.org/?p=linux/kernel/git/davem/sparc.git;a=commitdiff;h=ac85fe8b21248054851e05bfaa352562e5b06dd3
Best regards,
--
Jurij Smakov jurij@wooyd.org
Key: http://www.wooyd.org/pgpkey/ KeyID: C99E03CC
--- arch/sparc/kernel/setup_64.c.~1~ 2011-08-05 07:34:15.000000000 -0700
+++ arch/sparc/kernel/setup_64.c 2011-08-05 07:38:37.000000000 -0700
@@ -567,6 +753,7 @@
, cpu_data(0).clock_tick
#endif
);
+ cpucap_info(m);
#ifdef CONFIG_SMP
smp_bogo(m);
#endif
--- arch/sparc/kernel/vmlinux.lds.S.~1~ 2011-08-05 07:34:15.000000000 -0700
+++ arch/sparc/kernel/vmlinux.lds.S 2011-08-05 07:39:14.000000000 -0700
@@ -107,7 +107,26 @@
*(.sun4v_2insn_patch)
__sun4v_2insn_patch_end = .;
}
-
+ .swapper_tsb_phys_patch : {
+ __swapper_tsb_phys_patch = .;
+ *(.swapper_tsb_phys_patch)
+ __swapper_tsb_phys_patch_end = .;
+ }
+ .swapper_4m_tsb_phys_patch : {
+ __swapper_4m_tsb_phys_patch = .;
+ *(.swapper_4m_tsb_phys_patch)
+ __swapper_4m_tsb_phys_patch_end = .;
+ }
+ .popc_3insn_patch : {
+ __popc_3insn_patch = .;
+ *(.popc_3insn_patch)
+ __popc_3insn_patch_end = .;
+ }
+ .popc_6insn_patch : {
+ __popc_6insn_patch = .;
+ *(.popc_6insn_patch)
+ __popc_6insn_patch_end = .;
+ }
PERCPU(SMP_CACHE_BYTES, PAGE_SIZE)
. = ALIGN(PAGE_SIZE);
Reply to: