Coding FATX support for 2.6

2007-09-23 Thread Hector Martin
want to cause a regression. However, much of the code (allocation strategies, FAT handling, etc) should be the same or very similar, so it seems stupid to start from scratch. Comments? -- Hector Martin ([EMAIL PROTECTED]) Public Key: http://www.marcansoft.com/marcan.asc - To unsubscribe from

Re: Coding FATX support for 2.6

2007-09-23 Thread Hector Martin
Diego Calleja wrote: FUSE could be an acceptable solution. Not really. Booting Xbox-Linux from an image file on a FATX partition is common. I don't think FUSE would work very well there. -- Hector Martin ([EMAIL PROTECTED]) Public Key: http://www.marcansoft.com/marcan.asc - To unsubscribe

Re: [PATCH] usb: serial: Perform verification for FTDI FT232R devices

2014-10-23 Thread Hector Martin
]); + write_eeprom(port, eeprom_size - 1, checksum); This will correctly set the Vendor ID to zero on all devices, counterfeit or not. -- Hector Martin (hec...@marcansoft.com) Public Key: http://www.marcansoft.com/marcan.asc -- To unsubscribe from this list: send the line unsubscribe linux-kernel

Re: [PATCH] usb: serial: Perform verification for FTDI FT232R devices

2014-10-23 Thread Hector Martin
On 23/10/14 23:14, Russ Dill wrote: On Thu, Oct 23, 2014 at 5:44 AM, Hector Martin hec...@marcansoft.com wrote: + write_eeprom(port, 0, eeprom_data[0]); + write_eeprom(port, 1, 0); + write_eeprom(port, eeprom_size - 2, eeprom_data[eeprom_size - 2]); + write_eeprom(port

Re: [PATCH v1 1/3] Add the latent_entropy gcc plugin

2016-05-29 Thread Hector Martin
r not. (Also, don't some arches link against libgcc, further complicating this? Trying to use this compiler plugin with those arches would wind up with non-redistributable kernels, this time due to the exception.) -- Hector Martin (mar...@marcan.st) Public Key: https://marcan.st/marcan.asc

[PATCH 1/2] usb: option: add D-Link DWM-222 device ID

2017-08-01 Thread Hector Martin
Cc: sta...@vger.kernel.org Signed-off-by: Hector Martin <mar...@marcan.st> --- drivers/usb/serial/option.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index ebe51f11105d..fe123153b1a5 100644 --- a/drivers/usb/serial/op

[PATCH 2/2] usb: qmi_wwan: add D-Link DWM-222 device ID

2017-08-01 Thread Hector Martin
Cc: sta...@vger.kernel.org Signed-off-by: Hector Martin <mar...@marcan.st> --- drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index 5894e3c9468f..ff6f39fe6c00 100644 --- a/drivers/net/usb/qmi_wwan.c

[PATCH] firewire-ohci: work around oversized DMA reads on JMicron controllers

2017-11-03 Thread Hector Martin
to do unconditionally for controllers in case others have the same behavior. Signed-off-by: Hector Martin <mar...@marcan.st> --- drivers/firewire/ohci.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index 8bf892

Coding FATX support for 2.6

2007-09-23 Thread Hector Martin
want to cause a regression. However, much of the code (allocation strategies, FAT handling, etc) should be the same or very similar, so it seems stupid to start from scratch. Comments? -- Hector Martin ([EMAIL PROTECTED]) Public Key: http://www.marcansoft.com/marcan.asc - To unsubscribe from

Re: Coding FATX support for 2.6

2007-09-23 Thread Hector Martin
Diego Calleja wrote: > FUSE could be an acceptable solution. Not really. Booting Xbox-Linux from an image file on a FATX partition is common. I don't think FUSE would work very well there. -- Hector Martin ([EMAIL PROTECTED]) Public Key: http://www.marcansoft.com/marcan.asc - To unsubscr

[PATCH 1/2] usb: option: add D-Link DWM-222 device ID

2017-08-01 Thread Hector Martin
Cc: sta...@vger.kernel.org Signed-off-by: Hector Martin --- drivers/usb/serial/option.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index ebe51f11105d..fe123153b1a5 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb

[PATCH 2/2] usb: qmi_wwan: add D-Link DWM-222 device ID

2017-08-01 Thread Hector Martin
Cc: sta...@vger.kernel.org Signed-off-by: Hector Martin --- drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index 5894e3c9468f..ff6f39fe6c00 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb

[PATCH] firewire-ohci: work around oversized DMA reads on JMicron controllers

2017-11-03 Thread Hector Martin
to do unconditionally for controllers in case others have the same behavior. Signed-off-by: Hector Martin --- drivers/firewire/ohci.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index 8bf89267dc25..d731b413cb2c 100644

Re: [PATCH v2] usb: serial: Repair FTDI FT232R bricked eeprom

2020-09-10 Thread Hector Martin
uses this particular function. Pretty sure other drivers are littered with stuff like this too, hardware manufacturers love to reinvent checksums. -- Hector Martin (hec...@marcansoft.com) Public Key: https://mrcn.st/pub

Re: [PATCH v2] usb: serial: Repair FTDI FT232R bricked eeprom

2020-09-10 Thread Hector Martin
a device manager, just poll for the VID 0 device too and apply the fix. I can't think of a scenario where this would be difficult to fix in userspace... -- Hector Martin (hec...@marcansoft.com) Public Key: https://mrcn.st/pub

Re: [PATCH v2] usb: serial: Repair FTDI FT232R bricked eeprom

2020-09-10 Thread Hector Martin
control requests even to devices bound to drivers). Even if it is necessary to unbind it, though, libusb already provides a single function to do that (libusb_detach_kernel_driver). -- Hector Martin (hec...@marcansoft.com) Public Key: https://mrcn.st/pub

Re: [PATCH] usb: serial: Perform verification for FTDI FT232R devices

2014-10-23 Thread Hector Martin
eeprom_data[eeprom_size - 2]); + write_eeprom(port, eeprom_size - 1, checksum); This will correctly set the Vendor ID to zero on all devices, counterfeit or not. -- Hector Martin (hec...@marcansoft.com) Public Key: http://www.marcansoft.com/marcan.asc -- To unsubscribe from this list: send

Re: [PATCH] usb: serial: Perform verification for FTDI FT232R devices

2014-10-23 Thread Hector Martin
On 23/10/14 23:14, Russ Dill wrote: > On Thu, Oct 23, 2014 at 5:44 AM, Hector Martin wrote: >> + write_eeprom(port, 0, eeprom_data[0]); >> + write_eeprom(port, 1, 0); >> + write_eeprom(port, eeprom_size - 2, eeprom_data[eeprom_size - 2]); >>

Re: [PATCH v1 1/3] Add the latent_entropy gcc plugin

2016-05-29 Thread Hector Martin
to use this compiler plugin with those arches would wind up with non-redistributable kernels, this time due to the exception.) -- Hector Martin (mar...@marcan.st) Public Key: https://marcan.st/marcan.asc

Re: [PATCH 18/18] arm64: apple: Add initial Mac Mini 2020 (M1) devicetree

2021-02-08 Thread Hector Martin
On 08/02/2021 21.40, Arnd Bergmann wrote: On Mon, Feb 8, 2021 at 1:13 PM Krzysztof Kozlowski wrote: On Mon, Feb 08, 2021 at 08:56:53PM +0900, Hector Martin 'marcan' wrote: On 08/02/2021 20.04, Krzysztof Kozlowski wrote: apple Don't make things different for this one platform (comparing

Re: [PATCH 08/18] arm64: cpufeature: Add a feature for FIQ support

2021-02-08 Thread Hector Martin
of programmable priority, the lack of convenient masking for per-CPU interrupts is a bit of an issue... Yeah... we'll see how that goes. -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH 05/18] tty: serial: samsung_tty: add support for Apple UARTs

2021-02-08 Thread Hector Martin
on all the other comments, I'll make the changes for v2. -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH 18/18] arm64: apple: Add initial Mac Mini 2020 (M1) devicetree

2021-02-08 Thread Hector Martin
s it's worth describing it in the binding and dts, even if the driver never selects it...? -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH 15/18] irqchip/apple-aic: Add support for the Apple Interrupt Controller

2021-02-08 Thread Hector Martin
On 08/02/2021 20.36, Marc Zyngier wrote: On Mon, 08 Feb 2021 10:29:23 +, Arnd Bergmann wrote: On Mon, Feb 8, 2021 at 10:25 AM Marc Zyngier wrote: On Thu, 04 Feb 2021 20:39:48 +, Hector Martin wrote: +{ + return readl(ic->base + reg); Please consider using the _rela

Re: [PATCH 11/18] arm64: Kconfig: Require FIQ support for ARCH_APPLE

2021-02-08 Thread Hector Martin
le system, and not having interrupts is one thing that makes it really hard to debug... Sounds good, I'll flip it over. -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH 05/18] tty: serial: samsung_tty: add support for Apple UARTs

2021-02-08 Thread Hector Martin
yet, and they went through a mailing list? It's probably time to set that up... Either way, certainly not for Apple SoCs; I'll get rid of IRQF_SHARED for v2. Please send a v2 after fixing issues pointed out by kbuild. Will do, already have those fixed in my WIP tree. -- Hector Martin (mar

Re: [PATCH 05/18] tty: serial: samsung_tty: add support for Apple UARTs

2021-02-08 Thread Hector Martin
On 08/02/2021 19.34, Marc Zyngier wrote: On 2021-02-07 09:12, Hector Martin 'marcan' wrote: On 06/02/2021 22.15, Marc Zyngier wrote: Do you actually need a new port type here? Looking at the driver itself, it is mainly used to work out the IRQ model. Maybe introducing a new irq_type field

Re: [PATCH 10/18] arm64: Introduce FIQ support

2021-02-08 Thread Hector Martin
issuing an isb, makes me think all this FIQ stuff is seriously deeply tied into the instruction pipeline. It's probably not an IRQ line any more... -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH 15/18] irqchip/apple-aic: Add support for the Apple Interrupt Controller

2021-02-08 Thread Hector Martin
e was one of those clang-format things :-). I'll fix it and watch out for similar things. + for (i = 0; i < BITS_TO_LONGS(irqc->nr_hw); i++) long is 64bit on arm64, so this loop is unlikely to do what you want. Consider using BITS_TO_U32. Ha, nice catch. Thanks! -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH 01/18] dt-bindings: vendor-prefixes: add AAPL prefix

2021-02-08 Thread Hector Martin
On 09/02/2021 03.12, Krzysztof Kozlowski wrote: Mentioned grep brings only one result: arch/powerpc/platforms/powermac/pic.c: * cases where the APPL,interrupts property is completely You want to grep for 'AAPL', not 'APPL' :-) -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st

Re: [PATCH 05/18] tty: serial: samsung_tty: add support for Apple UARTs

2021-02-08 Thread Hector Martin
inter. Still during s3c24xx_serial_probe() correct ops would have to be assigned, but at least all ops are easily visible. Roger, will do this for v2. -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH 05/18] tty: serial: samsung_tty: add support for Apple UARTs

2021-02-08 Thread Hector Martin
code in there that cares about the uapi-visible port type (other than setting it correctly for those that do exist, to maintain current behavior), and just make everything else use PORT_8250 for that? -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH 18/18] arm64: apple: Add initial Mac Mini 2020 (M1) devicetree

2021-02-08 Thread Hector Martin
bring-up, until things calm down a bit and we have real users who would complain :) (not that I won't try to avoid it). -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH 13/18] arm64: ioremap: use nGnRnE mappings on platforms that require it

2021-02-08 Thread Hector Martin
block nGnRE everywhere except in those ranges (i.e. the nGnRnE fault takes precedence over other errors, like the address not existing at all). -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH 18/18] arm64: apple: Add initial Mac Mini 2020 (M1) devicetree

2021-02-08 Thread Hector Martin
or something to be avoided. If this is intended to be kept in sync and be fully comprehensive, I might as well start planning out our longer term DT maintenance strategy around that (which might involve using that tree in our bootloader). -- Hector Martin (mar...@marcan.st) Public Key: https

Re: [PATCH 13/18] arm64: ioremap: use nGnRnE mappings on platforms that require it

2021-02-09 Thread Hector Martin
through devm_ioremap_resource() or similar. This sounds reasonable. For setting such a flag, I guess looking for a property (inherited from parents) would make sense. `mmio-map-mode = "nonposted"` or something like that? -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH 18/18] arm64: apple: Add initial Mac Mini 2020 (M1) devicetree

2021-02-10 Thread Hector Martin
On 10/02/2021 19.19, Tony Lindgren wrote: * Hector Martin 'marcan' [210208 12:05]: On 08/02/2021 20.04, Krzysztof Kozlowski wrote: ... + clk24: clk24 { Just "clock". Node names should be generic. Really? Almost every other device device tree uses unique clock node nam

Re: [PATCH 13/18] arm64: ioremap: use nGnRnE mappings on platforms that require it

2021-02-10 Thread Hector Martin
arm64's ioremap look up the address in a structure populated from this. As an additional wrinkle, earlycon is almost certainly going to need a special path to handle this very early, before OF stuff is available; it also uses fixmap instead of ioremap, which has its own idea about what type of mapping to use. -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH 18/18] arm64: apple: Add initial Mac Mini 2020 (M1) devicetree

2021-02-10 Thread Hector Martin
as a property instead of creating a fake clock. In our case it's an existing driver (with patches) that is already integrated with the clock infrastructure, so it makes sense to use a fixed-clock instead of just an ad-hoc property. -- Hector Martin (mar...@marcan.st) Public Key: https

Re: [PATCH 18/18] arm64: apple: Add initial Mac Mini 2020 (M1) devicetree

2021-02-10 Thread Hector Martin
On 10/02/2021 20.34, Tony Lindgren wrote: * Hector Martin [210210 11:14]: That means it'll end up like this (so that we can have more than one fixed-clock): clocks { #address-cells = <1>; #size-cells = <0>; clk123: clock@0 { ... reg = <0>

Re: [RFT PATCH v3 16/27] irqchip/apple-aic: Add support for the Apple Interrupt Controller

2021-03-26 Thread Hector Martin
int cpu; + + if (hwirq > ic->nr_hw) >= ? Good catch, but this is actually obsolete. Higher IRQs go into the FIQ irqchip, so this should never happen (it's a leftover from when they were a single one). I'll remove it. Ack on the other comments, thanks! -- Hector Martin (mar..

Re: [RFT PATCH v3 08/27] asm-generic/io.h: Add a non-posted variant of ioremap()

2021-03-25 Thread Hector Martin
() on 32-bit as well, and I would keep that separate from this series. Sounds good; I'm adding a patch to adjust the generic implementation and remove the arm64 one in v4, and we can then complete the cleanup for other arches later. -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st

Re: [RFT PATCH v3 13/27] arm64: Add Apple vendor-specific system registers

2021-03-26 Thread Hector Martin
it shouldn't be a big deal to refactor it all into one file again. -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [RFT PATCH v3 16/27] irqchip/apple-aic: Add support for the Apple Interrupt Controller

2021-04-01 Thread Hector Martin
e hardware, and hope for the best :-) Thanks, -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

[PATCH v4 18/18] arm64: apple: Add initial Apple Mac mini (M1, 2020) devicetree

2021-04-02 Thread Hector Martin
This currently supports: * SMP (via spin-tables) * AIC IRQs * Serial (with earlycon) * Framebuffer A number of properties are dynamic, and based on system firmware decisions that vary from version to version. These are expected to be filled in by the loader. Signed-off-by: Hector Martin

[PATCH v4 17/18] dt-bindings: display: Add apple,simple-framebuffer

2021-04-02 Thread Hector Martin
Apple SoCs run firmware that sets up a simplefb-compatible framebuffer for us. Add a compatible for it, and two missing supported formats. Reviewed-by: Rob Herring Reviewed-by: Linus Walleij Signed-off-by: Hector Martin --- .../devicetree/bindings/display/simple-framebuffer.yaml | 5

[PATCH v4 13/18] arm64: Move ICH_ sysreg bits from arm-gic-v3.h to sysreg.h

2021-04-02 Thread Hector Martin
These definitions are in arm-gic-v3.h for historical reasons which no longer apply. Move them to sysreg.h so the AIC driver can use them, as it needs to peek into vGIC registers to deal with the GIC maintentance interrupt. Acked-by: Marc Zyngier Acked-by: Will Deacon Signed-off-by: Hector

[PATCH v4 15/18] irqchip/apple-aic: Add support for the Apple Interrupt Controller

2021-04-02 Thread Hector Martin
). * Implements a virtual IPI multiplexer to funnel multiple Linux IPIs into a single hardware IPI Signed-off-by: Hector Martin --- MAINTAINERS | 2 + drivers/irqchip/Kconfig | 8 + drivers/irqchip/Makefile| 1 + drivers/irqchip/irq-apple-aic.c | 837

[PATCH v4 14/18] dt-bindings: interrupt-controller: Add DT bindings for apple-aic

2021-04-02 Thread Hector Martin
AIC is the Apple Interrupt Controller found on Apple ARM SoCs, such as the M1. Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Hector Martin --- .../interrupt-controller/apple,aic.yaml | 88 +++ MAINTAINERS | 1

[PATCH v4 07/18] asm-generic/io.h: Add a non-posted variant of ioremap()

2021-04-02 Thread Hector Martin
Signed-off-by: Hector Martin --- .../driver-api/driver-model/devres.rst| 1 + arch/sparc/include/asm/io_64.h| 4 include/asm-generic/io.h | 22 ++- include/asm-generic/iomap.h | 9 include/linux/io.h

[PATCH v4 08/18] docs: driver-api: device-io: Document I/O access functions

2021-04-02 Thread Hector Martin
From: Arnd Bergmann This adds more detailed descriptions of the various read/write primitives available for use with I/O memory/ports. Reviewed-by: Linus Walleij Signed-off-by: Arnd Bergmann Signed-off-by: Hector Martin --- Documentation/driver-api/device-io.rst | 138

[PATCH v4 09/18] docs: driver-api: device-io: Document ioremap() variants & access funcs

2021-04-02 Thread Hector Martin
This documents the newly introduced ioremap_np() along with all the other common ioremap() variants, and some higher-level abstractions available. Reviewed-by: Linus Walleij Signed-off-by: Hector Martin --- Documentation/driver-api/device-io.rst | 218 + 1 file changed

[PATCH v4 16/18] arm64: Kconfig: Introduce CONFIG_ARCH_APPLE

2021-04-02 Thread Hector Martin
This adds a Kconfig option to toggle support for Apple ARM SoCs. At this time this targets the M1 and later "Apple Silicon" Mac SoCs. Signed-off-by: Hector Martin --- arch/arm64/Kconfig.platforms | 7 +++ arch/arm64/configs/defconfig | 1 + 2 files changed, 8 insertions(+)

[PATCH v4 12/18] of/address: Add infrastructure to declare MMIO as non-posted

2021-04-02 Thread Hector Martin
that support Apple ARM platforms, as an optimization. Reviewed-by: Linus Walleij Signed-off-by: Hector Martin --- drivers/of/address.c | 43 -- include/linux/of_address.h | 1 + 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/drivers/of/address.c

[PATCH v4 11/18] asm-generic/io.h: implement pci_remap_cfgspace using ioremap_np

2021-04-02 Thread Hector Martin
the generic pci_remap_cfgspace() unconditional. Signed-off-by: Hector Martin --- arch/arm64/include/asm/io.h | 10 -- include/linux/io.h | 21 + 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm

[PATCH v4 10/18] arm64: Implement ioremap_np() to map MMIO as nGnRnE

2021-04-02 Thread Hector Martin
This is used on Apple ARM platforms, which require most MMIO (except PCI devices) to be mapped as nGnRnE. Acked-by: Marc Zyngier Acked-by: Will Deacon Signed-off-by: Hector Martin --- arch/arm64/include/asm/io.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/include/asm/io.h b

[PATCH v4 00/18] Apple M1 SoC platform bring-up

2021-04-02 Thread Hector Martin
of ioremap_np() and removed arch-specific pci_remap_cfgspace override for arm64 (arm32 can come later) * Replaced license in AIC bindings header with GPL-2.0+ OR MIT * Other minor typo/style fixes Arnd Bergmann (1): docs: driver-api: device-io: Document I/O access functions Hector Martin (17):

[PATCH v4 02/18] dt-bindings: arm: apple: Add bindings for Apple ARM platforms

2021-04-02 Thread Hector Martin
This introduces bindings for all three 2020 Apple M1 devices: * apple,j274 - Mac mini (M1, 2020) * apple,j293 - MacBook Pro (13-inch, M1, 2020) * apple,j313 - MacBook Air (M1, 2020) Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Hector Martin --- .../devicetree/bindings

[PATCH v4 06/18] arm64: arch_timer: Implement support for interrupt-names

2021-04-02 Thread Hector Martin
Reviewed-by: Linus Walleij Reviewed-by: Marc Zyngier Signed-off-by: Hector Martin --- drivers/clocksource/arm_arch_timer.c | 24 +--- include/clocksource/arm_arch_timer.h | 1 + 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/drivers/clocksource

[PATCH v4 01/18] dt-bindings: vendor-prefixes: Add apple prefix

2021-04-02 Thread Hector Martin
This is different from the legacy AAPL prefix used on PPC, but consensus is that we prefer `apple` for these new platforms. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Hector Martin --- Documentation/devicetree/bindings/vendor

[PATCH v4 03/18] dt-bindings: arm: cpus: Add apple,firestorm & icestorm compatibles

2021-04-02 Thread Hector Martin
These are the CPU cores in the "Apple Silicon" M1 SoC. Reviewed-by: Rob Herring Signed-off-by: Hector Martin --- Documentation/devicetree/bindings/arm/cpus.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/cpus.yaml b/Documentation/

[PATCH v4 04/18] arm64: cputype: Add CPU implementor & types for the Apple M1 cores

2021-04-02 Thread Hector Martin
The implementor will be used to condition the FIQ support quirk. The specific CPU types are not used at the moment, but let's add them for documentation purposes. Acked-by: Will Deacon Signed-off-by: Hector Martin --- arch/arm64/include/asm/cputype.h | 6 ++ 1 file changed, 6 insertions

[PATCH v4 05/18] dt-bindings: timer: arm,arch_timer: Add interrupt-names support

2021-04-02 Thread Hector Martin
code can pick the right one. This also adds the hyp-virt timer/interrupt, which was previously not expressed in the fixed 4-interrupt form. Reviewed-by: Linus Walleij Acked-by: Marc Zyngier Reviewed-by: Tony Lindgren Signed-off-by: Hector Martin --- .../bindings/timer/arm,arch_timer.yaml

Re: [PATCH v4 15/18] irqchip/apple-aic: Add support for the Apple Interrupt Controller

2021-04-06 Thread Hector Martin
On 07/04/2021 03.16, Marc Zyngier wrote: Hi Hector, On Fri, 02 Apr 2021 10:05:39 +0100, Hector Martin wrote: + /* +* In EL1 the non-redirected registers are the guest's, +* not EL2's, so remap the hwirqs to match

Re: [RFT PATCH v3 01/27] arm64: Cope with CPUs stuck in VHE mode

2021-03-26 Thread Hector Martin
WARN. -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [RFT PATCH v3 16/27] irqchip/apple-aic: Add support for the Apple Interrupt Controller

2021-03-26 Thread Hector Martin
the writel_relaxed() on AIC_IPI_FLAG. On ARM it turns out it's not quite fully ordered, but the acquire semantics of the read half are sufficient for this case, as they guarantee the flags are always read after the FIQ has been ACKed. Cheeers, -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [RFT PATCH v3 16/27] irqchip/apple-aic: Add support for the Apple Interrupt Controller

2021-03-26 Thread Hector Martin
o do its own masking behind the scenes anyway Since you're using the masking in KVM after all, I'm tracking the mask state in a percpu variable now. Also folded in your two minor bugfixes from the KVM series. Cheers! -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH v4 12/18] of/address: Add infrastructure to declare MMIO as non-posted

2021-04-06 Thread Hector Martin
for pointing it out. With that, Reviewed-by: Rob Herring Thanks! -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [RFT PATCH v3 12/27] of/address: Add infrastructure to declare MMIO as non-posted

2021-03-11 Thread Hector Martin
On 11/03/2021 18.12, Arnd Bergmann wrote: On Wed, Mar 10, 2021 at 6:01 PM Rob Herring wrote: On Wed, Mar 10, 2021 at 1:27 AM Hector Martin wrote: On 10/03/2021 07.06, Rob Herring wrote: My main concern here is that this creates an inconsistency in the device tree representation that only

Re: [RFC PATCH 1/5] rpmb: add Replay Protected Memory Block (RPMB) subsystem

2021-03-10 Thread Hector Martin
On 10/03/2021 14.14, Sumit Garg wrote: On Wed, 10 Mar 2021 at 02:47, Hector Martin wrote: On 09/03/2021 01.20, Linus Walleij wrote: I suppose it would be a bit brutal if the kernel would just go in and appropriate any empty RPMB it finds, but I suspect it is the right way to make use

Re: [RFT PATCH v3 12/27] of/address: Add infrastructure to declare MMIO as non-posted

2021-03-10 Thread Hector Martin
ve. Do you think we can get rid of the Apple-only optimization if we do this? It would mean only looking at the parent during address resolution, not recursing all the way to the top, so presumably the performance impact would be quite minimal. -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [RFC PATCH 1/5] rpmb: add Replay Protected Memory Block (RPMB) subsystem

2021-03-11 Thread Hector Martin
ell, just do something else with RPMB because it's better than nothing"; just doing "something" doesn't make systems more secure. There needs to be a specific, practical use case that we'd be trying to solve with RPMB here. -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [RFC PATCH 1/5] rpmb: add Replay Protected Memory Block (RPMB) subsystem

2021-03-11 Thread Hector Martin
own secure system with anti-rollback for retry counters, you should be heading in that directly anyway. And now Linux's RPMB code is useless because you're running the stack in the secure monitor instead :-) -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [RFC PATCH 1/5] rpmb: add Replay Protected Memory Block (RPMB) subsystem

2021-03-10 Thread Hector Martin
and available to any attacker. So unless the kernel grows a subsystem/feature to enforce complex key policies (with things like use counts, retry times, etc), I don't think there's a place to integrate RPMB kernel-side. You still need a trusted userspace tool to glue it all together. -- Hector

Re: [RFC PATCH 1/5] rpmb: add Replay Protected Memory Block (RPMB) subsystem

2021-03-09 Thread Hector Martin
or such, but rather a way to prevent these attacks. -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [RFT PATCH v3 06/27] dt-bindings: timer: arm,arch_timer: Add interrupt-names support

2021-03-09 Thread Hector Martin
On 10/03/2021 01.11, Rob Herring wrote: On Mon, Mar 8, 2021 at 3:42 PM Marc Zyngier wrote: On Mon, 08 Mar 2021 20:38:41 +, Rob Herring wrote: On Fri, Mar 05, 2021 at 06:38:41AM +0900, Hector Martin wrote: Not all platforms provide the same set of timers/interrupts, and Linux only

Re: [RFT PATCH v3 26/27] dt-bindings: display: Add apple,simple-framebuffer

2021-03-09 Thread Hector Martin
On 10/03/2021 01.37, Linus Walleij wrote: On Thu, Mar 4, 2021 at 10:42 PM Hector Martin wrote: Apple SoCs run firmware that sets up a simplefb-compatible framebuffer for us. Add a compatible for it, and two missing supported formats. Signed-off-by: Hector Martin Reviewed-by: Linus Walleij

Re: [RFT PATCH v3 12/27] of/address: Add infrastructure to declare MMIO as non-posted

2021-03-09 Thread Hector Martin
the actual PCIe ops will end up posted at the bus anyway)... how do we represent that? Declare that another "nonposted-mmio" on the PCIe bus means "no, really, use nonposted mmio for this"? -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [RFT PATCH v3 10/27] docs: driver-api: device-io: Document ioremap() variants & access funcs

2021-03-09 Thread Hector Martin
On 06/03/2021 00.51, Arnd Bergmann wrote: On Fri, Mar 5, 2021 at 4:09 PM Andy Shevchenko wrote: On Fri, Mar 5, 2021 at 12:25 PM Linus Walleij wrote: On Thu, Mar 4, 2021 at 10:40 PM Hector Martin wrote: This documents the newly introduced ioremap_np() along with all the other common

Re: [RFT PATCH v3 17/27] arm64: Kconfig: Introduce CONFIG_ARCH_APPLE

2021-03-09 Thread Hector Martin
On 09/03/2021 00.35, Marc Zyngier wrote: On Thu, 04 Mar 2021 21:38:52 +, Hector Martin wrote: This adds a Kconfig option to toggle support for Apple ARM SoCs. At this time this targets the M1 and later "Apple Silicon" Mac SoCs. Signed-off-by: Hector Martin ---

Re: [RFC PATCH 1/5] rpmb: add Replay Protected Memory Block (RPMB) subsystem

2021-03-11 Thread Hector Martin
provisioning model assumes a typical OEM device production pipeline and integration with CPU fusing; it isn't friendly to Linux hackers messing around with securing LUKS unlock attempt counters. -- Hector Martin (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [RFC PATCH 1/5] rpmb: add Replay Protected Memory Block (RPMB) subsystem

2021-03-11 Thread Hector Martin
r way past screen locks and passwords. Such devices exist, sadly. If you're trying to protect against a "dumb" attack with a keyboard emulator that doesn't consider access to physical storage, then you don't need RPMB either; you can just put the PIN unlock counter in a random file. -

Re: [PATCH v2 00/25] Apple M1 SoC platform bring-up

2021-02-24 Thread Hector Martin
On 22/02/2021 00.20, Hector Martin wrote: I haven't tested things at EL0 yet, but it looks like the stateful instructions known to be usable in EL0 (AMX) already default to trap on this platform, so we should be safe there. Everything else looks like it probably either shouldn't work in EL0 (I

[RFT PATCH v3 27/27] arm64: apple: Add initial Apple Mac mini (M1, 2020) devicetree

2021-03-04 Thread Hector Martin
This currently supports: * SMP (via spin-tables) * AIC IRQs * Serial (with earlycon) * Framebuffer A number of properties are dynamic, and based on system firmware decisions that vary from version to version. These are expected to be filled in by the loader. Signed-off-by: Hector Martin

[RFT PATCH v3 24/27] tty: serial: samsung_tty: Add support for Apple UARTs

2021-03-04 Thread Hector Martin
the FIFO with data directly. Signed-off-by: Hector Martin --- drivers/tty/serial/Kconfig | 2 +- drivers/tty/serial/samsung_tty.c | 238 +-- include/linux/serial_s3c.h | 16 +++ 3 files changed, 247 insertions(+), 9 deletions(-) diff --git a/drivers

[RFT PATCH v3 26/27] dt-bindings: display: Add apple,simple-framebuffer

2021-03-04 Thread Hector Martin
Apple SoCs run firmware that sets up a simplefb-compatible framebuffer for us. Add a compatible for it, and two missing supported formats. Signed-off-by: Hector Martin --- .../devicetree/bindings/display/simple-framebuffer.yaml | 5 + 1 file changed, 5 insertions(+) diff --git

[RFT PATCH v3 25/27] tty: serial: samsung_tty: Add earlycon support for Apple UARTs

2021-03-04 Thread Hector Martin
, it makes more sense to do it here in the UART driver instead of introducing a whole fdt nonposted-mmio resolver just for earlycon/fixmap. Suggested-by: Arnd Bergmann Signed-off-by: Hector Martin --- drivers/tty/serial/samsung_tty.c | 17 + 1 file changed, 17 insertions(+) diff

[RFT PATCH v3 22/27] tty: serial: samsung_tty: Use devm_ioremap_resource

2021-03-04 Thread Hector Martin
This picks up the non-posted I/O mode needed for Apple platforms to work properly. This removes the request/release functions, which are no longer necessary, since devm_ioremap_resource takes care of that already. Most other drivers already do it this way, anyway. Signed-off-by: Hector Martin

[RFT PATCH v3 18/27] tty: serial: samsung_tty: Separate S3C64XX ops structure

2021-03-04 Thread Hector Martin
; this avoids excessive branching control flow and mirrors s3c64xx_serial_startup. tx_claimed and rx_claimed are only used in the S3C24XX functions. Signed-off-by: Hector Martin --- drivers/tty/serial/samsung_tty.c | 71 1 file changed, 54 insertions(+), 17 deletions

[RFT PATCH v3 19/27] tty: serial: samsung_tty: Add ucon_mask parameter

2021-03-04 Thread Hector Martin
This simplifies the code by removing the only distinction between the S3C2410 and S3C2440 codepaths. Signed-off-by: Hector Martin --- drivers/tty/serial/samsung_tty.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty

[RFT PATCH v3 17/27] arm64: Kconfig: Introduce CONFIG_ARCH_APPLE

2021-03-04 Thread Hector Martin
This adds a Kconfig option to toggle support for Apple ARM SoCs. At this time this targets the M1 and later "Apple Silicon" Mac SoCs. Signed-off-by: Hector Martin --- arch/arm64/Kconfig.platforms | 8 arch/arm64/configs/defconfig | 1 + 2 files changed, 9 insertions(+)

[RFT PATCH v3 23/27] dt-bindings: serial: samsung: Add apple,s5l-uart compatible

2021-03-04 Thread Hector Martin
Apple mobile devices originally used Samsung SoCs (starting with the S5L8900), and their current in-house SoCs continue to use compatible UART peripherals. We'll call this UART variant apple,s5l-uart. Signed-off-by: Hector Martin Reviewed-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij

[RFT PATCH v3 20/27] tty: serial: samsung_tty: Add s3c24xx_port_type

2021-03-04 Thread Hector Martin
This decouples the TTY layer PORT_ types, which are exposed to userspace, from the driver-internal flag of what kind of port this is. This removes s3c24xx_serial_has_interrupt_mask, which was just checking for a specific type anyway. Signed-off-by: Hector Martin --- drivers/tty/serial

[RFT PATCH v3 21/27] tty: serial: samsung_tty: IRQ rework

2021-03-04 Thread Hector Martin
held. * Rename s3c24xx_serial_rx_chars to s3c24xx_serial_rx_irq for consistency with the above. All it does now is call two other functions anyway. Signed-off-by: Hector Martin --- drivers/tty/serial/samsung_tty.c | 34 +++- 1 file changed, 20 insertions(+), 14

[RFT PATCH v3 16/27] irqchip/apple-aic: Add support for the Apple Interrupt Controller

2021-03-04 Thread Hector Martin
). * Implements a virtual IPI multiplexer to funnel multiple Linux IPIs into a single hardware IPI Signed-off-by: Hector Martin --- MAINTAINERS | 2 + drivers/irqchip/Kconfig | 8 + drivers/irqchip/Makefile| 1 + drivers/irqchip/irq-apple-aic.c | 710

[RFT PATCH v3 13/27] arm64: Add Apple vendor-specific system registers

2021-03-04 Thread Hector Martin
Apple ARM64 SoCs have a ton of vendor-specific registers we're going to have to deal with, and those don't really belong in sysreg.h with all the architectural registers. Make a new home for them, and add some registers which are useful for early bring-up. Signed-off-by: Hector Martin

[RFT PATCH v3 15/27] dt-bindings: interrupt-controller: Add DT bindings for apple-aic

2021-03-04 Thread Hector Martin
AIC is the Apple Interrupt Controller found on Apple ARM SoCs, such as the M1. Signed-off-by: Hector Martin Reviewed-by: Linus Walleij --- .../interrupt-controller/apple,aic.yaml | 88 +++ MAINTAINERS | 1 + .../interrupt-controller

[RFT PATCH v3 11/27] arm64: Implement ioremap_np() to map MMIO as nGnRnE

2021-03-04 Thread Hector Martin
This is used on Apple ARM platforms, which require most MMIO (except PCI devices) to be mapped as nGnRnE. Signed-off-by: Hector Martin --- arch/arm64/include/asm/io.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h index 5ea8656a2030

[RFT PATCH v3 03/27] dt-bindings: arm: apple: Add bindings for Apple ARM platforms

2021-03-04 Thread Hector Martin
This introduces bindings for all three 2020 Apple M1 devices: * apple,j274 - Mac mini (M1, 2020) * apple,j293 - MacBook Pro (13-inch, M1, 2020) * apple,j313 - MacBook Air (M1, 2020) Signed-off-by: Hector Martin --- .../devicetree/bindings/arm/apple.yaml| 64

[RFT PATCH v3 00/27] Apple M1 SoC platform bring-up

2021-03-04 Thread Hector Martin
ters to sysregs.h instead of including that in the AIC driver. * Added _EL1 suffixes to Apple sysregs. * Addressed further review comments and feedback. Arnd Bergmann (1): docs: driver-api: device-io: Document I/O access functions Hector Martin (25): dt-bindings: vendor-prefixes: Add apple prefix

  1   2   3   >