All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: sparclinux@vger.kernel.org
Subject: Re: Linker script cleanup / consolidation
Date: Thu, 24 May 2007 20:45:12 +0000	[thread overview]
Message-ID: <20070524.134512.11647740.davem@davemloft.net> (raw)
In-Reply-To: <20070524200934.GB1109@uranus.ravnborg.org>

From: Sam Ravnborg <sam@ravnborg.org>
Date: Thu, 24 May 2007 22:09:34 +0200

> The other archs shall have a similar clean-up over time.
> sparc64 was just a good place to start because David had
> expressed that he liked the consolidation.

This looks great.  In fact I'd be happy with you pushing this
now for 2.6.22 in order to fix that RODATA() section alignment
bug.

On a related topic, I've been wondering how to make instruction
patching sections work with initdata without warning.  I have
a bunch of assembler patches in the main kernel image that go
something like this:

661:	ldx		[%g7 + TRAP_PER_CPU_TSB_HUGE], %g5
	nop
	.section	.sun4v_2insn_patch, "ax"
	.word		661b
	mov		SCRATCHPAD_UTSBREG2, %g5
	ldxa		[%g5] ASI_SCRATCHPAD, %g5
	.previous

And then an __init function walks the tables in the
".sun4v_2insn_patch" instruction to patch things as
needed.

I don't need to do this patching in modules or anything
complicated like that, just in the static kernel image.

The problem is if I put one of these patches into __init assembler
code, the modpost.c thing warns.  As you can see, these patch sections
in between __init_begin and __init_end.

I see that IA64 has something similar, and they prepend their
patch section names with ".data." would that help me with the
modpost.c warning issue?

The history behind this is that I want to make the assembler in
arch/sparc64/kernel/trampoline.S __init to fix one modpost.c
warning, but once I dod that I hit this patching section issue
which makes more warnings that the original problem :-)

  reply	other threads:[~2007-05-24 20:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-24 20:09 Linker script cleanup / consolidation Sam Ravnborg
2007-05-24 20:45 ` David Miller [this message]
2007-05-24 21:15 ` Sam Ravnborg
2007-05-24 21:16 ` David Miller
2007-05-28 18:53 ` Sam Ravnborg
2007-05-29  6:00 ` David Miller
2007-05-29 18:41 ` Sam Ravnborg
  -- strict thread matches above, loose matches on Subject: below --
2007-05-24 20:04 Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070524.134512.11647740.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=sparclinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.