Update to 4.17-rc1
- Drop patches included upstream - Drop "Don't WARN about expected W+X pages on Xen"; the problem appears to have been fixed by upstream commits 2cc42bac1c ("x86-64/Xen: eliminate W+X mappings") and 672c0ae09b33 ("x86/mm: Consider effective protection attributes in W+X check") - Drop "Kbuild: kconfig: Verbose version of --listnewconfig"; it seems redundant with upstream commit 17baab68d337 ("kconfig: extend output of 'listnewconfig'") - Drop lockdown patch to drivers/scsi/eata.c; the driver was removed upstream - Refresh various other patches
This commit is contained in:
parent
84cc9cc225
commit
8457aba35f
|
@ -1,3 +1,15 @@
|
|||
linux (4.17~rc1-1~exp1) UNRELEASED; urgency=medium
|
||||
|
||||
* New upstream release candidate
|
||||
|
||||
[ Ben Hutchings ]
|
||||
* [amd64] Drop our patch "Don't WARN about expected W+X pages on Xen"; the
|
||||
problem appears to have been fixed upstream
|
||||
* Drop our patch "Kbuild: kconfig: Verbose version of --listnewconfig";
|
||||
listnewconfig now shows symbol values by default
|
||||
|
||||
-- Ben Hutchings <ben@decadent.org.uk> Thu, 19 Apr 2018 21:37:24 +0100
|
||||
|
||||
linux (4.16-1) UNRELEASED; urgency=medium
|
||||
|
||||
[ Ben Hutchings ]
|
||||
|
|
|
@ -1,96 +0,0 @@
|
|||
From: Theodore Ts'o <tytso@mit.edu>
|
||||
Date: Mon, 26 Mar 2018 23:54:10 -0400
|
||||
Subject: ext4: add validity checks for bitmap block numbers
|
||||
Origin: https://git.kernel.org/linus/7dac4a1726a9c64a517d595c40e95e2d0d135f6f
|
||||
Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2018-1093
|
||||
|
||||
An privileged attacker can cause a crash by mounting a crafted ext4
|
||||
image which triggers a out-of-bounds read in the function
|
||||
ext4_valid_block_bitmap() in fs/ext4/balloc.c.
|
||||
|
||||
This issue has been assigned CVE-2018-1093.
|
||||
|
||||
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=199181
|
||||
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1560782
|
||||
Reported-by: Wen Xu <wen.xu@gatech.edu>
|
||||
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
||||
Cc: stable@vger.kernel.org
|
||||
---
|
||||
fs/ext4/balloc.c | 16 ++++++++++++++--
|
||||
fs/ext4/ialloc.c | 7 +++++++
|
||||
2 files changed, 21 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/fs/ext4/balloc.c
|
||||
+++ b/fs/ext4/balloc.c
|
||||
@@ -340,20 +340,25 @@ static ext4_fsblk_t ext4_valid_block_bit
|
||||
/* check whether block bitmap block number is set */
|
||||
blk = ext4_block_bitmap(sb, desc);
|
||||
offset = blk - group_first_block;
|
||||
- if (!ext4_test_bit(EXT4_B2C(sbi, offset), bh->b_data))
|
||||
+ if (offset < 0 || EXT4_B2C(sbi, offset) >= sb->s_blocksize ||
|
||||
+ !ext4_test_bit(EXT4_B2C(sbi, offset), bh->b_data))
|
||||
/* bad block bitmap */
|
||||
return blk;
|
||||
|
||||
/* check whether the inode bitmap block number is set */
|
||||
blk = ext4_inode_bitmap(sb, desc);
|
||||
offset = blk - group_first_block;
|
||||
- if (!ext4_test_bit(EXT4_B2C(sbi, offset), bh->b_data))
|
||||
+ if (offset < 0 || EXT4_B2C(sbi, offset) >= sb->s_blocksize ||
|
||||
+ !ext4_test_bit(EXT4_B2C(sbi, offset), bh->b_data))
|
||||
/* bad block bitmap */
|
||||
return blk;
|
||||
|
||||
/* check whether the inode table block number is set */
|
||||
blk = ext4_inode_table(sb, desc);
|
||||
offset = blk - group_first_block;
|
||||
+ if (offset < 0 || EXT4_B2C(sbi, offset) >= sb->s_blocksize ||
|
||||
+ EXT4_B2C(sbi, offset + sbi->s_itb_per_group) >= sb->s_blocksize)
|
||||
+ return blk;
|
||||
next_zero_bit = ext4_find_next_zero_bit(bh->b_data,
|
||||
EXT4_B2C(sbi, offset + sbi->s_itb_per_group),
|
||||
EXT4_B2C(sbi, offset));
|
||||
@@ -419,6 +424,7 @@ struct buffer_head *
|
||||
ext4_read_block_bitmap_nowait(struct super_block *sb, ext4_group_t block_group)
|
||||
{
|
||||
struct ext4_group_desc *desc;
|
||||
+ struct ext4_sb_info *sbi = EXT4_SB(sb);
|
||||
struct buffer_head *bh;
|
||||
ext4_fsblk_t bitmap_blk;
|
||||
int err;
|
||||
@@ -427,6 +433,12 @@ ext4_read_block_bitmap_nowait(struct sup
|
||||
if (!desc)
|
||||
return ERR_PTR(-EFSCORRUPTED);
|
||||
bitmap_blk = ext4_block_bitmap(sb, desc);
|
||||
+ if ((bitmap_blk <= le32_to_cpu(sbi->s_es->s_first_data_block)) ||
|
||||
+ (bitmap_blk >= ext4_blocks_count(sbi->s_es))) {
|
||||
+ ext4_error(sb, "Invalid block bitmap block %llu in "
|
||||
+ "block_group %u", bitmap_blk, block_group);
|
||||
+ return ERR_PTR(-EFSCORRUPTED);
|
||||
+ }
|
||||
bh = sb_getblk(sb, bitmap_blk);
|
||||
if (unlikely(!bh)) {
|
||||
ext4_error(sb, "Cannot get buffer for block bitmap - "
|
||||
--- a/fs/ext4/ialloc.c
|
||||
+++ b/fs/ext4/ialloc.c
|
||||
@@ -160,6 +160,7 @@ static struct buffer_head *
|
||||
ext4_read_inode_bitmap(struct super_block *sb, ext4_group_t block_group)
|
||||
{
|
||||
struct ext4_group_desc *desc;
|
||||
+ struct ext4_sb_info *sbi = EXT4_SB(sb);
|
||||
struct buffer_head *bh = NULL;
|
||||
ext4_fsblk_t bitmap_blk;
|
||||
int err;
|
||||
@@ -169,6 +170,12 @@ ext4_read_inode_bitmap(struct super_bloc
|
||||
return ERR_PTR(-EFSCORRUPTED);
|
||||
|
||||
bitmap_blk = ext4_inode_bitmap(sb, desc);
|
||||
+ if ((bitmap_blk <= le32_to_cpu(sbi->s_es->s_first_data_block)) ||
|
||||
+ (bitmap_blk >= ext4_blocks_count(sbi->s_es))) {
|
||||
+ ext4_error(sb, "Invalid inode bitmap blk %llu in "
|
||||
+ "block_group %u", bitmap_blk, block_group);
|
||||
+ return ERR_PTR(-EFSCORRUPTED);
|
||||
+ }
|
||||
bh = sb_getblk(sb, bitmap_blk);
|
||||
if (unlikely(!bh)) {
|
||||
ext4_error(sb, "Cannot read inode bitmap - "
|
|
@ -1,46 +0,0 @@
|
|||
From: Theodore Ts'o <tytso@mit.edu>
|
||||
Date: Thu, 29 Mar 2018 22:10:31 -0400
|
||||
Subject: ext4: always initialize the crc32c checksum driver
|
||||
Origin: https://git.kernel.org/linus/a45403b51582a87872927a3e0fc0a389c26867f1
|
||||
Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2018-1094
|
||||
|
||||
The extended attribute code now uses the crc32c checksum for hashing
|
||||
purposes, so we should just always always initialize it. We also want
|
||||
to prevent NULL pointer dereferences if one of the metadata checksum
|
||||
features is enabled after the file sytsem is originally mounted.
|
||||
|
||||
This issue has been assigned CVE-2018-1094.
|
||||
|
||||
https://bugzilla.kernel.org/show_bug.cgi?id=199183
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1560788
|
||||
|
||||
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
||||
Cc: stable@vger.kernel.org
|
||||
---
|
||||
fs/ext4/super.c | 15 ++++++---------
|
||||
1 file changed, 6 insertions(+), 9 deletions(-)
|
||||
|
||||
--- a/fs/ext4/super.c
|
||||
+++ b/fs/ext4/super.c
|
||||
@@ -3489,15 +3489,12 @@ static int ext4_fill_super(struct super_
|
||||
}
|
||||
|
||||
/* Load the checksum driver */
|
||||
- if (ext4_has_feature_metadata_csum(sb) ||
|
||||
- ext4_has_feature_ea_inode(sb)) {
|
||||
- sbi->s_chksum_driver = crypto_alloc_shash("crc32c", 0, 0);
|
||||
- if (IS_ERR(sbi->s_chksum_driver)) {
|
||||
- ext4_msg(sb, KERN_ERR, "Cannot load crc32c driver.");
|
||||
- ret = PTR_ERR(sbi->s_chksum_driver);
|
||||
- sbi->s_chksum_driver = NULL;
|
||||
- goto failed_mount;
|
||||
- }
|
||||
+ sbi->s_chksum_driver = crypto_alloc_shash("crc32c", 0, 0);
|
||||
+ if (IS_ERR(sbi->s_chksum_driver)) {
|
||||
+ ext4_msg(sb, KERN_ERR, "Cannot load crc32c driver.");
|
||||
+ ret = PTR_ERR(sbi->s_chksum_driver);
|
||||
+ sbi->s_chksum_driver = NULL;
|
||||
+ goto failed_mount;
|
||||
}
|
||||
|
||||
/* Check superblock checksum */
|
|
@ -1,40 +0,0 @@
|
|||
From: Theodore Ts'o <tytso@mit.edu>
|
||||
Date: Thu, 29 Mar 2018 21:56:09 -0400
|
||||
Subject: ext4: fail ext4_iget for root directory if unallocated
|
||||
Origin: https://git.kernel.org/linus/8e4b5eae5decd9dfe5a4ee369c22028f90ab4c44
|
||||
Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2018-1092
|
||||
|
||||
If the root directory has an i_links_count of zero, then when the file
|
||||
system is mounted, then when ext4_fill_super() notices the problem and
|
||||
tries to call iput() the root directory in the error return path,
|
||||
ext4_evict_inode() will try to free the inode on disk, before all of
|
||||
the file system structures are set up, and this will result in an OOPS
|
||||
caused by a NULL pointer dereference.
|
||||
|
||||
This issue has been assigned CVE-2018-1092.
|
||||
|
||||
https://bugzilla.kernel.org/show_bug.cgi?id=199179
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1560777
|
||||
|
||||
Reported-by: Wen Xu <wen.xu@gatech.edu>
|
||||
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
||||
Cc: stable@vger.kernel.org
|
||||
---
|
||||
fs/ext4/inode.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
--- a/fs/ext4/inode.c
|
||||
+++ b/fs/ext4/inode.c
|
||||
@@ -4745,6 +4745,12 @@ struct inode *ext4_iget(struct super_blo
|
||||
goto bad_inode;
|
||||
raw_inode = ext4_raw_inode(&iloc);
|
||||
|
||||
+ if ((ino == EXT4_ROOT_INO) && (raw_inode->i_links_count == 0)) {
|
||||
+ EXT4_ERROR_INODE(inode, "root inode unallocated");
|
||||
+ ret = -EFSCORRUPTED;
|
||||
+ goto bad_inode;
|
||||
+ }
|
||||
+
|
||||
if (EXT4_INODE_SIZE(inode->i_sb) > EXT4_GOOD_OLD_INODE_SIZE) {
|
||||
ei->i_extra_isize = le16_to_cpu(raw_inode->i_extra_isize);
|
||||
if (EXT4_GOOD_OLD_INODE_SIZE + ei->i_extra_isize >
|
|
@ -23,37 +23,9 @@ upstream submission.
|
|||
|
||||
head = (struct fw_header *)fw->data;
|
||||
if (head->magic != 0x4e657458) {
|
||||
--- a/arch/cris/arch-v32/drivers/iop_fw_load.c
|
||||
+++ b/arch/cris/arch-v32/drivers/iop_fw_load.c
|
||||
@@ -74,12 +74,7 @@ int iop_fw_load_spu(const unsigned char
|
||||
fw_name,
|
||||
&iop_spu_device[spu_inst]);
|
||||
if (retval != 0)
|
||||
- {
|
||||
- printk(KERN_ERR
|
||||
- "iop_load_spu: Failed to load firmware \"%s\"\n",
|
||||
- fw_name);
|
||||
return retval;
|
||||
- }
|
||||
data = (u32 *) fw_entry->data;
|
||||
|
||||
/* acquire ownership of memory controller */
|
||||
@@ -137,12 +132,7 @@ int iop_fw_load_mpu(unsigned char *fw_na
|
||||
/* get firmware */
|
||||
retval = request_firmware(&fw_entry, fw_name, &iop_mpu_device);
|
||||
if (retval != 0)
|
||||
- {
|
||||
- printk(KERN_ERR
|
||||
- "iop_load_spu: Failed to load firmware \"%s\"\n",
|
||||
- fw_name);
|
||||
return retval;
|
||||
- }
|
||||
data = (u32 *) fw_entry->data;
|
||||
|
||||
/* disable MPU */
|
||||
--- a/arch/x86/kernel/cpu/microcode/amd.c
|
||||
+++ b/arch/x86/kernel/cpu/microcode/amd.c
|
||||
@@ -739,10 +739,8 @@ static enum ucode_state request_microcod
|
||||
@@ -747,10 +747,8 @@ static enum ucode_state request_microcod
|
||||
if (c->x86 >= 0x15)
|
||||
snprintf(fw_name, sizeof(fw_name), "amd-ucode/microcode_amd_fam%.2xh.bin", c->x86);
|
||||
|
||||
|
@ -96,7 +68,7 @@ upstream submission.
|
|||
fw_size = firmware->size / sizeof(u32);
|
||||
--- a/drivers/bluetooth/ath3k.c
|
||||
+++ b/drivers/bluetooth/ath3k.c
|
||||
@@ -425,10 +425,8 @@ static int ath3k_load_patch(struct usb_d
|
||||
@@ -430,10 +430,8 @@ static int ath3k_load_patch(struct usb_d
|
||||
le32_to_cpu(fw_version.rom_version));
|
||||
|
||||
ret = request_firmware(&firmware, filename, &udev->dev);
|
||||
|
@ -108,7 +80,7 @@ upstream submission.
|
|||
|
||||
pt_rom_version = get_unaligned_le32(firmware->data +
|
||||
firmware->size - 8);
|
||||
@@ -488,10 +486,8 @@ static int ath3k_load_syscfg(struct usb_
|
||||
@@ -493,10 +491,8 @@ static int ath3k_load_syscfg(struct usb_
|
||||
le32_to_cpu(fw_version.rom_version), clk_value, ".dfu");
|
||||
|
||||
ret = request_firmware(&firmware, filename, &udev->dev);
|
||||
|
@ -203,7 +175,7 @@ upstream submission.
|
|||
fw->size, fw_name);
|
||||
--- a/drivers/dma/imx-sdma.c
|
||||
+++ b/drivers/dma/imx-sdma.c
|
||||
@@ -1461,11 +1461,8 @@ static void sdma_load_firmware(const str
|
||||
@@ -1482,11 +1482,8 @@ static void sdma_load_firmware(const str
|
||||
const struct sdma_script_start_addrs *addr;
|
||||
unsigned short *ram_code;
|
||||
|
||||
|
@ -313,7 +285,7 @@ upstream submission.
|
|||
ret = qib_ibsd_ucode_loaded(dd->pport, fw);
|
||||
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
|
||||
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
|
||||
@@ -2717,10 +2717,8 @@ static int mxt_load_fw(struct device *de
|
||||
@@ -2724,10 +2724,8 @@ static int mxt_load_fw(struct device *de
|
||||
int ret;
|
||||
|
||||
ret = request_firmware(&fw, fn, dev);
|
||||
|
@ -436,7 +408,7 @@ upstream submission.
|
|||
p = kmalloc(fw->size, GFP_KERNEL);
|
||||
--- a/drivers/media/dvb-frontends/af9013.c
|
||||
+++ b/drivers/media/dvb-frontends/af9013.c
|
||||
@@ -1140,14 +1140,8 @@ static int af9013_download_firmware(stru
|
||||
@@ -1059,14 +1059,8 @@ static int af9013_download_firmware(stru
|
||||
|
||||
/* Request the firmware, will block and timeout */
|
||||
ret = request_firmware(&firmware, name, &client->dev);
|
||||
|
@ -665,33 +637,30 @@ upstream submission.
|
|||
for (i = 0; i < ARRAY_SIZE(tab2); i++) {
|
||||
--- a/drivers/media/pci/ngene/ngene-core.c
|
||||
+++ b/drivers/media/pci/ngene/ngene-core.c
|
||||
@@ -1252,13 +1252,8 @@ static int ngene_load_firm(struct ngene
|
||||
@@ -1253,19 +1253,14 @@ static int ngene_load_firm(struct ngene
|
||||
break;
|
||||
}
|
||||
|
||||
- if (request_firmware(&fw, fw_name, &dev->pci_dev->dev) < 0) {
|
||||
- printk(KERN_ERR DEVICE_NAME
|
||||
- ": Could not load firmware file %s.\n", fw_name);
|
||||
- printk(KERN_INFO DEVICE_NAME
|
||||
- ": Copy %s to your hotplug directory!\n", fw_name);
|
||||
- dev_err(pdev, "Could not load firmware file %s.\n", fw_name);
|
||||
- dev_info(pdev, "Copy %s to your hotplug directory!\n",
|
||||
- fw_name);
|
||||
+ if (request_firmware(&fw, fw_name, &dev->pci_dev->dev))
|
||||
return -1;
|
||||
- }
|
||||
if (size == 0)
|
||||
size = fw->size;
|
||||
if (size != fw->size) {
|
||||
@@ -1266,8 +1261,6 @@ static int ngene_load_firm(struct ngene
|
||||
": Firmware %s has invalid size!", fw_name);
|
||||
dev_err(pdev, "Firmware %s has invalid size!", fw_name);
|
||||
err = -1;
|
||||
} else {
|
||||
- printk(KERN_INFO DEVICE_NAME
|
||||
- ": Loading firmware file %s.\n", fw_name);
|
||||
- dev_info(pdev, "Loading firmware file %s.\n", fw_name);
|
||||
ngene_fw = (u8 *) fw->data;
|
||||
err = ngene_command_load_firmware(dev, ngene_fw, size);
|
||||
}
|
||||
--- a/drivers/media/common/siano/smscoreapi.c
|
||||
+++ b/drivers/media/common/siano/smscoreapi.c
|
||||
@@ -1156,10 +1156,8 @@ static int smscore_load_firmware_from_fi
|
||||
@@ -1162,10 +1162,8 @@ static int smscore_load_firmware_from_fi
|
||||
return -EINVAL;
|
||||
|
||||
rc = request_firmware(&fw, fw_filename, coredev->device);
|
||||
|
@ -906,7 +875,7 @@ upstream submission.
|
|||
pr_err("ERROR: Firmware size mismatch (have %zu, expected %d)\n",
|
||||
--- a/drivers/media/pci/cx23885/cx23885-cards.c
|
||||
+++ b/drivers/media/pci/cx23885/cx23885-cards.c
|
||||
@@ -2345,10 +2345,7 @@ void cx23885_card_setup(struct cx23885_d
|
||||
@@ -2425,10 +2425,7 @@ void cx23885_card_setup(struct cx23885_d
|
||||
cinfo.rev, filename);
|
||||
|
||||
ret = request_firmware(&fw, filename, &dev->pci->dev);
|
||||
|
@ -1003,7 +972,7 @@ upstream submission.
|
|||
|
||||
--- a/drivers/media/usb/s2255/s2255drv.c
|
||||
+++ b/drivers/media/usb/s2255/s2255drv.c
|
||||
@@ -2306,10 +2306,8 @@ static int s2255_probe(struct usb_interf
|
||||
@@ -2298,10 +2298,8 @@ static int s2255_probe(struct usb_interf
|
||||
}
|
||||
/* load the first chunk */
|
||||
if (request_firmware(&dev->fw_data->fw,
|
||||
|
@ -1242,7 +1211,7 @@ upstream submission.
|
|||
if (ret)
|
||||
--- a/drivers/net/ethernet/intel/e100.c
|
||||
+++ b/drivers/net/ethernet/intel/e100.c
|
||||
@@ -1290,9 +1290,6 @@ static const struct firmware *e100_reque
|
||||
@@ -1291,9 +1291,6 @@ static const struct firmware *e100_reque
|
||||
|
||||
if (err) {
|
||||
if (required) {
|
||||
|
@ -1464,7 +1433,7 @@ upstream submission.
|
|||
}
|
||||
--- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c
|
||||
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
|
||||
@@ -8417,12 +8417,8 @@ static int ipw2100_get_firmware(struct i
|
||||
@@ -8416,12 +8416,8 @@ static int ipw2100_get_firmware(struct i
|
||||
|
||||
rc = request_firmware(&fw->fw_entry, fw_name, &priv->pci_dev->dev);
|
||||
|
||||
|
@ -1480,7 +1449,7 @@ upstream submission.
|
|||
|
||||
--- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c
|
||||
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
|
||||
@@ -3417,10 +3417,8 @@ static int ipw_get_fw(struct ipw_priv *p
|
||||
@@ -3410,10 +3410,8 @@ static int ipw_get_fw(struct ipw_priv *p
|
||||
|
||||
/* ask firmware_class module to get the boot firmware off disk */
|
||||
rc = request_firmware(raw, name, &priv->pci_dev->dev);
|
||||
|
@ -1860,7 +1829,7 @@ upstream submission.
|
|||
}
|
||||
--- a/drivers/scsi/ipr.c
|
||||
+++ b/drivers/scsi/ipr.c
|
||||
@@ -4094,10 +4094,8 @@ static ssize_t ipr_store_update_fw(struc
|
||||
@@ -4061,10 +4061,8 @@ static ssize_t ipr_store_update_fw(struc
|
||||
if (endline)
|
||||
*endline = '\0';
|
||||
|
||||
|
@ -1898,7 +1867,7 @@ upstream submission.
|
|||
}
|
||||
--- a/drivers/scsi/qla2xxx/qla_init.c
|
||||
+++ b/drivers/scsi/qla2xxx/qla_init.c
|
||||
@@ -7238,8 +7238,6 @@ qla2x00_load_risc(scsi_qla_host_t *vha,
|
||||
@@ -7267,8 +7267,6 @@ qla2x00_load_risc(scsi_qla_host_t *vha,
|
||||
/* Load firmware blob. */
|
||||
blob = qla2x00_request_firmware(vha);
|
||||
if (!blob) {
|
||||
|
@ -1907,7 +1876,7 @@ upstream submission.
|
|||
ql_log(ql_log_info, vha, 0x0084,
|
||||
"Firmware images can be retrieved from: "QLA_FW_URL ".\n");
|
||||
return QLA_FUNCTION_FAILED;
|
||||
@@ -7341,8 +7339,6 @@ qla24xx_load_risc_blob(scsi_qla_host_t *
|
||||
@@ -7370,8 +7368,6 @@ qla24xx_load_risc_blob(scsi_qla_host_t *
|
||||
/* Load firmware blob. */
|
||||
blob = qla2x00_request_firmware(vha);
|
||||
if (!blob) {
|
||||
|
@ -1918,7 +1887,7 @@ upstream submission.
|
|||
QLA_FW_URL ".\n");
|
||||
--- a/drivers/scsi/qla2xxx/qla_nx.c
|
||||
+++ b/drivers/scsi/qla2xxx/qla_nx.c
|
||||
@@ -2465,11 +2465,8 @@ try_blob_fw:
|
||||
@@ -2464,11 +2464,8 @@ try_blob_fw:
|
||||
|
||||
/* Load firmware blob. */
|
||||
blob = ha->hablob = qla2x00_request_firmware(vha);
|
||||
|
@ -1933,7 +1902,7 @@ upstream submission.
|
|||
if (qla82xx_validate_firmware_blob(vha,
|
||||
--- a/drivers/scsi/qla2xxx/qla_os.c
|
||||
+++ b/drivers/scsi/qla2xxx/qla_os.c
|
||||
@@ -6496,8 +6496,6 @@ qla2x00_request_firmware(scsi_qla_host_t
|
||||
@@ -6511,8 +6511,6 @@ qla2x00_request_firmware(scsi_qla_host_t
|
||||
goto out;
|
||||
|
||||
if (request_firmware(&blob->fw, blob->name, &ha->pdev->dev)) {
|
||||
|
@ -2465,7 +2434,7 @@ upstream submission.
|
|||
return err;
|
||||
--- a/sound/pci/emu10k1/emu10k1_main.c
|
||||
+++ b/sound/pci/emu10k1/emu10k1_main.c
|
||||
@@ -887,10 +887,8 @@ static int snd_emu10k1_emu1010_init(stru
|
||||
@@ -888,10 +888,8 @@ static int snd_emu10k1_emu1010_init(stru
|
||||
dev_info(emu->card->dev, "emu1010: EMU_HANA_ID = 0x%x\n", reg);
|
||||
|
||||
err = snd_emu1010_load_firmware(emu, 0, &emu->firmware);
|
||||
|
@ -2479,7 +2448,7 @@ upstream submission.
|
|||
snd_emu1010_fpga_read(emu, EMU_HANA_ID, ®);
|
||||
--- a/sound/pci/hda/hda_intel.c
|
||||
+++ b/sound/pci/hda/hda_intel.c
|
||||
@@ -1959,10 +1959,8 @@ static void azx_firmware_cb(const struct
|
||||
@@ -1970,10 +1970,8 @@ static void azx_firmware_cb(const struct
|
||||
struct azx *chip = card->private_data;
|
||||
struct pci_dev *pci = chip->pci;
|
||||
|
||||
|
@ -2564,7 +2533,7 @@ upstream submission.
|
|||
"too short firmware size %d (expected %d)\n",
|
||||
--- a/sound/soc/codecs/wm2000.c
|
||||
+++ b/sound/soc/codecs/wm2000.c
|
||||
@@ -890,10 +890,8 @@ static int wm2000_i2c_probe(struct i2c_c
|
||||
@@ -891,10 +891,8 @@ static int wm2000_i2c_probe(struct i2c_c
|
||||
}
|
||||
|
||||
ret = request_firmware(&fw, filename, &i2c->dev);
|
||||
|
|
|
@ -21,9 +21,9 @@ This does not cover the case where we fall back to a user-mode helper
|
|||
NOTE: hw-detect will depend on the "firmware: failed to load %s (%d)\n"
|
||||
format to detect missing firmware.
|
||||
---
|
||||
--- a/drivers/base/firmware_class.c
|
||||
+++ b/drivers/base/firmware_class.c
|
||||
@@ -443,21 +443,22 @@ fw_get_filesystem_firmware(struct device
|
||||
--- a/drivers/base/firmware_loader/main.c
|
||||
+++ b/drivers/base/firmware_loader/main.c
|
||||
@@ -322,21 +322,22 @@ fw_get_filesystem_firmware(struct device
|
||||
rc = kernel_read_file_from_path(path, &fw_priv->data, &size,
|
||||
msize, id);
|
||||
if (rc) {
|
||||
|
@ -53,7 +53,9 @@ format to detect missing firmware.
|
|||
return rc;
|
||||
}
|
||||
|
||||
@@ -1120,7 +1121,7 @@ static int fw_load_from_user_helper(stru
|
||||
--- a/drivers/base/firmware_loader/fallback.c
|
||||
+++ b/drivers/base/firmware_loader/fallback.c
|
||||
@@ -609,7 +609,7 @@ static int fw_load_from_user_helper(stru
|
||||
if (opt_flags & FW_OPT_NOWAIT) {
|
||||
timeout = usermodehelper_read_lock_wait(timeout);
|
||||
if (!timeout) {
|
||||
|
|
|
@ -22,7 +22,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|||
---
|
||||
--- a/scripts/Kbuild.include
|
||||
+++ b/scripts/Kbuild.include
|
||||
@@ -194,7 +194,7 @@ CC_OPTION_CFLAGS = $(filter-out $(GCC_PL
|
||||
@@ -195,7 +195,7 @@ CC_OPTION_CFLAGS = $(filter-out $(GCC_PL
|
||||
# Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
|
||||
|
||||
cc-option = $(call __cc-option, $(CC),\
|
||||
|
@ -31,7 +31,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|||
|
||||
# hostcc-option
|
||||
# Usage: cflags-y += $(call hostcc-option,-march=winchip-c6,-march=i586)
|
||||
@@ -204,23 +204,24 @@ hostcc-option = $(call __cc-option, $(HO
|
||||
@@ -205,23 +205,24 @@ hostcc-option = $(call __cc-option, $(HO
|
||||
# cc-option-yn
|
||||
# Usage: flag := $(call cc-option-yn,-march=winchip-c6)
|
||||
cc-option-yn = $(call try-run-cached,\
|
||||
|
@ -60,18 +60,18 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|||
|
||||
# cc-ifversion
|
||||
# Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1)
|
||||
@@ -238,7 +239,7 @@ cc-ldoption = $(call try-run-cached,\
|
||||
@@ -234,7 +235,7 @@ cc-if-fullversion = $(shell [ $(cc-fullv
|
||||
# cc-ldoption
|
||||
# Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both)
|
||||
cc-ldoption = $(call try-run-cached,\
|
||||
- $(CC) $(1) $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2))
|
||||
+ $(CC) $(1) $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2))
|
||||
|
||||
# ld-option
|
||||
# Usage: LDFLAGS += $(call ld-option, -X)
|
||||
ld-option = $(call try-run-cached,\
|
||||
- $(CC) $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -x c /dev/null -c -o "$$TMPO"; \
|
||||
+ $(CC) $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -x c /dev/null -c -o "$$TMPO"; \
|
||||
$(LD) $(LDFLAGS) $(1) "$$TMPO" -o "$$TMP",$(1),$(2))
|
||||
|
||||
# ar-option
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -667,6 +667,8 @@ endif
|
||||
@@ -652,6 +652,8 @@ endif
|
||||
KBUILD_CFLAGS += $(call cc-ifversion, -lt, 0409, \
|
||||
$(call cc-disable-warning,maybe-uninitialized,))
|
||||
|
||||
|
@ -80,7 +80,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|||
# Tell gcc to never replace conditional load with a non-conditional one
|
||||
KBUILD_CFLAGS += $(call cc-option,--param=allow-store-data-races=0)
|
||||
|
||||
@@ -776,7 +778,7 @@ KBUILD_CFLAGS += $(call cc-option,-fdata
|
||||
@@ -803,7 +805,7 @@ KBUILD_CFLAGS += $(call cc-option,-fdata
|
||||
endif
|
||||
|
||||
# arch Makefile may override CC so keep this after arch Makefile is included
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
Origin: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts?h=next-20180309&id=c04ffa71ff491220cac28f55237c9aad379a8656
|
||||
From c04ffa71ff491220cac28f55237c9aad379a8656 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Fri, 2 Mar 2018 14:44:36 +0100
|
||||
Subject: [PATCH] ARM64: dts: meson: reduce odroid-c2 eMMC maximum rate
|
||||
|
||||
Different modules maybe installed by the user on the eMMC connector
|
||||
of the odroid-c2. While the red modules are working without an issue,
|
||||
it seems some black modules (apparently Samsung based) are having
|
||||
issue at 200MHz
|
||||
|
||||
While the tuning algorithm introduced in v4.14 enables high speed modes
|
||||
on every other tested designs, it seems a problem remains for this
|
||||
particular combination of board and eMMC module.
|
||||
|
||||
Lowering the maximum frequency of the eMMC on this board until we can
|
||||
figure out a better solution.
|
||||
|
||||
Fixes: d341ca88eead ("mmc: meson-gx: rework tuning function")
|
||||
Suggested-by: Ellie Reeves <ellierevves@gmail.com>
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
||||
index 0bc0f65e4f37..54954b314a45 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
||||
@@ -274,7 +274,7 @@
|
||||
pinctrl-names = "default", "clk-gate";
|
||||
|
||||
bus-width = <8>;
|
||||
- max-frequency = <200000000>;
|
||||
+ max-frequency = <100000000>;
|
||||
non-removable;
|
||||
disable-wp;
|
||||
cap-mmc-highspeed;
|
||||
--
|
||||
2.11.0
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
From: Ben Hutchings <ben@decadent.org.uk>
|
||||
Date: Thu, 16 Mar 2017 03:05:43 +0000
|
||||
Subject: [amd64] Don't WARN about expected W+X pages on Xen
|
||||
Bug-Debian: https://bugs.debian.org/852324
|
||||
Forwarded: not-needed
|
||||
|
||||
Currently Xen PV domains (or at least dom0) on amd64 tend to have a
|
||||
large number of low kernel pages with W+X permissions. It's not
|
||||
obvious how to fix this, and we're not going to get any new
|
||||
information by WARNing about this, but we do still want to hear about
|
||||
other W+X cases. So add a condition to the WARN_ON.
|
||||
|
||||
---
|
||||
--- a/arch/x86/mm/dump_pagetables.c
|
||||
+++ b/arch/x86/mm/dump_pagetables.c
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/seq_file.h>
|
||||
+#include <xen/xen.h>
|
||||
|
||||
#include <asm/pgtable.h>
|
||||
|
||||
@@ -231,7 +232,7 @@ static void note_page(struct seq_file *m
|
||||
pgprotval_t pr = pgprot_val(st->current_prot);
|
||||
|
||||
if (st->check_wx && (pr & _PAGE_RW) && !(pr & _PAGE_NX)) {
|
||||
- WARN_ONCE(1,
|
||||
+ WARN_ONCE(!(IS_ENABLED(CONFIG_X86_64) && xen_pv_domain()),
|
||||
"x86/mm: Found insecure W+X mapping at address %p/%pS\n",
|
||||
(void *)st->start_address,
|
||||
(void *)st->start_address);
|
|
@ -22,6 +22,6 @@ once it's ready to speak MBIM.
|
|||
-#else
|
||||
static bool prefer_mbim;
|
||||
-#endif
|
||||
module_param(prefer_mbim, bool, S_IRUGO | S_IWUSR);
|
||||
module_param(prefer_mbim, bool, 0644);
|
||||
MODULE_PARM_DESC(prefer_mbim, "Prefer MBIM setting on dual NCM/MBIM functions");
|
||||
|
||||
|
|
|
@ -14,9 +14,9 @@ an early check to avoid failing at a point where we cannot display
|
|||
anything.
|
||||
|
||||
---
|
||||
--- a/drivers/base/firmware_class.c
|
||||
+++ b/drivers/base/firmware_class.c
|
||||
@@ -455,9 +455,12 @@ fw_get_filesystem_firmware(struct device
|
||||
--- a/drivers/base/firmware_loader/main.c
|
||||
+++ b/drivers/base/firmware_loader/main.c
|
||||
@@ -334,9 +334,12 @@ fw_get_filesystem_firmware(struct device
|
||||
}
|
||||
__putname(path);
|
||||
|
||||
|
@ -42,7 +42,7 @@ anything.
|
|||
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
|
||||
@@ -609,6 +609,7 @@ static int amdgpu_pci_probe(struct pci_d
|
||||
@@ -626,6 +626,7 @@ static int amdgpu_pci_probe(struct pci_d
|
||||
|
||||
if (!amdgpu_firmware_installed()) {
|
||||
DRM_ERROR("amdgpu requires firmware installed\n");
|
||||
|
|
|
@ -7,7 +7,7 @@ Forwarded: not-needed
|
|||
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -61,11 +61,6 @@ modules.builtin
|
||||
@@ -64,11 +64,6 @@ modules.builtin
|
||||
/*.spec
|
||||
|
||||
#
|
||||
|
@ -19,7 +19,7 @@ Forwarded: not-needed
|
|||
# Snap directory (make snap-pkg)
|
||||
#
|
||||
/snap/
|
||||
@@ -76,13 +71,6 @@ modules.builtin
|
||||
@@ -79,14 +74,6 @@ modules.builtin
|
||||
/tar-install/
|
||||
|
||||
#
|
||||
|
@ -28,15 +28,16 @@ Forwarded: not-needed
|
|||
-!.gitignore
|
||||
-!.mailmap
|
||||
-!.cocciconfig
|
||||
-!.clang-format
|
||||
-
|
||||
-#
|
||||
# Generated include files
|
||||
#
|
||||
include/config
|
||||
@@ -131,3 +119,10 @@ all.config
|
||||
#Automatically generated by ASN.1 compiler
|
||||
net/ipv4/netfilter/nf_nat_snmp_basic-asn1.c
|
||||
net/ipv4/netfilter/nf_nat_snmp_basic-asn1.h
|
||||
@@ -132,3 +119,10 @@ all.config
|
||||
|
||||
# Kdevelop4
|
||||
*.kdev4
|
||||
+
|
||||
+#
|
||||
+# Debian packaging: ignore everything at the top level, since it isn't
|
||||
|
|
|
@ -14,7 +14,7 @@ use of $(ARCH) needs to be moved after this.
|
|||
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -314,39 +314,6 @@ SUBARCH := $(shell uname -m | sed -e s/i
|
||||
@@ -323,31 +323,6 @@ SUBARCH := $(shell uname -m | sed -e s/i
|
||||
ARCH ?= $(SUBARCH)
|
||||
CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)
|
||||
|
||||
|
@ -42,19 +42,11 @@ use of $(ARCH) needs to be moved after this.
|
|||
-ifeq ($(ARCH),sh64)
|
||||
- SRCARCH := sh
|
||||
-endif
|
||||
-
|
||||
-# Additional ARCH settings for tile
|
||||
-ifeq ($(ARCH),tilepro)
|
||||
- SRCARCH := tile
|
||||
-endif
|
||||
-ifeq ($(ARCH),tilegx)
|
||||
- SRCARCH := tile
|
||||
-endif
|
||||
-
|
||||
KCONFIG_CONFIG ?= .config
|
||||
export KCONFIG_CONFIG
|
||||
|
||||
@@ -395,6 +362,38 @@ CFLAGS_KERNEL =
|
||||
@@ -400,6 +375,30 @@ CFLAGS_KERNEL =
|
||||
AFLAGS_KERNEL =
|
||||
LDFLAGS_vmlinux =
|
||||
|
||||
|
@ -81,14 +73,6 @@ use of $(ARCH) needs to be moved after this.
|
|||
+ifeq ($(ARCH),sh64)
|
||||
+ SRCARCH := sh
|
||||
+endif
|
||||
+
|
||||
+# Additional ARCH settings for tile
|
||||
+ifeq ($(ARCH),tilepro)
|
||||
+ SRCARCH := tile
|
||||
+endif
|
||||
+ifeq ($(ARCH),tilegx)
|
||||
+ SRCARCH := tile
|
||||
+endif
|
||||
+
|
||||
# Use USERINCLUDE when you must reference the UAPI directories only.
|
||||
USERINCLUDE := \
|
||||
|
|
|
@ -8,8 +8,8 @@ it by default yet.
|
|||
|
||||
--- a/kernel/sched/autogroup.c
|
||||
+++ b/kernel/sched/autogroup.c
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
#include "sched.h"
|
||||
|
||||
-unsigned int __read_mostly sysctl_sched_autogroup_enabled = 1;
|
||||
|
|
|
@ -9,16 +9,16 @@ are set.
|
|||
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1087,7 +1087,7 @@ endif
|
||||
@@ -1103,7 +1103,7 @@ endif
|
||||
prepare2: prepare3 prepare-compiler-check outputmakefile asm-generic
|
||||
|
||||
prepare1: prepare2 $(version_h) include/generated/utsrelease.h \
|
||||
prepare1: prepare2 $(version_h) $(autoksyms_h) include/generated/utsrelease.h \
|
||||
- include/config/auto.conf
|
||||
+ include/config/auto.conf include/generated/package.h
|
||||
$(cmd_crmodverdir)
|
||||
|
||||
archprepare: archheaders archscripts prepare1 scripts_basic
|
||||
@@ -1168,6 +1168,16 @@ define filechk_version.h
|
||||
@@ -1184,6 +1184,16 @@ define filechk_version.h
|
||||
echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';)
|
||||
endef
|
||||
|
||||
|
@ -35,7 +35,7 @@ are set.
|
|||
$(version_h): $(srctree)/Makefile FORCE
|
||||
$(call filechk,version.h)
|
||||
$(Q)rm -f $(old_version_h)
|
||||
@@ -1175,6 +1185,9 @@ $(version_h): $(srctree)/Makefile FORCE
|
||||
@@ -1191,6 +1201,9 @@ $(version_h): $(srctree)/Makefile FORCE
|
||||
include/generated/utsrelease.h: include/config/kernel.release FORCE
|
||||
$(call filechk,utsrelease.h)
|
||||
|
||||
|
@ -99,7 +99,7 @@ are set.
|
|||
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/io.h>
|
||||
@@ -1404,8 +1405,9 @@ void show_regs(struct pt_regs * regs)
|
||||
@@ -1422,8 +1423,9 @@ void show_regs(struct pt_regs * regs)
|
||||
|
||||
printk("NIP: "REG" LR: "REG" CTR: "REG"\n",
|
||||
regs->nip, regs->link, regs->ctr);
|
||||
|
@ -135,24 +135,26 @@ are set.
|
|||
pr_err("\"echo 0 > /proc/sys/kernel/hung_task_timeout_secs\""
|
||||
" disables this message.\n");
|
||||
sched_show_task(t);
|
||||
--- a/kernel/printk/printk.c
|
||||
+++ b/kernel/printk/printk.c
|
||||
@@ -48,6 +48,7 @@
|
||||
#include <linux/sched/clock.h>
|
||||
#include <linux/sched/debug.h>
|
||||
#include <linux/sched/task_stack.h>
|
||||
--- a/lib/dump_stack.c
|
||||
+++ b/lib/dump_stack.c
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <linux/atomic.h>
|
||||
#include <linux/kexec.h>
|
||||
#include <linux/utsname.h>
|
||||
+#include <generated/package.h>
|
||||
|
||||
#include <linux/uaccess.h>
|
||||
#include <asm/sections.h>
|
||||
@@ -3288,11 +3289,12 @@ void __init dump_stack_set_arch_desc(con
|
||||
static char dump_stack_arch_desc_str[128];
|
||||
|
||||
@@ -44,13 +45,14 @@ void __init dump_stack_set_arch_desc(con
|
||||
*/
|
||||
void dump_stack_print_info(const char *log_lvl)
|
||||
{
|
||||
- printk("%sCPU: %d PID: %d Comm: %.20s %s %s %.*s\n",
|
||||
+ printk("%sCPU: %d PID: %d Comm: %.20s %s %s %.*s%s\n",
|
||||
- printk("%sCPU: %d PID: %d Comm: %.20s %s%s %s %.*s\n",
|
||||
+ printk("%sCPU: %d PID: %d Comm: %.20s %s%s %s %.*s%s\n",
|
||||
log_lvl, raw_smp_processor_id(), current->pid, current->comm,
|
||||
print_tainted(), init_utsname()->release,
|
||||
kexec_crash_loaded() ? "Kdump: loaded " : "",
|
||||
print_tainted(),
|
||||
init_utsname()->release,
|
||||
(int)strcspn(init_utsname()->version, " "),
|
||||
- init_utsname()->version);
|
||||
+ init_utsname()->version,
|
||||
|
|
|
@ -1,155 +0,0 @@
|
|||
From: Ben Hutchings <ben@decadent.org.uk>
|
||||
Date: Tue, 14 Sep 2010 04:33:34 +0100
|
||||
Subject: Kbuild: kconfig: Verbose version of --listnewconfig
|
||||
Forwarded: http://thread.gmane.org/gmane.linux.kbuild.devel/5774
|
||||
|
||||
If the KBUILD_VERBOSE environment variable is set to non-zero, show
|
||||
the default values of new symbols and not just their names.
|
||||
|
||||
Based on work by Bastian Blank <waldi@debian.org> and
|
||||
maximilian attems <max@stro.at>. Simplified by Michal Marek
|
||||
<mmarek@suse.cz>.
|
||||
|
||||
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
||||
---
|
||||
scripts/kconfig/conf.c | 42 ++++++++++++++++++++++++++++++++----------
|
||||
scripts/kconfig/confdata.c | 9 +++++++++
|
||||
scripts/kconfig/expr.h | 2 ++
|
||||
scripts/kconfig/lkc_proto.h | 1 +
|
||||
4 files changed, 44 insertions(+), 10 deletions(-)
|
||||
|
||||
--- a/scripts/kconfig/conf.c
|
||||
+++ b/scripts/kconfig/conf.c
|
||||
@@ -369,7 +369,6 @@ static void conf(struct menu *menu)
|
||||
switch (prop->type) {
|
||||
case P_MENU:
|
||||
if ((input_mode == silentoldconfig ||
|
||||
- input_mode == listnewconfig ||
|
||||
input_mode == olddefconfig) &&
|
||||
rootEntry != menu) {
|
||||
check_conf(menu);
|
||||
@@ -430,11 +429,7 @@ static void check_conf(struct menu *menu
|
||||
if (sym && !sym_has_value(sym)) {
|
||||
if (sym_is_changable(sym) ||
|
||||
(sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) {
|
||||
- if (input_mode == listnewconfig) {
|
||||
- if (sym->name && !sym_is_choice_value(sym)) {
|
||||
- printf("%s%s\n", CONFIG_, sym->name);
|
||||
- }
|
||||
- } else if (input_mode != olddefconfig) {
|
||||
+ if (input_mode != olddefconfig) {
|
||||
if (!conf_cnt++)
|
||||
printf(_("*\n* Restart config...\n*\n"));
|
||||
rootEntry = menu_get_parent_menu(menu);
|
||||
@@ -447,6 +442,30 @@ static void check_conf(struct menu *menu
|
||||
check_conf(child);
|
||||
}
|
||||
|
||||
+static void report_conf(struct menu *menu, bool verbose)
|
||||
+{
|
||||
+ struct symbol *sym;
|
||||
+ struct menu *child;
|
||||
+
|
||||
+ if (!menu_is_visible(menu))
|
||||
+ return;
|
||||
+
|
||||
+ if (verbose && menu == &rootmenu) {
|
||||
+ printf("\n#\n"
|
||||
+ "# Changes:\n"
|
||||
+ "#\n");
|
||||
+ }
|
||||
+
|
||||
+ sym = menu->sym;
|
||||
+ if (sym && (sym->flags & SYMBOL_NEW) &&
|
||||
+ sym_is_changable(sym) && sym->name && !sym_is_choice_value(sym)) {
|
||||
+ conf_write_new_symbol(stdout, sym, verbose);
|
||||
+ }
|
||||
+
|
||||
+ for (child = menu->list; child; child = child->next)
|
||||
+ report_conf(child, verbose);
|
||||
+}
|
||||
+
|
||||
static struct option long_opts[] = {
|
||||
{"oldaskconfig", no_argument, NULL, oldaskconfig},
|
||||
{"oldconfig", no_argument, NULL, oldconfig},
|
||||
@@ -494,6 +513,7 @@ int main(int ac, char **av)
|
||||
const char *progname = av[0];
|
||||
int opt;
|
||||
const char *name, *defconfig_file = NULL /* gcc uninit */;
|
||||
+ const char *value;
|
||||
struct stat tmpstat;
|
||||
|
||||
setlocale(LC_ALL, "");
|
||||
@@ -673,16 +693,18 @@ int main(int ac, char **av)
|
||||
input_mode = silentoldconfig;
|
||||
/* fall through */
|
||||
case oldconfig:
|
||||
- case listnewconfig:
|
||||
case olddefconfig:
|
||||
case silentoldconfig:
|
||||
/* Update until a loop caused no more changes */
|
||||
do {
|
||||
conf_cnt = 0;
|
||||
check_conf(&rootmenu);
|
||||
- } while (conf_cnt &&
|
||||
- (input_mode != listnewconfig &&
|
||||
- input_mode != olddefconfig));
|
||||
+ } while (conf_cnt && input_mode != olddefconfig);
|
||||
+ break;
|
||||
+ case listnewconfig:
|
||||
+ conf_set_all_new_symbols(def_default);
|
||||
+ value = getenv("KBUILD_VERBOSE");
|
||||
+ report_conf(&rootmenu, value && atoi(value));
|
||||
break;
|
||||
}
|
||||
|
||||
--- a/scripts/kconfig/confdata.c
|
||||
+++ b/scripts/kconfig/confdata.c
|
||||
@@ -738,6 +738,14 @@ next_menu:
|
||||
return 0;
|
||||
}
|
||||
|
||||
+void conf_write_new_symbol(FILE *fp, struct symbol *sym, bool verbose)
|
||||
+{
|
||||
+ if (verbose)
|
||||
+ conf_write_symbol(fp, sym, &kconfig_printer_cb, NULL);
|
||||
+ else
|
||||
+ fprintf(fp, "%s%s\n", CONFIG_, sym->name);
|
||||
+}
|
||||
+
|
||||
int conf_write(const char *name)
|
||||
{
|
||||
FILE *out;
|
||||
@@ -1171,7 +1179,10 @@ bool conf_set_all_new_symbols(enum conf_
|
||||
bool has_changed = false;
|
||||
|
||||
for_all_symbols(i, sym) {
|
||||
- if (sym_has_value(sym) || (sym->flags & SYMBOL_VALID))
|
||||
+ if (sym_has_value(sym))
|
||||
+ continue;
|
||||
+ sym->flags |= SYMBOL_NEW;
|
||||
+ if (sym->flags & SYMBOL_VALID)
|
||||
continue;
|
||||
switch (sym_get_type(sym)) {
|
||||
case S_BOOLEAN:
|
||||
--- a/scripts/kconfig/expr.h
|
||||
+++ b/scripts/kconfig/expr.h
|
||||
@@ -114,6 +114,8 @@ struct symbol {
|
||||
/* Set symbol to y if allnoconfig; used for symbols that hide others */
|
||||
#define SYMBOL_ALLNOCONFIG_Y 0x200000
|
||||
|
||||
+#define SYMBOL_NEW 0x400000 /* symbol is new (loaded config did not provide a value) */
|
||||
+
|
||||
#define SYMBOL_MAXLENGTH 256
|
||||
#define SYMBOL_HASHSIZE 9973
|
||||
|
||||
--- a/scripts/kconfig/lkc_proto.h
|
||||
+++ b/scripts/kconfig/lkc_proto.h
|
||||
@@ -7,6 +7,7 @@ int conf_read_simple(const char *name, i
|
||||
int conf_write_defconfig(const char *name);
|
||||
int conf_write(const char *name);
|
||||
int conf_write_autoconf(void);
|
||||
+void conf_write_new_symbol(FILE*, struct symbol*, bool);
|
||||
bool conf_get_changed(void);
|
||||
void conf_set_changed_callback(void (*fn)(void));
|
||||
void conf_set_message_callback(void (*fn)(const char *fmt, va_list ap));
|
|
@ -9,11 +9,9 @@ Patch headers added by debian/patches/features/all/aufs4/gen-patch
|
|||
SPDX-License-Identifier: GPL-2.0
|
||||
aufs4.16 mmap patch
|
||||
|
||||
diff --git a/fs/proc/base.c b/fs/proc/base.c
|
||||
index 9298324..da5bf4f9 100644
|
||||
--- a/fs/proc/base.c
|
||||
+++ b/fs/proc/base.c
|
||||
@@ -2014,7 +2014,7 @@ static int map_files_get_link(struct dentry *dentry, struct path *path)
|
||||
@@ -2018,7 +2018,7 @@ static int map_files_get_link(struct den
|
||||
down_read(&mm->mmap_sem);
|
||||
vma = find_exact_vma(mm, vm_start, vm_end);
|
||||
if (vma && vma->vm_file) {
|
||||
|
@ -22,11 +20,9 @@ index 9298324..da5bf4f9 100644
|
|||
path_get(path);
|
||||
rc = 0;
|
||||
}
|
||||
diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c
|
||||
index 7563437..7c0dc0f 100644
|
||||
--- a/fs/proc/nommu.c
|
||||
+++ b/fs/proc/nommu.c
|
||||
@@ -45,7 +45,10 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region)
|
||||
@@ -45,7 +45,10 @@ static int nommu_region_show(struct seq_
|
||||
file = region->vm_file;
|
||||
|
||||
if (file) {
|
||||
|
@ -38,11 +34,9 @@ index 7563437..7c0dc0f 100644
|
|||
dev = inode->i_sb->s_dev;
|
||||
ino = inode->i_ino;
|
||||
}
|
||||
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
|
||||
index ec6d298..34c7193 100644
|
||||
--- a/fs/proc/task_mmu.c
|
||||
+++ b/fs/proc/task_mmu.c
|
||||
@@ -311,7 +311,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
|
||||
@@ -305,7 +305,10 @@ show_map_vma(struct seq_file *m, struct
|
||||
const char *name = NULL;
|
||||
|
||||
if (file) {
|
||||
|
@ -54,7 +48,7 @@ index ec6d298..34c7193 100644
|
|||
dev = inode->i_sb->s_dev;
|
||||
ino = inode->i_ino;
|
||||
pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
|
||||
@@ -1741,7 +1744,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
|
||||
@@ -1722,7 +1725,7 @@ static int show_numa_map(struct seq_file
|
||||
struct proc_maps_private *proc_priv = &numa_priv->proc_maps;
|
||||
struct vm_area_struct *vma = v;
|
||||
struct numa_maps *md = &numa_priv->md;
|
||||
|
@ -63,11 +57,9 @@ index ec6d298..34c7193 100644
|
|||
struct mm_struct *mm = vma->vm_mm;
|
||||
struct mm_walk walk = {
|
||||
.hugetlb_entry = gather_hugetlb_stats,
|
||||
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
|
||||
index 5b62f57..dfb4a3b 100644
|
||||
--- a/fs/proc/task_nommu.c
|
||||
+++ b/fs/proc/task_nommu.c
|
||||
@@ -156,7 +156,10 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
|
||||
@@ -156,7 +156,10 @@ static int nommu_vma_show(struct seq_fil
|
||||
file = vma->vm_file;
|
||||
|
||||
if (file) {
|
||||
|
@ -79,11 +71,9 @@ index 5b62f57..dfb4a3b 100644
|
|||
dev = inode->i_sb->s_dev;
|
||||
ino = inode->i_ino;
|
||||
pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT;
|
||||
diff --git a/include/linux/mm.h b/include/linux/mm.h
|
||||
index ad06d42..75e5d37 100644
|
||||
--- a/include/linux/mm.h
|
||||
+++ b/include/linux/mm.h
|
||||
@@ -1368,6 +1368,28 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping,
|
||||
@@ -1380,6 +1380,28 @@ static inline void unmap_shared_mapping_
|
||||
unmap_mapping_range(mapping, holebegin, holelen, 0);
|
||||
}
|
||||
|
||||
|
@ -112,11 +102,9 @@ index ad06d42..75e5d37 100644
|
|||
extern int access_process_vm(struct task_struct *tsk, unsigned long addr,
|
||||
void *buf, int len, unsigned int gup_flags);
|
||||
extern int access_remote_vm(struct mm_struct *mm, unsigned long addr,
|
||||
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
|
||||
index fd1af6b..89ec438 100644
|
||||
--- a/include/linux/mm_types.h
|
||||
+++ b/include/linux/mm_types.h
|
||||
@@ -249,6 +249,7 @@ struct vm_region {
|
||||
@@ -251,6 +251,7 @@ struct vm_region {
|
||||
unsigned long vm_top; /* region allocated to here */
|
||||
unsigned long vm_pgoff; /* the offset in vm_file corresponding to vm_start */
|
||||
struct file *vm_file; /* the backing file or NULL */
|
||||
|
@ -124,7 +112,7 @@ index fd1af6b..89ec438 100644
|
|||
|
||||
int vm_usage; /* region usage count (access under nommu_region_sem) */
|
||||
bool vm_icache_flushed : 1; /* true if the icache has been flushed for
|
||||
@@ -323,6 +324,7 @@ struct vm_area_struct {
|
||||
@@ -325,6 +326,7 @@ struct vm_area_struct {
|
||||
unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE
|
||||
units */
|
||||
struct file * vm_file; /* File we map to (can be NULL). */
|
||||
|
@ -132,11 +120,9 @@ index fd1af6b..89ec438 100644
|
|||
void * vm_private_data; /* was vm_pte (shared mem) */
|
||||
|
||||
atomic_long_t swap_readahead_info;
|
||||
diff --git a/kernel/fork.c b/kernel/fork.c
|
||||
index e5d9d40..f6f6fbf 100644
|
||||
--- a/kernel/fork.c
|
||||
+++ b/kernel/fork.c
|
||||
@@ -474,7 +474,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,
|
||||
@@ -474,7 +474,7 @@ static __latent_entropy int dup_mmap(str
|
||||
struct inode *inode = file_inode(file);
|
||||
struct address_space *mapping = file->f_mapping;
|
||||
|
||||
|
@ -145,24 +131,20 @@ index e5d9d40..f6f6fbf 100644
|
|||
if (tmp->vm_flags & VM_DENYWRITE)
|
||||
atomic_dec(&inode->i_writecount);
|
||||
i_mmap_lock_write(mapping);
|
||||
diff --git a/mm/Makefile b/mm/Makefile
|
||||
index e669f02..9c36567 100644
|
||||
--- a/mm/Makefile
|
||||
+++ b/mm/Makefile
|
||||
@@ -39,7 +39,7 @@ obj-y := filemap.o mempool.o oom_kill.o \
|
||||
@@ -39,7 +39,7 @@ obj-y := filemap.o mempool.o oom_kill.
|
||||
mm_init.o mmu_context.o percpu.o slab_common.o \
|
||||
compaction.o vmacache.o swap_slots.o \
|
||||
compaction.o vmacache.o \
|
||||
interval_tree.o list_lru.o workingset.o \
|
||||
- debug.o $(mmu-y)
|
||||
+ prfile.o debug.o $(mmu-y)
|
||||
|
||||
obj-y += init-mm.o
|
||||
|
||||
diff --git a/mm/filemap.c b/mm/filemap.c
|
||||
index 693f622..ea46048 100644
|
||||
--- a/mm/filemap.c
|
||||
+++ b/mm/filemap.c
|
||||
@@ -2703,7 +2703,7 @@ int filemap_page_mkwrite(struct vm_fault *vmf)
|
||||
@@ -2701,7 +2701,7 @@ int filemap_page_mkwrite(struct vm_fault
|
||||
int ret = VM_FAULT_LOCKED;
|
||||
|
||||
sb_start_pagefault(inode->i_sb);
|
||||
|
@ -171,11 +153,9 @@ index 693f622..ea46048 100644
|
|||
lock_page(page);
|
||||
if (page->mapping != inode->i_mapping) {
|
||||
unlock_page(page);
|
||||
diff --git a/mm/mmap.c b/mm/mmap.c
|
||||
index 9efdc021..d77f01f 100644
|
||||
--- a/mm/mmap.c
|
||||
+++ b/mm/mmap.c
|
||||
@@ -171,7 +171,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
|
||||
@@ -171,7 +171,7 @@ static struct vm_area_struct *remove_vma
|
||||
if (vma->vm_ops && vma->vm_ops->close)
|
||||
vma->vm_ops->close(vma);
|
||||
if (vma->vm_file)
|
||||
|
@ -184,7 +164,7 @@ index 9efdc021..d77f01f 100644
|
|||
mpol_put(vma_policy(vma));
|
||||
kmem_cache_free(vm_area_cachep, vma);
|
||||
return next;
|
||||
@@ -896,7 +896,7 @@ int __vma_adjust(struct vm_area_struct *vma, unsigned long start,
|
||||
@@ -896,7 +896,7 @@ again:
|
||||
if (remove_next) {
|
||||
if (file) {
|
||||
uprobe_munmap(next, next->vm_start, next->vm_end);
|
||||
|
@ -193,7 +173,7 @@ index 9efdc021..d77f01f 100644
|
|||
}
|
||||
if (next->anon_vma)
|
||||
anon_vma_merge(vma, next);
|
||||
@@ -1761,8 +1761,8 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
|
||||
@@ -1779,8 +1779,8 @@ out:
|
||||
return addr;
|
||||
|
||||
unmap_and_free_vma:
|
||||
|
@ -203,7 +183,7 @@ index 9efdc021..d77f01f 100644
|
|||
|
||||
/* Undo any partial mapping done by a device driver. */
|
||||
unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end);
|
||||
@@ -2586,7 +2586,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
|
||||
@@ -2604,7 +2604,7 @@ int __split_vma(struct mm_struct *mm, st
|
||||
goto out_free_mpol;
|
||||
|
||||
if (new->vm_file)
|
||||
|
@ -212,7 +192,7 @@ index 9efdc021..d77f01f 100644
|
|||
|
||||
if (new->vm_ops && new->vm_ops->open)
|
||||
new->vm_ops->open(new);
|
||||
@@ -2605,7 +2605,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
|
||||
@@ -2623,7 +2623,7 @@ int __split_vma(struct mm_struct *mm, st
|
||||
if (new->vm_ops && new->vm_ops->close)
|
||||
new->vm_ops->close(new);
|
||||
if (new->vm_file)
|
||||
|
@ -221,7 +201,7 @@ index 9efdc021..d77f01f 100644
|
|||
unlink_anon_vmas(new);
|
||||
out_free_mpol:
|
||||
mpol_put(vma_policy(new));
|
||||
@@ -2767,7 +2767,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
|
||||
@@ -2785,7 +2785,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsign
|
||||
struct vm_area_struct *vma;
|
||||
unsigned long populate = 0;
|
||||
unsigned long ret = -EINVAL;
|
||||
|
@ -230,7 +210,7 @@ index 9efdc021..d77f01f 100644
|
|||
|
||||
pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.txt.\n",
|
||||
current->comm, current->pid);
|
||||
@@ -2842,10 +2842,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
|
||||
@@ -2860,10 +2860,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsign
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -259,7 +239,7 @@ index 9efdc021..d77f01f 100644
|
|||
out:
|
||||
up_write(&mm->mmap_sem);
|
||||
if (populate)
|
||||
@@ -3153,7 +3170,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
|
||||
@@ -3171,7 +3188,7 @@ struct vm_area_struct *copy_vma(struct v
|
||||
if (anon_vma_clone(new_vma, vma))
|
||||
goto out_free_mempol;
|
||||
if (new_vma->vm_file)
|
||||
|
@ -268,11 +248,9 @@ index 9efdc021..d77f01f 100644
|
|||
if (new_vma->vm_ops && new_vma->vm_ops->open)
|
||||
new_vma->vm_ops->open(new_vma);
|
||||
vma_link(mm, new_vma, prev, rb_link, rb_parent);
|
||||
diff --git a/mm/nommu.c b/mm/nommu.c
|
||||
index ebb6e61..8cf2428 100644
|
||||
--- a/mm/nommu.c
|
||||
+++ b/mm/nommu.c
|
||||
@@ -641,7 +641,7 @@ static void __put_nommu_region(struct vm_region *region)
|
||||
@@ -629,7 +629,7 @@ static void __put_nommu_region(struct vm
|
||||
up_write(&nommu_region_sem);
|
||||
|
||||
if (region->vm_file)
|
||||
|
@ -281,7 +259,7 @@ index ebb6e61..8cf2428 100644
|
|||
|
||||
/* IO memory and memory shared directly out of the pagecache
|
||||
* from ramfs/tmpfs mustn't be released here */
|
||||
@@ -799,7 +799,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma)
|
||||
@@ -767,7 +767,7 @@ static void delete_vma(struct mm_struct
|
||||
if (vma->vm_ops && vma->vm_ops->close)
|
||||
vma->vm_ops->close(vma);
|
||||
if (vma->vm_file)
|
||||
|
@ -290,7 +268,7 @@ index ebb6e61..8cf2428 100644
|
|||
put_nommu_region(vma->vm_region);
|
||||
kmem_cache_free(vm_area_cachep, vma);
|
||||
}
|
||||
@@ -1321,7 +1321,7 @@ unsigned long do_mmap(struct file *file,
|
||||
@@ -1289,7 +1289,7 @@ unsigned long do_mmap(struct file *file,
|
||||
goto error_just_free;
|
||||
}
|
||||
}
|
||||
|
@ -299,7 +277,7 @@ index ebb6e61..8cf2428 100644
|
|||
kmem_cache_free(vm_region_jar, region);
|
||||
region = pregion;
|
||||
result = start;
|
||||
@@ -1396,10 +1396,10 @@ unsigned long do_mmap(struct file *file,
|
||||
@@ -1364,10 +1364,10 @@ error_just_free:
|
||||
up_write(&nommu_region_sem);
|
||||
error:
|
||||
if (region->vm_file)
|
||||
|
@ -312,9 +290,6 @@ index ebb6e61..8cf2428 100644
|
|||
kmem_cache_free(vm_area_cachep, vma);
|
||||
return ret;
|
||||
|
||||
diff --git a/mm/prfile.c b/mm/prfile.c
|
||||
new file mode 100644
|
||||
index 0000000..14efc4f
|
||||
--- /dev/null
|
||||
+++ b/mm/prfile.c
|
||||
@@ -0,0 +1,86 @@
|
||||
|
|
|
@ -9,11 +9,9 @@ Patch headers added by debian/patches/features/all/aufs4/gen-patch
|
|||
SPDX-License-Identifier: GPL-2.0
|
||||
aufs4.16 standalone patch
|
||||
|
||||
diff --git a/fs/dcache.c b/fs/dcache.c
|
||||
index 87c19c0..b66fb04 100644
|
||||
--- a/fs/dcache.c
|
||||
+++ b/fs/dcache.c
|
||||
@@ -1313,6 +1313,7 @@ void d_walk(struct dentry *parent, void *data,
|
||||
@@ -1342,6 +1342,7 @@ rename_retry:
|
||||
seq = 1;
|
||||
goto again;
|
||||
}
|
||||
|
@ -21,7 +19,7 @@ index 87c19c0..b66fb04 100644
|
|||
|
||||
struct check_mount {
|
||||
struct vfsmount *mnt;
|
||||
@@ -2931,6 +2932,7 @@ void d_exchange(struct dentry *dentry1, struct dentry *dentry2)
|
||||
@@ -2920,6 +2921,7 @@ void d_exchange(struct dentry *dentry1,
|
||||
|
||||
write_sequnlock(&rename_lock);
|
||||
}
|
||||
|
@ -29,11 +27,9 @@ index 87c19c0..b66fb04 100644
|
|||
|
||||
/**
|
||||
* d_ancestor - search for an ancestor
|
||||
diff --git a/fs/exec.c b/fs/exec.c
|
||||
index 7eb8d21..56d7985 100644
|
||||
--- a/fs/exec.c
|
||||
+++ b/fs/exec.c
|
||||
@@ -109,6 +109,7 @@ bool path_noexec(const struct path *path)
|
||||
@@ -109,6 +109,7 @@ bool path_noexec(const struct path *path
|
||||
return (path->mnt->mnt_flags & MNT_NOEXEC) ||
|
||||
(path->mnt->mnt_sb->s_iflags & SB_I_NOEXEC);
|
||||
}
|
||||
|
@ -41,11 +37,9 @@ index 7eb8d21..56d7985 100644
|
|||
|
||||
#ifdef CONFIG_USELIB
|
||||
/*
|
||||
diff --git a/fs/fcntl.c b/fs/fcntl.c
|
||||
index 8cd01f7..bdd1c6c 100644
|
||||
--- a/fs/fcntl.c
|
||||
+++ b/fs/fcntl.c
|
||||
@@ -85,6 +85,7 @@ int setfl(int fd, struct file * filp, unsigned long arg)
|
||||
@@ -85,6 +85,7 @@ int setfl(int fd, struct file * filp, un
|
||||
out:
|
||||
return error;
|
||||
}
|
||||
|
@ -53,11 +47,9 @@ index 8cd01f7..bdd1c6c 100644
|
|||
|
||||
static void f_modown(struct file *filp, struct pid *pid, enum pid_type type,
|
||||
int force)
|
||||
diff --git a/fs/file_table.c b/fs/file_table.c
|
||||
index 7ec0b3e..819ee07 100644
|
||||
--- a/fs/file_table.c
|
||||
+++ b/fs/file_table.c
|
||||
@@ -147,6 +147,7 @@ struct file *get_empty_filp(void)
|
||||
@@ -147,6 +147,7 @@ over:
|
||||
}
|
||||
return ERR_PTR(-ENFILE);
|
||||
}
|
||||
|
@ -89,11 +81,9 @@ index 7ec0b3e..819ee07 100644
|
|||
|
||||
void __init files_init(void)
|
||||
{
|
||||
diff --git a/fs/inode.c b/fs/inode.c
|
||||
index 929a5a3..d93653e 100644
|
||||
--- a/fs/inode.c
|
||||
+++ b/fs/inode.c
|
||||
@@ -1668,6 +1668,7 @@ int update_time(struct inode *inode, struct timespec *time, int flags)
|
||||
@@ -1671,6 +1671,7 @@ int update_time(struct inode *inode, str
|
||||
|
||||
return update_time(inode, time, flags);
|
||||
}
|
||||
|
@ -101,11 +91,9 @@ index 929a5a3..d93653e 100644
|
|||
|
||||
/**
|
||||
* touch_atime - update the access time
|
||||
diff --git a/fs/namespace.c b/fs/namespace.c
|
||||
index 26ef600..a4b9707 100644
|
||||
--- a/fs/namespace.c
|
||||
+++ b/fs/namespace.c
|
||||
@@ -517,6 +517,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
|
||||
@@ -517,6 +517,7 @@ void __mnt_drop_write(struct vfsmount *m
|
||||
mnt_dec_writers(real_mount(mnt));
|
||||
preempt_enable();
|
||||
}
|
||||
|
@ -113,7 +101,7 @@ index 26ef600..a4b9707 100644
|
|||
|
||||
/**
|
||||
* mnt_drop_write - give up write access to a mount
|
||||
@@ -851,6 +852,7 @@ int is_current_mnt_ns(struct vfsmount *mnt)
|
||||
@@ -851,6 +852,7 @@ int is_current_mnt_ns(struct vfsmount *m
|
||||
{
|
||||
return check_mnt(real_mount(mnt));
|
||||
}
|
||||
|
@ -121,7 +109,7 @@ index 26ef600..a4b9707 100644
|
|||
|
||||
/*
|
||||
* vfsmount lock must be held for write
|
||||
@@ -1887,6 +1889,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
|
||||
@@ -1892,6 +1894,7 @@ int iterate_mounts(int (*f)(struct vfsmo
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -129,8 +117,6 @@ index 26ef600..a4b9707 100644
|
|||
|
||||
static void cleanup_group_ids(struct mount *mnt, struct mount *end)
|
||||
{
|
||||
diff --git a/fs/notify/group.c b/fs/notify/group.c
|
||||
index b7a4b6a..5a69d60 100644
|
||||
--- a/fs/notify/group.c
|
||||
+++ b/fs/notify/group.c
|
||||
@@ -22,6 +22,7 @@
|
||||
|
@ -141,7 +127,7 @@ index b7a4b6a..5a69d60 100644
|
|||
|
||||
#include <linux/fsnotify_backend.h>
|
||||
#include "fsnotify.h"
|
||||
@@ -109,6 +110,7 @@ void fsnotify_get_group(struct fsnotify_group *group)
|
||||
@@ -109,6 +110,7 @@ void fsnotify_get_group(struct fsnotify_
|
||||
{
|
||||
refcount_inc(&group->refcnt);
|
||||
}
|
||||
|
@ -149,7 +135,7 @@ index b7a4b6a..5a69d60 100644
|
|||
|
||||
/*
|
||||
* Drop a reference to a group. Free it if it's through.
|
||||
@@ -118,6 +120,7 @@ void fsnotify_put_group(struct fsnotify_group *group)
|
||||
@@ -118,6 +120,7 @@ void fsnotify_put_group(struct fsnotify_
|
||||
if (refcount_dec_and_test(&group->refcnt))
|
||||
fsnotify_final_destroy_group(group);
|
||||
}
|
||||
|
@ -157,7 +143,7 @@ index b7a4b6a..5a69d60 100644
|
|||
|
||||
/*
|
||||
* Create a new fsnotify_group and hold a reference for the group returned.
|
||||
@@ -147,6 +150,7 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops)
|
||||
@@ -147,6 +150,7 @@ struct fsnotify_group *fsnotify_alloc_gr
|
||||
|
||||
return group;
|
||||
}
|
||||
|
@ -165,11 +151,9 @@ index b7a4b6a..5a69d60 100644
|
|||
|
||||
int fsnotify_fasync(int fd, struct file *file, int on)
|
||||
{
|
||||
diff --git a/fs/notify/mark.c b/fs/notify/mark.c
|
||||
index e9191b4..1f8ccfa 100644
|
||||
--- a/fs/notify/mark.c
|
||||
+++ b/fs/notify/mark.c
|
||||
@@ -108,6 +108,7 @@ void fsnotify_get_mark(struct fsnotify_mark *mark)
|
||||
@@ -108,6 +108,7 @@ void fsnotify_get_mark(struct fsnotify_m
|
||||
WARN_ON_ONCE(!refcount_read(&mark->refcnt));
|
||||
refcount_inc(&mark->refcnt);
|
||||
}
|
||||
|
@ -177,7 +161,7 @@ index e9191b4..1f8ccfa 100644
|
|||
|
||||
static void __fsnotify_recalc_mask(struct fsnotify_mark_connector *conn)
|
||||
{
|
||||
@@ -392,6 +393,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark,
|
||||
@@ -392,6 +393,7 @@ void fsnotify_destroy_mark(struct fsnoti
|
||||
mutex_unlock(&group->mark_mutex);
|
||||
fsnotify_free_mark(mark);
|
||||
}
|
||||
|
@ -185,7 +169,7 @@ index e9191b4..1f8ccfa 100644
|
|||
|
||||
/*
|
||||
* Sorting function for lists of fsnotify marks.
|
||||
@@ -606,6 +608,7 @@ int fsnotify_add_mark_locked(struct fsnotify_mark *mark, struct inode *inode,
|
||||
@@ -606,6 +608,7 @@ err:
|
||||
fsnotify_put_mark(mark);
|
||||
return ret;
|
||||
}
|
||||
|
@ -193,7 +177,7 @@ index e9191b4..1f8ccfa 100644
|
|||
|
||||
int fsnotify_add_mark(struct fsnotify_mark *mark, struct inode *inode,
|
||||
struct vfsmount *mnt, int allow_dups)
|
||||
@@ -741,6 +744,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark,
|
||||
@@ -741,6 +744,7 @@ void fsnotify_init_mark(struct fsnotify_
|
||||
fsnotify_get_group(group);
|
||||
mark->group = group;
|
||||
}
|
||||
|
@ -201,11 +185,9 @@ index e9191b4..1f8ccfa 100644
|
|||
|
||||
/*
|
||||
* Destroy all marks in destroy_list, waits for SRCU period to finish before
|
||||
diff --git a/fs/open.c b/fs/open.c
|
||||
index 7ea1184..6e2e241 100644
|
||||
--- a/fs/open.c
|
||||
+++ b/fs/open.c
|
||||
@@ -64,6 +64,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
|
||||
@@ -64,6 +64,7 @@ int do_truncate(struct dentry *dentry, l
|
||||
inode_unlock(dentry->d_inode);
|
||||
return ret;
|
||||
}
|
||||
|
@ -213,19 +195,9 @@ index 7ea1184..6e2e241 100644
|
|||
|
||||
long vfs_truncate(const struct path *path, loff_t length)
|
||||
{
|
||||
@@ -691,6 +692,7 @@ int open_check_o_direct(struct file *f)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(open_check_o_direct);
|
||||
|
||||
static int do_dentry_open(struct file *f,
|
||||
struct inode *inode,
|
||||
diff --git a/fs/read_write.c b/fs/read_write.c
|
||||
index 0a5c47b..d423a5f 100644
|
||||
--- a/fs/read_write.c
|
||||
+++ b/fs/read_write.c
|
||||
@@ -454,6 +454,7 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos)
|
||||
@@ -459,6 +459,7 @@ ssize_t vfs_read(struct file *file, char
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -233,7 +205,7 @@ index 0a5c47b..d423a5f 100644
|
|||
|
||||
static ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos)
|
||||
{
|
||||
@@ -494,6 +495,7 @@ vfs_readf_t vfs_readf(struct file *file)
|
||||
@@ -499,6 +500,7 @@ vfs_readf_t vfs_readf(struct file *file)
|
||||
return new_sync_read;
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
|
@ -241,7 +213,7 @@ index 0a5c47b..d423a5f 100644
|
|||
|
||||
vfs_writef_t vfs_writef(struct file *file)
|
||||
{
|
||||
@@ -505,6 +507,7 @@ vfs_writef_t vfs_writef(struct file *file)
|
||||
@@ -510,6 +512,7 @@ vfs_writef_t vfs_writef(struct file *fil
|
||||
return new_sync_write;
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
|
@ -249,7 +221,7 @@ index 0a5c47b..d423a5f 100644
|
|||
|
||||
ssize_t __kernel_write(struct file *file, const void *buf, size_t count, loff_t *pos)
|
||||
{
|
||||
@@ -574,6 +577,7 @@ ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_
|
||||
@@ -579,6 +582,7 @@ ssize_t vfs_write(struct file *file, con
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -257,11 +229,9 @@ index 0a5c47b..d423a5f 100644
|
|||
|
||||
static inline loff_t file_pos_read(struct file *file)
|
||||
{
|
||||
diff --git a/fs/splice.c b/fs/splice.c
|
||||
index c5fb195..ce01a74 100644
|
||||
--- a/fs/splice.c
|
||||
+++ b/fs/splice.c
|
||||
@@ -850,6 +850,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
|
||||
@@ -850,6 +850,7 @@ long do_splice_from(struct pipe_inode_in
|
||||
|
||||
return splice_write(pipe, out, ppos, len, flags);
|
||||
}
|
||||
|
@ -269,7 +239,7 @@ index c5fb195..ce01a74 100644
|
|||
|
||||
/*
|
||||
* Attempt to initiate a splice from a file to a pipe.
|
||||
@@ -879,6 +880,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
|
||||
@@ -879,6 +880,7 @@ long do_splice_to(struct file *in, loff_
|
||||
|
||||
return splice_read(in, ppos, pipe, len, flags);
|
||||
}
|
||||
|
@ -277,11 +247,9 @@ index c5fb195..ce01a74 100644
|
|||
|
||||
/**
|
||||
* splice_direct_to_actor - splices data directly between two non-pipes
|
||||
diff --git a/fs/sync.c b/fs/sync.c
|
||||
index a6891ee..47a78bd 100644
|
||||
--- a/fs/sync.c
|
||||
+++ b/fs/sync.c
|
||||
@@ -39,6 +39,7 @@ int __sync_filesystem(struct super_block *sb, int wait)
|
||||
@@ -39,6 +39,7 @@ int __sync_filesystem(struct super_block
|
||||
sb->s_op->sync_fs(sb, wait);
|
||||
return __sync_blockdev(sb->s_bdev, wait);
|
||||
}
|
||||
|
@ -289,11 +257,9 @@ index a6891ee..47a78bd 100644
|
|||
|
||||
/*
|
||||
* Write out and wait upon all dirty data associated with this
|
||||
diff --git a/fs/xattr.c b/fs/xattr.c
|
||||
index 61cd28b..35570cd 100644
|
||||
--- a/fs/xattr.c
|
||||
+++ b/fs/xattr.c
|
||||
@@ -297,6 +297,7 @@ vfs_getxattr_alloc(struct dentry *dentry, const char *name, char **xattr_value,
|
||||
@@ -297,6 +297,7 @@ vfs_getxattr_alloc(struct dentry *dentry
|
||||
*xattr_value = value;
|
||||
return error;
|
||||
}
|
||||
|
@ -301,11 +267,9 @@ index 61cd28b..35570cd 100644
|
|||
|
||||
ssize_t
|
||||
__vfs_getxattr(struct dentry *dentry, struct inode *inode, const char *name,
|
||||
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
|
||||
index 0dca42f..7bb20c5 100644
|
||||
--- a/kernel/locking/lockdep.c
|
||||
+++ b/kernel/locking/lockdep.c
|
||||
@@ -151,6 +151,7 @@ inline struct lock_class *lockdep_hlock_class(struct held_lock *hlock)
|
||||
@@ -151,6 +151,7 @@ inline struct lock_class *lockdep_hlock_
|
||||
}
|
||||
return lock_classes + hlock->class_idx - 1;
|
||||
}
|
||||
|
@ -313,8 +277,6 @@ index 0dca42f..7bb20c5 100644
|
|||
#define hlock_class(hlock) lockdep_hlock_class(hlock)
|
||||
|
||||
#ifdef CONFIG_LOCK_STAT
|
||||
diff --git a/kernel/task_work.c b/kernel/task_work.c
|
||||
index 0fef395..83fb1ec 100644
|
||||
--- a/kernel/task_work.c
|
||||
+++ b/kernel/task_work.c
|
||||
@@ -116,3 +116,4 @@ void task_work_run(void)
|
||||
|
@ -322,8 +284,6 @@ index 0fef395..83fb1ec 100644
|
|||
}
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(task_work_run);
|
||||
diff --git a/security/commoncap.c b/security/commoncap.c
|
||||
index 48620c9..4981104 100644
|
||||
--- a/security/commoncap.c
|
||||
+++ b/security/commoncap.c
|
||||
@@ -1330,12 +1330,14 @@ int cap_mmap_addr(unsigned long addr)
|
||||
|
@ -341,8 +301,6 @@ index 48620c9..4981104 100644
|
|||
|
||||
#ifdef CONFIG_SECURITY
|
||||
|
||||
diff --git a/security/device_cgroup.c b/security/device_cgroup.c
|
||||
index c65b39b..e363d22 100644
|
||||
--- a/security/device_cgroup.c
|
||||
+++ b/security/device_cgroup.c
|
||||
@@ -8,6 +8,7 @@
|
||||
|
@ -353,16 +311,14 @@ index c65b39b..e363d22 100644
|
|||
#include <linux/list.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/seq_file.h>
|
||||
@@ -824,3 +825,4 @@ int __devcgroup_check_permission(short type, u32 major, u32 minor,
|
||||
@@ -824,3 +825,4 @@ int __devcgroup_check_permission(short t
|
||||
|
||||
return 0;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(__devcgroup_check_permission);
|
||||
diff --git a/security/security.c b/security/security.c
|
||||
index 1cd8526..f2e4736 100644
|
||||
--- a/security/security.c
|
||||
+++ b/security/security.c
|
||||
@@ -531,6 +531,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry)
|
||||
@@ -537,6 +537,7 @@ int security_path_rmdir(const struct pat
|
||||
return 0;
|
||||
return call_int_hook(path_rmdir, 0, dir, dentry);
|
||||
}
|
||||
|
@ -370,7 +326,7 @@ index 1cd8526..f2e4736 100644
|
|||
|
||||
int security_path_unlink(const struct path *dir, struct dentry *dentry)
|
||||
{
|
||||
@@ -547,6 +548,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry,
|
||||
@@ -553,6 +554,7 @@ int security_path_symlink(const struct p
|
||||
return 0;
|
||||
return call_int_hook(path_symlink, 0, dir, dentry, old_name);
|
||||
}
|
||||
|
@ -378,7 +334,7 @@ index 1cd8526..f2e4736 100644
|
|||
|
||||
int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
|
||||
struct dentry *new_dentry)
|
||||
@@ -555,6 +557,7 @@ int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
|
||||
@@ -561,6 +563,7 @@ int security_path_link(struct dentry *ol
|
||||
return 0;
|
||||
return call_int_hook(path_link, 0, old_dentry, new_dir, new_dentry);
|
||||
}
|
||||
|
@ -386,7 +342,7 @@ index 1cd8526..f2e4736 100644
|
|||
|
||||
int security_path_rename(const struct path *old_dir, struct dentry *old_dentry,
|
||||
const struct path *new_dir, struct dentry *new_dentry,
|
||||
@@ -582,6 +585,7 @@ int security_path_truncate(const struct path *path)
|
||||
@@ -588,6 +591,7 @@ int security_path_truncate(const struct
|
||||
return 0;
|
||||
return call_int_hook(path_truncate, 0, path);
|
||||
}
|
||||
|
@ -394,7 +350,7 @@ index 1cd8526..f2e4736 100644
|
|||
|
||||
int security_path_chmod(const struct path *path, umode_t mode)
|
||||
{
|
||||
@@ -589,6 +593,7 @@ int security_path_chmod(const struct path *path, umode_t mode)
|
||||
@@ -595,6 +599,7 @@ int security_path_chmod(const struct pat
|
||||
return 0;
|
||||
return call_int_hook(path_chmod, 0, path, mode);
|
||||
}
|
||||
|
@ -402,7 +358,7 @@ index 1cd8526..f2e4736 100644
|
|||
|
||||
int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
|
||||
{
|
||||
@@ -596,6 +601,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
|
||||
@@ -602,6 +607,7 @@ int security_path_chown(const struct pat
|
||||
return 0;
|
||||
return call_int_hook(path_chown, 0, path, uid, gid);
|
||||
}
|
||||
|
@ -410,7 +366,7 @@ index 1cd8526..f2e4736 100644
|
|||
|
||||
int security_path_chroot(const struct path *path)
|
||||
{
|
||||
@@ -681,6 +687,7 @@ int security_inode_readlink(struct dentry *dentry)
|
||||
@@ -687,6 +693,7 @@ int security_inode_readlink(struct dentr
|
||||
return 0;
|
||||
return call_int_hook(inode_readlink, 0, dentry);
|
||||
}
|
||||
|
@ -418,7 +374,7 @@ index 1cd8526..f2e4736 100644
|
|||
|
||||
int security_inode_follow_link(struct dentry *dentry, struct inode *inode,
|
||||
bool rcu)
|
||||
@@ -696,6 +703,7 @@ int security_inode_permission(struct inode *inode, int mask)
|
||||
@@ -702,6 +709,7 @@ int security_inode_permission(struct ino
|
||||
return 0;
|
||||
return call_int_hook(inode_permission, 0, inode, mask);
|
||||
}
|
||||
|
@ -426,7 +382,7 @@ index 1cd8526..f2e4736 100644
|
|||
|
||||
int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
|
||||
{
|
||||
@@ -867,6 +875,7 @@ int security_file_permission(struct file *file, int mask)
|
||||
@@ -873,6 +881,7 @@ int security_file_permission(struct file
|
||||
|
||||
return fsnotify_perm(file, mask);
|
||||
}
|
||||
|
@ -434,7 +390,7 @@ index 1cd8526..f2e4736 100644
|
|||
|
||||
int security_file_alloc(struct file *file)
|
||||
{
|
||||
@@ -926,6 +935,7 @@ int security_mmap_file(struct file *file, unsigned long prot,
|
||||
@@ -932,6 +941,7 @@ int security_mmap_file(struct file *file
|
||||
return ret;
|
||||
return ima_file_mmap(file, prot);
|
||||
}
|
||||
|
|
|
@ -17,16 +17,14 @@ cc: linux-acpi@vger.kernel.org
|
|||
drivers/acpi/osl.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
|
||||
index db78d353bab1..36c6527c1b0a 100644
|
||||
--- a/drivers/acpi/osl.c
|
||||
+++ b/drivers/acpi/osl.c
|
||||
@@ -192,7 +192,7 @@ acpi_physical_address __init acpi_os_get_root_pointer(void)
|
||||
acpi_physical_address pa = 0;
|
||||
@@ -192,7 +192,7 @@ acpi_physical_address __init acpi_os_get
|
||||
acpi_physical_address pa;
|
||||
|
||||
#ifdef CONFIG_KEXEC
|
||||
- if (acpi_rsdp)
|
||||
+ if (acpi_rsdp && !kernel_is_locked_down("ACPI RSDP specification"))
|
||||
return acpi_rsdp;
|
||||
#endif
|
||||
|
||||
pa = acpi_arch_get_root_pointer();
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
From: David Howells <dhowells@redhat.com>
|
||||
Date: Wed, 8 Nov 2017 15:11:35 +0000
|
||||
Subject: [19/29] scsi: Lock down the eata driver
|
||||
Origin: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/commit?id=54aab7f5b0e4e6f68cec46d92c37e6c482b5e56e
|
||||
|
||||
When the kernel is running in secure boot mode, we lock down the kernel to
|
||||
prevent userspace from modifying the running kernel image. Whilst this
|
||||
includes prohibiting access to things like /dev/mem, it must also prevent
|
||||
access by means of configuring driver modules in such a way as to cause a
|
||||
device to access or modify the kernel image.
|
||||
|
||||
The eata driver takes a single string parameter that contains a slew of
|
||||
settings, including hardware resource configuration. Prohibit use of the
|
||||
parameter if the kernel is locked down.
|
||||
|
||||
Suggested-by: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
|
||||
Signed-off-by: David Howells <dhowells@redhat.com>
|
||||
cc: Dario Ballabio <ballabio_dario@emc.com>
|
||||
cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
|
||||
cc: "Martin K. Petersen" <martin.petersen@oracle.com>
|
||||
cc: linux-scsi@vger.kernel.org
|
||||
---
|
||||
drivers/scsi/eata.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c
|
||||
index 6501c330d8c8..72fceaa8f3da 100644
|
||||
--- a/drivers/scsi/eata.c
|
||||
+++ b/drivers/scsi/eata.c
|
||||
@@ -1552,8 +1552,11 @@ static int eata2x_detect(struct scsi_host_template *tpnt)
|
||||
|
||||
tpnt->proc_name = "eata2x";
|
||||
|
||||
- if (strlen(boot_options))
|
||||
+ if (strlen(boot_options)) {
|
||||
+ if (kernel_is_locked_down("Command line-specified device addresses, irqs and dma channels"))
|
||||
+ return -EPERM;
|
||||
option_setup(boot_options);
|
||||
+ }
|
||||
|
||||
#if defined(MODULE)
|
||||
/* io_port could have been modified when loading as a module */
|
|
@ -14,11 +14,9 @@ Signed-off-by: David Howells <dhowells@redhat.com>
|
|||
kernel/params.c | 26 +++++++++++++++++++++-----
|
||||
1 file changed, 21 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/kernel/params.c b/kernel/params.c
|
||||
index 60b2d8101355..422979adb60a 100644
|
||||
--- a/kernel/params.c
|
||||
+++ b/kernel/params.c
|
||||
@@ -108,13 +108,19 @@ bool parameq(const char *a, const char *b)
|
||||
@@ -108,13 +108,19 @@ bool parameq(const char *a, const char *
|
||||
return parameqn(a, b, strlen(a)+1);
|
||||
}
|
||||
|
||||
|
@ -27,8 +25,8 @@ index 60b2d8101355..422979adb60a 100644
|
|||
+ const char *doing)
|
||||
{
|
||||
if (kp->flags & KERNEL_PARAM_FL_UNSAFE) {
|
||||
pr_warn("Setting dangerous option %s - tainting kernel\n",
|
||||
kp->name);
|
||||
pr_notice("Setting dangerous option %s - tainting kernel\n",
|
||||
kp->name);
|
||||
add_taint(TAINT_USER, LOCKDEP_STILL_OK);
|
||||
}
|
||||
+
|
||||
|
@ -52,7 +50,7 @@ index 60b2d8101355..422979adb60a 100644
|
|||
kernel_param_unlock(params[i].mod);
|
||||
return err;
|
||||
}
|
||||
@@ -556,6 +564,12 @@ static ssize_t param_attr_show(struct module_attribute *mattr,
|
||||
@@ -553,6 +561,12 @@ static ssize_t param_attr_show(struct mo
|
||||
return count;
|
||||
}
|
||||
|
||||
|
@ -65,7 +63,7 @@ index 60b2d8101355..422979adb60a 100644
|
|||
/* sysfs always hands a nul-terminated string in buf. We rely on that. */
|
||||
static ssize_t param_attr_store(struct module_attribute *mattr,
|
||||
struct module_kobject *mk,
|
||||
@@ -568,8 +582,10 @@ static ssize_t param_attr_store(struct module_attribute *mattr,
|
||||
@@ -565,8 +579,10 @@ static ssize_t param_attr_store(struct m
|
||||
return -EPERM;
|
||||
|
||||
kernel_param_lock(mk->mod);
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
From d7dcf718bacf638a4a6c5a62110d49c88e70ae3f Mon Sep 17 00:00:00 2001
|
||||
From: Harald Geyer <harald@ccbib.org>
|
||||
Date: Thu, 15 Mar 2018 16:25:08 +0000
|
||||
Subject: [PATCH] arm64: dts: allwinner: a64: add simplefb for A64 SoC
|
||||
|
||||
The A64 SoC features two display pipelines, one has a LCD output, the
|
||||
other has a HDMI output.
|
||||
|
||||
Add support for simplefb for the LCD output. Tested on Teres I.
|
||||
|
||||
This patch was inspired by work of Icenowy Zheng.
|
||||
|
||||
Signed-off-by: Harald Geyer <harald@ccbib.org>
|
||||
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
||||
---
|
||||
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 20 ++++++++++++++++++++
|
||||
1 file changed, 20 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
|
||||
index 5a70ed2093cd..58d1199ef9dd 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
|
||||
@@ -56,6 +56,26 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
+ chosen {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ ranges;
|
||||
+
|
||||
+/*
|
||||
+ * The pipeline mixer0-lcd0 depends on clock CLK_MIXER0 from DE2 CCU.
|
||||
+ * However there is no support for this clock on A64 yet, so we depend
|
||||
+ * on the upstream clocks here to keep them (and thus CLK_MIXER0) up.
|
||||
+ */
|
||||
+ simplefb_lcd: framebuffer-lcd {
|
||||
+ compatible = "allwinner,simple-framebuffer",
|
||||
+ "simple-framebuffer";
|
||||
+ allwinner,pipeline = "mixer0-lcd0";
|
||||
+ clocks = <&ccu CLK_TCON0>,
|
||||
+ <&ccu CLK_DE>, <&ccu CLK_BUS_DE>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
cpus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
--
|
||||
2.11.0
|
||||
|
|
@ -1,399 +0,0 @@
|
|||
From 56337b5576074ece867054b1ec231017a1a0a6b8 Mon Sep 17 00:00:00 2001
|
||||
From: Preetham Ramchandra <pchandru@nvidia.com>
|
||||
Date: Mon, 12 Mar 2018 17:10:33 +0530
|
||||
Subject: [PATCH 1/7] ata: ahci_tegra: Update initialization sequence
|
||||
|
||||
Update the controller initialization sequence and move Tegra124
|
||||
specifics to tegra124_ahci_init.
|
||||
|
||||
Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
|
||||
Acked-by: Thierry Reding <treding@nvidia.com>
|
||||
Signed-off-by: Tejun Heo <tj@kernel.org>
|
||||
---
|
||||
drivers/ata/ahci_tegra.c | 288 ++++++++++++++++++++++++++++++++++++-----------
|
||||
1 file changed, 224 insertions(+), 64 deletions(-)
|
||||
|
||||
diff --git a/drivers/ata/ahci_tegra.c b/drivers/ata/ahci_tegra.c
|
||||
index 3a62eb246d80..055c65082a93 100644
|
||||
--- a/drivers/ata/ahci_tegra.c
|
||||
+++ b/drivers/ata/ahci_tegra.c
|
||||
@@ -34,7 +34,8 @@
|
||||
#define DRV_NAME "tegra-ahci"
|
||||
|
||||
#define SATA_CONFIGURATION_0 0x180
|
||||
-#define SATA_CONFIGURATION_EN_FPCI BIT(0)
|
||||
+#define SATA_CONFIGURATION_0_EN_FPCI BIT(0)
|
||||
+#define SATA_CONFIGURATION_0_CLK_OVERRIDE BIT(31)
|
||||
|
||||
#define SCFG_OFFSET 0x1000
|
||||
|
||||
@@ -45,17 +46,55 @@
|
||||
#define T_SATA0_CFG_1_SERR BIT(8)
|
||||
|
||||
#define T_SATA0_CFG_9 0x24
|
||||
-#define T_SATA0_CFG_9_BASE_ADDRESS_SHIFT 13
|
||||
+#define T_SATA0_CFG_9_BASE_ADDRESS 0x40020000
|
||||
|
||||
#define SATA_FPCI_BAR5 0x94
|
||||
-#define SATA_FPCI_BAR5_START_SHIFT 4
|
||||
+#define SATA_FPCI_BAR5_START_MASK (0xfffffff << 4)
|
||||
+#define SATA_FPCI_BAR5_START (0x0040020 << 4)
|
||||
+#define SATA_FPCI_BAR5_ACCESS_TYPE (0x1)
|
||||
|
||||
#define SATA_INTR_MASK 0x188
|
||||
#define SATA_INTR_MASK_IP_INT_MASK BIT(16)
|
||||
|
||||
+#define T_SATA0_CFG_35 0x94
|
||||
+#define T_SATA0_CFG_35_IDP_INDEX_MASK (0x7ff << 2)
|
||||
+#define T_SATA0_CFG_35_IDP_INDEX (0x2a << 2)
|
||||
+
|
||||
+#define T_SATA0_AHCI_IDP1 0x98
|
||||
+#define T_SATA0_AHCI_IDP1_DATA (0x400040)
|
||||
+
|
||||
+#define T_SATA0_CFG_PHY_1 0x12c
|
||||
+#define T_SATA0_CFG_PHY_1_PADS_IDDQ_EN BIT(23)
|
||||
+#define T_SATA0_CFG_PHY_1_PAD_PLL_IDDQ_EN BIT(22)
|
||||
+
|
||||
+#define T_SATA0_NVOOB 0x114
|
||||
+#define T_SATA0_NVOOB_COMMA_CNT_MASK (0xff << 16)
|
||||
+#define T_SATA0_NVOOB_COMMA_CNT (0x07 << 16)
|
||||
+#define T_SATA0_NVOOB_SQUELCH_FILTER_MODE_MASK (0x3 << 24)
|
||||
+#define T_SATA0_NVOOB_SQUELCH_FILTER_MODE (0x1 << 24)
|
||||
+#define T_SATA0_NVOOB_SQUELCH_FILTER_LENGTH_MASK (0x3 << 26)
|
||||
+#define T_SATA0_NVOOB_SQUELCH_FILTER_LENGTH (0x3 << 26)
|
||||
+
|
||||
+#define T_SATA_CFG_PHY_0 0x120
|
||||
+#define T_SATA_CFG_PHY_0_USE_7BIT_ALIGN_DET_FOR_SPD BIT(11)
|
||||
+#define T_SATA_CFG_PHY_0_MASK_SQUELCH BIT(24)
|
||||
+
|
||||
+#define T_SATA0_CFG2NVOOB_2 0x134
|
||||
+#define T_SATA0_CFG2NVOOB_2_COMWAKE_IDLE_CNT_LOW_MASK (0x1ff << 18)
|
||||
+#define T_SATA0_CFG2NVOOB_2_COMWAKE_IDLE_CNT_LOW (0xc << 18)
|
||||
+
|
||||
#define T_SATA0_AHCI_HBA_CAP_BKDR 0x300
|
||||
+#define T_SATA0_AHCI_HBA_CAP_BKDR_PARTIAL_ST_CAP BIT(13)
|
||||
+#define T_SATA0_AHCI_HBA_CAP_BKDR_SLUMBER_ST_CAP BIT(14)
|
||||
+#define T_SATA0_AHCI_HBA_CAP_BKDR_SALP BIT(26)
|
||||
+#define T_SATA0_AHCI_HBA_CAP_BKDR_SUPP_PM BIT(17)
|
||||
+#define T_SATA0_AHCI_HBA_CAP_BKDR_SNCQ BIT(30)
|
||||
|
||||
#define T_SATA0_BKDOOR_CC 0x4a4
|
||||
+#define T_SATA0_BKDOOR_CC_CLASS_CODE_MASK (0xffff << 16)
|
||||
+#define T_SATA0_BKDOOR_CC_CLASS_CODE (0x0106 << 16)
|
||||
+#define T_SATA0_BKDOOR_CC_PROG_IF_MASK (0xff << 8)
|
||||
+#define T_SATA0_BKDOOR_CC_PROG_IF (0x01 << 8)
|
||||
|
||||
#define T_SATA0_CFG_SATA 0x54c
|
||||
#define T_SATA0_CFG_SATA_BACKDOOR_PROG_IF_EN BIT(12)
|
||||
@@ -82,6 +121,27 @@
|
||||
#define T_SATA0_CHX_PHY_CTRL11 0x6d0
|
||||
#define T_SATA0_CHX_PHY_CTRL11_GEN2_RX_EQ (0x2800 << 16)
|
||||
|
||||
+#define T_SATA0_CHX_PHY_CTRL17_0 0x6e8
|
||||
+#define T_SATA0_CHX_PHY_CTRL17_0_RX_EQ_CTRL_L_GEN1 0x55010000
|
||||
+#define T_SATA0_CHX_PHY_CTRL18_0 0x6ec
|
||||
+#define T_SATA0_CHX_PHY_CTRL18_0_RX_EQ_CTRL_L_GEN2 0x55010000
|
||||
+#define T_SATA0_CHX_PHY_CTRL20_0 0x6f4
|
||||
+#define T_SATA0_CHX_PHY_CTRL20_0_RX_EQ_CTRL_H_GEN1 0x1
|
||||
+#define T_SATA0_CHX_PHY_CTRL21_0 0x6f8
|
||||
+#define T_SATA0_CHX_PHY_CTRL21_0_RX_EQ_CTRL_H_GEN2 0x1
|
||||
+
|
||||
+/* AUX Registers */
|
||||
+#define SATA_AUX_MISC_CNTL_1_0 0x8
|
||||
+#define SATA_AUX_MISC_CNTL_1_0_DEVSLP_OVERRIDE BIT(17)
|
||||
+#define SATA_AUX_MISC_CNTL_1_0_SDS_SUPPORT BIT(13)
|
||||
+#define SATA_AUX_MISC_CNTL_1_0_DESO_SUPPORT BIT(15)
|
||||
+
|
||||
+#define SATA_AUX_RX_STAT_INT_0 0xc
|
||||
+#define SATA_AUX_RX_STAT_INT_0_SATA_DEVSLP BIT(7)
|
||||
+
|
||||
+#define SATA_AUX_SPARE_CFG0_0 0x18
|
||||
+#define SATA_AUX_SPARE_CFG0_0_MDAT_TIMER_AFTER_PG_VALID BIT(14)
|
||||
+
|
||||
#define FUSE_SATA_CALIB 0x124
|
||||
#define FUSE_SATA_CALIB_MASK 0x3
|
||||
|
||||
@@ -99,6 +159,14 @@ static const struct sata_pad_calibration tegra124_pad_calibration[] = {
|
||||
{0x14, 0x0e, 0x1a, 0x0e},
|
||||
};
|
||||
|
||||
+struct tegra_ahci_ops {
|
||||
+ int (*init)(struct ahci_host_priv *hpriv);
|
||||
+};
|
||||
+
|
||||
+struct tegra_ahci_soc {
|
||||
+ const struct tegra_ahci_ops *ops;
|
||||
+};
|
||||
+
|
||||
struct tegra_ahci_priv {
|
||||
struct platform_device *pdev;
|
||||
void __iomem *sata_regs;
|
||||
@@ -108,8 +176,53 @@ struct tegra_ahci_priv {
|
||||
/* Needs special handling, cannot use ahci_platform */
|
||||
struct clk *sata_clk;
|
||||
struct regulator_bulk_data supplies[5];
|
||||
+ const struct tegra_ahci_soc *soc;
|
||||
};
|
||||
|
||||
+static int tegra124_ahci_init(struct ahci_host_priv *hpriv)
|
||||
+{
|
||||
+ struct tegra_ahci_priv *tegra = hpriv->plat_data;
|
||||
+ struct sata_pad_calibration calib;
|
||||
+ int ret;
|
||||
+ u32 val;
|
||||
+
|
||||
+ /* Pad calibration */
|
||||
+ ret = tegra_fuse_readl(FUSE_SATA_CALIB, &val);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ calib = tegra124_pad_calibration[val & FUSE_SATA_CALIB_MASK];
|
||||
+
|
||||
+ writel(BIT(0), tegra->sata_regs + SCFG_OFFSET + T_SATA0_INDEX);
|
||||
+
|
||||
+ val = readl(tegra->sata_regs +
|
||||
+ SCFG_OFFSET + T_SATA0_CHX_PHY_CTRL1_GEN1);
|
||||
+ val &= ~T_SATA0_CHX_PHY_CTRL1_GEN1_TX_AMP_MASK;
|
||||
+ val &= ~T_SATA0_CHX_PHY_CTRL1_GEN1_TX_PEAK_MASK;
|
||||
+ val |= calib.gen1_tx_amp << T_SATA0_CHX_PHY_CTRL1_GEN1_TX_AMP_SHIFT;
|
||||
+ val |= calib.gen1_tx_peak << T_SATA0_CHX_PHY_CTRL1_GEN1_TX_PEAK_SHIFT;
|
||||
+ writel(val, tegra->sata_regs + SCFG_OFFSET +
|
||||
+ T_SATA0_CHX_PHY_CTRL1_GEN1);
|
||||
+
|
||||
+ val = readl(tegra->sata_regs +
|
||||
+ SCFG_OFFSET + T_SATA0_CHX_PHY_CTRL1_GEN2);
|
||||
+ val &= ~T_SATA0_CHX_PHY_CTRL1_GEN2_TX_AMP_MASK;
|
||||
+ val &= ~T_SATA0_CHX_PHY_CTRL1_GEN2_TX_PEAK_MASK;
|
||||
+ val |= calib.gen2_tx_amp << T_SATA0_CHX_PHY_CTRL1_GEN1_TX_AMP_SHIFT;
|
||||
+ val |= calib.gen2_tx_peak << T_SATA0_CHX_PHY_CTRL1_GEN1_TX_PEAK_SHIFT;
|
||||
+ writel(val, tegra->sata_regs + SCFG_OFFSET +
|
||||
+ T_SATA0_CHX_PHY_CTRL1_GEN2);
|
||||
+
|
||||
+ writel(T_SATA0_CHX_PHY_CTRL11_GEN2_RX_EQ,
|
||||
+ tegra->sata_regs + SCFG_OFFSET + T_SATA0_CHX_PHY_CTRL11);
|
||||
+ writel(T_SATA0_CHX_PHY_CTRL2_CDR_CNTL_GEN1,
|
||||
+ tegra->sata_regs + SCFG_OFFSET + T_SATA0_CHX_PHY_CTRL2);
|
||||
+
|
||||
+ writel(0, tegra->sata_regs + SCFG_OFFSET + T_SATA0_INDEX);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int tegra_ahci_power_on(struct ahci_host_priv *hpriv)
|
||||
{
|
||||
struct tegra_ahci_priv *tegra = hpriv->plat_data;
|
||||
@@ -169,8 +282,7 @@ static int tegra_ahci_controller_init(struct ahci_host_priv *hpriv)
|
||||
{
|
||||
struct tegra_ahci_priv *tegra = hpriv->plat_data;
|
||||
int ret;
|
||||
- unsigned int val;
|
||||
- struct sata_pad_calibration calib;
|
||||
+ u32 val;
|
||||
|
||||
ret = tegra_ahci_power_on(hpriv);
|
||||
if (ret) {
|
||||
@@ -179,78 +291,114 @@ static int tegra_ahci_controller_init(struct ahci_host_priv *hpriv)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * Program the following SATA IPFS registers to allow SW accesses to
|
||||
+ * SATA's MMIO register range.
|
||||
+ */
|
||||
+ val = readl(tegra->sata_regs + SATA_FPCI_BAR5);
|
||||
+ val &= ~(SATA_FPCI_BAR5_START_MASK | SATA_FPCI_BAR5_ACCESS_TYPE);
|
||||
+ val |= SATA_FPCI_BAR5_START | SATA_FPCI_BAR5_ACCESS_TYPE;
|
||||
+ writel(val, tegra->sata_regs + SATA_FPCI_BAR5);
|
||||
+
|
||||
+ /* Program the following SATA IPFS register to enable the SATA */
|
||||
val = readl(tegra->sata_regs + SATA_CONFIGURATION_0);
|
||||
- val |= SATA_CONFIGURATION_EN_FPCI;
|
||||
+ val |= SATA_CONFIGURATION_0_EN_FPCI;
|
||||
writel(val, tegra->sata_regs + SATA_CONFIGURATION_0);
|
||||
|
||||
- /* Pad calibration */
|
||||
-
|
||||
- ret = tegra_fuse_readl(FUSE_SATA_CALIB, &val);
|
||||
- if (ret) {
|
||||
- dev_err(&tegra->pdev->dev,
|
||||
- "failed to read calibration fuse: %d\n", ret);
|
||||
- return ret;
|
||||
- }
|
||||
-
|
||||
- calib = tegra124_pad_calibration[val & FUSE_SATA_CALIB_MASK];
|
||||
-
|
||||
- writel(BIT(0), tegra->sata_regs + SCFG_OFFSET + T_SATA0_INDEX);
|
||||
-
|
||||
- val = readl(tegra->sata_regs +
|
||||
- SCFG_OFFSET + T_SATA0_CHX_PHY_CTRL1_GEN1);
|
||||
- val &= ~T_SATA0_CHX_PHY_CTRL1_GEN1_TX_AMP_MASK;
|
||||
- val &= ~T_SATA0_CHX_PHY_CTRL1_GEN1_TX_PEAK_MASK;
|
||||
- val |= calib.gen1_tx_amp <<
|
||||
- T_SATA0_CHX_PHY_CTRL1_GEN1_TX_AMP_SHIFT;
|
||||
- val |= calib.gen1_tx_peak <<
|
||||
- T_SATA0_CHX_PHY_CTRL1_GEN1_TX_PEAK_SHIFT;
|
||||
- writel(val, tegra->sata_regs + SCFG_OFFSET +
|
||||
- T_SATA0_CHX_PHY_CTRL1_GEN1);
|
||||
-
|
||||
- val = readl(tegra->sata_regs +
|
||||
- SCFG_OFFSET + T_SATA0_CHX_PHY_CTRL1_GEN2);
|
||||
- val &= ~T_SATA0_CHX_PHY_CTRL1_GEN2_TX_AMP_MASK;
|
||||
- val &= ~T_SATA0_CHX_PHY_CTRL1_GEN2_TX_PEAK_MASK;
|
||||
- val |= calib.gen2_tx_amp <<
|
||||
- T_SATA0_CHX_PHY_CTRL1_GEN1_TX_AMP_SHIFT;
|
||||
- val |= calib.gen2_tx_peak <<
|
||||
- T_SATA0_CHX_PHY_CTRL1_GEN1_TX_PEAK_SHIFT;
|
||||
- writel(val, tegra->sata_regs + SCFG_OFFSET +
|
||||
- T_SATA0_CHX_PHY_CTRL1_GEN2);
|
||||
-
|
||||
- writel(T_SATA0_CHX_PHY_CTRL11_GEN2_RX_EQ,
|
||||
- tegra->sata_regs + SCFG_OFFSET + T_SATA0_CHX_PHY_CTRL11);
|
||||
- writel(T_SATA0_CHX_PHY_CTRL2_CDR_CNTL_GEN1,
|
||||
- tegra->sata_regs + SCFG_OFFSET + T_SATA0_CHX_PHY_CTRL2);
|
||||
-
|
||||
- writel(0, tegra->sata_regs + SCFG_OFFSET + T_SATA0_INDEX);
|
||||
-
|
||||
- /* Program controller device ID */
|
||||
+ /* Electrical settings for better link stability */
|
||||
+ val = T_SATA0_CHX_PHY_CTRL17_0_RX_EQ_CTRL_L_GEN1;
|
||||
+ writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_CHX_PHY_CTRL17_0);
|
||||
+ val = T_SATA0_CHX_PHY_CTRL18_0_RX_EQ_CTRL_L_GEN2;
|
||||
+ writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_CHX_PHY_CTRL18_0);
|
||||
+ val = T_SATA0_CHX_PHY_CTRL20_0_RX_EQ_CTRL_H_GEN1;
|
||||
+ writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_CHX_PHY_CTRL20_0);
|
||||
+ val = T_SATA0_CHX_PHY_CTRL21_0_RX_EQ_CTRL_H_GEN2;
|
||||
+ writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_CHX_PHY_CTRL21_0);
|
||||
+
|
||||
+ /* For SQUELCH Filter & Gen3 drive getting detected as Gen1 drive */
|
||||
+
|
||||
+ val = readl(tegra->sata_regs + SCFG_OFFSET + T_SATA_CFG_PHY_0);
|
||||
+ val |= T_SATA_CFG_PHY_0_MASK_SQUELCH;
|
||||
+ val &= ~T_SATA_CFG_PHY_0_USE_7BIT_ALIGN_DET_FOR_SPD;
|
||||
+ writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA_CFG_PHY_0);
|
||||
+
|
||||
+ val = readl(tegra->sata_regs + SCFG_OFFSET + T_SATA0_NVOOB);
|
||||
+ val &= ~(T_SATA0_NVOOB_COMMA_CNT_MASK |
|
||||
+ T_SATA0_NVOOB_SQUELCH_FILTER_LENGTH_MASK |
|
||||
+ T_SATA0_NVOOB_SQUELCH_FILTER_MODE_MASK);
|
||||
+ val |= (T_SATA0_NVOOB_COMMA_CNT |
|
||||
+ T_SATA0_NVOOB_SQUELCH_FILTER_LENGTH |
|
||||
+ T_SATA0_NVOOB_SQUELCH_FILTER_MODE);
|
||||
+ writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_NVOOB);
|
||||
+
|
||||
+ /*
|
||||
+ * Change CFG2NVOOB_2_COMWAKE_IDLE_CNT_LOW from 83.3 ns to 58.8ns
|
||||
+ */
|
||||
+ val = readl(tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG2NVOOB_2);
|
||||
+ val &= ~T_SATA0_CFG2NVOOB_2_COMWAKE_IDLE_CNT_LOW_MASK;
|
||||
+ val |= T_SATA0_CFG2NVOOB_2_COMWAKE_IDLE_CNT_LOW;
|
||||
+ writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG2NVOOB_2);
|
||||
+
|
||||
+ if (tegra->soc->ops && tegra->soc->ops->init)
|
||||
+ tegra->soc->ops->init(hpriv);
|
||||
+
|
||||
+ /*
|
||||
+ * Program the following SATA configuration registers to
|
||||
+ * initialize SATA
|
||||
+ */
|
||||
+ val = readl(tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG_1);
|
||||
+ val |= (T_SATA0_CFG_1_IO_SPACE | T_SATA0_CFG_1_MEMORY_SPACE |
|
||||
+ T_SATA0_CFG_1_BUS_MASTER | T_SATA0_CFG_1_SERR);
|
||||
+ writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG_1);
|
||||
+ val = T_SATA0_CFG_9_BASE_ADDRESS;
|
||||
+ writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG_9);
|
||||
|
||||
+ /* Program Class Code and Programming interface for SATA */
|
||||
val = readl(tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG_SATA);
|
||||
val |= T_SATA0_CFG_SATA_BACKDOOR_PROG_IF_EN;
|
||||
writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG_SATA);
|
||||
|
||||
- writel(0x01060100, tegra->sata_regs + SCFG_OFFSET + T_SATA0_BKDOOR_CC);
|
||||
+ val = readl(tegra->sata_regs + SCFG_OFFSET + T_SATA0_BKDOOR_CC);
|
||||
+ val &=
|
||||
+ ~(T_SATA0_BKDOOR_CC_CLASS_CODE_MASK |
|
||||
+ T_SATA0_BKDOOR_CC_PROG_IF_MASK);
|
||||
+ val |= T_SATA0_BKDOOR_CC_CLASS_CODE | T_SATA0_BKDOOR_CC_PROG_IF;
|
||||
+ writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_BKDOOR_CC);
|
||||
|
||||
val = readl(tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG_SATA);
|
||||
val &= ~T_SATA0_CFG_SATA_BACKDOOR_PROG_IF_EN;
|
||||
writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG_SATA);
|
||||
|
||||
- /* Enable IO & memory access, bus master mode */
|
||||
-
|
||||
- val = readl(tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG_1);
|
||||
- val |= T_SATA0_CFG_1_IO_SPACE | T_SATA0_CFG_1_MEMORY_SPACE |
|
||||
- T_SATA0_CFG_1_BUS_MASTER | T_SATA0_CFG_1_SERR;
|
||||
- writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG_1);
|
||||
-
|
||||
- /* Program SATA MMIO */
|
||||
-
|
||||
- writel(0x10000 << SATA_FPCI_BAR5_START_SHIFT,
|
||||
- tegra->sata_regs + SATA_FPCI_BAR5);
|
||||
+ /* Enabling LPM capabilities through Backdoor Programming */
|
||||
+ val = readl(tegra->sata_regs + SCFG_OFFSET + T_SATA0_AHCI_HBA_CAP_BKDR);
|
||||
+ val |= (T_SATA0_AHCI_HBA_CAP_BKDR_PARTIAL_ST_CAP |
|
||||
+ T_SATA0_AHCI_HBA_CAP_BKDR_SLUMBER_ST_CAP |
|
||||
+ T_SATA0_AHCI_HBA_CAP_BKDR_SALP |
|
||||
+ T_SATA0_AHCI_HBA_CAP_BKDR_SUPP_PM);
|
||||
+ writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_AHCI_HBA_CAP_BKDR);
|
||||
+
|
||||
+ /* SATA Second Level Clock Gating configuration
|
||||
+ * Enabling Gating of Tx/Rx clocks and driving Pad IDDQ and Lane
|
||||
+ * IDDQ Signals
|
||||
+ */
|
||||
+ val = readl(tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG_35);
|
||||
+ val &= ~T_SATA0_CFG_35_IDP_INDEX_MASK;
|
||||
+ val |= T_SATA0_CFG_35_IDP_INDEX;
|
||||
+ writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG_35);
|
||||
+
|
||||
+ val = T_SATA0_AHCI_IDP1_DATA;
|
||||
+ writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_AHCI_IDP1);
|
||||
+
|
||||
+ val = readl(tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG_PHY_1);
|
||||
+ val |= (T_SATA0_CFG_PHY_1_PADS_IDDQ_EN |
|
||||
+ T_SATA0_CFG_PHY_1_PAD_PLL_IDDQ_EN);
|
||||
+ writel(val, tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG_PHY_1);
|
||||
+
|
||||
+ /* Enabling IPFS Clock Gating */
|
||||
+ val = readl(tegra->sata_regs + SATA_CONFIGURATION_0);
|
||||
+ val &= ~SATA_CONFIGURATION_0_CLK_OVERRIDE;
|
||||
+ writel(val, tegra->sata_regs + SATA_CONFIGURATION_0);
|
||||
|
||||
- writel(0x08000 << T_SATA0_CFG_9_BASE_ADDRESS_SHIFT,
|
||||
- tegra->sata_regs + SCFG_OFFSET + T_SATA0_CFG_9);
|
||||
|
||||
/* Unmask SATA interrupts */
|
||||
|
||||
@@ -285,8 +433,19 @@ static const struct ata_port_info ahci_tegra_port_info = {
|
||||
.port_ops = &ahci_tegra_port_ops,
|
||||
};
|
||||
|
||||
+static const struct tegra_ahci_ops tegra124_ahci_ops = {
|
||||
+ .init = tegra124_ahci_init,
|
||||
+};
|
||||
+
|
||||
+static const struct tegra_ahci_soc tegra124_ahci_soc = {
|
||||
+ .ops = &tegra124_ahci_ops,
|
||||
+};
|
||||
+
|
||||
static const struct of_device_id tegra_ahci_of_match[] = {
|
||||
- { .compatible = "nvidia,tegra124-ahci" },
|
||||
+ {
|
||||
+ .compatible = "nvidia,tegra124-ahci",
|
||||
+ .data = &tegra124_ahci_soc
|
||||
+ },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, tegra_ahci_of_match);
|
||||
@@ -313,6 +472,7 @@ static int tegra_ahci_probe(struct platform_device *pdev)
|
||||
hpriv->plat_data = tegra;
|
||||
|
||||
tegra->pdev = pdev;
|
||||
+ tegra->soc = of_device_get_match_data(&pdev->dev);
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
|
||||
tegra->sata_regs = devm_ioremap_resource(&pdev->dev, res);
|
||||
--
|
||||
2.11.0
|
||||
|
|
@ -1,117 +0,0 @@
|
|||
From 43ee827b562b092f594375945aec9178f9b5cca4 Mon Sep 17 00:00:00 2001
|
||||
From: Preetham Ramchandra <pchandru@nvidia.com>
|
||||
Date: Mon, 12 Mar 2018 17:10:34 +0530
|
||||
Subject: [PATCH 2/7] ata: ahci_tegra: initialize regulators from soc struct
|
||||
|
||||
Get the regulator names to be initialized from soc structure
|
||||
and initialize them.
|
||||
|
||||
Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
|
||||
Acked-by: Thierry Reding <treding@nvidia.com>
|
||||
Signed-off-by: Tejun Heo <tj@kernel.org>
|
||||
---
|
||||
drivers/ata/ahci_tegra.c | 33 +++++++++++++++++++++++----------
|
||||
1 file changed, 23 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/drivers/ata/ahci_tegra.c b/drivers/ata/ahci_tegra.c
|
||||
index 055c65082a93..547a6f93922c 100644
|
||||
--- a/drivers/ata/ahci_tegra.c
|
||||
+++ b/drivers/ata/ahci_tegra.c
|
||||
@@ -164,6 +164,8 @@ struct tegra_ahci_ops {
|
||||
};
|
||||
|
||||
struct tegra_ahci_soc {
|
||||
+ const char *const *supply_names;
|
||||
+ u32 num_supplies;
|
||||
const struct tegra_ahci_ops *ops;
|
||||
};
|
||||
|
||||
@@ -175,7 +177,7 @@ struct tegra_ahci_priv {
|
||||
struct reset_control *sata_cold_rst;
|
||||
/* Needs special handling, cannot use ahci_platform */
|
||||
struct clk *sata_clk;
|
||||
- struct regulator_bulk_data supplies[5];
|
||||
+ struct regulator_bulk_data *supplies;
|
||||
const struct tegra_ahci_soc *soc;
|
||||
};
|
||||
|
||||
@@ -228,7 +230,7 @@ static int tegra_ahci_power_on(struct ahci_host_priv *hpriv)
|
||||
struct tegra_ahci_priv *tegra = hpriv->plat_data;
|
||||
int ret;
|
||||
|
||||
- ret = regulator_bulk_enable(ARRAY_SIZE(tegra->supplies),
|
||||
+ ret = regulator_bulk_enable(tegra->soc->num_supplies,
|
||||
tegra->supplies);
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -257,7 +259,7 @@ static int tegra_ahci_power_on(struct ahci_host_priv *hpriv)
|
||||
tegra_powergate_power_off(TEGRA_POWERGATE_SATA);
|
||||
|
||||
disable_regulators:
|
||||
- regulator_bulk_disable(ARRAY_SIZE(tegra->supplies), tegra->supplies);
|
||||
+ regulator_bulk_disable(tegra->soc->num_supplies, tegra->supplies);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -275,7 +277,7 @@ static void tegra_ahci_power_off(struct ahci_host_priv *hpriv)
|
||||
clk_disable_unprepare(tegra->sata_clk);
|
||||
tegra_powergate_power_off(TEGRA_POWERGATE_SATA);
|
||||
|
||||
- regulator_bulk_disable(ARRAY_SIZE(tegra->supplies), tegra->supplies);
|
||||
+ regulator_bulk_disable(tegra->soc->num_supplies, tegra->supplies);
|
||||
}
|
||||
|
||||
static int tegra_ahci_controller_init(struct ahci_host_priv *hpriv)
|
||||
@@ -433,11 +435,17 @@ static const struct ata_port_info ahci_tegra_port_info = {
|
||||
.port_ops = &ahci_tegra_port_ops,
|
||||
};
|
||||
|
||||
+static const char *const tegra124_supply_names[] = {
|
||||
+ "avdd", "hvdd", "vddio", "target-5v", "target-12v"
|
||||
+};
|
||||
+
|
||||
static const struct tegra_ahci_ops tegra124_ahci_ops = {
|
||||
.init = tegra124_ahci_init,
|
||||
};
|
||||
|
||||
static const struct tegra_ahci_soc tegra124_ahci_soc = {
|
||||
+ .supply_names = tegra124_supply_names,
|
||||
+ .num_supplies = ARRAY_SIZE(tegra124_supply_names),
|
||||
.ops = &tegra124_ahci_ops,
|
||||
};
|
||||
|
||||
@@ -460,6 +468,7 @@ static int tegra_ahci_probe(struct platform_device *pdev)
|
||||
struct tegra_ahci_priv *tegra;
|
||||
struct resource *res;
|
||||
int ret;
|
||||
+ unsigned int i;
|
||||
|
||||
hpriv = ahci_platform_get_resources(pdev);
|
||||
if (IS_ERR(hpriv))
|
||||
@@ -503,13 +512,17 @@ static int tegra_ahci_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(tegra->sata_clk);
|
||||
}
|
||||
|
||||
- tegra->supplies[0].supply = "avdd";
|
||||
- tegra->supplies[1].supply = "hvdd";
|
||||
- tegra->supplies[2].supply = "vddio";
|
||||
- tegra->supplies[3].supply = "target-5v";
|
||||
- tegra->supplies[4].supply = "target-12v";
|
||||
+ tegra->supplies = devm_kcalloc(&pdev->dev,
|
||||
+ tegra->soc->num_supplies,
|
||||
+ sizeof(*tegra->supplies), GFP_KERNEL);
|
||||
+ if (!tegra->supplies)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ for (i = 0; i < tegra->soc->num_supplies; i++)
|
||||
+ tegra->supplies[i].supply = tegra->soc->supply_names[i];
|
||||
|
||||
- ret = devm_regulator_bulk_get(&pdev->dev, ARRAY_SIZE(tegra->supplies),
|
||||
+ ret = devm_regulator_bulk_get(&pdev->dev,
|
||||
+ tegra->soc->num_supplies,
|
||||
tegra->supplies);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Failed to get regulators\n");
|
||||
--
|
||||
2.11.0
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
From 502717ccf7720e785fdc1c9202d1b3930fd08038 Mon Sep 17 00:00:00 2001
|
||||
From: Preetham Ramchandra <pchandru@nvidia.com>
|
||||
Date: Mon, 12 Mar 2018 17:10:35 +0530
|
||||
Subject: [PATCH 3/7] ata: ahci_tegra: disable devslp for Tegra124
|
||||
|
||||
Tegra124 does not support devslp and it should be disabled.
|
||||
|
||||
Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
|
||||
Acked-by: Thierry Reding <treding@nvidia.com>
|
||||
Signed-off-by: Tejun Heo <tj@kernel.org>
|
||||
---
|
||||
drivers/ata/ahci_tegra.c | 26 ++++++++++++++++++++++++++
|
||||
1 file changed, 26 insertions(+)
|
||||
|
||||
diff --git a/drivers/ata/ahci_tegra.c b/drivers/ata/ahci_tegra.c
|
||||
index 547a6f93922c..620cdd16ef2f 100644
|
||||
--- a/drivers/ata/ahci_tegra.c
|
||||
+++ b/drivers/ata/ahci_tegra.c
|
||||
@@ -166,12 +166,14 @@ struct tegra_ahci_ops {
|
||||
struct tegra_ahci_soc {
|
||||
const char *const *supply_names;
|
||||
u32 num_supplies;
|
||||
+ bool supports_devslp;
|
||||
const struct tegra_ahci_ops *ops;
|
||||
};
|
||||
|
||||
struct tegra_ahci_priv {
|
||||
struct platform_device *pdev;
|
||||
void __iomem *sata_regs;
|
||||
+ void __iomem *sata_aux_regs;
|
||||
struct reset_control *sata_rst;
|
||||
struct reset_control *sata_oob_rst;
|
||||
struct reset_control *sata_cold_rst;
|
||||
@@ -181,6 +183,18 @@ struct tegra_ahci_priv {
|
||||
const struct tegra_ahci_soc *soc;
|
||||
};
|
||||
|
||||
+static void tegra_ahci_handle_quirks(struct ahci_host_priv *hpriv)
|
||||
+{
|
||||
+ struct tegra_ahci_priv *tegra = hpriv->plat_data;
|
||||
+ u32 val;
|
||||
+
|
||||
+ if (tegra->sata_aux_regs && !tegra->soc->supports_devslp) {
|
||||
+ val = readl(tegra->sata_aux_regs + SATA_AUX_MISC_CNTL_1_0);
|
||||
+ val &= ~SATA_AUX_MISC_CNTL_1_0_SDS_SUPPORT;
|
||||
+ writel(val, tegra->sata_aux_regs + SATA_AUX_MISC_CNTL_1_0);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static int tegra124_ahci_init(struct ahci_host_priv *hpriv)
|
||||
{
|
||||
struct tegra_ahci_priv *tegra = hpriv->plat_data;
|
||||
@@ -401,6 +415,7 @@ static int tegra_ahci_controller_init(struct ahci_host_priv *hpriv)
|
||||
val &= ~SATA_CONFIGURATION_0_CLK_OVERRIDE;
|
||||
writel(val, tegra->sata_regs + SATA_CONFIGURATION_0);
|
||||
|
||||
+ tegra_ahci_handle_quirks(hpriv);
|
||||
|
||||
/* Unmask SATA interrupts */
|
||||
|
||||
@@ -446,6 +461,7 @@ static const struct tegra_ahci_ops tegra124_ahci_ops = {
|
||||
static const struct tegra_ahci_soc tegra124_ahci_soc = {
|
||||
.supply_names = tegra124_supply_names,
|
||||
.num_supplies = ARRAY_SIZE(tegra124_supply_names),
|
||||
+ .supports_devslp = false,
|
||||
.ops = &tegra124_ahci_ops,
|
||||
};
|
||||
|
||||
@@ -488,6 +504,16 @@ static int tegra_ahci_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(tegra->sata_regs))
|
||||
return PTR_ERR(tegra->sata_regs);
|
||||
|
||||
+ /*
|
||||
+ * AUX registers is optional.
|
||||
+ */
|
||||
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
|
||||
+ if (res) {
|
||||
+ tegra->sata_aux_regs = devm_ioremap_resource(&pdev->dev, res);
|
||||
+ if (IS_ERR(tegra->sata_aux_regs))
|
||||
+ return PTR_ERR(tegra->sata_aux_regs);
|
||||
+ }
|
||||
+
|
||||
tegra->sata_rst = devm_reset_control_get(&pdev->dev, "sata");
|
||||
if (IS_ERR(tegra->sata_rst)) {
|
||||
dev_err(&pdev->dev, "Failed to get sata reset\n");
|
||||
--
|
||||
2.11.0
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
From 01fbf60b0e6fb9932a26959bbf338b9b5b193592 Mon Sep 17 00:00:00 2001
|
||||
From: Preetham Ramchandra <pchandru@nvidia.com>
|
||||
Date: Mon, 12 Mar 2018 17:10:36 +0530
|
||||
Subject: [PATCH 4/7] ata: ahci_tegra: disable DIPM
|
||||
|
||||
Tegra does not support DIPM and it should be disabled.
|
||||
|
||||
Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
|
||||
Acked-by: Thierry Reding <treding@nvidia.com>
|
||||
Signed-off-by: Tejun Heo <tj@kernel.org>
|
||||
---
|
||||
drivers/ata/ahci_tegra.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/ata/ahci_tegra.c b/drivers/ata/ahci_tegra.c
|
||||
index 620cdd16ef2f..20c1fccbc669 100644
|
||||
--- a/drivers/ata/ahci_tegra.c
|
||||
+++ b/drivers/ata/ahci_tegra.c
|
||||
@@ -444,7 +444,7 @@ static struct ata_port_operations ahci_tegra_port_ops = {
|
||||
};
|
||||
|
||||
static const struct ata_port_info ahci_tegra_port_info = {
|
||||
- .flags = AHCI_FLAG_COMMON,
|
||||
+ .flags = AHCI_FLAG_COMMON | ATA_FLAG_NO_DIPM,
|
||||
.pio_mask = ATA_PIO4,
|
||||
.udma_mask = ATA_UDMA6,
|
||||
.port_ops = &ahci_tegra_port_ops,
|
||||
--
|
||||
2.11.0
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
From 294840feefb7fefb49a276544cbd29aac28e5e7d Mon Sep 17 00:00:00 2001
|
||||
From: Preetham Ramchandra <pchandru@nvidia.com>
|
||||
Date: Mon, 12 Mar 2018 17:10:37 +0530
|
||||
Subject: [PATCH 5/7] ata: ahci_tegra: Add AHCI support for Tegra210
|
||||
|
||||
Add support for the AHCI-compliant Serial ATA host controller on the
|
||||
Tegra210 system-on-chip.
|
||||
|
||||
Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
|
||||
Acked-by: Thierry Reding <treding@nvidia.com>
|
||||
Signed-off-by: Tejun Heo <tj@kernel.org>
|
||||
---
|
||||
drivers/ata/ahci_tegra.c | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/ata/ahci_tegra.c b/drivers/ata/ahci_tegra.c
|
||||
index 20c1fccbc669..64d848409fe2 100644
|
||||
--- a/drivers/ata/ahci_tegra.c
|
||||
+++ b/drivers/ata/ahci_tegra.c
|
||||
@@ -465,11 +465,19 @@ static const struct tegra_ahci_soc tegra124_ahci_soc = {
|
||||
.ops = &tegra124_ahci_ops,
|
||||
};
|
||||
|
||||
+static const struct tegra_ahci_soc tegra210_ahci_soc = {
|
||||
+ .supports_devslp = false,
|
||||
+};
|
||||
+
|
||||
static const struct of_device_id tegra_ahci_of_match[] = {
|
||||
{
|
||||
.compatible = "nvidia,tegra124-ahci",
|
||||
.data = &tegra124_ahci_soc
|
||||
},
|
||||
+ {
|
||||
+ .compatible = "nvidia,tegra210-ahci",
|
||||
+ .data = &tegra210_ahci_soc
|
||||
+ },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, tegra_ahci_of_match);
|
||||
@@ -584,5 +592,5 @@ static struct platform_driver tegra_ahci_driver = {
|
||||
module_platform_driver(tegra_ahci_driver);
|
||||
|
||||
MODULE_AUTHOR("Mikko Perttunen <mperttunen@nvidia.com>");
|
||||
-MODULE_DESCRIPTION("Tegra124 AHCI SATA driver");
|
||||
+MODULE_DESCRIPTION("Tegra AHCI SATA driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
--
|
||||
2.11.0
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
From 6cb60ec43fd794319e2d31bfea1f9f88a1b897f7 Mon Sep 17 00:00:00 2001
|
||||
From: Preetham Ramchandra <pchandru@nvidia.com>
|
||||
Date: Mon, 12 Mar 2018 17:10:31 +0530
|
||||
Subject: [PATCH 6/7] arm64: tegra: Add SATA node for Tegra210
|
||||
|
||||
Populate the SATA node for Tegra210.
|
||||
|
||||
Signed-off-by: Preetham Ramchandra <pchandru@nvidia.com>
|
||||
Signed-off-by: Thierry Reding <treding@nvidia.com>
|
||||
---
|
||||
arch/arm64/boot/dts/nvidia/tegra210.dtsi | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/nvidia/tegra210.dtsi b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
|
||||
index 9c2402108772..3be920efee82 100644
|
||||
--- a/arch/arm64/boot/dts/nvidia/tegra210.dtsi
|
||||
+++ b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
|
||||
@@ -798,6 +798,22 @@
|
||||
#iommu-cells = <1>;
|
||||
};
|
||||
|
||||
+ sata@70020000 {
|
||||
+ compatible = "nvidia,tegra210-ahci";
|
||||
+ reg = <0x0 0x70027000 0x0 0x2000>, /* AHCI */
|
||||
+ <0x0 0x70020000 0x0 0x7000>, /* SATA */
|
||||
+ <0x0 0x70001100 0x0 0x1000>; /* SATA AUX */
|
||||
+ interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ clocks = <&tegra_car TEGRA210_CLK_SATA>,
|
||||
+ <&tegra_car TEGRA210_CLK_SATA_OOB>;
|
||||
+ clock-names = "sata", "sata-oob";
|
||||
+ resets = <&tegra_car 124>,
|
||||
+ <&tegra_car 123>,
|
||||
+ <&tegra_car 129>;
|
||||
+ reset-names = "sata", "sata-oob", "sata-cold";
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
hda@70030000 {
|
||||
compatible = "nvidia,tegra210-hda", "nvidia,tegra30-hda";
|
||||
reg = <0x0 0x70030000 0x0 0x10000>;
|
||||
--
|
||||
2.11.0
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
From 0f2754cee38fd2bc42f446d299ff0c53815dc5bd Mon Sep 17 00:00:00 2001
|
||||
From: Preetham Ramchandra <pchandru@nvidia.com>
|
||||
Date: Mon, 12 Mar 2018 17:10:32 +0530
|
||||
Subject: [PATCH 7/7] arm64: tegra: Enable AHCI on Jetson TX1
|
||||
|
||||
Enable AHCI on Jetson TX1 and add sata phy node.
|
||||
|
||||
Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
|
||||
Signed-off-by: Thierry Reding <treding@nvidia.com>
|
||||
---
|
||||
arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi b/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
|
||||
index d67ef4319f3b..9d5a0e6b2ca4 100644
|
||||
--- a/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
|
||||
+++ b/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
|
||||
@@ -1325,6 +1325,11 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+ sata@70020000 {
|
||||
+ status = "okay";
|
||||
+ phys = <&{/padctl@7009f000/pads/sata/lanes/sata-0}>;
|
||||
+ };
|
||||
+
|
||||
padctl@7009f000 {
|
||||
status = "okay";
|
||||
|
||||
--
|
||||
2.11.0
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
From a2730ed3e0f39c528014673cb96807bb16a8ce35 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Date: Sun, 21 Jan 2018 23:14:12 +0100
|
||||
Subject: [PATCH 1/6] ARM: dts: meson8b: grow the reset controller memory zone
|
||||
|
||||
The reset controller in the Meson8b SoCs also supports level resets.
|
||||
These use the same defines (from
|
||||
dt-bindings/reset/amlogic,meson8b-reset.h) as the reset pulses.
|
||||
|
||||
The reset-meson driver internally handles the difference if a consumer
|
||||
requests a reset pulse or a level reset. However, for this to work we
|
||||
must extend the memory zone of the reset controller.
|
||||
|
||||
Suggested-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
---
|
||||
arch/arm/boot/dts/meson8b.dtsi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi
|
||||
index 7cd03ed3742e..4c1ac3a44357 100644
|
||||
--- a/arch/arm/boot/dts/meson8b.dtsi
|
||||
+++ b/arch/arm/boot/dts/meson8b.dtsi
|
||||
@@ -152,7 +152,7 @@
|
||||
|
||||
reset: reset-controller@4404 {
|
||||
compatible = "amlogic,meson8b-reset";
|
||||
- reg = <0x4404 0x20>;
|
||||
+ reg = <0x4404 0x9c>;
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
|
||||
--
|
||||
2.11.0
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
From e3087187e5f18231e48450e602220eb65c409b59 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Date: Sun, 21 Jan 2018 23:14:13 +0100
|
||||
Subject: [PATCH 2/6] ARM: dts: meson8: add the reset controller
|
||||
|
||||
Meson8 uses the same reset controller as Meson8b. Add the node along
|
||||
with the #include for the reset lines to meson8.dtsi so we can use it
|
||||
from there as well.
|
||||
|
||||
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
---
|
||||
arch/arm/boot/dts/meson8.dtsi | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi
|
||||
index d2e3eeaa1a5f..f48e89a7f7b4 100644
|
||||
--- a/arch/arm/boot/dts/meson8.dtsi
|
||||
+++ b/arch/arm/boot/dts/meson8.dtsi
|
||||
@@ -46,6 +46,7 @@
|
||||
#include <dt-bindings/clock/meson8b-clkc.h>
|
||||
#include <dt-bindings/gpio/meson8-gpio.h>
|
||||
#include <dt-bindings/reset/amlogic,meson8b-clkc-reset.h>
|
||||
+#include <dt-bindings/reset/amlogic,meson8b-reset.h>
|
||||
#include "meson.dtsi"
|
||||
|
||||
/ {
|
||||
@@ -187,6 +188,12 @@
|
||||
reg = <0x8000 0x4>, <0x4000 0x460>;
|
||||
};
|
||||
|
||||
+ reset: reset-controller@4404 {
|
||||
+ compatible = "amlogic,meson8b-reset";
|
||||
+ reg = <0x4404 0x9c>;
|
||||
+ #reset-cells = <1>;
|
||||
+ };
|
||||
+
|
||||
analog_top: analog-top@81a8 {
|
||||
compatible = "amlogic,meson8-analog-top", "syscon";
|
||||
reg = <0x81a8 0x14>;
|
||||
--
|
||||
2.11.0
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
From e1fa57dfd7e28b30d6419b7c309b4a890ff4410a Mon Sep 17 00:00:00 2001
|
||||
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Date: Sun, 21 Jan 2018 23:14:14 +0100
|
||||
Subject: [PATCH 3/6] ARM: dts: meson8: add the USB reset line
|
||||
|
||||
Now that we support the reset controller on Meson8 we can add the reset
|
||||
line to the USB PHYs (just like on Meson8b).
|
||||
|
||||
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
---
|
||||
arch/arm/boot/dts/meson8.dtsi | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi
|
||||
index f48e89a7f7b4..dcc9292d2ffa 100644
|
||||
--- a/arch/arm/boot/dts/meson8.dtsi
|
||||
+++ b/arch/arm/boot/dts/meson8.dtsi
|
||||
@@ -390,10 +390,12 @@
|
||||
compatible = "amlogic,meson8-usb2-phy", "amlogic,meson-mx-usb2-phy";
|
||||
clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB0>;
|
||||
clock-names = "usb_general", "usb";
|
||||
+ resets = <&reset RESET_USB_OTG>;
|
||||
};
|
||||
|
||||
&usb1_phy {
|
||||
compatible = "amlogic,meson8-usb2-phy", "amlogic,meson-mx-usb2-phy";
|
||||
clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB1>;
|
||||
clock-names = "usb_general", "usb";
|
||||
+ resets = <&reset RESET_USB_OTG>;
|
||||
};
|
||||
--
|
||||
2.11.0
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
From b96446541d8390ec22e6dc579282770453ec98a4 Mon Sep 17 00:00:00 2001
|
||||
From: Emiliano Ingrassia <ingrassia@epigenesys.com>
|
||||
Date: Fri, 19 Jan 2018 02:48:00 +0100
|
||||
Subject: [PATCH 4/6] ARM: dts: meson8b: extend ethernet controller description
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Enable S805 (aka Meson8b) ethernet pin multiplexing and
|
||||
extend the controller description.
|
||||
The programmable ethernet (PRG_ETHERNET) register address
|
||||
value (0xc1108108), contained in meson.dtsi, is overridden
|
||||
according to the value found in S805 SoC manual.
|
||||
This also required to switch to "amlogic,meson8b-dwmac" compatible
|
||||
to correctly configure that register.
|
||||
The two clock sources "clkin0" and "clkin1" are both equals
|
||||
to MPLL2 because, as reported in bit 9-7 register description,
|
||||
that is the only Meson8b ethernet clock source.
|
||||
|
||||
Signed-off-by: Emiliano Ingrassia <ingrassia@epigenesys.com>
|
||||
Tested-by: Linus Lüssing <linus.luessing@c0d3.blue>
|
||||
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
---
|
||||
arch/arm/boot/dts/meson8b.dtsi | 35 +++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 33 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi
|
||||
index 4c1ac3a44357..1a7c16640ea5 100644
|
||||
--- a/arch/arm/boot/dts/meson8b.dtsi
|
||||
+++ b/arch/arm/boot/dts/meson8b.dtsi
|
||||
@@ -185,6 +185,27 @@
|
||||
#gpio-cells = <2>;
|
||||
gpio-ranges = <&pinctrl_cbus 0 0 130>;
|
||||
};
|
||||
+
|
||||
+ eth_rgmii_pins: eth-rgmii {
|
||||
+ mux {
|
||||
+ groups = "eth_tx_clk",
|
||||
+ "eth_tx_en",
|
||||
+ "eth_txd1_0",
|
||||
+ "eth_txd1_1",
|
||||
+ "eth_txd0_0",
|
||||
+ "eth_txd0_1",
|
||||
+ "eth_rx_clk",
|
||||
+ "eth_rx_dv",
|
||||
+ "eth_rxd1",
|
||||
+ "eth_rxd0",
|
||||
+ "eth_mdio_en",
|
||||
+ "eth_mdc",
|
||||
+ "eth_ref_clk",
|
||||
+ "eth_txd2",
|
||||
+ "eth_txd3";
|
||||
+ function = "ethernet";
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
};
|
||||
|
||||
@@ -203,8 +224,18 @@
|
||||
};
|
||||
|
||||
ðmac {
|
||||
- clocks = <&clkc CLKID_ETH>;
|
||||
- clock-names = "stmmaceth";
|
||||
+ compatible = "amlogic,meson8b-dwmac", "snps,dwmac-3.70a", "snps,dwmac";
|
||||
+
|
||||
+ reg = <0xc9410000 0x10000
|
||||
+ 0xc1108140 0x4>;
|
||||
+
|
||||
+ clocks = <&clkc CLKID_ETH>,
|
||||
+ <&clkc CLKID_MPLL2>,
|
||||
+ <&clkc CLKID_MPLL2>;
|
||||
+ clock-names = "stmmaceth", "clkin0", "clkin1";
|
||||
+
|
||||
+ resets = <&reset RESET_ETHERNET>;
|
||||
+ reset-names = "stmmaceth";
|
||||
};
|
||||
|
||||
&gpio_intc {
|
||||
--
|
||||
2.11.0
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
From 9c15795a4f96cb4f82a0e1503b46621251644bc2 Mon Sep 17 00:00:00 2001
|
||||
From: Emiliano Ingrassia <ingrassia@epigenesys.com>
|
||||
Date: Fri, 19 Jan 2018 02:49:17 +0100
|
||||
Subject: [PATCH 5/6] ARM: dts: meson8b-odroidc1: ethernet support
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The Odroid-C1+ board is equipped with an RTL8211F ethernet PHY
|
||||
which supports 10/100/1000 Mbps ethernet.
|
||||
The PHY reset and interrupt lines are controlled by the SoC via
|
||||
two GPIO lines (GPIOH_4 and GPIOH_3 respectively).
|
||||
The PHY energy efficient ethernet (eee) mode is marked as broken
|
||||
using "eee-broken-1000t" because, during tests, high packet losses
|
||||
were experienced without it.
|
||||
|
||||
Signed-off-by: Emiliano Ingrassia <ingrassia@epigenesys.com>
|
||||
Tested-by: Linus Lüssing <linus.luessing@c0d3.blue>
|
||||
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
---
|
||||
arch/arm/boot/dts/meson8b-odroidc1.dts | 30 ++++++++++++++++++++++++++++++
|
||||
1 file changed, 30 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/meson8b-odroidc1.dts b/arch/arm/boot/dts/meson8b-odroidc1.dts
|
||||
index 9ff6ca4e20d0..d5e83051bb54 100644
|
||||
--- a/arch/arm/boot/dts/meson8b-odroidc1.dts
|
||||
+++ b/arch/arm/boot/dts/meson8b-odroidc1.dts
|
||||
@@ -99,3 +99,33 @@
|
||||
&usb1 {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+ðmac {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ snps,reset-gpio = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>;
|
||||
+ snps,reset-active-low;
|
||||
+ snps,reset-delays-us = <0 10000 30000>;
|
||||
+
|
||||
+ pinctrl-0 = <ð_rgmii_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ phy-mode = "rgmii";
|
||||
+ phy-handle = <ð_phy>;
|
||||
+ amlogic,tx-delay-ns = <4>;
|
||||
+
|
||||
+ mdio {
|
||||
+ compatible = "snps,dwmac-mdio";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ /* Realtek RTL8211F (0x001cc916) */
|
||||
+ eth_phy: ethernet-phy@0 {
|
||||
+ reg = <0>;
|
||||
+ eee-broken-1000t;
|
||||
+ interrupt-parent = <&gpio_intc>;
|
||||
+ /* GPIOH_3 */
|
||||
+ interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
--
|
||||
2.11.0
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
From 7a6cc8be3938c322964065312d57439a92584488 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Date: Sat, 17 Feb 2018 17:06:50 +0100
|
||||
Subject: [PATCH 6/6] ARM: dts: meson8b: add the I2C clocks
|
||||
|
||||
Add the I2C clocks so the I2C busses can be used. The clock input is not
|
||||
device specific (the AO I2C bus uses clk81 as input, while the two I2C
|
||||
busses in CBUS have a separate "CLKID_I2C" gate, provided by the clock
|
||||
controller.
|
||||
|
||||
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
---
|
||||
arch/arm/boot/dts/meson8b.dtsi | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi
|
||||
index 1a7c16640ea5..5f7841b2d163 100644
|
||||
--- a/arch/arm/boot/dts/meson8b.dtsi
|
||||
+++ b/arch/arm/boot/dts/meson8b.dtsi
|
||||
@@ -250,6 +250,18 @@
|
||||
clock-names = "core";
|
||||
};
|
||||
|
||||
+&i2c_AO {
|
||||
+ clocks = <&clkc CLKID_CLK81>;
|
||||
+};
|
||||
+
|
||||
+&i2c_A {
|
||||
+ clocks = <&clkc CLKID_I2C>;
|
||||
+};
|
||||
+
|
||||
+&i2c_B {
|
||||
+ clocks = <&clkc CLKID_I2C>;
|
||||
+};
|
||||
+
|
||||
&L2 {
|
||||
arm,data-latency = <3 3 3>;
|
||||
arm,tag-latency = <2 2 2>;
|
||||
--
|
||||
2.11.0
|
||||
|
|
@ -29,7 +29,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|||
|
||||
--- a/Documentation/admin-guide/kernel-parameters.txt
|
||||
+++ b/Documentation/admin-guide/kernel-parameters.txt
|
||||
@@ -4096,6 +4096,10 @@
|
||||
@@ -4142,6 +4142,10 @@
|
||||
|
||||
switches= [HW,M68k]
|
||||
|
||||
|
@ -42,7 +42,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|||
on older distributions. When this option is enabled
|
||||
--- a/arch/x86/Kconfig
|
||||
+++ b/arch/x86/Kconfig
|
||||
@@ -2863,6 +2863,14 @@ config COMPAT_32
|
||||
@@ -2910,6 +2910,14 @@ config COMPAT_32
|
||||
select HAVE_UID16
|
||||
select OLD_SIGSUSPEND3
|
||||
|
||||
|
@ -59,24 +59,31 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|||
depends on IA32_EMULATION || X86_X32
|
||||
--- a/arch/x86/entry/common.c
|
||||
+++ b/arch/x86/entry/common.c
|
||||
@@ -282,8 +282,15 @@ __visible void do_syscall_64(struct pt_r
|
||||
@@ -281,12 +281,21 @@ __visible void do_syscall_64(unsigned lo
|
||||
* table. The only functional difference is the x32 bit in
|
||||
* regs->orig_ax, which changes the behavior of some syscalls.
|
||||
*/
|
||||
- if (likely((nr & __SYSCALL_MASK) < NR_syscalls)) {
|
||||
- nr = array_index_nospec(nr & __SYSCALL_MASK, NR_syscalls);
|
||||
- nr &= __SYSCALL_MASK;
|
||||
- if (likely(nr < NR_syscalls)) {
|
||||
+ if (x32_enabled) {
|
||||
+ if (likely((nr & ~__X32_SYSCALL_BIT) < NR_syscalls)) {
|
||||
+ nr = array_index_nospec(nr & ~__X32_SYSCALL_BIT,
|
||||
+ NR_syscalls);
|
||||
+ goto good;
|
||||
+ }
|
||||
+ } else if (likely((nr & ~0U) < NR_non_x32_syscalls)) {
|
||||
+ nr = array_index_nospec(nr & ~0U, NR_non_x32_syscalls);
|
||||
+ good:
|
||||
regs->ax = sys_call_table[nr](
|
||||
regs->di, regs->si, regs->dx,
|
||||
regs->r10, regs->r8, regs->r9);
|
||||
+ nr &= ~__X32_SYSCALL_BIT;
|
||||
+ if (unlikely(nr >= NR_syscalls))
|
||||
+ goto bad;
|
||||
nr = array_index_nospec(nr, NR_syscalls);
|
||||
+ goto good;
|
||||
+ } else {
|
||||
+ nr &= ~0U;
|
||||
+ if (unlikely(nr >= NR_non_x32_syscalls))
|
||||
+ goto bad;
|
||||
+ nr = array_index_nospec(nr, NR_non_x32_syscalls);
|
||||
+good:
|
||||
regs->ax = sys_call_table[nr](regs);
|
||||
}
|
||||
-
|
||||
+bad:
|
||||
syscall_return_slowpath(regs);
|
||||
}
|
||||
#endif
|
||||
--- a/arch/x86/entry/syscall_64.c
|
||||
+++ b/arch/x86/entry/syscall_64.c
|
||||
@@ -4,6 +4,9 @@
|
||||
|
@ -170,7 +177,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|||
#include <asm/asm-offsets.h> /* For NR_syscalls */
|
||||
#include <asm/thread_info.h> /* for TS_COMPAT */
|
||||
#include <asm/unistd.h>
|
||||
@@ -35,6 +36,18 @@ extern const sys_call_ptr_t sys_call_tab
|
||||
@@ -39,6 +40,18 @@ extern const sys_call_ptr_t sys_call_tab
|
||||
extern const sys_call_ptr_t ia32_sys_call_table[];
|
||||
#endif
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ debian/ia64-hardcode-arch-script-output.patch
|
|||
debian/mips-disable-werror.patch
|
||||
debian/arch-sh4-fix-uimage-build.patch
|
||||
debian/powerpcspe-omit-uimage.patch
|
||||
features/all/Kbuild-kconfig-Verbose-version-of-listnewconfig.patch
|
||||
debian/modpost-symbol-prefix.patch
|
||||
debian/tools-perf-version.patch
|
||||
debian/tools-perf-install.patch
|
||||
|
@ -52,9 +51,6 @@ debian/fjes-disable-autoload.patch
|
|||
debian/fanotify-taint-on-use-of-fanotify_access_permissions.patch
|
||||
debian/btrfs-warn-about-raid5-6-being-experimental-at-mount.patch
|
||||
|
||||
# Reduce noise for bug #852324
|
||||
debian/amd64-don-t-warn-about-expected-w+x-pages-on-xen.patch
|
||||
|
||||
# Arch bug fixes
|
||||
bugfix/arm/arm-dts-kirkwood-fix-sata-pinmux-ing-for-ts419.patch
|
||||
bugfix/x86/platform-x86-ideapad-laptop-add-ideapad-310-15ikb-to.patch
|
||||
|
@ -74,22 +70,6 @@ features/mips/MIPS-increase-MAX-PHYSMEM-BITS-on-Loongson-3-only.patch
|
|||
features/mips/MIPS-Loongson-3-Add-Loongson-LS3A-RS780E-1-way-machi.patch
|
||||
features/x86/x86-memtest-WARN-if-bad-RAM-found.patch
|
||||
features/x86/x86-make-x32-syscall-support-conditional.patch
|
||||
# meson8b device-tree updates from next-20180316 to enable USB and Ethernet.
|
||||
features/armhf/meson8/0001-ARM-dts-meson8b-grow-the-reset-controller-memory-zon.patch
|
||||
features/armhf/meson8/0002-ARM-dts-meson8-add-the-reset-controller.patch
|
||||
features/armhf/meson8/0003-ARM-dts-meson8-add-the-USB-reset-line.patch
|
||||
features/armhf/meson8/0004-ARM-dts-meson8b-extend-ethernet-controller-descripti.patch
|
||||
features/armhf/meson8/0005-ARM-dts-meson8b-odroidc1-ethernet-support.patch
|
||||
features/armhf/meson8/0006-ARM-dts-meson8b-add-the-I2C-clocks.patch
|
||||
# Add sata support for Tegra210/Jetson-TX1 from mainline.
|
||||
features/arm64/tegra210-sata/0001-ata-ahci_tegra-Update-initialization-sequence.patch
|
||||
features/arm64/tegra210-sata/0002-ata-ahci_tegra-initialize-regulators-from-soc-struct.patch
|
||||
features/arm64/tegra210-sata/0003-ata-ahci_tegra-disable-devslp-for-Tegra124.patch
|
||||
features/arm64/tegra210-sata/0004-ata-ahci_tegra-disable-DIPM.patch
|
||||
features/arm64/tegra210-sata/0005-ata-ahci_tegra-Add-AHCI-support-for-Tegra210.patch
|
||||
features/arm64/tegra210-sata/0006-arm64-tegra-Add-SATA-node-for-Tegra210.patch
|
||||
features/arm64/tegra210-sata/0007-arm64-tegra-Enable-AHCI-on-Jetson-TX1.patch
|
||||
features/arm64/arm64-dts-allwinner-a64-add-simplefb-for-A64-SoC.patch
|
||||
|
||||
# Miscellaneous bug fixes
|
||||
bugfix/all/kbuild-use-nostdinc-in-compile-tests.patch
|
||||
|
@ -121,7 +101,6 @@ features/all/lockdown/0015-ACPI-Limit-access-to-custom_method-when-the-kernel-i.
|
|||
features/all/lockdown/0016-acpi-Ignore-acpi_rsdp-kernel-param-when-the-kernel-h.patch
|
||||
features/all/lockdown/0017-acpi-Disable-ACPI-table-override-if-the-kernel-is-lo.patch
|
||||
features/all/lockdown/0018-acpi-Disable-APEI-error-injection-if-the-kernel-is-l.patch
|
||||
features/all/lockdown/0019-scsi-Lock-down-the-eata-driver.patch
|
||||
features/all/lockdown/0020-Prohibit-PCMCIA-CIS-storage-when-the-kernel-is-locke.patch
|
||||
features/all/lockdown/0021-Lock-down-TIOCSSERIAL.patch
|
||||
features/all/lockdown/0022-Lock-down-module-params-that-specify-hardware-parame.patch
|
||||
|
@ -139,9 +118,6 @@ features/all/lockdown/arm64-add-kernel-config-option-to-lock-down-when.patch
|
|||
|
||||
# Security fixes
|
||||
debian/i386-686-pae-pci-set-pci-nobios-by-default.patch
|
||||
bugfix/all/ext4-fail-ext4_iget-for-root-directory-if-unallocate.patch
|
||||
bugfix/all/ext4-add-validity-checks-for-bitmap-block-numbers.patch
|
||||
bugfix/all/ext4-always-initialize-the-crc32c-checksum-driver.patch
|
||||
|
||||
# Fix exported symbol versions
|
||||
bugfix/all/module-disable-matching-missing-version-crc.patch
|
||||
|
@ -157,7 +133,6 @@ bugfix/all/tools-build-remove-bpf-run-time-check-at-build-time.patch
|
|||
bugfix/all/cpupower-bump-soname-version.patch
|
||||
bugfix/all/cpupower-fix-checks-for-cpu-existence.patch
|
||||
bugfix/all/lockdep-stub-nmi-watchdog-reset.patch
|
||||
bugfix/arm64/ARM64-dts-meson-reduce-odroid-c2-eMMC-maximum-rate.patch
|
||||
|
||||
# wireless: Disable regulatory.db direct loading (until we sort out signing)
|
||||
debian/wireless-disable-regulatory.db-direct-loading.patch
|
||||
|
|
Loading…
Reference in New Issue