mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 08:44:41 +00:00 
			
		
		
		
	Merge commit '9249e17fe094d853d1ef7475dd559a2cc7e23d42' into nfs-for-3.6
Resolve conflicts with the VFS atomic open and sget changes. Conflicts: fs/nfs/nfs4proc.c
This commit is contained in:
		
						commit
						8626e4a426
					
				
					 698 changed files with 6437 additions and 4542 deletions
				
			
		|  | @ -1,26 +1,5 @@ | |||
| What:           /sys/block/rssd*/registers | ||||
| Date:           March 2012 | ||||
| KernelVersion:  3.3 | ||||
| Contact:        Asai Thambi S P <asamymuthupa@micron.com> | ||||
| Description:    This is a read-only file. Dumps below driver information and | ||||
|                 hardware registers. | ||||
|                     - S ACTive | ||||
|                     - Command Issue | ||||
|                     - Completed | ||||
|                     - PORT IRQ STAT | ||||
|                     - HOST IRQ STAT | ||||
|                     - Allocated | ||||
|                     - Commands in Q | ||||
| 
 | ||||
| What:           /sys/block/rssd*/status | ||||
| Date:           April 2012 | ||||
| KernelVersion:  3.4 | ||||
| Contact:        Asai Thambi S P <asamymuthupa@micron.com> | ||||
| Description:    This is a read-only file. Indicates the status of the device. | ||||
| 
 | ||||
| What:           /sys/block/rssd*/flags | ||||
| Date:           May 2012 | ||||
| KernelVersion:  3.5 | ||||
| Contact:        Asai Thambi S P <asamymuthupa@micron.com> | ||||
| Description:    This is a read-only file. Dumps the flags in port and driver | ||||
|                 data structure | ||||
|  |  | |||
|  | @ -142,13 +142,14 @@ KernelVersion:	3.4 | |||
| Contact:	linux-mtd@lists.infradead.org | ||||
| Description: | ||||
| 		This allows the user to examine and adjust the criteria by which | ||||
| 		mtd returns -EUCLEAN from mtd_read().  If the maximum number of | ||||
| 		bit errors that were corrected on any single region comprising | ||||
| 		an ecc step (as reported by the driver) equals or exceeds this | ||||
| 		value, -EUCLEAN is returned.  Otherwise, absent an error, 0 is | ||||
| 		returned.  Higher layers (e.g., UBI) use this return code as an | ||||
| 		indication that an erase block may be degrading and should be | ||||
| 		scrutinized as a candidate for being marked as bad. | ||||
| 		mtd returns -EUCLEAN from mtd_read() and mtd_read_oob().  If the | ||||
| 		maximum number of bit errors that were corrected on any single | ||||
| 		region comprising an ecc step (as reported by the driver) equals | ||||
| 		or exceeds this value, -EUCLEAN is returned.  Otherwise, absent | ||||
| 		an error, 0 is returned.  Higher layers (e.g., UBI) use this | ||||
| 		return code as an indication that an erase block may be | ||||
| 		degrading and should be scrutinized as a candidate for being | ||||
| 		marked as bad. | ||||
| 
 | ||||
| 		The initial value may be specified by the flash device driver. | ||||
| 		If not, then the default value is ecc_strength. | ||||
|  | @ -167,7 +168,7 @@ Description: | |||
| 		block degradation, but high enough to avoid the consequences of | ||||
| 		a persistent return value of -EUCLEAN on devices where sticky | ||||
| 		bitflips occur.  Note that if bitflip_threshold exceeds | ||||
| 		ecc_strength, -EUCLEAN is never returned by mtd_read(). | ||||
| 		ecc_strength, -EUCLEAN is never returned by the read operations. | ||||
| 		Conversely, if bitflip_threshold is zero, -EUCLEAN is always | ||||
| 		returned, absent a hard error. | ||||
| 
 | ||||
|  |  | |||
|  | @ -3988,7 +3988,7 @@ interface and may change in the future.</para> | |||
| 	    from RGB to Y'CbCr color space. | ||||
| 	    </entry> | ||||
| 	  </row> | ||||
| 	  <row id = "v4l2-jpeg-chroma-subsampling"> | ||||
| 	  <row> | ||||
| 	    <entrytbl spanname="descr" cols="2"> | ||||
| 	      <tbody valign="top"> | ||||
| 		<row> | ||||
|  |  | |||
|  | @ -986,13 +986,13 @@ http://www.thedirks.org/winnov/</ulink></para></entry> | |||
| 	  <row id="V4L2-PIX-FMT-Y4"> | ||||
| 	    <entry><constant>V4L2_PIX_FMT_Y4</constant></entry> | ||||
| 	    <entry>'Y04 '</entry> | ||||
| 	    <entry>Old 4-bit greyscale format. Only the least significant 4 bits of each byte are used, | ||||
| 	    <entry>Old 4-bit greyscale format. Only the most significant 4 bits of each byte are used, | ||||
| the other bits are set to 0.</entry> | ||||
| 	  </row> | ||||
| 	  <row id="V4L2-PIX-FMT-Y6"> | ||||
| 	    <entry><constant>V4L2_PIX_FMT_Y6</constant></entry> | ||||
| 	    <entry>'Y06 '</entry> | ||||
| 	    <entry>Old 6-bit greyscale format. Only the least significant 6 bits of each byte are used, | ||||
| 	    <entry>Old 6-bit greyscale format. Only the most significant 6 bits of each byte are used, | ||||
| the other bits are set to 0.</entry> | ||||
| 	  </row> | ||||
| 	</tbody> | ||||
|  |  | |||
|  | @ -560,6 +560,7 @@ and discussions on the V4L mailing list.</revremark> | |||
|     &sub-g-tuner; | ||||
|     &sub-log-status; | ||||
|     &sub-overlay; | ||||
|     &sub-prepare-buf; | ||||
|     &sub-qbuf; | ||||
|     &sub-querybuf; | ||||
|     &sub-querycap; | ||||
|  | @ -567,7 +568,6 @@ and discussions on the V4L mailing list.</revremark> | |||
|     &sub-query-dv-preset; | ||||
|     &sub-query-dv-timings; | ||||
|     &sub-querystd; | ||||
|     &sub-prepare-buf; | ||||
|     &sub-reqbufs; | ||||
|     &sub-s-hw-freq-seek; | ||||
|     &sub-streamon; | ||||
|  |  | |||
|  | @ -108,10 +108,9 @@ information.</para> | |||
| /></entry> | ||||
| 	  </row> | ||||
| 	  <row> | ||||
| 	    <entry>__u32</entry> | ||||
| 	    <entry>struct v4l2_format</entry> | ||||
| 	    <entry><structfield>format</structfield></entry> | ||||
| 	    <entry>Filled in by the application, preserved by the driver. | ||||
| 	    See <xref linkend="v4l2-format" />.</entry> | ||||
| 	    <entry>Filled in by the application, preserved by the driver.</entry> | ||||
| 	  </row> | ||||
| 	  <row> | ||||
| 	    <entry>__u32</entry> | ||||
|  |  | |||
|  | @ -89,7 +89,7 @@ | |||
| 	  <row> | ||||
| 	    <entry></entry> | ||||
| 	    <entry>&v4l2-event-frame-sync;</entry> | ||||
|             <entry><structfield>frame</structfield></entry> | ||||
|             <entry><structfield>frame_sync</structfield></entry> | ||||
| 	    <entry>Event data for event V4L2_EVENT_FRAME_SYNC.</entry> | ||||
| 	  </row> | ||||
| 	  <row> | ||||
|  |  | |||
|  | @ -284,13 +284,6 @@ These controls are described in <xref | |||
| 	    processing controls. These controls are described in <xref | ||||
| 	    linkend="image-process-controls" />.</entry> | ||||
| 	  </row> | ||||
| 	  <row> | ||||
| 	    <entry><constant>V4L2_CTRL_CLASS_JPEG</constant></entry> | ||||
| 	    <entry>0x9d0000</entry> | ||||
| 	    <entry>The class containing JPEG compression controls. | ||||
| These controls are described in <xref | ||||
| 		linkend="jpeg-controls" />.</entry> | ||||
| 	  </row> | ||||
| 	</tbody> | ||||
|       </tgroup> | ||||
|     </table> | ||||
|  |  | |||
|  | @ -7,39 +7,39 @@ This target is read-only. | |||
| 
 | ||||
| Construction Parameters | ||||
| ======================= | ||||
|     <version> <dev> <hash_dev> <hash_start> | ||||
|     <version> <dev> <hash_dev> | ||||
|     <data_block_size> <hash_block_size> | ||||
|     <num_data_blocks> <hash_start_block> | ||||
|     <algorithm> <digest> <salt> | ||||
| 
 | ||||
| <version> | ||||
|     This is the version number of the on-disk format. | ||||
|     This is the type of the on-disk hash format. | ||||
| 
 | ||||
|     0 is the original format used in the Chromium OS. | ||||
| 	The salt is appended when hashing, digests are stored continuously and | ||||
| 	the rest of the block is padded with zeros. | ||||
|       The salt is appended when hashing, digests are stored continuously and | ||||
|       the rest of the block is padded with zeros. | ||||
| 
 | ||||
|     1 is the current format that should be used for new devices. | ||||
| 	The salt is prepended when hashing and each digest is | ||||
| 	padded with zeros to the power of two. | ||||
|       The salt is prepended when hashing and each digest is | ||||
|       padded with zeros to the power of two. | ||||
| 
 | ||||
| <dev> | ||||
|     This is the device containing the data the integrity of which needs to be | ||||
|     This is the device containing data, the integrity of which needs to be | ||||
|     checked.  It may be specified as a path, like /dev/sdaX, or a device number, | ||||
|     <major>:<minor>. | ||||
| 
 | ||||
| <hash_dev> | ||||
|     This is the device that that supplies the hash tree data.  It may be | ||||
|     This is the device that supplies the hash tree data.  It may be | ||||
|     specified similarly to the device path and may be the same device.  If the | ||||
|     same device is used, the hash_start should be outside of the dm-verity | ||||
|     configured device size. | ||||
|     same device is used, the hash_start should be outside the configured | ||||
|     dm-verity device. | ||||
| 
 | ||||
| <data_block_size> | ||||
|     The block size on a data device.  Each block corresponds to one digest on | ||||
|     the hash device. | ||||
|     The block size on a data device in bytes. | ||||
|     Each block corresponds to one digest on the hash device. | ||||
| 
 | ||||
| <hash_block_size> | ||||
|     The size of a hash block. | ||||
|     The size of a hash block in bytes. | ||||
| 
 | ||||
| <num_data_blocks> | ||||
|     The number of data blocks on the data device.  Additional blocks are | ||||
|  | @ -65,7 +65,7 @@ Construction Parameters | |||
| Theory of operation | ||||
| =================== | ||||
| 
 | ||||
| dm-verity is meant to be setup as part of a verified boot path.  This | ||||
| dm-verity is meant to be set up as part of a verified boot path.  This | ||||
| may be anything ranging from a boot using tboot or trustedgrub to just | ||||
| booting from a known-good device (like a USB drive or CD). | ||||
| 
 | ||||
|  | @ -73,20 +73,20 @@ When a dm-verity device is configured, it is expected that the caller | |||
| has been authenticated in some way (cryptographic signatures, etc). | ||||
| After instantiation, all hashes will be verified on-demand during | ||||
| disk access.  If they cannot be verified up to the root node of the | ||||
| tree, the root hash, then the I/O will fail.  This should identify | ||||
| tree, the root hash, then the I/O will fail.  This should detect | ||||
| tampering with any data on the device and the hash data. | ||||
| 
 | ||||
| Cryptographic hashes are used to assert the integrity of the device on a | ||||
| per-block basis.  This allows for a lightweight hash computation on first read | ||||
| into the page cache.  Block hashes are stored linearly-aligned to the nearest | ||||
| block the size of a page. | ||||
| per-block basis. This allows for a lightweight hash computation on first read | ||||
| into the page cache. Block hashes are stored linearly, aligned to the nearest | ||||
| block size. | ||||
| 
 | ||||
| Hash Tree | ||||
| --------- | ||||
| 
 | ||||
| Each node in the tree is a cryptographic hash.  If it is a leaf node, the hash | ||||
| is of some block data on disk.  If it is an intermediary node, then the hash is | ||||
| of a number of child nodes. | ||||
| of some data block on disk is calculated. If it is an intermediary node, | ||||
| the hash of a number of child nodes is calculated. | ||||
| 
 | ||||
| Each entry in the tree is a collection of neighboring nodes that fit in one | ||||
| block.  The number is determined based on block_size and the size of the | ||||
|  | @ -110,63 +110,23 @@ alg = sha256, num_blocks = 32768, block_size = 4096 | |||
| On-disk format | ||||
| ============== | ||||
| 
 | ||||
| Below is the recommended on-disk format. The verity kernel code does not | ||||
| read the on-disk header. It only reads the hash blocks which directly | ||||
| follow the header. It is expected that a user-space tool will verify the | ||||
| integrity of the verity_header and then call dmsetup with the correct | ||||
| parameters. Alternatively, the header can be omitted and the dmsetup | ||||
| parameters can be passed via the kernel command-line in a rooted chain | ||||
| of trust where the command-line is verified. | ||||
| The verity kernel code does not read the verity metadata on-disk header. | ||||
| It only reads the hash blocks which directly follow the header. | ||||
| It is expected that a user-space tool will verify the integrity of the | ||||
| verity header. | ||||
| 
 | ||||
| The on-disk format is especially useful in cases where the hash blocks | ||||
| are on a separate partition. The magic number allows easy identification | ||||
| of the partition contents. Alternatively, the hash blocks can be stored | ||||
| in the same partition as the data to be verified. In such a configuration | ||||
| the filesystem on the partition would be sized a little smaller than | ||||
| the full-partition, leaving room for the hash blocks. | ||||
| 
 | ||||
| struct superblock { | ||||
| 	uint8_t signature[8] | ||||
| 		"verity\0\0"; | ||||
| 
 | ||||
| 	uint8_t version; | ||||
| 		1 - current format | ||||
| 
 | ||||
| 	uint8_t data_block_bits; | ||||
| 		log2(data block size) | ||||
| 
 | ||||
| 	uint8_t hash_block_bits; | ||||
| 		log2(hash block size) | ||||
| 
 | ||||
| 	uint8_t pad1[1]; | ||||
| 		zero padding | ||||
| 
 | ||||
| 	uint16_t salt_size; | ||||
| 		big-endian salt size | ||||
| 
 | ||||
| 	uint8_t pad2[2]; | ||||
| 		zero padding | ||||
| 
 | ||||
| 	uint32_t data_blocks_hi; | ||||
| 		big-endian high 32 bits of the 64-bit number of data blocks | ||||
| 
 | ||||
| 	uint32_t data_blocks_lo; | ||||
| 		big-endian low 32 bits of the 64-bit number of data blocks | ||||
| 
 | ||||
| 	uint8_t algorithm[16]; | ||||
| 		cryptographic algorithm | ||||
| 
 | ||||
| 	uint8_t salt[384]; | ||||
| 		salt (the salt size is specified above) | ||||
| 
 | ||||
| 	uint8_t pad3[88]; | ||||
| 		zero padding to 512-byte boundary | ||||
| } | ||||
| Alternatively, the header can be omitted and the dmsetup parameters can | ||||
| be passed via the kernel command-line in a rooted chain of trust where | ||||
| the command-line is verified. | ||||
| 
 | ||||
| Directly following the header (and with sector number padded to the next hash | ||||
| block boundary) are the hash blocks which are stored a depth at a time | ||||
| (starting from the root), sorted in order of increasing index. | ||||
| 
 | ||||
| The full specification of kernel parameters and on-disk metadata format | ||||
| is available at the cryptsetup project's wiki page | ||||
|   http://code.google.com/p/cryptsetup/wiki/DMVerity | ||||
| 
 | ||||
| Status | ||||
| ====== | ||||
| V (for Valid) is returned if every check performed so far was valid. | ||||
|  | @ -174,21 +134,22 @@ If any check failed, C (for Corruption) is returned. | |||
| 
 | ||||
| Example | ||||
| ======= | ||||
| 
 | ||||
| Setup a device: | ||||
|   dmsetup create vroot --table \ | ||||
|     "0 2097152 "\ | ||||
|     "verity 1 /dev/sda1 /dev/sda2 4096 4096 2097152 1 "\ | ||||
| Set up a device: | ||||
|   # dmsetup create vroot --readonly --table \ | ||||
|     "0 2097152 verity 1 /dev/sda1 /dev/sda2 4096 4096 262144 1 sha256 "\ | ||||
|     "4392712ba01368efdf14b05c76f9e4df0d53664630b5d48632ed17a137f39076 "\ | ||||
|     "1234000000000000000000000000000000000000000000000000000000000000" | ||||
| 
 | ||||
| A command line tool veritysetup is available to compute or verify | ||||
| the hash tree or activate the kernel driver.  This is available from | ||||
| the LVM2 upstream repository and may be supplied as a package called | ||||
| device-mapper-verity-tools: | ||||
|     git://sources.redhat.com/git/lvm2 | ||||
|     http://sourceware.org/git/?p=lvm2.git | ||||
|     http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/verity?cvsroot=lvm2 | ||||
| the hash tree or activate the kernel device. This is available from | ||||
| the cryptsetup upstream repository http://code.google.com/p/cryptsetup/ | ||||
| (as a libcryptsetup extension). | ||||
| 
 | ||||
| veritysetup -a vroot /dev/sda1 /dev/sda2 \ | ||||
| 	4392712ba01368efdf14b05c76f9e4df0d53664630b5d48632ed17a137f39076 | ||||
| Create hash on the device: | ||||
|   # veritysetup format /dev/sda1 /dev/sda2 | ||||
|   ... | ||||
|   Root hash: 4392712ba01368efdf14b05c76f9e4df0d53664630b5d48632ed17a137f39076 | ||||
| 
 | ||||
| Activate the device: | ||||
|   # veritysetup create vroot /dev/sda1 /dev/sda2 \ | ||||
|     4392712ba01368efdf14b05c76f9e4df0d53664630b5d48632ed17a137f39076 | ||||
|  |  | |||
|  | @ -2,6 +2,7 @@ | |||
| 
 | ||||
| Required properties: | ||||
| - compatible : "fsl,mma8450". | ||||
| - reg: the I2C address of MMA8450 | ||||
| 
 | ||||
| Example: | ||||
| 
 | ||||
|  |  | |||
|  | @ -46,8 +46,8 @@ Examples: | |||
| 
 | ||||
| ecspi@70010000 { /* ECSPI1 */ | ||||
| 	fsl,spi-num-chipselects = <2>; | ||||
| 	cs-gpios = <&gpio3 24 0>, /* GPIO4_24 */ | ||||
| 		   <&gpio3 25 0>; /* GPIO4_25 */ | ||||
| 	cs-gpios = <&gpio4 24 0>, /* GPIO4_24 */ | ||||
| 		   <&gpio4 25 0>; /* GPIO4_25 */ | ||||
| 	status = "okay"; | ||||
| 
 | ||||
| 	pmic: mc13892@0 { | ||||
|  |  | |||
|  | @ -29,6 +29,6 @@ esdhc@70008000 { | |||
| 	compatible = "fsl,imx51-esdhc"; | ||||
| 	reg = <0x70008000 0x4000>; | ||||
| 	interrupts = <2>; | ||||
| 	cd-gpios = <&gpio0 6 0>; /* GPIO1_6 */ | ||||
| 	wp-gpios = <&gpio0 5 0>; /* GPIO1_5 */ | ||||
| 	cd-gpios = <&gpio1 6 0>; /* GPIO1_6 */ | ||||
| 	wp-gpios = <&gpio1 5 0>; /* GPIO1_5 */ | ||||
| }; | ||||
|  |  | |||
|  | @ -19,6 +19,6 @@ ethernet@83fec000 { | |||
| 	reg = <0x83fec000 0x4000>; | ||||
| 	interrupts = <87>; | ||||
| 	phy-mode = "mii"; | ||||
| 	phy-reset-gpios = <&gpio1 14 0>; /* GPIO2_14 */ | ||||
| 	phy-reset-gpios = <&gpio2 14 0>; /* GPIO2_14 */ | ||||
| 	local-mac-address = [00 04 9F 01 1B B9]; | ||||
| }; | ||||
|  |  | |||
|  | @ -17,6 +17,6 @@ ecspi@70010000 { | |||
| 	reg = <0x70010000 0x4000>; | ||||
| 	interrupts = <36>; | ||||
| 	fsl,spi-num-chipselects = <2>; | ||||
| 	cs-gpios = <&gpio3 24 0>, /* GPIO4_24 */ | ||||
| 		   <&gpio3 25 0>; /* GPIO4_25 */ | ||||
| 	cs-gpios = <&gpio3 24 0>, /* GPIO3_24 */ | ||||
| 		   <&gpio3 25 0>; /* GPIO3_25 */ | ||||
| }; | ||||
|  |  | |||
|  | @ -3,6 +3,7 @@ Device tree binding vendor prefix registry.  Keep list in alphabetical order. | |||
| This isn't an exhaustive list, but you should add new prefixes to it before | ||||
| using them to avoid name-space collisions. | ||||
| 
 | ||||
| ad	Avionic Design GmbH | ||||
| adi	Analog Devices, Inc. | ||||
| amcc	Applied Micro Circuits Corporation (APM, formally AMCC) | ||||
| apm	Applied Micro Circuits Corporation (APM) | ||||
|  |  | |||
|  | @ -9,7 +9,7 @@ be able to use diff(1). | |||
| 
 | ||||
| --------------------------- dentry_operations -------------------------- | ||||
| prototypes: | ||||
| 	int (*d_revalidate)(struct dentry *, struct nameidata *); | ||||
| 	int (*d_revalidate)(struct dentry *, unsigned int); | ||||
| 	int (*d_hash)(const struct dentry *, const struct inode *, | ||||
| 			struct qstr *); | ||||
| 	int (*d_compare)(const struct dentry *, const struct inode *, | ||||
|  | @ -37,9 +37,8 @@ d_manage:	no		no		yes (ref-walk)	maybe | |||
| 
 | ||||
| --------------------------- inode_operations ---------------------------  | ||||
| prototypes: | ||||
| 	int (*create) (struct inode *,struct dentry *,umode_t, struct nameidata *); | ||||
| 	struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameid | ||||
| ata *); | ||||
| 	int (*create) (struct inode *,struct dentry *,umode_t, bool); | ||||
| 	struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int); | ||||
| 	int (*link) (struct dentry *,struct inode *,struct dentry *); | ||||
| 	int (*unlink) (struct inode *,struct dentry *); | ||||
| 	int (*symlink) (struct inode *,struct dentry *,const char *); | ||||
|  | @ -62,6 +61,9 @@ ata *); | |||
| 	int (*removexattr) (struct dentry *, const char *); | ||||
| 	int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len); | ||||
| 	void (*update_time)(struct inode *, struct timespec *, int); | ||||
| 	int (*atomic_open)(struct inode *, struct dentry *, | ||||
| 				struct file *, unsigned open_flag, | ||||
| 				umode_t create_mode, int *opened); | ||||
| 
 | ||||
| locking rules: | ||||
| 	all may block | ||||
|  | @ -89,6 +91,7 @@ listxattr:	no | |||
| removexattr:	yes | ||||
| fiemap:		no | ||||
| update_time:	no | ||||
| atomic_open:	yes | ||||
| 
 | ||||
| 	Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on | ||||
| victim. | ||||
|  |  | |||
|  | @ -355,12 +355,10 @@ protects *all* the dcache state of a given dentry. | |||
| via rcu-walk path walk (basically, if the file can have had a path name in the | ||||
| vfs namespace). | ||||
| 
 | ||||
| 	i_dentry and i_rcu share storage in a union, and the vfs expects | ||||
| i_dentry to be reinitialized before it is freed, so an: | ||||
| 
 | ||||
|   INIT_LIST_HEAD(&inode->i_dentry); | ||||
| 
 | ||||
| must be done in the RCU callback. | ||||
| 	Even though i_dentry and i_rcu share storage in a union, we will | ||||
| initialize the former in inode_init_always(), so just leave it alone in | ||||
| the callback.  It used to be necessary to clean it there, but not anymore | ||||
| (starting at 3.2). | ||||
| 
 | ||||
| -- | ||||
| [recommended] | ||||
|  | @ -433,3 +431,14 @@ release it yourself. | |||
| 	d_alloc_root() is gone, along with a lot of bugs caused by code | ||||
| misusing it.  Replacement: d_make_root(inode).  The difference is, | ||||
| d_make_root() drops the reference to inode if dentry allocation fails.   | ||||
| 
 | ||||
| -- | ||||
| [mandatory] | ||||
| 	The witch is dead!  Well, 2/3 of it, anyway.  ->d_revalidate() and | ||||
| ->lookup() do *not* take struct nameidata anymore; just the flags. | ||||
| -- | ||||
| [mandatory] | ||||
| 	->create() doesn't take struct nameidata *; unlike the previous | ||||
| two, it gets "is it an O_EXCL or equivalent?" boolean argument.  Note that | ||||
| local filesystems can ignore tha argument - they are guaranteed that the | ||||
| object doesn't exist.  It's remote/distributed ones that might care... | ||||
|  |  | |||
|  | @ -341,8 +341,8 @@ This describes how the VFS can manipulate an inode in your | |||
| filesystem. As of kernel 2.6.22, the following members are defined: | ||||
| 
 | ||||
| struct inode_operations { | ||||
| 	int (*create) (struct inode *,struct dentry *, umode_t, struct nameidata *); | ||||
| 	struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *); | ||||
| 	int (*create) (struct inode *,struct dentry *, umode_t, bool); | ||||
| 	struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int); | ||||
| 	int (*link) (struct dentry *,struct inode *,struct dentry *); | ||||
| 	int (*unlink) (struct inode *,struct dentry *); | ||||
| 	int (*symlink) (struct inode *,struct dentry *,const char *); | ||||
|  | @ -364,6 +364,9 @@ struct inode_operations { | |||
| 	ssize_t (*listxattr) (struct dentry *, char *, size_t); | ||||
| 	int (*removexattr) (struct dentry *, const char *); | ||||
| 	void (*update_time)(struct inode *, struct timespec *, int); | ||||
| 	int (*atomic_open)(struct inode *, struct dentry *, | ||||
| 				struct file *, unsigned open_flag, | ||||
| 				umode_t create_mode, int *opened); | ||||
| }; | ||||
| 
 | ||||
| Again, all methods are called without any locks being held, unless | ||||
|  | @ -476,6 +479,14 @@ otherwise noted. | |||
|   	an inode.  If this is not defined the VFS will update the inode itself | ||||
|   	and call mark_inode_dirty_sync. | ||||
| 
 | ||||
|   atomic_open: called on the last component of an open.  Using this optional | ||||
|   	method the filesystem can look up, possibly create and open the file in | ||||
|   	one atomic operation.  If it cannot perform this (e.g. the file type | ||||
|   	turned out to be wrong) it may signal this by returning 1 instead of | ||||
|   	usual 0 or -ve .  This method is only called if the last | ||||
|   	component is negative or needs lookup.  Cached positive dentries are | ||||
|   	still handled by f_op->open(). | ||||
| 
 | ||||
| The Address Space Object | ||||
| ======================== | ||||
| 
 | ||||
|  | @ -891,7 +902,7 @@ the VFS uses a default. As of kernel 2.6.22, the following members are | |||
| defined: | ||||
| 
 | ||||
| struct dentry_operations { | ||||
| 	int (*d_revalidate)(struct dentry *, struct nameidata *); | ||||
| 	int (*d_revalidate)(struct dentry *, unsigned int); | ||||
| 	int (*d_hash)(const struct dentry *, const struct inode *, | ||||
| 			struct qstr *); | ||||
| 	int (*d_compare)(const struct dentry *, const struct inode *, | ||||
|  | @ -910,11 +921,11 @@ struct dentry_operations { | |||
| 	dcache. Most filesystems leave this as NULL, because all their | ||||
| 	dentries in the dcache are valid | ||||
| 
 | ||||
| 	d_revalidate may be called in rcu-walk mode (nd->flags & LOOKUP_RCU). | ||||
| 	d_revalidate may be called in rcu-walk mode (flags & LOOKUP_RCU). | ||||
| 	If in rcu-walk mode, the filesystem must revalidate the dentry without | ||||
| 	blocking or storing to the dentry, d_parent and d_inode should not be | ||||
| 	used without care (because they can go NULL), instead nd->inode should | ||||
| 	be used. | ||||
| 	used without care (because they can change and, in d_inode case, even | ||||
| 	become NULL under us). | ||||
| 
 | ||||
| 	If a situation is encountered that rcu-walk cannot handle, return | ||||
| 	-ECHILD and it will be called again in ref-walk mode. | ||||
|  |  | |||
							
								
								
									
										57
									
								
								Documentation/prctl/no_new_privs.txt
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										57
									
								
								Documentation/prctl/no_new_privs.txt
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,57 @@ | |||
| The execve system call can grant a newly-started program privileges that | ||||
| its parent did not have.  The most obvious examples are setuid/setgid | ||||
| programs and file capabilities.  To prevent the parent program from | ||||
| gaining these privileges as well, the kernel and user code must be | ||||
| careful to prevent the parent from doing anything that could subvert the | ||||
| child.  For example: | ||||
| 
 | ||||
|  - The dynamic loader handles LD_* environment variables differently if | ||||
|    a program is setuid. | ||||
| 
 | ||||
|  - chroot is disallowed to unprivileged processes, since it would allow | ||||
|    /etc/passwd to be replaced from the point of view of a process that | ||||
|    inherited chroot. | ||||
| 
 | ||||
|  - The exec code has special handling for ptrace. | ||||
| 
 | ||||
| These are all ad-hoc fixes.  The no_new_privs bit (since Linux 3.5) is a | ||||
| new, generic mechanism to make it safe for a process to modify its | ||||
| execution environment in a manner that persists across execve.  Any task | ||||
| can set no_new_privs.  Once the bit is set, it is inherited across fork, | ||||
| clone, and execve and cannot be unset.  With no_new_privs set, execve | ||||
| promises not to grant the privilege to do anything that could not have | ||||
| been done without the execve call.  For example, the setuid and setgid | ||||
| bits will no longer change the uid or gid; file capabilities will not | ||||
| add to the permitted set, and LSMs will not relax constraints after | ||||
| execve. | ||||
| 
 | ||||
| To set no_new_privs, use prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0). | ||||
| 
 | ||||
| Be careful, though: LSMs might also not tighten constraints on exec | ||||
| in no_new_privs mode.  (This means that setting up a general-purpose | ||||
| service launcher to set no_new_privs before execing daemons may | ||||
| interfere with LSM-based sandboxing.) | ||||
| 
 | ||||
| Note that no_new_privs does not prevent privilege changes that do not | ||||
| involve execve.  An appropriately privileged task can still call | ||||
| setuid(2) and receive SCM_RIGHTS datagrams. | ||||
| 
 | ||||
| There are two main use cases for no_new_privs so far: | ||||
| 
 | ||||
|  - Filters installed for the seccomp mode 2 sandbox persist across | ||||
|    execve and can change the behavior of newly-executed programs. | ||||
|    Unprivileged users are therefore only allowed to install such filters | ||||
|    if no_new_privs is set. | ||||
| 
 | ||||
|  - By itself, no_new_privs can be used to reduce the attack surface | ||||
|    available to an unprivileged user.  If everything running with a | ||||
|    given uid has no_new_privs set, then that uid will be unable to | ||||
|    escalate its privileges by directly attacking setuid, setgid, and | ||||
|    fcap-using binaries; it will need to compromise something without the | ||||
|    no_new_privs bit set first. | ||||
| 
 | ||||
| In the future, other potentially dangerous kernel features could become | ||||
| available to unprivileged tasks if no_new_privs is set.  In principle, | ||||
| several options to unshare(2) and clone(2) would be safe when | ||||
| no_new_privs is set, and no_new_privs + chroot is considerable less | ||||
| dangerous than chroot by itself. | ||||
|  | @ -12,6 +12,12 @@ Rules on what kind of patches are accepted, and which ones are not, into the | |||
|    marked CONFIG_BROKEN), an oops, a hang, data corruption, a real | ||||
|    security issue, or some "oh, that's not good" issue.  In short, something | ||||
|    critical. | ||||
|  - Serious issues as reported by a user of a distribution kernel may also | ||||
|    be considered if they fix a notable performance or interactivity issue. | ||||
|    As these fixes are not as obvious and have a higher risk of a subtle | ||||
|    regression they should only be submitted by a distribution kernel | ||||
|    maintainer and include an addendum linking to a bugzilla entry if it | ||||
|    exists and additional information on the user-visible impact. | ||||
|  - New device IDs and quirks are also accepted. | ||||
|  - No "theoretical race condition" issues, unless an explanation of how the | ||||
|    race can be exploited is also provided. | ||||
|  |  | |||
|  | @ -1930,6 +1930,23 @@ The "pte_enc" field provides a value that can OR'ed into the hash | |||
| PTE's RPN field (ie, it needs to be shifted left by 12 to OR it | ||||
| into the hash PTE second double word). | ||||
| 
 | ||||
| 4.75 KVM_IRQFD | ||||
| 
 | ||||
| Capability: KVM_CAP_IRQFD | ||||
| Architectures: x86 | ||||
| Type: vm ioctl | ||||
| Parameters: struct kvm_irqfd (in) | ||||
| Returns: 0 on success, -1 on error | ||||
| 
 | ||||
| Allows setting an eventfd to directly trigger a guest interrupt. | ||||
| kvm_irqfd.fd specifies the file descriptor to use as the eventfd and | ||||
| kvm_irqfd.gsi specifies the irqchip pin toggled by this event.  When | ||||
| an event is tiggered on the eventfd, an interrupt is injected into | ||||
| the guest using the specified gsi pin.  The irqfd is removed using | ||||
| the KVM_IRQFD_FLAG_DEASSIGN flag, specifying both kvm_irqfd.fd | ||||
| and kvm_irqfd.gsi. | ||||
| 
 | ||||
| 
 | ||||
| 5. The kvm_run structure | ||||
| ------------------------ | ||||
| 
 | ||||
|  |  | |||
|  | @ -4654,8 +4654,8 @@ L:	netfilter@vger.kernel.org | |||
| L:	coreteam@netfilter.org | ||||
| W:	http://www.netfilter.org/ | ||||
| W:	http://www.iptables.org/ | ||||
| T:	git git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-2.6.git | ||||
| T:	git git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next-2.6.git | ||||
| T:	git git://1984.lsi.us.es/nf | ||||
| T:	git git://1984.lsi.us.es/nf-next | ||||
| S:	Supported | ||||
| F:	include/linux/netfilter* | ||||
| F:	include/linux/netfilter/ | ||||
|  | @ -4857,6 +4857,7 @@ M:	Kevin Hilman <khilman@ti.com> | |||
| L:	linux-omap@vger.kernel.org | ||||
| S:	Maintained | ||||
| F:	arch/arm/*omap*/*pm* | ||||
| F:	drivers/cpufreq/omap-cpufreq.c | ||||
| 
 | ||||
| OMAP POWERDOMAIN/CLOCKDOMAIN SOC ADAPTATION LAYER SUPPORT | ||||
| M:	Rajendra Nayak <rnayak@ti.com> | ||||
|  |  | |||
							
								
								
									
										2
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
										
									
									
									
								
							|  | @ -1,7 +1,7 @@ | |||
| VERSION = 3 | ||||
| PATCHLEVEL = 5 | ||||
| SUBLEVEL = 0 | ||||
| EXTRAVERSION = -rc4 | ||||
| EXTRAVERSION = -rc6 | ||||
| NAME = Saber-toothed Squirrel | ||||
| 
 | ||||
| # *DOCUMENTATION*
 | ||||
|  |  | |||
|  | @ -176,7 +176,6 @@ CONFIG_USB_ANNOUNCE_NEW_DEVICES=y | |||
| CONFIG_USB_DEVICEFS=y | ||||
| CONFIG_USB_SUSPEND=y | ||||
| CONFIG_USB_MON=y | ||||
| CONFIG_USB_EHCI_HCD=y | ||||
| CONFIG_USB_WDM=y | ||||
| CONFIG_USB_STORAGE=y | ||||
| CONFIG_USB_LIBUSUAL=y | ||||
|  |  | |||
|  | @ -243,7 +243,7 @@ typedef struct { | |||
| 
 | ||||
| #define ATOMIC64_INIT(i) { (i) } | ||||
| 
 | ||||
| static inline u64 atomic64_read(atomic64_t *v) | ||||
| static inline u64 atomic64_read(const atomic64_t *v) | ||||
| { | ||||
| 	u64 result; | ||||
| 
 | ||||
|  |  | |||
|  | @ -60,13 +60,13 @@ | |||
| #ifndef __ASSEMBLY__ | ||||
| 
 | ||||
| #ifdef CONFIG_CPU_USE_DOMAINS | ||||
| #define set_domain(x)					\ | ||||
| 	do {						\ | ||||
| 	__asm__ __volatile__(				\ | ||||
| 	"mcr	p15, 0, %0, c3, c0	@ set domain"	\ | ||||
| 	  : : "r" (x));					\ | ||||
| 	isb();						\ | ||||
| 	} while (0) | ||||
| static inline void set_domain(unsigned val) | ||||
| { | ||||
| 	asm volatile( | ||||
| 	"mcr	p15, 0, %0, c3, c0	@ set domain" | ||||
| 	  : : "r" (val)); | ||||
| 	isb(); | ||||
| } | ||||
| 
 | ||||
| #define modify_domain(dom,type)					\ | ||||
| 	do {							\ | ||||
|  | @ -78,8 +78,8 @@ | |||
| 	} while (0) | ||||
| 
 | ||||
| #else | ||||
| #define set_domain(x)		do { } while (0) | ||||
| #define modify_domain(dom,type)	do { } while (0) | ||||
| static inline void set_domain(unsigned val) { } | ||||
| static inline void modify_domain(unsigned dom, unsigned type)	{ } | ||||
| #endif | ||||
| 
 | ||||
| /*
 | ||||
|  |  | |||
|  | @ -148,7 +148,6 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *, | |||
| #define TIF_NOTIFY_RESUME	2	/* callback before returning to user */ | ||||
| #define TIF_SYSCALL_TRACE	8 | ||||
| #define TIF_SYSCALL_AUDIT	9 | ||||
| #define TIF_SYSCALL_RESTARTSYS	10 | ||||
| #define TIF_POLLING_NRFLAG	16 | ||||
| #define TIF_USING_IWMMXT	17 | ||||
| #define TIF_MEMDIE		18	/* is terminating due to OOM killer */ | ||||
|  | @ -164,11 +163,9 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *, | |||
| #define _TIF_POLLING_NRFLAG	(1 << TIF_POLLING_NRFLAG) | ||||
| #define _TIF_USING_IWMMXT	(1 << TIF_USING_IWMMXT) | ||||
| #define _TIF_SECCOMP		(1 << TIF_SECCOMP) | ||||
| #define _TIF_SYSCALL_RESTARTSYS	(1 << TIF_SYSCALL_RESTARTSYS) | ||||
| 
 | ||||
| /* Checks for any syscall work in entry-common.S */ | ||||
| #define _TIF_SYSCALL_WORK (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | \ | ||||
| 			   _TIF_SYSCALL_RESTARTSYS) | ||||
| #define _TIF_SYSCALL_WORK (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT) | ||||
| 
 | ||||
| /*
 | ||||
|  * Change these and you break ASM code in entry-common.S | ||||
|  |  | |||
|  | @ -187,8 +187,8 @@ void kprobe_arm_test_cases(void) | |||
| 	TEST_BF_R ("mov	pc, r",0,2f,"") | ||||
| 	TEST_BF_RR("mov	pc, r",0,2f,", asl r",1,0,"") | ||||
| 	TEST_BB(   "sub	pc, pc, #1b-2b+8") | ||||
| #if __LINUX_ARM_ARCH__ >= 6 | ||||
| 	TEST_BB(   "sub	pc, pc, #1b-2b+8-2") /* UNPREDICTABLE before ARMv6 */ | ||||
| #if __LINUX_ARM_ARCH__ == 6 && !defined(CONFIG_CPU_V7) | ||||
| 	TEST_BB(   "sub	pc, pc, #1b-2b+8-2") /* UNPREDICTABLE before and after ARMv6 */ | ||||
| #endif | ||||
| 	TEST_BB_R( "sub	pc, pc, r",14, 1f-2f+8,"") | ||||
| 	TEST_BB_R( "rsb	pc, r",14,1f-2f+8,", pc") | ||||
|  |  | |||
|  | @ -503,7 +503,7 @@ __hw_perf_event_init(struct perf_event *event) | |||
| 	     event_requires_mode_exclusion(&event->attr)) { | ||||
| 		pr_debug("ARM performance counters do not support " | ||||
| 			 "mode exclusion\n"); | ||||
| 		return -EPERM; | ||||
| 		return -EOPNOTSUPP; | ||||
| 	} | ||||
| 
 | ||||
| 	/*
 | ||||
|  |  | |||
|  | @ -25,7 +25,6 @@ | |||
| #include <linux/regset.h> | ||||
| #include <linux/audit.h> | ||||
| #include <linux/tracehook.h> | ||||
| #include <linux/unistd.h> | ||||
| 
 | ||||
| #include <asm/pgtable.h> | ||||
| #include <asm/traps.h> | ||||
|  | @ -918,8 +917,6 @@ asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno) | |||
| 		audit_syscall_entry(AUDIT_ARCH_ARM, scno, regs->ARM_r0, | ||||
| 				    regs->ARM_r1, regs->ARM_r2, regs->ARM_r3); | ||||
| 
 | ||||
| 	if (why == 0 && test_and_clear_thread_flag(TIF_SYSCALL_RESTARTSYS)) | ||||
| 		scno = __NR_restart_syscall - __NR_SYSCALL_BASE; | ||||
| 	if (!test_thread_flag(TIF_SYSCALL_TRACE)) | ||||
| 		return scno; | ||||
| 
 | ||||
|  |  | |||
|  | @ -27,6 +27,7 @@ | |||
|  */ | ||||
| #define SWI_SYS_SIGRETURN	(0xef000000|(__NR_sigreturn)|(__NR_OABI_SYSCALL_BASE)) | ||||
| #define SWI_SYS_RT_SIGRETURN	(0xef000000|(__NR_rt_sigreturn)|(__NR_OABI_SYSCALL_BASE)) | ||||
| #define SWI_SYS_RESTART		(0xef000000|__NR_restart_syscall|__NR_OABI_SYSCALL_BASE) | ||||
| 
 | ||||
| /*
 | ||||
|  * With EABI, the syscall number has to be loaded into r7. | ||||
|  | @ -46,6 +47,18 @@ const unsigned long sigreturn_codes[7] = { | |||
| 	MOV_R7_NR_RT_SIGRETURN, SWI_SYS_RT_SIGRETURN, SWI_THUMB_RT_SIGRETURN, | ||||
| }; | ||||
| 
 | ||||
| /*
 | ||||
|  * Either we support OABI only, or we have EABI with the OABI | ||||
|  * compat layer enabled.  In the later case we don't know if | ||||
|  * user space is EABI or not, and if not we must not clobber r7. | ||||
|  * Always using the OABI syscall solves that issue and works for | ||||
|  * all those cases. | ||||
|  */ | ||||
| const unsigned long syscall_restart_code[2] = { | ||||
| 	SWI_SYS_RESTART,	/* swi	__NR_restart_syscall */ | ||||
| 	0xe49df004,		/* ldr	pc, [sp], #4 */ | ||||
| }; | ||||
| 
 | ||||
| /*
 | ||||
|  * atomically swap in the new signal mask, and wait for a signal. | ||||
|  */ | ||||
|  | @ -592,10 +605,12 @@ static void do_signal(struct pt_regs *regs, int syscall) | |||
| 		case -ERESTARTNOHAND: | ||||
| 		case -ERESTARTSYS: | ||||
| 		case -ERESTARTNOINTR: | ||||
| 		case -ERESTART_RESTARTBLOCK: | ||||
| 			regs->ARM_r0 = regs->ARM_ORIG_r0; | ||||
| 			regs->ARM_pc = restart_addr; | ||||
| 			break; | ||||
| 		case -ERESTART_RESTARTBLOCK: | ||||
| 			regs->ARM_r0 = -EINTR; | ||||
| 			break; | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
|  | @ -611,14 +626,12 @@ static void do_signal(struct pt_regs *regs, int syscall) | |||
| 		 * debugger has chosen to restart at a different PC. | ||||
| 		 */ | ||||
| 		if (regs->ARM_pc == restart_addr) { | ||||
| 			if (retval == -ERESTARTNOHAND || | ||||
| 			    retval == -ERESTART_RESTARTBLOCK | ||||
| 			if (retval == -ERESTARTNOHAND | ||||
| 			    || (retval == -ERESTARTSYS | ||||
| 				&& !(ka.sa.sa_flags & SA_RESTART))) { | ||||
| 				regs->ARM_r0 = -EINTR; | ||||
| 				regs->ARM_pc = continue_addr; | ||||
| 			} | ||||
| 			clear_thread_flag(TIF_SYSCALL_RESTARTSYS); | ||||
| 		} | ||||
| 
 | ||||
| 		handle_signal(signr, &ka, &info, regs); | ||||
|  | @ -632,8 +645,29 @@ static void do_signal(struct pt_regs *regs, int syscall) | |||
| 		 * ignore the restart. | ||||
| 		 */ | ||||
| 		if (retval == -ERESTART_RESTARTBLOCK | ||||
| 		    && regs->ARM_pc == restart_addr) | ||||
| 			set_thread_flag(TIF_SYSCALL_RESTARTSYS); | ||||
| 		    && regs->ARM_pc == continue_addr) { | ||||
| 			if (thumb_mode(regs)) { | ||||
| 				regs->ARM_r7 = __NR_restart_syscall - __NR_SYSCALL_BASE; | ||||
| 				regs->ARM_pc -= 2; | ||||
| 			} else { | ||||
| #if defined(CONFIG_AEABI) && !defined(CONFIG_OABI_COMPAT) | ||||
| 				regs->ARM_r7 = __NR_restart_syscall; | ||||
| 				regs->ARM_pc -= 4; | ||||
| #else | ||||
| 				u32 __user *usp; | ||||
| 
 | ||||
| 				regs->ARM_sp -= 4; | ||||
| 				usp = (u32 __user *)regs->ARM_sp; | ||||
| 
 | ||||
| 				if (put_user(regs->ARM_pc, usp) == 0) { | ||||
| 					regs->ARM_pc = KERN_RESTART_CODE; | ||||
| 				} else { | ||||
| 					regs->ARM_sp += 4; | ||||
| 					force_sigsegv(0, current); | ||||
| 				} | ||||
| #endif | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	restore_saved_sigmask(); | ||||
|  |  | |||
|  | @ -8,5 +8,7 @@ | |||
|  * published by the Free Software Foundation. | ||||
|  */ | ||||
| #define KERN_SIGRETURN_CODE	(CONFIG_VECTORS_BASE + 0x00000500) | ||||
| #define KERN_RESTART_CODE	(KERN_SIGRETURN_CODE + sizeof(sigreturn_codes)) | ||||
| 
 | ||||
| extern const unsigned long sigreturn_codes[7]; | ||||
| extern const unsigned long syscall_restart_code[2]; | ||||
|  |  | |||
|  | @ -820,6 +820,8 @@ void __init early_trap_init(void *vectors_base) | |||
| 	 */ | ||||
| 	memcpy((void *)(vectors + KERN_SIGRETURN_CODE - CONFIG_VECTORS_BASE), | ||||
| 	       sigreturn_codes, sizeof(sigreturn_codes)); | ||||
| 	memcpy((void *)(vectors + KERN_RESTART_CODE - CONFIG_VECTORS_BASE), | ||||
| 	       syscall_restart_code, sizeof(syscall_restart_code)); | ||||
| 
 | ||||
| 	flush_icache_range(vectors, vectors + PAGE_SIZE); | ||||
| 	modify_domain(DOMAIN_USER, DOMAIN_CLIENT); | ||||
|  |  | |||
|  | @ -183,7 +183,9 @@ SECTIONS | |||
| 	} | ||||
| #endif | ||||
| 
 | ||||
| #ifdef CONFIG_SMP | ||||
| 	PERCPU_SECTION(L1_CACHE_BYTES) | ||||
| #endif | ||||
| 
 | ||||
| #ifdef CONFIG_XIP_KERNEL | ||||
| 	__data_loc = ALIGN(4);		/* location in binary */
 | ||||
|  |  | |||
|  | @ -50,5 +50,6 @@ | |||
| #define POWER_MANAGEMENT	(BRIDGE_VIRT_BASE | 0x011c) | ||||
| 
 | ||||
| #define TIMER_VIRT_BASE		(BRIDGE_VIRT_BASE | 0x0300) | ||||
| #define TIMER_PHYS_BASE         (BRIDGE_PHYS_BASE | 0x0300) | ||||
| 
 | ||||
| #endif | ||||
|  |  | |||
|  | @ -78,6 +78,7 @@ | |||
| 
 | ||||
| /* North-South Bridge */ | ||||
| #define BRIDGE_VIRT_BASE	(DOVE_SB_REGS_VIRT_BASE | 0x20000) | ||||
| #define BRIDGE_PHYS_BASE	(DOVE_SB_REGS_PHYS_BASE | 0x20000) | ||||
| 
 | ||||
| /* Cryptographic Engine */ | ||||
| #define DOVE_CRYPT_PHYS_BASE	(DOVE_SB_REGS_PHYS_BASE | 0x30000) | ||||
|  |  | |||
|  | @ -212,7 +212,7 @@ config MACH_SMDKV310 | |||
| 	select EXYNOS_DEV_SYSMMU | ||||
| 	select EXYNOS4_DEV_AHCI | ||||
| 	select SAMSUNG_DEV_KEYPAD | ||||
| 	select EXYNOS4_DEV_DMA | ||||
| 	select EXYNOS_DEV_DMA | ||||
| 	select SAMSUNG_DEV_PWM | ||||
| 	select EXYNOS4_DEV_USB_OHCI | ||||
| 	select EXYNOS4_SETUP_FIMD0 | ||||
|  | @ -264,7 +264,7 @@ config MACH_UNIVERSAL_C210 | |||
| 	select S5P_DEV_ONENAND | ||||
| 	select S5P_DEV_TV | ||||
| 	select EXYNOS_DEV_SYSMMU | ||||
| 	select EXYNOS4_DEV_DMA | ||||
| 	select EXYNOS_DEV_DMA | ||||
| 	select EXYNOS_DEV_DRM | ||||
| 	select EXYNOS4_SETUP_FIMD0 | ||||
| 	select EXYNOS4_SETUP_I2C1 | ||||
|  | @ -303,7 +303,7 @@ config MACH_NURI | |||
| 	select S5P_DEV_MFC | ||||
| 	select S5P_DEV_USB_EHCI | ||||
| 	select S5P_SETUP_MIPIPHY | ||||
| 	select EXYNOS4_DEV_DMA | ||||
| 	select EXYNOS_DEV_DMA | ||||
| 	select EXYNOS_DEV_DRM | ||||
| 	select EXYNOS4_SETUP_FIMC | ||||
| 	select EXYNOS4_SETUP_FIMD0 | ||||
|  | @ -341,7 +341,7 @@ config MACH_ORIGEN | |||
| 	select SAMSUNG_DEV_PWM | ||||
| 	select EXYNOS_DEV_DRM | ||||
| 	select EXYNOS_DEV_SYSMMU | ||||
| 	select EXYNOS4_DEV_DMA | ||||
| 	select EXYNOS_DEV_DMA | ||||
| 	select EXYNOS4_DEV_USB_OHCI | ||||
| 	select EXYNOS4_SETUP_FIMD0 | ||||
| 	select EXYNOS4_SETUP_SDHCI | ||||
|  |  | |||
|  | @ -201,7 +201,6 @@ int __init mx35_clocks_init() | |||
| 			pr_err("i.MX35 clk %d: register failed with %ld\n", | ||||
| 				i, PTR_ERR(clk[i])); | ||||
| 
 | ||||
| 
 | ||||
| 	clk_register_clkdev(clk[pata_gate], NULL, "pata_imx"); | ||||
| 	clk_register_clkdev(clk[can1_gate], NULL, "flexcan.0"); | ||||
| 	clk_register_clkdev(clk[can2_gate], NULL, "flexcan.1"); | ||||
|  | @ -264,6 +263,14 @@ int __init mx35_clocks_init() | |||
| 	clk_prepare_enable(clk[iim_gate]); | ||||
| 	clk_prepare_enable(clk[emi_gate]); | ||||
| 
 | ||||
| 	/*
 | ||||
| 	 * SCC is needed to boot via mmc after a watchdog reset. The clock code | ||||
| 	 * before conversion to common clk also enabled UART1 (which isn't | ||||
| 	 * handled here and not needed for mmc) and IIM (which is enabled | ||||
| 	 * unconditionally above). | ||||
| 	 */ | ||||
| 	clk_prepare_enable(clk[scc_gate]); | ||||
| 
 | ||||
| 	imx_print_silicon_rev("i.MX35", mx35_revision()); | ||||
| 
 | ||||
| #ifdef CONFIG_MXC_USE_EPIT | ||||
|  |  | |||
|  | @ -152,13 +152,14 @@ enum mx6q_clks { | |||
| 	ssi2, ssi3, uart_ipg, uart_serial, usboh3, usdhc1, usdhc2, usdhc3, | ||||
| 	usdhc4, vdo_axi, vpu_axi, cko1, pll1_sys, pll2_bus, pll3_usb_otg, | ||||
| 	pll4_audio, pll5_video, pll6_mlb, pll7_usb_host, pll8_enet, ssi1_ipg, | ||||
| 	ssi2_ipg, ssi3_ipg, clk_max | ||||
| 	ssi2_ipg, ssi3_ipg, rom, | ||||
| 	clk_max | ||||
| }; | ||||
| 
 | ||||
| static struct clk *clk[clk_max]; | ||||
| 
 | ||||
| static enum mx6q_clks const clks_init_on[] __initconst = { | ||||
| 	mmdc_ch0_axi, mmdc_ch1_axi, | ||||
| 	mmdc_ch0_axi, rom, | ||||
| }; | ||||
| 
 | ||||
| int __init mx6q_clocks_init(void) | ||||
|  | @ -364,6 +365,7 @@ int __init mx6q_clocks_init(void) | |||
| 	clk[gpmi_bch]     = imx_clk_gate2("gpmi_bch",      "usdhc4",            base + 0x78, 26); | ||||
| 	clk[gpmi_io]      = imx_clk_gate2("gpmi_io",       "enfc",              base + 0x78, 28); | ||||
| 	clk[gpmi_apb]     = imx_clk_gate2("gpmi_apb",      "usdhc3",            base + 0x78, 30); | ||||
| 	clk[rom]          = imx_clk_gate2("rom",           "ahb",               base + 0x7c, 0); | ||||
| 	clk[sata]         = imx_clk_gate2("sata",          "ipg",               base + 0x7c, 4); | ||||
| 	clk[sdma]         = imx_clk_gate2("sdma",          "ahb",               base + 0x7c, 6); | ||||
| 	clk[spba]         = imx_clk_gate2("spba",          "ipg",               base + 0x7c, 12); | ||||
|  |  | |||
|  | @ -38,7 +38,7 @@ | |||
| #include <asm/mach-types.h> | ||||
| #include <asm/mach/arch.h> | ||||
| #include <asm/mach/time.h> | ||||
| #include <asm/system.h> | ||||
| #include <asm/system_info.h> | ||||
| #include <mach/common.h> | ||||
| #include <mach/iomux-mx27.h> | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,29 +0,0 @@ | |||
| #ifndef __ASM_MACH_GPIO_PXA_H | ||||
| #define __ASM_MACH_GPIO_PXA_H | ||||
| 
 | ||||
| #include <mach/addr-map.h> | ||||
| #include <mach/cputype.h> | ||||
| #include <mach/irqs.h> | ||||
| 
 | ||||
| #define GPIO_REGS_VIRT	(APB_VIRT_BASE + 0x19000) | ||||
| 
 | ||||
| #define BANK_OFF(n)	(((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2)) | ||||
| #define GPIO_REG(x)	(*(volatile u32 *)(GPIO_REGS_VIRT + (x))) | ||||
| 
 | ||||
| #define gpio_to_bank(gpio)	((gpio) >> 5) | ||||
| 
 | ||||
| /* NOTE: these macros are defined here to make optimization of
 | ||||
|  * gpio_{get,set}_value() to work when 'gpio' is a constant. | ||||
|  * Usage of these macros otherwise is no longer recommended, | ||||
|  * use generic GPIO API whenever possible. | ||||
|  */ | ||||
| #define GPIO_bit(gpio)	(1 << ((gpio) & 0x1f)) | ||||
| 
 | ||||
| #define GPLR(x)		GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x00) | ||||
| #define GPDR(x)		GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x0c) | ||||
| #define GPSR(x)		GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x18) | ||||
| #define GPCR(x)		GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x24) | ||||
| 
 | ||||
| #include <plat/gpio-pxa.h> | ||||
| 
 | ||||
| #endif /* __ASM_MACH_GPIO_PXA_H */ | ||||
|  | @ -31,5 +31,6 @@ | |||
| #define IRQ_MASK_HIGH_OFF	0x0014 | ||||
| 
 | ||||
| #define TIMER_VIRT_BASE		(BRIDGE_VIRT_BASE | 0x0300) | ||||
| #define TIMER_PHYS_BASE		(BRIDGE_PHYS_BASE | 0x0300) | ||||
| 
 | ||||
| #endif | ||||
|  |  | |||
|  | @ -42,6 +42,7 @@ | |||
| #define MV78XX0_CORE0_REGS_PHYS_BASE	0xf1020000 | ||||
| #define MV78XX0_CORE1_REGS_PHYS_BASE	0xf1024000 | ||||
| #define MV78XX0_CORE_REGS_VIRT_BASE	0xfe400000 | ||||
| #define MV78XX0_CORE_REGS_PHYS_BASE	0xfe400000 | ||||
| #define MV78XX0_CORE_REGS_SIZE		SZ_16K | ||||
| 
 | ||||
| #define MV78XX0_PCIE_IO_PHYS_BASE(i)	(0xf0800000 + ((i) << 20)) | ||||
|  | @ -59,6 +60,7 @@ | |||
|  * Core-specific peripheral registers. | ||||
|  */ | ||||
| #define BRIDGE_VIRT_BASE	(MV78XX0_CORE_REGS_VIRT_BASE) | ||||
| #define BRIDGE_PHYS_BASE	(MV78XX0_CORE_REGS_PHYS_BASE) | ||||
| 
 | ||||
| /*
 | ||||
|  * Register Map | ||||
|  |  | |||
|  | @ -205,6 +205,16 @@ static int apx4devkit_phy_fixup(struct phy_device *phy) | |||
| 	return 0; | ||||
| } | ||||
| 
 | ||||
| static void __init apx4devkit_fec_phy_clk_enable(void) | ||||
| { | ||||
| 	struct clk *clk; | ||||
| 
 | ||||
| 	/* Enable fec phy clock */ | ||||
| 	clk = clk_get_sys("enet_out", NULL); | ||||
| 	if (!IS_ERR(clk)) | ||||
| 		clk_prepare_enable(clk); | ||||
| } | ||||
| 
 | ||||
| static void __init apx4devkit_init(void) | ||||
| { | ||||
| 	mx28_soc_init(); | ||||
|  | @ -225,6 +235,7 @@ static void __init apx4devkit_init(void) | |||
| 	phy_register_fixup_for_uid(PHY_ID_KS8051, MICREL_PHY_ID_MASK, | ||||
| 			apx4devkit_phy_fixup); | ||||
| 
 | ||||
| 	apx4devkit_fec_phy_clk_enable(); | ||||
| 	mx28_add_fec(0, &mx28_fec_pdata); | ||||
| 
 | ||||
| 	mx28_add_mxs_mmc(0, &apx4devkit_mmc_pdata); | ||||
|  |  | |||
|  | @ -97,11 +97,6 @@ __init board_onenand_init(struct mtd_partition *onenand_parts, | |||
| 
 | ||||
| 	gpmc_onenand_init(&board_onenand_data); | ||||
| } | ||||
| #else | ||||
| void | ||||
| __init board_onenand_init(struct mtd_partition *nor_parts, u8 nr_parts, u8 cs) | ||||
| { | ||||
| } | ||||
| #endif /* CONFIG_MTD_ONENAND_OMAP2 || CONFIG_MTD_ONENAND_OMAP2_MODULE */ | ||||
| 
 | ||||
| #if defined(CONFIG_MTD_NAND_OMAP2) || \ | ||||
|  |  | |||
|  | @ -494,8 +494,8 @@ static void __init overo_init(void) | |||
| 
 | ||||
| 	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||||
| 	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | ||||
| 	omap_hsmmc_init(mmc); | ||||
| 	overo_i2c_init(); | ||||
| 	omap_hsmmc_init(mmc); | ||||
| 	omap_display_init(&overo_dss_data); | ||||
| 	omap_serial_init(); | ||||
| 	omap_sdrc_init(mt46h32m32lf6_sdrc_params, | ||||
|  |  | |||
|  | @ -3417,9 +3417,12 @@ int __init omap4xxx_clk_init(void) | |||
| 	if (cpu_is_omap443x()) { | ||||
| 		cpu_mask = RATE_IN_4430; | ||||
| 		cpu_clkflg = CK_443X; | ||||
| 	} else if (cpu_is_omap446x()) { | ||||
| 	} else if (cpu_is_omap446x() || cpu_is_omap447x()) { | ||||
| 		cpu_mask = RATE_IN_4460 | RATE_IN_4430; | ||||
| 		cpu_clkflg = CK_446X | CK_443X; | ||||
| 
 | ||||
| 		if (cpu_is_omap447x()) | ||||
| 			pr_warn("WARNING: OMAP4470 clock data incomplete!\n"); | ||||
| 	} else { | ||||
| 		return 0; | ||||
| 	} | ||||
|  |  | |||
|  | @ -31,12 +31,16 @@ | |||
|  * | ||||
|  * CLKDM_NO_AUTODEPS: Prevent "autodeps" from being added/removed from this | ||||
|  *     clockdomain.  (Currently, this applies to OMAP3 clockdomains only.) | ||||
|  * CLKDM_ACTIVE_WITH_MPU: The PRCM guarantees that this clockdomain is | ||||
|  *     active whenever the MPU is active.  True for interconnects and | ||||
|  *     the WKUP clockdomains. | ||||
|  */ | ||||
| #define CLKDM_CAN_FORCE_SLEEP			(1 << 0) | ||||
| #define CLKDM_CAN_FORCE_WAKEUP			(1 << 1) | ||||
| #define CLKDM_CAN_ENABLE_AUTO			(1 << 2) | ||||
| #define CLKDM_CAN_DISABLE_AUTO			(1 << 3) | ||||
| #define CLKDM_NO_AUTODEPS			(1 << 4) | ||||
| #define CLKDM_ACTIVE_WITH_MPU			(1 << 5) | ||||
| 
 | ||||
| #define CLKDM_CAN_HWSUP		(CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_DISABLE_AUTO) | ||||
| #define CLKDM_CAN_SWSUP		(CLKDM_CAN_FORCE_SLEEP | CLKDM_CAN_FORCE_WAKEUP) | ||||
|  |  | |||
|  | @ -88,4 +88,5 @@ struct clockdomain wkup_common_clkdm = { | |||
| 	.name		= "wkup_clkdm", | ||||
| 	.pwrdm		= { .name = "wkup_pwrdm" }, | ||||
| 	.dep_bit	= OMAP_EN_WKUP_SHIFT, | ||||
| 	.flags		= CLKDM_ACTIVE_WITH_MPU, | ||||
| }; | ||||
|  |  | |||
|  | @ -381,7 +381,7 @@ static struct clockdomain l4_wkup_44xx_clkdm = { | |||
| 	.cm_inst	  = OMAP4430_PRM_WKUP_CM_INST, | ||||
| 	.clkdm_offs	  = OMAP4430_PRM_WKUP_CM_WKUP_CDOFFS, | ||||
| 	.dep_bit	  = OMAP4430_L4WKUP_STATDEP_SHIFT, | ||||
| 	.flags		  = CLKDM_CAN_HWSUP, | ||||
| 	.flags		  = CLKDM_CAN_HWSUP | CLKDM_ACTIVE_WITH_MPU, | ||||
| }; | ||||
| 
 | ||||
| static struct clockdomain emu_sys_44xx_clkdm = { | ||||
|  |  | |||
|  | @ -1124,15 +1124,18 @@ static struct omap_hwmod_addr_space * __init _find_mpu_rt_addr_space(struct omap | |||
|  * _enable_sysc - try to bring a module out of idle via OCP_SYSCONFIG | ||||
|  * @oh: struct omap_hwmod * | ||||
|  * | ||||
|  * If module is marked as SWSUP_SIDLE, force the module out of slave | ||||
|  * idle; otherwise, configure it for smart-idle.  If module is marked | ||||
|  * as SWSUP_MSUSPEND, force the module out of master standby; | ||||
|  * otherwise, configure it for smart-standby.  No return value. | ||||
|  * Ensure that the OCP_SYSCONFIG register for the IP block represented | ||||
|  * by @oh is set to indicate to the PRCM that the IP block is active. | ||||
|  * Usually this means placing the module into smart-idle mode and | ||||
|  * smart-standby, but if there is a bug in the automatic idle handling | ||||
|  * for the IP block, it may need to be placed into the force-idle or | ||||
|  * no-idle variants of these modes.  No return value. | ||||
|  */ | ||||
| static void _enable_sysc(struct omap_hwmod *oh) | ||||
| { | ||||
| 	u8 idlemode, sf; | ||||
| 	u32 v; | ||||
| 	bool clkdm_act; | ||||
| 
 | ||||
| 	if (!oh->class->sysc) | ||||
| 		return; | ||||
|  | @ -1141,8 +1144,16 @@ static void _enable_sysc(struct omap_hwmod *oh) | |||
| 	sf = oh->class->sysc->sysc_flags; | ||||
| 
 | ||||
| 	if (sf & SYSC_HAS_SIDLEMODE) { | ||||
| 		idlemode = (oh->flags & HWMOD_SWSUP_SIDLE) ? | ||||
| 			HWMOD_IDLEMODE_NO : HWMOD_IDLEMODE_SMART; | ||||
| 		clkdm_act = ((oh->clkdm && | ||||
| 			      oh->clkdm->flags & CLKDM_ACTIVE_WITH_MPU) || | ||||
| 			     (oh->_clk && oh->_clk->clkdm && | ||||
| 			      oh->_clk->clkdm->flags & CLKDM_ACTIVE_WITH_MPU)); | ||||
| 		if (clkdm_act && !(oh->class->sysc->idlemodes & | ||||
| 				   (SIDLE_SMART | SIDLE_SMART_WKUP))) | ||||
| 			idlemode = HWMOD_IDLEMODE_FORCE; | ||||
| 		else | ||||
| 			idlemode = (oh->flags & HWMOD_SWSUP_SIDLE) ? | ||||
| 				HWMOD_IDLEMODE_NO : HWMOD_IDLEMODE_SMART; | ||||
| 		_set_slave_idlemode(oh, idlemode, &v); | ||||
| 	} | ||||
| 
 | ||||
|  | @ -1208,8 +1219,13 @@ static void _idle_sysc(struct omap_hwmod *oh) | |||
| 	sf = oh->class->sysc->sysc_flags; | ||||
| 
 | ||||
| 	if (sf & SYSC_HAS_SIDLEMODE) { | ||||
| 		idlemode = (oh->flags & HWMOD_SWSUP_SIDLE) ? | ||||
| 			HWMOD_IDLEMODE_FORCE : HWMOD_IDLEMODE_SMART; | ||||
| 		/* XXX What about HWMOD_IDLEMODE_SMART_WKUP? */ | ||||
| 		if (oh->flags & HWMOD_SWSUP_SIDLE || | ||||
| 		    !(oh->class->sysc->idlemodes & | ||||
| 		      (SIDLE_SMART | SIDLE_SMART_WKUP))) | ||||
| 			idlemode = HWMOD_IDLEMODE_FORCE; | ||||
| 		else | ||||
| 			idlemode = HWMOD_IDLEMODE_SMART; | ||||
| 		_set_slave_idlemode(oh, idlemode, &v); | ||||
| 	} | ||||
| 
 | ||||
|  |  | |||
|  | @ -1928,7 +1928,7 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp1_sdma_reqs[] = { | |||
| 
 | ||||
| static struct omap_hwmod_opt_clk mcbsp1_opt_clks[] = { | ||||
| 	{ .role = "pad_fck", .clk = "pad_clks_ck" }, | ||||
| 	{ .role = "prcm_clk", .clk = "mcbsp1_sync_mux_ck" }, | ||||
| 	{ .role = "prcm_fck", .clk = "mcbsp1_sync_mux_ck" }, | ||||
| }; | ||||
| 
 | ||||
| static struct omap_hwmod omap44xx_mcbsp1_hwmod = { | ||||
|  | @ -1963,7 +1963,7 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp2_sdma_reqs[] = { | |||
| 
 | ||||
| static struct omap_hwmod_opt_clk mcbsp2_opt_clks[] = { | ||||
| 	{ .role = "pad_fck", .clk = "pad_clks_ck" }, | ||||
| 	{ .role = "prcm_clk", .clk = "mcbsp2_sync_mux_ck" }, | ||||
| 	{ .role = "prcm_fck", .clk = "mcbsp2_sync_mux_ck" }, | ||||
| }; | ||||
| 
 | ||||
| static struct omap_hwmod omap44xx_mcbsp2_hwmod = { | ||||
|  | @ -1998,7 +1998,7 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp3_sdma_reqs[] = { | |||
| 
 | ||||
| static struct omap_hwmod_opt_clk mcbsp3_opt_clks[] = { | ||||
| 	{ .role = "pad_fck", .clk = "pad_clks_ck" }, | ||||
| 	{ .role = "prcm_clk", .clk = "mcbsp3_sync_mux_ck" }, | ||||
| 	{ .role = "prcm_fck", .clk = "mcbsp3_sync_mux_ck" }, | ||||
| }; | ||||
| 
 | ||||
| static struct omap_hwmod omap44xx_mcbsp3_hwmod = { | ||||
|  | @ -2033,7 +2033,7 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp4_sdma_reqs[] = { | |||
| 
 | ||||
| static struct omap_hwmod_opt_clk mcbsp4_opt_clks[] = { | ||||
| 	{ .role = "pad_fck", .clk = "pad_clks_ck" }, | ||||
| 	{ .role = "prcm_clk", .clk = "mcbsp4_sync_mux_ck" }, | ||||
| 	{ .role = "prcm_fck", .clk = "mcbsp4_sync_mux_ck" }, | ||||
| }; | ||||
| 
 | ||||
| static struct omap_hwmod omap44xx_mcbsp4_hwmod = { | ||||
|  | @ -3864,7 +3864,7 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_2 = { | |||
| }; | ||||
| 
 | ||||
| /* usb_host_fs -> l3_main_2 */ | ||||
| static struct omap_hwmod_ocp_if omap44xx_usb_host_fs__l3_main_2 = { | ||||
| static struct omap_hwmod_ocp_if __maybe_unused omap44xx_usb_host_fs__l3_main_2 = { | ||||
| 	.master		= &omap44xx_usb_host_fs_hwmod, | ||||
| 	.slave		= &omap44xx_l3_main_2_hwmod, | ||||
| 	.clk		= "l3_div_ck", | ||||
|  | @ -3922,7 +3922,7 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_3 = { | |||
| }; | ||||
| 
 | ||||
| /* aess -> l4_abe */ | ||||
| static struct omap_hwmod_ocp_if omap44xx_aess__l4_abe = { | ||||
| static struct omap_hwmod_ocp_if __maybe_unused omap44xx_aess__l4_abe = { | ||||
| 	.master		= &omap44xx_aess_hwmod, | ||||
| 	.slave		= &omap44xx_l4_abe_hwmod, | ||||
| 	.clk		= "ocp_abe_iclk", | ||||
|  | @ -4013,7 +4013,7 @@ static struct omap_hwmod_addr_space omap44xx_aess_addrs[] = { | |||
| }; | ||||
| 
 | ||||
| /* l4_abe -> aess */ | ||||
| static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess = { | ||||
| static struct omap_hwmod_ocp_if __maybe_unused omap44xx_l4_abe__aess = { | ||||
| 	.master		= &omap44xx_l4_abe_hwmod, | ||||
| 	.slave		= &omap44xx_aess_hwmod, | ||||
| 	.clk		= "ocp_abe_iclk", | ||||
|  | @ -4031,7 +4031,7 @@ static struct omap_hwmod_addr_space omap44xx_aess_dma_addrs[] = { | |||
| }; | ||||
| 
 | ||||
| /* l4_abe -> aess (dma) */ | ||||
| static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess_dma = { | ||||
| static struct omap_hwmod_ocp_if __maybe_unused omap44xx_l4_abe__aess_dma = { | ||||
| 	.master		= &omap44xx_l4_abe_hwmod, | ||||
| 	.slave		= &omap44xx_aess_hwmod, | ||||
| 	.clk		= "ocp_abe_iclk", | ||||
|  | @ -5857,7 +5857,7 @@ static struct omap_hwmod_addr_space omap44xx_usb_host_fs_addrs[] = { | |||
| }; | ||||
| 
 | ||||
| /* l4_cfg -> usb_host_fs */ | ||||
| static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_host_fs = { | ||||
| static struct omap_hwmod_ocp_if __maybe_unused omap44xx_l4_cfg__usb_host_fs = { | ||||
| 	.master		= &omap44xx_l4_cfg_hwmod, | ||||
| 	.slave		= &omap44xx_usb_host_fs_hwmod, | ||||
| 	.clk		= "l4_div_ck", | ||||
|  | @ -6014,13 +6014,13 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = { | |||
| 	&omap44xx_iva__l3_main_2, | ||||
| 	&omap44xx_l3_main_1__l3_main_2, | ||||
| 	&omap44xx_l4_cfg__l3_main_2, | ||||
| 	&omap44xx_usb_host_fs__l3_main_2, | ||||
| 	/* &omap44xx_usb_host_fs__l3_main_2, */ | ||||
| 	&omap44xx_usb_host_hs__l3_main_2, | ||||
| 	&omap44xx_usb_otg_hs__l3_main_2, | ||||
| 	&omap44xx_l3_main_1__l3_main_3, | ||||
| 	&omap44xx_l3_main_2__l3_main_3, | ||||
| 	&omap44xx_l4_cfg__l3_main_3, | ||||
| 	&omap44xx_aess__l4_abe, | ||||
| 	/* &omap44xx_aess__l4_abe, */ | ||||
| 	&omap44xx_dsp__l4_abe, | ||||
| 	&omap44xx_l3_main_1__l4_abe, | ||||
| 	&omap44xx_mpu__l4_abe, | ||||
|  | @ -6029,8 +6029,8 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = { | |||
| 	&omap44xx_l4_cfg__l4_wkup, | ||||
| 	&omap44xx_mpu__mpu_private, | ||||
| 	&omap44xx_l4_cfg__ocp_wp_noc, | ||||
| 	&omap44xx_l4_abe__aess, | ||||
| 	&omap44xx_l4_abe__aess_dma, | ||||
| 	/* &omap44xx_l4_abe__aess, */ | ||||
| 	/* &omap44xx_l4_abe__aess_dma, */ | ||||
| 	&omap44xx_l3_main_2__c2c, | ||||
| 	&omap44xx_l4_wkup__counter_32k, | ||||
| 	&omap44xx_l4_cfg__ctrl_module_core, | ||||
|  | @ -6136,7 +6136,7 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = { | |||
| 	&omap44xx_l4_per__uart2, | ||||
| 	&omap44xx_l4_per__uart3, | ||||
| 	&omap44xx_l4_per__uart4, | ||||
| 	&omap44xx_l4_cfg__usb_host_fs, | ||||
| 	/* &omap44xx_l4_cfg__usb_host_fs, */ | ||||
| 	&omap44xx_l4_cfg__usb_host_hs, | ||||
| 	&omap44xx_l4_cfg__usb_otg_hs, | ||||
| 	&omap44xx_l4_cfg__usb_tll_hs, | ||||
|  |  | |||
|  | @ -32,6 +32,7 @@ | |||
| #include "twl-common.h" | ||||
| #include "pm.h" | ||||
| #include "voltage.h" | ||||
| #include "mux.h" | ||||
| 
 | ||||
| static struct i2c_board_info __initdata pmic_i2c_board_info = { | ||||
| 	.addr		= 0x48, | ||||
|  | @ -77,6 +78,7 @@ void __init omap4_pmic_init(const char *pmic_type, | |||
| 		    struct twl6040_platform_data *twl6040_data, int twl6040_irq) | ||||
| { | ||||
| 	/* PMIC part*/ | ||||
| 	omap_mux_init_signal("sys_nirq1", OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE); | ||||
| 	strncpy(omap4_i2c1_board_info[0].type, pmic_type, | ||||
| 		sizeof(omap4_i2c1_board_info[0].type)); | ||||
| 	omap4_i2c1_board_info[0].irq = OMAP44XX_IRQ_SYS_1N; | ||||
|  |  | |||
|  | @ -127,7 +127,11 @@ static unsigned long hx4700_pin_config[] __initdata = { | |||
| 	GPIO19_SSP2_SCLK, | ||||
| 	GPIO86_SSP2_RXD, | ||||
| 	GPIO87_SSP2_TXD, | ||||
| 	GPIO88_GPIO, | ||||
| 	GPIO88_GPIO | MFP_LPM_DRIVE_HIGH,	/* TSC2046_CS */ | ||||
| 
 | ||||
| 	/* BQ24022 Regulator */ | ||||
| 	GPIO72_GPIO | MFP_LPM_KEEP_OUTPUT,	/* BQ24022_nCHARGE_EN */ | ||||
| 	GPIO96_GPIO | MFP_LPM_KEEP_OUTPUT,	/* BQ24022_ISET2 */ | ||||
| 
 | ||||
| 	/* HX4700 specific input GPIOs */ | ||||
| 	GPIO12_GPIO | WAKEUP_ON_EDGE_RISE,	/* ASIC3_IRQ */ | ||||
|  | @ -135,6 +139,10 @@ static unsigned long hx4700_pin_config[] __initdata = { | |||
| 	GPIO14_GPIO,	/* nWLAN_IRQ */ | ||||
| 
 | ||||
| 	/* HX4700 specific output GPIOs */ | ||||
| 	GPIO61_GPIO | MFP_LPM_DRIVE_HIGH,	/* W3220_nRESET */ | ||||
| 	GPIO71_GPIO | MFP_LPM_DRIVE_HIGH,	/* ASIC3_nRESET */ | ||||
| 	GPIO81_GPIO | MFP_LPM_DRIVE_HIGH,	/* CPU_GP_nRESET */ | ||||
| 	GPIO116_GPIO | MFP_LPM_DRIVE_HIGH,	/* CPU_HW_nRESET */ | ||||
| 	GPIO102_GPIO | MFP_LPM_DRIVE_LOW,	/* SYNAPTICS_POWER_ON */ | ||||
| 
 | ||||
| 	GPIO10_GPIO,	/* GSM_IRQ */ | ||||
|  | @ -872,14 +880,19 @@ static struct gpio global_gpios[] = { | |||
| 	{ GPIO110_HX4700_LCD_LVDD_3V3_ON, GPIOF_OUT_INIT_HIGH, "LCD_LVDD" }, | ||||
| 	{ GPIO111_HX4700_LCD_AVDD_3V3_ON, GPIOF_OUT_INIT_HIGH, "LCD_AVDD" }, | ||||
| 	{ GPIO32_HX4700_RS232_ON,         GPIOF_OUT_INIT_HIGH, "RS232_ON" }, | ||||
| 	{ GPIO61_HX4700_W3220_nRESET,     GPIOF_OUT_INIT_HIGH, "W3220_nRESET" }, | ||||
| 	{ GPIO71_HX4700_ASIC3_nRESET,     GPIOF_OUT_INIT_HIGH, "ASIC3_nRESET" }, | ||||
| 	{ GPIO81_HX4700_CPU_GP_nRESET,    GPIOF_OUT_INIT_HIGH, "CPU_GP_nRESET" }, | ||||
| 	{ GPIO82_HX4700_EUART_RESET,      GPIOF_OUT_INIT_HIGH, "EUART_RESET" }, | ||||
| 	{ GPIO116_HX4700_CPU_HW_nRESET,   GPIOF_OUT_INIT_HIGH, "CPU_HW_nRESET" }, | ||||
| }; | ||||
| 
 | ||||
| static void __init hx4700_init(void) | ||||
| { | ||||
| 	int ret; | ||||
| 
 | ||||
| 	PCFR = PCFR_GPR_EN | PCFR_OPDE; | ||||
| 
 | ||||
| 	pxa2xx_mfp_config(ARRAY_AND_SIZE(hx4700_pin_config)); | ||||
| 	gpio_set_wake(GPIO12_HX4700_ASIC3_IRQ, 1); | ||||
| 	ret = gpio_request_array(ARRAY_AND_SIZE(global_gpios)); | ||||
|  |  | |||
|  | @ -779,6 +779,7 @@ DT_MACHINE_START(ARMADILLO800EVA_DT, "armadillo800eva") | |||
| 	.init_irq	= r8a7740_init_irq, | ||||
| 	.handle_irq	= shmobile_handle_irq_intc, | ||||
| 	.init_machine	= eva_init, | ||||
| 	.init_late	= shmobile_init_late, | ||||
| 	.timer		= &shmobile_timer, | ||||
| 	.dt_compat	= eva_boards_compat_dt, | ||||
| MACHINE_END | ||||
|  |  | |||
|  | @ -80,6 +80,7 @@ DT_MACHINE_START(KZM9D_DT, "kzm9d") | |||
| 	.init_irq	= emev2_init_irq, | ||||
| 	.handle_irq	= gic_handle_irq, | ||||
| 	.init_machine	= kzm9d_add_standard_devices, | ||||
| 	.init_late	= shmobile_init_late, | ||||
| 	.timer		= &shmobile_timer, | ||||
| 	.dt_compat	= kzm9d_boards_compat_dt, | ||||
| MACHINE_END | ||||
|  |  | |||
|  | @ -455,6 +455,7 @@ DT_MACHINE_START(KZM9G_DT, "kzm9g") | |||
| 	.init_irq	= sh73a0_init_irq, | ||||
| 	.handle_irq	= gic_handle_irq, | ||||
| 	.init_machine	= kzm_init, | ||||
| 	.init_late	= shmobile_init_late, | ||||
| 	.timer		= &shmobile_timer, | ||||
| 	.dt_compat	= kzm9g_boards_compat_dt, | ||||
| MACHINE_END | ||||
|  |  | |||
|  | @ -1512,6 +1512,9 @@ static void __init mackerel_init(void) | |||
| 	gpio_request(GPIO_FN_SDHID0_1, NULL); | ||||
| 	gpio_request(GPIO_FN_SDHID0_0, NULL); | ||||
| 
 | ||||
| 	/* SDHI0 PORT172 card-detect IRQ26 */ | ||||
| 	gpio_request(GPIO_FN_IRQ26_172, NULL); | ||||
| 
 | ||||
| #if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) | ||||
| 	/* enable SDHI1 */ | ||||
| 	gpio_request(GPIO_FN_SDHICMD1, NULL); | ||||
|  |  | |||
|  | @ -475,9 +475,9 @@ static struct clk *late_main_clks[] = { | |||
| 
 | ||||
| enum { MSTP001, | ||||
| 	MSTP129, MSTP128, MSTP127, MSTP126, MSTP125, MSTP118, MSTP116, MSTP100, | ||||
| 	MSTP219, | ||||
| 	MSTP219, MSTP218, | ||||
| 	MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200, | ||||
| 	MSTP331, MSTP329, MSTP325, MSTP323, MSTP318, | ||||
| 	MSTP331, MSTP329, MSTP325, MSTP323, | ||||
| 	MSTP314, MSTP313, MSTP312, MSTP311, | ||||
| 	MSTP303, MSTP302, MSTP301, MSTP300, | ||||
| 	MSTP411, MSTP410, MSTP403, | ||||
|  | @ -497,6 +497,7 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
| 	[MSTP116] = MSTP(&div4_clks[DIV4_HP], SMSTPCR1, 16, 0), /* IIC0 */ | ||||
| 	[MSTP100] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 0, 0), /* LCDC0 */ | ||||
| 	[MSTP219] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 19, 0), /* SCIFA7 */ | ||||
| 	[MSTP218] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 18, 0), /* SY-DMAC */ | ||||
| 	[MSTP207] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 7, 0), /* SCIFA5 */ | ||||
| 	[MSTP206] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 6, 0), /* SCIFB */ | ||||
| 	[MSTP204] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 4, 0), /* SCIFA0 */ | ||||
|  | @ -508,7 +509,6 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
| 	[MSTP329] = MSTP(&r_clk, SMSTPCR3, 29, 0), /* CMT10 */ | ||||
| 	[MSTP325] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 25, 0), /* IrDA */ | ||||
| 	[MSTP323] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 23, 0), /* IIC1 */ | ||||
| 	[MSTP318] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 18, 0), /* SY-DMAC */ | ||||
| 	[MSTP314] = MSTP(&div6_clks[DIV6_SDHI0], SMSTPCR3, 14, 0), /* SDHI0 */ | ||||
| 	[MSTP313] = MSTP(&div6_clks[DIV6_SDHI1], SMSTPCR3, 13, 0), /* SDHI1 */ | ||||
| 	[MSTP312] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 12, 0), /* MMCIF0 */ | ||||
|  | @ -552,6 +552,7 @@ static struct clk_lookup lookups[] = { | |||
| 	CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* I2C0 */ | ||||
| 	CLKDEV_DEV_ID("sh_mobile_lcdc_fb.0", &mstp_clks[MSTP100]), /* LCDC0 */ | ||||
| 	CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP219]), /* SCIFA7 */ | ||||
| 	CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]), /* SY-DMAC */ | ||||
| 	CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */ | ||||
| 	CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP206]), /* SCIFB */ | ||||
| 	CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */ | ||||
|  | @ -563,7 +564,6 @@ static struct clk_lookup lookups[] = { | |||
| 	CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), /* CMT10 */ | ||||
| 	CLKDEV_DEV_ID("sh_irda.0", &mstp_clks[MSTP325]), /* IrDA */ | ||||
| 	CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* I2C1 */ | ||||
| 	CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP318]), /* SY-DMAC */ | ||||
| 	CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), /* SDHI0 */ | ||||
| 	CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), /* SDHI1 */ | ||||
| 	CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMCIF0 */ | ||||
|  |  | |||
|  | @ -35,6 +35,9 @@ | |||
| #define INT2SMSKCR3 0xfe7822ac | ||||
| #define INT2SMSKCR4 0xfe7822b0 | ||||
| 
 | ||||
| #define INT2NTSR0 0xfe700060 | ||||
| #define INT2NTSR1 0xfe700064 | ||||
| 
 | ||||
| static int r8a7779_set_wake(struct irq_data *data, unsigned int on) | ||||
| { | ||||
| 	return 0; /* always allow wakeup */ | ||||
|  | @ -49,6 +52,10 @@ void __init r8a7779_init_irq(void) | |||
| 	gic_init(0, 29, gic_dist_base, gic_cpu_base); | ||||
| 	gic_arch_extn.irq_set_wake = r8a7779_set_wake; | ||||
| 
 | ||||
| 	/* route all interrupts to ARM */ | ||||
| 	__raw_writel(0xffffffff, INT2NTSR0); | ||||
| 	__raw_writel(0x3fffffff, INT2NTSR1); | ||||
| 
 | ||||
| 	/* unmask all known interrupts in INTCS2 */ | ||||
| 	__raw_writel(0xfffffff0, INT2SMSKCR0); | ||||
| 	__raw_writel(0xfff7ffff, INT2SMSKCR1); | ||||
|  |  | |||
|  | @ -22,10 +22,20 @@ | |||
| #include <mach/common.h> | ||||
| #include <mach/emev2.h> | ||||
| 
 | ||||
| #ifdef CONFIG_ARCH_SH73A0 | ||||
| #define is_sh73a0() (machine_is_ag5evm() || machine_is_kota2() || \ | ||||
| 			of_machine_is_compatible("renesas,sh73a0")) | ||||
| #else | ||||
| #define is_sh73a0() (0) | ||||
| #endif | ||||
| 
 | ||||
| #define is_r8a7779() machine_is_marzen() | ||||
| 
 | ||||
| #ifdef CONFIG_ARCH_EMEV2 | ||||
| #define is_emev2() of_machine_is_compatible("renesas,emev2") | ||||
| #else | ||||
| #define is_emev2() (0) | ||||
| #endif | ||||
| 
 | ||||
| static unsigned int __init shmobile_smp_get_core_count(void) | ||||
| { | ||||
|  |  | |||
|  | @ -484,7 +484,7 @@ static const struct sh_dmae_slave_config sh7372_dmae_slaves[] = { | |||
| 	}, | ||||
| }; | ||||
| 
 | ||||
| #define SH7372_CHCLR 0x220 | ||||
| #define SH7372_CHCLR (0x220 - 0x20) | ||||
| 
 | ||||
| static const struct sh_dmae_channel sh7372_dmae_channels[] = { | ||||
| 	{ | ||||
|  |  | |||
|  | @ -625,11 +625,6 @@ static struct platform_device *snowball_platform_devs[] __initdata = { | |||
| 	&ab8500_device, | ||||
| }; | ||||
| 
 | ||||
| static struct platform_device *snowball_of_platform_devs[] __initdata = { | ||||
| 	&snowball_led_dev, | ||||
| 	&snowball_key_dev, | ||||
| }; | ||||
| 
 | ||||
| static void __init mop500_init_machine(void) | ||||
| { | ||||
| 	struct device *parent = NULL; | ||||
|  | @ -769,6 +764,11 @@ MACHINE_END | |||
| 
 | ||||
| #ifdef CONFIG_MACH_UX500_DT | ||||
| 
 | ||||
| static struct platform_device *snowball_of_platform_devs[] __initdata = { | ||||
| 	&snowball_led_dev, | ||||
| 	&snowball_key_dev, | ||||
| }; | ||||
| 
 | ||||
| struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { | ||||
| 	/* Requires DMA and call-back bindings. */ | ||||
| 	OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", &uart0_plat), | ||||
|  | @ -786,6 +786,8 @@ struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { | |||
| 	OF_DEV_AUXDATA("st,nomadik-gpio", 0x8011e000, "gpio.6", NULL), | ||||
| 	OF_DEV_AUXDATA("st,nomadik-gpio", 0x8011e080, "gpio.7", NULL), | ||||
| 	OF_DEV_AUXDATA("st,nomadik-gpio", 0xa03fe000, "gpio.8", NULL), | ||||
| 	/* Requires device name bindings. */ | ||||
| 	OF_DEV_AUXDATA("stericsson,nmk_pinctrl", 0, "pinctrl-db8500", NULL), | ||||
| 	{}, | ||||
| }; | ||||
| 
 | ||||
|  |  | |||
|  | @ -63,8 +63,10 @@ static void __init ux500_timer_init(void) | |||
| 
 | ||||
| 	/* TODO: Once MTU has been DT:ed place code above into else. */ | ||||
| 	if (of_have_populated_dt()) { | ||||
| #ifdef CONFIG_OF | ||||
| 		np = of_find_matching_node(NULL, prcmu_timer_of_match); | ||||
| 		if (!np) | ||||
| #endif | ||||
| 			goto dt_fail; | ||||
| 
 | ||||
| 		tmp_base = of_iomap(np, 0); | ||||
|  |  | |||
|  | @ -339,7 +339,6 @@ void __init pci_versatile_preinit(void) | |||
| static int __init versatile_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | ||||
| { | ||||
| 	int irq; | ||||
| 	int devslot = PCI_SLOT(dev->devfn); | ||||
| 
 | ||||
| 	/* slot,  pin,	irq
 | ||||
| 	 *  24     1     27 | ||||
|  |  | |||
|  | @ -1067,7 +1067,7 @@ static struct page **__iommu_alloc_buffer(struct device *dev, size_t size, gfp_t | |||
| 		return NULL; | ||||
| 
 | ||||
| 	while (count) { | ||||
| 		int j, order = __ffs(count); | ||||
| 		int j, order = __fls(count); | ||||
| 
 | ||||
| 		pages[i] = alloc_pages(gfp | __GFP_NOWARN, order); | ||||
| 		while (!pages[i] && order) | ||||
|  |  | |||
|  | @ -64,7 +64,7 @@ extern void __flush_dcache_page(struct address_space *mapping, struct page *page | |||
| #ifdef CONFIG_ZONE_DMA | ||||
| extern phys_addr_t arm_dma_limit; | ||||
| #else | ||||
| #define arm_dma_limit ((u32)~0) | ||||
| #define arm_dma_limit ((phys_addr_t)~0) | ||||
| #endif | ||||
| 
 | ||||
| extern phys_addr_t arm_lowmem_limit; | ||||
|  |  | |||
|  | @ -791,6 +791,79 @@ void __init iotable_init(struct map_desc *io_desc, int nr) | |||
| 	} | ||||
| } | ||||
| 
 | ||||
| #ifndef CONFIG_ARM_LPAE | ||||
| 
 | ||||
| /*
 | ||||
|  * The Linux PMD is made of two consecutive section entries covering 2MB | ||||
|  * (see definition in include/asm/pgtable-2level.h).  However a call to | ||||
|  * create_mapping() may optimize static mappings by using individual | ||||
|  * 1MB section mappings.  This leaves the actual PMD potentially half | ||||
|  * initialized if the top or bottom section entry isn't used, leaving it | ||||
|  * open to problems if a subsequent ioremap() or vmalloc() tries to use | ||||
|  * the virtual space left free by that unused section entry. | ||||
|  * | ||||
|  * Let's avoid the issue by inserting dummy vm entries covering the unused | ||||
|  * PMD halves once the static mappings are in place. | ||||
|  */ | ||||
| 
 | ||||
| static void __init pmd_empty_section_gap(unsigned long addr) | ||||
| { | ||||
| 	struct vm_struct *vm; | ||||
| 
 | ||||
| 	vm = early_alloc_aligned(sizeof(*vm), __alignof__(*vm)); | ||||
| 	vm->addr = (void *)addr; | ||||
| 	vm->size = SECTION_SIZE; | ||||
| 	vm->flags = VM_IOREMAP | VM_ARM_STATIC_MAPPING; | ||||
| 	vm->caller = pmd_empty_section_gap; | ||||
| 	vm_area_add_early(vm); | ||||
| } | ||||
| 
 | ||||
| static void __init fill_pmd_gaps(void) | ||||
| { | ||||
| 	struct vm_struct *vm; | ||||
| 	unsigned long addr, next = 0; | ||||
| 	pmd_t *pmd; | ||||
| 
 | ||||
| 	/* we're still single threaded hence no lock needed here */ | ||||
| 	for (vm = vmlist; vm; vm = vm->next) { | ||||
| 		if (!(vm->flags & VM_ARM_STATIC_MAPPING)) | ||||
| 			continue; | ||||
| 		addr = (unsigned long)vm->addr; | ||||
| 		if (addr < next) | ||||
| 			continue; | ||||
| 
 | ||||
| 		/*
 | ||||
| 		 * Check if this vm starts on an odd section boundary. | ||||
| 		 * If so and the first section entry for this PMD is free | ||||
| 		 * then we block the corresponding virtual address. | ||||
| 		 */ | ||||
| 		if ((addr & ~PMD_MASK) == SECTION_SIZE) { | ||||
| 			pmd = pmd_off_k(addr); | ||||
| 			if (pmd_none(*pmd)) | ||||
| 				pmd_empty_section_gap(addr & PMD_MASK); | ||||
| 		} | ||||
| 
 | ||||
| 		/*
 | ||||
| 		 * Then check if this vm ends on an odd section boundary. | ||||
| 		 * If so and the second section entry for this PMD is empty | ||||
| 		 * then we block the corresponding virtual address. | ||||
| 		 */ | ||||
| 		addr += vm->size; | ||||
| 		if ((addr & ~PMD_MASK) == SECTION_SIZE) { | ||||
| 			pmd = pmd_off_k(addr) + 1; | ||||
| 			if (pmd_none(*pmd)) | ||||
| 				pmd_empty_section_gap(addr); | ||||
| 		} | ||||
| 
 | ||||
| 		/* no need to look at any vm entry until we hit the next PMD */ | ||||
| 		next = (addr + PMD_SIZE - 1) & PMD_MASK; | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| #else | ||||
| #define fill_pmd_gaps() do { } while (0) | ||||
| #endif | ||||
| 
 | ||||
| static void * __initdata vmalloc_min = | ||||
| 	(void *)(VMALLOC_END - (240 << 20) - VMALLOC_OFFSET); | ||||
| 
 | ||||
|  | @ -1072,6 +1145,7 @@ static void __init devicemaps_init(struct machine_desc *mdesc) | |||
| 	 */ | ||||
| 	if (mdesc->map_io) | ||||
| 		mdesc->map_io(); | ||||
| 	fill_pmd_gaps(); | ||||
| 
 | ||||
| 	/*
 | ||||
| 	 * Finally flush the caches and tlb to ensure that we're in a | ||||
|  |  | |||
|  | @ -23,6 +23,7 @@ | |||
| #ifndef __MACH_MX2_CAM_H_ | ||||
| #define __MACH_MX2_CAM_H_ | ||||
| 
 | ||||
| #define MX2_CAMERA_SWAP16		(1 << 0) | ||||
| #define MX2_CAMERA_EXT_VSYNC		(1 << 1) | ||||
| #define MX2_CAMERA_CCIR			(1 << 2) | ||||
| #define MX2_CAMERA_CCIR_INTERLACE	(1 << 3) | ||||
|  | @ -30,6 +31,7 @@ | |||
| #define MX2_CAMERA_GATED_CLOCK		(1 << 5) | ||||
| #define MX2_CAMERA_INV_DATA		(1 << 6) | ||||
| #define MX2_CAMERA_PCLK_SAMPLE_RISING	(1 << 7) | ||||
| #define MX2_CAMERA_PACK_DIR_MSB		(1 << 8) | ||||
| 
 | ||||
| /**
 | ||||
|  * struct mx2_camera_platform_data - optional platform data for mx2_camera | ||||
|  |  | |||
|  | @ -22,7 +22,7 @@ | |||
| #define S3C24XX_VA_WATCHDOG	S3C_VA_WATCHDOG | ||||
| 
 | ||||
| #define S3C2412_VA_SSMC		S3C_ADDR_CPU(0x00000000) | ||||
| #define S3C2412_VA_EBI		S3C_ADDR_CPU(0x00010000) | ||||
| #define S3C2412_VA_EBI		S3C_ADDR_CPU(0x00100000) | ||||
| 
 | ||||
| #define S3C2410_PA_UART		(0x50000000) | ||||
| #define S3C24XX_PA_UART		S3C2410_PA_UART | ||||
|  |  | |||
|  | @ -25,7 +25,7 @@ static inline void arch_wdt_reset(void) | |||
| 
 | ||||
| 	__raw_writel(0, S3C2410_WTCON);	  /* disable watchdog, to be safe  */ | ||||
| 
 | ||||
| 	if (s3c2410_wdtclk) | ||||
| 	if (!IS_ERR(s3c2410_wdtclk)) | ||||
| 		clk_enable(s3c2410_wdtclk); | ||||
| 
 | ||||
| 	/* put initial values into count and data */ | ||||
|  |  | |||
|  | @ -70,4 +70,7 @@ extern int is_in_rom(unsigned long); | |||
| #define	VMALLOC_END	0xffffffff | ||||
| 
 | ||||
| #define arch_enter_lazy_cpu_mode()    do {} while (0) | ||||
| 
 | ||||
| #include <asm-generic/pgtable.h> | ||||
| 
 | ||||
| #endif /* _H8300_PGTABLE_H */ | ||||
|  |  | |||
|  | @ -100,7 +100,6 @@ extern int __put_user_bad(void); | |||
| 	break;							\ | ||||
|     default:							\ | ||||
| 	__gu_err = __get_user_bad();				\ | ||||
| 	__gu_val = 0;						\ | ||||
| 	break;							\ | ||||
|     }								\ | ||||
|     (x) = __gu_val;						\ | ||||
|  | @ -159,4 +158,6 @@ clear_user(void *to, unsigned long n) | |||
| 	return 0; | ||||
| } | ||||
| 
 | ||||
| #define __clear_user	clear_user | ||||
| 
 | ||||
| #endif /* _H8300_UACCESS_H */ | ||||
|  |  | |||
|  | @ -447,7 +447,7 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, | |||
|  * want to handle. Thus you cannot kill init even with a SIGKILL even by | ||||
|  * mistake. | ||||
|  */ | ||||
| statis void do_signal(struct pt_regs *regs) | ||||
| static void do_signal(struct pt_regs *regs) | ||||
| { | ||||
| 	siginfo_t info; | ||||
| 	int signr; | ||||
|  |  | |||
|  | @ -27,6 +27,7 @@ | |||
| #include <linux/profile.h> | ||||
| 
 | ||||
| #include <asm/io.h> | ||||
| #include <asm/irq_regs.h> | ||||
| #include <asm/timer.h> | ||||
| 
 | ||||
| #define	TICK_SIZE (tick_nsec / 1000) | ||||
|  |  | |||
|  | @ -42,4 +42,11 @@ unsigned long clk_get_rate(struct clk *clk) | |||
| 	return MCF_CLK; | ||||
| } | ||||
| EXPORT_SYMBOL(clk_get_rate); | ||||
| 
 | ||||
| struct clk *devm_clk_get(struct device *dev, const char *id) | ||||
| { | ||||
| 	return NULL; | ||||
| } | ||||
| EXPORT_SYMBOL(devm_clk_get); | ||||
| 
 | ||||
| /***************************************************************************/ | ||||
|  |  | |||
|  | @ -129,7 +129,7 @@ static int __devinit ltq_pci_startup(struct platform_device *pdev) | |||
| 
 | ||||
| 	/* setup reset gpio used by pci */ | ||||
| 	reset_gpio = of_get_named_gpio(node, "gpio-reset", 0); | ||||
| 	if (reset_gpio > 0) | ||||
| 	if (gpio_is_valid(reset_gpio)) | ||||
| 		devm_gpio_request(&pdev->dev, reset_gpio, "pci-reset"); | ||||
| 
 | ||||
| 	/* enable auto-switching between PCI and EBU */ | ||||
|  | @ -192,7 +192,7 @@ static int __devinit ltq_pci_startup(struct platform_device *pdev) | |||
| 	ltq_ebu_w32(ltq_ebu_r32(LTQ_EBU_PCC_IEN) | 0x10, LTQ_EBU_PCC_IEN); | ||||
| 
 | ||||
| 	/* toggle reset pin */ | ||||
| 	if (reset_gpio > 0) { | ||||
| 	if (gpio_is_valid(reset_gpio)) { | ||||
| 		__gpio_set_value(reset_gpio, 0); | ||||
| 		wmb(); | ||||
| 		mdelay(1); | ||||
|  |  | |||
|  | @ -81,9 +81,6 @@ struct pt_regs { | |||
| #define PTRACE_GETFPREGS          14 | ||||
| #define PTRACE_SETFPREGS          15 | ||||
| 
 | ||||
| /* options set using PTRACE_SETOPTIONS */ | ||||
| #define PTRACE_O_TRACESYSGOOD     0x00000001 | ||||
| 
 | ||||
| #ifdef __KERNEL__ | ||||
| 
 | ||||
| #define user_mode(regs)			(((regs)->epsw & EPSW_nSL) == EPSW_nSL) | ||||
|  |  | |||
|  | @ -123,7 +123,7 @@ static inline unsigned long current_stack_pointer(void) | |||
| } | ||||
| 
 | ||||
| #ifndef CONFIG_KGDB | ||||
| void arch_release_thread_info(struct thread_info *ti) | ||||
| void arch_release_thread_info(struct thread_info *ti); | ||||
| #endif | ||||
| #define get_thread_info(ti)	get_task_struct((ti)->task) | ||||
| #define put_thread_info(ti)	put_task_struct((ti)->task) | ||||
|  |  | |||
|  | @ -11,7 +11,6 @@ | |||
| #ifndef _ASM_TIMEX_H | ||||
| #define _ASM_TIMEX_H | ||||
| 
 | ||||
| #include <asm/hardirq.h> | ||||
| #include <unit/timex.h> | ||||
| 
 | ||||
| #define TICK_SIZE (tick_nsec / 1000) | ||||
|  | @ -30,16 +29,6 @@ static inline cycles_t get_cycles(void) | |||
| extern int init_clockevents(void); | ||||
| extern int init_clocksource(void); | ||||
| 
 | ||||
| static inline void setup_jiffies_interrupt(int irq, | ||||
| 					   struct irqaction *action) | ||||
| { | ||||
| 	u16 tmp; | ||||
| 	setup_irq(irq, action); | ||||
| 	set_intr_level(irq, NUM2GxICR_LEVEL(CONFIG_TIMER_IRQ_LEVEL)); | ||||
| 	GxICR(irq) |= GxICR_ENABLE | GxICR_DETECT | GxICR_REQUEST; | ||||
| 	tmp = GxICR(irq); | ||||
| } | ||||
| 
 | ||||
| #endif /* __KERNEL__ */ | ||||
| 
 | ||||
| #endif /* _ASM_TIMEX_H */ | ||||
|  |  | |||
|  | @ -70,6 +70,16 @@ static void event_handler(struct clock_event_device *dev) | |||
| { | ||||
| } | ||||
| 
 | ||||
| static inline void setup_jiffies_interrupt(int irq, | ||||
| 					   struct irqaction *action) | ||||
| { | ||||
| 	u16 tmp; | ||||
| 	setup_irq(irq, action); | ||||
| 	set_intr_level(irq, NUM2GxICR_LEVEL(CONFIG_TIMER_IRQ_LEVEL)); | ||||
| 	GxICR(irq) |= GxICR_ENABLE | GxICR_DETECT | GxICR_REQUEST; | ||||
| 	tmp = GxICR(irq); | ||||
| } | ||||
| 
 | ||||
| int __init init_clockevents(void) | ||||
| { | ||||
| 	struct clock_event_device *cd; | ||||
|  |  | |||
|  | @ -9,6 +9,8 @@ | |||
|  * 2 of the Licence, or (at your option) any later version. | ||||
|  */ | ||||
| 
 | ||||
| #include <linux/irqreturn.h> | ||||
| 
 | ||||
| struct clocksource; | ||||
| struct clock_event_device; | ||||
| 
 | ||||
|  |  | |||
|  | @ -170,9 +170,9 @@ mn10300_cpupic_setaffinity(struct irq_data *d, const struct cpumask *mask, | |||
| 	case SC1TXIRQ: | ||||
| #ifdef CONFIG_MN10300_TTYSM1_TIMER12 | ||||
| 	case TM12IRQ: | ||||
| #elif CONFIG_MN10300_TTYSM1_TIMER9 | ||||
| #elif defined(CONFIG_MN10300_TTYSM1_TIMER9) | ||||
| 	case TM9IRQ: | ||||
| #elif CONFIG_MN10300_TTYSM1_TIMER3 | ||||
| #elif defined(CONFIG_MN10300_TTYSM1_TIMER3) | ||||
| 	case TM3IRQ: | ||||
| #endif /* CONFIG_MN10300_TTYSM1_TIMER12 */ | ||||
| #endif /* CONFIG_MN10300_TTYSM1 */ | ||||
|  |  | |||
|  | @ -26,6 +26,7 @@ | |||
| #include <linux/kdebug.h> | ||||
| #include <linux/bug.h> | ||||
| #include <linux/irq.h> | ||||
| #include <linux/export.h> | ||||
| #include <asm/processor.h> | ||||
| #include <linux/uaccess.h> | ||||
| #include <asm/io.h> | ||||
|  |  | |||
|  | @ -15,6 +15,7 @@ | |||
| #include <linux/string.h> | ||||
| #include <linux/pci.h> | ||||
| #include <linux/gfp.h> | ||||
| #include <linux/export.h> | ||||
| #include <asm/io.h> | ||||
| 
 | ||||
| static unsigned long pci_sram_allocated = 0xbc000000; | ||||
|  |  | |||
|  | @ -11,10 +11,6 @@ | |||
| #ifndef _ASM_UNIT_TIMEX_H | ||||
| #define _ASM_UNIT_TIMEX_H | ||||
| 
 | ||||
| #ifndef __ASSEMBLY__ | ||||
| #include <linux/irq.h> | ||||
| #endif /* __ASSEMBLY__ */ | ||||
| 
 | ||||
| #include <asm/timer-regs.h> | ||||
| #include <unit/clock.h> | ||||
| #include <asm/param.h> | ||||
|  |  | |||
|  | @ -15,6 +15,7 @@ | |||
| #include <linux/platform_device.h> | ||||
| 
 | ||||
| #include <asm/io.h> | ||||
| #include <asm/irq.h> | ||||
| #include <asm/timex.h> | ||||
| #include <asm/processor.h> | ||||
| #include <asm/intctl-regs.h> | ||||
|  |  | |||
|  | @ -11,10 +11,6 @@ | |||
| #ifndef _ASM_UNIT_TIMEX_H | ||||
| #define _ASM_UNIT_TIMEX_H | ||||
| 
 | ||||
| #ifndef __ASSEMBLY__ | ||||
| #include <linux/irq.h> | ||||
| #endif /* __ASSEMBLY__ */ | ||||
| 
 | ||||
| #include <asm/timer-regs.h> | ||||
| #include <unit/clock.h> | ||||
| #include <asm/param.h> | ||||
|  |  | |||
|  | @ -13,6 +13,7 @@ | |||
| #include <linux/init.h> | ||||
| #include <linux/pci.h> | ||||
| #include <asm/io.h> | ||||
| #include <asm/irq.h> | ||||
| #include <asm/setup.h> | ||||
| #include <asm/processor.h> | ||||
| #include <asm/intctl-regs.h> | ||||
|  |  | |||
|  | @ -11,10 +11,6 @@ | |||
| #ifndef _ASM_UNIT_TIMEX_H | ||||
| #define _ASM_UNIT_TIMEX_H | ||||
| 
 | ||||
| #ifndef __ASSEMBLY__ | ||||
| #include <linux/irq.h> | ||||
| #endif /* __ASSEMBLY__ */ | ||||
| 
 | ||||
| #include <asm/timer-regs.h> | ||||
| #include <unit/clock.h> | ||||
| #include <asm/param.h> | ||||
|  |  | |||
|  | @ -86,8 +86,8 @@ static inline bool arch_irqs_disabled(void) | |||
| } | ||||
| 
 | ||||
| #ifdef CONFIG_PPC_BOOK3E | ||||
| #define __hard_irq_enable()	asm volatile("wrteei 1" : : : "memory"); | ||||
| #define __hard_irq_disable()	asm volatile("wrteei 0" : : : "memory"); | ||||
| #define __hard_irq_enable()	asm volatile("wrteei 1" : : : "memory") | ||||
| #define __hard_irq_disable()	asm volatile("wrteei 0" : : : "memory") | ||||
| #else | ||||
| #define __hard_irq_enable()	__mtmsrd(local_paca->kernel_msr | MSR_EE, 1) | ||||
| #define __hard_irq_disable()	__mtmsrd(local_paca->kernel_msr, 1) | ||||
|  | @ -103,6 +103,11 @@ static inline void hard_irq_disable(void) | |||
| /* include/linux/interrupt.h needs hard_irq_disable to be a macro */ | ||||
| #define hard_irq_disable	hard_irq_disable | ||||
| 
 | ||||
| static inline bool lazy_irq_pending(void) | ||||
| { | ||||
| 	return !!(get_paca()->irq_happened & ~PACA_IRQ_HARD_DIS); | ||||
| } | ||||
| 
 | ||||
| /*
 | ||||
|  * This is called by asynchronous interrupts to conditionally | ||||
|  * re-enable hard interrupts when soft-disabled after having | ||||
|  | @ -120,6 +125,8 @@ static inline bool arch_irq_disabled_regs(struct pt_regs *regs) | |||
| 	return !regs->softe; | ||||
| } | ||||
| 
 | ||||
| extern bool prep_irq_for_idle(void); | ||||
| 
 | ||||
| #else /* CONFIG_PPC64 */ | ||||
| 
 | ||||
| #define SET_MSR_EE(x)	mtmsr(x) | ||||
|  |  | |||
|  | @ -558,27 +558,54 @@ _GLOBAL(ret_from_except_lite) | |||
| 	mtmsrd	r10,1		  /* Update machine state */ | ||||
| #endif /* CONFIG_PPC_BOOK3E */ | ||||
| 
 | ||||
| #ifdef CONFIG_PREEMPT | ||||
| 	clrrdi	r9,r1,THREAD_SHIFT	/* current_thread_info() */ | ||||
| 	li	r0,_TIF_NEED_RESCHED	/* bits to check */ | ||||
| 	ld	r3,_MSR(r1) | ||||
| 	ld	r4,TI_FLAGS(r9) | ||||
| 	/* Move MSR_PR bit in r3 to _TIF_SIGPENDING position in r0 */ | ||||
| 	rlwimi	r0,r3,32+TIF_SIGPENDING-MSR_PR_LG,_TIF_SIGPENDING | ||||
| 	and.	r0,r4,r0	/* check NEED_RESCHED and maybe SIGPENDING */ | ||||
| 	bne	do_work | ||||
| 
 | ||||
| #else /* !CONFIG_PREEMPT */ | ||||
| 	ld	r3,_MSR(r1)	/* Returning to user mode? */ | ||||
| 	andi.	r3,r3,MSR_PR | ||||
| 	beq	restore		/* if not, just restore regs and return */ | ||||
| 	beq	resume_kernel | ||||
| 
 | ||||
| 	/* Check current_thread_info()->flags */ | ||||
| 	andi.	r0,r4,_TIF_USER_WORK_MASK | ||||
| 	beq	restore | ||||
| 
 | ||||
| 	andi.	r0,r4,_TIF_NEED_RESCHED | ||||
| 	beq	1f | ||||
| 	bl	.restore_interrupts | ||||
| 	bl	.schedule | ||||
| 	b	.ret_from_except_lite | ||||
| 
 | ||||
| 1:	bl	.save_nvgprs | ||||
| 	bl	.restore_interrupts | ||||
| 	addi	r3,r1,STACK_FRAME_OVERHEAD | ||||
| 	bl	.do_notify_resume | ||||
| 	b	.ret_from_except | ||||
| 
 | ||||
| resume_kernel: | ||||
| #ifdef CONFIG_PREEMPT | ||||
| 	/* Check if we need to preempt */ | ||||
| 	andi.	r0,r4,_TIF_NEED_RESCHED | ||||
| 	beq+	restore | ||||
| 	/* Check that preempt_count() == 0 and interrupts are enabled */ | ||||
| 	lwz	r8,TI_PREEMPT(r9) | ||||
| 	cmpwi	cr1,r8,0 | ||||
| 	ld	r0,SOFTE(r1) | ||||
| 	cmpdi	r0,0 | ||||
| 	crandc	eq,cr1*4+eq,eq | ||||
| 	bne	restore | ||||
| 
 | ||||
| 	/* | ||||
| 	 * Here we are preempting the current task. We want to make | ||||
| 	 * sure we are soft-disabled first | ||||
| 	 */ | ||||
| 	SOFT_DISABLE_INTS(r3,r4) | ||||
| 1:	bl	.preempt_schedule_irq | ||||
| 
 | ||||
| 	/* Re-test flags and eventually loop */ | ||||
| 	clrrdi	r9,r1,THREAD_SHIFT | ||||
| 	ld	r4,TI_FLAGS(r9) | ||||
| 	andi.	r0,r4,_TIF_USER_WORK_MASK | ||||
| 	bne	do_work | ||||
| #endif /* !CONFIG_PREEMPT */ | ||||
| 	andi.	r0,r4,_TIF_NEED_RESCHED | ||||
| 	bne	1b | ||||
| #endif /* CONFIG_PREEMPT */ | ||||
| 
 | ||||
| 	.globl	fast_exc_return_irq
 | ||||
| fast_exc_return_irq: | ||||
|  | @ -759,50 +786,6 @@ restore_check_irq_replay: | |||
| #endif /* CONFIG_PPC_BOOK3E */ | ||||
| 1:	b	.ret_from_except /* What else to do here ? */ | ||||
|   | ||||
| 
 | ||||
| 
 | ||||
| 3: | ||||
| do_work: | ||||
| #ifdef CONFIG_PREEMPT | ||||
| 	andi.	r0,r3,MSR_PR	/* Returning to user mode? */ | ||||
| 	bne	user_work | ||||
| 	/* Check that preempt_count() == 0 and interrupts are enabled */ | ||||
| 	lwz	r8,TI_PREEMPT(r9) | ||||
| 	cmpwi	cr1,r8,0 | ||||
| 	ld	r0,SOFTE(r1) | ||||
| 	cmpdi	r0,0 | ||||
| 	crandc	eq,cr1*4+eq,eq | ||||
| 	bne	restore | ||||
| 
 | ||||
| 	/* | ||||
| 	 * Here we are preempting the current task. We want to make | ||||
| 	 * sure we are soft-disabled first | ||||
| 	 */ | ||||
| 	SOFT_DISABLE_INTS(r3,r4) | ||||
| 1:	bl	.preempt_schedule_irq | ||||
| 
 | ||||
| 	/* Re-test flags and eventually loop */ | ||||
| 	clrrdi	r9,r1,THREAD_SHIFT | ||||
| 	ld	r4,TI_FLAGS(r9) | ||||
| 	andi.	r0,r4,_TIF_NEED_RESCHED | ||||
| 	bne	1b | ||||
| 	b	restore | ||||
| 
 | ||||
| user_work: | ||||
| #endif /* CONFIG_PREEMPT */ | ||||
| 
 | ||||
| 	andi.	r0,r4,_TIF_NEED_RESCHED | ||||
| 	beq	1f | ||||
| 	bl	.restore_interrupts | ||||
| 	bl	.schedule | ||||
| 	b	.ret_from_except_lite | ||||
| 
 | ||||
| 1:	bl	.save_nvgprs | ||||
| 	bl	.restore_interrupts | ||||
| 	addi	r3,r1,STACK_FRAME_OVERHEAD | ||||
| 	bl	.do_notify_resume | ||||
| 	b	.ret_from_except | ||||
| 
 | ||||
| unrecov_restore: | ||||
| 	addi	r3,r1,STACK_FRAME_OVERHEAD | ||||
| 	bl	.unrecoverable_exception | ||||
|  |  | |||
|  | @ -229,7 +229,7 @@ notrace void arch_local_irq_restore(unsigned long en) | |||
| 	 */ | ||||
| 	if (unlikely(irq_happened != PACA_IRQ_HARD_DIS)) | ||||
| 		__hard_irq_disable(); | ||||
| #ifdef CONFIG_TRACE_IRQFLAG | ||||
| #ifdef CONFIG_TRACE_IRQFLAGS | ||||
| 	else { | ||||
| 		/*
 | ||||
| 		 * We should already be hard disabled here. We had bugs | ||||
|  | @ -277,7 +277,7 @@ EXPORT_SYMBOL(arch_local_irq_restore); | |||
|  * NOTE: This is called with interrupts hard disabled but not marked | ||||
|  * as such in paca->irq_happened, so we need to resync this. | ||||
|  */ | ||||
| void restore_interrupts(void) | ||||
| void notrace restore_interrupts(void) | ||||
| { | ||||
| 	if (irqs_disabled()) { | ||||
| 		local_paca->irq_happened |= PACA_IRQ_HARD_DIS; | ||||
|  | @ -286,6 +286,52 @@ void restore_interrupts(void) | |||
| 		__hard_irq_enable(); | ||||
| } | ||||
| 
 | ||||
| /*
 | ||||
|  * This is a helper to use when about to go into idle low-power | ||||
|  * when the latter has the side effect of re-enabling interrupts | ||||
|  * (such as calling H_CEDE under pHyp). | ||||
|  * | ||||
|  * You call this function with interrupts soft-disabled (this is | ||||
|  * already the case when ppc_md.power_save is called). The function | ||||
|  * will return whether to enter power save or just return. | ||||
|  * | ||||
|  * In the former case, it will have notified lockdep of interrupts | ||||
|  * being re-enabled and generally sanitized the lazy irq state, | ||||
|  * and in the latter case it will leave with interrupts hard | ||||
|  * disabled and marked as such, so the local_irq_enable() call | ||||
|  * in cpu_idle() will properly re-enable everything. | ||||
|  */ | ||||
| bool prep_irq_for_idle(void) | ||||
| { | ||||
| 	/*
 | ||||
| 	 * First we need to hard disable to ensure no interrupt | ||||
| 	 * occurs before we effectively enter the low power state | ||||
| 	 */ | ||||
| 	hard_irq_disable(); | ||||
| 
 | ||||
| 	/*
 | ||||
| 	 * If anything happened while we were soft-disabled, | ||||
| 	 * we return now and do not enter the low power state. | ||||
| 	 */ | ||||
| 	if (lazy_irq_pending()) | ||||
| 		return false; | ||||
| 
 | ||||
| 	/* Tell lockdep we are about to re-enable */ | ||||
| 	trace_hardirqs_on(); | ||||
| 
 | ||||
| 	/*
 | ||||
| 	 * Mark interrupts as soft-enabled and clear the | ||||
| 	 * PACA_IRQ_HARD_DIS from the pending mask since we | ||||
| 	 * are about to hard enable as well as a side effect | ||||
| 	 * of entering the low power state. | ||||
| 	 */ | ||||
| 	local_paca->irq_happened &= ~PACA_IRQ_HARD_DIS; | ||||
| 	local_paca->soft_enabled = 1; | ||||
| 
 | ||||
| 	/* Tell the caller to enter the low power state */ | ||||
| 	return true; | ||||
| } | ||||
| 
 | ||||
| #endif /* CONFIG_PPC64 */ | ||||
| 
 | ||||
| int arch_show_interrupts(struct seq_file *p, int prec) | ||||
|  |  | |||
|  | @ -1312,7 +1312,7 @@ static struct opal_secondary_data { | |||
| 
 | ||||
| extern char opal_secondary_entry; | ||||
| 
 | ||||
| static void prom_query_opal(void) | ||||
| static void __init prom_query_opal(void) | ||||
| { | ||||
| 	long rc; | ||||
| 
 | ||||
|  | @ -1436,7 +1436,7 @@ static void __init prom_opal_hold_cpus(void) | |||
| 	prom_debug("prom_opal_hold_cpus: end...\n"); | ||||
| } | ||||
| 
 | ||||
| static void prom_opal_takeover(void) | ||||
| static void __init prom_opal_takeover(void) | ||||
| { | ||||
| 	struct opal_secondary_data *data = &RELOC(opal_secondary_data); | ||||
| 	struct opal_takeover_args *args = &data->args; | ||||
|  |  | |||
|  | @ -810,7 +810,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_201) | |||
| 	lwz	r3,VCORE_NAPPING_THREADS(r5) | ||||
| 	lwz	r4,VCPU_PTID(r9) | ||||
| 	li	r0,1 | ||||
| 	sldi	r0,r0,r4 | ||||
| 	sld	r0,r0,r4 | ||||
| 	andc.	r3,r3,r0		/* no sense IPI'ing ourselves */ | ||||
| 	beq	43f | ||||
| 	mulli	r4,r4,PACA_SIZE		/* get paca for thread 0 */ | ||||
|  |  | |||
|  | @ -241,6 +241,7 @@ int kvmppc_h_pr(struct kvm_vcpu *vcpu, unsigned long cmd) | |||
| 	case H_PUT_TCE: | ||||
| 		return kvmppc_h_pr_put_tce(vcpu); | ||||
| 	case H_CEDE: | ||||
| 		vcpu->arch.shared->msr |= MSR_EE; | ||||
| 		kvm_vcpu_block(vcpu); | ||||
| 		clear_bit(KVM_REQ_UNHALT, &vcpu->requests); | ||||
| 		vcpu->stat.halt_wakeup++; | ||||
|  |  | |||
|  | @ -635,11 +635,11 @@ static inline int __init read_usm_ranges(const u32 **usm) | |||
|  */ | ||||
| static void __init parse_drconf_memory(struct device_node *memory) | ||||
| { | ||||
| 	const u32 *dm, *usm; | ||||
| 	const u32 *uninitialized_var(dm), *usm; | ||||
| 	unsigned int n, rc, ranges, is_kexec_kdump = 0; | ||||
| 	unsigned long lmb_size, base, size, sz; | ||||
| 	int nid; | ||||
| 	struct assoc_arrays aa; | ||||
| 	struct assoc_arrays aa = { .arrays = NULL }; | ||||
| 
 | ||||
| 	n = of_get_drconf_memory(memory, &dm); | ||||
| 	if (!n) | ||||
|  |  | |||
|  | @ -105,6 +105,7 @@ sk_load_byte_msh_positive_offset: | |||
| 	mr	r4, r_addr;					\
 | ||||
| 	li	r6, SIZE;					\
 | ||||
| 	bl	skb_copy_bits;					\
 | ||||
| 	nop;							\
 | ||||
| 	/* R3 = 0 on success */					\ | ||||
| 	addi	r1, r1, BPF_PPC_SLOWPATH_FRAME;			\
 | ||||
| 	ld	r0, 16(r1);					\
 | ||||
|  | @ -156,6 +157,7 @@ bpf_slow_path_byte_msh: | |||
| 	mr	r4, r_addr;					\
 | ||||
| 	li	r5, SIZE;					\
 | ||||
| 	bl	bpf_internal_load_pointer_neg_helper;		\
 | ||||
| 	nop;							\
 | ||||
| 	/* R3 != 0 on success */				\ | ||||
| 	addi	r1, r1, BPF_PPC_SLOWPATH_FRAME;			\
 | ||||
| 	ld	r0, 16(r1);					\
 | ||||
|  |  | |||
|  | @ -42,11 +42,9 @@ static void cbe_power_save(void) | |||
| { | ||||
| 	unsigned long ctrl, thread_switch_control; | ||||
| 
 | ||||
| 	/*
 | ||||
| 	 * We need to hard disable interrupts, the local_irq_enable() done by | ||||
| 	 * our caller upon return will hard re-enable. | ||||
| 	 */ | ||||
| 	hard_irq_disable(); | ||||
| 	/* Ensure our interrupt state is properly tracked */ | ||||
| 	if (!prep_irq_for_idle()) | ||||
| 		return; | ||||
| 
 | ||||
| 	ctrl = mfspr(SPRN_CTRLF); | ||||
| 
 | ||||
|  | @ -81,6 +79,9 @@ static void cbe_power_save(void) | |||
| 	 */ | ||||
| 	ctrl &= ~(CTRL_RUNLATCH | CTRL_TE); | ||||
| 	mtspr(SPRN_CTRLT, ctrl); | ||||
| 
 | ||||
| 	/* Re-enable interrupts in MSR */ | ||||
| 	__hard_irq_enable(); | ||||
| } | ||||
| 
 | ||||
| static int cbe_system_reset_exception(struct pt_regs *regs) | ||||
|  |  | |||
|  | @ -106,7 +106,7 @@ static int tce_build_pSeries(struct iommu_table *tbl, long index, | |||
| 		tcep++; | ||||
| 	} | ||||
| 
 | ||||
| 	if (tbl->it_type == TCE_PCI_SWINV_CREATE) | ||||
| 	if (tbl->it_type & TCE_PCI_SWINV_CREATE) | ||||
| 		tce_invalidate_pSeries_sw(tbl, tces, tcep - 1); | ||||
| 	return 0; | ||||
| } | ||||
|  | @ -121,7 +121,7 @@ static void tce_free_pSeries(struct iommu_table *tbl, long index, long npages) | |||
| 	while (npages--) | ||||
| 		*(tcep++) = 0; | ||||
| 
 | ||||
| 	if (tbl->it_type == TCE_PCI_SWINV_FREE) | ||||
| 	if (tbl->it_type & TCE_PCI_SWINV_FREE) | ||||
| 		tce_invalidate_pSeries_sw(tbl, tces, tcep - 1); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
Some files were not shown because too many files have changed in this diff Show more
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Trond Myklebust
						Trond Myklebust