Skip to content

Commit 513f17f

Browse files
committed
Merge tag 'sh-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux
Pull sh updates from John Paul Adrian Glaubitz: "This is a bit larger than my previous one and mainly consists of clean-up work in the arch/sh directory by Geert Uytterhoeven and Randy Dunlap. Additionally, this fixes a bug in the Storage Queue code that was discovered while I was reviewing a patch to switch the code to the bitmap API by Christophe Jaillet. So this contains both a fix for the original bug in the Storage Queue code that can be backported later as well as the Christophe's patch to swich the code to the bitmap API. Summary: - Use generic GCC library routines - sq: Use the bitmap API when applicable - sq: Fix incorrect element size for allocating bitmap buffer - pci: Remove unused variable in SH-7786 PCI Express code - mcount.S: fix build error when PRINTK is not enabled - remove sh5/sh64 last fragments - math-emu: fix macro redefined warning - init: use OF_EARLY_FLATTREE for early init - nmi_debug: fix return value of __setup handler - SH2007: drop the bad URL info" * tag 'sh-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux: sh: Replace <uapi/asm/types.h> by <asm-generic/int-ll64.h> sh: Use generic GCC library routines sh: sq: Use the bitmap API when applicable sh: sq: Fix incorrect element size for allocating bitmap buffer sh: pci: Remove unused variable in SH-7786 PCI Express code sh: mcount.S: fix build error when PRINTK is not enabled sh: remove sh5/sh64 last fragments sh: math-emu: fix macro redefined warning sh: init: use OF_EARLY_FLATTREE for early init sh: nmi_debug: fix return value of __setup handler sh: SH2007: drop the bad URL info
2 parents 35fab92 + e5c23be commit 513f17f

23 files changed

Lines changed: 20 additions & 137 deletions

File tree

Documentation/kbuild/kbuild.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ directory name found in the arch/ directory.
160160
But some architectures such as x86 and sparc have aliases.
161161

162162
- x86: i386 for 32 bit, x86_64 for 64 bit
163-
- sh: sh for 32 bit, sh64 for 64 bit
164163
- sparc: sparc32 for 32 bit, sparc64 for 64 bit
165164

166165
CROSS_COMPILE

Documentation/scheduler/sched-arch.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,5 @@ Possible arch problems I found (and either tried to fix or didn't):
7070

7171
ia64 - is safe_halt call racy vs interrupts? (does it sleep?) (See #4a)
7272

73-
sh64 - Is sleeping racy vs interrupts? (See #4a)
74-
7573
sparc - IRQs on at this point(?), change local_irq_save to _disable.
7674
- TODO: needs secondary CPUs to disable preempt (See #1)

Documentation/translations/zh_CN/scheduler/sched-arch.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,5 @@ arch/x86/kernel/process.c有轮询和睡眠空闲函数的例子。
7070

7171
ia64 - safe_halt的调用与中断相比,是否很荒谬? (它睡眠了吗) (参考 #4a)
7272

73-
sh64 - 睡眠与中断相比,是否很荒谬? (参考 #4a)
74-
7573
sparc - 在这一点上,IRQ是开着的(?),把local_irq_save改为_disable。
7674
- 待办事项: 需要第二个CPU来禁用抢占 (参考 #1)

arch/sh/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ config SUPERH
2020
select GENERIC_CMOS_UPDATE if SH_SH03 || SH_DREAMCAST
2121
select GENERIC_IDLE_POLL_SETUP
2222
select GENERIC_IRQ_SHOW
23+
select GENERIC_LIB_ASHLDI3
24+
select GENERIC_LIB_ASHRDI3
25+
select GENERIC_LIB_LSHRDI3
2326
select GENERIC_PCI_IOMAP if PCI
2427
select GENERIC_SCHED_CLOCK
2528
select GENERIC_SMP_IDLE_THREAD

arch/sh/Kconfig.debug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ config SH_STANDARD_BIOS
1515

1616
config STACK_DEBUG
1717
bool "Check for stack overflows"
18-
depends on DEBUG_KERNEL
18+
depends on DEBUG_KERNEL && PRINTK
1919
help
2020
This option will cause messages to be printed if free stack space
2121
drops below a certain limit. Saying Y here will add overhead to

arch/sh/boards/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,6 @@ config SH_SH2007
358358
intended for embedded applications.
359359
It has an Ethernet interface (SMC9118), direct connected
360360
Compact Flash socket, two serial ports and PC-104 bus.
361-
More information at <http://sh2000.sh-linux.org>.
362361

363362
config SH_APSH4A3A
364363
bool "AP-SH4A-3A"

arch/sh/boot/compressed/ashldi3.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// SPDX-License-Identifier: GPL-2.0-only
2-
#include "../../lib/ashldi3.c"
1+
// SPDX-License-Identifier: GPL-2.0-or-later
2+
#include "../../../../lib/ashldi3.c"

arch/sh/drivers/pci/pcie-sh7786.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ struct sh7786_pcie_port {
3131

3232
static struct sh7786_pcie_port *sh7786_pcie_ports;
3333
static unsigned int nr_ports;
34-
static unsigned long dma_pfn_offset;
3534
size_t memsize;
3635
u64 memstart;
3736

arch/sh/include/asm/types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#ifndef __ASM_SH_TYPES_H
33
#define __ASM_SH_TYPES_H
44

5-
#include <uapi/asm/types.h>
5+
#include <asm-generic/int-ll64.h>
66

77
/*
88
* These aren't exported outside the kernel to avoid name space clashes

arch/sh/kernel/cpu/sh4/sq.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,6 @@ static struct subsys_interface sq_interface = {
372372
static int __init sq_api_init(void)
373373
{
374374
unsigned int nr_pages = 0x04000000 >> PAGE_SHIFT;
375-
unsigned int size = (nr_pages + (BITS_PER_LONG - 1)) / BITS_PER_LONG;
376375
int ret = -ENOMEM;
377376

378377
printk(KERN_NOTICE "sq: Registering store queue API.\n");
@@ -382,7 +381,7 @@ static int __init sq_api_init(void)
382381
if (unlikely(!sq_cache))
383382
return ret;
384383

385-
sq_bitmap = kzalloc(size, GFP_KERNEL);
384+
sq_bitmap = bitmap_zalloc(nr_pages, GFP_KERNEL);
386385
if (unlikely(!sq_bitmap))
387386
goto out;
388387

@@ -393,7 +392,7 @@ static int __init sq_api_init(void)
393392
return 0;
394393

395394
out:
396-
kfree(sq_bitmap);
395+
bitmap_free(sq_bitmap);
397396
kmem_cache_destroy(sq_cache);
398397

399398
return ret;
@@ -402,7 +401,7 @@ static int __init sq_api_init(void)
402401
static void __exit sq_api_exit(void)
403402
{
404403
subsys_interface_unregister(&sq_interface);
405-
kfree(sq_bitmap);
404+
bitmap_free(sq_bitmap);
406405
kmem_cache_destroy(sq_cache);
407406
}
408407

0 commit comments

Comments
 (0)