Merge tag 'ASB-2024-09-05_12-5.10' of https://android.googlesource.com/kernel/common into android13-5.10-waipio

https://source.android.com/docs/security/bulletin/2024-09-01
CVE-2024-36972

* tag 'ASB-2024-09-05_12-5.10' of https://android.googlesource.com/kernel/common: (1565 commits)
  ANDROID: delete tool added by mistake
  ANDROID: GKI: Add initialization for rwsem's oem_data and vendor_data.
  ANDROID: GKI: Add initialization for mutex oem_data.
  ANDROID: fix ENOMEM check of binder_proc_ext
  ANDROID: binder: fix KMI issues due to frozen notification
  BACKPORT: FROMGIT: binder: frozen notification binder_features flag
  BACKPORT: FROMGIT: binder: frozen notification
  UPSTREAM: selftests/binderfs: add test for feature files
  UPSTREAM: docs: binderfs: add section about feature files
  UPSTREAM: binderfs: add support for feature files
  ANDROID: GKI: Add symbol to symbol list for vivo.
  ANDROID: vendor_hooks: add hooks to modify pageflags
  ANDROID: GKI: Add pageflags for OEM
  ANDROID: GKI: Update symbol list for vivo
  ANDROID: vendor_hooks: add vendor hooks for fuse request
  UPSTREAM: net: sched: sch_multiq: fix possible OOB write in multiq_tune()
  ANDROID: Update the GKI symbol list and ABI XML
  ANDROID: irqchip/irq-gic-v3: Add vendor hook for gic suspend
  FROMLIST: binder: fix UAF caused by offsets overwrite
  ANDROID: gki - set CONFIG_USB_NET_AX88179_178A=y (usb gbit ethernet dongle)
  ...

 Conflicts:
	Documentation/devicetree/bindings/i2c/google,cros-ec-i2c-tunnel.yaml
	Documentation/devicetree/bindings/sound/rt5645.txt
	Documentation/devicetree/bindings~HEAD
	drivers/scsi/ufs/ufs-qcom.c
	net/qrtr/af_qrtr.c
	net/qrtr/ns.c
	net/qrtr/qrtr.h

Change-Id: I50a93cfc0ff67778b19609e93cb577f63a517baa
This commit is contained in:
Michael Bestas 2024-10-01 13:07:51 +03:00
commit deec4e9c07
No known key found for this signature in database
GPG Key ID: CC95044519BE6669
722 changed files with 9211 additions and 5789 deletions

View File

@ -72,3 +72,16 @@ that the `rm() <rm_>`_ tool can be used to delete them. Note that the
``binder-control`` device cannot be deleted since this would make the binderfs ``binder-control`` device cannot be deleted since this would make the binderfs
instance unuseable. The ``binder-control`` device will be deleted when the instance unuseable. The ``binder-control`` device will be deleted when the
binderfs instance is unmounted and all references to it have been dropped. binderfs instance is unmounted and all references to it have been dropped.
Binder features
---------------
Assuming an instance of binderfs has been mounted at ``/dev/binderfs``, the
features supported by the binder driver can be located under
``/dev/binderfs/features/``. The presence of individual files can be tested
to determine whether a particular feature is supported by the driver.
Example::
cat /dev/binderfs/features/oneway_spam_detection
1

View File

@ -4,11 +4,11 @@ FPGA Bridge
API to implement a new FPGA bridge API to implement a new FPGA bridge
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* struct fpga_bridge The FPGA Bridge structure * struct fpga_bridge - The FPGA Bridge structure
* struct fpga_bridge_ops Low level Bridge driver ops * struct fpga_bridge_ops - Low level Bridge driver ops
* devm_fpga_bridge_create() Allocate and init a bridge struct * devm_fpga_bridge_create() - Allocate and init a bridge struct
* fpga_bridge_register() Register a bridge * fpga_bridge_register() - Register a bridge
* fpga_bridge_unregister() Unregister a bridge * fpga_bridge_unregister() - Unregister a bridge
.. kernel-doc:: include/linux/fpga/fpga-bridge.h .. kernel-doc:: include/linux/fpga/fpga-bridge.h
:functions: fpga_bridge :functions: fpga_bridge

View File

@ -101,12 +101,12 @@ in state.
API for implementing a new FPGA Manager driver API for implementing a new FPGA Manager driver
---------------------------------------------- ----------------------------------------------
* ``fpga_mgr_states`` Values for :c:expr:`fpga_manager->state`. * ``fpga_mgr_states`` - Values for :c:expr:`fpga_manager->state`.
* struct fpga_manager the FPGA manager struct * struct fpga_manager - the FPGA manager struct
* struct fpga_manager_ops Low level FPGA manager driver ops * struct fpga_manager_ops - Low level FPGA manager driver ops
* devm_fpga_mgr_create() Allocate and init a manager struct * devm_fpga_mgr_create() - Allocate and init a manager struct
* fpga_mgr_register() Register an FPGA manager * fpga_mgr_register() - Register an FPGA manager
* fpga_mgr_unregister() Unregister an FPGA manager * fpga_mgr_unregister() - Unregister an FPGA manager
.. kernel-doc:: include/linux/fpga/fpga-mgr.h .. kernel-doc:: include/linux/fpga/fpga-mgr.h
:functions: fpga_mgr_states :functions: fpga_mgr_states

View File

@ -84,10 +84,10 @@ will generate that list. Here's some sample code of what to do next::
API for programming an FPGA API for programming an FPGA
--------------------------- ---------------------------
* fpga_region_program_fpga() Program an FPGA * fpga_region_program_fpga() - Program an FPGA
* fpga_image_info() Specifies what FPGA image to program * fpga_image_info() - Specifies what FPGA image to program
* fpga_image_info_alloc() Allocate an FPGA image info struct * fpga_image_info_alloc() - Allocate an FPGA image info struct
* fpga_image_info_free() Free an FPGA image info struct * fpga_image_info_free() - Free an FPGA image info struct
.. kernel-doc:: drivers/fpga/fpga-region.c .. kernel-doc:: drivers/fpga/fpga-region.c
:functions: fpga_region_program_fpga :functions: fpga_region_program_fpga

View File

@ -45,19 +45,25 @@ An example of usage can be seen in the probe function of [#f2]_.
API to add a new FPGA region API to add a new FPGA region
---------------------------- ----------------------------
* struct fpga_region — The FPGA region struct * struct fpga_region - The FPGA region struct
* devm_fpga_region_create() — Allocate and init a region struct * struct fpga_region_info - Parameter structure for __fpga_region_register_full()
* fpga_region_register() — Register an FPGA region * __fpga_region_register_full() - Create and register an FPGA region using the
* fpga_region_unregister() — Unregister an FPGA region fpga_region_info structure to provide the full flexibility of options
* __fpga_region_register() - Create and register an FPGA region using standard
arguments
* fpga_region_unregister() - Unregister an FPGA region
Helper macros ``fpga_region_register()`` and ``fpga_region_register_full()``
automatically set the module that registers the FPGA region as the owner.
The FPGA region's probe function will need to get a reference to the FPGA The FPGA region's probe function will need to get a reference to the FPGA
Manager it will be using to do the programming. This usually would happen Manager it will be using to do the programming. This usually would happen
during the region's probe function. during the region's probe function.
* fpga_mgr_get() — Get a reference to an FPGA manager, raise ref count * fpga_mgr_get() - Get a reference to an FPGA manager, raise ref count
* of_fpga_mgr_get() Get a reference to an FPGA manager, raise ref count, * of_fpga_mgr_get() - Get a reference to an FPGA manager, raise ref count,
given a device node. given a device node.
* fpga_mgr_put() Put an FPGA manager * fpga_mgr_put() - Put an FPGA manager
The FPGA region will need to specify which bridges to control while programming The FPGA region will need to specify which bridges to control while programming
the FPGA. The region driver can build a list of bridges during probe time the FPGA. The region driver can build a list of bridges during probe time
@ -66,20 +72,23 @@ the list of bridges to program just before programming
(:c:expr:`fpga_region->get_bridges`). The FPGA bridge framework supplies the (:c:expr:`fpga_region->get_bridges`). The FPGA bridge framework supplies the
following APIs to handle building or tearing down that list. following APIs to handle building or tearing down that list.
* fpga_bridge_get_to_list() Get a ref of an FPGA bridge, add it to a * fpga_bridge_get_to_list() - Get a ref of an FPGA bridge, add it to a
list list
* of_fpga_bridge_get_to_list() Get a ref of an FPGA bridge, add it to a * of_fpga_bridge_get_to_list() - Get a ref of an FPGA bridge, add it to a
list, given a device node list, given a device node
* fpga_bridges_put() Given a list of bridges, put them * fpga_bridges_put() - Given a list of bridges, put them
.. kernel-doc:: include/linux/fpga/fpga-region.h .. kernel-doc:: include/linux/fpga/fpga-region.h
:functions: fpga_region :functions: fpga_region
.. kernel-doc:: drivers/fpga/fpga-region.c .. kernel-doc:: include/linux/fpga/fpga-region.h
:functions: devm_fpga_region_create :functions: fpga_region_info
.. kernel-doc:: drivers/fpga/fpga-region.c .. kernel-doc:: drivers/fpga/fpga-region.c
:functions: fpga_region_register :functions: __fpga_region_register_full
.. kernel-doc:: drivers/fpga/fpga-region.c
:functions: __fpga_region_register
.. kernel-doc:: drivers/fpga/fpga-region.c .. kernel-doc:: drivers/fpga/fpga-region.c
:functions: fpga_region_unregister :functions: fpga_region_unregister

View File

@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
VERSION = 5 VERSION = 5
PATCHLEVEL = 10 PATCHLEVEL = 10
SUBLEVEL = 218 SUBLEVEL = 223
EXTRAVERSION = EXTRAVERSION =
NAME = Dare mighty things NAME = Dare mighty things

File diff suppressed because it is too large Load Diff

View File

@ -984,6 +984,9 @@
get_user_pages get_user_pages
get_zeroed_page get_zeroed_page
gfp_zone gfp_zone
gic_cpu_init
gic_dist_init
gic_dist_wait_for_rwp
gic_nonsecure_priorities gic_nonsecure_priorities
gic_resume gic_resume
gov_attr_set_init gov_attr_set_init
@ -2587,6 +2590,7 @@
__traceiter_android_vh_ftrace_oops_exit __traceiter_android_vh_ftrace_oops_exit
__traceiter_android_vh_ftrace_size_check __traceiter_android_vh_ftrace_size_check
__traceiter_android_vh_gic_resume __traceiter_android_vh_gic_resume
__traceiter_android_vh_gic_suspend
__traceiter_android_vh_gpio_block_read __traceiter_android_vh_gpio_block_read
__traceiter_android_vh_handle_tlb_conf __traceiter_android_vh_handle_tlb_conf
__traceiter_android_vh_iommu_setup_dma_ops __traceiter_android_vh_iommu_setup_dma_ops
@ -2716,6 +2720,7 @@
__tracepoint_android_vh_ftrace_oops_exit __tracepoint_android_vh_ftrace_oops_exit
__tracepoint_android_vh_ftrace_size_check __tracepoint_android_vh_ftrace_size_check
__tracepoint_android_vh_gic_resume __tracepoint_android_vh_gic_resume
__tracepoint_android_vh_gic_suspend
__tracepoint_android_vh_gpio_block_read __tracepoint_android_vh_gpio_block_read
__tracepoint_android_vh_handle_tlb_conf __tracepoint_android_vh_handle_tlb_conf
__tracepoint_android_vh_iommu_setup_dma_ops __tracepoint_android_vh_iommu_setup_dma_ops

View File

@ -134,3 +134,9 @@
__tracepoint_android_vh_blk_mq_free_tags __tracepoint_android_vh_blk_mq_free_tags
__tracepoint_android_vh_blk_mq_sched_insert_request __tracepoint_android_vh_blk_mq_sched_insert_request
zero_pfn zero_pfn
fsnotify_add_mark
fsnotify_alloc_group
fsnotify_destroy_mark
fsnotify_init_mark
fsnotify_put_group
fsnotify_put_mark

View File

@ -1728,6 +1728,9 @@
__traceiter_android_vh_blk_rq_ctx_init __traceiter_android_vh_blk_rq_ctx_init
__traceiter_android_vh_cpu_idle_enter __traceiter_android_vh_cpu_idle_enter
__traceiter_android_vh_cpu_idle_exit __traceiter_android_vh_cpu_idle_exit
__traceiter_android_vh_do_anonymous_page
__traceiter_android_vh_do_swap_page
__traceiter_android_vh_do_wp_page
__traceiter_android_vh_dup_task_struct __traceiter_android_vh_dup_task_struct
__traceiter_android_vh_filemap_fault_cache_page __traceiter_android_vh_filemap_fault_cache_page
__traceiter_android_vh_filemap_fault_get_page __traceiter_android_vh_filemap_fault_get_page
@ -1736,6 +1739,7 @@
__traceiter_android_vh_ftrace_oops_enter __traceiter_android_vh_ftrace_oops_enter
__traceiter_android_vh_ftrace_oops_exit __traceiter_android_vh_ftrace_oops_exit
__traceiter_android_vh_ftrace_size_check __traceiter_android_vh_ftrace_size_check
__traceiter_android_vh_fuse_request_end
__traceiter_android_vh_iommu_setup_dma_ops __traceiter_android_vh_iommu_setup_dma_ops
__traceiter_android_vh_ipi_stop __traceiter_android_vh_ipi_stop
__traceiter_android_vh_irqtime_account_process_tick __traceiter_android_vh_irqtime_account_process_tick
@ -1747,9 +1751,11 @@
__traceiter_android_vh_mmc_gpio_cd_irqt __traceiter_android_vh_mmc_gpio_cd_irqt
__traceiter_android_vh_mm_dirty_limits __traceiter_android_vh_mm_dirty_limits
__traceiter_android_vh_printk_hotplug __traceiter_android_vh_printk_hotplug
__traceiter_android_vh_queue_request_and_unlock
__traceiter_android_vh_scheduler_tick __traceiter_android_vh_scheduler_tick
__traceiter_android_vh_sdhci_get_cd __traceiter_android_vh_sdhci_get_cd
__traceiter_android_vh_sd_update_bus_speed_mode __traceiter_android_vh_sd_update_bus_speed_mode
__traceiter_android_vh_shmem_swapin_page
__traceiter_android_vh_show_max_freq __traceiter_android_vh_show_max_freq
__traceiter_android_vh_show_resume_epoch_val __traceiter_android_vh_show_resume_epoch_val
__traceiter_android_vh_show_suspend_epoch_val __traceiter_android_vh_show_suspend_epoch_val
@ -1762,6 +1768,7 @@
__traceiter_android_vh_ufs_compl_command __traceiter_android_vh_ufs_compl_command
__traceiter_android_vh_ufs_send_command __traceiter_android_vh_ufs_send_command
__traceiter_android_vh_ufs_update_sdev __traceiter_android_vh_ufs_update_sdev
__traceiter_android_vh_uprobes_replace_page
__traceiter_android_vh_vmpressure __traceiter_android_vh_vmpressure
__traceiter_binder_transaction_received __traceiter_binder_transaction_received
__traceiter_block_bio_complete __traceiter_block_bio_complete
@ -1841,6 +1848,9 @@
__tracepoint_android_vh_blk_rq_ctx_init __tracepoint_android_vh_blk_rq_ctx_init
__tracepoint_android_vh_cpu_idle_enter __tracepoint_android_vh_cpu_idle_enter
__tracepoint_android_vh_cpu_idle_exit __tracepoint_android_vh_cpu_idle_exit
__tracepoint_android_vh_do_anonymous_page
__tracepoint_android_vh_do_swap_page
__tracepoint_android_vh_do_wp_page
__tracepoint_android_vh_dup_task_struct __tracepoint_android_vh_dup_task_struct
__tracepoint_android_vh_filemap_fault_cache_page __tracepoint_android_vh_filemap_fault_cache_page
__tracepoint_android_vh_filemap_fault_get_page __tracepoint_android_vh_filemap_fault_get_page
@ -1849,6 +1859,7 @@
__tracepoint_android_vh_ftrace_oops_enter __tracepoint_android_vh_ftrace_oops_enter
__tracepoint_android_vh_ftrace_oops_exit __tracepoint_android_vh_ftrace_oops_exit
__tracepoint_android_vh_ftrace_size_check __tracepoint_android_vh_ftrace_size_check
__tracepoint_android_vh_fuse_request_end
__tracepoint_android_vh_iommu_setup_dma_ops __tracepoint_android_vh_iommu_setup_dma_ops
__tracepoint_android_vh_ipi_stop __tracepoint_android_vh_ipi_stop
__tracepoint_android_vh_irqtime_account_process_tick __tracepoint_android_vh_irqtime_account_process_tick
@ -1860,9 +1871,11 @@
__tracepoint_android_vh_mmc_gpio_cd_irqt __tracepoint_android_vh_mmc_gpio_cd_irqt
__tracepoint_android_vh_mm_dirty_limits __tracepoint_android_vh_mm_dirty_limits
__tracepoint_android_vh_printk_hotplug __tracepoint_android_vh_printk_hotplug
__tracepoint_android_vh_queue_request_and_unlock
__tracepoint_android_vh_scheduler_tick __tracepoint_android_vh_scheduler_tick
__tracepoint_android_vh_sdhci_get_cd __tracepoint_android_vh_sdhci_get_cd
__tracepoint_android_vh_sd_update_bus_speed_mode __tracepoint_android_vh_sd_update_bus_speed_mode
__tracepoint_android_vh_shmem_swapin_page
__tracepoint_android_vh_show_max_freq __tracepoint_android_vh_show_max_freq
__tracepoint_android_vh_show_resume_epoch_val __tracepoint_android_vh_show_resume_epoch_val
__tracepoint_android_vh_show_suspend_epoch_val __tracepoint_android_vh_show_suspend_epoch_val
@ -1875,6 +1888,7 @@
__tracepoint_android_vh_ufs_compl_command __tracepoint_android_vh_ufs_compl_command
__tracepoint_android_vh_ufs_send_command __tracepoint_android_vh_ufs_send_command
__tracepoint_android_vh_ufs_update_sdev __tracepoint_android_vh_ufs_update_sdev
__tracepoint_android_vh_uprobes_replace_page
__tracepoint_android_vh_vmpressure __tracepoint_android_vh_vmpressure
__tracepoint_binder_transaction_received __tracepoint_binder_transaction_received
__tracepoint_block_bio_complete __tracepoint_block_bio_complete

View File

@ -84,7 +84,7 @@ eeprom@52 {
&keypad { &keypad {
samsung,keypad-num-rows = <2>; samsung,keypad-num-rows = <2>;
samsung,keypad-num-columns = <8>; samsung,keypad-num-columns = <8>;
linux,keypad-no-autorepeat; linux,input-no-autorepeat;
wakeup-source; wakeup-source;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&keypad_rows &keypad_cols>; pinctrl-0 = <&keypad_rows &keypad_cols>;

View File

@ -447,7 +447,7 @@ buck9_reg: BUCK9 {
&keypad { &keypad {
samsung,keypad-num-rows = <3>; samsung,keypad-num-rows = <3>;
samsung,keypad-num-columns = <2>; samsung,keypad-num-columns = <2>;
linux,keypad-no-autorepeat; linux,input-no-autorepeat;
wakeup-source; wakeup-source;
pinctrl-0 = <&keypad_rows &keypad_cols>; pinctrl-0 = <&keypad_rows &keypad_cols>;
pinctrl-names = "default"; pinctrl-names = "default";

View File

@ -65,7 +65,7 @@ cooling_map1: map1 {
&keypad { &keypad {
samsung,keypad-num-rows = <3>; samsung,keypad-num-rows = <3>;
samsung,keypad-num-columns = <8>; samsung,keypad-num-columns = <8>;
linux,keypad-no-autorepeat; linux,input-no-autorepeat;
wakeup-source; wakeup-source;
pinctrl-0 = <&keypad_rows &keypad_cols>; pinctrl-0 = <&keypad_rows &keypad_cols>;
pinctrl-names = "default"; pinctrl-names = "default";

View File

@ -124,6 +124,7 @@ hdmi: hdmi@10116000 {
pinctrl-0 = <&hdmii2c_xfer>, <&hdmi_hpd>; pinctrl-0 = <&hdmii2c_xfer>, <&hdmi_hpd>;
power-domains = <&power RK3066_PD_VIO>; power-domains = <&power RK3066_PD_VIO>;
rockchip,grf = <&grf>; rockchip,grf = <&grf>;
#sound-dai-cells = <0>;
status = "disabled"; status = "disabled";
ports { ports {

View File

@ -147,16 +147,6 @@ extern int __get_user_64t_1(void *);
extern int __get_user_64t_2(void *); extern int __get_user_64t_2(void *);
extern int __get_user_64t_4(void *); extern int __get_user_64t_4(void *);
#define __GUP_CLOBBER_1 "lr", "cc"
#ifdef CONFIG_CPU_USE_DOMAINS
#define __GUP_CLOBBER_2 "ip", "lr", "cc"
#else
#define __GUP_CLOBBER_2 "lr", "cc"
#endif
#define __GUP_CLOBBER_4 "lr", "cc"
#define __GUP_CLOBBER_32t_8 "lr", "cc"
#define __GUP_CLOBBER_8 "lr", "cc"
#define __get_user_x(__r2, __p, __e, __l, __s) \ #define __get_user_x(__r2, __p, __e, __l, __s) \
__asm__ __volatile__ ( \ __asm__ __volatile__ ( \
__asmeq("%0", "r0") __asmeq("%1", "r2") \ __asmeq("%0", "r0") __asmeq("%1", "r2") \
@ -164,7 +154,7 @@ extern int __get_user_64t_4(void *);
"bl __get_user_" #__s \ "bl __get_user_" #__s \
: "=&r" (__e), "=r" (__r2) \ : "=&r" (__e), "=r" (__r2) \
: "0" (__p), "r" (__l) \ : "0" (__p), "r" (__l) \
: __GUP_CLOBBER_##__s) : "ip", "lr", "cc")
/* narrowing a double-word get into a single 32bit word register: */ /* narrowing a double-word get into a single 32bit word register: */
#ifdef __ARMEB__ #ifdef __ARMEB__
@ -186,7 +176,7 @@ extern int __get_user_64t_4(void *);
"bl __get_user_64t_" #__s \ "bl __get_user_64t_" #__s \
: "=&r" (__e), "=r" (__r2) \ : "=&r" (__e), "=r" (__r2) \
: "0" (__p), "r" (__l) \ : "0" (__p), "r" (__l) \
: __GUP_CLOBBER_##__s) : "ip", "lr", "cc")
#else #else
#define __get_user_x_64t __get_user_x #define __get_user_x_64t __get_user_x
#endif #endif

View File

@ -62,7 +62,7 @@ static void davinci_pm_suspend(void)
/* Configure sleep count in deep sleep register */ /* Configure sleep count in deep sleep register */
val = __raw_readl(pm_config.deepsleep_reg); val = __raw_readl(pm_config.deepsleep_reg);
val &= ~DEEPSLEEP_SLEEPCOUNT_MASK, val &= ~DEEPSLEEP_SLEEPCOUNT_MASK;
val |= pm_config.sleepcount; val |= pm_config.sleepcount;
__raw_writel(val, pm_config.deepsleep_reg); __raw_writel(val, pm_config.deepsleep_reg);

View File

@ -58,7 +58,7 @@ cpu@3 {
gic: interrupt-controller@f1001000 { gic: interrupt-controller@f1001000 {
compatible = "arm,gic-400"; compatible = "arm,gic-400";
reg = <0x0 0xf1001000 0x0 0x1000>, /* GICD */ reg = <0x0 0xf1001000 0x0 0x1000>, /* GICD */
<0x0 0xf1002000 0x0 0x100>; /* GICC */ <0x0 0xf1002000 0x0 0x2000>; /* GICC */
#address-cells = <0>; #address-cells = <0>;
#interrupt-cells = <3>; #interrupt-cells = <3>;
interrupt-controller; interrupt-controller;

View File

@ -9,8 +9,8 @@ / {
compatible = "nvidia,norrin", "nvidia,tegra132", "nvidia,tegra124"; compatible = "nvidia,norrin", "nvidia,tegra132", "nvidia,tegra124";
aliases { aliases {
rtc0 = "/i2c@7000d000/as3722@40"; rtc0 = &as3722;
rtc1 = "/rtc@7000e000"; rtc1 = &tegra_rtc;
serial0 = &uarta; serial0 = &uarta;
}; };

View File

@ -573,7 +573,7 @@ spi@7000de00 {
status = "disabled"; status = "disabled";
}; };
rtc@7000e000 { tegra_rtc: rtc@7000e000 {
compatible = "nvidia,tegra124-rtc", "nvidia,tegra20-rtc"; compatible = "nvidia,tegra124-rtc", "nvidia,tegra20-rtc";
reg = <0x0 0x7000e000 0x0 0x100>; reg = <0x0 0x7000e000 0x0 0x100>;
interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;

View File

@ -1796,6 +1796,7 @@ dwc3@6a00000 {
snps,dis_u2_susphy_quirk; snps,dis_u2_susphy_quirk;
snps,dis_enblslpm_quirk; snps,dis_enblslpm_quirk;
snps,is-utmi-l1-suspend; snps,is-utmi-l1-suspend;
snps,parkmode-disable-ss-quirk;
tx-fifo-resize; tx-fifo-resize;
}; };
}; };

View File

@ -60,7 +60,7 @@ bluetooth {
vddrf-supply = <&vreg_l1_1p3>; vddrf-supply = <&vreg_l1_1p3>;
vddch0-supply = <&vdd_ch0_3p3>; vddch0-supply = <&vdd_ch0_3p3>;
local-bd-address = [ 02 00 00 00 5a ad ]; local-bd-address = [ 00 00 00 00 00 00 ];
max-speed = <3200000>; max-speed = <3200000>;
}; };

View File

@ -687,6 +687,7 @@ spdif: spdif@ff880000 {
dma-names = "tx"; dma-names = "tx";
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&spdif_tx>; pinctrl-0 = <&spdif_tx>;
#sound-dai-cells = <0>;
status = "disabled"; status = "disabled";
}; };
@ -698,6 +699,7 @@ i2s_2ch: i2s-2ch@ff890000 {
clocks = <&cru SCLK_I2S_2CH>, <&cru HCLK_I2S_2CH>; clocks = <&cru SCLK_I2S_2CH>, <&cru HCLK_I2S_2CH>;
dmas = <&dmac_bus 6>, <&dmac_bus 7>; dmas = <&dmac_bus 6>, <&dmac_bus 7>;
dma-names = "tx", "rx"; dma-names = "tx", "rx";
#sound-dai-cells = <0>;
status = "disabled"; status = "disabled";
}; };
@ -711,6 +713,7 @@ i2s_8ch: i2s-8ch@ff898000 {
dma-names = "tx", "rx"; dma-names = "tx", "rx";
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&i2s_8ch_bus>; pinctrl-0 = <&i2s_8ch_bus>;
#sound-dai-cells = <0>;
status = "disabled"; status = "disabled";
}; };

View File

@ -6,8 +6,6 @@ CONFIG_MAC80211=m
CONFIG_QRTR=m CONFIG_QRTR=m
CONFIG_QRTR_TUN=m CONFIG_QRTR_TUN=m
CONFIG_SCSI_UFS_QCOM=m CONFIG_SCSI_UFS_QCOM=m
CONFIG_USB_NET_AX8817X=m
CONFIG_USB_NET_AX88179_178A=m
CONFIG_INPUT_PM8941_PWRKEY=m CONFIG_INPUT_PM8941_PWRKEY=m
CONFIG_SERIAL_MSM=m CONFIG_SERIAL_MSM=m
CONFIG_SERIAL_QCOM_GENI=m CONFIG_SERIAL_QCOM_GENI=m

View File

@ -333,8 +333,6 @@ CONFIG_PPPOL2TP=y
CONFIG_USB_RTL8150=y CONFIG_USB_RTL8150=y
CONFIG_USB_RTL8152=y CONFIG_USB_RTL8152=y
CONFIG_USB_USBNET=y CONFIG_USB_USBNET=y
# CONFIG_USB_NET_AX8817X is not set
# CONFIG_USB_NET_AX88179_178A is not set
CONFIG_USB_NET_CDC_EEM=y CONFIG_USB_NET_CDC_EEM=y
# CONFIG_USB_NET_NET1080 is not set # CONFIG_USB_NET_NET1080 is not set
# CONFIG_USB_NET_CDC_SUBSET is not set # CONFIG_USB_NET_CDC_SUBSET is not set

View File

@ -28,6 +28,7 @@
14470: .long 14471f - 14470b; \ 14470: .long 14471f - 14470b; \
_BUGVERBOSE_LOCATION(__FILE__, __LINE__) \ _BUGVERBOSE_LOCATION(__FILE__, __LINE__) \
.short flags; \ .short flags; \
.align 2; \
.popsection; \ .popsection; \
14471: 14471:
#else #else

View File

@ -408,6 +408,7 @@ struct kvm_vcpu_arch {
#define KVM_ARM64_EXCEPT_MASK (7 << 9) /* Target EL/MODE */ #define KVM_ARM64_EXCEPT_MASK (7 << 9) /* Target EL/MODE */
#define KVM_ARM64_DEBUG_STATE_SAVE_SPE (1 << 12) /* Save SPE context if active */ #define KVM_ARM64_DEBUG_STATE_SAVE_SPE (1 << 12) /* Save SPE context if active */
#define KVM_ARM64_DEBUG_STATE_SAVE_TRBE (1 << 13) /* Save TRBE context if active */ #define KVM_ARM64_DEBUG_STATE_SAVE_TRBE (1 << 13) /* Save TRBE context if active */
#define KVM_ARM64_VCPU_IN_WFI (1 << 14) /* WFI instruction trapped */
/* /*
* When KVM_ARM64_PENDING_EXCEPTION is set, KVM_ARM64_EXCEPT_MASK can * When KVM_ARM64_PENDING_EXCEPTION is set, KVM_ARM64_EXCEPT_MASK can

View File

@ -840,7 +840,7 @@ __SYSCALL(__NR_pselect6_time64, compat_sys_pselect6_time64)
#define __NR_ppoll_time64 414 #define __NR_ppoll_time64 414
__SYSCALL(__NR_ppoll_time64, compat_sys_ppoll_time64) __SYSCALL(__NR_ppoll_time64, compat_sys_ppoll_time64)
#define __NR_io_pgetevents_time64 416 #define __NR_io_pgetevents_time64 416
__SYSCALL(__NR_io_pgetevents_time64, sys_io_pgetevents) __SYSCALL(__NR_io_pgetevents_time64, compat_sys_io_pgetevents_time64)
#define __NR_recvmmsg_time64 417 #define __NR_recvmmsg_time64 417
__SYSCALL(__NR_recvmmsg_time64, compat_sys_recvmmsg_time64) __SYSCALL(__NR_recvmmsg_time64, compat_sys_recvmmsg_time64)
#define __NR_mq_timedsend_time64 418 #define __NR_mq_timedsend_time64 418

View File

@ -366,13 +366,15 @@ void kvm_arch_vcpu_blocking(struct kvm_vcpu *vcpu)
*/ */
preempt_disable(); preempt_disable();
kvm_vgic_vmcr_sync(vcpu); kvm_vgic_vmcr_sync(vcpu);
vgic_v4_put(vcpu, true); vcpu->arch.flags |= KVM_ARM64_VCPU_IN_WFI;
vgic_v4_put(vcpu);
preempt_enable(); preempt_enable();
} }
void kvm_arch_vcpu_unblocking(struct kvm_vcpu *vcpu) void kvm_arch_vcpu_unblocking(struct kvm_vcpu *vcpu)
{ {
preempt_disable(); preempt_disable();
vcpu->arch.flags &= ~KVM_ARM64_VCPU_IN_WFI;
vgic_v4_load(vcpu); vgic_v4_load(vcpu);
preempt_enable(); preempt_enable();
} }
@ -683,7 +685,7 @@ static void check_vcpu_requests(struct kvm_vcpu *vcpu)
if (kvm_check_request(KVM_REQ_RELOAD_GICv4, vcpu)) { if (kvm_check_request(KVM_REQ_RELOAD_GICv4, vcpu)) {
/* The distributor enable bits were changed */ /* The distributor enable bits were changed */
preempt_disable(); preempt_disable();
vgic_v4_put(vcpu, false); vgic_v4_put(vcpu);
vgic_v4_load(vcpu); vgic_v4_load(vcpu);
preempt_enable(); preempt_enable();
} }

View File

@ -233,6 +233,7 @@ static int set_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)
case PSR_AA32_MODE_SVC: case PSR_AA32_MODE_SVC:
case PSR_AA32_MODE_ABT: case PSR_AA32_MODE_ABT:
case PSR_AA32_MODE_UND: case PSR_AA32_MODE_UND:
case PSR_AA32_MODE_SYS:
if (!vcpu_el1_is_32bit(vcpu)) if (!vcpu_el1_is_32bit(vcpu))
return -EINVAL; return -EINVAL;
break; break;

View File

@ -679,7 +679,7 @@ void vgic_v3_put(struct kvm_vcpu *vcpu)
{ {
struct vgic_v3_cpu_if *cpu_if = &vcpu->arch.vgic_cpu.vgic_v3; struct vgic_v3_cpu_if *cpu_if = &vcpu->arch.vgic_cpu.vgic_v3;
WARN_ON(vgic_v4_put(vcpu, false)); WARN_ON(vgic_v4_put(vcpu));
vgic_v3_vmcr_sync(vcpu); vgic_v3_vmcr_sync(vcpu);

View File

@ -310,14 +310,15 @@ void vgic_v4_teardown(struct kvm *kvm)
its_vm->vpes = NULL; its_vm->vpes = NULL;
} }
int vgic_v4_put(struct kvm_vcpu *vcpu, bool need_db) int vgic_v4_put(struct kvm_vcpu *vcpu)
{ {
struct its_vpe *vpe = &vcpu->arch.vgic_cpu.vgic_v3.its_vpe; struct its_vpe *vpe = &vcpu->arch.vgic_cpu.vgic_v3.its_vpe;
if (!vgic_supports_direct_msis(vcpu->kvm) || !vpe->resident) if (!vgic_supports_direct_msis(vcpu->kvm) || !vpe->resident)
return 0; return 0;
return its_make_vpe_non_resident(vpe, need_db); return its_make_vpe_non_resident(vpe,
vcpu->arch.flags & KVM_ARM64_VCPU_IN_WFI);
} }
int vgic_v4_load(struct kvm_vcpu *vcpu) int vgic_v4_load(struct kvm_vcpu *vcpu)
@ -328,6 +329,9 @@ int vgic_v4_load(struct kvm_vcpu *vcpu)
if (!vgic_supports_direct_msis(vcpu->kvm) || vpe->resident) if (!vgic_supports_direct_msis(vcpu->kvm) || vpe->resident)
return 0; return 0;
if (vcpu->arch.flags & KVM_ARM64_VCPU_IN_WFI)
return 0;
/* /*
* Before making the VPE resident, make sure the redistributor * Before making the VPE resident, make sure the redistributor
* corresponding to our current CPU expects us here. See the * corresponding to our current CPU expects us here. See the

View File

@ -7,6 +7,7 @@
#define __ARCH_WANT_SYS_CLONE3 #define __ARCH_WANT_SYS_CLONE3
#define __ARCH_WANT_SET_GET_RLIMIT #define __ARCH_WANT_SET_GET_RLIMIT
#define __ARCH_WANT_TIME32_SYSCALLS #define __ARCH_WANT_TIME32_SYSCALLS
#define __ARCH_WANT_SYNC_FILE_RANGE2
#include <asm-generic/unistd.h> #include <asm-generic/unistd.h>
#define __NR_set_thread_area (__NR_arch_specific_syscall + 0) #define __NR_set_thread_area (__NR_arch_specific_syscall + 0)

View File

@ -0,0 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 */
#include <asm-generic/syscalls.h>
asmlinkage long sys_hexagon_fadvise64_64(int fd, int advice,
u32 a2, u32 a3, u32 a4, u32 a5);

View File

@ -36,5 +36,6 @@
#define __ARCH_WANT_SYS_VFORK #define __ARCH_WANT_SYS_VFORK
#define __ARCH_WANT_SYS_FORK #define __ARCH_WANT_SYS_FORK
#define __ARCH_WANT_TIME32_SYSCALLS #define __ARCH_WANT_TIME32_SYSCALLS
#define __ARCH_WANT_SYNC_FILE_RANGE2
#include <asm-generic/unistd.h> #include <asm-generic/unistd.h>

View File

@ -14,6 +14,13 @@
#undef __SYSCALL #undef __SYSCALL
#define __SYSCALL(nr, call) [nr] = (call), #define __SYSCALL(nr, call) [nr] = (call),
SYSCALL_DEFINE6(hexagon_fadvise64_64, int, fd, int, advice,
SC_ARG64(offset), SC_ARG64(len))
{
return ksys_fadvise64_64(fd, SC_VAL64(loff_t, offset), SC_VAL64(loff_t, len), advice);
}
#define sys_fadvise64_64 sys_hexagon_fadvise64_64
void *sys_call_table[__NR_syscalls] = { void *sys_call_table[__NR_syscalls] = {
#include <asm/unistd.h> #include <asm/unistd.h>
}; };

View File

@ -0,0 +1,13 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_EFI_H
#define _ASM_EFI_H
typedef int (*efi_freemem_callback_t) (u64 start, u64 end, void *arg);
void *efi_get_pal_addr(void);
void efi_map_pal_code(void);
void efi_memmap_walk(efi_freemem_callback_t, void *);
void efi_memmap_walk_uc(efi_freemem_callback_t, void *);
void efi_gettimeofday(struct timespec64 *ts);
#endif

View File

@ -34,6 +34,7 @@
#include <linux/kexec.h> #include <linux/kexec.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <asm/efi.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/kregs.h> #include <asm/kregs.h>
#include <asm/meminit.h> #include <asm/meminit.h>

View File

@ -16,6 +16,7 @@
#include <linux/numa.h> #include <linux/numa.h>
#include <linux/mmzone.h> #include <linux/mmzone.h>
#include <asm/efi.h>
#include <asm/numa.h> #include <asm/numa.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/setup.h> #include <asm/setup.h>

View File

@ -91,6 +91,7 @@
#include <linux/gfp.h> #include <linux/gfp.h>
#include <asm/delay.h> #include <asm/delay.h>
#include <asm/efi.h>
#include <asm/meminit.h> #include <asm/meminit.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>

View File

@ -45,6 +45,7 @@
#include <asm/cache.h> #include <asm/cache.h>
#include <asm/current.h> #include <asm/current.h>
#include <asm/delay.h> #include <asm/delay.h>
#include <asm/efi.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/mca.h> #include <asm/mca.h>

View File

@ -26,6 +26,7 @@
#include <linux/sched/cputime.h> #include <linux/sched/cputime.h>
#include <asm/delay.h> #include <asm/delay.h>
#include <asm/efi.h>
#include <asm/hw_irq.h> #include <asm/hw_irq.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/sal.h> #include <asm/sal.h>

View File

@ -20,14 +20,12 @@
#include <linux/genalloc.h> #include <linux/genalloc.h>
#include <linux/gfp.h> #include <linux/gfp.h>
#include <linux/pgtable.h> #include <linux/pgtable.h>
#include <asm/efi.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/pal.h> #include <asm/pal.h>
#include <linux/atomic.h> #include <linux/atomic.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
extern void __init efi_memmap_walk_uc(efi_freemem_callback_t, void *);
struct uncached_pool { struct uncached_pool {
struct gen_pool *pool; struct gen_pool *pool;
struct mutex add_chunk_mutex; /* serialize adding a converted chunk */ struct mutex add_chunk_mutex; /* serialize adding a converted chunk */

View File

@ -20,6 +20,7 @@
#include <linux/nmi.h> #include <linux/nmi.h>
#include <linux/swap.h> #include <linux/swap.h>
#include <asm/efi.h>
#include <asm/meminit.h> #include <asm/meminit.h>
#include <asm/sections.h> #include <asm/sections.h>
#include <asm/mca.h> #include <asm/mca.h>

View File

@ -24,6 +24,7 @@
#include <linux/efi.h> #include <linux/efi.h>
#include <linux/nodemask.h> #include <linux/nodemask.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <asm/efi.h>
#include <asm/tlb.h> #include <asm/tlb.h>
#include <asm/meminit.h> #include <asm/meminit.h>
#include <asm/numa.h> #include <asm/numa.h>

View File

@ -27,6 +27,7 @@
#include <linux/swiotlb.h> #include <linux/swiotlb.h>
#include <asm/dma.h> #include <asm/dma.h>
#include <asm/efi.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/numa.h> #include <asm/numa.h>
#include <asm/patch.h> #include <asm/patch.h>

View File

@ -432,7 +432,9 @@ resume:
movec %a0,%dfc movec %a0,%dfc
/* restore status register */ /* restore status register */
movew %a1@(TASK_THREAD+THREAD_SR),%sr movew %a1@(TASK_THREAD+THREAD_SR),%d0
oriw #0x0700,%d0
movew %d0,%sr
rts rts

View File

@ -452,30 +452,18 @@ void mac_poweroff(void)
void mac_reset(void) void mac_reset(void)
{ {
if (macintosh_config->adb_type == MAC_ADB_II &&
macintosh_config->ident != MAC_MODEL_SE30) {
/* need ROMBASE in booter */
/* indeed, plus need to MAP THE ROM !! */
if (mac_bi_data.rombase == 0)
mac_bi_data.rombase = 0x40800000;
/* works on some */
rom_reset = (void *) (mac_bi_data.rombase + 0xa);
local_irq_disable();
rom_reset();
#ifdef CONFIG_ADB_CUDA #ifdef CONFIG_ADB_CUDA
} else if (macintosh_config->adb_type == MAC_ADB_EGRET || if (macintosh_config->adb_type == MAC_ADB_EGRET ||
macintosh_config->adb_type == MAC_ADB_CUDA) { macintosh_config->adb_type == MAC_ADB_CUDA) {
cuda_restart(); cuda_restart();
} else
#endif #endif
#ifdef CONFIG_ADB_PMU #ifdef CONFIG_ADB_PMU
} else if (macintosh_config->adb_type == MAC_ADB_PB2) { if (macintosh_config->adb_type == MAC_ADB_PB2) {
pmu_restart(); pmu_restart();
} else
#endif #endif
} else if (CPU_IS_030) { if (CPU_IS_030) {
/* 030-specific reset routine. The idea is general, but the /* 030-specific reset routine. The idea is general, but the
* specific registers to reset are '030-specific. Until I * specific registers to reset are '030-specific. Until I
* have a non-030 machine, I can't test anything else. * have a non-030 machine, I can't test anything else.
@ -523,6 +511,18 @@ void mac_reset(void)
"jmp %/a0@\n\t" /* jump to the reset vector */ "jmp %/a0@\n\t" /* jump to the reset vector */
".chip 68k" ".chip 68k"
: : "r" (offset), "a" (rombase) : "a0"); : : "r" (offset), "a" (rombase) : "a0");
} else {
/* need ROMBASE in booter */
/* indeed, plus need to MAP THE ROM !! */
if (mac_bi_data.rombase == 0)
mac_bi_data.rombase = 0x40800000;
/* works on some */
rom_reset = (void *)(mac_bi_data.rombase + 0xa);
local_irq_disable();
rom_reset();
} }
/* should never get here */ /* should never get here */

View File

@ -7,7 +7,6 @@ ifdef CONFIG_FUNCTION_TRACER
# Do not trace early boot code and low level code # Do not trace early boot code and low level code
CFLAGS_REMOVE_timer.o = -pg CFLAGS_REMOVE_timer.o = -pg
CFLAGS_REMOVE_intc.o = -pg CFLAGS_REMOVE_intc.o = -pg
CFLAGS_REMOVE_early_printk.o = -pg
CFLAGS_REMOVE_ftrace.o = -pg CFLAGS_REMOVE_ftrace.o = -pg
CFLAGS_REMOVE_process.o = -pg CFLAGS_REMOVE_process.o = -pg
endif endif

View File

@ -18,7 +18,7 @@ static const char family_string[] = CONFIG_XILINX_MICROBLAZE0_FAMILY;
static const char cpu_ver_string[] = CONFIG_XILINX_MICROBLAZE0_HW_VER; static const char cpu_ver_string[] = CONFIG_XILINX_MICROBLAZE0_HW_VER;
#define err_printk(x) \ #define err_printk(x) \
early_printk("ERROR: Microblaze " x "-different for kernel and DTS\n"); pr_err("ERROR: Microblaze " x "-different for kernel and DTS\n");
void __init set_cpuinfo_static(struct cpuinfo *ci, struct device_node *cpu) void __init set_cpuinfo_static(struct cpuinfo *ci, struct device_node *cpu)
{ {

View File

@ -110,7 +110,8 @@ static void bcm6358_quirks(void)
* RAC flush causes kernel panics on BCM6358 when booting from TP1 * RAC flush causes kernel panics on BCM6358 when booting from TP1
* because the bootloader is not initializing it properly. * because the bootloader is not initializing it properly.
*/ */
bmips_rac_flush_disable = !!(read_c0_brcm_cmt_local() & (1 << 31)); bmips_rac_flush_disable = !!(read_c0_brcm_cmt_local() & (1 << 31)) ||
!!BMIPS_GET_CBR();
} }
static void bcm6368_quirks(void) static void bcm6368_quirks(void)

View File

@ -354,7 +354,7 @@
412 n32 utimensat_time64 sys_utimensat 412 n32 utimensat_time64 sys_utimensat
413 n32 pselect6_time64 compat_sys_pselect6_time64 413 n32 pselect6_time64 compat_sys_pselect6_time64
414 n32 ppoll_time64 compat_sys_ppoll_time64 414 n32 ppoll_time64 compat_sys_ppoll_time64
416 n32 io_pgetevents_time64 sys_io_pgetevents 416 n32 io_pgetevents_time64 compat_sys_io_pgetevents_time64
417 n32 recvmmsg_time64 compat_sys_recvmmsg_time64 417 n32 recvmmsg_time64 compat_sys_recvmmsg_time64
418 n32 mq_timedsend_time64 sys_mq_timedsend 418 n32 mq_timedsend_time64 sys_mq_timedsend
419 n32 mq_timedreceive_time64 sys_mq_timedreceive 419 n32 mq_timedreceive_time64 sys_mq_timedreceive

View File

@ -27,7 +27,7 @@
17 o32 break sys_ni_syscall 17 o32 break sys_ni_syscall
# 18 was sys_stat # 18 was sys_stat
18 o32 unused18 sys_ni_syscall 18 o32 unused18 sys_ni_syscall
19 o32 lseek sys_lseek 19 o32 lseek sys_lseek compat_sys_lseek
20 o32 getpid sys_getpid 20 o32 getpid sys_getpid
21 o32 mount sys_mount 21 o32 mount sys_mount
22 o32 umount sys_oldumount 22 o32 umount sys_oldumount
@ -403,7 +403,7 @@
412 o32 utimensat_time64 sys_utimensat sys_utimensat 412 o32 utimensat_time64 sys_utimensat sys_utimensat
413 o32 pselect6_time64 sys_pselect6 compat_sys_pselect6_time64 413 o32 pselect6_time64 sys_pselect6 compat_sys_pselect6_time64
414 o32 ppoll_time64 sys_ppoll compat_sys_ppoll_time64 414 o32 ppoll_time64 sys_ppoll compat_sys_ppoll_time64
416 o32 io_pgetevents_time64 sys_io_pgetevents sys_io_pgetevents 416 o32 io_pgetevents_time64 sys_io_pgetevents compat_sys_io_pgetevents_time64
417 o32 recvmmsg_time64 sys_recvmmsg compat_sys_recvmmsg_time64 417 o32 recvmmsg_time64 sys_recvmmsg compat_sys_recvmmsg_time64
418 o32 mq_timedsend_time64 sys_mq_timedsend sys_mq_timedsend 418 o32 mq_timedsend_time64 sys_mq_timedsend sys_mq_timedsend
419 o32 mq_timedreceive_time64 sys_mq_timedreceive sys_mq_timedreceive 419 o32 mq_timedreceive_time64 sys_mq_timedreceive sys_mq_timedreceive

View File

@ -112,8 +112,8 @@ static int read_config_dword(struct pci_bus *bus, unsigned int devfn,
* gives them time to settle * gives them time to settle
*/ */
if (where == PCI_VENDOR_ID) { if (where == PCI_VENDOR_ID) {
if (ret == 0xffffffff || ret == 0x00000000 || if (*val == 0xffffffff || *val == 0x00000000 ||
ret == 0x0000ffff || ret == 0xffff0000) { *val == 0x0000ffff || *val == 0xffff0000) {
if (delay > 4) if (delay > 4)
return 0; return 0;
delay *= 2; delay *= 2;

6
arch/mips/pci/pcie-octeon.c Normal file → Executable file
View File

@ -230,12 +230,18 @@ static inline uint64_t __cvmx_pcie_build_config_addr(int pcie_port, int bus,
{ {
union cvmx_pcie_address pcie_addr; union cvmx_pcie_address pcie_addr;
union cvmx_pciercx_cfg006 pciercx_cfg006; union cvmx_pciercx_cfg006 pciercx_cfg006;
union cvmx_pciercx_cfg032 pciercx_cfg032;
pciercx_cfg006.u32 = pciercx_cfg006.u32 =
cvmx_pcie_cfgx_read(pcie_port, CVMX_PCIERCX_CFG006(pcie_port)); cvmx_pcie_cfgx_read(pcie_port, CVMX_PCIERCX_CFG006(pcie_port));
if ((bus <= pciercx_cfg006.s.pbnum) && (dev != 0)) if ((bus <= pciercx_cfg006.s.pbnum) && (dev != 0))
return 0; return 0;
pciercx_cfg032.u32 =
cvmx_pcie_cfgx_read(pcie_port, CVMX_PCIERCX_CFG032(pcie_port));
if ((pciercx_cfg032.s.dlla == 0) || (pciercx_cfg032.s.lt == 1))
return 0;
pcie_addr.u64 = 0; pcie_addr.u64 = 0;
pcie_addr.config.upper = 2; pcie_addr.config.upper = 2;
pcie_addr.config.io = 1; pcie_addr.config.io = 1;

View File

@ -21,6 +21,7 @@ EXPORT_SYMBOL(memset);
#include <linux/atomic.h> #include <linux/atomic.h>
EXPORT_SYMBOL(__xchg8); EXPORT_SYMBOL(__xchg8);
EXPORT_SYMBOL(__xchg32); EXPORT_SYMBOL(__xchg32);
EXPORT_SYMBOL(__cmpxchg_u8);
EXPORT_SYMBOL(__cmpxchg_u32); EXPORT_SYMBOL(__cmpxchg_u32);
EXPORT_SYMBOL(__cmpxchg_u64); EXPORT_SYMBOL(__cmpxchg_u64);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP

View File

@ -108,7 +108,7 @@
95 common fchown sys_fchown 95 common fchown sys_fchown
96 common getpriority sys_getpriority 96 common getpriority sys_getpriority
97 common setpriority sys_setpriority 97 common setpriority sys_setpriority
98 common recv sys_recv 98 common recv sys_recv compat_sys_recv
99 common statfs sys_statfs compat_sys_statfs 99 common statfs sys_statfs compat_sys_statfs
100 common fstatfs sys_fstatfs compat_sys_fstatfs 100 common fstatfs sys_fstatfs compat_sys_fstatfs
101 common stat64 sys_stat64 101 common stat64 sys_stat64
@ -135,7 +135,7 @@
120 common clone sys_clone_wrapper 120 common clone sys_clone_wrapper
121 common setdomainname sys_setdomainname 121 common setdomainname sys_setdomainname
122 common sendfile sys_sendfile compat_sys_sendfile 122 common sendfile sys_sendfile compat_sys_sendfile
123 common recvfrom sys_recvfrom 123 common recvfrom sys_recvfrom compat_sys_recvfrom
124 32 adjtimex sys_adjtimex_time32 124 32 adjtimex sys_adjtimex_time32
124 64 adjtimex sys_adjtimex 124 64 adjtimex sys_adjtimex
125 common mprotect sys_mprotect 125 common mprotect sys_mprotect

View File

@ -453,7 +453,7 @@ long plpar_hcall_norets_notrace(unsigned long opcode, ...);
* Used for all but the craziest of phyp interfaces (see plpar_hcall9) * Used for all but the craziest of phyp interfaces (see plpar_hcall9)
*/ */
#define PLPAR_HCALL_BUFSIZE 4 #define PLPAR_HCALL_BUFSIZE 4
long plpar_hcall(unsigned long opcode, unsigned long *retbuf, ...); long plpar_hcall(unsigned long opcode, unsigned long retbuf[static PLPAR_HCALL_BUFSIZE], ...);
/** /**
* plpar_hcall_raw: - Make a hypervisor call without calculating hcall stats * plpar_hcall_raw: - Make a hypervisor call without calculating hcall stats
@ -467,7 +467,7 @@ long plpar_hcall(unsigned long opcode, unsigned long *retbuf, ...);
* plpar_hcall, but plpar_hcall_raw works in real mode and does not * plpar_hcall, but plpar_hcall_raw works in real mode and does not
* calculate hypervisor call statistics. * calculate hypervisor call statistics.
*/ */
long plpar_hcall_raw(unsigned long opcode, unsigned long *retbuf, ...); long plpar_hcall_raw(unsigned long opcode, unsigned long retbuf[static PLPAR_HCALL_BUFSIZE], ...);
/** /**
* plpar_hcall9: - Make a pseries hypervisor call with up to 9 return arguments * plpar_hcall9: - Make a pseries hypervisor call with up to 9 return arguments
@ -478,8 +478,8 @@ long plpar_hcall_raw(unsigned long opcode, unsigned long *retbuf, ...);
* PLPAR_HCALL9_BUFSIZE to size the return argument buffer. * PLPAR_HCALL9_BUFSIZE to size the return argument buffer.
*/ */
#define PLPAR_HCALL9_BUFSIZE 9 #define PLPAR_HCALL9_BUFSIZE 9
long plpar_hcall9(unsigned long opcode, unsigned long *retbuf, ...); long plpar_hcall9(unsigned long opcode, unsigned long retbuf[static PLPAR_HCALL9_BUFSIZE], ...);
long plpar_hcall9_raw(unsigned long opcode, unsigned long *retbuf, ...); long plpar_hcall9_raw(unsigned long opcode, unsigned long retbuf[static PLPAR_HCALL9_BUFSIZE], ...);
struct hvcall_mpp_data { struct hvcall_mpp_data {
unsigned long entitled_mem; unsigned long entitled_mem;
@ -494,7 +494,7 @@ struct hvcall_mpp_data {
unsigned long backing_mem; unsigned long backing_mem;
}; };
int h_get_mpp(struct hvcall_mpp_data *); long h_get_mpp(struct hvcall_mpp_data *mpp_data);
struct hvcall_mpp_x_data { struct hvcall_mpp_x_data {
unsigned long coalesced_bytes; unsigned long coalesced_bytes;

View File

@ -45,7 +45,7 @@ extern struct pci_dev *isa_bridge_pcidev;
* define properly based on the platform * define properly based on the platform
*/ */
#ifndef CONFIG_PCI #ifndef CONFIG_PCI
#define _IO_BASE 0 #define _IO_BASE POISON_POINTER_DELTA
#define _ISA_MEM_BASE 0 #define _ISA_MEM_BASE 0
#define PCI_DRAM_OFFSET 0 #define PCI_DRAM_OFFSET 0
#elif defined(CONFIG_PPC32) #elif defined(CONFIG_PPC32)
@ -541,12 +541,12 @@ __do_out_asm(_rec_outl, "stwbrx")
#define __do_inw(port) _rec_inw(port) #define __do_inw(port) _rec_inw(port)
#define __do_inl(port) _rec_inl(port) #define __do_inl(port) _rec_inl(port)
#else /* CONFIG_PPC32 */ #else /* CONFIG_PPC32 */
#define __do_outb(val, port) writeb(val,(PCI_IO_ADDR)_IO_BASE+port); #define __do_outb(val, port) writeb(val,(PCI_IO_ADDR)(_IO_BASE+port));
#define __do_outw(val, port) writew(val,(PCI_IO_ADDR)_IO_BASE+port); #define __do_outw(val, port) writew(val,(PCI_IO_ADDR)(_IO_BASE+port));
#define __do_outl(val, port) writel(val,(PCI_IO_ADDR)_IO_BASE+port); #define __do_outl(val, port) writel(val,(PCI_IO_ADDR)(_IO_BASE+port));
#define __do_inb(port) readb((PCI_IO_ADDR)_IO_BASE + port); #define __do_inb(port) readb((PCI_IO_ADDR)(_IO_BASE + port));
#define __do_inw(port) readw((PCI_IO_ADDR)_IO_BASE + port); #define __do_inw(port) readw((PCI_IO_ADDR)(_IO_BASE + port));
#define __do_inl(port) readl((PCI_IO_ADDR)_IO_BASE + port); #define __do_inl(port) readl((PCI_IO_ADDR)(_IO_BASE + port));
#endif /* !CONFIG_PPC32 */ #endif /* !CONFIG_PPC32 */
#ifdef CONFIG_EEH #ifdef CONFIG_EEH
@ -562,12 +562,12 @@ __do_out_asm(_rec_outl, "stwbrx")
#define __do_writesw(a, b, n) _outsw(PCI_FIX_ADDR(a),(b),(n)) #define __do_writesw(a, b, n) _outsw(PCI_FIX_ADDR(a),(b),(n))
#define __do_writesl(a, b, n) _outsl(PCI_FIX_ADDR(a),(b),(n)) #define __do_writesl(a, b, n) _outsl(PCI_FIX_ADDR(a),(b),(n))
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n)) #define __do_insb(p, b, n) readsb((PCI_IO_ADDR)(_IO_BASE+(p)), (b), (n))
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n)) #define __do_insw(p, b, n) readsw((PCI_IO_ADDR)(_IO_BASE+(p)), (b), (n))
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n)) #define __do_insl(p, b, n) readsl((PCI_IO_ADDR)(_IO_BASE+(p)), (b), (n))
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) #define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)(_IO_BASE+(p)),(b),(n))
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) #define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)(_IO_BASE+(p)),(b),(n))
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) #define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)(_IO_BASE+(p)),(b),(n))
#define __do_memset_io(addr, c, n) \ #define __do_memset_io(addr, c, n) \
_memset_io(PCI_FIX_ADDR(addr), c, n) _memset_io(PCI_FIX_ADDR(addr), c, n)

View File

@ -186,9 +186,20 @@ do { \
: \ : \
: label) : label)
#ifdef CONFIG_CC_IS_CLANG
#define DS_FORM_CONSTRAINT "Z<>"
#else
#define DS_FORM_CONSTRAINT "YZ<>"
#endif
#ifdef __powerpc64__ #ifdef __powerpc64__
#define __put_user_asm2_goto(x, ptr, label) \ #define __put_user_asm2_goto(x, addr, label) \
__put_user_asm_goto(x, ptr, label, "std") asm goto ("1: std%U1%X1 %0,%1 # put_user\n" \
EX_TABLE(1b, %l2) \
: \
: "r" (x), DS_FORM_CONSTRAINT (*addr) \
: \
: label)
#else /* __powerpc64__ */ #else /* __powerpc64__ */
#define __put_user_asm2_goto(x, addr, label) \ #define __put_user_asm2_goto(x, addr, label) \
asm_volatile_goto( \ asm_volatile_goto( \

View File

@ -849,6 +849,7 @@ struct pci_bus *eeh_pe_bus_get(struct eeh_pe *pe)
{ {
struct eeh_dev *edev; struct eeh_dev *edev;
struct pci_dev *pdev; struct pci_dev *pdev;
struct pci_bus *bus = NULL;
if (pe->type & EEH_PE_PHB) if (pe->type & EEH_PE_PHB)
return pe->phb->bus; return pe->phb->bus;
@ -859,9 +860,11 @@ struct pci_bus *eeh_pe_bus_get(struct eeh_pe *pe)
/* Retrieve the parent PCI bus of first (top) PCI device */ /* Retrieve the parent PCI bus of first (top) PCI device */
edev = list_first_entry_or_null(&pe->edevs, struct eeh_dev, entry); edev = list_first_entry_or_null(&pe->edevs, struct eeh_dev, entry);
pci_lock_rescan_remove();
pdev = eeh_dev_to_pci_dev(edev); pdev = eeh_dev_to_pci_dev(edev);
if (pdev) if (pdev)
return pdev->bus; bus = pdev->bus;
pci_unlock_rescan_remove();
return NULL; return bus;
} }

View File

@ -503,7 +503,7 @@
412 32 utimensat_time64 sys_utimensat sys_utimensat 412 32 utimensat_time64 sys_utimensat sys_utimensat
413 32 pselect6_time64 sys_pselect6 compat_sys_pselect6_time64 413 32 pselect6_time64 sys_pselect6 compat_sys_pselect6_time64
414 32 ppoll_time64 sys_ppoll compat_sys_ppoll_time64 414 32 ppoll_time64 sys_ppoll compat_sys_ppoll_time64
416 32 io_pgetevents_time64 sys_io_pgetevents sys_io_pgetevents 416 32 io_pgetevents_time64 sys_io_pgetevents compat_sys_io_pgetevents_time64
417 32 recvmmsg_time64 sys_recvmmsg compat_sys_recvmmsg_time64 417 32 recvmmsg_time64 sys_recvmmsg compat_sys_recvmmsg_time64
418 32 mq_timedsend_time64 sys_mq_timedsend sys_mq_timedsend 418 32 mq_timedsend_time64 sys_mq_timedsend sys_mq_timedsend
419 32 mq_timedreceive_time64 sys_mq_timedreceive sys_mq_timedreceive 419 32 mq_timedreceive_time64 sys_mq_timedreceive sys_mq_timedreceive

View File

@ -117,14 +117,16 @@ extern long kvm_spapr_tce_attach_iommu_group(struct kvm *kvm, int tablefd,
} }
rcu_read_unlock(); rcu_read_unlock();
fdput(f); if (!found) {
fdput(f);
if (!found)
return -EINVAL; return -EINVAL;
}
table_group = iommu_group_get_iommudata(grp); table_group = iommu_group_get_iommudata(grp);
if (WARN_ON(!table_group)) if (WARN_ON(!table_group)) {
fdput(f);
return -EFAULT; return -EFAULT;
}
for (i = 0; i < IOMMU_TABLE_GROUP_MAX_TABLES; ++i) { for (i = 0; i < IOMMU_TABLE_GROUP_MAX_TABLES; ++i) {
struct iommu_table *tbltmp = table_group->tables[i]; struct iommu_table *tbltmp = table_group->tables[i];
@ -145,8 +147,10 @@ extern long kvm_spapr_tce_attach_iommu_group(struct kvm *kvm, int tablefd,
break; break;
} }
} }
if (!tbl) if (!tbl) {
fdput(f);
return -EINVAL; return -EINVAL;
}
rcu_read_lock(); rcu_read_lock();
list_for_each_entry_rcu(stit, &stt->iommu_tables, next) { list_for_each_entry_rcu(stit, &stt->iommu_tables, next) {
@ -157,6 +161,7 @@ extern long kvm_spapr_tce_attach_iommu_group(struct kvm *kvm, int tablefd,
/* stit is being destroyed */ /* stit is being destroyed */
iommu_tce_table_put(tbl); iommu_tce_table_put(tbl);
rcu_read_unlock(); rcu_read_unlock();
fdput(f);
return -ENOTTY; return -ENOTTY;
} }
/* /*
@ -164,6 +169,7 @@ extern long kvm_spapr_tce_attach_iommu_group(struct kvm *kvm, int tablefd,
* its KVM reference counter and can return. * its KVM reference counter and can return.
*/ */
rcu_read_unlock(); rcu_read_unlock();
fdput(f);
return 0; return 0;
} }
rcu_read_unlock(); rcu_read_unlock();
@ -171,6 +177,7 @@ extern long kvm_spapr_tce_attach_iommu_group(struct kvm *kvm, int tablefd,
stit = kzalloc(sizeof(*stit), GFP_KERNEL); stit = kzalloc(sizeof(*stit), GFP_KERNEL);
if (!stit) { if (!stit) {
iommu_tce_table_put(tbl); iommu_tce_table_put(tbl);
fdput(f);
return -ENOMEM; return -ENOMEM;
} }
@ -179,6 +186,7 @@ extern long kvm_spapr_tce_attach_iommu_group(struct kvm *kvm, int tablefd,
list_add_rcu(&stit->next, &stt->iommu_tables); list_add_rcu(&stit->next, &stt->iommu_tables);
fdput(f);
return 0; return 0;
} }

View File

@ -1883,10 +1883,10 @@ void __trace_hcall_exit(long opcode, long retval, unsigned long *retbuf)
* h_get_mpp * h_get_mpp
* H_GET_MPP hcall returns info in 7 parms * H_GET_MPP hcall returns info in 7 parms
*/ */
int h_get_mpp(struct hvcall_mpp_data *mpp_data) long h_get_mpp(struct hvcall_mpp_data *mpp_data)
{ {
int rc; unsigned long retbuf[PLPAR_HCALL9_BUFSIZE] = {0};
unsigned long retbuf[PLPAR_HCALL9_BUFSIZE]; long rc;
rc = plpar_hcall9(H_GET_MPP, retbuf); rc = plpar_hcall9(H_GET_MPP, retbuf);

View File

@ -112,8 +112,8 @@ struct hvcall_ppp_data {
*/ */
static unsigned int h_get_ppp(struct hvcall_ppp_data *ppp_data) static unsigned int h_get_ppp(struct hvcall_ppp_data *ppp_data)
{ {
unsigned long rc; unsigned long retbuf[PLPAR_HCALL9_BUFSIZE] = {0};
unsigned long retbuf[PLPAR_HCALL9_BUFSIZE]; long rc;
rc = plpar_hcall9(H_GET_PPP, retbuf); rc = plpar_hcall9(H_GET_PPP, retbuf);
@ -192,7 +192,7 @@ static void parse_ppp_data(struct seq_file *m)
struct hvcall_ppp_data ppp_data; struct hvcall_ppp_data ppp_data;
struct device_node *root; struct device_node *root;
const __be32 *perf_level; const __be32 *perf_level;
int rc; long rc;
rc = h_get_ppp(&ppp_data); rc = h_get_ppp(&ppp_data);
if (rc) if (rc)

View File

@ -312,8 +312,8 @@ static int alloc_dispatch_log_kmem_cache(void)
{ {
void (*ctor)(void *) = get_dtl_cache_ctor(); void (*ctor)(void *) = get_dtl_cache_ctor();
dtl_cache = kmem_cache_create("dtl", DISPATCH_LOG_BYTES, dtl_cache = kmem_cache_create_usercopy("dtl", DISPATCH_LOG_BYTES,
DISPATCH_LOG_BYTES, 0, ctor); DISPATCH_LOG_BYTES, 0, 0, DISPATCH_LOG_BYTES, ctor);
if (!dtl_cache) { if (!dtl_cache) {
pr_warn("Failed to create dispatch trace log buffer cache\n"); pr_warn("Failed to create dispatch trace log buffer cache\n");
pr_warn("Stolen time statistics will be unreliable\n"); pr_warn("Stolen time statistics will be unreliable\n");

View File

@ -573,10 +573,12 @@ static const struct fsl_msi_feature ipic_msi_feature = {
.msiir_offset = 0x38, .msiir_offset = 0x38,
}; };
#ifdef CONFIG_EPAPR_PARAVIRT
static const struct fsl_msi_feature vmpic_msi_feature = { static const struct fsl_msi_feature vmpic_msi_feature = {
.fsl_pic_ip = FSL_PIC_IP_VMPIC, .fsl_pic_ip = FSL_PIC_IP_VMPIC,
.msiir_offset = 0, .msiir_offset = 0,
}; };
#endif
static const struct of_device_id fsl_of_msi_ids[] = { static const struct of_device_id fsl_of_msi_ids[] = {
{ {

View File

@ -1249,7 +1249,7 @@ static int cpu_cmd(void)
unsigned long cpu, first_cpu, last_cpu; unsigned long cpu, first_cpu, last_cpu;
int timeout; int timeout;
if (!scanhex(&cpu)) { if (!scanhex(&cpu) || cpu >= num_possible_cpus()) {
/* print cpus waiting or in xmon */ /* print cpus waiting or in xmon */
printf("cpus stopped:"); printf("cpus stopped:");
last_cpu = first_cpu = NR_CPUS; last_cpu = first_cpu = NR_CPUS;
@ -2680,7 +2680,7 @@ static void dump_pacas(void)
termch = c; /* Put c back, it wasn't 'a' */ termch = c; /* Put c back, it wasn't 'a' */
if (scanhex(&num)) if (scanhex(&num) && num < num_possible_cpus())
dump_one_paca(num); dump_one_paca(num);
else else
dump_one_paca(xmon_owner); dump_one_paca(xmon_owner);
@ -2777,7 +2777,7 @@ static void dump_xives(void)
termch = c; /* Put c back, it wasn't 'a' */ termch = c; /* Put c back, it wasn't 'a' */
if (scanhex(&num)) if (scanhex(&num) && num < num_possible_cpus())
dump_one_xive(num); dump_one_xive(num);
else else
dump_one_xive(xmon_owner); dump_one_xive(xmon_owner);

View File

@ -252,8 +252,8 @@ static inline void __load_psw(psw_t psw)
*/ */
static __always_inline void __load_psw_mask(unsigned long mask) static __always_inline void __load_psw_mask(unsigned long mask)
{ {
psw_t psw __uninitialized;
unsigned long addr; unsigned long addr;
psw_t psw;
psw.mask = mask; psw.mask = mask;

View File

@ -832,8 +832,8 @@ static ssize_t reipl_nvme_scpdata_write(struct file *filp, struct kobject *kobj,
scpdata_len += padding; scpdata_len += padding;
} }
reipl_block_nvme->hdr.len = IPL_BP_FCP_LEN + scpdata_len; reipl_block_nvme->hdr.len = IPL_BP_NVME_LEN + scpdata_len;
reipl_block_nvme->nvme.len = IPL_BP0_FCP_LEN + scpdata_len; reipl_block_nvme->nvme.len = IPL_BP0_NVME_LEN + scpdata_len;
reipl_block_nvme->nvme.scp_data_len = scpdata_len; reipl_block_nvme->nvme.scp_data_len = scpdata_len;
return count; return count;
@ -1602,9 +1602,9 @@ static int __init dump_nvme_init(void)
} }
dump_block_nvme->hdr.len = IPL_BP_NVME_LEN; dump_block_nvme->hdr.len = IPL_BP_NVME_LEN;
dump_block_nvme->hdr.version = IPL_PARM_BLOCK_VERSION; dump_block_nvme->hdr.version = IPL_PARM_BLOCK_VERSION;
dump_block_nvme->fcp.len = IPL_BP0_NVME_LEN; dump_block_nvme->nvme.len = IPL_BP0_NVME_LEN;
dump_block_nvme->fcp.pbt = IPL_PBT_NVME; dump_block_nvme->nvme.pbt = IPL_PBT_NVME;
dump_block_nvme->fcp.opt = IPL_PB0_NVME_OPT_DUMP; dump_block_nvme->nvme.opt = IPL_PB0_NVME_OPT_DUMP;
dump_capabilities |= DUMP_TYPE_NVME; dump_capabilities |= DUMP_TYPE_NVME;
return 0; return 0;
} }

View File

@ -418,7 +418,7 @@
412 32 utimensat_time64 - sys_utimensat 412 32 utimensat_time64 - sys_utimensat
413 32 pselect6_time64 - compat_sys_pselect6_time64 413 32 pselect6_time64 - compat_sys_pselect6_time64
414 32 ppoll_time64 - compat_sys_ppoll_time64 414 32 ppoll_time64 - compat_sys_ppoll_time64
416 32 io_pgetevents_time64 - sys_io_pgetevents 416 32 io_pgetevents_time64 - compat_sys_io_pgetevents_time64
417 32 recvmmsg_time64 - compat_sys_recvmmsg_time64 417 32 recvmmsg_time64 - compat_sys_recvmmsg_time64
418 32 mq_timedsend_time64 - sys_mq_timedsend 418 32 mq_timedsend_time64 - sys_mq_timedsend
419 32 mq_timedreceive_time64 - sys_mq_timedreceive 419 32 mq_timedreceive_time64 - sys_mq_timedreceive

View File

@ -44,17 +44,12 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p)
if (OPCODE_RTE(opcode)) if (OPCODE_RTE(opcode))
return -EFAULT; /* Bad breakpoint */ return -EFAULT; /* Bad breakpoint */
memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t));
p->opcode = opcode; p->opcode = opcode;
return 0; return 0;
} }
void __kprobes arch_copy_kprobe(struct kprobe *p)
{
memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t));
p->opcode = *p->addr;
}
void __kprobes arch_arm_kprobe(struct kprobe *p) void __kprobes arch_arm_kprobe(struct kprobe *p)
{ {
*p->addr = BREAKPOINT_INSTRUCTION; *p->addr = BREAKPOINT_INSTRUCTION;

View File

@ -33,7 +33,8 @@
*/ */
/* /*
* asmlinkage __wsum csum_partial(const void *buf, int len, __wsum sum); * unsigned int csum_partial(const unsigned char *buf, int len,
* unsigned int sum);
*/ */
.text .text
@ -45,31 +46,11 @@ ENTRY(csum_partial)
* Fortunately, it is easy to convert 2-byte alignment to 4-byte * Fortunately, it is easy to convert 2-byte alignment to 4-byte
* alignment for the unrolled loop. * alignment for the unrolled loop.
*/ */
mov r5, r1
mov r4, r0 mov r4, r0
tst #3, r0 ! Check alignment. tst #2, r0 ! Check alignment.
bt/s 2f ! Jump if alignment is ok. bt 2f ! Jump if alignment is ok.
mov r4, r7 ! Keep a copy to check for alignment
! !
tst #1, r0 ! Check alignment.
bt 21f ! Jump if alignment is boundary of 2bytes.
! buf is odd
tst r5, r5
add #-1, r5
bt 9f
mov.b @r4+, r0
extu.b r0, r0
addc r0, r6 ! t=0 from previous tst
mov r6, r0
shll8 r6
shlr16 r0
shlr8 r0
or r0, r6
mov r4, r0
tst #2, r0
bt 2f
21:
! buf is 2 byte aligned (len could be 0)
add #-2, r5 ! Alignment uses up two bytes. add #-2, r5 ! Alignment uses up two bytes.
cmp/pz r5 ! cmp/pz r5 !
bt/s 1f ! Jump if we had at least two bytes. bt/s 1f ! Jump if we had at least two bytes.
@ -77,17 +58,16 @@ ENTRY(csum_partial)
bra 6f bra 6f
add #2, r5 ! r5 was < 2. Deal with it. add #2, r5 ! r5 was < 2. Deal with it.
1: 1:
mov r5, r1 ! Save new len for later use.
mov.w @r4+, r0 mov.w @r4+, r0
extu.w r0, r0 extu.w r0, r0
addc r0, r6 addc r0, r6
bf 2f bf 2f
add #1, r6 add #1, r6
2: 2:
! buf is 4 byte aligned (len could be 0)
mov r5, r1
mov #-5, r0 mov #-5, r0
shld r0, r1 shld r0, r5
tst r1, r1 tst r5, r5
bt/s 4f ! if it's =0, go to 4f bt/s 4f ! if it's =0, go to 4f
clrt clrt
.align 2 .align 2
@ -109,31 +89,30 @@ ENTRY(csum_partial)
addc r0, r6 addc r0, r6
addc r2, r6 addc r2, r6
movt r0 movt r0
dt r1 dt r5
bf/s 3b bf/s 3b
cmp/eq #1, r0 cmp/eq #1, r0
! here, we know r1==0 ! here, we know r5==0
addc r1, r6 ! add carry to r6 addc r5, r6 ! add carry to r6
4: 4:
mov r5, r0 mov r1, r0
and #0x1c, r0 and #0x1c, r0
tst r0, r0 tst r0, r0
bt 6f bt/s 6f
! 4 bytes or more remaining mov r0, r5
mov r0, r1 shlr2 r5
shlr2 r1
mov #0, r2 mov #0, r2
5: 5:
addc r2, r6 addc r2, r6
mov.l @r4+, r2 mov.l @r4+, r2
movt r0 movt r0
dt r1 dt r5
bf/s 5b bf/s 5b
cmp/eq #1, r0 cmp/eq #1, r0
addc r2, r6 addc r2, r6
addc r1, r6 ! r1==0 here, so it means add carry-bit addc r5, r6 ! r5==0 here, so it means add carry-bit
6: 6:
! 3 bytes or less remaining mov r1, r5
mov #3, r0 mov #3, r0
and r0, r5 and r0, r5
tst r5, r5 tst r5, r5
@ -159,16 +138,6 @@ ENTRY(csum_partial)
mov #0, r0 mov #0, r0
addc r0, r6 addc r0, r6
9: 9:
! Check if the buffer was misaligned, if so realign sum
mov r7, r0
tst #1, r0
bt 10f
mov r6, r0
shll8 r6
shlr16 r0
shlr8 r0
or r0, r6
10:
rts rts
mov r6, r0 mov r6, r0

View File

@ -47,7 +47,6 @@ void arch_send_call_function_ipi_mask(const struct cpumask *mask);
int hard_smp_processor_id(void); int hard_smp_processor_id(void);
#define raw_smp_processor_id() (current_thread_info()->cpu) #define raw_smp_processor_id() (current_thread_info()->cpu)
void smp_fill_in_cpu_possible_map(void);
void smp_fill_in_sib_core_maps(void); void smp_fill_in_sib_core_maps(void);
void cpu_play_dead(void); void cpu_play_dead(void);
@ -77,7 +76,6 @@ void __cpu_die(unsigned int cpu);
#define smp_fill_in_sib_core_maps() do { } while (0) #define smp_fill_in_sib_core_maps() do { } while (0)
#define smp_fetch_global_regs() do { } while (0) #define smp_fetch_global_regs() do { } while (0)
#define smp_fetch_global_pmu() do { } while (0) #define smp_fetch_global_pmu() do { } while (0)
#define smp_fill_in_cpu_possible_map() do { } while (0)
#define smp_init_cpu_poke() do { } while (0) #define smp_init_cpu_poke() do { } while (0)
#define scheduler_poke() do { } while (0) #define scheduler_poke() do { } while (0)

View File

@ -13,16 +13,6 @@ typedef unsigned int tcflag_t;
typedef unsigned long tcflag_t; typedef unsigned long tcflag_t;
#endif #endif
#define NCC 8
struct termio {
unsigned short c_iflag; /* input mode flags */
unsigned short c_oflag; /* output mode flags */
unsigned short c_cflag; /* control mode flags */
unsigned short c_lflag; /* local mode flags */
unsigned char c_line; /* line discipline */
unsigned char c_cc[NCC]; /* control characters */
};
#define NCCS 17 #define NCCS 17
struct termios { struct termios {
tcflag_t c_iflag; /* input mode flags */ tcflag_t c_iflag; /* input mode flags */

View File

@ -40,5 +40,14 @@ struct winsize {
unsigned short ws_ypixel; unsigned short ws_ypixel;
}; };
#define NCC 8
struct termio {
unsigned short c_iflag; /* input mode flags */
unsigned short c_oflag; /* output mode flags */
unsigned short c_cflag; /* control mode flags */
unsigned short c_lflag; /* local mode flags */
unsigned char c_line; /* line discipline */
unsigned char c_cc[NCC]; /* control characters */
};
#endif /* _UAPI_SPARC_TERMIOS_H */ #endif /* _UAPI_SPARC_TERMIOS_H */

View File

@ -483,7 +483,9 @@ static void *record_one_cpu(struct device_node *dp, int cpuid, int arg)
ncpus_probed++; ncpus_probed++;
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
set_cpu_present(cpuid, true); set_cpu_present(cpuid, true);
set_cpu_possible(cpuid, true);
if (num_possible_cpus() < nr_cpu_ids)
set_cpu_possible(cpuid, true);
#endif #endif
return NULL; return NULL;
} }

View File

@ -688,7 +688,6 @@ void __init setup_arch(char **cmdline_p)
paging_init(); paging_init();
init_sparc64_elf_hwcap(); init_sparc64_elf_hwcap();
smp_fill_in_cpu_possible_map();
/* /*
* Once the OF device tree and MDESC have been setup and nr_cpus has * Once the OF device tree and MDESC have been setup and nr_cpus has
* been parsed, we know the list of possible cpus. Therefore we can * been parsed, we know the list of possible cpus. Therefore we can

View File

@ -1210,20 +1210,6 @@ void __init smp_setup_processor_id(void)
xcall_deliver_impl = hypervisor_xcall_deliver; xcall_deliver_impl = hypervisor_xcall_deliver;
} }
void __init smp_fill_in_cpu_possible_map(void)
{
int possible_cpus = num_possible_cpus();
int i;
if (possible_cpus > nr_cpu_ids)
possible_cpus = nr_cpu_ids;
for (i = 0; i < possible_cpus; i++)
set_cpu_possible(i, true);
for (; i < NR_CPUS; i++)
set_cpu_possible(i, false);
}
void smp_fill_in_sib_core_maps(void) void smp_fill_in_sib_core_maps(void)
{ {
unsigned int i; unsigned int i;

View File

@ -18,224 +18,3 @@ sys32_mmap2:
sethi %hi(sys_mmap), %g1 sethi %hi(sys_mmap), %g1
jmpl %g1 + %lo(sys_mmap), %g0 jmpl %g1 + %lo(sys_mmap), %g0
sllx %o5, 12, %o5 sllx %o5, 12, %o5
.align 32
.globl sys32_socketcall
sys32_socketcall: /* %o0=call, %o1=args */
cmp %o0, 1
bl,pn %xcc, do_einval
cmp %o0, 18
bg,pn %xcc, do_einval
sub %o0, 1, %o0
sllx %o0, 5, %o0
sethi %hi(__socketcall_table_begin), %g2
or %g2, %lo(__socketcall_table_begin), %g2
jmpl %g2 + %o0, %g0
nop
do_einval:
retl
mov -EINVAL, %o0
.align 32
__socketcall_table_begin:
/* Each entry is exactly 32 bytes. */
do_sys_socket: /* sys_socket(int, int, int) */
1: ldswa [%o1 + 0x0] %asi, %o0
sethi %hi(sys_socket), %g1
2: ldswa [%o1 + 0x8] %asi, %o2
jmpl %g1 + %lo(sys_socket), %g0
3: ldswa [%o1 + 0x4] %asi, %o1
nop
nop
nop
do_sys_bind: /* sys_bind(int fd, struct sockaddr *, int) */
4: ldswa [%o1 + 0x0] %asi, %o0
sethi %hi(sys_bind), %g1
5: ldswa [%o1 + 0x8] %asi, %o2
jmpl %g1 + %lo(sys_bind), %g0
6: lduwa [%o1 + 0x4] %asi, %o1
nop
nop
nop
do_sys_connect: /* sys_connect(int, struct sockaddr *, int) */
7: ldswa [%o1 + 0x0] %asi, %o0
sethi %hi(sys_connect), %g1
8: ldswa [%o1 + 0x8] %asi, %o2
jmpl %g1 + %lo(sys_connect), %g0
9: lduwa [%o1 + 0x4] %asi, %o1
nop
nop
nop
do_sys_listen: /* sys_listen(int, int) */
10: ldswa [%o1 + 0x0] %asi, %o0
sethi %hi(sys_listen), %g1
jmpl %g1 + %lo(sys_listen), %g0
11: ldswa [%o1 + 0x4] %asi, %o1
nop
nop
nop
nop
do_sys_accept: /* sys_accept(int, struct sockaddr *, int *) */
12: ldswa [%o1 + 0x0] %asi, %o0
sethi %hi(sys_accept), %g1
13: lduwa [%o1 + 0x8] %asi, %o2
jmpl %g1 + %lo(sys_accept), %g0
14: lduwa [%o1 + 0x4] %asi, %o1
nop
nop
nop
do_sys_getsockname: /* sys_getsockname(int, struct sockaddr *, int *) */
15: ldswa [%o1 + 0x0] %asi, %o0
sethi %hi(sys_getsockname), %g1
16: lduwa [%o1 + 0x8] %asi, %o2
jmpl %g1 + %lo(sys_getsockname), %g0
17: lduwa [%o1 + 0x4] %asi, %o1
nop
nop
nop
do_sys_getpeername: /* sys_getpeername(int, struct sockaddr *, int *) */
18: ldswa [%o1 + 0x0] %asi, %o0
sethi %hi(sys_getpeername), %g1
19: lduwa [%o1 + 0x8] %asi, %o2
jmpl %g1 + %lo(sys_getpeername), %g0
20: lduwa [%o1 + 0x4] %asi, %o1
nop
nop
nop
do_sys_socketpair: /* sys_socketpair(int, int, int, int *) */
21: ldswa [%o1 + 0x0] %asi, %o0
sethi %hi(sys_socketpair), %g1
22: ldswa [%o1 + 0x8] %asi, %o2
23: lduwa [%o1 + 0xc] %asi, %o3
jmpl %g1 + %lo(sys_socketpair), %g0
24: ldswa [%o1 + 0x4] %asi, %o1
nop
nop
do_sys_send: /* sys_send(int, void *, size_t, unsigned int) */
25: ldswa [%o1 + 0x0] %asi, %o0
sethi %hi(sys_send), %g1
26: lduwa [%o1 + 0x8] %asi, %o2
27: lduwa [%o1 + 0xc] %asi, %o3
jmpl %g1 + %lo(sys_send), %g0
28: lduwa [%o1 + 0x4] %asi, %o1
nop
nop
do_sys_recv: /* sys_recv(int, void *, size_t, unsigned int) */
29: ldswa [%o1 + 0x0] %asi, %o0
sethi %hi(sys_recv), %g1
30: lduwa [%o1 + 0x8] %asi, %o2
31: lduwa [%o1 + 0xc] %asi, %o3
jmpl %g1 + %lo(sys_recv), %g0
32: lduwa [%o1 + 0x4] %asi, %o1
nop
nop
do_sys_sendto: /* sys_sendto(int, u32, compat_size_t, unsigned int, u32, int) */
33: ldswa [%o1 + 0x0] %asi, %o0
sethi %hi(sys_sendto), %g1
34: lduwa [%o1 + 0x8] %asi, %o2
35: lduwa [%o1 + 0xc] %asi, %o3
36: lduwa [%o1 + 0x10] %asi, %o4
37: ldswa [%o1 + 0x14] %asi, %o5
jmpl %g1 + %lo(sys_sendto), %g0
38: lduwa [%o1 + 0x4] %asi, %o1
do_sys_recvfrom: /* sys_recvfrom(int, u32, compat_size_t, unsigned int, u32, u32) */
39: ldswa [%o1 + 0x0] %asi, %o0
sethi %hi(sys_recvfrom), %g1
40: lduwa [%o1 + 0x8] %asi, %o2
41: lduwa [%o1 + 0xc] %asi, %o3
42: lduwa [%o1 + 0x10] %asi, %o4
43: lduwa [%o1 + 0x14] %asi, %o5
jmpl %g1 + %lo(sys_recvfrom), %g0
44: lduwa [%o1 + 0x4] %asi, %o1
do_sys_shutdown: /* sys_shutdown(int, int) */
45: ldswa [%o1 + 0x0] %asi, %o0
sethi %hi(sys_shutdown), %g1
jmpl %g1 + %lo(sys_shutdown), %g0
46: ldswa [%o1 + 0x4] %asi, %o1
nop
nop
nop
nop
do_sys_setsockopt: /* sys_setsockopt(int, int, int, char *, int) */
47: ldswa [%o1 + 0x0] %asi, %o0
sethi %hi(sys_setsockopt), %g1
48: ldswa [%o1 + 0x8] %asi, %o2
49: lduwa [%o1 + 0xc] %asi, %o3
50: ldswa [%o1 + 0x10] %asi, %o4
jmpl %g1 + %lo(sys_setsockopt), %g0
51: ldswa [%o1 + 0x4] %asi, %o1
nop
do_sys_getsockopt: /* sys_getsockopt(int, int, int, u32, u32) */
52: ldswa [%o1 + 0x0] %asi, %o0
sethi %hi(sys_getsockopt), %g1
53: ldswa [%o1 + 0x8] %asi, %o2
54: lduwa [%o1 + 0xc] %asi, %o3
55: lduwa [%o1 + 0x10] %asi, %o4
jmpl %g1 + %lo(sys_getsockopt), %g0
56: ldswa [%o1 + 0x4] %asi, %o1
nop
do_sys_sendmsg: /* compat_sys_sendmsg(int, struct compat_msghdr *, unsigned int) */
57: ldswa [%o1 + 0x0] %asi, %o0
sethi %hi(compat_sys_sendmsg), %g1
58: lduwa [%o1 + 0x8] %asi, %o2
jmpl %g1 + %lo(compat_sys_sendmsg), %g0
59: lduwa [%o1 + 0x4] %asi, %o1
nop
nop
nop
do_sys_recvmsg: /* compat_sys_recvmsg(int, struct compat_msghdr *, unsigned int) */
60: ldswa [%o1 + 0x0] %asi, %o0
sethi %hi(compat_sys_recvmsg), %g1
61: lduwa [%o1 + 0x8] %asi, %o2
jmpl %g1 + %lo(compat_sys_recvmsg), %g0
62: lduwa [%o1 + 0x4] %asi, %o1
nop
nop
nop
do_sys_accept4: /* sys_accept4(int, struct sockaddr *, int *, int) */
63: ldswa [%o1 + 0x0] %asi, %o0
sethi %hi(sys_accept4), %g1
64: lduwa [%o1 + 0x8] %asi, %o2
65: ldswa [%o1 + 0xc] %asi, %o3
jmpl %g1 + %lo(sys_accept4), %g0
66: lduwa [%o1 + 0x4] %asi, %o1
nop
nop
.section __ex_table,"a"
.align 4
.word 1b, __retl_efault, 2b, __retl_efault
.word 3b, __retl_efault, 4b, __retl_efault
.word 5b, __retl_efault, 6b, __retl_efault
.word 7b, __retl_efault, 8b, __retl_efault
.word 9b, __retl_efault, 10b, __retl_efault
.word 11b, __retl_efault, 12b, __retl_efault
.word 13b, __retl_efault, 14b, __retl_efault
.word 15b, __retl_efault, 16b, __retl_efault
.word 17b, __retl_efault, 18b, __retl_efault
.word 19b, __retl_efault, 20b, __retl_efault
.word 21b, __retl_efault, 22b, __retl_efault
.word 23b, __retl_efault, 24b, __retl_efault
.word 25b, __retl_efault, 26b, __retl_efault
.word 27b, __retl_efault, 28b, __retl_efault
.word 29b, __retl_efault, 30b, __retl_efault
.word 31b, __retl_efault, 32b, __retl_efault
.word 33b, __retl_efault, 34b, __retl_efault
.word 35b, __retl_efault, 36b, __retl_efault
.word 37b, __retl_efault, 38b, __retl_efault
.word 39b, __retl_efault, 40b, __retl_efault
.word 41b, __retl_efault, 42b, __retl_efault
.word 43b, __retl_efault, 44b, __retl_efault
.word 45b, __retl_efault, 46b, __retl_efault
.word 47b, __retl_efault, 48b, __retl_efault
.word 49b, __retl_efault, 50b, __retl_efault
.word 51b, __retl_efault, 52b, __retl_efault
.word 53b, __retl_efault, 54b, __retl_efault
.word 55b, __retl_efault, 56b, __retl_efault
.word 57b, __retl_efault, 58b, __retl_efault
.word 59b, __retl_efault, 60b, __retl_efault
.word 61b, __retl_efault, 62b, __retl_efault
.word 63b, __retl_efault, 64b, __retl_efault
.word 65b, __retl_efault, 66b, __retl_efault
.previous

View File

@ -117,7 +117,7 @@
90 common dup2 sys_dup2 90 common dup2 sys_dup2
91 32 setfsuid32 sys_setfsuid 91 32 setfsuid32 sys_setfsuid
92 common fcntl sys_fcntl compat_sys_fcntl 92 common fcntl sys_fcntl compat_sys_fcntl
93 common select sys_select 93 common select sys_select compat_sys_select
94 32 setfsgid32 sys_setfsgid 94 32 setfsgid32 sys_setfsgid
95 common fsync sys_fsync 95 common fsync sys_fsync
96 common setpriority sys_setpriority 96 common setpriority sys_setpriority
@ -155,7 +155,7 @@
123 32 fchown sys_fchown16 123 32 fchown sys_fchown16
123 64 fchown sys_fchown 123 64 fchown sys_fchown
124 common fchmod sys_fchmod 124 common fchmod sys_fchmod
125 common recvfrom sys_recvfrom 125 common recvfrom sys_recvfrom compat_sys_recvfrom
126 32 setreuid sys_setreuid16 126 32 setreuid sys_setreuid16
126 64 setreuid sys_setreuid 126 64 setreuid sys_setreuid
127 32 setregid sys_setregid16 127 32 setregid sys_setregid16
@ -247,7 +247,7 @@
204 32 readdir sys_old_readdir compat_sys_old_readdir 204 32 readdir sys_old_readdir compat_sys_old_readdir
204 64 readdir sys_nis_syscall 204 64 readdir sys_nis_syscall
205 common readahead sys_readahead compat_sys_readahead 205 common readahead sys_readahead compat_sys_readahead
206 common socketcall sys_socketcall sys32_socketcall 206 common socketcall sys_socketcall compat_sys_socketcall
207 common syslog sys_syslog 207 common syslog sys_syslog
208 common lookup_dcookie sys_lookup_dcookie compat_sys_lookup_dcookie 208 common lookup_dcookie sys_lookup_dcookie compat_sys_lookup_dcookie
209 common fadvise64 sys_fadvise64 compat_sys_fadvise64 209 common fadvise64 sys_fadvise64 compat_sys_fadvise64
@ -461,7 +461,7 @@
412 32 utimensat_time64 sys_utimensat sys_utimensat 412 32 utimensat_time64 sys_utimensat sys_utimensat
413 32 pselect6_time64 sys_pselect6 compat_sys_pselect6_time64 413 32 pselect6_time64 sys_pselect6 compat_sys_pselect6_time64
414 32 ppoll_time64 sys_ppoll compat_sys_ppoll_time64 414 32 ppoll_time64 sys_ppoll compat_sys_ppoll_time64
416 32 io_pgetevents_time64 sys_io_pgetevents sys_io_pgetevents 416 32 io_pgetevents_time64 sys_io_pgetevents compat_sys_io_pgetevents_time64
417 32 recvmmsg_time64 sys_recvmmsg compat_sys_recvmmsg_time64 417 32 recvmmsg_time64 sys_recvmmsg compat_sys_recvmmsg_time64
418 32 mq_timedsend_time64 sys_mq_timedsend sys_mq_timedsend 418 32 mq_timedsend_time64 sys_mq_timedsend sys_mq_timedsend
419 32 mq_timedreceive_time64 sys_mq_timedreceive sys_mq_timedreceive 419 32 mq_timedreceive_time64 sys_mq_timedreceive sys_mq_timedreceive

View File

@ -668,24 +668,26 @@ void register_winch_irq(int fd, int tty_fd, int pid, struct tty_port *port,
goto cleanup; goto cleanup;
} }
*winch = ((struct winch) { .list = LIST_HEAD_INIT(winch->list), *winch = ((struct winch) { .fd = fd,
.fd = fd,
.tty_fd = tty_fd, .tty_fd = tty_fd,
.pid = pid, .pid = pid,
.port = port, .port = port,
.stack = stack }); .stack = stack });
spin_lock(&winch_handler_lock);
list_add(&winch->list, &winch_handlers);
spin_unlock(&winch_handler_lock);
if (um_request_irq(WINCH_IRQ, fd, IRQ_READ, winch_interrupt, if (um_request_irq(WINCH_IRQ, fd, IRQ_READ, winch_interrupt,
IRQF_SHARED, "winch", winch) < 0) { IRQF_SHARED, "winch", winch) < 0) {
printk(KERN_ERR "register_winch_irq - failed to register " printk(KERN_ERR "register_winch_irq - failed to register "
"IRQ\n"); "IRQ\n");
spin_lock(&winch_handler_lock);
list_del(&winch->list);
spin_unlock(&winch_handler_lock);
goto out_free; goto out_free;
} }
spin_lock(&winch_handler_lock);
list_add(&winch->list, &winch_handlers);
spin_unlock(&winch_handler_lock);
return; return;
out_free: out_free:

View File

@ -1158,7 +1158,7 @@ static int __init ubd_init(void)
if (irq_req_buffer == NULL) { if (irq_req_buffer == NULL) {
printk(KERN_ERR "Failed to initialize ubd buffering\n"); printk(KERN_ERR "Failed to initialize ubd buffering\n");
return -1; return -ENOMEM;
} }
io_req_buffer = kmalloc_array(UBD_REQ_BUFFER_SIZE, io_req_buffer = kmalloc_array(UBD_REQ_BUFFER_SIZE,
sizeof(struct io_thread_req *), sizeof(struct io_thread_req *),
@ -1169,7 +1169,7 @@ static int __init ubd_init(void)
if (io_req_buffer == NULL) { if (io_req_buffer == NULL) {
printk(KERN_ERR "Failed to initialize ubd buffering\n"); printk(KERN_ERR "Failed to initialize ubd buffering\n");
return -1; return -ENOMEM;
} }
platform_driver_register(&ubd_driver); platform_driver_register(&ubd_driver);
mutex_lock(&ubd_lock); mutex_lock(&ubd_lock);

View File

@ -142,7 +142,7 @@ static bool get_bpf_flash(struct arglist *def)
if (allow != NULL) { if (allow != NULL) {
if (kstrtoul(allow, 10, &result) == 0) if (kstrtoul(allow, 10, &result) == 0)
return (allow > 0); return result > 0;
} }
return false; return false;
} }

View File

@ -15,8 +15,6 @@ typedef struct mm_context {
struct page *stub_pages[2]; struct page *stub_pages[2];
} mm_context_t; } mm_context_t;
extern void __switch_mm(struct mm_id * mm_idp);
/* Avoid tangled inclusion with asm/ldt.h */ /* Avoid tangled inclusion with asm/ldt.h */
extern long init_new_ldt(struct mm_context *to_mm, struct mm_context *from_mm); extern long init_new_ldt(struct mm_context *to_mm, struct mm_context *from_mm);
extern void free_ldt(struct mm_context *mm); extern void free_ldt(struct mm_context *mm);

View File

@ -15,4 +15,6 @@ struct mm_id {
int kill; int kill;
}; };
void __switch_mm(struct mm_id *mm_idp);
#endif #endif

View File

@ -258,6 +258,7 @@ config UNWINDER_ORC
config UNWINDER_FRAME_POINTER config UNWINDER_FRAME_POINTER
bool "Frame pointer unwinder" bool "Frame pointer unwinder"
select ARCH_WANT_FRAME_POINTERS
select FRAME_POINTER select FRAME_POINTER
help help
This option enables the frame pointer unwinder for unwinding kernel This option enables the frame pointer unwinder for unwinding kernel
@ -281,7 +282,3 @@ config UNWINDER_GUESS
overhead. overhead.
endchoice endchoice
config FRAME_POINTER
depends on !UNWINDER_ORC && !UNWINDER_GUESS
bool

View File

@ -304,8 +304,6 @@ CONFIG_PPPOL2TP=y
CONFIG_USB_RTL8150=y CONFIG_USB_RTL8150=y
CONFIG_USB_RTL8152=y CONFIG_USB_RTL8152=y
CONFIG_USB_USBNET=y CONFIG_USB_USBNET=y
# CONFIG_USB_NET_AX8817X is not set
# CONFIG_USB_NET_AX88179_178A is not set
CONFIG_USB_NET_CDC_EEM=y CONFIG_USB_NET_CDC_EEM=y
# CONFIG_USB_NET_NET1080 is not set # CONFIG_USB_NET_NET1080 is not set
# CONFIG_USB_NET_CDC_SUBSET is not set # CONFIG_USB_NET_CDC_SUBSET is not set

View File

@ -153,5 +153,6 @@ SYM_FUNC_START(nh_avx2)
vpaddq T1, T0, T0 vpaddq T1, T0, T0
vpaddq T4, T0, T0 vpaddq T4, T0, T0
vmovdqu T0, (HASH) vmovdqu T0, (HASH)
vzeroupper
RET RET
SYM_FUNC_END(nh_avx2) SYM_FUNC_END(nh_avx2)

View File

@ -711,6 +711,7 @@ done_hash:
popq %r13 popq %r13
popq %r12 popq %r12
popq %rbx popq %rbx
vzeroupper
RET RET
SYM_FUNC_END(sha256_transform_rorx) SYM_FUNC_END(sha256_transform_rorx)

View File

@ -420,7 +420,7 @@
412 i386 utimensat_time64 sys_utimensat 412 i386 utimensat_time64 sys_utimensat
413 i386 pselect6_time64 sys_pselect6 compat_sys_pselect6_time64 413 i386 pselect6_time64 sys_pselect6 compat_sys_pselect6_time64
414 i386 ppoll_time64 sys_ppoll compat_sys_ppoll_time64 414 i386 ppoll_time64 sys_ppoll compat_sys_ppoll_time64
416 i386 io_pgetevents_time64 sys_io_pgetevents 416 i386 io_pgetevents_time64 sys_io_pgetevents compat_sys_io_pgetevents_time64
417 i386 recvmmsg_time64 sys_recvmmsg compat_sys_recvmmsg_time64 417 i386 recvmmsg_time64 sys_recvmmsg compat_sys_recvmmsg_time64
418 i386 mq_timedsend_time64 sys_mq_timedsend 418 i386 mq_timedsend_time64 sys_mq_timedsend
419 i386 mq_timedreceive_time64 sys_mq_timedreceive 419 i386 mq_timedreceive_time64 sys_mq_timedreceive

View File

@ -98,11 +98,6 @@ static int addr_to_vsyscall_nr(unsigned long addr)
static bool write_ok_or_segv(unsigned long ptr, size_t size) static bool write_ok_or_segv(unsigned long ptr, size_t size)
{ {
/*
* XXX: if access_ok, get_user, and put_user handled
* sig_on_uaccess_err, this could go away.
*/
if (!access_ok((void __user *)ptr, size)) { if (!access_ok((void __user *)ptr, size)) {
struct thread_struct *thread = &current->thread; struct thread_struct *thread = &current->thread;
@ -120,10 +115,8 @@ static bool write_ok_or_segv(unsigned long ptr, size_t size)
bool emulate_vsyscall(unsigned long error_code, bool emulate_vsyscall(unsigned long error_code,
struct pt_regs *regs, unsigned long address) struct pt_regs *regs, unsigned long address)
{ {
struct task_struct *tsk;
unsigned long caller; unsigned long caller;
int vsyscall_nr, syscall_nr, tmp; int vsyscall_nr, syscall_nr, tmp;
int prev_sig_on_uaccess_err;
long ret; long ret;
unsigned long orig_dx; unsigned long orig_dx;
@ -172,8 +165,6 @@ bool emulate_vsyscall(unsigned long error_code,
goto sigsegv; goto sigsegv;
} }
tsk = current;
/* /*
* Check for access_ok violations and find the syscall nr. * Check for access_ok violations and find the syscall nr.
* *
@ -233,12 +224,8 @@ bool emulate_vsyscall(unsigned long error_code,
goto do_ret; /* skip requested */ goto do_ret; /* skip requested */
/* /*
* With a real vsyscall, page faults cause SIGSEGV. We want to * With a real vsyscall, page faults cause SIGSEGV.
* preserve that behavior to make writing exploits harder.
*/ */
prev_sig_on_uaccess_err = current->thread.sig_on_uaccess_err;
current->thread.sig_on_uaccess_err = 1;
ret = -EFAULT; ret = -EFAULT;
switch (vsyscall_nr) { switch (vsyscall_nr) {
case 0: case 0:
@ -261,23 +248,12 @@ bool emulate_vsyscall(unsigned long error_code,
break; break;
} }
current->thread.sig_on_uaccess_err = prev_sig_on_uaccess_err;
check_fault: check_fault:
if (ret == -EFAULT) { if (ret == -EFAULT) {
/* Bad news -- userspace fed a bad pointer to a vsyscall. */ /* Bad news -- userspace fed a bad pointer to a vsyscall. */
warn_bad_vsyscall(KERN_INFO, regs, warn_bad_vsyscall(KERN_INFO, regs,
"vsyscall fault (exploit attempt?)"); "vsyscall fault (exploit attempt?)");
goto sigsegv;
/*
* If we failed to generate a signal for any reason,
* generate one here. (This should be impossible.)
*/
if (WARN_ON_ONCE(!sigismember(&tsk->pending.signal, SIGBUS) &&
!sigismember(&tsk->pending.signal, SIGSEGV)))
goto sigsegv;
return true; /* Don't emulate the ret. */
} }
regs->ax = ret; regs->ax = ret;

View File

@ -2,6 +2,39 @@
#ifndef _ASM_X86_CPU_DEVICE_ID #ifndef _ASM_X86_CPU_DEVICE_ID
#define _ASM_X86_CPU_DEVICE_ID #define _ASM_X86_CPU_DEVICE_ID
/*
* Can't use <linux/bitfield.h> because it generates expressions that
* cannot be used in structure initializers. Bitfield construction
* here must match the union in struct cpuinfo_86:
* union {
* struct {
* __u8 x86_model;
* __u8 x86;
* __u8 x86_vendor;
* __u8 x86_reserved;
* };
* __u32 x86_vfm;
* };
*/
#define VFM_MODEL_BIT 0
#define VFM_FAMILY_BIT 8
#define VFM_VENDOR_BIT 16
#define VFM_RSVD_BIT 24
#define VFM_MODEL_MASK GENMASK(VFM_FAMILY_BIT - 1, VFM_MODEL_BIT)
#define VFM_FAMILY_MASK GENMASK(VFM_VENDOR_BIT - 1, VFM_FAMILY_BIT)
#define VFM_VENDOR_MASK GENMASK(VFM_RSVD_BIT - 1, VFM_VENDOR_BIT)
#define VFM_MODEL(vfm) (((vfm) & VFM_MODEL_MASK) >> VFM_MODEL_BIT)
#define VFM_FAMILY(vfm) (((vfm) & VFM_FAMILY_MASK) >> VFM_FAMILY_BIT)
#define VFM_VENDOR(vfm) (((vfm) & VFM_VENDOR_MASK) >> VFM_VENDOR_BIT)
#define VFM_MAKE(_vendor, _family, _model) ( \
((_model) << VFM_MODEL_BIT) | \
((_family) << VFM_FAMILY_BIT) | \
((_vendor) << VFM_VENDOR_BIT) \
)
/* /*
* Declare drivers belonging to specific x86 CPUs * Declare drivers belonging to specific x86 CPUs
* Similar in spirit to pci_device_id and related PCI functions * Similar in spirit to pci_device_id and related PCI functions
@ -20,6 +53,9 @@
#define X86_CENTAUR_FAM6_C7_D 0xd #define X86_CENTAUR_FAM6_C7_D 0xd
#define X86_CENTAUR_FAM6_NANO 0xf #define X86_CENTAUR_FAM6_NANO 0xf
/* x86_cpu_id::flags */
#define X86_CPU_ID_FLAG_ENTRY_VALID BIT(0)
#define X86_STEPPINGS(mins, maxs) GENMASK(maxs, mins) #define X86_STEPPINGS(mins, maxs) GENMASK(maxs, mins)
/** /**
* X86_MATCH_VENDOR_FAM_MODEL_STEPPINGS_FEATURE - Base macro for CPU matching * X86_MATCH_VENDOR_FAM_MODEL_STEPPINGS_FEATURE - Base macro for CPU matching
@ -46,6 +82,18 @@
.model = _model, \ .model = _model, \
.steppings = _steppings, \ .steppings = _steppings, \
.feature = _feature, \ .feature = _feature, \
.flags = X86_CPU_ID_FLAG_ENTRY_VALID, \
.driver_data = (unsigned long) _data \
}
#define X86_MATCH_VENDORID_FAM_MODEL_STEPPINGS_FEATURE(_vendor, _family, _model, \
_steppings, _feature, _data) { \
.vendor = _vendor, \
.family = _family, \
.model = _model, \
.steppings = _steppings, \
.feature = _feature, \
.flags = X86_CPU_ID_FLAG_ENTRY_VALID, \
.driver_data = (unsigned long) _data \ .driver_data = (unsigned long) _data \
} }
@ -164,6 +212,56 @@
X86_MATCH_VENDOR_FAM_MODEL_STEPPINGS_FEATURE(INTEL, 6, INTEL_FAM6_##model, \ X86_MATCH_VENDOR_FAM_MODEL_STEPPINGS_FEATURE(INTEL, 6, INTEL_FAM6_##model, \
steppings, X86_FEATURE_ANY, data) steppings, X86_FEATURE_ANY, data)
/**
* X86_MATCH_VFM - Match encoded vendor/family/model
* @vfm: Encoded 8-bits each for vendor, family, model
* @data: Driver specific data or NULL. The internal storage
* format is unsigned long. The supplied value, pointer
* etc. is cast to unsigned long internally.
*
* Stepping and feature are set to wildcards
*/
#define X86_MATCH_VFM(vfm, data) \
X86_MATCH_VENDORID_FAM_MODEL_STEPPINGS_FEATURE( \
VFM_VENDOR(vfm), \
VFM_FAMILY(vfm), \
VFM_MODEL(vfm), \
X86_STEPPING_ANY, X86_FEATURE_ANY, data)
/**
* X86_MATCH_VFM_STEPPINGS - Match encoded vendor/family/model/stepping
* @vfm: Encoded 8-bits each for vendor, family, model
* @steppings: Bitmask of steppings to match
* @data: Driver specific data or NULL. The internal storage
* format is unsigned long. The supplied value, pointer
* etc. is cast to unsigned long internally.
*
* feature is set to wildcard
*/
#define X86_MATCH_VFM_STEPPINGS(vfm, steppings, data) \
X86_MATCH_VENDORID_FAM_MODEL_STEPPINGS_FEATURE( \
VFM_VENDOR(vfm), \
VFM_FAMILY(vfm), \
VFM_MODEL(vfm), \
steppings, X86_FEATURE_ANY, data)
/**
* X86_MATCH_VFM_FEATURE - Match encoded vendor/family/model/feature
* @vfm: Encoded 8-bits each for vendor, family, model
* @feature: A X86_FEATURE bit
* @data: Driver specific data or NULL. The internal storage
* format is unsigned long. The supplied value, pointer
* etc. is cast to unsigned long internally.
*
* Steppings is set to wildcard
*/
#define X86_MATCH_VFM_FEATURE(vfm, feature, data) \
X86_MATCH_VENDORID_FAM_MODEL_STEPPINGS_FEATURE( \
VFM_VENDOR(vfm), \
VFM_FAMILY(vfm), \
VFM_MODEL(vfm), \
X86_STEPPING_ANY, feature, data)
/* /*
* Match specific microcode revisions. * Match specific microcode revisions.
* *

View File

@ -382,4 +382,15 @@ static inline void efi_fake_memmap_early(void)
} }
#endif #endif
extern int __init efi_memmap_alloc(unsigned int num_entries,
struct efi_memory_map_data *data);
extern void __efi_memmap_free(u64 phys, unsigned long size,
unsigned long flags);
extern int __init efi_memmap_install(struct efi_memory_map_data *data);
extern int __init efi_memmap_split_count(efi_memory_desc_t *md,
struct range *range);
extern void __init efi_memmap_insert(struct efi_memory_map *old_memmap,
void *buf, struct efi_mem_range *mem);
#endif /* _ASM_X86_EFI_H */ #endif /* _ASM_X86_EFI_H */

View File

@ -528,7 +528,6 @@ struct thread_struct {
unsigned long iopl_emul; unsigned long iopl_emul;
unsigned int iopl_warn:1; unsigned int iopl_warn:1;
unsigned int sig_on_uaccess_err:1;
/* Floating point and extended processor state */ /* Floating point and extended processor state */
struct fpu fpu; struct fpu fpu;

View File

@ -164,7 +164,14 @@ static int __amd_smn_rw(u16 node, u32 address, u32 *value, bool write)
int amd_smn_read(u16 node, u32 address, u32 *value) int amd_smn_read(u16 node, u32 address, u32 *value)
{ {
return __amd_smn_rw(node, address, value, false); int err = __amd_smn_rw(node, address, value, false);
if (PCI_POSSIBLE_ERROR(*value)) {
err = -ENODEV;
*value = 0;
}
return err;
} }
EXPORT_SYMBOL_GPL(amd_smn_read); EXPORT_SYMBOL_GPL(amd_smn_read);

View File

@ -920,7 +920,8 @@ static void __send_cleanup_vector(struct apic_chip_data *apicd)
hlist_add_head(&apicd->clist, per_cpu_ptr(&cleanup_list, cpu)); hlist_add_head(&apicd->clist, per_cpu_ptr(&cleanup_list, cpu));
apic->send_IPI(cpu, IRQ_MOVE_CLEANUP_VECTOR); apic->send_IPI(cpu, IRQ_MOVE_CLEANUP_VECTOR);
} else { } else {
apicd->prev_vector = 0; pr_warn("IRQ %u schedule cleanup for offline CPU %u\n", apicd->irq, cpu);
free_moved_vector(apicd);
} }
raw_spin_unlock(&vector_lock); raw_spin_unlock(&vector_lock);
} }
@ -957,6 +958,7 @@ void irq_complete_move(struct irq_cfg *cfg)
*/ */
void irq_force_complete_move(struct irq_desc *desc) void irq_force_complete_move(struct irq_desc *desc)
{ {
unsigned int cpu = smp_processor_id();
struct apic_chip_data *apicd; struct apic_chip_data *apicd;
struct irq_data *irqd; struct irq_data *irqd;
unsigned int vector; unsigned int vector;
@ -981,10 +983,11 @@ void irq_force_complete_move(struct irq_desc *desc)
goto unlock; goto unlock;
/* /*
* If prev_vector is empty, no action required. * If prev_vector is empty or the descriptor is neither currently
* nor previously on the outgoing CPU no action required.
*/ */
vector = apicd->prev_vector; vector = apicd->prev_vector;
if (!vector) if (!vector || (apicd->cpu != cpu && apicd->prev_cpu != cpu))
goto unlock; goto unlock;
/* /*

View File

@ -39,9 +39,7 @@ const struct x86_cpu_id *x86_match_cpu(const struct x86_cpu_id *match)
const struct x86_cpu_id *m; const struct x86_cpu_id *m;
struct cpuinfo_x86 *c = &boot_cpu_data; struct cpuinfo_x86 *c = &boot_cpu_data;
for (m = match; for (m = match; m->flags & X86_CPU_ID_FLAG_ENTRY_VALID; m++) {
m->vendor | m->family | m->model | m->steppings | m->feature;
m++) {
if (m->vendor != X86_VENDOR_ANY && c->x86_vendor != m->vendor) if (m->vendor != X86_VENDOR_ANY && c->x86_vendor != m->vendor)
continue; continue;
if (m->family != X86_FAMILY_ANY && c->x86 != m->family) if (m->family != X86_FAMILY_ANY && c->x86 != m->family)

View File

@ -27,25 +27,7 @@
unsigned long profile_pc(struct pt_regs *regs) unsigned long profile_pc(struct pt_regs *regs)
{ {
unsigned long pc = instruction_pointer(regs); return instruction_pointer(regs);
if (!user_mode(regs) && in_lock_functions(pc)) {
#ifdef CONFIG_FRAME_POINTER
return *(unsigned long *)(regs->bp + sizeof(long));
#else
unsigned long *sp = (unsigned long *)regs->sp;
/*
* Return address is either directly at stack pointer
* or above a saved flags. Eflags has bits 22-31 zero,
* kernel addresses don't.
*/
if (sp[0] >> 22)
return sp[0];
if (sp[1] >> 22)
return sp[1];
#endif
}
return pc;
} }
EXPORT_SYMBOL(profile_pc); EXPORT_SYMBOL(profile_pc);

View File

@ -192,11 +192,9 @@ bool tsc_store_and_check_tsc_adjust(bool bootcpu)
cur->warned = false; cur->warned = false;
/* /*
* If a non-zero TSC value for socket 0 may be valid then the default * The default adjust value cannot be assumed to be zero on any socket.
* adjusted value cannot assumed to be zero either.
*/ */
if (tsc_async_resets) cur->adjusted = bootval;
cur->adjusted = bootval;
/* /*
* Check whether this CPU is the first in a package to come up. In * Check whether this CPU is the first in a package to come up. In

View File

@ -105,6 +105,7 @@ __EXPORT_THUNK(srso_alias_untrain_ret)
/* dummy definition for alternatives */ /* dummy definition for alternatives */
SYM_START(srso_alias_untrain_ret, SYM_L_GLOBAL, SYM_A_NONE) SYM_START(srso_alias_untrain_ret, SYM_L_GLOBAL, SYM_A_NONE)
ANNOTATE_UNRET_SAFE ANNOTATE_UNRET_SAFE
ANNOTATE_NOENDBR
ret ret
int3 int3
SYM_FUNC_END(srso_alias_untrain_ret) SYM_FUNC_END(srso_alias_untrain_ret)
@ -258,7 +259,6 @@ SYM_CODE_START(__x86_return_thunk)
UNWIND_HINT_FUNC UNWIND_HINT_FUNC
ANNOTATE_NOENDBR ANNOTATE_NOENDBR
ANNOTATE_UNRET_SAFE ANNOTATE_UNRET_SAFE
ANNOTATE_NOENDBR
ret ret
int3 int3
SYM_CODE_END(__x86_return_thunk) SYM_CODE_END(__x86_return_thunk)

Some files were not shown because too many files have changed in this diff Show More