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
| ||
|
Date: Tue, 17 May 2022 18:11:38 +0800 From: Tyrone Ting <warp5tw@...il.com> To: avifishman70@...il.com, tmaimon77@...il.com, tali.perry1@...il.com, venture@...gle.com, yuenn@...gle.com, benjaminfair@...gle.com, robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org, wsa@...nel.org, andriy.shevchenko@...ux.intel.com, jarkko.nikula@...ux.intel.com, semen.protsenko@...aro.org, rafal@...ecki.pl, sven@...npeter.dev, jsd@...ihalf.com, jie.deng@...el.com, lukas.bulwahn@...il.com, arnd@...db.de, olof@...om.net, warp5tw@...il.com, tali.perry@...oton.com, Avi.Fishman@...oton.com, tomer.maimon@...oton.com, KWLIU@...oton.com, JJLIU0@...oton.com, kfting@...oton.com Cc: openbmc@...ts.ozlabs.org, linux-i2c@...r.kernel.org, devicetree@...r.kernel.org, linux-kernel@...r.kernel.org Subject: [PATCH v5 06/10] i2c: npcm: Correct register access width From: Tyrone Ting <kfting@...oton.com> The SMBnCTL3 register is 8-bit wide and the 32-bit access was always incorrect, but simply didn't cause a visible error on the 32-bit machine. On the 64-bit machine, the kernel message reports that ESR value is 0x96000021. Checking Arm Architecture Reference Manual Armv8 suggests that it's the alignment fault. SMBnCTL3's address is 0xE. Fixes: 56a1485b102e ("i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver") Signed-off-by: Tyrone Ting <kfting@...oton.com> Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@....net> --- drivers/i2c/busses/i2c-npcm7xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-npcm7xx.c b/drivers/i2c/busses/i2c-npcm7xx.c index 36f8aa7ab106..58d7175f0362 100644 --- a/drivers/i2c/busses/i2c-npcm7xx.c +++ b/drivers/i2c/busses/i2c-npcm7xx.c @@ -360,14 +360,14 @@ static int npcm_i2c_get_SCL(struct i2c_adapter *_adap) { struct npcm_i2c *bus = container_of(_adap, struct npcm_i2c, adap); - return !!(I2CCTL3_SCL_LVL & ioread32(bus->reg + NPCM_I2CCTL3)); + return !!(I2CCTL3_SCL_LVL & ioread8(bus->reg + NPCM_I2CCTL3)); } static int npcm_i2c_get_SDA(struct i2c_adapter *_adap) { struct npcm_i2c *bus = container_of(_adap, struct npcm_i2c, adap); - return !!(I2CCTL3_SDA_LVL & ioread32(bus->reg + NPCM_I2CCTL3)); + return !!(I2CCTL3_SDA_LVL & ioread8(bus->reg + NPCM_I2CCTL3)); } static inline u16 npcm_i2c_get_index(struct npcm_i2c *bus) -- 2.17.1
Powered by blists - more mailing lists