Merge tag 'ASB-2023-09-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona
https://source.android.com/docs/security/bulletin/2023-09-01 * tag 'ASB-2023-09-05_4.19-stable' of https://android.googlesource.com/kernel/common: Linux 4.19.294 Revert "ARM: ep93xx: fix missing-prototype warnings" Revert "MIPS: Alchemy: fix dbdma2" Linux 4.19.293 dma-buf/sw_sync: Avoid recursive lock during fence signal clk: Fix undefined reference to `clk_rate_exclusive_{get,put}' scsi: core: raid_class: Remove raid_component_add() scsi: snic: Fix double free in snic_tgt_create() irqchip/mips-gic: Don't touch vl_map if a local interrupt is not routable rtnetlink: Reject negative ifindexes in RTM_NEWLINK netfilter: nf_queue: fix socket leak sched/rt: pick_next_rt_entity(): check list_entry mmc: block: Fix in_flight[issue_type] value error x86/fpu: Set X86_FEATURE_OSXSAVE feature after enabling OSXSAVE in CR4 PCI: acpiphp: Use pci_assign_unassigned_bridge_resources() only for non-root bus media: vcodec: Fix potential array out-of-bounds in encoder queue_setup lib/clz_ctz.c: Fix __clzdi2() and __ctzdi2() for 32-bit kernels batman-adv: Fix batadv_v_ogm_aggr_send memory leak batman-adv: Fix TT global entry leak when client roamed back batman-adv: Do not get eth header before batadv_check_management_packet batman-adv: Don't increase MTU when set by user batman-adv: Trigger events for auto adjusted MTU nfsd: Fix race to FREE_STATEID and cl_revoked ibmveth: Use dcbf rather than dcbfl ipvs: fix racy memcpy in proc_do_sync_threshold ipvs: Improve robustness to the ipvs sysctl bonding: fix macvlan over alb bond support net: remove bond_slave_has_mac_rcu() net/sched: fix a qdisc modification with ambiguous command request igb: Avoid starting unnecessary workqueues dccp: annotate data-races in dccp_poll() sock: annotate data-races around prot->memory_pressure tracing: Fix memleak due to race between current_tracer and trace drm/amd/display: check TG is non-null before checking if enabled drm/amd/display: do not wait for mpc idle if tg is disabled regmap: Account for register length in SMBus I/O limits dm integrity: reduce vmalloc space footprint on 32-bit architectures dm integrity: increase RECALC_SECTORS to improve recalculate speed powerpc: Fail build if using recordmcount with binutils v2.37 powerpc: remove leftover code of old GCC version checks powerpc/32: add stack protector support fbdev: fix potential OOB read in fast_imageblit() fbdev: Fix sys_imageblit() for arbitrary image widths fbdev: Improve performance of sys_imageblit() tty: serial: fsl_lpuart: add earlycon for imx8ulp platform Revert "tty: serial: fsl_lpuart: drop earlycon entry for i.MX8QXP" MIPS: cpu-features: Use boot_cpu_type for CPU type based features MIPS: cpu-features: Enable octeon_cache by cpu_type fs: dlm: fix mismatch of plock results from userspace fs: dlm: use dlm_plock_info for do_unlock_close fs: dlm: change plock interrupted message to debug again fs: dlm: add pid to debug log dlm: replace usage of found with dedicated list iterator variable dlm: improve plock logging if interrupted PCI: acpiphp: Reassign resources on bridge if necessary net: phy: broadcom: stub c45 read/write for 54810 net: xfrm: Amend XFRMA_SEC_CTX nla_policy structure net: fix the RTO timer retransmitting skb every 1ms if linear option is enabled virtio-net: set queues after driver_ok af_unix: Fix null-ptr-deref in unix_stream_sendpage(). netfilter: set default timeout to 3 secs for sctp shutdown send and recv state test_firmware: prevent race conditions by a correct implementation of locking mmc: wbsd: fix double mmc_free_host() in wbsd_init() cifs: Release folio lock on fscache read hit. ALSA: usb-audio: Add support for Mythware XA001AU capture and playback interfaces. serial: 8250: Fix oops for port->pm on uart_change_pm() ASoC: meson: axg-tdm-formatter: fix channel slot allocation ASoC: rt5665: add missed regulator_bulk_disable net: do not allow gso_size to be set to GSO_BY_FRAGS sock: Fix misuse of sk_under_memory_pressure() i40e: fix misleading debug logs team: Fix incorrect deletion of ETH_P_8021AD protocol vid from slaves netfilter: nft_dynset: disallow object maps selftests: mirror_gre_changes: Tighten up the TTL test match xfrm: add NULL check in xfrm_update_ae_params ip_vti: fix potential slab-use-after-free in decode_session6 ip6_vti: fix slab-use-after-free in decode_session6 xfrm: fix slab-use-after-free in decode_session6 xfrm: interface: rename xfrm_interface.c to xfrm_interface_core.c net: af_key: fix sadb_x_filter validation net: xfrm: Fix xfrm_address_filter OOB read btrfs: fix BUG_ON condition in btrfs_cancel_balance powerpc/rtas_flash: allow user copy to flash block cache objects fbdev: mmp: fix value check in mmphw_probe() virtio-mmio: don't break lifecycle of vm_dev virtio-mmio: Use to_virtio_mmio_device() to simply code virtio-mmio: convert to devm_platform_ioremap_resource nfsd: Remove incorrect check in nfsd4_validate_stateid nfsd4: kill warnings on testing stateids with mismatched clientids block: fix signed int overflow in Amiga partition support mmc: sunxi: fix deferred probing mmc: bcm2835: fix deferred probing mmc: Remove dev_err() usage after platform_get_irq() mmc: tmio: move tmio_mmc_set_clock() to platform hook mmc: tmio: replace tmio_mmc_clk_stop() calls with tmio_mmc_set_clock() mmc: meson-gx: remove redundant mmc_request_done() call from irq context mmc: meson-gx: remove useless lock USB: dwc3: qcom: fix NULL-deref on suspend usb: dwc3: qcom: Add helper functions to enable,disable wake irqs irqchip/mips-gic: Use raw spinlock for gic_lock irqchip/mips-gic: Get rid of the reliance on irq_cpu_online() x86/topology: Fix erroneous smp_num_siblings on Intel Hybrid platforms powerpc/64s/radix: Fix soft dirty tracking powerpc: Move page table dump files in a dedicated subdirectory powerpc/mm: dump block address translation on book3s/32 powerpc/mm: dump segment registers on book3s/32 powerpc/mm: Move pgtable_t into platform headers powerpc/mm: move platform specific mmu-xxx.h in platform directories iio: addac: stx104: Fix race condition when converting analog-to-digital iio: addac: stx104: Fix race condition for stx104_write_raw() iio: adc: stx104: Implement and utilize register structures iio: adc: stx104: Utilize iomap interface iio: add addac subdirectory IMA: allow/fix UML builds drm/amdgpu: Fix potential fence use-after-free v2 Bluetooth: L2CAP: Fix use-after-free pcmcia: rsrc_nonstatic: Fix memory leak in nonstatic_release_resource_db() gfs2: Fix possible data races in gfs2_show_options() media: platform: mediatek: vpu: fix NULL ptr dereference media: v4l2-mem2mem: add lock to protect parameter num_rdy FS: JFS: Check for read-only mounted filesystem in txBegin FS: JFS: Fix null-ptr-deref Read in txBegin MIPS: dec: prom: Address -Warray-bounds warning fs: jfs: Fix UBSAN: array-index-out-of-bounds in dbAllocDmapLev udf: Fix uninitialized array access for some pathnames HID: add quirk for 03f0:464a HP Elite Presenter Mouse quota: fix warning in dqgrab() quota: Properly disable quotas when add_dquot_ref() fails ALSA: emu10k1: roll up loops in DSP setup code for Audigy drm/radeon: Fix integer overflow in radeon_cs_parser_init selftests: forwarding: tc_flower: Relax success criterion lib/mpi: Eliminate unused umul_ppmm definitions for MIPS Revert "posix-timers: Ensure timer ID search-loop limit is valid" UPSTREAM: media: usb: siano: Fix warning due to null work_func_t function pointer UPSTREAM: Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_ready_cb UPSTREAM: net/sched: cls_route: No longer copy tcf_result on update to avoid use-after-free UPSTREAM: net/sched: cls_u32: No longer copy tcf_result on update to avoid use-after-free Linux 4.19.292 sch_netem: fix issues in netem_change() vs get_dist_table() alpha: remove __init annotation from exported page_is_ram() scsi: core: Fix possible memory leak if device_add() fails scsi: snic: Fix possible memory leak if device_add() fails scsi: 53c700: Check that command slot is not NULL scsi: storvsc: Fix handling of virtual Fibre Channel timeouts scsi: core: Fix legacy /proc parsing buffer overflow netfilter: nf_tables: report use refcount overflow netfilter: nf_tables: bogus EBUSY when deleting flowtable after flush btrfs: don't stop integrity writeback too early ibmvnic: Handle DMA unmapping of login buffs in release functions wifi: cfg80211: fix sband iftype data lookup for AP_VLAN IB/hfi1: Fix possible panic during hotplug remove drivers: net: prevent tun_build_skb() to exceed the packet size limit dccp: fix data-race around dp->dccps_mss_cache bonding: Fix incorrect deletion of ETH_P_8021AD protocol vid from slaves net/packet: annotate data-races around tp->status mISDN: Update parameter type of dsp_cmx_send() drm/nouveau/disp: Revert a NULL check inside nouveau_connector_get_modes x86: Move gds_ucode_mitigated() declaration to header x86/mm: Fix VDSO and VVAR placement on 5-level paging machines x86/cpu/amd: Enable Zenbleed fix for AMD Custom APU 0405 usb: dwc3: Properly handle processing of pending events usb-storage: alauda: Fix uninit-value in alauda_check_media() binder: fix memory leak in binder_init() iio: cros_ec: Fix the allocation size for cros_ec_command nilfs2: fix use-after-free of nilfs_root in dirtying inodes via iput radix tree test suite: fix incorrect allocation size for pthreads drm/nouveau/gr: enable memory loads on helper invocation on all channels dmaengine: pl330: Return DMA_PAUSED when transaction is paused ipv6: adjust ndisc_is_useropt() to also return true for PIO mmc: moxart: read scr register without changing byte order sparc: fix up arch_cpu_finalize_init() build breakage. UPSTREAM: net/sched: cls_fw: Fix improper refcount update leads to use-after-free Linux 4.19.291 drm/edid: fix objtool warning in drm_cvt_modes() arm64: dts: stratix10: fix incorrect I2C property for SCL signal drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions ARM: dts: nxp/imx6sll: fix wrong property name in usbphy node ARM: dts: imx6sll: fixup of operating points ARM: dts: imx: add usb alias ARM: dts: imx6sll: Make ssi node name same as other platforms PM: sleep: wakeirq: fix wake irq arming PM / wakeirq: support enabling wake-up irq after runtime_suspend called powerpc/mm/altmap: Fix altmap boundary check mtd: rawnand: omap_elm: Fix incorrect type in assignment test_firmware: return ENOMEM instead of ENOSPC on failed memory allocation test_firmware: fix a memory leak with reqs buffer ext2: Drop fragment support net: usbnet: Fix WARNING in usbnet_start_xmit/usb_submit_urb Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_ready_cb fs/sysv: Null check to prevent null-ptr-deref bug USB: zaurus: Add ID for A-300/B-500/C-700 libceph: fix potential hang in ceph_osdc_notify() scsi: zfcp: Defer fc_rport blocking until after ADISC response tcp_metrics: fix data-race in tcpm_suck_dst() vs fastopen tcp_metrics: annotate data-races around tm->tcpm_net tcp_metrics: annotate data-races around tm->tcpm_vals[] tcp_metrics: annotate data-races around tm->tcpm_lock tcp_metrics: annotate data-races around tm->tcpm_stamp tcp_metrics: fix addr_same() helper ip6mr: Fix skb_under_panic in ip6mr_cache_report() net/sched: cls_route: No longer copy tcf_result on update to avoid use-after-free net/sched: cls_u32: No longer copy tcf_result on update to avoid use-after-free net: add missing data-race annotation for sk_ll_usec net: add missing data-race annotations around sk->sk_peek_off net: sched: cls_u32: Fix match key mis-addressing perf test uprobe_from_different_cu: Skip if there is no gcc net/mlx5e: fix return value check in mlx5e_ipsec_remove_trailer() KVM: s390: fix sthyi error handling word-at-a-time: use the same return type for has_zero regardless of endianness loop: Select I/O scheduler 'none' from inside add_disk() perf: Fix function pointer case net/sched: cls_u32: Fix reference counter leak leading to overflow ASoC: cs42l51: fix driver to properly autoload with automatic module loading net/sched: sch_qfq: account for stab overhead in qfq_enqueue net/sched: cls_fw: Fix improper refcount update leads to use-after-free drm/client: Fix memory leak in drm_client_target_cloned dm cache policy smq: ensure IO doesn't prevent cleaner policy progress ASoC: wm8904: Fill the cache for WM8904_ADC_TEST_0 register s390/dasd: fix hanging device after quiesce/resume virtio-net: fix race between set queues and probe serial: 8250_dw: Preserve original value of DLF register serial: 8250_dw: split Synopsys DesignWare 8250 common functions irq-bcm6345-l1: Do not assume a fixed block to cpu mapping tpm_tis: Explicitly check for error code btrfs: check for commit error at btrfs_attach_transaction_barrier() hwmon: (nct7802) Fix for temp6 (PECI1) processed even if PECI1 disabled staging: ks7010: potential buffer overflow in ks_wlan_set_encode_ext() Documentation: security-bugs.rst: clarify CVE handling Documentation: security-bugs.rst: update preferences when dealing with the linux-distros group usb: xhci-mtk: set the dma max_seg_size USB: quirks: add quirk for Focusrite Scarlett usb: ohci-at91: Fix the unhandle interrupt when resume usb: dwc3: don't reset device side if dwc3 was configured as host-only usb: dwc3: pci: skip BYT GPIO lookup table for hardwired phy Revert "usb: dwc3: core: Enable AutoRetry feature in the controller" can: gs_usb: gs_can_close(): add missing set of CAN state to CAN_STATE_STOPPED USB: serial: simple: sort driver entries USB: serial: simple: add Kaufmann RKS+CAN VCP USB: serial: option: add Quectel EC200A module support USB: serial: option: support Quectel EM060K_128 tracing: Fix warning in trace_buffered_event_disable() ring-buffer: Fix wrong stat of cpu_buffer->read ata: pata_ns87415: mark ns87560_tf_read static dm raid: fix missing reconfig_mutex unlock in raid_ctr() error paths block: Fix a source code comment in include/uapi/linux/blkzoned.h ASoC: fsl_spdif: Silence output on stop drm/msm: Fix IS_ERR_OR_NULL() vs NULL check in a5xx_submit_in_rb() RDMA/mlx4: Make check for invalid flags stricter benet: fix return value check in be_lancer_xmit_workarounds() net/sched: mqprio: Add length check for TCA_MQPRIO_{MAX/MIN}_RATE64 net/sched: mqprio: add extack to mqprio_parse_nlattr() net/sched: mqprio: refactor nlattr parsing to a separate function platform/x86: msi-laptop: Fix rfkill out-of-sync on MSI Wind U100 team: reset team's flags when down link is P2P device bonding: reset bond's flags when down link is P2P device tcp: Reduce chance of collisions in inet6_hashfn(). ipv6 addrconf: fix bug where deleting a mngtmpaddr can create a new temporary address ethernet: atheros: fix return value check in atl1e_tso_csum() phy: hisilicon: Fix an out of bounds check in hisi_inno_phy_probe() i40e: Fix an NULL vs IS_ERR() bug for debugfs_create_dir() ext4: fix to check return value of freeze_bdev() in ext4_shutdown() scsi: qla2xxx: Array index may go out of bound scsi: qla2xxx: Fix inconsistent format argument type in qla_os.c ftrace: Fix possible warning on checking all pages used in ftrace_process_locs() ftrace: Store the order of pages allocated in ftrace_page ftrace: Check if pages were allocated before calling free_pages() ftrace: Add information on number of page groups allocated fs: dlm: interrupt posix locks only when process is killed dlm: rearrange async condition return dlm: cleanup plock_op vs plock_xop PCI/ASPM: Avoid link retraining race PCI/ASPM: Factor out pcie_wait_for_retrain() PCI/ASPM: Return 0 or -ETIMEDOUT from pcie_retrain_link() PCI: Rework pcie_retrain_link() wait loop ext4: Fix reusing stale buffer heads from last failed mounting ext4: rename journal_dev to s_journal_dev inside ext4_sb_info btrfs: fix extent buffer leak after tree mod log failure at split_node() bcache: Fix __bch_btree_node_alloc to make the failure behavior consistent bcache: remove 'int n' from parameter list of bch_bucket_alloc_set() bcache: use MAX_CACHES_PER_SET instead of magic number 8 in __bch_bucket_alloc_set gpio: tps68470: Make tps68470_gpio_output() always set the initial value tracing/histograms: Return an error if we fail to add histogram to hist_vars list tcp: annotate data-races around fastopenq.max_qlen tcp: annotate data-races around tp->notsent_lowat tcp: annotate data-races around rskq_defer_accept tcp: annotate data-races around tp->linger2 net: Replace the limit of TCP_LINGER2 with TCP_FIN_TIMEOUT_MAX netfilter: nf_tables: can't schedule in nft_chain_validate netfilter: nf_tables: fix spurious set element insertion failure llc: Don't drop packet from non-root netns. fbdev: au1200fb: Fix missing IRQ check in au1200fb_drv_probe Revert "tcp: avoid the lookup process failing to get sk in ehash table" net:ipv6: check return value of pskb_trim() net: ethernet: ti: cpsw_ale: Fix cpsw_ale_get_field()/cpsw_ale_set_field() pinctrl: amd: Use amd_pinconf_set() for all config options fbdev: imxfb: warn about invalid left/right margin spi: bcm63xx: fix max prepend length igb: Fix igb_down hung on surprise removal wifi: iwlwifi: mvm: avoid baid size integer overflow wifi: wext-core: Fix -Wstringop-overflow warning in ioctl_standard_iw_point() bpf: Address KCSAN report on bpf_lru_list sched/fair: Don't balance task to its current running CPU posix-timers: Ensure timer ID search-loop limit is valid md/raid10: prevent soft lockup while flush writes md: fix data corruption for raid456 when reshape restart while grow up nbd: Add the maximum limit of allocated index in nbd_dev_add debugobjects: Recheck debug_objects_enabled before reporting ext4: correct inline offset when handling xattrs in inode body can: bcm: Fix UAF in bcm_proc_show() fuse: revalidate: don't invalidate if interrupted perf probe: Add test for regression introduced by switch to die_get_decl_file() tracing/histograms: Add histograms to hist_vars if they have referenced variables drm/atomic: Fix potential use-after-free in nonblocking commits scsi: qla2xxx: Pointer may be dereferenced scsi: qla2xxx: Check valid rport returned by fc_bsg_to_rport() scsi: qla2xxx: Fix potential NULL pointer dereference scsi: qla2xxx: Wait for io return on terminate rport xtensa: ISS: fix call to split_if_spec ring-buffer: Fix deadloop issue on reading trace_pipe tty: serial: samsung_tty: Fix a memory leak in s3c24xx_serial_getclk() when iterating clk tty: serial: samsung_tty: Fix a memory leak in s3c24xx_serial_getclk() in case of error Revert "8250: add support for ASIX devices with a FIFO bug" meson saradc: fix clock divider mask length ceph: don't let check_caps skip sending responses for revoke msgs hwrng: imx-rngc - fix the timeout for init and self check serial: atmel: don't enable IRQs prematurely fs: dlm: return positive pid value for F_GETLK md/raid0: add discard support for the 'original' layout misc: pci_endpoint_test: Re-init completion for every test misc: pci_endpoint_test: Free IRQs before removing the device PCI: rockchip: Use u32 variable to access 32-bit registers PCI: rockchip: Fix legacy IRQ generation for RK3399 PCIe endpoint core PCI: rockchip: Add poll and timeout to wait for PHY PLLs to be locked PCI: rockchip: Write PCI Device ID to correct register PCI: rockchip: Assert PCI Configuration Enable bit after probe PCI: qcom: Disable write access to read only registers for IP v2.3.3 PCI: Add function 1 DMA alias quirk for Marvell 88SE9235 PCI/PM: Avoid putting EloPOS E2/S2/H2 PCIe Ports in D3cold jfs: jfs_dmap: Validate db_l2nbperpage while mounting ext4: only update i_reserved_data_blocks on successful block allocation ext4: fix wrong unit use in ext4_mb_clear_bb perf intel-pt: Fix CYC timestamps after standalone CBR SUNRPC: Fix UAF in svc_tcp_listen_data_ready() net: bcmgenet: Ensure MDIO unregistration has clocks enabled tpm: tpm_vtpm_proxy: fix a race condition in /dev/vtpmx creation pinctrl: amd: Only use special debounce behavior for GPIO 0 pinctrl: amd: Detect internal GPIO0 debounce handling pinctrl: amd: Fix mistake in handling clearing pins at startup net/sched: make psched_mtu() RTNL-less safe wifi: airo: avoid uninitialized warning in airo_get_rate() ipv6/addrconf: fix a potential refcount underflow for idev NTB: ntb_tool: Add check for devm_kcalloc NTB: ntb_transport: fix possible memory leak while device_register() fails ntb: intel: Fix error handling in intel_ntb_pci_driver_init() NTB: amd: Fix error handling in amd_ntb_pci_driver_init() ntb: idt: Fix error handling in idt_pci_driver_init() udp6: fix udp6_ehashfn() typo icmp6: Fix null-ptr-deref of ip6_null_entry->rt6i_idev in icmp6_dev(). vrf: Increment Icmp6InMsgs on the original netdev net: mvneta: fix txq_map in case of txq_number==1 workqueue: clean up WORK_* constant types, clarify masking net: lan743x: Don't sleep in atomic context netfilter: nf_tables: prevent OOB access in nft_byteorder_eval netfilter: conntrack: Avoid nf_ct_helper_hash uses after free netfilter: nf_tables: fix scheduling-while-atomic splat netfilter: nf_tables: unbind non-anonymous set if rule construction fails netfilter: nf_tables: reject unbound anonymous set before commit phase netfilter: nf_tables: add NFT_TRANS_PREPARE_ERROR to deal with bound set/chain netfilter: nf_tables: incorrect error path handling with NFT_MSG_NEWRULE netfilter: nf_tables: use net_generic infra for transaction data netfilter: add helper function to set up the nfnetlink header and use it netfilter: nftables: add helper function to set the base sequence number netfilter: nf_tables: add rescheduling points during loop detection walks netfilter: nf_tables: fix nat hook table deletion spi: spi-fsl-spi: allow changing bits_per_word while CS is still active spi: spi-fsl-spi: relax message sanity checking a little spi: spi-fsl-spi: remove always-true conditional in fsl_spi_do_one_msg ARM: orion5x: fix d2net gpio initialization btrfs: fix race when deleting quota root from the dirty cow roots list jffs2: reduce stack usage in jffs2_build_xattr_subsystem() integrity: Fix possible multiple allocation in integrity_inode_get() bcache: Remove unnecessary NULL point check in node allocations mmc: core: disable TRIM on Micron MTFC4GACAJCN-1M mmc: core: disable TRIM on Kingston EMMC04G-M627 NFSD: add encoding of op_recall flag for write delegation ALSA: jack: Fix mutex call in snd_jack_report() i2c: xiic: Don't try to handle more interrupt events after error i2c: xiic: Defer xiic_wakeup() and __xiic_start_xfer() in xiic_process() sh: dma: Fix DMA channel offset calculation net/sched: act_pedit: Add size check for TCA_PEDIT_PARMS_EX tcp: annotate data races in __tcp_oow_rate_limited() net: bridge: keep ports without IFF_UNICAST_FLT in BR_PROMISC mode powerpc: allow PPC_EARLY_DEBUG_CPM only when SERIAL_CPM=y f2fs: fix error path handling in truncate_dnode() mailbox: ti-msgmgr: Fill non-message tx data fields with 0x0 spi: bcm-qspi: return error if neither hif_mspi nor mspi is available Add MODULE_FIRMWARE() for FIRMWARE_TG357766. sctp: fix potential deadlock on &net->sctp.addr_wq_lock rtc: st-lpc: Release some resources in st_rtc_probe() in case of error mfd: stmpe: Only disable the regulators if they are enabled mfd: intel-lpss: Add missing check for platform_get_resource KVM: s390: fix KVM_S390_GET_CMMA_BITS for GFNs in memslot holes mfd: rt5033: Drop rt5033-battery sub-device usb: phy: phy-tahvo: fix memory leak in tahvo_usb_probe() extcon: Fix kernel doc of property capability fields to avoid warnings extcon: Fix kernel doc of property fields to avoid warnings media: usb: siano: Fix warning due to null work_func_t function pointer media: videodev2.h: Fix struct v4l2_input tuner index comment media: usb: Check az6007_read() return value sh: j2: Use ioremap() to translate device tree address into kernel memory w1: fix loop in w1_fini() block: change all __u32 annotations to __be32 in affs_hardblocks.h USB: serial: option: add LARA-R6 01B PIDs ARC: define ASM_NL and __ALIGN(_STR) outside #ifdef __ASSEMBLY__ guard ARCv2: entry: rewrite to enable use of double load/stores LDD/STD ARCv2: entry: avoid a branch ARCv2: entry: push out the Z flag unclobber from common EXCEPTION_PROLOGUE ARCv2: entry: comments about hardware auto-save on taken interrupts modpost: fix section mismatch message for R_ARM_{PC24,CALL,JUMP24} modpost: fix section mismatch message for R_ARM_ABS32 crypto: nx - fix build warnings when DEBUG_FS is not enabled hwrng: virtio - Fix race on data_avail and actual data hwrng: virtio - always add a pending request hwrng: virtio - don't waste entropy hwrng: virtio - don't wait on cleanup hwrng: virtio - add an internal buffer pinctrl: at91-pio4: check return value of devm_kasprintf() perf dwarf-aux: Fix off-by-one in die_get_varname() pinctrl: cherryview: Return correct value if pin in push-pull mode PCI: Add pci_clear_master() stub for non-CONFIG_PCI scsi: 3w-xxxx: Add error handling for initialization failure in tw_probe() ALSA: ac97: Fix possible NULL dereference in snd_ac97_mixer drm/radeon: fix possible division-by-zero errors fbdev: omapfb: lcd_mipid: Fix an error handling path in mipid_spi_probe() arm64: dts: renesas: ulcb-kf: Remove flow control for SCIF1 IB/hfi1: Fix sdma.h tx->num_descs off-by-one errors soc/fsl/qe: fix usb.c build errors ASoC: es8316: Increment max value for ALC Capture Target Volume control ARM: ep93xx: fix missing-prototype warnings drm/panel: simple: fix active size for Ampire AM-480272H3TMQW-T01H Input: adxl34x - do not hardcode interrupt trigger type ARM: dts: BCM5301X: Drop "clock-names" from the SPI node Input: drv260x - sleep between polling GO bit radeon: avoid double free in ci_dpm_init() netlink: Add __sock_i_ino() for __netlink_diag_dump(). ipvlan: Fix return value of ipvlan_queue_xmit() netfilter: nf_conntrack_sip: fix the ct_sip_parse_numerical_param() return value. lib/ts_bm: reset initial match offset for every block of text gtp: Fix use-after-free in __gtp_encap_destroy(). netlink: do not hard code device address lenth in fdb dumps netlink: fix potential deadlock in netlink_set_err() wifi: ath9k: convert msecs to jiffies where needed wifi: ath9k: Fix possible stall on ath9k_txq_list_has_key() memstick r592: make memstick_debug_get_tpc_name() static kexec: fix a memory leak in crash_shrink_memory() watchdog/perf: more properly prevent false positives with turbo modes watchdog/perf: define dummy watchdog_update_hrtimer_threshold() on correct config wifi: rsi: Do not set MMC_PM_KEEP_POWER in shutdown wifi: ath9k: don't allow to overwrite ENDPOINT0 attributes wifi: ray_cs: Fix an error handling path in ray_probe() wifi: ray_cs: Drop useless status variable in parse_addr() wifi: ray_cs: Utilize strnlen() in parse_addr() wifi: wl3501_cs: Fix an error handling path in wl3501_probe() wl3501_cs: use eth_hw_addr_set() net: create netdev->dev_addr assignment helpers wl3501_cs: Fix misspelling and provide missing documentation wl3501_cs: Remove unnecessary NULL check wl3501_cs: Fix a bunch of formatting issues related to function docs wifi: atmel: Fix an error handling path in atmel_probe() wifi: orinoco: Fix an error handling path in orinoco_cs_probe() wifi: orinoco: Fix an error handling path in spectrum_cs_probe() nfc: llcp: fix possible use of uninitialized variable in nfc_llcp_send_connect() nfc: constify several pointers to u8, char and sk_buff wifi: mwifiex: Fix the size of a memory allocation in mwifiex_ret_802_11_scan() samples/bpf: Fix buffer overflow in tcp_basertt wifi: ath9k: avoid referencing uninit memory in ath9k_wmi_ctrl_rx wifi: ath9k: fix AR9003 mac hardware hang check register offset calculation evm: Complete description of evm_inode_setattr() ARM: 9303/1: kprobes: avoid missing-declaration warnings PM: domains: fix integer overflow issues in genpd_parse_state() clocksource/drivers/cadence-ttc: Fix memory leak in ttc_timer_probe clocksource/drivers/cadence-ttc: Use ttc driver as platform driver clocksource/drivers: Unify the names to timer-* format irqchip/jcore-aic: Fix missing allocation of IRQ descriptors irqchip/jcore-aic: Kill use of irq_create_strict_mappings() md/raid10: fix io loss while replacement replace rdev md/raid10: fix wrong setting of max_corr_read_errors md/raid10: fix overflow of md/safe_mode_delay md/raid10: check slab-out-of-bounds in md_bitmap_get_counter treewide: Remove uninitialized_var() usage drm/amdgpu: Validate VM ioctl flags. scripts/tags.sh: Resolve gtags empty index generation drm/edid: Fix uninitialized variable in drm_cvt_modes() fbdev: imsttfb: Fix use after free bug in imsttfb_probe video: imsttfb: check for ioremap() failures x86/smp: Use dedicated cache-line for mwait_play_dead() gfs2: Don't deref jdesc in evict Linux 4.19.290 x86: fix backwards merge of GDS/SRSO bit xen/netback: Fix buffer overrun triggered by unusual packet Documentation/x86: Fix backwards on/off logic about YMM support x86/xen: Fix secondary processors' FPU initialization KVM: Add GDS_NO support to KVM x86/speculation: Add Kconfig option for GDS x86/speculation: Add force option to GDS mitigation x86/speculation: Add Gather Data Sampling mitigation x86/fpu: Move FPU initialization into arch_cpu_finalize_init() x86/fpu: Mark init functions __init x86/fpu: Remove cpuinfo argument from init functions init, x86: Move mem_encrypt_init() into arch_cpu_finalize_init() init: Invoke arch_cpu_finalize_init() earlier init: Remove check_bugs() leftovers um/cpu: Switch to arch_cpu_finalize_init() sparc/cpu: Switch to arch_cpu_finalize_init() sh/cpu: Switch to arch_cpu_finalize_init() mips/cpu: Switch to arch_cpu_finalize_init() m68k/cpu: Switch to arch_cpu_finalize_init() ia64/cpu: Switch to arch_cpu_finalize_init() ARM: cpu: Switch to arch_cpu_finalize_init() x86/cpu: Switch to arch_cpu_finalize_init() init: Provide arch_cpu_finalize_init() Conflicts: drivers/mmc/core/block.c drivers/mmc/host/sdhci-msm.c drivers/usb/dwc3/core.c drivers/usb/dwc3/gadget.c Change-Id: Id2f4d5c8067f8e5eda39c0eaa5e59d54a394b4c7
This commit is contained in:
commit
1b59618ce4
682 changed files with 5689 additions and 3473 deletions
|
@ -472,16 +472,17 @@ Description: information about CPUs heterogeneity.
|
||||||
cpu_capacity: capacity of cpu#.
|
cpu_capacity: capacity of cpu#.
|
||||||
|
|
||||||
What: /sys/devices/system/cpu/vulnerabilities
|
What: /sys/devices/system/cpu/vulnerabilities
|
||||||
/sys/devices/system/cpu/vulnerabilities/meltdown
|
/sys/devices/system/cpu/vulnerabilities/gather_data_sampling
|
||||||
/sys/devices/system/cpu/vulnerabilities/spectre_v1
|
/sys/devices/system/cpu/vulnerabilities/itlb_multihit
|
||||||
/sys/devices/system/cpu/vulnerabilities/spectre_v2
|
|
||||||
/sys/devices/system/cpu/vulnerabilities/spec_store_bypass
|
|
||||||
/sys/devices/system/cpu/vulnerabilities/l1tf
|
/sys/devices/system/cpu/vulnerabilities/l1tf
|
||||||
/sys/devices/system/cpu/vulnerabilities/mds
|
/sys/devices/system/cpu/vulnerabilities/mds
|
||||||
|
/sys/devices/system/cpu/vulnerabilities/meltdown
|
||||||
|
/sys/devices/system/cpu/vulnerabilities/mmio_stale_data
|
||||||
|
/sys/devices/system/cpu/vulnerabilities/spec_store_bypass
|
||||||
|
/sys/devices/system/cpu/vulnerabilities/spectre_v1
|
||||||
|
/sys/devices/system/cpu/vulnerabilities/spectre_v2
|
||||||
/sys/devices/system/cpu/vulnerabilities/srbds
|
/sys/devices/system/cpu/vulnerabilities/srbds
|
||||||
/sys/devices/system/cpu/vulnerabilities/tsx_async_abort
|
/sys/devices/system/cpu/vulnerabilities/tsx_async_abort
|
||||||
/sys/devices/system/cpu/vulnerabilities/itlb_multihit
|
|
||||||
/sys/devices/system/cpu/vulnerabilities/mmio_stale_data
|
|
||||||
Date: January 2018
|
Date: January 2018
|
||||||
Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
|
Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
|
||||||
Description: Information about CPU vulnerabilities
|
Description: Information about CPU vulnerabilities
|
||||||
|
|
109
Documentation/admin-guide/hw-vuln/gather_data_sampling.rst
Normal file
109
Documentation/admin-guide/hw-vuln/gather_data_sampling.rst
Normal file
|
@ -0,0 +1,109 @@
|
||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
GDS - Gather Data Sampling
|
||||||
|
==========================
|
||||||
|
|
||||||
|
Gather Data Sampling is a hardware vulnerability which allows unprivileged
|
||||||
|
speculative access to data which was previously stored in vector registers.
|
||||||
|
|
||||||
|
Problem
|
||||||
|
-------
|
||||||
|
When a gather instruction performs loads from memory, different data elements
|
||||||
|
are merged into the destination vector register. However, when a gather
|
||||||
|
instruction that is transiently executed encounters a fault, stale data from
|
||||||
|
architectural or internal vector registers may get transiently forwarded to the
|
||||||
|
destination vector register instead. This will allow a malicious attacker to
|
||||||
|
infer stale data using typical side channel techniques like cache timing
|
||||||
|
attacks. GDS is a purely sampling-based attack.
|
||||||
|
|
||||||
|
The attacker uses gather instructions to infer the stale vector register data.
|
||||||
|
The victim does not need to do anything special other than use the vector
|
||||||
|
registers. The victim does not need to use gather instructions to be
|
||||||
|
vulnerable.
|
||||||
|
|
||||||
|
Because the buffers are shared between Hyper-Threads cross Hyper-Thread attacks
|
||||||
|
are possible.
|
||||||
|
|
||||||
|
Attack scenarios
|
||||||
|
----------------
|
||||||
|
Without mitigation, GDS can infer stale data across virtually all
|
||||||
|
permission boundaries:
|
||||||
|
|
||||||
|
Non-enclaves can infer SGX enclave data
|
||||||
|
Userspace can infer kernel data
|
||||||
|
Guests can infer data from hosts
|
||||||
|
Guest can infer guest from other guests
|
||||||
|
Users can infer data from other users
|
||||||
|
|
||||||
|
Because of this, it is important to ensure that the mitigation stays enabled in
|
||||||
|
lower-privilege contexts like guests and when running outside SGX enclaves.
|
||||||
|
|
||||||
|
The hardware enforces the mitigation for SGX. Likewise, VMMs should ensure
|
||||||
|
that guests are not allowed to disable the GDS mitigation. If a host erred and
|
||||||
|
allowed this, a guest could theoretically disable GDS mitigation, mount an
|
||||||
|
attack, and re-enable it.
|
||||||
|
|
||||||
|
Mitigation mechanism
|
||||||
|
--------------------
|
||||||
|
This issue is mitigated in microcode. The microcode defines the following new
|
||||||
|
bits:
|
||||||
|
|
||||||
|
================================ === ============================
|
||||||
|
IA32_ARCH_CAPABILITIES[GDS_CTRL] R/O Enumerates GDS vulnerability
|
||||||
|
and mitigation support.
|
||||||
|
IA32_ARCH_CAPABILITIES[GDS_NO] R/O Processor is not vulnerable.
|
||||||
|
IA32_MCU_OPT_CTRL[GDS_MITG_DIS] R/W Disables the mitigation
|
||||||
|
0 by default.
|
||||||
|
IA32_MCU_OPT_CTRL[GDS_MITG_LOCK] R/W Locks GDS_MITG_DIS=0. Writes
|
||||||
|
to GDS_MITG_DIS are ignored
|
||||||
|
Can't be cleared once set.
|
||||||
|
================================ === ============================
|
||||||
|
|
||||||
|
GDS can also be mitigated on systems that don't have updated microcode by
|
||||||
|
disabling AVX. This can be done by setting gather_data_sampling="force" or
|
||||||
|
"clearcpuid=avx" on the kernel command-line.
|
||||||
|
|
||||||
|
If used, these options will disable AVX use by turning off XSAVE YMM support.
|
||||||
|
However, the processor will still enumerate AVX support. Userspace that
|
||||||
|
does not follow proper AVX enumeration to check both AVX *and* XSAVE YMM
|
||||||
|
support will break.
|
||||||
|
|
||||||
|
Mitigation control on the kernel command line
|
||||||
|
---------------------------------------------
|
||||||
|
The mitigation can be disabled by setting "gather_data_sampling=off" or
|
||||||
|
"mitigations=off" on the kernel command line. Not specifying either will default
|
||||||
|
to the mitigation being enabled. Specifying "gather_data_sampling=force" will
|
||||||
|
use the microcode mitigation when available or disable AVX on affected systems
|
||||||
|
where the microcode hasn't been updated to include the mitigation.
|
||||||
|
|
||||||
|
GDS System Information
|
||||||
|
------------------------
|
||||||
|
The kernel provides vulnerability status information through sysfs. For
|
||||||
|
GDS this can be accessed by the following sysfs file:
|
||||||
|
|
||||||
|
/sys/devices/system/cpu/vulnerabilities/gather_data_sampling
|
||||||
|
|
||||||
|
The possible values contained in this file are:
|
||||||
|
|
||||||
|
============================== =============================================
|
||||||
|
Not affected Processor not vulnerable.
|
||||||
|
Vulnerable Processor vulnerable and mitigation disabled.
|
||||||
|
Vulnerable: No microcode Processor vulnerable and microcode is missing
|
||||||
|
mitigation.
|
||||||
|
Mitigation: AVX disabled,
|
||||||
|
no microcode Processor is vulnerable and microcode is missing
|
||||||
|
mitigation. AVX disabled as mitigation.
|
||||||
|
Mitigation: Microcode Processor is vulnerable and mitigation is in
|
||||||
|
effect.
|
||||||
|
Mitigation: Microcode (locked) Processor is vulnerable and mitigation is in
|
||||||
|
effect and cannot be disabled.
|
||||||
|
Unknown: Dependent on
|
||||||
|
hypervisor status Running on a virtual guest processor that is
|
||||||
|
affected but with no way to know if host
|
||||||
|
processor is mitigated or vulnerable.
|
||||||
|
============================== =============================================
|
||||||
|
|
||||||
|
GDS Default mitigation
|
||||||
|
----------------------
|
||||||
|
The updated microcode will enable the mitigation by default. The kernel's
|
||||||
|
default action is to leave the mitigation enabled.
|
|
@ -16,3 +16,4 @@ are configurable at compile, boot or run time.
|
||||||
multihit.rst
|
multihit.rst
|
||||||
special-register-buffer-data-sampling.rst
|
special-register-buffer-data-sampling.rst
|
||||||
processor_mmio_stale_data.rst
|
processor_mmio_stale_data.rst
|
||||||
|
gather_data_sampling.rst
|
||||||
|
|
|
@ -1306,6 +1306,26 @@
|
||||||
Format: off | on
|
Format: off | on
|
||||||
default: on
|
default: on
|
||||||
|
|
||||||
|
gather_data_sampling=
|
||||||
|
[X86,INTEL] Control the Gather Data Sampling (GDS)
|
||||||
|
mitigation.
|
||||||
|
|
||||||
|
Gather Data Sampling is a hardware vulnerability which
|
||||||
|
allows unprivileged speculative access to data which was
|
||||||
|
previously stored in vector registers.
|
||||||
|
|
||||||
|
This issue is mitigated by default in updated microcode.
|
||||||
|
The mitigation may have a performance impact but can be
|
||||||
|
disabled. On systems without the microcode mitigation
|
||||||
|
disabling AVX serves as a mitigation.
|
||||||
|
|
||||||
|
force: Disable AVX to mitigate systems without
|
||||||
|
microcode mitigation. No effect if the microcode
|
||||||
|
mitigation is present. Known to cause crashes in
|
||||||
|
userspace with buggy AVX enumeration.
|
||||||
|
|
||||||
|
off: Disable GDS mitigation.
|
||||||
|
|
||||||
gcov_persist= [GCOV] When non-zero (default), profiling data for
|
gcov_persist= [GCOV] When non-zero (default), profiling data for
|
||||||
kernel modules is saved and remains accessible via
|
kernel modules is saved and remains accessible via
|
||||||
debugfs, even when the module is unloaded/reloaded.
|
debugfs, even when the module is unloaded/reloaded.
|
||||||
|
@ -2580,22 +2600,23 @@
|
||||||
Disable all optional CPU mitigations. This
|
Disable all optional CPU mitigations. This
|
||||||
improves system performance, but it may also
|
improves system performance, but it may also
|
||||||
expose users to several CPU vulnerabilities.
|
expose users to several CPU vulnerabilities.
|
||||||
Equivalent to: nopti [X86,PPC]
|
Equivalent to: gather_data_sampling=off [X86]
|
||||||
kpti=0 [ARM64]
|
kpti=0 [ARM64]
|
||||||
nospectre_v1 [PPC]
|
kvm.nx_huge_pages=off [X86]
|
||||||
nobp=0 [S390]
|
|
||||||
nospectre_v1 [X86]
|
|
||||||
nospectre_v2 [X86,PPC,S390,ARM64]
|
|
||||||
spectre_v2_user=off [X86]
|
|
||||||
spec_store_bypass_disable=off [X86,PPC]
|
|
||||||
ssbd=force-off [ARM64]
|
|
||||||
l1tf=off [X86]
|
l1tf=off [X86]
|
||||||
mds=off [X86]
|
mds=off [X86]
|
||||||
tsx_async_abort=off [X86]
|
mmio_stale_data=off [X86]
|
||||||
kvm.nx_huge_pages=off [X86]
|
|
||||||
no_entry_flush [PPC]
|
no_entry_flush [PPC]
|
||||||
no_uaccess_flush [PPC]
|
no_uaccess_flush [PPC]
|
||||||
mmio_stale_data=off [X86]
|
nobp=0 [S390]
|
||||||
|
nopti [X86,PPC]
|
||||||
|
nospectre_v1 [PPC]
|
||||||
|
nospectre_v1 [X86]
|
||||||
|
nospectre_v2 [X86,PPC,S390,ARM64]
|
||||||
|
spec_store_bypass_disable=off [X86,PPC]
|
||||||
|
spectre_v2_user=off [X86]
|
||||||
|
ssbd=force-off [ARM64]
|
||||||
|
tsx_async_abort=off [X86]
|
||||||
|
|
||||||
Exceptions:
|
Exceptions:
|
||||||
This does not have any effect on
|
This does not have any effect on
|
||||||
|
|
|
@ -56,31 +56,28 @@ information submitted to the security list and any followup discussions
|
||||||
of the report are treated confidentially even after the embargo has been
|
of the report are treated confidentially even after the embargo has been
|
||||||
lifted, in perpetuity.
|
lifted, in perpetuity.
|
||||||
|
|
||||||
Coordination
|
Coordination with other groups
|
||||||
------------
|
------------------------------
|
||||||
|
|
||||||
Fixes for sensitive bugs, such as those that might lead to privilege
|
The kernel security team strongly recommends that reporters of potential
|
||||||
escalations, may need to be coordinated with the private
|
security issues NEVER contact the "linux-distros" mailing list until
|
||||||
<linux-distros@vs.openwall.org> mailing list so that distribution vendors
|
AFTER discussing it with the kernel security team. Do not Cc: both
|
||||||
are well prepared to issue a fixed kernel upon public disclosure of the
|
lists at once. You may contact the linux-distros mailing list after a
|
||||||
upstream fix. Distros will need some time to test the proposed patch and
|
fix has been agreed on and you fully understand the requirements that
|
||||||
will generally request at least a few days of embargo, and vendor update
|
doing so will impose on you and the kernel community.
|
||||||
publication prefers to happen Tuesday through Thursday. When appropriate,
|
|
||||||
the security team can assist with this coordination, or the reporter can
|
The different lists have different goals and the linux-distros rules do
|
||||||
include linux-distros from the start. In this case, remember to prefix
|
not contribute to actually fixing any potential security problems.
|
||||||
the email Subject line with "[vs]" as described in the linux-distros wiki:
|
|
||||||
<http://oss-security.openwall.org/wiki/mailing-lists/distros#how-to-use-the-lists>
|
|
||||||
|
|
||||||
CVE assignment
|
CVE assignment
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
The security team does not normally assign CVEs, nor do we require them
|
The security team does not assign CVEs, nor do we require them for
|
||||||
for reports or fixes, as this can needlessly complicate the process and
|
reports or fixes, as this can needlessly complicate the process and may
|
||||||
may delay the bug handling. If a reporter wishes to have a CVE identifier
|
delay the bug handling. If a reporter wishes to have a CVE identifier
|
||||||
assigned ahead of public disclosure, they will need to contact the private
|
assigned, they should find one by themselves, for example by contacting
|
||||||
linux-distros list, described above. When such a CVE identifier is known
|
MITRE directly. However under no circumstances will a patch inclusion
|
||||||
before a patch is provided, it is desirable to mention it in the commit
|
be delayed to wait for a CVE identifier to arrive.
|
||||||
message if the reporter agrees.
|
|
||||||
|
|
||||||
Non-disclosure agreements
|
Non-disclosure agreements
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
10
MAINTAINERS
10
MAINTAINERS
|
@ -1186,7 +1186,7 @@ N: owl
|
||||||
F: arch/arm/mach-actions/
|
F: arch/arm/mach-actions/
|
||||||
F: arch/arm/boot/dts/owl-*
|
F: arch/arm/boot/dts/owl-*
|
||||||
F: arch/arm64/boot/dts/actions/
|
F: arch/arm64/boot/dts/actions/
|
||||||
F: drivers/clocksource/owl-*
|
F: drivers/clocksource/timer-owl*
|
||||||
F: drivers/pinctrl/actions/*
|
F: drivers/pinctrl/actions/*
|
||||||
F: drivers/soc/actions/
|
F: drivers/soc/actions/
|
||||||
F: include/dt-bindings/power/owl-*
|
F: include/dt-bindings/power/owl-*
|
||||||
|
@ -1609,7 +1609,7 @@ L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: arch/arm/boot/dts/lpc43*
|
F: arch/arm/boot/dts/lpc43*
|
||||||
F: drivers/clk/nxp/clk-lpc18xx*
|
F: drivers/clk/nxp/clk-lpc18xx*
|
||||||
F: drivers/clocksource/time-lpc32xx.c
|
F: drivers/clocksource/timer-lpc32xx.c
|
||||||
F: drivers/i2c/busses/i2c-lpc2k.c
|
F: drivers/i2c/busses/i2c-lpc2k.c
|
||||||
F: drivers/memory/pl172.c
|
F: drivers/memory/pl172.c
|
||||||
F: drivers/mtd/spi-nor/nxp-spifi.c
|
F: drivers/mtd/spi-nor/nxp-spifi.c
|
||||||
|
@ -2225,7 +2225,7 @@ F: arch/arm/mach-vexpress/
|
||||||
F: */*/vexpress*
|
F: */*/vexpress*
|
||||||
F: */*/*/vexpress*
|
F: */*/*/vexpress*
|
||||||
F: drivers/clk/versatile/clk-vexpress-osc.c
|
F: drivers/clk/versatile/clk-vexpress-osc.c
|
||||||
F: drivers/clocksource/versatile.c
|
F: drivers/clocksource/timer-versatile.c
|
||||||
N: mps2
|
N: mps2
|
||||||
|
|
||||||
ARM/VFP SUPPORT
|
ARM/VFP SUPPORT
|
||||||
|
@ -2247,7 +2247,7 @@ M: Tony Prisk <linux@prisktech.co.nz>
|
||||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: arch/arm/mach-vt8500/
|
F: arch/arm/mach-vt8500/
|
||||||
F: drivers/clocksource/vt8500_timer.c
|
F: drivers/clocksource/timer-vt8500.c
|
||||||
F: drivers/i2c/busses/i2c-wmt.c
|
F: drivers/i2c/busses/i2c-wmt.c
|
||||||
F: drivers/mmc/host/wmt-sdmmc.c
|
F: drivers/mmc/host/wmt-sdmmc.c
|
||||||
F: drivers/pwm/pwm-vt8500.c
|
F: drivers/pwm/pwm-vt8500.c
|
||||||
|
@ -2312,7 +2312,7 @@ F: drivers/cpuidle/cpuidle-zynq.c
|
||||||
F: drivers/block/xsysace.c
|
F: drivers/block/xsysace.c
|
||||||
N: zynq
|
N: zynq
|
||||||
N: xilinx
|
N: xilinx
|
||||||
F: drivers/clocksource/cadence_ttc_timer.c
|
F: drivers/clocksource/timer-cadence-ttc.c
|
||||||
F: drivers/i2c/busses/i2c-cadence.c
|
F: drivers/i2c/busses/i2c-cadence.c
|
||||||
F: drivers/mmc/host/sdhci-of-arasan.c
|
F: drivers/mmc/host/sdhci-of-arasan.c
|
||||||
F: drivers/edac/synopsys_edac.c
|
F: drivers/edac/synopsys_edac.c
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -1,7 +1,7 @@
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
VERSION = 4
|
VERSION = 4
|
||||||
PATCHLEVEL = 19
|
PATCHLEVEL = 19
|
||||||
SUBLEVEL = 289
|
SUBLEVEL = 294
|
||||||
EXTRAVERSION =
|
EXTRAVERSION =
|
||||||
NAME = "People's Front"
|
NAME = "People's Front"
|
||||||
|
|
||||||
|
|
|
@ -249,6 +249,9 @@ config ARCH_HAS_FORTIFY_SOURCE
|
||||||
config ARCH_HAS_SET_MEMORY
|
config ARCH_HAS_SET_MEMORY
|
||||||
bool
|
bool
|
||||||
|
|
||||||
|
config ARCH_HAS_CPU_FINALIZE_INIT
|
||||||
|
bool
|
||||||
|
|
||||||
# Select if arch init_task must go in the __init_task_data section
|
# Select if arch init_task must go in the __init_task_data section
|
||||||
config ARCH_TASK_STRUCT_ON_STACK
|
config ARCH_TASK_STRUCT_ON_STACK
|
||||||
bool
|
bool
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
/*
|
|
||||||
* include/asm-alpha/bugs.h
|
|
||||||
*
|
|
||||||
* Copyright (C) 1994 Linus Torvalds
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This is included by init/main.c to check for architecture-dependent bugs.
|
|
||||||
*
|
|
||||||
* Needs:
|
|
||||||
* void check_bugs(void);
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* I don't know of any alpha bugs yet.. Nice chip
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void check_bugs(void)
|
|
||||||
{
|
|
||||||
}
|
|
|
@ -469,8 +469,7 @@ setup_memory(void *kernel_end)
|
||||||
extern void setup_memory(void *);
|
extern void setup_memory(void *);
|
||||||
#endif /* !CONFIG_DISCONTIGMEM */
|
#endif /* !CONFIG_DISCONTIGMEM */
|
||||||
|
|
||||||
int __init
|
int page_is_ram(unsigned long pfn)
|
||||||
page_is_ram(unsigned long pfn)
|
|
||||||
{
|
{
|
||||||
struct memclust_struct * cluster;
|
struct memclust_struct * cluster;
|
||||||
struct memdesc_struct * memdesc;
|
struct memdesc_struct * memdesc;
|
||||||
|
|
|
@ -7,232 +7,252 @@
|
||||||
#include <asm/irqflags-arcv2.h>
|
#include <asm/irqflags-arcv2.h>
|
||||||
#include <asm/thread_info.h> /* For THREAD_SIZE */
|
#include <asm/thread_info.h> /* For THREAD_SIZE */
|
||||||
|
|
||||||
/*------------------------------------------------------------------------*/
|
/*
|
||||||
.macro INTERRUPT_PROLOGUE called_from
|
* Interrupt/Exception stack layout (pt_regs) for ARCv2
|
||||||
|
* (End of struct aligned to end of page [unless nested])
|
||||||
|
*
|
||||||
|
* INTERRUPT EXCEPTION
|
||||||
|
*
|
||||||
|
* manual --------------------- manual
|
||||||
|
* | orig_r0 |
|
||||||
|
* | event/ECR |
|
||||||
|
* | bta |
|
||||||
|
* | user_r25 |
|
||||||
|
* | gp |
|
||||||
|
* | fp |
|
||||||
|
* | sp |
|
||||||
|
* | r12 |
|
||||||
|
* | r30 |
|
||||||
|
* | r58 |
|
||||||
|
* | r59 |
|
||||||
|
* hw autosave ---------------------
|
||||||
|
* optional | r0 |
|
||||||
|
* | r1 |
|
||||||
|
* ~ ~
|
||||||
|
* | r9 |
|
||||||
|
* | r10 |
|
||||||
|
* | r11 |
|
||||||
|
* | blink |
|
||||||
|
* | lpe |
|
||||||
|
* | lps |
|
||||||
|
* | lpc |
|
||||||
|
* | ei base |
|
||||||
|
* | ldi base |
|
||||||
|
* | jli base |
|
||||||
|
* ---------------------
|
||||||
|
* hw autosave | pc / eret |
|
||||||
|
* mandatory | stat32 / erstatus |
|
||||||
|
* ---------------------
|
||||||
|
*/
|
||||||
|
|
||||||
; Before jumping to Interrupt Vector, hardware micro-ops did following:
|
/*------------------------------------------------------------------------*/
|
||||||
|
.macro INTERRUPT_PROLOGUE
|
||||||
|
|
||||||
|
; (A) Before jumping to Interrupt Vector, hardware micro-ops did following:
|
||||||
; 1. SP auto-switched to kernel mode stack
|
; 1. SP auto-switched to kernel mode stack
|
||||||
; 2. STATUS32.Z flag set to U mode at time of interrupt (U:1, K:0)
|
; 2. STATUS32.Z flag set if in U mode at time of interrupt (U:1,K:0)
|
||||||
; 3. Auto saved: r0-r11, blink, LPE,LPS,LPC, JLI,LDI,EI, PC, STAT32
|
; 3. Auto save: (mandatory) Push PC and STAT32 on stack
|
||||||
|
; hardware does even if CONFIG_ARC_IRQ_NO_AUTOSAVE
|
||||||
|
; 4. Auto save: (optional) r0-r11, blink, LPE,LPS,LPC, JLI,LDI,EI
|
||||||
;
|
;
|
||||||
; Now manually save: r12, sp, fp, gp, r25
|
; (B) Manually saved some regs: r12,r25,r30, sp,fp,gp, ACCL pair
|
||||||
|
|
||||||
#ifdef CONFIG_ARC_IRQ_NO_AUTOSAVE
|
#ifdef CONFIG_ARC_IRQ_NO_AUTOSAVE
|
||||||
.ifnc \called_from, exception
|
; carve pt_regs on stack (case #3), PC/STAT32 already on stack
|
||||||
st.as r9, [sp, -10] ; save r9 in it's final stack slot
|
sub sp, sp, SZ_PT_REGS - 8
|
||||||
sub sp, sp, 12 ; skip JLI, LDI, EI
|
|
||||||
|
|
||||||
PUSH lp_count
|
__SAVE_REGFILE_HARD
|
||||||
PUSHAX lp_start
|
#else
|
||||||
PUSHAX lp_end
|
; carve pt_regs on stack (case #4), which grew partially already
|
||||||
PUSH blink
|
sub sp, sp, PT_r0
|
||||||
|
|
||||||
PUSH r11
|
|
||||||
PUSH r10
|
|
||||||
|
|
||||||
sub sp, sp, 4 ; skip r9
|
|
||||||
|
|
||||||
PUSH r8
|
|
||||||
PUSH r7
|
|
||||||
PUSH r6
|
|
||||||
PUSH r5
|
|
||||||
PUSH r4
|
|
||||||
PUSH r3
|
|
||||||
PUSH r2
|
|
||||||
PUSH r1
|
|
||||||
PUSH r0
|
|
||||||
.endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_ARC_HAS_ACCL_REGS
|
__SAVE_REGFILE_SOFT
|
||||||
PUSH r59
|
.endm
|
||||||
PUSH r58
|
|
||||||
#endif
|
|
||||||
|
|
||||||
PUSH r30
|
/*------------------------------------------------------------------------*/
|
||||||
PUSH r12
|
.macro EXCEPTION_PROLOGUE
|
||||||
|
|
||||||
|
; (A) Before jumping to Exception Vector, hardware micro-ops did following:
|
||||||
|
; 1. SP auto-switched to kernel mode stack
|
||||||
|
; 2. STATUS32.Z flag set if in U mode at time of exception (U:1,K:0)
|
||||||
|
;
|
||||||
|
; (B) Manually save the complete reg file below
|
||||||
|
|
||||||
|
sub sp, sp, SZ_PT_REGS ; carve pt_regs
|
||||||
|
|
||||||
|
; _HARD saves r10 clobbered by _SOFT as scratch hence comes first
|
||||||
|
|
||||||
|
__SAVE_REGFILE_HARD
|
||||||
|
__SAVE_REGFILE_SOFT
|
||||||
|
|
||||||
|
st r0, [sp] ; orig_r0
|
||||||
|
|
||||||
|
lr r10, [eret]
|
||||||
|
lr r11, [erstatus]
|
||||||
|
ST2 r10, r11, PT_ret
|
||||||
|
|
||||||
|
lr r10, [ecr]
|
||||||
|
lr r11, [erbta]
|
||||||
|
ST2 r10, r11, PT_event
|
||||||
|
mov r9, r10
|
||||||
|
|
||||||
|
; OUTPUT: r9 has ECR
|
||||||
|
.endm
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------
|
||||||
|
* This macro saves the registers manually which would normally be autosaved
|
||||||
|
* by hardware on taken interrupts. It is used by
|
||||||
|
* - exception handlers (which don't have autosave)
|
||||||
|
* - interrupt autosave disabled due to CONFIG_ARC_IRQ_NO_AUTOSAVE
|
||||||
|
*/
|
||||||
|
.macro __SAVE_REGFILE_HARD
|
||||||
|
|
||||||
|
ST2 r0, r1, PT_r0
|
||||||
|
ST2 r2, r3, PT_r2
|
||||||
|
ST2 r4, r5, PT_r4
|
||||||
|
ST2 r6, r7, PT_r6
|
||||||
|
ST2 r8, r9, PT_r8
|
||||||
|
ST2 r10, r11, PT_r10
|
||||||
|
|
||||||
|
st blink, [sp, PT_blink]
|
||||||
|
|
||||||
|
lr r10, [lp_end]
|
||||||
|
lr r11, [lp_start]
|
||||||
|
ST2 r10, r11, PT_lpe
|
||||||
|
|
||||||
|
st lp_count, [sp, PT_lpc]
|
||||||
|
|
||||||
|
; skip JLI, LDI, EI for now
|
||||||
|
.endm
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------
|
||||||
|
* This macros saves a bunch of other registers which can't be autosaved for
|
||||||
|
* various reasons:
|
||||||
|
* - r12: the last caller saved scratch reg since hardware saves in pairs so r0-r11
|
||||||
|
* - r30: free reg, used by gcc as scratch
|
||||||
|
* - ACCL/ACCH pair when they exist
|
||||||
|
*/
|
||||||
|
.macro __SAVE_REGFILE_SOFT
|
||||||
|
|
||||||
|
ST2 gp, fp, PT_r26 ; gp (r26), fp (r27)
|
||||||
|
|
||||||
|
st r12, [sp, PT_sp + 4]
|
||||||
|
st r30, [sp, PT_sp + 8]
|
||||||
|
|
||||||
; Saving pt_regs->sp correctly requires some extra work due to the way
|
; Saving pt_regs->sp correctly requires some extra work due to the way
|
||||||
; Auto stack switch works
|
; Auto stack switch works
|
||||||
; - U mode: retrieve it from AUX_USER_SP
|
; - U mode: retrieve it from AUX_USER_SP
|
||||||
; - K mode: add the offset from current SP where H/w starts auto push
|
; - K mode: add the offset from current SP where H/w starts auto push
|
||||||
;
|
;
|
||||||
; Utilize the fact that Z bit is set if Intr taken in U mode
|
; 1. Utilize the fact that Z bit is set if Intr taken in U mode
|
||||||
mov.nz r9, sp
|
; 2. Upon entry SP is always saved (for any inspection, unwinding etc),
|
||||||
add.nz r9, r9, SZ_PT_REGS - PT_sp - 4
|
; but on return, restored only if U mode
|
||||||
bnz 1f
|
|
||||||
|
|
||||||
lr r9, [AUX_USER_SP]
|
lr r10, [AUX_USER_SP] ; U mode SP
|
||||||
1:
|
|
||||||
PUSH r9 ; SP
|
|
||||||
|
|
||||||
PUSH fp
|
; ISA requires ADD.nz to have same dest and src reg operands
|
||||||
PUSH gp
|
mov.nz r10, sp
|
||||||
|
add.nz r10, r10, SZ_PT_REGS ; K mode SP
|
||||||
|
|
||||||
|
st r10, [sp, PT_sp] ; SP (pt_regs->sp)
|
||||||
|
|
||||||
#ifdef CONFIG_ARC_CURR_IN_REG
|
#ifdef CONFIG_ARC_CURR_IN_REG
|
||||||
PUSH r25 ; user_r25
|
st r25, [sp, PT_user_r25]
|
||||||
GET_CURR_TASK_ON_CPU r25
|
GET_CURR_TASK_ON_CPU r25
|
||||||
#else
|
|
||||||
sub sp, sp, 4
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
.ifnc \called_from, exception
|
|
||||||
sub sp, sp, 12 ; BTA/ECR/orig_r0 placeholder per pt_regs
|
|
||||||
.endif
|
|
||||||
|
|
||||||
.endm
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------*/
|
|
||||||
.macro INTERRUPT_EPILOGUE called_from
|
|
||||||
|
|
||||||
.ifnc \called_from, exception
|
|
||||||
add sp, sp, 12 ; skip BTA/ECR/orig_r0 placeholderss
|
|
||||||
.endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_ARC_CURR_IN_REG
|
|
||||||
POP r25
|
|
||||||
#else
|
|
||||||
add sp, sp, 4
|
|
||||||
#endif
|
|
||||||
|
|
||||||
POP gp
|
|
||||||
POP fp
|
|
||||||
|
|
||||||
; Don't touch AUX_USER_SP if returning to K mode (Z bit set)
|
|
||||||
; (Z bit set on K mode is inverse of INTERRUPT_PROLOGUE)
|
|
||||||
add.z sp, sp, 4
|
|
||||||
bz 1f
|
|
||||||
|
|
||||||
POPAX AUX_USER_SP
|
|
||||||
1:
|
|
||||||
POP r12
|
|
||||||
POP r30
|
|
||||||
|
|
||||||
#ifdef CONFIG_ARC_HAS_ACCL_REGS
|
#ifdef CONFIG_ARC_HAS_ACCL_REGS
|
||||||
POP r58
|
ST2 r58, r59, PT_sp + 12
|
||||||
POP r59
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_ARC_IRQ_NO_AUTOSAVE
|
|
||||||
.ifnc \called_from, exception
|
|
||||||
POP r0
|
|
||||||
POP r1
|
|
||||||
POP r2
|
|
||||||
POP r3
|
|
||||||
POP r4
|
|
||||||
POP r5
|
|
||||||
POP r6
|
|
||||||
POP r7
|
|
||||||
POP r8
|
|
||||||
POP r9
|
|
||||||
POP r10
|
|
||||||
POP r11
|
|
||||||
|
|
||||||
POP blink
|
|
||||||
POPAX lp_end
|
|
||||||
POPAX lp_start
|
|
||||||
|
|
||||||
POP r9
|
|
||||||
mov lp_count, r9
|
|
||||||
|
|
||||||
add sp, sp, 12 ; skip JLI, LDI, EI
|
|
||||||
ld.as r9, [sp, -10] ; reload r9 which got clobbered
|
|
||||||
.endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
/*------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------*/
|
||||||
.macro EXCEPTION_PROLOGUE
|
.macro __RESTORE_REGFILE_SOFT
|
||||||
|
|
||||||
; Before jumping to Exception Vector, hardware micro-ops did following:
|
LD2 gp, fp, PT_r26 ; gp (r26), fp (r27)
|
||||||
; 1. SP auto-switched to kernel mode stack
|
|
||||||
; 2. STATUS32.Z flag set to U mode at time of interrupt (U:1,K:0)
|
|
||||||
;
|
|
||||||
; Now manually save the complete reg file
|
|
||||||
|
|
||||||
PUSH r9 ; freeup a register: slot of erstatus
|
ld r12, [sp, PT_sp + 4]
|
||||||
|
ld r30, [sp, PT_sp + 8]
|
||||||
|
|
||||||
PUSHAX eret
|
; Restore SP (into AUX_USER_SP) only if returning to U mode
|
||||||
sub sp, sp, 12 ; skip JLI, LDI, EI
|
; - for K mode, it will be implicitly restored as stack is unwound
|
||||||
PUSH lp_count
|
; - Z flag set on K is inverse of what hardware does on interrupt entry
|
||||||
PUSHAX lp_start
|
; but that doesn't really matter
|
||||||
PUSHAX lp_end
|
bz 1f
|
||||||
PUSH blink
|
|
||||||
|
|
||||||
PUSH r11
|
ld r10, [sp, PT_sp] ; SP (pt_regs->sp)
|
||||||
PUSH r10
|
sr r10, [AUX_USER_SP]
|
||||||
|
1:
|
||||||
|
|
||||||
ld.as r9, [sp, 10] ; load stashed r9 (status32 stack slot)
|
#ifdef CONFIG_ARC_CURR_IN_REG
|
||||||
lr r10, [erstatus]
|
ld r25, [sp, PT_user_r25]
|
||||||
st.as r10, [sp, 10] ; save status32 at it's right stack slot
|
#endif
|
||||||
|
|
||||||
PUSH r9
|
#ifdef CONFIG_ARC_HAS_ACCL_REGS
|
||||||
PUSH r8
|
LD2 r58, r59, PT_sp + 12
|
||||||
PUSH r7
|
#endif
|
||||||
PUSH r6
|
.endm
|
||||||
PUSH r5
|
|
||||||
PUSH r4
|
|
||||||
PUSH r3
|
|
||||||
PUSH r2
|
|
||||||
PUSH r1
|
|
||||||
PUSH r0
|
|
||||||
|
|
||||||
; -- for interrupts, regs above are auto-saved by h/w in that order --
|
/*------------------------------------------------------------------------*/
|
||||||
; Now do what ISR prologue does (manually save r12, sp, fp, gp, r25)
|
.macro __RESTORE_REGFILE_HARD
|
||||||
;
|
|
||||||
; Set Z flag if this was from U mode (expected by INTERRUPT_PROLOGUE)
|
|
||||||
; Although H/w exception micro-ops do set Z flag for U mode (just like
|
|
||||||
; for interrupts), it could get clobbered in case we soft land here from
|
|
||||||
; a TLB Miss exception handler (tlbex.S)
|
|
||||||
|
|
||||||
and r10, r10, STATUS_U_MASK
|
ld blink, [sp, PT_blink]
|
||||||
xor.f 0, r10, STATUS_U_MASK
|
|
||||||
|
|
||||||
INTERRUPT_PROLOGUE exception
|
LD2 r10, r11, PT_lpe
|
||||||
|
sr r10, [lp_end]
|
||||||
|
sr r11, [lp_start]
|
||||||
|
|
||||||
PUSHAX erbta
|
ld r10, [sp, PT_lpc] ; lp_count can't be target of LD
|
||||||
PUSHAX ecr ; r9 contains ECR, expected by EV_Trap
|
mov lp_count, r10
|
||||||
|
|
||||||
|
LD2 r0, r1, PT_r0
|
||||||
|
LD2 r2, r3, PT_r2
|
||||||
|
LD2 r4, r5, PT_r4
|
||||||
|
LD2 r6, r7, PT_r6
|
||||||
|
LD2 r8, r9, PT_r8
|
||||||
|
LD2 r10, r11, PT_r10
|
||||||
|
.endm
|
||||||
|
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------*/
|
||||||
|
.macro INTERRUPT_EPILOGUE
|
||||||
|
|
||||||
|
; INPUT: r0 has STAT32 of calling context
|
||||||
|
; INPUT: Z flag set if returning to K mode
|
||||||
|
|
||||||
|
; _SOFT clobbers r10 restored by _HARD hence the order
|
||||||
|
|
||||||
|
__RESTORE_REGFILE_SOFT
|
||||||
|
|
||||||
|
#ifdef CONFIG_ARC_IRQ_NO_AUTOSAVE
|
||||||
|
__RESTORE_REGFILE_HARD
|
||||||
|
add sp, sp, SZ_PT_REGS - 8
|
||||||
|
#else
|
||||||
|
add sp, sp, PT_r0
|
||||||
|
#endif
|
||||||
|
|
||||||
PUSH r0 ; orig_r0
|
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
/*------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------*/
|
||||||
.macro EXCEPTION_EPILOGUE
|
.macro EXCEPTION_EPILOGUE
|
||||||
|
|
||||||
; Assumes r0 has PT_status32
|
; INPUT: r0 has STAT32 of calling context
|
||||||
btst r0, STATUS_U_BIT ; Z flag set if K, used in INTERRUPT_EPILOGUE
|
|
||||||
|
|
||||||
add sp, sp, 8 ; orig_r0/ECR don't need restoring
|
btst r0, STATUS_U_BIT ; Z flag set if K, used in restoring SP
|
||||||
POPAX erbta
|
|
||||||
|
|
||||||
INTERRUPT_EPILOGUE exception
|
ld r10, [sp, PT_event + 4]
|
||||||
|
sr r10, [erbta]
|
||||||
|
|
||||||
POP r0
|
LD2 r10, r11, PT_ret
|
||||||
POP r1
|
sr r10, [eret]
|
||||||
POP r2
|
sr r11, [erstatus]
|
||||||
POP r3
|
|
||||||
POP r4
|
|
||||||
POP r5
|
|
||||||
POP r6
|
|
||||||
POP r7
|
|
||||||
POP r8
|
|
||||||
POP r9
|
|
||||||
POP r10
|
|
||||||
POP r11
|
|
||||||
|
|
||||||
POP blink
|
__RESTORE_REGFILE_SOFT
|
||||||
POPAX lp_end
|
__RESTORE_REGFILE_HARD
|
||||||
POPAX lp_start
|
|
||||||
|
|
||||||
POP r9
|
add sp, sp, SZ_PT_REGS
|
||||||
mov lp_count, r9
|
|
||||||
|
|
||||||
add sp, sp, 12 ; skip JLI, LDI, EI
|
|
||||||
POPAX eret
|
|
||||||
POPAX erstatus
|
|
||||||
|
|
||||||
ld.as r9, [sp, -12] ; reload r9 which got clobbered
|
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro FAKE_RET_FROM_EXCPN
|
.macro FAKE_RET_FROM_EXCPN
|
||||||
|
|
|
@ -11,12 +11,30 @@
|
||||||
|
|
||||||
#include <asm/dwarf.h>
|
#include <asm/dwarf.h>
|
||||||
|
|
||||||
#ifdef __ASSEMBLY__
|
|
||||||
|
|
||||||
#define ASM_NL ` /* use '`' to mark new line in macro */
|
#define ASM_NL ` /* use '`' to mark new line in macro */
|
||||||
#define __ALIGN .align 4
|
#define __ALIGN .align 4
|
||||||
#define __ALIGN_STR __stringify(__ALIGN)
|
#define __ALIGN_STR __stringify(__ALIGN)
|
||||||
|
|
||||||
|
#ifdef __ASSEMBLY__
|
||||||
|
|
||||||
|
.macro ST2 e, o, off
|
||||||
|
#ifdef CONFIG_ARC_HAS_LL64
|
||||||
|
std \e, [sp, \off]
|
||||||
|
#else
|
||||||
|
st \e, [sp, \off]
|
||||||
|
st \o, [sp, \off+4]
|
||||||
|
#endif
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro LD2 e, o, off
|
||||||
|
#ifdef CONFIG_ARC_HAS_LL64
|
||||||
|
ldd \e, [sp, \off]
|
||||||
|
#else
|
||||||
|
ld \e, [sp, \off]
|
||||||
|
ld \o, [sp, \off+4]
|
||||||
|
#endif
|
||||||
|
.endm
|
||||||
|
|
||||||
/* annotation for data we want in DCCM - if enabled in .config */
|
/* annotation for data we want in DCCM - if enabled in .config */
|
||||||
.macro ARCFP_DATA nm
|
.macro ARCFP_DATA nm
|
||||||
#ifdef CONFIG_ARC_HAS_DCCM
|
#ifdef CONFIG_ARC_HAS_DCCM
|
||||||
|
|
|
@ -58,7 +58,14 @@ int main(void)
|
||||||
DEFINE(PT_r5, offsetof(struct pt_regs, r5));
|
DEFINE(PT_r5, offsetof(struct pt_regs, r5));
|
||||||
DEFINE(PT_r6, offsetof(struct pt_regs, r6));
|
DEFINE(PT_r6, offsetof(struct pt_regs, r6));
|
||||||
DEFINE(PT_r7, offsetof(struct pt_regs, r7));
|
DEFINE(PT_r7, offsetof(struct pt_regs, r7));
|
||||||
|
DEFINE(PT_r8, offsetof(struct pt_regs, r8));
|
||||||
|
DEFINE(PT_r10, offsetof(struct pt_regs, r10));
|
||||||
|
DEFINE(PT_r26, offsetof(struct pt_regs, r26));
|
||||||
DEFINE(PT_ret, offsetof(struct pt_regs, ret));
|
DEFINE(PT_ret, offsetof(struct pt_regs, ret));
|
||||||
|
DEFINE(PT_blink, offsetof(struct pt_regs, blink));
|
||||||
|
DEFINE(PT_lpe, offsetof(struct pt_regs, lp_end));
|
||||||
|
DEFINE(PT_lpc, offsetof(struct pt_regs, lp_count));
|
||||||
|
DEFINE(PT_user_r25, offsetof(struct pt_regs, user_r25));
|
||||||
|
|
||||||
DEFINE(SZ_CALLEE_REGS, sizeof(struct callee_regs));
|
DEFINE(SZ_CALLEE_REGS, sizeof(struct callee_regs));
|
||||||
DEFINE(SZ_PT_REGS, sizeof(struct pt_regs));
|
DEFINE(SZ_PT_REGS, sizeof(struct pt_regs));
|
||||||
|
|
|
@ -70,7 +70,7 @@ reserved:
|
||||||
|
|
||||||
ENTRY(handle_interrupt)
|
ENTRY(handle_interrupt)
|
||||||
|
|
||||||
INTERRUPT_PROLOGUE irq
|
INTERRUPT_PROLOGUE
|
||||||
|
|
||||||
# irq control APIs local_irq_save/restore/disable/enable fiddle with
|
# irq control APIs local_irq_save/restore/disable/enable fiddle with
|
||||||
# global interrupt enable bits in STATUS32 (.IE for 1 prio, .E[] for 2 prio)
|
# global interrupt enable bits in STATUS32 (.IE for 1 prio, .E[] for 2 prio)
|
||||||
|
@ -226,7 +226,7 @@ debug_marker_l1:
|
||||||
bset.nz r11, r11, AUX_IRQ_ACT_BIT_U ; NZ means U
|
bset.nz r11, r11, AUX_IRQ_ACT_BIT_U ; NZ means U
|
||||||
sr r11, [AUX_IRQ_ACT]
|
sr r11, [AUX_IRQ_ACT]
|
||||||
|
|
||||||
INTERRUPT_EPILOGUE irq
|
INTERRUPT_EPILOGUE
|
||||||
rtie
|
rtie
|
||||||
|
|
||||||
;####### Return from Exception / pure kernel mode #######
|
;####### Return from Exception / pure kernel mode #######
|
||||||
|
|
|
@ -396,6 +396,17 @@ EV_TLBMissD_fast_ret: ; additional label for VDK OS-kit instrumentation
|
||||||
;-------- Common routine to call Linux Page Fault Handler -----------
|
;-------- Common routine to call Linux Page Fault Handler -----------
|
||||||
do_slow_path_pf:
|
do_slow_path_pf:
|
||||||
|
|
||||||
|
#ifdef CONFIG_ISA_ARCV2
|
||||||
|
; Set Z flag if exception in U mode. Hardware micro-ops do this on any
|
||||||
|
; taken interrupt/exception, and thus is already the case at the entry
|
||||||
|
; above, but ensuing code would have already clobbered.
|
||||||
|
; EXCEPTION_PROLOGUE called in slow path, relies on correct Z flag set
|
||||||
|
|
||||||
|
lr r2, [erstatus]
|
||||||
|
and r2, r2, STATUS_U_MASK
|
||||||
|
bxor.f 0, r2, STATUS_U_BIT
|
||||||
|
#endif
|
||||||
|
|
||||||
; Restore the 4-scratch regs saved by fast path miss handler
|
; Restore the 4-scratch regs saved by fast path miss handler
|
||||||
TLBMISS_RESTORE_REGS
|
TLBMISS_RESTORE_REGS
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ config ARM
|
||||||
default y
|
default y
|
||||||
select ARCH_CLOCKSOURCE_DATA
|
select ARCH_CLOCKSOURCE_DATA
|
||||||
select ARCH_DISCARD_MEMBLOCK if !HAVE_ARCH_PFN_VALID && !KEXEC
|
select ARCH_DISCARD_MEMBLOCK if !HAVE_ARCH_PFN_VALID && !KEXEC
|
||||||
|
select ARCH_HAS_CPU_FINALIZE_INIT if MMU
|
||||||
select ARCH_HAS_DEBUG_VIRTUAL if MMU
|
select ARCH_HAS_DEBUG_VIRTUAL if MMU
|
||||||
select ARCH_HAS_DEVMEM_IS_ALLOWED
|
select ARCH_HAS_DEVMEM_IS_ALLOWED
|
||||||
select ARCH_HAS_ELF_RANDOMIZE
|
select ARCH_HAS_ELF_RANDOMIZE
|
||||||
|
|
|
@ -468,7 +468,6 @@
|
||||||
"spi_lr_session_done",
|
"spi_lr_session_done",
|
||||||
"spi_lr_overread";
|
"spi_lr_overread";
|
||||||
clocks = <&iprocmed>;
|
clocks = <&iprocmed>;
|
||||||
clock-names = "iprocmed";
|
|
||||||
num-cs = <2>;
|
num-cs = <2>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
|
|
|
@ -46,6 +46,10 @@
|
||||||
spi1 = &ecspi2;
|
spi1 = &ecspi2;
|
||||||
spi2 = &ecspi3;
|
spi2 = &ecspi3;
|
||||||
spi3 = &ecspi4;
|
spi3 = &ecspi4;
|
||||||
|
usb0 = &usbotg;
|
||||||
|
usb1 = &usbh1;
|
||||||
|
usb2 = &usbh2;
|
||||||
|
usb3 = &usbh3;
|
||||||
usbphy0 = &usbphy1;
|
usbphy0 = &usbphy1;
|
||||||
usbphy1 = &usbphy2;
|
usbphy1 = &usbphy2;
|
||||||
};
|
};
|
||||||
|
|
|
@ -32,6 +32,9 @@
|
||||||
spi1 = &ecspi2;
|
spi1 = &ecspi2;
|
||||||
spi2 = &ecspi3;
|
spi2 = &ecspi3;
|
||||||
spi3 = &ecspi4;
|
spi3 = &ecspi4;
|
||||||
|
usb0 = &usbotg1;
|
||||||
|
usb1 = &usbotg2;
|
||||||
|
usb2 = &usbh;
|
||||||
usbphy0 = &usbphy1;
|
usbphy0 = &usbphy1;
|
||||||
usbphy1 = &usbphy2;
|
usbphy1 = &usbphy2;
|
||||||
};
|
};
|
||||||
|
|
|
@ -36,6 +36,8 @@
|
||||||
spi1 = &ecspi2;
|
spi1 = &ecspi2;
|
||||||
spi3 = &ecspi3;
|
spi3 = &ecspi3;
|
||||||
spi4 = &ecspi4;
|
spi4 = &ecspi4;
|
||||||
|
usb0 = &usbotg1;
|
||||||
|
usb1 = &usbotg2;
|
||||||
usbphy0 = &usbphy1;
|
usbphy0 = &usbphy1;
|
||||||
usbphy1 = &usbphy2;
|
usbphy1 = &usbphy2;
|
||||||
};
|
};
|
||||||
|
@ -49,20 +51,18 @@
|
||||||
device_type = "cpu";
|
device_type = "cpu";
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
next-level-cache = <&L2>;
|
next-level-cache = <&L2>;
|
||||||
operating-points = <
|
operating-points =
|
||||||
/* kHz uV */
|
/* kHz uV */
|
||||||
996000 1275000
|
<996000 1275000>,
|
||||||
792000 1175000
|
<792000 1175000>,
|
||||||
396000 1075000
|
<396000 1075000>,
|
||||||
198000 975000
|
<198000 975000>;
|
||||||
>;
|
fsl,soc-operating-points =
|
||||||
fsl,soc-operating-points = <
|
|
||||||
/* ARM kHz SOC-PU uV */
|
/* ARM kHz SOC-PU uV */
|
||||||
996000 1175000
|
<996000 1175000>,
|
||||||
792000 1175000
|
<792000 1175000>,
|
||||||
396000 1175000
|
<396000 1175000>,
|
||||||
198000 1175000
|
<198000 1175000>;
|
||||||
>;
|
|
||||||
clock-latency = <61036>; /* two CLK32 periods */
|
clock-latency = <61036>; /* two CLK32 periods */
|
||||||
clocks = <&clks IMX6SLL_CLK_ARM>,
|
clocks = <&clks IMX6SLL_CLK_ARM>,
|
||||||
<&clks IMX6SLL_CLK_PLL2_PFD2>,
|
<&clks IMX6SLL_CLK_PLL2_PFD2>,
|
||||||
|
@ -271,7 +271,7 @@
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
ssi1: ssi-controller@2028000 {
|
ssi1: ssi@2028000 {
|
||||||
compatible = "fsl,imx6sl-ssi", "fsl,imx51-ssi";
|
compatible = "fsl,imx6sl-ssi", "fsl,imx51-ssi";
|
||||||
reg = <0x02028000 0x4000>;
|
reg = <0x02028000 0x4000>;
|
||||||
interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
@ -284,7 +284,7 @@
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
ssi2: ssi-controller@202c000 {
|
ssi2: ssi@202c000 {
|
||||||
compatible = "fsl,imx6sl-ssi", "fsl,imx51-ssi";
|
compatible = "fsl,imx6sl-ssi", "fsl,imx51-ssi";
|
||||||
reg = <0x0202c000 0x4000>;
|
reg = <0x0202c000 0x4000>;
|
||||||
interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
@ -297,7 +297,7 @@
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
ssi3: ssi-controller@2030000 {
|
ssi3: ssi@2030000 {
|
||||||
compatible = "fsl,imx6sl-ssi", "fsl,imx51-ssi";
|
compatible = "fsl,imx6sl-ssi", "fsl,imx51-ssi";
|
||||||
reg = <0x02030000 0x4000>;
|
reg = <0x02030000 0x4000>;
|
||||||
interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
@ -518,7 +518,7 @@
|
||||||
reg = <0x020ca000 0x1000>;
|
reg = <0x020ca000 0x1000>;
|
||||||
interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
clocks = <&clks IMX6SLL_CLK_USBPHY2>;
|
clocks = <&clks IMX6SLL_CLK_USBPHY2>;
|
||||||
phy-reg_3p0-supply = <®_3p0>;
|
phy-3p0-supply = <®_3p0>;
|
||||||
fsl,anatop = <&anatop>;
|
fsl,anatop = <&anatop>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,9 @@
|
||||||
spi2 = &ecspi3;
|
spi2 = &ecspi3;
|
||||||
spi3 = &ecspi4;
|
spi3 = &ecspi4;
|
||||||
spi4 = &ecspi5;
|
spi4 = &ecspi5;
|
||||||
|
usb0 = &usbotg1;
|
||||||
|
usb1 = &usbotg2;
|
||||||
|
usb2 = &usbh;
|
||||||
usbphy0 = &usbphy1;
|
usbphy0 = &usbphy1;
|
||||||
usbphy1 = &usbphy2;
|
usbphy1 = &usbphy2;
|
||||||
};
|
};
|
||||||
|
|
|
@ -47,6 +47,8 @@
|
||||||
spi1 = &ecspi2;
|
spi1 = &ecspi2;
|
||||||
spi2 = &ecspi3;
|
spi2 = &ecspi3;
|
||||||
spi3 = &ecspi4;
|
spi3 = &ecspi4;
|
||||||
|
usb0 = &usbotg1;
|
||||||
|
usb1 = &usbotg2;
|
||||||
usbphy0 = &usbphy1;
|
usbphy0 = &usbphy1;
|
||||||
usbphy1 = &usbphy2;
|
usbphy1 = &usbphy2;
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,6 +7,12 @@
|
||||||
#include <dt-bindings/reset/imx7-reset.h>
|
#include <dt-bindings/reset/imx7-reset.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
|
aliases {
|
||||||
|
usb0 = &usbotg1;
|
||||||
|
usb1 = &usbotg2;
|
||||||
|
usb2 = &usbh;
|
||||||
|
};
|
||||||
|
|
||||||
cpus {
|
cpus {
|
||||||
cpu0: cpu@0 {
|
cpu0: cpu@0 {
|
||||||
clock-frequency = <996000000>;
|
clock-frequency = <996000000>;
|
||||||
|
|
|
@ -46,6 +46,8 @@
|
||||||
spi1 = &ecspi2;
|
spi1 = &ecspi2;
|
||||||
spi2 = &ecspi3;
|
spi2 = &ecspi3;
|
||||||
spi3 = &ecspi4;
|
spi3 = &ecspi4;
|
||||||
|
usb0 = &usbotg1;
|
||||||
|
usb1 = &usbh;
|
||||||
};
|
};
|
||||||
|
|
||||||
cpus {
|
cpus {
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* arch/arm/include/asm/bugs.h
|
|
||||||
*
|
|
||||||
* Copyright (C) 1995-2003 Russell King
|
* Copyright (C) 1995-2003 Russell King
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -13,10 +11,8 @@
|
||||||
extern void check_writebuffer_bugs(void);
|
extern void check_writebuffer_bugs(void);
|
||||||
|
|
||||||
#ifdef CONFIG_MMU
|
#ifdef CONFIG_MMU
|
||||||
extern void check_bugs(void);
|
|
||||||
extern void check_other_bugs(void);
|
extern void check_other_bugs(void);
|
||||||
#else
|
#else
|
||||||
#define check_bugs() do { } while (0)
|
|
||||||
#define check_other_bugs() do { } while (0)
|
#define check_other_bugs() do { } while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// SPDX-Identifier: GPL-2.0
|
// SPDX-Identifier: GPL-2.0
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
|
#include <linux/cpu.h>
|
||||||
#include <asm/bugs.h>
|
#include <asm/bugs.h>
|
||||||
#include <asm/proc-fns.h>
|
#include <asm/proc-fns.h>
|
||||||
|
|
||||||
|
@ -11,7 +12,7 @@ void check_other_bugs(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void __init check_bugs(void)
|
void __init arch_cpu_finalize_init(void)
|
||||||
{
|
{
|
||||||
check_writebuffer_bugs();
|
check_writebuffer_bugs();
|
||||||
check_other_bugs();
|
check_other_bugs();
|
||||||
|
|
|
@ -63,6 +63,9 @@ static void __init orion5x_dt_init(void)
|
||||||
if (of_machine_is_compatible("maxtor,shared-storage-2"))
|
if (of_machine_is_compatible("maxtor,shared-storage-2"))
|
||||||
mss2_init();
|
mss2_init();
|
||||||
|
|
||||||
|
if (of_machine_is_compatible("lacie,d2-network"))
|
||||||
|
d2net_init();
|
||||||
|
|
||||||
of_platform_default_populate(NULL, orion5x_auxdata_lookup, NULL);
|
of_platform_default_populate(NULL, orion5x_auxdata_lookup, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -75,6 +75,12 @@ extern void mss2_init(void);
|
||||||
static inline void mss2_init(void) {}
|
static inline void mss2_init(void) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_MACH_D2NET_DT
|
||||||
|
void d2net_init(void);
|
||||||
|
#else
|
||||||
|
static inline void d2net_init(void) {}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Helpers to access Orion registers
|
* Helpers to access Orion registers
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
|
@ -570,7 +570,7 @@ static void __init map_sa1100_gpio_regs( void )
|
||||||
*/
|
*/
|
||||||
static void __init get_assabet_scr(void)
|
static void __init get_assabet_scr(void)
|
||||||
{
|
{
|
||||||
unsigned long uninitialized_var(scr), i;
|
unsigned long scr, i;
|
||||||
|
|
||||||
GPDR |= 0x3fc; /* Configure GPIO 9:2 as outputs */
|
GPDR |= 0x3fc; /* Configure GPIO 9:2 as outputs */
|
||||||
GPSR = 0x3fc; /* Write 0xFF to GPIO 9:2 */
|
GPSR = 0x3fc; /* Write 0xFF to GPIO 9:2 */
|
||||||
|
|
|
@ -48,7 +48,7 @@ enum probes_insn checker_stack_use_imm_0xx(probes_opcode_t insn,
|
||||||
* Different from other insn uses imm8, the real addressing offset of
|
* Different from other insn uses imm8, the real addressing offset of
|
||||||
* STRD in T32 encoding should be imm8 * 4. See ARMARM description.
|
* STRD in T32 encoding should be imm8 * 4. See ARMARM description.
|
||||||
*/
|
*/
|
||||||
enum probes_insn checker_stack_use_t32strd(probes_opcode_t insn,
|
static enum probes_insn checker_stack_use_t32strd(probes_opcode_t insn,
|
||||||
struct arch_probes_insn *asi,
|
struct arch_probes_insn *asi,
|
||||||
const struct decode_header *h)
|
const struct decode_header *h)
|
||||||
{
|
{
|
||||||
|
|
|
@ -239,7 +239,7 @@ singlestep(struct kprobe *p, struct pt_regs *regs, struct kprobe_ctlblk *kcb)
|
||||||
* kprobe, and that level is reserved for user kprobe handlers, so we can't
|
* kprobe, and that level is reserved for user kprobe handlers, so we can't
|
||||||
* risk encountering a new kprobe in an interrupt handler.
|
* risk encountering a new kprobe in an interrupt handler.
|
||||||
*/
|
*/
|
||||||
void __kprobes kprobe_handler(struct pt_regs *regs)
|
static void __kprobes kprobe_handler(struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
struct kprobe *p, *cur;
|
struct kprobe *p, *cur;
|
||||||
struct kprobe_ctlblk *kcb;
|
struct kprobe_ctlblk *kcb;
|
||||||
|
|
|
@ -158,8 +158,6 @@ __arch_remove_optimized_kprobe(struct optimized_kprobe *op, int dirty)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void kprobe_handler(struct pt_regs *regs);
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
optimized_callback(struct optimized_kprobe *op, struct pt_regs *regs)
|
optimized_callback(struct optimized_kprobe *op, struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
|
|
|
@ -723,7 +723,7 @@ static const char coverage_register_lookup[16] = {
|
||||||
[REG_TYPE_NOSPPCX] = COVERAGE_ANY_REG | COVERAGE_SP,
|
[REG_TYPE_NOSPPCX] = COVERAGE_ANY_REG | COVERAGE_SP,
|
||||||
};
|
};
|
||||||
|
|
||||||
unsigned coverage_start_registers(const struct decode_header *h)
|
static unsigned coverage_start_registers(const struct decode_header *h)
|
||||||
{
|
{
|
||||||
unsigned regs = 0;
|
unsigned regs = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -456,3 +456,7 @@ void kprobe_thumb32_test_cases(void);
|
||||||
#else
|
#else
|
||||||
void kprobe_arm_test_cases(void);
|
void kprobe_arm_test_cases(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void __kprobes_test_case_start(void);
|
||||||
|
void __kprobes_test_case_end_16(void);
|
||||||
|
void __kprobes_test_case_end_32(void);
|
||||||
|
|
|
@ -125,7 +125,7 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
clock-frequency = <100000>;
|
clock-frequency = <100000>;
|
||||||
i2c-sda-falling-time-ns = <890>; /* hcnt */
|
i2c-sda-falling-time-ns = <890>; /* hcnt */
|
||||||
i2c-sdl-falling-time-ns = <890>; /* lcnt */
|
i2c-scl-falling-time-ns = <890>; /* lcnt */
|
||||||
|
|
||||||
adc@14 {
|
adc@14 {
|
||||||
compatible = "lltc,ltc2497";
|
compatible = "lltc,ltc2497";
|
||||||
|
|
|
@ -165,7 +165,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
scif1_pins: scif1 {
|
scif1_pins: scif1 {
|
||||||
groups = "scif1_data_b", "scif1_ctrl";
|
groups = "scif1_data_b";
|
||||||
function = "scif1";
|
function = "scif1";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -178,7 +178,6 @@
|
||||||
&scif1 {
|
&scif1 {
|
||||||
pinctrl-0 = <&scif1_pins>;
|
pinctrl-0 = <&scif1_pins>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
uart-has-rtscts;
|
|
||||||
|
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,6 +8,7 @@ menu "Processor type and features"
|
||||||
|
|
||||||
config IA64
|
config IA64
|
||||||
bool
|
bool
|
||||||
|
select ARCH_HAS_CPU_FINALIZE_INIT
|
||||||
select ARCH_MIGHT_HAVE_PC_PARPORT
|
select ARCH_MIGHT_HAVE_PC_PARPORT
|
||||||
select ARCH_MIGHT_HAVE_PC_SERIO
|
select ARCH_MIGHT_HAVE_PC_SERIO
|
||||||
select PCI if (!IA64_HP_SIM)
|
select PCI if (!IA64_HP_SIM)
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
|
||||||
/*
|
|
||||||
* This is included by init/main.c to check for architecture-dependent bugs.
|
|
||||||
*
|
|
||||||
* Needs:
|
|
||||||
* void check_bugs(void);
|
|
||||||
*
|
|
||||||
* Based on <asm-alpha/bugs.h>.
|
|
||||||
*
|
|
||||||
* Modified 1998, 1999, 2003
|
|
||||||
* David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co.
|
|
||||||
*/
|
|
||||||
#ifndef _ASM_IA64_BUGS_H
|
|
||||||
#define _ASM_IA64_BUGS_H
|
|
||||||
|
|
||||||
#include <asm/processor.h>
|
|
||||||
|
|
||||||
extern void check_bugs (void);
|
|
||||||
|
|
||||||
#endif /* _ASM_IA64_BUGS_H */
|
|
|
@ -444,7 +444,7 @@ static void
|
||||||
do_copy_task_regs (struct task_struct *task, struct unw_frame_info *info, void *arg)
|
do_copy_task_regs (struct task_struct *task, struct unw_frame_info *info, void *arg)
|
||||||
{
|
{
|
||||||
unsigned long mask, sp, nat_bits = 0, ar_rnat, urbs_end, cfm;
|
unsigned long mask, sp, nat_bits = 0, ar_rnat, urbs_end, cfm;
|
||||||
unsigned long uninitialized_var(ip); /* GCC be quiet */
|
unsigned long ip;
|
||||||
elf_greg_t *dst = arg;
|
elf_greg_t *dst = arg;
|
||||||
struct pt_regs *pt;
|
struct pt_regs *pt;
|
||||||
char nat;
|
char nat;
|
||||||
|
|
|
@ -1050,8 +1050,7 @@ cpu_init (void)
|
||||||
platform_cpu_init();
|
platform_cpu_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
void __init
|
void __init arch_cpu_finalize_init(void)
|
||||||
check_bugs (void)
|
|
||||||
{
|
{
|
||||||
ia64_patch_mckinley_e9((unsigned long) __start___mckinley_e9_bundles,
|
ia64_patch_mckinley_e9((unsigned long) __start___mckinley_e9_bundles,
|
||||||
(unsigned long) __end___mckinley_e9_bundles);
|
(unsigned long) __end___mckinley_e9_bundles);
|
||||||
|
|
|
@ -181,7 +181,7 @@ static void *per_cpu_node_setup(void *cpu_data, int node)
|
||||||
void __init setup_per_cpu_areas(void)
|
void __init setup_per_cpu_areas(void)
|
||||||
{
|
{
|
||||||
struct pcpu_alloc_info *ai;
|
struct pcpu_alloc_info *ai;
|
||||||
struct pcpu_group_info *uninitialized_var(gi);
|
struct pcpu_group_info *gi;
|
||||||
unsigned int *cpu_map;
|
unsigned int *cpu_map;
|
||||||
void *base;
|
void *base;
|
||||||
unsigned long base_offset;
|
unsigned long base_offset;
|
||||||
|
|
|
@ -339,7 +339,7 @@ EXPORT_SYMBOL(flush_tlb_range);
|
||||||
|
|
||||||
void ia64_tlb_init(void)
|
void ia64_tlb_init(void)
|
||||||
{
|
{
|
||||||
ia64_ptce_info_t uninitialized_var(ptce_info); /* GCC be quiet */
|
ia64_ptce_info_t ptce_info;
|
||||||
u64 tr_pgbits;
|
u64 tr_pgbits;
|
||||||
long status;
|
long status;
|
||||||
pal_vm_info_1_u_t vm_info_1;
|
pal_vm_info_1_u_t vm_info_1;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
config M68K
|
config M68K
|
||||||
bool
|
bool
|
||||||
default y
|
default y
|
||||||
|
select ARCH_HAS_CPU_FINALIZE_INIT if MMU
|
||||||
select ARCH_HAS_SYNC_DMA_FOR_DEVICE if HAS_DMA
|
select ARCH_HAS_SYNC_DMA_FOR_DEVICE if HAS_DMA
|
||||||
select ARCH_MIGHT_HAVE_PC_PARPORT if ISA
|
select ARCH_MIGHT_HAVE_PC_PARPORT if ISA
|
||||||
select ARCH_NO_COHERENT_DMA_MMAP if !MMU
|
select ARCH_NO_COHERENT_DMA_MMAP if !MMU
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
|
||||||
/*
|
|
||||||
* include/asm-m68k/bugs.h
|
|
||||||
*
|
|
||||||
* Copyright (C) 1994 Linus Torvalds
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This is included by init/main.c to check for architecture-dependent bugs.
|
|
||||||
*
|
|
||||||
* Needs:
|
|
||||||
* void check_bugs(void);
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef CONFIG_MMU
|
|
||||||
extern void check_bugs(void); /* in arch/m68k/kernel/setup.c */
|
|
||||||
#else
|
|
||||||
static void check_bugs(void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
#endif
|
|
|
@ -10,6 +10,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/cpu.h>
|
||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
|
@ -526,7 +527,7 @@ static int __init proc_hardware_init(void)
|
||||||
module_init(proc_hardware_init);
|
module_init(proc_hardware_init);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void check_bugs(void)
|
void __init arch_cpu_finalize_init(void)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_FPU) && !defined(CONFIG_M68KFPU_EMU)
|
#if defined(CONFIG_FPU) && !defined(CONFIG_M68KFPU_EMU)
|
||||||
if (m68k_fputype == 0) {
|
if (m68k_fputype == 0) {
|
||||||
|
|
|
@ -4,6 +4,7 @@ config MIPS
|
||||||
default y
|
default y
|
||||||
select ARCH_BINFMT_ELF_STATE
|
select ARCH_BINFMT_ELF_STATE
|
||||||
select ARCH_CLOCKSOURCE_DATA
|
select ARCH_CLOCKSOURCE_DATA
|
||||||
|
select ARCH_HAS_CPU_FINALIZE_INIT
|
||||||
select ARCH_DISCARD_MEMBLOCK
|
select ARCH_DISCARD_MEMBLOCK
|
||||||
select ARCH_HAS_ELF_RANDOMIZE
|
select ARCH_HAS_ELF_RANDOMIZE
|
||||||
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
|
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/dma-map-ops.h> /* for dma_default_coherent */
|
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
|
@ -624,18 +623,17 @@ u32 au1xxx_dbdma_put_source(u32 chanid, dma_addr_t buf, int nbytes, u32 flags)
|
||||||
dp->dscr_cmd0 &= ~DSCR_CMD0_IE;
|
dp->dscr_cmd0 &= ~DSCR_CMD0_IE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* There is an erratum on certain Au1200/Au1550 revisions that could
|
* There is an errata on the Au1200/Au1550 parts that could result
|
||||||
* result in "stale" data being DMA'ed. It has to do with the snoop
|
* in "stale" data being DMA'ed. It has to do with the snoop logic on
|
||||||
* logic on the cache eviction buffer. dma_default_coherent is set
|
* the cache eviction buffer. DMA_NONCOHERENT is on by default for
|
||||||
* to false on these parts.
|
* these parts. If it is fixed in the future, these dma_cache_inv will
|
||||||
|
* just be nothing more than empty macros. See io.h.
|
||||||
*/
|
*/
|
||||||
if (!dma_default_coherent)
|
dma_cache_wback_inv((unsigned long)buf, nbytes);
|
||||||
dma_cache_wback_inv(KSEG0ADDR(buf), nbytes);
|
|
||||||
dp->dscr_cmd0 |= DSCR_CMD0_V; /* Let it rip */
|
dp->dscr_cmd0 |= DSCR_CMD0_V; /* Let it rip */
|
||||||
wmb(); /* drain writebuffer */
|
wmb(); /* drain writebuffer */
|
||||||
dma_cache_wback_inv((unsigned long)dp, sizeof(*dp));
|
dma_cache_wback_inv((unsigned long)dp, sizeof(*dp));
|
||||||
ctp->chan_ptr->ddma_dbell = 0;
|
ctp->chan_ptr->ddma_dbell = 0;
|
||||||
wmb(); /* force doorbell write out to dma engine */
|
|
||||||
|
|
||||||
/* Get next descriptor pointer. */
|
/* Get next descriptor pointer. */
|
||||||
ctp->put_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr));
|
ctp->put_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr));
|
||||||
|
@ -687,18 +685,17 @@ u32 au1xxx_dbdma_put_dest(u32 chanid, dma_addr_t buf, int nbytes, u32 flags)
|
||||||
dp->dscr_source1, dp->dscr_dest0, dp->dscr_dest1);
|
dp->dscr_source1, dp->dscr_dest0, dp->dscr_dest1);
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
* There is an erratum on certain Au1200/Au1550 revisions that could
|
* There is an errata on the Au1200/Au1550 parts that could result in
|
||||||
* result in "stale" data being DMA'ed. It has to do with the snoop
|
* "stale" data being DMA'ed. It has to do with the snoop logic on the
|
||||||
* logic on the cache eviction buffer. dma_default_coherent is set
|
* cache eviction buffer. DMA_NONCOHERENT is on by default for these
|
||||||
* to false on these parts.
|
* parts. If it is fixed in the future, these dma_cache_inv will just
|
||||||
|
* be nothing more than empty macros. See io.h.
|
||||||
*/
|
*/
|
||||||
if (!dma_default_coherent)
|
dma_cache_inv((unsigned long)buf, nbytes);
|
||||||
dma_cache_inv(KSEG0ADDR(buf), nbytes);
|
|
||||||
dp->dscr_cmd0 |= DSCR_CMD0_V; /* Let it rip */
|
dp->dscr_cmd0 |= DSCR_CMD0_V; /* Let it rip */
|
||||||
wmb(); /* drain writebuffer */
|
wmb(); /* drain writebuffer */
|
||||||
dma_cache_wback_inv((unsigned long)dp, sizeof(*dp));
|
dma_cache_wback_inv((unsigned long)dp, sizeof(*dp));
|
||||||
ctp->chan_ptr->ddma_dbell = 0;
|
ctp->chan_ptr->ddma_dbell = 0;
|
||||||
wmb(); /* force doorbell write out to dma engine */
|
|
||||||
|
|
||||||
/* Get next descriptor pointer. */
|
/* Get next descriptor pointer. */
|
||||||
ctp->put_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr));
|
ctp->put_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr));
|
||||||
|
|
|
@ -1,17 +1,11 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
/* SPDX-License-Identifier: GPL-2.0 */
|
||||||
/*
|
/*
|
||||||
* This is included by init/main.c to check for architecture-dependent bugs.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2007 Maciej W. Rozycki
|
* Copyright (C) 2007 Maciej W. Rozycki
|
||||||
*
|
|
||||||
* Needs:
|
|
||||||
* void check_bugs(void);
|
|
||||||
*/
|
*/
|
||||||
#ifndef _ASM_BUGS_H
|
#ifndef _ASM_BUGS_H
|
||||||
#define _ASM_BUGS_H
|
#define _ASM_BUGS_H
|
||||||
|
|
||||||
#include <linux/bug.h>
|
#include <linux/bug.h>
|
||||||
#include <linux/delay.h>
|
|
||||||
#include <linux/smp.h>
|
#include <linux/smp.h>
|
||||||
|
|
||||||
#include <asm/cpu.h>
|
#include <asm/cpu.h>
|
||||||
|
@ -31,17 +25,6 @@ static inline void check_bugs_early(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void check_bugs(void)
|
|
||||||
{
|
|
||||||
unsigned int cpu = smp_processor_id();
|
|
||||||
|
|
||||||
cpu_data[cpu].udelay_val = loops_per_jiffy;
|
|
||||||
check_bugs32();
|
|
||||||
#ifdef CONFIG_64BIT
|
|
||||||
check_bugs64();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline int r4k_daddiu_bug(void)
|
static inline int r4k_daddiu_bug(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_64BIT
|
#ifdef CONFIG_64BIT
|
||||||
|
|
|
@ -111,7 +111,24 @@
|
||||||
#define cpu_has_tx39_cache __opt(MIPS_CPU_TX39_CACHE)
|
#define cpu_has_tx39_cache __opt(MIPS_CPU_TX39_CACHE)
|
||||||
#endif
|
#endif
|
||||||
#ifndef cpu_has_octeon_cache
|
#ifndef cpu_has_octeon_cache
|
||||||
#define cpu_has_octeon_cache 0
|
#define cpu_has_octeon_cache \
|
||||||
|
({ \
|
||||||
|
int __res; \
|
||||||
|
\
|
||||||
|
switch (boot_cpu_type()) { \
|
||||||
|
case CPU_CAVIUM_OCTEON: \
|
||||||
|
case CPU_CAVIUM_OCTEON_PLUS: \
|
||||||
|
case CPU_CAVIUM_OCTEON2: \
|
||||||
|
case CPU_CAVIUM_OCTEON3: \
|
||||||
|
__res = 1; \
|
||||||
|
break; \
|
||||||
|
\
|
||||||
|
default: \
|
||||||
|
__res = 0; \
|
||||||
|
} \
|
||||||
|
\
|
||||||
|
__res; \
|
||||||
|
})
|
||||||
#endif
|
#endif
|
||||||
/* Don't override `cpu_has_fpu' to 1 or the "nofpu" option won't work. */
|
/* Don't override `cpu_has_fpu' to 1 or the "nofpu" option won't work. */
|
||||||
#ifndef cpu_has_fpu
|
#ifndef cpu_has_fpu
|
||||||
|
@ -332,7 +349,7 @@
|
||||||
({ \
|
({ \
|
||||||
int __res; \
|
int __res; \
|
||||||
\
|
\
|
||||||
switch (current_cpu_type()) { \
|
switch (boot_cpu_type()) { \
|
||||||
case CPU_M14KC: \
|
case CPU_M14KC: \
|
||||||
case CPU_74K: \
|
case CPU_74K: \
|
||||||
case CPU_1074K: \
|
case CPU_1074K: \
|
||||||
|
|
|
@ -74,7 +74,7 @@ static inline bool prom_is_rex(u32 magic)
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int pagesize;
|
int pagesize;
|
||||||
unsigned char bitmap[0];
|
unsigned char bitmap[];
|
||||||
} memmap;
|
} memmap;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
* Copyright (C) 2000, 2001, 2002, 2007 Maciej W. Rozycki
|
* Copyright (C) 2000, 2001, 2002, 2007 Maciej W. Rozycki
|
||||||
*/
|
*/
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
|
#include <linux/cpu.h>
|
||||||
|
#include <linux/delay.h>
|
||||||
#include <linux/ioport.h>
|
#include <linux/ioport.h>
|
||||||
#include <linux/export.h>
|
#include <linux/export.h>
|
||||||
#include <linux/screen_info.h>
|
#include <linux/screen_info.h>
|
||||||
|
@ -1108,3 +1110,14 @@ static int __init setnocoherentio(char *str)
|
||||||
}
|
}
|
||||||
early_param("nocoherentio", setnocoherentio);
|
early_param("nocoherentio", setnocoherentio);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void __init arch_cpu_finalize_init(void)
|
||||||
|
{
|
||||||
|
unsigned int cpu = smp_processor_id();
|
||||||
|
|
||||||
|
cpu_data[cpu].udelay_val = loops_per_jiffy;
|
||||||
|
check_bugs32();
|
||||||
|
|
||||||
|
if (IS_ENABLED(CONFIG_CPU_R4X00_BUGS64))
|
||||||
|
check_bugs64();
|
||||||
|
}
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
|
||||||
/*
|
|
||||||
* include/asm-parisc/bugs.h
|
|
||||||
*
|
|
||||||
* Copyright (C) 1999 Mike Shaver
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This is included by init/main.c to check for architecture-dependent bugs.
|
|
||||||
*
|
|
||||||
* Needs:
|
|
||||||
* void check_bugs(void);
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <asm/processor.h>
|
|
||||||
|
|
||||||
static inline void check_bugs(void)
|
|
||||||
{
|
|
||||||
// identify_cpu(&boot_cpu_data);
|
|
||||||
}
|
|
|
@ -181,6 +181,7 @@ config PPC
|
||||||
select HAVE_ARCH_SECCOMP_FILTER
|
select HAVE_ARCH_SECCOMP_FILTER
|
||||||
select HAVE_ARCH_TRACEHOOK
|
select HAVE_ARCH_TRACEHOOK
|
||||||
select HAVE_CBPF_JIT if !PPC64
|
select HAVE_CBPF_JIT if !PPC64
|
||||||
|
select HAVE_STACKPROTECTOR if $(cc-option,-mstack-protector-guard=tls) && PPC32
|
||||||
select HAVE_CONTEXT_TRACKING if PPC64
|
select HAVE_CONTEXT_TRACKING if PPC64
|
||||||
select HAVE_DEBUG_KMEMLEAK
|
select HAVE_DEBUG_KMEMLEAK
|
||||||
select HAVE_DEBUG_STACKOVERFLOW
|
select HAVE_DEBUG_STACKOVERFLOW
|
||||||
|
|
|
@ -232,7 +232,7 @@ config PPC_EARLY_DEBUG_40x
|
||||||
|
|
||||||
config PPC_EARLY_DEBUG_CPM
|
config PPC_EARLY_DEBUG_CPM
|
||||||
bool "Early serial debugging for Freescale CPM-based serial ports"
|
bool "Early serial debugging for Freescale CPM-based serial ports"
|
||||||
depends on SERIAL_CPM
|
depends on SERIAL_CPM=y
|
||||||
help
|
help
|
||||||
Select this to enable early debugging for Freescale chips
|
Select this to enable early debugging for Freescale chips
|
||||||
using a CPM-based serial port. This assumes that the bootwrapper
|
using a CPM-based serial port. This assumes that the bootwrapper
|
||||||
|
@ -368,10 +368,6 @@ config PPC_PTDUMP
|
||||||
|
|
||||||
If you are unsure, say N.
|
If you are unsure, say N.
|
||||||
|
|
||||||
config PPC_HTDUMP
|
|
||||||
def_bool y
|
|
||||||
depends on PPC_PTDUMP && PPC_BOOK3S_64
|
|
||||||
|
|
||||||
config PPC_FAST_ENDIAN_SWITCH
|
config PPC_FAST_ENDIAN_SWITCH
|
||||||
bool "Deprecated fast endian-switch syscall"
|
bool "Deprecated fast endian-switch syscall"
|
||||||
depends on DEBUG_KERNEL && PPC_BOOK3S_64
|
depends on DEBUG_KERNEL && PPC_BOOK3S_64
|
||||||
|
|
|
@ -113,6 +113,9 @@ KBUILD_LDFLAGS += -m elf$(BITS)$(LDEMULATION)
|
||||||
KBUILD_ARFLAGS += --target=elf$(BITS)-$(GNUTARGET)
|
KBUILD_ARFLAGS += --target=elf$(BITS)-$(GNUTARGET)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
cflags-$(CONFIG_STACKPROTECTOR) += -mstack-protector-guard=tls
|
||||||
|
cflags-$(CONFIG_STACKPROTECTOR) += -mstack-protector-guard-reg=r2
|
||||||
|
|
||||||
LDFLAGS_vmlinux-y := -Bstatic
|
LDFLAGS_vmlinux-y := -Bstatic
|
||||||
LDFLAGS_vmlinux-$(CONFIG_RELOCATABLE) := -pie
|
LDFLAGS_vmlinux-$(CONFIG_RELOCATABLE) := -pie
|
||||||
LDFLAGS_vmlinux := $(LDFLAGS_vmlinux-y)
|
LDFLAGS_vmlinux := $(LDFLAGS_vmlinux-y)
|
||||||
|
@ -419,9 +422,12 @@ archclean:
|
||||||
|
|
||||||
archprepare: checkbin
|
archprepare: checkbin
|
||||||
|
|
||||||
# Use the file '.tmp_gas_check' for binutils tests, as gas won't output
|
ifdef CONFIG_STACKPROTECTOR
|
||||||
# to stdout and these checks are run even on install targets.
|
prepare: stack_protector_prepare
|
||||||
TOUT := .tmp_gas_check
|
|
||||||
|
stack_protector_prepare: prepare0
|
||||||
|
$(eval KBUILD_CFLAGS += -mstack-protector-guard-offset=$(shell awk '{if ($$2 == "TASK_CANARY") print $$3;}' include/generated/asm-offsets.h))
|
||||||
|
endif
|
||||||
|
|
||||||
# Check toolchain versions:
|
# Check toolchain versions:
|
||||||
# - gcc-4.6 is the minimum kernel-wide version so nothing required.
|
# - gcc-4.6 is the minimum kernel-wide version so nothing required.
|
||||||
|
@ -433,7 +439,11 @@ checkbin:
|
||||||
echo -n '*** Please use a different binutils version.' ; \
|
echo -n '*** Please use a different binutils version.' ; \
|
||||||
false ; \
|
false ; \
|
||||||
fi
|
fi
|
||||||
|
@if test "x${CONFIG_FTRACE_MCOUNT_USE_RECORDMCOUNT}" = "xy" -a \
|
||||||
|
"x${CONFIG_LD_IS_BFD}" = "xy" -a \
|
||||||
CLEAN_FILES += $(TOUT)
|
"${CONFIG_LD_VERSION}" = "23700" ; then \
|
||||||
|
echo -n '*** binutils 2.37 drops unused section symbols, which recordmcount ' ; \
|
||||||
|
echo 'is unable to handle.' ; \
|
||||||
|
echo '*** Please use a different binutils version.' ; \
|
||||||
|
false ; \
|
||||||
|
fi
|
||||||
|
|
|
@ -34,14 +34,20 @@
|
||||||
#define BAT_PHYS_ADDR(x) ((u32)((x & 0x00000000fffe0000ULL) | \
|
#define BAT_PHYS_ADDR(x) ((u32)((x & 0x00000000fffe0000ULL) | \
|
||||||
((x & 0x0000000e00000000ULL) >> 24) | \
|
((x & 0x0000000e00000000ULL) >> 24) | \
|
||||||
((x & 0x0000000100000000ULL) >> 30)))
|
((x & 0x0000000100000000ULL) >> 30)))
|
||||||
|
#define PHYS_BAT_ADDR(x) (((u64)(x) & 0x00000000fffe0000ULL) | \
|
||||||
|
(((u64)(x) << 24) & 0x0000000e00000000ULL) | \
|
||||||
|
(((u64)(x) << 30) & 0x0000000100000000ULL))
|
||||||
#else
|
#else
|
||||||
#define BAT_PHYS_ADDR(x) (x)
|
#define BAT_PHYS_ADDR(x) (x)
|
||||||
|
#define PHYS_BAT_ADDR(x) ((x) & 0xfffe0000)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct ppc_bat {
|
struct ppc_bat {
|
||||||
u32 batu;
|
u32 batu;
|
||||||
u32 batl;
|
u32 batl;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef struct page *pgtable_t;
|
||||||
#endif /* !__ASSEMBLY__ */
|
#endif /* !__ASSEMBLY__ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
#ifndef _ASM_POWERPC_BOOK3S_64_MMU_H_
|
#ifndef _ASM_POWERPC_BOOK3S_64_MMU_H_
|
||||||
#define _ASM_POWERPC_BOOK3S_64_MMU_H_
|
#define _ASM_POWERPC_BOOK3S_64_MMU_H_
|
||||||
|
|
||||||
|
#include <asm/page.h>
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
/*
|
/*
|
||||||
* Page size definition
|
* Page size definition
|
||||||
|
@ -24,6 +26,13 @@ struct mmu_psize_def {
|
||||||
};
|
};
|
||||||
extern struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT];
|
extern struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT];
|
||||||
|
|
||||||
|
/*
|
||||||
|
* For BOOK3s 64 with 4k and 64K linux page size
|
||||||
|
* we want to use pointers, because the page table
|
||||||
|
* actually store pfn
|
||||||
|
*/
|
||||||
|
typedef pte_t *pgtable_t;
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|
||||||
/* 64-bit classic hash table MMU */
|
/* 64-bit classic hash table MMU */
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
#ifndef _ASM_POWERPC_BUGS_H
|
|
||||||
#define _ASM_POWERPC_BUGS_H
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version
|
|
||||||
* 2 of the License, or (at your option) any later version.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This file is included by 'init/main.c' to check for
|
|
||||||
* architecture-dependent bugs.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static inline void check_bugs(void) { }
|
|
||||||
|
|
||||||
#endif /* _ASM_POWERPC_BUGS_H */
|
|
|
@ -326,18 +326,8 @@ static inline void mmu_early_init_devtree(void) { }
|
||||||
#if defined(CONFIG_PPC_STD_MMU_32)
|
#if defined(CONFIG_PPC_STD_MMU_32)
|
||||||
/* 32-bit classic hash table MMU */
|
/* 32-bit classic hash table MMU */
|
||||||
#include <asm/book3s/32/mmu-hash.h>
|
#include <asm/book3s/32/mmu-hash.h>
|
||||||
#elif defined(CONFIG_40x)
|
#elif defined(CONFIG_PPC_MMU_NOHASH)
|
||||||
/* 40x-style software loaded TLB */
|
#include <asm/nohash/mmu.h>
|
||||||
# include <asm/mmu-40x.h>
|
|
||||||
#elif defined(CONFIG_44x)
|
|
||||||
/* 44x-style software loaded TLB */
|
|
||||||
# include <asm/mmu-44x.h>
|
|
||||||
#elif defined(CONFIG_PPC_BOOK3E_MMU)
|
|
||||||
/* Freescale Book-E software loaded TLB or Book-3e (ISA 2.06+) MMU */
|
|
||||||
# include <asm/mmu-book3e.h>
|
|
||||||
#elif defined (CONFIG_PPC_8xx)
|
|
||||||
/* Motorola/Freescale 8xx software loaded TLB */
|
|
||||||
# include <asm/mmu-8xx.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __KERNEL__ */
|
#endif /* __KERNEL__ */
|
||||||
|
|
23
arch/powerpc/include/asm/nohash/32/mmu.h
Normal file
23
arch/powerpc/include/asm/nohash/32/mmu.h
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0 */
|
||||||
|
#ifndef _ASM_POWERPC_NOHASH_32_MMU_H_
|
||||||
|
#define _ASM_POWERPC_NOHASH_32_MMU_H_
|
||||||
|
|
||||||
|
#if defined(CONFIG_40x)
|
||||||
|
/* 40x-style software loaded TLB */
|
||||||
|
#include <asm/nohash/32/mmu-40x.h>
|
||||||
|
#elif defined(CONFIG_44x)
|
||||||
|
/* 44x-style software loaded TLB */
|
||||||
|
#include <asm/nohash/32/mmu-44x.h>
|
||||||
|
#elif defined(CONFIG_PPC_BOOK3E_MMU)
|
||||||
|
/* Freescale Book-E software loaded TLB or Book-3e (ISA 2.06+) MMU */
|
||||||
|
#include <asm/nohash/mmu-book3e.h>
|
||||||
|
#elif defined (CONFIG_PPC_8xx)
|
||||||
|
/* Motorola/Freescale 8xx software loaded TLB */
|
||||||
|
#include <asm/nohash/32/mmu-8xx.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ASSEMBLY__
|
||||||
|
typedef struct page *pgtable_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* _ASM_POWERPC_NOHASH_32_MMU_H_ */
|
12
arch/powerpc/include/asm/nohash/64/mmu.h
Normal file
12
arch/powerpc/include/asm/nohash/64/mmu.h
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0 */
|
||||||
|
#ifndef _ASM_POWERPC_NOHASH_64_MMU_H_
|
||||||
|
#define _ASM_POWERPC_NOHASH_64_MMU_H_
|
||||||
|
|
||||||
|
/* Freescale Book-E software loaded TLB or Book-3e (ISA 2.06+) MMU */
|
||||||
|
#include <asm/nohash/mmu-book3e.h>
|
||||||
|
|
||||||
|
#ifndef __ASSEMBLY__
|
||||||
|
typedef struct page *pgtable_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* _ASM_POWERPC_NOHASH_64_MMU_H_ */
|
11
arch/powerpc/include/asm/nohash/mmu.h
Normal file
11
arch/powerpc/include/asm/nohash/mmu.h
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0 */
|
||||||
|
#ifndef _ASM_POWERPC_NOHASH_MMU_H_
|
||||||
|
#define _ASM_POWERPC_NOHASH_MMU_H_
|
||||||
|
|
||||||
|
#ifdef CONFIG_PPC64
|
||||||
|
#include <asm/nohash/64/mmu.h>
|
||||||
|
#else
|
||||||
|
#include <asm/nohash/32/mmu.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* _ASM_POWERPC_NOHASH_MMU_H_ */
|
|
@ -335,20 +335,6 @@ void arch_free_page(struct page *page, int order);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct vm_area_struct;
|
struct vm_area_struct;
|
||||||
#ifdef CONFIG_PPC_BOOK3S_64
|
|
||||||
/*
|
|
||||||
* For BOOK3s 64 with 4k and 64K linux page size
|
|
||||||
* we want to use pointers, because the page table
|
|
||||||
* actually store pfn
|
|
||||||
*/
|
|
||||||
typedef pte_t *pgtable_t;
|
|
||||||
#else
|
|
||||||
#if defined(CONFIG_PPC_64K_PAGES) && defined(CONFIG_PPC64)
|
|
||||||
typedef pte_t *pgtable_t;
|
|
||||||
#else
|
|
||||||
typedef struct page *pgtable_t;
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <asm-generic/memory_model.h>
|
#include <asm-generic/memory_model.h>
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|
34
arch/powerpc/include/asm/stackprotector.h
Normal file
34
arch/powerpc/include/asm/stackprotector.h
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0 */
|
||||||
|
/*
|
||||||
|
* GCC stack protector support.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _ASM_STACKPROTECTOR_H
|
||||||
|
#define _ASM_STACKPROTECTOR_H
|
||||||
|
|
||||||
|
#include <linux/random.h>
|
||||||
|
#include <linux/version.h>
|
||||||
|
#include <asm/reg.h>
|
||||||
|
#include <asm/current.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialize the stackprotector canary value.
|
||||||
|
*
|
||||||
|
* NOTE: this must only be called from functions that never return,
|
||||||
|
* and it must always be inlined.
|
||||||
|
*/
|
||||||
|
static __always_inline void boot_init_stack_canary(void)
|
||||||
|
{
|
||||||
|
unsigned long canary;
|
||||||
|
|
||||||
|
/* Try to get a semi random initial value. */
|
||||||
|
canary = get_random_canary();
|
||||||
|
canary ^= mftb();
|
||||||
|
canary ^= LINUX_VERSION_CODE;
|
||||||
|
canary &= CANARY_MASK;
|
||||||
|
|
||||||
|
current->stack_canary = canary;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* _ASM_STACKPROTECTOR_H */
|
|
@ -34,7 +34,7 @@ static inline long find_zero(unsigned long mask)
|
||||||
return leading_zero_bits >> 3;
|
return leading_zero_bits >> 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool has_zero(unsigned long val, unsigned long *data, const struct word_at_a_time *c)
|
static inline unsigned long has_zero(unsigned long val, unsigned long *data, const struct word_at_a_time *c)
|
||||||
{
|
{
|
||||||
unsigned long rhs = val | c->low_bits;
|
unsigned long rhs = val | c->low_bits;
|
||||||
*data = rhs;
|
*data = rhs;
|
||||||
|
|
|
@ -21,6 +21,8 @@ CFLAGS_prom_init.o += $(DISABLE_LATENT_ENTROPY_PLUGIN)
|
||||||
CFLAGS_btext.o += $(DISABLE_LATENT_ENTROPY_PLUGIN)
|
CFLAGS_btext.o += $(DISABLE_LATENT_ENTROPY_PLUGIN)
|
||||||
CFLAGS_prom.o += $(DISABLE_LATENT_ENTROPY_PLUGIN)
|
CFLAGS_prom.o += $(DISABLE_LATENT_ENTROPY_PLUGIN)
|
||||||
|
|
||||||
|
CFLAGS_prom_init.o += $(call cc-option, -fno-stack-protector)
|
||||||
|
|
||||||
ifdef CONFIG_FUNCTION_TRACER
|
ifdef CONFIG_FUNCTION_TRACER
|
||||||
# Do not trace early boot code
|
# Do not trace early boot code
|
||||||
CFLAGS_REMOVE_cputable.o = $(CC_FLAGS_FTRACE)
|
CFLAGS_REMOVE_cputable.o = $(CC_FLAGS_FTRACE)
|
||||||
|
|
|
@ -79,6 +79,9 @@ int main(void)
|
||||||
{
|
{
|
||||||
OFFSET(THREAD, task_struct, thread);
|
OFFSET(THREAD, task_struct, thread);
|
||||||
OFFSET(MM, task_struct, mm);
|
OFFSET(MM, task_struct, mm);
|
||||||
|
#ifdef CONFIG_STACKPROTECTOR
|
||||||
|
OFFSET(TASK_CANARY, task_struct, stack_canary);
|
||||||
|
#endif
|
||||||
OFFSET(MMCONTEXTID, mm_struct, context.id);
|
OFFSET(MMCONTEXTID, mm_struct, context.id);
|
||||||
#ifdef CONFIG_PPC64
|
#ifdef CONFIG_PPC64
|
||||||
DEFINE(SIGSEGV, SIGSEGV);
|
DEFINE(SIGSEGV, SIGSEGV);
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include <asm/processor.h>
|
#include <asm/processor.h>
|
||||||
#include <asm/cputable.h>
|
#include <asm/cputable.h>
|
||||||
#include <asm/ppc_asm.h>
|
#include <asm/ppc_asm.h>
|
||||||
#include <asm/mmu-book3e.h>
|
#include <asm/nohash/mmu-book3e.h>
|
||||||
#include <asm/asm-offsets.h>
|
#include <asm/asm-offsets.h>
|
||||||
#include <asm/mpc85xx.h>
|
#include <asm/mpc85xx.h>
|
||||||
|
|
||||||
|
|
|
@ -714,9 +714,9 @@ static int __init rtas_flash_init(void)
|
||||||
if (!rtas_validate_flash_data.buf)
|
if (!rtas_validate_flash_data.buf)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
flash_block_cache = kmem_cache_create("rtas_flash_cache",
|
flash_block_cache = kmem_cache_create_usercopy("rtas_flash_cache",
|
||||||
RTAS_BLK_SIZE, RTAS_BLK_SIZE, 0,
|
RTAS_BLK_SIZE, RTAS_BLK_SIZE,
|
||||||
NULL);
|
0, 0, RTAS_BLK_SIZE, NULL);
|
||||||
if (!flash_block_cache) {
|
if (!flash_block_cache) {
|
||||||
printk(KERN_ERR "%s: failed to create block cache\n",
|
printk(KERN_ERR "%s: failed to create block cache\n",
|
||||||
__func__);
|
__func__);
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#define KVM_E500_H
|
#define KVM_E500_H
|
||||||
|
|
||||||
#include <linux/kvm_host.h>
|
#include <linux/kvm_host.h>
|
||||||
#include <asm/mmu-book3e.h>
|
#include <asm/nohash/mmu-book3e.h>
|
||||||
#include <asm/tlb.h>
|
#include <asm/tlb.h>
|
||||||
#include <asm/cputhreads.h>
|
#include <asm/cputhreads.h>
|
||||||
|
|
||||||
|
|
|
@ -42,13 +42,5 @@ obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-noncoherent.o
|
||||||
obj-$(CONFIG_HIGHMEM) += highmem.o
|
obj-$(CONFIG_HIGHMEM) += highmem.o
|
||||||
obj-$(CONFIG_PPC_COPRO_BASE) += copro_fault.o
|
obj-$(CONFIG_PPC_COPRO_BASE) += copro_fault.o
|
||||||
obj-$(CONFIG_SPAPR_TCE_IOMMU) += mmu_context_iommu.o
|
obj-$(CONFIG_SPAPR_TCE_IOMMU) += mmu_context_iommu.o
|
||||||
obj-$(CONFIG_PPC_PTDUMP) += dump_linuxpagetables.o
|
obj-$(CONFIG_PPC_PTDUMP) += ptdump/
|
||||||
ifdef CONFIG_PPC_PTDUMP
|
|
||||||
obj-$(CONFIG_4xx) += dump_linuxpagetables-generic.o
|
|
||||||
obj-$(CONFIG_PPC_8xx) += dump_linuxpagetables-8xx.o
|
|
||||||
obj-$(CONFIG_PPC_BOOK3E_MMU) += dump_linuxpagetables-generic.o
|
|
||||||
obj-$(CONFIG_PPC_BOOK3S_32) += dump_linuxpagetables-generic.o
|
|
||||||
obj-$(CONFIG_PPC_BOOK3S_64) += dump_linuxpagetables-book3s64.o
|
|
||||||
endif
|
|
||||||
obj-$(CONFIG_PPC_HTDUMP) += dump_hashpagetable.o
|
|
||||||
obj-$(CONFIG_PPC_MEM_KEYS) += pkeys.o
|
obj-$(CONFIG_PPC_MEM_KEYS) += pkeys.o
|
||||||
|
|
|
@ -266,8 +266,7 @@ void __ref vmemmap_free(unsigned long start, unsigned long end,
|
||||||
start = _ALIGN_DOWN(start, page_size);
|
start = _ALIGN_DOWN(start, page_size);
|
||||||
if (altmap) {
|
if (altmap) {
|
||||||
alt_start = altmap->base_pfn;
|
alt_start = altmap->base_pfn;
|
||||||
alt_end = altmap->base_pfn + altmap->reserve +
|
alt_end = altmap->base_pfn + altmap->reserve + altmap->free;
|
||||||
altmap->free + altmap->alloc + altmap->align;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pr_debug("vmemmap_free %lx...%lx\n", start, end);
|
pr_debug("vmemmap_free %lx...%lx\n", start, end);
|
||||||
|
|
|
@ -1041,8 +1041,8 @@ void radix__ptep_set_access_flags(struct vm_area_struct *vma, pte_t *ptep,
|
||||||
pte_t entry, unsigned long address, int psize)
|
pte_t entry, unsigned long address, int psize)
|
||||||
{
|
{
|
||||||
struct mm_struct *mm = vma->vm_mm;
|
struct mm_struct *mm = vma->vm_mm;
|
||||||
unsigned long set = pte_val(entry) & (_PAGE_DIRTY | _PAGE_ACCESSED |
|
unsigned long set = pte_val(entry) & (_PAGE_DIRTY | _PAGE_SOFT_DIRTY |
|
||||||
_PAGE_RW | _PAGE_EXEC);
|
_PAGE_ACCESSED | _PAGE_RW | _PAGE_EXEC);
|
||||||
|
|
||||||
unsigned long change = pte_val(entry) ^ pte_val(*ptep);
|
unsigned long change = pte_val(entry) ^ pte_val(*ptep);
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <asm/pgtable.h>
|
#include <asm/pgtable.h>
|
||||||
|
|
||||||
#include "dump_linuxpagetables.h"
|
#include "ptdump.h"
|
||||||
|
|
||||||
static const struct flag_info flag_array[] = {
|
static const struct flag_info flag_array[] = {
|
||||||
{
|
{
|
9
arch/powerpc/mm/ptdump/Makefile
Normal file
9
arch/powerpc/mm/ptdump/Makefile
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
obj-y += ptdump.o
|
||||||
|
|
||||||
|
obj-$(CONFIG_4xx) += shared.o
|
||||||
|
obj-$(CONFIG_PPC_8xx) += 8xx.o
|
||||||
|
obj-$(CONFIG_PPC_BOOK3E_MMU) += shared.o
|
||||||
|
obj-$(CONFIG_PPC_BOOK3S_32) += shared.o bats.o segment_regs.o
|
||||||
|
obj-$(CONFIG_PPC_BOOK3S_64) += book3s64.o hashpagetable.o
|
173
arch/powerpc/mm/ptdump/bats.c
Normal file
173
arch/powerpc/mm/ptdump/bats.c
Normal file
|
@ -0,0 +1,173 @@
|
||||||
|
// SPDX-License-Identifier: GPL-2.0+
|
||||||
|
/*
|
||||||
|
* Copyright 2018, Christophe Leroy CS S.I.
|
||||||
|
* <christophe.leroy@c-s.fr>
|
||||||
|
*
|
||||||
|
* This dumps the content of BATS
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <asm/debugfs.h>
|
||||||
|
#include <asm/pgtable.h>
|
||||||
|
#include <asm/cpu_has_feature.h>
|
||||||
|
|
||||||
|
static char *pp_601(int k, int pp)
|
||||||
|
{
|
||||||
|
if (pp == 0)
|
||||||
|
return k ? "NA" : "RWX";
|
||||||
|
if (pp == 1)
|
||||||
|
return k ? "ROX" : "RWX";
|
||||||
|
if (pp == 2)
|
||||||
|
return k ? "RWX" : "RWX";
|
||||||
|
return k ? "ROX" : "ROX";
|
||||||
|
}
|
||||||
|
|
||||||
|
static void bat_show_601(struct seq_file *m, int idx, u32 lower, u32 upper)
|
||||||
|
{
|
||||||
|
u32 blpi = upper & 0xfffe0000;
|
||||||
|
u32 k = (upper >> 2) & 3;
|
||||||
|
u32 pp = upper & 3;
|
||||||
|
phys_addr_t pbn = PHYS_BAT_ADDR(lower);
|
||||||
|
u32 bsm = lower & 0x3ff;
|
||||||
|
u32 size = (bsm + 1) << 17;
|
||||||
|
|
||||||
|
seq_printf(m, "%d: ", idx);
|
||||||
|
if (!(lower & 0x40)) {
|
||||||
|
seq_puts(m, " -\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
seq_printf(m, "0x%08x-0x%08x ", blpi, blpi + size - 1);
|
||||||
|
#ifdef CONFIG_PHYS_64BIT
|
||||||
|
seq_printf(m, "0x%016llx ", pbn);
|
||||||
|
#else
|
||||||
|
seq_printf(m, "0x%08x ", pbn);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
seq_printf(m, "Kernel %s User %s", pp_601(k & 2, pp), pp_601(k & 1, pp));
|
||||||
|
|
||||||
|
if (lower & _PAGE_WRITETHRU)
|
||||||
|
seq_puts(m, "write through ");
|
||||||
|
if (lower & _PAGE_NO_CACHE)
|
||||||
|
seq_puts(m, "no cache ");
|
||||||
|
if (lower & _PAGE_COHERENT)
|
||||||
|
seq_puts(m, "coherent ");
|
||||||
|
seq_puts(m, "\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
#define BAT_SHOW_601(_m, _n, _l, _u) bat_show_601(_m, _n, mfspr(_l), mfspr(_u))
|
||||||
|
|
||||||
|
static int bats_show_601(struct seq_file *m, void *v)
|
||||||
|
{
|
||||||
|
seq_puts(m, "---[ Block Address Translation ]---\n");
|
||||||
|
|
||||||
|
BAT_SHOW_601(m, 0, SPRN_IBAT0L, SPRN_IBAT0U);
|
||||||
|
BAT_SHOW_601(m, 1, SPRN_IBAT1L, SPRN_IBAT1U);
|
||||||
|
BAT_SHOW_601(m, 2, SPRN_IBAT2L, SPRN_IBAT2U);
|
||||||
|
BAT_SHOW_601(m, 3, SPRN_IBAT3L, SPRN_IBAT3U);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void bat_show_603(struct seq_file *m, int idx, u32 lower, u32 upper, bool is_d)
|
||||||
|
{
|
||||||
|
u32 bepi = upper & 0xfffe0000;
|
||||||
|
u32 bl = (upper >> 2) & 0x7ff;
|
||||||
|
u32 k = upper & 3;
|
||||||
|
phys_addr_t brpn = PHYS_BAT_ADDR(lower);
|
||||||
|
u32 size = (bl + 1) << 17;
|
||||||
|
|
||||||
|
seq_printf(m, "%d: ", idx);
|
||||||
|
if (k == 0) {
|
||||||
|
seq_puts(m, " -\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
seq_printf(m, "0x%08x-0x%08x ", bepi, bepi + size - 1);
|
||||||
|
#ifdef CONFIG_PHYS_64BIT
|
||||||
|
seq_printf(m, "0x%016llx ", brpn);
|
||||||
|
#else
|
||||||
|
seq_printf(m, "0x%08x ", brpn);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (k == 1)
|
||||||
|
seq_puts(m, "User ");
|
||||||
|
else if (k == 2)
|
||||||
|
seq_puts(m, "Kernel ");
|
||||||
|
else
|
||||||
|
seq_puts(m, "Kernel/User ");
|
||||||
|
|
||||||
|
if (lower & BPP_RX)
|
||||||
|
seq_puts(m, is_d ? "RO " : "EXEC ");
|
||||||
|
else if (lower & BPP_RW)
|
||||||
|
seq_puts(m, is_d ? "RW " : "EXEC ");
|
||||||
|
else
|
||||||
|
seq_puts(m, is_d ? "NA " : "NX ");
|
||||||
|
|
||||||
|
if (lower & _PAGE_WRITETHRU)
|
||||||
|
seq_puts(m, "write through ");
|
||||||
|
if (lower & _PAGE_NO_CACHE)
|
||||||
|
seq_puts(m, "no cache ");
|
||||||
|
if (lower & _PAGE_COHERENT)
|
||||||
|
seq_puts(m, "coherent ");
|
||||||
|
if (lower & _PAGE_GUARDED)
|
||||||
|
seq_puts(m, "guarded ");
|
||||||
|
seq_puts(m, "\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
#define BAT_SHOW_603(_m, _n, _l, _u, _d) bat_show_603(_m, _n, mfspr(_l), mfspr(_u), _d)
|
||||||
|
|
||||||
|
static int bats_show_603(struct seq_file *m, void *v)
|
||||||
|
{
|
||||||
|
seq_puts(m, "---[ Instruction Block Address Translation ]---\n");
|
||||||
|
|
||||||
|
BAT_SHOW_603(m, 0, SPRN_IBAT0L, SPRN_IBAT0U, false);
|
||||||
|
BAT_SHOW_603(m, 1, SPRN_IBAT1L, SPRN_IBAT1U, false);
|
||||||
|
BAT_SHOW_603(m, 2, SPRN_IBAT2L, SPRN_IBAT2U, false);
|
||||||
|
BAT_SHOW_603(m, 3, SPRN_IBAT3L, SPRN_IBAT3U, false);
|
||||||
|
if (mmu_has_feature(MMU_FTR_USE_HIGH_BATS)) {
|
||||||
|
BAT_SHOW_603(m, 4, SPRN_IBAT4L, SPRN_IBAT4U, false);
|
||||||
|
BAT_SHOW_603(m, 5, SPRN_IBAT5L, SPRN_IBAT5U, false);
|
||||||
|
BAT_SHOW_603(m, 6, SPRN_IBAT6L, SPRN_IBAT6U, false);
|
||||||
|
BAT_SHOW_603(m, 7, SPRN_IBAT7L, SPRN_IBAT7U, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
seq_puts(m, "\n---[ Data Block Address Translation ]---\n");
|
||||||
|
|
||||||
|
BAT_SHOW_603(m, 0, SPRN_DBAT0L, SPRN_DBAT0U, true);
|
||||||
|
BAT_SHOW_603(m, 1, SPRN_DBAT1L, SPRN_DBAT1U, true);
|
||||||
|
BAT_SHOW_603(m, 2, SPRN_DBAT2L, SPRN_DBAT2U, true);
|
||||||
|
BAT_SHOW_603(m, 3, SPRN_DBAT3L, SPRN_DBAT3U, true);
|
||||||
|
if (mmu_has_feature(MMU_FTR_USE_HIGH_BATS)) {
|
||||||
|
BAT_SHOW_603(m, 4, SPRN_DBAT4L, SPRN_DBAT4U, true);
|
||||||
|
BAT_SHOW_603(m, 5, SPRN_DBAT5L, SPRN_DBAT5U, true);
|
||||||
|
BAT_SHOW_603(m, 6, SPRN_DBAT6L, SPRN_DBAT6U, true);
|
||||||
|
BAT_SHOW_603(m, 7, SPRN_DBAT7L, SPRN_DBAT7U, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int bats_open(struct inode *inode, struct file *file)
|
||||||
|
{
|
||||||
|
if (cpu_has_feature(CPU_FTR_601))
|
||||||
|
return single_open(file, bats_show_601, NULL);
|
||||||
|
|
||||||
|
return single_open(file, bats_show_603, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct file_operations bats_fops = {
|
||||||
|
.open = bats_open,
|
||||||
|
.read = seq_read,
|
||||||
|
.llseek = seq_lseek,
|
||||||
|
.release = single_release,
|
||||||
|
};
|
||||||
|
|
||||||
|
static int __init bats_init(void)
|
||||||
|
{
|
||||||
|
struct dentry *debugfs_file;
|
||||||
|
|
||||||
|
debugfs_file = debugfs_create_file("block_address_translation", 0400,
|
||||||
|
powerpc_debugfs_root, NULL, &bats_fops);
|
||||||
|
return debugfs_file ? 0 : -ENOMEM;
|
||||||
|
}
|
||||||
|
device_initcall(bats_init);
|
|
@ -7,7 +7,7 @@
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <asm/pgtable.h>
|
#include <asm/pgtable.h>
|
||||||
|
|
||||||
#include "dump_linuxpagetables.h"
|
#include "ptdump.h"
|
||||||
|
|
||||||
static const struct flag_info flag_array[] = {
|
static const struct flag_info flag_array[] = {
|
||||||
{
|
{
|
|
@ -28,7 +28,7 @@
|
||||||
#include <asm/page.h>
|
#include <asm/page.h>
|
||||||
#include <asm/pgalloc.h>
|
#include <asm/pgalloc.h>
|
||||||
|
|
||||||
#include "dump_linuxpagetables.h"
|
#include "ptdump.h"
|
||||||
|
|
||||||
#ifdef CONFIG_PPC32
|
#ifdef CONFIG_PPC32
|
||||||
#define KERN_VIRT_START 0
|
#define KERN_VIRT_START 0
|
64
arch/powerpc/mm/ptdump/segment_regs.c
Normal file
64
arch/powerpc/mm/ptdump/segment_regs.c
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
// SPDX-License-Identifier: GPL-2.0+
|
||||||
|
/*
|
||||||
|
* Copyright 2018, Christophe Leroy CS S.I.
|
||||||
|
* <christophe.leroy@c-s.fr>
|
||||||
|
*
|
||||||
|
* This dumps the content of Segment Registers
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <asm/debugfs.h>
|
||||||
|
|
||||||
|
static void seg_show(struct seq_file *m, int i)
|
||||||
|
{
|
||||||
|
u32 val = mfsrin(i << 28);
|
||||||
|
|
||||||
|
seq_printf(m, "0x%01x0000000-0x%01xfffffff ", i, i);
|
||||||
|
seq_printf(m, "Kern key %d ", (val >> 30) & 1);
|
||||||
|
seq_printf(m, "User key %d ", (val >> 29) & 1);
|
||||||
|
if (val & 0x80000000) {
|
||||||
|
seq_printf(m, "Device 0x%03x", (val >> 20) & 0x1ff);
|
||||||
|
seq_printf(m, "-0x%05x", val & 0xfffff);
|
||||||
|
} else {
|
||||||
|
if (val & 0x10000000)
|
||||||
|
seq_puts(m, "No Exec ");
|
||||||
|
seq_printf(m, "VSID 0x%06x", val & 0xffffff);
|
||||||
|
}
|
||||||
|
seq_puts(m, "\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
static int sr_show(struct seq_file *m, void *v)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
seq_puts(m, "---[ User Segments ]---\n");
|
||||||
|
for (i = 0; i < TASK_SIZE >> 28; i++)
|
||||||
|
seg_show(m, i);
|
||||||
|
|
||||||
|
seq_puts(m, "\n---[ Kernel Segments ]---\n");
|
||||||
|
for (; i < 16; i++)
|
||||||
|
seg_show(m, i);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int sr_open(struct inode *inode, struct file *file)
|
||||||
|
{
|
||||||
|
return single_open(file, sr_show, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct file_operations sr_fops = {
|
||||||
|
.open = sr_open,
|
||||||
|
.read = seq_read,
|
||||||
|
.llseek = seq_lseek,
|
||||||
|
.release = single_release,
|
||||||
|
};
|
||||||
|
|
||||||
|
static int __init sr_init(void)
|
||||||
|
{
|
||||||
|
struct dentry *debugfs_file;
|
||||||
|
|
||||||
|
debugfs_file = debugfs_create_file("segment_registers", 0400,
|
||||||
|
powerpc_debugfs_root, NULL, &sr_fops);
|
||||||
|
return debugfs_file ? 0 : -ENOMEM;
|
||||||
|
}
|
||||||
|
device_initcall(sr_init);
|
|
@ -7,7 +7,7 @@
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <asm/pgtable.h>
|
#include <asm/pgtable.h>
|
||||||
|
|
||||||
#include "dump_linuxpagetables.h"
|
#include "ptdump.h"
|
||||||
|
|
||||||
static const struct flag_info flag_array[] = {
|
static const struct flag_info flag_array[] = {
|
||||||
{
|
{
|
|
@ -340,7 +340,7 @@ static int mpc52xx_irqhost_map(struct irq_domain *h, unsigned int virq,
|
||||||
{
|
{
|
||||||
int l1irq;
|
int l1irq;
|
||||||
int l2irq;
|
int l2irq;
|
||||||
struct irq_chip *uninitialized_var(irqchip);
|
struct irq_chip *irqchip;
|
||||||
void *hndlr;
|
void *hndlr;
|
||||||
int type;
|
int type;
|
||||||
u32 reg;
|
u32 reg;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
CFLAGS_bootx_init.o += -fPIC
|
CFLAGS_bootx_init.o += -fPIC
|
||||||
|
CFLAGS_bootx_init.o += $(call cc-option, -fno-stack-protector)
|
||||||
|
|
||||||
ifdef CONFIG_FUNCTION_TRACER
|
ifdef CONFIG_FUNCTION_TRACER
|
||||||
# Do not trace early boot code
|
# Do not trace early boot code
|
||||||
|
|
|
@ -145,7 +145,7 @@ static int pcpu_sigp_retry(struct pcpu *pcpu, u8 order, u32 parm)
|
||||||
|
|
||||||
static inline int pcpu_stopped(struct pcpu *pcpu)
|
static inline int pcpu_stopped(struct pcpu *pcpu)
|
||||||
{
|
{
|
||||||
u32 uninitialized_var(status);
|
u32 status;
|
||||||
|
|
||||||
if (__pcpu_sigp(pcpu->address, SIGP_SENSE,
|
if (__pcpu_sigp(pcpu->address, SIGP_SENSE,
|
||||||
0, &status) != SIGP_CC_STATUS_STORED)
|
0, &status) != SIGP_CC_STATUS_STORED)
|
||||||
|
|
|
@ -460,9 +460,9 @@ static int sthyi_update_cache(u64 *rc)
|
||||||
*
|
*
|
||||||
* Fills the destination with system information returned by the STHYI
|
* Fills the destination with system information returned by the STHYI
|
||||||
* instruction. The data is generated by emulation or execution of STHYI,
|
* instruction. The data is generated by emulation or execution of STHYI,
|
||||||
* if available. The return value is the condition code that would be
|
* if available. The return value is either a negative error value or
|
||||||
* returned, the rc parameter is the return code which is passed in
|
* the condition code that would be returned, the rc parameter is the
|
||||||
* register R2 + 1.
|
* return code which is passed in register R2 + 1.
|
||||||
*/
|
*/
|
||||||
int sthyi_fill(void *dst, u64 *rc)
|
int sthyi_fill(void *dst, u64 *rc)
|
||||||
{
|
{
|
||||||
|
|
|
@ -360,8 +360,8 @@ static int handle_partial_execution(struct kvm_vcpu *vcpu)
|
||||||
*/
|
*/
|
||||||
int handle_sthyi(struct kvm_vcpu *vcpu)
|
int handle_sthyi(struct kvm_vcpu *vcpu)
|
||||||
{
|
{
|
||||||
int reg1, reg2, r = 0;
|
int reg1, reg2, cc = 0, r = 0;
|
||||||
u64 code, addr, cc = 0, rc = 0;
|
u64 code, addr, rc = 0;
|
||||||
struct sthyi_sctns *sctns = NULL;
|
struct sthyi_sctns *sctns = NULL;
|
||||||
|
|
||||||
if (!test_kvm_facility(vcpu->kvm, 74))
|
if (!test_kvm_facility(vcpu->kvm, 74))
|
||||||
|
@ -392,7 +392,10 @@ int handle_sthyi(struct kvm_vcpu *vcpu)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
cc = sthyi_fill(sctns, &rc);
|
cc = sthyi_fill(sctns, &rc);
|
||||||
|
if (cc < 0) {
|
||||||
|
free_page((unsigned long)sctns);
|
||||||
|
return cc;
|
||||||
|
}
|
||||||
out:
|
out:
|
||||||
if (!cc) {
|
if (!cc) {
|
||||||
r = write_guest(vcpu, addr, reg2, sctns, PAGE_SIZE);
|
r = write_guest(vcpu, addr, reg2, sctns, PAGE_SIZE);
|
||||||
|
|
|
@ -1716,6 +1716,10 @@ static unsigned long kvm_s390_next_dirty_cmma(struct kvm_memslots *slots,
|
||||||
ms = slots->memslots + slotidx;
|
ms = slots->memslots + slotidx;
|
||||||
ofs = 0;
|
ofs = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cur_gfn < ms->base_gfn)
|
||||||
|
ofs = 0;
|
||||||
|
|
||||||
ofs = find_next_bit(kvm_second_dirty_bitmap(ms), ms->npages, ofs);
|
ofs = find_next_bit(kvm_second_dirty_bitmap(ms), ms->npages, ofs);
|
||||||
while ((slotidx > 0) && (ofs >= ms->npages)) {
|
while ((slotidx > 0) && (ofs >= ms->npages)) {
|
||||||
slotidx--;
|
slotidx--;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
config SUPERH
|
config SUPERH
|
||||||
def_bool y
|
def_bool y
|
||||||
|
select ARCH_HAS_CPU_FINALIZE_INIT
|
||||||
select ARCH_HAS_PTE_SPECIAL
|
select ARCH_HAS_PTE_SPECIAL
|
||||||
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
|
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
|
||||||
select ARCH_MIGHT_HAVE_PC_PARPORT
|
select ARCH_MIGHT_HAVE_PC_PARPORT
|
||||||
|
|
|
@ -21,6 +21,18 @@
|
||||||
#include <cpu/dma-register.h>
|
#include <cpu/dma-register.h>
|
||||||
#include <cpu/dma.h>
|
#include <cpu/dma.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Some of the SoCs feature two DMAC modules. In such a case, the channels are
|
||||||
|
* distributed equally among them.
|
||||||
|
*/
|
||||||
|
#ifdef SH_DMAC_BASE1
|
||||||
|
#define SH_DMAC_NR_MD_CH (CONFIG_NR_ONCHIP_DMA_CHANNELS / 2)
|
||||||
|
#else
|
||||||
|
#define SH_DMAC_NR_MD_CH CONFIG_NR_ONCHIP_DMA_CHANNELS
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define SH_DMAC_CH_SZ 0x10
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Define the default configuration for dual address memory-memory transfer.
|
* Define the default configuration for dual address memory-memory transfer.
|
||||||
* The 0x400 value represents auto-request, external->external.
|
* The 0x400 value represents auto-request, external->external.
|
||||||
|
@ -32,7 +44,7 @@ static unsigned long dma_find_base(unsigned int chan)
|
||||||
unsigned long base = SH_DMAC_BASE0;
|
unsigned long base = SH_DMAC_BASE0;
|
||||||
|
|
||||||
#ifdef SH_DMAC_BASE1
|
#ifdef SH_DMAC_BASE1
|
||||||
if (chan >= 6)
|
if (chan >= SH_DMAC_NR_MD_CH)
|
||||||
base = SH_DMAC_BASE1;
|
base = SH_DMAC_BASE1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -43,13 +55,13 @@ static unsigned long dma_base_addr(unsigned int chan)
|
||||||
{
|
{
|
||||||
unsigned long base = dma_find_base(chan);
|
unsigned long base = dma_find_base(chan);
|
||||||
|
|
||||||
/* Normalize offset calculation */
|
chan = (chan % SH_DMAC_NR_MD_CH) * SH_DMAC_CH_SZ;
|
||||||
if (chan >= 9)
|
|
||||||
chan -= 6;
|
|
||||||
if (chan >= 4)
|
|
||||||
base += 0x10;
|
|
||||||
|
|
||||||
return base + (chan * 0x10);
|
/* DMAOR is placed inside the channel register space. Step over it. */
|
||||||
|
if (chan >= DMAOR)
|
||||||
|
base += SH_DMAC_CH_SZ;
|
||||||
|
|
||||||
|
return base + chan;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_SH_DMA_IRQ_MULTI
|
#ifdef CONFIG_SH_DMA_IRQ_MULTI
|
||||||
|
@ -253,12 +265,11 @@ static int sh_dmac_get_dma_residue(struct dma_channel *chan)
|
||||||
#define NR_DMAOR 1
|
#define NR_DMAOR 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
#define dmaor_read_reg(n) __raw_readw(dma_find_base((n) * \
|
||||||
* DMAOR bases are broken out amongst channel groups. DMAOR0 manages
|
SH_DMAC_NR_MD_CH) + DMAOR)
|
||||||
* channels 0 - 5, DMAOR1 6 - 11 (optional).
|
#define dmaor_write_reg(n, data) __raw_writew(data, \
|
||||||
*/
|
dma_find_base((n) * \
|
||||||
#define dmaor_read_reg(n) __raw_readw(dma_find_base((n)*6))
|
SH_DMAC_NR_MD_CH) + DMAOR)
|
||||||
#define dmaor_write_reg(n, data) __raw_writew(data, dma_find_base(n)*6)
|
|
||||||
|
|
||||||
static inline int dmaor_reset(int no)
|
static inline int dmaor_reset(int no)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,78 +0,0 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
|
||||||
#ifndef __ASM_SH_BUGS_H
|
|
||||||
#define __ASM_SH_BUGS_H
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This is included by init/main.c to check for architecture-dependent bugs.
|
|
||||||
*
|
|
||||||
* Needs:
|
|
||||||
* void check_bugs(void);
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* I don't know of any Super-H bugs yet.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <asm/processor.h>
|
|
||||||
|
|
||||||
extern void select_idle_routine(void);
|
|
||||||
|
|
||||||
static void __init check_bugs(void)
|
|
||||||
{
|
|
||||||
extern unsigned long loops_per_jiffy;
|
|
||||||
char *p = &init_utsname()->machine[2]; /* "sh" */
|
|
||||||
|
|
||||||
select_idle_routine();
|
|
||||||
|
|
||||||
current_cpu_data.loops_per_jiffy = loops_per_jiffy;
|
|
||||||
|
|
||||||
switch (current_cpu_data.family) {
|
|
||||||
case CPU_FAMILY_SH2:
|
|
||||||
*p++ = '2';
|
|
||||||
break;
|
|
||||||
case CPU_FAMILY_SH2A:
|
|
||||||
*p++ = '2';
|
|
||||||
*p++ = 'a';
|
|
||||||
break;
|
|
||||||
case CPU_FAMILY_SH3:
|
|
||||||
*p++ = '3';
|
|
||||||
break;
|
|
||||||
case CPU_FAMILY_SH4:
|
|
||||||
*p++ = '4';
|
|
||||||
break;
|
|
||||||
case CPU_FAMILY_SH4A:
|
|
||||||
*p++ = '4';
|
|
||||||
*p++ = 'a';
|
|
||||||
break;
|
|
||||||
case CPU_FAMILY_SH4AL_DSP:
|
|
||||||
*p++ = '4';
|
|
||||||
*p++ = 'a';
|
|
||||||
*p++ = 'l';
|
|
||||||
*p++ = '-';
|
|
||||||
*p++ = 'd';
|
|
||||||
*p++ = 's';
|
|
||||||
*p++ = 'p';
|
|
||||||
break;
|
|
||||||
case CPU_FAMILY_SH5:
|
|
||||||
*p++ = '6';
|
|
||||||
*p++ = '4';
|
|
||||||
break;
|
|
||||||
case CPU_FAMILY_UNKNOWN:
|
|
||||||
/*
|
|
||||||
* Specifically use CPU_FAMILY_UNKNOWN rather than
|
|
||||||
* default:, so we're able to have the compiler whine
|
|
||||||
* about unhandled enumerations.
|
|
||||||
*/
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
printk("CPU: %s\n", get_cpu_subtype(¤t_cpu_data));
|
|
||||||
|
|
||||||
#ifndef __LITTLE_ENDIAN__
|
|
||||||
/* 'eb' means 'Endian Big' */
|
|
||||||
*p++ = 'e';
|
|
||||||
*p++ = 'b';
|
|
||||||
#endif
|
|
||||||
*p = '\0';
|
|
||||||
}
|
|
||||||
#endif /* __ASM_SH_BUGS_H */
|
|
|
@ -173,6 +173,8 @@ extern unsigned int instruction_size(unsigned int insn);
|
||||||
#define instruction_size(insn) (4)
|
#define instruction_size(insn) (4)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void select_idle_routine(void);
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|
||||||
#ifdef CONFIG_SUPERH32
|
#ifdef CONFIG_SUPERH32
|
||||||
|
|
|
@ -24,7 +24,7 @@ static int __init scan_cache(unsigned long node, const char *uname,
|
||||||
if (!of_flat_dt_is_compatible(node, "jcore,cache"))
|
if (!of_flat_dt_is_compatible(node, "jcore,cache"))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
j2_ccr_base = (u32 __iomem *)of_flat_dt_translate_address(node);
|
j2_ccr_base = ioremap(of_flat_dt_translate_address(node), 4);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include <linux/smp.h>
|
#include <linux/smp.h>
|
||||||
#include <linux/atomic.h>
|
#include <linux/atomic.h>
|
||||||
#include <asm/pgalloc.h>
|
#include <asm/pgalloc.h>
|
||||||
|
#include <asm/processor.h>
|
||||||
#include <asm/smp.h>
|
#include <asm/smp.h>
|
||||||
#include <asm/bl_bit.h>
|
#include <asm/bl_bit.h>
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
#include <asm/smp.h>
|
#include <asm/smp.h>
|
||||||
#include <asm/mmu_context.h>
|
#include <asm/mmu_context.h>
|
||||||
#include <asm/mmzone.h>
|
#include <asm/mmzone.h>
|
||||||
|
#include <asm/processor.h>
|
||||||
#include <asm/sparsemem.h>
|
#include <asm/sparsemem.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -361,3 +362,57 @@ int test_mode_pin(int pin)
|
||||||
{
|
{
|
||||||
return sh_mv.mv_mode_pins() & pin;
|
return sh_mv.mv_mode_pins() & pin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void __init arch_cpu_finalize_init(void)
|
||||||
|
{
|
||||||
|
char *p = &init_utsname()->machine[2]; /* "sh" */
|
||||||
|
|
||||||
|
select_idle_routine();
|
||||||
|
|
||||||
|
current_cpu_data.loops_per_jiffy = loops_per_jiffy;
|
||||||
|
|
||||||
|
switch (current_cpu_data.family) {
|
||||||
|
case CPU_FAMILY_SH2:
|
||||||
|
*p++ = '2';
|
||||||
|
break;
|
||||||
|
case CPU_FAMILY_SH2A:
|
||||||
|
*p++ = '2';
|
||||||
|
*p++ = 'a';
|
||||||
|
break;
|
||||||
|
case CPU_FAMILY_SH3:
|
||||||
|
*p++ = '3';
|
||||||
|
break;
|
||||||
|
case CPU_FAMILY_SH4:
|
||||||
|
*p++ = '4';
|
||||||
|
break;
|
||||||
|
case CPU_FAMILY_SH4A:
|
||||||
|
*p++ = '4';
|
||||||
|
*p++ = 'a';
|
||||||
|
break;
|
||||||
|
case CPU_FAMILY_SH4AL_DSP:
|
||||||
|
*p++ = '4';
|
||||||
|
*p++ = 'a';
|
||||||
|
*p++ = 'l';
|
||||||
|
*p++ = '-';
|
||||||
|
*p++ = 'd';
|
||||||
|
*p++ = 's';
|
||||||
|
*p++ = 'p';
|
||||||
|
break;
|
||||||
|
case CPU_FAMILY_UNKNOWN:
|
||||||
|
/*
|
||||||
|
* Specifically use CPU_FAMILY_UNKNOWN rather than
|
||||||
|
* default:, so we're able to have the compiler whine
|
||||||
|
* about unhandled enumerations.
|
||||||
|
*/
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
pr_info("CPU: %s\n", get_cpu_subtype(¤t_cpu_data));
|
||||||
|
|
||||||
|
#ifndef __LITTLE_ENDIAN__
|
||||||
|
/* 'eb' means 'Endian Big' */
|
||||||
|
*p++ = 'e';
|
||||||
|
*p++ = 'b';
|
||||||
|
#endif
|
||||||
|
*p = '\0';
|
||||||
|
}
|
||||||
|
|
|
@ -50,6 +50,7 @@ config SPARC
|
||||||
|
|
||||||
config SPARC32
|
config SPARC32
|
||||||
def_bool !64BIT
|
def_bool !64BIT
|
||||||
|
select ARCH_HAS_CPU_FINALIZE_INIT if !SMP
|
||||||
select ARCH_HAS_SYNC_DMA_FOR_CPU
|
select ARCH_HAS_SYNC_DMA_FOR_CPU
|
||||||
select DMA_NONCOHERENT_OPS
|
select DMA_NONCOHERENT_OPS
|
||||||
select GENERIC_ATOMIC64
|
select GENERIC_ATOMIC64
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue