s390 patches for the 3.9-rc6
Subsystems (6)
Hi Linus,
please pull from the 'for-linus' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git for-linus
to receive the following updates: Just a bunch of bugfixes.
Heiko Carstens (4):
drivers/Kconfig: add several missing GENERIC_HARDIRQS dependencies s390/uaccess: fix clear_user_pt()
s390/uaccess: fix page table walk
s390/mm: provide emtpy check_pgt_cache() function
Martin Schwidefsky (1):
s390/3270: fix minor_start issue
Sebastian Ott (1):
s390/scm_block: fix printk format string
Wei Yongjun (1):
s390/scm_blk: fix error return code in scm_blk_init()
arch/s390/include/asm/pgtable.h | 4 +- arch/s390/lib/uaccess_pt.c | 83 ++++++++++++++++++++++++++------------- drivers/dma/Kconfig | 1 + drivers/media/platform/Kconfig | 2 +- drivers/s390/block/scm_blk.c | 11 ++++-- drivers/s390/block/scm_drv.c | 2 +- drivers/s390/char/tty3270.c | 16 ++++---- drivers/spi/Kconfig | 3 +- 8 files changed, 79 insertions(+), 43 deletions(-)
arch/s390/include/asm/pgtable.h +3 -1
@@ -344,6 +344,7 @@ extern unsigned long MODULES_END;#define _REGION3_ENTRY_CO 0x100/* change-recording override */ /* Bits in the segment table entry */ +#define _SEGMENT_ENTRY_ORIGIN_LARGE ~0xfffffUL/* large page address */ #define _SEGMENT_ENTRY_ORIGIN ~0x7ffUL/* segment table origin */ #define _SEGMENT_ENTRY_RO 0x200/* page protection bit */ #define _SEGMENT_ENTRY_INV 0x20/* invalid segment table entry */
@@ -1531,7 +1532,8 @@ extern int s390_enable_sie(void);/* * No page table caches to initialise */ -#define pgtable_cache_init () do { } while (0) +static inline void pgtable_cache_init (void ) { } +static inline void check_pgt_cache (void ) { }#include <asm-generic/pgtable.h>
arch/s390/lib/uaccess_pt.c +55 -28
104 lines not on this page · raw message
drivers/dma/Kconfig +1 -0
@@ -83,6 +83,7 @@ config INTEL_IOP_ADMA config DW_DMAC tristate "Synopsys DesignWare AHB DMA support" + depends on GENERIC_HARDIRQS select DMA_ENGINE default y if CPU_AT32AP7000 help
drivers/media/platform/Kconfig +1 -1
@@ -204,7 +204,7 @@ config VIDEO_SAMSUNG_EXYNOS_GSC config VIDEO_SH_VEU tristate "SuperH VEU mem2mem video processing driver" - depends on VIDEO_DEV && VIDEO_V4L2 + depends on VIDEO_DEV && VIDEO_V4L2 && GENERIC_HARDIRQS select VIDEOBUF2_DMA_CONTIG select V4L2_MEM2MEM_DEV help
drivers/s390/block/scm_blk.c +7 -4
@@ -307,7 +307,7 @@ static void scm_blk_handle_error(struct scm_request *scmrq)case EQC_WR_PROHIBIT :spin_lock_irqsave (&bdev->lock, flags);if (bdev->state !=SCM_WR_PROHIBIT ) -pr_info ("%lu: Write access to the SCM increment is suspended\n" , +pr_info ("%lx: Write access to the SCM increment is suspended\n" , (unsigned long ) bdev->scmdev->address); bdev->state =SCM_WR_PROHIBIT ;spin_unlock_irqrestore (&bdev->lock, flags);
@@ -445,7 +445,7 @@ void scm_blk_set_available(struct scm_blk_dev *bdev)spin_lock_irqsave (&bdev->lock, flags);if (bdev->state ==SCM_WR_PROHIBIT ) -pr_info ("%lu: Write access to the SCM increment is restored\n" , +pr_info ("%lx: Write access to the SCM increment is restored\n" , (unsigned long ) bdev->scmdev->address); bdev->state =SCM_OPER ;spin_unlock_irqrestore (&bdev->lock, flags);
@@ -463,12 +463,15 @@ static int __init scm_blk_init(void) goto out; scm_major = ret; -if (scm_alloc_rqs (nr_requests)) + ret =scm_alloc_rqs (nr_requests); +if (ret) goto out_unreg; scm_debug =debug_register ("scm_log" ,16 ,1 ,16 ); -if (!scm_debug) +if (!scm_debug) { + ret = -ENOMEM ; goto out_free; + }debug_register_view (scm_debug, &debug_hex_ascii_view);debug_set_level (scm_debug,2 );
drivers/s390/block/scm_drv.c +1 -1
@@ -19,7 +19,7 @@ static void scm_notify(struct scm_device *scmdev, enum scm_event event)switch (event) {case SCM_CHANGE : -pr_info ("%lu: The capabilities of the SCM increment changed\n" , +pr_info ("%lx: The capabilities of the SCM increment changed\n" , (unsigned long ) scmdev->address);SCM_LOG (2 ,"State changed" );SCM_LOG_STATE (2 , scmdev);
drivers/s390/char/tty3270.c +9 -7
@@ -915,7 +915,7 @@ static int tty3270_install(struct tty_driver *driver, struct tty_struct *tty)int i, rc;/* Check if the tty3270 is already there. */ - view =raw3270_find_view (&tty3270_fn, tty->index); + view =raw3270_find_view (&tty3270_fn, tty->index +RAW3270_FIRSTMINOR );if (!IS_ERR (view)) { tp = container_of(view, struct tty3270, view); tty->driver_data = tp;
@@ -927,15 +927,16 @@ static int tty3270_install(struct tty_driver *driver, struct tty_struct *tty) tp->inattr =TF_INPUT ;return tty_port_install (&tp->port, driver, tty); } -if (tty3270_max_index < tty->index) - tty3270_max_index = tty->index; +if (tty3270_max_index < tty->index +1 ) + tty3270_max_index = tty->index +1 ;/* Allocate tty3270 structure on first open. */ tp =tty3270_alloc_view ();if (IS_ERR (tp))return PTR_ERR (tp); - rc =raw3270_add_view (&tp->view, &tty3270_fn, tty->index); + rc =raw3270_add_view (&tp->view, &tty3270_fn, + tty->index +RAW3270_FIRSTMINOR );if (rc) {tty3270_free_view (tp);return rc;
@@ -1846,12 +1847,12 @@ static const struct tty_operations tty3270_ops = {void tty3270_create_cb (int minor) { -tty_register_device (tty3270_driver, minor,NULL ); +tty_register_device (tty3270_driver, minor -RAW3270_FIRSTMINOR ,NULL ); }void tty3270_destroy_cb (int minor) { -tty_unregister_device (tty3270_driver, minor); +tty_unregister_device (tty3270_driver, minor -RAW3270_FIRSTMINOR ); } struct raw3270_notifier tty3270_notifier =
@@ -1884,7 +1885,8 @@ static int __init tty3270_init(void) driver->driver_name ="tty3270" ; driver->name ="3270/tty" ; driver->major =IBM_TTY3270_MAJOR ; - driver->minor_start =0 ; + driver->minor_start =RAW3270_FIRSTMINOR ; + driver->name_base =RAW3270_FIRSTMINOR ; driver->type =TTY_DRIVER_TYPE_SYSTEM ; driver->subtype =SYSTEM_TYPE_TTY ; driver->init_termios = tty_std_termios;
drivers/spi/Kconfig +2 -1
@@ -55,6 +55,7 @@ comment "SPI Master Controller Drivers" config SPI_ALTERA tristate "Altera SPI Controller" + depends on GENERIC_HARDIRQS select SPI_BITBANG help This is the driver for the Altera SPI Controller.
@@ -310,7 +311,7 @@ config SPI_PXA2XX_DMA config SPI_PXA2XX tristate "PXA2xx SSP SPI master" - depends on ARCH_PXA || PCI || ACPI + depends on (ARCH_PXA || PCI || ACPI) && GENERIC_HARDIRQS select PXA_SSP if ARCH_PXA help This enables using a PXA2xx or Sodaville SSP port as a SPI master
Quoted 10 lines · Martin Schwidefsky
Hi Linus,
please pull from the 'for-linus' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.gitfor-linusto receive the following updates: Just a bunch of bugfixes.
Heiko Carstens (4):
drivers/Kconfig: add several missingGENERIC_HARDIRQSdependencies
Is anyone currently working on fixing this? s390 is the only architecture left that does not enable GENERIC_HARDIRQS. It's painful to keep adding dependencies on GENERIC_HARDIRQS to driver configs.
g.
Quoted 8 lines · On Tue, 25 Jun 2013 13:09:51 +0100 Grant Likely <[email protected]>…
Quoted 6 lines · Martin Schwidefsky
Hi Linus,
please pull from the 'for-linus' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.gitfor-linus
Quoted 8 lines
Quoted 4 lines
to receive the following updates: Just a bunch of bugfixes.
Heiko Carstens (4):
drivers/Kconfig: add several missingGENERIC_HARDIRQSdependenciesIs anyone currently working on fixing this? s390 is the only architecture left that does not enable
GENERIC_HARDIRQS. It's painful to keep adding dependencies onGENERIC_HARDIRQSto driver configs.
I am working on it. The hardest part is MSI irqs for PCI. Chances are that I get it done for the merge window of 3.12.
Signature · 4 lines
blue skies, Martin. "Reality continues to ruin my life." - Calvin.
Quoted 16 lines · Martin Schwidefsky
Quoted 13 lines · On Tue, 25 Jun 2013 13:09:51 +0100 Grant Likely <[email protected]>…
Quoted 10 lines · Martin Schwidefsky
Hi Linus,
please pull from the 'for-linus' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.gitfor-linusto receive the following updates: Just a bunch of bugfixes.
Heiko Carstens (4):
drivers/Kconfig: add several missingGENERIC_HARDIRQSdependencies
Quoted 6 lines
Quoted 3 lines
Is anyone currently working on fixing this? s390 is the only architecture left that does not enable
GENERIC_HARDIRQS. It's painful to keep adding dependencies onGENERIC_HARDIRQSto driver configs.I am working on it. The hardest part is MSI irqs for PCI. Chances are that I get it done for the merge window of 3.12.
How are you handling the MSIs? I've just been looking at some code for irq_domain to handle MSI mapping. What's the part that is getting you hung up?
I'd be happy to take a look if you want a hand.
g.
Quoted 22 lines · On Tue, 25 Jun 2013 13:42:23 +0100 Grant Likely <[email protected]>…
Quoted 20 lines · Martin Schwidefsky
Quoted 16 lines · On Tue, 25 Jun 2013 13:09:51 +0100 Grant Likely <[email protected]>…
Quoted 10 lines · Martin Schwidefsky
Hi Linus,
please pull from the 'for-linus' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.gitfor-linusto receive the following updates: Just a bunch of bugfixes.
Heiko Carstens (4):
drivers/Kconfig: add several missingGENERIC_HARDIRQSdependenciesIs anyone currently working on fixing this? s390 is the only architecture left that does not enable
GENERIC_HARDIRQS. It's painful to keep adding dependencies onGENERIC_HARDIRQSto driver configs.
Quoted 6 lines
Quoted 2 lines
I am working on it. The hardest part is MSI irqs for PCI. Chances are that I get it done for the merge window of 3.12.
How are you handling the MSIs? I've just been looking at some code for
irq_domainto handle MSI mapping. What's the part that is getting you hung up?
Basically a name-space thing. The current code allocates 64 interrupts numbers for each PCI device, starting at 0. With GENERIC_HARDIRQS=y irq #0 is used for for external interrupts, irq #1 for I/O interrupts and irq #2 for adapter interrupts. The adapter interrupt handler for PCI has to scan the interrupt vectors and call generic_handle_irq for the MSI interrupts starting at irq #3. As I don't want to create a huge irq_desc array the number of allocatable interrupts for MSI will be limited and I can not simply assign 64 interrupts numbers to each device anymore.
Quoted 1 line
I'd be happy to take a look if you want a hand.
Thanks for the offer, I might take you up on it if I hit a real problem.
Signature · 4 lines
blue skies, Martin. "Reality continues to ruin my life." - Calvin.
Quoted 32 lines · Martin Schwidefsky
Quoted 22 lines · On Tue, 25 Jun 2013 13:42:23 +0100 Grant Likely <[email protected]>…
Quoted 20 lines · Martin Schwidefsky
Quoted 16 lines · On Tue, 25 Jun 2013 13:09:51 +0100 Grant Likely <[email protected]>…
Quoted 10 lines · Martin Schwidefsky
Hi Linus,
please pull from the 'for-linus' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.gitfor-linusto receive the following updates: Just a bunch of bugfixes.
Heiko Carstens (4):
drivers/Kconfig: add several missingGENERIC_HARDIRQSdependenciesIs anyone currently working on fixing this? s390 is the only architecture left that does not enable
GENERIC_HARDIRQS. It's painful to keep adding dependencies onGENERIC_HARDIRQSto driver configs.Quoted 6 lines
Quoted 2 lines
I am working on it. The hardest part is MSI irqs for PCI. Chances are that I get it done for the merge window of 3.12.
How are you handling the MSIs? I've just been looking at some code for
irq_domainto handle MSI mapping. What's the part that is getting you hung up?
Quoted 8 lines
Basically a name-space thing. The current code allocates 64 interrupts numbers for each PCI device, starting at 0. With GENERIC_HARDIRQS=y irq #0 is used for for external interrupts, irq #1 for I/O interrupts and irq #2 for adapter interrupts. The adapter interrupt handler for PCI has to scan the interrupt vectors and call
generic_handle_irqfor the MSI interrupts starting at irq #3. As I don't want to create a hugeirq_descarray the number of allocatable interrupts for MSI will be limited and I can not simply assign 64 interrupts numbers to each device anymore.
Have you looked at irq_domain? It was created to solve that exact problem. irq_descs can get allocated dynamically as irqs are requested.
g.
Quoted 43 lines · On Tue, 25 Jun 2013 14:30:20 +0100 Grant Likely <[email protected]>…
Quoted 32 lines · Martin Schwidefsky
Quoted 22 lines · On Tue, 25 Jun 2013 13:42:23 +0100 Grant Likely <[email protected]>…
Quoted 20 lines · Martin Schwidefsky
Quoted 16 lines · On Tue, 25 Jun 2013 13:09:51 +0100 Grant Likely <[email protected]>…
Quoted 10 lines · Martin Schwidefsky
Hi Linus,
please pull from the 'for-linus' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.gitfor-linusto receive the following updates: Just a bunch of bugfixes.
Heiko Carstens (4):
drivers/Kconfig: add several missingGENERIC_HARDIRQSdependenciesIs anyone currently working on fixing this? s390 is the only architecture left that does not enable
GENERIC_HARDIRQS. It's painful to keep adding dependencies onGENERIC_HARDIRQSto driver configs.Quoted 6 lines
Quoted 2 lines
I am working on it. The hardest part is MSI irqs for PCI. Chances are that I get it done for the merge window of 3.12.
How are you handling the MSIs? I've just been looking at some code for
irq_domainto handle MSI mapping. What's the part that is getting you hung up?Quoted 8 lines
Basically a name-space thing. The current code allocates 64 interrupts numbers for each PCI device, starting at 0. With GENERIC_HARDIRQS=y irq #0 is used for for external interrupts, irq #1 for I/O interrupts and irq #2 for adapter interrupts. The adapter interrupt handler for PCI has to scan the interrupt vectors and call
generic_handle_irqfor the MSI interrupts starting at irq #3. As I don't want to create a hugeirq_descarray the number of allocatable interrupts for MSI will be limited and I can not simply assign 64 interrupts numbers to each device anymore.
Quoted 3 lines
Have you looked at
irq_domain? It was created to solve that exact problem.irq_descscan get allocated dynamically as irqs are requested.
That is one option I am considering. The PCI support for System z can have multiple PCI function groups, each with up to 2048 MSI interrupts. It is quite a good match.
Signature · 4 lines
blue skies, Martin. "Reality continues to ruin my life." - Calvin.
Quoted 46 lines · Martin Schwidefsky
Quoted 43 lines · On Tue, 25 Jun 2013 14:30:20 +0100 Grant Likely <[email protected]>…
Quoted 40 lines · Martin Schwidefsky
Quoted 22 lines · On Tue, 25 Jun 2013 13:42:23 +0100 Grant Likely <[email protected]>…
Quoted 20 lines · Martin Schwidefsky
Quoted 16 lines · On Tue, 25 Jun 2013 13:09:51 +0100 Grant Likely <[email protected]>…
Quoted 10 lines · Martin Schwidefsky
Hi Linus,
please pull from the 'for-linus' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.gitfor-linusto receive the following updates: Just a bunch of bugfixes.
Heiko Carstens (4):
drivers/Kconfig: add several missingGENERIC_HARDIRQSdependenciesIs anyone currently working on fixing this? s390 is the only architecture left that does not enable
GENERIC_HARDIRQS. It's painful to keep adding dependencies onGENERIC_HARDIRQSto driver configs.Quoted 6 lines
Quoted 2 lines
I am working on it. The hardest part is MSI irqs for PCI. Chances are that I get it done for the merge window of 3.12.
How are you handling the MSIs? I've just been looking at some code for
irq_domainto handle MSI mapping. What's the part that is getting you hung up?Basically a name-space thing. The current code allocates 64 interrupts numbers for each PCI device, starting at 0. With GENERIC_HARDIRQS=y irq #0 is used for for external interrupts, irq #1 for I/O interrupts and irq #2 for adapter interrupts. The adapter interrupt handler for PCI has to scan the interrupt vectors and call
generic_handle_irqfor the MSI interrupts starting at irq #3. As I don't want to create a hugeirq_descarray the number of allocatable interrupts for MSI will be limited and I can not simply assign 64 interrupts numbers to each device anymore.
Quoted 6 lines
Quoted 3 lines
Have you looked at
irq_domain? It was created to solve that exact problem.irq_descscan get allocated dynamically as irqs are requested.That is one option I am considering. The PCI support for System z can have multiple PCI function groups, each with up to 2048 MSI interrupts. It is quite a good match.
:-) It was designed to support exactly that use-case on PowerPC.
g.
Hi Grant,
Quoted 5 lines · On Tue, 25 Jun 2013 15:18:21 +0100 Grant Likely <[email protected]>…
Quoted 3 lines · Martin Schwidefsky
On Tue, 25 Jun 2013 14:30:20 +0100
Grant Likely <[email protected]> wrote:
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Have you looked at
irq_domain? It was created to solve that exact problem.irq_descscan get allocated dynamically as irqs are requested.That is one option I am considering. The PCI support for System z can have multiple PCI function groups, each with up to 2048 MSI interrupts. It is quite a good match.
:-) It was designed to support exactly that use-case on PowerPC.
I decided against irq_domains after all. The reason is that on s390 the same MSI interrupt numbers are used for multiple devices but without actually sharing them. The PCI root complex uses the adapter id and the MSI interrupt number to set two indicators for the target device (adapter interrupt summary bit and the MSI interrupt bit in the adapter interrupt vector). That would give me two options for irq_domains: 1) allocate an irq_domain for each device, or 2) encode the adapter id in the hwirq number and create a sparsely populated irq_domain. It is simpler to just use the irq_alloc_desc and irq_free_desc calls directly.
The preliminary result of this can be gawked atgit://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git genirq
Test and performance analysis is to-be-done and will take some time.
Signature · 4 lines
blue skies, Martin. "Reality continues to ruin my life." - Calvin.