[PATCH v2] powerpc/tau: Remove superfluous parameter in alloc_workqueue() call

2021-06-11 Thread Finn Thain
oju Fixes: b1c6a0a10bfa ("powerpc/tau: Convert from timer to workqueue") Signed-off-by: Finn Thain --- Changed since v1: - Improved commit log message. --- arch/powerpc/kernel/tau_6xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/tau_6xx.c b

[PATCH] powerpc/tau: Remove redundant parameter in alloc_workqueue() call

2021-06-10 Thread Finn Thain
oju Fixes: b1c6a0a10bfa ("powerpc/tau: Convert from timer to workqueue") Signed-off-by: Finn Thain --- arch/powerpc/kernel/tau_6xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/tau_6xx.c b/arch/powerpc/kernel/tau_6xx.c index 6c31af7f4fa8.

Re: remove the legacy ide driver

2021-03-18 Thread Finn Thain
On Thu, 18 Mar 2021, Christoph Hellwig wrote: > Hi all, > > we've been trying to get rid of the legacy ide driver for a while now, > and finally scheduled a removal for 2021, which is three month old now. > > In general distros and most defconfigs have switched to libata long ago, > but there

Re: [PATCH] scsi: target/sbp: remove firewire SBP target driver

2021-01-04 Thread Finn Thain
On Mon, 4 Jan 2021, Bart Van Assche wrote: > On 6/16/20 7:07 PM, Finn Thain wrote: > > On Tue, 16 Jun 2020, Bart Van Assche wrote: > >> As far as I know the sbp driver only has had one user ever and that > >> user is no longer user the sbp driver. > > > >

[PATCH] MAINTAINERS: Update 68k Mac entry

2020-12-04 Thread Finn Thain
ingly. Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Joshua Thompson Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-m...@lists.linux-m68k.org Signed-off-by: Finn Thain --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 867157311dc8..e8

Re: [PATCH] macintosh/adb-iop: Send correct poll command

2020-12-04 Thread Finn Thain
On Fri, 4 Dec 2020, Geert Uytterhoeven wrote: > Hi Finn, > > On Fri, Nov 20, 2020 at 5:54 AM Finn Thain wrote: > > The behaviour of the IOP firmware is not well documented but we do know > > that IOP message reply data can be used to issue new ADB commands. > > Use

Re: [PATCH] macintosh/adb-iop: Always wait for reply message from IOP

2020-12-04 Thread Finn Thain
On Fri, 4 Dec 2020, Geert Uytterhoeven wrote: > Hi Finn, > > On Fri, Nov 20, 2020 at 5:54 AM Finn Thain wrote: > > A recent patch incorrectly altered the adb-iop state machine behaviour > > and introduced a regression that can appear intermittently as a > > malf

[PATCH v2] m68k: Fix WARNING splat in pmac_zilog driver

2020-11-21 Thread Finn Thain
uot;driver core: platform: Clarify that IRQ 0 is invalid") Reported-by: Laurent Vivier Signed-off-by: Finn Thain --- Changed since v1: - Add a comment to explain the need for the global structs. - Expand the commit log to better explain the intention of the patch. --- arch/m68k/mac/config.c

Re: [PATCH] m68k: Fix WARNING splat in pmac_zilog driver

2020-11-20 Thread Finn Thain
On Fri, 20 Nov 2020, Geert Uytterhoeven wrote: > Hi Finn, > > On Fri, Nov 20, 2020 at 5:51 AM Finn Thain wrote: > > Don't add platform resources that won't be used. This avoids a > > recently-added warning from the driver core, that can show up on a > > multi-platfo

[PATCH] macintosh/adb-iop: Send correct poll command

2020-11-19 Thread Finn Thain
-macii driver. This poll command is addressed to that device which last received a Talk command (explicit or otherwise). Cc: Joshua Thompson Fixes: fa3b5a9929fc ("macintosh/adb-iop: Implement idle -> sending state transition") Tested-by: Stan Johnson Signed-off-by: Finn Thain

[PATCH] macintosh/adb-iop: Always wait for reply message from IOP

2020-11-19 Thread Finn Thain
Stan Johnson Signed-off-by: Finn Thain --- drivers/macintosh/adb-iop.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/macintosh/adb-iop.c b/drivers/macintosh/adb-iop.c index 6b26b6a2c463..0ee327249150 100644 --- a/drivers/macintosh/adb-iop.c +++ b/drivers/

[PATCH] m68k: Fix WARNING splat in pmac_zilog driver

2020-11-19 Thread Finn Thain
a...@vger.kernel.org # v5.8+ References: commit a85a6c86c25b ("driver core: platform: Clarify that IRQ 0 is invalid") Reported-by: Laurent Vivier Signed-off-by: Finn Thain --- The global platform_device structs provide the equivalent of a direct search of the OpenFirmware tree, for platfor

Re: [PATCH] serial: pmac_zilog: don't init if zilog is not available

2020-10-22 Thread Finn Thain
On Thu, 22 Oct 2020, Geert Uytterhoeven wrote: > > Thanks for your patch... > You're welcome. > I can't say I'm a fan of this... > Sorry. > > The real issue is this "extern struct platform_device scc_a_pdev, > scc_b_pdev", circumventing the driver framework. > > Can we get rid of that?

Re: [PATCH] serial: pmac_zilog: don't init if zilog is not available

2020-10-21 Thread Finn Thain
On Wed, 21 Oct 2020, Laurent Vivier wrote: > Le 21/10/2020 à 01:43, Finn Thain a écrit : > > > Laurent, can we avoid the irq == 0 warning splat like this? > > > > diff --git a/drivers/tty/serial/pmac_zilog.c > > b/drivers/tty/serial/pmac_zilog.c > > ind

Re: [PATCH] serial: pmac_zilog: don't init if zilog is not available

2020-10-20 Thread Finn Thain
On Tue, 20 Oct 2020, Brad Boyer wrote: > > Wouldn't it be better to rearrange this code to only run if the devices > are present? This is a macio driver on pmac and a platform driver on > mac, so shouldn't it be possible to only run this code when the > appropriate entries are present in the

Re: [PATCH 1/9] kernel: add a PF_FORCE_COMPAT flag

2020-09-19 Thread Finn Thain
On Sat, 19 Sep 2020, Arnd Bergmann wrote: > On Sat, Sep 19, 2020 at 6:21 PM Andy Lutomirski wrote: > > On Fri, Sep 18, 2020 at 8:16 AM Christoph Hellwig wrote: > > > On Fri, Sep 18, 2020 at 02:58:22PM +0100, Al Viro wrote: > > > > Said that, why not provide a variant that would take an explicit

[PATCH 5/5] powerpc/tau: Disable TAU between measurements

2020-09-04 Thread Finn Thain
an Johnson Signed-off-by: Finn Thain --- arch/powerpc/kernel/tau_6xx.c | 65 +- arch/powerpc/platforms/Kconfig | 9 ++--- 2 files changed, 26 insertions(+), 48 deletions(-) diff --git a/arch/powerpc/kernel/tau_6xx.c b/arch/powerpc/kernel/tau_6xx.c index 614

[PATCH 4/5] powerpc/tau: Check processor type before enabling TAU interrupt

2020-09-04 Thread Finn Thain
According to Freescale's documentation, MPC74XX processors have an erratum that prevents the TAU interrupt from working, so don't try to use it when running on those processors. Fixes: 1da177e4c3f41 ("Linux-2.6.12-rc2") Tested-by: Stan Johnson Signed-off-by: Finn Thain --- arch/powe

[PATCH 2/5] powerpc/tau: Convert from timer to workqueue

2020-09-04 Thread Finn Thain
34a886e47819c2eb ]--- Don't call on_each_cpu() from a timer callback, call it from a worker thread instead. Fixes: 1da177e4c3f41 ("Linux-2.6.12-rc2") Tested-by: Stan Johnson Signed-off-by: Finn Thain --- arch/powerpc/kernel/tau_6xx.c | 38 +-- 1 file cha

[PATCH 3/5] powerpc/tau: Remove duplicated set_thresholds() call

2020-09-04 Thread Finn Thain
because tau_timeout() does so. Fixes: 1da177e4c3f41 ("Linux-2.6.12-rc2") Tested-by: Stan Johnson Signed-off-by: Finn Thain --- arch/powerpc/kernel/tau_6xx.c | 5 - 1 file changed, 5 deletions(-) diff --git a/arch/powerpc/kernel/tau_6xx.c b/arch/powerpc/kernel/tau_6xx.c index 268

[PATCH 1/5] powerpc/tau: Use appropriate temperature sample interval

2020-09-04 Thread Finn Thain
, there is also a factor of 266 that has to be applied to this value on certain parts i.e. speed sort above 266 MHz.) Always use the maximum cycle count, as recommended by the Datasheet. Fixes: 1da177e4c3f41 ("Linux-2.6.12-rc2") Tested-by: Stan Johnson Signed-off-by: Finn Thain --- ar

[PATCH 0/5] powerpc/tau: TAU driver fixes

2020-09-04 Thread Finn Thain
This patch series fixes various bugs in the Thermal Assist Unit driver. It was tested on 266 MHz and 292 MHz PowerBook G3 laptops. Finn Thain (5): powerpc/tau: Use appropriate temperature sample interval powerpc/tau: Convert from timer to workqueue powerpc/tau: Remove duplicated

Re: [PATCH 1/9] macintosh/via-macii: Access autopoll_devs when inside lock

2020-08-09 Thread Finn Thain
On Sun, 9 Aug 2020, Guenter Roeck wrote: > Hi, > > On Sun, Jun 28, 2020 at 02:23:12PM +1000, Finn Thain wrote: > > The interrupt handler should be excluded when accessing the > > autopoll_devs variable. > > > > I am quite baffled by this patch. Othe

Re: [PATCH 2/9] macintosh/via-macii: Poll the device most likely to respond

2020-08-09 Thread Finn Thain
On Sun, 9 Aug 2020, Guenter Roeck wrote: > Hi, > > On Sun, Jun 28, 2020 at 02:23:12PM +1000, Finn Thain wrote: > > Poll the most recently polled device by default, rather than the lowest > > device address that happens to be enabled in autopoll_devs. This improves >

Re: [PATCH v2 13/16] scripts/kallsyms: move ignored symbol types to is_ignored_symbol()

2020-07-20 Thread Finn Thain
On Mon, 20 Jul 2020, Masahiro Yamada wrote: > > I got a similar report before. > > I'd like to know whether or not > this is the same issue as fixed by > 7883a14339299773b2ce08dcfd97c63c199a9289 > The problem can be observed with 3d77e6a8804ab ("Linux 5.7"). So it appears that 7883a14339299

Re: [PATCH v2 13/16] scripts/kallsyms: move ignored symbol types to is_ignored_symbol()

2020-07-19 Thread Finn Thain
On Sun, 24 Nov 2019, Masahiro Yamada wrote: > Collect the ignored patterns to is_ignored_symbol(). > > Signed-off-by: Masahiro Yamada This commit (887df76de67f5) caused a regression in my powerpc builds as it causes symbol names to disappear from backtraces: [ cut here

[PATCH 4/9] macintosh/via-macii: Remove read_done state

2020-06-27 Thread Finn Thain
by the driver. Drop the extra state to simplify the code. Fixes: 1da177e4c3f41 ("Linux-2.6.12-rc2") # v5.0+ Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/macintosh/via-macii.c | 70 ++- 1 file changed, 28 insertions(+), 42 deletions(-)

[PATCH 9/9] macintosh/via-macii: Clarify definition of macii_init()

2020-06-27 Thread Finn Thain
The function prototype correctly specifies the 'static' storage class. Let the function definition match the declaration for better readability. Signed-off-by: Finn Thain --- drivers/macintosh/via-macii.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/macintosh/via

[PATCH 0/9] Macintosh II ADB driver fixes

2020-06-27 Thread Finn Thain
+'. Finn Thain (9): macintosh/via-macii: Access autopoll_devs when inside lock macintosh/via-macii: Poll the device most likely to respond macintosh/via-macii: Handle /CTLR_IRQ signal correctly macintosh/via-macii: Remove read_done state macintosh/via-macii: Handle poll replies correctly

[PATCH 8/9] macintosh/via-macii: Use the stack for reset request storage

2020-06-27 Thread Finn Thain
The adb_request struct can be stored on the stack because the request is synchronous and is completed before the function returns. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/macintosh/via-macii.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH 7/9] macintosh/via-macii: Use unsigned type for autopoll_devs variable

2020-06-27 Thread Finn Thain
Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/macintosh/via-macii.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/macintosh/via-macii.c b/drivers/macintosh/via-macii.c index e143ddb81de34..447273967e1e8 100644 --- a/drivers/macintosh/via-macii.c

[PATCH 6/9] macintosh/via-macii: Use bool type for reading_reply variable

2020-06-27 Thread Finn Thain
Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/macintosh/via-macii.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/macintosh/via-macii.c b/drivers/macintosh/via-macii.c index 8d5ef77b4a435..e143ddb81de34 100644 --- a/drivers/macintosh/via

[PATCH 5/9] macintosh/via-macii: Handle poll replies correctly

2020-06-27 Thread Finn Thain
e from polling or autopolling, so call adb_input() with the autopoll parameter set to 1. Fixes: d95fd5fce88f0 ("m68k: Mac II ADB fixes") # v5.0+ Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/macintosh/via-macii.c | 20 ++-- 1 file changed, 18 insertions

[PATCH 3/9] macintosh/via-macii: Handle /CTLR_IRQ signal correctly

2020-06-27 Thread Finn Thain
: 1da177e4c3f41 ("Linux-2.6.12-rc2") # v5.0+ Reported-by: Mark Cave-Ayland Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/macintosh/via-macii.c | 166 -- 1 file changed, 97 insertions(+), 69 deletions(-) diff --git a/drivers/macintosh/via

[PATCH 2/9] macintosh/via-macii: Poll the device most likely to respond

2020-06-27 Thread Finn Thain
;m68k: Mac II ADB fixes") # v5.0+ Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/macintosh/via-macii.c | 99 +++ 1 file changed, 53 insertions(+), 46 deletions(-) diff --git a/drivers/macintosh/via-macii.c b/drivers/macintosh/via-macii.c index 6aa

[PATCH 1/9] macintosh/via-macii: Access autopoll_devs when inside lock

2020-06-27 Thread Finn Thain
The interrupt handler should be excluded when accessing the autopoll_devs variable. Fixes: d95fd5fce88f0 ("m68k: Mac II ADB fixes") # v5.0+ Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/macintosh/via-macii.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletion

Re: [PATCH] scsi: target/sbp: remove firewire SBP target driver

2020-06-17 Thread Finn Thain
On Tue, 16 Jun 2020, Martin K. Petersen wrote: > > However, keeping code around is not free. Right. And removing code isn't free either, if it forces people to find workarounds. > Core interfaces change frequently. Nobody enjoys having to tweak host > templates for 50 devices they have

Re: [PATCH] scsi: target/sbp: remove firewire SBP target driver

2020-06-16 Thread Finn Thain
On Tue, 16 Jun 2020, Martin K. Petersen wrote: > > I haven't used this driver for a long time, but I still own PowerMacs > > with firewire, and I know I'm not the only one. > I need to correct what I wrote above. I recall that years ago, when I needed to share storage from my Linux box to my

Re: [PATCH] scsi: target/sbp: remove firewire SBP target driver

2020-06-16 Thread Finn Thain
On Tue, 16 Jun 2020, Bart Van Assche wrote: > > As far as I know the sbp driver only has had one user ever and that user > is no longer user the sbp driver. So, you estimate the userbase at zero. Can you give a confidence level? Actual measurement is hard because when end users encounter

Re: [PATCH] scsi: target/sbp: remove firewire SBP target driver

2020-06-16 Thread Finn Thain
On Mon, 15 Jun 2020, Chris Boot wrote: > On 15/06/2020 00:28, Finn Thain wrote: > > On Sun, 14 Jun 2020, Chris Boot wrote: > > > >> I expect that if someone finds this useful it can stick around (but > >> that's not my call). > > > > Who's call i

Re: [PATCH] scsi: target/sbp: remove firewire SBP target driver

2020-06-14 Thread Finn Thain
On Sun, 14 Jun 2020, Chris Boot wrote: > I expect that if someone finds this useful it can stick around (but > that's not my call). Who's call is that? If the patch had said "From: Martin K. Petersen" and "This driver is being removed because it has the following defects..." that would be

Re: [PATCH] scsi: target/sbp: remove firewire SBP target driver

2020-06-13 Thread Finn Thain
On Sat, 13 Jun 2020, Chris Boot wrote: > I no longer have the time to maintain this subsystem nor the hardware to > test patches with. Then why not patch MAINTAINERS, and orphan it, as per usual practice? $ git log --oneline MAINTAINERS | grep -i orphan > It also doesn't appear to have any

Re: [PATCH 8/8] macintosh/adb-iop: Implement SRQ autopolling

2020-06-01 Thread Finn Thain
On Mon, 1 Jun 2020, Geert Uytterhoeven wrote: > > > > Sure, it could be absorbed by both asm/mac_iop.h and > > drivers/macintosh/adb-iop.c [...] > > asm/mac_iop.h doesn't include asm/adb_iop.h (at least not in my tree, > but perhaps you have plans to change that?), so there's only a single >

Re: [PATCH 8/8] macintosh/adb-iop: Implement SRQ autopolling

2020-05-31 Thread Finn Thain
On Sun, 31 May 2020, Geert Uytterhoeven wrote: > Hi Finn, > > On Sun, May 31, 2020 at 1:20 AM Finn Thain wrote: > > The adb_driver.autopoll method is needed during ADB bus scan and device > > address assignment. Implement this method so that the IOP's list of > > devi

[PATCH 5/8] macintosh/adb-iop: Resolve static checker warnings

2020-05-30 Thread Finn Thain
' was not declared. Should it be static? drivers/macintosh/adb-iop.c:241:5: warning: symbol 'adb_iop_reset_bus' was not declared. Should it be static? Cc: Joshua Thompson Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/macintosh/adb-iop.c | 14 +++--- 1 file changed, 7 insertions(+), 7

[PATCH 7/8] macintosh/adb-iop: Implement sending -> idle state transition

2020-05-30 Thread Finn Thain
On leaving the 'sending' state, proceed to the 'idle' state if no reply is expected. Drop redundant test for adb_iop_state == sending && current_req. Cc: Joshua Thompson Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/macintosh/adb-iop.c | 7 +++ 1 file changed, 3 in

[PATCH 4/8] macintosh/adb-iop: Access current_req and adb_iop_state when inside lock

2020-05-30 Thread Finn Thain
Drop the redundant local_irq_save/restore() from adb_iop_start() because the caller has to do it anyway. This is the pattern used in via-macii. Cc: Joshua Thompson Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/macintosh/adb-iop.c | 13 + 1 file changed, 5

[PATCH 3/8] macintosh/adb-iop: Adopt bus reset algorithm from via-macii driver

2020-05-30 Thread Finn Thain
This algorithm is slightly shorter and avoids the surprising adb_iop_start() call in adb_iop_poll(). Cc: Joshua Thompson Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/macintosh/adb-iop.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git

[PATCH 2/8] macintosh/adb-iop: Correct comment text

2020-05-30 Thread Finn Thain
This patch improves comment style and corrects some misunderstandings in the text. Cc: Joshua Thompson Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/macintosh/adb-iop.c | 29 + 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/drivers

[PATCH 1/8] macintosh/adb-iop: Remove dead and redundant code

2020-05-30 Thread Finn Thain
Cc: Joshua Thompson Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/macintosh/adb-iop.c | 29 - 1 file changed, 29 deletions(-) diff --git a/drivers/macintosh/adb-iop.c b/drivers/macintosh/adb-iop.c index fca31640e3ef..ce28ff40fb9c 100644

[PATCH 0/8] Mac ADB IOP driver fixes

2020-05-30 Thread Finn Thain
in the driver, plus a few clean-ups. Finn Thain (8): macintosh/adb-iop: Remove dead and redundant code macintosh/adb-iop: Correct comment text macintosh/adb-iop: Adopt bus reset algorithm from via-macii driver macintosh/adb-iop: Access current_req and adb_iop_state when inside lock

[PATCH 6/8] macintosh/adb-iop: Implement idle -> sending state transition

2020-05-30 Thread Finn Thain
place after the current IOP message is completed. Cc: Joshua Thompson Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/macintosh/adb-iop.c | 43 + 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/drivers/macintosh/adb-iop.c b/drivers

[PATCH 8/8] macintosh/adb-iop: Implement SRQ autopolling

2020-05-30 Thread Finn Thain
Signed-off-by: Finn Thain --- arch/m68k/include/asm/adb_iop.h | 1 + drivers/macintosh/adb-iop.c | 32 ++-- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/arch/m68k/include/asm/adb_iop.h b/arch/m68k/include/asm/adb_iop.h index 195d7fb1268c..6aecd020e2fc

Re: pata-macio on PowerBook G3: stuck interrupt with MATSHITA CR-174 CD-ROM

2019-07-10 Thread Finn Thain
On Fri, 28 Jun 2019, Finn Thain wrote: > Hi All, > > I've received a bug report concerning the pata-macio driver, when running > on a PowerBook G3 (Wallstreet). > > With CONFIG_PATA_MACIO=n && CONFIG_BLK_DEV_IDE_PMAC=y, everything works. > > With CONFIG_PATA_MA

pata-macio on PowerBook G3: stuck interrupt with MATSHITA CR-174 CD-ROM

2019-06-27 Thread Finn Thain
Hi All, I've received a bug report concerning the pata-macio driver, when running on a PowerBook G3 (Wallstreet). With CONFIG_PATA_MACIO=n && CONFIG_BLK_DEV_IDE_PMAC=y, everything works. With CONFIG_PATA_MACIO=y && CONFIG_BLK_DEV_IDE_PMAC=n, the CD-ROM fails. When the CD-ROM mediabay module

Re: Bisected regression in v5.1 on PowerBook G3 (Wallstreet)

2019-06-26 Thread Finn Thain
On Wed, 26 Jun 2019, Christophe Leroy wrote: > Hi Finn, > > On 06/26/2019 02:06 AM, Finn Thain wrote: > > Hi Christophe, > > > > I received a report of a regression between v5.0 and v5.1 which causes > > the current release to crash during boot with a machine

Bisected regression in v5.1 on PowerBook G3 (Wallstreet)

2019-06-26 Thread Finn Thain
Hi Christophe, I received a report of a regression between v5.0 and v5.1 which causes the current release to crash during boot with a machine check exception. Please see console log below. Stan (whom I've Cc'd) tells me that this happens on every attempt to boot. I asked him to try 'git

Re: [PATCH v9 00/22] Re-use nvram module

2019-01-22 Thread Finn Thain
On Tue, 22 Jan 2019, Greg Kroah-Hartman wrote: > On Tue, Jan 15, 2019 at 03:18:56PM +1100, Finn Thain wrote: > > The "generic" NVRAM module, drivers/char/generic_nvram.c, implements a > > /dev/nvram misc device. This module is used only by 32-bit PowerPC > > pl

[PATCH v9 19/22] powerpc, fbdev: Use NV_CMODE and NV_VMODE only when CONFIG_PPC32 && CONFIG_PPC_PMAC && CONFIG_NVRAM

2019-01-14 Thread Finn Thain
GetPreferredConfiguration and SavePreferredConfiguration in "Designing PCI Cards and Drivers for Power Macintosh Computers". ** See SetDefaultMode and GetDefaultMode in "Designing Cards and Drivers for the Macintosh Family". Signed-off-by: Finn Thain --- Changed since v8:

[PATCH v9 22/22] powerpc: Adopt nvram module for PPC64

2019-01-14 Thread Finn Thain
d be in an error path for an IOC_NVRAM_GET_OFFSET ioctl syscall. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- BTW, the IOC_NVRAM_SYNC ioctl call returns an error on PPC64. This patch retains this behaviour though it might be better to actually perform a sync since both PPC64 and PP

[PATCH v9 15/22] m68k: Dispatch nvram_ops calls to Atari or Mac functions

2019-01-14 Thread Finn Thain
Signed-off-by: Finn Thain --- Changed since v8: - Adopted nvram_read_bytes() and nvram_write_bytes() where possible. --- arch/m68k/Kconfig.machine | 1 + arch/m68k/atari/nvram.c | 21 ++-- arch/m68k/include/asm/atarihw.h | 6 +++ arch/m68k/include/asm/macintosh.h | 4

[PATCH v9 17/22] powerpc: Define missing ppc_md.nvram_size for CHRP and PowerMac

2019-01-14 Thread Finn Thain
the naming convention used across powerpc platforms for NVRAM accessor functions. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- Changed since v8: - Renamed functions to correspond with ppc_md member names. --- arch/powerpc/platforms/chrp/nvram.c | 14 ++ arch/powerpc

[PATCH v9 20/22] powerpc: Enable HAVE_ARCH_NVRAM_OPS and disable GENERIC_NVRAM

2019-01-14 Thread Finn Thain
Switch PPC32 kernels from the generic_nvram module to the nvram module. Also fix a theoretical bug where CHRP omits the chrp_nvram_init() call when CONFIG_NVRAM_MODULE=m. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- The change in the name of the module is visible to userspace

[PATCH v9 21/22] char/generic_nvram: Remove as unused

2019-01-14 Thread Finn Thain
Signed-off-by: Finn Thain --- drivers/char/Makefile| 6 +- drivers/char/generic_nvram.c | 160 --- 2 files changed, 1 insertion(+), 165 deletions(-) delete mode 100644 drivers/char/generic_nvram.c diff --git a/drivers/char/Makefile b/drivers/char

[PATCH v9 18/22] powerpc: Implement nvram ioctls

2019-01-14 Thread Finn Thain
Add the powerpc-specific ioctls to the nvram module. This allows the nvram module to replace the generic_nvram module. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- On PPC32, the IOC_NVRAM_SYNC ioctl call always returns 0, even for those platforms that don't implement ppc_md.nvram_sync

[PATCH v9 13/22] m68k/mac: Fix PRAM accessors

2019-01-14 Thread Finn Thain
PMU-based m68k Macs pre-date PowerMac-style NVRAM. Use the appropriate PMU commands. Also implement the missing XPRAM accessors for VIA-based Macs. Acked-by: Geert Uytterhoeven Tested-by: Stan Johnson Signed-off-by: Finn Thain --- Changed since v7: - Revised PMU response decoding due to via

[PATCH v9 16/22] char/nvram: Add "devname:nvram" module alias

2019-01-14 Thread Finn Thain
Signed-off-by: Finn Thain --- drivers/char/nvram.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c index adcc213c331e..c9e295d73dc5 100644 --- a/drivers/char/nvram.c +++ b/drivers/char/nvram.c @@ -503,3 +503,4 @@ module_exit(nvram_module_exit

[PATCH v9 08/22] char/nvram: Allow the set_checksum and initialize ioctls to be omitted

2019-01-14 Thread Finn Thain
r codes so that a multi-platform kernel binary can do the right thing when running on hardware without a suitable NVRAM. Signed-off-by: Finn Thain --- Changed since v8: - Renamed nvram_* functions to avoid name collisions. --- drivers/char/nvram.c | 70 --- inc

[PATCH v9 14/22] macintosh/via-cuda: Don't rely on Cuda to end a transfer

2019-01-14 Thread Finn Thain
Certain Cuda transfers have to be ended by the driver. According to Apple's open source Cuda driver, as found in mkLinux and XNU, this applies to any "open ended request such as PRAM read". This fixes an infinite polling loop in cuda_pram_read_byte(). Tested-by: Stan Johnson Signed-of

[PATCH v9 11/22] m68k/mac: Adopt naming and calling conventions for PRAM routines

2019-01-14 Thread Finn Thain
-by: Finn Thain --- Changed since v7: - Removed some gratuitous function pointers. --- arch/m68k/mac/misc.c | 61 +--- 1 file changed, 23 insertions(+), 38 deletions(-) diff --git a/arch/m68k/mac/misc.c b/arch/m68k/mac/misc.c index 71c4735a31ee..78c807025436

[PATCH v9 09/22] char/nvram: Implement NVRAM read/write methods

2019-01-14 Thread Finn Thain
but may be unavailable so fall back on the latter methods when necessary. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- Changed since v8: - Renamed nvram_* functions to avoid name collisions. - Added nvram_read_bytes() and nvram_write_bytes() helpers for use by those platforms wh

[PATCH v9 10/22] m68k/atari: Implement arch_nvram_ops methods and enable CONFIG_HAVE_ARCH_NVRAM_OPS

2019-01-14 Thread Finn Thain
Atari RTC NVRAM uses a checksum so implement the remaining arch_nvram_ops methods for the set_checksum and initialize ioctls. Enable CONFIG_HAVE_ARCH_NVRAM_OPS. Acked-by: Geert Uytterhoeven Signed-off-by: Finn Thain --- Changed since v8: - Moved the HAVE_ARCH_NVRAM_OPS symbol to common code

[PATCH v9 12/22] m68k/mac: Use macros for RTC accesses not magic numbers

2019-01-14 Thread Finn Thain
This is intended to improve code style and not affect code behaviour. Acked-by: Geert Uytterhoeven Tested-by: Stan Johnson Signed-off-by: Finn Thain --- arch/m68k/mac/misc.c | 59 ++-- 1 file changed, 41 insertions(+), 18 deletions(-) diff --git a/arch

[PATCH v9 07/22] char/nvram: Adopt arch_nvram_ops

2019-01-14 Thread Finn Thain
the common wrapper functions, the nvram module and other drivers can make use of the available NVRAM functionality in a portable way. Signed-off-by: Finn Thain --- It might be nice if the NVRAM Kconfig symbol depended only on HAVE_ARCH_NVRAM_OPS and all the x86 code here were moved to arch/x86

[PATCH v9 06/22] powerpc: Replace nvram_* extern declarations with standard header

2019-01-14 Thread Finn Thain
Remove the nvram_read_byte() and nvram_write_byte() declarations in powerpc/include/asm/nvram.h and use the cross-platform static functions in linux/nvram.h instead. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- Changed since v8: - Added nvram_read_byte() and nvram_write_byte

[PATCH v9 05/22] m68k/atari: Implement arch_nvram_ops struct

2019-01-14 Thread Finn Thain
By implementing an arch_nvram_ops struct, a platform can re-use the drivers/char/nvram.c module without needing any arch-specific code in that module. Atari does so here. Acked-by: Geert Uytterhoeven Signed-off-by: Finn Thain --- Changed since v8: - Added static inline wrapper functions

[PATCH v9 02/22] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

2019-01-14 Thread Finn Thain
Move the m68k-specific code out of the driver to make the driver generic. I've used 'SPDX-License-Identifier: GPL-2.0+' for the new file because the old file is covered by MODULE_LICENSE("GPL"). Acked-by: Geert Uytterhoeven Signed-off-by: Finn Thain --- Changed since v8: - Fixed

[PATCH v9 04/22] nvram: Replace nvram_* function exports with static functions

2019-01-14 Thread Finn Thain
-implemented in subsequent patches. Replace the sole validate-checksum-and-read-byte sequence with a call to nvram_read() which will gain the same semantics in subsequent patches. Remove unused exports. Acked-by: Geert Uytterhoeven Signed-off-by: Finn Thain --- arch/m68k/atari/nvram.c | 39

[PATCH v9 03/22] char/nvram: Re-order functions to remove forward declarations and #ifdefs

2019-01-14 Thread Finn Thain
Also give functions more sensible names: nvram_misc_* for misc device ops, nvram_proc_* for proc file ops and nvram_module_* for init and exit functions. This prevents name collisions with nvram.h helper functions and improves readability. Signed-off-by: Finn Thain --- drivers/char/nvram.c

[PATCH v9 00/22] Re-use nvram module

2019-01-14 Thread Finn Thain
anged the CONFIG_NVRAM default to better approximate the present code. In particular, the CONFIG_GENERIC_NVRAM default and use of "select NVRAM". - Added more tested-by tags. For older change logs, please refer to, https://lore.kernel.org/lkml/20151101104202.301856...@telegraphics.com.au/

[PATCH v9 01/22] scsi/atari_scsi: Don't select CONFIG_NVRAM

2019-01-14 Thread Finn Thain
form. In this patch and the subsequent fbdev driver patch, the convention is adopted across all relevant platforms whereby NVRAM functionality gets enabled in a given device driver when the nvram misc device is built-in or when both drivers are modules. Acked-by: Michael Schmitz Signed-off-by: Finn T

Re: [PATCH v8 24/25] powerpc: Adopt nvram module for PPC64

2019-01-08 Thread Finn Thain
On Tue, 8 Jan 2019, Michael Ellerman wrote: > > The reason why that doesn't work boils down to introspection. (This > > was mentioned elsewhere in this email thread.) For example, we > > presently have code like this, > > > > ssize_t nvram_get_size(void) > > { > >if (ppc_md.nvram_size)

Re: [PATCH v8 24/25] powerpc: Adopt nvram module for PPC64

2019-01-06 Thread Finn Thain
On Mon, 7 Jan 2019, Michael Ellerman wrote: > Arnd Bergmann writes: > > On Wed, Dec 26, 2018 at 1:43 AM Finn Thain > > wrote: > > > >> +static ssize_t ppc_nvram_get_size(void) > >> +{ > >> + if (ppc_md.nvram_size) > >> +

Re: [PATCH v8 20/25] powerpc, fbdev: Use arch_nvram_ops methods instead of nvram_read_byte() and nvram_write_byte()

2019-01-05 Thread Finn Thain
On Sun, 30 Dec 2018, I wrote: > On Sat, 29 Dec 2018, LEROY Christophe wrote: > > > Finn Thain a ?crit?: > > > > > Make use of arch_nvram_ops in device drivers so that the nvram_* function > > > exports can be removed. > > > > > > Sin

Re: [PATCH v8 05/25] char/nvram: Adopt arch_nvram_ops

2019-01-04 Thread Finn Thain
On Fri, 4 Jan 2019, Christoph Hellwig wrote: > On Fri, Jan 04, 2019 at 09:08:13AM +1100, Finn Thain wrote: > > On Thu, 3 Jan 2019, Christoph Hellwig wrote: > > > > > > + > > > > +const struct nvram_ops arch_nvram_ops = { > >

Re: [PATCH v8 24/25] powerpc: Adopt nvram module for PPC64

2019-01-04 Thread Finn Thain
On Mon, 31 Dec 2018, Arnd Bergmann wrote: > On Sun, Dec 30, 2018 at 4:29 AM Finn Thain wrote: > > > > On Sat, 29 Dec 2018, Arnd Bergmann wrote: > > > > > With the current method, it does seem odd to have a single > > > per-architecture instan

Re: [PATCH v8 22/25] powerpc: Remove CONFIG_GENERIC_NVRAM and adopt CONFIG_HAVE_ARCH_NVRAM_OPS

2019-01-03 Thread Finn Thain
On Thu, 3 Jan 2019, Christoph Hellwig wrote: > > # All PPC32s use generic nvram driver through ppc_md > > -config GENERIC_NVRAM > > +config HAVE_ARCH_NVRAM_OPS > > bool > > default y if PPC32 > > Symbols like this really should be defined in common code, and then > just selected by the

Re: [PATCH v8 05/25] char/nvram: Adopt arch_nvram_ops

2019-01-03 Thread Finn Thain
On Thu, 3 Jan 2019, Christoph Hellwig wrote: > > + > > +const struct nvram_ops arch_nvram_ops = { > > + .read_byte = nvram_read_byte, > > + .write_byte = nvram_write_byte, > > + .get_size = nvram_get_size, > > +}; > > +EXPORT_SYMBOL(arch_nvram_ops); > > I think something

Re: [PATCH v8 02/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

2019-01-02 Thread Finn Thain
On Sat, 29 Dec 2018, I wrote: > On Fri, 28 Dec 2018, LEROY Christophe wrote: > > > > --- a/drivers/char/nvram.c > > > +++ b/drivers/char/nvram.c > > > @@ -21,13 +21,6 @@ > > > * ioctl(NVRAM_SETCKS) (doesn't change contents, just makes checksum > > > valid > > > * again; use with care!) > >

Re: [PATCH v8 18/25] powerpc: Implement nvram sync ioctl

2019-01-02 Thread Finn Thain
On Tue, 1 Jan 2019, I wrote: > > There are no [nvram] ioctls common to all architectures. So your example > becomes, > > static long nvram_misc_ioctl(struct file *file, unsigned int cmd, > unsigned long arg) > { > if (ops->ioctl) > return

Re: [PATCH v8 24/25] powerpc: Adopt nvram module for PPC64

2018-12-31 Thread Finn Thain
On Mon, 31 Dec 2018, Arnd Bergmann wrote: > On Sun, Dec 30, 2018 at 4:29 AM Finn Thain wrote: > > > > On Sat, 29 Dec 2018, Arnd Bergmann wrote: > > > > > On Wed, Dec 26, 2018 at 1:43 AM Finn Thain > > > wrote: > > >

Re: [PATCH v8 20/25] powerpc, fbdev: Use arch_nvram_ops methods instead of nvram_read_byte() and nvram_write_byte()

2018-12-31 Thread Finn Thain
On Mon, 31 Dec 2018, Arnd Bergmann wrote: > On Sun, Dec 30, 2018 at 12:43 AM Finn Thain > wrote: > > > > > Is there some benefit, or is that just personal taste? > > > > Avoiding changes to call sites avoids code review, but I think 1) the > > thinkpad_

Re: [PATCH v8 18/25] powerpc: Implement nvram sync ioctl

2018-12-31 Thread Finn Thain
On Mon, 31 Dec 2018, Arnd Bergmann wrote: > On Sun, Dec 30, 2018 at 8:25 AM Finn Thain wrote: > > > > On Sat, 29 Dec 2018, Arnd Bergmann wrote: > > > > > > --- a/drivers/char/nvram.c > > > > +++ b/drivers/char/nvram.c > > > >

Re: [PATCH v8 00/25] Re-use nvram module

2018-12-31 Thread Finn Thain
On Sun, 30 Dec 2018, I wrote: > > The rationale for the ops struct was that it offers introspection. > > [...] those platforms which need checksum validation always set > byte-at-a-time methods to NULL. > > [...] The NULL methods in the ops struct allow the nvram.c misc device > to avoid

[PATCH] block/swim3: Fix regression on PowerBook G3

2018-12-30 Thread Finn Thain
e left mediabay floppy (fd1) is not a regression. I don't know why it happens. The right media bay floppy (fd0) works fine however. Reported-and-tested-by: Stan Johnson Fixes: 8ccb8cb1892b ("swim3: convert to blk-mq") Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Finn Thain --- driv

[PATCH] block/swim3: Remove dead return statement

2018-12-30 Thread Finn Thain
Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Finn Thain --- drivers/block/swim3.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c index c1c676a33e4a..ba1190f1276b 100644 --- a/drivers/block/swim3.c +++ b/drivers/block/swim3.c @@ -1151,7

[PATCH] block/swim3: Fix -EBUSY error when re-opening device after unmount

2018-12-30 Thread Finn Thain
3f4 ("Linux-2.6.12-rc2") Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Finn Thain --- drivers/block/swim3.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c index ba1190f1276b..87ca8f207c7c 100644 --- a/drivers/block/

Re: [PATCH v8 18/25] powerpc: Implement nvram sync ioctl

2018-12-30 Thread Finn Thain
On Sun, 30 Dec 2018, Finn Thain wrote: > > > diff --git a/include/linux/nvram.h b/include/linux/nvram.h > > > index b7bfaec60a43..24a57675dba1 100644 > > > --- a/include/linux/nvram.h > > > +++ b/include/linux/nvram.h > > > @@ -18,8 +18,12 @@ s

Re: [PATCH v8 01/25] scsi/atari_scsi: Don't select CONFIG_NVRAM

2018-12-30 Thread Finn Thain
On Mon, 31 Dec 2018, Finn Thain wrote: > On Sun, 30 Dec 2018, James Bottomley wrote: > > > > > That said, as has been pointed out, the current #ifdef has a failing > > corner case when both are modular (because the code should then be > > included). The runtime

Re: [PATCH v8 13/25] m68k: Dispatch nvram_ops calls to Atari or Mac functions

2018-12-30 Thread Finn Thain
On Sun, 30 Dec 2018, LEROY Christophe wrote: > > > > > > Since the operations are almost entirely distinct, why not have two > > > separate 'nvram_ops' instances here that each refer to just the set > > > they actually need? > > > > > > > The reason for that is that I am alergic to code

  1   2   3   4   5   >