Re: Microblaze arch/microblaze/kernel/head.S: redundant code?

2014-10-31 Thread Michal Simek
Hi,

On 10/31/2014 04:15 PM, Adrian McMenamin wrote:
> Looking at this code at line 78 (in 3.17 kernel) it has:
> 
> mfs r1, rmsr
> msrclr r8, 0
> cmpu r8, r8, r1
> 
> But as far as I can see the result of that comparison is never used - the
> comments state it is to test if the msrclr  instruction is enabled.

r8 is used when machine_early_init() is called.
r8 is 4th register which is used for passing args based on Microblaze
reference manual.

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform




signature.asc
Description: OpenPGP digital signature


arch/microblaze/kernel/head.S: redundant code?

2014-10-31 Thread Adrian McMenamin
Looking at this code at line 78 (in 3.17 kernel) it has:

mfs r1, rmsr
msrclr r8, 0
cmpu r8, r8, r1

But as far as I can see the result of that comparison is never used -
the comments state it is to test if the msrclr  instruction is
enabled.

Haven't posted a patch because I am using the code to understand how
to write my own boot code for a very specific Microblaze application -
but perhaps someone with real expertise could look and/or tell me I'm
wrong?

Cheers

Adrian

(apologies to Michal Simek for getting this twice)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


arch/microblaze/kernel/head.S: redundant code?

2014-10-31 Thread Adrian McMenamin
Looking at this code at line 78 (in 3.17 kernel) it has:

mfs r1, rmsr
msrclr r8, 0
cmpu r8, r8, r1

But as far as I can see the result of that comparison is never used -
the comments state it is to test if the msrclr  instruction is
enabled.

Haven't posted a patch because I am using the code to understand how
to write my own boot code for a very specific Microblaze application -
but perhaps someone with real expertise could look and/or tell me I'm
wrong?

Cheers

Adrian

(apologies to Michal Simek for getting this twice)
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Microblaze arch/microblaze/kernel/head.S: redundant code?

2014-10-31 Thread Michal Simek
Hi,

On 10/31/2014 04:15 PM, Adrian McMenamin wrote:
 Looking at this code at line 78 (in 3.17 kernel) it has:
 
 mfs r1, rmsr
 msrclr r8, 0
 cmpu r8, r8, r1
 
 But as far as I can see the result of that comparison is never used - the
 comments state it is to test if the msrclr  instruction is enabled.

r8 is used when machine_early_init() is called.
r8 is 4th register which is used for passing args based on Microblaze
reference manual.

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP - KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform




signature.asc
Description: OpenPGP digital signature