All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: Tree for June 9
@ 2010-06-09  3:34 Stephen Rothwell
  2010-06-09 17:36 ` linux-next: Tree for June 9 (niu) Randy Dunlap
  2010-06-09 22:29 ` [PATCH] input: fixup X86_MRST selects Randy Dunlap
  0 siblings, 2 replies; 23+ messages in thread
From: Stephen Rothwell @ 2010-06-09  3:34 UTC (permalink / raw)
  To: linux-next; +Cc: LKML

[-- Attachment #1: Type: text/plain, Size: 7533 bytes --]

Hi all,

Changes since 20100608:

My fixes tree contains:
      v4l-dvb: update gfp/slab.h includes
      arm: update gfp/slab.h includes
      davinci: update gfp/slab.h includes
      ocfs2: update gfp/slab.h includes
      acpi: update gfp/slab.h includes


----------------------------------------------------------------------------

I have created today's linux-next tree at
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
(patches at http://www.kernel.org/pub/linux/kernel/v2.6/next/ ).  If you
are tracking the linux-next tree using git, you should not use "git pull"
to do so as that will try to merge the new linux-next release with the
old one.  You should use "git fetch" as mentioned in the FAQ on the wiki
(see below).

You can see which trees have been included by looking in the Next/Trees
file in the source.  There are also quilt-import.log and merge.log files
in the Next directory.  Between each merge, the tree was built with
a ppc64_defconfig for powerpc and an allmodconfig for x86_64. After the
final fixups (if any), it is also built with powerpc allnoconfig (32 and
64 bit), ppc44x_defconfig and allyesconfig (minus
CONFIG_PROFILE_ALL_BRANCHES - this fails its final link) and i386, sparc
and sparc64 defconfig. These builds also have
CONFIG_ENABLE_WARN_DEPRECATED, CONFIG_ENABLE_MUST_CHECK and
CONFIG_DEBUG_INFO disabled when necessary.

Below is a summary of the state of the merge.

We are up to 164 trees (counting Linus' and 22 trees of patches pending
for Linus' tree), more are welcome (even if they are currently empty).
Thanks to those who have contributed, and to those who haven't, please do.

Status of my local build tests will be at
http://kisskb.ellerman.id.au/linux-next .  If maintainers want to give
advice about cross compilers/configs that work, we are always open to add
more builds.

Thanks to Jan Dittmer for adding the linux-next tree to his build tests
at http://l4x.org/k/ , the guys at http://test.kernel.org/ and Randy
Dunlap for doing many randconfig builds.

There is a wiki covering stuff to do with linux-next at
http://linux.f-seidel.de/linux-next/pmwiki/ .  Thanks to Frank Seidel.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

$ git checkout master
$ git reset --hard stable
Merging origin/master
Merging fixes/fixes
Merging arm-current/master
Merging m68k-current/for-linus
Merging powerpc-merge/merge
Merging sparc-current/master
Merging scsi-rc-fixes/master
Merging net-current/master
Merging sound-current/for-linus
Merging pci-current/for-linus
Merging wireless-current/master
Merging kbuild-current/for-linus
Merging quilt/driver-core.current
Merging quilt/tty.current
Merging quilt/usb.current
Merging quilt/staging.current
Merging cpufreq-current/fixes
Merging input-current/for-linus
Merging md-current/for-linus
Merging audit-current/for-linus
Merging crypto-current/master
Merging ide-curent/master
Merging dwmw2/master
Merging gcl-current/merge
Merging arm/devel
Merging davinci/davinci-next
Merging i.MX/for-next
Merging msm/for-next
Merging omap/for-next
Merging pxa/for-next
Merging samsung/next-samsung
Merging avr32/avr32-arch
Merging blackfin/for-linus
Merging cris/for-next
Merging ia64/test
Merging m68k/for-next
Merging m68knommu/for-next
Merging microblaze/next
Merging mips/mips-for-linux-next
Merging parisc/next
Merging powerpc/next
Merging 4xx/next
Merging 52xx-and-virtex/next
CONFLICT (content): Merge conflict in drivers/serial/mpc52xx_uart.c
Merging galak/next
Merging s390/features
Merging sh/master
Merging genesis/master
CONFLICT (content): Merge conflict in include/linux/serial_sci.h
Merging sparc/master
Merging tile/master
Merging xtensa/master
Merging ceph/for-next
Merging cifs/master
Merging configfs/linux-next
Merging ecryptfs/next
CONFLICT (content): Merge conflict in fs/ecryptfs/main.c
Merging ext3/for_next
Merging ext4/next
Merging fatfs/master
Merging fuse/for-next
Merging gfs2/master
Merging jfs/next
Merging logfs/master
CONFLICT (content): Merge conflict in fs/logfs/logfs.h
Merging nfs/linux-next
Merging nfsd/nfsd-next
Merging nilfs2/for-next
Merging ocfs2/linux-next
Merging squashfs/master
Merging udf/for_next
Merging v9fs/for-next
Merging ubifs/linux-next
Merging xfs/master
Merging vfs/for-next
Merging pci/linux-next
Merging hid/for-next
Merging quilt/i2c
Merging bjdooks-i2c/next-i2c
CONFLICT (content): Merge conflict in arch/arm/plat-omap/i2c.c
CONFLICT (content): Merge conflict in drivers/i2c/busses/i2c-cpm.c
CONFLICT (content): Merge conflict in drivers/i2c/busses/i2c-mpc.c
Merging quilt/jdelvare-hwmon
Merging quilt/kernel-doc
Merging v4l-dvb/master
Merging kbuild/for-next
Merging kconfig/for-next
Merging ide/master
Merging libata/NEXT
Merging infiniband/for-next
Merging acpi/test
Merging idle-test/idle-test
Merging ieee1394/for-next
Merging ubi/linux-next
Merging kvm/linux-next
Merging dlm/next
Merging ibft/master
Merging swiotlb/master
Merging scsi/master
Merging async_tx/next
Merging net/master
Merging wireless/master
CONFLICT (content): Merge conflict in drivers/net/wireless/wl12xx/wl1271.h
CONFLICT (content): Merge conflict in drivers/net/wireless/wl12xx/wl1271_cmd.h
Merging mtd/master
Merging crypto/master
Merging sound/for-next
Merging cpufreq/next
Merging quilt/rr
CONFLICT (content): Merge conflict in kernel/module.c
Merging mmc/next
Merging input/next
Merging lsm/for-next
Merging block/for-next
Merging quilt/device-mapper
Merging embedded/master
Merging firmware/master
Merging pcmcia/master
Merging battery/master
Merging leds/for-mm
Merging backlight/for-mm
Merging kgdb/kgdb-next
Merging slab/for-next
Merging uclinux/for-next
Merging md/for-next
Merging mfd/for-next
Merging hdlc/hdlc-next
Merging drm/drm-next
Merging viafb/viafb-next
Merging voltage/for-next
Merging security-testing/next
Merging lblnet/master
Merging agp/agp-next
Merging uwb/for-upstream
Merging watchdog/master
Merging bdev/master
Merging dwmw2-iommu/master
Merging cputime/cputime
Merging osd/linux-next
Merging jc_docs/docs-next
Merging nommu/master
Merging trivial/for-next
Merging audit/for-next
Merging quilt/aoe
Merging suspend/linux-next
Merging bluetooth/master
Merging fsnotify/for-next
CONFLICT (delete/modify): fs/notify/inotify/inotify.c deleted in fsnotify/for-next and modified in HEAD. Version HEAD of fs/notify/inotify/inotify.c left in tree.
$ git rm -f fs/notify/inotify/inotify.c
Applying: fsnotify: update gfp/slab.h includes
Merging irda/for-next
CONFLICT (content): Merge conflict in drivers/net/irda/irda-usb.c
Merging drbd/for-jens
CONFLICT (content): Merge conflict in fs/fs-writeback.c
CONFLICT (content): Merge conflict in include/linux/drbd.h
Merging catalin/for-next
Merging alacrity/linux-next
Merging i7core_edac/linux_next
Merging devicetree/next-devicetree
Merging spi/next-spi
Merging omap_dss2/for-next
Merging tip/auto-latest
Merging edac-amd/for-next
Merging oprofile/for-next
Merging percpu/for-next
Merging workqueues/for-next
Merging sfi/sfi-test
Merging asm-generic/next
Merging drivers-x86/linux-next
Merging hwpoison/hwpoison
Merging sysctl/master
Merging bkl-core/bkl/core
Merging bkl-procfs/bkl/procfs
Merging bkl-ioctl/bkl/ioctl
Merging quilt/driver-core
Merging quilt/tty
Merging quilt/usb
Merging staging-next/staging-next
Merging slabh/slabh
Merging scsi-post-merge/master

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: linux-next: Tree for June 9 (niu)
  2010-06-09  3:34 linux-next: Tree for June 9 Stephen Rothwell
@ 2010-06-09 17:36 ` Randy Dunlap
  2010-06-09 18:06   ` David Miller
  2010-06-09 22:29 ` [PATCH] input: fixup X86_MRST selects Randy Dunlap
  1 sibling, 1 reply; 23+ messages in thread
From: Randy Dunlap @ 2010-06-09 17:36 UTC (permalink / raw)
  To: Stephen Rothwell, netdev; +Cc: linux-next, LKML, davem

On Wed, 9 Jun 2010 13:34:43 +1000 Stephen Rothwell wrote:

> Hi all,
> 
> Changes since 20100608:
> 
> My fixes tree contains:
>       v4l-dvb: update gfp/slab.h includes
>       arm: update gfp/slab.h includes
>       davinci: update gfp/slab.h includes
>       ocfs2: update gfp/slab.h includes
>       acpi: update gfp/slab.h includes



on x86_64 or i386, CONFIG_OF_DEVICE is not enabled:

drivers/net/niu.c:9700: warning: 'struct of_device' declared inside parameter list
drivers/net/niu.c:9700: warning: its scope is only this definition or declaration, which is probably not what you want
drivers/net/niu.c:9716: warning: assignment from incompatible pointer type

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: linux-next: Tree for June 9 (niu)
  2010-06-09 17:36 ` linux-next: Tree for June 9 (niu) Randy Dunlap
@ 2010-06-09 18:06   ` David Miller
  2010-06-09 18:08     ` Randy Dunlap
                       ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: David Miller @ 2010-06-09 18:06 UTC (permalink / raw)
  To: randy.dunlap; +Cc: sfr, netdev, linux-next, linux-kernel

From: Randy Dunlap <randy.dunlap@oracle.com>
Date: Wed, 9 Jun 2010 10:36:57 -0700

> On Wed, 9 Jun 2010 13:34:43 +1000 Stephen Rothwell wrote:
> 
>> Changes since 20100608:
>> 
>> My fixes tree contains:
>>       v4l-dvb: update gfp/slab.h includes
>>       arm: update gfp/slab.h includes
>>       davinci: update gfp/slab.h includes
>>       ocfs2: update gfp/slab.h includes
>>       acpi: update gfp/slab.h includes
> 
> 
> 
> on x86_64 or i386, CONFIG_OF_DEVICE is not enabled:
> 
> drivers/net/niu.c:9700: warning: 'struct of_device' declared inside parameter list
> drivers/net/niu.c:9700: warning: its scope is only this definition or declaration, which is probably not what you want
> drivers/net/niu.c:9716: warning: assignment from incompatible pointer type

Hmmm, I'm confused why this never happened before :-)

We conditionalize linux/of_device.h inclusion with CONFIG_SPARC64, yet
we unconditionally use "struct of_device *" pointers in the driver
with no such ifdef protection.

Even if we unconditionally included linux/of_device.h, that file does
nothing unless CONFIG_OF_DEVICE is defined so it should have always
produced these warnings since I can't see from where else it could
have gotten even a "struct of_device;" somewhere.

Do you have any idea Randy?  Pease try analyze this further so we can
fix it properly.

THanks!

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: linux-next: Tree for June 9 (niu)
  2010-06-09 18:06   ` David Miller
@ 2010-06-09 18:08     ` Randy Dunlap
  2010-06-09 22:44     ` [PATCH 1/2 -next] of_device.h: provide struct of_device even when not enabled Randy Dunlap
  2010-06-09 22:44     ` [PATCH 2/2 -next] niu: always include of_device.h Randy Dunlap
  2 siblings, 0 replies; 23+ messages in thread
From: Randy Dunlap @ 2010-06-09 18:08 UTC (permalink / raw)
  To: David Miller; +Cc: sfr, netdev, linux-next, linux-kernel

On 06/09/10 11:06, David Miller wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
> Date: Wed, 9 Jun 2010 10:36:57 -0700
> 
>> On Wed, 9 Jun 2010 13:34:43 +1000 Stephen Rothwell wrote:
>>
>>> Changes since 20100608:
>>>
>>> My fixes tree contains:
>>>       v4l-dvb: update gfp/slab.h includes
>>>       arm: update gfp/slab.h includes
>>>       davinci: update gfp/slab.h includes
>>>       ocfs2: update gfp/slab.h includes
>>>       acpi: update gfp/slab.h includes
>>
>>
>>
>> on x86_64 or i386, CONFIG_OF_DEVICE is not enabled:
>>
>> drivers/net/niu.c:9700: warning: 'struct of_device' declared inside parameter list
>> drivers/net/niu.c:9700: warning: its scope is only this definition or declaration, which is probably not what you want
>> drivers/net/niu.c:9716: warning: assignment from incompatible pointer type
> 
> Hmmm, I'm confused why this never happened before :-)
> 
> We conditionalize linux/of_device.h inclusion with CONFIG_SPARC64, yet
> we unconditionally use "struct of_device *" pointers in the driver
> with no such ifdef protection.
> 
> Even if we unconditionally included linux/of_device.h, that file does
> nothing unless CONFIG_OF_DEVICE is defined so it should have always
> produced these warnings since I can't see from where else it could
> have gotten even a "struct of_device;" somewhere.
> 
> Do you have any idea Randy?  Pease try analyze this further so we can
> fix it properly.


I looked and was confuzed, but I'll look again.

-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH] input: fixup X86_MRST selects
  2010-06-09  3:34 linux-next: Tree for June 9 Stephen Rothwell
  2010-06-09 17:36 ` linux-next: Tree for June 9 (niu) Randy Dunlap
@ 2010-06-09 22:29 ` Randy Dunlap
  2010-06-09 22:40   ` Dmitry Torokhov
  1 sibling, 1 reply; 23+ messages in thread
From: Randy Dunlap @ 2010-06-09 22:29 UTC (permalink / raw)
  To: Stephen Rothwell, Dmitry Torokhov, Jacob Pan
  Cc: linux-next, LKML, linux-input, akpm

From: Randy Dunlap <randy.dunlap@oracle.com>

Some of the recent X86_MRST additions make some "select"s
conditional on X86_MRST but missed some related kconfig symbols,
causing:

drivers/built-in.o: In function `ps2_end_command':
(.text+0x257ab2): undefined reference to `i8042_check_port_owner'
drivers/built-in.o: In function `ps2_end_command':
(.text+0x257ae1): undefined reference to `i8042_unlock_chip'
drivers/built-in.o: In function `ps2_begin_command':
(.text+0x257b40): undefined reference to `i8042_check_port_owner'
drivers/built-in.o: In function `ps2_begin_command':
(.text+0x257b6f): undefined reference to `i8042_lock_chip'

when SERIO_I8042=m, SERIO_LIBPS2=y, KEYBOARD_ATKBD=y.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc:	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc:	Jacob Pan <jacob.jun.pan@intel.com>
---
[found in linux-next but also applies to mainline]

 drivers/input/keyboard/Kconfig |    3 ++-
 drivers/input/mouse/Kconfig    |    2 +-
 drivers/input/serio/Kconfig    |    2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

--- linux-next-20100609.orig/drivers/input/keyboard/Kconfig
+++ linux-next-20100609/drivers/input/keyboard/Kconfig
@@ -70,9 +70,10 @@ config KEYBOARD_ATARI
 
 config KEYBOARD_ATKBD
 	tristate "AT keyboard" if EMBEDDED || !X86
+	depends on !X86 || (X86 && !X86_MRST)
 	default y
 	select SERIO
-	select SERIO_LIBPS2
+	select SERIO_LIBPS2 if !X86_MRST
 	select SERIO_I8042 if X86 && !X86_MRST
 	select SERIO_GSCPS2 if GSC
 	help
--- linux-next-20100609.orig/drivers/input/mouse/Kconfig
+++ linux-next-20100609/drivers/input/mouse/Kconfig
@@ -16,7 +16,7 @@ config MOUSE_PS2
 	tristate "PS/2 mouse"
 	default y
 	select SERIO
-	select SERIO_LIBPS2
+	select SERIO_LIBPS2 if !X86_MRST
 	select SERIO_I8042 if X86 && !X86_MRST
 	select SERIO_GSCPS2 if GSC
 	help
--- linux-next-20100609.orig/drivers/input/serio/Kconfig
+++ linux-next-20100609/drivers/input/serio/Kconfig
@@ -168,7 +168,7 @@ config SERIO_MACEPS2
 	  module will be called maceps2.
 
 config SERIO_LIBPS2
-	tristate "PS/2 driver library" if EMBEDDED
+	tristate "PS/2 driver library" if EMBEDDED && !X86_MRST
 	depends on SERIO_I8042 || SERIO_I8042=n
 	help
 	  Say Y here if you are using a driver for device connected

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] input: fixup X86_MRST selects
  2010-06-09 22:29 ` [PATCH] input: fixup X86_MRST selects Randy Dunlap
@ 2010-06-09 22:40   ` Dmitry Torokhov
  2010-06-09 22:42     ` Randy Dunlap
  0 siblings, 1 reply; 23+ messages in thread
From: Dmitry Torokhov @ 2010-06-09 22:40 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Stephen Rothwell, Jacob Pan, linux-next, LKML, linux-input, akpm

On Wednesday, June 09, 2010 03:29:21 pm Randy Dunlap wrote:
> +++ linux-next-20100609/drivers/input/keyboard/Kconfig
> @@ -70,9 +70,10 @@ config KEYBOARD_ATARI
>  
>  config KEYBOARD_ATKBD
>         tristate "AT keyboard" if EMBEDDED || !X86
> +       depends on !X86 || (X86 && !X86_MRST)

Should it be simply 'depends on !X86_MRST' and then we could kill
'!X86_MRST' conditionals in selects?

>         default y
>         select SERIO
> -       select SERIO_LIBPS2
> +       select SERIO_LIBPS2 if !X86_MRST
>         select SERIO_I8042 if X86 && !X86_MRST
>         select SERIO_GSCPS2 if GSC
>         help

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] input: fixup X86_MRST selects
  2010-06-09 22:40   ` Dmitry Torokhov
@ 2010-06-09 22:42     ` Randy Dunlap
  2010-06-10 19:04       ` Dmitry Torokhov
  0 siblings, 1 reply; 23+ messages in thread
From: Randy Dunlap @ 2010-06-09 22:42 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Stephen Rothwell, Jacob Pan, linux-next, LKML, linux-input, akpm

On 06/09/10 15:40, Dmitry Torokhov wrote:
> On Wednesday, June 09, 2010 03:29:21 pm Randy Dunlap wrote:
>> +++ linux-next-20100609/drivers/input/keyboard/Kconfig
>> @@ -70,9 +70,10 @@ config KEYBOARD_ATARI
>>  
>>  config KEYBOARD_ATKBD
>>         tristate "AT keyboard" if EMBEDDED || !X86
>> +       depends on !X86 || (X86 && !X86_MRST)
> 
> Should it be simply 'depends on !X86_MRST' and then we could kill
> '!X86_MRST' conditionals in selects?

Duh, that sounds good, yes.

> 
>>         default y
>>         select SERIO
>> -       select SERIO_LIBPS2
>> +       select SERIO_LIBPS2 if !X86_MRST
>>         select SERIO_I8042 if X86 && !X86_MRST
>>         select SERIO_GSCPS2 if GSC
>>         help
> 
> Thanks.
> 


-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH 1/2 -next] of_device.h: provide struct of_device even when not enabled
  2010-06-09 18:06   ` David Miller
  2010-06-09 18:08     ` Randy Dunlap
@ 2010-06-09 22:44     ` Randy Dunlap
  2010-06-09 23:47         ` Grant Likely
  2010-06-09 22:44     ` [PATCH 2/2 -next] niu: always include of_device.h Randy Dunlap
  2 siblings, 1 reply; 23+ messages in thread
From: Randy Dunlap @ 2010-06-09 22:44 UTC (permalink / raw)
  To: David Miller, Grant Likely; +Cc: sfr, netdev, linux-next, linux-kernel

From: Randy Dunlap <randy.dunlap@oracle.com>

Drivers may use struct of_device (struct platform_device), even when
CONFIG_OF_DEVICE is not enabled, so minimally provide that struct
for that kconfig case.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc:	Grant Likely <grant.likely@secretlab.ca>
Cc:	Dave Miller <davem@davemloft.net>
---
 include/linux/of_device.h |    4 ++++
 1 file changed, 4 insertions(+)

--- linux-next-20100609.orig/include/linux/of_device.h
+++ linux-next-20100609/include/linux/of_device.h
@@ -47,6 +47,10 @@ extern ssize_t of_device_get_modalias(st
 
 extern int of_device_uevent(struct device *dev, struct kobj_uevent_env *env);
 
+#else
+
+#include <linux/platform_device.h>
+#define of_device platform_device
 
 #endif /* CONFIG_OF_DEVICE */
 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH 2/2 -next] niu: always include of_device.h
  2010-06-09 18:06   ` David Miller
  2010-06-09 18:08     ` Randy Dunlap
  2010-06-09 22:44     ` [PATCH 1/2 -next] of_device.h: provide struct of_device even when not enabled Randy Dunlap
@ 2010-06-09 22:44     ` Randy Dunlap
  2010-06-09 23:45       ` Grant Likely
  2 siblings, 1 reply; 23+ messages in thread
From: Randy Dunlap @ 2010-06-09 22:44 UTC (permalink / raw)
  To: David Miller, Grant Likely; +Cc: sfr, netdev, linux-next, linux-kernel

From: Randy Dunlap <randy.dunlap@oracle.com>

The niu driver uses struct of_device when built on any arch, not
only SPARC64, so always #include <linux/of_device.h>.

drivers/net/niu.c:9700: warning: 'struct of_device' declared inside parameter list
drivers/net/niu.c:9700: warning: its scope is only this definition or declaration, which is probably not what you want
drivers/net/niu.c:9716: warning: assignment from incompatible pointer type

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc:	Grant Likely <grant.likely@secretlab.ca>
Cc:	Dave Miller <davem@davemloft.net>
---
 drivers/net/niu.c |    3 ---
 1 file changed, 3 deletions(-)

--- linux-next-20100609.orig/drivers/net/niu.c
+++ linux-next-20100609/drivers/net/niu.c
@@ -28,10 +28,7 @@
 #include <linux/slab.h>
 
 #include <linux/io.h>
-
-#ifdef CONFIG_SPARC64
 #include <linux/of_device.h>
-#endif
 
 #include "niu.h"
 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 2/2 -next] niu: always include of_device.h
  2010-06-09 22:44     ` [PATCH 2/2 -next] niu: always include of_device.h Randy Dunlap
@ 2010-06-09 23:45       ` Grant Likely
  2010-06-10  0:29         ` David Miller
  0 siblings, 1 reply; 23+ messages in thread
From: Grant Likely @ 2010-06-09 23:45 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: David Miller, sfr, netdev, linux-next, linux-kernel

On Wed, Jun 9, 2010 at 4:44 PM, Randy Dunlap <randy.dunlap@oracle.com> wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> The niu driver uses struct of_device when built on any arch, not
> only SPARC64, so always #include <linux/of_device.h>.
>
> drivers/net/niu.c:9700: warning: 'struct of_device' declared inside parameter list
> drivers/net/niu.c:9700: warning: its scope is only this definition or declaration, which is probably not what you want
> drivers/net/niu.c:9716: warning: assignment from incompatible pointer type
>
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> Cc:     Grant Likely <grant.likely@secretlab.ca>
> Cc:     Dave Miller <davem@davemloft.net>
> ---
>  drivers/net/niu.c |    3 ---

Looks okay to me (but I haven't build tested it yet).  The bulk of
of_device.h is compiled out when CONFIG_OF_DEVICE is not selected.

David, are you okay with me taking this via my tree as it depends on
Randy's other patch?

Thanks,
g.


>  1 file changed, 3 deletions(-)
>
> --- linux-next-20100609.orig/drivers/net/niu.c
> +++ linux-next-20100609/drivers/net/niu.c
> @@ -28,10 +28,7 @@
>  #include <linux/slab.h>
>
>  #include <linux/io.h>
> -
> -#ifdef CONFIG_SPARC64
>  #include <linux/of_device.h>
> -#endif
>
>  #include "niu.h"
>
>



-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 1/2 -next] of_device.h: provide struct of_device even when  not enabled
  2010-06-09 22:44     ` [PATCH 1/2 -next] of_device.h: provide struct of_device even when not enabled Randy Dunlap
@ 2010-06-09 23:47         ` Grant Likely
  0 siblings, 0 replies; 23+ messages in thread
From: Grant Likely @ 2010-06-09 23:47 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: David Miller, sfr, netdev, linux-next, linux-kernel

On Wed, Jun 9, 2010 at 4:44 PM, Randy Dunlap <randy.dunlap@oracle.com> wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> Drivers may use struct of_device (struct platform_device), even when
> CONFIG_OF_DEVICE is not enabled, so minimally provide that struct
> for that kconfig case.
>
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> Cc:     Grant Likely <grant.likely@secretlab.ca>
> Cc:     Dave Miller <davem@davemloft.net>
> ---
>  include/linux/of_device.h |    4 ++++
>  1 file changed, 4 insertions(+)
>
> --- linux-next-20100609.orig/include/linux/of_device.h
> +++ linux-next-20100609/include/linux/of_device.h
> @@ -47,6 +47,10 @@ extern ssize_t of_device_get_modalias(st
>
>  extern int of_device_uevent(struct device *dev, struct kobj_uevent_env *env);
>
> +#else
> +
> +#include <linux/platform_device.h>
> +#define of_device platform_device

I should probably just move these 2 lines out of the #if/else/endif
block entirely.  I'll make that change and test it out.

g.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 1/2 -next] of_device.h: provide struct of_device even when not enabled
@ 2010-06-09 23:47         ` Grant Likely
  0 siblings, 0 replies; 23+ messages in thread
From: Grant Likely @ 2010-06-09 23:47 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: David Miller, sfr, netdev, linux-next, linux-kernel

On Wed, Jun 9, 2010 at 4:44 PM, Randy Dunlap <randy.dunlap@oracle.com> wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> Drivers may use struct of_device (struct platform_device), even when
> CONFIG_OF_DEVICE is not enabled, so minimally provide that struct
> for that kconfig case.
>
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> Cc:     Grant Likely <grant.likely@secretlab.ca>
> Cc:     Dave Miller <davem@davemloft.net>
> ---
>  include/linux/of_device.h |    4 ++++
>  1 file changed, 4 insertions(+)
>
> --- linux-next-20100609.orig/include/linux/of_device.h
> +++ linux-next-20100609/include/linux/of_device.h
> @@ -47,6 +47,10 @@ extern ssize_t of_device_get_modalias(st
>
>  extern int of_device_uevent(struct device *dev, struct kobj_uevent_env *env);
>
> +#else
> +
> +#include <linux/platform_device.h>
> +#define of_device platform_device

I should probably just move these 2 lines out of the #if/else/endif
block entirely.  I'll make that change and test it out.

g.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH 2/2 -next] niu: always include of_device.h
  2010-06-09 23:45       ` Grant Likely
@ 2010-06-10  0:29         ` David Miller
  0 siblings, 0 replies; 23+ messages in thread
From: David Miller @ 2010-06-10  0:29 UTC (permalink / raw)
  To: grant.likely; +Cc: randy.dunlap, sfr, netdev, linux-next, linux-kernel

From: Grant Likely <grant.likely@secretlab.ca>
Date: Wed, 9 Jun 2010 17:45:54 -0600

> On Wed, Jun 9, 2010 at 4:44 PM, Randy Dunlap <randy.dunlap@oracle.com> wrote:
>> From: Randy Dunlap <randy.dunlap@oracle.com>
>>
>> The niu driver uses struct of_device when built on any arch, not
>> only SPARC64, so always #include <linux/of_device.h>.
>>
>> drivers/net/niu.c:9700: warning: 'struct of_device' declared inside parameter list
>> drivers/net/niu.c:9700: warning: its scope is only this definition or declaration, which is probably not what you want
>> drivers/net/niu.c:9716: warning: assignment from incompatible pointer type
>>
>> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
>> Cc:     Grant Likely <grant.likely@secretlab.ca>
>> Cc:     Dave Miller <davem@davemloft.net>
>> ---
>>  drivers/net/niu.c |    3 ---
> 
> Looks okay to me (but I haven't build tested it yet).  The bulk of
> of_device.h is compiled out when CONFIG_OF_DEVICE is not selected.
> 
> David, are you okay with me taking this via my tree as it depends on
> Randy's other patch?

Yep, that's totally fine with me:

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] input: fixup X86_MRST selects
  2010-06-09 22:42     ` Randy Dunlap
@ 2010-06-10 19:04       ` Dmitry Torokhov
  2010-06-15 15:17         ` Randy Dunlap
  2010-06-28 19:03         ` problem: " Randy Dunlap
  0 siblings, 2 replies; 23+ messages in thread
From: Dmitry Torokhov @ 2010-06-10 19:04 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Stephen Rothwell, Jacob Pan, linux-next, LKML, linux-input, akpm

On Wednesday, June 09, 2010 03:42:08 pm Randy Dunlap wrote:
> On 06/09/10 15:40, Dmitry Torokhov wrote:
> > On Wednesday, June 09, 2010 03:29:21 pm Randy Dunlap wrote:
> >> +++ linux-next-20100609/drivers/input/keyboard/Kconfig
> >> @@ -70,9 +70,10 @@ config KEYBOARD_ATARI
> >>  
> >>  config KEYBOARD_ATKBD
> >>         tristate "AT keyboard" if EMBEDDED || !X86
> >> +       depends on !X86 || (X86 && !X86_MRST)
> > 
> > Should it be simply 'depends on !X86_MRST' and then we could kill
> > '!X86_MRST' conditionals in selects?
> 
> Duh, that sounds good, yes.

Actually, I do not think this is a correct approach. While Moorestown does
not have i8042 theoretically it is possible to add AT-style keyboard by
other means (however unlikely it is) so we should not be disabling it.

We should, however, disallow i8042 from being selected. Could you please
tell me if the patch below works for you?

Thanks!

-- 
Dmitry

Input: fixup X86_MRST selects

From: Randy Dunlap <randy.dunlap@oracle.com>

Some of the recent X86_MRST additions make some "select"s
conditional on X86_MRST but missed some related kconfig symbols,
causing:

drivers/built-in.o: In function `ps2_end_command':
(.text+0x257ab2): undefined reference to `i8042_check_port_owner'
drivers/built-in.o: In function `ps2_end_command':
(.text+0x257ae1): undefined reference to `i8042_unlock_chip'
drivers/built-in.o: In function `ps2_begin_command':
(.text+0x257b40): undefined reference to `i8042_check_port_owner'
drivers/built-in.o: In function `ps2_begin_command':
(.text+0x257b6f): undefined reference to `i8042_lock_chip'

when SERIO_I8042=m, SERIO_LIBPS2=y, KEYBOARD_ATKBD=y.

We need to make i8042 dependant upon !X86_MRST and allow deselecting
atkbd on Moorestown even when !CONFIG_EMBEDDED.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Jacob Pan <jacob.jun.pan@intel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

 drivers/input/keyboard/Kconfig |    2 +-
 drivers/input/serio/Kconfig    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
index 9522b89..d3a99de 100644
--- a/drivers/input/keyboard/Kconfig
+++ b/drivers/input/keyboard/Kconfig
@@ -69,7 +69,7 @@ config KEYBOARD_ATARI
 	  module will be called atakbd.
 
 config KEYBOARD_ATKBD
-	tristate "AT keyboard" if EMBEDDED || !X86
+	tristate "AT keyboard" if EMBEDDED || !X86 || X86_MRST
 	default y
 	select SERIO
 	select SERIO_LIBPS2
diff --git a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig
index 3bfe8fa..256b9e9 100644
--- a/drivers/input/serio/Kconfig
+++ b/drivers/input/serio/Kconfig
@@ -22,7 +22,7 @@ config SERIO_I8042
 	tristate "i8042 PC Keyboard controller" if EMBEDDED || !X86
 	default y
 	depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && \
-		   (!SUPERH || SH_CAYMAN) && !M68K && !BLACKFIN
+		   (!SUPERH || SH_CAYMAN) && !M68K && !BLACKFIN && !X86_MRST
 	help
 	  i8042 is the chip over which the standard AT keyboard and PS/2
 	  mouse are connected to the computer. If you use these devices,

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH] input: fixup X86_MRST selects
  2010-06-10 19:04       ` Dmitry Torokhov
@ 2010-06-15 15:17         ` Randy Dunlap
  2010-06-28 19:03         ` problem: " Randy Dunlap
  1 sibling, 0 replies; 23+ messages in thread
From: Randy Dunlap @ 2010-06-15 15:17 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Stephen Rothwell, Jacob Pan, linux-next, LKML, linux-input, akpm

On 06/10/10 12:04, Dmitry Torokhov wrote:
> On Wednesday, June 09, 2010 03:42:08 pm Randy Dunlap wrote:
>> On 06/09/10 15:40, Dmitry Torokhov wrote:
>>> On Wednesday, June 09, 2010 03:29:21 pm Randy Dunlap wrote:
>>>> +++ linux-next-20100609/drivers/input/keyboard/Kconfig
>>>> @@ -70,9 +70,10 @@ config KEYBOARD_ATARI
>>>>  
>>>>  config KEYBOARD_ATKBD
>>>>         tristate "AT keyboard" if EMBEDDED || !X86
>>>> +       depends on !X86 || (X86 && !X86_MRST)
>>>
>>> Should it be simply 'depends on !X86_MRST' and then we could kill
>>> '!X86_MRST' conditionals in selects?
>>
>> Duh, that sounds good, yes.
> 
> Actually, I do not think this is a correct approach. While Moorestown does
> not have i8042 theoretically it is possible to add AT-style keyboard by
> other means (however unlikely it is) so we should not be disabling it.
> 
> We should, however, disallow i8042 from being selected. Could you please
> tell me if the patch below works for you?

Yes, that's good.  Thanks.

-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply	[flat|nested] 23+ messages in thread

* problem: Re: [PATCH] input: fixup X86_MRST selects
  2010-06-10 19:04       ` Dmitry Torokhov
  2010-06-15 15:17         ` Randy Dunlap
@ 2010-06-28 19:03         ` Randy Dunlap
  2010-06-28 20:18           ` Dmitry Torokhov
  1 sibling, 1 reply; 23+ messages in thread
From: Randy Dunlap @ 2010-06-28 19:03 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Stephen Rothwell, Jacob Pan, linux-next, LKML, linux-input, akpm,
	chuck.lever

On 06/10/10 12:04, Dmitry Torokhov wrote:
> On Wednesday, June 09, 2010 03:42:08 pm Randy Dunlap wrote:
>> On 06/09/10 15:40, Dmitry Torokhov wrote:
>>> On Wednesday, June 09, 2010 03:29:21 pm Randy Dunlap wrote:
>>>> +++ linux-next-20100609/drivers/input/keyboard/Kconfig
>>>> @@ -70,9 +70,10 @@ config KEYBOARD_ATARI
>>>>  
>>>>  config KEYBOARD_ATKBD
>>>>         tristate "AT keyboard" if EMBEDDED || !X86
>>>> +       depends on !X86 || (X86 && !X86_MRST)
>>>
>>> Should it be simply 'depends on !X86_MRST' and then we could kill
>>> '!X86_MRST' conditionals in selects?
>>
>> Duh, that sounds good, yes.
> 
> Actually, I do not think this is a correct approach. While Moorestown does
> not have i8042 theoretically it is possible to add AT-style keyboard by
> other means (however unlikely it is) so we should not be disabling it.
> 
> We should, however, disallow i8042 from being selected. Could you please
> tell me if the patch below works for you?

Dmitry,

This patch (in current mainline git) causes a problem when X86_MRST is enabled.
CONFIG_SERIO_I8042 is no longer enabled when X86_MRST is enabled,
and X86_MRST could be enabled when someone is trying to build a generic kernel.

-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: problem: Re: [PATCH] input: fixup X86_MRST selects
  2010-06-28 19:03         ` problem: " Randy Dunlap
@ 2010-06-28 20:18           ` Dmitry Torokhov
  2010-06-28 20:23             ` Randy Dunlap
  0 siblings, 1 reply; 23+ messages in thread
From: Dmitry Torokhov @ 2010-06-28 20:18 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Stephen Rothwell, Jacob Pan, linux-next, LKML, linux-input, akpm,
	chuck.lever

On Monday, June 28, 2010 12:03:44 pm Randy Dunlap wrote:
> On 06/10/10 12:04, Dmitry Torokhov wrote:
> > On Wednesday, June 09, 2010 03:42:08 pm Randy Dunlap wrote:
> >> On 06/09/10 15:40, Dmitry Torokhov wrote:
> >>> On Wednesday, June 09, 2010 03:29:21 pm Randy Dunlap wrote:
> >>>> +++ linux-next-20100609/drivers/input/keyboard/Kconfig
> >>>> @@ -70,9 +70,10 @@ config KEYBOARD_ATARI
> >>>> 
> >>>>  config KEYBOARD_ATKBD
> >>>>  
> >>>>         tristate "AT keyboard" if EMBEDDED || !X86
> >>>> 
> >>>> +       depends on !X86 || (X86 && !X86_MRST)
> >>> 
> >>> Should it be simply 'depends on !X86_MRST' and then we could kill
> >>> '!X86_MRST' conditionals in selects?
> >> 
> >> Duh, that sounds good, yes.
> > 
> > Actually, I do not think this is a correct approach. While Moorestown
> > does not have i8042 theoretically it is possible to add AT-style
> > keyboard by other means (however unlikely it is) so we should not be
> > disabling it.
> > 
> > We should, however, disallow i8042 from being selected. Could you please
> > tell me if the patch below works for you?
> 
> Dmitry,
> 
> This patch (in current mainline git) causes a problem when X86_MRST is
> enabled. CONFIG_SERIO_I8042 is no longer enabled when X86_MRST is enabled,
> and X86_MRST could be enabled when someone is trying to build a generic
> kernel.

Randy,

Looking at arch/x86/kernel/mrst.c I am not sure if generic kernel will
work well witbh X86_MRST set. However if we supposed to support Moorestown
on generic images then, instead of playing with Kconfig, we need to adjust
i8042_platform_init() to abort on Moorestown.

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: problem: Re: [PATCH] input: fixup X86_MRST selects
  2010-06-28 20:18           ` Dmitry Torokhov
@ 2010-06-28 20:23             ` Randy Dunlap
  2010-06-28 21:12               ` Pan, Jacob jun
  0 siblings, 1 reply; 23+ messages in thread
From: Randy Dunlap @ 2010-06-28 20:23 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Stephen Rothwell, Jacob Pan, linux-next, LKML, linux-input, akpm,
	chuck.lever

On 06/28/10 13:18, Dmitry Torokhov wrote:
> On Monday, June 28, 2010 12:03:44 pm Randy Dunlap wrote:
>> On 06/10/10 12:04, Dmitry Torokhov wrote:
>>> On Wednesday, June 09, 2010 03:42:08 pm Randy Dunlap wrote:
>>>> On 06/09/10 15:40, Dmitry Torokhov wrote:
>>>>> On Wednesday, June 09, 2010 03:29:21 pm Randy Dunlap wrote:
>>>>>> +++ linux-next-20100609/drivers/input/keyboard/Kconfig
>>>>>> @@ -70,9 +70,10 @@ config KEYBOARD_ATARI
>>>>>>
>>>>>>  config KEYBOARD_ATKBD
>>>>>>  
>>>>>>         tristate "AT keyboard" if EMBEDDED || !X86
>>>>>>
>>>>>> +       depends on !X86 || (X86 && !X86_MRST)
>>>>>
>>>>> Should it be simply 'depends on !X86_MRST' and then we could kill
>>>>> '!X86_MRST' conditionals in selects?
>>>>
>>>> Duh, that sounds good, yes.
>>>
>>> Actually, I do not think this is a correct approach. While Moorestown
>>> does not have i8042 theoretically it is possible to add AT-style
>>> keyboard by other means (however unlikely it is) so we should not be
>>> disabling it.
>>>
>>> We should, however, disallow i8042 from being selected. Could you please
>>> tell me if the patch below works for you?
>>
>> Dmitry,
>>
>> This patch (in current mainline git) causes a problem when X86_MRST is
>> enabled. CONFIG_SERIO_I8042 is no longer enabled when X86_MRST is enabled,
>> and X86_MRST could be enabled when someone is trying to build a generic
>> kernel.
> 
> Randy,
> 
> Looking at arch/x86/kernel/mrst.c I am not sure if generic kernel will
> work well witbh X86_MRST set. However if we supposed to support Moorestown
> on generic images then, instead of playing with Kconfig, we need to adjust
> i8042_platform_init() to abort on Moorestown.

OK.  Until something else is done, you might want to revert this patch
and just live with the build errors (that caused me to send the original
patch).

-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply	[flat|nested] 23+ messages in thread

* RE: problem: Re: [PATCH] input: fixup X86_MRST selects
  2010-06-28 20:23             ` Randy Dunlap
@ 2010-06-28 21:12               ` Pan, Jacob jun
  2010-06-28 22:44                 ` Dmitry Torokhov
  0 siblings, 1 reply; 23+ messages in thread
From: Pan, Jacob jun @ 2010-06-28 21:12 UTC (permalink / raw)
  To: Randy Dunlap, Dmitry Torokhov
  Cc: Stephen Rothwell, linux-next, LKML, linux-input, akpm,
	chuck.lever, H. Peter Anvin



>-----Original Message-----
>From: Randy Dunlap [mailto:randy.dunlap@oracle.com]
>Sent: Monday, June 28, 2010 1:24 PM
>To: Dmitry Torokhov
>Cc: Stephen Rothwell; Pan, Jacob jun; linux-next@vger.kernel.org; LKML;
>linux-input@vger.kernel.org; akpm; chuck.lever@oracle.com
>Subject: Re: problem: Re: [PATCH] input: fixup X86_MRST selects
>
>On 06/28/10 13:18, Dmitry Torokhov wrote:
>> On Monday, June 28, 2010 12:03:44 pm Randy Dunlap wrote:
>>> On 06/10/10 12:04, Dmitry Torokhov wrote:
>>>> On Wednesday, June 09, 2010 03:42:08 pm Randy Dunlap wrote:
>>>>> On 06/09/10 15:40, Dmitry Torokhov wrote:
>>>>>> On Wednesday, June 09, 2010 03:29:21 pm Randy Dunlap wrote:
>>>>>>> +++ linux-next-20100609/drivers/input/keyboard/Kconfig
>>>>>>> @@ -70,9 +70,10 @@ config KEYBOARD_ATARI
>>>>>>>
>>>>>>>  config KEYBOARD_ATKBD
>>>>>>>
>>>>>>>         tristate "AT keyboard" if EMBEDDED || !X86
>>>>>>>
>>>>>>> +       depends on !X86 || (X86 && !X86_MRST)
>>>>>>
>>>>>> Should it be simply 'depends on !X86_MRST' and then we could kill
>>>>>> '!X86_MRST' conditionals in selects?
>>>>>
>>>>> Duh, that sounds good, yes.
>>>>
>>>> Actually, I do not think this is a correct approach. While
>Moorestown
>>>> does not have i8042 theoretically it is possible to add AT-style
>>>> keyboard by other means (however unlikely it is) so we should not be
>>>> disabling it.
>>>>
>>>> We should, however, disallow i8042 from being selected. Could you
>please
>>>> tell me if the patch below works for you?
>>>
>>> Dmitry,
>>>
>>> This patch (in current mainline git) causes a problem when X86_MRST
>is
>>> enabled. CONFIG_SERIO_I8042 is no longer enabled when X86_MRST is
>enabled,
>>> and X86_MRST could be enabled when someone is trying to build a
>generic
>>> kernel.
>>
>> Randy,
>>
>> Looking at arch/x86/kernel/mrst.c I am not sure if generic kernel will
>> work well witbh X86_MRST set. However if we supposed to support
>Moorestown
>> on generic images then, instead of playing with Kconfig, we need to
>adjust
>> i8042_platform_init() to abort on Moorestown.
>
>OK.  Until something else is done, you might want to revert this patch
>and just live with the build errors (that caused me to send the original
>patch).
>
We do intend to maintain binary compatibility between generic kernel and Moorestown.
I guess the challenge is not having enumeration of i8042 pass to the driver. Do you
prefer abort i8042_platform_init() based on #define CONFIG_X86_MRST? It is no safe
to probe HW on Moorestown, unfortunately.


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: problem: Re: [PATCH] input: fixup X86_MRST selects
  2010-06-28 21:12               ` Pan, Jacob jun
@ 2010-06-28 22:44                 ` Dmitry Torokhov
  2010-06-28 23:22                   ` Pan, Jacob jun
  0 siblings, 1 reply; 23+ messages in thread
From: Dmitry Torokhov @ 2010-06-28 22:44 UTC (permalink / raw)
  To: Pan, Jacob jun
  Cc: Randy Dunlap, Stephen Rothwell, linux-next, LKML, linux-input,
	akpm, chuck.lever, H. Peter Anvin

On Mon, Jun 28, 2010 at 02:12:03PM -0700, Pan, Jacob jun wrote:
> >
> We do intend to maintain binary compatibility between generic kernel and Moorestown.
> I guess the challenge is not having enumeration of i8042 pass to the driver. Do you
> prefer abort i8042_platform_init() based on #define CONFIG_X86_MRST? It is no safe
> to probe HW on Moorestown, unfortunately.

Any check based on CONFIG_X86_MRST means that kernel is not generic.
We'd need a runtime check (but not necessarily one that bangs ports). Is
there something in processor flags, or DMI, or similar that woudl allow
i8042 to see that it runs on Moorestown?

-- 
Dmitry

^ permalink raw reply	[flat|nested] 23+ messages in thread

* RE: problem: Re: [PATCH] input: fixup X86_MRST selects
  2010-06-28 22:44                 ` Dmitry Torokhov
@ 2010-06-28 23:22                   ` Pan, Jacob jun
  2010-07-02  4:46                     ` Dmitry Torokhov
  0 siblings, 1 reply; 23+ messages in thread
From: Pan, Jacob jun @ 2010-06-28 23:22 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Randy Dunlap, Stephen Rothwell, linux-next, LKML, linux-input,
	akpm, chuck.lever, H. Peter Anvin, Arjan van de Ven,
	Thomas Gleixner

There is no DMI support yet in MRST FW.
We have a new x86 HW subarch ID in boot_param, then we use it to select x86_init abstractions. Both boot_param and x86_init are x86 arch specific so I guess we can use them in 8042 driver under CONFIG_X86. Not sure if it is possible to move x86 i8042_platform_init under x86_init (the x86 part).

>-----Original Message-----
>From: Dmitry Torokhov [mailto:dmitry.torokhov@gmail.com]
>Sent: Monday, June 28, 2010 3:45 PM
>To: Pan, Jacob jun
>Cc: Randy Dunlap; Stephen Rothwell; linux-next@vger.kernel.org; LKML;
>linux-input@vger.kernel.org; akpm; chuck.lever@oracle.com; H. Peter
>Anvin
>Subject: Re: problem: Re: [PATCH] input: fixup X86_MRST selects
>
>On Mon, Jun 28, 2010 at 02:12:03PM -0700, Pan, Jacob jun wrote:
>> >
>> We do intend to maintain binary compatibility between generic kernel
>and Moorestown.
>> I guess the challenge is not having enumeration of i8042 pass to the
>driver. Do you
>> prefer abort i8042_platform_init() based on #define CONFIG_X86_MRST?
>It is no safe
>> to probe HW on Moorestown, unfortunately.
>
>Any check based on CONFIG_X86_MRST means that kernel is not generic.
>We'd need a runtime check (but not necessarily one that bangs ports). Is
>there something in processor flags, or DMI, or similar that woudl allow
>i8042 to see that it runs on Moorestown?
>
>--
>Dmitry

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: problem: Re: [PATCH] input: fixup X86_MRST selects
  2010-06-28 23:22                   ` Pan, Jacob jun
@ 2010-07-02  4:46                     ` Dmitry Torokhov
  2010-07-02  6:27                       ` H. Peter Anvin
  0 siblings, 1 reply; 23+ messages in thread
From: Dmitry Torokhov @ 2010-07-02  4:46 UTC (permalink / raw)
  To: Pan, Jacob jun
  Cc: Randy Dunlap, Stephen Rothwell, linux-next, LKML, linux-input,
	akpm, chuck.lever, H. Peter Anvin, Arjan van de Ven,
	Thomas Gleixner, kphillisjr

On Mon, Jun 28, 2010 at 04:22:03PM -0700, Pan, Jacob jun wrote:
> There is no DMI support yet in MRST FW.  We have a new x86 HW subarch
> ID in boot_param, then we use it to select x86_init abstractions. Both
> boot_param and x86_init are x86 arch specific so I guess we can use
> them in 8042 driver under CONFIG_X86. Not sure if it is possible to
> move x86 i8042_platform_init under x86_init (the x86 part).
> 

Moving i8042_platform_init() into platform code is quite invasive,
how about we to the following?

Thanks.

-- 
Dmitry


Input: i8042 - detect legacy-free platforms (Moorestown)

Moorestown does not have legacy hardware (i8042, i8259) and does not
like legacy ports being poked by drivers. Instead of playing with
Kconfig selections let's check if we set up dummy (null) legacy PIC
during startup and abort i8042 initialization as well. This should
fix the following bug:

	https://bugzilla.kernel.org/show_bug.cgi?id=16326

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

 drivers/input/keyboard/Kconfig        |    4 ++--
 drivers/input/mouse/Kconfig           |    2 +-
 drivers/input/serio/Kconfig           |    2 +-
 drivers/input/serio/i8042-x86ia64io.h |   18 ++++++++++++++++++
 4 files changed, 22 insertions(+), 4 deletions(-)


diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
index d3a99de..b25917b 100644
--- a/drivers/input/keyboard/Kconfig
+++ b/drivers/input/keyboard/Kconfig
@@ -69,11 +69,11 @@ config KEYBOARD_ATARI
 	  module will be called atakbd.
 
 config KEYBOARD_ATKBD
-	tristate "AT keyboard" if EMBEDDED || !X86 || X86_MRST
+	tristate "AT keyboard" if EMBEDDED || !X86
 	default y
 	select SERIO
 	select SERIO_LIBPS2
-	select SERIO_I8042 if X86 && !X86_MRST
+	select SERIO_I8042 if X86
 	select SERIO_GSCPS2 if GSC
 	help
 	  Say Y here if you want to use a standard AT or PS/2 keyboard. Usually
diff --git a/drivers/input/mouse/Kconfig b/drivers/input/mouse/Kconfig
index eeb58c1..c714ca2 100644
--- a/drivers/input/mouse/Kconfig
+++ b/drivers/input/mouse/Kconfig
@@ -17,7 +17,7 @@ config MOUSE_PS2
 	default y
 	select SERIO
 	select SERIO_LIBPS2
-	select SERIO_I8042 if X86 && !X86_MRST
+	select SERIO_I8042 if X86
 	select SERIO_GSCPS2 if GSC
 	help
 	  Say Y here if you have a PS/2 mouse connected to your system. This
diff --git a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig
index 256b9e9..3bfe8fa 100644
--- a/drivers/input/serio/Kconfig
+++ b/drivers/input/serio/Kconfig
@@ -22,7 +22,7 @@ config SERIO_I8042
 	tristate "i8042 PC Keyboard controller" if EMBEDDED || !X86
 	default y
 	depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && \
-		   (!SUPERH || SH_CAYMAN) && !M68K && !BLACKFIN && !X86_MRST
+		   (!SUPERH || SH_CAYMAN) && !M68K && !BLACKFIN
 	help
 	  i8042 is the chip over which the standard AT keyboard and PS/2
 	  mouse are connected to the computer. If you use these devices,
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
index 723106c..a6a4a2f 100644
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -844,10 +844,28 @@ static inline int i8042_pnp_init(void) { return 0; }
 static inline void i8042_pnp_exit(void) { }
 #endif
 
+#if CONFIG_X86
+#include <asm/i8259.h>
+static bool i8042_legacy_free_platform(void)
+{
+	/*
+	 * Moorestown platform does not have i8042 nor does it
+	 * have other legacy devices, such as i8259. Use ths fact
+	 * to detect that we are running on a legacy-free platform.
+	 */
+	return legacy_pic == &null_legacy_pic;
+}
+#else
+static bool i8042_legacy_free_platform(void) { }
+#endif
+
 static int __init i8042_platform_init(void)
 {
 	int retval;
 
+	if (i8042_legacy_free_platform())
+		return -ENXIO;
+
 /*
  * On ix86 platforms touching the i8042 data register region can do really
  * bad things. Because of this the region is always reserved on ix86 boxes.

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: problem: Re: [PATCH] input: fixup X86_MRST selects
  2010-07-02  4:46                     ` Dmitry Torokhov
@ 2010-07-02  6:27                       ` H. Peter Anvin
  0 siblings, 0 replies; 23+ messages in thread
From: H. Peter Anvin @ 2010-07-02  6:27 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Pan, Jacob jun, Randy Dunlap, Stephen Rothwell, linux-next, LKML,
	linux-input, akpm, chuck.lever, Arjan van de Ven,
	Thomas Gleixner, kphillisjr

On 07/01/2010 09:46 PM, Dmitry Torokhov wrote:
> On Mon, Jun 28, 2010 at 04:22:03PM -0700, Pan, Jacob jun wrote:
>> There is no DMI support yet in MRST FW.  We have a new x86 HW subarch
>> ID in boot_param, then we use it to select x86_init abstractions. Both
>> boot_param and x86_init are x86 arch specific so I guess we can use
>> them in 8042 driver under CONFIG_X86. Not sure if it is possible to
>> move x86 i8042_platform_init under x86_init (the x86 part).
>>
> 
> Moving i8042_platform_init() into platform code is quite invasive,
> how about we to the following?
> 
> Thanks.
> 

Uck, no!

	----
Moorestown does not have legacy hardware (i8042, i8259) and does not
like legacy ports being poked by drivers. Instead of playing with
Kconfig selections let's check if we set up dummy (null) legacy PIC
during startup and abort i8042 initialization as well. This should
fix the following bug:
	----

The presence of 8042 and 8259 are orthogonal.  In fact, there are quite
a few systems on the market which have 8259 but not 8042, and at least
having the ability to handle that correctly instead of just assuming
that those I/O ports are safe is pretty key.

So please don't commingle these completely unrelated platform attributes.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2010-07-02  6:27 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-09  3:34 linux-next: Tree for June 9 Stephen Rothwell
2010-06-09 17:36 ` linux-next: Tree for June 9 (niu) Randy Dunlap
2010-06-09 18:06   ` David Miller
2010-06-09 18:08     ` Randy Dunlap
2010-06-09 22:44     ` [PATCH 1/2 -next] of_device.h: provide struct of_device even when not enabled Randy Dunlap
2010-06-09 23:47       ` Grant Likely
2010-06-09 23:47         ` Grant Likely
2010-06-09 22:44     ` [PATCH 2/2 -next] niu: always include of_device.h Randy Dunlap
2010-06-09 23:45       ` Grant Likely
2010-06-10  0:29         ` David Miller
2010-06-09 22:29 ` [PATCH] input: fixup X86_MRST selects Randy Dunlap
2010-06-09 22:40   ` Dmitry Torokhov
2010-06-09 22:42     ` Randy Dunlap
2010-06-10 19:04       ` Dmitry Torokhov
2010-06-15 15:17         ` Randy Dunlap
2010-06-28 19:03         ` problem: " Randy Dunlap
2010-06-28 20:18           ` Dmitry Torokhov
2010-06-28 20:23             ` Randy Dunlap
2010-06-28 21:12               ` Pan, Jacob jun
2010-06-28 22:44                 ` Dmitry Torokhov
2010-06-28 23:22                   ` Pan, Jacob jun
2010-07-02  4:46                     ` Dmitry Torokhov
2010-07-02  6:27                       ` H. Peter Anvin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.