You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branches 'linus' and 'irq/urgent' into irq/core
Reason: Get the upstream and urgent fixes before applying more complex changes. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
@@ -24,6 +24,7 @@ Required properties:
|
||||
* "sata-phy" for the SATA 6.0Gbps PHY
|
||||
|
||||
Optional properties:
|
||||
- dma-coherent : Present if dma operations are coherent
|
||||
- status : Shall be "ok" if enabled or "disabled" if disabled.
|
||||
Default is "ok".
|
||||
|
||||
@@ -55,6 +56,7 @@ Example:
|
||||
<0x0 0x1f22e000 0x0 0x1000>,
|
||||
<0x0 0x1f227000 0x0 0x1000>;
|
||||
interrupts = <0x0 0x87 0x4>;
|
||||
dma-coherent;
|
||||
status = "ok";
|
||||
clocks = <&sataclk 0>;
|
||||
phys = <&phy2 0>;
|
||||
@@ -69,6 +71,7 @@ Example:
|
||||
<0x0 0x1f23e000 0x0 0x1000>,
|
||||
<0x0 0x1f237000 0x0 0x1000>;
|
||||
interrupts = <0x0 0x88 0x4>;
|
||||
dma-coherent;
|
||||
status = "ok";
|
||||
clocks = <&sataclk 0>;
|
||||
phys = <&phy3 0>;
|
||||
|
||||
@@ -4,11 +4,15 @@ Required properties:
|
||||
- compatible: Should be "snps,arc-emac"
|
||||
- reg: Address and length of the register set for the device
|
||||
- interrupts: Should contain the EMAC interrupts
|
||||
- clock-frequency: CPU frequency. It is needed to calculate and set polling
|
||||
period of EMAC.
|
||||
- max-speed: see ethernet.txt file in the same directory.
|
||||
- phy: see ethernet.txt file in the same directory.
|
||||
|
||||
Clock handling:
|
||||
The clock frequency is needed to calculate and set polling period of EMAC.
|
||||
It must be provided by one of:
|
||||
- clock-frequency: CPU frequency.
|
||||
- clocks: reference to the clock supplying the EMAC.
|
||||
|
||||
Child nodes of the driver are the individual PHY devices connected to the
|
||||
MDIO bus. They must have a "reg" property given the PHY address on the MDIO bus.
|
||||
|
||||
@@ -19,7 +23,11 @@ Examples:
|
||||
reg = <0xc0fc2000 0x3c>;
|
||||
interrupts = <6>;
|
||||
mac-address = [ 00 11 22 33 44 55 ];
|
||||
|
||||
clock-frequency = <80000000>;
|
||||
/* or */
|
||||
clocks = <&emac_clock>;
|
||||
|
||||
max-speed = <100>;
|
||||
phy = <&phy0>;
|
||||
|
||||
|
||||
@@ -504,9 +504,12 @@ byte 5:
|
||||
* reg_10
|
||||
|
||||
bit 7 6 5 4 3 2 1 0
|
||||
0 0 0 0 0 0 0 A
|
||||
0 0 0 0 R F T A
|
||||
|
||||
A: 1 = enable absolute tracking
|
||||
T: 1 = enable two finger mode auto correct
|
||||
F: 1 = disable ABS Position Filter
|
||||
R: 1 = enable real hardware resolution
|
||||
|
||||
6.2 Native absolute mode 6 byte packet format
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -429,7 +429,7 @@ RPS and RFS were introduced in kernel 2.6.35. XPS was incorporated into
|
||||
(therbert@google.com)
|
||||
|
||||
Accelerated RFS was introduced in 2.6.35. Original patches were
|
||||
submitted by Ben Hutchings (bhutchings@solarflare.com)
|
||||
submitted by Ben Hutchings (bwh@kernel.org)
|
||||
|
||||
Authors:
|
||||
Tom Herbert (therbert@google.com)
|
||||
|
||||
+12
-6
@@ -3556,7 +3556,7 @@ F: include/scsi/libfcoe.h
|
||||
F: include/uapi/scsi/fc/
|
||||
|
||||
FILE LOCKING (flock() and fcntl()/lockf())
|
||||
M: Jeff Layton <jlayton@redhat.com>
|
||||
M: Jeff Layton <jlayton@poochiereds.net>
|
||||
M: J. Bruce Fields <bfields@fieldses.org>
|
||||
L: linux-fsdevel@vger.kernel.org
|
||||
S: Maintained
|
||||
@@ -4818,6 +4818,14 @@ L: linux-kernel@vger.kernel.org
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core
|
||||
F: kernel/irq/
|
||||
|
||||
IRQCHIP DRIVERS
|
||||
M: Thomas Gleixner <tglx@linutronix.de>
|
||||
M: Jason Cooper <jason@lakedaemon.net>
|
||||
L: linux-kernel@vger.kernel.org
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core
|
||||
T: git git://git.infradead.org/users/jcooper/linux.git irqchip/core
|
||||
F: drivers/irqchip/
|
||||
|
||||
IRQ DOMAINS (IRQ NUMBER MAPPING LIBRARY)
|
||||
@@ -7288,7 +7296,6 @@ F: drivers/video/aty/aty128fb.c
|
||||
RALINK RT2X00 WIRELESS LAN DRIVER
|
||||
P: rt2x00 project
|
||||
M: Ivo van Doorn <IvDoorn@gmail.com>
|
||||
M: Gertjan van Wingerde <gwingerde@gmail.com>
|
||||
M: Helmut Schaa <helmut.schaa@googlemail.com>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
L: users@rt2x00.serialmonkey.com (moderated for non-subscribers)
|
||||
@@ -7304,7 +7311,7 @@ F: Documentation/blockdev/ramdisk.txt
|
||||
F: drivers/block/brd.c
|
||||
|
||||
RANDOM NUMBER DRIVER
|
||||
M: Theodore Ts'o" <tytso@mit.edu>
|
||||
M: "Theodore Ts'o" <tytso@mit.edu>
|
||||
S: Maintained
|
||||
F: drivers/char/random.c
|
||||
|
||||
@@ -7685,7 +7692,6 @@ F: drivers/clk/samsung/
|
||||
SAMSUNG SXGBE DRIVERS
|
||||
M: Byungho An <bh74.an@samsung.com>
|
||||
M: Girish K S <ks.giri@samsung.com>
|
||||
M: Siva Reddy Kallam <siva.kallam@samsung.com>
|
||||
M: Vipul Pandya <vipul.pandya@samsung.com>
|
||||
S: Supported
|
||||
L: netdev@vger.kernel.org
|
||||
@@ -9962,7 +9968,7 @@ F: drivers/net/hamradio/*scc.c
|
||||
F: drivers/net/hamradio/z8530.h
|
||||
|
||||
ZBUD COMPRESSED PAGE ALLOCATOR
|
||||
M: Seth Jennings <sjenning@linux.vnet.ibm.com>
|
||||
M: Seth Jennings <sjennings@variantweb.net>
|
||||
L: linux-mm@kvack.org
|
||||
S: Maintained
|
||||
F: mm/zbud.c
|
||||
@@ -10007,7 +10013,7 @@ F: mm/zsmalloc.c
|
||||
F: include/linux/zsmalloc.h
|
||||
|
||||
ZSWAP COMPRESSED SWAP CACHING
|
||||
M: Seth Jennings <sjenning@linux.vnet.ibm.com>
|
||||
M: Seth Jennings <sjennings@variantweb.net>
|
||||
L: linux-mm@kvack.org
|
||||
S: Maintained
|
||||
F: mm/zswap.c
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 15
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc3
|
||||
EXTRAVERSION = -rc5
|
||||
NAME = Shuffling Zombie Juror
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
||||
@@ -307,6 +307,7 @@
|
||||
<0x0 0x1f21e000 0x0 0x1000>,
|
||||
<0x0 0x1f217000 0x0 0x1000>;
|
||||
interrupts = <0x0 0x86 0x4>;
|
||||
dma-coherent;
|
||||
status = "disabled";
|
||||
clocks = <&sata01clk 0>;
|
||||
phys = <&phy1 0>;
|
||||
@@ -321,6 +322,7 @@
|
||||
<0x0 0x1f22e000 0x0 0x1000>,
|
||||
<0x0 0x1f227000 0x0 0x1000>;
|
||||
interrupts = <0x0 0x87 0x4>;
|
||||
dma-coherent;
|
||||
status = "ok"
|
||||
clocks = <&sata23clk 0>;
|
||||
phys = <&phy2 0>;
|
||||
@@ -334,6 +336,7 @@
|
||||
<0x0 0x1f23d000 0x0 0x1000>,
|
||||
<0x0 0x1f23e000 0x0 0x1000>;
|
||||
interrupts = <0x0 0x88 0x4>;
|
||||
dma-coherent;
|
||||
status = "ok"
|
||||
clocks = <&sata45clk 0>;
|
||||
phys = <&phy3 0>;
|
||||
|
||||
@@ -143,10 +143,8 @@ static int __init setup_early_printk(char *buf)
|
||||
}
|
||||
/* no options parsing yet */
|
||||
|
||||
if (paddr) {
|
||||
set_fixmap_io(FIX_EARLYCON_MEM_BASE, paddr);
|
||||
early_base = (void __iomem *)fix_to_virt(FIX_EARLYCON_MEM_BASE);
|
||||
}
|
||||
if (paddr)
|
||||
early_base = (void __iomem *)set_fixmap_offset_io(FIX_EARLYCON_MEM_BASE, paddr);
|
||||
|
||||
printch = match->printch;
|
||||
early_console = &early_console_dev;
|
||||
|
||||
@@ -396,7 +396,7 @@ static int __init arm64_device_init(void)
|
||||
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
|
||||
return 0;
|
||||
}
|
||||
arch_initcall(arm64_device_init);
|
||||
arch_initcall_sync(arm64_device_init);
|
||||
|
||||
static DEFINE_PER_CPU(struct cpu, cpu_data);
|
||||
|
||||
|
||||
@@ -22,8 +22,11 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/dma-contiguous.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/swiotlb.h>
|
||||
#include <linux/amba/bus.h>
|
||||
|
||||
#include <asm/cacheflush.h>
|
||||
|
||||
@@ -305,17 +308,45 @@ struct dma_map_ops coherent_swiotlb_dma_ops = {
|
||||
};
|
||||
EXPORT_SYMBOL(coherent_swiotlb_dma_ops);
|
||||
|
||||
static int dma_bus_notifier(struct notifier_block *nb,
|
||||
unsigned long event, void *_dev)
|
||||
{
|
||||
struct device *dev = _dev;
|
||||
|
||||
if (event != BUS_NOTIFY_ADD_DEVICE)
|
||||
return NOTIFY_DONE;
|
||||
|
||||
if (of_property_read_bool(dev->of_node, "dma-coherent"))
|
||||
set_dma_ops(dev, &coherent_swiotlb_dma_ops);
|
||||
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
|
||||
static struct notifier_block platform_bus_nb = {
|
||||
.notifier_call = dma_bus_notifier,
|
||||
};
|
||||
|
||||
static struct notifier_block amba_bus_nb = {
|
||||
.notifier_call = dma_bus_notifier,
|
||||
};
|
||||
|
||||
extern int swiotlb_late_init_with_default_size(size_t default_size);
|
||||
|
||||
static int __init swiotlb_late_init(void)
|
||||
{
|
||||
size_t swiotlb_size = min(SZ_64M, MAX_ORDER_NR_PAGES << PAGE_SHIFT);
|
||||
|
||||
dma_ops = &coherent_swiotlb_dma_ops;
|
||||
/*
|
||||
* These must be registered before of_platform_populate().
|
||||
*/
|
||||
bus_register_notifier(&platform_bus_type, &platform_bus_nb);
|
||||
bus_register_notifier(&amba_bustype, &amba_bus_nb);
|
||||
|
||||
dma_ops = &noncoherent_swiotlb_dma_ops;
|
||||
|
||||
return swiotlb_late_init_with_default_size(swiotlb_size);
|
||||
}
|
||||
subsys_initcall(swiotlb_late_init);
|
||||
arch_initcall(swiotlb_late_init);
|
||||
|
||||
#define PREALLOC_DMA_DEBUG_ENTRIES 4096
|
||||
|
||||
|
||||
@@ -374,6 +374,9 @@ int kern_addr_valid(unsigned long addr)
|
||||
if (pmd_none(*pmd))
|
||||
return 0;
|
||||
|
||||
if (pmd_sect(*pmd))
|
||||
return pfn_valid(pmd_pfn(*pmd));
|
||||
|
||||
pte = pte_offset_kernel(pmd, addr);
|
||||
if (pte_none(*pte))
|
||||
return 0;
|
||||
|
||||
@@ -71,6 +71,23 @@
|
||||
|
||||
#include <linux/sched.h>
|
||||
|
||||
extern unsigned long sparc64_valid_addr_bitmap[];
|
||||
|
||||
/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
|
||||
static inline bool __kern_addr_valid(unsigned long paddr)
|
||||
{
|
||||
if ((paddr >> MAX_PHYS_ADDRESS_BITS) != 0UL)
|
||||
return false;
|
||||
return test_bit(paddr >> ILOG2_4MB, sparc64_valid_addr_bitmap);
|
||||
}
|
||||
|
||||
static inline bool kern_addr_valid(unsigned long addr)
|
||||
{
|
||||
unsigned long paddr = __pa(addr);
|
||||
|
||||
return __kern_addr_valid(paddr);
|
||||
}
|
||||
|
||||
/* Entries per page directory level. */
|
||||
#define PTRS_PER_PTE (1UL << (PAGE_SHIFT-3))
|
||||
#define PTRS_PER_PMD (1UL << PMD_BITS)
|
||||
@@ -79,9 +96,12 @@
|
||||
/* Kernel has a separate 44bit address space. */
|
||||
#define FIRST_USER_ADDRESS 0
|
||||
|
||||
#define pte_ERROR(e) __builtin_trap()
|
||||
#define pmd_ERROR(e) __builtin_trap()
|
||||
#define pgd_ERROR(e) __builtin_trap()
|
||||
#define pmd_ERROR(e) \
|
||||
pr_err("%s:%d: bad pmd %p(%016lx) seen at (%pS)\n", \
|
||||
__FILE__, __LINE__, &(e), pmd_val(e), __builtin_return_address(0))
|
||||
#define pgd_ERROR(e) \
|
||||
pr_err("%s:%d: bad pgd %p(%016lx) seen at (%pS)\n", \
|
||||
__FILE__, __LINE__, &(e), pgd_val(e), __builtin_return_address(0))
|
||||
|
||||
#endif /* !(__ASSEMBLY__) */
|
||||
|
||||
@@ -258,8 +278,8 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t prot)
|
||||
{
|
||||
unsigned long mask, tmp;
|
||||
|
||||
/* SUN4U: 0x600307ffffffecb8 (negated == 0x9ffcf80000001347)
|
||||
* SUN4V: 0x30ffffffffffee17 (negated == 0xcf000000000011e8)
|
||||
/* SUN4U: 0x630107ffffffec38 (negated == 0x9cfef800000013c7)
|
||||
* SUN4V: 0x33ffffffffffee07 (negated == 0xcc000000000011f8)
|
||||
*
|
||||
* Even if we use negation tricks the result is still a 6
|
||||
* instruction sequence, so don't try to play fancy and just
|
||||
@@ -289,10 +309,10 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t prot)
|
||||
" .previous\n"
|
||||
: "=r" (mask), "=r" (tmp)
|
||||
: "i" (_PAGE_PADDR_4U | _PAGE_MODIFIED_4U | _PAGE_ACCESSED_4U |
|
||||
_PAGE_CP_4U | _PAGE_CV_4U | _PAGE_E_4U | _PAGE_PRESENT_4U |
|
||||
_PAGE_CP_4U | _PAGE_CV_4U | _PAGE_E_4U |
|
||||
_PAGE_SPECIAL | _PAGE_PMD_HUGE | _PAGE_SZALL_4U),
|
||||
"i" (_PAGE_PADDR_4V | _PAGE_MODIFIED_4V | _PAGE_ACCESSED_4V |
|
||||
_PAGE_CP_4V | _PAGE_CV_4V | _PAGE_E_4V | _PAGE_PRESENT_4V |
|
||||
_PAGE_CP_4V | _PAGE_CV_4V | _PAGE_E_4V |
|
||||
_PAGE_SPECIAL | _PAGE_PMD_HUGE | _PAGE_SZALL_4V));
|
||||
|
||||
return __pte((pte_val(pte) & mask) | (pgprot_val(prot) & ~mask));
|
||||
@@ -633,7 +653,7 @@ static inline unsigned long pmd_large(pmd_t pmd)
|
||||
{
|
||||
pte_t pte = __pte(pmd_val(pmd));
|
||||
|
||||
return (pte_val(pte) & _PAGE_PMD_HUGE) && pte_present(pte);
|
||||
return pte_val(pte) & _PAGE_PMD_HUGE;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
@@ -719,20 +739,6 @@ static inline pmd_t pmd_mkwrite(pmd_t pmd)
|
||||
return __pmd(pte_val(pte));
|
||||
}
|
||||
|
||||
static inline pmd_t pmd_mknotpresent(pmd_t pmd)
|
||||
{
|
||||
unsigned long mask;
|
||||
|
||||
if (tlb_type == hypervisor)
|
||||
mask = _PAGE_PRESENT_4V;
|
||||
else
|
||||
mask = _PAGE_PRESENT_4U;
|
||||
|
||||
pmd_val(pmd) &= ~mask;
|
||||
|
||||
return pmd;
|
||||
}
|
||||
|
||||
static inline pmd_t pmd_mksplitting(pmd_t pmd)
|
||||
{
|
||||
pte_t pte = __pte(pmd_val(pmd));
|
||||
@@ -757,6 +763,20 @@ static inline int pmd_present(pmd_t pmd)
|
||||
|
||||
#define pmd_none(pmd) (!pmd_val(pmd))
|
||||
|
||||
/* pmd_bad() is only called on non-trans-huge PMDs. Our encoding is
|
||||
* very simple, it's just the physical address. PTE tables are of
|
||||
* size PAGE_SIZE so make sure the sub-PAGE_SIZE bits are clear and
|
||||
* the top bits outside of the range of any physical address size we
|
||||
* support are clear as well. We also validate the physical itself.
|
||||
*/
|
||||
#define pmd_bad(pmd) ((pmd_val(pmd) & ~PAGE_MASK) || \
|
||||
!__kern_addr_valid(pmd_val(pmd)))
|
||||
|
||||
#define pud_none(pud) (!pud_val(pud))
|
||||
|
||||
#define pud_bad(pud) ((pud_val(pud) & ~PAGE_MASK) || \
|
||||
!__kern_addr_valid(pud_val(pud)))
|
||||
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
extern void set_pmd_at(struct mm_struct *mm, unsigned long addr,
|
||||
pmd_t *pmdp, pmd_t pmd);
|
||||
@@ -790,10 +810,7 @@ static inline unsigned long __pmd_page(pmd_t pmd)
|
||||
#define pud_page_vaddr(pud) \
|
||||
((unsigned long) __va(pud_val(pud)))
|
||||
#define pud_page(pud) virt_to_page((void *)pud_page_vaddr(pud))
|
||||
#define pmd_bad(pmd) (0)
|
||||
#define pmd_clear(pmdp) (pmd_val(*(pmdp)) = 0UL)
|
||||
#define pud_none(pud) (!pud_val(pud))
|
||||
#define pud_bad(pud) (0)
|
||||
#define pud_present(pud) (pud_val(pud) != 0U)
|
||||
#define pud_clear(pudp) (pud_val(*(pudp)) = 0UL)
|
||||
|
||||
@@ -893,6 +910,10 @@ extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t *);
|
||||
extern void update_mmu_cache_pmd(struct vm_area_struct *vma, unsigned long addr,
|
||||
pmd_t *pmd);
|
||||
|
||||
#define __HAVE_ARCH_PMDP_INVALIDATE
|
||||
extern void pmdp_invalidate(struct vm_area_struct *vma, unsigned long address,
|
||||
pmd_t *pmdp);
|
||||
|
||||
#define __HAVE_ARCH_PGTABLE_DEPOSIT
|
||||
extern void pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp,
|
||||
pgtable_t pgtable);
|
||||
@@ -919,18 +940,6 @@ extern unsigned long pte_file(pte_t);
|
||||
extern pte_t pgoff_to_pte(unsigned long);
|
||||
#define PTE_FILE_MAX_BITS (64UL - PAGE_SHIFT - 1UL)
|
||||
|
||||
extern unsigned long sparc64_valid_addr_bitmap[];
|
||||
|
||||
/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
|
||||
static inline bool kern_addr_valid(unsigned long addr)
|
||||
{
|
||||
unsigned long paddr = __pa(addr);
|
||||
|
||||
if ((paddr >> 41UL) != 0UL)
|
||||
return false;
|
||||
return test_bit(paddr >> 22, sparc64_valid_addr_bitmap);
|
||||
}
|
||||
|
||||
extern int page_in_phys_avail(unsigned long paddr);
|
||||
|
||||
/*
|
||||
|
||||
@@ -171,7 +171,8 @@ extern struct tsb_phys_patch_entry __tsb_phys_patch, __tsb_phys_patch_end;
|
||||
andcc REG1, REG2, %g0; \
|
||||
be,pt %xcc, 700f; \
|
||||
sethi %hi(4 * 1024 * 1024), REG2; \
|
||||
andn REG1, REG2, REG1; \
|
||||
brgez,pn REG1, FAIL_LABEL; \
|
||||
andn REG1, REG2, REG1; \
|
||||
and VADDR, REG2, REG2; \
|
||||
brlz,pt REG1, PTE_LABEL; \
|
||||
or REG1, REG2, REG1; \
|
||||
|
||||
@@ -282,8 +282,8 @@ sun4v_chip_type:
|
||||
stx %l2, [%l4 + 0x0]
|
||||
ldx [%sp + 2047 + 128 + 0x50], %l3 ! physaddr low
|
||||
/* 4MB align */
|
||||
srlx %l3, 22, %l3
|
||||
sllx %l3, 22, %l3
|
||||
srlx %l3, ILOG2_4MB, %l3
|
||||
sllx %l3, ILOG2_4MB, %l3
|
||||
stx %l3, [%l4 + 0x8]
|
||||
|
||||
/* Leave service as-is, "call-method" */
|
||||
|
||||
@@ -277,7 +277,7 @@ kvmap_dtlb_load:
|
||||
#ifdef CONFIG_SPARSEMEM_VMEMMAP
|
||||
kvmap_vmemmap:
|
||||
sub %g4, %g5, %g5
|
||||
srlx %g5, 22, %g5
|
||||
srlx %g5, ILOG2_4MB, %g5
|
||||
sethi %hi(vmemmap_table), %g1
|
||||
sllx %g5, 3, %g5
|
||||
or %g1, %lo(vmemmap_table), %g1
|
||||
|
||||
+5
-16
@@ -68,27 +68,16 @@ EXPORT_SYMBOL(touch_nmi_watchdog);
|
||||
|
||||
static void die_nmi(const char *str, struct pt_regs *regs, int do_panic)
|
||||
{
|
||||
int this_cpu = smp_processor_id();
|
||||
|
||||
if (notify_die(DIE_NMIWATCHDOG, str, regs, 0,
|
||||
pt_regs_trap_type(regs), SIGINT) == NOTIFY_STOP)
|
||||
return;
|
||||
|
||||
console_verbose();
|
||||
bust_spinlocks(1);
|
||||
|
||||
printk(KERN_EMERG "%s", str);
|
||||
printk(" on CPU%d, ip %08lx, registers:\n",
|
||||
smp_processor_id(), regs->tpc);
|
||||
show_regs(regs);
|
||||
dump_stack();
|
||||
|
||||
bust_spinlocks(0);
|
||||
|
||||
if (do_panic || panic_on_oops)
|
||||
panic("Non maskable interrupt");
|
||||
|
||||
nmi_exit();
|
||||
local_irq_enable();
|
||||
do_exit(SIGBUS);
|
||||
panic("Watchdog detected hard LOCKUP on cpu %d", this_cpu);
|
||||
else
|
||||
WARN(1, "Watchdog detected hard LOCKUP on cpu %d", this_cpu);
|
||||
}
|
||||
|
||||
notrace __kprobes void perfctr_irq(int irq, struct pt_regs *regs)
|
||||
|
||||
@@ -149,7 +149,7 @@ void cpu_panic(void)
|
||||
#define NUM_ROUNDS 64 /* magic value */
|
||||
#define NUM_ITERS 5 /* likewise */
|
||||
|
||||
static DEFINE_SPINLOCK(itc_sync_lock);
|
||||
static DEFINE_RAW_SPINLOCK(itc_sync_lock);
|
||||
static unsigned long go[SLAVE + 1];
|
||||
|
||||
#define DEBUG_TICK_SYNC 0
|
||||
@@ -257,7 +257,7 @@ static void smp_synchronize_one_tick(int cpu)
|
||||
go[MASTER] = 0;
|
||||
membar_safe("#StoreLoad");
|
||||
|
||||
spin_lock_irqsave(&itc_sync_lock, flags);
|
||||
raw_spin_lock_irqsave(&itc_sync_lock, flags);
|
||||
{
|
||||
for (i = 0; i < NUM_ROUNDS*NUM_ITERS; i++) {
|
||||
while (!go[MASTER])
|
||||
@@ -268,7 +268,7 @@ static void smp_synchronize_one_tick(int cpu)
|
||||
membar_safe("#StoreLoad");
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&itc_sync_lock, flags);
|
||||
raw_spin_unlock_irqrestore(&itc_sync_lock, flags);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_SUN_LDOMS) && defined(CONFIG_HOTPLUG_CPU)
|
||||
|
||||
@@ -44,7 +44,7 @@ SIGN1(sys32_timer_settime, compat_sys_timer_settime, %o1)
|
||||
SIGN1(sys32_io_submit, compat_sys_io_submit, %o1)
|
||||
SIGN1(sys32_mq_open, compat_sys_mq_open, %o1)
|
||||
SIGN1(sys32_select, compat_sys_select, %o0)
|
||||
SIGN3(sys32_futex, compat_sys_futex, %o1, %o2, %o5)
|
||||
SIGN1(sys32_futex, compat_sys_futex, %o1)
|
||||
SIGN1(sys32_recvfrom, compat_sys_recvfrom, %o0)
|
||||
SIGN1(sys32_recvmsg, compat_sys_recvmsg, %o0)
|
||||
SIGN1(sys32_sendmsg, compat_sys_sendmsg, %o0)
|
||||
|
||||
@@ -166,17 +166,23 @@ static unsigned long *fetch_reg_addr(unsigned int reg, struct pt_regs *regs)
|
||||
unsigned long compute_effective_address(struct pt_regs *regs,
|
||||
unsigned int insn, unsigned int rd)
|
||||
{
|
||||
int from_kernel = (regs->tstate & TSTATE_PRIV) != 0;
|
||||
unsigned int rs1 = (insn >> 14) & 0x1f;
|
||||
unsigned int rs2 = insn & 0x1f;
|
||||
int from_kernel = (regs->tstate & TSTATE_PRIV) != 0;
|
||||
unsigned long addr;
|
||||
|
||||
if (insn & 0x2000) {
|
||||
maybe_flush_windows(rs1, 0, rd, from_kernel);
|
||||
return (fetch_reg(rs1, regs) + sign_extend_imm13(insn));
|
||||
addr = (fetch_reg(rs1, regs) + sign_extend_imm13(insn));
|
||||
} else {
|
||||
maybe_flush_windows(rs1, rs2, rd, from_kernel);
|
||||
return (fetch_reg(rs1, regs) + fetch_reg(rs2, regs));
|
||||
addr = (fetch_reg(rs1, regs) + fetch_reg(rs2, regs));
|
||||
}
|
||||
|
||||
if (!from_kernel && test_thread_flag(TIF_32BIT))
|
||||
addr &= 0xffffffff;
|
||||
|
||||
return addr;
|
||||
}
|
||||
|
||||
/* This is just to make gcc think die_if_kernel does return... */
|
||||
|
||||
+53
-31
@@ -96,38 +96,51 @@ static unsigned int get_user_insn(unsigned long tpc)
|
||||
pte_t *ptep, pte;
|
||||
unsigned long pa;
|
||||
u32 insn = 0;
|
||||
unsigned long pstate;
|
||||
|
||||
if (pgd_none(*pgdp))
|
||||
goto outret;
|
||||
if (pgd_none(*pgdp) || unlikely(pgd_bad(*pgdp)))
|
||||
goto out;
|
||||
pudp = pud_offset(pgdp, tpc);
|
||||
if (pud_none(*pudp))
|
||||
goto outret;
|
||||
pmdp = pmd_offset(pudp, tpc);
|
||||
if (pmd_none(*pmdp))
|
||||
goto outret;
|
||||
|
||||
/* This disables preemption for us as well. */
|
||||
__asm__ __volatile__("rdpr %%pstate, %0" : "=r" (pstate));
|
||||
__asm__ __volatile__("wrpr %0, %1, %%pstate"
|
||||
: : "r" (pstate), "i" (PSTATE_IE));
|
||||
ptep = pte_offset_map(pmdp, tpc);
|
||||
pte = *ptep;
|
||||
if (!pte_present(pte))
|
||||
if (pud_none(*pudp) || unlikely(pud_bad(*pudp)))
|
||||
goto out;
|
||||
|
||||
pa = (pte_pfn(pte) << PAGE_SHIFT);
|
||||
pa += (tpc & ~PAGE_MASK);
|
||||
/* This disables preemption for us as well. */
|
||||
local_irq_disable();
|
||||
|
||||
/* Use phys bypass so we don't pollute dtlb/dcache. */
|
||||
__asm__ __volatile__("lduwa [%1] %2, %0"
|
||||
: "=r" (insn)
|
||||
: "r" (pa), "i" (ASI_PHYS_USE_EC));
|
||||
pmdp = pmd_offset(pudp, tpc);
|
||||
if (pmd_none(*pmdp) || unlikely(pmd_bad(*pmdp)))
|
||||
goto out_irq_enable;
|
||||
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
if (pmd_trans_huge(*pmdp)) {
|
||||
if (pmd_trans_splitting(*pmdp))
|
||||
goto out_irq_enable;
|
||||
|
||||
pa = pmd_pfn(*pmdp) << PAGE_SHIFT;
|
||||
pa += tpc & ~HPAGE_MASK;
|
||||
|
||||
/* Use phys bypass so we don't pollute dtlb/dcache. */
|
||||
__asm__ __volatile__("lduwa [%1] %2, %0"
|
||||
: "=r" (insn)
|
||||
: "r" (pa), "i" (ASI_PHYS_USE_EC));
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
ptep = pte_offset_map(pmdp, tpc);
|
||||
pte = *ptep;
|
||||
if (pte_present(pte)) {
|
||||
pa = (pte_pfn(pte) << PAGE_SHIFT);
|
||||
pa += (tpc & ~PAGE_MASK);
|
||||
|
||||
/* Use phys bypass so we don't pollute dtlb/dcache. */
|
||||
__asm__ __volatile__("lduwa [%1] %2, %0"
|
||||
: "=r" (insn)
|
||||
: "r" (pa), "i" (ASI_PHYS_USE_EC));
|
||||
}
|
||||
pte_unmap(ptep);
|
||||
}
|
||||
out_irq_enable:
|
||||
local_irq_enable();
|
||||
out:
|
||||
pte_unmap(ptep);
|
||||
__asm__ __volatile__("wrpr %0, 0x0, %%pstate" : : "r" (pstate));
|
||||
outret:
|
||||
return insn;
|
||||
}
|
||||
|
||||
@@ -153,7 +166,8 @@ show_signal_msg(struct pt_regs *regs, int sig, int code,
|
||||
}
|
||||
|
||||
static void do_fault_siginfo(int code, int sig, struct pt_regs *regs,
|
||||
unsigned int insn, int fault_code)
|
||||
unsigned long fault_addr, unsigned int insn,
|
||||
int fault_code)
|
||||
{
|
||||
unsigned long addr;
|
||||
siginfo_t info;
|
||||
@@ -161,10 +175,18 @@ static void do_fault_siginfo(int code, int sig, struct pt_regs *regs,
|
||||
info.si_code = code;
|
||||
info.si_signo = sig;
|
||||
info.si_errno = 0;
|
||||
if (fault_code & FAULT_CODE_ITLB)
|
||||
if (fault_code & FAULT_CODE_ITLB) {
|
||||
addr = regs->tpc;
|
||||
else
|
||||
addr = compute_effective_address(regs, insn, 0);
|
||||
} else {
|
||||
/* If we were able to probe the faulting instruction, use it
|
||||
* to compute a precise fault address. Otherwise use the fault
|
||||
* time provided address which may only have page granularity.
|
||||
*/
|
||||
if (insn)
|
||||
addr = compute_effective_address(regs, insn, 0);
|
||||
else
|
||||
addr = fault_addr;
|
||||
}
|
||||
info.si_addr = (void __user *) addr;
|
||||
info.si_trapno = 0;
|
||||
|
||||
@@ -239,7 +261,7 @@ static void __kprobes do_kernel_fault(struct pt_regs *regs, int si_code,
|
||||
/* The si_code was set to make clear whether
|
||||
* this was a SEGV_MAPERR or SEGV_ACCERR fault.
|
||||
*/
|
||||
do_fault_siginfo(si_code, SIGSEGV, regs, insn, fault_code);
|
||||
do_fault_siginfo(si_code, SIGSEGV, regs, address, insn, fault_code);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -525,7 +547,7 @@ do_sigbus:
|
||||
* Send a sigbus, regardless of whether we were in kernel
|
||||
* or user mode.
|
||||
*/
|
||||
do_fault_siginfo(BUS_ADRERR, SIGBUS, regs, insn, fault_code);
|
||||
do_fault_siginfo(BUS_ADRERR, SIGBUS, regs, address, insn, fault_code);
|
||||
|
||||
/* Kernel mode? Handle exceptions or die */
|
||||
if (regs->tstate & TSTATE_PRIV)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user