lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 2 Nov 2011 23:00:18 +0100 (CET)
From:	Guennadi Liakhovetski <g.liakhovetski@....de>
To:	Magnus Damm <magnus.damm@...il.com>
cc:	"Rafael J. Wysocki" <rjw@...k.pl>,
	Linux-sh list <linux-sh@...r.kernel.org>,
	Linux PM list <linux-pm@...r.kernel.org>,
	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] ARM: mach-shmobile: sh7372 A4R support (v4)

On Wed, 2 Nov 2011, Guennadi Liakhovetski wrote:

> Hi Magnus
> 
> On Wed, 2 Nov 2011, Magnus Damm wrote:
> 
> > On Wed, Nov 2, 2011 at 11:38 AM, Guennadi Liakhovetski
> > <g.liakhovetski@....de> wrote:
> > > On Thu, 20 Oct 2011, Rafael J. Wysocki wrote:
> > >
> > >> From: Magnus Damm <damm@...nsource.se>
> > >>
> > >> This change adds support for the sh7372 A4R power domain.
> > >
> > > This version still breaks I2C (#0) on mackerel. Tested with your
> > > sh7372-test branch of Oct 18th plus these four patches:
> > >
> > > 6b29305a PM / Domains: Add default power off governor function (v2)
> > > 3d578ae PM / Domains: Add device stop governor function (v2)
> > > 6c2cd02 ARM: mach-shmobile: sh7372 A4R support (v4)
> > > 9da11f4 ARM: mach-shmobile: sh7372 A3SP support (v4)
> > 
> > Exactly how does it break IIC0?
> 
> We discussed it a couple of weeks ago, remember? Here's a quote:
> 
> > > > 3. I2C #0 doesn't work (last worked with some 3.1-rc7 based kernel). It is
> > > > needed for the keypad, without which I don't know how the board can be
> > > > woken up
> > > 
> > > That's odd. It worked fine when I tested with Morimoto-san earlier
> > > today. Are we using the same code?
> > 
> > I hope so. I'm using what Rafael suggested in his mail:
> > 
> > git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git sh7372-test
> > 
> > HEAD currently at commit
> > 
> > commit 2b7a2158042fbed2dc0c677d24efc2d3c8680186
> > Author: Magnus Damm <damm@...nsource.se>
> > Date:   Sun Oct 16 23:35:59 2011 +0200
> > 
> >     ARM: mach-shmobile: sh7372 A4R support (v3)
> > 
> > I2C works with HEAD^
> 
> Of course, now testing with v4 of A3SP and A4R patches. As for "exactly 
> how":
> 
> i2c-sh_mobile i2c-sh_mobile.0: I2C adapter 0 with bus speed 100000 Hz
> i2c-sh_mobile i2c-sh_mobile.1: I2C adapter 1 with bus speed 100000 Hz
> Linux video capture interface: v2.00
> soc-camera-pdrv soc-camera-pdrv.0: Probing soc-camera-pdrv.0
> sh_mobile_ceu sh_mobile_ceu.0: SuperH Mobile CEU driver attached to camera 0
> sh_mobile_ceu sh_mobile_ceu.0: SuperH Mobile CEU driver detached from camera 0
> sh_mobile_ceu sh_mobile_ceu.0: SuperH Mobile CEU driver attached to camera 0
> sh_mobile_ceu sh_mobile_ceu.0: SuperH Mobile CEU driver detached from camera 0
> i2c-sh_mobile i2c-sh_mobile.0: Transfer request timed out
> i2c-sh_mobile i2c-sh_mobile.0: Polling timed out
> tca6416-keypad 0-0020: tca6416_read_reg failed, reg: 1, error: -5
> tca6416-keypad: probe of 0-0020 failed with error -5
> 
> So, seems just not to be enabled.
> 
> > Does the same happen with the code base for upcoming 3.2-rc1 from
> > latest linux git?
> 
> Good question:
> 
> linux-2.6/arch/arm/kernel/entry-armv.S: Assembler messages:
> linux-2.6/arch/arm/kernel/entry-armv.S:501: Error: backward ref to unknown label "2:"
> linux-2.6/arch/arm/kernel/entry-armv.S:502: Error: backward ref to unknown label "3:"
> make[2]: *** [arch/arm/kernel/entry-armv.o] Error 1

After an "obvious" fix:

diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index 9ad50c4..6f8fbfe 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -497,7 +497,7 @@ ENDPROC(__und_usr)
 	.popsection
 	.pushsection __ex_table,"a"
 	.long	1b, 4b
-#if __LINUX_ARM_ARCH__ >= 7
+#if CONFIG_ARM_THUMB && __LINUX_ARM_ARCH__ >= 7
 	.long	2b, 4b
 	.long	3b, 4b
 #endif

(not sure, whether " && CONFIG_CPU_V7" is also needed), and a manual fix 
for ASoC / I2C Kconfig failure, the kernel builds and boots, but I2C fails 
in the same way. I.e., PM patches up to A3SP fix that problem, and A4R 
brings it back.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ