Re: commit 9178ba294b6839eeff1a91bed95515d783f3ee6c an A-Eon Tabor Board

9 messages, 2 authors, 2016-03-16 · open the first message on its own page

Re: commit 9178ba294b6839eeff1a91bed95515d783f3ee6c an A-Eon Tabor Board

From: Julian Margetson <hidden>
Date: 2016-02-03 09:34:15

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 [off-list ref]

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 <redacted>

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

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>


:040000 040000 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: [8418804ef27e5f7988480d86ecf9dfd56cebc53b] Merge branch 
'topic/pm-power-off' into next

git bisect bad 8418804ef27e5f7988480d86ecf9dfd56cebc53b

# bad: [9178ba294b6839eeff1a91bed95515d783f3ee6c] powerpc: Convert 
power off logic to pm_power_off

git bisect bad 9178ba294b6839eeff1a91bed95515d783f3ee6c

# first bad commit: [9178ba294b6839eeff1a91bed95515d783f3ee6c] 
powerpc: Convert power off logic to pm_power_off

Re: commit 9178ba294b6839eeff1a91bed95515d783f3ee6c an A-Eon Tabor Board

From: Alexander Graf <hidden>
Date: 2016-02-03 20:44:05


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:
quoted
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

Re: commit 9178ba294b6839eeff1a91bed95515d783f3ee6c an A-Eon Tabor Board

From: Julian Margetson <hidden>
Date: 2016-02-03 22:15:42

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

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

On 2/2/2016 9:54 AM, Julian Margetson wrote:
quoted
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

Re: commit 9178ba294b6839eeff1a91bed95515d783f3ee6c an A-Eon Tabor Board

From: Alexander Graf <hidden>
Date: 2016-02-03 22:20:29


On 02/03/2016 11:15 PM, Julian Margetson wrote:
On 2/3/2016 4:43 PM, Alexander Graf wrote:
quoted

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

On 2/2/2016 9:54 AM, Julian Margetson wrote:
quoted
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

Re: commit 9178ba294b6839eeff1a91bed95515d783f3ee6c an A-Eon Tabor Board

From: Julian Margetson <hidden>
Date: 2016-02-03 22:54:25

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

On 02/03/2016 11:15 PM, Julian Margetson wrote:
quoted
On 2/3/2016 4:43 PM, Alexander Graf wrote:
quoted

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

On 2/2/2016 9:54 AM, Julian Margetson wrote:
quoted
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

Re: commit 9178ba294b6839eeff1a91bed95515d783f3ee6c an A-Eon Tabor Board

From: Alexander Graf <hidden>
Date: 2016-02-03 23:00:06


On 02/03/2016 11:54 PM, Julian Margetson wrote:
On 2/3/2016 6:20 PM, Alexander Graf wrote:
quoted

On 02/03/2016 11:15 PM, Julian Margetson wrote:
quoted
On 2/3/2016 4:43 PM, Alexander Graf wrote:
quoted

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

On 2/2/2016 9:54 AM, Julian Margetson wrote:
quoted
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

Re: commit 9178ba294b6839eeff1a91bed95515d783f3ee6c an A-Eon Tabor Board

From: Julian Margetson <hidden>
Date: 2016-02-03 23:09:05

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

On 02/03/2016 11:54 PM, Julian Margetson wrote:
quoted
On 2/3/2016 6:20 PM, Alexander Graf wrote:
quoted

On 02/03/2016 11:15 PM, Julian Margetson wrote:
quoted
On 2/3/2016 4:43 PM, Alexander Graf wrote:
quoted

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

On 2/2/2016 9:54 AM, Julian Margetson wrote:
quoted
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

Re: commit 9178ba294b6839eeff1a91bed95515d783f3ee6c an A-Eon Tabor Board

From: Julian Margetson <hidden>
Date: 2016-03-16 12:07:19

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

On 02/03/2016 11:54 PM, Julian Margetson wrote:
quoted
On 2/3/2016 6:20 PM, Alexander Graf wrote:
quoted

On 02/03/2016 11:15 PM, Julian Margetson wrote:
quoted
On 2/3/2016 4:43 PM, Alexander Graf wrote:
quoted

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

On 2/2/2016 9:54 AM, Julian Margetson wrote:
quoted
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,
};

Re: commit 9178ba294b6839eeff1a91bed95515d783f3ee6c an A-Eon Tabor Board

From: Julian Margetson <hidden>
Date: 2016-03-16 22:09:47

On 3/16/2016 7:56 AM, Julian Margetson wrote:
On 2/3/2016 6:59 PM, Alexander Graf wrote:
quoted

On 02/03/2016 11:54 PM, Julian Margetson wrote:
quoted
On 2/3/2016 6:20 PM, Alexander Graf wrote:
quoted

On 02/03/2016 11:15 PM, Julian Margetson wrote:
quoted
On 2/3/2016 4:43 PM, Alexander Graf wrote:
quoted

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

On 2/2/2016 9:54 AM, Julian Margetson wrote:
quoted
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,
};


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help