Merge commit 'v3.2-rc3' into stable/for-linus-3.3
* commit 'v3.2-rc3': (412 commits) Linux 3.2-rc3 virtio-pci: make reset operation safer virtio-mmio: Correct the name of the guest features selector virtio: add HAS_IOMEM dependency to MMIO platform bus driver eCryptfs: Extend array bounds for all filename chars eCryptfs: Flush file in vma close eCryptfs: Prevent file create race condition regulator: TPS65910: Fix VDD1/2 voltage selector count i2c: Make i2cdev_notifier_call static i2c: Delete ANY_I2C_BUS i2c: Fix device name for 10-bit slave address i2c-algo-bit: Generate correct i2c address sequence for 10-bit target drm: integer overflow in drm_mode_dirtyfb_ioctl() Revert "of/irq: of_irq_find_parent: check for parent equal to child" drivers/gpu/vga/vgaarb.c: add missing kfree drm/radeon/kms/atom: unify i2c gpio table handling drm/radeon/kms: fix up gpio i2c mask bits for r4xx for real ttm: Don't return the bo reserved on error path mount_subtree() pointless use-after-free iio: fix a leak due to improper use of anon_inode_getfd() ...
This commit is contained in:
		
				commit
				
					
						cb85f123cd
					
				
			
		
					 451 changed files with 3853 additions and 3325 deletions
				
			
		| 
						 | 
					@ -206,16 +206,3 @@ Description:
 | 
				
			||||||
		when a discarded area is read the discard_zeroes_data
 | 
							when a discarded area is read the discard_zeroes_data
 | 
				
			||||||
		parameter will be set to one. Otherwise it will be 0 and
 | 
							parameter will be set to one. Otherwise it will be 0 and
 | 
				
			||||||
		the result of reading a discarded area is undefined.
 | 
							the result of reading a discarded area is undefined.
 | 
				
			||||||
What:		/sys/block/<disk>/alias
 | 
					 | 
				
			||||||
Date:		Aug 2011
 | 
					 | 
				
			||||||
Contact:	Nao Nishijima <nao.nishijima.xt@hitachi.com>
 | 
					 | 
				
			||||||
Description:
 | 
					 | 
				
			||||||
		A raw device name of a disk does not always point a same disk
 | 
					 | 
				
			||||||
		each boot-up time. Therefore, users have to use persistent
 | 
					 | 
				
			||||||
		device names, which udev creates when the kernel finds a disk,
 | 
					 | 
				
			||||||
		instead of raw device name. However, kernel doesn't show those
 | 
					 | 
				
			||||||
		persistent names on its messages (e.g. dmesg).
 | 
					 | 
				
			||||||
		This file can store an alias of the disk and it would be
 | 
					 | 
				
			||||||
		appeared in kernel messages if it is set. A disk can have an
 | 
					 | 
				
			||||||
		alias which length is up to 255bytes. Users can use alphabets,
 | 
					 | 
				
			||||||
		numbers, "-" and "_" in alias name. This file is writeonce.
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -520,6 +520,11 @@ Here's a description of the fields of <varname>struct uio_mem</varname>:
 | 
				
			||||||
</para>
 | 
					</para>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<itemizedlist>
 | 
					<itemizedlist>
 | 
				
			||||||
 | 
					<listitem><para>
 | 
				
			||||||
 | 
					<varname>const char *name</varname>: Optional. Set this to help identify
 | 
				
			||||||
 | 
					the memory region, it will show up in the corresponding sysfs node.
 | 
				
			||||||
 | 
					</para></listitem>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<listitem><para>
 | 
					<listitem><para>
 | 
				
			||||||
<varname>int memtype</varname>: Required if the mapping is used. Set this to
 | 
					<varname>int memtype</varname>: Required if the mapping is used. Set this to
 | 
				
			||||||
<varname>UIO_MEM_PHYS</varname> if you you have physical memory on your
 | 
					<varname>UIO_MEM_PHYS</varname> if you you have physical memory on your
 | 
				
			||||||
| 
						 | 
					@ -553,7 +558,7 @@ instead to remember such an address.
 | 
				
			||||||
</itemizedlist>
 | 
					</itemizedlist>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<para>
 | 
					<para>
 | 
				
			||||||
Please do not touch the <varname>kobj</varname> element of
 | 
					Please do not touch the <varname>map</varname> element of
 | 
				
			||||||
<varname>struct uio_mem</varname>! It is used by the UIO framework
 | 
					<varname>struct uio_mem</varname>! It is used by the UIO framework
 | 
				
			||||||
to set up sysfs files for this mapping. Simply leave it alone.
 | 
					to set up sysfs files for this mapping. Simply leave it alone.
 | 
				
			||||||
</para>
 | 
					</para>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -98,14 +98,12 @@ You must enable "SCSI tape drive support for Smart Array 5xxx" and
 | 
				
			||||||
"SCSI support" in your kernel configuration to be able to use SCSI
 | 
					"SCSI support" in your kernel configuration to be able to use SCSI
 | 
				
			||||||
tape drives with your Smart Array 5xxx controller.
 | 
					tape drives with your Smart Array 5xxx controller.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Additionally, note that the driver will not engage the SCSI core at init 
 | 
					Additionally, note that the driver will engage the SCSI core at init
 | 
				
			||||||
time.  The driver must be directed to dynamically engage the SCSI core via 
 | 
					time if any tape drives or medium changers are detected.  The driver may
 | 
				
			||||||
the /proc filesystem entry which the "block" side of the driver creates as 
 | 
					also be directed to dynamically engage the SCSI core via the /proc filesystem
 | 
				
			||||||
/proc/driver/cciss/cciss* at runtime.  This is because at driver init time, 
 | 
					entry which the "block" side of the driver creates as
 | 
				
			||||||
the SCSI core may not yet be initialized (because the driver is a block 
 | 
					/proc/driver/cciss/cciss* at runtime.  This is best done via a script.
 | 
				
			||||||
driver) and attempting to register it with the SCSI core in such a case 
 | 
					
 | 
				
			||||||
would cause a hang.  This is best done via an initialization script 
 | 
					 | 
				
			||||||
(typically in /etc/init.d, but could vary depending on distribution). 
 | 
					 | 
				
			||||||
For example:
 | 
					For example:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for x in /proc/driver/cciss/cciss[0-9]*
 | 
						for x in /proc/driver/cciss/cciss[0-9]*
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,22 +1,24 @@
 | 
				
			||||||
The I2C protocol knows about two kinds of device addresses: normal 7 bit
 | 
					The I2C protocol knows about two kinds of device addresses: normal 7 bit
 | 
				
			||||||
addresses, and an extended set of 10 bit addresses. The sets of addresses
 | 
					addresses, and an extended set of 10 bit addresses. The sets of addresses
 | 
				
			||||||
do not intersect: the 7 bit address 0x10 is not the same as the 10 bit
 | 
					do not intersect: the 7 bit address 0x10 is not the same as the 10 bit
 | 
				
			||||||
address 0x10 (though a single device could respond to both of them). You
 | 
					address 0x10 (though a single device could respond to both of them).
 | 
				
			||||||
select a 10 bit address by adding an extra byte after the address
 | 
					 | 
				
			||||||
byte:
 | 
					 | 
				
			||||||
  S Addr7 Rd/Wr ....
 | 
					 | 
				
			||||||
becomes
 | 
					 | 
				
			||||||
  S 11110 Addr10 Rd/Wr
 | 
					 | 
				
			||||||
S is the start bit, Rd/Wr the read/write bit, and if you count the number
 | 
					 | 
				
			||||||
of bits, you will see the there are 8 after the S bit for 7 bit addresses,
 | 
					 | 
				
			||||||
and 16 after the S bit for 10 bit addresses.
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
WARNING! The current 10 bit address support is EXPERIMENTAL. There are
 | 
					I2C messages to and from 10-bit address devices have a different format.
 | 
				
			||||||
several places in the code that will cause SEVERE PROBLEMS with 10 bit
 | 
					See the I2C specification for the details.
 | 
				
			||||||
addresses, even though there is some basic handling and hooks. Also,
 | 
					 | 
				
			||||||
almost no supported adapter handles the 10 bit addresses correctly.
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
As soon as a real 10 bit address device is spotted 'in the wild', we
 | 
					The current 10 bit address support is minimal. It should work, however
 | 
				
			||||||
can and will add proper support. Right now, 10 bit address devices
 | 
					you can expect some problems along the way:
 | 
				
			||||||
are defined by the I2C protocol, but we have never seen a single device
 | 
					* Not all bus drivers support 10-bit addresses. Some don't because the
 | 
				
			||||||
which supports them.
 | 
					  hardware doesn't support them (SMBus doesn't require 10-bit address
 | 
				
			||||||
 | 
					  support for example), some don't because nobody bothered adding the
 | 
				
			||||||
 | 
					  code (or it's there but not working properly.) Software implementation
 | 
				
			||||||
 | 
					  (i2c-algo-bit) is known to work.
 | 
				
			||||||
 | 
					* Some optional features do not support 10-bit addresses. This is the
 | 
				
			||||||
 | 
					  case of automatic detection and instantiation of devices by their,
 | 
				
			||||||
 | 
					  drivers, for example.
 | 
				
			||||||
 | 
					* Many user-space packages (for example i2c-tools) lack support for
 | 
				
			||||||
 | 
					  10-bit addresses.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Note that 10-bit address devices are still pretty rare, so the limitations
 | 
				
			||||||
 | 
					listed above could stay for a long time, maybe even forever if nobody
 | 
				
			||||||
 | 
					needs them to be fixed.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,7 +20,7 @@ ip_no_pmtu_disc - BOOLEAN
 | 
				
			||||||
	default FALSE
 | 
						default FALSE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
min_pmtu - INTEGER
 | 
					min_pmtu - INTEGER
 | 
				
			||||||
	default 562 - minimum discovered Path MTU
 | 
						default 552 - minimum discovered Path MTU
 | 
				
			||||||
 | 
					
 | 
				
			||||||
route/max_size - INTEGER
 | 
					route/max_size - INTEGER
 | 
				
			||||||
	Maximum number of routes allowed in the kernel.  Increase
 | 
						Maximum number of routes allowed in the kernel.  Increase
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -97,15 +97,23 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	struct serial_rs485 rs485conf;
 | 
						struct serial_rs485 rs485conf;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Set RS485 mode: */
 | 
						/* Enable RS485 mode: */
 | 
				
			||||||
	rs485conf.flags |= SER_RS485_ENABLED;
 | 
						rs485conf.flags |= SER_RS485_ENABLED;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Set logical level for RTS pin equal to 1 when sending: */
 | 
				
			||||||
 | 
						rs485conf.flags |= SER_RS485_RTS_ON_SEND;
 | 
				
			||||||
 | 
						/* or, set logical level for RTS pin equal to 0 when sending: */
 | 
				
			||||||
 | 
						rs485conf.flags &= ~(SER_RS485_RTS_ON_SEND);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Set logical level for RTS pin equal to 1 after sending: */
 | 
				
			||||||
 | 
						rs485conf.flags |= SER_RS485_RTS_AFTER_SEND;
 | 
				
			||||||
 | 
						/* or, set logical level for RTS pin equal to 0 after sending: */
 | 
				
			||||||
 | 
						rs485conf.flags &= ~(SER_RS485_RTS_AFTER_SEND);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Set rts delay before send, if needed: */
 | 
						/* Set rts delay before send, if needed: */
 | 
				
			||||||
	rs485conf.flags |= SER_RS485_RTS_BEFORE_SEND;
 | 
					 | 
				
			||||||
	rs485conf.delay_rts_before_send = ...;
 | 
						rs485conf.delay_rts_before_send = ...;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Set rts delay after send, if needed: */
 | 
						/* Set rts delay after send, if needed: */
 | 
				
			||||||
	rs485conf.flags |= SER_RS485_RTS_AFTER_SEND;
 | 
					 | 
				
			||||||
	rs485conf.delay_rts_after_send = ...;
 | 
						rs485conf.delay_rts_after_send = ...;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Set this flag if you want to receive data even whilst sending data */
 | 
						/* Set this flag if you want to receive data even whilst sending data */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -579,7 +579,7 @@ Development Tree
 | 
				
			||||||
~~~~~~~~~~~~~~~~
 | 
					~~~~~~~~~~~~~~~~
 | 
				
			||||||
The latest development codes for HD-audio are found on sound git tree:
 | 
					The latest development codes for HD-audio are found on sound git tree:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
 | 
					- git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The master branch or for-next branches can be used as the main
 | 
					The master branch or for-next branches can be used as the main
 | 
				
			||||||
development branches in general while the HD-audio specific patches
 | 
					development branches in general while the HD-audio specific patches
 | 
				
			||||||
| 
						 | 
					@ -594,7 +594,7 @@ is, installed via the usual spells: configure, make and make
 | 
				
			||||||
install(-modules).  See INSTALL in the package.  The snapshot tarballs
 | 
					install(-modules).  See INSTALL in the package.  The snapshot tarballs
 | 
				
			||||||
are found at:
 | 
					are found at:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- ftp://ftp.kernel.org/pub/linux/kernel/people/tiwai/snapshot/
 | 
					- ftp://ftp.suse.com/pub/people/tiwai/snapshot/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Sending a Bug Report
 | 
					Sending a Bug Report
 | 
				
			||||||
| 
						 | 
					@ -696,7 +696,7 @@ via hda-verb won't change the mixer value.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The hda-verb program is found in the ftp directory:
 | 
					The hda-verb program is found in the ftp directory:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- ftp://ftp.kernel.org/pub/linux/kernel/people/tiwai/misc/
 | 
					- ftp://ftp.suse.com/pub/people/tiwai/misc/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Also a git repository is available:
 | 
					Also a git repository is available:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -764,7 +764,7 @@ operation, the jack plugging simulation, etc.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The package is found in:
 | 
					The package is found in:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- ftp://ftp.kernel.org/pub/linux/kernel/people/tiwai/misc/
 | 
					- ftp://ftp.suse.com/pub/people/tiwai/misc/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
A git repository is available:
 | 
					A git repository is available:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										26
									
								
								MAINTAINERS
									
										
									
									
									
								
							
							
						
						
									
										26
									
								
								MAINTAINERS
									
										
									
									
									
								
							| 
						 | 
					@ -1789,6 +1789,14 @@ F:	include/net/cfg80211.h
 | 
				
			||||||
F:	net/wireless/*
 | 
					F:	net/wireless/*
 | 
				
			||||||
X:	net/wireless/wext*
 | 
					X:	net/wireless/wext*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					CHAR and MISC DRIVERS
 | 
				
			||||||
 | 
					M:	Arnd Bergmann <arnd@arndb.de>
 | 
				
			||||||
 | 
					M:	Greg Kroah-Hartman <greg@kroah.com>
 | 
				
			||||||
 | 
					T:	git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
 | 
				
			||||||
 | 
					S:	Maintained
 | 
				
			||||||
 | 
					F:	drivers/char/*
 | 
				
			||||||
 | 
					F:	drivers/misc/*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CHECKPATCH
 | 
					CHECKPATCH
 | 
				
			||||||
M:	Andy Whitcroft <apw@canonical.com>
 | 
					M:	Andy Whitcroft <apw@canonical.com>
 | 
				
			||||||
S:	Supported
 | 
					S:	Supported
 | 
				
			||||||
| 
						 | 
					@ -1927,9 +1935,11 @@ S:	Maintained
 | 
				
			||||||
F:	drivers/connector/
 | 
					F:	drivers/connector/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CONTROL GROUPS (CGROUPS)
 | 
					CONTROL GROUPS (CGROUPS)
 | 
				
			||||||
M:	Paul Menage <paul@paulmenage.org>
 | 
					M:	Tejun Heo <tj@kernel.org>
 | 
				
			||||||
M:	Li Zefan <lizf@cn.fujitsu.com>
 | 
					M:	Li Zefan <lizf@cn.fujitsu.com>
 | 
				
			||||||
L:	containers@lists.linux-foundation.org
 | 
					L:	containers@lists.linux-foundation.org
 | 
				
			||||||
 | 
					L:	cgroups@vger.kernel.org
 | 
				
			||||||
 | 
					T:	git git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git
 | 
				
			||||||
S:	Maintained
 | 
					S:	Maintained
 | 
				
			||||||
F:	include/linux/cgroup*
 | 
					F:	include/linux/cgroup*
 | 
				
			||||||
F:	kernel/cgroup*
 | 
					F:	kernel/cgroup*
 | 
				
			||||||
| 
						 | 
					@ -2584,7 +2594,7 @@ S:	Maintained
 | 
				
			||||||
F:	drivers/net/ethernet/i825xx/eexpress.*
 | 
					F:	drivers/net/ethernet/i825xx/eexpress.*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ETHERNET BRIDGE
 | 
					ETHERNET BRIDGE
 | 
				
			||||||
M:	Stephen Hemminger <shemminger@linux-foundation.org>
 | 
					M:	Stephen Hemminger <shemminger@vyatta.com>
 | 
				
			||||||
L:	bridge@lists.linux-foundation.org
 | 
					L:	bridge@lists.linux-foundation.org
 | 
				
			||||||
L:	netdev@vger.kernel.org
 | 
					L:	netdev@vger.kernel.org
 | 
				
			||||||
W:	http://www.linuxfoundation.org/en/Net:Bridge
 | 
					W:	http://www.linuxfoundation.org/en/Net:Bridge
 | 
				
			||||||
| 
						 | 
					@ -3718,7 +3728,7 @@ F:	fs/jbd2/
 | 
				
			||||||
F:	include/linux/jbd2.h
 | 
					F:	include/linux/jbd2.h
 | 
				
			||||||
 | 
					
 | 
				
			||||||
JSM Neo PCI based serial card
 | 
					JSM Neo PCI based serial card
 | 
				
			||||||
M:	Breno Leitao <leitao@linux.vnet.ibm.com>
 | 
					M:	Lucas Tavares <lucaskt@linux.vnet.ibm.com>
 | 
				
			||||||
L:	linux-serial@vger.kernel.org
 | 
					L:	linux-serial@vger.kernel.org
 | 
				
			||||||
S:	Maintained
 | 
					S:	Maintained
 | 
				
			||||||
F:	drivers/tty/serial/jsm/
 | 
					F:	drivers/tty/serial/jsm/
 | 
				
			||||||
| 
						 | 
					@ -4304,6 +4314,7 @@ MEMORY RESOURCE CONTROLLER
 | 
				
			||||||
M:	Balbir Singh <bsingharora@gmail.com>
 | 
					M:	Balbir Singh <bsingharora@gmail.com>
 | 
				
			||||||
M:	Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
 | 
					M:	Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
 | 
				
			||||||
M:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
 | 
					M:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
 | 
				
			||||||
 | 
					L:	cgroups@vger.kernel.org
 | 
				
			||||||
L:	linux-mm@kvack.org
 | 
					L:	linux-mm@kvack.org
 | 
				
			||||||
S:	Maintained
 | 
					S:	Maintained
 | 
				
			||||||
F:	mm/memcontrol.c
 | 
					F:	mm/memcontrol.c
 | 
				
			||||||
| 
						 | 
					@ -4337,7 +4348,7 @@ MIPS
 | 
				
			||||||
M:	Ralf Baechle <ralf@linux-mips.org>
 | 
					M:	Ralf Baechle <ralf@linux-mips.org>
 | 
				
			||||||
L:	linux-mips@linux-mips.org
 | 
					L:	linux-mips@linux-mips.org
 | 
				
			||||||
W:	http://www.linux-mips.org/
 | 
					W:	http://www.linux-mips.org/
 | 
				
			||||||
T:	git git://git.linux-mips.org/pub/scm/linux.git
 | 
					T:	git git://git.linux-mips.org/pub/scm/ralf/linux.git
 | 
				
			||||||
Q:	http://patchwork.linux-mips.org/project/linux-mips/list/
 | 
					Q:	http://patchwork.linux-mips.org/project/linux-mips/list/
 | 
				
			||||||
S:	Supported
 | 
					S:	Supported
 | 
				
			||||||
F:	Documentation/mips/
 | 
					F:	Documentation/mips/
 | 
				
			||||||
| 
						 | 
					@ -4470,7 +4481,7 @@ S:	Supported
 | 
				
			||||||
F:	drivers/infiniband/hw/nes/
 | 
					F:	drivers/infiniband/hw/nes/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
NETEM NETWORK EMULATOR
 | 
					NETEM NETWORK EMULATOR
 | 
				
			||||||
M:	Stephen Hemminger <shemminger@linux-foundation.org>
 | 
					M:	Stephen Hemminger <shemminger@vyatta.com>
 | 
				
			||||||
L:	netem@lists.linux-foundation.org
 | 
					L:	netem@lists.linux-foundation.org
 | 
				
			||||||
S:	Maintained
 | 
					S:	Maintained
 | 
				
			||||||
F:	net/sched/sch_netem.c
 | 
					F:	net/sched/sch_netem.c
 | 
				
			||||||
| 
						 | 
					@ -5985,7 +5996,7 @@ S:	Maintained
 | 
				
			||||||
F:	drivers/usb/misc/sisusbvga/
 | 
					F:	drivers/usb/misc/sisusbvga/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
SKGE, SKY2 10/100/1000 GIGABIT ETHERNET DRIVERS
 | 
					SKGE, SKY2 10/100/1000 GIGABIT ETHERNET DRIVERS
 | 
				
			||||||
M:	Stephen Hemminger <shemminger@linux-foundation.org>
 | 
					M:	Stephen Hemminger <shemminger@vyatta.com>
 | 
				
			||||||
L:	netdev@vger.kernel.org
 | 
					L:	netdev@vger.kernel.org
 | 
				
			||||||
S:	Maintained
 | 
					S:	Maintained
 | 
				
			||||||
F:	drivers/net/ethernet/marvell/sk*
 | 
					F:	drivers/net/ethernet/marvell/sk*
 | 
				
			||||||
| 
						 | 
					@ -7433,7 +7444,8 @@ F:	drivers/xen/*swiotlb*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
XFS FILESYSTEM
 | 
					XFS FILESYSTEM
 | 
				
			||||||
P:	Silicon Graphics Inc
 | 
					P:	Silicon Graphics Inc
 | 
				
			||||||
M:	Alex Elder <aelder@sgi.com>
 | 
					M:	Ben Myers <bpm@sgi.com>
 | 
				
			||||||
 | 
					M:	Alex Elder <elder@kernel.org>
 | 
				
			||||||
M:	xfs-masters@oss.sgi.com
 | 
					M:	xfs-masters@oss.sgi.com
 | 
				
			||||||
L:	xfs@oss.sgi.com
 | 
					L:	xfs@oss.sgi.com
 | 
				
			||||||
W:	http://oss.sgi.com/projects/xfs
 | 
					W:	http://oss.sgi.com/projects/xfs
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										2
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
										
									
									
									
								
							| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
VERSION = 3
 | 
					VERSION = 3
 | 
				
			||||||
PATCHLEVEL = 2
 | 
					PATCHLEVEL = 2
 | 
				
			||||||
SUBLEVEL = 0
 | 
					SUBLEVEL = 0
 | 
				
			||||||
EXTRAVERSION = -rc2
 | 
					EXTRAVERSION = -rc3
 | 
				
			||||||
NAME = Saber-toothed Squirrel
 | 
					NAME = Saber-toothed Squirrel
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# *DOCUMENTATION*
 | 
					# *DOCUMENTATION*
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -65,6 +65,8 @@ $(obj)/%.dtb: $(src)/dts/%.dts
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(obj)/dtbs: $(addprefix $(obj)/, $(dtb-y))
 | 
					$(obj)/dtbs: $(addprefix $(obj)/, $(dtb-y))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					clean-files := *.dtb
 | 
				
			||||||
 | 
					
 | 
				
			||||||
quiet_cmd_uimage = UIMAGE  $@
 | 
					quiet_cmd_uimage = UIMAGE  $@
 | 
				
			||||||
      cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \
 | 
					      cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \
 | 
				
			||||||
		   -C none -a $(LOADADDR) -e $(STARTADDR) \
 | 
							   -C none -a $(LOADADDR) -e $(STARTADDR) \
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,6 +20,8 @@
 | 
				
			||||||
#ifndef __ASM_ARM_HARDWARE_L2X0_H
 | 
					#ifndef __ASM_ARM_HARDWARE_L2X0_H
 | 
				
			||||||
#define __ASM_ARM_HARDWARE_L2X0_H
 | 
					#define __ASM_ARM_HARDWARE_L2X0_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <linux/errno.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define L2X0_CACHE_ID			0x000
 | 
					#define L2X0_CACHE_ID			0x000
 | 
				
			||||||
#define L2X0_CACHE_TYPE			0x004
 | 
					#define L2X0_CACHE_TYPE			0x004
 | 
				
			||||||
#define L2X0_CTRL			0x100
 | 
					#define L2X0_CTRL			0x100
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,6 +13,7 @@
 | 
				
			||||||
struct tag;
 | 
					struct tag;
 | 
				
			||||||
struct meminfo;
 | 
					struct meminfo;
 | 
				
			||||||
struct sys_timer;
 | 
					struct sys_timer;
 | 
				
			||||||
 | 
					struct pt_regs;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct machine_desc {
 | 
					struct machine_desc {
 | 
				
			||||||
	unsigned int		nr;		/* architecture number	*/
 | 
						unsigned int		nr;		/* architecture number	*/
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -402,6 +402,8 @@
 | 
				
			||||||
#define __NR_syncfs			(__NR_SYSCALL_BASE+373)
 | 
					#define __NR_syncfs			(__NR_SYSCALL_BASE+373)
 | 
				
			||||||
#define __NR_sendmmsg			(__NR_SYSCALL_BASE+374)
 | 
					#define __NR_sendmmsg			(__NR_SYSCALL_BASE+374)
 | 
				
			||||||
#define __NR_setns			(__NR_SYSCALL_BASE+375)
 | 
					#define __NR_setns			(__NR_SYSCALL_BASE+375)
 | 
				
			||||||
 | 
					#define __NR_process_vm_readv		(__NR_SYSCALL_BASE+376)
 | 
				
			||||||
 | 
					#define __NR_process_vm_writev		(__NR_SYSCALL_BASE+377)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * The following SWIs are ARM private.
 | 
					 * The following SWIs are ARM private.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -385,6 +385,8 @@
 | 
				
			||||||
		CALL(sys_syncfs)
 | 
							CALL(sys_syncfs)
 | 
				
			||||||
		CALL(sys_sendmmsg)
 | 
							CALL(sys_sendmmsg)
 | 
				
			||||||
/* 375 */	CALL(sys_setns)
 | 
					/* 375 */	CALL(sys_setns)
 | 
				
			||||||
 | 
							CALL(sys_process_vm_readv)
 | 
				
			||||||
 | 
							CALL(sys_process_vm_writev)
 | 
				
			||||||
#ifndef syscalls_counted
 | 
					#ifndef syscalls_counted
 | 
				
			||||||
.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
 | 
					.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
 | 
				
			||||||
#define syscalls_counted
 | 
					#define syscalls_counted
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -360,7 +360,7 @@ __secondary_data:
 | 
				
			||||||
 *  r13 = *virtual* address to jump to upon completion
 | 
					 *  r13 = *virtual* address to jump to upon completion
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
__enable_mmu:
 | 
					__enable_mmu:
 | 
				
			||||||
#ifdef CONFIG_ALIGNMENT_TRAP
 | 
					#if defined(CONFIG_ALIGNMENT_TRAP) && __LINUX_ARM_ARCH__ < 6
 | 
				
			||||||
	orr	r0, r0, #CR_A
 | 
						orr	r0, r0, #CR_A
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
	bic	r0, r0, #CR_A
 | 
						bic	r0, r0, #CR_A
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -32,24 +32,6 @@ static atomic_t waiting_for_crash_ipi;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int machine_kexec_prepare(struct kimage *image)
 | 
					int machine_kexec_prepare(struct kimage *image)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	unsigned long page_list;
 | 
					 | 
				
			||||||
	void *reboot_code_buffer;
 | 
					 | 
				
			||||||
	page_list = image->head & PAGE_MASK;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	reboot_code_buffer = page_address(image->control_code_page);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* Prepare parameters for reboot_code_buffer*/
 | 
					 | 
				
			||||||
	kexec_start_address = image->start;
 | 
					 | 
				
			||||||
	kexec_indirection_page = page_list;
 | 
					 | 
				
			||||||
	kexec_mach_type = machine_arch_type;
 | 
					 | 
				
			||||||
	kexec_boot_atags = image->start - KEXEC_ARM_ZIMAGE_OFFSET + KEXEC_ARM_ATAGS_OFFSET;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* copy our kernel relocation code to the control code page */
 | 
					 | 
				
			||||||
	memcpy(reboot_code_buffer,
 | 
					 | 
				
			||||||
	       relocate_new_kernel, relocate_new_kernel_size);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	flush_icache_range((unsigned long) reboot_code_buffer,
 | 
					 | 
				
			||||||
			   (unsigned long) reboot_code_buffer + KEXEC_CONTROL_PAGE_SIZE);
 | 
					 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -100,14 +82,31 @@ void (*kexec_reinit)(void);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void machine_kexec(struct kimage *image)
 | 
					void machine_kexec(struct kimage *image)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						unsigned long page_list;
 | 
				
			||||||
	unsigned long reboot_code_buffer_phys;
 | 
						unsigned long reboot_code_buffer_phys;
 | 
				
			||||||
	void *reboot_code_buffer;
 | 
						void *reboot_code_buffer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						page_list = image->head & PAGE_MASK;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* we need both effective and real address here */
 | 
						/* we need both effective and real address here */
 | 
				
			||||||
	reboot_code_buffer_phys =
 | 
						reboot_code_buffer_phys =
 | 
				
			||||||
	    page_to_pfn(image->control_code_page) << PAGE_SHIFT;
 | 
						    page_to_pfn(image->control_code_page) << PAGE_SHIFT;
 | 
				
			||||||
	reboot_code_buffer = page_address(image->control_code_page);
 | 
						reboot_code_buffer = page_address(image->control_code_page);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Prepare parameters for reboot_code_buffer*/
 | 
				
			||||||
 | 
						kexec_start_address = image->start;
 | 
				
			||||||
 | 
						kexec_indirection_page = page_list;
 | 
				
			||||||
 | 
						kexec_mach_type = machine_arch_type;
 | 
				
			||||||
 | 
						kexec_boot_atags = image->start - KEXEC_ARM_ZIMAGE_OFFSET + KEXEC_ARM_ATAGS_OFFSET;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* copy our kernel relocation code to the control code page */
 | 
				
			||||||
 | 
						memcpy(reboot_code_buffer,
 | 
				
			||||||
 | 
						       relocate_new_kernel, relocate_new_kernel_size);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						flush_icache_range((unsigned long) reboot_code_buffer,
 | 
				
			||||||
 | 
								   (unsigned long) reboot_code_buffer + KEXEC_CONTROL_PAGE_SIZE);
 | 
				
			||||||
	printk(KERN_INFO "Bye!\n");
 | 
						printk(KERN_INFO "Bye!\n");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (kexec_reinit)
 | 
						if (kexec_reinit)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -461,8 +461,10 @@ static void __init setup_processor(void)
 | 
				
			||||||
	       cpu_name, read_cpuid_id(), read_cpuid_id() & 15,
 | 
						       cpu_name, read_cpuid_id(), read_cpuid_id() & 15,
 | 
				
			||||||
	       proc_arch[cpu_architecture()], cr_alignment);
 | 
						       proc_arch[cpu_architecture()], cr_alignment);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	sprintf(init_utsname()->machine, "%s%c", list->arch_name, ENDIANNESS);
 | 
						snprintf(init_utsname()->machine, __NEW_UTS_LEN + 1, "%s%c",
 | 
				
			||||||
	sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS);
 | 
							 list->arch_name, ENDIANNESS);
 | 
				
			||||||
 | 
						snprintf(elf_platform, ELF_PLATFORM_SIZE, "%s%c",
 | 
				
			||||||
 | 
							 list->elf_name, ENDIANNESS);
 | 
				
			||||||
	elf_hwcap = list->elf_hwcap;
 | 
						elf_hwcap = list->elf_hwcap;
 | 
				
			||||||
#ifndef CONFIG_ARM_THUMB
 | 
					#ifndef CONFIG_ARM_THUMB
 | 
				
			||||||
	elf_hwcap &= ~HWCAP_THUMB;
 | 
						elf_hwcap &= ~HWCAP_THUMB;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -235,7 +235,7 @@ void __init bcmring_init_timer(void)
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	bcmring_clocksource_init();
 | 
						bcmring_clocksource_init();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	sp804_clockevents_register(TIMER0_VA_BASE, IRQ_TIMER0, "timer0");
 | 
						sp804_clockevents_init(TIMER0_VA_BASE, IRQ_TIMER0, "timer0");
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct sys_timer bcmring_timer = {
 | 
					struct sys_timer bcmring_timer = {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -36,6 +36,7 @@
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/pfn.h>
 | 
					#include <linux/pfn.h>
 | 
				
			||||||
#include <linux/atomic.h>
 | 
					#include <linux/atomic.h>
 | 
				
			||||||
 | 
					#include <linux/sched.h>
 | 
				
			||||||
#include <mach/dma.h>
 | 
					#include <mach/dma.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* I don't quite understand why dc4 fails when this is set to 1 and DMA is enabled */
 | 
					/* I don't quite understand why dc4 fails when this is set to 1 and DMA is enabled */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,6 +20,7 @@
 | 
				
			||||||
#include <linux/delay.h>
 | 
					#include <linux/delay.h>
 | 
				
			||||||
#include <linux/irq.h>
 | 
					#include <linux/irq.h>
 | 
				
			||||||
#include <linux/bitrev.h>
 | 
					#include <linux/bitrev.h>
 | 
				
			||||||
 | 
					#include <linux/console.h>
 | 
				
			||||||
#include <asm/system.h>
 | 
					#include <asm/system.h>
 | 
				
			||||||
#include <asm/io.h>
 | 
					#include <asm/io.h>
 | 
				
			||||||
#include <asm/tlbflush.h>
 | 
					#include <asm/tlbflush.h>
 | 
				
			||||||
| 
						 | 
					@ -106,9 +107,8 @@ static int pd_power_down(struct generic_pm_domain *genpd)
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int pd_power_up(struct generic_pm_domain *genpd)
 | 
					static int __pd_power_up(struct sh7372_pm_domain *sh7372_pd, bool do_resume)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct sh7372_pm_domain *sh7372_pd = to_sh7372_pd(genpd);
 | 
					 | 
				
			||||||
	unsigned int mask = 1 << sh7372_pd->bit_shift;
 | 
						unsigned int mask = 1 << sh7372_pd->bit_shift;
 | 
				
			||||||
	unsigned int retry_count;
 | 
						unsigned int retry_count;
 | 
				
			||||||
	int ret = 0;
 | 
						int ret = 0;
 | 
				
			||||||
| 
						 | 
					@ -123,13 +123,13 @@ static int pd_power_up(struct generic_pm_domain *genpd)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for (retry_count = 2 * PSTR_RETRIES; retry_count; retry_count--) {
 | 
						for (retry_count = 2 * PSTR_RETRIES; retry_count; retry_count--) {
 | 
				
			||||||
		if (!(__raw_readl(SWUCR) & mask))
 | 
							if (!(__raw_readl(SWUCR) & mask))
 | 
				
			||||||
			goto out;
 | 
								break;
 | 
				
			||||||
		if (retry_count > PSTR_RETRIES)
 | 
							if (retry_count > PSTR_RETRIES)
 | 
				
			||||||
			udelay(PSTR_DELAY_US);
 | 
								udelay(PSTR_DELAY_US);
 | 
				
			||||||
		else
 | 
							else
 | 
				
			||||||
			cpu_relax();
 | 
								cpu_relax();
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if (__raw_readl(SWUCR) & mask)
 | 
						if (!retry_count)
 | 
				
			||||||
		ret = -EIO;
 | 
							ret = -EIO;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!sh7372_pd->no_debug)
 | 
						if (!sh7372_pd->no_debug)
 | 
				
			||||||
| 
						 | 
					@ -137,12 +137,17 @@ static int pd_power_up(struct generic_pm_domain *genpd)
 | 
				
			||||||
			 mask, __raw_readl(PSTR));
 | 
								 mask, __raw_readl(PSTR));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 out:
 | 
					 out:
 | 
				
			||||||
	if (ret == 0 && sh7372_pd->resume)
 | 
						if (ret == 0 && sh7372_pd->resume && do_resume)
 | 
				
			||||||
		sh7372_pd->resume();
 | 
							sh7372_pd->resume();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return ret;
 | 
						return ret;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static int pd_power_up(struct generic_pm_domain *genpd)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						 return __pd_power_up(to_sh7372_pd(genpd), true);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void sh7372_a4r_suspend(void)
 | 
					static void sh7372_a4r_suspend(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	sh7372_intcs_suspend();
 | 
						sh7372_intcs_suspend();
 | 
				
			||||||
| 
						 | 
					@ -174,7 +179,7 @@ void sh7372_init_pm_domain(struct sh7372_pm_domain *sh7372_pd)
 | 
				
			||||||
	genpd->active_wakeup = pd_active_wakeup;
 | 
						genpd->active_wakeup = pd_active_wakeup;
 | 
				
			||||||
	genpd->power_off = pd_power_down;
 | 
						genpd->power_off = pd_power_down;
 | 
				
			||||||
	genpd->power_on = pd_power_up;
 | 
						genpd->power_on = pd_power_up;
 | 
				
			||||||
	genpd->power_on(&sh7372_pd->genpd);
 | 
						__pd_power_up(sh7372_pd, false);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void sh7372_add_device_to_domain(struct sh7372_pm_domain *sh7372_pd,
 | 
					void sh7372_add_device_to_domain(struct sh7372_pm_domain *sh7372_pd,
 | 
				
			||||||
| 
						 | 
					@ -227,11 +232,23 @@ struct sh7372_pm_domain sh7372_a3sp = {
 | 
				
			||||||
	.no_debug = true,
 | 
						.no_debug = true,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static void sh7372_a3sp_init(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						/* serial consoles make use of SCIF hardware located in A3SP,
 | 
				
			||||||
 | 
						 * keep such power domain on if "no_console_suspend" is set.
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						sh7372_a3sp.stay_on = !console_suspend_enabled;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct sh7372_pm_domain sh7372_a3sg = {
 | 
					struct sh7372_pm_domain sh7372_a3sg = {
 | 
				
			||||||
	.bit_shift = 13,
 | 
						.bit_shift = 13,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif /* CONFIG_PM */
 | 
					#else /* !CONFIG_PM */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static inline void sh7372_a3sp_init(void) {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif /* !CONFIG_PM */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if defined(CONFIG_SUSPEND) || defined(CONFIG_CPU_IDLE)
 | 
					#if defined(CONFIG_SUSPEND) || defined(CONFIG_CPU_IDLE)
 | 
				
			||||||
static int sh7372_do_idle_core_standby(unsigned long unused)
 | 
					static int sh7372_do_idle_core_standby(unsigned long unused)
 | 
				
			||||||
| 
						 | 
					@ -465,6 +482,8 @@ void __init sh7372_pm_init(void)
 | 
				
			||||||
	/* do not convert A3SM, A3SP, A3SG, A4R power down into A4S */
 | 
						/* do not convert A3SM, A3SP, A3SG, A4R power down into A4S */
 | 
				
			||||||
	__raw_writel(0, PDNSEL);
 | 
						__raw_writel(0, PDNSEL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						sh7372_a3sp_init();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	sh7372_suspend_init();
 | 
						sh7372_suspend_init();
 | 
				
			||||||
	sh7372_cpuidle_init();
 | 
						sh7372_cpuidle_init();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -422,7 +422,7 @@ struct platform_device nuc900_device_kpi = {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* LCD controller*/
 | 
					/* LCD controller*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static struct nuc900fb_display __initdata nuc900_lcd_info[] = {
 | 
					static struct nuc900fb_display nuc900_lcd_info[] = {
 | 
				
			||||||
	/* Giantplus Technology GPM1040A0 320x240 Color TFT LCD */
 | 
						/* Giantplus Technology GPM1040A0 320x240 Color TFT LCD */
 | 
				
			||||||
	[0] = {
 | 
						[0] = {
 | 
				
			||||||
		.type		= LCM_DCCS_VA_SRC_RGB565,
 | 
							.type		= LCM_DCCS_VA_SRC_RGB565,
 | 
				
			||||||
| 
						 | 
					@ -445,7 +445,7 @@ static struct nuc900fb_display __initdata nuc900_lcd_info[] = {
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static struct nuc900fb_mach_info nuc900_fb_info __initdata = {
 | 
					static struct nuc900fb_mach_info nuc900_fb_info = {
 | 
				
			||||||
#if defined(CONFIG_GPM1040A0_320X240)
 | 
					#if defined(CONFIG_GPM1040A0_320X240)
 | 
				
			||||||
	.displays		= &nuc900_lcd_info[0],
 | 
						.displays		= &nuc900_lcd_info[0],
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -19,6 +19,7 @@
 | 
				
			||||||
extern void mfp_set_groupf(struct device *dev);
 | 
					extern void mfp_set_groupf(struct device *dev);
 | 
				
			||||||
extern void mfp_set_groupc(struct device *dev);
 | 
					extern void mfp_set_groupc(struct device *dev);
 | 
				
			||||||
extern void mfp_set_groupi(struct device *dev);
 | 
					extern void mfp_set_groupi(struct device *dev);
 | 
				
			||||||
extern void mfp_set_groupg(struct device *dev);
 | 
					extern void mfp_set_groupg(struct device *dev, const char *subname);
 | 
				
			||||||
 | 
					extern void mfp_set_groupd(struct device *dev, const char *subname);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif /* __ASM_ARCH_MFP_H */
 | 
					#endif /* __ASM_ARCH_MFP_H */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -14,7 +14,7 @@
 | 
				
			||||||
#ifndef __ASM_ARCH_SPI_H
 | 
					#ifndef __ASM_ARCH_SPI_H
 | 
				
			||||||
#define __ASM_ARCH_SPI_H
 | 
					#define __ASM_ARCH_SPI_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
extern void mfp_set_groupg(struct device *dev);
 | 
					extern void mfp_set_groupg(struct device *dev, const char *subname);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct nuc900_spi_info {
 | 
					struct nuc900_spi_info {
 | 
				
			||||||
	unsigned int num_cs;
 | 
						unsigned int num_cs;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -26,10 +26,8 @@
 | 
				
			||||||
#define REG_MFSEL	(W90X900_VA_GCR + 0xC)
 | 
					#define REG_MFSEL	(W90X900_VA_GCR + 0xC)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define GPSELF		(0x01 << 1)
 | 
					#define GPSELF		(0x01 << 1)
 | 
				
			||||||
 | 
					 | 
				
			||||||
#define GPSELC		(0x03 << 2)
 | 
					#define GPSELC		(0x03 << 2)
 | 
				
			||||||
#define ENKPI		(0x02 << 2)
 | 
					#define GPSELD		(0x0f << 4)
 | 
				
			||||||
#define ENNAND		(0x01 << 2)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define GPSELEI0	(0x01 << 26)
 | 
					#define GPSELEI0	(0x01 << 26)
 | 
				
			||||||
#define GPSELEI1	(0x01 << 27)
 | 
					#define GPSELEI1	(0x01 << 27)
 | 
				
			||||||
| 
						 | 
					@ -37,11 +35,16 @@
 | 
				
			||||||
#define GPIOG0TO1	(0x03 << 14)
 | 
					#define GPIOG0TO1	(0x03 << 14)
 | 
				
			||||||
#define GPIOG2TO3	(0x03 << 16)
 | 
					#define GPIOG2TO3	(0x03 << 16)
 | 
				
			||||||
#define GPIOG22TO23	(0x03 << 22)
 | 
					#define GPIOG22TO23	(0x03 << 22)
 | 
				
			||||||
 | 
					#define GPIOG18TO20	(0x07 << 18)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define ENSPI		(0x0a << 14)
 | 
					#define ENSPI		(0x0a << 14)
 | 
				
			||||||
#define ENI2C0		(0x01 << 14)
 | 
					#define ENI2C0		(0x01 << 14)
 | 
				
			||||||
#define ENI2C1		(0x01 << 16)
 | 
					#define ENI2C1		(0x01 << 16)
 | 
				
			||||||
#define ENAC97		(0x02 << 22)
 | 
					#define ENAC97		(0x02 << 22)
 | 
				
			||||||
 | 
					#define ENSD1		(0x02 << 18)
 | 
				
			||||||
 | 
					#define ENSD0		(0x0a << 4)
 | 
				
			||||||
 | 
					#define ENKPI		(0x02 << 2)
 | 
				
			||||||
 | 
					#define ENNAND		(0x01 << 2)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static DEFINE_MUTEX(mfp_mutex);
 | 
					static DEFINE_MUTEX(mfp_mutex);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -127,15 +130,18 @@ void mfp_set_groupi(struct device *dev)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
EXPORT_SYMBOL(mfp_set_groupi);
 | 
					EXPORT_SYMBOL(mfp_set_groupi);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void mfp_set_groupg(struct device *dev)
 | 
					void mfp_set_groupg(struct device *dev, const char *subname)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	unsigned long mfpen;
 | 
						unsigned long mfpen;
 | 
				
			||||||
	const char *dev_id;
 | 
						const char *dev_id;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	BUG_ON(!dev);
 | 
						BUG_ON((!dev) && (!subname));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	mutex_lock(&mfp_mutex);
 | 
						mutex_lock(&mfp_mutex);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (subname != NULL)
 | 
				
			||||||
 | 
							dev_id = subname;
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
		dev_id = dev_name(dev);
 | 
							dev_id = dev_name(dev);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	mfpen = __raw_readl(REG_MFSEL);
 | 
						mfpen = __raw_readl(REG_MFSEL);
 | 
				
			||||||
| 
						 | 
					@ -152,6 +158,9 @@ void mfp_set_groupg(struct device *dev)
 | 
				
			||||||
	} else if (strcmp(dev_id, "nuc900-audio") == 0) {
 | 
						} else if (strcmp(dev_id, "nuc900-audio") == 0) {
 | 
				
			||||||
		mfpen &= ~(GPIOG22TO23);
 | 
							mfpen &= ~(GPIOG22TO23);
 | 
				
			||||||
		mfpen |= ENAC97;/*enable AC97*/
 | 
							mfpen |= ENAC97;/*enable AC97*/
 | 
				
			||||||
 | 
						} else if (strcmp(dev_id, "nuc900-mmc-port1") == 0) {
 | 
				
			||||||
 | 
							mfpen &= ~(GPIOG18TO20);
 | 
				
			||||||
 | 
							mfpen |= (ENSD1 | 0x01);/*enable sd1*/
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		mfpen &= ~(GPIOG0TO1 | GPIOG2TO3);/*GPIOG[3:0]*/
 | 
							mfpen &= ~(GPIOG0TO1 | GPIOG2TO3);/*GPIOG[3:0]*/
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					@ -162,3 +171,30 @@ void mfp_set_groupg(struct device *dev)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
EXPORT_SYMBOL(mfp_set_groupg);
 | 
					EXPORT_SYMBOL(mfp_set_groupg);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void mfp_set_groupd(struct device *dev, const char *subname)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						unsigned long mfpen;
 | 
				
			||||||
 | 
						const char *dev_id;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						BUG_ON((!dev) && (!subname));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						mutex_lock(&mfp_mutex);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (subname != NULL)
 | 
				
			||||||
 | 
							dev_id = subname;
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
							dev_id = dev_name(dev);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						mfpen = __raw_readl(REG_MFSEL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (strcmp(dev_id, "nuc900-mmc-port0") == 0) {
 | 
				
			||||||
 | 
							mfpen &= ~GPSELD;/*enable sd0*/
 | 
				
			||||||
 | 
							mfpen |= ENSD0;
 | 
				
			||||||
 | 
						} else
 | 
				
			||||||
 | 
							mfpen &= (~GPSELD);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						__raw_writel(mfpen, REG_MFSEL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						mutex_unlock(&mfp_mutex);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					EXPORT_SYMBOL(mfp_set_groupd);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,7 +3,7 @@ if ETRAX_ARCH_V10
 | 
				
			||||||
config ETRAX_ETHERNET
 | 
					config ETRAX_ETHERNET
 | 
				
			||||||
	bool "Ethernet support"
 | 
						bool "Ethernet support"
 | 
				
			||||||
	depends on ETRAX_ARCH_V10
 | 
						depends on ETRAX_ARCH_V10
 | 
				
			||||||
	select NET_ETHERNET
 | 
						select ETHERNET
 | 
				
			||||||
	select NET_CORE
 | 
						select NET_CORE
 | 
				
			||||||
	select MII
 | 
						select MII
 | 
				
			||||||
	help
 | 
						help
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,7 +3,7 @@ if ETRAX_ARCH_V32
 | 
				
			||||||
config ETRAX_ETHERNET
 | 
					config ETRAX_ETHERNET
 | 
				
			||||||
	bool "Ethernet support"
 | 
						bool "Ethernet support"
 | 
				
			||||||
	depends on ETRAX_ARCH_V32
 | 
						depends on ETRAX_ARCH_V32
 | 
				
			||||||
	select NET_ETHERNET
 | 
						select ETHERNET
 | 
				
			||||||
	select NET_CORE
 | 
						select NET_CORE
 | 
				
			||||||
	select MII
 | 
						select MII
 | 
				
			||||||
	help
 | 
						help
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,22 +0,0 @@
 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
 * Copyright (C) 2006 Atmark Techno, Inc.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This file is subject to the terms and conditions of the GNU General Public
 | 
					 | 
				
			||||||
 * License. See the file "COPYING" in the main directory of this archive
 | 
					 | 
				
			||||||
 * for more details.
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifndef _ASM_MICROBLAZE_NAMEI_H
 | 
					 | 
				
			||||||
#define _ASM_MICROBLAZE_NAMEI_H
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef __KERNEL__
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/* This dummy routine maybe changed to something useful
 | 
					 | 
				
			||||||
 * for /usr/gnemul/ emulation stuff.
 | 
					 | 
				
			||||||
 * Look at asm-sparc/namei.h for details.
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
#define __emul_prefix() NULL
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif /* __KERNEL__ */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif /* _ASM_MICROBLAZE_NAMEI_H */
 | 
					 | 
				
			||||||
| 
						 | 
					@ -17,8 +17,6 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static struct map_info flash_map;
 | 
					static struct map_info flash_map;
 | 
				
			||||||
static struct mtd_info *mymtd;
 | 
					static struct mtd_info *mymtd;
 | 
				
			||||||
static int nr_parts;
 | 
					 | 
				
			||||||
static struct mtd_partition *parts;
 | 
					 | 
				
			||||||
static const char *part_probe_types[] = {
 | 
					static const char *part_probe_types[] = {
 | 
				
			||||||
	"cmdlinepart",
 | 
						"cmdlinepart",
 | 
				
			||||||
#ifdef CONFIG_MTD_REDBOOT_PARTS
 | 
					#ifdef CONFIG_MTD_REDBOOT_PARTS
 | 
				
			||||||
| 
						 | 
					@ -61,11 +59,8 @@ static int __init flash_init(void)
 | 
				
			||||||
		mymtd = do_map_probe("cfi_probe", &flash_map);
 | 
							mymtd = do_map_probe("cfi_probe", &flash_map);
 | 
				
			||||||
		if (mymtd) {
 | 
							if (mymtd) {
 | 
				
			||||||
			mymtd->owner = THIS_MODULE;
 | 
								mymtd->owner = THIS_MODULE;
 | 
				
			||||||
 | 
								mtd_device_parse_register(mymtd, part_probe_types,
 | 
				
			||||||
			nr_parts = parse_mtd_partitions(mymtd,
 | 
											  0, NULL, 0);
 | 
				
			||||||
							part_probe_types,
 | 
					 | 
				
			||||||
							&parts, 0);
 | 
					 | 
				
			||||||
			mtd_device_register(mymtd, parts, nr_parts);
 | 
					 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			pr_err("Failed to register MTD device for flash\n");
 | 
								pr_err("Failed to register MTD device for flash\n");
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -207,8 +207,9 @@ void octeon_prepare_cpus(unsigned int max_cpus)
 | 
				
			||||||
	 * the other bits alone.
 | 
						 * the other bits alone.
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	cvmx_write_csr(CVMX_CIU_MBOX_CLRX(cvmx_get_core_num()), 0xffff);
 | 
						cvmx_write_csr(CVMX_CIU_MBOX_CLRX(cvmx_get_core_num()), 0xffff);
 | 
				
			||||||
	if (request_irq(OCTEON_IRQ_MBOX0, mailbox_interrupt, IRQF_DISABLED,
 | 
						if (request_irq(OCTEON_IRQ_MBOX0, mailbox_interrupt,
 | 
				
			||||||
			"SMP-IPI", mailbox_interrupt)) {
 | 
								IRQF_PERCPU | IRQF_NO_THREAD, "SMP-IPI",
 | 
				
			||||||
 | 
								mailbox_interrupt)) {
 | 
				
			||||||
		panic("Cannot request_irq(OCTEON_IRQ_MBOX0)\n");
 | 
							panic("Cannot request_irq(OCTEON_IRQ_MBOX0)\n");
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -50,7 +50,7 @@ void __init prom_init(void)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* arg[0] is "g", the rest is boot parameters */
 | 
						/* arg[0] is "g", the rest is boot parameters */
 | 
				
			||||||
	for (i = 1; i < argc; i++) {
 | 
						for (i = 1; i < argc; i++) {
 | 
				
			||||||
		if (strlen(arcs_cmdline) + strlen(arg[i] + 1)
 | 
							if (strlen(arcs_cmdline) + strlen(arg[i]) + 1
 | 
				
			||||||
		    >= sizeof(arcs_cmdline))
 | 
							    >= sizeof(arcs_cmdline))
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
		strcat(arcs_cmdline, arg[i]);
 | 
							strcat(arcs_cmdline, arg[i]);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -36,6 +36,8 @@ static inline int gpio_get_value(unsigned gpio)
 | 
				
			||||||
	return -EINVAL;
 | 
						return -EINVAL;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define gpio_get_value_cansleep	gpio_get_value
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static inline void gpio_set_value(unsigned gpio, int value)
 | 
					static inline void gpio_set_value(unsigned gpio, int value)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	switch (bcm47xx_bus_type) {
 | 
						switch (bcm47xx_bus_type) {
 | 
				
			||||||
| 
						 | 
					@ -54,6 +56,19 @@ static inline void gpio_set_value(unsigned gpio, int value)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define gpio_set_value_cansleep gpio_set_value
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static inline int gpio_cansleep(unsigned gpio)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						return 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static inline int gpio_is_valid(unsigned gpio)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						return gpio < (BCM47XX_EXTIF_GPIO_LINES + BCM47XX_CHIPCO_GPIO_LINES);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static inline int gpio_direction_input(unsigned gpio)
 | 
					static inline int gpio_direction_input(unsigned gpio)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	switch (bcm47xx_bus_type) {
 | 
						switch (bcm47xx_bus_type) {
 | 
				
			||||||
| 
						 | 
					@ -137,7 +152,4 @@ static inline int gpio_polarity(unsigned gpio, int value)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* cansleep wrappers */
 | 
					 | 
				
			||||||
#include <asm-generic/gpio.h>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif /* __BCM47XX_GPIO_H */
 | 
					#endif /* __BCM47XX_GPIO_H */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -365,16 +365,18 @@
 | 
				
			||||||
#define __NR_syncfs			(__NR_Linux + 342)
 | 
					#define __NR_syncfs			(__NR_Linux + 342)
 | 
				
			||||||
#define __NR_sendmmsg			(__NR_Linux + 343)
 | 
					#define __NR_sendmmsg			(__NR_Linux + 343)
 | 
				
			||||||
#define __NR_setns			(__NR_Linux + 344)
 | 
					#define __NR_setns			(__NR_Linux + 344)
 | 
				
			||||||
 | 
					#define __NR_process_vm_readv		(__NR_Linux + 345)
 | 
				
			||||||
 | 
					#define __NR_process_vm_writev		(__NR_Linux + 346)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Offset of the last Linux o32 flavoured syscall
 | 
					 * Offset of the last Linux o32 flavoured syscall
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#define __NR_Linux_syscalls		344
 | 
					#define __NR_Linux_syscalls		346
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
 | 
					#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define __NR_O32_Linux			4000
 | 
					#define __NR_O32_Linux			4000
 | 
				
			||||||
#define __NR_O32_Linux_syscalls		344
 | 
					#define __NR_O32_Linux_syscalls		346
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if _MIPS_SIM == _MIPS_SIM_ABI64
 | 
					#if _MIPS_SIM == _MIPS_SIM_ABI64
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -686,16 +688,18 @@
 | 
				
			||||||
#define __NR_syncfs			(__NR_Linux + 301)
 | 
					#define __NR_syncfs			(__NR_Linux + 301)
 | 
				
			||||||
#define __NR_sendmmsg			(__NR_Linux + 302)
 | 
					#define __NR_sendmmsg			(__NR_Linux + 302)
 | 
				
			||||||
#define __NR_setns			(__NR_Linux + 303)
 | 
					#define __NR_setns			(__NR_Linux + 303)
 | 
				
			||||||
 | 
					#define __NR_process_vm_readv		(__NR_Linux + 304)
 | 
				
			||||||
 | 
					#define __NR_process_vm_writev		(__NR_Linux + 305)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Offset of the last Linux 64-bit flavoured syscall
 | 
					 * Offset of the last Linux 64-bit flavoured syscall
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#define __NR_Linux_syscalls		303
 | 
					#define __NR_Linux_syscalls		305
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
 | 
					#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define __NR_64_Linux			5000
 | 
					#define __NR_64_Linux			5000
 | 
				
			||||||
#define __NR_64_Linux_syscalls		303
 | 
					#define __NR_64_Linux_syscalls		305
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if _MIPS_SIM == _MIPS_SIM_NABI32
 | 
					#if _MIPS_SIM == _MIPS_SIM_NABI32
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1012,16 +1016,18 @@
 | 
				
			||||||
#define __NR_syncfs			(__NR_Linux + 306)
 | 
					#define __NR_syncfs			(__NR_Linux + 306)
 | 
				
			||||||
#define __NR_sendmmsg			(__NR_Linux + 307)
 | 
					#define __NR_sendmmsg			(__NR_Linux + 307)
 | 
				
			||||||
#define __NR_setns			(__NR_Linux + 308)
 | 
					#define __NR_setns			(__NR_Linux + 308)
 | 
				
			||||||
 | 
					#define __NR_process_vm_readv		(__NR_Linux + 309)
 | 
				
			||||||
 | 
					#define __NR_process_vm_writev		(__NR_Linux + 310)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Offset of the last N32 flavoured syscall
 | 
					 * Offset of the last N32 flavoured syscall
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#define __NR_Linux_syscalls		308
 | 
					#define __NR_Linux_syscalls		310
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
 | 
					#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define __NR_N32_Linux			6000
 | 
					#define __NR_N32_Linux			6000
 | 
				
			||||||
#define __NR_N32_Linux_syscalls		308
 | 
					#define __NR_N32_Linux_syscalls		310
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef __KERNEL__
 | 
					#ifdef __KERNEL__
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -103,19 +103,10 @@ static int c0_compare_int_pending(void)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Compare interrupt can be routed and latched outside the core,
 | 
					 * Compare interrupt can be routed and latched outside the core,
 | 
				
			||||||
 * so a single execution hazard barrier may not be enough to give
 | 
					 * so wait up to worst case number of cycle counter ticks for timer interrupt
 | 
				
			||||||
 * it time to clear as seen in the Cause register.  4 time the
 | 
					 * changes to propagate to the cause register.
 | 
				
			||||||
 * pipeline depth seems reasonably conservative, and empirically
 | 
					 | 
				
			||||||
 * works better in configurations with high CPU/bus clock ratios.
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					#define COMPARE_INT_SEEN_TICKS 50
 | 
				
			||||||
#define compare_change_hazard() \
 | 
					 | 
				
			||||||
	do { \
 | 
					 | 
				
			||||||
		irq_disable_hazard(); \
 | 
					 | 
				
			||||||
		irq_disable_hazard(); \
 | 
					 | 
				
			||||||
		irq_disable_hazard(); \
 | 
					 | 
				
			||||||
		irq_disable_hazard(); \
 | 
					 | 
				
			||||||
	} while (0)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
int c0_compare_int_usable(void)
 | 
					int c0_compare_int_usable(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					@ -126,8 +117,12 @@ int c0_compare_int_usable(void)
 | 
				
			||||||
	 * IP7 already pending?  Try to clear it by acking the timer.
 | 
						 * IP7 already pending?  Try to clear it by acking the timer.
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	if (c0_compare_int_pending()) {
 | 
						if (c0_compare_int_pending()) {
 | 
				
			||||||
		write_c0_compare(read_c0_count());
 | 
							cnt = read_c0_count();
 | 
				
			||||||
		compare_change_hazard();
 | 
							write_c0_compare(cnt);
 | 
				
			||||||
 | 
							back_to_back_c0_hazard();
 | 
				
			||||||
 | 
							while (read_c0_count() < (cnt  + COMPARE_INT_SEEN_TICKS))
 | 
				
			||||||
 | 
								if (!c0_compare_int_pending())
 | 
				
			||||||
 | 
									break;
 | 
				
			||||||
		if (c0_compare_int_pending())
 | 
							if (c0_compare_int_pending())
 | 
				
			||||||
			return 0;
 | 
								return 0;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					@ -136,7 +131,7 @@ int c0_compare_int_usable(void)
 | 
				
			||||||
		cnt = read_c0_count();
 | 
							cnt = read_c0_count();
 | 
				
			||||||
		cnt += delta;
 | 
							cnt += delta;
 | 
				
			||||||
		write_c0_compare(cnt);
 | 
							write_c0_compare(cnt);
 | 
				
			||||||
		compare_change_hazard();
 | 
							back_to_back_c0_hazard();
 | 
				
			||||||
		if ((int)(read_c0_count() - cnt) < 0)
 | 
							if ((int)(read_c0_count() - cnt) < 0)
 | 
				
			||||||
		    break;
 | 
							    break;
 | 
				
			||||||
		/* increase delta if the timer was already expired */
 | 
							/* increase delta if the timer was already expired */
 | 
				
			||||||
| 
						 | 
					@ -145,12 +140,17 @@ int c0_compare_int_usable(void)
 | 
				
			||||||
	while ((int)(read_c0_count() - cnt) <= 0)
 | 
						while ((int)(read_c0_count() - cnt) <= 0)
 | 
				
			||||||
		;	/* Wait for expiry  */
 | 
							;	/* Wait for expiry  */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	compare_change_hazard();
 | 
						while (read_c0_count() < (cnt + COMPARE_INT_SEEN_TICKS))
 | 
				
			||||||
 | 
							if (c0_compare_int_pending())
 | 
				
			||||||
 | 
								break;
 | 
				
			||||||
	if (!c0_compare_int_pending())
 | 
						if (!c0_compare_int_pending())
 | 
				
			||||||
		return 0;
 | 
							return 0;
 | 
				
			||||||
 | 
						cnt = read_c0_count();
 | 
				
			||||||
	write_c0_compare(read_c0_count());
 | 
						write_c0_compare(cnt);
 | 
				
			||||||
	compare_change_hazard();
 | 
						back_to_back_c0_hazard();
 | 
				
			||||||
 | 
						while (read_c0_count() < (cnt + COMPARE_INT_SEEN_TICKS))
 | 
				
			||||||
 | 
							if (!c0_compare_int_pending())
 | 
				
			||||||
 | 
								break;
 | 
				
			||||||
	if (c0_compare_int_pending())
 | 
						if (c0_compare_int_pending())
 | 
				
			||||||
		return 0;
 | 
							return 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,6 +7,7 @@
 | 
				
			||||||
 * for more details.
 | 
					 * for more details.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <linux/module.h>
 | 
				
			||||||
#include <linux/cpufreq.h>
 | 
					#include <linux/cpufreq.h>
 | 
				
			||||||
#include <linux/platform_device.h>
 | 
					#include <linux/platform_device.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -591,6 +591,8 @@ einval:	li	v0, -ENOSYS
 | 
				
			||||||
	sys	sys_syncfs		1
 | 
						sys	sys_syncfs		1
 | 
				
			||||||
	sys	sys_sendmmsg		4
 | 
						sys	sys_sendmmsg		4
 | 
				
			||||||
	sys	sys_setns		2
 | 
						sys	sys_setns		2
 | 
				
			||||||
 | 
						sys	sys_process_vm_readv	6	/* 4345 */
 | 
				
			||||||
 | 
						sys	sys_process_vm_writev	6
 | 
				
			||||||
	.endm
 | 
						.endm
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* We pre-compute the number of _instruction_ bytes needed to
 | 
						/* We pre-compute the number of _instruction_ bytes needed to
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -430,4 +430,6 @@ sys_call_table:
 | 
				
			||||||
	PTR	sys_syncfs
 | 
						PTR	sys_syncfs
 | 
				
			||||||
	PTR	sys_sendmmsg
 | 
						PTR	sys_sendmmsg
 | 
				
			||||||
	PTR	sys_setns
 | 
						PTR	sys_setns
 | 
				
			||||||
 | 
						PTR	sys_process_vm_readv
 | 
				
			||||||
 | 
						PTR	sys_process_vm_writev		/* 5305 */
 | 
				
			||||||
	.size	sys_call_table,.-sys_call_table
 | 
						.size	sys_call_table,.-sys_call_table
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -430,4 +430,6 @@ EXPORT(sysn32_call_table)
 | 
				
			||||||
	PTR	sys_syncfs
 | 
						PTR	sys_syncfs
 | 
				
			||||||
	PTR	compat_sys_sendmmsg
 | 
						PTR	compat_sys_sendmmsg
 | 
				
			||||||
	PTR	sys_setns
 | 
						PTR	sys_setns
 | 
				
			||||||
 | 
						PTR	compat_sys_process_vm_readv
 | 
				
			||||||
 | 
						PTR	compat_sys_process_vm_writev	/* 6310 */
 | 
				
			||||||
	.size	sysn32_call_table,.-sysn32_call_table
 | 
						.size	sysn32_call_table,.-sysn32_call_table
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -548,4 +548,6 @@ sys_call_table:
 | 
				
			||||||
	PTR	sys_syncfs
 | 
						PTR	sys_syncfs
 | 
				
			||||||
	PTR	compat_sys_sendmmsg
 | 
						PTR	compat_sys_sendmmsg
 | 
				
			||||||
	PTR	sys_setns
 | 
						PTR	sys_setns
 | 
				
			||||||
 | 
						PTR	compat_sys_process_vm_readv	/* 4345 */
 | 
				
			||||||
 | 
						PTR	compat_sys_process_vm_writev
 | 
				
			||||||
	.size	sys_call_table,.-sys_call_table
 | 
						.size	sys_call_table,.-sys_call_table
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1596,6 +1596,7 @@ void __cpuinit per_cpu_trap_init(void)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
#endif /* CONFIG_MIPS_MT_SMTC */
 | 
					#endif /* CONFIG_MIPS_MT_SMTC */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!cpu_data[cpu].asid_cache)
 | 
				
			||||||
		cpu_data[cpu].asid_cache = ASID_FIRST_VERSION;
 | 
							cpu_data[cpu].asid_cache = ASID_FIRST_VERSION;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	atomic_inc(&init_mm.mm_count);
 | 
						atomic_inc(&init_mm.mm_count);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,7 +7,7 @@
 | 
				
			||||||
 * Copyright (C) 2010 John Crispin <blogic@openwrt.org>
 | 
					 * Copyright (C) 2010 John Crispin <blogic@openwrt.org>
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include <linux/io.h>
 | 
					#include <linux/io.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/export.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/kernel.h>
 | 
					#include <linux/kernel.h>
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,7 +7,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/export.h>
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
#include <linux/string.h>
 | 
					#include <linux/string.h>
 | 
				
			||||||
#include <linux/kernel.h>
 | 
					#include <linux/kernel.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,7 +6,7 @@
 | 
				
			||||||
 * Copyright (C) 2010 John Crispin <blogic@openwrt.org>
 | 
					 * Copyright (C) 2010 John Crispin <blogic@openwrt.org>
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/export.h>
 | 
				
			||||||
#include <linux/clk.h>
 | 
					#include <linux/clk.h>
 | 
				
			||||||
#include <asm/bootinfo.h>
 | 
					#include <asm/bootinfo.h>
 | 
				
			||||||
#include <asm/time.h>
 | 
					#include <asm/time.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,7 +7,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/kernel.h>
 | 
					#include <linux/kernel.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/export.h>
 | 
				
			||||||
#include <linux/io.h>
 | 
					#include <linux/io.h>
 | 
				
			||||||
#include <linux/ioport.h>
 | 
					#include <linux/ioport.h>
 | 
				
			||||||
#include <asm/bootinfo.h>
 | 
					#include <asm/bootinfo.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,7 +7,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/io.h>
 | 
					#include <linux/io.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/export.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/clk.h>
 | 
					#include <linux/clk.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,7 +7,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/io.h>
 | 
					#include <linux/io.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/export.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/clk.h>
 | 
					#include <linux/clk.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,7 +7,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/export.h>
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
#include <linux/string.h>
 | 
					#include <linux/string.h>
 | 
				
			||||||
#include <linux/mtd/physmap.h>
 | 
					#include <linux/mtd/physmap.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -19,6 +19,7 @@
 | 
				
			||||||
#include <linux/platform_device.h>
 | 
					#include <linux/platform_device.h>
 | 
				
			||||||
#include <linux/io.h>
 | 
					#include <linux/io.h>
 | 
				
			||||||
#include <linux/dma-mapping.h>
 | 
					#include <linux/dma-mapping.h>
 | 
				
			||||||
 | 
					#include <linux/export.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <lantiq_soc.h>
 | 
					#include <lantiq_soc.h>
 | 
				
			||||||
#include <xway_dma.h>
 | 
					#include <xway_dma.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,7 +7,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/slab.h>
 | 
					#include <linux/slab.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/export.h>
 | 
				
			||||||
#include <linux/platform_device.h>
 | 
					#include <linux/platform_device.h>
 | 
				
			||||||
#include <linux/gpio.h>
 | 
					#include <linux/gpio.h>
 | 
				
			||||||
#include <linux/ioport.h>
 | 
					#include <linux/ioport.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,7 +7,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/export.h>
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
#include <linux/platform_device.h>
 | 
					#include <linux/platform_device.h>
 | 
				
			||||||
#include <linux/mutex.h>
 | 
					#include <linux/mutex.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -9,7 +9,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/slab.h>
 | 
					#include <linux/slab.h>
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/export.h>
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
#include <linux/platform_device.h>
 | 
					#include <linux/platform_device.h>
 | 
				
			||||||
#include <linux/mutex.h>
 | 
					#include <linux/mutex.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,7 +6,7 @@
 | 
				
			||||||
 *  Copyright (C) 2010 John Crispin <blogic@openwrt.org>
 | 
					 *  Copyright (C) 2010 John Crispin <blogic@openwrt.org>
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/export.h>
 | 
				
			||||||
#include <linux/clk.h>
 | 
					#include <linux/clk.h>
 | 
				
			||||||
#include <asm/bootinfo.h>
 | 
					#include <asm/bootinfo.h>
 | 
				
			||||||
#include <asm/time.h>
 | 
					#include <asm/time.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,7 +6,7 @@
 | 
				
			||||||
 *  Copyright (C) 2010 John Crispin <blogic@openwrt.org>
 | 
					 *  Copyright (C) 2010 John Crispin <blogic@openwrt.org>
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/export.h>
 | 
				
			||||||
#include <linux/clk.h>
 | 
					#include <linux/clk.h>
 | 
				
			||||||
#include <asm/bootinfo.h>
 | 
					#include <asm/bootinfo.h>
 | 
				
			||||||
#include <asm/time.h>
 | 
					#include <asm/time.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,7 +10,7 @@
 | 
				
			||||||
#include <linux/io.h>
 | 
					#include <linux/io.h>
 | 
				
			||||||
#include <linux/ioport.h>
 | 
					#include <linux/ioport.h>
 | 
				
			||||||
#include <linux/pm.h>
 | 
					#include <linux/pm.h>
 | 
				
			||||||
#include <linux/module.h>
 | 
					#include <linux/export.h>
 | 
				
			||||||
#include <asm/reboot.h>
 | 
					#include <asm/reboot.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <lantiq_soc.h>
 | 
					#include <lantiq_soc.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,134 +0,0 @@
 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * BRIEF MODULE DESCRIPTION
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * Author: source@mvista.com
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *  This program is free software; you can distribute it and/or modify it
 | 
					 | 
				
			||||||
 *  under the terms of the GNU General Public License (Version 2) as
 | 
					 | 
				
			||||||
 *  published by the Free Software Foundation.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *  This program is distributed in the hope it will be useful, but WITHOUT
 | 
					 | 
				
			||||||
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 | 
					 | 
				
			||||||
 *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 | 
					 | 
				
			||||||
 *  for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *  You should have received a copy of the GNU General Public License along
 | 
					 | 
				
			||||||
 *  with this program; if not, write to the Free Software Foundation, Inc.,
 | 
					 | 
				
			||||||
 *  59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
#include <linux/types.h>
 | 
					 | 
				
			||||||
#include <linux/pci.h>
 | 
					 | 
				
			||||||
#include <linux/kernel.h>
 | 
					 | 
				
			||||||
#include <linux/init.h>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include <pci.h>
 | 
					 | 
				
			||||||
#include <glb.h>
 | 
					 | 
				
			||||||
#include <nand.h>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct resource pci_io_resource = {
 | 
					 | 
				
			||||||
	.start	= PNX8550_PCIIO + 0x1000,	/* reserve regacy I/O space */
 | 
					 | 
				
			||||||
	.end	= PNX8550_PCIIO + PNX8550_PCIIO_SIZE,
 | 
					 | 
				
			||||||
	.name	= "pci IO space",
 | 
					 | 
				
			||||||
	.flags	= IORESOURCE_IO
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct resource pci_mem_resource = {
 | 
					 | 
				
			||||||
	.start	= PNX8550_PCIMEM,
 | 
					 | 
				
			||||||
	.end	= PNX8550_PCIMEM + PNX8550_PCIMEM_SIZE - 1,
 | 
					 | 
				
			||||||
	.name	= "pci memory space",
 | 
					 | 
				
			||||||
	.flags	= IORESOURCE_MEM
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
extern struct pci_ops pnx8550_pci_ops;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct pci_controller pnx8550_controller = {
 | 
					 | 
				
			||||||
	.pci_ops	= &pnx8550_pci_ops,
 | 
					 | 
				
			||||||
	.io_map_base	= PNX8550_PORT_BASE,
 | 
					 | 
				
			||||||
	.io_resource	= &pci_io_resource,
 | 
					 | 
				
			||||||
	.mem_resource	= &pci_mem_resource,
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/* Return the total size of DRAM-memory, (RANK0 + RANK1) */
 | 
					 | 
				
			||||||
static inline unsigned long get_system_mem_size(void)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	/* Read IP2031_RANK0_ADDR_LO */
 | 
					 | 
				
			||||||
	unsigned long dram_r0_lo = inl(PCI_BASE | 0x65010);
 | 
					 | 
				
			||||||
	/* Read IP2031_RANK1_ADDR_HI */
 | 
					 | 
				
			||||||
	unsigned long dram_r1_hi = inl(PCI_BASE | 0x65018);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return dram_r1_hi - dram_r0_lo + 1;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static int __init pnx8550_pci_setup(void)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	int pci_mem_code;
 | 
					 | 
				
			||||||
	int mem_size = get_system_mem_size() >> 20;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* Clear the Global 2 Register, PCI Inta Output Enable Registers
 | 
					 | 
				
			||||||
	   Bit 1:Enable DAC Powerdown
 | 
					 | 
				
			||||||
	  -> 0:DACs are enabled and are working normally
 | 
					 | 
				
			||||||
	     1:DACs are powerdown
 | 
					 | 
				
			||||||
	   Bit 0:Enable of PCI inta output
 | 
					 | 
				
			||||||
	  -> 0 = Disable PCI inta output
 | 
					 | 
				
			||||||
	     1 = Enable PCI inta output
 | 
					 | 
				
			||||||
	*/
 | 
					 | 
				
			||||||
	PNX8550_GLB2_ENAB_INTA_O = 0;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* Calc the PCI mem size code */
 | 
					 | 
				
			||||||
	if (mem_size >= 128)
 | 
					 | 
				
			||||||
		pci_mem_code = SIZE_128M;
 | 
					 | 
				
			||||||
	else if (mem_size >= 64)
 | 
					 | 
				
			||||||
		pci_mem_code = SIZE_64M;
 | 
					 | 
				
			||||||
	else if (mem_size >= 32)
 | 
					 | 
				
			||||||
		pci_mem_code = SIZE_32M;
 | 
					 | 
				
			||||||
	else
 | 
					 | 
				
			||||||
		pci_mem_code = SIZE_16M;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* Set PCI_XIO registers */
 | 
					 | 
				
			||||||
	outl(pci_mem_resource.start, PCI_BASE | PCI_BASE1_LO);
 | 
					 | 
				
			||||||
	outl(pci_mem_resource.end + 1, PCI_BASE | PCI_BASE1_HI);
 | 
					 | 
				
			||||||
	outl(pci_io_resource.start, PCI_BASE | PCI_BASE2_LO);
 | 
					 | 
				
			||||||
	outl(pci_io_resource.end, PCI_BASE | PCI_BASE2_HI);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* Send memory transaction via PCI_BASE2 */
 | 
					 | 
				
			||||||
	outl(0x00000001, PCI_BASE | PCI_IO);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* Unlock the setup register */
 | 
					 | 
				
			||||||
	outl(0xca, PCI_BASE | PCI_UNLOCKREG);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
					 | 
				
			||||||
	 * BAR0 of PNX8550 (pci base 10) must be zero in order for ide
 | 
					 | 
				
			||||||
	 * to work, and in order for bus_to_baddr to work without any
 | 
					 | 
				
			||||||
	 * hacks.
 | 
					 | 
				
			||||||
	 */
 | 
					 | 
				
			||||||
	outl(0x00000000, PCI_BASE | PCI_BASE10);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
					 | 
				
			||||||
	 *These two bars are set by default or the boot code.
 | 
					 | 
				
			||||||
	 * However, it's safer to set them here so we're not boot
 | 
					 | 
				
			||||||
	 * code dependent.
 | 
					 | 
				
			||||||
	 */
 | 
					 | 
				
			||||||
	outl(0x1be00000, PCI_BASE | PCI_BASE14);  /* PNX MMIO */
 | 
					 | 
				
			||||||
	outl(PNX8550_NAND_BASE_ADDR, PCI_BASE | PCI_BASE18);  /* XIO      */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	outl(PCI_EN_TA |
 | 
					 | 
				
			||||||
	     PCI_EN_PCI2MMI |
 | 
					 | 
				
			||||||
	     PCI_EN_XIO |
 | 
					 | 
				
			||||||
	     PCI_SETUP_BASE18_SIZE(SIZE_32M) |
 | 
					 | 
				
			||||||
	     PCI_SETUP_BASE18_EN |
 | 
					 | 
				
			||||||
	     PCI_SETUP_BASE14_EN |
 | 
					 | 
				
			||||||
	     PCI_SETUP_BASE10_PREF |
 | 
					 | 
				
			||||||
	     PCI_SETUP_BASE10_SIZE(pci_mem_code) |
 | 
					 | 
				
			||||||
	     PCI_SETUP_CFGMANAGE_EN |
 | 
					 | 
				
			||||||
	     PCI_SETUP_PCIARB_EN,
 | 
					 | 
				
			||||||
	     PCI_BASE |
 | 
					 | 
				
			||||||
	     PCI_SETUP);	/* PCI_SETUP */
 | 
					 | 
				
			||||||
	outl(0x00000000, PCI_BASE | PCI_CTRL);	/* PCI_CONTROL */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	register_pci_controller(&pnx8550_controller);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return 0;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
arch_initcall(pnx8550_pci_setup);
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,143 +0,0 @@
 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * 2.6 port, Embedded Alley Solutions, Inc
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *  Based on Per Hallsmark, per.hallsmark@mvista.com
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *  This program is free software; you can distribute it and/or modify it
 | 
					 | 
				
			||||||
 *  under the terms of the GNU General Public License (Version 2) as
 | 
					 | 
				
			||||||
 *  published by the Free Software Foundation.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *  This program is distributed in the hope it will be useful, but WITHOUT
 | 
					 | 
				
			||||||
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 | 
					 | 
				
			||||||
 *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 | 
					 | 
				
			||||||
 *  for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *  You should have received a copy of the GNU General Public License along
 | 
					 | 
				
			||||||
 *  with this program; if not, write to the Free Software Foundation, Inc.,
 | 
					 | 
				
			||||||
 *  59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
#include <linux/init.h>
 | 
					 | 
				
			||||||
#include <linux/sched.h>
 | 
					 | 
				
			||||||
#include <linux/ioport.h>
 | 
					 | 
				
			||||||
#include <linux/irq.h>
 | 
					 | 
				
			||||||
#include <linux/mm.h>
 | 
					 | 
				
			||||||
#include <linux/delay.h>
 | 
					 | 
				
			||||||
#include <linux/interrupt.h>
 | 
					 | 
				
			||||||
#include <linux/serial_pnx8xxx.h>
 | 
					 | 
				
			||||||
#include <linux/pm.h>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include <asm/cpu.h>
 | 
					 | 
				
			||||||
#include <asm/bootinfo.h>
 | 
					 | 
				
			||||||
#include <asm/irq.h>
 | 
					 | 
				
			||||||
#include <asm/mipsregs.h>
 | 
					 | 
				
			||||||
#include <asm/reboot.h>
 | 
					 | 
				
			||||||
#include <asm/pgtable.h>
 | 
					 | 
				
			||||||
#include <asm/time.h>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include <glb.h>
 | 
					 | 
				
			||||||
#include <int.h>
 | 
					 | 
				
			||||||
#include <pci.h>
 | 
					 | 
				
			||||||
#include <uart.h>
 | 
					 | 
				
			||||||
#include <nand.h>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
extern void __init board_setup(void);
 | 
					 | 
				
			||||||
extern void pnx8550_machine_restart(char *);
 | 
					 | 
				
			||||||
extern void pnx8550_machine_halt(void);
 | 
					 | 
				
			||||||
extern void pnx8550_machine_power_off(void);
 | 
					 | 
				
			||||||
extern struct resource ioport_resource;
 | 
					 | 
				
			||||||
extern struct resource iomem_resource;
 | 
					 | 
				
			||||||
extern char *prom_getcmdline(void);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
struct resource standard_io_resources[] = {
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
		.start	= 0x00,
 | 
					 | 
				
			||||||
		.end	= 0x1f,
 | 
					 | 
				
			||||||
		.name	= "dma1",
 | 
					 | 
				
			||||||
		.flags	= IORESOURCE_BUSY
 | 
					 | 
				
			||||||
	}, {
 | 
					 | 
				
			||||||
		.start	= 0x40,
 | 
					 | 
				
			||||||
		.end	= 0x5f,
 | 
					 | 
				
			||||||
		.name	= "timer",
 | 
					 | 
				
			||||||
		.flags	= IORESOURCE_BUSY
 | 
					 | 
				
			||||||
	}, {
 | 
					 | 
				
			||||||
		.start	= 0x80,
 | 
					 | 
				
			||||||
		.end	= 0x8f,
 | 
					 | 
				
			||||||
		.name	= "dma page reg",
 | 
					 | 
				
			||||||
		.flags	= IORESOURCE_BUSY
 | 
					 | 
				
			||||||
	}, {
 | 
					 | 
				
			||||||
		.start	= 0xc0,
 | 
					 | 
				
			||||||
		.end	= 0xdf,
 | 
					 | 
				
			||||||
		.name	= "dma2",
 | 
					 | 
				
			||||||
		.flags	= IORESOURCE_BUSY
 | 
					 | 
				
			||||||
	},
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#define STANDARD_IO_RESOURCES ARRAY_SIZE(standard_io_resources)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
extern struct resource pci_io_resource;
 | 
					 | 
				
			||||||
extern struct resource pci_mem_resource;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/* Return the total size of DRAM-memory, (RANK0 + RANK1) */
 | 
					 | 
				
			||||||
unsigned long get_system_mem_size(void)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	/* Read IP2031_RANK0_ADDR_LO */
 | 
					 | 
				
			||||||
	unsigned long dram_r0_lo = inl(PCI_BASE | 0x65010);
 | 
					 | 
				
			||||||
	/* Read IP2031_RANK1_ADDR_HI */
 | 
					 | 
				
			||||||
	unsigned long dram_r1_hi = inl(PCI_BASE | 0x65018);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return dram_r1_hi - dram_r0_lo + 1;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
int pnx8550_console_port = -1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void __init plat_mem_setup(void)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	int i;
 | 
					 | 
				
			||||||
	char* argptr;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	board_setup();  /* board specific setup */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        _machine_restart = pnx8550_machine_restart;
 | 
					 | 
				
			||||||
        _machine_halt = pnx8550_machine_halt;
 | 
					 | 
				
			||||||
        pm_power_off = pnx8550_machine_power_off;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* Clear the Global 2 Register, PCI Inta Output Enable Registers
 | 
					 | 
				
			||||||
	   Bit 1:Enable DAC Powerdown
 | 
					 | 
				
			||||||
	  -> 0:DACs are enabled and are working normally
 | 
					 | 
				
			||||||
	     1:DACs are powerdown
 | 
					 | 
				
			||||||
	   Bit 0:Enable of PCI inta output
 | 
					 | 
				
			||||||
	  -> 0 = Disable PCI inta output
 | 
					 | 
				
			||||||
	     1 = Enable PCI inta output
 | 
					 | 
				
			||||||
	*/
 | 
					 | 
				
			||||||
	PNX8550_GLB2_ENAB_INTA_O = 0;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* IO/MEM resources. */
 | 
					 | 
				
			||||||
	set_io_port_base(PNX8550_PORT_BASE);
 | 
					 | 
				
			||||||
	ioport_resource.start = 0;
 | 
					 | 
				
			||||||
	ioport_resource.end = ~0;
 | 
					 | 
				
			||||||
	iomem_resource.start = 0;
 | 
					 | 
				
			||||||
	iomem_resource.end = ~0;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* Request I/O space for devices on this board */
 | 
					 | 
				
			||||||
	for (i = 0; i < STANDARD_IO_RESOURCES; i++)
 | 
					 | 
				
			||||||
		request_resource(&ioport_resource, standard_io_resources + i);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* Place the Mode Control bit for GPIO pin 16 in primary function */
 | 
					 | 
				
			||||||
	/* Pin 16 is used by UART1, UA1_TX                                */
 | 
					 | 
				
			||||||
	outl((PNX8550_GPIO_MODE_PRIMOP << PNX8550_GPIO_MC_16_BIT) |
 | 
					 | 
				
			||||||
			(PNX8550_GPIO_MODE_PRIMOP << PNX8550_GPIO_MC_17_BIT),
 | 
					 | 
				
			||||||
			PNX8550_GPIO_MC1);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	argptr = prom_getcmdline();
 | 
					 | 
				
			||||||
	if ((argptr = strstr(argptr, "console=ttyS")) != NULL) {
 | 
					 | 
				
			||||||
		argptr += strlen("console=ttyS");
 | 
					 | 
				
			||||||
		pnx8550_console_port = *argptr == '0' ? 0 : 1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		/* We must initialize the UART (console) before early printk */
 | 
					 | 
				
			||||||
		/* Set LCR to 8-bit and BAUD to 38400 (no 5)                */
 | 
					 | 
				
			||||||
		ip3106_lcr(UART_BASE, pnx8550_console_port) =
 | 
					 | 
				
			||||||
			PNX8XXX_UART_LCR_8BIT;
 | 
					 | 
				
			||||||
		ip3106_baud(UART_BASE, pnx8550_console_port) = 5;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
| 
						 | 
					@ -7,6 +7,7 @@
 | 
				
			||||||
 * Support for all devices (greater than 16) added by David Gathright.
 | 
					 * Support for all devices (greater than 16) added by David Gathright.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <linux/export.h>
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
#include <linux/pci.h>
 | 
					#include <linux/pci.h>
 | 
				
			||||||
#include <linux/platform_device.h>
 | 
					#include <linux/platform_device.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,6 +13,7 @@
 | 
				
			||||||
#include <linux/delay.h>
 | 
					#include <linux/delay.h>
 | 
				
			||||||
#include <linux/mm.h>
 | 
					#include <linux/mm.h>
 | 
				
			||||||
#include <linux/vmalloc.h>
 | 
					#include <linux/vmalloc.h>
 | 
				
			||||||
 | 
					#include <linux/export.h>
 | 
				
			||||||
#include <linux/platform_device.h>
 | 
					#include <linux/platform_device.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <asm/pci.h>
 | 
					#include <asm/pci.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -102,7 +102,7 @@ void __init prom_init(void)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Get the boot parameters */
 | 
						/* Get the boot parameters */
 | 
				
			||||||
	for (i = 1; i < argc; i++) {
 | 
						for (i = 1; i < argc; i++) {
 | 
				
			||||||
		if (strlen(arcs_cmdline) + strlen(arg[i] + 1) >=
 | 
							if (strlen(arcs_cmdline) + strlen(arg[i]) + 1 >=
 | 
				
			||||||
		    sizeof(arcs_cmdline))
 | 
							    sizeof(arcs_cmdline))
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -345,7 +345,7 @@ config ARCH_ENABLE_MEMORY_HOTREMOVE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
config KEXEC
 | 
					config KEXEC
 | 
				
			||||||
	bool "kexec system call (EXPERIMENTAL)"
 | 
						bool "kexec system call (EXPERIMENTAL)"
 | 
				
			||||||
	depends on (PPC_BOOK3S || FSL_BOOKE || (44x && !SMP && !47x)) && EXPERIMENTAL
 | 
						depends on (PPC_BOOK3S || FSL_BOOKE || (44x && !SMP && !PPC_47x)) && EXPERIMENTAL
 | 
				
			||||||
	help
 | 
						help
 | 
				
			||||||
	  kexec is a system call that implements the ability to shutdown your
 | 
						  kexec is a system call that implements the ability to shutdown your
 | 
				
			||||||
	  current kernel, and to start another kernel.  It is like a reboot
 | 
						  current kernel, and to start another kernel.  It is like a reboot
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -255,12 +255,6 @@ checkbin:
 | 
				
			||||||
		echo 'disable kernel modules' ; \
 | 
							echo 'disable kernel modules' ; \
 | 
				
			||||||
		false ; \
 | 
							false ; \
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
	@if ! /bin/echo dssall | $(AS) -many -o $(TOUT) >/dev/null 2>&1 ; then \
 | 
					 | 
				
			||||||
		echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build ' ; \
 | 
					 | 
				
			||||||
		echo 'correctly with old versions of binutils.' ; \
 | 
					 | 
				
			||||||
		echo '*** Please upgrade your binutils to 2.12.1 or newer' ; \
 | 
					 | 
				
			||||||
		false ; \
 | 
					 | 
				
			||||||
	fi
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
CLEAN_FILES += $(TOUT)
 | 
					CLEAN_FILES += $(TOUT)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -49,13 +49,13 @@ static __inline__ int atomic_add_return(int a, atomic_t *v)
 | 
				
			||||||
	int t;
 | 
						int t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	__asm__ __volatile__(
 | 
						__asm__ __volatile__(
 | 
				
			||||||
	PPC_RELEASE_BARRIER
 | 
						PPC_ATOMIC_ENTRY_BARRIER
 | 
				
			||||||
"1:	lwarx	%0,0,%2		# atomic_add_return\n\
 | 
					"1:	lwarx	%0,0,%2		# atomic_add_return\n\
 | 
				
			||||||
	add	%0,%1,%0\n"
 | 
						add	%0,%1,%0\n"
 | 
				
			||||||
	PPC405_ERR77(0,%2)
 | 
						PPC405_ERR77(0,%2)
 | 
				
			||||||
"	stwcx.	%0,0,%2 \n\
 | 
					"	stwcx.	%0,0,%2 \n\
 | 
				
			||||||
	bne-	1b"
 | 
						bne-	1b"
 | 
				
			||||||
	PPC_ACQUIRE_BARRIER
 | 
						PPC_ATOMIC_EXIT_BARRIER
 | 
				
			||||||
	: "=&r" (t)
 | 
						: "=&r" (t)
 | 
				
			||||||
	: "r" (a), "r" (&v->counter)
 | 
						: "r" (a), "r" (&v->counter)
 | 
				
			||||||
	: "cc", "memory");
 | 
						: "cc", "memory");
 | 
				
			||||||
| 
						 | 
					@ -85,13 +85,13 @@ static __inline__ int atomic_sub_return(int a, atomic_t *v)
 | 
				
			||||||
	int t;
 | 
						int t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	__asm__ __volatile__(
 | 
						__asm__ __volatile__(
 | 
				
			||||||
	PPC_RELEASE_BARRIER
 | 
						PPC_ATOMIC_ENTRY_BARRIER
 | 
				
			||||||
"1:	lwarx	%0,0,%2		# atomic_sub_return\n\
 | 
					"1:	lwarx	%0,0,%2		# atomic_sub_return\n\
 | 
				
			||||||
	subf	%0,%1,%0\n"
 | 
						subf	%0,%1,%0\n"
 | 
				
			||||||
	PPC405_ERR77(0,%2)
 | 
						PPC405_ERR77(0,%2)
 | 
				
			||||||
"	stwcx.	%0,0,%2 \n\
 | 
					"	stwcx.	%0,0,%2 \n\
 | 
				
			||||||
	bne-	1b"
 | 
						bne-	1b"
 | 
				
			||||||
	PPC_ACQUIRE_BARRIER
 | 
						PPC_ATOMIC_EXIT_BARRIER
 | 
				
			||||||
	: "=&r" (t)
 | 
						: "=&r" (t)
 | 
				
			||||||
	: "r" (a), "r" (&v->counter)
 | 
						: "r" (a), "r" (&v->counter)
 | 
				
			||||||
	: "cc", "memory");
 | 
						: "cc", "memory");
 | 
				
			||||||
| 
						 | 
					@ -119,13 +119,13 @@ static __inline__ int atomic_inc_return(atomic_t *v)
 | 
				
			||||||
	int t;
 | 
						int t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	__asm__ __volatile__(
 | 
						__asm__ __volatile__(
 | 
				
			||||||
	PPC_RELEASE_BARRIER
 | 
						PPC_ATOMIC_ENTRY_BARRIER
 | 
				
			||||||
"1:	lwarx	%0,0,%1		# atomic_inc_return\n\
 | 
					"1:	lwarx	%0,0,%1		# atomic_inc_return\n\
 | 
				
			||||||
	addic	%0,%0,1\n"
 | 
						addic	%0,%0,1\n"
 | 
				
			||||||
	PPC405_ERR77(0,%1)
 | 
						PPC405_ERR77(0,%1)
 | 
				
			||||||
"	stwcx.	%0,0,%1 \n\
 | 
					"	stwcx.	%0,0,%1 \n\
 | 
				
			||||||
	bne-	1b"
 | 
						bne-	1b"
 | 
				
			||||||
	PPC_ACQUIRE_BARRIER
 | 
						PPC_ATOMIC_EXIT_BARRIER
 | 
				
			||||||
	: "=&r" (t)
 | 
						: "=&r" (t)
 | 
				
			||||||
	: "r" (&v->counter)
 | 
						: "r" (&v->counter)
 | 
				
			||||||
	: "cc", "xer", "memory");
 | 
						: "cc", "xer", "memory");
 | 
				
			||||||
| 
						 | 
					@ -163,13 +163,13 @@ static __inline__ int atomic_dec_return(atomic_t *v)
 | 
				
			||||||
	int t;
 | 
						int t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	__asm__ __volatile__(
 | 
						__asm__ __volatile__(
 | 
				
			||||||
	PPC_RELEASE_BARRIER
 | 
						PPC_ATOMIC_ENTRY_BARRIER
 | 
				
			||||||
"1:	lwarx	%0,0,%1		# atomic_dec_return\n\
 | 
					"1:	lwarx	%0,0,%1		# atomic_dec_return\n\
 | 
				
			||||||
	addic	%0,%0,-1\n"
 | 
						addic	%0,%0,-1\n"
 | 
				
			||||||
	PPC405_ERR77(0,%1)
 | 
						PPC405_ERR77(0,%1)
 | 
				
			||||||
"	stwcx.	%0,0,%1\n\
 | 
					"	stwcx.	%0,0,%1\n\
 | 
				
			||||||
	bne-	1b"
 | 
						bne-	1b"
 | 
				
			||||||
	PPC_ACQUIRE_BARRIER
 | 
						PPC_ATOMIC_EXIT_BARRIER
 | 
				
			||||||
	: "=&r" (t)
 | 
						: "=&r" (t)
 | 
				
			||||||
	: "r" (&v->counter)
 | 
						: "r" (&v->counter)
 | 
				
			||||||
	: "cc", "xer", "memory");
 | 
						: "cc", "xer", "memory");
 | 
				
			||||||
| 
						 | 
					@ -194,7 +194,7 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u)
 | 
				
			||||||
	int t;
 | 
						int t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	__asm__ __volatile__ (
 | 
						__asm__ __volatile__ (
 | 
				
			||||||
	PPC_RELEASE_BARRIER
 | 
						PPC_ATOMIC_ENTRY_BARRIER
 | 
				
			||||||
"1:	lwarx	%0,0,%1		# __atomic_add_unless\n\
 | 
					"1:	lwarx	%0,0,%1		# __atomic_add_unless\n\
 | 
				
			||||||
	cmpw	0,%0,%3 \n\
 | 
						cmpw	0,%0,%3 \n\
 | 
				
			||||||
	beq-	2f \n\
 | 
						beq-	2f \n\
 | 
				
			||||||
| 
						 | 
					@ -202,7 +202,7 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u)
 | 
				
			||||||
	PPC405_ERR77(0,%2)
 | 
						PPC405_ERR77(0,%2)
 | 
				
			||||||
"	stwcx.	%0,0,%1 \n\
 | 
					"	stwcx.	%0,0,%1 \n\
 | 
				
			||||||
	bne-	1b \n"
 | 
						bne-	1b \n"
 | 
				
			||||||
	PPC_ACQUIRE_BARRIER
 | 
						PPC_ATOMIC_EXIT_BARRIER
 | 
				
			||||||
"	subf	%0,%2,%0 \n\
 | 
					"	subf	%0,%2,%0 \n\
 | 
				
			||||||
2:"
 | 
					2:"
 | 
				
			||||||
	: "=&r" (t)
 | 
						: "=&r" (t)
 | 
				
			||||||
| 
						 | 
					@ -226,7 +226,7 @@ static __inline__ int atomic_dec_if_positive(atomic_t *v)
 | 
				
			||||||
	int t;
 | 
						int t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	__asm__ __volatile__(
 | 
						__asm__ __volatile__(
 | 
				
			||||||
	PPC_RELEASE_BARRIER
 | 
						PPC_ATOMIC_ENTRY_BARRIER
 | 
				
			||||||
"1:	lwarx	%0,0,%1		# atomic_dec_if_positive\n\
 | 
					"1:	lwarx	%0,0,%1		# atomic_dec_if_positive\n\
 | 
				
			||||||
	cmpwi	%0,1\n\
 | 
						cmpwi	%0,1\n\
 | 
				
			||||||
	addi	%0,%0,-1\n\
 | 
						addi	%0,%0,-1\n\
 | 
				
			||||||
| 
						 | 
					@ -234,7 +234,7 @@ static __inline__ int atomic_dec_if_positive(atomic_t *v)
 | 
				
			||||||
	PPC405_ERR77(0,%1)
 | 
						PPC405_ERR77(0,%1)
 | 
				
			||||||
"	stwcx.	%0,0,%1\n\
 | 
					"	stwcx.	%0,0,%1\n\
 | 
				
			||||||
	bne-	1b"
 | 
						bne-	1b"
 | 
				
			||||||
	PPC_ACQUIRE_BARRIER
 | 
						PPC_ATOMIC_EXIT_BARRIER
 | 
				
			||||||
	"\n\
 | 
						"\n\
 | 
				
			||||||
2:"	: "=&b" (t)
 | 
					2:"	: "=&b" (t)
 | 
				
			||||||
	: "r" (&v->counter)
 | 
						: "r" (&v->counter)
 | 
				
			||||||
| 
						 | 
					@ -285,12 +285,12 @@ static __inline__ long atomic64_add_return(long a, atomic64_t *v)
 | 
				
			||||||
	long t;
 | 
						long t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	__asm__ __volatile__(
 | 
						__asm__ __volatile__(
 | 
				
			||||||
	PPC_RELEASE_BARRIER
 | 
						PPC_ATOMIC_ENTRY_BARRIER
 | 
				
			||||||
"1:	ldarx	%0,0,%2		# atomic64_add_return\n\
 | 
					"1:	ldarx	%0,0,%2		# atomic64_add_return\n\
 | 
				
			||||||
	add	%0,%1,%0\n\
 | 
						add	%0,%1,%0\n\
 | 
				
			||||||
	stdcx.	%0,0,%2 \n\
 | 
						stdcx.	%0,0,%2 \n\
 | 
				
			||||||
	bne-	1b"
 | 
						bne-	1b"
 | 
				
			||||||
	PPC_ACQUIRE_BARRIER
 | 
						PPC_ATOMIC_EXIT_BARRIER
 | 
				
			||||||
	: "=&r" (t)
 | 
						: "=&r" (t)
 | 
				
			||||||
	: "r" (a), "r" (&v->counter)
 | 
						: "r" (a), "r" (&v->counter)
 | 
				
			||||||
	: "cc", "memory");
 | 
						: "cc", "memory");
 | 
				
			||||||
| 
						 | 
					@ -319,12 +319,12 @@ static __inline__ long atomic64_sub_return(long a, atomic64_t *v)
 | 
				
			||||||
	long t;
 | 
						long t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	__asm__ __volatile__(
 | 
						__asm__ __volatile__(
 | 
				
			||||||
	PPC_RELEASE_BARRIER
 | 
						PPC_ATOMIC_ENTRY_BARRIER
 | 
				
			||||||
"1:	ldarx	%0,0,%2		# atomic64_sub_return\n\
 | 
					"1:	ldarx	%0,0,%2		# atomic64_sub_return\n\
 | 
				
			||||||
	subf	%0,%1,%0\n\
 | 
						subf	%0,%1,%0\n\
 | 
				
			||||||
	stdcx.	%0,0,%2 \n\
 | 
						stdcx.	%0,0,%2 \n\
 | 
				
			||||||
	bne-	1b"
 | 
						bne-	1b"
 | 
				
			||||||
	PPC_ACQUIRE_BARRIER
 | 
						PPC_ATOMIC_EXIT_BARRIER
 | 
				
			||||||
	: "=&r" (t)
 | 
						: "=&r" (t)
 | 
				
			||||||
	: "r" (a), "r" (&v->counter)
 | 
						: "r" (a), "r" (&v->counter)
 | 
				
			||||||
	: "cc", "memory");
 | 
						: "cc", "memory");
 | 
				
			||||||
| 
						 | 
					@ -351,12 +351,12 @@ static __inline__ long atomic64_inc_return(atomic64_t *v)
 | 
				
			||||||
	long t;
 | 
						long t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	__asm__ __volatile__(
 | 
						__asm__ __volatile__(
 | 
				
			||||||
	PPC_RELEASE_BARRIER
 | 
						PPC_ATOMIC_ENTRY_BARRIER
 | 
				
			||||||
"1:	ldarx	%0,0,%1		# atomic64_inc_return\n\
 | 
					"1:	ldarx	%0,0,%1		# atomic64_inc_return\n\
 | 
				
			||||||
	addic	%0,%0,1\n\
 | 
						addic	%0,%0,1\n\
 | 
				
			||||||
	stdcx.	%0,0,%1 \n\
 | 
						stdcx.	%0,0,%1 \n\
 | 
				
			||||||
	bne-	1b"
 | 
						bne-	1b"
 | 
				
			||||||
	PPC_ACQUIRE_BARRIER
 | 
						PPC_ATOMIC_EXIT_BARRIER
 | 
				
			||||||
	: "=&r" (t)
 | 
						: "=&r" (t)
 | 
				
			||||||
	: "r" (&v->counter)
 | 
						: "r" (&v->counter)
 | 
				
			||||||
	: "cc", "xer", "memory");
 | 
						: "cc", "xer", "memory");
 | 
				
			||||||
| 
						 | 
					@ -393,12 +393,12 @@ static __inline__ long atomic64_dec_return(atomic64_t *v)
 | 
				
			||||||
	long t;
 | 
						long t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	__asm__ __volatile__(
 | 
						__asm__ __volatile__(
 | 
				
			||||||
	PPC_RELEASE_BARRIER
 | 
						PPC_ATOMIC_ENTRY_BARRIER
 | 
				
			||||||
"1:	ldarx	%0,0,%1		# atomic64_dec_return\n\
 | 
					"1:	ldarx	%0,0,%1		# atomic64_dec_return\n\
 | 
				
			||||||
	addic	%0,%0,-1\n\
 | 
						addic	%0,%0,-1\n\
 | 
				
			||||||
	stdcx.	%0,0,%1\n\
 | 
						stdcx.	%0,0,%1\n\
 | 
				
			||||||
	bne-	1b"
 | 
						bne-	1b"
 | 
				
			||||||
	PPC_ACQUIRE_BARRIER
 | 
						PPC_ATOMIC_EXIT_BARRIER
 | 
				
			||||||
	: "=&r" (t)
 | 
						: "=&r" (t)
 | 
				
			||||||
	: "r" (&v->counter)
 | 
						: "r" (&v->counter)
 | 
				
			||||||
	: "cc", "xer", "memory");
 | 
						: "cc", "xer", "memory");
 | 
				
			||||||
| 
						 | 
					@ -418,13 +418,13 @@ static __inline__ long atomic64_dec_if_positive(atomic64_t *v)
 | 
				
			||||||
	long t;
 | 
						long t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	__asm__ __volatile__(
 | 
						__asm__ __volatile__(
 | 
				
			||||||
	PPC_RELEASE_BARRIER
 | 
						PPC_ATOMIC_ENTRY_BARRIER
 | 
				
			||||||
"1:	ldarx	%0,0,%1		# atomic64_dec_if_positive\n\
 | 
					"1:	ldarx	%0,0,%1		# atomic64_dec_if_positive\n\
 | 
				
			||||||
	addic.	%0,%0,-1\n\
 | 
						addic.	%0,%0,-1\n\
 | 
				
			||||||
	blt-	2f\n\
 | 
						blt-	2f\n\
 | 
				
			||||||
	stdcx.	%0,0,%1\n\
 | 
						stdcx.	%0,0,%1\n\
 | 
				
			||||||
	bne-	1b"
 | 
						bne-	1b"
 | 
				
			||||||
	PPC_ACQUIRE_BARRIER
 | 
						PPC_ATOMIC_EXIT_BARRIER
 | 
				
			||||||
	"\n\
 | 
						"\n\
 | 
				
			||||||
2:"	: "=&r" (t)
 | 
					2:"	: "=&r" (t)
 | 
				
			||||||
	: "r" (&v->counter)
 | 
						: "r" (&v->counter)
 | 
				
			||||||
| 
						 | 
					@ -450,14 +450,14 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)
 | 
				
			||||||
	long t;
 | 
						long t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	__asm__ __volatile__ (
 | 
						__asm__ __volatile__ (
 | 
				
			||||||
	PPC_RELEASE_BARRIER
 | 
						PPC_ATOMIC_ENTRY_BARRIER
 | 
				
			||||||
"1:	ldarx	%0,0,%1		# __atomic_add_unless\n\
 | 
					"1:	ldarx	%0,0,%1		# __atomic_add_unless\n\
 | 
				
			||||||
	cmpd	0,%0,%3 \n\
 | 
						cmpd	0,%0,%3 \n\
 | 
				
			||||||
	beq-	2f \n\
 | 
						beq-	2f \n\
 | 
				
			||||||
	add	%0,%2,%0 \n"
 | 
						add	%0,%2,%0 \n"
 | 
				
			||||||
"	stdcx.	%0,0,%1 \n\
 | 
					"	stdcx.	%0,0,%1 \n\
 | 
				
			||||||
	bne-	1b \n"
 | 
						bne-	1b \n"
 | 
				
			||||||
	PPC_ACQUIRE_BARRIER
 | 
						PPC_ATOMIC_EXIT_BARRIER
 | 
				
			||||||
"	subf	%0,%2,%0 \n\
 | 
					"	subf	%0,%2,%0 \n\
 | 
				
			||||||
2:"
 | 
					2:"
 | 
				
			||||||
	: "=&r" (t)
 | 
						: "=&r" (t)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -124,14 +124,14 @@ static __inline__ unsigned long fn(			\
 | 
				
			||||||
	return (old & mask);				\
 | 
						return (old & mask);				\
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
DEFINE_TESTOP(test_and_set_bits, or, PPC_RELEASE_BARRIER,
 | 
					DEFINE_TESTOP(test_and_set_bits, or, PPC_ATOMIC_ENTRY_BARRIER,
 | 
				
			||||||
	      PPC_ACQUIRE_BARRIER, 0)
 | 
						      PPC_ATOMIC_EXIT_BARRIER, 0)
 | 
				
			||||||
DEFINE_TESTOP(test_and_set_bits_lock, or, "",
 | 
					DEFINE_TESTOP(test_and_set_bits_lock, or, "",
 | 
				
			||||||
	      PPC_ACQUIRE_BARRIER, 1)
 | 
						      PPC_ACQUIRE_BARRIER, 1)
 | 
				
			||||||
DEFINE_TESTOP(test_and_clear_bits, andc, PPC_RELEASE_BARRIER,
 | 
					DEFINE_TESTOP(test_and_clear_bits, andc, PPC_ATOMIC_ENTRY_BARRIER,
 | 
				
			||||||
	      PPC_ACQUIRE_BARRIER, 0)
 | 
						      PPC_ATOMIC_EXIT_BARRIER, 0)
 | 
				
			||||||
DEFINE_TESTOP(test_and_change_bits, xor, PPC_RELEASE_BARRIER,
 | 
					DEFINE_TESTOP(test_and_change_bits, xor, PPC_ATOMIC_ENTRY_BARRIER,
 | 
				
			||||||
	      PPC_ACQUIRE_BARRIER, 0)
 | 
						      PPC_ATOMIC_EXIT_BARRIER, 0)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static __inline__ int test_and_set_bit(unsigned long nr,
 | 
					static __inline__ int test_and_set_bit(unsigned long nr,
 | 
				
			||||||
				       volatile unsigned long *addr)
 | 
									       volatile unsigned long *addr)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,12 +11,13 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \
 | 
					#define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \
 | 
				
			||||||
  __asm__ __volatile ( \
 | 
					  __asm__ __volatile ( \
 | 
				
			||||||
	PPC_RELEASE_BARRIER \
 | 
						PPC_ATOMIC_ENTRY_BARRIER \
 | 
				
			||||||
"1:	lwarx	%0,0,%2\n" \
 | 
					"1:	lwarx	%0,0,%2\n" \
 | 
				
			||||||
	insn \
 | 
						insn \
 | 
				
			||||||
	PPC405_ERR77(0, %2) \
 | 
						PPC405_ERR77(0, %2) \
 | 
				
			||||||
"2:	stwcx.	%1,0,%2\n" \
 | 
					"2:	stwcx.	%1,0,%2\n" \
 | 
				
			||||||
	"bne-	1b\n" \
 | 
						"bne-	1b\n" \
 | 
				
			||||||
 | 
						PPC_ATOMIC_EXIT_BARRIER \
 | 
				
			||||||
	"li	%1,0\n" \
 | 
						"li	%1,0\n" \
 | 
				
			||||||
"3:	.section .fixup,\"ax\"\n" \
 | 
					"3:	.section .fixup,\"ax\"\n" \
 | 
				
			||||||
"4:	li	%1,%3\n" \
 | 
					"4:	li	%1,%3\n" \
 | 
				
			||||||
| 
						 | 
					@ -92,14 +93,14 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
 | 
				
			||||||
		return -EFAULT;
 | 
							return -EFAULT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        __asm__ __volatile__ (
 | 
					        __asm__ __volatile__ (
 | 
				
			||||||
        PPC_RELEASE_BARRIER
 | 
					        PPC_ATOMIC_ENTRY_BARRIER
 | 
				
			||||||
"1:     lwarx   %1,0,%3         # futex_atomic_cmpxchg_inatomic\n\
 | 
					"1:     lwarx   %1,0,%3         # futex_atomic_cmpxchg_inatomic\n\
 | 
				
			||||||
        cmpw    0,%1,%4\n\
 | 
					        cmpw    0,%1,%4\n\
 | 
				
			||||||
        bne-    3f\n"
 | 
					        bne-    3f\n"
 | 
				
			||||||
        PPC405_ERR77(0,%3)
 | 
					        PPC405_ERR77(0,%3)
 | 
				
			||||||
"2:     stwcx.  %5,0,%3\n\
 | 
					"2:     stwcx.  %5,0,%3\n\
 | 
				
			||||||
        bne-    1b\n"
 | 
					        bne-    1b\n"
 | 
				
			||||||
        PPC_ACQUIRE_BARRIER
 | 
					        PPC_ATOMIC_EXIT_BARRIER
 | 
				
			||||||
"3:	.section .fixup,\"ax\"\n\
 | 
					"3:	.section .fixup,\"ax\"\n\
 | 
				
			||||||
4:	li	%0,%6\n\
 | 
					4:	li	%0,%6\n\
 | 
				
			||||||
	b	3b\n\
 | 
						b	3b\n\
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -148,12 +148,6 @@ struct kvm_regs {
 | 
				
			||||||
#define KVM_SREGS_E_UPDATE_DEC		(1 << 2)
 | 
					#define KVM_SREGS_E_UPDATE_DEC		(1 << 2)
 | 
				
			||||||
#define KVM_SREGS_E_UPDATE_DBSR		(1 << 3)
 | 
					#define KVM_SREGS_E_UPDATE_DBSR		(1 << 3)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
 * Book3S special bits to indicate contents in the struct by maintaining
 | 
					 | 
				
			||||||
 * backwards compatibility with older structs. If adding a new field,
 | 
					 | 
				
			||||||
 * please make sure to add a flag for that new field */
 | 
					 | 
				
			||||||
#define KVM_SREGS_S_HIOR		(1 << 0)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * In KVM_SET_SREGS, reserved/pad fields must be left untouched from a
 | 
					 * In KVM_SET_SREGS, reserved/pad fields must be left untouched from a
 | 
				
			||||||
 * previous KVM_GET_REGS.
 | 
					 * previous KVM_GET_REGS.
 | 
				
			||||||
| 
						 | 
					@ -179,8 +173,6 @@ struct kvm_sregs {
 | 
				
			||||||
				__u64 ibat[8]; 
 | 
									__u64 ibat[8]; 
 | 
				
			||||||
				__u64 dbat[8]; 
 | 
									__u64 dbat[8]; 
 | 
				
			||||||
			} ppc32;
 | 
								} ppc32;
 | 
				
			||||||
			__u64 flags; /* KVM_SREGS_S_ */
 | 
					 | 
				
			||||||
			__u64 hior;
 | 
					 | 
				
			||||||
		} s;
 | 
							} s;
 | 
				
			||||||
		struct {
 | 
							struct {
 | 
				
			||||||
			union {
 | 
								union {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -90,8 +90,6 @@ struct kvmppc_vcpu_book3s {
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	int context_id[SID_CONTEXTS];
 | 
						int context_id[SID_CONTEXTS];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	bool hior_sregs;		/* HIOR is set by SREGS, not PVR */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	struct hlist_head hpte_hash_pte[HPTEG_HASH_NUM_PTE];
 | 
						struct hlist_head hpte_hash_pte[HPTEG_HASH_NUM_PTE];
 | 
				
			||||||
	struct hlist_head hpte_hash_pte_long[HPTEG_HASH_NUM_PTE_LONG];
 | 
						struct hlist_head hpte_hash_pte_long[HPTEG_HASH_NUM_PTE_LONG];
 | 
				
			||||||
	struct hlist_head hpte_hash_vpte[HPTEG_HASH_NUM_VPTE];
 | 
						struct hlist_head hpte_hash_vpte[HPTEG_HASH_NUM_VPTE];
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -31,7 +31,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define MSR_		MSR_ME | MSR_CE
 | 
					#define MSR_		MSR_ME | MSR_CE
 | 
				
			||||||
#define MSR_KERNEL	MSR_ | MSR_64BIT
 | 
					#define MSR_KERNEL	MSR_ | MSR_64BIT
 | 
				
			||||||
#define MSR_USER32	MSR_ | MSR_PR | MSR_EE | MSR_DE
 | 
					#define MSR_USER32	MSR_ | MSR_PR | MSR_EE
 | 
				
			||||||
#define MSR_USER64	MSR_USER32 | MSR_64BIT
 | 
					#define MSR_USER64	MSR_USER32 | MSR_64BIT
 | 
				
			||||||
#elif defined (CONFIG_40x)
 | 
					#elif defined (CONFIG_40x)
 | 
				
			||||||
#define MSR_KERNEL	(MSR_ME|MSR_RI|MSR_IR|MSR_DR|MSR_CE)
 | 
					#define MSR_KERNEL	(MSR_ME|MSR_RI|MSR_IR|MSR_DR|MSR_CE)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -8,7 +8,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef __powerpc64__
 | 
					#ifdef __powerpc64__
 | 
				
			||||||
 | 
					
 | 
				
			||||||
extern char _end[];
 | 
					extern char __end_interrupts[];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static inline int in_kernel_text(unsigned long addr)
 | 
					static inline int in_kernel_text(unsigned long addr)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,6 +13,7 @@
 | 
				
			||||||
extern unsigned int __start___lwsync_fixup, __stop___lwsync_fixup;
 | 
					extern unsigned int __start___lwsync_fixup, __stop___lwsync_fixup;
 | 
				
			||||||
extern void do_lwsync_fixups(unsigned long value, void *fixup_start,
 | 
					extern void do_lwsync_fixups(unsigned long value, void *fixup_start,
 | 
				
			||||||
			     void *fixup_end);
 | 
								     void *fixup_end);
 | 
				
			||||||
 | 
					extern void do_final_fixups(void);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static inline void eieio(void)
 | 
					static inline void eieio(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					@ -43,9 +44,13 @@ static inline void isync(void)
 | 
				
			||||||
	MAKE_LWSYNC_SECTION_ENTRY(97, __lwsync_fixup);
 | 
						MAKE_LWSYNC_SECTION_ENTRY(97, __lwsync_fixup);
 | 
				
			||||||
#define PPC_ACQUIRE_BARRIER	 "\n" stringify_in_c(__PPC_ACQUIRE_BARRIER)
 | 
					#define PPC_ACQUIRE_BARRIER	 "\n" stringify_in_c(__PPC_ACQUIRE_BARRIER)
 | 
				
			||||||
#define PPC_RELEASE_BARRIER	 stringify_in_c(LWSYNC) "\n"
 | 
					#define PPC_RELEASE_BARRIER	 stringify_in_c(LWSYNC) "\n"
 | 
				
			||||||
 | 
					#define PPC_ATOMIC_ENTRY_BARRIER "\n" stringify_in_c(LWSYNC) "\n"
 | 
				
			||||||
 | 
					#define PPC_ATOMIC_EXIT_BARRIER	 "\n" stringify_in_c(sync) "\n"
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
#define PPC_ACQUIRE_BARRIER
 | 
					#define PPC_ACQUIRE_BARRIER
 | 
				
			||||||
#define PPC_RELEASE_BARRIER
 | 
					#define PPC_RELEASE_BARRIER
 | 
				
			||||||
 | 
					#define PPC_ATOMIC_ENTRY_BARRIER
 | 
				
			||||||
 | 
					#define PPC_ATOMIC_EXIT_BARRIER
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif /* __KERNEL__ */
 | 
					#endif /* __KERNEL__ */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -215,7 +215,22 @@ reenable_mmu:				/* re-enable mmu so we can */
 | 
				
			||||||
	stw	r9,8(r1)
 | 
						stw	r9,8(r1)
 | 
				
			||||||
	stw	r11,12(r1)
 | 
						stw	r11,12(r1)
 | 
				
			||||||
	stw	r3,ORIG_GPR3(r1)
 | 
						stw	r3,ORIG_GPR3(r1)
 | 
				
			||||||
 | 
						/*
 | 
				
			||||||
 | 
						 * The trace_hardirqs_off will use CALLER_ADDR0 and CALLER_ADDR1.
 | 
				
			||||||
 | 
						 * If from user mode there is only one stack frame on the stack, and
 | 
				
			||||||
 | 
						 * accessing CALLER_ADDR1 will cause oops. So we need create a dummy
 | 
				
			||||||
 | 
						 * stack frame to make trace_hardirqs_off happy.
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						andi.	r12,r12,MSR_PR
 | 
				
			||||||
 | 
						beq	11f
 | 
				
			||||||
 | 
						stwu	r1,-16(r1)
 | 
				
			||||||
	bl	trace_hardirqs_off
 | 
						bl	trace_hardirqs_off
 | 
				
			||||||
 | 
						addi	r1,r1,16
 | 
				
			||||||
 | 
						b	12f
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					11:
 | 
				
			||||||
 | 
						bl	trace_hardirqs_off
 | 
				
			||||||
 | 
					12:
 | 
				
			||||||
	lwz	r0,GPR0(r1)
 | 
						lwz	r0,GPR0(r1)
 | 
				
			||||||
	lwz	r3,ORIG_GPR3(r1)
 | 
						lwz	r3,ORIG_GPR3(r1)
 | 
				
			||||||
	lwz	r4,GPR4(r1)
 | 
						lwz	r4,GPR4(r1)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,6 +11,7 @@
 | 
				
			||||||
#include <linux/jump_label.h>
 | 
					#include <linux/jump_label.h>
 | 
				
			||||||
#include <asm/code-patching.h>
 | 
					#include <asm/code-patching.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef HAVE_JUMP_LABEL
 | 
				
			||||||
void arch_jump_label_transform(struct jump_entry *entry,
 | 
					void arch_jump_label_transform(struct jump_entry *entry,
 | 
				
			||||||
			       enum jump_label_type type)
 | 
								       enum jump_label_type type)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					@ -21,3 +22,4 @@ void arch_jump_label_transform(struct jump_entry *entry,
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		patch_instruction(addr, PPC_INST_NOP);
 | 
							patch_instruction(addr, PPC_INST_NOP);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -132,7 +132,6 @@ static void kvm_patch_ins_b(u32 *inst, int addr)
 | 
				
			||||||
	/* On relocatable kernels interrupts handlers and our code
 | 
						/* On relocatable kernels interrupts handlers and our code
 | 
				
			||||||
	   can be in different regions, so we don't patch them */
 | 
						   can be in different regions, so we don't patch them */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	extern u32 __end_interrupts;
 | 
					 | 
				
			||||||
	if ((ulong)inst < (ulong)&__end_interrupts)
 | 
						if ((ulong)inst < (ulong)&__end_interrupts)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -738,7 +738,7 @@ relocate_new_kernel:
 | 
				
			||||||
	mr      r5, r31
 | 
						mr      r5, r31
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	li	r0, 0
 | 
						li	r0, 0
 | 
				
			||||||
#elif defined(CONFIG_44x)  && !defined(CONFIG_47x)
 | 
					#elif defined(CONFIG_44x)  && !defined(CONFIG_PPC_47x)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Code for setting up 1:1 mapping for PPC440x for KEXEC
 | 
					 * Code for setting up 1:1 mapping for PPC440x for KEXEC
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -486,28 +486,6 @@ struct task_struct *__switch_to(struct task_struct *prev,
 | 
				
			||||||
	new_thread = &new->thread;
 | 
						new_thread = &new->thread;
 | 
				
			||||||
	old_thread = ¤t->thread;
 | 
						old_thread = ¤t->thread;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if defined(CONFIG_PPC_BOOK3E_64)
 | 
					 | 
				
			||||||
	/* XXX Current Book3E code doesn't deal with kernel side DBCR0,
 | 
					 | 
				
			||||||
	 * we always hold the user values, so we set it now.
 | 
					 | 
				
			||||||
	 *
 | 
					 | 
				
			||||||
	 * However, we ensure the kernel MSR:DE is appropriately cleared too
 | 
					 | 
				
			||||||
	 * to avoid spurrious single step exceptions in the kernel.
 | 
					 | 
				
			||||||
	 *
 | 
					 | 
				
			||||||
	 * This will have to change to merge with the ppc32 code at some point,
 | 
					 | 
				
			||||||
	 * but I don't like much what ppc32 is doing today so there's some
 | 
					 | 
				
			||||||
	 * thinking needed there
 | 
					 | 
				
			||||||
	 */
 | 
					 | 
				
			||||||
	if ((new_thread->dbcr0 | old_thread->dbcr0) & DBCR0_IDM) {
 | 
					 | 
				
			||||||
		u32 dbcr0;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		mtmsr(mfmsr() & ~MSR_DE);
 | 
					 | 
				
			||||||
		isync();
 | 
					 | 
				
			||||||
		dbcr0 = mfspr(SPRN_DBCR0);
 | 
					 | 
				
			||||||
		dbcr0 = (dbcr0 & DBCR0_EDM) | new_thread->dbcr0;
 | 
					 | 
				
			||||||
		mtspr(SPRN_DBCR0, dbcr0);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
#endif /* CONFIG_PPC64_BOOK3E */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef CONFIG_PPC64
 | 
					#ifdef CONFIG_PPC64
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * Collect processor utilization data per process
 | 
						 * Collect processor utilization data per process
 | 
				
			||||||
| 
						 | 
					@ -657,7 +635,7 @@ void show_regs(struct pt_regs * regs)
 | 
				
			||||||
	if ((regs->trap != 0xc00) && cpu_has_feature(CPU_FTR_CFAR))
 | 
						if ((regs->trap != 0xc00) && cpu_has_feature(CPU_FTR_CFAR))
 | 
				
			||||||
		printk("CFAR: "REG"\n", regs->orig_gpr3);
 | 
							printk("CFAR: "REG"\n", regs->orig_gpr3);
 | 
				
			||||||
	if (trap == 0x300 || trap == 0x600)
 | 
						if (trap == 0x300 || trap == 0x600)
 | 
				
			||||||
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
 | 
					#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
 | 
				
			||||||
		printk("DEAR: "REG", ESR: "REG"\n", regs->dar, regs->dsisr);
 | 
							printk("DEAR: "REG", ESR: "REG"\n", regs->dar, regs->dsisr);
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
		printk("DAR: "REG", DSISR: %08lx\n", regs->dar, regs->dsisr);
 | 
							printk("DAR: "REG", DSISR: %08lx\n", regs->dar, regs->dsisr);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1579,10 +1579,8 @@ static void __init prom_instantiate_rtas(void)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	base = alloc_down(size, PAGE_SIZE, 0);
 | 
						base = alloc_down(size, PAGE_SIZE, 0);
 | 
				
			||||||
	if (base == 0) {
 | 
						if (base == 0)
 | 
				
			||||||
		prom_printf("RTAS allocation failed !\n");
 | 
							prom_panic("Could not allocate memory for RTAS\n");
 | 
				
			||||||
		return;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	rtas_inst = call_prom("open", 1, 1, ADDR("/rtas"));
 | 
						rtas_inst = call_prom("open", 1, 1, ADDR("/rtas"));
 | 
				
			||||||
	if (!IHANDLE_VALID(rtas_inst)) {
 | 
						if (!IHANDLE_VALID(rtas_inst)) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -107,6 +107,8 @@ notrace unsigned long __init early_init(unsigned long dt_ptr)
 | 
				
			||||||
			 PTRRELOC(&__start___lwsync_fixup),
 | 
								 PTRRELOC(&__start___lwsync_fixup),
 | 
				
			||||||
			 PTRRELOC(&__stop___lwsync_fixup));
 | 
								 PTRRELOC(&__stop___lwsync_fixup));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						do_final_fixups();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return KERNELBASE + offset;
 | 
						return KERNELBASE + offset;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -359,6 +359,7 @@ void __init setup_system(void)
 | 
				
			||||||
			  &__start___fw_ftr_fixup, &__stop___fw_ftr_fixup);
 | 
								  &__start___fw_ftr_fixup, &__stop___fw_ftr_fixup);
 | 
				
			||||||
	do_lwsync_fixups(cur_cpu_spec->cpu_features,
 | 
						do_lwsync_fixups(cur_cpu_spec->cpu_features,
 | 
				
			||||||
			 &__start___lwsync_fixup, &__stop___lwsync_fixup);
 | 
								 &__start___lwsync_fixup, &__stop___lwsync_fixup);
 | 
				
			||||||
 | 
						do_final_fixups();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * Unflatten the device-tree passed by prom_init or kexec
 | 
						 * Unflatten the device-tree passed by prom_init or kexec
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -97,7 +97,7 @@ static inline int put_sigset_t(compat_sigset_t __user *uset, sigset_t *set)
 | 
				
			||||||
	compat_sigset_t	cset;
 | 
						compat_sigset_t	cset;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	switch (_NSIG_WORDS) {
 | 
						switch (_NSIG_WORDS) {
 | 
				
			||||||
	case 4: cset.sig[5] = set->sig[3] & 0xffffffffull;
 | 
						case 4: cset.sig[6] = set->sig[3] & 0xffffffffull;
 | 
				
			||||||
		cset.sig[7] = set->sig[3] >> 32;
 | 
							cset.sig[7] = set->sig[3] >> 32;
 | 
				
			||||||
	case 3: cset.sig[4] = set->sig[2] & 0xffffffffull;
 | 
						case 3: cset.sig[4] = set->sig[2] & 0xffffffffull;
 | 
				
			||||||
		cset.sig[5] = set->sig[2] >> 32;
 | 
							cset.sig[5] = set->sig[2] >> 32;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1298,14 +1298,12 @@ void __kprobes DebugException(struct pt_regs *regs, unsigned long debug_status)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (user_mode(regs)) {
 | 
							if (user_mode(regs)) {
 | 
				
			||||||
			current->thread.dbcr0 &= ~DBCR0_IC;
 | 
								current->thread.dbcr0 &= ~DBCR0_IC;
 | 
				
			||||||
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
 | 
					 | 
				
			||||||
			if (DBCR_ACTIVE_EVENTS(current->thread.dbcr0,
 | 
								if (DBCR_ACTIVE_EVENTS(current->thread.dbcr0,
 | 
				
			||||||
					       current->thread.dbcr1))
 | 
										       current->thread.dbcr1))
 | 
				
			||||||
				regs->msr |= MSR_DE;
 | 
									regs->msr |= MSR_DE;
 | 
				
			||||||
			else
 | 
								else
 | 
				
			||||||
				/* Make sure the IDM bit is off */
 | 
									/* Make sure the IDM bit is off */
 | 
				
			||||||
				current->thread.dbcr0 &= ~DBCR0_IDM;
 | 
									current->thread.dbcr0 &= ~DBCR0_IDM;
 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		_exception(SIGTRAP, regs, TRAP_TRACE, regs->nip);
 | 
							_exception(SIGTRAP, regs, TRAP_TRACE, regs->nip);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -44,6 +44,7 @@
 | 
				
			||||||
#include <asm/processor.h>
 | 
					#include <asm/processor.h>
 | 
				
			||||||
#include <asm/cputhreads.h>
 | 
					#include <asm/cputhreads.h>
 | 
				
			||||||
#include <asm/page.h>
 | 
					#include <asm/page.h>
 | 
				
			||||||
 | 
					#include <asm/hvcall.h>
 | 
				
			||||||
#include <linux/gfp.h>
 | 
					#include <linux/gfp.h>
 | 
				
			||||||
#include <linux/sched.h>
 | 
					#include <linux/sched.h>
 | 
				
			||||||
#include <linux/vmalloc.h>
 | 
					#include <linux/vmalloc.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -151,7 +151,6 @@ void kvmppc_set_pvr(struct kvm_vcpu *vcpu, u32 pvr)
 | 
				
			||||||
#ifdef CONFIG_PPC_BOOK3S_64
 | 
					#ifdef CONFIG_PPC_BOOK3S_64
 | 
				
			||||||
	if ((pvr >= 0x330000) && (pvr < 0x70330000)) {
 | 
						if ((pvr >= 0x330000) && (pvr < 0x70330000)) {
 | 
				
			||||||
		kvmppc_mmu_book3s_64_init(vcpu);
 | 
							kvmppc_mmu_book3s_64_init(vcpu);
 | 
				
			||||||
		if (!to_book3s(vcpu)->hior_sregs)
 | 
					 | 
				
			||||||
		to_book3s(vcpu)->hior = 0xfff00000;
 | 
							to_book3s(vcpu)->hior = 0xfff00000;
 | 
				
			||||||
		to_book3s(vcpu)->msr_mask = 0xffffffffffffffffULL;
 | 
							to_book3s(vcpu)->msr_mask = 0xffffffffffffffffULL;
 | 
				
			||||||
		vcpu->arch.cpu_type = KVM_CPU_3S_64;
 | 
							vcpu->arch.cpu_type = KVM_CPU_3S_64;
 | 
				
			||||||
| 
						 | 
					@ -159,7 +158,6 @@ void kvmppc_set_pvr(struct kvm_vcpu *vcpu, u32 pvr)
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		kvmppc_mmu_book3s_32_init(vcpu);
 | 
							kvmppc_mmu_book3s_32_init(vcpu);
 | 
				
			||||||
		if (!to_book3s(vcpu)->hior_sregs)
 | 
					 | 
				
			||||||
		to_book3s(vcpu)->hior = 0;
 | 
							to_book3s(vcpu)->hior = 0;
 | 
				
			||||||
		to_book3s(vcpu)->msr_mask = 0xffffffffULL;
 | 
							to_book3s(vcpu)->msr_mask = 0xffffffffULL;
 | 
				
			||||||
		vcpu->arch.cpu_type = KVM_CPU_3S_32;
 | 
							vcpu->arch.cpu_type = KVM_CPU_3S_32;
 | 
				
			||||||
| 
						 | 
					@ -797,9 +795,6 @@ int kvm_arch_vcpu_ioctl_get_sregs(struct kvm_vcpu *vcpu,
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (sregs->u.s.flags & KVM_SREGS_S_HIOR)
 | 
					 | 
				
			||||||
		sregs->u.s.hior = to_book3s(vcpu)->hior;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -836,11 +831,6 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu,
 | 
				
			||||||
	/* Flush the MMU after messing with the segments */
 | 
						/* Flush the MMU after messing with the segments */
 | 
				
			||||||
	kvmppc_mmu_pte_flush(vcpu, 0, 0);
 | 
						kvmppc_mmu_pte_flush(vcpu, 0, 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (sregs->u.s.flags & KVM_SREGS_S_HIOR) {
 | 
					 | 
				
			||||||
		to_book3s(vcpu)->hior_sregs = true;
 | 
					 | 
				
			||||||
		to_book3s(vcpu)->hior = sregs->u.s.hior;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -208,7 +208,6 @@ int kvm_dev_ioctl_check_extension(long ext)
 | 
				
			||||||
	case KVM_CAP_PPC_BOOKE_SREGS:
 | 
						case KVM_CAP_PPC_BOOKE_SREGS:
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
	case KVM_CAP_PPC_SEGSTATE:
 | 
						case KVM_CAP_PPC_SEGSTATE:
 | 
				
			||||||
	case KVM_CAP_PPC_HIOR:
 | 
					 | 
				
			||||||
	case KVM_CAP_PPC_PAPR:
 | 
						case KVM_CAP_PPC_PAPR:
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	case KVM_CAP_PPC_UNSET_IRQ:
 | 
						case KVM_CAP_PPC_UNSET_IRQ:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -18,6 +18,8 @@
 | 
				
			||||||
#include <linux/init.h>
 | 
					#include <linux/init.h>
 | 
				
			||||||
#include <asm/cputable.h>
 | 
					#include <asm/cputable.h>
 | 
				
			||||||
#include <asm/code-patching.h>
 | 
					#include <asm/code-patching.h>
 | 
				
			||||||
 | 
					#include <asm/page.h>
 | 
				
			||||||
 | 
					#include <asm/sections.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct fixup_entry {
 | 
					struct fixup_entry {
 | 
				
			||||||
| 
						 | 
					@ -128,6 +130,27 @@ void do_lwsync_fixups(unsigned long value, void *fixup_start, void *fixup_end)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void do_final_fixups(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					#if defined(CONFIG_PPC64) && defined(CONFIG_RELOCATABLE)
 | 
				
			||||||
 | 
						int *src, *dest;
 | 
				
			||||||
 | 
						unsigned long length;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (PHYSICAL_START == 0)
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						src = (int *)(KERNELBASE + PHYSICAL_START);
 | 
				
			||||||
 | 
						dest = (int *)KERNELBASE;
 | 
				
			||||||
 | 
						length = (__end_interrupts - _stext) / sizeof(int);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						while (length--) {
 | 
				
			||||||
 | 
							patch_instruction(dest, *src);
 | 
				
			||||||
 | 
							src++;
 | 
				
			||||||
 | 
							dest++;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef CONFIG_FTR_FIXUP_SELFTEST
 | 
					#ifdef CONFIG_FTR_FIXUP_SELFTEST
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define check(x)	\
 | 
					#define check(x)	\
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -347,7 +347,7 @@ config SIMPLE_GPIO
 | 
				
			||||||
 | 
					
 | 
				
			||||||
config MCU_MPC8349EMITX
 | 
					config MCU_MPC8349EMITX
 | 
				
			||||||
	bool "MPC8349E-mITX MCU driver"
 | 
						bool "MPC8349E-mITX MCU driver"
 | 
				
			||||||
	depends on I2C && PPC_83xx
 | 
						depends on I2C=y && PPC_83xx
 | 
				
			||||||
	select GENERIC_GPIO
 | 
						select GENERIC_GPIO
 | 
				
			||||||
	select ARCH_REQUIRE_GPIOLIB
 | 
						select ARCH_REQUIRE_GPIOLIB
 | 
				
			||||||
	help
 | 
						help
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -88,6 +88,7 @@ struct ps3_private {
 | 
				
			||||||
	struct ps3_bmp bmp __attribute__ ((aligned (PS3_BMP_MINALIGN)));
 | 
						struct ps3_bmp bmp __attribute__ ((aligned (PS3_BMP_MINALIGN)));
 | 
				
			||||||
	u64 ppe_id;
 | 
						u64 ppe_id;
 | 
				
			||||||
	u64 thread_id;
 | 
						u64 thread_id;
 | 
				
			||||||
 | 
						unsigned long ipi_mask;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static DEFINE_PER_CPU(struct ps3_private, ps3_private);
 | 
					static DEFINE_PER_CPU(struct ps3_private, ps3_private);
 | 
				
			||||||
| 
						 | 
					@ -144,6 +145,10 @@ static void ps3_chip_unmask(struct irq_data *d)
 | 
				
			||||||
static void ps3_chip_eoi(struct irq_data *d)
 | 
					static void ps3_chip_eoi(struct irq_data *d)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	const struct ps3_private *pd = irq_data_get_irq_chip_data(d);
 | 
						const struct ps3_private *pd = irq_data_get_irq_chip_data(d);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* non-IPIs are EOIed here. */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!test_bit(63 - d->irq, &pd->ipi_mask))
 | 
				
			||||||
		lv1_end_of_interrupt_ext(pd->ppe_id, pd->thread_id, d->irq);
 | 
							lv1_end_of_interrupt_ext(pd->ppe_id, pd->thread_id, d->irq);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -691,6 +696,16 @@ void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq)
 | 
				
			||||||
		cpu, virq, pd->bmp.ipi_debug_brk_mask);
 | 
							cpu, virq, pd->bmp.ipi_debug_brk_mask);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void __init ps3_register_ipi_irq(unsigned int cpu, unsigned int virq)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						struct ps3_private *pd = &per_cpu(ps3_private, cpu);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						set_bit(63 - virq, &pd->ipi_mask);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						DBG("%s:%d: cpu %u, virq %u, ipi_mask %lxh\n", __func__, __LINE__,
 | 
				
			||||||
 | 
							cpu, virq, pd->ipi_mask);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static unsigned int ps3_get_irq(void)
 | 
					static unsigned int ps3_get_irq(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct ps3_private *pd = &__get_cpu_var(ps3_private);
 | 
						struct ps3_private *pd = &__get_cpu_var(ps3_private);
 | 
				
			||||||
| 
						 | 
					@ -720,6 +735,12 @@ static unsigned int ps3_get_irq(void)
 | 
				
			||||||
		BUG();
 | 
							BUG();
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* IPIs are EOIed here. */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (test_bit(63 - plug, &pd->ipi_mask))
 | 
				
			||||||
 | 
							lv1_end_of_interrupt_ext(pd->ppe_id, pd->thread_id, plug);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return plug;
 | 
						return plug;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -43,6 +43,7 @@ void ps3_mm_shutdown(void);
 | 
				
			||||||
void ps3_init_IRQ(void);
 | 
					void ps3_init_IRQ(void);
 | 
				
			||||||
void ps3_shutdown_IRQ(int cpu);
 | 
					void ps3_shutdown_IRQ(int cpu);
 | 
				
			||||||
void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq);
 | 
					void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq);
 | 
				
			||||||
 | 
					void __init ps3_register_ipi_irq(unsigned int cpu, unsigned int virq);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* smp */
 | 
					/* smp */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -59,11 +59,9 @@ static void ps3_smp_message_pass(int cpu, int msg)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int ps3_smp_probe(void)
 | 
					static int ps3_smp_probe(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	return 2;
 | 
						int cpu;
 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void __init ps3_smp_setup_cpu(int cpu)
 | 
						for (cpu = 0; cpu < 2; cpu++) {
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
		int result;
 | 
							int result;
 | 
				
			||||||
		unsigned int *virqs = per_cpu(ps3_ipi_virqs, cpu);
 | 
							unsigned int *virqs = per_cpu(ps3_ipi_virqs, cpu);
 | 
				
			||||||
		int i;
 | 
							int i;
 | 
				
			||||||
| 
						 | 
					@ -94,6 +92,8 @@ static void __init ps3_smp_setup_cpu(int cpu)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if (result)
 | 
								if (result)
 | 
				
			||||||
				virqs[i] = NO_IRQ;
 | 
									virqs[i] = NO_IRQ;
 | 
				
			||||||
 | 
								else
 | 
				
			||||||
 | 
									ps3_register_ipi_irq(cpu, virqs[i]);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		ps3_register_ipi_debug_brk(cpu, virqs[PPC_MSG_DEBUGGER_BREAK]);
 | 
							ps3_register_ipi_debug_brk(cpu, virqs[PPC_MSG_DEBUGGER_BREAK]);
 | 
				
			||||||
| 
						 | 
					@ -101,6 +101,9 @@ static void __init ps3_smp_setup_cpu(int cpu)
 | 
				
			||||||
		DBG(" <- %s:%d: (%d)\n", __func__, __LINE__, cpu);
 | 
							DBG(" <- %s:%d: (%d)\n", __func__, __LINE__, cpu);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return 2;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void ps3_smp_cleanup_cpu(int cpu)
 | 
					void ps3_smp_cleanup_cpu(int cpu)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	unsigned int *virqs = per_cpu(ps3_ipi_virqs, cpu);
 | 
						unsigned int *virqs = per_cpu(ps3_ipi_virqs, cpu);
 | 
				
			||||||
| 
						 | 
					@ -121,7 +124,6 @@ static struct smp_ops_t ps3_smp_ops = {
 | 
				
			||||||
	.probe		= ps3_smp_probe,
 | 
						.probe		= ps3_smp_probe,
 | 
				
			||||||
	.message_pass	= ps3_smp_message_pass,
 | 
						.message_pass	= ps3_smp_message_pass,
 | 
				
			||||||
	.kick_cpu	= smp_generic_kick_cpu,
 | 
						.kick_cpu	= smp_generic_kick_cpu,
 | 
				
			||||||
	.setup_cpu	= ps3_smp_setup_cpu,
 | 
					 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void smp_init_ps3(void)
 | 
					void smp_init_ps3(void)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -572,6 +572,7 @@ config KEXEC
 | 
				
			||||||
config CRASH_DUMP
 | 
					config CRASH_DUMP
 | 
				
			||||||
	bool "kernel crash dumps"
 | 
						bool "kernel crash dumps"
 | 
				
			||||||
	depends on 64BIT
 | 
						depends on 64BIT
 | 
				
			||||||
 | 
						select KEXEC
 | 
				
			||||||
	help
 | 
						help
 | 
				
			||||||
	  Generate crash dump after being started by kexec.
 | 
						  Generate crash dump after being started by kexec.
 | 
				
			||||||
	  Crash dump kernels are loaded in the main kernel with kexec-tools
 | 
						  Crash dump kernels are loaded in the main kernel with kexec-tools
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -368,9 +368,12 @@ static inline int crypt_s390_func_available(int func,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (facility_mask & CRYPT_S390_MSA && !test_facility(17))
 | 
						if (facility_mask & CRYPT_S390_MSA && !test_facility(17))
 | 
				
			||||||
		return 0;
 | 
							return 0;
 | 
				
			||||||
	if (facility_mask & CRYPT_S390_MSA3 && !test_facility(76))
 | 
					
 | 
				
			||||||
 | 
						if (facility_mask & CRYPT_S390_MSA3 &&
 | 
				
			||||||
 | 
						    (!test_facility(2) || !test_facility(76)))
 | 
				
			||||||
		return 0;
 | 
							return 0;
 | 
				
			||||||
	if (facility_mask & CRYPT_S390_MSA4 && !test_facility(77))
 | 
						if (facility_mask & CRYPT_S390_MSA4 &&
 | 
				
			||||||
 | 
						    (!test_facility(2) || !test_facility(77)))
 | 
				
			||||||
		return 0;
 | 
							return 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	switch (func & CRYPT_S390_OP_MASK) {
 | 
						switch (func & CRYPT_S390_OP_MASK) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -47,7 +47,7 @@ struct sca_block {
 | 
				
			||||||
#define KVM_HPAGE_MASK(x)	(~(KVM_HPAGE_SIZE(x) - 1))
 | 
					#define KVM_HPAGE_MASK(x)	(~(KVM_HPAGE_SIZE(x) - 1))
 | 
				
			||||||
#define KVM_PAGES_PER_HPAGE(x)	(KVM_HPAGE_SIZE(x) / PAGE_SIZE)
 | 
					#define KVM_PAGES_PER_HPAGE(x)	(KVM_HPAGE_SIZE(x) / PAGE_SIZE)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define CPUSTAT_HOST       0x80000000
 | 
					#define CPUSTAT_STOPPED    0x80000000
 | 
				
			||||||
#define CPUSTAT_WAIT       0x10000000
 | 
					#define CPUSTAT_WAIT       0x10000000
 | 
				
			||||||
#define CPUSTAT_ECALL_PEND 0x08000000
 | 
					#define CPUSTAT_ECALL_PEND 0x08000000
 | 
				
			||||||
#define CPUSTAT_STOP_INT   0x04000000
 | 
					#define CPUSTAT_STOP_INT   0x04000000
 | 
				
			||||||
| 
						 | 
					@ -139,6 +139,7 @@ struct kvm_vcpu_stat {
 | 
				
			||||||
	u32 instruction_stfl;
 | 
						u32 instruction_stfl;
 | 
				
			||||||
	u32 instruction_tprot;
 | 
						u32 instruction_tprot;
 | 
				
			||||||
	u32 instruction_sigp_sense;
 | 
						u32 instruction_sigp_sense;
 | 
				
			||||||
 | 
						u32 instruction_sigp_sense_running;
 | 
				
			||||||
	u32 instruction_sigp_external_call;
 | 
						u32 instruction_sigp_external_call;
 | 
				
			||||||
	u32 instruction_sigp_emergency;
 | 
						u32 instruction_sigp_emergency;
 | 
				
			||||||
	u32 instruction_sigp_stop;
 | 
						u32 instruction_sigp_stop;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -593,6 +593,8 @@ static inline pgste_t pgste_update_all(pte_t *ptep, pgste_t pgste)
 | 
				
			||||||
	unsigned long address, bits;
 | 
						unsigned long address, bits;
 | 
				
			||||||
	unsigned char skey;
 | 
						unsigned char skey;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!pte_present(*ptep))
 | 
				
			||||||
 | 
							return pgste;
 | 
				
			||||||
	address = pte_val(*ptep) & PAGE_MASK;
 | 
						address = pte_val(*ptep) & PAGE_MASK;
 | 
				
			||||||
	skey = page_get_storage_key(address);
 | 
						skey = page_get_storage_key(address);
 | 
				
			||||||
	bits = skey & (_PAGE_CHANGED | _PAGE_REFERENCED);
 | 
						bits = skey & (_PAGE_CHANGED | _PAGE_REFERENCED);
 | 
				
			||||||
| 
						 | 
					@ -625,6 +627,8 @@ static inline pgste_t pgste_update_young(pte_t *ptep, pgste_t pgste)
 | 
				
			||||||
#ifdef CONFIG_PGSTE
 | 
					#ifdef CONFIG_PGSTE
 | 
				
			||||||
	int young;
 | 
						int young;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!pte_present(*ptep))
 | 
				
			||||||
 | 
							return pgste;
 | 
				
			||||||
	young = page_reset_referenced(pte_val(*ptep) & PAGE_MASK);
 | 
						young = page_reset_referenced(pte_val(*ptep) & PAGE_MASK);
 | 
				
			||||||
	/* Transfer page referenced bit to pte software bit (host view) */
 | 
						/* Transfer page referenced bit to pte software bit (host view) */
 | 
				
			||||||
	if (young || (pgste_val(pgste) & RCP_HR_BIT))
 | 
						if (young || (pgste_val(pgste) & RCP_HR_BIT))
 | 
				
			||||||
| 
						 | 
					@ -638,13 +642,15 @@ static inline pgste_t pgste_update_young(pte_t *ptep, pgste_t pgste)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static inline void pgste_set_pte(pte_t *ptep, pgste_t pgste)
 | 
					static inline void pgste_set_pte(pte_t *ptep, pgste_t pgste, pte_t entry)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
#ifdef CONFIG_PGSTE
 | 
					#ifdef CONFIG_PGSTE
 | 
				
			||||||
	unsigned long address;
 | 
						unsigned long address;
 | 
				
			||||||
	unsigned long okey, nkey;
 | 
						unsigned long okey, nkey;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	address = pte_val(*ptep) & PAGE_MASK;
 | 
						if (!pte_present(entry))
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
						address = pte_val(entry) & PAGE_MASK;
 | 
				
			||||||
	okey = nkey = page_get_storage_key(address);
 | 
						okey = nkey = page_get_storage_key(address);
 | 
				
			||||||
	nkey &= ~(_PAGE_ACC_BITS | _PAGE_FP_BIT);
 | 
						nkey &= ~(_PAGE_ACC_BITS | _PAGE_FP_BIT);
 | 
				
			||||||
	/* Set page access key and fetch protection bit from pgste */
 | 
						/* Set page access key and fetch protection bit from pgste */
 | 
				
			||||||
| 
						 | 
					@ -712,7 +718,7 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (mm_has_pgste(mm)) {
 | 
						if (mm_has_pgste(mm)) {
 | 
				
			||||||
		pgste = pgste_get_lock(ptep);
 | 
							pgste = pgste_get_lock(ptep);
 | 
				
			||||||
		pgste_set_pte(ptep, pgste);
 | 
							pgste_set_pte(ptep, pgste, entry);
 | 
				
			||||||
		*ptep = entry;
 | 
							*ptep = entry;
 | 
				
			||||||
		pgste_set_unlock(ptep, pgste);
 | 
							pgste_set_unlock(ptep, pgste);
 | 
				
			||||||
	} else
 | 
						} else
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -82,6 +82,7 @@ extern unsigned int user_mode;
 | 
				
			||||||
#define MACHINE_FLAG_LPAR	(1UL << 12)
 | 
					#define MACHINE_FLAG_LPAR	(1UL << 12)
 | 
				
			||||||
#define MACHINE_FLAG_SPP	(1UL << 13)
 | 
					#define MACHINE_FLAG_SPP	(1UL << 13)
 | 
				
			||||||
#define MACHINE_FLAG_TOPOLOGY	(1UL << 14)
 | 
					#define MACHINE_FLAG_TOPOLOGY	(1UL << 14)
 | 
				
			||||||
 | 
					#define MACHINE_FLAG_STCKF	(1UL << 15)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define MACHINE_IS_VM		(S390_lowcore.machine_flags & MACHINE_FLAG_VM)
 | 
					#define MACHINE_IS_VM		(S390_lowcore.machine_flags & MACHINE_FLAG_VM)
 | 
				
			||||||
#define MACHINE_IS_KVM		(S390_lowcore.machine_flags & MACHINE_FLAG_KVM)
 | 
					#define MACHINE_IS_KVM		(S390_lowcore.machine_flags & MACHINE_FLAG_KVM)
 | 
				
			||||||
| 
						 | 
					@ -100,6 +101,7 @@ extern unsigned int user_mode;
 | 
				
			||||||
#define MACHINE_HAS_PFMF	(0)
 | 
					#define MACHINE_HAS_PFMF	(0)
 | 
				
			||||||
#define MACHINE_HAS_SPP		(0)
 | 
					#define MACHINE_HAS_SPP		(0)
 | 
				
			||||||
#define MACHINE_HAS_TOPOLOGY	(0)
 | 
					#define MACHINE_HAS_TOPOLOGY	(0)
 | 
				
			||||||
 | 
					#define MACHINE_HAS_STCKF	(0)
 | 
				
			||||||
#else /* __s390x__ */
 | 
					#else /* __s390x__ */
 | 
				
			||||||
#define MACHINE_HAS_IEEE	(1)
 | 
					#define MACHINE_HAS_IEEE	(1)
 | 
				
			||||||
#define MACHINE_HAS_CSP		(1)
 | 
					#define MACHINE_HAS_CSP		(1)
 | 
				
			||||||
| 
						 | 
					@ -111,6 +113,7 @@ extern unsigned int user_mode;
 | 
				
			||||||
#define MACHINE_HAS_PFMF	(S390_lowcore.machine_flags & MACHINE_FLAG_PFMF)
 | 
					#define MACHINE_HAS_PFMF	(S390_lowcore.machine_flags & MACHINE_FLAG_PFMF)
 | 
				
			||||||
#define MACHINE_HAS_SPP		(S390_lowcore.machine_flags & MACHINE_FLAG_SPP)
 | 
					#define MACHINE_HAS_SPP		(S390_lowcore.machine_flags & MACHINE_FLAG_SPP)
 | 
				
			||||||
#define MACHINE_HAS_TOPOLOGY	(S390_lowcore.machine_flags & MACHINE_FLAG_TOPOLOGY)
 | 
					#define MACHINE_HAS_TOPOLOGY	(S390_lowcore.machine_flags & MACHINE_FLAG_TOPOLOGY)
 | 
				
			||||||
 | 
					#define MACHINE_HAS_STCKF	(S390_lowcore.machine_flags & MACHINE_FLAG_STCKF)
 | 
				
			||||||
#endif /* __s390x__ */
 | 
					#endif /* __s390x__ */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define ZFCPDUMP_HSA_SIZE	(32UL<<20)
 | 
					#define ZFCPDUMP_HSA_SIZE	(32UL<<20)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -90,7 +90,7 @@ static inline unsigned long long get_clock_fast(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	unsigned long long clk;
 | 
						unsigned long long clk;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (test_facility(25))
 | 
						if (MACHINE_HAS_STCKF)
 | 
				
			||||||
		asm volatile(".insn	s,0xb27c0000,%0" : "=Q" (clk) : : "cc");
 | 
							asm volatile(".insn	s,0xb27c0000,%0" : "=Q" (clk) : : "cc");
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		clk = get_clock();
 | 
							clk = get_clock();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -277,7 +277,9 @@
 | 
				
			||||||
#define __NR_clock_adjtime	337
 | 
					#define __NR_clock_adjtime	337
 | 
				
			||||||
#define __NR_syncfs		338
 | 
					#define __NR_syncfs		338
 | 
				
			||||||
#define __NR_setns		339
 | 
					#define __NR_setns		339
 | 
				
			||||||
#define NR_syscalls 340
 | 
					#define __NR_process_vm_readv	340
 | 
				
			||||||
 | 
					#define __NR_process_vm_writev	341
 | 
				
			||||||
 | 
					#define NR_syscalls 342
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* 
 | 
					/* 
 | 
				
			||||||
 * There are some system calls that are not present on 64 bit, some
 | 
					 * There are some system calls that are not present on 64 bit, some
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1627,3 +1627,23 @@ ENTRY(sys_setns_wrapper)
 | 
				
			||||||
	lgfr	%r2,%r2			# int
 | 
						lgfr	%r2,%r2			# int
 | 
				
			||||||
	lgfr	%r3,%r3			# int
 | 
						lgfr	%r3,%r3			# int
 | 
				
			||||||
	jg	sys_setns
 | 
						jg	sys_setns
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ENTRY(compat_sys_process_vm_readv_wrapper)
 | 
				
			||||||
 | 
						lgfr	%r2,%r2			# compat_pid_t
 | 
				
			||||||
 | 
						llgtr	%r3,%r3			# struct compat_iovec __user *
 | 
				
			||||||
 | 
						llgfr	%r4,%r4			# unsigned long
 | 
				
			||||||
 | 
						llgtr	%r5,%r5			# struct compat_iovec __user *
 | 
				
			||||||
 | 
						llgfr	%r6,%r6			# unsigned long
 | 
				
			||||||
 | 
						llgf	%r0,164(%r15)		# unsigned long
 | 
				
			||||||
 | 
						stg	%r0,160(%r15)
 | 
				
			||||||
 | 
						jg	sys_process_vm_readv
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ENTRY(compat_sys_process_vm_writev_wrapper)
 | 
				
			||||||
 | 
						lgfr	%r2,%r2			# compat_pid_t
 | 
				
			||||||
 | 
						llgtr	%r3,%r3			# struct compat_iovec __user *
 | 
				
			||||||
 | 
						llgfr	%r4,%r4			# unsigned long
 | 
				
			||||||
 | 
						llgtr	%r5,%r5			# struct compat_iovec __user *
 | 
				
			||||||
 | 
						llgfr	%r6,%r6			# unsigned long
 | 
				
			||||||
 | 
						llgf	%r0,164(%r15)		# unsigned long
 | 
				
			||||||
 | 
						stg	%r0,160(%r15)
 | 
				
			||||||
 | 
						jg	sys_process_vm_writev
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -390,6 +390,8 @@ static __init void detect_machine_facilities(void)
 | 
				
			||||||
		S390_lowcore.machine_flags |= MACHINE_FLAG_MVCOS;
 | 
							S390_lowcore.machine_flags |= MACHINE_FLAG_MVCOS;
 | 
				
			||||||
	if (test_facility(40))
 | 
						if (test_facility(40))
 | 
				
			||||||
		S390_lowcore.machine_flags |= MACHINE_FLAG_SPP;
 | 
							S390_lowcore.machine_flags |= MACHINE_FLAG_SPP;
 | 
				
			||||||
 | 
						if (test_facility(25))
 | 
				
			||||||
 | 
							S390_lowcore.machine_flags |= MACHINE_FLAG_STCKF;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -211,6 +211,8 @@ static void __init setup_zfcpdump(unsigned int console_devno)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (ipl_info.type != IPL_TYPE_FCP_DUMP)
 | 
						if (ipl_info.type != IPL_TYPE_FCP_DUMP)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
						if (OLDMEM_BASE)
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
	if (console_devno != -1)
 | 
						if (console_devno != -1)
 | 
				
			||||||
		sprintf(str, " cio_ignore=all,!0.0.%04x,!0.0.%04x",
 | 
							sprintf(str, " cio_ignore=all,!0.0.%04x,!0.0.%04x",
 | 
				
			||||||
			ipl_info.data.fcp.dev_id.devno, console_devno);
 | 
								ipl_info.data.fcp.dev_id.devno, console_devno);
 | 
				
			||||||
| 
						 | 
					@ -482,7 +484,7 @@ static void __init setup_memory_end(void)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef CONFIG_ZFCPDUMP
 | 
					#ifdef CONFIG_ZFCPDUMP
 | 
				
			||||||
	if (ipl_info.type == IPL_TYPE_FCP_DUMP) {
 | 
						if (ipl_info.type == IPL_TYPE_FCP_DUMP && !OLDMEM_BASE) {
 | 
				
			||||||
		memory_end = ZFCPDUMP_HSA_SIZE;
 | 
							memory_end = ZFCPDUMP_HSA_SIZE;
 | 
				
			||||||
		memory_end_set = 1;
 | 
							memory_end_set = 1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -348,3 +348,5 @@ SYSCALL(sys_open_by_handle_at,sys_open_by_handle_at,compat_sys_open_by_handle_at
 | 
				
			||||||
SYSCALL(sys_clock_adjtime,sys_clock_adjtime,compat_sys_clock_adjtime_wrapper)
 | 
					SYSCALL(sys_clock_adjtime,sys_clock_adjtime,compat_sys_clock_adjtime_wrapper)
 | 
				
			||||||
SYSCALL(sys_syncfs,sys_syncfs,sys_syncfs_wrapper)
 | 
					SYSCALL(sys_syncfs,sys_syncfs,sys_syncfs_wrapper)
 | 
				
			||||||
SYSCALL(sys_setns,sys_setns,sys_setns_wrapper)
 | 
					SYSCALL(sys_setns,sys_setns,sys_setns_wrapper)
 | 
				
			||||||
 | 
					SYSCALL(sys_process_vm_readv,sys_process_vm_readv,compat_sys_process_vm_readv_wrapper) /* 340 */
 | 
				
			||||||
 | 
					SYSCALL(sys_process_vm_writev,sys_process_vm_writev,compat_sys_process_vm_writev_wrapper)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -68,8 +68,10 @@ static cpumask_t cpu_group_map(struct mask_info *info, unsigned int cpu)
 | 
				
			||||||
	return mask;
 | 
						return mask;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void add_cpus_to_mask(struct topology_cpu *tl_cpu,
 | 
					static struct mask_info *add_cpus_to_mask(struct topology_cpu *tl_cpu,
 | 
				
			||||||
			     struct mask_info *book, struct mask_info *core)
 | 
										  struct mask_info *book,
 | 
				
			||||||
 | 
										  struct mask_info *core,
 | 
				
			||||||
 | 
										  int z10)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	unsigned int cpu;
 | 
						unsigned int cpu;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -88,10 +90,16 @@ static void add_cpus_to_mask(struct topology_cpu *tl_cpu,
 | 
				
			||||||
			cpu_book_id[lcpu] = book->id;
 | 
								cpu_book_id[lcpu] = book->id;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
			cpumask_set_cpu(lcpu, &core->mask);
 | 
								cpumask_set_cpu(lcpu, &core->mask);
 | 
				
			||||||
 | 
								if (z10) {
 | 
				
			||||||
 | 
									cpu_core_id[lcpu] = rcpu;
 | 
				
			||||||
 | 
									core = core->next;
 | 
				
			||||||
 | 
								} else {
 | 
				
			||||||
				cpu_core_id[lcpu] = core->id;
 | 
									cpu_core_id[lcpu] = core->id;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
			smp_cpu_polarization[lcpu] = tl_cpu->pp;
 | 
								smp_cpu_polarization[lcpu] = tl_cpu->pp;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						return core;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void clear_masks(void)
 | 
					static void clear_masks(void)
 | 
				
			||||||
| 
						 | 
					@ -123,18 +131,41 @@ static void tl_to_cores(struct sysinfo_15_1_x *info)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
#ifdef CONFIG_SCHED_BOOK
 | 
					#ifdef CONFIG_SCHED_BOOK
 | 
				
			||||||
	struct mask_info *book = &book_info;
 | 
						struct mask_info *book = &book_info;
 | 
				
			||||||
 | 
						struct cpuid cpu_id;
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
	struct mask_info *book = NULL;
 | 
						struct mask_info *book = NULL;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	struct mask_info *core = &core_info;
 | 
						struct mask_info *core = &core_info;
 | 
				
			||||||
	union topology_entry *tle, *end;
 | 
						union topology_entry *tle, *end;
 | 
				
			||||||
 | 
						int z10 = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef CONFIG_SCHED_BOOK
 | 
				
			||||||
 | 
						get_cpu_id(&cpu_id);
 | 
				
			||||||
 | 
						z10 = cpu_id.machine == 0x2097 || cpu_id.machine == 0x2098;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	spin_lock_irq(&topology_lock);
 | 
						spin_lock_irq(&topology_lock);
 | 
				
			||||||
	clear_masks();
 | 
						clear_masks();
 | 
				
			||||||
	tle = info->tle;
 | 
						tle = info->tle;
 | 
				
			||||||
	end = (union topology_entry *)((unsigned long)info + info->length);
 | 
						end = (union topology_entry *)((unsigned long)info + info->length);
 | 
				
			||||||
	while (tle < end) {
 | 
						while (tle < end) {
 | 
				
			||||||
 | 
					#ifdef CONFIG_SCHED_BOOK
 | 
				
			||||||
 | 
							if (z10) {
 | 
				
			||||||
 | 
								switch (tle->nl) {
 | 
				
			||||||
 | 
								case 1:
 | 
				
			||||||
 | 
									book = book->next;
 | 
				
			||||||
 | 
									book->id = tle->container.id;
 | 
				
			||||||
 | 
									break;
 | 
				
			||||||
 | 
								case 0:
 | 
				
			||||||
 | 
									core = add_cpus_to_mask(&tle->cpu, book, core, z10);
 | 
				
			||||||
 | 
									break;
 | 
				
			||||||
 | 
								default:
 | 
				
			||||||
 | 
									clear_masks();
 | 
				
			||||||
 | 
									goto out;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								tle = next_tle(tle);
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		switch (tle->nl) {
 | 
							switch (tle->nl) {
 | 
				
			||||||
#ifdef CONFIG_SCHED_BOOK
 | 
					#ifdef CONFIG_SCHED_BOOK
 | 
				
			||||||
		case 2:
 | 
							case 2:
 | 
				
			||||||
| 
						 | 
					@ -147,7 +178,7 @@ static void tl_to_cores(struct sysinfo_15_1_x *info)
 | 
				
			||||||
			core->id = tle->container.id;
 | 
								core->id = tle->container.id;
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
		case 0:
 | 
							case 0:
 | 
				
			||||||
			add_cpus_to_mask(&tle->cpu, book, core);
 | 
								add_cpus_to_mask(&tle->cpu, book, core, z10);
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
		default:
 | 
							default:
 | 
				
			||||||
			clear_masks();
 | 
								clear_masks();
 | 
				
			||||||
| 
						 | 
					@ -328,8 +359,8 @@ void __init s390_init_cpu_topology(void)
 | 
				
			||||||
	for (i = 0; i < TOPOLOGY_NR_MAG; i++)
 | 
						for (i = 0; i < TOPOLOGY_NR_MAG; i++)
 | 
				
			||||||
		printk(" %d", info->mag[i]);
 | 
							printk(" %d", info->mag[i]);
 | 
				
			||||||
	printk(" / %d\n", info->mnest);
 | 
						printk(" / %d\n", info->mnest);
 | 
				
			||||||
	alloc_masks(info, &core_info, 2);
 | 
						alloc_masks(info, &core_info, 1);
 | 
				
			||||||
#ifdef CONFIG_SCHED_BOOK
 | 
					#ifdef CONFIG_SCHED_BOOK
 | 
				
			||||||
	alloc_masks(info, &book_info, 3);
 | 
						alloc_masks(info, &book_info, 2);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -43,6 +43,8 @@ SECTIONS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	NOTES :text :note
 | 
						NOTES :text :note
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						.dummy : { *(.dummy) } :data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	RODATA
 | 
						RODATA
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef CONFIG_SHARED_KERNEL
 | 
					#ifdef CONFIG_SHARED_KERNEL
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -70,7 +70,7 @@ static int __diag_ipl_functions(struct kvm_vcpu *vcpu)
 | 
				
			||||||
		return -EOPNOTSUPP;
 | 
							return -EOPNOTSUPP;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	atomic_clear_mask(CPUSTAT_RUNNING, &vcpu->arch.sie_block->cpuflags);
 | 
						atomic_set_mask(CPUSTAT_STOPPED, &vcpu->arch.sie_block->cpuflags);
 | 
				
			||||||
	vcpu->run->s390_reset_flags |= KVM_S390_RESET_SUBSYSTEM;
 | 
						vcpu->run->s390_reset_flags |= KVM_S390_RESET_SUBSYSTEM;
 | 
				
			||||||
	vcpu->run->s390_reset_flags |= KVM_S390_RESET_IPL;
 | 
						vcpu->run->s390_reset_flags |= KVM_S390_RESET_IPL;
 | 
				
			||||||
	vcpu->run->s390_reset_flags |= KVM_S390_RESET_CPU_INIT;
 | 
						vcpu->run->s390_reset_flags |= KVM_S390_RESET_CPU_INIT;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
Some files were not shown because too many files have changed in this diff Show more
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue