Skip to content

Commit

Permalink
Merge tag 'parisc-for-6.6-rc1' of git://git.kernel.org/pub/scm/linux/…
Browse files Browse the repository at this point in the history
…kernel/git/deller/parisc-linux

Pull parisc architecture updates from Helge Deller:
 "PA-RISC now has a native eBPF JIT compiler for 32- and 64-bit kernels,
  the LED driver was rewritten to use the Linux LED framework and most
  of the parisc bootup code was switched to use *_initcall() functions.

  Summary:

   - add eBPF JIT compiler for 32- and 64-bit kernel

   - LCD/LED driver rewrite to utilize Linux LED subsystem

   - switch to generic mmap top-down layout and brk randomization

   - kernel startup cleanup by loading most drivers via arch_initcall()"

* tag 'parisc-for-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: (31 commits)
  parisc: ccio-dma: Create private runway procfs root entry
  parisc: chassis: Do not overwrite string on LCD display
  parisc: led: Rewrite LED/LCD driver to utilizize Linux LED subsystem
  parisc: led: Fix LAN receive and transmit LEDs
  parisc: lasi: Initialize LASI driver via arch_initcall()
  parisc: asp: Initialize asp driver via arch_initcall()
  parisc: wax: Initialize wax driver via arch_initcall()
  parisc: iosapic: Convert I/O Sapic driver to use arch_initcall()
  parisc: sba_iommu: Convert SBA IOMMU driver to use arch_initcall()
  parisc: led: Move register_led_regions() to late_initcall()
  parisc: lba: Convert LBA PCI bus driver to use arch_initcall()
  parisc: gsc: Convert GSC bus driver to use arch_initcall()
  parisc: ccio: Convert CCIO driver to use arch_initcall()
  parisc: eisa: Convert HP EISA bus driver to use arch_initcall()
  parisc: hppb: Convert HP PB bus driver to use arch_initcall()
  parisc: dino: Convert dino PCI bus driver to use arch_initcall()
  parisc: Makefile: Adjust order in which drivers should be loaded
  parisc: led: Reduce CPU overhead for disk & lan LED computation
  parisc: Avoid ioremap() for same addresss in iosapic_register()
  parisc: unaligned: Simplify 32-bit assembly in emulate_std()
  ...
  • Loading branch information
Linus Torvalds committed Aug 29, 2023
2 parents 468e28d + 77e0ddf commit 48d25d3
Show file tree
Hide file tree
Showing 38 changed files with 3,997 additions and 883 deletions.
2 changes: 1 addition & 1 deletion arch/parisc/Kbuild
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
obj-y += mm/ kernel/ math-emu/
obj-y += mm/ kernel/ math-emu/ net/

# for cleaning
subdir- += boot
19 changes: 19 additions & 0 deletions arch/parisc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,18 @@ config PARISC
select TTY # Needed for pdc_cons.c
select HAS_IOPORT if PCI || EISA
select HAVE_DEBUG_STACKOVERFLOW
select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
select HAVE_ARCH_MMAP_RND_BITS
select HAVE_ARCH_AUDITSYSCALL
select HAVE_ARCH_HASH
select HAVE_ARCH_JUMP_LABEL
select HAVE_ARCH_JUMP_LABEL_RELATIVE
select HAVE_ARCH_KFENCE
select HAVE_ARCH_SECCOMP_FILTER
select HAVE_ARCH_TRACEHOOK
select HAVE_EBPF_JIT
select ARCH_WANT_DEFAULT_BPF_JIT
select HAVE_REGS_AND_STACK_ACCESS_API
select HOTPLUG_CORE_SYNC_DEAD if HOTPLUG_CPU
select GENERIC_SCHED_CLOCK
Expand Down Expand Up @@ -124,6 +129,20 @@ config TIME_LOW_RES
depends on SMP
default y

config ARCH_MMAP_RND_BITS_MIN
default 18 if 64BIT
default 8

config ARCH_MMAP_RND_COMPAT_BITS_MIN
default 8

config ARCH_MMAP_RND_BITS_MAX
default 24 if 64BIT
default 17

config ARCH_MMAP_RND_COMPAT_BITS_MAX
default 17

# unless you want to implement ACPI on PA-RISC ... ;-)
config PM
bool
Expand Down
2 changes: 1 addition & 1 deletion arch/parisc/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ config LIGHTWEIGHT_SPINLOCK_CHECK

config TLB_PTLOCK
bool "Use page table locks in TLB fault handler"
depends on SMP
depends on DEBUG_KERNEL && SMP
default n
help
Select this option to enable page table locking in the TLB
Expand Down
3 changes: 1 addition & 2 deletions arch/parisc/include/asm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@ typedef struct elf32_fdesc {

/* Format for the Elf64 Function descriptor */
typedef struct elf64_fdesc {
__u64 dummy[2]; /* FIXME: nothing uses these, why waste
* the space */
__u64 dummy[2]; /* used by 64-bit eBPF and tracing functions */
__u64 addr;
__u64 gp;
} Elf64_Fdesc;
Expand Down
16 changes: 5 additions & 11 deletions arch/parisc/include/asm/led.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#define LED1 0x02
#define LED0 0x01 /* bottom (or furthest left) LED */

#define LED_LAN_TX LED0 /* for LAN transmit activity */
#define LED_LAN_RCV LED1 /* for LAN receive activity */
#define LED_LAN_RCV LED0 /* for LAN receive activity */
#define LED_LAN_TX LED1 /* for LAN transmit activity */
#define LED_DISK_IO LED2 /* for disk activity */
#define LED_HEARTBEAT LED3 /* heartbeat */

Expand All @@ -25,19 +25,13 @@
#define LED_CMD_REG_NONE 0 /* NULL == no addr for the cmd register */

/* register_led_driver() */
int __init register_led_driver(int model, unsigned long cmd_reg, unsigned long data_reg);

/* registers the LED regions for procfs */
void __init register_led_regions(void);
int register_led_driver(int model, unsigned long cmd_reg, unsigned long data_reg);

#ifdef CONFIG_CHASSIS_LCD_LED
/* writes a string to the LCD display (if possible on this h/w) */
int lcd_print(const char *str);
void lcd_print(const char *str);
#else
#define lcd_print(str)
#define lcd_print(str) do { } while (0)
#endif

/* main LED initialization function (uses PDC) */
int __init led_init(void);

#endif /* LED_H */
17 changes: 0 additions & 17 deletions arch/parisc/include/asm/machdep.h

This file was deleted.

8 changes: 0 additions & 8 deletions arch/parisc/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,15 +313,7 @@ extern void collect_boot_cpu_data(void);
extern int show_cpuinfo (struct seq_file *m, void *v);

/* driver code in driver/parisc */
extern void gsc_init(void);
extern void processor_init(void);
extern void ccio_init(void);
extern void hppb_init(void);
extern void dino_init(void);
extern void iosapic_init(void);
extern void lba_init(void);
extern void sba_init(void);
extern void parisc_eisa_init(void);
struct parisc_device;
struct resource;
extern void sba_distributed_lmmio(struct parisc_device *, struct resource *);
Expand Down
2 changes: 1 addition & 1 deletion arch/parisc/include/asm/ropes.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ static inline int agp_mode_mercury(void __iomem *hpa) {
** fixup_irq is to initialize PCI IRQ line support and
** virtualize pcidev->irq value. To be called by pci_fixup_bus().
*/
extern void *iosapic_register(unsigned long hpa);
extern void *iosapic_register(unsigned long hpa, void __iomem *vaddr);
extern int iosapic_fixup_irq(void *obj, struct pci_dev *pcidev);

#define LBA_FUNC_ID 0x0000 /* function id */
Expand Down
3 changes: 0 additions & 3 deletions arch/parisc/include/asm/runway.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
#ifndef ASM_PARISC_RUNWAY_H
#define ASM_PARISC_RUNWAY_H

/* declared in arch/parisc/kernel/setup.c */
extern struct proc_dir_entry * proc_runway_root;

#define RUNWAY_STATUS 0x10
#define RUNWAY_DEBUG 0x40

Expand Down
2 changes: 1 addition & 1 deletion arch/parisc/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
extra-y := vmlinux.lds

obj-y := head.o cache.o pacache.o setup.o pdt.o traps.o time.o irq.o \
pa7300lc.o syscall.o entry.o sys_parisc.o firmware.o \
syscall.o entry.o sys_parisc.o firmware.o \
ptrace.o hardware.o inventory.o drivers.o alternative.o \
signal.o hpmc.o real2.o parisc_ksyms.o unaligned.o \
process.o processor.o pdc_cons.o pdc_chassis.o unwind.o \
Expand Down
51 changes: 0 additions & 51 deletions arch/parisc/kernel/pa7300lc.c

This file was deleted.

6 changes: 6 additions & 0 deletions arch/parisc/kernel/pdc_chassis.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <asm/processor.h>
#include <asm/pdc.h>
#include <asm/pdcpat.h>
#include <asm/led.h>

#define PDC_CHASSIS_VER "0.05"

Expand Down Expand Up @@ -234,6 +235,11 @@ int pdc_chassis_send_status(int message)
} else retval = -1;
#endif /* CONFIG_64BIT */
} /* if (pdc_chassis_enabled) */

/* if system has LCD display, update current string */
if (retval != -1 && IS_ENABLED(CONFIG_CHASSIS_LCD_LED))
lcd_print(NULL);

#endif /* CONFIG_PDC_CHASSIS */
return retval;
}
Expand Down
20 changes: 0 additions & 20 deletions arch/parisc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,12 @@ void machine_restart(char *cmd)

}

void (*chassis_power_off)(void);

/*
* This routine is called from sys_reboot to actually turn off the
* machine
*/
void machine_power_off(void)
{
/* If there is a registered power off handler, call it. */
if (chassis_power_off)
chassis_power_off();

/* Put the soft power button back under hardware control.
* If the user had already pressed the power button, the
* following call will immediately power off. */
Expand Down Expand Up @@ -284,17 +278,3 @@ __get_wchan(struct task_struct *p)
} while (count++ < MAX_UNWIND_ENTRIES);
return 0;
}

static inline unsigned long brk_rnd(void)
{
return (get_random_u32() & BRK_RND_MASK) << PAGE_SHIFT;
}

unsigned long arch_randomize_brk(struct mm_struct *mm)
{
unsigned long ret = PAGE_ALIGN(mm->brk + brk_rnd());

if (ret < mm->brk)
return mm->brk;
return ret;
}
13 changes: 10 additions & 3 deletions arch/parisc/kernel/processor.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,18 @@ int
show_cpuinfo (struct seq_file *m, void *v)
{
unsigned long cpu;
char cpu_name[60], *p;

/* strip PA path from CPU name to not confuse lscpu */
strlcpy(cpu_name, per_cpu(cpu_data, 0).dev->name, sizeof(cpu_name));
p = strrchr(cpu_name, '[');
if (p)
*(--p) = 0;

for_each_online_cpu(cpu) {
const struct cpuinfo_parisc *cpuinfo = &per_cpu(cpu_data, cpu);
#ifdef CONFIG_SMP
const struct cpuinfo_parisc *cpuinfo = &per_cpu(cpu_data, cpu);

if (0 == cpuinfo->hpa)
continue;
#endif
Expand Down Expand Up @@ -426,8 +434,7 @@ show_cpuinfo (struct seq_file *m, void *v)

seq_printf(m, "model\t\t: %s - %s\n",
boot_cpu_data.pdc.sys_model_name,
cpuinfo->dev ?
cpuinfo->dev->name : "Unknown");
cpu_name);

seq_printf(m, "hversion\t: 0x%08x\n"
"sversion\t: 0x%08x\n",
Expand Down
49 changes: 0 additions & 49 deletions arch/parisc/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include <asm/sections.h>
#include <asm/pdc.h>
#include <asm/led.h>
#include <asm/machdep.h> /* for pa7300lc_init() proto */
#include <asm/pdc_chassis.h>
#include <asm/io.h>
#include <asm/setup.h>
Expand Down Expand Up @@ -93,8 +92,6 @@ static void __init dma_ops_init(void)
"the PA-RISC 1.1 or 2.0 architecture specification.\n");

case pcxl2:
pa7300lc_init();
break;
default:
break;
}
Expand Down Expand Up @@ -146,11 +143,6 @@ void __init setup_arch(char **cmdline_p)
parisc_cache_init();
paging_init();

#ifdef CONFIG_CHASSIS_LCD_LED
/* initialize the LCD/LED after boot_cpu_data is available ! */
led_init(); /* LCD/LED initialization */
#endif

#ifdef CONFIG_PA11
dma_ops_init();
#endif
Expand Down Expand Up @@ -281,47 +273,6 @@ static int __init parisc_init(void)

apply_alternatives_all();
parisc_setup_cache_timing();

/* These are in a non-obvious order, will fix when we have an iotree */
#if defined(CONFIG_IOSAPIC)
iosapic_init();
#endif
#if defined(CONFIG_IOMMU_SBA)
sba_init();
#endif
#if defined(CONFIG_PCI_LBA)
lba_init();
#endif

/* CCIO before any potential subdevices */
#if defined(CONFIG_IOMMU_CCIO)
ccio_init();
#endif

/*
* Need to register Asp & Wax before the EISA adapters for the IRQ
* regions. EISA must come before PCI to be sure it gets IRQ region
* 0.
*/
#if defined(CONFIG_GSC_LASI) || defined(CONFIG_GSC_WAX)
gsc_init();
#endif
#ifdef CONFIG_EISA
parisc_eisa_init();
#endif

#if defined(CONFIG_HPPB)
hppb_init();
#endif

#if defined(CONFIG_GSC_DINO)
dino_init();
#endif

#ifdef CONFIG_CHASSIS_LCD_LED
register_led_regions(); /* register LED port info in procfs */
#endif

return 0;
}
arch_initcall(parisc_init);
Expand Down
Loading

0 comments on commit 48d25d3

Please sign in to comment.