Skip to contentSkip to conversation

sparc-leon patches round 5 (to follow) (right numbering)

DISCUSSION Applied David Miller 3 participants 7 messages Aug 3, 2009 – Aug 18, 2009

lore
Share & tools
lore
#0 lore raw

From: Konrad Eisele <[email protected]>
Date: Tue, 23 Jun 2009 11:11:42 +0200

Quoted 1 line

round 5 had wrong numbering, I'll repost.

I'm applying all of this to sparc-next-2.6 and will push it out to kernel.org after some build testing.

Thanks!

#1 lore raw

From: David Miller <[email protected]>
Date: Sun, 02 Aug 2009 19:51:40 -0700 (PDT)

Quoted 7 lines

From: Konrad Eisele <[email protected]>
Date: Tue, 23 Jun 2009 11:11:42 +0200

Quoted 1 line

round 5 had wrong numbering, I'll repost.

I'm applying all of this to sparc-next-2.6 and will push it out to kernel.org after some build testing.

Ok, I had to revert all of this.

Are you even build testing what you're posting?

arch/sparc/kernel/built-in.o: In function `leon_node_init':
(.init.text+0x29c4): undefined reference to `_amba_init'

I can guess what happened, while respinning these patches you forgot to do some "git add" commands and thus the file that contains the amba_init() code is in your tree but not in any of the commits and thus not in your patches.

When you fix this up and repost the series, do me another favor, try to build the kernel successfully after each and every patch. With LEON enabled, the tree does not build after patch #3 because srmmu.c doesn't include asm/leon.h yet and thus srmmu_swprobe() isn't declared.

Please walk through this patch set carefully, checking the build for both LEON and non-LEON every step of the way, and after every commit run "git status" to make sure there are not stray files not checked into your tree.

Thanks.

#2 lore raw
In reply to David Miller

Hi,
Ok, I'll rework the patches. I'm on holiday right now,
but I'll do it after 17.August when I'll come back
to the office. I'll test it for Leon and non-Leon, I had it working non-Leon also but apparently it broke someway
when working to cleanup the patches. The
_amba_init() undefined reference is the only reference outside the arch/sparc directory. I'll protect it with a #ifdef LEON kind of macro. The thing is that it is
the root for the Leon specific drivers that are currently
in drivers/ambapp, a new directory which I have to figure
out how to get into the mainline kernel. So it is kind of a chicken and egg problem, without the arch/sparc part drivers/ambapp (that contains amba_init() and uart and ethernet drivers) will not be permitted, without drivers/ambapp arch/sparc will not compile. Adding all together to the kernel at once will be too big. So I thought that first get the Leon part of arch/sparc in and then figure out how to proceed with drivers/ambapp. amba_init will scan the AMBA bus and detect the connected devices. It's quite a bit of code and not really connected to arch/sparc.

-- Greetings Konrad

Quoting David Miller <[email protected]>:

Quoted 39 lines

From: David Miller <[email protected]>
Date: Sun, 02 Aug 2009 19:51:40 -0700 (PDT)

Quoted 7 lines

From: Konrad Eisele <[email protected]>
Date: Tue, 23 Jun 2009 11:11:42 +0200

Quoted 1 line

round 5 had wrong numbering, I'll repost.

I'm applying all of this to sparc-next-2.6 and will push it out to kernel.org after some build testing.

Ok, I had to revert all of this.

Are you even build testing what you're posting?

arch/sparc/kernel/built-in.o: In function `leon_node_init':
(.init.text+0x29c4): undefined reference to `_amba_init'

I can guess what happened, while respinning these patches you forgot to do some "git add" commands and thus the file that contains the amba_init() code is in your tree but not in any of the commits and thus not in your patches.

When you fix this up and repost the series, do me another favor, try to build the kernel successfully after each and every patch. With LEON enabled, the tree does not build after patch #3 because srmmu.c doesn't include asm/leon.h yet and thus srmmu_swprobe() isn't declared.

Please walk through this patch set carefully, checking the build for both LEON and non-LEON every step of the way, and after every commit run "git status" to make sure there are not stray files not checked into your tree.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
In reply to David Miller
Quoted 3 lines · On Mon, Aug 03, 2009 at 03:05:32PM -0400, [email protected] wrote:

big. So I thought that first get the Leon part of arch/sparc in and then figure out how to proceed with drivers/ambapp. amba_init will scan the AMBA bus and detect the connected

how about using one of various XXX_initcall() things from include/linux/init.h subsys_initcall sounds about right... That way you don't have to mess in the
sparc code, but could put it into your driver subdir...

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea.                                                [ RFC1925, 2.3 ]
#4 lore raw
In reply to David Miller

From: Thomas Bogendoerfer <[email protected]>
Date: Mon, 3 Aug 2009 22:05:00 +0200

Quoted 8 lines · On Mon, Aug 03, 2009 at 03:05:32PM -0400, [email protected] wrote:
Quoted 3 lines

big. So I thought that first get the Leon part of arch/sparc in and then figure out how to proceed with drivers/ambapp. amba_init will scan the AMBA bus and detect the connected

how about using one of various XXX_initcall() things from include/linux/init.h subsys_initcall sounds about right... That way you don't have to mess in the
sparc code, but could put it into your driver subdir...

Right and this is what other bus layers do too.

#5 lore raw
In reply to David Miller

Hi,

Quoted 2 lines

arch/sparc/kernel/built-in.o: In function `leon_node_init':
(.init.text+0x29c4): undefined reference to `_amba_init'

I posted the patchset version 6 (see mailing list). This time _amba_init() is not called directly. I had to use another aproach than the XXX_initcall() aproach that Thomas Boegendoerfer suggested:
leon_node_init() is called too early in the boot process (main()->setup_arch()->paging_init()->prom_build_devicetree()..) and as far as I understand it there is no xxx_initcall() that gets called that early => therefore I used a callback instead:

...
void __initdata (*prom_amba_init)(struct device_node *dp, struct device_node ***nextp) = 0;
...

	if (prom_amba_init &&
...
		prom_amba_init(dp, nextp);
	}

...

The callback will be initialized by the _bootloader_.

Quoted 4 lines

When you fix this up and repost the series, do me another favor, try to build the kernel successfully after each and every patch. With LEON enabled, the tree does not build after patch #3 because srmmu.c doesn't include asm/leon.h yet and thus srmmu_swprobe() isn't declared.

I didnt really undestand this one: The patch is split up in 5 subpatches that should logically divide the big patch. There guess are dependencies among the subpatches. The only way I can think of is to send all 5 subpatches as one big patch.

Is it ok with the version 6 patches that I just sent on the mailing list anyway? (that is 5 subpatches)?

-- Greetings Konrad

author Applied
#6 lore raw
In reply to David Miller

From: Konrad Eisele <[email protected]>
Date: Mon, 17 Aug 2009 12:27:32 +0200

Quoted 5 lines

Hi,

Quoted 2 lines

arch/sparc/kernel/built-in.o: In function `leon_node_init':
(.init.text+0x29c4): undefined reference to `_amba_init'

Quoted 7 lines

I posted the patchset version 6 (see mailing list). This time _amba_init() is not called directly. I had to use another aproach than the XXX_initcall() aproach that Thomas Boegendoerfer suggested:
leon_node_init() is called too early in the boot process (main()->setup_arch()->paging_init()->prom_build_devicetree()..) and as far as I understand it there is no xxx_initcall() that gets called that early => therefore I used a callback instead:

Ok.

I applied all of the Leon patches, thanks a lot.