Re: commit 9178ba294b6839eeff1a91bed95515d783f3ee6c an A-Eon Tabor Board

2016-03-19 Thread Julian Margetson

On 2/3/2016 6:59 PM, Alexander Graf wrote:



On 02/03/2016 11:54 PM, Julian Margetson wrote:

On 2/3/2016 6:20 PM, Alexander Graf wrote:



On 02/03/2016 11:15 PM, Julian Margetson wrote:

On 2/3/2016 4:43 PM, Alexander Graf wrote:



On 02/03/2016 10:33 AM, Julian Margetson wrote:
Resending as it was attached to and old thread relating to a 
different motherboard.


On 2/2/2016 9:54 AM, Julian Margetson wrote:


Commit 9178ba294b6839eeff1a91bed95515d783f3ee6c prevents 
building of kernel 4.1 branch on A-Eon Tabor Board.


CC arch/powerpc/math-emu/fsqrt.o
arch/powerpc/platforms/85xx/tabor.c:194:2: error: unknown field 
‘power_off’ specified in initializer


I can't seem to find that file in Linux upstream?


Alex





It may have been discontinued as the patches used were maintained 
along with patches for the (Varisys)  A-Eon Cyrus board

which is officially supported from kernel 4.4.

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c383ee84e1d575b09d167185d15df24bde25eb15 



I don't quite understand how an internal API change in Linux 
breaking random external patches is a bug? Either your code is 
upstream or it can break on every git commit done upstream.



Alex





Sorry I am relatively new at this.
If I manage to pinpoint a problem on my powerpc machines I report it 
. Most of them so far have indeed been bugs.
The random external patches were done by person with far greater 
competence than me who are no longer in the picture.

Any  guidance would be greatly  appreciated.


I think the most important step really is to upstream board support, 
otherwise things will continue to fall apart for sure.


As for the exact breakage you saw, just remove the line and put a line 
like


  pm_power_off = tabor_power_off;

in your board probe function in tabor.c.


Alex





Could not get it to work with the
 pm_power_off = tabor_power_off;


so resorted to the option below and it builds and boots (Tested Kernel 
4.5.0).

shuts down but no power off.
Can live with that for now.


Thanks for your help .


Regards
Julian


define_machine(tabor) {
.name= "Tabor",
.probe= tabor_probe,
.setup_arch= tabor_setup_arch,
.init_IRQ= tabor_pic_init,
#ifdef CONFIG_PCI
.pcibios_fixup_bus= fsl_pcibios_fixup_bus,
.pcibios_fixup_phb= fsl_pcibios_fixup_phb,
#endif
.get_irq= mpic_get_irq,
.restart= fsl_rstcr_restart,
.calibrate_decr= generic_calibrate_decr,
.progress= udbg_progress,
};

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: commit 9178ba294b6839eeff1a91bed95515d783f3ee6c an A-Eon Tabor Board

2016-03-19 Thread Julian Margetson

On 3/16/2016 7:56 AM, Julian Margetson wrote:

On 2/3/2016 6:59 PM, Alexander Graf wrote:



On 02/03/2016 11:54 PM, Julian Margetson wrote:

On 2/3/2016 6:20 PM, Alexander Graf wrote:



On 02/03/2016 11:15 PM, Julian Margetson wrote:

On 2/3/2016 4:43 PM, Alexander Graf wrote:



On 02/03/2016 10:33 AM, Julian Margetson wrote:
Resending as it was attached to and old thread relating to a 
different motherboard.


On 2/2/2016 9:54 AM, Julian Margetson wrote:


Commit 9178ba294b6839eeff1a91bed95515d783f3ee6c prevents 
building of kernel 4.1 branch on A-Eon Tabor Board.


CC arch/powerpc/math-emu/fsqrt.o
arch/powerpc/platforms/85xx/tabor.c:194:2: error: unknown field 
‘power_off’ specified in initializer


I can't seem to find that file in Linux upstream?


Alex





It may have been discontinued as the patches used were maintained 
along with patches for the (Varisys)  A-Eon Cyrus board

which is officially supported from kernel 4.4.

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c383ee84e1d575b09d167185d15df24bde25eb15 



I don't quite understand how an internal API change in Linux 
breaking random external patches is a bug? Either your code is 
upstream or it can break on every git commit done upstream.



Alex





Sorry I am relatively new at this.
If I manage to pinpoint a problem on my powerpc machines I report it 
. Most of them so far have indeed been bugs.
The random external patches were done by person with far greater 
competence than me who are no longer in the picture.

Any  guidance would be greatly  appreciated.


I think the most important step really is to upstream board support, 
otherwise things will continue to fall apart for sure.


As for the exact breakage you saw, just remove the line and put a 
line like


  pm_power_off = tabor_power_off;

in your board probe function in tabor.c.


Alex





Could not get it to work with the
 pm_power_off = tabor_power_off;


so resorted to the option below and it builds and boots (Tested Kernel 
4.5.0).

shuts down but no power off.
Can live with that for now.


Thanks for your help .


Regards
Julian


define_machine(tabor) {
.name= "Tabor",
.probe= tabor_probe,
.setup_arch= tabor_setup_arch,
.init_IRQ= tabor_pic_init,
#ifdef CONFIG_PCI
.pcibios_fixup_bus= fsl_pcibios_fixup_bus,
.pcibios_fixup_phb= fsl_pcibios_fixup_phb,
#endif
.get_irq= mpic_get_irq,
.restart= fsl_rstcr_restart,
.calibrate_decr= generic_calibrate_decr,
.progress= udbg_progress,
};



Revisited and got  everything working  .
Thanks again.

Regards
Julian

static void tabor_power_off(void)
{
local_irq_disable();
if (power_gpio)
/* set mcu control register */
out_be32(power_gpio, in_be32(power_gpio) & 0xefff7fff); /* MCU Power Off */
else
printk(KERN_ERR "Power control not available\n");
while (1) ;

pm_power_off = tabor_power_off;

}


define_machine(tabor) {
.name= "Tabor",
.probe= tabor_probe,
.setup_arch= tabor_setup_arch,
.init_IRQ= tabor_pic_init,
#ifdef CONFIG_PCI
.pcibios_fixup_bus= fsl_pcibios_fixup_bus,
.pcibios_fixup_phb= fsl_pcibios_fixup_phb,
#endif
.restart= tabor_restart,
.halt= tabor_power_off,
.get_irq= mpic_get_irq,
.restart= fsl_rstcr_restart,
.calibrate_decr= generic_calibrate_decr,
.progress= udbg_progress,
};



___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: commit 9178ba294b6839eeff1a91bed95515d783f3ee6c an A-Eon Tabor Board

2016-02-03 Thread Julian Margetson
Resending as it was attached to and old thread relating to a different 
motherboard.


On 2/2/2016 9:54 AM, Julian Margetson wrote:


Commit 9178ba294b6839eeff1a91bed95515d783f3ee6c prevents building of 
kernel 4.1 branch on A-Eon Tabor Board.


CC arch/powerpc/math-emu/fsqrt.o
arch/powerpc/platforms/85xx/tabor.c:194:2: error: unknown field 
‘power_off’ specified in initializer

  .power_off  = tabor_power_off,
  ^
make[2]: *** [arch/powerpc/platforms/85xx/tabor.o] Error 1
make[1]: *** [arch/powerpc/platforms/85xx] Error 2
make: *** [arch/powerpc/platforms] Error 2


Builds after reverting  85xx portions of commit.

==
commit 9178ba294b6839eeff1a91bed95515d783f3ee6c

Author: Alexander Graf 

Date: Mon Oct 13 16:01:09 2014 +0200


powerpc: Convert power off logic to pm_power_off

The generic Linux framework to power off the machine is a function 
pointer


called pm_power_off. The trick about this pointer is that device 
drivers can


potentially implement it rather than board files.

Today on powerpc we set pm_power_off to invoke our generic full 
machine power


off logic which then calls ppc_md.power_off to invoke machine specific 
power


off.

However, when we want to add a power off GPIO via the "gpio-poweroff" 
driver,


this card house falls apart. That driver only registers itself if 
pm_power_off


is NULL to ensure it doesn't override board specific logic. However, 
since we


always set pm_power_off to the generic power off logic (which will 
just not


power off the machine if no ppc_md.power_off call is implemented), we 
can't


implement power off via the generic GPIO power off driver.

To fix this up, let's get rid of the ppc_md.power_off logic and just 
always use


pm_power_off as was intended. Then individual drivers such as the GPIO 
power off


driver can implement power off logic via that function pointer.

With this patch set applied and a few patches on top of QEMU that 
implement a


power off GPIO on the virt e500 machine, I can successfully turn off 
my virtual


machine after halt.

Signed-off-by: Alexander Graf 

[mpe: Squash into one patch and update changelog based on cover letter]

Signed-off-by: Michael Ellerman 


:04 04 11d9242dda2d364042ad2443b81aa124655ca79d 
8e5c37793f68e09977278bcea28e97ac7e0b812d M arch


root@julian-VirtualBox:/usr/src/linux-test#


root@julian-VirtualBox:/usr/src/linux-test# git bisect log

git bisect start

# bad: [97bf6af1f928216fd6c5a66e8a57bfa95a659672] Linux 3.19-rc1

git bisect bad 97bf6af1f928216fd6c5a66e8a57bfa95a659672

# good: [b2776bf7149bddd1f4161f14f79520f17fc1d71d] Linux 3.18

git bisect good b2776bf7149bddd1f4161f14f79520f17fc1d71d

# bad: [97bf6af1f928216fd6c5a66e8a57bfa95a659672] Linux 3.19-rc1

git bisect bad 97bf6af1f928216fd6c5a66e8a57bfa95a659672

# bad: [97bf6af1f928216fd6c5a66e8a57bfa95a659672] Linux 3.19-rc1

git bisect bad 97bf6af1f928216fd6c5a66e8a57bfa95a659672

# good: [70e71ca0af244f48a5dcf56dc435243792e3a495] Merge 
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next


git bisect good 70e71ca0af244f48a5dcf56dc435243792e3a495

# bad: [988adfdffdd43cfd841df734664727993076d7cb] Merge branch 
'drm-next' of git://people.freedesktop.org/~airlied/linux


git bisect bad 988adfdffdd43cfd841df734664727993076d7cb

# bad: [e7cf773d431a63a2417902696fcc9e0ebdc83bbe] Merge tag 
'usb-3.19-rc1' of 
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb


git bisect bad e7cf773d431a63a2417902696fcc9e0ebdc83bbe

# bad: [26ceb127f7bcf473db926c6a026b18ddd6f274e8] Merge branch 
'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm


git bisect bad 26ceb127f7bcf473db926c6a026b18ddd6f274e8

# bad: [9bfccec24e31f4f83445cfe0c1b0a5ef97900628] Merge tag 
'ext4_for_linus' of 
git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4


git bisect bad 9bfccec24e31f4f83445cfe0c1b0a5ef97900628

# good: [e2965cd0003f222bd49f67907c2bc6ed691c6d20] MIPS: Add MFHC0 and 
MTHC0 instructions to uasm.


git bisect good e2965cd0003f222bd49f67907c2bc6ed691c6d20

# bad: [56548fc0e86cb9156af7a7e1f15ba78f251dafaf] powerpc/powernv: 
Return to cpu offline loop when finished in KVM guest


git bisect bad 56548fc0e86cb9156af7a7e1f15ba78f251dafaf

# bad: [59994fb01a102a448ba758c9b824a29b4a99cc1b] powerpc: Use generic 
PIE randomization


git bisect bad 59994fb01a102a448ba758c9b824a29b4a99cc1b

# bad: [7aa189c8f57f2141b8655c2a13c7486d0844d490] powerpc/pseries: 
Quieten ibm,pcie-link-speed-stats warning


git bisect bad 7aa189c8f57f2141b8655c2a13c7486d0844d490

# bad: [6e4c632cdff7bf0238a2543dfe98bd1ad40313c2] powerpc: make __ffs 
return unsigned long


git bisect bad 6e4c632cdff7bf0238a2543dfe98bd1ad40313c2

# bad: [adb7cd732292b06ee964d9f6090b17c70bd8bd3d] powerpc/pci: Quieten 
unset I/O resource warning


git bisect bad adb7cd732292b06ee964d9f6090b17c70bd8bd3d

# bad: 

Re: commit 9178ba294b6839eeff1a91bed95515d783f3ee6c an A-Eon Tabor Board

2016-02-03 Thread Julian Margetson

On 2/3/2016 4:43 PM, Alexander Graf wrote:



On 02/03/2016 10:33 AM, Julian Margetson wrote:
Resending as it was attached to and old thread relating to a 
different motherboard.


On 2/2/2016 9:54 AM, Julian Margetson wrote:


Commit 9178ba294b6839eeff1a91bed95515d783f3ee6c prevents building of 
kernel 4.1 branch on A-Eon Tabor Board.


CC arch/powerpc/math-emu/fsqrt.o
arch/powerpc/platforms/85xx/tabor.c:194:2: error: unknown field 
‘power_off’ specified in initializer


I can't seem to find that file in Linux upstream?


Alex





It may have been discontinued as the patches used were maintained along 
with patches for the (Varisys)  A-Eon Cyrus board

which is officially supported from kernel 4.4.

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c383ee84e1d575b09d167185d15df24bde25eb15

Julian

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: commit 9178ba294b6839eeff1a91bed95515d783f3ee6c an A-Eon Tabor Board

2016-02-03 Thread Alexander Graf



On 02/03/2016 11:15 PM, Julian Margetson wrote:

On 2/3/2016 4:43 PM, Alexander Graf wrote:



On 02/03/2016 10:33 AM, Julian Margetson wrote:
Resending as it was attached to and old thread relating to a 
different motherboard.


On 2/2/2016 9:54 AM, Julian Margetson wrote:


Commit 9178ba294b6839eeff1a91bed95515d783f3ee6c prevents building 
of kernel 4.1 branch on A-Eon Tabor Board.


CC arch/powerpc/math-emu/fsqrt.o
arch/powerpc/platforms/85xx/tabor.c:194:2: error: unknown field 
‘power_off’ specified in initializer


I can't seem to find that file in Linux upstream?


Alex





It may have been discontinued as the patches used were maintained 
along with patches for the (Varisys)  A-Eon Cyrus board

which is officially supported from kernel 4.4.

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c383ee84e1d575b09d167185d15df24bde25eb15 



I don't quite understand how an internal API change in Linux breaking 
random external patches is a bug? Either your code is upstream or it can 
break on every git commit done upstream.



Alex

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: commit 9178ba294b6839eeff1a91bed95515d783f3ee6c an A-Eon Tabor Board

2016-02-03 Thread Alexander Graf



On 02/03/2016 10:33 AM, Julian Margetson wrote:
Resending as it was attached to and old thread relating to a different 
motherboard.


On 2/2/2016 9:54 AM, Julian Margetson wrote:


Commit 9178ba294b6839eeff1a91bed95515d783f3ee6c prevents building of 
kernel 4.1 branch on A-Eon Tabor Board.


CC arch/powerpc/math-emu/fsqrt.o
arch/powerpc/platforms/85xx/tabor.c:194:2: error: unknown field 
‘power_off’ specified in initializer


I can't seem to find that file in Linux upstream?


Alex

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: commit 9178ba294b6839eeff1a91bed95515d783f3ee6c an A-Eon Tabor Board

2016-02-03 Thread Julian Margetson

On 2/3/2016 6:59 PM, Alexander Graf wrote:



On 02/03/2016 11:54 PM, Julian Margetson wrote:

On 2/3/2016 6:20 PM, Alexander Graf wrote:



On 02/03/2016 11:15 PM, Julian Margetson wrote:

On 2/3/2016 4:43 PM, Alexander Graf wrote:



On 02/03/2016 10:33 AM, Julian Margetson wrote:
Resending as it was attached to and old thread relating to a 
different motherboard.


On 2/2/2016 9:54 AM, Julian Margetson wrote:


Commit 9178ba294b6839eeff1a91bed95515d783f3ee6c prevents 
building of kernel 4.1 branch on A-Eon Tabor Board.


CC arch/powerpc/math-emu/fsqrt.o
arch/powerpc/platforms/85xx/tabor.c:194:2: error: unknown field 
‘power_off’ specified in initializer


I can't seem to find that file in Linux upstream?


Alex





It may have been discontinued as the patches used were maintained 
along with patches for the (Varisys)  A-Eon Cyrus board

which is officially supported from kernel 4.4.

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c383ee84e1d575b09d167185d15df24bde25eb15 



I don't quite understand how an internal API change in Linux 
breaking random external patches is a bug? Either your code is 
upstream or it can break on every git commit done upstream.



Alex





Sorry I am relatively new at this.
If I manage to pinpoint a problem on my powerpc machines I report it 
. Most of them so far have indeed been bugs.
The random external patches were done by person with far greater 
competence than me who are no longer in the picture.

Any  guidance would be greatly  appreciated.


I think the most important step really is to upstream board support, 
otherwise things will continue to fall apart for sure.


As for the exact breakage you saw, just remove the line and put a line 
like


  pm_power_off = tabor_power_off;

in your board probe function in tabor.c.


Alex





Thanks.
I will give it a try.

Julian

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: commit 9178ba294b6839eeff1a91bed95515d783f3ee6c an A-Eon Tabor Board

2016-02-03 Thread Julian Margetson

On 2/3/2016 6:20 PM, Alexander Graf wrote:



On 02/03/2016 11:15 PM, Julian Margetson wrote:

On 2/3/2016 4:43 PM, Alexander Graf wrote:



On 02/03/2016 10:33 AM, Julian Margetson wrote:
Resending as it was attached to and old thread relating to a 
different motherboard.


On 2/2/2016 9:54 AM, Julian Margetson wrote:


Commit 9178ba294b6839eeff1a91bed95515d783f3ee6c prevents building 
of kernel 4.1 branch on A-Eon Tabor Board.


CC arch/powerpc/math-emu/fsqrt.o
arch/powerpc/platforms/85xx/tabor.c:194:2: error: unknown field 
‘power_off’ specified in initializer


I can't seem to find that file in Linux upstream?


Alex





It may have been discontinued as the patches used were maintained 
along with patches for the (Varisys)  A-Eon Cyrus board

which is officially supported from kernel 4.4.

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c383ee84e1d575b09d167185d15df24bde25eb15 



I don't quite understand how an internal API change in Linux breaking 
random external patches is a bug? Either your code is upstream or it 
can break on every git commit done upstream.



Alex





Sorry I am relatively new at this.
If I manage to pinpoint a problem on my powerpc machines I report it . 
Most of them so far have indeed been bugs.
The random external patches were done by person with far greater 
competence than me who are no longer in the picture.

Any  guidance would be greatly  appreciated .

Julian



___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: commit 9178ba294b6839eeff1a91bed95515d783f3ee6c an A-Eon Tabor Board

2016-02-03 Thread Alexander Graf



On 02/03/2016 11:54 PM, Julian Margetson wrote:

On 2/3/2016 6:20 PM, Alexander Graf wrote:



On 02/03/2016 11:15 PM, Julian Margetson wrote:

On 2/3/2016 4:43 PM, Alexander Graf wrote:



On 02/03/2016 10:33 AM, Julian Margetson wrote:
Resending as it was attached to and old thread relating to a 
different motherboard.


On 2/2/2016 9:54 AM, Julian Margetson wrote:


Commit 9178ba294b6839eeff1a91bed95515d783f3ee6c prevents building 
of kernel 4.1 branch on A-Eon Tabor Board.


CC arch/powerpc/math-emu/fsqrt.o
arch/powerpc/platforms/85xx/tabor.c:194:2: error: unknown field 
‘power_off’ specified in initializer


I can't seem to find that file in Linux upstream?


Alex





It may have been discontinued as the patches used were maintained 
along with patches for the (Varisys)  A-Eon Cyrus board

which is officially supported from kernel 4.4.

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c383ee84e1d575b09d167185d15df24bde25eb15 



I don't quite understand how an internal API change in Linux breaking 
random external patches is a bug? Either your code is upstream or it 
can break on every git commit done upstream.



Alex





Sorry I am relatively new at this.
If I manage to pinpoint a problem on my powerpc machines I report it . 
Most of them so far have indeed been bugs.
The random external patches were done by person with far greater 
competence than me who are no longer in the picture.

Any  guidance would be greatly  appreciated.


I think the most important step really is to upstream board support, 
otherwise things will continue to fall apart for sure.


As for the exact breakage you saw, just remove the line and put a line like

  pm_power_off = tabor_power_off;

in your board probe function in tabor.c.


Alex

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev