Re: [PATCH] s390/console: enable dummy console for vt

2018-02-19 Thread Farhan Ali



On 02/15/2018 07:02 AM, Christian Borntraeger wrote:



On 02/15/2018 12:57 PM, Thomas Huth wrote:

On 15.02.2018 12:26, Geert Uytterhoeven wrote:

Hi Christian,

On Thu, Feb 15, 2018 at 12:14 PM, Christian Borntraeger
 wrote:

To enable the virtual terminal layer with virtio-gpu, we need to
provide the dummy console. This console is hidden behind CONFIG_IOMEM
via the graphics support. Instead of fully enabling the graphic
drivers lets just provide a Kconfig option for the dummy console.

Signed-off-by: Christian Borntraeger 
---
New version: instead of moving around the graphic and console stuff,
let's just keep an s390 specific variant of CONFIG_DUMMY_CONSOLE
  arch/s390/Kconfig | 5 +
  1 file changed, 5 insertions(+)

diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index cbe1d978693a..a69690f616f3 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -952,6 +952,11 @@ config S390_HYPFS_FS

  source "arch/s390/kvm/Kconfig"

+config DUMMY_CONSOLE
+   bool
+   depends on VT
+   default y
+
  config S390_GUEST
 def_bool y
 prompt "s390 support for virtio devices"


Really?

You already have your own copy of HAS_IOMEM, which makes it hard for
people to track which one applies where.


I think I agree with Geert - let's better fix this in a proper way
instead of doing hacks like this. I guess there will be other
architectures in the future that might want to use the dummy console
without CONFIG_IOMEM, so fixing this in drivers/video/ instead sounds
better to me.


The question is, what is the proper fix?



How about we only fence off sub menu items such as DRM or GPU or Fbdev, 
which actually uses io memory, in drivers/video/Kconfig? Similar to what 
Thomas suggested for moving the CONFIG_IOMEM dependency for fbdevs?


___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] s390/console: enable dummy console for vt

2018-02-19 Thread Farhan Ali



On 02/19/2018 08:37 AM, Christian Borntraeger wrote:



On 02/19/2018 02:35 PM, Farhan Ali wrote:



On 02/15/2018 07:02 AM, Christian Borntraeger wrote:



On 02/15/2018 12:57 PM, Thomas Huth wrote:

On 15.02.2018 12:26, Geert Uytterhoeven wrote:

Hi Christian,

On Thu, Feb 15, 2018 at 12:14 PM, Christian Borntraeger
 wrote:

To enable the virtual terminal layer with virtio-gpu, we need to
provide the dummy console. This console is hidden behind CONFIG_IOMEM
via the graphics support. Instead of fully enabling the graphic
drivers lets just provide a Kconfig option for the dummy console.

Signed-off-by: Christian Borntraeger 
---
New version: instead of moving around the graphic and console stuff,
let's just keep an s390 specific variant of CONFIG_DUMMY_CONSOLE
   arch/s390/Kconfig | 5 +
   1 file changed, 5 insertions(+)

diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index cbe1d978693a..a69690f616f3 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -952,6 +952,11 @@ config S390_HYPFS_FS

   source "arch/s390/kvm/Kconfig"

+config DUMMY_CONSOLE
+   bool
+   depends on VT
+   default y
+
   config S390_GUEST
  def_bool y
  prompt "s390 support for virtio devices"


Really?

You already have your own copy of HAS_IOMEM, which makes it hard for
people to track which one applies where.


I think I agree with Geert - let's better fix this in a proper way
instead of doing hacks like this. I guess there will be other
architectures in the future that might want to use the dummy console
without CONFIG_IOMEM, so fixing this in drivers/video/ instead sounds
better to me.


The question is, what is the proper fix?



How about we only fence off sub menu items such as DRM or GPU or Fbdev, which 
actually uses io memory, in drivers/video/Kconfig? Similar to what Thomas 
suggested for moving the CONFIG_IOMEM dependency for fbdevs?


Can you spin a patch?


Yes, I will post it as V3.

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] s390/console: enable dummy console for vt

2018-02-19 Thread Christian Borntraeger


On 02/19/2018 02:35 PM, Farhan Ali wrote:
> 
> 
> On 02/15/2018 07:02 AM, Christian Borntraeger wrote:
>>
>>
>> On 02/15/2018 12:57 PM, Thomas Huth wrote:
>>> On 15.02.2018 12:26, Geert Uytterhoeven wrote:
 Hi Christian,

 On Thu, Feb 15, 2018 at 12:14 PM, Christian Borntraeger
  wrote:
> To enable the virtual terminal layer with virtio-gpu, we need to
> provide the dummy console. This console is hidden behind CONFIG_IOMEM
> via the graphics support. Instead of fully enabling the graphic
> drivers lets just provide a Kconfig option for the dummy console.
>
> Signed-off-by: Christian Borntraeger 
> ---
> New version: instead of moving around the graphic and console stuff,
> let's just keep an s390 specific variant of CONFIG_DUMMY_CONSOLE
>   arch/s390/Kconfig | 5 +
>   1 file changed, 5 insertions(+)
>
> diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
> index cbe1d978693a..a69690f616f3 100644
> --- a/arch/s390/Kconfig
> +++ b/arch/s390/Kconfig
> @@ -952,6 +952,11 @@ config S390_HYPFS_FS
>
>   source "arch/s390/kvm/Kconfig"
>
> +config DUMMY_CONSOLE
> +   bool
> +   depends on VT
> +   default y
> +
>   config S390_GUEST
>  def_bool y
>  prompt "s390 support for virtio devices"

 Really?

 You already have your own copy of HAS_IOMEM, which makes it hard for
 people to track which one applies where.
>>>
>>> I think I agree with Geert - let's better fix this in a proper way
>>> instead of doing hacks like this. I guess there will be other
>>> architectures in the future that might want to use the dummy console
>>> without CONFIG_IOMEM, so fixing this in drivers/video/ instead sounds
>>> better to me.
>>
>> The question is, what is the proper fix?
>>
> 
> How about we only fence off sub menu items such as DRM or GPU or Fbdev, which 
> actually uses io memory, in drivers/video/Kconfig? Similar to what Thomas 
> suggested for moving the CONFIG_IOMEM dependency for fbdevs?

Can you spin a patch?

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] s390/console: enable dummy console for vt

2018-02-15 Thread Christian Borntraeger


On 02/15/2018 12:57 PM, Thomas Huth wrote:
> On 15.02.2018 12:26, Geert Uytterhoeven wrote:
>> Hi Christian,
>>
>> On Thu, Feb 15, 2018 at 12:14 PM, Christian Borntraeger
>>  wrote:
>>> To enable the virtual terminal layer with virtio-gpu, we need to
>>> provide the dummy console. This console is hidden behind CONFIG_IOMEM
>>> via the graphics support. Instead of fully enabling the graphic
>>> drivers lets just provide a Kconfig option for the dummy console.
>>>
>>> Signed-off-by: Christian Borntraeger 
>>> ---
>>> New version: instead of moving around the graphic and console stuff,
>>> let's just keep an s390 specific variant of CONFIG_DUMMY_CONSOLE
>>>  arch/s390/Kconfig | 5 +
>>>  1 file changed, 5 insertions(+)
>>>
>>> diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
>>> index cbe1d978693a..a69690f616f3 100644
>>> --- a/arch/s390/Kconfig
>>> +++ b/arch/s390/Kconfig
>>> @@ -952,6 +952,11 @@ config S390_HYPFS_FS
>>>
>>>  source "arch/s390/kvm/Kconfig"
>>>
>>> +config DUMMY_CONSOLE
>>> +   bool
>>> +   depends on VT
>>> +   default y
>>> +
>>>  config S390_GUEST
>>> def_bool y
>>> prompt "s390 support for virtio devices"
>>
>> Really?
>>
>> You already have your own copy of HAS_IOMEM, which makes it hard for
>> people to track which one applies where.
> 
> I think I agree with Geert - let's better fix this in a proper way
> instead of doing hacks like this. I guess there will be other
> architectures in the future that might want to use the dummy console
> without CONFIG_IOMEM, so fixing this in drivers/video/ instead sounds
> better to me.

The question is, what is the proper fix?

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] s390/console: enable dummy console for vt

2018-02-15 Thread Thomas Huth
On 15.02.2018 12:26, Geert Uytterhoeven wrote:
> Hi Christian,
> 
> On Thu, Feb 15, 2018 at 12:14 PM, Christian Borntraeger
>  wrote:
>> To enable the virtual terminal layer with virtio-gpu, we need to
>> provide the dummy console. This console is hidden behind CONFIG_IOMEM
>> via the graphics support. Instead of fully enabling the graphic
>> drivers lets just provide a Kconfig option for the dummy console.
>>
>> Signed-off-by: Christian Borntraeger 
>> ---
>> New version: instead of moving around the graphic and console stuff,
>> let's just keep an s390 specific variant of CONFIG_DUMMY_CONSOLE
>>  arch/s390/Kconfig | 5 +
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
>> index cbe1d978693a..a69690f616f3 100644
>> --- a/arch/s390/Kconfig
>> +++ b/arch/s390/Kconfig
>> @@ -952,6 +952,11 @@ config S390_HYPFS_FS
>>
>>  source "arch/s390/kvm/Kconfig"
>>
>> +config DUMMY_CONSOLE
>> +   bool
>> +   depends on VT
>> +   default y
>> +
>>  config S390_GUEST
>> def_bool y
>> prompt "s390 support for virtio devices"
> 
> Really?
> 
> You already have your own copy of HAS_IOMEM, which makes it hard for
> people to track which one applies where.

I think I agree with Geert - let's better fix this in a proper way
instead of doing hacks like this. I guess there will be other
architectures in the future that might want to use the dummy console
without CONFIG_IOMEM, so fixing this in drivers/video/ instead sounds
better to me.

 Thomas
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] s390/console: enable dummy console for vt

2018-02-15 Thread Christian Borntraeger
On 02/15/2018 12:26 PM, Geert Uytterhoeven wrote:
> Hi Christian,
> 
> On Thu, Feb 15, 2018 at 12:14 PM, Christian Borntraeger
>  wrote:
>> To enable the virtual terminal layer with virtio-gpu, we need to
>> provide the dummy console. This console is hidden behind CONFIG_IOMEM
>> via the graphics support. Instead of fully enabling the graphic
>> drivers lets just provide a Kconfig option for the dummy console.
>>
>> Signed-off-by: Christian Borntraeger 
>> ---
>> New version: instead of moving around the graphic and console stuff,
>> let's just keep an s390 specific variant of CONFIG_DUMMY_CONSOLE
>>  arch/s390/Kconfig | 5 +
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
>> index cbe1d978693a..a69690f616f3 100644
>> --- a/arch/s390/Kconfig
>> +++ b/arch/s390/Kconfig
>> @@ -952,6 +952,11 @@ config S390_HYPFS_FS
>>
>>  source "arch/s390/kvm/Kconfig"
>>
>> +config DUMMY_CONSOLE
>> +   bool
>> +   depends on VT
>> +   default y
>> +
>>  config S390_GUEST
>> def_bool y
>> prompt "s390 support for virtio devices"
> 
> Really?
> 
> You already have your own copy of HAS_IOMEM, which makes it hard for
> people to track which one applies where.
> 

I am open for better suggestions. One idea that I had was to reverse
the logic in s390 (and use the common code HAS_IOMEM)

like


diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index cbe1d978693a..123dd593ea20 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -715,8 +715,8 @@ endif   # PCI
 config PCI_DOMAINS
def_bool PCI
 
-config HAS_IOMEM
-   def_bool PCI
+config NO_IOMEM
+   def_bool y if !PCI
 
 config IOMMU_HELPER
def_bool PCI


This would enable CONFIG_VT and also CONFIG_DUMMY_CONSOLE as long as
PCI is enabled. If DUMMY_CONSOLE is not enabled (e.g. due to missing PCI),
we get a crash in the VT layer as conswitchp is then null.

Somewhat tricky.

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] s390/console: enable dummy console for vt

2018-02-15 Thread Geert Uytterhoeven
Hi Christian,

On Thu, Feb 15, 2018 at 12:14 PM, Christian Borntraeger
 wrote:
> To enable the virtual terminal layer with virtio-gpu, we need to
> provide the dummy console. This console is hidden behind CONFIG_IOMEM
> via the graphics support. Instead of fully enabling the graphic
> drivers lets just provide a Kconfig option for the dummy console.
>
> Signed-off-by: Christian Borntraeger 
> ---
> New version: instead of moving around the graphic and console stuff,
> let's just keep an s390 specific variant of CONFIG_DUMMY_CONSOLE
>  arch/s390/Kconfig | 5 +
>  1 file changed, 5 insertions(+)
>
> diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
> index cbe1d978693a..a69690f616f3 100644
> --- a/arch/s390/Kconfig
> +++ b/arch/s390/Kconfig
> @@ -952,6 +952,11 @@ config S390_HYPFS_FS
>
>  source "arch/s390/kvm/Kconfig"
>
> +config DUMMY_CONSOLE
> +   bool
> +   depends on VT
> +   default y
> +
>  config S390_GUEST
> def_bool y
> prompt "s390 support for virtio devices"

Really?

You already have your own copy of HAS_IOMEM, which makes it hard for
people to track which one applies where.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel